summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-11-16 13:25:37 +0100
committerOndřej Surý <ondrej@sury.org>2012-11-16 13:25:37 +0100
commit0b82e05fe264306004119e30119e665365331e17 (patch)
treeb6ee689804e9ca3946a644a80760d821a032d42f
parentb57a2691d5b72c3894e2d4e0f945cecc6b3a1953 (diff)
downloadphp-0b82e05fe264306004119e30119e665365331e17.tar.gz
Imported Upstream version 5.5.0~alpha1upstream/5.5.0_alpha1
-rw-r--r--.travis.yml16
-rw-r--r--LICENSE2
-rw-r--r--Makefile.gcov30
-rw-r--r--Makefile.global2
-rw-r--r--NEWS7745
-rw-r--r--README.GIT-RULES10
-rw-r--r--README.md30
-rw-r--r--TSRM/tsrm_virtual_cwd.c9
-rw-r--r--TSRM/tsrm_win32.c5
-rwxr-xr-xUPGRADING1012
-rw-r--r--UPGRADING.INTERNALS208
-rw-r--r--Zend/Makefile.am3
-rw-r--r--Zend/Zend.dsp4
-rw-r--r--Zend/ZendTS.dsp4
-rw-r--r--Zend/acinclude.m42
-rw-r--r--[-rwxr-xr-x]Zend/tests/array_type_hint_001.phpt0
-rw-r--r--Zend/tests/bug18556.phpt37
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug20240.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug20242.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug21478.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug21888.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug22725.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug24436.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug24884.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26077.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26166.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26229.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26281.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26696.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26697.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26698.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26801.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug26802.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug27268.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug27304.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug27598.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug27669.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug27798.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug28072.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug28377.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug28442.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug28444.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug29368.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug29505.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug29674.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug29896.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30080.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30140.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30161.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30162.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30346.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30394.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30519.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30707.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30725.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30791.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30820.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30828.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug30998.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug31102.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug31177-2.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug31177.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug31341.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug31525.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32226.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32252.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32290.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32296.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32322.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32428.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32596.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32660.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32799.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug32993.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33116.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33171.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33257.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33318.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33512.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33558.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33710.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33732.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33802.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33996.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug33999.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34045.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34062.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34064.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34065.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34137.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34199.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34260.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34358.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34467.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34518.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34617.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34678.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34786.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34879.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug34893.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35017.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35106.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35163.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35163_2.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35163_3.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35239.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35393.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35411.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35437.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35470.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35509.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35634.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug35655.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36006.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36037.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36071.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36214.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36268.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36303.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36513.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36568.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug36759.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37046.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37138.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37144.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37212.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37632.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37667.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37707.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37715.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug37811.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38047.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38146.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38211.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38220.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38234.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38287.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38623.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38772.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38808.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug38942.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39017.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39297.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39304.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39438.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39445.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39449.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39542.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39602.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39721.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39775.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39825.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39944.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug39990.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40236.inc0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40236.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40261.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40509.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40705.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40757.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40770.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40809.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug40833.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41117_1.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41372.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41401.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41633_1.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41633_2.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41633_3.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41633_4.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41929.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug41961.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug42772.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug42802.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug42819.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug42820.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug42859.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug42937.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug43027.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug43128.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug43175.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug43183.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug43201.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug44660.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug45178.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug45805.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug46304.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug60169.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug60573.phpt0
-rw-r--r--Zend/tests/bug60738.phpt22
-rw-r--r--Zend/tests/bug60738_variation.phpt23
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug60978.phpt0
-rw-r--r--Zend/tests/bug61681.phpt11
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug61761.phpt0
-rw-r--r--Zend/tests/bug62991.phpt50
-rw-r--r--Zend/tests/bug63055.phpt23
-rw-r--r--Zend/tests/bug63219.phpt18
-rw-r--r--Zend/tests/bug63305.phpt43
-rw-r--r--Zend/tests/bug63336.phpt24
-rw-r--r--[-rwxr-xr-x]Zend/tests/bug_debug_backtrace.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/call_static.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/catch.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/catch_002.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/catch_003.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/catch_004.phpt0
-rw-r--r--Zend/tests/catch_finally_001.phpt32
-rw-r--r--Zend/tests/catch_finally_002.phpt21
-rw-r--r--Zend/tests/catch_finally_003.phpt40
-rw-r--r--Zend/tests/catch_finally_004.phpt41
-rw-r--r--Zend/tests/catch_finally_005.phpt21
-rw-r--r--Zend/tests/catch_finally_006.phpt28
-rw-r--r--[-rwxr-xr-x]Zend/tests/closure_016.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/closure_022.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/closure_023.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/closure_033.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/closure_036.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/closure_037.phpt0
-rw-r--r--Zend/tests/const_dereference_001.phpt21
-rw-r--r--Zend/tests/const_dereference_002.phpt18
-rw-r--r--Zend/tests/const_dereference_003.phpt21
-rw-r--r--[-rwxr-xr-x]Zend/tests/constants/dir-constant-eval.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/constants/dir-constant-includes.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/constants/dir-constant-nested_includes.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/constants/dir-constant-normal.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/constants_005.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/dtor_scope.phpt0
-rw-r--r--Zend/tests/empty_with_expr.phpt32
-rw-r--r--Zend/tests/errmsg_043.phpt12
-rw-r--r--[-rwxr-xr-x]Zend/tests/exception_007.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/exception_008.phpt0
-rw-r--r--Zend/tests/foreach_list_001.phpt43
-rw-r--r--Zend/tests/foreach_list_002.phpt26
-rw-r--r--Zend/tests/foreach_list_003.phpt13
-rw-r--r--Zend/tests/foreach_list_004.phpt13
-rw-r--r--Zend/tests/foreach_temp_array_expr_with_refs.phpt18
-rw-r--r--Zend/tests/generators/auto_incrementing_keys.phpt22
-rw-r--r--Zend/tests/generators/backtrace.phpt27
-rw-r--r--Zend/tests/generators/clone.phpt32
-rw-r--r--Zend/tests/generators/clone_with_foreach.phpt33
-rw-r--r--Zend/tests/generators/clone_with_stack.phpt18
-rw-r--r--Zend/tests/generators/clone_with_symbol_table.phpt27
-rw-r--r--Zend/tests/generators/clone_with_this.phpt24
-rw-r--r--Zend/tests/generators/dynamic_call.phpt19
-rw-r--r--Zend/tests/generators/errors/generator_cannot_return_before_yield_error.phpt13
-rw-r--r--Zend/tests/generators/errors/generator_cannot_return_error.phpt13
-rw-r--r--Zend/tests/generators/errors/generator_extend_error.phpt10
-rw-r--r--Zend/tests/generators/errors/generator_instantiate_error.phpt10
-rw-r--r--Zend/tests/generators/errors/non_ref_generator_iterated_by_ref_error.phpt18
-rw-r--r--Zend/tests/generators/errors/resume_running_generator_error.phpt17
-rw-r--r--Zend/tests/generators/errors/serialize_unserialize_error.phpt46
-rw-r--r--Zend/tests/generators/errors/yield_const_by_ref_error.phpt16
-rw-r--r--Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt29
-rw-r--r--Zend/tests/generators/errors/yield_non_ref_function_call_by_ref_error.phpt20
-rw-r--r--Zend/tests/generators/errors/yield_outside_function_error.phpt10
-rw-r--r--Zend/tests/generators/fibonacci.phpt36
-rw-r--r--Zend/tests/generators/finally_ran_on_close.phpt25
-rw-r--r--Zend/tests/generators/finally_uninterrupted.phpt28
-rw-r--r--Zend/tests/generators/finally_with_return.phpt33
-rw-r--r--Zend/tests/generators/func_get_args.phpt21
-rw-r--r--Zend/tests/generators/generator_closure.phpt20
-rw-r--r--Zend/tests/generators/generator_closure_with_this.phpt20
-rw-r--r--Zend/tests/generators/generator_in_multipleiterator.phpt37
-rw-r--r--Zend/tests/generators/generator_method.phpt29
-rw-r--r--Zend/tests/generators/generator_method_by_ref.phpt44
-rw-r--r--Zend/tests/generators/generator_returns_generator.phpt18
-rw-r--r--Zend/tests/generators/generator_rewind.phpt62
-rw-r--r--Zend/tests/generators/generator_send.phpt22
-rw-r--r--Zend/tests/generators/generator_static_method.phpt29
-rw-r--r--Zend/tests/generators/generator_throwing_during_function_call.phpt32
-rw-r--r--Zend/tests/generators/generator_throwing_exception.phpt28
-rw-r--r--Zend/tests/generators/generator_throwing_in_foreach.phpt20
-rw-r--r--Zend/tests/generators/generator_with_keys.phpt26
-rw-r--r--Zend/tests/generators/nested_method_calls.phpt39
-rw-r--r--Zend/tests/generators/no_foreach_var_leaks.phpt19
-rw-r--r--Zend/tests/generators/send_after_close.phpt14
-rw-r--r--Zend/tests/generators/send_returns_current.phpt20
-rw-r--r--Zend/tests/generators/unused_return_value.phpt13
-rw-r--r--Zend/tests/generators/xrange.phpt23
-rw-r--r--Zend/tests/generators/yield_array_key.phpt18
-rw-r--r--Zend/tests/generators/yield_array_offset_by_ref.phpt26
-rw-r--r--Zend/tests/generators/yield_by_reference.phpt42
-rw-r--r--Zend/tests/generators/yield_during_function_call.phpt15
-rw-r--r--Zend/tests/generators/yield_during_method_call.phpt35
-rw-r--r--Zend/tests/generators/yield_in_finally.phpt29
-rw-r--r--Zend/tests/generators/yield_in_parenthesis.phpt23
-rw-r--r--Zend/tests/generators/yield_ref_function_call_by_reference.phpt24
-rw-r--r--Zend/tests/generators/yield_without_value.phpt27
-rw-r--r--[-rwxr-xr-x]Zend/tests/instanceof.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/is_a.phpt0
-rw-r--r--Zend/tests/isset_expr_error.phpt8
-rw-r--r--Zend/tests/isset_func_error.phpt8
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump01.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump02.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump03.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump04.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump05.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump06.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump07.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump08.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump09.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/jump10.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/lsb_018.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/lsb_022.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/multibyte/multibyte_encoding_001.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/multibyte/multibyte_encoding_002.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/multibyte/multibyte_encoding_003.phptbin471 -> 471 bytes
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_001.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_002.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_003.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_004.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_005.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_006.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_007.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_008.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_009.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_010.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_011.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_012.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_013.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_014.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_015.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_016.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_017.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_018.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_019.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_020.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_021.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_022.inc0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_022.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_023.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_024.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_025.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_026.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_027.inc0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_027.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_028.inc0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_028.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_029.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_030.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_031.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_032.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_033.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_034.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_035.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_036.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_037.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_038.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_054.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_055.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_056.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_057.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_058.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_059.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_065.inc0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_065.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_075.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_076.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_1.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_2.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_3.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_4.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_5.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_6.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_7.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_077_8.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/ns_078.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/object_handlers.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/objects_015.phpt0
-rw-r--r--Zend/tests/offset_assign.phpt4
-rw-r--r--Zend/tests/offset_string.phpt2
-rw-r--r--[-rwxr-xr-x]Zend/tests/selfParent_001.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/selfParent_002.phpt0
-rw-r--r--Zend/tests/try_catch_finally_001.phpt36
-rw-r--r--Zend/tests/try_catch_finally_002.phpt42
-rw-r--r--Zend/tests/try_catch_finally_003.phpt38
-rw-r--r--Zend/tests/try_catch_finally_004.phpt30
-rw-r--r--Zend/tests/try_catch_finally_005.phpt52
-rw-r--r--Zend/tests/try_catch_finally_006.phpt39
-rw-r--r--Zend/tests/try_catch_finally_007.phpt46
-rw-r--r--Zend/tests/try_finally_001.phpt22
-rw-r--r--Zend/tests/try_finally_002.phpt23
-rw-r--r--Zend/tests/try_finally_003.phpt27
-rw-r--r--Zend/tests/try_finally_004.phpt14
-rw-r--r--Zend/tests/try_finally_005.phpt17
-rw-r--r--Zend/tests/try_finally_006.phpt26
-rw-r--r--Zend/tests/try_finally_007.phpt22
-rw-r--r--Zend/tests/try_finally_008.phpt21
-rw-r--r--Zend/tests/try_finally_009.phpt23
-rw-r--r--[-rwxr-xr-x]Zend/tests/unexpected_ref_bug.phpt0
-rw-r--r--[-rwxr-xr-x]Zend/tests/unset_cv12.phpt0
-rw-r--r--Zend/zend.h23
-rw-r--r--Zend/zend_alloc.c4
-rw-r--r--Zend/zend_alloc.h6
-rw-r--r--[-rwxr-xr-x]Zend/zend_build.h0
-rw-r--r--Zend/zend_builtin_functions.c49
-rw-r--r--Zend/zend_compile.c178
-rw-r--r--Zend/zend_compile.h17
-rw-r--r--Zend/zend_default_classes.c2
-rw-r--r--Zend/zend_dtrace.c4
-rw-r--r--Zend/zend_dtrace.h4
-rw-r--r--Zend/zend_execute.c61
-rw-r--r--Zend/zend_execute.h19
-rw-r--r--Zend/zend_execute_API.c46
-rw-r--r--Zend/zend_extensions.h2
-rw-r--r--Zend/zend_generators.c916
-rw-r--r--Zend/zend_generators.h78
-rw-r--r--Zend/zend_globals.h4
-rw-r--r--Zend/zend_highlight.c2
-rw-r--r--Zend/zend_ini_parser.c712
-rw-r--r--Zend/zend_ini_parser.h31
-rw-r--r--Zend/zend_ini_parser.output6
-rw-r--r--Zend/zend_ini_scanner.c2
-rw-r--r--Zend/zend_ini_scanner_defs.h2
-rw-r--r--[-rwxr-xr-x]Zend/zend_interfaces.c0
-rw-r--r--[-rwxr-xr-x]Zend/zend_interfaces.h0
-rw-r--r--[-rwxr-xr-x]Zend/zend_iterators.c0
-rw-r--r--[-rwxr-xr-x]Zend/zend_iterators.h0
-rw-r--r--Zend/zend_language_parser.c5679
-rw-r--r--Zend/zend_language_parser.h507
-rw-r--r--Zend/zend_language_parser.output37506
-rw-r--r--Zend/zend_language_parser.y162
-rw-r--r--Zend/zend_language_scanner.c5373
-rw-r--r--Zend/zend_language_scanner.h5
-rw-r--r--Zend/zend_language_scanner.l85
-rw-r--r--Zend/zend_language_scanner_defs.h2
-rw-r--r--Zend/zend_modules.h2
-rw-r--r--Zend/zend_opcode.c52
-rw-r--r--Zend/zend_operators.c92
-rw-r--r--Zend/zend_operators.h1
-rw-r--r--Zend/zend_ptr_stack.c16
-rw-r--r--Zend/zend_ptr_stack.h7
-rw-r--r--Zend/zend_signal.c4
-rw-r--r--Zend/zend_variables.c2
-rw-r--r--Zend/zend_vm_def.h1005
-rw-r--r--Zend/zend_vm_execute.h4837
-rw-r--r--Zend/zend_vm_execute.skl88
-rw-r--r--Zend/zend_vm_gen.php103
-rw-r--r--Zend/zend_vm_opcodes.h3
-rw-r--r--acinclude.m46
-rw-r--r--aclocal.m46
-rw-r--r--config.guess2
-rwxr-xr-xconfigure4402
-rw-r--r--configure.in20
-rw-r--r--[-rwxr-xr-x]ext/bcmath/tests/bcdiv_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/bcmath/tests/bcpowmod_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/bcmath/tests/bcpowmod_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/bcmath/tests/bcsqrt_error1.phpt0
-rw-r--r--ext/calendar/calendar.c23
-rw-r--r--ext/calendar/jewish.c64
-rw-r--r--ext/calendar/sdncal.h3
-rw-r--r--ext/calendar/tests/bug54254.phpt59
-rw-r--r--ext/calendar/tests/cal_info.phpt8
-rw-r--r--ext/calendar/tests/jdmonthname.phpt8
-rw-r--r--ext/calendar/tests/jdtojewish.phpt8
-rw-r--r--[-rwxr-xr-x]ext/com_dotnet/com_persist.c0
-rw-r--r--[-rwxr-xr-x]ext/com_dotnet/tests/27974.phpt0
-rw-r--r--ext/curl/config.m49
-rw-r--r--ext/curl/config.w323
-rw-r--r--ext/curl/curl.dsp4
-rw-r--r--ext/curl/interface.c1925
-rw-r--r--ext/curl/multi.c4
-rw-r--r--ext/curl/package.xml1
-rw-r--r--ext/curl/php_curl.h39
-rw-r--r--ext/curl/share.c136
-rw-r--r--ext/curl/tests/bug54995.phpt30
-rw-r--r--ext/curl/tests/bug63363.phpt29
-rw-r--r--[-rwxr-xr-x]ext/curl/tests/curl_basic_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/curl/tests/curl_basic_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/curl/tests/curl_basic_008.phpt0
-rw-r--r--ext/curl/tests/curl_basic_022.phpt25
-rw-r--r--ext/curl/tests/curl_escape.phptbin0 -> 688 bytes
-rw-r--r--ext/curl/tests/curl_reset.phpt40
-rw-r--r--ext/curl/tests/curl_setopt_basic003.phpt2
-rw-r--r--ext/date/TODO1
-rw-r--r--ext/date/lib/parse_iso_intervals.c2
-rw-r--r--ext/date/lib/timezonedb.h1527
-rw-r--r--ext/date/lib/tm2unixtime.c75
-rw-r--r--ext/date/php_date.c17
-rw-r--r--[-rwxr-xr-x]ext/date/tests/bug55253.phpt0
-rw-r--r--ext/date/tests/bug61642.phpt62
-rw-r--r--ext/date/tests/bug62896.phpt2
-rw-r--r--ext/date/tests/date_default_timezone_get-4.phpt11
-rw-r--r--[-rwxr-xr-x]ext/date/tests/strtotime-mysql.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dba/dba_db1.c0
-rw-r--r--[-rwxr-xr-x]ext/dba/dba_qdbm.c0
-rw-r--r--[-rwxr-xr-x]ext/dba/php_db1.h0
-rw-r--r--[-rwxr-xr-x]ext/dba/tests/bug36436.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dba/tests/bug38698.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dba/tests/dba009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dba/tests/dba_db1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dba/tests/dba_qdbm.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMAttr_ownerElement_error_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMAttr_value_basic_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMCharacterData_data_error_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMCharacterData_length_error_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidate_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidate_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidate_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidate_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidate_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/dom/tests/DOMDocument_schemaValidate_error5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/enchant/enchant.c0
-rw-r--r--ext/ereg/regex.patch72
-rw-r--r--[-rwxr-xr-x]ext/exif/tests/bug34704.phpt0
-rw-r--r--[-rwxr-xr-x]ext/exif/tests/bug60150.phpt0
-rw-r--r--ext/fileinfo/config.w3226
-rw-r--r--ext/fileinfo/libmagic.patch181
-rw-r--r--ext/fileinfo/libmagic/apprentice.c38
-rw-r--r--ext/fileinfo/libmagic/print.c1
-rw-r--r--ext/fileinfo/php_fileinfo.h2
-rw-r--r--ext/filter/filter_private.h6
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/045.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/046.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/047.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/048.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/049.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/050.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/051.phpt0
-rw-r--r--[-rwxr-xr-x]ext/filter/tests/callback_closure.phpt0
-rw-r--r--[-rwxr-xr-x]ext/ftp/tests/ftp_alloc_basic1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/ftp/tests/ftp_alloc_basic2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/ftp/tests/ftp_chmod_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/ftp/tests/ftp_exec_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/ftp/tests/ftp_rmdir_basic.phpt0
-rw-r--r--ext/gd/config.w326
-rw-r--r--ext/gd/gd.c5
-rw-r--r--ext/gd/libgd/gd_png.c4
-rw-r--r--ext/gd/tests/bug43073.phpt5
-rw-r--r--ext/gd/tests/bug43073_1.phpt51
-rw-r--r--ext/gd/tests/bug48801.phpt5
-rw-r--r--ext/gd/tests/bug48801_1.phpt25
-rw-r--r--ext/gd/tests/func.inc61
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageantialias_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageantialias_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagearc_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagearc_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagearc_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagearc_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecolormatch_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecolormatch_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecolormatch_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecolormatch_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecolormatch_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecolorset_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageconvolution_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageconvolution_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageconvolution_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageconvolution_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecopymerge_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagecopymerge_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error6.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error7.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageellipse_error8.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilledarc_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilledarc_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilledarc_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilledarc_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error6.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilltoborder_error7.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error10.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error11.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error12.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error13.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error14.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error15.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error16.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error17.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error18.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error19.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error20.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error6.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error7.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error8.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagefilter_error9.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageinterlace_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageinterlace_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageinterlace_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageinterlace_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imageinterlace_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error6.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error7.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagerectangle_error8.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/imagesetbrush_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/jpeg2wbmp_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/jpeg2wbmp_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/jpeg2wbmp_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/png2wbmp_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/png2wbmp_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/gd/tests/png2wbmp_error3.phpt0
-rw-r--r--ext/hash/hash.c210
-rw-r--r--ext/hash/php_hash.h1
-rw-r--r--ext/hash/tests/hash_pbkdf2_basic.phpt37
-rw-r--r--ext/hash/tests/hash_pbkdf2_error.phpt78
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt0
-rw-r--r--[-rwxr-xr-x]ext/iconv/tests/ob_iconv_handler-charset-length-cve-2007-4840.phpt0
-rw-r--r--[-rwxr-xr-x]ext/interbase/php_ibase_includes.h0
-rw-r--r--[-rwxr-xr-x]ext/interbase/tests/008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/interbase/tests/interbase.inc0
-rw-r--r--[-rwxr-xr-x]ext/interbase/tests/skipif.inc3
-rw-r--r--ext/intl/breakiterator/breakiterator_class.cpp397
-rw-r--r--ext/intl/breakiterator/breakiterator_class.h71
-rw-r--r--ext/intl/breakiterator/breakiterator_iterators.cpp346
-rw-r--r--ext/intl/breakiterator/breakiterator_iterators.h42
-rw-r--r--ext/intl/breakiterator/breakiterator_methods.cpp452
-rw-r--r--ext/intl/breakiterator/breakiterator_methods.h64
-rw-r--r--ext/intl/breakiterator/codepointiterator_internal.cpp291
-rw-r--r--ext/intl/breakiterator/codepointiterator_internal.h98
-rw-r--r--ext/intl/breakiterator/codepointiterator_methods.cpp44
-rw-r--r--ext/intl/breakiterator/codepointiterator_methods.h24
-rw-r--r--ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp221
-rw-r--r--ext/intl/breakiterator/rulebasedbreakiterator_methods.h32
-rw-r--r--ext/intl/calendar/calendar_class.cpp550
-rw-r--r--ext/intl/calendar/calendar_class.h70
-rw-r--r--ext/intl/calendar/calendar_methods.cpp1328
-rw-r--r--ext/intl/calendar/calendar_methods.h112
-rw-r--r--ext/intl/calendar/gregoriancalendar_methods.cpp256
-rw-r--r--ext/intl/calendar/gregoriancalendar_methods.h32
-rw-r--r--ext/intl/collator/collator_create.c2
-rw-r--r--ext/intl/collator/collator_sort.c1
-rw-r--r--ext/intl/common/common_date.cpp250
-rw-r--r--ext/intl/common/common_date.h40
-rw-r--r--ext/intl/common/common_enum.cpp354
-rw-r--r--ext/intl/common/common_enum.h77
-rw-r--r--ext/intl/common/common_error.c2
-rw-r--r--ext/intl/config.m423
-rw-r--r--ext/intl/config.w3229
-rw-r--r--ext/intl/dateformat/dateformat.c154
-rw-r--r--ext/intl/dateformat/dateformat_attr.c164
-rw-r--r--ext/intl/dateformat/dateformat_attr.h4
-rw-r--r--ext/intl/dateformat/dateformat_attrcpp.cpp261
-rw-r--r--ext/intl/dateformat/dateformat_attrcpp.h35
-rw-r--r--ext/intl/dateformat/dateformat_class.c28
-rw-r--r--ext/intl/dateformat/dateformat_class.h12
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp193
-rw-r--r--ext/intl/dateformat/dateformat_create.h25
-rw-r--r--ext/intl/dateformat/dateformat_format.c179
-rw-r--r--ext/intl/dateformat/dateformat_format_object.cpp230
-rw-r--r--ext/intl/dateformat/dateformat_format_object.h19
-rw-r--r--ext/intl/dateformat/dateformat_helpers.cpp106
-rw-r--r--ext/intl/dateformat/dateformat_helpers.h39
-rw-r--r--ext/intl/formatter/formatter_main.c2
-rw-r--r--ext/intl/grapheme/grapheme.h1
-rw-r--r--ext/intl/intl_convertcpp.cpp89
-rw-r--r--ext/intl/intl_convertcpp.h32
-rw-r--r--ext/intl/intl_cppshims.h34
-rw-r--r--ext/intl/intl_error.c101
-rw-r--r--ext/intl/intl_error.h8
-rw-r--r--ext/intl/locale/locale_methods.c21
-rw-r--r--ext/intl/msgformat/msgformat.c2
-rw-r--r--ext/intl/msgformat/msgformat_attr.c6
-rw-r--r--ext/intl/msgformat/msgformat_data.c24
-rw-r--r--ext/intl/msgformat/msgformat_data.h2
-rw-r--r--ext/intl/msgformat/msgformat_format.c49
-rw-r--r--ext/intl/msgformat/msgformat_helpers.cpp629
-rw-r--r--ext/intl/msgformat/msgformat_helpers.h6
-rw-r--r--ext/intl/msgformat/msgformat_parse.c2
-rw-r--r--ext/intl/php_intl.c355
-rw-r--r--ext/intl/php_intl.h10
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.c15
-rw-r--r--ext/intl/tests/badargs.phpt5
-rw-r--r--ext/intl/tests/breakiter___construct.phpt14
-rw-r--r--ext/intl/tests/breakiter___construct_error.phpt38
-rw-r--r--ext/intl/tests/breakiter_clone_basic.phpt27
-rw-r--r--ext/intl/tests/breakiter_createCodePointInstance_basic.phpt43
-rw-r--r--ext/intl/tests/breakiter_createCodePointInstance_error.phpt18
-rw-r--r--ext/intl/tests/breakiter_current_basic.phpt28
-rw-r--r--ext/intl/tests/breakiter_factories_basic.phpt46
-rw-r--r--ext/intl/tests/breakiter_factories_error.phpt43
-rw-r--r--ext/intl/tests/breakiter_first_basic.phpt22
-rw-r--r--ext/intl/tests/breakiter_first_last_previous_current_error.phpt39
-rw-r--r--ext/intl/tests/breakiter_following_basic.phpt24
-rw-r--r--ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt51
-rw-r--r--ext/intl/tests/breakiter_getLocale_basic.phpt21
-rw-r--r--ext/intl/tests/breakiter_getLocale_error.phpt33
-rw-r--r--ext/intl/tests/breakiter_getPartsIterator_basic.phpt37
-rw-r--r--ext/intl/tests/breakiter_getPartsIterator_error.phpt33
-rw-r--r--ext/intl/tests/breakiter_getPartsIterator_var1.phpt60
-rw-r--r--ext/intl/tests/breakiter_getText_basic.phpt17
-rw-r--r--ext/intl/tests/breakiter_getText_error.phpt19
-rw-r--r--ext/intl/tests/breakiter_isBoundary_basic.phpt28
-rw-r--r--ext/intl/tests/breakiter_last_basic.phpt20
-rw-r--r--ext/intl/tests/breakiter_next_basic.phpt30
-rw-r--r--ext/intl/tests/breakiter_next_error.phpt27
-rw-r--r--ext/intl/tests/breakiter_preceding_basic.phpt24
-rw-r--r--ext/intl/tests/breakiter_previous_basic.phpt22
-rw-r--r--ext/intl/tests/breakiter_setText_basic.phpt36
-rw-r--r--ext/intl/tests/breakiter_setText_error.phpt44
-rw-r--r--ext/intl/tests/bug50590.phpt2
-rw-r--r--ext/intl/tests/bug58756_MessageFormatter.phpt34
-rw-r--r--ext/intl/tests/bug62017.phpt2
-rw-r--r--ext/intl/tests/bug62081.phpt6
-rw-r--r--ext/intl/tests/bug62915.phpt24
-rw-r--r--ext/intl/tests/calendar_add_basic.phpt33
-rw-r--r--ext/intl/tests/calendar_add_error.phpt41
-rw-r--r--ext/intl/tests/calendar_before_after_error.phpt57
-rw-r--r--ext/intl/tests/calendar_clear_basic.phpt40
-rw-r--r--ext/intl/tests/calendar_clear_error.phpt31
-rw-r--r--ext/intl/tests/calendar_clear_variation1.phpt33
-rw-r--r--ext/intl/tests/calendar_createInstance_basic.phpt42
-rw-r--r--ext/intl/tests/calendar_createInstance_error.phpt38
-rw-r--r--ext/intl/tests/calendar_createInstance_variation1.phpt84
-rw-r--r--ext/intl/tests/calendar_equals_before_after_basic.phpt59
-rw-r--r--ext/intl/tests/calendar_equals_error.phpt46
-rw-r--r--ext/intl/tests/calendar_fieldDifference_basic.phpt35
-rw-r--r--ext/intl/tests/calendar_fieldDifference_error.phpt42
-rw-r--r--ext/intl/tests/calendar_fromDateTime_basic.phpt52
-rw-r--r--ext/intl/tests/calendar_fromDateTime_error.phpt59
-rw-r--r--ext/intl/tests/calendar_getAvailableLocales_basic.phpt23
-rw-r--r--ext/intl/tests/calendar_getAvailableLocales_error.phpt24
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_basic.phpt34
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_error.phpt44
-rw-r--r--ext/intl/tests/calendar_getErrorCode_error.phpt26
-rw-r--r--ext/intl/tests/calendar_getErrorCode_getErrorMessage_basic.phpt43
-rw-r--r--ext/intl/tests/calendar_getErrorMessage_error.phpt26
-rw-r--r--ext/intl/tests/calendar_getFirstDayOfWeek_basic.phpt20
-rw-r--r--ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt32
-rw-r--r--ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt36
-rw-r--r--ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt26
-rw-r--r--ext/intl/tests/calendar_getLocale_basic.phpt22
-rw-r--r--ext/intl/tests/calendar_getLocale_error.phpt42
-rw-r--r--ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt22
-rw-r--r--ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt32
-rw-r--r--ext/intl/tests/calendar_getNow_basic.phpt23
-rw-r--r--ext/intl/tests/calendar_getNow_error.phpt24
-rw-r--r--ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt47
-rw-r--r--ext/intl/tests/calendar_getTimeZone_basic.phpt34
-rw-r--r--ext/intl/tests/calendar_getTimeZone_error.phpt32
-rw-r--r--ext/intl/tests/calendar_getTime_basic.phpt29
-rw-r--r--ext/intl/tests/calendar_getTime_error.phpt31
-rw-r--r--ext/intl/tests/calendar_getType_basic.phpt23
-rw-r--r--ext/intl/tests/calendar_getType_error.phpt32
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_basic.phpt24
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_error.phpt44
-rw-r--r--ext/intl/tests/calendar_getXMaximum_basic.phpt34
-rw-r--r--ext/intl/tests/calendar_getXMinimum_basic.phpt34
-rw-r--r--ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt100
-rw-r--r--ext/intl/tests/calendar_get_basic.phpt23
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt84
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt71
-rw-r--r--ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt49
-rw-r--r--ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt67
-rw-r--r--ext/intl/tests/calendar_inDaylightTime_basic.phpt24
-rw-r--r--ext/intl/tests/calendar_inDaylightTime_error.phpt32
-rw-r--r--ext/intl/tests/calendar_isEquivalentTo_basic.phpt40
-rw-r--r--ext/intl/tests/calendar_isEquivalentTo_error.phpt50
-rw-r--r--ext/intl/tests/calendar_isLenient_error.phpt32
-rw-r--r--ext/intl/tests/calendar_isSet_basic.phpt24
-rw-r--r--ext/intl/tests/calendar_isSet_error.phpt42
-rw-r--r--ext/intl/tests/calendar_isWeekend_basic.phpt26
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt38
-rw-r--r--ext/intl/tests/calendar_is_set_lenient_basic.phpt28
-rw-r--r--ext/intl/tests/calendar_roll_basic.phpt34
-rw-r--r--ext/intl/tests/calendar_roll_error.phpt37
-rw-r--r--ext/intl/tests/calendar_roll_variation1.phpt32
-rw-r--r--ext/intl/tests/calendar_setFirstDayOfWeek_basic.phpt28
-rw-r--r--ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt40
-rw-r--r--ext/intl/tests/calendar_setLenient_error.phpt44
-rw-r--r--ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt82
-rw-r--r--ext/intl/tests/calendar_setTimeZone_basic.phpt39
-rw-r--r--ext/intl/tests/calendar_setTimeZone_error.phpt41
-rw-r--r--ext/intl/tests/calendar_setTimeZone_error2.phpt29
-rw-r--r--ext/intl/tests/calendar_setTimeZone_variation1.phpt30
-rw-r--r--ext/intl/tests/calendar_setTimeZone_variation2.phpt30
-rw-r--r--ext/intl/tests/calendar_setTime_basic.phpt33
-rw-r--r--ext/intl/tests/calendar_setTime_error.phpt37
-rw-r--r--ext/intl/tests/calendar_set_basic.phpt27
-rw-r--r--ext/intl/tests/calendar_set_error.phpt41
-rw-r--r--ext/intl/tests/calendar_set_variation1.phpt41
-rw-r--r--ext/intl/tests/calendar_toDateTime_basic.phpt23
-rw-r--r--ext/intl/tests/calendar_toDateTime_error.phpt41
-rw-r--r--ext/intl/tests/cpbi_clone_equality.phpt33
-rw-r--r--ext/intl/tests/cpbi_getLastCodePoint_basic.phpt82
-rw-r--r--ext/intl/tests/cpbi_getLastCodePoint_error.phpt19
-rw-r--r--ext/intl/tests/cpbi_parts_iterator.phpt40
-rw-r--r--ext/intl/tests/dateformat___construct_bad_tz_cal.phpt32
-rw-r--r--ext/intl/tests/dateformat_calendars.phpt2
-rw-r--r--ext/intl/tests/dateformat_create_cal_arg.phpt53
-rw-r--r--ext/intl/tests/dateformat_format.phpt14
-rw-r--r--ext/intl/tests/dateformat_formatObject_calendar.phpt41
-rw-r--r--ext/intl/tests/dateformat_formatObject_datetime.phpt34
-rw-r--r--ext/intl/tests/dateformat_formatObject_error.phpt74
-rw-r--r--ext/intl/tests/dateformat_format_parse.phpt2
-rw-r--r--ext/intl/tests/dateformat_getCalendarObject_error.phpt43
-rw-r--r--ext/intl/tests/dateformat_getTimeZone_error.phpt43
-rw-r--r--ext/intl/tests/dateformat_get_set_calendar.phpt95
-rw-r--r--ext/intl/tests/dateformat_get_set_timezone.phpt62
-rw-r--r--ext/intl/tests/dateformat_get_timezone_id.phpt15
-rw-r--r--ext/intl/tests/dateformat_setTimeZoneID_deprecation.phpt22
-rw-r--r--ext/intl/tests/dateformat_setTimeZone_error.phpt53
-rw-r--r--ext/intl/tests/dateformat_set_timezone_id2.phpt22
-rw-r--r--ext/intl/tests/dateformat_timezone_arg_variations.phpt45
-rw-r--r--ext/intl/tests/gregoriancalendar___construct_basic.phpt51
-rw-r--r--ext/intl/tests/gregoriancalendar___construct_error.phpt35
-rw-r--r--ext/intl/tests/gregoriancalendar___construct_variant1.phpt30
-rw-r--r--ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt30
-rw-r--r--ext/intl/tests/gregoriancalendar_get_setGregorianChange_basic.phpt32
-rw-r--r--ext/intl/tests/gregoriancalendar_isLeapYear_basic.phpt28
-rw-r--r--ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt48
-rw-r--r--ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt42
-rw-r--r--ext/intl/tests/ini_use_exceptions_basic.phpt21
-rw-r--r--ext/intl/tests/msgfmt_format_datetime.phpt28
-rw-r--r--ext/intl/tests/msgfmt_format_error1.phpt19
-rw-r--r--ext/intl/tests/msgfmt_format_error2.phpt23
-rw-r--r--ext/intl/tests/msgfmt_format_error3.phpt23
-rw-r--r--ext/intl/tests/msgfmt_format_error4.phpt28
-rw-r--r--ext/intl/tests/msgfmt_format_error5.phpt26
-rw-r--r--ext/intl/tests/msgfmt_format_error6.phpt23
-rw-r--r--ext/intl/tests/msgfmt_format_intlcalendar.phpt30
-rw-r--r--ext/intl/tests/msgfmt_format_mixed_params.phpt25
-rw-r--r--ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt58
-rw-r--r--ext/intl/tests/msgfmt_format_subpatterns.phpt75
-rw-r--r--ext/intl/tests/msgfmt_format_subpatterns_named.phpt75
-rw-r--r--ext/intl/tests/msgfmt_get_error.phpt29
-rw-r--r--ext/intl/tests/msgfmt_millisecond_dates.phpt29
-rw-r--r--ext/intl/tests/msgfmt_setPattern_cache.phpt26
-rw-r--r--ext/intl/tests/rbbiter___construct_basic.phpt31
-rw-r--r--ext/intl/tests/rbbiter_getBinaryRules_basic.phpt39
-rw-r--r--ext/intl/tests/rbbiter_getRuleStatusVec_basic.phpt59
-rw-r--r--ext/intl/tests/rbbiter_getRuleStatus_basic.phpt46
-rw-r--r--ext/intl/tests/rbbiter_getRules_basic.phpt32
-rw-r--r--ext/intl/tests/timezone_clone_basic.phpt51
-rw-r--r--ext/intl/tests/timezone_clone_error.phpt32
-rw-r--r--ext/intl/tests/timezone_countEquivalentIDs_basic.phpt20
-rw-r--r--ext/intl/tests/timezone_countEquivalentIDs_error.phpt35
-rw-r--r--ext/intl/tests/timezone_createDefault_basic.phpt31
-rw-r--r--ext/intl/tests/timezone_createDefault_error.phpt19
-rw-r--r--ext/intl/tests/timezone_createEnumeration_basic.phpt26
-rw-r--r--ext/intl/tests/timezone_createEnumeration_error.phpt23
-rw-r--r--ext/intl/tests/timezone_createEnumeration_variation1.phpt24
-rw-r--r--ext/intl/tests/timezone_createEnumeration_variation2.phpt24
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt34
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt42
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt32
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt52
-rw-r--r--ext/intl/tests/timezone_createTimeZone_basic.phpt33
-rw-r--r--ext/intl/tests/timezone_createTimeZone_error.phpt34
-rw-r--r--ext/intl/tests/timezone_equals_basic.phpt33
-rw-r--r--ext/intl/tests/timezone_equals_error.phpt43
-rw-r--r--ext/intl/tests/timezone_fromDateTimeZone_basic.phpt41
-rw-r--r--ext/intl/tests/timezone_fromDateTimeZone_error.phpt50
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_basic.phpt19
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_error.phpt32
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_variant1.phpt24
-rw-r--r--ext/intl/tests/timezone_getDSTSavings_basic.phpt21
-rw-r--r--ext/intl/tests/timezone_getDSTSavings_error.phpt23
-rw-r--r--ext/intl/tests/timezone_getDisplayName_basic.phpt24
-rw-r--r--ext/intl/tests/timezone_getDisplayName_error.phpt45
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant1.phpt26
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt38
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant2.phpt40
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt28
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant3.phpt28
-rw-r--r--ext/intl/tests/timezone_getEquivalentID_basic.phpt19
-rw-r--r--ext/intl/tests/timezone_getEquivalentID_error.phpt34
-rw-r--r--ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt31
-rw-r--r--ext/intl/tests/timezone_getErrorCode_error.phpt23
-rw-r--r--ext/intl/tests/timezone_getErrorMessage_error.phpt23
-rw-r--r--ext/intl/tests/timezone_getGMT_basic.phpt31
-rw-r--r--ext/intl/tests/timezone_getGMT_error.phpt19
-rw-r--r--ext/intl/tests/timezone_getID_error.phpt23
-rw-r--r--ext/intl/tests/timezone_getOffset_basic.phpt33
-rw-r--r--ext/intl/tests/timezone_getOffset_error.phpt33
-rw-r--r--ext/intl/tests/timezone_getRawOffset_basic.phpt21
-rw-r--r--ext/intl/tests/timezone_getRawOffset_error.phpt23
-rw-r--r--ext/intl/tests/timezone_getRegion_basic.phpt21
-rw-r--r--ext/intl/tests/timezone_getRegion_error.phpt42
-rw-r--r--ext/intl/tests/timezone_getTZDataVersion_error.phpt18
-rw-r--r--ext/intl/tests/timezone_getTZData_basic.phpt19
-rw-r--r--ext/intl/tests/timezone_getUnknown_basic.phpt35
-rw-r--r--ext/intl/tests/timezone_getUnknown_error.phpt29
-rw-r--r--ext/intl/tests/timezone_hasSameRules_basic.phpt35
-rw-r--r--ext/intl/tests/timezone_hasSameRules_error.phpt37
-rw-r--r--ext/intl/tests/timezone_toDateTimeZone_basic.phpt38
-rw-r--r--ext/intl/tests/timezone_toDateTimeZone_error.phpt38
-rw-r--r--ext/intl/tests/timezone_useDaylightTime_basic.phpt25
-rw-r--r--ext/intl/tests/timezone_useDaylightTime_error.phpt22
-rw-r--r--ext/intl/timezone/timezone_class.cpp540
-rw-r--r--ext/intl/timezone/timezone_class.h72
-rw-r--r--ext/intl/timezone/timezone_methods.cpp659
-rw-r--r--ext/intl/timezone/timezone_methods.h68
-rw-r--r--ext/intl/transliterator/transliterator.c79
-rw-r--r--ext/intl/transliterator/transliterator_methods.c2
-rw-r--r--ext/json/JSON_parser.h5
-rw-r--r--ext/json/json.c76
-rw-r--r--ext/json/php_json.h2
-rw-r--r--ext/json/tests/003.phpt17
-rw-r--r--ext/json/tests/004.phpt16
-rw-r--r--ext/json/tests/007.phpt16
-rw-r--r--ext/json/tests/bug43941.phpt7
-rw-r--r--ext/json/tests/bug53946.phpt6
-rw-r--r--ext/json/tests/bug54058.phpt13
-rw-r--r--ext/json/tests/bug61537.phpt39
-rw-r--r--ext/json/tests/bug61978.phpt10
-rw-r--r--ext/json/tests/bug62369.phpt34
-rw-r--r--ext/json/tests/inf_nan_error.phpt45
-rw-r--r--ext/json/tests/json_encode_basic.phpt6
-rw-r--r--ext/json/tests/json_encode_error.phpt4
-rw-r--r--ext/json/tests/pass001.1.phpt4
-rw-r--r--ext/json/tests/pass001.1_64bit.phpt4
-rw-r--r--ext/json/tests/pass001.phpt4
-rw-r--r--ext/json/tests/unsupported_type_error.phpt26
-rw-r--r--ext/libxml/libxml.c2
-rw-r--r--ext/libxml/tests/004.phpt22
-rw-r--r--ext/libxml/tests/bug63389.phpt14
-rw-r--r--ext/mbstring/config.w322
-rw-r--r--[-rwxr-xr-x]ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c0
-rw-r--r--[-rwxr-xr-x]ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h0
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c2
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h2
-rw-r--r--[-rwxr-xr-x]ext/mbstring/libmbfl/mbfl/mbfl_defs.h0
-rw-r--r--ext/mbstring/mb_gpc.c6
-rw-r--r--ext/mbstring/mbstring.c14
-rw-r--r--ext/mbstring/oniguruma/COPYING6
-rw-r--r--ext/mbstring/oniguruma/HISTORY318
-rw-r--r--ext/mbstring/oniguruma/README42
-rw-r--r--ext/mbstring/oniguruma/README.ja41
-rw-r--r--ext/mbstring/oniguruma/doc/API67
-rw-r--r--ext/mbstring/oniguruma/doc/API.ja72
-rw-r--r--ext/mbstring/oniguruma/doc/FAQ4
-rw-r--r--ext/mbstring/oniguruma/doc/FAQ.ja18
-rw-r--r--ext/mbstring/oniguruma/doc/RE153
-rw-r--r--ext/mbstring/oniguruma/doc/RE.ja162
-rw-r--r--ext/mbstring/oniguruma/enc/ascii.c19
-rw-r--r--ext/mbstring/oniguruma/enc/big5.c36
-rw-r--r--ext/mbstring/oniguruma/enc/cp1251.c200
-rw-r--r--ext/mbstring/oniguruma/enc/euc_jp.c199
-rw-r--r--ext/mbstring/oniguruma/enc/euc_kr.c53
-rw-r--r--ext/mbstring/oniguruma/enc/euc_tw.c39
-rw-r--r--ext/mbstring/oniguruma/enc/gb18030.c36
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_1.c269
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_10.c305
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_11.c81
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_13.c254
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_14.c297
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_15.c272
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_16.c287
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_2.c291
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_3.c282
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_4.c291
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_5.c292
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_6.c71
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_7.c264
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_8.c67
-rw-r--r--ext/mbstring/oniguruma/enc/iso8859_9.c262
-rw-r--r--ext/mbstring/oniguruma/enc/koi8.c260
-rw-r--r--ext/mbstring/oniguruma/enc/koi8_r.c240
-rw-r--r--ext/mbstring/oniguruma/enc/mktable.c127
-rw-r--r--ext/mbstring/oniguruma/enc/sjis.c188
-rw-r--r--ext/mbstring/oniguruma/enc/unicode.c9755
-rw-r--r--[-rwxr-xr-x]ext/mbstring/oniguruma/enc/utf16_be.c125
-rw-r--r--[-rwxr-xr-x]ext/mbstring/oniguruma/enc/utf16_le.c122
-rw-r--r--[-rwxr-xr-x]ext/mbstring/oniguruma/enc/utf32_be.c125
-rw-r--r--[-rwxr-xr-x]ext/mbstring/oniguruma/enc/utf32_le.c123
-rw-r--r--ext/mbstring/oniguruma/enc/utf8.c3563
-rwxr-xr-xext/mbstring/oniguruma/index.html18
-rw-r--r--ext/mbstring/oniguruma/index_ja.html190
-rw-r--r--ext/mbstring/oniguruma/onigposix.h2
-rw-r--r--ext/mbstring/oniguruma/oniguruma.h259
-rw-r--r--ext/mbstring/oniguruma/regcomp.c2070
-rw-r--r--ext/mbstring/oniguruma/regenc.c690
-rw-r--r--ext/mbstring/oniguruma/regenc.h120
-rw-r--r--ext/mbstring/oniguruma/regerror.c50
-rw-r--r--ext/mbstring/oniguruma/regexec.c998
-rw-r--r--[-rwxr-xr-x]ext/mbstring/oniguruma/regext.c27
-rw-r--r--ext/mbstring/oniguruma/reggnu.c28
-rw-r--r--ext/mbstring/oniguruma/regint.h418
-rw-r--r--ext/mbstring/oniguruma/regparse.c1824
-rw-r--r--ext/mbstring/oniguruma/regparse.h307
-rw-r--r--ext/mbstring/oniguruma/regposerr.c14
-rw-r--r--ext/mbstring/oniguruma/regposix.c12
-rw-r--r--ext/mbstring/oniguruma/regsyntax.c87
-rw-r--r--ext/mbstring/oniguruma/regversion.c5
-rw-r--r--ext/mbstring/oniguruma/st.c21
-rw-r--r--ext/mbstring/oniguruma/testc.c863
-rw-r--r--ext/mbstring/oniguruma/testu.c911
-rw-r--r--ext/mbstring/oniguruma/win32/Makefile200
-rw-r--r--ext/mbstring/oniguruma/win32/testc.c863
-rw-r--r--ext/mbstring/php_mbregex.h2
-rw-r--r--ext/mbstring/tests/bug63447_001.phpt20
-rw-r--r--ext/mbstring/tests/bug63447_002.phpt20
-rw-r--r--ext/mbstring/tests/bug63447_003.phpt34
-rw-r--r--[-rwxr-xr-x]ext/mbstring/tests/mb_ereg_search.phpt0
-rw-r--r--ext/mcrypt/mcrypt.c10
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc.phpt6
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt14
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt14
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_error.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_variation1.phpt26
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_variation2.phpt27
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_variation3.phpt27
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_variation4.phpt28
-rw-r--r--ext/mcrypt/tests/mcrypt_cbc_variation5.phpt26
-rw-r--r--ext/mcrypt/tests/mcrypt_cfb.phpt6
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb.phpt6
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_error.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation1.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation2.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation3.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation4.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation5.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ofb.phpt10
-rw-r--r--ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt20
-rw-r--r--ext/mysql/config.m47
-rw-r--r--ext/mysql/php_mysql.c40
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/003.phpt0
-rw-r--r--ext/mysql/tests/bug55473.phpt10
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/connect.inc0
-rw-r--r--ext/mysql/tests/mysql_field_flags.phpt8
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/mysql_pconn_kill.phpt0
-rw-r--r--ext/mysql/tests/mysql_reflection_extension.phpt105
-rw-r--r--ext/mysql/tests/mysql_reflection_functions.phpt387
-rw-r--r--ext/mysql/tests/mysql_stat.phpt4
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/skipif.inc0
-rw-r--r--[-rwxr-xr-x]ext/mysql/tests/skipifconnectfailure.inc0
-rw-r--r--ext/mysqli/mysqli.c216
-rw-r--r--ext/mysqli/mysqli_api.c116
-rw-r--r--ext/mysqli/mysqli_fe.c18
-rw-r--r--ext/mysqli/mysqli_fe.h1
-rw-r--r--ext/mysqli/mysqli_nonapi.c5
-rw-r--r--ext/mysqli/mysqli_priv.h1
-rw-r--r--ext/mysqli/mysqli_prop.c4
-rw-r--r--ext/mysqli/mysqli_report.h64
-rw-r--r--ext/mysqli/package.xml1
-rw-r--r--ext/mysqli/php_mysqli_structs.h12
-rw-r--r--[-rwxr-xr-x]ext/mysqli/tests/bug38710.phpt0
-rw-r--r--ext/mysqli/tests/bug51647.phpt4
-rw-r--r--ext/mysqli/tests/bug55283.phpt4
-rw-r--r--ext/mysqli/tests/bug55859.phpt4
-rw-r--r--ext/mysqli/tests/connect.inc93
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_interface.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_constants.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field.phpt22
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_flags.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_oo.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_fetch_fields.phpt20
-rw-r--r--ext/mysqli/tests/mysqli_field_seek.phpt22
-rw-r--r--ext/mysqli/tests/mysqli_info.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_pam_sha256.phpt113
-rw-r--r--ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt129
-rw-r--r--ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt132
-rw-r--r--ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt188
-rw-r--r--[-rwxr-xr-x]ext/mysqli/tests/mysqli_pconn_kill.phpt0
-rw-r--r--ext/mysqli/tests/mysqli_query_local_infile_large.phpt103
-rw-r--r--[-rwxr-xr-x]ext/mysqli/tests/mysqli_send_query.phpt0
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_default.phpt132
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler.phpt196
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt82
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt60
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt61
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt70
-rwxr-xr-xext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt62
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt61
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt58
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt107
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt71
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt70
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt115
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt78
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt101
-rw-r--r--ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt64
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt21
-rw-r--r--[-rwxr-xr-x]ext/mysqli/tests/skipifconnectfailure.inc0
-rw-r--r--ext/mysqlnd/config9.m412
-rw-r--r--ext/mysqlnd/mysqlnd.c737
-rw-r--r--ext/mysqlnd/mysqlnd.h13
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.c183
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.h4
-rw-r--r--ext/mysqlnd/mysqlnd_auth.c204
-rw-r--r--ext/mysqlnd/mysqlnd_bt.c256
-rw-r--r--ext/mysqlnd/mysqlnd_debug.c29
-rw-r--r--ext/mysqlnd/mysqlnd_debug.h91
-rw-r--r--ext/mysqlnd/mysqlnd_driver.c33
-rw-r--r--ext/mysqlnd/mysqlnd_enum_n_def.h9
-rw-r--r--ext/mysqlnd/mysqlnd_ext_plugin.c1
-rw-r--r--ext/mysqlnd/mysqlnd_loaddata.c8
-rw-r--r--ext/mysqlnd/mysqlnd_net.c400
-rw-r--r--ext/mysqlnd/mysqlnd_plugin.c4
-rw-r--r--ext/mysqlnd/mysqlnd_priv.h37
-rw-r--r--ext/mysqlnd/mysqlnd_ps.c20
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c173
-rw-r--r--ext/mysqlnd/mysqlnd_result.c31
-rw-r--r--ext/mysqlnd/mysqlnd_result_meta.c82
-rw-r--r--ext/mysqlnd/mysqlnd_reverse_api.h1
-rw-r--r--ext/mysqlnd/mysqlnd_statistics.c12
-rw-r--r--ext/mysqlnd/mysqlnd_structs.h95
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c229
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.h22
-rw-r--r--ext/mysqlnd/php_mysqlnd.c62
-rw-r--r--ext/oci8/config.m415
-rw-r--r--ext/oci8/oci8.c2
-rw-r--r--ext/oci8/package.xml25
-rw-r--r--ext/oci8/php_oci8.h2
-rw-r--r--ext/oci8/php_oci8_int.h1
-rw-r--r--ext/openssl/CREDITS2
-rw-r--r--ext/openssl/openssl.c321
-rw-r--r--ext/openssl/php_openssl.h2
-rw-r--r--ext/openssl/tests/openssl_pbkdf2.phpt26
-rw-r--r--ext/openssl/xp_ssl.c4
-rw-r--r--[-rwxr-xr-x]ext/pcntl/pcntl.c2
-rw-r--r--ext/pcntl/php_signal.c3
-rw-r--r--[-rwxr-xr-x]ext/pcntl/tests/signal_closure_handler.phpt0
-rw-r--r--ext/pcre/config.w322
-rw-r--r--ext/pcre/config0.m44
-rw-r--r--ext/pcre/pcrelib/AUTHORS26
-rw-r--r--ext/pcre/pcrelib/ChangeLog693
-rw-r--r--ext/pcre/pcrelib/HACKING288
-rw-r--r--ext/pcre/pcrelib/LICENCE30
-rw-r--r--ext/pcre/pcrelib/NEWS76
-rw-r--r--ext/pcre/pcrelib/NON-UNIX-USE500
-rw-r--r--ext/pcre/pcrelib/README419
-rw-r--r--ext/pcre/pcrelib/config.h6
-rw-r--r--ext/pcre/pcrelib/dftables.c4
-rw-r--r--ext/pcre/pcrelib/doc/pcre.txt6275
-rw-r--r--ext/pcre/pcrelib/pcre.h269
-rw-r--r--ext/pcre/pcrelib/pcre_compile.c3204
-rw-r--r--ext/pcre/pcrelib/pcre_config.c48
-rw-r--r--ext/pcre/pcrelib/pcre_exec.c3590
-rw-r--r--ext/pcre/pcrelib/pcre_fullinfo.c66
-rw-r--r--ext/pcre/pcrelib/pcre_get.c196
-rw-r--r--ext/pcre/pcrelib/pcre_globals.c22
-rw-r--r--ext/pcre/pcrelib/pcre_info.c91
-rw-r--r--ext/pcre/pcrelib/pcre_internal.h1177
-rw-r--r--ext/pcre/pcrelib/pcre_maketables.c13
-rw-r--r--ext/pcre/pcrelib/pcre_newline.c50
-rw-r--r--ext/pcre/pcrelib/pcre_ord2utf8.c30
-rw-r--r--ext/pcre/pcrelib/pcre_refcount.c11
-rw-r--r--ext/pcre/pcrelib/pcre_study.c725
-rw-r--r--ext/pcre/pcrelib/pcre_tables.c340
-rw-r--r--ext/pcre/pcrelib/pcre_try_flipped.c137
-rw-r--r--ext/pcre/pcrelib/pcre_ucd.c4709
-rw-r--r--ext/pcre/pcrelib/pcre_valid_utf8.c255
-rw-r--r--ext/pcre/pcrelib/pcre_version.c7
-rw-r--r--ext/pcre/pcrelib/pcre_xclass.c54
-rw-r--r--ext/pcre/pcrelib/pcredemo.c2
-rw-r--r--ext/pcre/pcrelib/pcreposix.c20
-rw-r--r--ext/pcre/pcrelib/pcreposix.h2
-rw-r--r--ext/pcre/pcrelib/testdata/grepinput2
-rw-r--r--ext/pcre/pcrelib/testdata/grepinput83
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutput99
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutput85
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutputN16
-rw-r--r--ext/pcre/pcrelib/testdata/testinput11185
-rw-r--r--ext/pcre/pcrelib/testdata/testinput101154
-rw-r--r--ext/pcre/pcrelib/testdata/testinput21133
-rw-r--r--ext/pcre/pcrelib/testdata/testinput453
-rw-r--r--ext/pcre/pcrelib/testdata/testinput5379
-rw-r--r--ext/pcre/pcrelib/testdata/testinput617
-rw-r--r--ext/pcre/pcrelib/testdata/testinput74889
-rw-r--r--ext/pcre/pcrelib/testdata/testinput85090
-rw-r--r--ext/pcre/pcrelib/testdata/testinput91542
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput12069
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput102840
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput22584
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput479
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput51302
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput628
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput78670
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput88578
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput93044
-rw-r--r--ext/pcre/pcrelib/ucp.h14
-rw-r--r--ext/pcre/php_pcre.c24
-rw-r--r--ext/pcre/tests/002.phpt2
-rw-r--r--ext/pcre/tests/004.phpt4
-rw-r--r--[-rwxr-xr-x]ext/pcre/tests/bug34790.phpt0
-rw-r--r--ext/pcre/tests/bug63055.phpt23
-rw-r--r--[-rwxr-xr-x]ext/pcre/tests/preg_filter.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pdo/pdo.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo/pdo_dbh.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo/pdo_stmt.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo/php_pdo.h0
-rw-r--r--[-rwxr-xr-x]ext/pdo/php_pdo_driver.h0
-rw-r--r--[-rwxr-xr-x]ext/pdo/php_pdo_int.h2
-rw-r--r--[-rwxr-xr-x]ext/pdo/tests/bug_36428.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pdo/tests/pdo.inc0
-rw-r--r--[-rwxr-xr-x]ext/pdo/tests/pdo_016a.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pdo/tests/pdo_029.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pdo/tests/pdo_030.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pdo/tests/pdo_031.phpt0
-rw-r--r--ext/pdo_dblib/dblib_driver.c2
-rw-r--r--ext/pdo_firebird/firebird_driver.c2
-rw-r--r--[-rwxr-xr-x]ext/pdo_mysql/mysql_driver.c14
-rw-r--r--[-rwxr-xr-x]ext/pdo_mysql/mysql_statement.c113
-rw-r--r--[-rwxr-xr-x]ext/pdo_mysql/pdo_mysql.c4
-rw-r--r--[-rwxr-xr-x]ext/pdo_mysql/php_pdo_mysql.h0
-rw-r--r--[-rwxr-xr-x]ext/pdo_mysql/php_pdo_mysql_int.h5
-rw-r--r--ext/pdo_mysql/tests/bug_41997.phpt14
-rw-r--r--ext/pdo_mysql/tests/bug_61207.phpt57
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt2
-rw-r--r--[-rwxr-xr-x]ext/pdo_mysql/tests/skipif.inc0
-rw-r--r--[-rwxr-xr-x]ext/pdo_oci/oci_driver.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo_oci/oci_statement.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo_oci/pdo_oci.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo_oci/php_pdo_oci.h0
-rw-r--r--[-rwxr-xr-x]ext/pdo_oci/php_pdo_oci_int.h0
-rw-r--r--[-rwxr-xr-x]ext/pdo_odbc/odbc_driver.c2
-rw-r--r--[-rwxr-xr-x]ext/pdo_odbc/odbc_stmt.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo_odbc/pdo_odbc.c0
-rw-r--r--[-rwxr-xr-x]ext/pdo_odbc/php_pdo_odbc_int.h0
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c14
-rw-r--r--ext/pdo_pgsql/tests/bug62593.phpt51
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/22pg_fetch_object.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/80_bug24499.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/80_bug27597.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/80_bug32223.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/80_bug32223b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/80_bug36625.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/phar/clicommand.inc0
-rw-r--r--[-rwxr-xr-x]ext/phar/phar/directorygraphiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/phar/phar/directorytreeiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/phar/phar/invertedregexiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/phar/phar/phar.inc0
-rw-r--r--[-rwxr-xr-x]ext/phar/phar/pharcommand.inc0
-rw-r--r--ext/phar/phar_path_check.c2
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/003a.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/015b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/016b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/019b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/019c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/023.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/024.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/025.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/026.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/027.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/028.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/029.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/030.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/031.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/032.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/create_new_and_modify.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/create_new_phar_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/create_new_phar_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/create_path_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/delete_in_phar_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/metadata_write.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/metadata_write_commit.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/open_for_write_existing_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/open_for_write_existing_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/open_for_write_newfile_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/open_for_write_newfile_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_begin_setstub_commit.phpt0
-rw-r--r--ext/phar/tests/phar_commitwrite.phpt2
-rw-r--r--ext/phar/tests/phar_create_in_cwd.phpt2
-rw-r--r--ext/phar/tests/phar_gobyebye.phpt2
-rw-r--r--ext/phar/tests/phar_mount.phpt2
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_offset_get_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_010.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_011b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_012b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_compressed_001b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_compressed_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_oo_compressed_002b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_stub_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_stub_write.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/phar_stub_write_file.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/refcount1_5_2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/rename_dir_and_mount.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/open_for_write_existing_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/open_for_write_existing_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/open_for_write_newfile_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/open_for_write_newfile_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/phar_begin_setstub_commit.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/phar_stub_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/tar/refcount1_5_2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/open_for_write_existing_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/open_for_write_existing_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/open_for_write_newfile_b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/open_for_write_newfile_c.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/phar_begin_setstub_commit.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/phar_stub_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/phar/tests/zip/refcount1_5_2.phpt0
-rw-r--r--ext/phar/util.c26
-rw-r--r--ext/reflection/php_reflection.c11
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/010.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/011.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/013.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/014.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/015.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/016.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/017.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/018.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/019.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/020.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/021.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/022.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/023.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/024.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/ReflectionFunction_getClosureThis.phpt0
-rw-r--r--ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt52
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/ReflectionMethod_getClosureThis.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug26640.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug26695.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug29268.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug29523.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug29828.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug30146.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug30148.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug30209.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug30856.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug30961.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug31651.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug32981.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug33312.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug33389.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug36308.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug37816.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug38132.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug38194.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug38942.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/bug41061.phpt0
-rw-r--r--ext/reflection/tests/bug63399.phpt49
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/closures_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/closures_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/closures_003_v1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/parameters_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/parameters_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/property_exists.phpt0
-rw-r--r--[-rwxr-xr-x]ext/reflection/tests/static_properties_002.phpt0
-rw-r--r--ext/reflection/tests/traits005.phpt6
-rw-r--r--[-rwxr-xr-x]ext/session/tests/save_handler_closures.inc0
-rw-r--r--[-rwxr-xr-x]ext/session/tests/session_set_save_handler_closures.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/php_simplexml_exports.h0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/sxe.c0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/sxe.h0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/000.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/009b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/011.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/013.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/014a.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/014b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/016a.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/019.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/020.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/022.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/023.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/024.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/025.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/026.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/027.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/028.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/029.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/032.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/033.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/034.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/bug27010.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/bug35785.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/bug37565.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/profile12.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/profile13.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/simplexml_import_dom.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/sxe_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/sxe_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/sxe_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/sxe_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/simplexml/tests/sxe_005.phpt0
-rw-r--r--ext/snmp/snmp.c75
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/any.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug32941.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug34449.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug34453.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug34643.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug34657.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug35142.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug35273.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36226-2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36226.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36575.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36614.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36629.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36908.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug36999.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug37013.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug37083.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug37278.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug38004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug38005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug38055.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug38067.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug38536.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug39121.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug39815.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug39832.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug40609.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug41004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug41097.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug41337.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug41337_2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug41566.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42086.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42151.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42183.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42214.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42326.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42359.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42488.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/bugs/bug42692.phpt0
-rw-r--r--ext/soap/tests/bugs/bug47273.phpt3
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/classmap003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/classmap004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/schema/schema082.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/schema/schema083.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/schema/schema084.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/schema/schema085.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server022.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server023.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server024.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server025.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server026.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server027.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/server028.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/setheaders.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap010.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap011.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/soap/tests/typemap013.phpt0
-rw-r--r--ext/sockets/multicast.c3
-rw-r--r--ext/sockets/multicast.h4
-rw-r--r--ext/sockets/sockets.c3
-rwxr-xr-xext/spl/doxygen.cfg4
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/autoload.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/callbackfilteriterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/dbaarray.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/dbareader.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/directoryfilterdots.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/directorytree.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/dualiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/findfile.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/inigroups.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/keyfilter.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/recursivecomparedualiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/recursivedualiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/regexfindfile.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/searchiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/tests/dualiterator_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/examples/tests/examples.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/appenditerator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/cachingiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/emptyiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/filteriterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/infiniteiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/iteratoriterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/limititerator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/multipleiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/norewinditerator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/outeriterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/parentiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursivearrayiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursivecachingiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursivefilteriterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursiveiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursiveiteratoriterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursiveregexiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/recursivetreeiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/regexiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/seekableiterator.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/splfileobject.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/internal/splobjectstorage.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/php_spl.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/php_spl.h0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_array.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_array.h0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_directory.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_directory.h0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_engine.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_engine.h0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_exceptions.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_exceptions.h0
-rw-r--r--ext/spl/spl_fixedarray.c33
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_functions.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_functions.h0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_iterators.c2
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_iterators.h0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_observer.c0
-rw-r--r--[-rwxr-xr-x]ext/spl/spl_observer.h0
-rw-r--r--ext/spl/tests/SplFixedArray_serialize.phpt52
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_009a.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_010.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_011.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_013.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_014.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_015.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_016.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_017.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_018.phptbin633 -> 633 bytes
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_019.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_020.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_021.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/array_022.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug28822.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug31185.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug31346.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug31348.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug31926.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug32134.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug32394.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug33136.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug36287.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug36941.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug37457.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug40442.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug40872.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug42654.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug42703.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/bug49972.phpt0
-rw-r--r--ext/spl/tests/bug61697.phpt26
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/dit_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/dit_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/dit_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/fileobject_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/fileobject_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/fileobject_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_010.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_011.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_013.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_014.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_015.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_016.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_017.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_018.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_019.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_020.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_021.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_022.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_023.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_024.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_025.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_026.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_027.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_028.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_029.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_030.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_031.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_032.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_033.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_034.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_036.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_037.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_038.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_039.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_040.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_041.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_041a.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_041b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_042.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_043.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_044.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_045.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_046.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_047.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_048.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_049.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_049b.phptbin633 -> 633 bytes
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_050.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_051.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_052.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_053.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_054.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_055.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/iterator_068.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/multiple_iterator_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/observer_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/observer_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/observer_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/observer_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/observer_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/observer_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/recursive_tree_iterator_008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_008.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_009.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_autoload_012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_fileinfo_getlinktarget_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_iterator_apply_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_iterator_apply_error_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/spl_iterator_to_array_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/testclass.class.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/testclass.inc0
-rw-r--r--[-rwxr-xr-x]ext/spl/tests/testclass.php.inc0
-rw-r--r--ext/sqlite3/libsqlite/sqlite3.c2
-rw-r--r--ext/sqlite3/php_sqlite3.h2
-rw-r--r--ext/sqlite3/tests/bug53463.phpt2
-rw-r--r--ext/standard/basic_functions.c175
-rw-r--r--ext/standard/config.m42
-rw-r--r--ext/standard/config.w322
-rw-r--r--ext/standard/credits_ext.h12
-rw-r--r--ext/standard/credits_sapi.h2
-rw-r--r--ext/standard/crypt.c185
-rw-r--r--ext/standard/dl.c4
-rw-r--r--ext/standard/file.c4
-rw-r--r--ext/standard/filestat.c2
-rw-r--r--ext/standard/info.c123
-rw-r--r--ext/standard/info.h12
-rw-r--r--ext/standard/pack.c73
-rw-r--r--ext/standard/password.c460
-rw-r--r--ext/standard/php_crypt.h1
-rw-r--r--ext/standard/php_password.h48
-rw-r--r--ext/standard/php_standard.h1
-rw-r--r--ext/standard/php_type.h1
-rw-r--r--ext/standard/string.c2
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/array_combine.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/array_diff_assoc.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/array_fill_keys.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug21918.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug29253.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug30266.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug31158.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug33989.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug34227.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/bug34982.phpt0
-rw-r--r--ext/standard/tests/array/compact.phpt3
-rw-r--r--ext/standard/tests/array/locale_sort.phpt3
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/prev_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/prev_error1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/prev_error2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/prev_error3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/prev_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/prev_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/array/unexpected_array_mod_bug.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/assert/assert_closures.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/class_object/forward_static_call_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/class_object/forward_static_call_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/class_object/forward_static_call_003.phpt0
-rw-r--r--ext/standard/tests/dir/dir_variation1-win32.phpt170
-rw-r--r--ext/standard/tests/dir/dir_variation5-win32.phpt37
-rw-r--r--ext/standard/tests/dir/dir_variation6-win32.phpt61
-rw-r--r--ext/standard/tests/dir/dir_variation8-win32.phpt68
-rw-r--r--ext/standard/tests/dir/dir_variation9-win32.phpt125
-rw-r--r--ext/standard/tests/dir/opendir_error2-win32.phpt47
-rw-r--r--ext/standard/tests/dir/opendir_variation1-win32.phpt248
-rw-r--r--ext/standard/tests/dir/scandir_error2-win32.phpt51
-rw-r--r--ext/standard/tests/dir/scandir_variation1-win32.phpt289
-rw-r--r--ext/standard/tests/dir/scandir_variation6-win32.phpt84
-rw-r--r--ext/standard/tests/file/bug22414.phpt2
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/bug39367.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/bug43216.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/bug43248.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/fflush_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/fflush_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/fflush_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/fflush_variation3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/fflush_variation4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/fputcsv.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/glob_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/glob_variation.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/include_userstream_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/include_userstream_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/lstat_stat_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/lstat_stat_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/lstat_stat_variation3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/lstat_stat_variation4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/lstat_stat_variation5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/lstat_stat_variation6.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/realpath_basic4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/rename_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/rename_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_003.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_004.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_006.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/stream_rfc2397_007.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/umask_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/file/umask_variation2.phpt0
-rw-r--r--ext/standard/tests/general_functions/boolval.phpt29
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/bug25038.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/bug35229.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/bug36011.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/bug40398.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/bug44461.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/call_user_func_return.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/closures_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/closures_002.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/dl-cve-2007-4887.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_basic.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation1.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation10.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation11.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation12.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation13.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation14.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation4.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation5.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation6.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation7.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation8.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/getservbyname_variation9.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/general_functions/ob_start_closures.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/image/image_type_to_mime_type_variation3.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/math/bug27646.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/math/bug28228.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/math/bug30069.phpt0
-rw-r--r--ext/standard/tests/network/ip2long_variation1.phpt2
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/network/shutdown.phpt0
-rw-r--r--ext/standard/tests/password/password_bcrypt_errors.phpt39
-rw-r--r--ext/standard/tests/password/password_get_info.phpt58
-rw-r--r--ext/standard/tests/password/password_get_info_error.phpt17
-rw-r--r--ext/standard/tests/password/password_hash.phpt25
-rw-r--r--ext/standard/tests/password/password_hash_error.phpt48
-rw-r--r--ext/standard/tests/password/password_needs_rehash.phpt45
-rw-r--r--ext/standard/tests/password/password_needs_rehash_error.phpt33
-rw-r--r--ext/standard/tests/password/password_verify.phpt21
-rw-r--r--ext/standard/tests/password/password_verify_error.phpt18
-rw-r--r--ext/standard/tests/php_ini_loaded_file.phpt4
-rw-r--r--ext/standard/tests/php_logo_guid.phpt13
-rw-r--r--ext/standard/tests/php_real_logo_guid.phpt12
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/005.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/bug26762.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/bug30234.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/bug31442.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/bug37947.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/bug42919.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/serialize/unserializeS.phpt0
-rw-r--r--ext/standard/tests/streams/bug63240.phpt17
-rw-r--r--ext/standard/tests/strings/bug61038.phpt26
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/htmlentities-utf-2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/htmlentities-utf.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/moneyformat.phpt0
-rw-r--r--ext/standard/tests/strings/pack_A.phpt25
-rw-r--r--ext/standard/tests/strings/pack_Z.phpt27
-rw-r--r--ext/standard/tests/strings/parse_str_basic3.phptbin5141 -> 5140 bytes
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/printf.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/printf_64bit.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/sprintf_f.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/sprintf_f_2.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/strings/sprintf_f_3.phpt0
-rw-r--r--ext/standard/tests/strings/unpack_error.phpt4
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/time/bug38524.phpt0
-rw-r--r--[-rwxr-xr-x]ext/standard/tests/time/bug60222.phpt0
-rw-r--r--ext/standard/tests/zend_logo_guid.phpt12
-rw-r--r--ext/standard/type.c14
-rw-r--r--ext/standard/url_scanner_ex.c3
-rw-r--r--ext/standard/var_unserializer.c2
-rw-r--r--[-rwxr-xr-x]ext/standard/winver.h0
-rw-r--r--ext/tokenizer/tests/bug60097.phpt121
-rw-r--r--ext/tokenizer/tests/token_get_all_variation11.phpt4
-rw-r--r--ext/tokenizer/tests/token_get_all_variation13.phpt2
-rw-r--r--ext/tokenizer/tests/token_get_all_variation17.phpt2
-rw-r--r--ext/tokenizer/tests/token_get_all_variation4.phpt4
-rw-r--r--ext/tokenizer/tests/token_get_all_variation5.phpt22
-rw-r--r--ext/tokenizer/tests/token_get_all_variation6.phpt4
-rw-r--r--ext/tokenizer/tests/token_get_all_variation8.phpt2
-rw-r--r--ext/tokenizer/tokenizer.c5
-rw-r--r--ext/tokenizer/tokenizer_data.c6
-rw-r--r--[-rwxr-xr-x]ext/wddx/tests/bug27287.phpt0
-rw-r--r--[-rwxr-xr-x]ext/wddx/tests/bug34306.phpt0
-rw-r--r--[-rwxr-xr-x]ext/wddx/tests/bug35410.phpt0
-rw-r--r--[-rwxr-xr-x]ext/wddx/tests/bug35410_64bit.phpt0
-rw-r--r--[-rwxr-xr-x]ext/wddx/tests/bug37569.phpt0
-rw-r--r--[-rwxr-xr-x]ext/wddx/tests/bug37587.phpt0
-rw-r--r--[-rwxr-xr-x]ext/xml/tests/bug26614_libxml.phpt0
-rw-r--r--[-rwxr-xr-x]ext/xml/tests/bug32001b.phpt0
-rw-r--r--[-rwxr-xr-x]ext/xml/tests/xml_closures_001.phpt0
-rw-r--r--[-rwxr-xr-x]ext/xmlreader/tests/012.phpt0
-rw-r--r--[-rwxr-xr-x]ext/xmlreader/tests/013.phpt0
-rw-r--r--ext/xsl/php_xsl.c2
-rw-r--r--[-rwxr-xr-x]ext/xsl/tests/bug33853.phpt0
-rw-r--r--ext/zlib/tests/001.phpt2
-rw-r--r--ext/zlib/tests/data.inc2
-rw-r--r--ext/zlib/tests/gzfile_basic.phpt2
-rw-r--r--ext/zlib/tests/gzfile_basic2.phpt2
-rw-r--r--generated_lists2
-rw-r--r--main/fopen_wrappers.h2
-rw-r--r--main/logos.h1080
-rw-r--r--main/main.c16
-rw-r--r--main/network.c3
-rw-r--r--main/output.c2
-rw-r--r--main/php.h3
-rw-r--r--main/php_config.h.in8
-rw-r--r--main/php_logos.c99
-rw-r--r--main/php_logos.h34
-rw-r--r--[-rwxr-xr-x]main/php_streams.h4
-rw-r--r--main/php_variables.c17
-rw-r--r--main/php_version.h10
-rw-r--r--main/rfc1867.c8
-rw-r--r--[-rwxr-xr-x]main/streams/glob_wrapper.c0
-rw-r--r--main/streams/php_stream_context.h8
-rw-r--r--[-rwxr-xr-x]main/streams/php_stream_glob_wrapper.h0
-rw-r--r--main/streams/plain_wrapper.c97
-rw-r--r--[-rwxr-xr-x]main/streams/streams.c81
-rwxr-xr-xmakedist8
-rw-r--r--php.ini-development10
-rw-r--r--php.ini-production10
-rwxr-xr-xrun-tests.php15
-rw-r--r--sapi/apache2handler/config.w3220
-rw-r--r--sapi/cgi/cgi_main.c1
-rw-r--r--sapi/cli/php_cli_server.c86
-rw-r--r--[-rwxr-xr-x]sapi/cli/tests/003-2.phpt0
-rw-r--r--sapi/cli/tests/php_cli_server_011.phpt41
-rw-r--r--sapi/cli/tests/php_cli_server_013.phpt18
-rw-r--r--sapi/cli/tests/php_cli_server_014.phpt6
-rw-r--r--sapi/fpm/config.m44
-rw-r--r--sapi/litespeed/lsapi_main.c1297
-rw-r--r--sapi/litespeed/lsapilib.c47
-rw-r--r--sapi/litespeed/lsapilib.h5
-rwxr-xr-xserver-tests.php111
-rw-r--r--[-rwxr-xr-x]tests/basic/bug29971.phpt0
-rw-r--r--tests/basic/php_egg_logo_guid.phpt13
-rw-r--r--tests/basic/php_logo_guid.phpt10
-rw-r--r--tests/basic/php_real_logo_guid.phpt12
-rw-r--r--tests/basic/zend_logo_guid.phpt13
-rw-r--r--[-rwxr-xr-x]tests/classes/__call_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/__set__get_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/__set__get_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/__set__get_004.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/__set__get_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/abstract_by_interface_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/abstract_by_interface_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/abstract_user_call.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_007.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_008.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_009.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_010.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_011.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_012.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/array_access_013.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/autoload_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/autoload_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/autoload_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/autoload_004.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/autoload_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/autoload_006.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/class_abstract.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/class_final.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/class_stdclass.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/clone_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/clone_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/clone_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/clone_004.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/clone_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/clone_006.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/ctor_failure.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/ctor_in_interface_01.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/ctor_in_interface_02.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/ctor_in_interface_03.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/ctor_in_interface_04.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/ctor_visibility.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_and_echo.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_and_exceptions.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_and_globals.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_and_references.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_inheritance.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_visibility_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_visibility_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/destructor_visibility_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_004.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_006.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_007.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_008.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_009.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/factory_and_singleton_010.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/final_ctor1.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/final_ctor2.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/inheritance_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/inheritance_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/inheritance_004.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/interface_and_extends.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/interface_optional_arg.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/interfaces_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/iterators_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/iterators_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/iterators_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/iterators_004.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/iterators_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/iterators_007.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/private_members.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/private_redeclare.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/serialize_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/static_properties_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/static_this.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/this.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/tostring_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/tostring_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/tostring_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/type_hinting_002.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/type_hinting_003.phpt0
-rw-r--r--[-rwxr-xr-x]tests/classes/visibility_005.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/015.inc0
-rw-r--r--[-rwxr-xr-x]tests/lang/016.inc0
-rw-r--r--[-rwxr-xr-x]tests/lang/023-1.inc0
-rw-r--r--[-rwxr-xr-x]tests/lang/023-2.inc0
-rw-r--r--[-rwxr-xr-x]tests/lang/036.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/037.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/038.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/039.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/040.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug23524.phpt0
-rw-r--r--tests/lang/bug24403.phpt3
-rw-r--r--[-rwxr-xr-x]tests/lang/bug24499.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug24640.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug24652.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug24908.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug25145.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug25547.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug25652.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug25922.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug27439.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug29566.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug29893.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug29944.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug35176.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug35382.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug38579.inc0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug38579.phpt0
-rw-r--r--[-rwxr-xr-x]tests/lang/bug44654.phpt0
-rw-r--r--tests/lang/foreachLoop.007.phpt11
-rw-r--r--tests/lang/foreachLoop.008.phpt10
-rw-r--r--[-rwxr-xr-x]tests/lang/foreach_with_object_001.phpt0
-rw-r--r--[-rwxr-xr-x]tests/strings/bug22592.phpt0
-rwxr-xr-xtravis/compile.sh37
-rwxr-xr-xtravis/ext/curl/setup.sh5
-rwxr-xr-xtravis/ext/mysql/setup.sh2
-rwxr-xr-xtravis/ext/mysqli/setup.sh2
-rwxr-xr-xtravis/ext/pdo_mysql/setup.sh2
-rwxr-xr-xtravis/ext/pdo_pgsql/setup.sh2
-rwxr-xr-xtravis/ext/pgsql/setup.sh4
-rw-r--r--win32/build/config.w3213
-rw-r--r--win32/build/config.w32.h.in4
-rw-r--r--win32/build/confutils.js2
-rw-r--r--[-rwxr-xr-x]win32/globals.c0
-rw-r--r--win32/inet.c6
-rw-r--r--win32/inet.h5
-rw-r--r--win32/php5dll.dsp8
-rw-r--r--win32/php5dllts.dsp8
-rw-r--r--[-rwxr-xr-x]win32/php_win32_globals.h0
-rw-r--r--win32/sendmail.c1
-rw-r--r--win32/syslog.reg2
2048 files changed, 122049 insertions, 85440 deletions
diff --git a/.travis.yml b/.travis.yml
index a375a359d..2939e3e92 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,4 +7,18 @@ php:
notifications:
email: false
-script: exit 0
+env:
+ - REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php
+
+before_script:
+ # Compile PHP
+ - ./travis/compile.sh
+ # Setup Extensions
+ - . ./travis/ext/mysql/setup.sh
+ - . ./travis/ext/mysqli/setup.sh
+ - . ./travis/ext/pdo_mysql/setup.sh
+ - . ./travis/ext/pgsql/setup.sh
+ - . ./travis/ext/pdo_pgsql/setup.sh
+
+# Run PHPs run-tests.php
+script: ./sapi/cli/php run-tests.php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP"
diff --git a/LICENSE b/LICENSE
index 3cc8b777b..42536af32 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.01
-Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
+Copyright (c) 1999 - 2012 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/Makefile.gcov b/Makefile.gcov
index 946f539d1..79d7a6d71 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -3,6 +3,8 @@
# LCOV
#
+LCOV_INCLUDE="."
+
lcov: lcov-html
lcov-test: lcov-clean-data test
@@ -12,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
- -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq` ;\
+ -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
@@ -39,14 +41,26 @@ php_lcov.info: lcov-test
if test -f "$(top_builddir)/$$y.c"; then \
ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
fi; \
- test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \
- test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \
- test -f "$$x.da" && cp $$x.da lcov_data/$$y.da ; \
- test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \
- test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \
- done
+ if test -f "$$x.gcno"; then \
+ cp $$x.gcno lcov_data/$$y.gcno ; \
+ fi; \
+ if test -f "$$x.gcda"; then \
+ cp $$x.gcda lcov_data/$$y.gcda ; \
+ fi; \
+ if test -f "$$x.da"; then \
+ cp $$x.da lcov_data/$$y.da ; \
+ fi; \
+ if test -f "$$x.bb"; then \
+ cp $$x.bb lcov_data/$$y.bb ; \
+ fi; \
+ if test -f "$$x.bbg"; then \
+ cp $$x.bbg lcov_data/$$y.bbg ; \
+ fi; \
+ done; \
for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
- test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
+ if test -d lcov_data/$$dir; then \
+ rm -rf lcov_data/$$dir ; \
+ fi; \
done
@echo
@echo "Generating $@"
diff --git a/Makefile.global b/Makefile.global
index b30c318fc..eaf651e8e 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -86,7 +86,7 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
test: all
- -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
+ @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
diff --git a/NEWS b/NEWS
index 4142fe3a7..839c713c1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7603 +1,184 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-18 Oct 2012, PHP 5.4.8
+13 Nov 2012, PHP 5.5.0 Alpha 1
-- CLI server:
- . Changed response to unknown HTTP method to 501 according to RFC.
- (Niklas Lindgren).
- . Support HTTP PATCH method. Patch by Niklas Lindgren, GitHub PR #190.
- (Lars)
+- General improvements:
+ . Added support for generators. (Nikita Popov)
+ . Add simplified password hashing API
+ (https://wiki.php.net/rfc/password_hash). (Anthony Ferrara)
+ . Add generators and coroutines (https://wiki.php.net/rfc/generators).
+ (Nikita Popov)
+ . Support list in foreach (https://wiki.php.net/rfc/foreachlist). (Laruence)
+ . Implemented 'finally' keyword (https://wiki.php.net/rfc/finally). (Laruence)
+ . Drop Windows XP and 2003 support. (Pierre)
+ . Improve set_exception_handler while doing reset.(Laruence)
+ . Support constant array/string dereferencing. (Laruence)
+ . Add support for using empty() on the result of function calls and
+ other expressions (https://wiki.php.net/rfc/empty_isset_exprs).
+ (Nikita Popov)
+ . Remove php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid(),
+ zend_logo_guid(). (Adnrew Faulds)
+
+- Calendar:
+ . Fixed bug #54254 (cal_from_jd returns month = 6 when there is only one Adar)
+ (Stas, Eitan Mosenkis)
- Core:
+ . Added boolval(). (Jille Timmermans)
+ . Added "Z" option to pack/unpack. (Gustavo)
+ . Implemented FR #60738 (Allow 'set_error_handler' to handle NULL).
+ (Laruence, Nikita Popov)
. Added optional second argument for assert() to specify custom message. Patch
by Lonny Kapelushnik (lonny@lonnylot.com). (Lars)
- . Support building PHP with the native client toolchain. (Stuart Langley)
- . Added --offline option for tests. (Remi)
- . Fixed bug #63162 (parse_url does not match password component). (husman)
- . Fixed bug #63111 (is_callable() lies for abstract static method). (Dmitry)
- . Fixed bug #63093 (Segfault while load extension failed in zts-build).
- (Laruence)
- . Fixed bug #62976 (Notice: could not be converted to int when comparing
- some builtin classes). (Laruence)
- . Fixed bug #62955 (Only one directive is loaded from "Per Directory Values"
- Windows registry). (aserbulov at parallels dot com)
- . Fixed bug #62907 (Double free when use traits). (Dmitry)
- . Fixed bug #61767 (Shutdown functions not called in certain error
- situation). (Dmitry)
- . Fixed bug #60909 (custom error handler throwing Exception + fatal error
- = no shutdown function). (Dmitry)
- . Fixed bug #60723 (error_log error time has changed to UTC ignoring default
- timezone). (Laruence)
+ . Fixed bug #18556 (Engine uses locale rules to handle class names). (Stas)
+ . Fixed bug #61681 (Malformed grammar). (Nikita Popov, Etienne, Laruence)
+ . Fixed bug #61038 (unpack("a5", "str\0\0") does not work as expected).
+ (srgoogleguy, Gustavo)
+ . Return previous handler when passing NULL to set_error_handler and
+ set_exception_handler. (Nikita Popov)
- cURL:
- . Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will
- cause cpu Soaring). (Pierrick)
-
-- Date:
- . Fixed bug #62896 ("DateTime->modify('+0 days')" modifies DateTime object)
- (Lonny Kapelushnik)
- . Fixed bug #62561 (DateTime add 'P1D' adds 25 hours). (Lonny Kapelushnik)
-
-- DOM:
- . Fixed bug #63015 (Incorrect arginfo for DOMErrorHandler). (Rob)
-
-- FPM:
- . Fixed bug #62954 (startup problems fpm / php-fpm). (fat)
- . Fixed bug #62886 (PHP-FPM may segfault/hang on startup). (fat)
- . Fixed bug #63085 (Systemd integration and daemonize). (remi, fat)
- . Fixed bug #62947 (Unneccesary warnings on FPM). (fat)
- . Fixed bug #62887 (Only /status?plain&full gives "last request cpu"). (fat)
- . Fixed bug #62216 (Add PID to php-fpm init.d script). (fat)
-
-- OpenSSL:
- . Implemented FR #61421 (OpenSSL signature verification missing RMD160,
- SHA224, SHA256, SHA384, SHA512). (Mark Jones)
-
-- SOAP
- . Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
- (Dmitry)
-
-- SPL:
- . Bug #62987 (Assigning to ArrayObject[null][something] overrides all
- undefined variables). (Laruence)
-
-- mbstring:
- . Allow passing null as a default value to mb_substr() and mb_strcut(). Patch
- by Alexander Moskaliov via GitHub PR #133. (Lars)
-
-- Filter extension:
- . Bug #49510: Boolean validation fails with FILTER_NULL_ON_FAILURE with empty
- string or false. (Lars)
-
-- Sockets
- . Fixed bug #63000 (MCAST_JOIN_GROUP on OSX is broken, merge of PR 185 by
- Igor Wiedler). (Lars)
-
-13 Sep 2012, PHP 5.4.7
-
-- Core:
- . Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
- . Fixed bug #62844 (parse_url() does not recognize //). (Andrew Faulds).
- . Fixed bug #62829 (stdint.h included on platform where HAVE_STDINT_H is not
- set). (Felipe)
- . Fixed bug #62763 (register_shutdown_function and extending class).
- (Laruence)
- . Fixed bug #62725 (Calling exit() in a shutdown function does not return
- the exit value). (Laruence)
- . Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
- . Fixed bug #62716 (munmap() is called with the incorrect length).
- (slangley@google.com)
- . Fixed bug #62358 (Segfault when using traits a lot). (Laruence)
- . Fixed bug #62328 (implementing __toString and a cast to string fails)
- (Laruence)
- . Fixed bug #51363 (Fatal error raised by var_export() not caught by error
- handler). (Lonny Kapelushnik)
- . Fixed bug #40459 (Stat and Dir stream wrapper methods do not call
- constructor). (Stas)
-
-- CURL:
- . Fixed bug #62912 (CURLINFO_PRIMARY_* AND CURLINFO_LOCAL_* not exposed).
- (Pierrick)
- . Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
-
-- Intl:
- . Fixed Spoofchecker not being registered on ICU 49.1. (Gustavo)
- . Fix bug #62933 (ext/intl compilation error on icu 3.4.1). (Gustavo)
- . Fix bug #62915 (defective cloning in several intl classes). (Gustavo)
-
-- Installation:
- . Fixed bug #62460 (php binaries installed as binary.dSYM). (Reeze Xia)
-
-- PCRE:
- . Fixed bug #55856 (preg_replace should fail on trailing garbage).
- (reg dot php at alf dot nu)
-
-- PDO:
- . Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)
-
-- Reflection:
- . Fixed bug #62892 (ReflectionClass::getTraitAliases crashes on importing
- trait methods as private). (Felipe)
- . Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong
- result). (Laruence)
-
-- Session:
- . Fixed bug (segfault due to retval is not initialized). (Laruence)
- . Fixed bug (segfault due to PS(mod_user_implemented) not be reseted
- when close handler call exit). (Laruence)
-
-- SOAP
- . Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
- (Dmitry)
-
-- SPL:
- . Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray)
- (Laruence)
- . Implemented FR #62840 (Add sort flag to ArrayObject::ksort). (Laruence)
-
-- Standard:
- . Fixed bug #62836 (Seg fault or broken object references on unserialize()).
- (Laruence)
-
-- FPM:
- . Merged PR 121 by minitux to add support for slow request counting on PHP
- FPM status page. (Lars)
-
-16 Aug 2012, PHP 5.4.6
-
-- CLI Server:
- . Implemented FR #62700 (have the console output 'Listening on
- http://localhost:8000'). (pascal.chevrel@free.fr)
-
-- Core:
- . Fixed bug #62661 (Interactive php-cli crashes if include() is used in
- auto_prepend_file). (Laruence)
- . Fixed bug #62653: (unset($array[$float]) causes a crash). (Nikita Popov,
- Laruence)
- . Fixed bug #62565 (Crashes due non-initialized internal properties_table).
- (Felipe)
- . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
- with run-test.php). (Laruence)
-
-- CURL:
- . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
- (r.hampartsumyan@gmail.com, Laruence)
-
-- DateTime:
- . Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
-
-- Fileinfo:
- . Fixed bug #61964 (finfo_open with directory causes invalid free).
- (reeze.xia@gmail.com)
-
-- Intl:
- . Fixed bug #62564 (Extending MessageFormatter and adding property causes
- crash). (Felipe)
-
-- MySQLnd:
- . Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode). (Laruence)
-
-- readline:
- . Fixed bug #62612 (readline extension compilation fails with
- sapi/cli/cli.h: No such file). (Johannes)
-
-- Reflection:
- . Implemented FR #61602 (Allow access to name of constant used as default
- value). (reeze.xia@gmail.com)
-
-- SimpleXML:
- . Implemented FR #55218 Get namespaces from current node. (Lonny)
-
-- SPL:
- . Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
- gives Segmentation fault). (Laruence, Gustavo)
- . Fixed bug #61527 (ArrayIterator gives misleading notice on next() when
- moved to the end). (reeze.xia@gmail.com)
-
-- Streams:
- . Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build).
- (Laruence)
-
-- Zlib:
- . Fixed bug #55544 (ob_gzhandler always conflicts with
- zlib.output_compression). (Laruence)
-
-19 Jul 2012, PHP 5.4.5
-
-- Core:
- . Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed
- Salt). (Anthony Ferrara)
- . Fixed bug #62432 (ReflectionMethod random corrupt memory on high
- concurrent). (Johannes)
- . Fixed bug #62373 (serialize() generates wrong reference to the object).
- (Moriyoshi)
- . Fixed bug #62357 (compile failure: (S) Arguments missing for built-in
- function __memcmp). (Laruence)
- . Fixed bug #61998 (Using traits with method aliases appears to result in
- crash during execution). (Dmitry)
- . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that
- includes a semi-colon). (Pierrick)
- . Fixed potential overflow in _php_stream_scandir (CVE-2012-2688).
- (Jason Powell, Stas)
-
-- EXIF:
- . Fixed information leak in ext exif (discovered by Martin Noga,
- Matthew "j00ru" Jurczyk, Gynvael Coldwind)
-
-- FPM:
- . Fixed bug #62205 (php-fpm segfaults (null passed to strstr)). (fat)
- . Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat)
- . Fixed bug #62153 (when using unix sockets, multiples FPM instances
- . Fixed bug #62033 (php-fpm exits with status 0 on some failures to start).
- (fat)
- . Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm). (fat)
- . Fixed bug #61835 (php-fpm is not allowed to run as root). (fat)
- . Fixed bug #61295 (php-fpm should not fail with commented 'user'
- . Fixed bug #61218 (FPM drops connection while receiving some binary values
- in FastCGI requests). (fat)
- . Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat)
- for non-root start). (fat)
- . Fixed bug #61026 (FPM pools can listen on the same address). (fat)
- can be launched without errors). (fat)
-
-- Iconv:
- . Fix bug #55042 (Erealloc in iconv.c unsafe). (Stas)
-
-- Intl:
- . Fixed bug #62083 (grapheme_extract() memory leaks). (Gustavo)
- . ResourceBundle constructor now accepts NULL for the first two arguments.
- (Gustavo)
- . Fixed bug #62081 (IntlDateFormatter constructor leaks memory when called
- twice). (Gustavo)
- . Fixed bug #62070 (Collator::getSortKey() returns garbage). (Gustavo)
- . Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks
- pattern). (Gustavo)
- . Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
-
-- JSON:
- . Fixed bug #61359 (json_encode() calls too many reallocs). (Stas)
-
-- libxml:
- . Fixed bug #62266 (Custom extension segfaults during xmlParseFile with FPM
- SAPI). (Gustavo)
-
-- Phar:
- . Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe)
-
-- Readline:
- . Fixed bug #62186 (readline fails to compile - void function should not
- return a value). (Johannes)
-
-- Reflection:
- . Fixed bug #62384 (Attempting to invoke a Closure more than once causes
- segfault). (Felipe)
- . Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks
- with constant). (Laruence)
-
-- Sockets:
- . Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe)
-
-- SPL:
- . Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to
- dot files). (Laruence)
- . Fixed bug #62262 (RecursiveArrayIterator does not implement Countable).
- (Nikita Popov)
-
-- XML Writer:
- . Fixed bug #62064 (memory leak in the XML Writer module).
- (jean-pierre dot lozi at lip6 dot fr)
-
-- Zip:
- . Upgraded libzip to 0.10.1 (Anatoliy)
-
-14 Jun 2012, PHP 5.4.4
-
-- COM:
- . Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
-
-- CLI Server:
- . Implemented FR #61977 (Need CLI web-server support for files with .htm &
- svg extensions). (Sixd, Laruence)
- . Improved performance while sending error page, this also fixed
- bug #61785 (Memory leak when access a non-exists file without router).
- (Laruence)
- . Fixed bug #61546 (functions related to current script failed when chdir()
- in cli sapi). (Laruence, reeze.xia@gmail.com)
-
-- Core:
- . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
- . Fixed CVE-2012-2143. (Solar Designer)
- . Fixed bug #62097 (fix for for bug #54547). (Gustavo)
- . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
- member of a null object). (Laruence)
- . Fixed bug #61978 (Object recursion not detected for classes that implement
- JsonSerializable). (Felipe)
- . Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
- . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
- (Laruence)
- . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
- . Fixed bug #61782 (__clone/__destruct do not match other methods when checking
- access controls). (Stas)
- . Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
- . Fixed bug #61761 ('Overriding' a private static method with a different
- signature causes crash). (Laruence)
- . Fixed bug #61730 (Segfault from array_walk modifying an array passed by
- reference). (Laruence)
- . Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown
- phase). (Laruence)
- . Fixed bug #61713 (Logic error in charset detection for htmlentities).
- (Anatoliy)
- . Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
- . Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables
- (without apache2)). (Laruence)
- . Fixed bug #61605 (header_remove() does not remove all headers). (Laruence)
- . Fixed bug #54547 (wrong equality of string numbers). (Gustavo)
- . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
- set to null). (Anatoliy)
- . Changed php://fd to be available only for CLI.
-
-- CURL:
- . Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
- (Laruence)
-
-- Fileinfo
- . Fixed bug #61812 (Uninitialised value used in libmagic).
- (Laruence, Gustavo)
- . Fixed bug #61566 failure caused by the posix lseek and read versions
- under windows in cdf_read(). (Anatoliy)
- . Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a
- directory descriptor under windows. (Anatoliy)
+ . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND,
+ CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS,
+ CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE,
+ CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST, CURLOPT_IGNORE_CONTENT_LENGTH,
+ CURLOPT_CONNECT_ONLY, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE,
+ CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE,
+ CURLOPT_FTP_SSL_CCC, CURLOPT_HTTP_CONTENT_DECODING,
+ CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_PROXY_TRANSFER_MODE,
+ CURLOPT_ADDRESS_SCOPE, CURLOPT_CRLFILE, CURLOPT_ISSUERCERT,
+ CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_PROXYUSERNAME,
+ CURLOPT_PROXYPASSWORD, CURLOPT_NOPROXY, CURLOPT_SOCKS5_GSSAPI_NEC,
+ CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPT_TFTP_BLKSIZE,
+ CURLOPT_SSH_KNOWNHOSTS, CURLOPT_FTP_USE_PRET, CURLOPT_MAIL_FROM,
+ CURLOPT_MAIL_RCPT, CURLOPT_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_SERVER_CSEQ,
+ CURLOPT_RTSP_SESSION_ID, CURLOPT_RTSP_STREAM_URI, CURLOPT_RTSP_TRANSPORT,
+ CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING,
+ CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL.
+ (Pierrick)
+ . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
+ still exists for backward compatibility but is doing nothing). (Pierrick)
+ . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)
+
+- Datetime
+ . Fixed bug #61642 (modify("+5 weekdays") returns Sunday).
+ (Dmitri Iouchtchenko)
+
+- Hash
+ . Added support for PBKDF2 via hash_pbkdf2(). (Anthony Ferrara)
- Intl
- . Fixed bug #62082 (Memory corruption in internal function
- get_icu_disp_value_src_php()). (Gustavo)
-
-- Libxml:
- . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
- (Laruence)
-
-- PDO:
- . Fixed bug #61755 (A parsing bug in the prepared statements can lead to
- access violations). (Johannes)
-
-- Phar:
- . Fixed bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus)
-
-- Pgsql:
- . Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki)
-
-- Streams:
- . Fixed bug #61961 (file_get_contents leaks when access empty file with
- maxlen set). (Reeze)
-
-- Zlib:
- . Fixed bug #61820 (using ob_gzhandler will complain about headers already
- sent when no compression). (Mike)
- . Fixed bug #61443 (can't change zlib.output_compression on the fly). (Mike)
- . Fixed bug #60761 (zlib.output_compression fails on refresh). (Mike)
-
-08 May 2012, PHP 5.4.3
-
-- CGI
- . Re-Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823.
- (Stas)
- . Fix bug #61807 - Buffer Overflow in apache_request_headers.
- (nyt-php at countercultured dot net).
-
-03 May 2012, PHP 5.4.2
-
-- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
-
-26 Apr 2012, PHP 5.4.1
-
-- CLI Server:
- . Fixed bug #61461 (missing checks around malloc() calls). (Ilia)
- . Implemented FR #60850 (Built in web server does not set
- $_SERVER['SCRIPT_FILENAME'] when using router). (Laruence)
- . "Connection: close" instead of "Connection: closed" (Gustavo)
-
-- Core:
- . Fixed crash in ZTS using same class in many threads. (Johannes)
- . Fixed bug #61374 (html_entity_decode tries to decode code points that don't
- exist in ISO-8859-1). (Gustavo)
- . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
- leaks / crashes). (Laruence)
- . Fixed bug #61225 (Incorrect lexing of 0b00*+<NUM>). (Pierrick)
- . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
- . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita
- Popov)
- . Fixed bug #61087 (Memory leak in parse_ini_file when specifying
- invalid scanner mode). (Nikic, Laruence)
- . Fixed bug #61072 (Memory leak when restoring an exception handler).
- (Nikic, Laruence)
- . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX).
- (Laruence)
- . Fixed bug #61052 (Missing error check in trait 'insteadof' clause). (Stefan)
- . Fixed bug #61011 (Crash when an exception is thrown by __autoload
- accessing a static property). (Laruence)
- . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
- vars). (Laruence)
- . Fixed bug #60978 (exit code incorrect). (Laruence)
- . Fixed bug #60911 (Confusing error message when extending traits). (Stefan)
- . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
- . Fixed bug #60717 (Order of traits in use statement can cause a fatal
- error). (Stefan)
- . Fixed bug #60573 (type hinting with "self" keyword causes weird errors).
- (Laruence)
- . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
- . Fixed bug #52719 (array_walk_recursive crashes if third param of the
- function is by reference). (Nikita Popov)
- . Improve performance of set_exception_handler while doing reset (Laruence)
-
-- fileinfo:
- . Fix fileinfo test problems. (Anatoliy Belsky)
-
-- FPM
- . Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
- (michaelhood at gmail dot com, Ilia)
-
-- Ibase
- . Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
- (Ilia)
-
-- Installation
- . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
-
-- Intl:
- . Fixed bug #61487 (Incorrent bounds checking in grapheme_strpos).
- (Stas)
-
-- mbstring:
- . MFH mb_ereg_replace_callback() for security enhancements. (Rui)
-
-- mysqli
- . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
-
-- mysqlnd
- . Fixed bug #61704 (Crash apache, phpinfo() threading issue). (Johannes)
- . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
- (Johannes)
-
-- PDO
- . Fixed bug #61292 (Segfault while calling a method on an overloaded PDO
- object). (Laruence)
-
-- PDO_mysql
- . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
- always work). (Johannes)
- . Fixed bug #61194 (PDO should export compression flag with myslqnd).
- (Johannes)
-
-- PDO_odbc
- . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
-
-- Phar
- . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
- bytes). (Nikita Popov)
-
-- Readline:
- . Fixed bug #61088 (Memory leak in readline_callback_handler_install).
- (Nikic, Laruence)
-
-- Reflection:
- . Implemented FR #61602 (Allow access to the name of constant
- used as function/method parameter's default value). (reeze.xia@gmail.com)
- . Fixed bug #60968 (Late static binding doesn't work with
- ReflectionMethod::invokeArgs()). (Laruence)
-
-- Session
- . Fixed bug #60634 (Segmentation fault when trying to die() in
- SessionHandler::write()). (Ilia)
-
-- SOAP
- . Fixed bug #61423 (gzip compression fails). (Ilia)
- . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
- User-Agent header). (carloschilazo at gmail dot com)
- . Fixed bug #60842, #51775 (Chunked response parsing error when
- chunksize length line is > 10 bytes). (Ilia)
- . Fixed bug #49853 (Soap Client stream context header option ignored).
- (Dmitry)
-
-- SPL:
- . Fixed bug #61453 (SplObjectStorage does not identify objects correctly).
- (Gustavo)
- . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence)
-
-- Standard:
- . Fixed memory leak in substr_replace. (Pierrick)
- . Make max_file_uploads ini directive settable outside of php.ini (Rasmus)
- . Fixed bug #61409 (Bad formatting on phpinfo()). (Jakub Vrana)
- . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
- . Fixed bug #60106 (stream_socket_server silently truncates long unix socket
- paths). (Ilia)
-
-- XMLRPC:
- . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary
- variable). (Nikita Popov)
- . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikita
- Popov)
-
-- Zlib:
- . Fixed bug #61306 (initialization of global inappropriate for ZTS). (Gustavo)
- . Fixed bug #61287 (A particular string fails to decompress). (Mike)
- . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikita Popov)
-
-01 Mar 2012, PHP 5.4.0
-
-- Installation:
- . autoconf 2.59+ is now supported (and required) for generating the
- configure script with ./buildconf. Autoconf 2.60+ is desirable
- otherwise the configure help order may be incorrect. (Rasmus, Chris Jones)
-
-- Removed legacy features:
- . break/continue $var syntax. (Dmitry)
- . Safe mode and all related php.ini options. (Kalle)
- . register_globals and register_long_arrays php.ini options. (Kalle)
- . import_request_variables(). (Kalle)
- . allow_call_time_pass_reference. (Pierrick)
- . define_syslog_variables php.ini option and its associated function. (Kalle)
- . highlight.bg php.ini option. (Kalle)
- . safe_mode, safe_mode_gid, safe_mode_include_dir,
- safe_mode_exec_dir, safe_mode_allowed_env_vars and
- safe_mode_protected_env_vars php.ini options.
- . zend.ze1_compatibility_mode php.ini option.
- . Session bug compatibility mode (session.bug_compat_42 and
- session.bug_compat_warn php.ini options). (Kalle)
- . session_is_registered(), session_register() and session_unregister()
- functions. (Kalle)
- . y2k_compliance php.ini option. (Kalle)
- . magic_quotes_gpc, magic_quotes_runtime and magic_quotes_sybase
- php.ini options. get_magic_quotes_gpc, get_magic_quotes_runtime are kept
- but always return false, set_magic_quotes_runtime raises an
- E_CORE_ERROR. (Pierrick, Pierre)
- . Removed support for putenv("TZ=..") for setting the timezone. (Derick)
- . Removed the timezone guessing algorithm in case the timezone isn't set with
- date.timezone or date_default_timezone_set(). Instead of a guessed
- timezone, "UTC" is now used instead. (Derick)
-
-- Moved extensions to PECL:
- . ext/sqlite. (Note: the ext/sqlite3 and ext/pdo_sqlite extensions are
- not affected) (Johannes)
-
-- General improvements:
- . Added short array syntax support ([1,2,3]), see UPGRADING guide for full
- details. (rsky0711 at gmail . com, sebastian.deutsch at 9elements . com,
- Pierre)
- . Added binary number format (0b001010). (Jonah dot Harris at gmail dot com)
- . Added support for Class::{expr}() syntax (Pierrick)
- . Added multibyte support by default. Previously PHP had to be compiled
- with --enable-zend-multibyte. Now it can be enabled or disabled through
- the zend.multibyte directive in php.ini. (Dmitry)
- . Removed compile time dependency from ext/mbstring (Dmitry)
- . Added support for Traits. (Stefan, with fixes by Dmitry and Laruence)
- . Added closure $this support back. (Stas)
- . Added array dereferencing support. (Felipe)
- . Added callable typehint. (Hannes)
- . Added indirect method call through array. FR #47160. (Felipe)
- . Added DTrace support. (David Soria Parra)
- . Added class member access on instantiation (e.g. (new foo)->bar()) support.
- (Felipe)
- . <?= is now always available regardless of the short_open_tag setting. (Rasmus)
- . Implemented Zend Signal Handling (configurable option --enable-zend-signals,
- off by default). (Lucas Nealan, Arnaud Le Blanc, Brian Shire, Ilia)
- . Improved output layer, see README.NEW-OUTPUT-API for internals. (Mike)
- . Improved UNIX build system to allow building multiple PHP binary SAPIs and
- one SAPI module the same time. FR #53271, FR #52419. (Jani)
- . Implemented closure rebinding as parameter to bindTo. (Gustavo Lopes)
- . Improved the warning message of incompatible arguments. (Laruence)
- . Improved ternary operator performance when returning arrays. (Arnaud, Dmitry)
- . Changed error handlers to only generate docref links when the docref_root
- php.ini setting is not empty. (Derick)
- . Changed silent conversion of array to string to produce a notice. (Patrick)
- . Changed default encoding from ISO-8859-1 to UTF-8 when not specified in
- htmlspecialchars and htmlentities. (Rasmus)
- . Changed casting of null/''/false into an Object when adding a property
- from E_STRICT into a warning. (Scott)
- . Changed E_ALL to include E_STRICT. (Stas)
- . Disabled Windows CRT warning by default, can be enabled again using the
- php.ini directive windows_show_crt_warnings. (Pierre)
- . Fixed bug #55378: Binary number literal returns float number though its
- value is small enough. (Derick)
-
-- Improved Zend Engine memory usage: (Dmitry)
- . Improved parse error messages. (Felipe)
- . Replaced zend_function.pass_rest_by_reference by
- ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags.
- . Replaced zend_function.return_reference by ZEND_ACC_RETURN_REFERENCE
- in zend_function.fn_flags.
- . Removed zend_arg_info.required_num_args as it was only needed for internal
- functions. Now the first arg_info for internal functions (which has special
- meaning) is represented by the zend_internal_function_info structure.
- . Moved zend_op_array.size, size_var, size_literal, current_brk_cont,
- backpatch_count into CG(context) as they are used only during compilation.
- . Moved zend_op_array.start_op into EG(start_op) as it's used only for
- 'interactive' execution of a single top-level op-array.
- . Replaced zend_op_array.done_pass_two by ZEND_ACC_DONE_PASS_TWO in
- zend_op_array.fn_flags.
- . op_array.vars array is trimmed (reallocated) during pass_two.
- . Replaced zend_class_entry.constants_updated by ZEND_ACC_CONSTANTS_UPDATED
- in zend_class_entry.ce_flags.
- . Reduced the size of zend_class_entry by sharing the same memory space
- by different information for internal and user classes.
- See zend_class_entry.info union.
- . Reduced size of temp_variable.
-
-- Improved Zend Engine - performance tweaks and optimizations: (Dmitry)
- . Inlined most probable code-paths for arithmetic operations directly into
- executor.
- . Eliminated unnecessary iterations during request startup/shutdown.
- . Changed $GLOBALS into a JIT autoglobal, so it's initialized only if used.
- (this may affect opcode caches!)
- . Improved performance of @ (silence) operator.
- . Simplified string offset reading. Given $str="abc" then $str[1][0] is now
- a legal construct.
- . Added caches to eliminate repeatable run-time bindings of functions,
- classes, constants, methods and properties.
- . Added concept of interned strings. All strings constants known at compile
- time are allocated in a single copy and never changed.
- . ZEND_RECV now always has IS_CV as its result.
- . ZEND_CATCH now has to be used only with constant class names.
- . ZEND_FETCH_DIM_? may fetch array and dimension operands in different order.
- . Simplified ZEND_FETCH_*_R operations. They can't be used with the
- EXT_TYPE_UNUSED flag any more. This is a very rare and useless case.
- ZEND_FREE might be required after them instead.
- . Split ZEND_RETURN into two new instructions ZEND_RETURN and
- ZEND_RETURN_BY_REF.
- . Optimized access to global constants using values with pre-calculated
- hash_values from the literals table.
- . Optimized access to static properties using executor specialization.
- A constant class name may be used as a direct operand of ZEND_FETCH_*
- instruction without previous ZEND_FETCH_CLASS.
- . zend_stack and zend_ptr_stack allocation is delayed until actual usage.
-
-- Other improvements to Zend Engine:
- . Added an optimization which saves memory and emalloc/efree calls for empty
- HashTables. (Stas, Dmitry)
- . Added ability to reset user opcode handlers (Yoram).
- . Changed the structure of op_array.opcodes. The constant values are moved from
- opcode operands into a separate literal table. (Dmitry)
- . Fixed (disabled) inline-caching for ZEND_OVERLOADED_FUNCTION methods.
- (Dmitry)
-
-- Improved core functions:
- . Enforce an extended class' __construct arguments to match the
- abstract constructor in the base class.
- . Disallow reusing superglobal names as parameter names.
- . Added optional argument to debug_backtrace() and debug_print_backtrace()
- to limit the amount of stack frames returned. (Sebastian, Patrick)
- . Added hex2bin() function. (Scott)
- . number_format() no longer truncates multibyte decimal points and thousand
- separators to the first byte. FR #53457. (Adam)
- . Added support for object references in recursive serialize() calls.
- FR #36424. (Mike)
- . Added support for SORT_NATURAL and SORT_FLAG_CASE in array
- sort functions (sort, rsort, ksort, krsort, asort, arsort and
- array_multisort). FR#55158 (Arpad)
- . Added stream metadata API support and stream_metadata() stream class
- handler. (Stas)
- . User wrappers can now define a stream_truncate() method that responds
- to truncation, e.g. through ftruncate(). FR #53888. (Gustavo)
- . Improved unserialize() performance.
- (galaxy dot mipt at gmail dot com, Kalle)
- . Changed array_combine() to return empty array instead of FALSE when both
- parameter arrays are empty. FR #34857. (joel.perras@gmail.com)
- . Fixed bug #61095 (Incorect lexing of 0x00*+<NUM>). (Etienne)
- . Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with
- $double=false). (Gustavo)
- . Fixed bug #60895 (Possible invalid handler usage in windows random
- functions). (Pierre)
- . Fixed bug #60879 (unserialize() Does not invoke __wakeup() on object).
- (Pierre, Steve)
- . Fixed bug #60825 (Segfault when running symfony 2 tests).
- (Dmitry, Laruence)
- . Fixed bug #60627 (httpd.worker segfault on startup with php_value).
- . Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax). (Dmitry)
- . Fixed bug #60611 (Segmentation fault with Cls::{expr}() syntax). (Laruence)
- (Laruence)
- . Fixed bug #60558 (Invalid read and writes). (Laruence)
- . Fixed bug #60444 (Segmentation fault with include & class extending).
- (Laruence, Dmitry).
- . Fixed bug #60362 (non-existent sub-sub keys should not have values).
- (Laruence, alan_k, Stas)
- . Fixed bug #60350 (No string escape code for ESC (ascii 27), normally \e).
- (php at mickweiss dot com)
- . Fixed bug #60321 (ob_get_status(true) no longer returns an array when
- buffer is empty). (Pierrick)
- . Fixed bug #60282 (Segfault when using ob_gzhandler() with open buffers).
- (Laruence)
- . Fixed bug #60240 (invalid read/writes when unserializing specially crafted
- strings). (Mike)
- . Fixed bug #60227 (header() cannot detect the multi-line header with
- CR(0x0D)). (rui)
- . Fixed bug #60174 (Notice when array in method prototype error).
- (Laruence)
- . Fixed bug #60169 (Conjunction of ternary and list crashes PHP).
- (Laruence)
- . Fixed bug #60038 (SIGALRM cause segfault in php_error_cb). (Laruence)
- (klightspeed at netspace dot net dot au)
- . Fixed bug #55871 (Interruption in substr_replace()). (Stas)
- . Fixed bug #55801 (Behavior of unserialize has changed). (Mike)
- . Fixed bug #55758 (Digest Authenticate missed in 5.4) . (Laruence)
- . Fixed bug #55748 (multiple NULL Pointer Dereference with zend_strndup())
- (CVE-2011-4153). (Stas)
- . Fixed bug #55124 (recursive mkdir fails with current (dot) directory in path).
- (Pierre)
- . Fixed bug #55084 (Function registered by header_register_callback is
- called only once per process). (Hannes)
- . Implement FR #54514 (Get php binary path during script execution).
- (Laruence)
- . Fixed bug #52211 (iconv() returns part of string on error). (Felipe)
- . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
-
-- Improved generic SAPI support:
- . Added $_SERVER['REQUEST_TIME_FLOAT'] to include microsecond precision.
- (Patrick)
- . Added header_register_callback() which is invoked immediately
- prior to the sending of headers and after default headers have
- been added. (Scott)
- . Added http_response_code() function. FR #52555. (Paul Dragoonis, Kalle)
- . Fixed bug #55500 (Corrupted $_FILES indices lead to security concern).
- (CVE-2012-1172). (Stas)
- . Fixed bug #54374 (Insufficient validating of upload name leading to
- corrupted $_FILES indices). (CVE-2012-1172). (Stas, lekensteyn at gmail dot com)
-
-- Improved CLI SAPI:
- . Added built-in web server that is intended for testing purpose.
- (Moriyoshi, Laruence, and fixes by Pierre, Derick, Arpad,
- chobieee at gmail dot com)
- . Added command line option --rz <name> which shows information of the
- named Zend extension. (Johannes)
- . Interactive readline shell improvements: (Johannes)
- . Added "cli.pager" php.ini setting to set a pager for output.
- . Added "cli.prompt" php.ini setting to configure the shell prompt.
- . Added shortcut #inisetting=value to change php.ini settings at run-time.
- . Changed shell not to terminate on fatal errors.
- . Interactive shell works with shared readline extension. FR #53878.
-
-- Improved CGI/FastCGI SAPI: (Dmitry)
- . Added apache compatible functions: apache_child_terminate(),
- getallheaders(), apache_request_headers() and apache_response_headers()
- . Improved performance of FastCGI request parsing.
- . Fixed reinitialization of SAPI callbacks after php_module_startup().
- (Dmitry)
-
-- Improved PHP-FPM SAPI:
- . Removed EXPERIMENTAL flag. (fat)
- . Fixed bug #60659 (FPM does not clear auth_user on request accept).
- (bonbons at linux-vserver dot org)
-
-- Improved Litespeed SAPI:
- . Fixed bug #55769 (Make Fails with "Missing Separator" error). (Adam)
-
-- Improved Date extension:
- . Added the + modifier to parseFromFormat to allow trailing text in the
- string to parse without throwing an error. (Stas, Derick)
-
-- Improved DBA extension:
- . Added Tokyo Cabinet abstract DB support. (Michael Maclean)
- . Added Berkeley DB 5 support. (Johannes, Chris Jones)
-
-- Improved DOM extension:
- . Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com)
-
-- Improved filesystem functions:
- . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value.
- FR #53407. (Adam)
-
-- Improved HASH extension:
- . Added Jenkins's one-at-a-time hash support. (Martin Jansen)
- . Added FNV-1 hash support. (Michael Maclean)
- . Made Adler32 algorithm faster. FR #53213. (zavasek at yandex dot ru)
- . Removed Salsa10/Salsa20, which are actually stream ciphers (Mike)
- . Fixed bug #60221 (Tiger hash output byte order) (Mike)
-
-- Improved intl extension:
- . Added Spoofchecker class, allows checking for visibly confusable characters and
- other security issues. (Scott)
- . Added Transliterator class, allowing transliteration of strings.
+ . The intl extension now requires ICU 4.0+.
+ . Added intl.use_exceptions INI directive, which controls what happens when
+ global errors are set together with intl.error_level. (Gustavo)
+ . MessageFormatter::format() and related functions now accepted named
+ arguments and mixed numeric/named arguments in ICU 4.8+. (Gustavo)
+ . MessageFormatter::format() and related functions now don't error out when
+ an insufficient argument count is provided. Instead, the placeholders will
+ remain unsubstituted. (Gustavo)
+ . MessageFormatter::parse() and MessageFormat::format() (and their static
+ equivalents) don't throw away better than second precision in the arguments.
(Gustavo)
- . Added support for UTS #46. (Gustavo)
- . Fixed build on Fedora 15 / Ubuntu 11. (Hannes)
- . Fixed bug #55562 (grapheme_substr() returns false on big length). (Stas)
-
-- Improved JSON extension:
- . Added new json_encode() option JSON_UNESCAPED_UNICODE. FR #53946.
- (Alexander, Gwynne)
- . Added JsonSerializable interface. (Sara)
- . Added JSON_BIGINT_AS_STRING, extended json_decode() sig with $options.
- (Sara)
- . Added support for JSON_NUMERIC_CHECK option in json_encode() that converts
- numeric strings to integers. (Ilia)
- . Added new json_encode() option JSON_UNESCAPED_SLASHES. FR #49366. (Adam)
- . Added new json_encode() option JSON_PRETTY_PRINT. FR #44331. (Adam)
-
-- Improved LDAP extension:
- . Added paged results support. FR #42060. (ando@OpenLDAP.org,
- iarenuno@eteo.mondragon.edu, jeanseb@au-fil-du.net, remy.saissy@gmail.com)
-
-- Improved mbstring extension:
- . Added Shift_JIS/UTF-8 Emoji (pictograms) support. (Rui)
- . Added JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004)
- support. (Rui)
- . Ill-formed UTF-8 check for security enhancements. (Rui)
- . Added MacJapanese (Shift_JIS) and gb18030 encoding support. (Rui)
- . Added encode/decode in hex format to mb_[en|de]code_numericentity(). (Rui)
- . Added user JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004)
- support. (Rui)
- . Added the user defined area for CP936 and CP950 (Rui).
- . Fixed bug #60306 (Characters lost while converting from cp936 to utf8).
- (Laruence)
-
-- Improved MySQL extensions:
- . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey)
- . mysqlnd: Added named pipes support. FR #48082. (Andrey)
- . MySQLi: Added iterator support in MySQLi. mysqli_result implements
- Traversable. (Andrey, Johannes)
- . PDO_mysql: Removed support for linking with MySQL client libraries older
- than 4.1. (Johannes)
- . ext/mysql, mysqli and pdo_mysql now use mysqlnd by default. (Johannes)
- . Fixed bug #55473 (mysql_pconnect leaks file descriptors on reconnect).
- (Andrey, Laruence)
- . Fixed bug #55653 (PS crash with libmysql when binding same variable as
- param and out). (Laruence)
-
-- Improved OpenSSL extension:
- . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre)
- . Added no padding option to openssl_encrypt()/openssl_decrypt(). (Scott)
- . Use php's implementation for Windows Crypto API in
- openssl_random_pseudo_bytes. (Pierre)
- . On error in openssl_random_pseudo_bytes() made sure we set strong result
- to false. (Scott)
- . Fixed possible attack in SSL sockets with SSL 3.0 / TLS 1.0.
- CVE-2011-3389. (Scott)
- . Fixed bug #61124 (Crash when decoding an invalid base64 encoded string).
- (me at ktamura dot com, Scott)
-
-- Improved PDO:
- . Fixed PDO objects binary incompatibility. (Dmitry)
-
-- PDO DBlib driver:
- . Added nextRowset support.
- . Fixed bug #50755 (PDO DBLIB Fails with OOM).
-
-- Improved PostgreSQL extension:
- . Added support for "extra" parameter for PGNotify().
- (r dot i dot k at free dot fr, Ilia)
-
-- Improved PCRE extension:
- . Changed third parameter of preg_match_all() to optional. FR #53238. (Adam)
-
-- Improved Readline extension:
- . Fixed bug #54450 (Enable callback support when built against libedit).
- (fedora at famillecollet dot com, Hannes)
-
-- Improved Reflection extension:
- . Added ReflectionClass::newInstanceWithoutConstructor() to create a new
- instance of a class without invoking its constructor. FR #55490.
- (Sebastian)
- . Added ReflectionExtension::isTemporary() and
- ReflectionExtension::isPersistent() methods. (Johannes)
- . Added ReflectionZendExtension class. (Johannes)
- . Added ReflectionClass::isCloneable(). (Felipe)
-
-- Improved Session extension:
- . Expose session status via new function, session_status (FR #52982) (Arpad)
- . Added support for object-oriented session handlers. (Arpad)
- . Added support for storing upload progress feedback in session data. (Arnaud)
- . Changed session.entropy_file to default to /dev/urandom or /dev/arandom if
- either is present at compile time. (Rasmus)
- . Fixed bug #60860 (session.save_handler=user without defined function core
- dumps). (Felipe)
- . Implement FR #60551 (session_set_save_handler should support a core's
- session handler interface). (Arpad)
- . Fixed bug #60640 (invalid return values). (Arpad)
-
-- Improved SNMP extension (Boris Lytochkin):
- . Added OO API. FR #53594 (php-snmp rewrite).
- . Sanitized return values of existing functions. Now it returns FALSE on
- failure.
- . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids
- upon request.
- . Introducing unit tests for extension with ~full coverage.
- . IPv6 support. (FR #42918)
- . Way of representing OID value can now be changed when SNMP_VALUE_OBJECT
- is used for value output mode. Use or'ed SNMP_VALUE_LIBRARY(default if
- not specified) or SNMP_VALUE_PLAIN. (FR #54502)
- . Fixed bug #60749 (SNMP module should not strip non-standard SNMP port
- from hostname). (Boris Lytochkin)
- . Fixed bug #60585 (php build fails with USE flag snmp when IPv6 support
- is disabled). (Boris Lytochkin)
- . Fixed bug #53862 (snmp_set_oid_output_format does not allow returning to default)
- . Fixed bug #46065 (snmp_set_quick_print() persists between requests)
- . Fixed bug #45893 (Snmp buffer limited to 2048 char)
- . Fixed bug #44193 (snmp v3 noAuthNoPriv doesn't work)
-
-- Improved SOAP extension:
- . Added new SoapClient option "keep_alive". FR #60329. (Pierrick)
- . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
-
-- Improved SPL extension:
- . Added RegexIterator::getRegex() method. (Joshua Thijssen)
- . Added SplObjectStorage::getHash() hook. (Etienne)
- . Added CallbackFilterIterator and RecursiveCallbackFilterIterator. (Arnaud)
- . Added missing class_uses(..) as pointed out by #55266 (Stefan)
- . Immediately reject wrong usages of directories under Spl(Temp)FileObject
- and friends. (Etienne, Pierre)
- . FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
- the default stream context. (Hannes)
- . Fixed bug #60201 (SplFileObject::setCsvControl does not expose third
- argument via Reflection). (Peter)
- . Fixed bug #55287 (spl_classes() not includes CallbackFilter classes)
- (sasezaki at gmail dot com, salathe)
-
-- Improved Sysvshm extension:
- . Fixed bug #55750 (memory copy issue in sysvshm extension).
- (Ilia, jeffhuang9999 at gmail dot com)
-
-- Improved Tidy extension:
- . Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference).
- (Maksymilian Arciemowicz, Felipe)
-
-- Improved Tokenizer extension:
- . Fixed bug #54089 (token_get_all with regards to __halt_compiler is
- not binary safe). (Nikita Popov)
-
-- Improved XSL extension:
- . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to
- define forbidden operations within XSLT stylesheets, default is not to
- enable write operations from XSLT. Bug #54446 (Chregu, Nicolas Gregoire)
- . XSL doesn't stop transformation anymore, if a PHP function can't be called
- (Christian)
-
-- Improved ZLIB extension:
- . Re-implemented non-file related functionality. (Mike)
- . Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression).
- (Mike)
-
-14 Jun 2012, PHP 5.3.14
-
-- CLI SAPI:
- . Fixed bug #61546 (functions related to current script failed when chdir()
- in cli sapi). (Laruence, reeze.xia@gmail.com)
-
-- CURL:
- . Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
- (Laruence)
-
-- COM:
- . Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
-
-- Core:
- . Fixed CVE-2012-2143. (Solar Designer)
- . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
- . Fixed bug #62373 (serialize() generates wrong reference to the object).
- (Moriyoshi)
- . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
- member of a null object). (Laruence)
- . Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
- . Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
- . Fixed bug #61730 (Segfault from array_walk modifying an array passed by
- reference). (Laruence)
- . Fixed bug #61713 (Logic error in charset detection for htmlentities).
- (Anatoliy)
- . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
- set to null). (Anatoliy)
- . Changed php://fd to be available only for CLI.
-
-- Fileinfo:
- . Fixed bug #61812 (Uninitialised value used in libmagic).
- (Laruence, Gustavo)
-
-- Iconv extension:
- . Fixed a bug that iconv extension fails to link to the correct library
- when another extension makes use of a library that links to the iconv
- library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
- (Moriyoshi)
-
-- Intl:
- . Fixed bug #62082 (Memory corruption in internal function
- get_icu_disp_value_src_php()). (Gustavo)
-
-- JSON
- . Fixed bug #61537 (json_encode() incorrectly truncates/discards
- information). (Adam)
-
-- PDO:
- . Fixed bug #61755 (A parsing bug in the prepared statements can lead to
- access violations). (Johannes)
-
-- Phar:
- . Fix bug #61065 (Secunia SA44335). (Rasmus)
-
-- Streams:
- . Fixed bug #61961 (file_get_contents leaks when access empty file with
- maxlen set). (Reeze)
-
-08 May 2012, PHP 5.3.13
-- CGI
- . Improve fix for PHP-CGI query string parameter vulnerability, CVE-2012-2311.
- (Stas)
-
-03 May 2012, PHP 5.3.12
-- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
-
-26 Apr 2012, PHP 5.3.11
-
-- Core:
- . Fixed bug #61605 (header_remove() does not remove all headers).
- (Laruence)
- . Fixed bug #61541 (Segfault when using ob_* in output_callback).
- (reeze.xia@gmail.com)
- . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
- leaks / crashes). (Laruence)
- . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
- . Improved max_input_vars directive to check nested variables (Dmitry).
- . Fixed bug #61095 (Incorect lexing of 0x00*+<NUM>). (Etienne)
- . Fixed bug #61087 (Memory leak in parse_ini_file when specifying
- invalid scanner mode). (Nikic, Laruence)
- . Fixed bug #61072 (Memory leak when restoring an exception handler).
- (Nikic, Laruence)
- . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX).
- (Laruence)
- . Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831).
- (Ondřej Surý)
- . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
- vars). (Laruence)
- . Fixed bug #60895 (Possible invalid handler usage in windows random
- functions). (Pierre)
- . Fixed bug #60825 (Segfault when running symfony 2 tests).
- (Dmitry, Laruence)
- . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
- . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
- . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
- (rui, Gustavo)
- . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
- . Fixed bug #54374 (Insufficient validating of upload name leading to
- corrupted $_FILES indices). (CVE-2012-1172). (Stas, lekensteyn at
- gmail dot com, Pierre)
- . Fixed bug #52719 (array_walk_recursive crashes if third param of the
- function is by reference). (Nikita Popov)
- . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
-
-- DOM
- . Added debug info handler to DOM objects. (Gustavo, Joey Smith)
-
-- FPM
- . Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
- (michaelhood at gmail dot com, Ilia)
-
-- Ibase
- . Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
- (Ilia)
-
-- Installation
- . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
-
-- Fileinfo
- . Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo)
-
-- Firebird Database extension (ibase):
- . Fixed bug #60802 (ibase_trans() gives segfault when passing params).
-
-- Libxml:
- . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
- (Laruence)
- . Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN).
- (Tim Starling)
-
-- mysqli
- . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
+ . IntlDateFormatter::__construct and datefmt_create() now accept for the
+ $timezone argument time zone identifiers, IntlTimeZone objects, DateTimeZone
+ objects and NULL. (Gustavo)
+ . IntlDateFormatter::__construct and datefmt_create() no longer accept invalid
+ timezone identifiers or empty strings. (Gustavo)
+ . The default time zone used in IntlDateFormatter::__construct and
+ datefmt_create() (when the corresponding argument is not passed or NULL is
+ passed) is now the one given by date_default_timezone_get(), not the
+ default ICU time zone. (Gustavo)
+ . The time zone passed to the IntlDateFormatter is ignored if it is NULL and
+ if the calendar passed is an IntlCalendar object -- in this case, the
+ IntlCalendar's time zone will be used instead. Otherwise, the time zone
+ specified in the $timezone argument is used instead. This does not affect
+ old code, as IntlCalendar was introduced in this version. (Gustavo)
+ . IntlDateFormatter::__construct and datefmt_create() now accept for the
+ $calendar argument also IntlCalendar objects. (Gustavo)
+ . IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false
+ if the IntlDateFormatter was set up with an IntlCalendar instead of the
+ constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not
+ exist before this version. (Gustavo)
+ . IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept
+ an IntlCalendar object, in which case its time zone is taken. Passing a
+ constant is still allowed, and still keeps the time zone. (Gustavo)
+ . IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
+ deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone()
+ instead. (Gustavo)
+ . IntlDateFormatter::format() and datefmt_format() now also accept an
+ IntlCalendar object for formatting. (Gustavo)
+ . Added the classes: IntlCalendar, IntlGregorianCalendar, IntlTimeZone,
+ IntlBreakIterator, IntlRuleBasedBreakIterator and
+ IntlCodePointBreakIterator. (Gustavo)
+ . Added the functions: intlcal_get_keyword_values_for_locale(),
+ intlcal_get_now(), intlcal_get_available_locales(), intlcal_get(),
+ intlcal_get_time(), intlcal_set_time(), intlcal_add(),
+ intlcal_set_time_zone(), intlcal_after(), intlcal_before(), intlcal_set(),
+ intlcal_roll(), intlcal_clear(), intlcal_field_difference(),
+ intlcal_get_actual_maximum(), intlcal_get_actual_minimum(),
+ intlcal_get_day_of_week_type(), intlcal_get_first_day_of_week(),
+ intlcal_get_greatest_minimum(), intlcal_get_least_maximum(),
+ intlcal_get_locale(), intlcal_get_maximum(),
+ intlcal_get_minimal_days_in_first_week(), intlcal_get_minimum(),
+ intlcal_get_time_zone(), intlcal_get_type(),
+ intlcal_get_weekend_transition(), intlcal_in_daylight_time(),
+ intlcal_is_equivalent_to(), intlcal_is_lenient(), intlcal_is_set(),
+ intlcal_is_weekend(), intlcal_set_first_day_of_week(),
+ intlcal_set_lenient(), intlcal_equals(),
+ intlcal_get_repeated_wall_time_option(),
+ intlcal_get_skipped_wall_time_option(),
+ intlcal_set_repeated_wall_time_option(),
+ intlcal_set_skipped_wall_time_option(), intlcal_from_date_time(),
+ intlcal_to_date_time(), intlcal_get_error_code(),
+ intlcal_get_error_message(), intlgregcal_create_instance(),
+ intlgregcal_set_gregorian_change(), intlgregcal_get_gregorian_change() and
+ intlgregcal_is_leap_year(). (Gustavo)
+ . Added the functions: intltz_create_time_zone(), intltz_create_default(),
+ intltz_get_id(), intltz_get_gmt(), intltz_get_unknown(),
+ intltz_create_enumeration(), intltz_count_equivalent_ids(),
+ intltz_create_time_zone_id_enumeration(), intltz_get_canonical_id(),
+ intltz_get_region(), intltz_get_tz_data_version(),
+ intltz_get_equivalent_id(), intltz_use_daylight_time(), intltz_get_offset(),
+ intltz_get_raw_offset(), intltz_has_same_rules(), intltz_get_display_name(),
+ intltz_get_dst_savings(), intltz_from_date_time_zone(),
+ intltz_to_date_time_zone(), intltz_get_error_code(),
+ intltz_get_error_message(). (Gustavo)
+ . Added the methods: IntlDateFormatter::formatObject(),
+ IntlDateFormatter::getCalendarObject(), IntlDateFormatter::getTimeZone(),
+ IntlDateFormatter::setTimeZone(). (Gustavo)
+ . Added the functions: datefmt_format_object(), datefmt_get_calendar_object(),
+ datefmt_get_timezone(), datefmt_set_timezone(),
+ datefmt_get_calendar_object(), intlcal_create_instance(). (Gustavo)
+
+- MCrypt
+ . mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
+ E_DEPRECATED. (GoogleGuy)
+
+- MySQLi
+ . Dropped support for LOAD DATA LOCAL INFILE handlers when using libmysql.
+ Known for stability problems. (Andrey)
+ . Added support for SHA256 authentication available with MySQL 5.6.6+. (Andrey)
-- PDO_mysql
- . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
- always work). (Johannes)
- . Fixed bug #61194 (PDO should export compression flag with myslqnd).
- (Johannes)
-
-- PDO_odbc
- . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
-
-- PDO_pgsql
- . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed
- rows on postgresql >= 9). (ben dot pineau at gmail dot com)
-
-- PDO_Sqlite extension:
- . Add createCollation support. (Damien)
-
-- Phar:
- . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
- bytes). (Nikic)
-
-- PHP-FPM SAPI:
- . Fixed bug #60811 (php-fpm compilation problem). (rasmus)
-
-- Readline:
- . Fixed bug #61088 (Memory leak in readline_callback_handler_install).
- (Nikic, Laruence)
- . Add open_basedir checks to readline_write_history and readline_read_history.
- (Rasmus, reported by Mateusz Goik)
-
-- Reflection:
- . Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
- when get_properties returns a hash table with (inaccessible) dynamic
- numeric properties). (Gustavo)
- . Fixed bug #60968 (Late static binding doesn't work with
- ReflectionMethod::invokeArgs()). (Laruence)
+- PCRE:
+ . Deprecated the /e modifier
+ (https://wiki.php.net/rfc/remove_preg_replace_eval_modifier). (Nikita Popov)
+ . Fixed bug #63284 (Upgrade PCRE to 8.31). (Anatoliy)
-- SOAP
- . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
- . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
- User-Agent header). (carloschilazo at gmail dot com)
- . Fixed bug #60842, #51775 (Chunked response parsing error when
- chunksize length line is > 10 bytes). (Ilia)
- . Fixed bug #49853 (Soap Client stream context header option ignored).
- (Dmitry)
+- pgsql
+ . Added pg_escape_literal() and pg_escape_identifier() (Yasuo)
- SPL
- . Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe)
- . Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
- FilesystemIterator's iterators are requested more than once without
- having had its dtor callback called in between). (Gustavo)
- . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence)
- . Fixed bug #61326 (ArrayObject comparison). (Gustavo)
-
-- SQLite3 extension:
- . Add createCollation() method. (Brad Dewar)
-
-- Session:
- . Fixed bug #60860 (session.save_handler=user without defined function core
- dumps). (Felipe)
- . Fixed bug #60634 (Segmentation fault when trying to die() in
- SessionHandler::write()). (Ilia)
-
-- Streams:
- . Fixed bug #61371 (stream_context_create() causes memory leaks on use
- streams_socket_create). (Gustavo)
- . Fixed bug #61253 (Wrappers opened with errors concurrency problem on ZTS).
- (Gustavo)
- . Fixed bug #61115 (stream related segfault on fatal error in
- php_stream_context_link). (Gustavo)
- . Fixed bug #60817 (stream_get_line() reads from stream even when there is
- already sufficient data buffered). stream_get_line() now behaves more like
- fgets(), as is documented. (Gustavo)
- . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not
- detected together with the last read). (Gustavo)
- . Fixed bug #60106 (stream_socket_server silently truncates long unix
- socket paths). (Ilia)
-
-- Tidy:
- . Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra)
-
-- XMLRPC:
- . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary
- variable). (Nikita Popov)
- . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic)
-
-- Zlib:
- . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic)
+ . Fix bug #60560 (SplFixedArray un-/serialize, getSize(), count() return 0,
+ keys are strings). (Adam)
-02 Feb 2012, PHP 5.3.10
+- Tokenizer:
+ . Fixed bug #60097 (token_get_all fails to lex nested heredoc). (Nikita Popov)
-- Core:
- . Fixed arbitrary remote code execution vulnerability reported by Stefan
- Esser, CVE-2012-0830. (Stas, Dmitry)
-
-10 Jan 2012, PHP 5.3.9
-
-- Core:
- . Added max_input_vars directive to prevent attacks based on hash collisions
- (CVE-2011-4885) (Dmitry).
- . Fixed bug #60205 (possible integer overflow in content_length). (Laruence)
- . Fixed bug #60139 (Anonymous functions create cycles not detected by the
- GC). (Dmitry)
- . Fixed bug #60138 (GC crash with referenced array in RecursiveArrayIterator)
- (Dmitry).
- . Fixed bug #60120 (proc_open's streams may hang with stdin/out/err when
- the data exceeds or is equal to 2048 bytes). (Pierre, Pascal Borreli)
- . Fixed bug #60099 (__halt_compiler() works in braced namespaces). (Felipe)
- . Fixed bug #60019 (Function time_nanosleep() is undefined on OS X). (Ilia)
- . Fixed bug #55874 (GCC does not provide __sync_fetch_and_add on some archs).
- (klightspeed at netspace dot net dot au)
- . Fixed bug #55798 (serialize followed by unserialize with numeric object
- prop. gives integer prop). (Gustavo)
- . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre)
- . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux
- parisc). (Felipe)
- . Fixed bug #55674 (fgetcsv & str_getcsv skip empty fields in some
- tab-separated records). (Laruence)
- . Fixed bug #55649 (Undefined function Bug()). (Laruence)
- . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre)
- . Fixed bug #55576 (Cannot conditionally move uploaded file without race
- condition). (Gustavo)
- . Fixed bug #55510: $_FILES 'name' missing first character after upload.
- (Arpad)
- . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence)
- . Fixed bug #55504 (Content-Type header is not parsed correctly on
- HTTP POST request). (Hannes)
- . Fixed bug #55475 (is_a() triggers autoloader, new optional 3rd argument to
- is_a and is_subclass_of). (alan_k)
- . Fixed bug #52461 (Incomplete doctype and missing xmlns).
- (virsacer at web dot de, Pierre)
- . Fixed bug #55366 (keys lost when using substr_replace an array). (Arpad)
- . Fixed bug #55273 (base64_decode() with strict rejects whitespace after
- pad). (Ilia)
- . Fixed bug #52624 (tempnam() by-pass open_basedir with nonnexistent
- directory). (Felipe)
- . Fixed bug #50982 (incorrect assumption of PAGE_SIZE size). (Dmitry)
- . Fixed invalid free in call_user_method() function. (Felipe)
- . Fixed bug #43200 (Interface implementation / inheritence not possible in
- abstract classes). (Felipe)
-
-
-- BCmath:
- . Fixed bug #60377 (bcscale related crashes on 64bits platforms). (shm)
-
-- Calendar:
- . Fixed bug #55797 (Integer overflow in SdnToGregorian leads to segfault (in
- optimized builds). (Gustavo)
-
-- cURL:
- . Fixed bug #60439 (curl_copy_handle segfault when used with
- CURLOPT_PROGRESSFUNCTION). (Pierrick)
- . Fixed bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed
- before calling curl_exec). (Hannes)
- . Fixed issues were curl_copy_handle() would sometimes lose copied
- preferences. (Hannes)
-
-- DateTime:
- . Fixed bug #60373 (Startup errors with log_errors on cause segfault).
- (Derick)
- . Fixed bug #60236 (TLA timezone dates are not converted properly from
- timestamp). (Derick)
- . Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with
- time zone type 2). (Derick)
- . Fixed bug #54851 (DateTime::createFromFormat() doesn't interpret "D").
- (Derick)
- . Fixed bug #53502 (strtotime with timezone memory leak). (Derick)
- . Fixed bug #52062 (large timestamps with DateTime::getTimestamp and
- DateTime::setTimestamp). (Derick)
- . Fixed bug #51994 (date_parse_from_format is parsing invalid date using 'yz'
- format). (Derick)
- . Fixed bug #52113 (Seg fault while creating (by unserialization)
- DatePeriod). (Derick)
- . Fixed bug #48476 (cloning extended DateTime class without calling
- parent::__constr crashed PHP). (Hannes)
-
-- EXIF:
- . Fixed bug #60150 (Integer overflow during the parsing of invalid exif
- header). (CVE-2011-4566) (Stas, flolechaud at gmail dot com)
+- Zip:
+ . Upgraded libzip to 0.10.1 (Anatoliy)
- Fileinfo:
- . Fixed bug #60094 (C++ comment fails in c89). (Laruence)
- . Fixed possible memory leak in finfo_open(). (Felipe)
- . Fixed memory leak when calling the Finfo constructor twice. (Felipe)
-
-- Filter:
- . Fixed Bug #55478 (FILTER_VALIDATE_EMAIL fails with internationalized
- domain name addresses containing >1 -). (Ilia)
-
-- FTP:
- . Fixed bug #60183 (out of sync ftp responses). (bram at ebskamp dot me,
- rasmus)
-
-- Gd:
- . Fixed bug #60160 (imagefill() doesn't work correctly
- for small images). (Florian)
-
-- Intl:
- . Fixed bug #60192 (SegFault when Collator not constructed
- properly). (Florian)
- . Fixed memory leak in several Intl locale functions. (Felipe)
-
-- Json:
- . Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects
- with numeric string properties). (Ilia, dchurch at sciencelogic dot com)
-
-- Mbstring:
- . Fixed possible crash in mb_ereg_search_init() using empty pattern. (Felipe)
-
-- MS SQL:
- . Fixed bug #60267 (Compile failure with freetds 0.91). (Felipe)
-
-- MySQL:
- . Fixed bug #55550 (mysql.trace_mode miscounts result sets). (Johannes)
-
-- MySQLi extension:
- . Fixed bug #55859 (mysqli->stat property access gives error). (Andrey)
- . Fixed bug #55582 (mysqli_num_rows() returns always 0 for unbuffered, when
- mysqlnd is used). (Andrey)
- . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields).
- (eran at zend dot com, Laruence)
-
-- mysqlnd
- . Fixed bug #55609 (mysqlnd cannot be built shared). (Johannes)
- . Fixed bug #55067 (MySQL doesn't support compression - wrong config option).
- (Andrey)
-
-- NSAPI SAPI:
- . Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403). (Uwe
- Schindler)
-
-- OpenSSL:
- . Fixed bug #60279 (Fixed NULL pointer dereference in
- stream_socket_enable_crypto, case when ssl_handle of session_stream is not
- initialized.) (shm)
- . Fix segfault with older versions of OpenSSL. (Scott)
-
-- Oracle Database extension (OCI8):
- . Fixed bug #59985 (show normal warning text for OCI_NO_DATA).
- (Chris Jones)
- . Increased maximum Oracle error message buffer length for new 11.2.0.3 size.
- (Chris Jones)
- . Improve internal initalization failure error messages. (Chris Jones)
-
-- PDO
- . Fixed bug #55776 (PDORow to session bug). (Johannes)
-
-- PDO Firebird:
- . Fixed bug #48877 ("bindValue" and "bindParam" do not work for PDO Firebird).
- (Mariuz)
- . Fixed bug #47415 (PDO_Firebird segfaults when passing lowercased column name to bindColumn).
- . Fixed bug #53280 (PDO_Firebird segfaults if query column count less than param count).
- (Mariuz)
-
-- PDO MySQL driver:
- . Fixed bug #60155 (pdo_mysql.default_socket ignored). (Johannes)
- . Fixed bug #55870 (PDO ignores all SSL parameters when used with mysql
- native driver). (Pierre)
- . Fixed bug #54158 (MYSQLND+PDO MySQL requires #define
- MYSQL_OPT_LOCAL_INFILE). (Andrey)
-
-- PDO OCI driver:
- . Fixed bug #55768 (PDO_OCI can't resume Oracle session after it's been
- killed). (mikhail dot v dot gavrilov at gmail dot com, Chris Jones, Tony)
-
-- Phar:
- . Fixed bug #60261 (NULL pointer dereference in phar). (Felipe)
- . Fixed bug #60164 (Stubs of a specific length break phar_open_from_fp
- scanning for __HALT_COMPILER). (Ralph Schindler)
- . Fixed bug #53872 (internal corruption of phar). (Hannes)
- . Fixed bug #52013 (Unable to decompress files in a compressed phar). (Hannes)
-
-- PHP-FPM SAPI:
- . Dropped restriction of not setting the same value multiple times, the last
- one holds. (giovanni at giacobbi dot net, fat)
- . Added .phar to default authorized extensions. (fat)
- . Fixed bug #60659 (FPM does not clear auth_user on request accept).
- (bonbons at linux-vserver dot org)
- . Fixed bug #60629 (memory corruption when web server closed the fcgi fd).
- (fat)
- . Enhance error log when the primary script can't be open. FR #60199. (fat)
- . Fixed bug #60179 (php_flag and php_value does not work properly). (fat)
- . Fixed bug #55577 (status.html does not install). (fat)
- . Fixed bug #55533 (The -d parameter doesn't work). (fat)
- . Fixed bug #55526 (Heartbeat causes a lot of unnecessary events). (fat)
- . Fixed bug #55486 (status show BIG processes number). (fat)
- . Enhanced security by limiting access to user defined extensions.
- FR #55181. (fat)
- . Added process.max to control the number of process FPM can fork. FR #55166.
- (fat)
- . Implemented FR #54577 (Enhanced status page with full status and details
- about each processes. Also provide a web page (status.html) for
- real-time FPM status. (fat)
- . Lowered default value for Process Manager. FR #54098. (fat)
- . Implemented FR #52569 (Add the "ondemand" process-manager
- to allow zero children). (fat)
- . Added partial syslog support (on error_log only). FR #52052. (fat)
-
-- Postgres:
- . Fixed bug #60244 (pg_fetch_* functions do not validate that row param
- is >0). (Ilia)
- . Added PGSQL_LIBPQ_VERSION/PGSQL_LIBPQ_VERSION_STR constants. (Yasuo)
-
-- Reflection:
- . Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)
-
-- Session:
- . Fixed bug #55267 (session_regenerate_id fails after header sent). (Hannes)
-
-- SimpleXML:
- . Reverted the SimpleXML->query() behaviour to returning empty arrays
- instead of false when no nodes are found as it was since 5.3.3
- (bug #48601). (chregu, rrichards)
-
-- SOAP
- . Fixed bug #54911 (Access to a undefined member in inherit SoapClient may
- cause Segmentation Fault). (Dmitry)
- . Fixed bug #48216 (PHP Fatal error: SOAP-ERROR: Parsing WSDL:
- Extra content at the end of the doc, when server uses chunked transfer
- encoding with spaces after chunk size). (Dmitry)
- . Fixed bug #44686 (SOAP-ERROR: Parsing WSDL with references). (Dmitry)
-
-- Sockets:
- . Fixed bug #60048 (sa_len a #define on IRIX). (china at thewrittenword dot
- com)
-
-- SPL:
- . Fixed bug #60082 (Crash in ArrayObject() when using recursive references).
- (Tony)
- . Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY).
- (jgotti at modedemploi dot fr, Hannes)
- . Fixed bug #54304 (RegexIterator::accept() doesn't work with scalar values).
- (Hannes)
-
-- Streams:
- . Fixed bug #60455 (stream_get_line misbehaves if EOF is not detected together
- with the last read). (Gustavo)
-
-- Tidy:
- . Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference).
- (Maksymilian Arciemowicz, Felipe)
-
-- XSL:
- . Added xsl.security_prefs ini option to define forbidden operations within
- XSLT stylesheets, default is not to enable write operations. This option
- won't be in 5.4, since there's a new method. Fixes Bug #54446. (Chregu,
- Nicolas Gregoire)
-
-23 Aug 2011, PHP 5.3.8
-
-- Core:
- . Fixed bug #55439 (crypt() returns only the salt for MD5). (Stas)
-
-- OpenSSL:
- . Reverted a change in timeout handling restoring PHP 5.3.6 behavior,
- as the new behavior caused mysqlnd SSL connections to hang (#55283).
- (Pierre, Andrey, Johannes)
-
-18 Aug 2011, PHP 5.3.7
-- Upgraded bundled SQLite to version 3.7.7.1. (Scott)
-- Upgraded bundled PCRE to version 8.12. (Scott)
-
-- Zend Engine:
- . Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even
- though the class has none). (Felipe)
- . Fixed bug #55007 (compiler fail after previous fail). (Felipe)
- . Fixed bug #54910 (Crash when calling call_user_func with unknown function
- name). (Dmitry)
- . Fixed bug #54804 (__halt_compiler and imported namespaces).
- (Pierrick, Felipe)
- . Fixed bug #54624 (class_alias and type hint). (Felipe)
- . Fixed bug #54585 (track_errors causes segfault). (Dmitry)
- . Fixed bug #54423 (classes from dl()'ed extensions are not destroyed).
- (Tony, Dmitry)
- . Fixed bug #54372 (Crash accessing global object itself returned from its
- __get() handle). (Dmitry)
- . Fixed bug #54367 (Use of closure causes problem in ArrayAccess). (Dmitry)
- . Fixed bug #54358 (Closure, use and reference). (Dmitry)
- . Fixed bug #54262 (Crash when assigning value to a dimension in a non-array).
- (Dmitry)
- . Fixed bug #54039 (use() of static variables in lambda functions can break
- staticness). (Dmitry)
-
-- Core
- . Updated crypt_blowfish to 1.2. ((CVE-2011-2483) (Solar Designer)
- . Removed warning when argument of is_a() or is_subclass_of() is not
- a known class. (Stas)
- . Fixed crash in error_log(). (Felipe) Reported by Mateusz Kocielski.
- . Added PHP_MANDIR constant telling where the manpages were installed into,
- and an --man-dir argument to php-config. (Hannes)
- . Fixed a crash inside dtor for error handling. (Ilia)
- . Fixed buffer overflow on overlog salt in crypt(). (Clément LECIGNE, Stas)
- . Implemented FR #54459 (Range function accuracy). (Adam)
-
- . Fixed bug #55399 (parse_url() incorrectly treats ':' as a valid path).
- (Ilia)
- . Fixed bug #55339 (Segfault with allow_call_time_pass_reference = Off).
- (Dmitry)
- . Fixed bug #55295 [NEW]: popen_ex on windows, fixed possible heap overflow
- (Pierre)
- . Fixed bug #55258 (Windows Version Detecting Error).
- ( xiaomao5 at live dot com, Pierre)
- . Fixed bug #55187 (readlink returns weird characters when false result).
- (Pierre)
- . Fixed bug #55082 (var_export() doesn't escape properties properly).
- (Gustavo)
- . Fixed bug #55014 (Compile failure due to improper use of ctime_r()). (Ilia)
- . Fixed bug #54939 (File path injection vulnerability in RFC1867 File upload
- filename). (Felipe) Reported by Krzysztof Kotowicz. (CVE-2011-2202)
- . Fixed bug #54935 php_win_err can lead to crash. (Pierre)
- . Fixed bug #54924 (assert.* is not being reset upon request shutdown). (Ilia)
- . Fixed bug #54895 (Fix compiling with older gcc version without need for
- membar_producer macro). (mhei at heimpold dot de)
- . Fixed bug #54866 (incorrect accounting for realpath_cache_size).
- (Dustin Ward)
- . Fixed bug #54723 (getimagesize() doesn't check the full ico signature).
- (Scott)
- . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt
- size). (Pierre, os at irj dot ru)
- . Fixed bug #54580 (get_browser() segmentation fault when browscap ini
- directive is set through php_admin_value). (Gustavo)
- . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry)
- . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry)
- . Fixed bug #54238 (use-after-free in substr_replace()). (Stas)
- (CVE-2011-1148)
- . Fixed bug #54204 (Can't set a value with a PATH section in php.ini).
- (Pierre)
- . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
- (tomas dot brastavicius at quantum dot lt, Pierrick)
- . Fixed bug #54137 (file_get_contents POST request sends additional line
- break). (maurice-php at mertinkat dot net, Ilia)
- . Fixed bug #53848 (fgetcsv() ignores spaces at beginnings of fields). (Ilia)
- . Alternative fix for bug #52550, as applied to the round() function (signed
- overflow), as the old fix impacted the algorithm for numbers with magnitude
- smaller than 0. (Gustavo)
- . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)
- (Ralph Schindler, Dmitry)
- . Fixed bug #52935 (call exit in user_error_handler cause stream relate
- core). (Gustavo)
- . Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). (Ilia)
- . Fixed bug #50816 (Using class constants in array definition fails).
- (Pierrick, Dmitry)
- . Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode
- filter). (slusarz at curecanti dot org)
- . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
- TMPDIR on Windows). (Pierre)
-
-- Apache2 Handler SAPI:
- . Fixed bug #54529 (SAPI crashes on apache_config.c:197).
- (hebergement at riastudio dot fr)
-
-- CLI SAPI:
- . Fixed bug #52496 (Zero exit code on option parsing failure). (Ilia)
-
-- cURL extension:
- . Added ini option curl.cainfo (support for custom cert db). (Pierre)
- . Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)
- . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and
- CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick)
-
-- DateTime extension:
- . Fixed bug where the DateTime object got changed while using date_diff().
- (Derick)
- . Fixed bug #54340 (DateTime::add() method bug). (Adam)
- . Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|'
- correctly). (Adam)
- . Fixed bug #54283 (new DatePeriod(NULL) causes crash). (Felipe)
- . Fixed bug #51819 (Case discrepancy in timezone names cause Uncaught
- exception and fatal error). (Hannes)
-
-- DBA extension:
- . Supress warning on non-existent file open with Berkeley DB 5.2. (Chris Jones)
- . Fixed bug #54242 (dba_insert returns true if key already exists). (Felipe)
-
-- Exif extesion:
- . Fixed bug #54121 (error message format string typo). (Ilia)
-
-- Fileinfo extension:
- . Fixed bug #54934 (Unresolved symbol strtoull in HP-UX 11.11). (Felipe)
-
-- Filter extension:
- . Added 3rd parameter to filter_var_array() and filter_input_array()
- functions that allows disabling addition of empty elements. (Ilia)
- . Fixed bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented). (Ilia)
-
-- Interbase extension:
- . Fixed bug #54269 (Short exception message buffer causes crash). (Felipe)
-
-- intl extension:
- . Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia)
- . Implemented FR #54540 (Allow loading of arbitrary resource bundles when
- fallback is disabled). (David Zuelke, Stas)
-
-- Imap extension:
- . Fixed bug #55313 (Number of retries not set when params specified).
- (kevin at kevinlocke dot name)
-
-- json extension:
- . Fixed bug #54484 (Empty string in json_decode doesn't reset
- json_last_error()). (Ilia)
-
-- LDAP extension:
- . Fixed bug #53339 (Fails to build when compilng with gcc 4.5 and DSO
- libraries). (Clint Byrum, Raphael)
-
-- libxml extension:
- . Fixed bug #54601 (Removing the doctype node segfaults). (Hannes)
- . Fixed bug #54440 (libxml extension ignores default context). (Gustavo)
-
-- mbstring extension:
- . Fixed bug #54494 (mb_substr() mishandles UTF-32LE and UCS-2LE). (Gustavo)
-
-- MCrypt extension:
- . Change E_ERROR to E_WARNING in mcrypt_create_iv when not enough data
- has been fetched (Windows). (Pierre)
- . Fixed bug #55169 (mcrypt_create_iv always fails to gather sufficient random
- data on Windows). (Pierre)
-
-- mysqlnd
- . Fixed crash when using more than 28,000 bound parameters. Workaround is to
- set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey)
- . Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator
- and range). (nihen at megabbs dot com, Andrey)
-
-- MySQLi extension:
- . Fixed bug #55283 (SSL options set by mysqli_ssl_set ignored for MySQLi
- persistent connections). (Andrey)
- . Fixed Bug #54221 (mysqli::get_warnings segfault when used in multi queries).
- (Andrey)
-
-- OpenSSL extension:
- . openssl_encrypt()/openssl_decrypt() truncated keys of variable length
- ciphers to the OpenSSL default for the algorithm. (Scott)
- . On blocking SSL sockets respect the timeout option where possible.
- (Scott)
- . Fixed bug #54992 (Stream not closed and error not returned when SSL
- CN_match fails). (Gustavo, laird_ngrps at dodo dot com dot au)
-
-- Oracle Database extension (OCI8):
- . Added oci_client_version() returning the runtime Oracle client library
- version. (Chris Jones)
-
-. PCRE extension:
- . Increased the backtrack limit from 100000 to 1000000 (Rasmus)
-
-- PDO extension:
- . Fixed bug #54929 (Parse error with single quote in sql comment). (Felipe)
- . Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE
- settings). (Ilia)
-
-- PDO DBlib driver:
- . Fixed bug #54329 (MSSql extension memory leak).
- (dotslashpok at gmail dot com)
- . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field).
- (mjh at hodginsmedia dot com, Felipe)
-
-- PDO ODBC driver:
- . Fixed data type usage in 64bit. (leocsilva at gmail dot com)
-
-- PDO MySQL driver:
- . Fixed bug #54644 (wrong pathes in php_pdo_mysql_int.h). (Tony, Johannes)
- . Fixed bug #53782 (foreach throws irrelevant exception). (Johannes, Andrey)
- . Implemented FR #48587 (MySQL PDO driver doesn't support SSL connections).
- (Rob)
-
-- PDO PostgreSQL driver:
- . Fixed bug #54318 (Non-portable grep option used in PDO pgsql
- configuration). (bwalton at artsci dot utoronto dot ca)
-
-- PDO Oracle driver:
- . Fixed bug #44989 (64bit Oracle RPMs still not supported by pdo-oci).
- (jbnance at tresgeek dot net)
-
-- Phar extension:
- . Fixed bug #54395 (Phar::mount() crashes when calling with wrong parameters).
- (Felipe)
-
-- PHP-FPM SAPI:
- . Implemented FR #54499 (FPM ping and status_path should handle HEAD request). (fat)
- . Implemented FR #54172 (Overriding the pid file location of php-fpm). (fat)
- . Fixed missing Expires and Cache-Control headers for ping and status pages.
- (fat)
- . Fixed memory leak. (fat) Reported and fixed by Giovanni Giacobbi.
- . Fixed wrong value of log_level when invoking fpm with -tt. (fat)
- . Added xml format to the status page. (fat)
- . Removed timestamp in logs written by children processes. (fat)
- . Fixed exit at FPM startup on fpm_resources_prepare() errors. (fat)
- . Added master rlimit_files and rlimit_core in the global configuration
- settings. (fat)
- . Removed pid in debug logs written by chrildren processes. (fat)
- . Added custom access log (also added per request %CPU and memory
- mesurement). (fat)
- . Added a real scoreboard and several improvements to the status page. (fat)
-
-- Reflection extension:
- . Fixed bug #54347 (reflection_extension does not lowercase module function
- name). (Felipe, laruence at yahoo dot com dot cn)
-
-- SOAP extension:
- . Fixed bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION
- contains itself). (Dmitry)
- . Fixed bug #54312 (soap_version logic bug). (tom at samplonius dot org)
-
-- Sockets extension:
- . Fixed stack buffer overflow in socket_connect(). (CVE-2011-1938)
- Found by Mateusz Kocielski, Marek Kroemeke and Filip Palian. (Felipe)
- . Changed socket_set_block() and socket_set_nonblock() so they emit warnings
- on error. (Gustavo)
- . Fixed bug #51958 (socket_accept() fails on IPv6 server sockets). (Gustavo)
-
-- SPL extension:
- . Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys
- on true). (Pierrick)
- . Fixed bug #54970 (SplFixedArray::setSize() isn't resizing). (Felipe)
- . Fixed bug #54609 (Certain implementation(s) of SplFixedArray cause hard
- crash). (Felipe)
- . Fixed bug #54384 (Dual iterators, GlobIterator, SplFileObject and
- SplTempFileObject crash when user-space classes don't call the paren
- constructor). (Gustavo)
- . Fixed bug #54292 (Wrong parameter causes crash in
- SplFileObject::__construct()). (Felipe)
- . Fixed bug #54291 (Crash iterating DirectoryIterator for dir name starting
- with \0). (Gustavo)
- . Fixed bug #54281 (Crash in non-initialized RecursiveIteratorIterator).
- (Felipe)
-
-- Streams:
- . Fixed bug #54946 (stream_get_contents infinite loop). (Hannes)
- . Fixed bug #54623 (Segfault when writing to a persistent socket after
- closing a copy of the socket). (Gustavo)
- . Fixed bug #54681 (addGlob() crashes on invalid flags). (Felipe)
-
-
-17 Mar 2011, PHP 5.3.6
-- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia)
-- Upgraded bundled PCRE to version 8.11. (Ilia)
-
-- Zend Engine:
- . Indirect reference to $this fails to resolve if direct $this is never used
- in method. (Scott)
- . Added options to debug backtrace functions. (Stas)
- . Fixed bug numerous crashes due to setlocale (crash on error, pcre, mysql
- etc.) on Windows in thread safe mode. (Pierre)
- . Fixed Bug #53971 (isset() and empty() produce apparently spurious runtime
- error). (Dmitry)
- . Fixed Bug #53958 (Closures can't 'use' shared variables by value and by
- reference). (Dmitry)
- . Fixed Bug #53629 (memory leak inside highlight_string()). (Hannes, Ilia)
- . Fixed Bug #51458 (Lack of error context with nested exceptions). (Stas)
- . Fixed Bug #47143 (Throwing an exception in a destructor causes a fatal
- error). (Stas)
- . Fixed bug #43512 (same parameter name can be used multiple times in
- method/function definition). (Felipe)
-
-- Core:
- . Added ability to connect to HTTPS sites through proxy with basic
- authentication using stream_context/http/header/Proxy-Authorization (Dmitry)
- . Changed default value of ini directive serialize_precision from 100 to 17.
- (Gustavo)
- . Fixed bug #54055 (buffer overrun with high values for precision ini
- setting). (Gustavo)
- . Fixed bug #53959 (reflection data for fgetcsv out-of-date). (Richard)
- . Fixed bug #53577 (Regression introduced in 5.3.4 in open_basedir with a
- trailing forward slash). (lekensteyn at gmail dot com, Pierre)
- . Fixed bug #53682 (Fix compile on the VAX). (Rasmus, jklos)
- . Fixed bug #48484 (array_product() always returns 0 for an empty array).
- (Ilia)
- . Fixed bug #48607 (fwrite() doesn't check reply from ftp server before
- exiting). (Ilia)
-
-
-- Calendar extension:
- . Fixed bug #53574 (Integer overflow in SdnToJulian, sometimes leading to
- segfault). (Gustavo)
-
-- DOM extension:
- . Implemented FR #39771 (Made DOMDocument::saveHTML accept an optional DOMNode
- like DOMDocument::saveXML). (Gustavo)
-
-- DateTime extension:
- . Fixed a bug in DateTime->modify() where absolute date/time statements had
- no effect. (Derick)
- . Fixed bug #53729 (DatePeriod fails to initialize recurrences on 64bit
- big-endian systems). (Derick, rein@basefarm.no)
- . Fixed bug #52808 (Segfault when specifying interval as two dates). (Stas)
- . Fixed bug #52738 (Can't use new properties in class extended from
- DateInterval). (Stas)
- . Fixed bug #52290 (setDate, setISODate, setTime works wrong when DateTime
- created from timestamp). (Stas)
- . Fixed bug #52063 (DateTime constructor's second argument doesn't have a
- null default value). (Gustavo, Stas)
-
-- Exif extension:
- . Fixed bug #54002 (crash on crafted tag, reported by Luca Carettoni).
- (Pierre) (CVE-2011-0708)
-
-- Filter extension:
- . Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number).
- (Ilia, Gustavo)
- . Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges).
- (Ilia)
- . Fixed bug #52209 (INPUT_ENV returns NULL for set variables (CLI)). (Ilia)
- . Fixed bug #47435 (FILTER_FLAG_NO_RES_RANGE don't work with ipv6).
- (Ilia, valli at icsurselva dot ch)
-
-- Fileinfo extension:
- . Fixed bug #54016 (finfo_file() Cannot determine filetype in archives).
- (Hannes)
-
-- Gettext
- . Fixed bug #53837 (_() crashes on Windows when no LANG or LANGUAGE
- environment variable are set). (Pierre)
-
-- IMAP extension:
- . Implemented FR #53812 (get MIME headers of the part of the email). (Stas)
- . Fixed bug #53377 (imap_mime_header_decode() doesn't ignore \t during long
- MIME header unfolding). (Adam)
-
-- Intl extension:
- . Fixed bug #53612 (Segmentation fault when using cloned several intl
- objects). (Gustavo)
- . Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values).
- (Felipe)
- . Implemented clone functionality for number, date & message formatters.
- (Stas).
-
-- JSON extension:
- . Fixed bug #53963 (Ensure error_code is always set during some failed
- decodings). (Scott)
-
-- mysqlnd
- . Fixed problem with always returning 0 as num_rows for unbuffered sets.
- (Andrey, Ulf)
-
-- MySQL Improved extension:
- . Added 'db' and 'catalog' keys to the field fetching functions (FR #39847).
- (Kalle)
- . Fixed buggy counting of affected rows when using the text protocol. The
- collected statistics were wrong when multi_query was used with mysqlnd
- (Andrey)
- . Fixed bug #53795 (Connect Error from MySqli (mysqlnd) when using SSL).
- (Kalle)
- . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA
- query). (Kalle, Andrey)
- . Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to
- call libmysql). (Kalle, tre-php-net at crushedhat dot com)
-
-- OpenSSL extension:
- . Fixed stream_socket_enable_crypto() not honoring the socket timeout in
- server mode. (Gustavo)
- . Fixed bug #54060 (Memory leaks when openssl_encrypt). (Pierre)
- . Fixed bug #54061 (Memory leaks when openssl_decrypt). (Pierre)
- . Fixed bug #53592 (stream_socket_enable_crypto() busy-waits in client mode).
- (Gustavo)
- . Implemented FR #53447 (Cannot disable SessionTicket extension for servers
- that do not support it) by adding a no_ticket SSL context option. (Adam,
- Tony)
-
-- PDO MySQL driver:
- . Fixed bug #53551 (PDOStatement execute segfaults for pdo_mysql driver).
- (Johannes)
- . Implemented FR #47802 (Support for setting character sets in DSN strings).
- (Kalle)
-
-- PDO Oracle driver:
- . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on
- ORACLE 10). (spatar at mail dot nnov dot ru)
-
-- PDO PostgreSQL driver:
- . Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down).
- (gyp at balabit dot hu)
-
-- Phar extension:
- . Fixed bug #54247 (format-string vulnerability on Phar). (Felipe)
- (CVE-2011-1153)
- . Fixed bug #53541 (format string bug in ext/phar).
- (crrodriguez at opensuse dot org, Ilia)
- . Fixed bug #53898 (PHAR reports invalid error message, when the directory
- does not exist). (Ilia)
-
-- PHP-FPM SAPI:
- . Enforce security in the fastcgi protocol parsing.
- (ef-lists at email dotde)
- . Fixed bug #53777 (php-fpm log format now match php_error log format). (fat)
- . Fixed bug #53527 (php-fpm --test doesn't set a valuable return value). (fat)
- . Fixed bug #53434 (php-fpm slowlog now also logs the original request). (fat)
-
-- Readline extension:
- . Fixed bug #53630 (Fixed parameter handling inside readline() function).
- (jo at feuersee dot de, Ilia)
-
-- Reflection extension:
- . Fixed bug #53915 (ReflectionClass::getConstant(s) emits fatal error on
- constants with self::). (Gustavo)
-
-- Shmop extension:
- . Fixed bug #54193 (Integer overflow in shmop_read()). (Felipe)
- Reported by Jose Carlos Norte <jose at eyeos dot org> (CVE-2011-1092)
-
-- SNMP extension:
- . Fixed bug #51336 (snmprealwalk (snmp v1) does not handle end of OID tree
- correctly). (Boris Lytochkin)
-
-- SOAP extension:
- . Fixed possible crash introduced by the NULL poisoning patch.
- (Mateusz Kocielski, Pierre)
-
-- SPL extension:
- . Fixed memory leak in DirectoryIterator::getExtension() and
- SplFileInfo::getExtension(). (Felipe)
- . Fixed bug #53914 (SPL assumes HAVE_GLOB is defined). (Chris Jones)
- . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0
- values). (Felipe)
- . Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance
- segfaults). (Felipe)
-
- . Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn)
-
-- SQLite3 extension:
- . Fixed memory leaked introduced by the NULL poisoning patch.
- (Mateusz Kocielski, Pierre)
- . Fixed memory leak on SQLite3Result and SQLite3Stmt when assigning to a
- reference. (Felipe)
- . Add SQlite3_Stmt::readonly() for checking if a statement is read only.
- (Scott)
- . Implemented FR #53466 (SQLite3Result::columnType() should return false after
- all of the rows have been fetched). (Scott)
-
-- Streams:
- . Fixed bug #54092 (Segmentation fault when using HTTP proxy with the FTP
- wrapper). (Gustavo)
- . Fixed bug #53913 (Streams functions assume HAVE_GLOB is defined). (Chris
- Jones)
- . Fixed bug #53903 (userspace stream stat callback does not separate the
- elements of the returned array before converting them). (Gustavo)
- . Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo)
-
-- Tokenizer Extension
- . Fixed bug #54089 (token_get_all() does not stop after __halt_compiler).
- (Nikita Popov, Ilia)
-
-- XSL extension:
- . Fixed memory leaked introduced by the NULL poisoning patch.
- (Mateusz Kocielski, Pierre)
-
-- Zip extension:
- . Added the filename into the return value of stream_get_meta_data(). (Hannes)
- . Fixed bug #53923 (Zip functions assume HAVE_GLOB is defined). (Adam)
- . Fixed bug #53893 (Wrong return value for ZipArchive::extractTo()). (Pierre)
- . Fixed bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive).
- (Stas, Maksymilian Arciemowicz). (CVE-2011-0421)
- . Fixed bug #53854 (Missing constants for compression type). (Richard, Adam)
- . Fixed bug #53603 (ZipArchive should quiet stat errors). (brad dot froehle at
- gmail dot com, Gustavo)
- . Fixed bug #53579 (stream_get_contents() segfaults on ziparchive streams).
- (Hannes)
- . Fixed bug #53568 (swapped memset arguments in struct initialization).
- (crrodriguez at opensuse dot org)
- . Fixed bug #53166 (Missing parameters in docs and reflection definition).
- (Richard)
- . Fixed bug #49072 (feof never returns true for damaged file in zip).
- (Gustavo, Richard Quadling)
-
-06 Jan 2011, PHP 5.3.5
-- Fixed Bug #53632 (infinite loop with x87 fpu). (CVE-2010-4645) (Scott,
- Rasmus)
-
-09 Dec 2010, PHP 5.3.4
-- Upgraded bundled Sqlite3 to version 3.7.3. (Ilia)
-- Upgraded bundled PCRE to version 8.10. (Ilia)
-
-- Security enhancements:
- . Fixed crash in zip extract method (possible CWE-170).
- (Maksymilian Arciemowicz, Pierre)
- . Paths with NULL in them (foo\0bar.txt) are now considered as invalid.
- (Rasmus)
- . Fixed a possible double free in imap extension (Identified by Mateusz
- Kocielski). (CVE-2010-4150). (Ilia)
- . Fixed NULL pointer dereference in ZipArchive::getArchiveComment.
- (CVE-2010-3709). (Maksymilian Arciemowicz)
- . Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre)
- . Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre)
- . Fixed symbolic resolution support when the target is a DFS share. (Pierre)
- . Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
- large amount of data) (CVE-2010-3710). (Adam)
-
-- General improvements:
- . Added stat support for zip stream. (Pierre)
- . Added follow_location (enabled by default) option for the http stream
- support. (Pierre)
- . Improved support for is_link and related functions on Windows. (Pierre)
- . Added a 3rd parameter to get_html_translation_table. It now takes a charset
- hint, like htmlentities et al. (Gustavo)
-
-- Implemented feature requests:
- . Implemented FR #52348, added new constant ZEND_MULTIBYTE to detect
- zend multibyte at runtime. (Kalle)
- . Implemented FR #52173, added functions pcntl_get_last_error() and
- pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)
- . Implemented symbolic links support for open_basedir checks. (Pierre)
- . Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre)
- . Implemented FR #50692, not uploaded files don't count towards
- max_file_uploads limit. As a side improvement, temporary files are not
- opened for empty uploads and, in debug mode, 0-length uploads. (Gustavo)
-
-- Improved MySQLnd:
- . Added new character sets to mysqlnd, which are available in MySQL 5.5
- (Andrey)
-
-- Improved PHP-FPM SAPI:
- . Added '-p/--prefix' to php-fpm to use a custom prefix and run multiple
- instances. (fat)
- . Added custom process title for FPM. (fat)
- . Added '-t/--test' to php-fpm to check and validate FPM conf file. (fat)
- . Added statistics about listening socket queue length for FPM.
- (andrei dot nigmatulin at gmail dot com, fat)
-
-- Core:
- . Fixed extract() to do not overwrite $GLOBALS and $this when using
- EXTR_OVERWRITE. (jorto at redhat dot com)
- . Fixed bug in the Windows implementation of dns_get_record, where the two
- last parameters wouldn't be filled unless the type were DNS_ANY (Gustavo).
- . Changed the $context parameter on copy() to actually have an effect. (Kalle)
- . Fixed htmlentities/htmlspecialchars accepting certain ill-formed UTF-8
- sequences. (Gustavo)
- . Fixed bug #53409 (sleep() returns NULL on Windows). (Pierre)
- . Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly). (Felipe)
- . Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits).
- (Ilia, daniel dot mueller at inexio dot net)
- . Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
- (Justin Martin)
- . Fixed bug #53226 (file_exists fails on big filenames). (Adam)
- . Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
- effect). (Gustavo)
- . Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
- type is application/x-www-form-urlencoded or is not registered with PHP).
- (gm at tlink dot de, Gustavo)
- . Fixed bug #53141 (autoload misbehaves if called from closing session).
- (ladislav at marek dot su)
- . Fixed bug #53021 (In html_entity_decode, failure to convert numeric entities
- with ENT_NOQUOTES and ISO-8859-1). Fixed and extended the fix of
- ENT_NOQUOTES in html_entity_decode that had introduced the bug (rev
- #185591) to other encodings. Additionaly, html_entity_decode() now doesn't
- decode &#34; if ENT_NOQUOTES is given. (Gustavo)
- . Fixed bug #52931 (strripos not overloaded with function overloading
- enabled). (Felipe)
- . Fixed bug #52772 (var_dump() doesn't check for the existence of
- get_class_name before calling it). (Kalle, Gustavo)
- . Fixed bug #52534 (var_export array with negative key). (Felipe)
- . Fixed bug #52327 (base64_decode() improper handling of leading padding in
- strict mode). (Ilia)
- . Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows).
- (a_jelly_doughnut at phpbb dot com, Pierre)
- . Fixed bug #50953 (socket will not connect to IPv4 address when the host has
- both IPv4 and IPv6 addresses, on Windows). (Gustavo, Pierre)
- . Fixed bug #50524 (proc_open on Windows does not respect cwd as it does on
- other platforms). (Pierre)
- . Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
- of reported malformed sequences). (CVE-2010-3870) (Gustavo)
- . Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8).
- (Gustavo)
- . Fixed bug #48831 (php -i has different output to php --ini). (Richard,
- Pierre)
- . Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
- (Felipe)
- . Fixed bug #47168 (printf of floating point variable prints maximum of 40
- decimal places). (Ilia)
- . Fixed bug #46587 (mt_rand() does not check that max is greater than min).
- (Ilia)
- . Fixed bug #29085 (bad default include_path on Windows). (Pierre)
- . Fixed bug #25927 (get_html_translation_table calls the ' &#39; instead of
- &#039;). (Gustavo)
-
-- Zend engine:
- . Reverted fix for bug #51176 (Static calling in non-static method behaves
- like $this->). (Felipe)
- . Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED.
- (Kalle)
- . Fixed NULL dereference in lex_scan on zend multibyte builds where the script
- had a flex incompatible encoding and there was no converter. (Gustavo)
- . Fixed covariance of return-by-ref constraints. (Etienne)
- . Fixed bug #53305 (E_NOTICE when defining a constant starts with
- __COMPILER_HALT_OFFSET__). (Felipe)
- . Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF).
- (Dmitry)
- . Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset
- can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry)
- . Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).
- (Fedora at famillecollet dot com)
- . Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
- (Felipe)
- . Fixed bug #52484 (__set() ignores setting properties with empty names).
- (Felipe)
- . Fixed bug #52361 (Throwing an exception in a destructor causes invalid
- catching). (Dmitry)
- . Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
-
-- Build issues:
- . Fixed bug #52436 (Compile error if systems do not have stdint.h)
- (Sriram Natarajan)
- . Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
- (Ulf, Tony)
- . Fixed bug #49215 (make fails on glob_wrapper). (Felipe)
-
-- Calendar extension:
- . Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE).
- (gpap at internet dot gr, Adam)
-
-- cURL extension:
- . Fixed bug #52828 (curl_setopt does not accept persistent streams).
- (Gustavo, Ilia)
- . Fixed bug #52827 (cURL leaks handle and causes assertion error
- (CURLOPT_STDERR)). (Gustavo)
- . Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). (Ilia)
- . Fixed bug #50410 (curl extension slows down PHP on Windows). (Pierre)
-
-- DateTime extension:
- . Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
- 1 million microsecs). (ped at 7gods dot org)
- . Fixed bug #52668 (Iterating over a dateperiod twice is broken). (Derick)
- . Fixed bug #52454 (Relative dates and getTimestamp increments by one day).
- (Derick)
- . Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick)
- . Added support for the ( and ) delimiters/separators to
- DateTime::createFromFormat(). (Derick)
-
-- DBA extension:
- . Added Berkeley DB 5.1 support to the DBA extension. (Oracle Corp.)
-
-- DOM extension:
- . Fixed bug #52656 (DOMCdataSection does not work with splitText). (Ilia)
-
-- Filter extension:
- . Fixed the filter extension accepting IPv4 octets with a leading 0 as that
- belongs to the unsupported "dotted octal" representation. (Gustavo)
- . Fixed bug #53236 (problems in the validation of IPv6 addresses with leading
- and trailing :: in the filter extension). (Gustavo)
- . Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
- addresses and ::). (Gustavo)
-
-- GD extension:
- . Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre)
-
-- GMP extension:
- . Fixed bug #52906 (gmp_mod returns negative result when non-negative is
- expected). (Stas)
- . Fixed bug #52849 (GNU MP invalid version match). (Adam)
-
-- Hash extension:
- . Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c).
- (Mike, Ilia)
-
-- Iconv extension:
- . Fixed bug #52941 (The 'iconv_mime_decode_headers' function is skipping
- headers). (Adam)
- . Fixed bug #52599 (iconv output handler outputs incorrect content type
- when flags are used). (Ilia)
- . Fixed bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded
- words). (Ilia)
-
-- Intl extension:
- . Fixed crashes on invalid parameters in intl extension. (CVE-2010-4409).
- (Stas, Maksymilian Arciemowicz)
- . Added support for formatting the timestamp stored in a DateTime object.
- (Stas)
- . Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
- range). (Stas)
-
-- Mbstring extension:
- . Fixed bug #53273 (mb_strcut() returns garbage with the excessive length
- parameter). (CVE-2010-4156) (Mateusz Kocielski, Pierre, Moriyoshi)
- . Fixed bug #52981 (Unicode casing table was out-of-date. Updated with
- UnicodeData-6.0.0d7.txt and included the source of the generator program
- with the distribution) (Gustavo).
- . Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header).
- (Adam)
-
-- MSSQL extension:
- . Fixed possible crash in mssql_fetch_batch(). (Kalle)
- . Fixed bug #52843 (Segfault when optional parameters are not passed in to
- mssql_connect). (Felipe)
-
-- MySQL extension:
- . Fixed bug #52636 (php_mysql_fetch_hash writes long value into int).
- (Kalle, rein at basefarm dot no)
-
-- MySQLi extension:
- . Fixed bug #52891 (Wrong data inserted with mysqli/mysqlnd when using
- mysqli_stmt_bind_param and value> PHP_INT_MAX). (Andrey)
- . Fixed bug #52686 (mysql_stmt_attr_[gs]et argument points to incorrect type).
- (rein at basefarm dot no)
- . Fixed bug #52654 (mysqli doesn't install headers with structures it uses).
- (Andrey)
- . Fixed bug #52433 (Call to undefined method mysqli::poll() - must be static).
- (Andrey)
- . Fixed bug #52417 (MySQLi build failure with mysqlnd on MacOS X). (Andrey)
- . Fixed bug #52413 (MySQLi/libmysql build failure on OS X, FreeBSD). (Andrey)
- . Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
- . Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT).
- (Andrey)
- . Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey)
- . Fixed bug #45921 (Can't initialize character set hebrew). (Andrey)
-
-- MySQLnd:
- . Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey)
-
-- ODBC extension:
- - Fixed bug #52512 (Broken error handling in odbc_execute).
- (mkoegler at auto dot tuwien dot ac dot at)
-
-- Openssl extension:
- . Fixed possible blocking behavior in openssl_random_pseudo_bytes on Windows.
- (Pierre)
- . Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe)
- . Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain
- used). (Felipe)
-
-- Oracle Database extension (OCI8):
- . Fixed bug #53284 (Valgrind warnings in oci_set_* functions) (Oracle Corp.)
- . Fixed bug #51610 (Using oci_connect causes PHP to take a long time to
- exit). Requires Oracle 11.2.0.2 client libraries (or Oracle bug fix
- 9891199) for this patch to have an effect. (Oracle Corp.)
-
-- PCNTL extension:
- . Fixed bug #52784 (Race condition when handling many concurrent signals).
- (nick dot telford at gmail dot com, Arnaud)
-
-- PCRE extension:
- . Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8). (Felipe)
- . Fixed bug #52732 (Docs say preg_match() returns FALSE on error, but it
- returns int(0)). (slugonamission at gmail dot com)
-
-- PHAR extension:
- . Fixed bug #50987 (unaligned memory access in phar.c).
- (geissert at debian dot org, Ilia)
-
-- PHP-FPM SAPI:
- . Fixed bug #53412 (segfault when using -y). (fat)
- . Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)
- . Fixed bug #52501 (libevent made FPM crashed when forking -- libevent has
- been removed). (fat)
- . Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they
- were not available). (fat)
- . Fixed bug #52693 (configuration file errors are not logged to stderr). (fat)
- . Fixed bug #52674 (FPM Status page returns inconsistent Content-Type
- headers). (fat)
- . Fixed bug #52498 (libevent was not only linked to php-fpm). (fat)
-
-- PDO:
- . Fixed bug #52699 (PDO bindValue writes long int 32bit enum).
- (rein at basefarm dot no)
- . Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe)
-
-- PDO DBLib driver:
- . Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
- (Felipe)
-
-- PDO Firebird driver:
- . Restored firebird support (VC9 builds only). (Pierre)
- . Fixed bug #53335 (pdo_firebird did not implement rowCount()).
- (preeves at ibphoenix dot com)
- . Fixed bug #53323 (pdo_firebird getAttribute() crash).
- (preeves at ibphoenix dot com)
-
-- PDO MySQL driver:
- . Fixed bug #52745 (Binding params doesn't work when selecting a date inside a
- CASE-WHEN). (Andrey)
-
-- PostgreSQL extension:
- . Fixed bug #47199 (pg_delete() fails on NULL). (ewgraf at gmail dot com)
-
-- Reflection extension:
- . Fixed ReflectionProperty::isDefault() giving a wrong result for properties
- obtained with ReflectionClass::getProperties(). (Gustavo)
-- Reflection extension:
- . Fixed bug #53366 (Reflection doesnt get dynamic property value from
- getProperty()). (Felipe)
- . Fixed bug #52854 (ReflectionClass::newInstanceArgs does not work for classes
- without constructors). (Johannes)
-
-- SOAP extension:
- . Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
- with SoapClient object). (Dmitry)
-
-- SPL extension:
- . Fixed bug #53362 (Segmentation fault when extending SplFixedArray). (Felipe)
- . Fixed bug #53279 (SplFileObject doesn't initialise default CSV escape
- character). (Adam)
- . Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
- . Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
- . Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe)
- . Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link
- and directory). (Pierre)
- . Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
- . Fixed bug #50579 (RegexIterator::REPLACE doesn't work). (Felipe)
-
-- SQLite3 extension:
- . Fixed bug #53463 (sqlite3 columnName() segfaults on bad column_number).
- (Felipe)
-
-- Streams:
- . Fixed forward stream seeking emulation in streams that don't support seeking
- in situations where the read operation gives back less data than requested
- and when there was data in the buffer before the emulation started. Also
- made more consistent its behavior -- should return failure every time less
- data than was requested was skipped. (Gustavo)
- . Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
- with streams opened with, inter alia, the 'xb' mode). (Gustavo)
- . Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
- underlying stream does not support seeking). (Gustavo)
- . Fixed bug #52944 (Invalid write on second and subsequent reads with an
- inflate filter fed invalid data). (Gustavo)
- . Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
- stream). (Gustavo)
-
-- WDDX extension:
- . Fixed bug #52468 (wddx_deserialize corrupts integer field value when left
- empty). (Felipe)
-
-- Zlib extension:
- . Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo)
-
-22 Jul 2010, PHP 5.3.3
-- Upgraded bundled sqlite to version 3.6.23.1. (Ilia)
-- Upgraded bundled PCRE to version 8.02. (Ilia)
-
-- Added support for JSON_NUMERIC_CHECK option in json_encode() that converts
- numeric strings to integers. (Ilia)
-- Added stream_set_read_buffer, allows to set the buffer for read operation.
- (Pierre)
-- Added stream filter support to mcrypt extension (ported from
- mcrypt_filter). (Stas)
-- Added full_special_chars filter to ext/filter. (Rasmus)
-- Added backlog socket context option for stream_socket_server(). (Mike)
-- Added fifth parameter to openssl_encrypt()/openssl_decrypt()
- (string $iv) to use non-NULL IV.
- Made implicit use of NULL IV a warning. (Sara)
-- Added openssl_cipher_iv_length(). (Sara)
-- Added FastCGI Process Manager (FPM) SAPI. (Tony)
-- Added recent Windows versions to php_uname and fix undefined windows
- version support. (Pierre)
-- Added Berkeley DB 5 support to the DBA extension. (Johannes, Chris Jones)
-- Added support for copy to/from array/file for pdo_pgsql extension.
- (Denis Gasparin, Ilia)
-- Added inTransaction() method to PDO, with specialized support for Postgres.
- (Ilia, Denis Gasparin)
-
-- Changed namespaced classes so that the ctor can only be named
- __construct now. (Stas)
-- Reset error state in PDO::beginTransaction() reset error state. (Ilia)
-
-- Implemented FR#51295 (SQLite3::busyTimeout not existing). (Mark)
-- Implemented FR#35638 (Adding udate to imap_fetch_overview results).
- (Charles_Duffy at dell dot com )
-- Rewrote var_export() to use smart_str rather than output buffering, prevents
- data disclosure if a fatal error occurs (CVE-2010-2531). (Scott)
-- Fixed possible buffer overflows in mysqlnd_list_fields, mysqlnd_change_user.
- (Andrey)
-- Fixed possible buffer overflows when handling error packets in mysqlnd.
- Reported by Stefan Esser. (Andrey)
-- Fixed very rare memory leak in mysqlnd, when binding thousands of columns.
- (Andrey)
-- Fixed a crash when calling an inexistent method of a class that inherits
- PDOStatement if instantiated directly instead of doing by the PDO methods.
- (Felipe)
-
-- Fixed memory leak on error in mcrypt_create_iv on Windows. (Pierre)
-- Fixed a possible crash because of recursive GC invocation. (Dmitry)
-- Fixed a possible resource destruction issues in shm_put_var().
- Reported by Stefan Esser. (Dmitry)
-- Fixed a possible information leak because of interruption of XOR operator.
- Reported by Stefan Esser. (Dmitry)
-- Fixed a possible memory corruption because of unexpected call-time pass by
- refernce and following memory clobbering through callbacks.
- Reported by Stefan Esser. (Dmitry)
-- Fixed a possible memory corruption in ArrayObject::uasort(). Reported by
- Stefan Esser. (Dmitry)
-- Fixed a possible memory corruption in parse_str(). Reported by Stefan Esser.
- (Dmitry)
-- Fixed a possible memory corruption in pack(). Reported by Stefan Esser.
- (Dmitry)
-- Fixed a possible memory corruption in substr_replace(). Reported by Stefan
- Esser. (Dmitry)
-- Fixed a possible memory corruption in addcslashes(). Reported by Stefan
- Esser. (Dmitry)
-- Fixed a possible stack exhaustion inside fnmatch(). Reported by Stefan
- Esser. (Ilia)
-- Fixed a possible dechunking filter buffer overflow. Reported by Stefan Esser.
- (Pierre)
-- Fixed a possible arbitrary memory access inside sqlite extension. Reported
- by Mateusz Kocielski. (Ilia)
-- Fixed string format validation inside phar extension. Reported by Stefan
- Esser. (Ilia)
-- Fixed handling of session variable serialization on certain prefix
- characters. Reported by Stefan Esser. (Ilia)
-- Fixed a NULL pointer dereference when processing invalid XML-RPC
- requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
-- Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)
-- Fixed SplObjectStorage unserialization problems (CVE-2010-2225). (Stas)
-- Fixed the mail.log ini setting when no filename was given. (Johannes)
-
-- Fixed bug #52317 (Segmentation fault when using mail() on a rhel 4.x (only 64
- bit)). (Adam)
-- Fixed bug #52262 (json_decode() shows no errors on invalid UTF-8).
- (Scott)
-- Fixed bug #52240 (hash_copy() does not copy the HMAC key, causes wrong
- results and PHP crashes). (Felipe)
-- Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
- (Johannes)
-- Fixed bug #52193 (converting closure to array yields empty array). (Felipe)
-- Fixed bug #52183 (Reflectionfunction reports invalid number of arguments for
- function aliases). (Felipe)
-- Fixed bug #52162 (custom request header variables with numbers are removed).
- (Sriram Natarajan)
-- Fixed bug #52160 (Invalid E_STRICT redefined constructor error). (Felipe)
-- Fixed bug #52138 (Constants are parsed into the ini file for section names).
- (Felipe)
-- Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array).
- (Andrey)
-- Fixed bug #52101 (dns_get_record() garbage in 'ipv6' field on Windows).
- (Pierre)
-- Fixed bug #52082 (character_set_client & character_set_connection reset after
- mysqli_change_user()). (Andrey)
-- Fixed bug #52043 (GD doesn't recognize latest libJPEG versions).
- (php at group dot apple dot com, Pierre)
-- Fixed bug #52041 (Memory leak when writing on uninitialized variable returned
- from function). (Dmitry)
-- Fixed bug #52060 (Memory leak when passing a closure to method_exists()).
- (Felipe)
-- Fixed bug #52057 (ReflectionClass fails on Closure class). (Felipe)
-- Fixed bug #52051 (handling of case sensitivity of old-style constructors
- changed in 5.3+). (Felipe)
-- Fixed bug #52037 (Concurrent builds fail in install-programs). (seanius at
- debian dot org, Kalle)
-- Fixed bug #52019 (make lcov doesn't support TESTS variable anymore). (Patrick)
-- Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command).
- (Ilia)
-- Fixed bug #52001 (Memory allocation problems after using variable variables).
- (Dmitry)
-- Fixed bug #51991 (spl_autoload and *nix support with namespace). (Felipe)
-- Fixed bug #51943 (AIX: Several files are out of ANSI spec). (Kalle,
- coreystup at gmail dot com)
-- Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with
- constant array). (Felipe)
-- Fixed bug #51905 (ReflectionParameter fails if default value is an array
- with an access to self::). (Felipe)
-- Fixed bug #51899 (Parse error in parse_ini_file() function when empy value
- followed by no newline). (Felipe)
-- Fixed bug #51844 (checkdnsrr does not support types other than MX). (Pierre)
-- Fixed bug #51827 (Bad warning when register_shutdown_function called with
- wrong num of parameters). (Felipe)
-- Fixed bug #51822 (Segfault with strange __destruct() for static class
- variables). (Dmitry)
-- Fixed bug #51791 (constant() aborts execution when fail to check undefined
- constant). (Felipe)
-- Fixed bug #51732 (Fileinfo __construct or open does not work with NULL).
- (Pierre)
-- Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)
-- Fixed bug #51723 (Content-length header is limited to 32bit integer with
- Apache2 on Windows). (Pierre)
-- Fixed bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable).
- (David Zuelke)
-- Fixed bug #51712 (Test mysql_mysqlnd_read_timeout_long must fail on MySQL4).
- (Andrey)
-- Fixed bug #51697 (Unsafe operations in free_storage of SPL iterators,
- causes crash during shutdown). (Etienne)
-- Fixed bug #51690 (Phar::setStub looks for case-sensitive
- __HALT_COMPILER()). (Ilia)
-- Fixed bug #51688 (ini per dir crashes when invalid document root are given).
- (Pierre)
-- Fixed bug #51671 (imagefill does not work correctly for small images).
- (Pierre)
-- Fixed bug #51670 (getColumnMeta causes segfault when re-executing query
- after calling nextRowset). (Pierrick)
-- Fixed bug #51647 Certificate file without private key (pk in another file)
- doesn't work. (Andrey)
-- Fixed bug #51629 (CURLOPT_FOLLOWLOCATION error message is misleading).
- (Pierre)
-- Fixed bug #51627 (script path not correctly evaluated).
- (russell dot tempero at rightnow dot com)
-- Fixed bug #51624 (Crash when calling mysqli_options()). (Felipe)
-- Fixed bug #51615 (PHP crash with wrong HTML in SimpleXML). (Felipe)
-- Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter).
- (Felipe)
-- Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string
- literal). (cbandy at jbandy dot com)
-- Fixed bug #51607 (pg_copy_from does not allow schema in the tablename
- argument). (cbandy at jbandy dot com)
-- Fixed bug #51605 (Mysqli - zombie links). (Andrey)
-- Fixed bug #51604 (newline in end of header is shown in start of message).
- (Daniel Egeberg)
-- Fixed bug #51590 (JSON_ERROR_UTF8 is undefined). (Felipe)
-- Fixed bug #51583 (Bus error due to wrong alignment in mysqlnd). (Rainer Jung)
-- Fixed bug #51582 (Don't assume UINT64_C it's ever available).
- (reidrac at usebox dot net, Pierre)
-- Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
- (Oracle Corp.)
-- Fixed bug #51562 (query timeout in mssql can not be changed per query).
- (ejsmont dot artur at gmail dot com)
-- Fixed bug #51552 (debug_backtrace() causes segmentation fault and/or memory
- issues). (Dmitry)
-- Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
-- Fixed bug #51435 (Missing ifdefs / logic bug in crypt code cause compile
- errors). (Felipe)
-- Fixed bug #51424 (crypt() function hangs after 3rd call). (Pierre, Sriram)
-- Fixed bug #51394 (Error line reported incorrectly if error handler throws an
- exception). (Stas)
-- Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains
- timezone). (Adam)
-- Fixed bug #51347 (mysqli_close / connection memory leak). (Andrey, Johannes)
-- Fixed bug #51338 (URL-Rewriter is still enabled if use_only_cookies is
- on). (Ilia, j dot jeising at gmail dot com)
-- Fixed bug #51291 (oci_error doesn't report last error when called two times)
- (Oracle Corp.)
-- Fixed bug #51276 (php_load_extension() is missing when HAVE_LIBDL is
- undefined). (Tony)
-- Fixed bug #51273 (Faultstring property does not exist when the faultstring is
- empty) (Ilia, dennis at transip dot nl)
-- Fixed bug #51269 (zlib.output_compression Overwrites Vary Header). (Adam)
-- Fixed bug #51257 (CURL_VERSION_LARGEFILE incorrectly used after libcurl
- version 7.10.1). (aron dot ujvari at microsec dot hu)
-- Fixed bug #51242 (Empty mysql.default_port does not default to 3306 anymore,
- but 0). (Adam)
-- Fixed bug #51237 (milter SAPI crash on startup). (igmar at palsenberg dot com)
-- Fixed bug #51213 (pdo_mssql is trimming value of the money column). (Ilia,
- alexr at oplot dot com)
-- Fixed bug #51190 (ftp_put() returns false when transfer was successful).
- (Ilia)
-- Fixed bug #51183 (ext/date/php_date.c fails to compile with Sun Studio).
- (Sriram Natarajan)
-- Fixed bug #51176 (Static calling in non-static method behaves like $this->).
- (Felipe)
-- Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when
- an invalid option is provided). (Ilia)
-- Fixed bug #51128 (imagefill() doesn't work with large images). (Pierre)
-- Fixed bug #51096 ('last day' and 'first day' are handled incorrectly when
- parsing date strings). (Derick)
-- Fixed bug #51086 (DBA DB4 doesn't work with Berkeley DB 4.8). (Chris Jones)
-- Fixed bug #51062 (DBA DB4 uses mismatched headers and libraries). (Chris
- Jones)
-- Fixed bug #51026 (mysqli_ssl_set not working). (Andrey)
-- Fixed bug #51023 (filter doesn't detect int overflows with GCC 4.4).
- (Raphael Geissert)
-- Fixed bug #50999 (unaligned memory access in dba_fetch()). (Felipe)
-- Fixed bug #50976 (Soap headers Authorization not allowed).
- (Brain France, Dmitry)
-- Fixed bug #50828 (DOMNotation is not subclass of DOMNode). (Rob)
-- Fixed bug #50810 (property_exists does not work for private). (Felipe)
-- Fixed bug #50762 (in WSDL mode Soap Header handler function only being called
- if defined in WSDL). (mephius at gmail dot com)
-- Fixed bug #50731 (Inconsistent namespaces sent to functions registered with
- spl_autoload_register). (Felipe)
-- Fixed bug #50563 (removing E_WARNING from parse_url). (ralph at smashlabs dot
- com, Pierre)
-- Fixed bug #50578 (incorrect shebang in phar.phar). (Fedora at FamilleCollet
- dot com)
-- Fixed bug #50392 (date_create_from_format enforces 6 digits for 'u' format
- character). (Derick)
-- Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not include
- file and line in trace). (Felipe)
-- Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe)
-- Fixed bug #50101 (name clash between global and local variable).
- (patch by yoarvi at gmail dot com)
-- Fixed bug #50055 (DateTime::sub() allows 'relative' time modifications).
- (Derick)
-- Fixed bug #51002 (fix possible memory corruption with very long names).
- (Pierre)
-- Fixed bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3).
- (Dmitry)
-- Fixed bug #49819 (STDOUT losing data with posix_isatty()). (Mike)
-- Fixed bug #49778 (DateInterval::format("%a") is always zero when an interval
- is created from an ISO string). (Derick)
-- Fixed bug #49700 (memory leaks in php_date.c if garbage collector is
- enabled). (Dmitry)
-- Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
-- Fixed bug #49490 (XPath namespace prefix conflict). (Rob)
-- Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
-- Fixed bug #49320 (PDO returns null when SQLite connection fails). (Felipe)
-- Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
-- Fixed bug #49216 (Reflection doesn't seem to work properly on MySqli).
- (Andrey)
-- Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
-- Fixed bug #49081 (DateTime::diff() mistake if start in January and interval >
- 28 days). (Derick)
-- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
- (yoarvi@gmail.com, Derick)
-- Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
-- Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3). (Felipe)
-- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
-- Fixed bug #48781 (Cyclical garbage collector memory leak). (Dmitry)
-- Fixed bug #48601 (xpath() returns FALSE for legitimate query). (Rob)
-- Fixed bug #48361 (SplFileInfo::getPathInfo should return the
- parent dir). (Etienne)
-- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
- (Adam, patch from hiroaki dot kawai at gmail dot com).
-- Fixed bug #47842 (sscanf() does not support 64-bit values). (Mike)
-- Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
-- Fixed bug #45808 (stream_socket_enable_crypto() blocks and eats CPU).
- (vincent at optilian dot com)
-- Fixed bug #43233 (sasl support for ldap on Windows). (Pierre)
-- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)
-- Fixed bug #33210 (getimagesize() fails to detect width/height on certain
- JPEGs). (Ilia)
-
-04 Mar 2010, PHP 5.3.2
-
-- Upgraded bundled sqlite to version 3.6.22. (Ilia)
-- Upgraded bundled libmagic to version 5.03. (Mikko)
-- Upgraded bundled PCRE to version 8.00. (Scott)
-- Updated timezone database to version 2010.3. (Derick)
-
-- Improved LCG entropy. (Rasmus, Samy Kamkar)
-- Improved crypt support for edge cases (UFC compatibility). (Solar Designer,
- Joey, Pierre)
-
-- Reverted fix for bug #49521 (PDO fetchObject sets values before calling
- constructor). (Pierrick, Johannes)
-
-- Changed gmp_strval() to use full range from 2 to 62, and -2 to -36. FR #50283
- (David Soria Parra)
-- Changed "post_max_size" php.ini directive to allow unlimited post size by
- setting it to 0. (Rasmus)
-- Changed tidyNode class to disallow manual node creation. (Pierrick)
-
-- Removed automatic file descriptor unlocking happening on shutdown and/or
- stream close (on all OSes). (Tony, Ilia)
-
-- Added libpng 1.4.0 support. (Pierre)
-- Added support for DISABLE_AUTHENTICATOR for imap_open. (Pierre)
-- Added missing host validation for HTTP urls inside FILTER_VALIDATE_URL.
- (Ilia)
-- Added stream_resolve_include_path(). (Mikko)
-- Added INTERNALDATE support to imap_append. (nick at mailtrust dot com)
-- Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)
-- Added realpath_cache_size() and realpath_cache_get() functions. (Stas)
-- Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. (Ilia)
-- Added protection for $_SESSION from interrupt corruption and improved
- "session.save_path" check. (Stas)
-- Added LIBXML_PARSEHUGE constant to override the maximum text size of a
- single text node when using libxml2.7.3+. (Kalle)
-- Added ReflectionMethod::setAccessible() for invoking non-public methods
- through the Reflection API. (Sebastian)
-- Added Collator::getSortKey for intl extension. (Stas)
-- Added support for CURLOPT_POSTREDIR. FR #49571. (Sriram Natarajan)
-- Added support for CURLOPT_CERTINFO. FR #49253.
- (Linus Nielsen Feltzing <linus@haxx.se>)
-- Added client-side server name indication support in openssl. (Arnaud)
-
-- Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
-
-- Fixed mysqlnd hang when queries exactly 16777214 bytes long are sent. (Andrey)
-- Fixed incorrect decoding of 5-byte BIT sequences in mysqlnd. (Andrey)
-- Fixed error_log() to be binary safe when using message_type 3. (Jani)
-- Fixed unnecessary invocation of setitimer when timeouts have been disabled.
- (Arvind Srinivasan)
-- Fixed memory leak in extension loading when an error occurs on Windows.
- (Pierre)
-- Fixed safe_mode validation inside tempnam() when the directory path does
- not end with a /). (Martin Jansen)
-- Fixed a possible open_basedir/safe_mode bypass in session extension
- identified by Grzegorz Stachowiak. (Ilia)
-- Fixed possible crash when a error/warning is raised during php startup.
- (Pierre)
-- Fixed possible bad behavior of rename on windows when used with symbolic
- links or invalid paths. (Pierre)
-- Fixed error output to stderr on Windows. (Pierre)
-- Fixed memory leaks in is_writable/readable/etc on Windows. (Pierre)
-- Fixed memory leaks in the ACL function on Windows. (Pierre)
-- Fixed memory leak in the realpath cache on Windows. (Pierre)
-- Fixed memory leak in zip_close. (Pierre)
-- Fixed crypt's blowfish sanity check of the "setting" string, to reject
- iteration counts encoded as 36 through 39. (Solar Designer, Joey, Pierre)
-
-- Fixed bug #51059 (crypt crashes when invalid salt are given). (Pierre)
-- Fixed bug #50952 (allow underscore _ in constants parsed in php.ini files).
- (Jani)
-- Fixed bug #50940 (Custom content-length set incorrectly in Apache SAPIs).
- (Brian France, Rasmus)
-- Fixed bug #50930 (Wrong date by php_date.c patch with ancient gcc/glibc
- versions). (Derick)
-- Fixed bug #50907 (X-PHP-Originating-Script adding two new lines in *NIX).
- (Ilia)
-- Fixed bug #50859 (build fails with openssl 1.0 due to md2 deprecation).
- (Ilia, hanno at hboeck dot de)
-- Fixed bug #50847 (strip_tags() removes all tags greater then 1023 bytes
- long). (Ilia)
-- Fixed bug #50829 (php.ini directive pdo_mysql.default_socket is ignored).
- (Ilia)
-- Fixed bug #50832 (HTTP fopen wrapper does not support passwordless HTTP
- authentication). (Jani)
-- Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams).
- (vnegrier at optilian dot com, Ilia)
-- Fixed bug #50761 (system.multiCall crashes in xmlrpc extension).
- (hiroaki dot kawai at gmail dot com, Ilia)
-- Fixed bug #50756 (CURLOPT_FTP_SKIP_PASV_IP does not exist). (Sriram)
-- Fixed bug #50732 (exec() adds single byte twice to $output array). (Ilia)
-- Fixed bug #50728 (All PDOExceptions hardcode 'code' property to 0).
- (Joey, Ilia)
-- Fixed bug #50723 (Bug in garbage collector causes crash). (Dmitry)
-- Fixed bug #50690 (putenv does not set ENV when the value is only one char).
- (Pierre)
-- Fixed bug #50680 (strtotime() does not support eighth ordinal number). (Ilia)
-- Fixed bug #50661 (DOMDocument::loadXML does not allow UTF-16). (Rob)
-- Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but
- returns false). (Ilia)
-- Fixed bug #50636 (MySQLi_Result sets values before calling constructor).
- (Pierrick)
-- Fixed bug #50632 (filter_input() does not return default value if the
- variable does not exist). (Ilia)
-- Fixed bug #50576 (XML_OPTION_SKIP_TAGSTART option has no effect). (Pierrick)
-- Fixed bug #50558 (Broken object model when extending tidy). (Pierrick)
-- Fixed bug #50540 (Crash while running ldap_next_reference test cases).
- (Sriram)
-- Fixed bug #50519 (segfault in garbage collection when using set_error_handler
- and DomDocument). (Dmitry)
-- Fixed bug #50508 (compile failure: Conflicting HEADER type declarations).
- (Jani)
-- Fixed bug #50496 (Use of <stdbool.h> is valid only in a c99 compilation
- environment. (Sriram)
-- Fixed bug #50464 (declare encoding doesn't work within an included file).
- (Felipe)
-- Fixed bug #50458 (PDO::FETCH_FUNC fails with Closures). (Felipe, Pierrick)
-- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes
- seg fault). (davbrown4 at yahoo dot com, Felipe)
-- Fixed bug #50416 (PROCEDURE db.myproc can't return a result set in the given
- context). (Andrey)
-- Fixed bug #50394 (Reference argument converted to value in __call). (Stas)
-- Fixed bug #50351 (performance regression handling objects, ten times slower
- in 5.3 than in 5.2). (Dmitry)
-- Fixed bug #50392 (date_create_from_format() enforces 6 digits for 'u'
- format character). (Ilia)
-- Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
- (Jani)
-- Fixed bug #50340 (php.ini parser does not allow spaces in ini keys). (Jani)
-- Fixed bug #50334 (crypt ignores sha512 prefix). (Pierre)
-- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
- (Ilia, Pierrick)
-- Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).
- (Felipe)
-- Fixed bug #50282 (xmlrpc_encode_request() changes object into array in
- calling function). (Felipe)
-- Fixed bug #50267 (get_browser(null) does not use HTTP_USER_AGENT). (Jani)
-- Fixed bug #50266 (conflicting types for llabs). (Jani)
-- Fixed bug #50261 (Crash When Calling Parent Constructor with
- call_user_func()). (Dmitry)
-- Fixed bug #50255 (isset() and empty() silently casts array to object).
- (Felipe)
-- Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't used
- if it is empty). (foutrelis at gmail dot com, Ilia)
-- Fixed bug #50231 (Socket path passed using --with-mysql-sock is ignored when
- mysqlnd is enabled). (Jani)
-- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
- (Pierrick)
-- Fixed bug #50212 (crash by ldap_get_option() with LDAP_OPT_NETWORK_TIMEOUT).
- (Ilia, shigeru_kitazaki at cybozu dot co dot jp)
-- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
- (tcallawa at redhat dot com)
-- Fixed bug #50207 (segmentation fault when concatenating very large strings on
- 64bit linux). (Ilia)
-- Fixed bug #50196 (stream_copy_to_stream() produces warning when source is
- not file). (Stas)
-- Fixed bug #50195 (pg_copy_to() fails when table name contains schema. (Ilia)
-- Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
- when there is no error). (Jani)
-- Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
-- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
- non-existant file). (Dmitry)
-- Fixed bug #50162 (Memory leak when fetching timestamp column from Oracle
- database). (Felipe)
-- Fixed bug #50159 (wrong working directory in symlinked files). (Dmitry)
-- Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
- containing = or ?). (Pierrick)
-- Fixed bug #50152 (ReflectionClass::hasProperty behaves like isset() not
- property_exists). (Felipe)
-- Fixed bug #50146 (property_exists: Closure object cannot have properties).
- (Felipe)
-- Fixed bug #50145 (crash while running bug35634.phpt). (Felipe)
-- Fixed bug #50140 (With default compilation option, php symbols are unresolved
- for nsapi). (Uwe Schindler)
-- Fixed bug #50087 (NSAPI performance improvements). (Uwe Schindler)
-- Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
-- Fixed bug #50023 (pdo_mysql doesn't use PHP_MYSQL_UNIX_SOCK_ADDR). (Ilia)
-- Fixed bug #50005 (Throwing through Reflection modified Exception object
- makes segmentation fault). (Felipe)
-- Fixed bug #49990 (SNMP3 warning message about security level printed twice).
- (Jani)
-- Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted
- transaction). (ben dot pineau at gmail dot com, Ilia, Matteo)
-- Fixed bug #49938 (Phar::isBuffering() returns inverted value). (Greg)
-- Fixed bug #49936 (crash with ftp stream in php_stream_context_get_option()).
- (Pierrick)
-- Fixed bug #49921 (Curl post upload functions changed). (Ilia)
-- Fixed bug #49866 (Making reference on string offsets crashes PHP). (Dmitry)
-- Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
- sjoerd at php dot net)
-- Fixed bug #49851, #50451 (http wrapper breaks on 1024 char long headers).
- (Ilia)
-- Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
- (Ilia, wmeler at wp-sa dot pl)
-- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
- property in base class). (Felipe)
-- Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
- ini variables). (Jani)
-- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
-- Fixed bug #49647 (DOMUserData does not exist). (Rob)
-- Fixed bug #49600 (imageTTFText text shifted right). (Takeshi Abe)
-- Fixed bug #49585 (date_format buffer not long enough for >4 digit years).
- (Derick, Adam)
-- Fixed bug #49560 (oci8: using LOBs causes slow PHP shutdown). (Oracle Corp.)
-- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
- (Pierrick)
-- Fixed bug #49472 (Constants defined in Interfaces can be overridden).
- (Felipe)
-- Fixed bug #49463 (setAttributeNS fails setting default namespace). (Rob)
-- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
-- Fixed bug #49224 (Compile error due to old DNS functions on AIX systems).
- (Scott)
-- Fixed bug #49174 (crash when extending PDOStatement and trying to set
- queryString property). (Felipe)
-- Fixed bug #48811 (Directives in PATH section do not get applied to
- subdirectories). (Patch by: ct at swin dot edu dot au)
-- Fixed bug #48590 (SoapClient does not honor max_redirects). (Sriram)
-- Fixed bug #48190 (Content-type parameter "boundary" is not case-insensitive
- in HTTP uploads). (Ilia)
-- Fixed bug #47848 (importNode doesn't preserve attribute namespaces). (Rob)
-- Fixed bug #47409 (extract() problem with array containing word "this").
- (Ilia, chrisstocktonaz at gmail dot com)
-- Fixed bug #47281 ($php_errormsg is limited in size of characters)
- (Oracle Corp.)
-- Fixed bug #46478 (htmlentities() uses obsolete mapping table for character
- entity references). (Moriyoshi)
-- Fixed bug #45599 (strip_tags() truncates rest of string with invalid
- attribute). (Ilia, hradtke)
-- Fixed bug #45120 (PDOStatement->execute() returns true then false for same
- statement). (Pierrick)
-- Fixed bug #44827 (define() allows :: in constant names). (Ilia)
-- Fixed bug #44098 (imap_utf8() returns only capital letters).
- (steffen at dislabs dot de, Pierre)
-- Fixed bug #34852 (Failure in odbc_exec() using oracle-supplied odbc
- driver). (tim dot tassonis at trivadis dot com)
-
-19 Nov 2009, PHP 5.3.1
-- Upgraded bundled sqlite to version 3.6.19. (Scott)
-- Updated timezone database to version 2009.17 (2009q). (Derick)
-
-- Changed ini file directives [PATH=](on Win32) and [HOST=](on all) to be case
- insensitive. (garretts)
-
-- Restored shebang line check to CGI sapi (not checked by scanner anymore).
- (Jani)
-
-- Added "max_file_uploads" INI directive, which can be set to limit the
- number of file uploads per-request to 20 by default, to prevent possible
- DOS via temporary file exhaustion. (Ilia)
-- Added missing sanity checks around exif processing. (Ilia)
-- Added error constant when json_encode() detects an invalid UTF-8 sequence.
- (Scott)
-- Added support for ACL on Windows for thread safe SAPI (Apache2 for example)
- and fix its support on NTS. (Pierre)
-
-- Improved symbolic, mounted volume and junctions support for realpath on
- Windows. (Pierre)
-- Improved readlink on Windows, suppress \??\ and use the drive syntax only.
- (Pierre)
-- Improved dns_get_record() AAAA support on windows. Always available when
- IPv6 is support is installed, format is now the same than on unix. (Pierre)
-- Improved the DNS functions on OSX to use newer APIs, also use Bind 9 API
- where available on other platforms. (Scott)
-- Improved shared extension loading on OSX to use the standard Unix dlopen()
- API. (Scott)
-
-- Fixed crash in com_print_typeinfo when an invalid typelib is given. (Pierre)
-- Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak.
- (Rasmus)
-- Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz
- Stachowiak. (Rasmus)
-- Fixed certificate validation inside php_openssl_apply_verification_policy
- (Ryan Sleevi, Ilia)
-- Fixed crash in SQLiteDatabase::ArrayQuery() and SQLiteDatabase::SingleQuery()
- when calling using Reflection. (Felipe)
-- Fixed crash when instantiating PDORow and PDOStatement through Reflection.
- (Felipe)
-- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
-- Fixed scandir/readdir when used mounted points on Windows. (Pierre)
-- Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
-- Fixed leak on error in popen/exec (and related functions) on Windows.
- (Pierre)
-- Fixed possible bad caching of symlinked directories in the realpath cache
- on Windows. (Pierre)
-- Fixed atime and mtime in stat related functions on Windows. (Pierre)
-- Fixed spl_autoload_unregister/spl_autoload_functions wrt. Closures and
- Functors. (Christian Seiler)
-- Fixed open_basedir circumvention for "mail.log" ini directive.
- (Maksymilian Arciemowicz, Stas)
-- Fixed signature generation/validation for zip archives in ext/phar. (Greg)
-- Fixed memory leak in stream_is_local(). (Felipe, Tony)
-- Fixed BC break in mime_content_type(), removes the content encoding. (Scott)
-
-- Fixed PECL bug #16842 (oci_error return false when NO_DATA_FOUND is raised).
- (Chris Jones)
-
-- Fixed bug #50063 (safe_mode_include_dir fails). (Johannes, christian at
- elmerot dot se)
-- Fixed bug #50052 (Different Hashes on Windows and Linux on wrong Salt size).
- (Pierre)
-- Fixed bug #49986 (Missing ICU DLLs on windows package). (Pierre)
-- Fixed bug #49910 (no support for ././@LongLink for long filenames in phar
- tar support). (Greg)
-- Fixed bug #49908 (throwing exception in __autoload crashes when interface
- is not defined). (Felipe)
-- Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given
- output lines >4095 bytes). (Ilia)
-- Fixed bug #49809 (time_sleep_until() is not available on OpenSolaris). (Jani)
-- Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded
- applications). (Ilia, Florian Anderiasch)
-- Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes).
- (Sriram Natarajan)
-- Fixed bug #49732 (crashes when using fileinfo when timestamp conversion
- fails). (Pierre)
-- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus)
-- Fixed bug #49630 (imap_listscan function missing). (Felipe)
-- Fixed bug #49572 (use of C++ style comments causes build failure).
- (Sriram Natarajan)
-- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE
- cannot be set"). (Felipe)
-- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
- fclose). (Ilia)
-- Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters).
- (Ilia)
-- Fixed bug #49447 (php engine need to correctly check for socket API
- return status on windows). (Sriram Natarajan)
-- Fixed bug #49391 (ldap.c utilizing deprecated ldap_modify_s). (Ilia)
-- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre)
-- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
- (Ilia, code-it at mail dot ru)
-- Fixed bug #49306 (inside pdo_mysql default socket settings are ignored).
- (Ilia)
-- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
- (Jani)
-- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
-- Fixed bug #49269 (Ternary operator fails on Iterator object when used inside
- foreach declaration). (Etienne, Dmitry)
-- Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
-- Fixed bug #49223 (Inconsistency using get_defined_constants). (Garrett)
-- Fixed bug #49193 (gdJpegGetVersionString() inside gd_compact identifies
- wrong type in declaration). (Ilia)
-- Fixed bug #49183 (dns_get_record does not return NAPTR records). (Pierre)
-- Fixed bug #49144 (Import of schema from different host transmits original
- authentication details). (Dmitry)
-- Fixed bug #49142 (crash when exception thrown from __tostring()).
- (David Soria Parra)
-- Fixed bug #49132 (posix_times returns false without error).
- (phpbugs at gunnu dot us)
-- Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
-- Fixed bug #49122 (undefined reference to mysqlnd_stmt_next_result on compile
- with --with-mysqli and MySQL 6.0). (Jani)
-- Fixed bug #49108 (2nd scan_dir produces segfault). (Felipe)
-- Fixed bug #49098 (mysqli segfault on error). (Rasmus)
-- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
-- Fixed bug #49092 (ReflectionFunction fails to work with functions in fully
- qualified namespaces). (Kalle, Jani)
-- Fixed bug #49074 (private class static fields can be modified by using
- reflection). (Jani)
-- Fixed bug #49072 (feof never returns true for damaged file in zip). (Pierre)
-- Fixed bug #49065 ("disable_functions" php.ini option does not work on
- Zend extensions). (Stas)
-- Fixed bug #49064 (--enable-session=shared does not work: undefined symbol:
- php_url_scanner_reset_vars). (Jani)
-- Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII
- strings as option keys). (Jani)
-- Fixed bug #49052 (context option headers freed too early when using
- --with-curlwrappers). (Jani)
-- Fixed bug #49047 (The function touch() fails on directories on Windows).
- (Pierre)
-- Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference).
- (Jani)
-- Fixed bug #49027 (mysqli_options() doesn't work when using mysqlnd). (Andrey)
-- Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
- restrictions). (Ilia)
-- Fixed bug #49020 (phar misinterprets ustar long filename standard).
- (Greg)
-- Fixed bug #49018 (phar tar stores long filenames wit prefix/name reversed).
- (Greg)
-- Fixed bug #49014 (dechunked filter broken when serving more than 8192 bytes
- in a chunk). (andreas dot streichardt at globalpark dot com, Ilia)
-- Fixed bug #49012 (phar tar signature algorithm reports as Unknown (0) in
- getSignature() call). (Greg)
-- Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes
- when including files from function). (Stas)
-- Fixed bug #48994 (zlib.output_compression does not output HTTP headers when
- set to a string value). (Jani)
-- Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
-- Fixed bug #48962 (cURL does not upload files with specified filename).
- (Ilia)
-- Fixed bug #48929 (Double \r\n after HTTP headers when "header" context
- option is an array). (David Zülke)
-- Fixed bug #48913 (Too long error code strings in pdo_odbc driver).
- (naf at altlinux dot ru, Felipe)
-- Fixed bug #48912 (Namespace causes unexpected strict behaviour with
- extract()). (Dmitry)
-- Fixed bug #48909 (Segmentation fault in mysqli_stmt_execute()). (Andrey)
-- Fixed bug #48899 (is_callable returns true even if method does not exist in
- parent class). (Felipe)
-- Fixed bug #48893 (Problems compiling with Curl). (Felipe)
-- Fixed bug #48880 (Random Appearing open_basedir problem). (Rasmus, Gwynne)
-- Fixed bug #48872 (string.c: errors: duplicate case values). (Kalle)
-- Fixed bug #48854 (array_merge_recursive modifies arrays after first one).
- (Felipe)
-- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
-- Fixed bug #48802 (printf() returns incorrect outputted length). (Jani)
-- Fixed bug #48791 (open office files always reported as corrupted). (Greg)
-- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked
- directories). (Ilia)
-- Fixed bug #48783 (make install will fail saying phar file exists). (Greg)
-- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
- (Sriram Natarajan)
-- Fixed bug #48771 (rename() between volumes fails and reports no error on
- Windows). (Pierre)
-- Fixed bug #48768 (parse_ini_*() crash with INI_SCANNER_RAW). (Jani)
-- Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at
- gmail dot com, Pierre)
-- Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
-- Fixed bug #48757 (ReflectionFunction::invoke() parameter issues). (Kalle)
-- Fixed bug #48754 (mysql_close() crash php when no handle specified).
- (Johannes, Andrey)
-- Fixed bug #48752 (Crash during date parsing with invalid date). (Pierre)
-- Fixed bug #48746 (Unable to browse directories within Junction Points).
- (Pierre, Kanwaljeet Singla)
-- Fixed bug #48745 (mysqlnd: mysql_num_fields returns wrong column count for
- mysql_list_fields). (Andrey)
-- Fixed bug #48740 (PHAR install fails when INSTALL_ROOT is not the final
- install location). (james dot cohen at digitalwindow dot com, Greg)
-- Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
- files that have been opened with r+). (Ilia)
-- Fixed bug #48719 (parse_ini_*(): scanner_mode parameter is not checked for
- sanity). (Jani)
-- Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain
- components). (Ilia)
-- Fixed bug #48681 (openssl signature verification for tar archives broken).
- (Greg)
-- Fixed bug #48660 (parse_ini_*(): dollar sign as last character of value
- fails). (Jani)
-- Fixed bug #48645 (mb_convert_encoding() doesn't understand hexadecimal
- html-entities). (Moriyoshi)
-- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
- --with-curlwrappers). (Jani)
-- Fixed bug #48608 (Invalid libreadline version not detected during configure).
- (Jani)
-- Fixed bug #48400 (imap crashes when closing stream opened with
- OP_PROTOTYPE flag). (Jani)
-- Fixed bug #48377 (error message unclear on converting phar with existing
- file). (Greg)
-- Fixed bug #48247 (Infinite loop and possible crash during startup with
- errors when errors are logged). (Jani)
-- Fixed bug #48198 error: 'MYSQLND_LLU_SPEC' undeclared. Cause for #48780 and
- #46952 - both fixed too. (Andrey)
-- Fixed bug #48189 (ibase_execute error in return param). (Kalle)
-- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
- (Sriram Natarajan)
-- Fixed bug #48116 (Fixed build with Openssl 1.0). (Pierre,
- Al dot Smith at aeschi dot ch dot eu dot org)
-- Fixed bug #48057 (Only the date fields of the first row are fetched, others
- are empty). (info at programmiernutte dot net)
-- Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
- correctly). (Herman Radtke)
-- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
-- Fixed bug #47273 (Encoding bug in SoapServer->fault). (Dmitry)
-- Fixed bug #46682 (touch() afield returns different values on windows).
- (Pierre)
-- Fixed bug #46614 (Extended MySQLi class gives incorrect empty() result).
- (Andrey)
-- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
- (Uwe Schindler)
-- Fixed bug #45905 (imagefilledrectangle() clipping error).
- (markril at hotmail dot com, Pierre)
-- Fixed bug #45554 (Inconsistent behavior of the u format char). (Derick)
-- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
-- Fixed bug #44683 (popen crashes when an invalid mode is passed). (Pierre)
-- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used
- in fopen). (Jani)
-- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
- com, Kalle)
-- Fixed bug #40013 (php_uname() does not return nodename on Netware (Guenter
- Knauf)
-- Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo).
- (Kalle, Rick Yorgason)
-- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
-- Fixed bug #27051 (Impersonation with FastCGI does not exec process as
- impersonated user). (Pierre)
-
-
-30 Jun 2009, PHP 5.3.0
-- Upgraded bundled PCRE to version 7.9. (Nuno)
-- Upgraded bundled sqlite to version 3.6.15. (Scott)
-
-- Moved extensions to PECL (Derick, Lukas, Pierre, Scott):
- . ext/dbase
- . ext/fbsql
- . ext/fdf
- . ext/ncurses
- . ext/mhash (BC layer is now entirely within ext/hash)
- . ext/ming
- . ext/msql
- . ext/sybase (not maintained anymore, sybase_ct has to be used instead)
-
-- Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
-- Removed zend.ze1_compatibility_mode. (Dmitry)
-- Removed all zend_extension_* php.ini directives. Zend extensions are now
- always loaded using zend_extension directive. (Derick)
-- Removed special treatment of "/tmp" in sessions for open_basedir.
- Note: This undocumented behaviour was introduced in 5.2.2. (Alexey)
-- Removed shebang line check from CGI sapi (checked by scanner). (Dmitry)
-
-- Changed PCRE, Reflection and SPL extensions to be always enabled. (Marcus)
-- Changed md5() to use improved implementation. (Solar Designer, Dmitry)
-- Changed HTTP stream wrapper to accept any code between and including
- 200 to 399 as successful. (Mike, Noah Fontes)
-- Changed __call() to be invoked on private/protected method access, similar to
- properties and __get(). (Andrei)
-- Changed dl() to be disabled by default. Enabled only when explicitly
- registered by the SAPI. Currently enabled with cli, cgi and embed SAPIs.
- (Dmitry)
-- Changed opendir(), dir() and scandir() to use default context when no context
- argument is passed. (Sara)
-- Changed open_basedir to allow tightening in runtime contexts. (Sara)
-- Changed PHP/Zend extensions to use flexible build IDs. (Stas)
-- Changed error level E_ERROR into E_WARNING in Soap extension methods
- parameter validation. (Felipe)
-- Changed openssl info to show the shared library version number. (Scott)
-- Changed floating point behaviour to consistently use double precision on all
- platforms and with all compilers. (Christian Seiler)
-- Changed round() to act more intuitively when rounding to a certain precision
- and round very large and very small exponents correctly. (Christian Seiler)
-- Changed session_start() to return false when session startup fails. (Jani)
-- Changed property_exists() to check the existence of a property independent of
- accessibility (like method_exists()). (Felipe)
-- Changed array_reduce() to allow mixed $initial (Christian Seiler)
-
-- Improved PHP syntax and semantics:
- . Added lambda functions and closures. (Christian Seiler, Dmitry)
- . Added "jump label" operator (limited "goto"). (Dmitry, Sara)
- . Added NOWDOC syntax. (Gwynne Raskind, Stas, Dmitry)
- . Added HEREDOC syntax with double quotes. (Lars Strojny, Felipe)
- . Added support for using static HEREDOCs to initialize static variables and
- class members or constants. (Matt)
- . Improved syntax highlighting and consistency for variables in double-quoted
- strings and literal text in HEREDOCs and backticks. (Matt)
- . Added "?:" operator. (Marcus)
- . Added support for namespaces. (Dmitry, Stas, Gregory, Marcus)
- . Added support for Late Static Binding. (Dmitry, Etienne Kneuss)
- . Added support for __callStatic() magic method. (Sara)
- . Added forward_static_call(_array) to complete LSB. (Mike Lively)
- . Added support for dynamic access of static members using $foo::myFunc().
- (Etienne Kneuss)
- . Improved checks for callbacks. (Marcus)
- . Added __DIR__ constant. (Lars Strojny)
- . Added new error modes E_USER_DEPRECATED and E_DEPRECATED.
- E_DEPRECATED is used to inform about stuff being scheduled for removal
- in future PHP versions. (Lars Strojny, Felipe, Marcus)
- . Added "request_order" INI variable to control specifically $_REQUEST
- behavior. (Stas)
- . Added support for exception linking. (Marcus)
- . Added ability to handle exceptions in destructors. (Marcus)
-
-- Improved PHP runtime speed and memory usage:
- . Substitute global-scope, persistent constants with their values at compile
- time. (Matt)
- . Optimized ZEND_SIGNED_MULTIPLY_LONG(). (Matt)
- . Removed direct executor recursion. (Dmitry)
- . Use fastcall calling convention in executor on x86. (Dmitry)
- . Use IS_CV for direct access to $this variable. (Dmitry)
- . Use ZEND_FREE() opcode instead of ZEND_SWITCH_FREE(IS_TMP_VAR). (Dmitry)
- . Lazy EG(active_symbol_table) initialization. (Dmitry)
- . Optimized ZEND_RETURN opcode to not allocate and copy return value if it is
- not used. (Dmitry)
- . Replaced all flex based scanners with re2c based scanners.
- (Marcus, Nuno, Scott)
- . Added garbage collector. (David Wang, Dmitry).
- . Improved PHP binary size and startup speed with GCC4 visibility control.
- (Nuno)
- . Improved engine stack implementation for better performance and stability.
- (Dmitry)
- . Improved memory usage by moving constants to read only memory.
- (Dmitry, Pierre)
- . Changed exception handling. Now each op_array doesn't contain
- ZEND_HANDLE_EXCEPTION opcode in the end. (Dmitry)
- . Optimized require_once() and include_once() by eliminating fopen(3) on
- second usage. (Dmitry)
- . Optimized ZEND_FETCH_CLASS + ZEND_ADD_INTERFACE into single
- ZEND_ADD_INTERFACE opcode. (Dmitry)
- . Optimized string searching for a single character.
- (Michal Dziemianko, Scott)
- . Optimized interpolated strings to use one less opcode. (Matt)
-
-- Improved php.ini handling: (Jani)
- . Added ".htaccess" style user-defined php.ini files support for CGI/FastCGI.
- . Added support for special [PATH=/opt/httpd/www.example.com/] and
- [HOST=www.example.com] sections. Directives set in these sections can
- not be overridden by user-defined ini-files or during runtime.
- . Added better error reporting for php.ini syntax errors.
- . Allowed using full path to load modules using "extension" directive.
- . Allowed "ini-variables" to be used almost everywhere ini php.ini files.
- . Allowed using alphanumeric/variable indexes in "array" ini options.
- . Added 3rd optional parameter to parse_ini_file() to specify the scanning
- mode of INI_SCANNER_NORMAL or INI_SCANNER_RAW. In raw mode option values
- and section values are treated as-is.
- . Fixed get_cfg_var() to be able to return "array" ini options.
- . Added optional parameter to ini_get_all() to only retrieve the current
- value. (Hannes)
-
-- Improved Windows support:
- . Update all libraries to their latest stable version. (Pierre, Rob, Liz,
- Garrett).
- . Added Windows support for stat(), touch(), filemtime(), filesize() and
- related functions. (Pierre)
- . Re-added socket_create_pair() for Windows in sockets extension. (Kalle)
- . Added inet_pton() and inet_ntop() also for Windows platforms.
- (Kalle, Pierre)
- . Added mcrypt_create_iv() for Windows platforms. (Pierre)
- . Added ACL Cache support on Windows.
- (Kanwaljeet Singla, Pierre, Venkat Raman Don)
- . Added constants based on Windows' GetVersionEx information.
- PHP_WINDOWS_VERSION_* and PHP_WINDOWS_NT_*. (Pierre)
- . Added support for ACL (is_writable, is_readable, reports now correct
- results) on Windows. (Pierre, Venkat Raman Don, Kanwaljeet Singla)
- . Added support for fnmatch() on Windows. (Pierre)
- . Added support for time_nanosleep() and time_sleep_until() on Windows.
- (Pierre)
- . Added support for symlink(), readlink(), linkinfo() and link() on Windows.
- They are available only when the running platform supports them. (Pierre)
- . the GMP extension now relies on MPIR instead of the GMP library. (Pierre)
- . Added Windows support for stream_socket_pair(). (Kalle)
- . Drop all external dependencies for the core features. (Pierre)
- . Drastically improve the build procedure (Pierre, Kalle, Rob):
- . VC9 (Visual C++ 2008) or later support
- . Initial experimental x64 support
- . MSI installer now supports all recent Windows versions, including
- Windows 7. (John, Kanwaljeet Singla)
-
-- Improved and cleaned CGI code:
- . FastCGI is now always enabled and cannot be disabled.
- See sapi/cgi/CHANGES for more details. (Dmitry)
- . Added CGI SAPI -T option which can be used to measure execution
- time of script repeated several times. (Dmitry)
-
-- Improved streams:
- . Fixed confusing error message on failure when no errors are logged. (Greg)
- . Added stream_supports_lock() function. (Benjamin Schulz)
- . Added context parameter for copy() function. (Sara)
- . Added "glob://" stream wrapper. (Marcus)
- . Added "params" as optional parameter for stream_context_create(). (Sara)
- . Added ability to use stream wrappers in include_path. (Gregory, Dmitry)
-
-- Improved DNS API
- . Added Windows support for dns_check_record(), dns_get_mx(), checkdnsrr() and
- getmxrr(). (Pierre)
- . Added support for old style DNS functions (supports OSX and FBSD). (Scott)
- . Added a new "entries" array in dns_check_record() containing the TXT
- elements. (Felipe, Pierre)
-
-- Improved hash extension:
- . Changed mhash to be a wrapper layer around the hash extension. (Scott)
- . Added hash_copy() function. (Tony)
- . Added sha224 hash algorithm to the hash extension. (Scott)
-
-- Improved IMAP support (Pierre):
- . Added imap_gc() to clear the imap cache
- . Added imap_utf8_to_mutf7() and imap_mutf7_to_utf8()
-
-- Improved mbstring extension:
- . Added "mbstring.http_output_conv_mimetypes" INI directive that allows
- common non-text types such as "application/xhtml+xml" to be converted
- by mb_output_handler(). (Moriyoshi)
-
-- Improved OCI8 extension (Chris Jones/Oracle Corp.):
- . Added Database Resident Connection Pooling (DRCP) and Fast
- Application Notification (FAN) support.
- . Added support for Oracle External Authentication (not supported
- on Windows).
- . Improve persistent connection handling of restarted DBs.
- . Added SQLT_AFC (aka CHAR datatype) support to oci_bind_by_name.
- . Fixed bug #45458 (Numeric keys for associative arrays are not
- handled properly)
- . Fixed bug #41069 (Segmentation fault with query over DB link).
- . Fixed define of SQLT_BDOUBLE and SQLT_BFLOAT constants with Oracle
- 10g ORACLE_HOME builds.
- . Changed default value of oci8.default_prefetch from 10 to 100.
- . Fixed PECL Bug #16035 (OCI8: oci_connect without ORACLE_HOME defined causes
- segfault) (Chris Jones/Oracle Corp.)
- . Fixed PECL Bug #15988 (OCI8: sqlnet.ora isn't read with older Oracle
- libraries) (Chris Jones/Oracle Corp.)
- . Fixed PECL Bug #14268 (Allow "pecl install oci8" command to "autodetect" an
- Instant Client RPM install) (Chris Jones/Oracle Corp.)
- . Fixed PECL bug #12431 (OCI8 ping functionality is broken).
- . Allow building (e.g from PECL) the PHP 5.3-based OCI8 code with
- PHP 4.3.9 onwards.
- . Provide separate extensions for Oracle 11g and 10g on Windows.
- (Pierre, Chris)
-
-- Improved OpenSSL extension:
- . Added support for OpenSSL digest and cipher functions. (Dmitry)
- . Added access to internal values of DSA, RSA and DH keys. (Dmitry)
- . Fixed a memory leak on openssl_decrypt(). (Henrique)
- . Fixed segfault caused by openssl_pkey_new(). (Henrique)
- . Fixed bug caused by uninitilized variables in openssl_pkcs7_encrypt() and
- openssl_pkcs7_sign(). (Henrique)
- . Fixed error message in openssl_seal(). (Henrique)
-
-- Improved pcntl extension: (Arnaud)
- . Added pcntl_signal_dispatch().
- . Added pcntl_sigprocmask().
- . Added pcntl_sigwaitinfo().
- . Added pcntl_sigtimedwait().
-
-- Improved SOAP extension:
- . Added support for element names in context of XMLSchema's <any>. (Dmitry)
- . Added ability to use Traversable objects instead of plain arrays.
- (Joshua Reese, Dmitry)
- . Fixed possible crash bug caused by an uninitialized value. (Zdash Urf)
-
-- Improved SPL extension:
- . Added SPL to list of standard extensions that cannot be disabled. (Marcus)
- . Added ability to store associative information with objects in
- SplObjectStorage. (Marcus)
- . Added ArrayAccess support to SplObjectStorage. (Marcus)
- . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
- . Added FilesystemIterator. (Marcus)
- . Added GlobIterator. (Marcus)
- . Added SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue classes. (Etienne)
- . Added new parameter $prepend to spl_autoload_register(). (Etienne)
- . Added SplFixedArray. (Etienne, Tony)
- . Added delaying exceptions in SPL's autoload mechanism. (Marcus)
- . Added RecursiveTreeIterator. (Arnaud, Marcus)
- . Added MultipleIterator. (Arnaud, Marcus, Johannes)
-
-- Improved Zend Engine:
- . Added "compact" handler for Zend MM storage. (Dmitry)
- . Added "+" and "*" specifiers to zend_parse_parameters(). (Andrei)
- . Added concept of "delayed early binding" that allows opcode caches to
- perform class declaration (early and/or run-time binding) in exactly
- the same order as vanilla PHP. (Dmitry)
-
-- Improved crypt() function: (Pierre)
- . Added Blowfish and extended DES support. (Using Blowfish implementation
- from Solar Designer).
- . Made crypt features portable by providing our own implementations
- for crypt_r and the algorithms which are used when OS does not provide
- them. PHP implementations are always used for Windows builds.
-
-- Deprecated session_register(), session_unregister() and
- session_is_registered(). (Hannes)
-- Deprecated define_syslog_variables(). (Kalle)
-- Deprecated ereg extension. (Felipe)
-
-- Added new extensions:
- . Added Enchant extension as a way to access spell checkers. (Pierre)
- . Added fileinfo extension as replacement for mime_magic extension. (Derick)
- . Added intl extension for Internationalization. (Ed B., Vladimir I.,
- Dmitry L., Stanislav M., Vadim S., Kirti V.)
- . Added mysqlnd extension as replacement for libmysql for ext/mysql, mysqli
- and PDO_mysql. (Andrey, Johannes, Ulf)
- . Added phar extension for handling PHP Archives. (Greg, Marcus, Steph)
- . Added SQLite3 extension. (Scott)
-
-- Added new date/time functionality: (Derick)
- . date_parse_from_format(): Parse date/time strings according to a format.
- . date_create_from_format()/DateTime::createFromFormat(): Create a date/time
- object by parsing a date/time string according to a given format.
- . date_get_last_errors()/DateTime::getLastErrors(): Return a list of warnings
- and errors that were found while parsing a date/time string through:
- . strtotime() / new DateTime
- . date_create_from_format() / DateTime::createFromFormat()
- . date_parse_from_format().
- . support for abbreviation and offset based timezone specifiers for
- the 'e' format specifier, DateTime::__construct(), DateTime::getTimeZone()
- and DateTimeZone::getName().
- . support for selectively listing timezone identifiers by continent or
- country code through timezone_identifiers_list() /
- DateTimezone::listIdentifiers().
- . timezone_location_get() / DateTimezone::getLocation() for retrieving
- location information from timezones.
- . date_timestamp_set() / DateTime::setTimestamp() to set a Unix timestamp
- without invoking the date parser. (Scott, Derick)
- . date_timestamp_get() / DateTime::getTimestamp() to retrieve the Unix
- timestamp belonging to a date object.
- . two optional parameters to timezone_transitions_get() /
- DateTimeZone::getTranstions() to limit the range of transitions being
- returned.
- . support for "first/last day of <month>" style texts.
- . support for date/time strings returned by MS SQL.
- . support for serialization and unserialization of DateTime objects.
- . support for diffing date/times through date_diff() / DateTime::diff().
- . support for adding/subtracting weekdays with strtotime() and
- DateTime::modify().
- . DateInterval class to represent the difference between two date/times.
- . support for parsing ISO intervals for use with DateInterval.
- . date_add() / DateTime::add(), date_sub() / DateTime::sub() for applying an
- interval to an existing date/time.
- . proper support for "this week", "previous week"/"last week" and "next week"
- phrases so that they actually mean the week and not a seven day period
- around the current day.
- . support for "<xth> <weekday> of" and "last <weekday> of" phrases to be used
- with months - like in "last saturday of februari 2008".
- . support for "back of <hour>" and "front of <hour>" phrases that are used in
- Scotland.
- . DatePeriod class which supports iterating over a DateTime object applying
- DateInterval on each iteration, up to an end date or limited by maximum
- number of occurences.
-
-- Added compatibility mode in GD, imagerotate, image(filled)ellipse
- imagefilter, imageconvolution and imagecolormatch are now always enabled.
- (Pierre)
-- Added array_replace() and array_replace_recursive() functions. (Matt)
-- Added ReflectionProperty::setAccessible() method that allows non-public
- property's values to be read through ::getValue() and set through
- ::setValue(). (Derick, Sebastian)
-- Added msg_queue_exists() function to sysvmsg extension. (Benjamin Schulz)
-- Added Firebird specific attributes that can be set via PDO::setAttribute()
- to control formatting of date/timestamp columns: PDO::FB_ATTR_DATE_FORMAT,
- PDO::FB_ATTR_TIME_FORMAT and PDO::FB_ATTR_TIMESTAMP_FORMAT. (Lars W)
-- Added gmp_testbit() function. (Stas)
-- Added icon format support to getimagesize(). (Scott)
-- Added LDAP_OPT_NETWORK_TIMEOUT option for ldap_set_option() to allow
- setting network timeout (FR #42837). (Jani)
-- Added optional escape character parameter to fgetcsv(). (David Soria Parra)
-- Added an optional parameter to strstr() and stristr() for retrieval of either
- the part of haystack before or after first occurrence of needle.
- (Johannes, Felipe)
-- Added xsl->setProfiling() for profiling stylesheets. (Christian)
-- Added long-option feature to getopt() and made getopt() available also on
- win32 systems by adding a common getopt implementation into core.
- (David Soria Parra, Jani)
-- Added support for optional values, and = as separator, in getopt(). (Hannes)
-- Added lcfirst() function. (David C)
-- Added PREG_BAD_UTF8_OFFSET_ERROR constant. (Nuno)
-- Added native support for asinh(), acosh(), atanh(), log1p() and expm1().
- (Kalle)
-- Added LIBXML_LOADED_VERSION constant (libxml2 version currently used). (Rob)
-- Added JSON_FORCE_OBJECT flag to json_encode(). (Scott, Richard Quadling)
-- Added timezone_version_get() to retrieve the version of the used timezone
- database. (Derick)
-- Added 'n' flag to fopen to allow passing O_NONBLOCK to the underlying
- open(2) system call. (Mikko)
-- Added "dechunk" filter which can decode HTTP responses with chunked
- transfer-encoding. HTTP streams use this filter automatically in case
- "Transfer-Encoding: chunked" header is present in response. It's possible to
- disable this behaviour using "http"=>array("auto_decode"=>0) in stream
- context. (Dmitry)
-- Added support for CP850 encoding in mbstring extension.
- (Denis Giffeler, Moriyoshi)
-- Added stream_cast() and stream_set_options() to user-space stream wrappers,
- allowing stream_select(), stream_set_blocking(), stream_set_timeout() and
- stream_set_write_buffer() to work with user-space stream wrappers. (Arnaud)
-- Added header_remove() function. (chsc at peytz dot dk, Arnaud)
-- Added stream_context_get_params() function. (Arnaud)
-- Added optional parameter "new" to sybase_connect(). (Timm)
-- Added parse_ini_string() function. (grange at lemonde dot fr, Arnaud)
-- Added str_getcsv() function. (Sara)
-- Added openssl_random_pseudo_bytes() function. (Scott)
-- Added ability to send user defined HTTP headers with SOAP request.
- (Brian J.France, Dmitry)
-- Added concatenation option to bz2.decompress stream filter.
- (Keisial at gmail dot com, Greg)
-- Added support for using compressed connections with PDO_mysql. (Johannes)
-- Added the ability for json_decode() to take a user specified depth. (Scott)
-- Added support for the mysql_stmt_next_result() function from libmysql.
- (Andrey)
-- Added function preg_filter() that does grep and replace in one go. (Marcus)
-- Added system independent realpath() implementation which caches intermediate
- directories in realpath-cache. (Dmitry)
-- Added optional clear_realpath_cache and filename parameters to
- clearstatcache(). (Jani, Arnaud)
-- Added litespeed SAPI module. (George Wang)
-- Added ext/hash support to ext/session's ID generator. (Sara)
-- Added quoted_printable_encode() function. (Tony)
-- Added stream_context_set_default() function. (Davey Shafik)
-- Added optional "is_xhtml" parameter to nl2br() which makes the function
- output <br> when false and <br /> when true (FR #34381). (Kalle)
-- Added PHP_MAXPATHLEN constant (maximum length of a path). (Pierre)
-- Added support for SSH via libssh2 in cURL. (Pierre)
-- Added support for gray levels PNG image with alpha in GD extension. (Pierre)
-- Added support for salsa hashing functions in HASH extension. (Scott)
-- Added DOMNode::getLineNo to get line number of parsed node. (Rob)
-- Added table info to PDO::getColumnMeta() with SQLite. (Martin Jansen, Scott)
-- Added mail logging functionality that allows logging of mail sent via
- mail() function. (Ilia)
-- Added json_last_error() to return any error information from json_decode().
- (Scott)
-- Added gethostname() to return the current system host name. (Ilia)
-- Added shm_has_var() function. (Mike)
-- Added depth parameter to json_decode() to lower the nesting depth from the
- maximum if required. (Scott)
-- Added pixelation support in imagefilter(). (Takeshi Abe, Kalle)
-- Added SplObjectStorage::addAll/removeAll. (Etienne)
-
-- Implemented FR #41712 (curl progress callback: CURLOPT_PROGRESSFUNCTION).
- (sdteffen[at]gmail[dot].com, Pierre)
-- Implemented FR #47739 (Missing cURL option do disable IPv6). (Pierre)
-- Implemented FR #39637 (Missing cURL option CURLOPT_FTP_FILEMETHOD). (Pierre)
-
-- Fixed an issue with ReflectionProperty::setAccessible().
- (Sebastian, Roman Borschel)
-- Fixed html_entity_decode() incorrectly converting numeric html entities
- to different characters with cp1251 and cp866. (Scott)
-- Fixed an issue in date() where a : was printed for the O modifier after a P
- modifier was used. (Derick)
-- Fixed exec() on Windows to not eat the first and last double quotes. (Scott)
-- Fixed readlink on Windows in thread safe SAPI (apache2.x etc.). (Pierre)
-- Fixed a bug causing miscalculations with the "last <weekday> of <n> month"
- relative time string. (Derick)
-- Fixed bug causing the algorithm parameter of mhash() to be modified. (Scott)
-- Fixed invalid calls to free when internal fileinfo magic file is used. (Scott)
-- Fixed memory leak inside wddx_add_vars() function. (Felipe)
-- Fixed check in recode extension to allow builing of recode and mysql
- extensions when using a recent libmysql. (Johannes)
-
-- Fixed PECL bug #12794 (PDOStatement->nextRowset() doesn't work). (Johannes)
-- Fixed PECL bug #12401 (Add support for ATTR_FETCH_TABLE_NAMES). (Johannes)
-
-- Fixed bug #48696 (ldap_read() segfaults with invalid parameters). (Felipe)
-- Fixed bug #48643 (String functions memory issue). (Dmitry)
-- Fixed bug #48641 (tmpfile() uses old parameter parsing).
- (crrodriguez at opensuse dot org)
-- Fixed bug #48624 (.user.ini never gets parsed). (Pierre)
-- Fixed bug #48620 (X-PHP-Originating-Script assumes no trailing CRLF in
- existing headers). (Ilia)
-- Fixed bug #48578 (Can't build 5.3 on FBSD 4.11). (Rasmus)
-- Fixed bug #48535 (file_exists returns false when impersonate is used).
- (Kanwaljeet Singla, Venkat Raman Don)
-- Fixed bug #48493 (spl_autoload_register() doesn't work correctly when
- prepending functions). (Scott)
-- Fixed bug #48215 (Calling a method with the same name as the parent class
- calls the constructor). (Scott)
-- Fixed bug #48200 (compile failure with mbstring.c when
- --enable-zend-multibyte is used). (Jani)
-- Fixed bug #48188 (Cannot execute a scrollable cursors twice with PDO_PGSQL).
- (Matteo)
-- Fixed bug #48185 (warning: value computed is not used in
- pdo_sqlite_stmt_get_col line 271). (Matteo)
-- Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe)
-- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
-- Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long). (Dmitry)
-- Fixed bug #48004 (Error handler prevents creation of default object). (Dmitry)
-- Fixed bug #47880 (crashes in call_user_func_array()). (Dmitry)
-- Fixed bug #47856 (stristr() converts needle to lower-case). (Ilia)
-- Fixed bug #47851 (is_callable throws fatal error). (Dmitry)
-- Fixed bug #47816 (pcntl tests failing on NetBSD). (Matteo)
-- Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants).
- (Matteo)
-- Fixed bug #47771 (Exception during object construction from arg call calls
- object's destructor). (Dmitry)
-- Fixed bug #47767 (include_once does not resolve windows symlinks or junctions)
- (Kanwaljeet Singla, Venkat Raman Don)
-- Fixed bug #47757 (rename JPG to JPEG in phpinfo). (Pierre)
-- Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer). (Dmitry)
-- Fixed bug #47714 (autoloading classes inside exception_handler leads to
- crashes). (Dmitry)
-- Fixed bug #47671 (Cloning SplObjectStorage instances). (Etienne)
-- Fixed bug #47664 (get_class returns NULL instead of FALSE). (Dmitry)
-- Fixed bug #47662 (Support more than 127 subpatterns in preg_match). (Nuno)
-- Fixed bug #47596 (Bus error on parsing file). (Dmitry)
-- Fixed bug #47572 (Undefined constant causes segmentation fault). (Felipe)
-- Fixed bug #47560 (explode()'s limit parameter odd behaviour). (Matt)
-- Fixed bug #47549 (get_defined_constants() return array with broken array
- categories). (Ilia)
-- Fixed bug #47535 (Compilation failure in ps_fetch_from_1_to_8_bytes()).
- (Johannes)
-- Fixed bug #47534 (RecursiveDiteratoryIterator::getChildren ignoring
- CURRENT_AS_PATHNAME). (Etienne)
-- Fixed bug #47443 (metaphone('scratch') returns wrong result). (Felipe)
-- Fixed bug #47438 (mysql_fetch_field ignores zero offset). (Johannes)
-- Fixed bug #47398 (PDO_Firebird doesn't implements quoter correctly). (Felipe)
-- Fixed bug #47390 (odbc_fetch_into - BC in php 5.3.0). (Felipe)
-- Fixed bug #47359 (Use the expected unofficial mimetype for bmp files). (Scott)
-- Fixed bug #47343 (gc_collect_cycles causes a segfault when called within a
- destructor in one case). (Dmitry)
-- Fixed bug #47320 ($php_errormsg out of scope in functions). (Dmitry)
-- Fixed bug #47318 (UMR when trying to activate user config). (Pierre)
-- Fixed bug #47243 (OCI8: Crash at shutdown on Windows) (Chris Jones/Oracle
- Corp.)
-- Fixed bug #47231 (offsetGet error using incorrect offset). (Etienne)
-- Fixed bug #47229 (preg_quote() should escape the '-' char). (Nuno)
-- Fixed bug #47165 (Possible memory corruption when passing return value by
- reference). (Dmitry)
-- Fixed bug #47087 (Second parameter of mssql_fetch_array()). (Felipe)
-- Fixed bug #47085 (rename() returns true even if the file in PHAR does not
- exist). (Greg)
-- Fixed bug #47050 (mysqli_poll() modifies improper variables). (Johannes)
-- Fixed bug #47045 (SplObjectStorage instances compared with ==). (Etienne)
-- Fixed bug #47038 (Memory leak in include). (Dmitry)
-- Fixed bug #47031 (Fix constants in DualIterator example). (Etienne)
-- Fixed bug #47021 (SoapClient stumbles over WSDL delivered with
- "Transfer-Encoding: chunked"). (Dmitry)
-- Fixed bug #46994 (OCI8: CLOB size does not update when using CLOB IN OUT param
- in stored procedure) (Chris Jones/Oracle Corp.)
-- Fixed bug #46979 (use with non-compound name *has* effect). (Dmitry)
-- Fixed bug #46957 (The tokenizer returns deprecated values). (Felipe)
-- Fixed bug #46944 (UTF-8 characters outside the BMP aren't encoded correctly).
- (Scott)
-- Fixed bug #46897 (ob_flush() should fail to flush unerasable buffers).
- (David C.)
-- Fixed bug #46849 (Cloning DOMDocument doesn't clone the properties). (Rob)
-- Fixed bug #46847 (phpinfo() is missing some settings). (Hannes)
-- Fixed bug #46844 (php scripts or included files with first line starting
- with # have the 1st line missed from the output). (Ilia)
-- Fixed bug #46817 (tokenizer misses last single-line comment (PHP 5.3+, with
- re2c lexer)). (Matt, Shire)
-- Fixed bug #46811 (ini_set() doesn't return false on failure). (Hannes)
-- Fixed bug #46763 (mb_stristr() wrong output when needle does not exist).
- (Henrique M. Decaria)
-- Fixed bug #46755 (warning: use statement with non-compound name). (Dmitry)
-- Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error when
- given bad data). (Ilia)
-- Fixed bug #46738 (Segfault when mb_detect_encoding() fails). (Scott)
-- Fixed bug #46731 (Missing validation for the options parameter of the
- imap_fetch_overview() function). (Ilia)
-- Fixed bug #46711 (cURL curl_setopt leaks memory in foreach loops). (magicaltux
- [at] php [dot] net)
-- Fixed bug #46701 (Creating associative array with long values in the key fails
- on 32bit linux). (Shire)
-- Fixed bug #46681 (mkdir() fails silently on PHP 5.3). (Hannes)
-- Fixed bug #46653 (can't extend mysqli). (Johannes)
-- Fixed bug #46646 (Restrict serialization on some internal classes like Closure
- and SplFileInfo using exceptions). (Etienne)
-- Fixed bug #46623 (OCI8: phpinfo doesn't show compile time ORACLE_HOME with
- phpize) (Chris Jones/Oracle Corp.)
-- Fixed bug #46578 (strip_tags() does not honor end-of-comment when it
- encounters a single quote). (Felipe)
-- Fixed bug #46546 (Segmentation fault when using declare statement with
- non-string value). (Felipe)
-- Fixed bug #46542 (Extending PDO class with a __call() function doesn't work as
- expected). (Johannes)
-- Fixed bug #46421 (SplFileInfo not correctly handling /). (Etienne)
-- Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
-- Fixed bug #46268 (DateTime::modify() does not reset relative time values).
- (Derick)
-- Fixed bug #46241 (stacked error handlers, internal error handling in general).
- (Etienne)
-- Fixed bug #46238 (Segmentation fault on static call with empty string method).
- (Felipe)
-- Fixed bug #46192 (ArrayObject with objects as storage serialization).
- (Etienne)
-- Fixed bug #46185 (importNode changes the namespace of an XML element). (Rob)
-- Fixed bug #46178 (memory leak in ext/phar). (Greg)
-- Fixed bug #46160 (SPL - Memory leak when exception is thrown in offsetSet).
- (Felipe)
-- Fixed Bug #46147 (after stream seek, appending stream filter reads incorrect
- data). (Greg)
-- Fixed bug #46127 (php_openssl_tcp_sockop_accept forgets to set context on
- accepted stream) (Mark Karpeles, Pierre)
-- Fixed bug #46115 (Memory leak when calling a method using Reflection).
- (Dmitry)
-- Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on
- multiple calls). (Ilia)
-- Fixed bug #46108 (DateTime - Memory leak when unserializing). (Felipe)
-- Fixed bug #46106 (Memory leaks when using global statement). (Dmitry)
-- Fixed bug #46099 (Xsltprocessor::setProfiling - memory leak). (Felipe, Rob).
-- Fixed bug #46087 (DOMXPath - segfault on destruction of a cloned object).
- (Ilia)
-- Fixed bug #46048 (SimpleXML top-level @attributes not part of iterator).
- (David C.)
-- Fixed bug #46044 (Mysqli - wrong error message). (Johannes)
-- Fixed bug #46042 (memory leaks with reflection of mb_convert_encoding()).
- (Ilia)
-- Fixed bug #46039 (ArrayObject iteration is slow). (Arnaud)
-- Fixed bug #46033 (Direct instantiation of SQLite3stmt and SQLite3result cause
- a segfault.) (Scott)
-- Fixed bug #45991 (Ini files with the UTF-8 BOM are treated as invalid).
- (Scott)
-- Fixed bug #45989 (json_decode() doesn't return NULL on certain invalid
- strings). (magicaltux, Scott)
-- Fixed bug #45976 (Moved SXE from SPL to SimpleXML). (Etienne)
-- Fixed bug #45928 (large scripts from stdin are stripped at 16K border).
- (Christian Schneider, Arnaud)
-- Fixed bug #45911 (Cannot disable ext/hash). (Arnaud)
-- Fixed bug #45907 (undefined reference to 'PHP_SHA512Init'). (Greg)
-- Fixed bug #45826 (custom ArrayObject serialization). (Etienne)
-- Fixed bug #45820 (Allow empty keys in ArrayObject). (Etienne)
-- Fixed bug #45791 (json_decode() doesn't convert 0e0 to a double). (Scott)
-- Fixed bug #45786 (FastCGI process exited unexpectedly). (Dmitry)
-- Fixed bug #45757 (FreeBSD4.11 build failure: failed include; stdint.h).
- (Hannes)
-- Fixed bug #45743 (property_exists fails to find static protected member in
- child class). (Felipe)
-- Fixed bug #45717 (Fileinfo/libmagic build fails, missing err.h and getopt.h).
- (Derick)
-- Fixed bug #45706 (Unserialization of classes derived from ArrayIterator
- fails). (Etienne, Dmitry)
-- Fixed bug #45696 (Not all DateTime methods allow method chaining). (Derick)
-- Fixed bug #45682 (Unable to var_dump(DateInterval)). (Derick)
-- Fixed bug #45447 (Filesystem time functions on Vista and server 2008).
- (Pierre)
-- Fixed bug #45432 (PDO: persistent connection leak). (Felipe)
-- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Ilia)
-- Fixed bug #45384 (parse_ini_file will result in parse error with no trailing
- newline). (Arnaud)
-- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). (vnegrier at
- optilian dot com, Ilia)
-- Fixed bug #45044 (relative paths not resolved correctly). (Dmitry)
-- Fixed bug #44861 (scrollable cursor don't work with pgsql). (Matteo)
-- Fixed bug #44842 (parse_ini_file keys that start/end with underscore).
- (Arnaud)
-- Fixed bug #44575 (parse_ini_file comment # line problems). (Arnaud)
-- Fixed bug #44409 (PDO::FETCH_SERIALIZE calls __construct()). (Matteo)
-- Fixed bug #44173 (PDO->query() parameter parsing/checking needs an update).
- (Matteo)
-- Fixed bug #44154 (pdo->errorInfo() always have three elements in the returned
- array). (David C.)
-- Fixed bug #44153 (pdo->errorCode() returns NULL when there are no errors).
- (David C.)
-- Fixed bug #44135 (PDO MySQL does not support CLIENT_FOUND_ROWS). (Johannes,
- chx1975 at gmail dot com)
-- Fixed bug #44100 (Inconsistent handling of static array declarations with
- duplicate keys). (Dmitry)
-- Fixed bug #43831 ($this gets mangled when extending PDO with persistent
- connection). (Felipe)
-- Fixed bug #43817 (opendir() fails on Windows directories with parent directory
- unaccessible). (Dmitry)
-- Fixed bug #43069 (SoapClient causes 505 HTTP Version not supported error
- message). (Dmitry)
-- Fixed bug #43008 (php://filter uris ignore url encoded filternames and can't
- handle slashes). (Arnaud)
-- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped).
- (Scott, Edward Z. Yang)
-- Fixed bug #41874 (separate STDOUT and STDERR in exec functions). (Kanwaljeet
- Singla, Venkat Raman Don, Pierre)
-- Fixed bug #41534 (SoapClient over HTTPS fails to reestablish connection).
- (Dmitry)
-- Fixed bug #38802 (max_redirects and ignore_errors). (patch by
- datibbaw@php.net)
-- Fixed bug #35980 (touch() works on files but not on directories). (Pierre)
-
-17 Jun 2009, PHP 5.2.10
-- Updated timezone database to version 2009.9 (2009i) (Derick)
-
-- Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara)
-- Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
- and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
-- Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra)
-
-- Changed default value of array_unique()'s optional sorting type parameter
- back to SORT_STRING to fix backwards compatibility breakage introduced in
- PHP 5.2.9. (Moriyoshi)
-
-- Fixed memory corruptions while reading properties of zip files. (Ilia)
-- Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
-- Fixed segfault on invalid session.save_path. (Hannes)
-- Fixed leaks in imap when a mail_criteria is used. (Pierre)
-- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. (Greg)
-
-- Fixed bug #48562 (Reference recursion causes segfault when used in
- wddx_serialize_vars()). (Felipe)
-- Fixed bug #48557 (Numeric string keys in Apache Hashmaps are not cast to
- integers). (David Zuelke)
-- Fixed bug #48518 (curl crashes when writing into invalid file handle). (Tony)
-- Fixed bug #48514 (cURL extension uses same resource name for simple and
- multi APIs). (Felipe)
-- Fixed bug #48469 (ldap_get_entries() leaks memory on empty search
- results). (Patrick)
-- Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4). (Jani,
- spisek at kerio dot com)
-- Fixed bug #48448 (Compile failure under IRIX 6.5.30 building cast.c).
- (Kalle)
-- Fixed bug #48441 (ldap_search() sizelimit, timelimit and deref options
- persist). (Patrick)
-- Fixed bug #48434 (Improve memory_get_usage() accuracy). (Arnaud)
-- Fixed bug #48416 (Force a cache limit in ereg() to stop excessive memory
- usage). (Scott)
-- Fixed bug #48409 (Crash when exception is thrown while passing function
- arguments). (Arnaud)
-- Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg
- files). (Pierre)
-- Fixed bug #48359 (Script hangs on snmprealwalk if OID is not increasing).
- (Ilia, simonov at gmail dot com)
-- Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work
- with redeclared property).
- (patch by Markus dot Lidel at shadowconnect dot com)
-- Fixed bug #48326 (constant MSG_DONTWAIT not defined). (Arnaud)
-- Fixed bug #48313 (fgetcsv() does not return null for empty rows). (Ilia)
-- Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not update
- stream position of plain files). (Arnaud)
-- Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source is a
- socket). (Arnaud)
-- Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values).
- (Ilia, lytboris at gmail dot com)
-- Fixed bug #48256 (Crash due to double-linking of history.o).
- (tstarling at wikimedia dot org)
-- Fixed bug #48248 (SIGSEGV when access to private property via &__get).
- (Felipe)
-- Fixed bug #48247 (Crash on errors during startup). (Stas)
-- Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe)
-- Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne)
-- Fixed bug #48221 (memory leak when passing invalid xslt parameter).
- (Felipe)
-- Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when
- working with a non-writable stream). (Ilia)
-- Fixed bug #48206 (Iterating over an invalid data structure with
- RecursiveIteratorIterator leads to a segfault). (Scott)
-- Fixed bug #48204 (xmlwriter_open_uri() does not emit warnings on invalid
- paths). (Ilia)
-- Fixed bug #48203 (Crash when CURLOPT_STDERR is set to regular file). (Jani)
-- Fixed bug #48202 (Out of Memory error message when passing invalid file
- path) (Pierre)
-- Fixed bug #48156 (Added support for lcov v1.7). (Ilia)
-- Fixed bug #48132 (configure check for curl ssl support fails with
- --disable-rpath). (Jani)
-- Fixed bug #48131 (Don't try to bind ipv4 addresses to ipv6 ips via bindto).
- (Ilia)
-- Fixed bug #48070 (PDO_OCI: Segfault when using persistent connection).
- (Pierre, Matteo, jarismar dot php at gmail dot com)
-- Fixed bug #48058 (Year formatter goes wrong with out-of-int range). (Derick)
-- Fixed bug #48038 (odbc_execute changes variables used to form params array).
- (Felipe)
-- Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams). (Arnaud)
-- Fixed bug #47991 (SSL streams fail if error stack contains items). (Mikko)
-- Fixed bug #47981 (error handler not called regardless). (Hannes)
-- Fixed bug #47969 (ezmlm_hash() returns different values depend on OS). (Ilia)
-- Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
-- Fixed bug #47940 (memory leaks in imap_body). (Pierre, Jake Levitt)
-- Fixed bug #47937 (system() calls sapi_flush() regardless of output
- buffering). (Ilia)
-- Fixed bug #47903 ("@" operator does not work with string offsets). (Felipe)
-- Fixed bug #47893 (CLI aborts on non blocking stdout). (Arnaud)
-- Fixed bug #47849 (Non-deep import loses the namespace). (Rob)
-- Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W)
-- Fixed bug #47836 (array operator [] inconsistency when the array has
- PHP_INT_MAX index value). (Matt)
-- Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c).
- (Ilia, rainer dot jung at kippdata dot de)
-- Fixed bug #47828 (openssl_x509_parse() segfaults when a UTF-8 conversion
- fails). (Scott, Kees Cook, Pierre)
-- Fixed bug #47818 (Segfault due to bound callback param). (Felipe)
-- Fixed bug #47801 (__call() accessed via parent:: operator is provided
- incorrect method name). (Felipe)
-- Fixed bug #47769 (Strange extends PDO). (Felipe)
-- Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer).
- (Dmitry)
-- Fixed bug #47721 (Alignment issues in mbstring and sysvshm extension).
- (crrodriguez at opensuse dot org, Ilia)
-- Fixed bug #47704 (PHP crashes on some "bad" operations with string
- offsets). (Dmitry)
-- Fixed bug #47695 (build error when xmlrpc and iconv are compiled against
- different iconv versions). (Scott)
-- Fixed bug #47667 (ZipArchive::OVERWRITE seems to have no effect).
- (Mikko, Pierre)
-- Fixed bug #47644 (Valid integers are truncated with json_decode()). (Scott)
-- Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a
- string literal). (Ilia)
-- Fixed bug #47616 (curl keeps crashing). (Felipe)
-- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
-- Fixed bug #47566 (pcntl_wexitstatus() returns signed status).
- (patch by james at jamesreno dot com)
-- Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns wrong
- result). (Ilia)
-- Fixed bug #47487 (performance degraded when reading large chunks after
- fix of bug #44607). (Arnaud)
-- Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi). (Jani)
-- Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
- addresses in the filter extension). (Ilia)
-- Fixed bug #47430 (Errors after writing to nodeValue parameter of an absent
- previousSibling). (Rob)
-- Fixed bug #47365 (ip2long() may allow some invalid values on certain 64bit
- systems). (Ilia)
-- Fixed bug #47254 (Wrong Reflection for extends class). (Felipe)
-- Fixed bug #47042 (cgi sapi is incorrectly removing SCRIPT_FILENAME).
- (Sriram Natarajan, David Soria Parra)
-- Fixed bug #46882 (Serialize / Unserialize misbehaviour under OS with
- different bit numbers). (Matt)
-- Fixed bug #46812 (get_class_vars() does not include visible private variable
- looking at subclass). (Arnaud)
-- Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL
- SOAP services). (Ilia, lordelph at gmail dot com)
-- Fixed bug #46109 (Memory leak when mysqli::init() is called multiple times).
- (Andrey)
-- Fixed bug #45997 (safe_mode bypass with exec/system/passthru (windows only)).
- (Pierre)
-- Fixed bug #45877 (Array key '2147483647' left as string). (Matt)
-- Fixed bug #45822 (Near infinite-loops while parsing huge relative offsets).
- (Derick, Mike Sullivan)
-- Fixed bug #45799 (imagepng() crashes on empty image).
- (Martin McNickle, Takeshi Abe)
-- Fixed bug #45622 (isset($arrayObject->p) misbehaves with
- ArrayObject::ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud)
-- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private prop
- of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
-- Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud)
-- Fixed bug #45202 (zlib.output_compression can not be set with ini_set()).
- (Jani)
-- Fixed bug #45191 (error_log ignores date.timezone php.ini val when setting
- logging timestamps). (Derick)
-- Fixed bug #45092 (header HTTP context option not being used when compiled
- using --with-curlwrappers). (Jani)
-- Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime).
- (Ilia, kawai at apache dot org)
-- Fixed bug #44827 (define() is missing error checks for class constants).
- (Ilia)
-- Fixed bug #44214 (Crash using preg_replace_callback() and global variables).
- (Nuno, Scott)
-- Fixed bug #43073 (TrueType bounding box is wrong for angle<>0).
- (Martin McNickle)
-- Fixed bug #42663 (gzinflate() try to allocate all memory with truncated
- data). (Arnaud)
-- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC
- driver). (jhml at gmx dot net)
-- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped).
- (Scott, Edward Z. Yang)
-- Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
- (Kanwaljeet Singla, Venkat Raman Don)
-- Fixed bug #38805 (PDO truncates text from SQL Server text data type field).
- (Steph)
-
-26 Feb 2009, PHP 5.2.9
-- Changed __call() to be invoked on private/protected method access, similar to
- properties and __get(). (Andrei)
-
-- Added optional sorting type flag parameter to array_unique(). Default is
- SORT_REGULAR. (Andrei)
-
-- Fixed a crash on extract in zip when files or directories entry names contain
- a relative path. (Pierre)
-- Fixed error conditions handling in stream_filter_append(). (Arnaud)
-- Fixed zip filename property read. (Pierre)
-- Fixed explode() behavior with empty string to respect negative limit. (Shire)
-- Fixed security issue in imagerotate(), background colour isn't validated
- correctly with a non truecolour image. Reported by Hamid Ebadi,
- APA Laboratory (Fixes CVE-2008-5498). (Scott)
-- Fixed a segfault when malformed string is passed to json_decode(). (Scott)
-- Fixed bug in xml_error_string() which resulted in messages being
- off by one. (Scott)
-
-- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit
- linux). (Matt)
-- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
- characters). (for-bugs at hnw dot jp, Moriyoshi)
-- Fixed bug #47353 (crash when creating a lot of objects in object
- destructor). (Tony)
-- Fixed bug #47322 (sscanf %d doesn't work). (Felipe)
-- Fixed bug #47282 (FILTER_VALIDATE_EMAIL is marking valid email addresses
- as invalid). (Ilia)
-- Fixed bug #47220 (segfault in dom_document_parser in recovery mode). (Rob)
-- Fixed bug #47217 (content-type is not set properly for file uploads). (Ilia)
-- Fixed bug #47174 (base64_decode() interprets pad char in mid string as
- terminator). (Ilia)
-- Fixed bug #47165 (Possible memory corruption when passing return value by
- reference). (Dmitry)
-- Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results).
- (Felipe)
-- Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
-- Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
- (Etienne, Dmitry)
-- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
-- Fixed bug #47049 (SoapClient::__soapCall causes a segmentation fault).
- (Dmitry)
-- Fixed bug #47048 (Segfault with new pg_meta_data). (Felipe)
-- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non
- apache). (Sriram Natarajan)
-- Fixed bug #47037 (No error when using fopen with empty string). (Cristian
- Rodriguez R., Felipe)
-- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a
- TXT record). (Felipe)
-- Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject).
- (Derick)
-- Fixed bug #46985 (OVERWRITE and binary mode does not work, regression
- introduced in 5.2.8). (Pierre)
-- Fixed bug #46973 (IPv6 address filter rejects valid address). (Felipe)
-- Fixed bug #46964 (Fixed pdo_mysql build with older version of MySQL). (Ilia)
-- Fixed bug #46959 (Unable to disable PCRE). (Scott)
-- Fixed bug #46918 (imap_rfc822_parse_adrlist host part not filled in
- correctly). (Felipe)
-- Fixed bug #46889 (Memory leak in strtotime()). (Derick)
-- Fixed bug #46887 (Invalid calls to php_error_docref()). (oeriksson at
- mandriva dot com, Ilia)
-- Fixed bug #46873 (extract($foo) crashes if $foo['foo'] exists). (Arnaud)
-- Fixed bug #46843 (CP936 euro symbol is not converted properly). (ty_c at
- cybozuy dot co dot jp, Moriyoshi)
-- Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
- inside a binary or image column type). (Ilia)
-- Fixed bug #46782 (fastcgi.c parse error). (Matt)
-- Fixed bug #46760 (SoapClient doRequest fails when proxy is used). (Felipe)
-- Fixed bug #46748 (Segfault when an SSL error has more than one error).
- (Scott)
-- Fixed bug #46739 (array returned by curl_getinfo should contain
- content_type key). (Mikko)
-- Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob)
-- Fixed bug #46419 (Elements of associative arrays with NULL value are
- lost). (Dmitry)
-- Fixed bug #46282 (Corrupt DBF When Using DATE). (arne at bukkie dot nl)
-- Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress
- after end of stream). (Greg)
-- Fixed bug #46005 (User not consistently logged under Apache2). (admorten
- at umich dot edu, Stas)
-- Fixed bug #45996 (libxml2 2.7 causes breakage with character data in
- xml_parse()). (Rob)
-- Fixed bug #45940 (MySQLI OO does not populate connect_error property on
- failed connect). (Johannes)
-- Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
-- Fixed bug #45327 (memory leak if offsetGet throws exception). (Greg)
-- Fixed bug #45239 (Encoding detector hangs with mbstring.strict_detection
- enabled). (Moriyoshi)
-- Fixed bug #45161 (Reusing a curl handle leaks memory). (Mark Karpeles, Jani)
-- Fixed bug #44336 (Improve pcre UTF-8 string matching performance). (frode
- at coretrek dot com, Nuno)
-- Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
- (Moriyoshi)
-- Fixed bug #37209 (mssql_execute with non fatal errors). (Kalle)
-- Fixed bug #35975 (Session cookie expires date format isn't the most
- compatible. Now matches that of setcookie()). (Scott)
-
-
-08 Dec 2008, PHP 5.2.8
-- Reverted bug fix #42718 that broke magic_quotes_gpc (Scott)
-
-04 Dec 2008, PHP 5.2.7
-- Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371). (Ilia)
-- Updated timezone database to version 2008.9. (Derick)
-- Upgraded bundled libzip to 0.9.0. (Pierre)
-
-- Added logging option for error_log to send directly to SAPI. (Stas)
-- Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
- PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. (Pierre)
-- Added "PHP_INI_SCAN_DIR" environment variable which can be used to
- either disable or change the compile time ini scan directory (FR #45114).
- (Jani)
-
-- Fixed missing initialization of BG(page_uid) and BG(page_gid),
- reported by Maksymilian Arciemowicz. (Stas)
-- Fixed memory leak inside sqlite_create_aggregate(). (Felipe)
-- Fixed memory leak inside PDO sqlite's sqliteCreateAggregate() method.
- (Felipe)
-- Fixed a crash inside gd with invalid fonts (Fixes CVE-2008-3658). (Pierre)
-- Fixed a possible overflow inside memnstr (Fixes CVE-2008-3659).
- (LaurentGaffie)
-- Fixed incorrect php_value order for Apache configuration, reported by
- Maksymilian Arciemowicz. (Stas)
-- Fixed memory leak inside readline_callback_handler_remove() function.
- (Felipe)
-- Fixed sybase_fetch_*() to continue reading after CS_ROW_FAIL status (Timm)
-- Fixed a bug inside dba_replace() that could cause file truncation
- withinvalid keys. (Ilia)
-- Fixed memory leak inside readline_callback_handler_install() function.(Ilia)
-- Fixed memory leak inside readline_completion_function() function. (Felipe)
-- Fixed stream_get_contents() when using $maxlength and socket is notclosed.
- indeyets [at] php [dot] net on #46049. (Arnaud)
-- Fixed stream_get_line() to behave as documented on non-blocking streams.
- (Arnaud)
-- Fixed endless loop in PDOStatement::debugDumpParams().
- (jonah.harris at gmail dot com)
-- Fixed ability to use "internal" heaps in extensions. (Arnaud, Dmitry)
-- Fixed weekdays adding/subtracting algorithm. (Derick)
-- Fixed some ambiguities in the date parser. (Derick)
-- Fixed a bug with the YYYY-MM format not resetting the day correctly.
- (Derick)
-- Fixed a bug in the DateTime->modify() methods, it would not use the advanced
- relative time strings. (Derick)
-- Fixed extraction of zip files or directories when the entry name is a
- relative path. (Pierre)
-- Fixed read or write errors for large zip archives. (Pierre)
-- Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666.
- (Christian Hoffmann)
-- Fixed simplexml asXML() not to lose encoding when dumping entire
- document to file. (Ilia)
-- Fixed a crash inside PDO when trying instantiate PDORow manually.
- (Felipe)
-- Fixed build failure of ext/mysqli with libmysql 6.0 - missing
- rplfunctions. (Andrey)
-- Fixed a regression when using strip_tags() and < is within an
- attribute.(Scott)
-- Fixed a crash on invalid method in ReflectionParameter constructor.
- (Christian Seiler)
-- Reverted fix for bug #44197 due to behaviour change in minor version.
- (Felipe)
-
-- Fixed bug #46732 (mktime.year description is wrong). (Derick)
-- Fixed bug #46696 (cURL fails in upload files with specified content-type).
- (Ilia)
-- Fixed bug #46673 (stream_lock call with wrong parameter). (Arnaud)
-- Fixed bug #46649 (Setting array element with that same array produces
- inconsistent results). (Arnaud)
-- Fixed bug #46626 (mb_convert_case does not handle apostrophe correctly).
- (Ilia)
-- Fixed bug #46543 (ibase_trans() memory leaks when using wrong parameters).
- (Felipe)
-- Fixed bug #46521 (Curl ZTS OpenSSL, error in config.m4 fragment).
- (jd at cpanel dot net)
-- Fixed bug #46496 (wddx_serialize treats input as ISO-8859-1). (Mark Karpeles)
-- Fixed bug #46427 (SoapClient() stumbles over its "stream_context" parameter).
- (Dmitry, Herman Radtke)
-- Fixed bug #46426 (offset parameter of stream_get_contents() does not
- workfor "0"). (Felipe)
-- Fixed bug #46406 (Unregistering nodeclass throws E_FATAL). (Rob)
-- Fixed bug #46389 (NetWare needs small patch for _timezone).
- (patch by guenter@php.net)
-- Fixed bug #46388 (stream_notification_callback inside of object destroys
- object variables). (Felipe)
-- Fixed bug #46381 (wrong $this passed to internal methods causes segfault).
- (Tony)
-- Fixed bug #46379 (Infinite loop when parsing '#' in one line file). (Arnaud)
-- Fixed bug #46366 (bad cwd with / as pathinfo). (Dmitry)
-- Fixed bug #46360 (TCP_NODELAY constant for socket_{get,set}_option).
- (bugs at trick dot vanstaveren dot us)
-- Fixed bug #46343 (IPv6 address filter accepts invalid address). (Ilia)
-- Fixed bug #46335 (DOMText::splitText doesn't handle multibyte characters).
- (Rob)
-- Fixed bug #46323 (compilation of simplexml for NetWare breaks).
- (Patch by guenter [at] php [dot] net)
-- Fixed bug #46319 (PHP sets default Content-Type header for HTTP 304
- response code, in cgi sapi). (Ilia)
-- Fixed bug #46313 (Magic quotes broke $_FILES). (Arnaud)
-- Fixed bug #46308 (Invalid write when changing property from inside getter).
- (Dmitry)
-- Fixed bug #46292 (PDO::setFetchMode() shouldn't requires the 2nd arg when
- using FETCH_CLASSTYPE). (Felipe)
-- Fixed bug #46274, #46249 (pdo_pgsql always fill in NULL for empty BLOB and
- segfaults when returned by SELECT). (Felipe)
-- Fixed bug #46271 (local_cert option is not resolved to full path). (Ilia)
-- Fixed bug #46247 (ibase_set_event_handler() is allowing to pass callback
- without event). (Felipe)
-- Fixed bug #46246 (difference between call_user_func(array($this, $method))
- and $this->$method()). (Dmitry)
-- Fixed bug #46222 (ArrayObject EG(uninitialized_var_ptr) overwrite).
- (Etienne)
-- Fixed bug #46215 (json_encode mutates its parameter and has some
- class-specific state). (Felipe)
-- Fixed bug #46206 (pg_query_params/pg_execute convert passed values to
- strings). (Ilia)
-- Fixed bug #46191 (BC break: DOMDocument saveXML() doesn't accept null).
- (Rob)
-- Fixed bug #46164 (stream_filter_remove() closes the stream). (Arnaud)
-- Fixed bug #46157 (PDOStatement::fetchObject prototype error). (Felipe)
-- Fixed bug #46147 (after stream seek, appending stream filter reads
- incorrect data). (Greg)
-- Fixed bug #46139 (PDOStatement->setFetchMode() forgets FETCH_PROPS_LATE).
- (chsc at peytz dot dk, Felipe)
-- Fixed bug #46127 (php_openssl_tcp_sockop_accept forgets to set context
- on accepted stream) (Mark Karpeles, Pierre)
-- Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on
- multiple calls). (Ilia)
-- Fixed bug #46088 (RegexIterator::accept - segfault). (Felipe)
-- Fixed bug #46082 (stream_set_blocking() can cause a crash in some
- circumstances). (Felipe)
-- Fixed bug #46064 (Exception when creating ReflectionProperty object
- on dynamicly created property). (Felipe)
-- Fixed bug #46059 (Compile failure under IRIX 6.5.30 building posix.c).
- (Arnaud)
-- Fixed bug #46053 (SplFileObject::seek - Endless loop). (Arnaud)
-- Fixed bug #46051 (SplFileInfo::openFile - memory overlap). (Arnaud)
-- Fixed bug #46047 (SimpleXML converts empty nodes into object with
- nested array). (Rob)
-- Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud)
-- Fixed bug #46029 (Segfault in DOMText when using with Reflection). (Rob)
-- Fixed bug #46026 (bzip2.decompress/zlib.inflate filter tries to decompress
- after end of stream). (Keisial at gmail dot com, Greg)
-- Fixed bug #46024 (stream_select() doesn't return the correct number).
- (Arnaud)
-- Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode).
- (Felipe)
-- Fixed bug #46003 (isset on nonexisting node return unexpected results). (Rob)
-- Fixed bug #45956 (parse_ini_file() does not return false with syntax errors
- in parsed file). (Jani)
-- Fixed bug #45901 (wddx_serialize_value crash with SimpleXMLElement object).
- (Rob)
-- Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and
- 'private' variables). (ilewis at uk dot ibm dot com, Felipe)
-- Fixed bug #45860 (header() function fails to correctly replace all Status
- lines). (Dmitry)
-- Fixed bug #45805 (Crash on throwing exception from error handler). (Dmitry)
-- Fixed bug #45765 (ReflectionObject with default parameters of self::xxx cause
- an error). (Felipe)
-- Fixed bug #45751 (Using auto_prepend_file crashes (out of scope stack address
- use)). (basant dot kukreja at sun dot com)
-- Fixed bug #45722 (mb_check_encoding() crashes). (Moriyoshi)
-- Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter).
- (Jani)
-- Fixed bug #45691 (Some per-dir or runtime settings may leak into other
- requests). (Moriyoshi)
-- Fixed bug #45581 (htmlspecialchars() double encoding &#x hex items). (Arnaud)
-- Fixed bug #45580 (levenshtein() crashes with invalid argument). (Ilia)
-- Fixed bug #45575 (Segfault with invalid non-string as event handler callback).
- (Christian Seiler)
-- Fixed bug #45568 (ISAPI doesn't properly clear auth_digest in header).
- (Patch by: navara at emclient dot com)
-- Fixed bug #45556 (Return value from callback isn't freed). (Felipe)
-- Fixed bug #45555 (Segfault with invalid non-string as
- register_introspection_callback). (Christian Seiler)
-- Fixed bug #45553 (Using XPath to return values for attributes with a
- namespace does not work). (Rob)
-- Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave
- different). (Derick)
-- Fixed bug #45522 (FCGI_GET_VALUES request does not return supplied values).
- (Arnaud)
-- Fixed bug #45486 (mb_send_mail(); header 'Content-Type: text/plain; charset='
- parsing incorrect). (Felipe)
-- Fixed bug #45485 (strip_tags and <?XML tag). (Felipe)
-- Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't
- accept lengths of 1024). (Felipe, andrew at lifescale dot com)
-- Fixed bug #45449 (filesize() regression using ftp wrapper).
- (crrodriguez at suse dot de)
-- Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown
- before shutdown) (basant dot kukreja at sun dot com)
-- Fixed bug #45406 (session.serialize_handler declared by shared extension fails).
- (Kalle, oleg dot grenrus at dynamoid dot com)
-- Fixed bug #45405 (snmp extension memory leak).
- (Federico Cuello, Rodrigo Campos)
-- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). (Ilia)
-- Fixed bug #45373 (php crash on query with errors in params). (Felipe)
-- Fixed bug #45352 (Segmentation fault because of tick function on second
- request). (Dmitry)
-- Fixed bug #45312 (Segmentation fault on second request for array functions).
- (Dmitry)
-- Fixed bug #45303 (Opening php:// wrapper in append mode results in a warning).
- (Arnaud)
-- Fixed bug #45251 (double free or corruption with setAttributeNode()). (Rob)
-- Fixed bug #45226 and #18916 (xmlrpc_set_type() segfaults and wrong behavior
- with valid ISO8601 date string). (Jeff Lawsons)
-- Fixed bug #45220 (curl_read callback returns -1 when needs to return
- size_t (unsigned)). (Felipe)
-- Fixed bug #45181 (chdir() should clear relative entries in stat cache).
- (Arnaud)
-- Fixed bug #45178 (memory corruption on assignment result of "new" by
- reference). (Dmitry)
-- Fixed bug #45166 (substr() overflow changes). (Felipe)
-- Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots)).
- (Fixes CVE-2008-3660) (Dmitry)
-- Fixed bug #45139 (ReflectionProperty returns incorrect declaring class).
- (Felipe)
-- Fixed bug #45124 ($_FILES['upload']['size'] sometimes return zero and some
- times the filesize). (Arnaud)
-- Fixed bug #45028 (CRC32 output endianness is different between crc32() and
- hash()). (Tony)
-- Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
- (Ilia)
-- Fixed bug #44991 (Compile Failure With freetds0.82).
- (jklowden at freetds dot org, matthias at dsx dot at)
-- Fixed bug #44938 (gettext functions crash with overly long domain).
- (Christian Schneider, Ilia)
-- Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
-- Fixed bug #44900 (OpenSSL extension fails to link with OpenSSL 0.9.6).
- (jd at cpanel dot net, Pierre)
-- Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable
- as function parameter. (Rob)
-- Fixed bug #44882 (SOAP extension object decoding bug). (Dmitry)
-- Fixed bug #44830 (Very minor issue with backslash in heredoc). (Matt)
-- Fixed bug #44818 (php://memory writeable when opened read only). (Arnaud)
-- Fixed bug #44811 (Improve error message when creating a new SoapClient
- that contains invalid data). (Markus Fischer, David C)
-- Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia)
-- Fixed bug #44716 (Progress notifications incorrect). (Hannes)
-- Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments).
- (Hannes)
-- Fixed bug #44617 (wrong HTML entity output when substitute_character=entity).
- (Moriyoshi)
-- Fixed bug #44607 (stream_get_line unable to correctly identify the "ending"
- in the stream content). (Arnaud)
-- Fixed bug #44425 (Extending PDO/MySQL class with a __call() function doesn't
- work). (Johannes)
-- Fixed bug #44327 (PDORow::queryString property & numeric offsets / Crash).
- (Felipe)
-- Fixed bug #44251, #41125 (PDO + quote() + prepare() can result in segfault).
- (tsteiner at nerdclub dot net)
-- Fixed bug #44246 (closedir() accepts a file resource opened by fopen()).
- (Dmitry, Tony)
-- Fixed bug #44182 (extract($a, EXTR_REFS) can fail to split copy-on-write
- references). (robin_fernandes at uk dot ibm dot com)
-- Fixed bug #44181 (extract($a, EXTR_OVERWRITE|EXTR_REFS) can fail to create
- references to $a). (robin_fernandes at uk dot ibm dot com)
-- Fixed bug #44127 (UNIX abstract namespace socket connect does not work).
- (Jani)
-- Fixed bug #43993 (mb_substr_count() behaves differently to substr_count()
- with overlapping needles). (Moriyoshi)
-- Fixed Bug #43958 (class name added into the error message). (Dmitry)
-- Fixed bug #43941 (json_encode silently cuts non-UTF8 strings). (Stas)
-- Fixed bug #43925 (Incorrect argument counter in prepared statements with
- pgsql). (Felipe)
-- Fixed bug #43731 (socket_getpeername: cannot use on stdin with inetd).
- (Arnaud)
-- Fixed bug #43723 (SOAP not sent properly from client for <choice>). (Dmitry)
-- Fixed bug #43668 (Added odbc.default_cursortype to control the ODBCcursor
- model). (Patrick)
-- Fixed bug #43666 (Fixed code to use ODBC 3.52 datatypes for 64bit
- systems). (Patrick)
-- Fixed bug #43540 (rfc1867 handler newlength problem). (Arnaud)
-- Fixed bug #43452 (strings containing a weekday, or a number plus weekday
- behaved incorrect of the current day-of-week was the same as the one in the
- phrase). (Derick)
-- Fixed bug #43353 (wrong detection of 'data' wrapper causes notice).
- (gk at gknw dot de, Arnaud)
-- Fixed bug #43053 (Regression: some numbers shown in scientific notation).
- (int-e at gmx dot de)
-- Fixed bug #43045 (SOAP encoding violation on "INF" for type double/float).
- (Dmitry)
-- Fixed bug #42862 (IMAP toolkit crash: rfc822.c legacy routine buffer
- overflow). (Fixes CVE-2008-2829) (Dmitry)
-- Fixed bug #42855 (dns_get_record() doesn't return all text from TXT record).
- (a dot u dot savchuk at gmail dot com)
-- Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines).
- (Nuno)
-- Fixed bug #42718 (FILTER_UNSAFE_RAW not applied when configured as default
- filter). (Arnaud)
-- Fixed bug #42604 ("make test" fails with --with-config-file-scan-dir=path).
- (Jani)
-- Fixed bug #42473 (ob_start php://output and headers). (Arnaud)
-- Fixed bug #42318 (problem with nm on AIX, not finding object files).
- (Dmitry)
-- Fixed bug #42294 (Unified solution for round() based on C99 round). (Ilia)
-- Fixed bug #42078 (pg_meta_data mix tables metadata from different schemas).
- (Felipe)
-- Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones)
-- Fixed bug #41033 (enable signing with DSA keys.
- (gordyf at google dot com, Pierre)
-- Fixed bug #37100 (data is returned truncated with BINARY CURSOR). (Tony)
-- Fixed bug #30312 (crash in sybase_unbuffered_query() function). (Timm)
-- Fixed bug #24679 (pg_* functions doesn't work using schema). (Felipe)
-- Fixed bug #14962 (PECL) (::extractTo 2nd argument is not really optional)
- (Mark van Der Velden)
-- Fixed bug #14032 (Mail() always returns false but mail is sent). (Mikko)
-
-
-01 May 2008, PHP 5.2.6
-- Fixed two possible crashes inside posix extension (Tony)
-- Fixed incorrect heredoc handling when label is used within the block.
- (Matt)
-- Fixed possible stack buffer overflow in FastCGI SAPI. (Andrei Nigmatulin)
-- Fixed sending of uninitialized paddings which may contain some information. (Andrei Nigmatulin)
-- Fixed a bug in formatting timestamps when DST is active in the default timezone (Derick)
-- Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia, Stefan Esser)
-- Fix integer overflow in printf(). (Stas, Maksymilian Aciemowicz)
-- Fixed security issue detailed in CVE-2008-0599. (Rasmus)
-- Fixed potential memleak in stream filter parameter for zlib filter. (Greg)
-- Added Reflection API metadata for the methods of the DOM classes. (Sebastian)
-- Fixed weird behavior in CGI parameter parsing. (Dmitry, Hannes Magnusson)
-- Fixed a safe_mode bypass in cURL identified by Maksymilian Arciemowicz.
- (Ilia)
-- Fixed a bug with PDO::FETCH_COLUMN|PDO::FETCH_GROUP mode when a column # by
- which to group by data is specified. (Ilia)
-- Fixed segfault in filter extension when using callbacks. (Arnar Mar Sig,
- Felipe)
-- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter). (Greg)
-- Upgraded PCRE to version 7.6 (Nuno)
-
-- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
-- Fixed bug #44720 (Prevent crash within session_register()). (Scott)
-- Fixed bug #44703 (htmlspecialchars() does not detect bad character set argument). (Andy Wharmby)
-- Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script) (Dmitry)
-- Fixed bug #44667 (proc_open() does not handle pipes with the mode 'wb' correctly). (Jani)
-- Fixed bug #44663 (Crash in imap_mail_compose if "body" parameter invalid). (Ilia)
-- Fixed bug #44650 (escaepshellscmd() does not check arg count). (Ilia)
-- Fixed bug #44613 (Crash inside imap_headerinfo()). (Ilia, jmessa)
-- Fixed bug #44603 (Order issues with Content-Type/Length headers on POST). (Ilia)
-- Fixed bug #44594 (imap_open() does not validate # of retries parameter). (Ilia)
-- Fixed bug #44591 (imagegif's filename parameter). (Felipe)
-- Fixed bug #44557 (Crash in imap_setacl when supplied integer as username) (Thomas Jarosch)
-- Fixed bug #44487 (call_user_method_array issues a warning when throwing an exception). (David Soria Parra)
-- Fixed bug #44478 (Inconsistent behaviour when assigning new nodes). (Rob, Felipe)
-- Fixed bug #44445 (email validator does not handle domains starting/ending with a -). (Ilia)
-- Fixed bug #44440 (st_blocks undefined under BeOS). (Felipe)
-- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
-- Fixed bug #44388 (Crash inside exif_read_data() on invalid images) (Ilia)
-- Fixed bug #44373 (PDO_OCI extension compile failed). (Felipe)
-- Fixed bug #44333 (SEGFAULT when using mysql_pconnect() with client_flags). (Felipe)
-- Fixed bug #44306 (Better detection of MIPS processors on Windows). (Ilia)
-- Fixed bug #44242 (metaphone('CMXFXM') crashes PHP). (Felipe)
-- Fixed bug #44233 (MSG_PEEK undefined under BeOS R5). (jonathonfreeman at gmail dot com, Ilia)
-- Fixed bug #44216 (strftime segfaults on large negative value). (Derick)
-- Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit platforms). (Derick)
-- Fixed bug #44206 (OCI8 selecting ref cursors leads to ORA-1000 maximum open cursors reached). (Oracle Corp.)
-- Fixed bug #44200 (A crash in PDO when no bound targets exists and yet bound parameters are present). (Ilia)
-- Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
-- Fixed bug #44191 (preg_grep messes up array index). (Felipe)
-- Fixed bug #44189 (PDO setAttribute() does not properly validate values for native numeric options). (Ilia)
-- Fixed bug #44184 (Double free of loop-variable on exception). (Dmitry)
-- Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia)
-- Fixed bug #44166 (Parameter handling flaw in PDO::getAvailableDrivers()). (Ilia)
-- Fixed bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)). (Felipe)
-- Fixed bug #44152 (Possible crash with syslog logging on ZTS builds). (Ilia)
-- Fixed bug #44141 (private parent constructor callable through static function). (Dmitry)
-- Fixed bug #44113 (OCI8 new collection creation can fail with OCI-22303). (Oracle Corp.)
-- Fixed bug #44069 (Huge memory usage with concatenation using . instead of .=). (Dmitry)
-- Fixed bug #44046 (crash inside array_slice() function with an invalid by-ref offset). (Ilia)
-- Fixed bug #44028 (crash inside stream_socket_enable_crypto() when enabling encryption without crypto type). (Ilia)
-- Fixed bug #44018 (RecursiveDirectoryIterator options inconsistancy). (Marcus)
-- Fixed bug #44008 (OCI8 incorrect usage of OCI-Lob->close crashes PHP). (Oracle Corp.)
-- Fixed bug #43998 (Two error messages returned for incorrect encoding for mb_strto[upper|lower]). (Rui)
-- Fixed bug #43994 (mb_ereg 'successfully' matching incorrect). (Rui)
-- Fixed bug #43954 (Memory leak when sending the same HTTP status code multiple times). (Scott)
-- Fixed bug #43927 (koi8r is missing from html_entity_decode()). (andy at demos dot su, Tony)
-- Fixed bug #43912 (Interbase column names are truncated to 31 characters). (Ilia)
-- Fixed bug #43875 (Two error messages returned for $new and $flag argument in mysql_connect()). (Hannes)
-- Fixed bug #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251). (phprus at gmail dot com, Tony)
-- Fixed bug #43841 (mb_strrpos offset is byte count for negative values). (Rui)
-- Fixed bug #43840 (mb_strpos bounds check is byte count rather than a character count). (Rui)
-- Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
-- Fixed bug #43793 (zlib filter is unable to auto-detect gzip/zlib file headers). (Greg)
-- Fixed bug #43703 (Signature compatibility check broken). (Dmitry)
-- Fixed bug #43677 (Inconsistent behaviour of include_path set with php_value). (manuel at mausz dot at)
-- Fixed bug #43663 (Extending PDO class with a __call() function doesn't work). (David Soria Parra)
-- Fixed bug #43647 (Make FindFile use PATH_SEPARATOR instead of ";"). (Ilia)
-- Fixed bug #43635 (mysql extension ingores INI settings on NULL values passed to mysql_connect()). (Ilia)
-- Fixed bug #43620 (Workaround for a bug inside libcurl 7.16.2 that can result in a crash). (Ilia)
-- Fixed bug #43614 (incorrect processing of numerical string keys of array in arbitrary serialized data). (Dmitriy Buldakov, Felipe)
-- Fixed bug #43606 (define missing depencies of the exif extension). (crrodriguez at suse dot de)
-- Fixed bug #43589 (a possible infinite loop in bz2_filter.c). (Greg)
-- Fixed bug #43580 (removed bogus declaration of a non-existent php_is_url() function). (Ilia)
-- Fixed bug #43559 (array_merge_recursive() doesn't behave as expected with duplicate NULL values). (Felipe, Tony)
-- Fixed bug #43533 (escapeshellarg('') returns null). (Ilia)
-- Fixed bug #43527 (DateTime created from a timestamp reports environment timezone). (Derick)
-- Fixed bug #43522 (stream_get_line() eats additional characters). (Felipe, Ilia, Tony)
-- Fixed bug #43507 (SOAPFault HTTP Status 500 - would like to be able to set the HTTP Status). (Dmitry)
-- Fixed bug #43505 (Assign by reference bug). (Dmitry)
-- Fixed bug #43498 (file_exists() on a proftpd server got SIZE not allowed in ASCII mode). (Ilia, crrodriguez at suse dot de)
-- Fixed bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory). (Chris)
-- Fixed bug #43495 (array_merge_recursive() crashes with recursive arrays). (Ilia)
-- Fixed bug #43493 (pdo_pgsql does not send username on connect when password is not available). (Ilia)
-- Fixed bug #43491 (Under certain conditions, file_exists() never returns). (Dmitry)
-- Fixed bug #43483 (get_class_methods() does not list all visible methods). (Dmitry)
-- Fixed bug #43482 (array_pad() does not warn on very small pad numbers). (Ilia)
-- Fixed bug #43457 (Prepared statement with incorrect parms doesn't throw exception with pdo_pgsql driver). (Ilia)
-- Fixed bug #43450 (Memory leak on some functions with implicit object __toString() call). (David C.)
-- Fixed bug #43386 (array_globals not reset to 0 properly on init). (Ilia)
-- Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone). (Ilia)
-- Fixed bug #43373 (pcntl_fork() should not raise E_ERROR on error). (Ilia)
-- Fixed bug #43364 (recursive xincludes don't remove internal xml nodes properly). (Rob, patch from ddb@bitxtender.de)
-- Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is invalid PHP expression and 'e' option is used). (Jani)
-- Fixed bug #43295 (crash because of uninitialized SG(sapi_headers).mimetype). (Dmitry)
-- Fixed bug #43293 (Multiple segfaults in getopt()). (Hannes)
-- Fixed bug #43279 (pg_send_query_params() converts all elements in 'params' to strings). (Ilia)
-- Fixed bug #43276 (Incomplete fix for bug #42739, mkdir() under safe_mode). (Ilia)
-- Fixed bug #43248 (backward compatibility break in realpath()). (Dmitry)
-- Fixed bug #43221 (SimpleXML adding default namespace in addAttribute). (Rob)
-- Fixed bug #43216 (stream_is_local() returns false on "file://"). (Dmitry)
-- Fixed bug #43201 (Crash on using uninitialized vals and __get/__set). (Dmitry)
-- Fixed bug #43182 (file_put_contents() LOCK_EX does not work properly on file truncation). (Ilia)
-- Fixed bug #43175 (__destruct() throwing an exception with __call() causes segfault). (Dmitry)
-- Fixed bug #43128 (Very long class name causes segfault). (Dmitry)
-- Fixed bug #43105 (PHP seems to fail to close open files). (Hannes)
-- Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL). (Jani)
-- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed using a timestamp). (Derick)
-- Fixed bug #42978 (mismatch between number of bound params and values causes a crash in pdo_pgsql). (Ilia)
-- Fixed bug #42945 (preg_split() swallows part of the string). (Nuno)
-- Fixed bug #42937 (__call() method not invoked when methods are called on parent from child class). (Dmitry)
-- Fixed bug #42841 (REF CURSOR and oci_new_cursor() crash PHP). (Chris)
-- Fixed bug #42838 (Wrong results in array_diff_uassoc) (Felipe)
-- Fixed bug #42779 (Incorrect forcing from HTTP/1.0 request to HTTP/1.1 response). (Ilia)
-- Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony)
-- Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer). (Dmitry)
-- Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (Hartmut)
-- Fixed bug #42505 (new sendmail default breaks on Netware platform) (Guenter Knauf)
-- Fixed bug #42369 (Implicit conversion to string leaks memory). (David C., Rob).
-- Fixed bug #42272 (var_export() incorrectly escapes char(0)). (Derick)
-- Fixed bug #42261 (Incorrect lengths for date and boolean data types). (Ilia)
-- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator invalidates DateTimeZone). (Derick)
-- Fixed bug #42177 (Warning "array_merge_recursive(): recursion detected" comes again...). (Felipe)
-- Fixed bug #41941 (oci8 extension not lib64 savvy). (Chris)
-- Fixed bug #41828 (Failing to call RecursiveIteratorIterator::__construct() causes a sefault). (Etienne)
-- Fixed bug #41599 (setTime() fails after modify() is used). (Derick)
-- Fixed bug #41562 (SimpleXML memory issue). (Rob)
-- Fixed bug #40013 (php_uname() does not return nodename on Netware (Guenter Knauf)
-- Fixed bug #38468 (Unexpected creation of cycle). (Dmitry)
-- Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build) (stotty at tvnet dot hu)
-
-08 Nov 2007, PHP 5.2.5
-- Upgraded PCRE to version 7.3 (Nuno)
-- Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
-- Added alpha support for imagefilter() IMG_FILTER_COLORIZE. (Pierre)
-- Added ability to control memory consumption between request using
- ZEND_MM_COMPACT environment variable. (Dmitry)
-
-- Improved speed of array_intersect_key(), array_intersect_assoc(),
- array_uintersect_assoc(), array_diff_key(), array_diff_assoc() and
- array_udiff_assoc(). (Dmitry)
-
-- Fixed move_uploaded_file() to always set file permissions of resulting file
- according to UMASK. (Andrew Sitnikov)
-- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
-- Fixed regression in glob() when enforcing safe_mode/open_basedir checks on
- paths containing '*'. (Ilia)
-- Fixed "mail.force_extra_parameters" php.ini directive not to be modifiable
- in .htaccess due to the security implications - reported by SecurityReason.
- (Stas)
-- Fixed PDO crash when driver returns empty LOB stream. (Stas)
-- Fixed dl() to only accept filenames - reported by Laurent Gaffie. (Stas)
-- Fixed dl() to limit argument size to MAXPATHLEN (CVE-2007-4887).
- (Christian Hoffmann)
-- Fixed iconv_*() functions to limit argument sizes as workaround to libc
- bug (CVE-2007-4783, CVE-2007-4840 by Laurent Gaffie).
- (Christian Hoffmann, Stas)
-- Fixed missing brackets leading to build warning and error in the log.
- Win32 code. (Andrey)
-- Fixed leaks with multiple connects on one mysqli object. (Andrey)
-- Fixed endianness detection on MacOS when building universal binary.
- (Uwe Schindler, Christian Speich, Tony)
-- Fixed possible triggering of buffer overflows inside glibc
- implementations of the fnmatch(), setlocale() and glob() functions.
- Reported by Laurent Gaffie. (Ilia)
-- Fixed imagerectangle regression with 1x1 rectangle (libgd #106). (Pierre)
-- Fixed htmlentities/htmlspecialchars not to accept partial multibyte
- sequences. (Stas)
-
-- Fixed bug #43196 (array_intersect_assoc() crashes with non-array input).
- (Jani)
-- Fixed bug #43139 (PDO ignores ATTR_DEFAULT_FETCH_MODE in some cases with
- fetchAll()). (Ilia)
-- Fixed bug #43137 (rmdir() and rename() do not clear statcache). (Jani)
-- Fixed bug #43130 (Bound parameters cannot have - in their name). (Ilia)
-- Fixed bug #43099 (XMLWriter::endElement() does not check # of params).
- (Ilia)
-- Fixed bug #43020 (Warning message is missing with shuffle() and more
- than one argument). (Scott)
-- Fixed bug #42976 (Crash when constructor for newInstance() or
- newInstanceArgs() fails) (Ilia)
-- Fixed bug #42943 (ext/mssql: Move *timeout initialization from RINIT
- to connect time). (Ilia)
-- Fixed bug #42917 (PDO::FETCH_KEY_PAIR doesn't work with setFetchMode).
- (Ilia)
-- Fixed bug #42890 (Constant "LIST" defined by mysqlclient and c-client).
- (Andrey)
-- Fixed bug #42869 (automatic session id insertion adds sessions id to
- non-local forms). (Ilia)
-- Fixed bug #42818 ($foo = clone(array()); leaks memory). (Dmitry)
-- Fixed bug #42817 (clone() on a non-object does not result in a fatal
- error). (Ilia)
-- Fixed bug #42785 (json_encode() formats doubles according to locale rather
- then following standard syntax). (Ilia)
-- Fixed bug #42783 (pg_insert() does not accept an empty list for
- insertion). (Ilia)
-- Fixed bug #42773 (WSDL error causes HTTP 500 Response). (Dmitry)
-- Fixed bug #42772 (Storing $this in a static var fails while handling a cast
- to string). (Dmitry)
-- Fixed bug #42767 (highlight_string() truncates trailing comment). (Ilia)
-- Fixed bug #42739 (mkdir() doesn't like a trailing slash when safe_mode is
- enabled). (Ilia)
-- Fixed bug #42703 (Exception raised in an iterator::current() causes segfault
- in FilterIterator) (Marcus)
-- Fixed bug #42699 (PHP_SELF duplicates path). (Dmitry)
-- Fixed bug #42654 (RecursiveIteratorIterator modifies only part of leaves)
- (Marcus)
-- Fixed bug #42643 (CLI segfaults if using ATTR_PERSISTENT). (Ilia)
-- Fixed bug #42637 (SoapFault : Only http and https are allowed). (Bill Moran)
-- Fixed bug #42629 (Dynamically loaded PHP extensions need symbols exported
- on MacOSX). (jdolecek at NetBSD dot org)
-- Fixed bug #42627 (bz2 extension fails to build with -fno-common).
- (dolecek at netbsd dot org)
-- Fixed Bug #42596 (session.save_path MODE option does not work). (Ilia)
-- Fixed bug #42590 (Make the engine recognize \v and \f escape sequences).
- (Ilia)
-- Fixed bug #42587 (behavior change regarding symlinked .php files). (Dmitry)
-- Fixed bug #42579 (apache_reset_timeout() does not exist). (Jani)
-- Fixed bug #42549 (ext/mysql failed to compile with libmysql 3.23). (Scott)
-- Fixed bug #42523 (PHP_SELF duplicates path). (Dmitry)
-- Fixed bug #42512 (ip2long('255.255.255.255') should return 4294967295 on
- 64-bit PHP). (Derick)
-- Fixed bug #42506 (php_pgsql_convert() timezone parse bug) (nonunnet at
- gmail dot com, Ilia)
-- Fixed bug #42496 (OCI8 cursor is not closed when using 2 clobs in a select
- query). (Oracle Corp.)
-- Fixed bug #42462 (Segmentation when trying to set an attribute in a
- DOMElement). (Rob)
-- Fixed bug #42453 (CGI SAPI does not shut down cleanly with -i/-m/-v cmdline
- options). (Dmitry)
-- Fixed bug #42452 (PDO classes do not expose Reflection API information).
- (Hannes)
-- Fixed bug #42468 (Write lock on file_get_contents fails when using a
- compression stream). (Ilia)
-- Fixed bug #42488 (SoapServer reports an encoding error and the error itself
- breaks). (Dmitry)
-- Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion). (Andrey)
-- Fixed bug #42359 (xsd:list type not parsed). (Dmitry)
-- Fixed bug #42326 (SoapServer crash). (Dmitry)
-- Fixed bug #42214 (SoapServer sends clients internal PHP errors). (Dmitry)
-- Fixed bug #42189 (xmlrpc_set_type() crashes php on invalid datetime
- values). (Ilia)
-- Fixed bug #42139 (XMLReader option constants are broken using XML()). (Rob)
-- Fixed bug #42086 (SoapServer return Procedure '' not present for WSIBasic
- compliant wsdl). (Dmitry)
-- Fixed bug #41822 (Relative includes broken when getcwd() fails). (Ab5602,
- Jani)
-- Fixed bug #41561 (Values set with php_admin_* in httpd.conf can be overwritten
- with ini_set()). (Stas, Jani)
-- Fixed bug #39651 (proc_open() append mode doesn't work on windows). (Nuno)
-
-30 Aug 2007, PHP 5.2.4
-- Removed --enable-versioning configure option. (Jani)
-
-- Upgraded PCRE to version 7.2 (Nuno)
-- Updated timezone database to version 2007.6. (Derick)
-
-- Improved openssl_x509_parse() to return extensions in readable form. (Dmitry)
-
-- Enabled changing the size of statement cache for non-persistent OCI8
- connections. (Chris Jones, Tony)
-
-- Changed "display_errors" php.ini option to accept "stderr" as value which
- makes the error messages to be outputted to STDERR instead of STDOUT with
- CGI and CLI SAPIs (FR #22839). (Jani)
-- Changed error handler to send HTTP 500 instead of blank page on PHP errors.
- (Dmitry, Andrei Nigmatulin)
-- Changed mail() function to be always available. (Johannes)
-
-- Added check for unknown options passed to configure. (Jani)
-- Added persistent connection status checker to pdo_pgsql.
- (Elvis Pranskevichus, Ilia)
-- Added support for ATTR_TIMEOUT inside pdo_pgsql driver. (Ilia)
-- Added php_ini_loaded_file() function which returns the path to the actual
- php.ini in use. (Jani)
-- Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION,
- GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)
-- Added missing open_basedir checks to CGI.
- (anight at eyelinkmedia dot com, Tony)
-- Added missing format validator to unpack() function. (Ilia)
-- Added missing error check inside bcpowmod(). (Ilia)
-- Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants.
- (Andrey A. Belashkov, Tony)
-- Added missing MSG_EOR and MSG_EOF constants to sockets extension. (Jani)
-- Added PCRE_VERSION constant. (Tony)
-- Added ReflectionExtension::info() function to print the phpinfo()
- block for an extension. (Johannes)
-
-- Implemented FR #41884 (ReflectionClass::getDefaultProperties() does not
- handle static attributes). (Tony)
-
-- Fixed "Floating point exception" inside wordwrap().
- (Mattias Bengtsson, Ilia)
-- Fixed several integer overflows in ImageCreate(), ImageCreateTrueColor(),
- ImageCopyResampled() and ImageFilledPolygon() reported by Mattias Bengtsson.
- (Tony)
-- Fixed size calculation in chunk_split(). (Stas)
-- Fixed integer overflow in str[c]spn(). (Stas)
-- Fixed money_format() not to accept multiple %i or %n tokens.
- (Stas, Ilia)
-- Fixed zend_alter_ini_entry() memory_limit interruption
- vulnerability. (Ilia)
-- Fixed INFILE LOCAL option handling with MySQL extensions not to be
- allowed when open_basedir or safe_mode is active. (Stas)
-- Fixed session.save_path and error_log values to be checked against
- open_basedir and safe_mode (CVE-2007-3378) (Stas, Maksymilian Arciemowicz)
-- Fixed possible invalid read in glob() win32 implementation (CVE-2007-3806).
- (Tony)
-- Improved fix for MOPB-03-2007. (Ilia)
-- Corrected fix for CVE-2007-2872. (Ilia)
-
-- Fixed possible crash in imagepsloadfont(), work around a bug in the pslib on
- Windows. (Pierre)
-- Fixed oci8 and PDO_OCI extensions to allow configuring with Oracle 11g
- client libraries. (Chris Jones)
-- Fixed EOF handling in case of reading from file opened in write only mode.
- (Dmitry)
-- Fixed var_export() to use the new H modifier so that it can generate
- parseable PHP code for floats, independent of the locale. (Derick)
-- Fixed regression introduced by the fix for the libgd bug #74. (Pierre)
-- Fixed SimpleXML's behavior when used with empty(). (Sara)
-- Fixed crash in OpenSSL extension because of non-string passphrase. (Dmitry)
-
-- Fixed PECL Bug #11345 (PDO_OCI crash after National language Support "NLS"
- environment initialization error). (Chris Jones)
-- Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory
- already exists). (Pierre)
-
-- Fixed bug #43926 (isInstance() isn't equivalent to instanceof operator). (Marcus)
-- Fixed bug #42368 (Incorrect error message displayed by pg_escape_string).
- (Ilia)
-- Fixed bug #42365 (glob() crashes and/or accepts way too many flags).
- (Jani)
-- Fixed Bug #42364 (Crash when using getRealPath with DirectoryIterator).
- (Johannes)
-- Fixed bug #42292 ($PHP_CONFIG not set for phpized builds). (Jani)
-- Fixed bug #42261 (header wrong for date field).
- (roberto at spadim dot com dot br, Ilia)
-- Fixed bug #42259 (SimpleXMLIterator loses ancestry). (Rob)
-- Fixed bug #42247 (ldap_parse_result() not defined under win32). (Jani)
-- Fixed bug #42243 (copy() does not output an error when the first arg is a
- dir). (Ilia)
-- Fixed bug #42242 (sybase_connect() crashes). (Ilia)
-- Fixed bug #42237 (stream_copy_to_stream returns invalid values for mmaped
- streams). (andrew dot minerd at sellingsource dot com, Ilia)
-- Fixed bug #42233 (Problems with æøå in extract()). (Jani)
-- Fixed bug #42222 (possible buffer overflow in php_openssl_make_REQ). (Pierre)
-- Fixed bug #42211 (property_exists() fails to find protected properties
- from a parent class). (Dmitry)
-- Fixed bug #42208 (substr_replace() crashes when the same array is passed
- more than once). (crrodriguez at suse dot de, Ilia)
-- Fixed bug #42198 (SCRIPT_NAME and PHP_SELF truncated when inside a userdir
- and using PATH_INFO). (Dmitry)
-- Fixed bug #42195 (C++ compiler required always). (Jani)
-- Fixed bug #42183 (classmap causes crash in non-wsdl mode). (Dmitry)
-- Fixed bug #42173 (oci8 INTERVAL and TIMESTAMP type fixes). (Chris)
-- Fixed bug #42151 (__destruct functions not called after catching a SoapFault
- exception). (Dmitry)
-- Fixed bug #42142 (substr_replace() returns FALSE when length > string length).
- (Ilia)
-- Fixed bug #42135 (Second call of session_start() causes creation of SID).
- (Ilia)
-- Fixed bug #42134 (oci_error() returns false after oci_new_collection() fails).
- (Tony)
-- Fixed bug #42119 (array_push($arr,&$obj) doesn't work with
- zend.ze1_compatibility_mode On). (Dmitry)
-- Fixed bug #42117 (bzip2.compress loses data in internal buffer).
- (Philip, Ilia)
-- Fixed bug #42112 (deleting a node produces memory corruption). (Rob)
-- Fixed bug #42107 (sscanf broken when using %2$s format parameters). (Jani)
-- Fixed bug #42090 (json_decode causes segmentation fault). (Hannes)
-- Fixed bug #42082 (NodeList length zero should be empty). (Hannes)
-- Fixed bug #42072 (No warning message for clearstatcache() with arguments).
- (Ilia)
-- Fixed bug #42071 (ini scanner allows using NULL as option name). (Jani)
-- Fixed bug #42027 (is_file() / is_dir() matches file/dirnames with wildcard char
- or trailing slash in Windows). (Dmitry)
-- Fixed bug #42019 (configure option --with-adabas=DIR does not work). (Jani)
-- Fixed bug #42015 (ldap_rename(): server error "DSA is unwilling to perform").
- (bob at mroczka dot com, Jani)
-- Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in the
- same way as "instanceof" operator). (Dmitry)
-- Fixed bug #41989 (move_uploaded_file() & relative path in ZTS mode). (Tony)
-- Fixed bug #41984 (Hangs on large SoapClient requests). (Dmitry)
-- Fixed bug #41983 (Error Fetching http headers terminated by '\n'). (Dmitry)
-- Fixed bug #41973 (--with-ldap=shared fails with LDFLAGS="-Wl,--as-needed"). (Nuno)
-- Fixed bug #41971 (PDOStatement::fetch and PDOStatement::setFetchMode causes
- unexpected behavior). (Ilia)
-- Fixed bug #41964 (strtotime returns a timestamp for non-time string of
- pattern '(A|a) .+'). (Derick)
-- Fixed bug #41961 (Ensure search for hidden private methods does not stray from
- class hierarchy). (robin_fernandes at uk dot ibm dot com)
-- Fixed bug #41947 (SimpleXML incorrectly registers empty strings asnamespaces).
- (Rob)
-- Fixed bug #41929 (Foreach on object does not iterate over all visible properties).
- (Dmitry)
-- Fixed bug #41919 (crash in string to array conversion).
- (judas dot iscariote at gmail dot com, Ilia)
-- Fixed bug #41909 (var_export() is locale sensitive when exporting float
- values). (Derick)
-- Fixed bug #41908 (CFLAGS="-Os" ./configure --enable-debug fails).
- (christian at hoffie dot info, Tony)
-- Fixed bug #41904 (proc_open(): empty env array should cause empty environment
- to be passed to process). (Jani)
-- Fixed bug #41867 (SimpleXML: getName is broken). (Rob)
-- Fixed bug #41865 (fputcsv(): 2nd parameter is not optional). (Jani)
-- Fixed bug #41861 (SimpleXML: getNamespaces() returns the namespaces of a node's
- siblings). (Rob)
-- Fixed bug #41845 (pgsql extension does not compile with PostgreSQL <7.4). (Ilia)
-- Fixed bug #41844 (Format returns incorrect number of digits for negative years
- -0001 to -0999). (Derick)
-- Fixed bug #41842 (Cannot create years < 0100 & negative years with date_create
- or new DateTime). (Derick)
-- Fixed bug #41833 (addChild() on a non-existent node, no node created,
- getName() segfaults). (Rob)
-- Fixed bug #41831 (pdo_sqlite prepared statements convert resources to
- strings). (Ilia)
-- Fixed bug #41815 (Concurrent read/write fails when EOF is reached). (Sascha)
-- Fixed bug #41813 (segmentation fault when using string offset as an object).
- (judas dot iscariote at gmail dot com, Tony)
-- Fixed bug #41795 (checkdnsrr does not support DNS_TXT type).
- (lucas at facebook dot com, Tony)
-- Fixed bug #41773 (php_strip_whitespace() sends headers with errors
- suppressed). (Tony)
-- Fixed bug #41770 (SSL: fatal protocol error due to buffer issues). (Ilia)
-- Fixed bug #41765 (Recode crashes/does not work on amd64).
- (nexus at smoula dot net, Stas)
-- Fixed bug #41724 (libxml_get_last_error() - errors service request scope).
- (thekid at php dot net, Ilia)
-- Fixed bug #41717 (imagepolygon does not respect thickness). (Pierre)
-- Fixed bug #41713 (Persistent memory consumption on win32 since 5.2). (Dmitry)
-- Fixed bug #41711 (NULL temporary lobs not supported in OCI8).
- (Chris Jones, Tony)
-- Fixed bug #41709 (strtotime() does not handle 00.00.0000). (Derick)
-- Fixed bug #41698 (float parameters truncated to integer in prepared
- statements). (Ilia)
-- Fixed bug #41692 (ArrayObject shows weird behavior in respect to
- inheritance). (Tony)
-- Fixed bug #41691 (ArrayObject::exchangeArray hangs Apache). (Tony)
-- Fixed bug #41686 (Omitting length param in array_slice not possible). (Ilia)
-- Fixed bug #41685 (array_push() fails to warn when next index is
- already occupied). (Ilia)
-- Fixed bug #41655 (open_basedir bypass via glob()). (Ilia)
-- Fixed bug #41640 (get_class_vars produces error on class constants).
- (Johannes)
-- Fixed bug #41635 (SoapServer and zlib.output_compression with FastCGI
- result in major slowdown). (Dmitry)
-- Fixed bug #41633 (Crash instantiating classes with self-referencing
- constants). (Dmitry)
-- Fixed bug #41630 (segfault when an invalid color index is present in the
- image data). (Reported by Elliot <wccoder@gmail dot com>) (Pierre)
-- Fixed bug #41628 (PHP settings leak between Virtual Hosts in Apache 1.3).
- (Scott, manuel at mausz dot at)
-- Fixed bug #41608 (segfault on a weird code with objects and switch()).
- (Tony)
-- Fixed bug #41600 (url rewriter tags doesn't work with namespaced tags).
- (Ilia)
-- Fixed bug #41596 (Fixed a crash inside pdo_pgsql on some non-well-formed
- SQL queries). (Ilia)
-- Fixed bug #41594 (OCI8 statement cache is flushed too frequently). (Tony)
-- Fixed bug #41582 (SimpleXML crashes when accessing newly created element).
- (Tony)
-- Fixed bug #41576 (configure failure when using --without-apxs or some other
- SAPIs disabling options). (Jani)
-- Fixed bug #41567 (json_encode() double conversion is inconsistent with PHP).
- (Lucas, Ilia)
-- Fixed bug #41566 (SOAP Server not properly generating href attributes).
- (Dmitry)
-- Fixed bug #41555 (configure failure: regression caused by fix for #41265).
- (Jani)
-- Fixed bug #41527 (WDDX deserialize numeric string array key).
- (Matt, Ilia)
-- Fixed bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30).
- (Derick)
-- Fixed bug #41518 (file_exists() warns of open_basedir restriction on
- non-existent file). (Tony)
-- Fixed bug #41445 (parse_ini_file() has a problem with certain types of
- integer as sections). (Tony)
-- Fixed bug #41433 (DBA: configure fails to include correct db.h for db4).
- (Jani)
-- Fixed bug #41372 (Internal pointer of source array resets during array
- copying). (Dmitry)
-- Fixed bug #41350 (my_thread_global_end() error during request shutdown on
- Windows). (Scott, Andrey)
-- Fixed bug #41278 (get_loaded_extensions() should list Zend extensions).
- (Johannes)
-- Fixed bug #41127 (Memory leak in ldap_{first|next}_attribute functions).
- (Jani)
-- Fixed bug #40757 (get_object_vars get nothing in child class). (Dmitry)
-- Fixed bug #40705 (Iterating within function moves original array pointer).
- (Dmitry)
-- Fixed bug #40509 (key() function changed behaviour if global array is used
- within function). (Dmitry)
-- Fixed bug #40419 (Trailing slash in CGI request does not work). (Dmitry)
-- Fixed bug #39330 (apache2handler does not call shutdown actions before
- apache child die). (isk at ecommerce dot com, Gopal, Tony)
-- Fixed bug #39291 (ldap_sasl_bind() misses the sasl_authc_id parameter).
- (diafour at gmail dot com, Jani)
-- Fixed bug #37715 (array pointers resetting on copy). (Dmitry)
-- Fixed bug #37273 (Symlinks and mod_files session handler allow open_basedir
- bypass). (Ilia)
-- Fixed bug #36492 (Userfilters can leak buckets). (Sara)
-- Fixed bugs #36796, #36918, #41371 (stream_set_blocking() does not work).
- (Jani)
-- Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present).
- (Jani)
-- Fixed bug #31892 (PHP_SELF incorrect without cgi.fix_pathinfo, but turning on
- screws up PATH_INFO). (Dmitry)
-- Fixed bug #21197 (socket_read() outputs error with PHP_NORMAL_READ).
- (Nuno, Jani)
-
-31 May 2007, PHP 5.2.3
-- Changed CGI install target to php-cgi and 'make install' to install CLI
- when CGI is selected. (Jani)
-- Changed JSON maximum nesting depth from 20 to 128. (Rasmus)
-
-- Improved compilation of heredocs and interpolated strings. (Matt, Dmitry)
-- Optimized out a couple of per-request syscalls. (Rasmus)
-- Optimized digest generation in md5() and sha1() functions. (Ilia)
-- Upgraded bundled SQLite 3 to version 3.3.17. (Ilia)
-
-- Added "max_input_nesting_level" php.ini option to limit nesting level of
- input variables. Fix for MOPB-03-2007. (Stas)
-- Added a 4th parameter flag to htmlspecialchars() and htmlentities() that
- makes the function not encode existing html entities. (Ilia)
-- Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into
- an associated array. (Ilia)
-- Added CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS cURL constants. (Sara)
-- Added --ini switch to CLI that prints out configuration file names. (Marcus)
-- Added mysql_set_charset() to allow runtime altering of connection encoding.
- (Scott)
-
-- Implemented FR #41416 (getColumnMeta() should also return table name). (Tony)
-
-- Fixed an integer overflow inside chunk_split(). Identified by Gerhard Wagner.
- (Ilia)
-- Fixed SOAP extension's handler() to work even when
- "always_populate_raw_post_data" is off. (Ilia)
-- Fixed possible infinite loop in imagecreatefrompng. (libgd #86)
- (by Xavier Roche, CVE-2007-2756). (Pierre)
-- Fixed ext/filter Email Validation Vulnerability (MOPB-45 by Stefan Esser).
- (Ilia)
-- Fixed altering $this via argument named "this". (Dmitry)
-- Fixed PHP CLI usage of php.ini from the binary location. (Hannes)
-- Fixed segfault in strripos(). (Tony, Joxean Koret)
-- Fixed bug #41693 (scandir() allows empty directory names). (Ilia)
-- Fixed bug #41673 (json_encode breaks large numbers in arrays). (Ilia)
-- Fixed bug #41525 (ReflectionParameter::getPosition() not available). (Marcus)
-- Fixed bug #41511 (Compile failure under IRIX 6.5.30 building md5.c). (Jani)
-- Fixed bug #41504 (json_decode() incorrectly decodes JSON arrays with empty
- string keys). (Ilia)
-- Fixed bug #41492 (open_basedir/safe_mode bypass inside realpath()). (Ilia)
-- Fixed bug #41477 (no arginfo about SoapClient::__soapCall()). (Ilia)
-- Fixed bug #41455 (ext/dba/config.m4 pollutes global $LIBS and $LDFLAGS).
- (mmarek at suse dot cz, Tony)
-- Fixed bug #41442 (imagegd2() under output control). (Tony)
-- Fixed bug #41430 (Fatal error with negative values of maxlen parameter of
- file_get_contents()). (Tony)
-- Fixed bug #41423 (PHP assumes wrongly that certain ciphers are enabled in
- OpenSSL). (Pierre)
-- Fixed bug #41421 (Uncaught exception from a stream wrapper segfaults).
- (Tony, Dmitry)
-- Fixed bug #41403 (json_decode cannot decode floats if localeconv
- decimal_point is not '.'). (Tony)
-- Fixed bug #41401 (wrong unary operator precedence). (Stas)
-- Fixed bug #41394 (dbase_create creates file with corrupted header). (Tony)
-- Fixed bug #41390 (Clarify error message with invalid protocol scheme).
- (Scott)
-- Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in
- "Status:" header). (anight at eyelinkmedia dot com, Dmitry)
-- Fixed bug #41374 (whole text concats values of wrong nodes). (Rob)
-- Fixed bug #41358 (configure cannot determine SSL lib with libcurl >= 7.16.2).
- (Mike)
-- Fixed bug #41353 (crash in openssl_pkcs12_read() on invalid input). (Ilia)
-- Fixed bug #41351 (Invalid opcode with foreach ($a[] as $b)). (Dmitry, Tony)
-- Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott)
-- Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings). (Dmitry)
-- Fixed bug #41326 (Writing empty tags with Xmlwriter::WriteElement[ns])
- (Pierre)
-- Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).
- (Ilia)
-- Fixed bug #41304 (compress.zlib temp files left). (Dmitry)
-- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
- default post handler). (Ilia)
-- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR).
- (fmajid at kefta dot com, Dmitry)
-- Fixed gd build when used with freetype 1.x (Pierre, Tony)
-- Fixed bug #41287 (Namespace functions don't allow xmlns definition to be
- optional). (Rob)
-- Fixed bug #41285 (Improved fix for CVE-2007-1887 to work with non-bundled
- sqlite2 lib). (Ilia)
-- Fixed bug #41283 (Bug with deserializing array key that are doubles or
- floats in wddx). (Ilia)
-- Fixed bug #41257 (lookupNamespaceURI does not work as expected). (Rob)
-- Fixed bug #41236 (Regression in timeout handling of non-blocking SSL
- connections during reads and writes). (Ilia)
-- Fixed bug #41134 (zend_ts_hash_clean not thread-safe).
- (marco dot cova at gmail dot com, Tony)
-- Fixed bug #41097 (ext/soap returning associative array as indexed without
- using WSDL). (Dmitry)
-- Fixed bug #41004 (minOccurs="0" and null class member variable). (Dmitry)
-- Fixed bug #39542 (Behavior of require/include different to < 5.2.0).
- (Dmitry)
-
-03 May 2007, PHP 5.2.2
-- Improved bundled GD
- . Sync to 2.0.35
- . Added imagegrabwindow and imagegrabscreen, capture a screen or a
- window using its handle (Pierre)
- . colors allocated henceforth from the resulting image overwrite the palette
- colors (Rob Leslie)
- . Improved thread safety of the gif support (Roman Nemecek, Nuno, Pierre)
- . Use the dimension of the GIF frame to create the destination image (Pierre)
- . Load only once the local color map from a GIF data (Pierre)
- . Improved thread safety of the freetype cache (Scott MacVicar, Nuno, Pierre)
- . imagearc huge CPU usage with large angles, libgd bug #74 (Pierre)
-- Improved FastCGI SAPI to support external pipe and socket servers on win32.
- (Dmitry)
-- Improved Zend Memory Manager
- . guarantee of reasonable time for worst cases of best-fit free block
- searching algorithm. (Dmitry)
- . better cache usage and less fragmentation on erealloc() (Tony, Dmitry)
-- Improved SPL (Marcus)
- . Added SplFileInfo::getBasename(), DirectoryIterator::getBasename().
- . Added SplFileInfo::getLinkTarget(), SplFileInfo::getRealPath().
- . Made RecursiveFilterIterator::accept() abstract as stated in documentation.
-- Improved SOAP
- . Added ability to encode arrays with "SOAP-ENC:Array" type instead of WSDL
- type. To activate the ability use "feature"=>SOAP_USE_XSI_ARRAY_TYPE
- option in SoapClient/SoapServer constructors. (Rob, Dmitry)
-
-- Added GMP_VERSION constant. (Tony)
-- Added --ri switch to CLI which allows to check extension information. (Marcus)
-- Added tidyNode::getParent() method (John, Nuno)
-- Added openbasedir and safemode checks in zip:// stream wrapper and
- ZipArchive::open (Pierre)
-- Added php_pdo_sqlite_external.dll, a version of the PDO SQLite driver that
- links against an external sqlite3.dll. This provides Windows users to upgrade
- their sqlite3 version outside of the PHP release cycle. (Wez, Edin)
-- Added linenumbers to array returned by token_get_all(). (Johannes)
-
-- Upgraded SQLite 3 to version 3.3.16 (Ilia)
-- Upgraded libraries bundled in the Windows distribution. (Edin)
- . c-client (imap) to version 2006e
- . libpq (PostgreSQL) to version 8.2.3
- . libmysql (MySQL) to version 5.0.37
- . openssl to version 0.9.8e
-- Upgraded PCRE to version 7.0 (Nuno)
-
-- Updated timezone database to version 2007.5. (Derick)
-
-- Fixed commandline handling for CLI and CGI. (Marcus, Johannes)
-- Fixed iterator_apply() with a callback using __call(). (Johannes)
-- Fixed possible multi bytes issues in openssl csr parser (Pierre)
-- Fixed shmop_open() with IPC_CREAT|IPC_EXCL flags on Windows.
- (Vladimir Kamaev, Tony).
-- Fixed possible leak in ZipArchive::extractTo when safemode checks fails (Ilia)
-- Fixed possible relative path issues in zip_open and TS mode (old API) (Pierre)
-- Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
-- Fixed a thread safety issue in gd gif read code (Nuno, Roman Nemecek)
-- Fixed CVE-2007-1001, GD wbmp used with invalid image size (Pierre)
-- Fixed unallocated memory access/double free in in array_user_key_compare()
- (MOPB-24 by Stefan Esser) (Stas)
-- Fixed wrong length calculation in unserialize S type
- (MOPB-29 by Stefan Esser) (Stas)
-
-- Fixed bug #41215 (setAttribute return code reversed). (Ilia)
-- Fixed bug #41192 (Per Directory Values only work for one key). (Dmitry)
-- Fixed bug #41175 (addAttribute() fails to add an attribute with an empty
- value). (Ilia)
-- Fixed bug #41159 (mysql_pconnect() hash does not account for connect
- flags). (Ilia)
-- Fixed bug #41121 (range() overflow handling for large numbers on 32bit
- machines). (Ilia)
-- Fixed bug #41118 (PHP does not handle overflow of octal integers). (Tony)
-- Fixed bug #41109 (recursiveiterator.inc says "implements" Iterator instead of
- "extends"). (Marcus)
-- Fixed bug #40130 (TTF usage doesn't work properly under Netware). (Scott,
- gk at gknw dot de)
-- Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys). (Arpad, Ilia)
-- Fixed bug #41075 (memleak when creating default object caused exception).
- (Dmitry)
-- Fixed bug #41067 (json_encode() problem with UTF-16 input). (jp at df5ea
- dot net. Ilia)
-- Fixed bug #41063 (chdir doesn't like root paths). (Dmitry)
-- Fixed bug #41061 ("visibility error" in ReflectionFunction::export()).
- (Johannes)
-- Fixed bug #41043 (pdo_oci crash when freeing error text with persistent
- connection). (Tony)
-- Fixed bug #41037 (unregister_tick_function() inside the tick function crash PHP).
- (Tony)
-- Fixed bug #41034 (json_encode() ignores null byte started keys in arrays).
- (Ilia)
-- Fixed bug #41026 (segfault when calling "self::method()" in shutdown functions).
- (Tony)
-- Fixed bug #40999 (mcrypt_create_iv() not using random seed). (Ilia)
-- Fixed bug #40998 (long session array keys are truncated). (Tony)
-- Implement feature request #40947, allow a single filter as argument
- for filter_var_array (Pierre)
-- Fixed bug #40935 (pdo_mysql does not raise an exception on empty
- fetchAll()). (Ilia)
-- Fixed bug #40931 (open_basedir bypass via symlink and move_uploaded_file()).
- (Tony)
-- Fixed bug #40921 (php_default_post_reader crashes when post_max_size is
- exceeded). (trickie at gmail dot com, Ilia)
-- Fixed bug #40915 (addcslashes unexpected behavior with binary input). (Tony)
-- Fixed bug #40899 (memory leak when nesting list()). (Dmitry)
-- Fixed bug #40897 (error_log file not locked). (Ilia)
-- Fixed bug #40883 (mysql_query() is allocating memory incorrectly). (Tony)
-- Fixed bug #40872 (inconsistency in offsetSet, offsetExists treatment of
- string enclosed integers). (Marcus)
-- Fixed bug #40861 (strtotime() doesn't handle double negative relative time
- units correctly). (Derick, Ilia)
-- Fixed bug #40854 (imap_mail_compose() creates an invalid terminator for
- multipart e-mails). (Ilia)
-- Fixed bug #40848 (sorting issue on 64-bit Solaris). (Wez)
-- Fixed bug #40836 (Segfault in ext/dom). (Rob)
-- Fixed bug #40833 (Crash when using unset() on an ArrayAccess object retrieved
- via __get()). (Dmitry)
-- Fixed bug #40822 (pdo_mysql does not return rowCount() on select). (Ilia)
-- Fixed bug #40815 (using strings like "class::func" and static methods in
- set_exception_handler() might result in crash). (Tony)
-- Fixed bug #40809 (Poor performance of ".="). (Dmitry)
-- Fixed bug #40805 (Failure executing function ibase_execute()). (Tony)
-- Fixed bug #40800 (cannot disable memory_limit with -1). (Dmitry, Tony)
-- Fixed bug #40794 (ReflectionObject::getValues() may crash when used with
- dynamic properties). (Tony)
-- Fixed bug #40784 (Case sensitivity in constructor's fallback). (Tony)
-- Fixed bug #40770 (Apache child exits when PHP memory limit reached). (Dmitry)
-- Fixed bug #40764 (line thickness not respected for horizontal and vertical
- lines). (Pierre)
-- Fixed bug #40758 (Test fcgi_is_fastcgi() is wrong on windows). (Dmitry)
-- Fixed bug #40754 (added substr() & substr_replace() overflow checks). (Ilia)
-- Fixed bug #40752 (parse_ini_file() segfaults when a scalar setting is
- redeclared as an array). (Tony)
-- Fixed bug #40750 (openssl stream wrapper ignores default_stream_timeout).
- (Tony)
-- Fixed bug #40727 (segfault in PDO when failed to bind parameters). (Tony)
-- Fixed bug #40709 (array_reduce() behaves strange with one item stored arrays).
- (Ilia)
-- Fixed bug #40703 (Resolved a possible namespace conflict between libxmlrpc
- and MySQL's NDB table handler). (Ilia)
-- Fixed bug #40961 (Incorrect results of DateTime equality check). (Mike)
-- Fixed bug #40678 (Cross compilation fails). (Tony)
-- Fixed bug #40621 (Crash when constructor called inappropriately). (Tony)
-- Fixed bug #40609 (Segfaults when using more than one SoapVar in a request).
- (Rob, Dmitry)
-- Fixed bug #40606 (umask is not being restored when request is finished).
- (Tony)
-- Fixed bug #40598 (libxml segfault). (Rob)
-- Fixed bug #40591 (list()="string"; gives invalid opcode). (Dmitry)
-- Fixed bug #40578 (imagettftext() multithreading issue). (Tony, Pierre)
-- Fixed bug #40576 (double values are truncated to 6 decimal digits when
- encoding). (Tony)
-- Fixed bug #40560 (DIR functions do not work on root UNC path). (Dmitry)
-- Fixed bug #40548 (SplFileInfo::getOwner/getGroup give a warning on broken
- symlink). (Marcus)
-- Fixed bug #40546 (SplFileInfo::getPathInfo() throws an exception if directory
- is in root dir). (Marcus)
-- Fixed bug #40545 (multithreading issue in zend_strtod()). (Tony)
-- Fixed bug #40503 (json_encode() value corruption on 32bit systems with
- overflown values). (Ilia)
-- Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice
- include minOccurs=0). (Dmitry)
-- Fixed bug #40465 (Ensure that all PHP elements are printed by var_dump).
- (wharmby at uk dot ibm dot com, Ilia)
-- Fixed bug #40464 (session.save_path wont use default-value when safe_mode
- or open_basedir is enabled). (Ilia)
-- Fixed bug #40455 (proc_open() uses wrong command line when safe_mode_exec_dir
- is set). (Tony)
-- Fixed bug #40432 (strip_tags() fails with greater than in attribute). (Ilia)
-- Fixed bug #40431 (dynamic properties may cause crash in ReflectionProperty
- methods). (Tony)
-- Fixed bug #40451 (addAttribute() may crash when used with non-existent child
- node). (Tony)
-- Fixed bug #40442 (ArrayObject::offsetExists broke in 5.2.1, works in 5.2.0).
- (olivier at elma dot fr, Marcus)
-- Fixed bug #40428 (imagepstext() doesn't accept optional parameter). (Pierre)
-- Fixed bug #40417 (Allow multiple instances of the same named PDO token in
- prepared statement emulation code). (Ilia)
-- Fixed bug #40414 (possible endless fork() loop when running fastcgi).
- (Dmitry)
-- Fixed bug #40410 (ext/posix does not compile on MacOS 10.3.9). (Tony)
-- Fixed bug #40392 (memory leaks in PHP milter SAPI).
- (tuxracer69 at gmail dot com, Tony)
-- Fixed bug #40371 (pg_client_encoding() not working on Windows). (Edin)
-- Fixed bug #40352 (FCGI_WEB_SERVER_ADDRS function get lost). (Dmitry)
-- Fixed bug #40290 (strtotime() returns unexpected result with particular
- timezone offset). (Derick)
-- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when
- parent is killed). (Dmitry)
-- Fixed bug #40261 (Extremely slow data handling due to memory fragmentation).
- (Dmitry)
-- Fixed bug #40236 (php -a function allocation eats memory). (Dmitry)
-- Fixed bug #40109 (iptcembed fails on non-jfif jpegs). (Tony)
-- Fixed bug #39965 (Latitude and longitude are backwards in date_sun_info()).
- (Derick)
-- Implement #39867 (openssl PKCS#12 support) (Marc Delling, Pierre)
-- Fixed bug #39836 (SplObjectStorage empty after unserialize). (Marcus)
-- Fixed bug #39416 (Milliseconds in date()). (Derick)
-- Fixed bug #39396 (stream_set_blocking crashes on Win32). (Ilia, maurice at
- iceblog dot de)
-- Fixed bug #39351 (relative include fails on Solaris). (Dmitry, Tony)
-- Fixed bug #39322 (proc_terminate() destroys process resource). (Nuno)
-- Fixed bug #38406 (crash when assigning objects to SimpleXML attributes). (Tony)
-- Fixed bug #37799 (ftp_ssl_connect() falls back to non-ssl connection). (Nuno)
-- Fixed bug #36496 (SSL support in imap_open() not working on Windows). (Edin)
-- Fixed bug #36226 (Inconsistent handling when passing nillable arrays).
- (Dmitry)
-- Fixed bug #35872 (Avoid crash caused by object store being referenced during
- RSHUTDOWN). (Andy)
-- Fixed bug #34794 (proc_close() hangs when used with two processes).
- (jdolecek at netbsd dot org, Nuno)
-- Fixed PECL bug #10194 (crash in Oracle client when memory limit reached in
- the callback). (Tony)
-- Fixed substr_compare and substr_count information leak (MOPB-14) (Stas, Ilia)
-- Fixed crash on op-assign where argument is string offset (Brian, Stas)
-- Fixed bug #38710 (data leakage because of nonexisting boundary checking in
- statements in mysqli) (Stas)
-- Fixed bug #37386 (autocreating element doesn't assign value to first node).
- (Rob)
-- Fixed bug #37013 (server hangs when returning circular object references).
- (Dmitry)
-- Fixed bug #33664 Console window appears when using exec()
- (Richard Quadling, Stas)
-
-
-08 Feb 2007, PHP 5.2.1
-- Added read-timeout context option "timeout" for HTTP streams. (Hannes, Ilia).
-- Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
-- Added support for hex numbers of any size. (Matt)
-- Added function stream_socket_shutdown(). It is a wrapper for system
- shutdown() function, that shut downs part of a full-duplex connection.
- (Dmitry)
-- Added internal heap protection (Dmitry)
- . memory-limit is always enabled (--enable-memory-limit removed)
- . default value if memory-limit is set to 128M
- . safe unlinking
- . cookies
- . canary protection (debug build only)
- . random generation of cookies and canaries
-- Added forward support for 'b' prefix in front of string literals. (Andrei)
-- Added three new functions to ext/xmlwriter (Rob, Ilia)
- . xmlwriter_start_dtd_entity()
- . xmlwriter_end_dtd_entity()
- . xmlwriter_write_dtd_entity()
-- Added a meta tag to phpinfo() output to prevent search engines from indexing
- the page. (Ilia)
-- Added new function, sys_get_temp_dir(). (Hartmut)
-- Added missing object support to file_put_contents(). (Ilia)
-- Added support for md2, ripemd256 and ripemd320 algos to hash(). (Sara)
-- Added forward support for (binary) cast. (Derick)
-- Added optimization for imageline with horizontal and vertical lines (Pierre)
-
-- Removed dependency from SHELL32.DLL. (Dmitry)
-- Removed double "wrong parameter count" warnings in various functions.
- (Hannes)
-- Moved extensions to PECL:
- . ext/informix (Derick, Tony)
-
-- Changed double-to-string utilities to use BSD implementation. (Dmitry, Tony)
-- Updated bundled libcURL to version 7.16.0 in the Windows distro. (Edin)
-- Updated timezone database to version 2006.16. (Derick)
-- cgi.* and fastcgi.* directives are moved to INI subsystem. The new directive
- cgi.check_shebang_line can be used to omitting check for "#! /usr/bin/php"
- line. (Dmitry).
-- Improved proc_open(). Now on Windows it can run external commands not
- through CMD.EXE. (Dmitry)
-- VCWD_REALPATH() is improved to use realpath cache without VIRTUAL_DIR.
- (Dmitry)
-- ext/bcmath initialization code is moved from request startup to module
- startup. (Dmitry)
-- Zend Memory Manager Improvements (Dmitry)
- . use HeapAlloc() instead of VirtualAlloc()
- . use "win32" storage manager (instead of "malloc") on Windows by default
-- Zip Extension Improvements (Pierre)
- . Fixed leak in statName and stateIndex
- . Fixed return setComment (Hannes)
- . Added addEmptyDir method
-- Filter Extension Improvements (Ilia, Pierre)
- . Fixed a bug when callback function returns a non-modified value.
- . Added filter support for $_SERVER in cgi/apache2 sapis.
- . Make sure PHP_SELF is filtered in Apache 1 sapi.
- . Fixed bug #39358 (INSTALL_HEADERS contains incorrect reference to
- php_filter.h).
- . Added "default" option that allows a default value to be set for an
- invalid or missing value.
- . Invalid filters fails instead of returning unsafe value
- . Fixed possible double encoding problem with sanitizing filters
- . Make use of space-strict strip_tags() function
- . Fixed whitespace trimming
- . Added support for FastCGI environment variables. (Dmitry)
-- PDO_MySQL Extension Improvements (Ilia)
- . Enabled buffered queries by default.
- . Enabled prepared statement emulation by default.
-
-- Small optimization of the date() function. (Matt,Ilia)
-- Optimized the internal is_numeric_string() function. (Matt,Ilia)
-- Optimized array functions utilizing php_splice(). (Ilia)
-- Windows related optimizations (Dmitry, Stas)
- . COM initialization/deinitialization are done only if necessary
- . removed unnecessary checks for ISREG file and corresponding stat() calls
- . opendir() is reimplementation using GetFistFile/GetNextFile those are
- faster then _findfirst/_findnext
- . implemented registry cache that prevent registry lookup on each request.
- In case of modification of corresponding registry-tree PHP will reload it
- automatic
- . start timeout thread only if necessary
- . stat() is reimplementation using GetFileAttributesEx(). The new
- implementation is faster then implementation in MS VC CRT, but it doesn't
- support Windows 95.
-- Streams optimization (Dmitry)
- . removed unnecessary ftell() calls (one call for each included PHP file)
- . disabled calls to read() after EOF
-
-- Fixed incorrect function names on FreeBSD where inet_pton() was named
- __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes)
-- Fixed FastCGI impersonation for persistent connections on Windows. (Dmitry)
-- Fixed wrong signature initialization in imagepng (Takeshi Abe)
-- Fixed ftruncate() with negative size on FreeBSD. (Hannes)
-- Fixed segfault in RegexIterator when given invalid regex. (Hannes)
-- Fixed segfault in SplFileObject->openFile()->getPathname(). (Hannes)
-- Fixed segfault in ZTS mode when OCI8 statements containing sub-statements
- are destroyed in wrong order. (Tony)
-- Fixed the validate email filter so that the letter "v" can also be used in
- the user part of the email address. (Derick)
-- Fixed bug #40297 (compile failure in ZTS mode when collections support is
- missing). (Tony)
-- Fixed bug #40285 (The PDO prepare parser goes into an infinite loop in
- some instances). (Ilia)
-- Fixed bug #40274 (Sessions fail with numeric root keys). (Ilia)
-- Fixed bug #40259 (ob_start call many times - memory error). (Dmitry)
-- Fixed bug #40231 (file_exists incorrectly reports false). (Dmitry)
-- Fixed bug #40228 (ZipArchive::extractTo does create empty directories
- recursively). (Pierre)
-- Fixed bug #40200 (The FastCgi version has different realpath results than
- thread safe version). (Dmitry)
-- Fixed bug #40191 (use of array_unique() with objects triggers segfault).
- (Tony)
-- Fixed bug #40189 (possible endless loop in zlib.inflate stream filter).
- (Greg, Tony)
-- Fixed bug #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2).
- (Tony)
-- Fixed bug #40129 (iconv extension doesn't compile with CodeWarrior on
- Netware). (gk at gknw dot de, Tony)
-- Fixed bug #40127 (apache2handler doesn't compile on Netware).
- (gk at gknw dot de)
-- Fixed bug #40121 (PDO_DBLIB driver wont free statements). (Ilia)
-- Fixed bug #40098 (php_fopen_primary_script() not thread safe). (Ilia)
-- Fixed bug #40092 (chroot() doesn't clear realpath cache). (Dmitry)
-- Fixed bug #40091 (spl_autoload_register with 2 instances of the same class).
- (Ilia)
-- Fixed bug #40083 (milter SAPI functions always return false/null). (Tony)
-- Fixed bug #40079 (php_get_current_user() not thread safe).
- (Ilia, wharmby at uk dot ibm dot com)
-- Fixed bug #40078 (ORA-01405 when fetching NULL values using
- oci_bind_array_by_name()). (Tony)
-- Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in
- range of signed integer). (Dmitry)
-- Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus)
-- Fixed bug #40036 (empty() does not work correctly with ArrayObject when
- using ARRAY_AS_PROPS). (Ilia)
-- Fixed bug #40012 (php_date.c doesn't compile on Netware).
- (gk at gknw dot de, Derick)
-- Fixed bug #40009 (http_build_query(array()) returns NULL). (Ilia)
-- Fixed bug #40002 (Try/Catch performs poorly). (Dmitry)
-- Fixed bug #39993 (tr_TR.UTF-8 locale has problems with PHP). (Ilia)
-- Fixed bug #39990 (Cannot "foreach" over overloaded properties). (Dmitry)
-- Fixed bug #39988 (type argument of oci_define_by_name() is ignored).
- (Chris Jones, Tony)
-- Fixed bug #39984 (redirect response code in header() could be ignored
- in CGI sapi). (Ilia)
-- Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
- establish a new connection). (Ilia)
-- Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used
- for timestamp fields). (Ilia)
-- Fixed bug #39969 (ini setting short_open_tag has no effect when using
- --enable-maintainer-zts). (Dmitry)
-- Fixed bug #39952 (zip ignoring --with-libdir on zlib checks)
- (judas dot iscariote at gmail dot com)
-- Fixed bug #39944 (References broken). (Dmitry)
-- Fixed bug #39935 (Extensions tidy,mcrypt,mhash,pdo_sqlite ignores
- --with-libdir). (judas dot iscariote at gmail dot com, Derick)
-- Fixed bug #39903 (Notice message when executing __halt_compiler() more than
- once). (Tony)
-- Fixed bug #39898 (FILTER_VALIDATE_URL validates \r\n\t etc). (Ilia)
-- Fixed bug #39890 (using autoconf 2.6x and --with-layout=GNU breaks PEAR
- install path). (Tony)
-- Fixed bug #39884 (ReflectionParameter::getClass() throws exception for
- type hint self). (thekid at php dot net)
-- Fixed bug #39878 (CURL doesn't compile on Sun Studio Pro). (Ilia)
-- Fixed bug #39873 (number_format() breaks with locale & decimal points).
- (Ilia)
-- Fixed bug #39869 (safe_read does not initialize errno).
- (michiel at boland dot org, Dmitry)
-- Fixed bug #39850 (SplFileObject throws contradictory/wrong error messages
- when trying to open "php://wrong"). (Tony)
-- Fixed bug #39846 (Invalid IPv4 treated as valid). (Ilia)
-- Fixed bug #39845 (Persistent connections generate a warning in pdo_pgsql).
- (Ilia)
-- Fixed bug #39832 (SOAP Server: parameter not matching the WSDL specified
- type are set to 0). (Dmitry)
-- Fixed bug #39825 (foreach produces memory error). (Dmitry)
-- Fixed bug #39816 (apxs2filter ignores httpd.conf & .htaccess php config
- settings). (Ilia)
-- Fixed bug #39815 (SOAP double encoding is not locale-independent). (Dmitry)
-- Fixed bug #39797 (virtual() does not reset changed INI settings). (Ilia)
-- Fixed bug #39795 (build fails on AIX because crypt_r() uses different
- data struct). (Tony)
-- Fixed bug #39791 (Crash in strtotime() on overly long relative date
- multipliers). (Ilia)
-- Fixed bug #39787 (PHP doesn't work with Apache 2.3).
- (mv at binarysec dot com).
-- Fixed bug #39782 (setTime() on a DateTime constructed with a Weekday
- yields incorrect results). (Ilia)
-- Fixed bug #39780 (PNG image with CRC/data error raises fatal error) (Pierre)
-- Fixed bug #39779 (Enable AUTH PLAIN mechanism in underlying libc-client).
- (michael dot heimpold at s2000 dot tu-chemnitz dot de, Ilia)
-- Fixed bug #39775 ("Indirect modification ..." message is not shown).
- (Dmitry)
-- Fixed bug #39763 (magic quotes are applied twice by ext/filter in
- parse_str()). (Ilia)
-- Fixed bug #39760 (cloning fails on nested SimpleXML-Object). (Rob)
-- Fixed bug #39759 (Can't use stored procedures fetching multiple result
- sets in pdo_mysql). (Ilia)
-- Fixed bug #39754 (Some POSIX extension functions not thread safe).
- (Ilia, wharmby at uk dot ibm dot com)
-- Fixed bug #39751 (putenv crash on Windows). (KevinJohnHoffman at gmail.com)
-- Fixed bug #39732 (oci_bind_array_by_name doesn't work on Solaris 64bit).
- (Tony)
-- Fixed bug #39724 (Broken build due to spl/filter usage of pcre extension).
- (Tony, Ilia)
-- Fixed bug #39718 (possible crash if assert.callback is set in ini). (Ilia)
-- Fixed bug #39702 (php crashes in the allocator on linux-m68k). (Dmitry)
-- Fixed bug #39685 (iconv() - undefined function). (Hannes)
-- Fixed bug #39673 (file_get_contents causes bus error on certain offsets).
- (Tony)
-- Fixed bug #39663 (Memory leak in pg_get_notify() and a possible memory
- corruption on Windows in pgsql and pdo_pgsql extensions).
- (Ilia, matteo at beccati dot com)
-- Fixed bug #39662 (Segfault when calling asXML() of a cloned
- SimpleXMLElement). (Rob, Tony)
-- Fixed bug #39656 (crash when calling fetch() on a PDO statment object after
- closeCursor()). (Ilia, Tony)
-- Fixed bug #39653 (ext/dba doesn't check for db-4.5 and db-4.4 when db4
- support is enabled). (Tony)
-- Fixed bug #39652 (Wrong negative results from memory_get_usage()). (Dmitry)
-- Fixed bug #39648 (Implementation of PHP functions chown() and chgrp() are
- not thread safe). (Ilia, wharmby at uk dot ibm dot com)
-- Fixed bug #39640 (Segfault with "Allowed memory size exhausted"). (Dmitry)
-- Fixed bug #39625 (Apache crashes on importStylesheet call). (Rob)
-- Fixed bug #39623 (thread safety fixes on *nix for putenv() & mime_magic).
- (Ilia, wharmby at uk dot ibm dot com)
-- Fixed bug #39621 (str_replace() is not binary safe on strings with equal
- length). (Tony)
-- Fixed bug #39613 (Possible segfault in imap initialization due to missing
- module dependency). (wharmby at uk dot ibm dot com, Tony)
-- Fixed bug #39606 (Use of com.typelib_file in PHP.ini STILL causes A/V). (Rob)
-- Fixed bug #39602 (Invalid session.save_handler crashes PHP). (Dmitry)
-- Fixed bug #39596 (Creating Variant of type VT_ARRAY). (Rob)
-- Fixed bug #39583 (ftp_put() does not change transfer mode to ASCII). (Tony)
-- Fixed bug #39576 (array_walk() doesn't separate user data zval). (Tony)
-- Fixed bug #39575 (move_uploaded_file() no longer working (safe mode
- related)). (Tony)
-- Fixed bug #39571 (timeout ssl:// connections). (Ilia)
-- Fixed bug #39564 (PDO::errorInfo() returns inconsistent information when
- sqlite3_step() fails). (Tony)
-- Fixed bug #39548 (ZMSG_LOG_SCRIPT_NAME not routed to OutputDebugString()
- on Windows). (Dmitry)
-- Fixed bug #39538 (fgetcsv can't handle starting newlines and trailing odd
- number of backslashes). (David Soria Parra, Pierre)
-- Fixed bug #39534 (Error in maths to calculate of
- ZEND_MM_ALIGNED_MIN_HEADER_SIZE). (wharmby at uk dot ibm dot com, Dmitry)
-- Fixed bug #39527 (Failure to retrieve results when multiple unbuffered,
- prepared statements are used in pdo_mysql). (Ilia)
-- Fixed bug #39508 (imagefill crashes with small images 3 pixels or less).
- (Pierre)
-- Fixed bug #39506 (Archive corrupt with ZipArchive::addFile method). (Pierre)
-- Fixed bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag, not
- entity). (Hannes)
-- Fixed bug #39483 (Problem with handling of \ char in prepared statements).
- (Ilia, suhachov at gmail dot com)
-- Fixed bug #39458 (ftp_nlist() returns false on empty dirs). (Nuno)
-- Fixed bug #39454 (Returning a SOAP array segfaults PHP). (Dmitry)
-- Fixed bug #39450 (getenv() fills other super-globals). (Ilia, Tony)
-- Fixed bug #39449 (Overloaded array properties do not work correctly).
- (Dmitry)
-- Fixed bug #39445 (Calling debug_backtrace() in the __toString()
- function produces a crash). (Dmitry)
-- Fixed bug #39438 (Fatal error: Out of memory). (Dmitry)
-- Fixed bug #39435 ('foo' instanceof bar gives invalid opcode error). (Sara)
-- Fixed bug #39414 (Syntax error while compiling with Sun Workshop Complier).
- (Johannes)
-- Fixed bug #39398 (Booleans are not automatically translated to integers).
- (Ilia)
-- Fixed bug #39394 (Missing check for older variants of openssl). (Ilia)
-- Fixed bug #39367 (clearstatcache() doesn't clear realpath cache).
- (j at pureftpd dot org, Dmitry)
-- Fixed bug #39366 (imagerotate does not use alpha with angle > 45 degrees)
- (Pierre)
-- Fixed bug #39364 (Removed warning on empty haystack inside mb_strstr()).
- (Ilia)
-- Fixed bug #39362 (Added an option to imap_open/imap_reopen to control the
- number of connection retries). (Ilia)
-- Fixed bugs #39361 & #39400 (mbstring function overloading problem). (Seiji)
-- Fixed bug #39354 (Allow building of curl extension against libcurl
- 7.16.0). (Ilia)
-- Fixed bug #39350 (crash with implode("\n", array(false))). (Ilia)
-- Fixed bug #39344 (Unnecessary calls to OnModify callback routine for
- an extension INI directive). (wharmby at uk dot ibm dot com, Dmitry)
-- Fixed bug #39320 (ZEND_HASH_APPLY_STOP causes deletion). (Marcus)
-- Fixed bug #39313 (spl_autoload triggers Fatal error). (Marcus)
-- Fixed bug #39300 (make install fails if wget is not available). (Tony)
-- Fixed bug #39297 (Memory corruption because of indirect modification of
- overloaded array). (Dmitry)
-- Fixed bug #39286 (misleading error message when invalid dimensions are
- given) (Pierre)
-- Fixed bug #39273 (imagecopyresized may ignore alpha channel) (Pierre)
-- Fixed bug #39265 (Fixed path handling inside mod_files.sh).
- (michal dot taborsky at gmail dot com, Ilia)
-- Fixed bug #39217 (serialNumber might be -1 when the value is too large).
- (Pierre, Tony)
-- Fixed bug #39215 (Inappropriate close of stdin/stdout/stderr). (Wez, Ilia)
-- Fixed bug #39201 (Possible crash in Apache 2 with 413 ErrorHandler). (Ilia)
-- Fixed bug #39151 (Parse error in recursiveiteratoriterator.php). (Marcus)
-- Fixed bug #39121 (Incorrect return array handling in non-wsdl soap client).
- (Dmitry)
-- Fixed bug #39090 (DirectoryFilterDots doxygen docs and example is wrong).
- (Marcus)
-- Fixed bug #38852 (XML-RPC Breaks iconv). (Hannes)
-- Fixed bug #38770 (unpack() broken with longs on 64 bit machines).
- (Ilia, David Soria Parra).
-- Fixed bug #38698 (for some keys cdbmake creates corrupted db and cdb can't
- read valid db). (Marcus)
-- Fixed bug #38680 (Added missing handling of basic types in json_decode).
- (Ilia)
-- Fixed bug #38604 (Fixed request time leak inside foreach() when iterating
- through virtual properties). (Dmitry)
-- Fixed bug #38602 (header( "HTTP/1.0 ..." ) does not change proto version).
- (Ilia)
-- Fixed bug #38542 (proc_get_status() returns wrong PID on windows). (Nuno)
-- Fixed bug #38536 (SOAP returns an array of values instead of an object).
- (Dmitry)
-- Fixed bug #38456 (Apache2 segfaults when virtual() is called in .php
- ErrorDocument). (Ilia)
-- Fixed bug #38325 (spl_autoload_register() gives wrong line for "class not
- found"). (Ilia)
-- Fixed bug #38319 (Remove bogus warnings from persistent PDO connections).
- (Ilia)
-- Fixed bug #38274 (Memlimit fatal error sent to "wrong" stderr when using
- fastcgi). (Dmitry)
-- Fixed bug #38252 (Incorrect PDO error message on invalid default fetch
- mode). (Ilia)
-- Fixed bug #37927 (Prevent trap when COM extension processes argument of
- type VT_DISPATCH|VT_REF) (Andy)
-- Fixed bug #37773 (iconv_substr() gives "Unknown error" when string
- length = 1"). (Ilia)
-- Fixed bug #37627 (session save_path check checks the parent directory).
- (Ilia)
-- Fixed bug #37619 (proc_open() closes stdin on fork() failure).
- (jdolecek at NetBSD dot org, Nuno)
-- Fixed bug #37588 (COM Property propputref converts to PHP function
- and can't be accesed). (Rob)
-- Fixed bug #36975 (natcasesort() causes array_pop() to misbehave).
- (Hannes)
-- Fixed bug #36812 (pg_execute() modifies input array). (Ilia)
-- Fixed bug #36798 (Error parsing named parameters with queries containing
- high-ascii chars). (Ilia)
-- Fixed bug #36644 (possible crash in variant_date_from_timestamp()). (Ilia)
-- Fixed bug #36427 (proc_open() / proc_close() leak handles on windows).
- (jdolecek at NetBSD dot org, Nuno)
-- Fixed bug #36392 (wrong number of decimal digits with %e specifier in
- sprintf). (Matt,Ilia)
-- Fixed bug #36214 (__get method works properly only when conditional
- operator is used). (Dmitry)
-- Fixed bug #35634 (Erroneous "Class declarations may not be nested"
- error raised). (Carl P. Corliss, Dmitry)
-- Fixed bug #35106 (nested foreach fails when array variable has a
- reference). (Dmitry)
-- Fixed bug #34564 (COM extension not returning modified "out" argument) (Andy)
-- Fixed bug #33734 (Something strange with COM Object). (Rob)
-- Fixed bug #33386 (ScriptControl only sees last function of class). (Rob)
-- Fixed bug #33282 (Re-assignment by reference does not clear the is_ref
- flag) (Ilia, Dmitry, Matt Wilmas)
-- Fixed bug #30074 (apparent symbol table error with
- extract($blah, EXTR_REFS)) (Brian)
-- Fixed bug #29840 (is_executable() does not honor safe_mode_exec_dir
- setting). (Ilia)
-- Fixed PECL bug #7295 (ORA-01405: fetched column value is NULL on LOB
- fields). (Tony)
-
-02 Nov 2006, PHP 5.2.0
-- Updated bundled OpenSSL to version 0.9.8d in the Windows distro. (Edin)
-- Updated Postgresql client libraries to 8.1.4 in the Windows distro. (Edin)
-- Updated PCRE to version 6.7. (Ilia)
-- Updated libsqlite in ext/pdo_sqlite to 3.3.7. (Ilia)
-- Updated bundled MySQL client library to version 5.0.22 in the Windows
- distribution. (Edin)
-- Updated timezonedb to version 2006.7. (Derick)
-
-- Added ability to make SOAP call userspace PHP<->XML converters. (Dmitry)
-- Added support for character sets in pg_escape_string() for PostgreSQL 8.1.4
- and higher. (Ilia)
-- Added support for character sets in PDO quote() method for PostgreSQL 8.1.4
- and higher. (Ilia)
-- Added DSA key generation support to openssl_pkey_new(), FR #38731 (marci
- at balabit dot hu, Tony)
-- Added SoapServer::setObject() method (it is a simplified version of
- SoapServer::setClass() method). (Dmitry)
-- Added support for hexadecimal entity in imagettftext() for the bundled GD.
- (Pierre)
-- Added support for httpOnly flag for session extension and cookie setting
- functions. (Scott MacVicar, Ilia)
-- Added version specific registry keys to allow different configurations for
- different php version. (Richard, Dmitry)
-- Added "PHPINIDir" Apache directive to apache and apache_hooks SAPIs.
- (Dmitry)
-- Added an optional boolean parameter to memory_get_usage() and
- memory_get_peak_usage() to get memory size allocated by emalloc() or real
- size of memory allocated from system. (Dmitry)
-- Added Zip Archive extension. (Pierre)
-- Added RFC1867 fileupload processing hook. (Stefan E.)
-- Added JSON and Filter extensions. (Derick, Rasmus)
-- Added error messages to disk_free_space() and disk_total_space() functions.
- FR #37971 (Tony)
-- Added PATHINFO_FILENAME option to pathinfo() to get the filename.
- (Toby S. and Christian S.)
-- Added array_fill_keys() function. (Marcus, Matt Wilmas)
-- Added posix_initgroups() function. (Ilia)
-- Added an optional parameter to parse_url() to allow retrieval of distinct
- URL components. (Ilia)
-- Added optional parameter to http_build_query() to allow specification of
- string separator. (Ilia)
-- Added image_type_to_extension() function. (Hannes, Ilia)
-- Added allow_url_include ini directive to complement allow_url_fopen. (Rasmus)
-- Added automatic module globals management. (Dmitry)
-- Added RFC2397 (data: stream) support. (Marcus)
-- Added new error mode E_RECOVERABLE_ERROR. (Derick, Marcus, Tony)
-- Added support for getenv() input filtering. (Rasmus)
-- Added support for constructors in interfaces to force constructor signature
- checks in implementations. (Marcus)
-- Added memory_get_peak_usage() function for retrieving peak memory usage of
- a PHP script. (Ilia)
-- Added pg_field_table() function. (Edin)
-- Added SimpleXMLElement::saveXML() as an alias for SimpleXMLElement::asXML().
- (Hannes)
-- Added DOMNode::getNodePath() for getting an XPath for a node. (Christian)
-- Added gmp_nextprime() function. (ants dot aasma at gmail dot com, Tony)
-- Added error_get_last() function. (Mike)
-
-- Removed current working directory from the php.ini search path for CLI and
- re-added it for other SAPIs (restore to pre 5.1.x behavior). (Edin)
-- Moved extensions to PECL:
- . ext/filepro (Derick, Tony)
- . ext/hwapi (Derick, Tony)
-- Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or
- safe_mode are enabled. (Stefan E., Ilia)
-
-- Increased default memory limit to 16 megabytes to accommodate for a more
- accurate memory utilization measurement.
-- In addition to path to php.ini, PHPRC now may specify full file name.
- (Dmitry)
-
-- Optimized array/HashTable copying. (Matt Wilmas, Dmitry)
-- Optimized zend_try/zend_catch macros by eliminating memcpy(3). (Dmitry)
-- Optimized require_once() and include_once() by eliminating fopen(3) on
- second usage. (Dmitry)
-- Optimized request shutdown sequence. Restoring ini directives now iterates
- only over modified directives instead of all. (Dmitry)
-
-- Changed priority of PHPRC environment variable on win32 to be higher then
- value from registry. (Dmitry)
-- Changed __toString() to be called wherever applicable. (Marcus)
-- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus)
-- Changed realpath cache to be disabled when "open_basedir" or "safe_mode"
- are enabled on per-request basis. (Ilia)
-
-- Improved SNMP extension: (Jani)
- . Renamed snmp_set_oid_numeric_print() to snmp_set_oid_output_format().
- . Added 2 new constants: SNMP_OID_OUTPUT_FULL and SNMP_OID_OUTPUT_NUMERIC
- . Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
- compatibility issue). (Patch: scott dot moynes+php at gmail dot com)
-- Improved OpenSSL extension: (Pierre)
- . Added support for all supported algorithms in openssl_verify
- . Added openssl_pkey_get_details, returns the details of a key
- . Added x509 v3 extensions support
- . Added openssl_csr_get_subject() and openssl_csr_get_public_key()
- . Added 3 new constants OPENSSL_VERSION_TEXT and OPENSSL_VERSION_NUMBER and
- OPENSSL_KEYTYPE_EC
-- Improved the Zend memory manager: (Dmitry)
- . Removed unnecessary "--disable-zend-memory-manager" configure option.
- . Added "--enable-malloc-mm" configure option which is enabled by default in
- debug builds to allow using internal and external memory debuggers.
- . Allow tweaking the memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE
- environment variables.
- . For more information: Zend/README.ZEND_MM
-- Improved safe_mode check for the error_log() function. (Ilia)
-- Improved the error reporting in SOAP extension on request failure. (Ilia)
-- Improved crypt() on win32 to be about 10 times faster and to have friendlier
- license. (Frank, Dmitry)
-- Improved performance of the implode() function on associated arrays. (Ilia)
-- Improved performance of str_replace() when doing 1 char to 1 char or 1 char
- to many chars replacement. (Ilia)
-- Improved apache2filter SAPI:
- . Allowed PHP to be an arbitrary filter in the chain and read the script from
- the Apache stream. (John)
- . Added support for apache2filter in the Windows build including binary
- support for both Apache 2.0.x (php5apache2_filter.dll) and Apache 2.2.x
- (php5apache2_2_filter.dll). (Edin)
-- Improved apache2handler SAPI:
- . Changed ap_set_content_type() to be called only once. (Mike)
- . Added support for Apache 2.2 handler in the Windows distribution. (Edin)
-- Improved FastCGI SAPI: (Dmitry)
- . Removed source compatibility with libfcgi.
- . Optimized access to FastCGI environment variables by using HashTable
- instead of linear search.
- . Allowed PHP_FCGI_MAX_REQUESTS=0 that assumes no limit.
- . Allowed PHP_FCGI_CHILDREN=0 that assumes no worker children. (FastCGI
- requests are handled by main process itself)
-- Improved CURL:
- . Added control character checks for "open_basedir" and "safe_mode" checks.
- (Ilia)
- . Added implementation of curl_multi_info_read(). (Brian)
-- Improved PCRE: (Andrei)
- . Added run-time configurable backtracking/recursion limits.
- . Added preg_last_error(). (Andrei)
-- Improved PDO:
- . Added new attribute ATTR_DEFAULT_FETCH_MODE. (Pierre)
- . Added FETCH_PROPS_LATE. (Marcus)
-- Improved SPL: (Marcus)
- . Made most iterator code exception safe.
- . Added RegExIterator and RecursiveRegExIterator.
- . Added full caching support and ArrayAccess to CachingIterator.
- . Added array functions to ArrayObject/ArrayIterator and made them faster.
- . Added support for reading csv and skipping empty lines in SplFileObject.
- . Added CachingIterator::TOSTRING_USE_INNER, calls inner iterator __toString.
- . Added ability to set the CSV separator per SplFileObject.
-- Improved xmlReader: (Rob)
- . Added readInnerXml(), xmlReader::setSchema().
- . Added readInnerXML(), readOuterXML(), readString(), setSchema(). (2.6.20+)
- . Changed to passing libxml options when loading reader.
-
-- Fixed invalid read in imagecreatefrompng when an empty file is given
- (Pierre, Tony)
-- Fixed infinite loop when a wrong color index is given to imagefill (Pierre)
-- Fixed mess with CGI/CLI -d option (now it works with cgi; constants are
- working exactly like in php.ini; with FastCGI -d affects all requests).
- (Dmitry)
-- Fixed missing open_basedir check inside chdir() function. (Ilia)
-- Fixed overflow on 64bit systems in str_repeat() and wordwrap(). (Stefan E.)
-- Fixed XSLTProcessor::importStylesheet() to return TRUE on success
- (Christian)
-- Fixed leaks in openssl_csr_sign and openssl_csr_new (Pierre)
-- Fixed phpinfo() cutoff of variables at \0. (Ilia)
-- Fixed a bug in the filter extension that prevented magic_quotes_gpc from
- being applied when RAW filter is used. (Ilia)
-- Fixed memory leaks in openssl streams context options. (Pierre)
-- Fixed handling of extremely long paths inside tempnam() function. (Ilia)
-- Fixed bug #39721 (Runtime inheritance causes data corruption). (Dmitry)
-- Fixed bug #39304 (Segmentation fault with list unpacking of string offset).
- (Dmitry)
-- Fixed bug #39192 (Not including nsapi.h properly with SJSWS 7). This will
- make PHP 5.2 compatible to new Sun Webserver. (Uwe)
-- Fixed bug #39140 (Uncaught exception may cause crash). (Dmitry)
-- Fixed bug #39125 (Memleak when reflecting non-existing class/method). (Tony)
-- Fixed bug #39067 (getDeclaringClass() and private properties). (Tony)
-- Fixed bug #39039 (SSL: fatal protocol error when fetching HTTPS from servers
- running Google web server). (Ilia)
-- Fixed bug #39035 (Compatibility issue between DOM and
- zend.ze1_compatibility_mode). (Rob)
-- Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty
- files). (Ilia)
-- Fixed bug #39032 (strcspn() stops on null character). (Tony)
-- Fixed bug #39020 (PHP in FastCGI server mode crashes). (Dmitry)
-- Fixed bug #39017 (foreach(($obj = new myClass) as $v); echo $obj;
- segfaults). (Dmitry)
-- Fixed bug #39004 (Fixed generation of config.nice with autoconf 2.60). (Ilia)
-- Fixed bug #39003 (__autoload() is called for type hinting). (Dmitry, Tony)
-- Fixed bug #39001 (ReflectionProperty returns incorrect declaring class for
- protected properties). (Tony)
-- Fixed bug #38996 (PDO_MYSQL doesn't check connections for liveness). (Tony)
-- Fixed bug #38993 (Fixed safe_mode/open_basedir checks for session.save_path,
- allowing them to account for extra parameters). (Ilia)
-- Fixed bug #38989 (Absolute path with slash at beginning doesn't work on win).
- (Dmitry)
-- Fixed bug #38985 (Can't cast COM objects). (Wez)
-- Fixed bug #38981 (using FTP URLs in get_headers() causes crash). (Tony)
-- Fixed bug #38963 (Fixed a possible open_basedir bypass in tempnam()). (Ilia)
-- Fixed bug #38961 (metaphone() results in segmentation fault on NetBSD).
- (Tony)
-- Fixed bug #38949 (Cannot get xmlns value attribute). (Rob)
-- Fixed bug #38942 (Double old-style-ctor inheritance). (Dmitry)
-- Fixed bug #38941 (imap extension does not compile against new version of the
- imap library). (Ilia)
-- Fixed bug #38934 (move_uploaded_file() cannot read uploaded file outside of
- open_basedir). (Ilia)
-- Fixed bug #38904 (apache2filter changes cwd to /). (Ilia, Hannes)
-- Fixed bug #38891 (get_headers() do not work with curl-wrappers). (Ilia)
-- Fixed bug #38882 (ldap_connect causes segfault with newer versions of
- OpenLDAP). (Tony)
-- Fixed bug #38859 (parse_url() fails if passing '@' in passwd). (Tony)
-- Fixed bug #38850 (lookupNamespaceURI doesn't return default namespace). (Rob)
-- Fixed bug #38844 (curl_easy_strerror() is defined only since cURL 7.12.0).
- (Tony)
-- Fixed bug #38813 (DOMEntityReference->__construct crashes when called
- explicitly). (Rob)
-- Fixed bug #38808 ("maybe ref" issue for current() and others). (Dmitry)
-- Fixed bug #38779 (engine crashes when require()'ing file with syntax error
- through userspace stream wrapper). (Tony, Dmitry)
-- Fixed bug #38772 (inconsistent overriding of methods in different visibility
- contexts). (Dmitry)
-- Fixed bug #38759 (PDO sqlite2 empty query causes segfault). (Tony)
-- Fixed bug #38721 (Invalid memory read in date_parse()). (Tony, Derick)
-- Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry)
-- Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). (Ilia)
-- Fixed bug #38687 (sockaddr local storage insufficient for all sock families).
- (Sara)
-- Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia)
-- Fixed bug #38653 (memory leak in ReflectionClass::getConstant()). (Tony)
-- Fixed bug #38649 (uninit'd optional arg in stream_socket_sendto()). (Sara)
-- Fixed bug #38637 (curl_copy_handle() fails to fully copy the cURL handle).
- (Tony, Ilia)
-- Fixed bug #38624 (Strange warning when incrementing an object property and
- exception is thrown from __get method). (Tony)
-- Fixed bug #38623 (leaks in a tricky code with switch() and exceptions).
- (Dmitry)
-- Fixed bug #38579 (include_once() may include the same file twice). (Dmitry)
-- Fixed bug #38574 (missing curl constants and improper constant detection).
- (Ilia)
-- Fixed bug #38543 (shutdown_executor() may segfault when memory_limit is too
- low). (Dmitry)
-- Fixed bug #38535 (memory corruption in pdo_pgsql driver on error retrieval
- inside a failed query executed via query() method). (Ilia)
-- Fixed bug #38534 (segfault when calling setlocale() in userspace session
- handler). (Tony)
-- Fixed bug #38524 (strptime() does not initialize the internal date storage
- structure). (Ilia)
-- Fixed bug #38511, #38473, #38263 (Fixed session extension request shutdown
- order to ensure it is shutdown before the extensions it may depend on).
- (Ilia)
-- Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32).
- (Dmitry)
-- Fixed bug #38474 (getAttribute select attribute by order, even when
- prefixed). (Rob)
-- Fixed bug #38467 (--enable-versioning causes make fail on OS X). (Tony)
-- Fixed bug #38465 (ReflectionParameter fails if default value is an access
- to self::). (Johannes)
-- Fixed bug #38464 (array_count_values() mishandles numeric strings).
- (Matt Wilmas, Ilia)
-- Fixed bug #38461 (setting private attribute with __set() produces
- segfault). (Tony)
-- Fixed bug #38458, PECL bug #8944, PECL bug #7775 (error retrieving columns
- after long/text columns with PDO_ODBC). (Wez)
-- Fixed bug #38454 (warning upon disabling handler via
- xml_set_element_handler). (dtorop933 at gmail dot com, Rob)
-- Fixed bug #38451 (PDO_MYSQL doesn't compile on Solaris). (Tony)
-- Fixed bug #38450 (constructor is not called for classes used in userspace
- stream wrappers). (Tony)
-- Fixed bug #38438 (DOMNodeList->item(0) segfault on empty NodeList). (Ilia)
-- Fixed bug #38431 (xmlrpc_get_type() crashes PHP on objects). (Tony)
-- Fixed bug #38427 (unicode causes xml_parser to misbehave). (Rob)
-- Fixed bug #38424 (Different attribute assignment if new or existing). (Rob)
-- Fixed bug #38400 (Use of com.typelib_file may cause a crash). (Ilia)
-- Fixed bug #38394 (PDO fails to recover from failed prepared statement
- execution). (Ilia)
-- Fixed bug #38377 (session_destroy() gives warning after
- session_regenerate_id()). (Ilia)
-- Implemented #38357 (dbase_open can't open DBase 3 dbf file).
- (rodrigo at fabricadeideias dot com, Mike)
-- Fixed bug #38354 (Unwanted reformatting of XML when using AsXML). (Christian)
-- Fixed bug #38347 (Segmentation fault when using foreach with an unknown/empty
- SimpleXMLElement). (Tony)
-- Fixed bug #38322 (reading past array in sscanf() leads to arbitrary code
- execution). (Tony)
-- Fixed bug #38315 (Constructing in the destructor causes weird behavior).
- (Dmitry)
-- Fixed bug #38303 (spl_autoload_register() suppress all errors silently).
- (Ilia)
-- Fixed bug #38290 (configure script ignores --without-cdb,inifile,flatfile).
- (Marcus)
-- Fixed bug #38289 (segfault in session_decode() when _SESSION is NULL).
- (Tony)
-- Fixed bug #38287 (static variables mess up global vars). (Dmitry)
-- Fixed bug #38278 (session_cache_expire()'s value does not match phpinfo's
- session.cache_expire). (Tony)
-- Fixed bug #38276 (file_exists() works incorrectly with long filenames
- on Windows). (Ilia, Tony)
-- Fixed bug #38269 (fopen wrapper doesn't fail on invalid hostname with
- curlwrappers enabled). (Tony)
-- Fixed bug #38265 (heap corruption). (Dmitry)
-- Fixed bug #38261 (openssl_x509_parse() leaks with invalid cert) (Pierre)
-- Fixed bug #38255 (openssl possible leaks while passing keys) (Pierre)
-- Fixed bug #38253 (PDO produces segfault with default fetch mode). (Tony)
-- Fixed bug #38251 (socket_select() and invalid arguments). (Tony)
-- Fixed bug #38236 (Binary data gets corrupted on multipart/formdata POST).
- (Ilia)
-- Fixed bug #38234 (Exception in __clone makes memory leak). (Dmitry, Nuno)
-- Fixed bug #38229 (strtotime() does not parse YYYY-MM format). (Ilia)
-- Fixed bug #38224 (session extension can't handle broken cookies). (Ilia)
-- Fixed bug #38220 (Crash on some object operations). (Dmitry)
-- Fixed bug #38217 (ReflectionClass::newInstanceArgs() tries to allocate too
- much memory). (Tony)
-- Fixed bug #38214 (gif interlace output cannot work). (Pierre)
-- Fixed bug #38213, #37611, #37571 (wddx encoding fails to handle certain
- characters). (Ilia)
-- Fixed bug #38212 (Segfault on invalid imagecreatefromgd2part() parameters).
- (Pierre)
-- Fixed bug #38211 (variable name and cookie name match breaks script
- execution). (Dmitry)
-- Fixed bug #38199 (fclose() unable to close STDOUT and STDERR). (Tony)
-- Fixed bug #38198 (possible crash when COM reports an exception). (Ilia)
-- Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the
- class itself). (Ilia)
-- Fixed bug #38183 (disable_classes=Foobar causes disabled class to be
- called Foo). (Jani)
-- Fixed bug #38179 (imagecopy from a palette to a truecolor image loose alpha
- channel) (Pierre)
-- Fixed bug #38173 (Freeing nested cursors causes OCI8 to segfault). (Tony)
-- Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters). (Ilia)
-- Fixed bug #38161 (oci_bind_by_name() returns garbage when Oracle didn't set
- the variable). (Tony)
-- Fixed bug #38146 (Cannot use array returned from foo::__get('bar') in write
- context). (Dmitry)
-- Fixed bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key
- names). (Ilia)
-- Fixed bug #38125 (undefined reference to spl_dual_it_free_storage). (Marcus)
-- Fixed bug #38112 (corrupted gif segfaults) (Pierre)
-- Fixed bug #38096 (large timeout values ignored on 32bit machines in
- stream_socket_accept() and stream_socket_client()). (Ilia)
-- Fixed bug #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger
- than the actual length). (Tony)
-- Fixed bug #38072 (boolean arg for mysqli_autocommit() is always true on
- Solaris). (Tony)
-- Fixed bug #38067 (Parameters are not decoded from utf-8 when using encoding
- option). (Dmitry)
-- Fixed bug #38064 (ignored constructor visibility). (Marcus)
-- Fixed bug #38055 (Wrong interpretation of boolean parameters). (Dmitry)
-- Fixed bug #38047 ("file" and "line" sometimes not set in backtrace from
- inside error handler). (Dmitry)
-- Fixed bug #38019 (segfault extending mysqli class). (Dmitry)
-- Fixed bug #38005 (SoapFault faultstring doesn't follow encoding rules).
- (Dmitry)
-- Fixed bug #38004 (Parameters in SoapServer are decoded twice). (Dmitry)
-- Fixed bug #38003 (in classes inherited from MySQLi it's possible to call
- private constructors from invalid context). (Tony)
-- Fixed bug #37987 (invalid return of file_exists() in safe mode). (Ilia)
-- Fixed bug #37947 (zend_ptr_stack reallocation problem). (Dmitry)
-- Fixed bug #37945 (pathinfo() cannot handle argument with special characters
- like German "Umlaut"). (Mike)
-- Fixed bug #37931 (possible crash in OCI8 after database restart
- when using persistent connections). (Tony)
-- Fixed bug #37923 (Display constant value in reflection::export). (Johannes)
-- Fixed bug #37920 (compilation problems on z/OS). (Tony)
-- Fixed bug #37870 (pgo_pgsql tries to de-allocate unused statements).
- (Ilia, ce at netage dot bg)
-- Fixed bug #37864 (file_get_contents() leaks on empty file). (Hannes)
-- Fixed bug #37862 (Integer pointer comparison to numeric value).
- (bugs-php at thewrittenword dot com)
-- Fixed bug #37846 (wordwrap() wraps incorrectly). (ddk at krasn dot ru, Tony)
-- Fixed bug #37816 (ReflectionProperty does not throw exception when accessing
- protected attribute). (Marcus)
-- Fixed bug #37811 (define not using toString on objects). (Marcus)
-- Fixed bug #37807 (segmentation fault during SOAP schema import). (Tony)
-- Fixed bug #37806 (weird behavior of object type and comparison). (Marcus)
-- Fixed bug #37780 (memory leak trying to execute a non existing file (CLI)).
- (Mike)
-- Fixed bug #37779 (empty include_path leads to search for files inside /).
- (jr at terragate dot net, Ilia)
-- Fixed bug #37747 (strtotime segfaults when given "nextyear"). (Derick)
-- Fixed bug #37720 (merge_php_config scrambles values).
- (Mike, pumuckel at metropolis dot de)
-- Fixed bug #37709 (Possible crash in PDO::errorCode()). (Ilia)
-- Fixed bug #37707 (clone without assigning leaks memory). (Ilia, Nuno, Dmitri)
-- Fixed bug #37705 (Semaphore constants not available). (Ilia)
-- Fixed bug #37671 (MySQLi extension fails to recognize BIT column). (Ilia)
-- Fixed bug #37667 (Object is not added into array returned by __get). (Marcus)
-- Fixed bug #37635 (parameter of pcntl signal handler is trashed). (Mike)
-- Fixed bug #37632 (Protected method access problem). (Marcus)
-- Fixed bug #37630 (MySQL extensions should link against thread safe client
- libs if built with ZTS). (Mike)
-- Fixed bug #37620 (mysqli_ssl_set validation is inappropriate). (Georg)
-- Fixed bug #37616 (DATE_RFC822 does not product RFC 822 dates).
- (Hannes Magnusson, Derick)
-- Fixed bug #37614 (Class name lowercased in error message). (Johannes)
-- Fixed bug #37587 (var without attribute causes segfault). (Marcus)
-- Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion
- limit support). (Ilia)
-- Fixed bug #37581 (oci_bind_array_by_name clobbers input array when using
- SQLT_AFC, AVC). (Tony)
-- Fixed bug #37569 (WDDX incorrectly encodes high-ascii characters). (Ilia)
-- Fixed bug #37565 (Using reflection::export with simplexml causing a crash).
- (Marcus)
-- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
- compatibility issue). (Jani, patch by scott dot moynes+php at gmail dot com)
-- Fixed bug #37563 (array_key_exists performance is poor for &$array). (Ilia)
-- Fixed bug #37558 (timeout functionality doesn't work after a second PHP
- start-up on the same thread). (p dot desarnaud at wanadoo dot fr)
-- Fixed bug #37531 (oci8 persistent connection corruption). (Tony)
-- Fixed bug #37523 (namespaces added too late, leads to missing xsi:type
- attributes. Incompatibility with libxml2-2.6.24). (Dmitry)
-- Fixed bug #37514 (strtotime doesn't assume year correctly). (Derick)
-- Fixed bug #37510 (session_regenerate_id changes session_id() even on
- failure). (Hannes)
-- Fixed bug #37505 (touch() truncates large files). (Ilia)
-- Fixed bug #37499 (CLI segmentation faults during cleanup with sybase-ct
- extension enabled). (Tony)
-- Fixed bug #37496 (FastCGI output buffer overrun). (Piotr, Dmitry)
-- Fixed bug #37487 (oci_fetch_array() array-type should always default to
- OCI_BOTH). (Tony)
-- Fixed bug #37457 (Crash when an exception is thrown in accept() method of
- FilterIterator). (Marcus)
-- Fixed bug #37456 (DOMElement->setAttribute() loops forever). (Rob)
-- Fixed bug #37445 (Fixed crash in pdo_mysql resulting from premature object
- destruction). (Ilia)
-- Fixed bug #37428 (PHP crashes on windows if there are start-up errors and
- event log is used for logging them). (Edin)
-- Fixed bug #37418 (tidy module crashes on shutdown). (Tony)
-- Fixed bug #37416 (iterator_to_array() hides exceptions thrown in rewind()
- method). (Tony)
-- Fixed bug #37413 (Rejected versions of flex that don't work). (Ilia)
-- Fixed bug #37395 (recursive mkdir() fails to create nonexistent directories
- in root dir). (Tony)
-- Fixed bug #37394 (substr_compare() returns an error when offset equals
- string length). (Ilia)
-- Fixed bug #37392 (Unnecessary call to OCITransRollback() at the end of
- request). (Tony)
-- Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4). (Ilia)
-- Fixed bug #37368 (Incorrect timestamp returned for strtotime()). (Derick)
-- Fixed bug #37363 (PDO_MYSQL does not build if no other mysql extension is
- enabled). (Mike)
-- Fixed bug #37348 (make PEAR install ignore open_basedir). (Ilia)
-- Fixed bug #37341 ($_SERVER in included file is shortened to two entries,
- if $_ENV gets used). (Dmitry)
-- Fixed bug #37313 (sigemptyset() used without including <signal.h>).
- (jdolecek)
-- Fixed bug #37306 (max_execution_time = max_input_time). (Dmitry)
-- Fixed bug #37278 (SOAP not respecting uri in __soapCall). (Dmitry)
-- Fixed bug #37265 (Added missing safe_mode & open_basedir checks to
- imap_body()). (Ilia)
-- Fixed bug #37262 (var_export() does not escape \0 character). (Ilia)
-- Fixed bug #37256 (php-fastcgi doesn't handle connection abort). (Dmitry)
-- Fixed bug #37244 (Added strict flag to base64_decode() that enforces
- RFC3548 compliance). (Ilia)
-- Fixed bug #37144 (PHP crashes trying to assign into property of dead object).
- (Dmitry)
-- Fixed bug #36949 (invalid internal mysqli objects dtor). (Mike)
-- Implement #36732 (req/x509 extensions support for openssl_csr_new and
- openssl_csr_sign) (ben at psc dot edu, Pierre)
-- Fixed bug #36759 (Objects destructors are invoked in wrong order when script
- is finished). (Dmitry)
-- Fixed bug #36681 (pdo_pgsql driver incorrectly ignored some errors).
- (Wez, Ilia)
-- Fixed bug #36630 (umask not reset at the end of the request). (Ilia)
-- Fixed bug #36515 (Unlinking buckets from non-existent brigades). (Sara)
-- Fixed bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB
- field). (Tony)
-- Fixed bug #35886 (file_get_contents() fails with some combinations of
- offset & maxlen). (Nuno)
-- Fixed bug #35512 (Lack of read permission on main script results in
- E_WARNING rather then E_ERROR). (Ilia)
-- Fixed bug #34180 (--with-curlwrappers causes PHP to disregard some HTTP
- stream context options). (Mike)
-- Fixed bug #34066 (recursive array_walk causes segfault). (Tony)
-- Fixed bug #34065 (throw in foreach causes memory leaks). (Dmitry)
-- Fixed bug #34005 (oci_password_change() fails).
- (pholdaway at technocom-wireless dot com, Tony)
-- Fixed bug #33895 (Missing math constants). (Hannes)
-- Fixed bug #33770 (https:// or ftps:// do not work when --with-curlwrappers
- is used and ssl certificate is not verifiable). (Ilia)
-- Fixed bug #29538 (number_format and problem with 0). (Matt Wilmas)
-- Implement #28382 (openssl_x509_parse() extensions support) (Pierre)
-- Fixed PECL bug #9061 (oci8 might reuse wrong persistent connection). (Tony)
-- Fixed PECL bug #8816 (issue in php_oci_statement_fetch with more than one
- piecewise column) (jeff at badtz-maru dot com, Tony)
-- Fixed PECL bug #8112 (OCI8 persistent connections misbehave when Apache
- process times out). (Tony)
-- Fixed PECL bug #7755 (error selecting DOUBLE fields with PDO_ODBC).
- ("slaws", Wez)
-
-
-04 May 2006, PHP 5.1.4
-- Added "capture_peer_cert" and "capture_peer_cert_chain" context options
- for SSL streams. (Wez).
-- Added PDO::PARAM_EVT_* family of constants. (Sara)
-- Fixed possible crash in highlight_string(). (Dmitry)
-- Fixed bug #37291 (FastCGI no longer works with isapi_fcgi.dll). (Dmitry)
-- Fixed bug #37277 (cloning Dom Documents or Nodes does not work). (Rob)
-- Fixed bug #37276 (problems with $_POST array). (Dmitry)
-- Fixed bug #36632 (bad error reporting for pdo_odbc exec UPDATE). (Wez).
-- Fixed bug #35552 (crash when pdo_odbc prepare fails). (Wez).
-
-28 Apr 2006, PHP 5.1.3
-- Updated bundled PCRE library to version 6.6. (Andrei)
-- Moved extensions to PECL:
- . ext/msession (Derick)
-- Reimplemented FastCGI interface. (Dmitry)
-- Improved SPL: (Marcus)
- - Fixed issues with not/double calling of constructors of SPL iterators.
- - Fixed issues with info-class/file-class in SPL directory handling classes.
- - Fixed ArrayIterator::seek().
- - Added SimpleXMLIterator::count().
- - Dropped erroneous RecursiveDirectoryIterator::getSubPathInfo().
-- Improved SimpleXML: (Marcus, Rob)
- . Added SimpleXMLElement::getName() to retrieve name of element.
- . Added ability to create elements on the fly.
- . Added addChild() method for element creation supporting namespaces.
- . Added addAttribute() method for attribute creation supporting namespaces.
- . Added ability to delete specific elements and attributes by offset.
-- Improved Reflection API: (Marcus)
- . Added ReflectionClass::newInstanceArgs($args).
- . Added ability to analyze extension dependency.
- . Added ReflectionFunction::isDeprecated() and constant IS_DEPRECATED.
- . Added ReflectionParameter::getDeclaringClass().
- . Changed reflection constants to be prefixed with IS_. (Johannes)
-- Improved cURL extension: (Ilia)
- . Added curl_setopt_array() function that allows setting of multiple
- options via an associated array.
- . Added the ability to retrieve the request message sent to the server.
-- Improved GD extension: (Pierre)
- . Added a weak/tolerant mode to the JPEG loader.
- . Added filtering mode option to imagepng() to allow reducing file size.
- . Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
- on error.
-- Changed get_headers() to retrieve headers also from non-200 responses.
- (Ilia)
-- Changed get_headers() to use the default context. (Ilia)
-- Added lchown() and lchgrp() to change user/group ownership of symlinks.
- (Derick)
-- Added support for exif date format in strtotime(). (Derick)
-- Added a check for special characters in the session name. (Ilia)
-- Added "consumed" stream filter. (Marcus)
-- Added new mysqli constants for BIT and NEW_DECIMAL field types:
- MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
-- Added imap_savebody() that allows message body to be written to a
- file. (Mike)
-- Added overflow checks to wordwrap() function. (Ilia)
-- Added support for BINARY_DOUBLE and BINARY_FLOAT to PDO_OCI and OCI8
- (also fixes bug #36764). (Tony)
-- Eliminated run-time constant fetching for TRUE, FALSE and NULL. (Dmitry)
-- Removed the E_STRICT deprecation notice from "var". (Ilia)
-- Fixed reading stream filters never notified about EOF. (Mike)
-- Fixed tempnam() 2nd parameter to be checked against path components. (Ilia)
-- Fixed a bug that would not fill in the fifth argument to preg_replace()
- properly, if the variable was not declared previously. (Andrei)
-- Fixed safe_mode check for source argument of the copy() function. (Ilia)
-- Fixed mysqli bigint conversion under Windows (Georg)
-- Fixed XSS inside phpinfo() with long inputs. (Ilia)
-- Fixed Apache2 SAPIs header handler modifying header strings. (Mike)
-- Fixed 'auto_globals_jit' to work together with 'register_argc_argv'. (Dmitry)
-- Fixed offset/length parameter validation in substr_compare() function. (Ilia)
-- Fixed debug_zval_dump() to support private and protected members. (Dmitry)
-- Fixed SoapFault::getMessage(). (Dmitry)
-- Fixed issue with iconv_mime_decode where the "encoding" would only allow
- upper case specifiers. (Derick)
-- Fixed tiger hash algorithm generating wrong results on big endian platforms.
- (Mike)
-- Fixed crash with DOMImplementation::createDocumentType("name:"). (Mike)
-- Fixed bug #37205 (Serving binary content/images fails with "comm with server
- aborted" FastCGI err). (Dmitry)
-- Fixed bug #37192 (cc may complain about non-constant initializers in
- hash_adler.c). (Mike)
-- Fixed bug #37191 (chmod takes off sticky bit when safe_mode is On). (Tony)
-- Fixed bug #37167 (PDO segfaults when throwing exception from the
- fetch handler). (Tony)
-- Fixed bug #37162 (wddx does not build as a shared extension).
- (jdolecek at NetBSD dot org, Ilia)
-- Fixed bug #37158 (fread behavior changes after calling
- stream_wrapper_register). (Wez)
-- Fixed bug #37138 (__autoload tries to load callback'ed self and parent).
- (Dmitry)
-- Fixed bug #37103 (libmbfl headers not installed). (Jani)
-- Fixed bug #37062 (compile failure on ARM architecture). (Tony)
-- Fixed bug #37061 (curl_exec() doesn't zero-terminate binary strings). (Tony)
-- Fixed bug #37060 (Type of retval of Countable::count() is not checked).
- (Johannes)
-- Fixed bug #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW
- fields). (Tony)
-- Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings,
- which are unaccessible). (Tony)
-- Fixed bug #37055 (incorrect reference counting for persistent OCI8
- connections). (Tony)
-- Fixed bug #37054 (SoapClient Error Fetching http headers). (Dmitry)
-- Fixed bug #37053 (html_errors with internal classes produces wrong links).
- (Tony)
-- Fixed bug #37046 (foreach breaks static scope). (Dmitry)
-- Fixed bug #37045 (Fixed check for special chars for http redirects). (Ilia)
-- Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
- identifiers). (Derick)
-- Fixed bug #37002 (Have to quote literals in INI when concatenating with
- vars). (Dmitry)z
-- Fixed bug #36988 (mktime freezes on long numbers). (Derick)
-- Fixed bug #36981 (SplFileObject->fgets() ignores max_length). (Tony)
-- Fixed bug #36957 (serialize() does not handle recursion). (Ilia)
-- Fixed bug #36944 (strncmp & strncasecmp do not return false on negative
- string length). (Tony)
-- Fixed bug #36941 (ArrayIterator does not clone itself). (Marcus)
-- Fixed bug #36934 (OCILob->read() doesn't move internal pointer when
- reading 0's). (Tony)
-- Fixed bug #36908 (wsdl default value overrides value in soap request).
- (Dmitry)
-- Fixed bug #36898 (__set() leaks in classes extending internal ones).
- (Tony, Dmitry)
-- Fixed bug #36886 (User filters can leak buckets in some situations). (Ilia)
-- Fixed bug #36878 (error messages are printed even though an exception has
- been thrown). (Tony)
-- Fixed bug #36875 (is_*() functions do not account for open_basedir). (Ilia)
-- Fixed bug #36872 (session_destroy() fails after call to
- session_regenerate_id(true)). (Ilia)
-- Fixed bug #36869 (memory leak in output buffering when using chunked
- output). (Tony)
-- Fixed bug #36859 (DOMElement crashes when calling __construct when
- cloning). (Tony)
-- Fixed bug #36857 (Added support for partial content fetching to the
- HTTP streams wrapper). (Ilia)
-- Fixed bug #36851 (Documentation and code discrepancies for NULL
- data in oci_fetch_*() functions). (Tony)
-- Fixed bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause
- segfault). (Tony)
-- Fixed bug #36820 (Privileged connection with an Oracle password file
- fails). (Tony)
-- Fixed bug #36809 (__FILE__ behavior changed). (Dmitry)
-- Fixed bug #36808 (syslog ident becomes garbage between requests). (Tony)
-- Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection).
- (Ilia)
-- Fixed bug #36756 (DOMDocument::removeChild corrupts node). (Rob)
-- Fixed bug #36749 (SOAP: 'Error Fetching http body' when using HTTP Proxy).
- (Dmitry)
-- Fixed bug #36745 (No error message when load data local file isn't found).
- (Georg)
-- Fixed bug #36743 (In a class extending XMLReader array properties are not
- writable). (Tony)
-- Fixed bug #36727 (segfault in pdo_pgsql bindValue() when no parameters are
- defined). (Tony)
-- Fixed bug #36721 (The SoapServer is not able to send a header that it didn't
- receive). (Dmitry)
-- Fixed bug #36697 (Transparency is lost when using imagecreatetruecolor).
- (Pierre)
-- Fixed bug #36689 (Removed arbitrary limit on the length of syslog messages).
- (Ilia)
-- Fixed bug #36656 (http_build_query generates invalid URIs due to use of
- square brackets). (Mike)
-- Fixed bug #36638 (strtotime() returns false when 2nd argument < 1). (Derick)
-- Fixed bug #36629 (SoapServer::handle() exits on SOAP faults). (Dmitry)
-- Fixed bug #36625 (pg_trace() does not work). (iakio at mono-space dot net)
-- Fixed bug #36614 (Segfault when using Soap). (Dmitry)
-- Fixed bug #36611 (assignment to SimpleXML object attribute changes argument
- type to string). (Tony)
-- Fixed bug #36606 (pg_query_params() changes arguments type to string). (Tony)
-- Fixed bug #36599 (DATE_W3C format constant incorrect). (Derick)
-- Fixed bug #36575 (SOAP: Incorrect complex type instantiation with
- hierarchies). (Dmitry)
-- Fixed bug #36572 (Added PDO::MYSQL_ATTR_DIRECT_QUERY constant that should
- be set when executing internal queries like "show master status" via MySQL).
- (Ilia)
-- Fixed bug #36568 (memory_limit setting on win32 has no effect). (Dmitry)
-- Fixed bug #36513 (comment will be outputted in last line). (Dmitry)
-- Fixed bug #36510 (strtotime() fails to parse date strings with tabs).
- (Ilia, Derick)
-- Fixed bug #36459 (Incorrect adding PHPSESSID to links, which contains \r\n).
- (Ilia)
-- Fixed bug #36458 (sleep() accepts negative values). (Ilia)
-- Fixed bug #36436 (DBA problem with Berkeley DB4). (Marcus)
-- Fixed bug #36434 (Improper resolution of declaring class name of an
- inherited property). (Ilia)
-- Fixed bug #36420 (segfault when access result->num_rows after calling
- result->close()). (Ilia,Tony)
-- Fixed bug #36403 (oci_execute() no longer supports OCI_DESCRIBE_ONLY). (Tony)
-- Fixed bug #36400 (Custom 5xx error does not return correct HTTP response error
- code). (Tony)
-- Fixed bug #36396 (strtotime() fails to parse dates in dd-mm-yyyy format).
- (Derick)
-- Fixed bug #36388 (ext/soap crashes when throwing exception and session
- persistence). (David)
-- Fixed bug #36382 (PDO/PgSQL's getColumnMeta() crashes). (Derick)
-- Fixed bug #36359 (splFileObject::fwrite() doesn't write when no data
- length specified). (Tony)
-- Fixed bug #36351 (parse_url() does not parse numeric paths properly). (Ilia)
-- Fixed bug #36345 (PDO/MySQL problem loading BLOB over 1MB). (Ilia)
-- Fixed bug #36337 (ReflectionProperty fails to return correct visibility).
- (Ilia)
-- Fixed bug #36334 (Added missing documentation about realpath cache INI
- settings). (Ilia)
-- Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
- extended class commentary). (Ilia)
-- Fixed bug #36306 (crc32() differ on 32-bit and 64-bit platforms)
- (anight@eyelinkmedia dot com, Pierre)
-- Fixed bug #36303 (foreach on error_zval produces segfault). (Dmitry)
-- Fixed bug #36295 (typo in SplFileObject::flock() parameter name). (Tony)
-- Fixed bug #36287 (Segfault with SplFileInfo conversion). (Marcus)
-- Fixed bug #36283 (SOAPClient Compression Broken). (Dmitry)
-- Fixed bug #36268 (Object destructors called even after fatal errors). (Dmitry)
-- Fixed bug #36258 (SplFileObject::getPath() may lead to segfault). (Tony)
-- Fixed bug #36250 (PHP causes ORA-07445 core dump in Oracle server 9.2.x).
- (Tony)
-- Fixed bug #36242 (Possible memory corruption in stream_select()). (Tony)
-- Fixed bug #36235 (ocicolumnname returns false before a successful fetch).
- (Tony)
-- Fixed bug #36226 (Inconsistent handling when passing potential arrays).
- (Dmitry)
-- Fixed bug #36224 (date(DATE_ATOM) gives wrong results).
- (Derick, Hannes Magnusson)
-- Fixed bug #36222 (errorInfo in PDOException is always NULL). (Ilia)
-- Fixed bug #36208 (symbol namespace conflicts using bundled gd). (Jakub Moc)
-- Fixed bug #36205 (Memory leaks on duplicate cookies). (Dmitry)
-- Fixed bug #36185 (str_rot13() crash on non-string parameter). (Pierre)
-- Fixed bug #36176 (PDO_PGSQL - PDO::exec() does not return number of rows
- affected by the operation). (Ilia)
-- Fixed bug #36158 (SIGTERM is not handled correctly when running as a
- FastCGI server). (Dmitry)
-- Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike)
-- Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to
- the end of the string). (Ilia)
-- Fixed bug #36134 (DirectoryIterator constructor failed to detect empty
- directory names). (Ilia)
-- Fixed bug #36113 (Reading records of unsupported type causes segfault).
- (Tony)
-- Fixed bug #36096 (oci_result() returns garbage after oci_fetch() failed).
- (Tony)
-- Fixed bug #36083 (SoapClient waits for responses on one-way operations).
- (Dmitry)
-- Fixed bug #36071 (Engine Crash related with 'clone'). (Dmitry)
-- Fixed bug #36055 (possible OCI8 crash in multi-threaded environment). (Tony)
-- Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values).
- (Ilia)
-- Fixed bug #36038 (ext/hash compile failure on Mac OSX). (Tony)
-- Fixed bug #36037 (heredoc adds extra line number). (Dmitry)
-- Fixed bug #36016 (realpath cache memleaks). (Dmitry, Nuno)
-- Fixed bug #36011 (Strict errormsg wrong for call_user_func() and the likes).
- (Marcus)
-- Fixed bug #36010 (Segfault when re-creating and re-executing statements with
- bound parameters). (Tony)
-- Fixed bug #36006 (Problem with $this in __destruct()). (Dmitry)
-- Fixed bug #35999 (recursive mkdir() does not work with relative path
- like "foo/bar"). (Tony)
-- Fixed bug #35998 (SplFileInfo::getPathname() returns unix style filenames
- in win32). (Marcus)
-- Fixed bug #35988 (Unknown persistent list entry type in module shutdown).
- (Dmitry)
-- Fixed bug #35954 (Fatal com_exception casting object). (Rob)
-- Fixed bug #35900 (stream_select() should warning when tv_sec is negative).
- (Ilia)
-- Fixed bug #35785 (SimpleXML causes memory read error zend engine). (Marcus)
-- Fixed bug #34272 (empty array onto COM object blows up). (Rob)
-- Fixed bug #33292 (apache_get_modules() crashes on Windows). (Edin)
-- Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever).
- (Ilia)
-
-12 Jan 2006, PHP 5.1.2
-- Updated libsqlite in ext/sqlite to 2.8.17. (Ilia)
-- Updated libsqlite in ext/pdo_sqlite to 3.2.8. (Ilia)
-- Updated to libxml2-2.6.22 and libxslt-1.1.15 in the win32 bundle. (Rob)
-- Added new extensions: (Ilia, Wez)
- . XMLWriter
- . Hash
-- Added PNG compression support to GD extension. (Pierre)
-- Added reflection constants as class constants. (Johannes)
-- Added --enable-gcov configure option to enable C-level code coverage.
- (John, Jani, Ilia, Marcus)
-- Added missing support for 'B' format identifier to date() function. (Ilia)
-- Changed reflection to be an extension. (Marcus)
-- Improved SPL extension: (Marcus)
- . Added class SplFileInfo as root class for DirectoryIterator and
- SplFileObject
- . Added SplTempFileObject
-- Improved SimpleXML extension: (Marcus)
- . Fixed memleaks
- . Fixed var_dump()
- . Fixed isset/empty/(bool) behavior
- . Fixed iterator edge cases
- . Added methods getNamespaces(), getDocNamespaces()
-- Upgraded pear to version 1.4.6. (Greg)
-- Added constants for libxslt and libexslt versions: LIBXSLT_VERSION,
- LIBXSLT_DOTTED_VERSION, LIBEXSLT_VERSION and LIBEXSLT_DOTTED_VERSION. (Pierre)
-- Fixed possible crash in apache_getenv()/apache_setenv() on invalid parameters.
- (Ilia)
-- Changed errors to warnings in imagecolormatch(). (Pierre)
-- Fixed segfault/leak in imagecolormatch(). (Pierre)
-- Fixed small leak in mysqli_stmt_fetch() when bound variable was empty string.
- (Andrey)
-- Fixed prepared statement name conflict handling in PDO_PGSQL. (Thies, Ilia)
-- Fixed memory corruption when PDO::FETCH_LAZY mode is being used. (Ilia)
-- Fixed possible leaks in imagecreatefromstring() with invalid data. (Pierre)
-- Fixed possible memory corruption inside mb_strcut(). (Ilia)
-- Fixed possible header injection by limiting each header to a single line.
- (Ilia)
-- Fixed possible XSS inside error reporting functionality. (Ilia)
-- Fixed many bugs in OCI8. (Tony)
-- Fixed crash and leak in mysqli when using 4.1.x client libraries and
- connecting to 5.x server. (Andrey)
-- Fixed bug #35916 (Duplicate calls to stream_bucket_append() lead to a crash).
- (Ilia)
-- Fixed bug #35908 (curl extension uses undefined GCRY_THREAD_OPTIONS_USER).
- (Ilia)
-- Fixed bug #35907 (PDO_OCI uses hardcoded lib path $ORACLE_HOME/lib). (Tony)
-- Fixed bug #35887 (wddx_deserialize not parsing dateTime fields properly).
- (Derick)
-- Fixed bug #35885 (strtotime("NOW") no longer works). (Derick)
-- Fixed bug #35821 (array_map() segfaults when exception is throwed from
- the callback). (Tony)
-- Fixed bug #35817 (unpack() does not decode odd number of hexadecimal values).
- (Ilia)
-- Fixed bug #35797 (segfault on PDOStatement::execute() with
- zend.ze1_compatibility_mode = On). (Tony, Ilia)
-- Fixed bug #35781 (stream_filter_append() can cause segfault). (Tony)
-- Fixed bug #35760 (sybase_ct doesn't compile on Solaris using old gcc). (Tony)
-- Fixed bug #35759 (mysqli_stmt_bind_result() makes huge allocation when
- column empty). (Andrey)
-- Fixed bug #35751 (using date with a timestamp makes httpd segfault). (Derick)
-- Fixed bug #35740 (memory leak when including a directory). (Tony)
-- Fixed bug #35730 (ext/mssql + freetds: Use correct character encoding
- and allow setting it). (Frank)
-- Fixed bug #35723 (xmlrpc_introspection.c fails compile per C99 std). (Jani)
-- Fixed bug #35720 (A final constructor can be overwritten). (Marcus)
-- Fixed bug #35713 (getopt() returns array with numeric strings when passed
- options like '-1'). (Tony)
-- Fixed bug #35705 (strtotime() fails to parse soap date format without TZ).
- (Ilia)
-- Fixed bug #35699 (date() can't handle leap years before 1970). (Derick)
-- Fixed bug #35694 (Improved error message for invalid fetch mode). (Ilia)
-- Fixed bug #35692 (iconv_mime_decode() segmentation fault; with libiconv
- only). (Tony)
-- Fixed bug #35690 (pack() tries to allocate huge memory block when packing
- float values to strings). (Tony)
-- Fixed bug #35669 (imap_mail_compose() crashes with
- multipart-multiboundary-email). (Ilia)
-- Fixed bug #35660 (AIX TZ variable format not understood, yields UTC
- timezone). (Derick)
-- Fixed bug #35655 (whitespace following end of heredoc is lost). (Ilia)
-- Fixed bug #35630 (strtotime() crashes on certain relative identifiers).
- (Ilia)
-- Fixed bug #35629 (crash in http:// wrapper on multiple redirects). (Ilia)
-- Fixed bug #35624 (strtotime() does not handle 3 character weekdays). (Ilia)
-- Fixed bug #35612 (iis6 Access Violation crash). (Dmitry, alacn.uhahaa)
-- Fixed bug #35594 (Multiple calls to getopt() may result in a crash).
- (rabbitt at gmail dot com, Ilia)
-- Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php
- script is loaded via SSI include). (Ilia)
-- Fixed bug #35570 (segfault when re-using soap client object). (Dmitry)
-- Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). (Ilia)
-- Fixed bug #35543 (php crash when calling non existing method of a class
- that extends PDO). (Tony)
-- Fixed bug #35539 (typo in error message for ErrorException). (Tony)
-- FIxed bug #35536 (mysql_field_type() doesn't handle NEWDECIMAL). (Tony)
-- Fixed bug #35517 (mysql_stmt_fetch returns NULL on data truncation). (Georg)
-- Fixed bug #35509 (string constant as array key has different behavior inside
- object). (Dmitry)
-- Fixed bug #35508 (PDO fails when unknown fetch mode specified). (Tony)
-- Fixed bug #35499 (strtotime() does not handle whitespace around the date
- string). (Ilia)
-- Fixed bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without
- proper init). (Ilia)
-- Fixed bug #35490 (socket_sendto() unable to handle IPv6 addresses). (Tony)
-- Fixed bug #35461 (Ming extension fails to compile with ming 0.3beta1). (Jani)
-- Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4). (Dmitry)
-- Fixed bug #35470 (Assigning global using variable name from array doesn't
- function). (Dmitry)
-- Fixed bug #35456 (+ 1 [time unit] format did not work). (Ilia)
-- Fixed bug #35447 (xml_parse_into_struct() chokes on the UTF-8 BOM). (Rob)
-- Fixed bug #35431 (PDO crashes when using LAZY fetch with fetchAll). (Wez)
-- Fixed bug #35430 (PDO crashes on incorrect FETCH_FUNC use). (Tony)
-- Fixed bug #35427 (str_word_count() handles '-' incorrectly). (Ilia)
-- Fixed bug #35425 (idate() function ignores timezone settings). (Ilia)
-- Fixed bug #35422 (strtotime() does not parse times with UTC as timezone).
- (Ilia)
-- Fixed bug #35414 (strtotime() no longer works with ordinal suffix). (Ilia)
-- Fixed bug #35410 (wddx_deserialize() doesn't handle large ints as keys
- properly). (Ilia)
-- Fixed bug #35409 (undefined reference to 'rl_completion_matches'). (Jani)
-- Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of
- soapenc:base64binary fails). (Dmitry)
-- Fixed bug #35393 (changing static protected members from outside the class,
- one more reference issue). (Dmitry)
-- Fixed bug #35381 (ssl library is not initialized properly). (Alan)
-- Fixed bug #35377 (PDO_SQLITE: undefined reference to "fdatasync").
- (Nuno, Jani)
-- Fixed bug #35373 (HP-UX "alias not allowed in this configuration"). (Dmitry)
-- Fixed bug #35288 (iconv() function defined as libiconv()). (Nuno)
-- Fixed bug #35103 (mysqli handles bad unsigned (big)int incorrectly).(Andrey)
-- Fixed bug #35062 (socket_read() produces warnings on non blocking sockets).
- (Nuno, Ilia)
-- Fixed bug #35028 (SimpleXML object fails FALSE test). (Marcus)
-- Fixed bug #34729 (Crash in ZTS mode under Apache). (Dmitry, Zeev)
-- Fixed bug #34429 (Output buffering cannot be turned off with FastCGI).
- (Dmitry, Ilya)
-- Fixed bug #34359 (Possible crash inside fopen http wrapper). (Ilia,Sara,Nuno)
-- Fixed bug #33789 (Many Problems with SunFuncs). (Derick)
-- Fixed bug #33671 (sun_rise and sun_set don't return a GMT timestamp if one
- passes an offset). (Derick)
-- Fixed bug #32820 (date_sunrise and date_sunset don't handle GMT offset
- well). (Derick)
-- Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any string
- greater then 255 characters). (Nuno,Ilia)
-- Fixed bug #30937 (date_sunrise() & date_sunset() don't handle endless
- day/night at high latitudes). (Derick)
-- Fixed bug #30760 (Remove MessageBox on win32 for E_CORE errors if
- display_startup_error is off). (Ilia)
-- Fixed bug #29955 (mb_strtoupper() / lower() broken with Turkish encoding).
- (Rui)
-- Fixed bug #28899 (mb_substr() and substr() behave differently when
- "mbstring.func_overload" is enabled). (Rui)
-- Fixed bug #27678 (number_format() crashes with large numbers). (Marcus)
-
-28 Nov 2005, PHP 5.1.1
-- Disabled native date class to prevent pear::date conflict. (Ilia)
-- Changed reflection constants be both PHP and class constants. (Johannes)
-- Added an additional field $frame['object'] to the result array of
- debug_backtrace() that contains a reference to the respective object when the
- frame was called from an object. (Sebastian)
-- Fixed bug #35423 (RecursiveDirectoryIterator doesnt appear to recurse with
- RecursiveFilterIterator). (Marcus)
-- Fixed bug #35413 (Removed -dev flag from Zend Engine version). (Ilia)
-- Fixed bug #35411 (Regression with \{$ handling). (Ilia)
-- Fixed bug #35406 (eval hangs when evall'ed code ends with comment w/o
- newline). (Marcus)
-- Fixed bug #35391 (pdo_mysql::exec does not return number of affected rows).
- (Tony)
-- Fixed bug #35382 (Comment in end of file produces fatal error). (Ilia)
-- Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash).
- (Dmitry)
-- Fixed bug #35358 (Incorrect error messages for PDO class constants). (Ilia)
-- Fixed bug #35338 (pdo_pgsql does not handle binary bound params). (Wez)
-- Fixed bug #35316 (Application exception trying to create COM object). (Rob)
-- Fixed bug #35170 (PHP_AUTH_DIGEST differs under Apache 1.x and 2.x). (Ilia)
-
-24 Nov 2005, PHP 5.1
-- Added support for class constants and static members for internal classes.
- (Dmitry, Michael Wallner)
-- Added "new_link" parameter to mssql_connect() (Bug #34369). (Frank)
-- Added missing safe_mode checks for image* functions and cURL. (Ilia)
-- Added missing safe_mode/open_basedir checks for file uploads. (Ilia)
-- Added PDO_MYSQL_ATTR_USE_BUFFERED_QUERY parameter for pdo_mysql. (Ilia)
-- Added date_timezone_set() function to set the timezone that the date
- function will use. (Derick)
-- Added pg_fetch_all_columns() function to fetch all values of a column from a
- result cursor. (Ilia)
-- Added support for LOCK_EX flag for file_put_contents(). (Ilia)
-- Added bindto socket context option. (Ilia)
-- Added offset parameter to the stream_copy_to_stream() function. (Ilia)
-- Added offset & length parameters to substr_count() function. (Ilia)
-- Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana)
-- Added support for .cc files in extensions. (Brian)
-- Added PHP_INT_MAX and PHP_INT_SIZE as predefined constants. (Andrey)
-- Added user opcode API that allow overloading of opcode handlers. (Dmitry)
-- Added an optional remove old session parameter to session_regenerate_id().
- (Ilia)
-- Added array type hinting. (Dmitry)
-- Added the tidy_get_opt_doc() function to return documentation for
- configuration options in tidy. (Patch by: nlopess@php.net)
-- Added support for .cc files in extensions. (Brian)
-- Added imageconvolution() function which can be used to apply a custom 3x3
- matrix convolution to an image. (Pierre)
-- Added optional first parameter to XsltProcessor::registerPHPFunctions to
- only allow certain functions to be called from XSLT. (Christian)
-- Added the ability to override the autotools executables used by the
- buildconf script via the PHP_AUTOCONF and PHP_AUTOHEADER environmental
- variables. (Jon)
-- Added several new functions to support the PostgreSQL v3 protocol introduced
- in PostgreSQL 7.4. (Christopher)
- . pg_transaction_status() - in-transaction status of a database connection.
- . pg_query_params() - execution of parameterized queries.
- . pg_prepare() - prepare named queries.
- . pg_execute() - execution of named prepared queries.
- . pg_send_query_params() - async equivalent of pg_query_params().
- . pg_send_prepare() - async equivalent of pg_prepare().
- . pg_send_execute() - async equivalent of pg_execute().
- . pg_result_error_field() - highly detailed error information, most
- importantly
- the SQLSTATE error code.
- . pg_set_error_verbosity() - set verbosity of errors.
-- Added optional fifth parameter "count" to preg_replace_callback() and
- preg_replace() to count the number of replacements made. FR #32275. (Andrey)
-- Added optional third parameter "charlist" to str_word_count() which contains
- characters to be considered as word part. FR #31560. (Andrey, Ilia)
-- Added interface Serializable. (Stanislav, Marcus)
-- Added pg_field_type_oid() PostgreSQL function. (mauroi at digbang dot com)
-- Added zend_declare_property_...() and zend_update_property_...() API
- functions for bool, double and binary safe strings. (Hartmut)
-- Added possibility to access INI variables from within .ini file. (Andrei)
-- Added variable $_SERVER['REQUEST_TIME'] containing request start time.
- (Ilia)
-- Added optional float parameter to gettimeofday(). (Ilia)
-- Added apache_reset_timeout() Apache1 function. (Rasmus)
-- Added sqlite_fetch_column_types() 3rd argument for arrays. (Ilia)
-- Added optional offset parameter to stream_get_contents() and
- file_get_contents(). (Ilia)
-- Added optional maxlen parameter to file_get_contents(). (Ilia)
-- Added SAPI hook to get the current request time. (Rasmus)
-- Added new functions:
- . array_diff_key() (Andrey)
- . array_diff_ukey() (Andrey)
- . array_intersect_key() (Christiano Duarte)
- . array_intersect_ukey() (Christiano Duarte)
- . array_product() (Andrey)
- . DomDocumentFragment::appendXML() (Christian)
- . fputcsv() (David Sklar)
- . htmlspecialchars_decode() (Ilia)
- . inet_pton() (Sara)
- . inet_ntop() (Sara)
- . mysqli::client_info property (Georg)
- . posix_access() (Magnus)
- . posix_mknod() (Magnus)
- . SimpleXMLElement::registerXPathNamespace() (Christian)
- . stream_context_get_default() (Wez)
- . stream_socket_enable_crypto() (Wez)
- . stream_wrapper_unregister() (Sara)
- . stream_wrapper_restore() (Sara)
- . stream_filter_remove() (Sara)
- . time_sleep_until() (Ilia)
-- Added DomDocument::$recover property for parsing not well-formed XML
- Documents. (Christian)
-- Added Cursor support for MySQL 5.0.x in mysqli (Georg)
-- Added proxy support to ftp wrapper via http. (Sara)
-- Added MDTM support to ftp_url_stat. (Sara)
-- Added zlib stream filter support. (Sara)
-- Added bz2 stream filter support. (Sara)
-- Added max_redirects context option that specifies how many HTTP
- redirects to follow. (Ilia)
-- Added support of parameter=>value arrays to
- xsl_xsltprocessor_set_parameter(). (Tony)
-
-- PHP extension loading mechanism with support for module
- dependencies and conflicts. (Jani, Dmitry)
-- Improved interactive mode of PHP CLI (php -a). (Johannes, Marcus)
-- Improved performance of:
- . general execution/compilation. (Andi, Thies, Sterling, Dmitry, Marcus)
- . switch() statement. (Dmitry)
- . several array functions. (Marcus)
- . virtual path handling by adding a realpath() cache. (Andi)
- . variable fetches. (Andi)
- . magic method invocations. (Marcus)
-- Improved support for embedded server in mysqli. (Georg)
-- Improved mysqli extension. (Georg)
- . added constructor for mysqli_stmt and mysqli_result classes
- . added new function mysqli_get_charset()
- . added new function mysqli_set_charset()
- . added new class mysqli_driver
- . added new class mysqli_warning
- . added new class mysqli_exception
- . added new class mysqli_sql_exception
-- Improved SPL extension. (Marcus)
- . Moved RecursiveArrayIterator from examples into extension
- . Moved RecursiveFilterIterator from examples into extension
- . Added SplObjectStorage
- . Made all SPL constants class constants
- . Renamed CachingRecursiveIterator to RecursiveCachingIterator to follow
- Recursive<*>Iterator naming scheme.
- . added standard hierarchy of Exception classes
- . added interface Countable
- . added interfaces Subject and SplObserver
- . added spl_autoload*() functions
- . converted several 5.0 examples into c code
- . added class SplFileObject
- . added possibility to use a string with class_parents() and
- class_implements(). (Andrey)
-
-- Changed type hints to allow "null" as default value for class and array.
- (Marcus, Derick, Dmitry)
-- Changed SQLite extension to be a shared module in Windows distribution.
- (Edin)
-- Changed "instanceof" and "catch" operators, is_a() and is_subclass_of()
- functions to not call __autoload(). (Dmitry)
-- Changed sha1_file() and md5_file() functions to use streams instead of low
- level IO. (Uwe)
-- Changed abstract private methods to be not allowed anymore. (Stas)
-- Changed stream_filter_(ap|pre)pend() to return resource. (Sara)
-- Changed mysqli_exception and sqlite_exception to use RuntimeException as
- base if SPL extension is present. (Georg, Marcus)
-
-- Upgraded bundled libraries:
- . PCRE library to version 6.2. (Andrei)
- . SQLite 3 library in ext/pdo_sqlite to 3.2.7. (Ilia)
- . SQLite 2 library in ext/sqlite to 2.8.16. (Ilia)
-- Upgraded bundled libraries in Windows distribution. (Edin)
- . zlib 1.2.3
- . curl 7.14.0
- . openssl 0.9.8
- . ming 0.3b
- . libpq (PostgreSQL) 8.0.1
-
-- Implemented feature request #33452 (Year belonging to ISO week). (Derick)
-- Allowed return by reference from internal functions. (Marcus, Andi, Dmitry)
-- Rewrote strtotime() with support for timezones and many new formats.
- Implements feature requests #21399, #26694, #28088, #29150, #29585 and
- #29595. (Derick)
-
-- Moved extensions to PECL:
- . ext/cpdf (Tony, Derick)
- . ext/dio (Jani, Derick)
- . ext/fam (Jani, Derick)
- . ext/ingres_ii (Jani, Derick)
- . ext/mnogosearch (Jani, Derick)
- . ext/w32api (Jani, Derick)
- . ext/yp (Jani, Derick)
- . ext/mcve (Jani, Derick, Pierre)
- . ext/oracle (Jani, Derick)
- . ext/ovrimos (Jani, Derick, Pierre)
- . ext/pfpro (Jani, Derick, Pierre)
- . ext/dbx (Jani, Derick)
- . ext/ircg (Jani, Derick)
-
-- Removed php_check_syntax() function which never worked properly. (Ilia)
-- Removed garbage manager in Zend Engine which results in more aggressive
- freeing of data. (Dmitry, Andi)
-
-- Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
-- Fixed Apache 2 regression with sub-request handling on non-linux systems.
- (Ilia, Tony)
-- Fixed PDO shutdown problem (possible infinite loop running rollback on
- shutdown). (Wez)
-- Fixed PECL bug #3714 (PDO: beginTransaction doesn't work if you're in
- auto-commit mode). (Wez)
-- Fixed ZTS destruction. (Marcus)
-- Fixed __get/__set to allow recursive calls for different properties. (Dmitry)
-- Fixed a bug where stream_get_meta_data() did not return the "uri" element
- for files opened with tmpname(). (Derick)
-- Fixed a problem with SPL iterators aggregating the inner iterator. (Marcus)
-- Fixed an error in mysqli_fetch_fields (returned NULL instead of an array
- when row number > field_count). (Georg)
-- Fixed bug in mysql::client_version(). (Georg)
-- Fixed bug in mysqli extension with unsigned int(11) being represented as
- signed integer in PHP instead of string in 32bit systems. (Andrey)
-- Fixed bug with $HTTP_RAW_POST_DATA not getting set. (Brian)
-- Fixed crash inside stream_get_line() when length parameter equals 0. (Ilia)
-- Fixed ext/mysqli to allocate less memory when fetching bound params of type
- (MEDIUM|LONG)BLOB/(MEDIUM|LONG)TEXT. (Andrey)
-- Fixed extension initialization to respect dependencies between extensions.
- (Wez)
-- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
- (Andrey)
-- Fixed fgetcsv() and fputcsv() inconsistency. (Dmitry)
-- Fixed inheritance check to control return by reference and pass by
- reference correctly (ArrayAccess can no longer support references correctly).
- (Marcus, Andi, Dmitry)
-- Fixed initializing and argument checking for posix_mknod(). (Derick)
-- Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey)
-- Fixed memory corruption in pg_copy_from() in case the as_null parameter was
- passed. (Derick)
-- Fixed memory corruption in stristr(). (Derick)
-- Fixed possible GLOBALS variable override when register_globals are ON.
- (Ilia, Stefan)
-- Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia)
-- Fixed possible register_globals toggle via parse_str(). (Ilia, Stefan)
-- Fixed potential GLOBALS overwrite via import_request_variables() and
- possible crash and/or memory corruption. (Ilia)
-- Fixed segfaults when CURL callback functions throw exception. (Tony)
-- Fixed support for shared extensions on AIX. (Dmitry)
-- Fixed bug #35342 (isset(DOMNodeList->length) returns false). (Rob)
-- Fixed bug #35341 (Fix for bug #33760 breaks build with older curl). (Tony)
-- Fixed bug #35336 (crash on PDO::FETCH_CLASS + __set()). (Tony)
-- Fixed bug #35303 (PDO prepare() crashes with invalid parameters). (Ilia)
-- Fixed bug #35293 (PDO segfaults when using persistent connections). (Tony)
-- Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module). (Ilia)
-- Fixed bug #35273 (Error in mapping soap - java types). (Dmitry)
-- Fixed bug #35249 (compile failure when ext/readline is compiled as shared).
- (Jani)
-- Fixed bug #35248 (sqlite_query() doesn't set error_msg when return value is
- being used). (Ilia)
-- Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on
- Linux). (Patch: shulmanb at il dot ibm dot com, Jani)
-- Fixed bug #35239 (Objects can lose references). (Dmitry)
-- Fixed bug #35229 (call_user_func() crashes when argument_stack is nearly
- full). (Dmitry)
-- Fixed bug #35197 (Destructor is not called). (Tony)
-- Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER). (Greg)
-- Fixed bug #35176 (include()/require()/*_once() produce wrong error messages
- about main()). (Dmitry)
-- Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte).
- (Dmitry, Moriyoshi)
-- Fixed bug #35143 (gettimeofday() ignores current time zone). (Derick)
-- Fixed bug #35142 (SOAP Client/Server Complex Object Support). (Dmitry)
-- Fixed bug #35135 (PDOStatment without related PDO object may crash). (Ilia)
-- Fixed bug #35091 (SoapClient leaks memory). (Dmitry)
-- Fixed bug #35079 (stream_set_blocking(true) toggles, not enables blocking).
- (askalski at gmail dot com, Tony)
-- Fixed bug #35078 (configure does not find ldap_start_tls_s). (Jani)
-- Fixed bug #35046 (phpinfo() uses improper css enclosure). (Ilia)
-- Fixed bugs #35022, #35019 (Regression in the behavior of key() and
- current() functions). (Ilia)
-- Fixed bug #35017 (Exception thrown in error handler may cause unexpected
- behavior). (Dmitry)
-- Fixed bug #35014 (array_product() always returns 0). (Ilia)
-- Fixed bug #35009 (ZTS: Persistent resource destruct crashes when extension
- is compiled as shared). (Dmitry)
-- Fixed bug #34996 (ImageTrueColorToPalette() crashes when ncolors is zero).
- (Tony)
-- Fixed bug #34982 (array_walk_recursive() modifies elements outside function
- scope). (Dmitry)
-- Fixed bug #34977 (Compile failure on MacOSX due to use of varargs.h). (Tony)
-- Fixed bug #34968 (bz2 extension fails on to build on some win32 setups).
- (Ilia)
-- Fixed bug #34965 (tidy is not binary safe). (Mike)
-- Fixed bug #34957 (PHP doesn't respect ACLs for access checks). (Wez)
-- Fixed bug #34950 (Unable to get WSDL through proxy). (Dmitry)
-- Fixed bug #34938 (dns_get_record() doesn't resolve long hostnames and
- leaks). (Tony)
-- Fixed bug #34905 (Digest authentication does not work with Apache 1). (Ilia)
-- Fixed bug #34902 (mysqli::character_set_name() - undefined method). (Tony)
-- Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia)
-- Fixed bug #34893 (PHP5.1 overloading, Cannot access private property).
- (Dmitry)
-- Fixed bug #34884 (Possible crash in ext/sqlite when sqlite.assoc_case is
- being used). (Tony, Ilia)
-- Fixed bug #34879 (str_replace, array_map corrupt negative array indexes on
- 64-bit platforms). (Dmitry)
-- Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)
-- Fixed bug #34856 (configure fails to detect libiconv's type). (Tony)
-- Fixed bug #34855 (ibase_service_attach() segfault on AMD64).
- (irie at gmx dot de, Tony)
-- Fixed bug #34851 (SO_RECVTIMEO and SO_SNDTIMEO socket options expect
- integer parameter on Windows). (Mike)
-- Fixed bug #34850 (--program-suffix and --program-prefix not included in
- man page names). (Jani)
-- Fixed bug #34821 (zlib encoders fail on widely varying binary data on
- windows). (Mike, Ilia)
-- Fixed bug #34818 (several functions crash when invalid mysqli_link object
- is passed). (Tony)
-- Fixed bug #34810 (mysqli::init() and others use wrong $this pointer without
- checks). (Tony)
-- Fixed bug #34809 (FETCH_INTO in PDO crashes without a destination object).
- (Ilia)
-- Fixed bug #34802 (Fixed crash on object instantiation failure). (Ilia)
-- Fixed bug #34796 (missing SSL linking in ext/ftp when configured as shared).
- (Jani)
-- Fixed bug #34790 (preg_match_all(), named capturing groups, variable
- assignment/return => crash). (Dmitry)
-- Fixed bug #34788 (SOAP Client not applying correct namespace to generated
- values). (Dmitry)
-- Fixed bug #34787 (SOAP Client not handling boolean types correctly). (Dmitry)
-- Fixed bug #34786 (2 @ results in change to error_reporting() to random
- value) (Dmitry, Tony)
-- Fixed bug #34785 (subclassing of mysqli_stmt does not work). (Georg)
-- Fixed bug #34782 (token_get_all() gives wrong result). (Dmitry)
-- Fixed bug #34777 (Crash in dblib when fetching non-existent error info).
- (Ilia)
-- Fixed bug #34771 (strtotime() fails with 1-12am/pm). (Derick)
-- Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects
- correctly). (Dmitry)
-- Fixed bug #34758 (PDO_DBLIB did not implement rowCount()). (Ilia)
-- Fixed bug #34757 (iconv_substr() gives "Unknown error" when offset > string
- length). (Tony)
-- Fixed bug #34742 (ftp wrapper failures caused from segmented command
- transfer). (Ilia)
-- Fixed bug #34725 (CLI segmentation faults during cleanup). (Dmitry)
-- Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony)
-- Fixed bug #34712 (zend.ze1_compatibility_mode = on segfault). (Dmitry)
-- Fixed bug #34704 (Infinite recursion due to corrupt JPEG). (Marcus)
-- Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry)
-- Fixed bug #34676 (missing support for strtotime("midnight") and
- strtotime("noon")). (Derick)
-- Fixed bug #34645 (ctype corrupts memory when validating large numbers).
- (Ilia)
-- Fixed bug #34643 (wsdl default value has no effect). (Dmitry)
-- Fixed bug #34623 (Crash in pdo_mysql on longtext fields). (Ilia)
-- Fixed bug #34617 (zend_deactivate: objects_store used after
- zend_objects_store_destroy is called). (Dmitry)
-- Fixed bug #34590 (User defined PDOStatement class can't implement
- methods). (Marcus)
-- Fixed bug #34584 (Segfault with SPL autoload handler). (Marcus)
-- Fixed bug #34581 (crash with mod_rewrite). (Tony, Ilia)
-- Fixed bug #34565 (mb_send_mail does not fetch
- mail.force_extra_parameters). (Marco, Ilia)
-- Fixed bug #34557 (php -m exits with "error" 1). (Johannes)
-- Fixed bug #34518 (Unset doesn't separate container in CV). (Dmitry)
-- Fixed bug #34505 (Possible memory corruption when unmangling properties
- with empty names). (Tony)
-- Fixed bug #34478 (Incorrect parsing of url's fragment (#...)). (Dmitry)
-- Fixed bug #34467 (foreach + __get + __set inconsistency). (Dmitry)
-- Fixed bug #34456 (Possible crash inside pspell extension). (Ilia)
-- Fixed bug #34453 (parsing http://www.w3.org/2001/xml.xsd exception). (Dmitry)
-- Fixed bug #34450 (Segfault when calling mysqli_close() in destructor). (Tony)
-- Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed). (Dmitry)
-- Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()). (Ilia)
-- Fixed bug #34358 (Fatal error: Cannot re-assign $this). (Dmitry)
-- Fixed bug #34331 (php crashes when variables_order is empty). (Ilia)
-- Fixed bug #34321 (Possible crash in filter code). (Ilia)
-- Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno)
-- Fixed bug #34310 (foreach($arr as $c->d => $x) crashes). (Dmitry)
-- Fixed bug #34307 (on_modify handler not called to set the default value if
- setting from php.ini was invalid). (Andrei)
-- Fixed bug #34306 (wddx_serialize_value() crashes with long array keys).
- (Jani)
-- Fixed bug #34304 (date() doesn't have a modifier for ISO Week Day). (Derick)
-- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9).
- (Derick)
-- Fixed bug #34299 (ReflectionClass::isInstantiable() returns true for abstract
- classes). (Marcus)
-- Fixed bug #34284 (CLI phpinfo showing html on _SERVER["argv"]). (Jani)
-- Fixed bug #34277 (array_filter() crashes with references and objects).
- (Dmitry)
-- Fixed bug #34276 (setAttributeNS doesn't work with default namespace).
- (Rob)
-- Fixed bug #34260 (Segfault with callbacks (array_map) + overloading).
- (Dmitry)
-- Fixed bug #34257 (lib64 not handled correctly in ming extension). (Marcus)
-- Fixed bug #34221 (Compiling xmlrpc as shared fails other parts). (Jani)
-- Fixed bug #34216 (Segfault with autoload). (Marcus)
-- Fixed bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler).
- (Dmitry, Alex)
-- Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). (Ilia)
-- Fixed bug #34156 (memory usage remains elevated after memory limit is
- reached). (Ilia)
-- Fixed bug #34148 (+,- and . not supported as parts of scheme). (Ilia)
-- Fixed bug #34137 (assigning array element by reference causes binary mess).
- (Dmitry)
-- Fixed bug #34103 (line numbering not maintained in dom document). (Rob)
-- Fixed bug #34078 (Reflection API problems in methods with boolean or
- null default values). (Tony)
-- Fixed bug #34068 (Numeric string as array key not cast to integer in
- wddx_deserialize()). (Ilia)
-- Fixed bug #34064 (arr[] as param to function in class gives invalid
- opcode). (Dmitry)
-- Fixed bug #34062 (Crash in catch block when many arguments are used).
- (Dmitry)
-- Fixed bug #34052 (date('U') returns %ld not unix timestamp). (Nuno)
-- Fixed bug #34045 (Buffer overflow with serialized object). (Dmitry)
-- Fixed bug #34001 (pdo_mysql truncates numeric fields at 4 chars). (Ilia)
-- Fixed bug #33999 (object remains object when cast to int). (Dmitry)
-- Fixed bug #33996 (No information given for fatal error on passing invalid
- value to typed argument). (Dmitry)
-- Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
-- Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
- (Ilia)
-- Fixed bug #33967 (misuse of Exception constructor doesn't display
- errorfile). (Jani)
-- Fixed bug #33966 (Wrong use of reflectionproperty causes a segfault). (Tony)
-- Fixed bug #33963 (mssql_bind() fails on input parameters). (Frank)
-- Fixed bug #33958 (duplicate cookies and magic_quotes=off may cause a crash).
- (Ilia)
-- Fixed bug #33957 (gmdate('W')/date('W') sometimes returns wrong week number).
- (Derick)
-- Fixed bug #33940 (array_map() fails to pass by reference when called
- recursively). (Dmitry)
-- Fixed bug #33917 (number_format() output with > 1 char separators). (Jani)
-- Fixed bug #33904 (input array keys being escaped when magic quotes is off).
- (Ilia)
-- Fixed bug #33903 (spl_autoload_register class method). (Marcus)
-- Fixed bug #33899 (CLI: setting extension_dir=some/path extension=foobar.so
- does not work). (Jani)
-- Fixed bug #33882 (CLI was looking for php.ini in wrong path). (Hartmut)
-- Fixed bug #33869 (strtotime() problem with "+1days" format). (Ilia)
-- Fixed bug #33841 (pdo sqlite driver forgets to update affected column
- count on execution of prepared statments). (Ilia)
-- Fixed bug #33837 (Informix ESQL version numbering schema changed). (Jani)
-- Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip
- files). (Derick)
-- Fixed bug #33802 (throw Exception in error handler causes crash). (Dmitry)
-- Fixed bug #33771 (error_reporting falls to 0 when @ was used inside
- try/catch block). (Tony)
-- Fixed bug #33760 (cURL needs to implement CRYPTO_callback functions to
- prevent locking). (Mike, Ilia)
-- Fixed bug #33732 (Wrong behavior of constants in class and interface
- extending). (Dmitry)
-- Fixed bug #33723 (php_value overrides php_admin_value). (Dmitry)
-- Fixed bug #33720 (mb_encode_mimeheader does not work for multibyte
- chars). (Rui)
-- Fixed bug #33710 (ArrayAccess objects does not initialize $this). (Dmitry)
-- Fixed bug #33690 (Crash setting some ini directives in httpd.conf). (Rasmus)
-- Fixed bug #33673 (Added detection for partially uploaded files). (Ilia)
-- Fixed bug #33605 (substr_compare() crashes with negative offset and length).
- (Tony)
-- Fixed bug #33597 (setcookie() "expires" date format doesn't comply with RFC).
- (Tony)
-- Fixed bug #33588 (LDAP: RootDSE query not possible). (Jani)
-- Fixed bug #33578 (strtotime() problem with "Oct17" format). (Derick)
-- Fixed bug #33578 (strtotime() doesn't understand "11 Oct" format). (Derick)
-- Fixed bug #33562 (date("") crashes). (Derick)
-- Fixed bug #33558 (warning with nested calls to functions returning by
- reference). (Dmitry)
-- Fixed bug #33536 (strtotime() defaults to now even on non time string).
- (Derick)
-- Fixed bug #33532 (Different output for strftime() and date()). (Derick)
-- Fixed bug #33523 (Memory leak in xmlrpc_encode_request()). (Ilia)
-- Fixed bug #33520 (crash if safe_mode is on and session.save_path is changed).
- (Dmitry)
-- Fixed bug #33512 (Add missing support for isset()/unset() overloading to
- complement the property get/set methods). (Dmitry)
-- Fixed bug #33491 (crash after extending MySQLi internal class). (Tony)
-- Fixed bug #33475 (cURL handle is not closed on curl_close(). (Ilia)
-- Fixed bug #33469 (Compile error undefined reference to ifx_checkAPI). (Jani)
-- Fixed bug #33433 (strtoll not available on Tru64). (Jani, Derick)
-- Fixed bug #33427 (ext/odbc: check if unixODBC header file exists). (Jani)
-- Fixed bug #33415 (strtotime() related bugs). (Derick)
-- Fixed bug #33414 (Comprehensive list of incorrect days returned after
- strtotime() / date() tests). (Derick)
-- Fixed bug #33389 (double free() when exporting a ReflectionClass). (Marcus)
-- Fixed bug #33383 (crash when retrieving empty LOBs). (Tony)
-- Fixed bug #33382 (array_reverse() fails after *sort()), introduced by
- zend_hash_sort() optimizations in HEAD. (Tony)
-- Fixed bug #33340 (CLI Crash when calling php:function from XSLT). (Rob)
-- Fixed bug #33326 (Cannot build extensions with phpize on Macosx). (Jani)
-- Fixed bug #33318 (throw 1; results in Invalid opcode 108/1/8). (Dmitry)
-- Fixed bug #33312 (ReflectionParameter methods do not work correctly).
- (Dmitry)
-- Fixed bug #33299 (php:function no longer handles returned dom objects).
- (Rob, Joe Orton)
-- Fixed bug #33286 (nested array_walk() calls and user array compare functions
- broken; FCI cache). (Andrei, patch from m.bretz@metropolis-ag.de)
-- Fixed bug #33277 (private method accessed by child class). (Dmitry)
-- Fixed bug #33268 (iconv_strlen() works only with a parameter of < 3 in
- length). (Ilia)
-- Fixed bug #33257 (array_splice() inconsistent when passed function instead of
- variable). (Dmitry)
-- Fixed bug #33243 (ze1_compatibility_mode does not work as expected). (Dmitry)
-- Fixed bug #33242 (Mangled error message when stream fails). (Derick)
-- Fixed bug #33222 (segfault when CURL handle is closed in a callback). (Tony)
-- Fixed bug #33214 (odbc_next_result does not signal SQL errors with
- 2-statement SQL batches). (rich at kastle dot com, Tony)
-- Fixed bug #33212 ([GCC 4]: 'zend_error_noreturn' aliased to external symbol
- 'zend_error'). (Dmitry)
-- Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia)
-- Fixed bug #33201 (Crash when fetching some data types). (Frank)
-- Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
- misbehave). (Jani)
-- Fixed bug #33185 (--enable-session=shared does not build). (Jani)
-- Fixed bug #33171 (foreach enumerates private fields declared in base
- classes). (Dmitry)
-- Fixed bug #33167 (Possible crash inside pg_fetch_array()). (Ilia)
-- Fixed bug #33164 (Soap extension incorrectly detects HTTP/1.1). (Ilia)
-- Fixed bug #33156 (cygwin version of setitimer doesn't accept ITIMER_PROF).
- (Nuno)
-- Fixed bug #33153 (crash in mssql_next result). (Frank)
-- Fixed bug #33150 (shtool: insecure temporary file creation). (Jani)
-- Fixed bug #33136 (method offsetSet in class extended from ArrayObject crash
- PHP). (Marcus)
-- Fixed bug #33125 (imagecopymergegray() produces mosaic rainbow effect).
- (Pierre)
-- Fixed bug #33116 (crash when assigning class name to global variable in
- __autoload). (Dmitry)
-- Fixed bug #33090 (mysqli_prepare() doesn't return an error). (Georg)
-- Fixed bug #33076 (str_ireplace() incorrectly counts result string length
- and may cause segfault). (Tony)
-- Fixed bug #33072 (Add a safemode/open_basedir check for runtime
- "session.save_path" change using session_save_path() function). (Rasmus)
-- Fixed bug #33070 (Improved performance of bzdecompress() by several orders
- of magnitude). (Ilia)
-- Fixed bug #33059 (crash when moving xml attribute set in dtd). (Ilia)
-- Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
- RFC 2616 section 10.3.5) (Rasmus, Choitel)
-- Fixed bug #33019 (socket errors cause memory leaks in php_strerror()).
- (jwozniak23 at poczta dot onet dot pl, Tony).
-- Fixed bug #33017 ("make distclean" gives an error with VPATH build). (Jani)
-- Fixed bug #33013 ("next month" was handled wrong while parsing dates).
- (Derick)
-- Fixed bug #32993 (implemented Iterator function current() don't throw
- exception). (Dmitry)
-- Fixed bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54
- seg fault). (Dmitry)
-- Fixed bug #32956 (mysql_bind_result() doesn't support MYSQL_TYPE_NULL).
- (Georg)
-- Fixed bug #32947 (Incorrect option for mysqli default password). (Georg)
-- Fixed bug #32944 (Disabling session.use_cookies doesn't prevent reading
- session cookies). (Jani, Tony)
-- Fixed bug #32941 (Sending structured SOAP fault kills a php). (Dmitry)
-- Fixed bug #32937 (open_basedir looses trailing / in the limiter).
- (Adam Conrad)
-- Fixed bug #32936 (http redirects URLs are not checked for control chars).
- (Ilia)
-- Fixed bug #32933 (Cannot extend class "SQLiteDatabase"). (Marcus)
-- Fixed bug #32932 (Oracle LDAP: ldap_get_entries(), invalid pointer). (Jani)
-- Fixed bug #32930 (class extending DOMDocument doesn't clone properly). (Rob)
-- Fixed bug #32924 (file included with "auto_prepend_file" can be included
- with require_once() or include_once()). (Stas)
-- Fixed bug #32904 (pg_get_notify() ignores result_type parameter). (Tony)
-- Fixed bug #32852 (Crash with singleton and __destruct when
- zend.ze1_compatibility_mode = On). (Dmitry)
-- Fixed bug #32833 (Invalid opcode). (Dmitry)
-- Fixed bug #32813 (parse_url() does not handle scheme-only urls properly).
- (Ilia)
-- Fixed bug #32810 (temporary files not using plain file wrapper). (Ilia)
-- Fixed bug #32809 (Missing T1LIB support on Windows). (Edin)
-- Fixed bug #32802 (General cookie overrides more specific cookie). (Ilia)
-- Fixed bugs #32800, #32830 (ext/odbc: Problems with 64bit systems). (Jani)
-- Fixed bug #32799 (crash: calling the corresponding global var during the
- destruct). (Dmitry)
-- Fixed bug #32776 (SOAP doesn't support one-way operations). (Dmitry)
-- Fixed bug #32773 (GMP functions break when second parameter is 0). (Stas)
-- Fixed bug #32759 (incorrect determination of default value (COM)). (Wez)
-- Fixed bug #32758 (Cannot access safearray properties in VB6 objects). (Wez)
-- Fixed bug #32755 (Segfault in replaceChild() when DocumentFragment has no
- children). (Rob)
-- Fixed bug #32753 (Undefined constant SQLITE_NOTADB). (Ilia)
-- Fixed bug #32742 (segmentation fault when the stream with a wrapper
- is not closed). (Tony, Dmitry)
-- Fixed bug #32699 (pg_affected_rows() was defined when it was not available).
- (Derick)
-- Fixed bug #32686 (Require/include file in destructor causes segfault).
- (Marcus)
-- Fixed bug #32682 (ext/mssql: Error on module shutdown when called from
- activescript). (Frank)
-- Fixed bug #32674 (exception in iterator causes crash). (Dmitry)
-- Fixed bug #32660 (Assignment by reference causes crash when field access is
- overloaded (__get)). (Dmitry)
-- Fixed bug #32647 (Using register_shutdown_function() with invalid callback
- can crash PHP). (Jani)
-- Fixed bug #32615 (Segfault in replaceChild() using fragment when
- previousSibling is NULL). (Rob)
-- Fixed bug #32613 (ext/snmp: use of snmp_shutdown() causes snmpapp.conf
- access errors). (Jani, ric at arizona dot edu)
-- Fixed bug #32608 (html_entity_decode() converts single quotes even if
- ENT_NOQUOTES is given). (Ilia)
-- Fixed bug #32596 (Segfault/Memory Leak by getClass (etc) in __destruct).
- (Dmitry)
-- Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX). (Jani)
-- Fixed bug #32589 (possible crash inside imap_mail_compose() function).
- (Ilia)
-- Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
- (Ilia)
-- Fixed bug #32587 (Apache2: errors sent to error_log do not include
- timestamps). (Jani)
-- Fixed bug #32560 (configure looks for incorrect db2 library). (Tony)
-- Fixed bug #32553 (mmap loads only the 1st 2000000 bytes on Win32). (Ilia)
-- Fixed bug #32533 (proc_get_status() returns the incorrect process status).
- (Ilia)
-- Fixed bug #32530 (chunk_split() does not append endstr if chunklen is
- longer then the original string). (Ilia)
-- Fixed bug #32491 (File upload error - unable to create a temporary file).
- (Uwe Schindler)
-- Fixed bug #32455 (wrong setting property to unset value). (Dmitry)
-- Fixed bug #32429 (method_exists() always return TRUE if __call method
- exists). (Dmitry)
-- Fixed bug #32428 (The @ warning error suppression operator is broken).
- (Dmitry)
-- Fixed bug #32427 (Interfaces are not allowed 'static' access modifier).
- (Dmitry)
-- Fixed bug #32405 (mysqli::fetch() returns bad data - 64bit problem).
- (Andrey)
-- Fixed bug #32296 (get_class_methods() output has changed between 5.0.2 and
- 5.0.3). (Dmitry)
-- Fixed bug #32282 (Segfault in mysqli_fetch_array on 64-bit). (Georg)
-- Fixed bug #32245 (xml_parser_free() in a function assigned to the xml
- parser gives a segfault). (Rob)
-- Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references).
- (Tony)
-- Fixed bug #32171 (Userspace stream wrapper crashes PHP). (Tony, Dmitry)
-- Fixed bug #32160 (copying a file into itself leads to data loss). (Ilia)
-- Fixed bug #32139 (SOAP client does not auto-handle base64 encoding). (Ilia)
-- Fixed bug #32109 ($_POST is not populated in multi-threaded environment).
- (Moriyoshi)
-- Fixed bug #32080 (segfault when assigning object to itself with
- zend.ze1_compatibility_mode=On). (Dmitry)
-- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
-- Fixed bug #32013 (ext/mysqli bind_result causes fatal error: memory limit).
- (Andrey)
-- Fixed bug #32010 (Memory leak in mssql_fetch_batch). (fmk)
-- Fixed bug #32009 (crash when mssql_bind() is called more than once). (Frank)
-- Fixed bug #31971 (ftp_login fails on some SSL servers).
- (frantisek at augusztin dot com)
-- Fixed bug #31887 (ISAPI: Custom 5xx error does not return correct HTTP
- response message). (Jani)
-- Fixed bug #31828 (Crash with zend.ze1_compatibility_mode=On). (Dmitry)
-- Fixed bug #31668 (multi_query works exactly every other time - multi query
- d/e flag global and not per connection). (Andrey)
-- Fixed bug #31636 (another crash when echoing a COM object). (Wez)
-- Fixed bug #31583 (php_std_date() uses short day names in non-y2k_compliance
- mode). (mike at php dot net)
-- Fixed bug #31525 (object reference being dropped. $this getting lost).
- (Stas, Dmitry)
-- Fixed bug #31502 (Wrong deserialization from session when using WDDX
- serializer). (Dmitry)
-- Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi)
-- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
-- Fixed bug #31363 (broken non-blocking flock()). (ian at snork dot net)
-- Fixed bug #31358 (Older GCC versions do not provide portable va_copy()).
- (Jani)
-- Fixed bug #31341 (escape on curly inconsistent). (Dmitry)
-- Fixed bug #31256 (PHP_EVAL_LIBLINE configure macro does not handle
- -pthread). (Jani)
-- Fixed bug #31213 (Side effects caused by fix of bug #29493). (Dmitry)
-- Fixed bug #31177 (memory leaks and corruption because of incorrect
- refcounting). (Dmitry)
-- Fixed bug #31158 (array_splice on $GLOBALS crashes). (Dmitry)
-- Fixed bug #31054 (safe_mode & open_basedir checks only check first
- include_path value). (Ilia)
-- Fixed bug #31033 (php:function(string, nodeset) with xsl:key crashes PHP).
- (Rob)
-- Fixed bug #30961 (Wrong line number in ReflectionClass getStartLine()).
- (Dmitry)
-- Fixed bug #30889 (Conflict between __get/__set and ++ operator). (Dmitry)
-- Fixed bug #30833 (array_count_values() modifying input array). (Tony)
-- Fixed bug #30828 (debug_backtrace() reports incorrect class in overridden
- methods). (Dmitry)
-- Fixed bug #30820 (static member conflict with $this->member silently
- ignored). (Dmitry)
-- Fixed bug #30819 (Better support for LDAP SASL bind). (Jani)
-- Fixed bug #30791 (magic methods (__sleep/__wakeup/__toString) call
- __call if object is overloaded). (Dmitry)
-- Fixed bug #30707 (Segmentation fault on exception in method).
- (Stas, Dmitry)
-- Fixed bug #30702 (cannot initialize class variable from class constant).
- (Dmitry)
-- Fixed bug #30578 (Output buffers flushed before calling __destruct()
- functions). (Jani)
-- Fixed bug #30519 (Interface not existing says Class not found). (Dmitry)
-- Fixed bug #30407 (Strange behavior of default arguments). (Dmitry)
-- Fixed bug #30394 (Assignment operators yield wrong result with __get/__set).
- (Dmitry)
-- Fixed bug #30332 (zend.ze1_compatibility_mode isn't fully compatible with
- array_push()). (Dmitry)
-- Fixed bug #30162 (Catching exception in constructor causes lose of
- $this). (Dmitry)
-- Fixed bug #30140 (Problem with array in static properties). (Dmitry)
-- Fixed bug #30126 (Enhancement for error message for abstract classes).
- (Marcus)
-- Fixed bug #30096 (gmmktime does not return the current time). (Derick)
-- Fixed bug #30080 (Passing array or non array of objects). (Dmitry)
-- Fixed bug #30052 (Crash on shutdown after odbc_pconnect()). (Edin)
-- Fixed bug #29983 (PHP does not explicitly set mime type & charset). (Ilia)
-- Fixed bug #29975 (memory leaks when set_error_handler() is used inside error
- handler). (Tony)
-- Fixed bug #29971 (variables_order behavior). (Dmitry)
-- Fixed bug #29944 (Function defined in switch, crashes). (Dmitry)
-- Fixed bug #29896 (Backtrace argument list out of sync). (Dmitry)
-- Fixed bug #29728 (Reflection API Feature: Default parameter value). (Marcus)
-- Fixed bug #29689 (default value of protected member overrides default value
- of private and other private variable problems in inherited classes). (Stas)
-- Fixed bug #29683 (headers_list() returns empty array). (Tony)
-- Fixed bug #29583 (crash when echoing a COM object). (M.Sisolak, Wez)
-- Fixed bug #29522 (accessing properties without connection). (Georg)
-- Fixed bug #29361 (var_export() producing invalid code). (Derick)
-- Fixed bug #29338 (unencoded spaces get ignored after certain tags). (Ilia)
-- Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default). (Georg)
-- Fixed bug #29334 (win32 mail() provides incorrect Date: header). (Jani)
-- Fixed bug #29311 (calling parent constructor in mysqli). (Georg)
-- Fixed bug #29268 (__autoload() not called with Reflection->getClass()).
- (Dmitry)
-- Fixed bug #29256 (SOAP HTTP Error when envelop size is more than 24345
- bytes). (Dmitry, Wez)
-- Fixed bug #29253 (array_diff with $GLOBALS argument fails). (Dmitry)
-- Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
-- Fixed bug #29210 (Function: is_callable - no support for private and
- protected classes). (Dmitry)
-- Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
-- Fixed bug #29104 (Function declaration in method doesn't work). (Dmitry)
-- Fixed bug #29061 (soap extension segfaults). (Dmitry)
-- Fixed bug #29015 (Incorrect behavior of member vars(non string ones)-numeric
- mem vars and others). (Dmitry)
-- Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry)
-- Fixed bug #28969 (Wrong data encoding of special characters). (Dmitry)
-- Fixed bug #28839 (SIGSEGV in interactive mode (php -a)).
- (kameshj at fastmail dot fm)
-- Fixed bug #28605 (Need to use -[m]ieee option for Alpha CPUs). (Jani)
-- Fixed bug #28568 (SAPI::known_post_content_types is not thread safe).
- (Moriyoshi)
-- Fixed bug #28377 (debug_backtrace is intermittently passing args). (Dmitry)
-- Fixed bug #28355 (glob wont error if dir is not readable). (Hartmut)
-- Fixed bug #28072 (static array with some constant keys will be incorrectly
- ordered). (Dmitry)
-- Fixed bug #27908 (xml default_handlers not being called). (Rob)
-- Fixed bug #27598 (list() array key assignment causes HUGE memory leak).
- (Dmitry)
-- Fixed bug #27268 (Bad references accentuated by clone). (Dmitry)
-- Fixed bug #26456 (Wrong results from Reflection-API getDocComment() when
- called via STDIN). (Dmitry)
-- Fixed bug #25922 (In error handler, modifying 5th arg (errcontext) may
- result in seg fault). (Dmitry)
-- Fixed bug #25359 (array_multisort() doesn't work in a function if array is
- global or reference). (Dmitry)
-- Fixed bug #22836 (returning reference to uninitialized variable). (Dmitry)
-- Fixed bug #21306 (ext/sesssion: catch bailouts of write handler during
- RSHUTDOWN). (Jani, Xuefer at 21cn dot com)
-- Fixed bug #15854 (boolean ini options may be incorrectly displayed as Off
- when they are On). (Tony)
-- Fixed bugs #14561, #20382, #26090, #26320, #28024, #30532, #32086, #32270,
- #32555, #32588, #33056 (strtotime() related bugs). (Derick)
-
-31 Mar 2005, PHP 5.0.4
-- Added SNMPv2 support. (harrie)
-- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
-- Added length and charsetnr for field array and object in mysqli. (Georg)
-- Added checks for negative values to gmp_sqrt(), gmp_powm(), gmp_sqrtrem()
- and gmp_fact() to prevent SIGFPE. (Tony)
-- Changed foreach() to throw an exception if IteratorAggregate::getIterator()
- does not return an Iterator. (Marcus)
-- Changed phpize not to require libtool. (Jani)
-- Updated bundled oniguruma library (used for multibyte regular expression)
- to 3.7.0. (Moriyoshi)
-- Updated bundled libmbfl library (used for multibyte functions). (Moriyoshi)
- Fixed bugs:
- . Bug #32311 (mb_encode_mimeheader() does not properly escape characters)
- . Bug #32063 (mb_convert_encoding ignores named entity 'alpha')
- . Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes)
- . bug #30573 (compiler warnings in libmbfl due to invalid type cast)
- . Bug #30549 (incorrect character translations for some ISO8859 charsets).
-- Fixed bug preventing from building oci8 as shared.
- (stanislav dot voroniy at portavita dot nl, Tony)
-- Fixed a bug in mysql_affected_rows and mysql_stmt_affected_rows when the
- api function returns -1 (Georg)
-- Fixed several leaks in ext/browscap and sapi/embed. (Andrei)
-- Fixed several leaks in ext/filepro. (Tony)
-- Fixed build system to always use bundled libtool files. (Jani)
-- Fixed a bug in mysqli_stmt_execute() (type conversion with NULL values).
- (Georg)
-- Fixed segfault in mysqli_fetch_field_direct() when invalid field offset
- is passed. (Tony)
-- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
- of true. (Tony)
-- Fixed bug #32394 (offsetUnset() segfaults in a foreach). (Marcus)
-- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
- file). (Tony)
-- Fixed bug #32326 (Check values of Connection/Transfer-Encoding
- case-incentively in SOAP extension). (Ilia)
-- Fixed bug #32290 (call_user_func_array() calls wrong class method within
- child class). (Marcus)
-- Fixed bug #32238 (spl_array.c: void function cannot return value). (Johannes)
-- Fixed bug #32210 (proc_get_status() sets "running" always to true). (Ilia)
-- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
- (Jani)
-- Fixed bug #32134 (Overloading offsetGet/offsetSet). (Marcus)
-- Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on
- invalid index). (Marcus)
-- Fixed bug #32115 (dateTime SOAP encoding of timezone incorrect). (Dmitry)
-- Fixed bug #32081 (in mysqli default socket value is not being used). (Ilia)
-- Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
-- Fixed bug #32011 (Fragments which replaced Nodes are not globaly useable).
- (Rob)
-- Fixed bug #32001 (xml_parse_into_struct() function exceeds maximum
- execution time). (Rob, Moriyoshi)
-- Fixed bug #31980 (Unicode exif data not available on Windows). (Edin)
-- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
- with NULL values). (Daniel Convissor)
-- Fixed bug #31878 (Segmentation fault using clone keyword on nodes). (Rob)
-- Fixed bug #31858 (--disable-cli does not force --without-pear). (Jani)
-- Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string).
- (Jani)
-- Fixed bug #31832 (SOAP encoding problem with complex types in WSDL mode with
- multiple parts). (Dmitry)
-- Fixed bug #31797 (exif_read_data() uses too low nesting limit). (Ilia)
-- Fixed bug #31796 (readline completion handler does not handle empty return
- values). (Ilia)
-- Fixed bug #31792 (getrusage() does not provide ru_nswap value). (Ilia)
-- Fixed bug #31755 (Cannot create SOAP header in no namespace). (Dmitry)
-- Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick)
-- Fixed bug #31751 (pg_parameter_status() missing on Windows). (Edin)
-- Fixed bug #31747 (SOAP Digest Authentication doesn't work with
- "HTTP/1.1 100 Continue" response). (Dmitry)
-- Fixed bug #31732 (mb_get_info() causes segfault when no parameters
- specified). (Tony)
-- Fixed bug #31710 (Wrong return values for mysqli_autocommit/commit/rollback).
- (Georg)
-- Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar). (Ilia)
-- Fixed bug #31695 (Cannot redefine endpoint when using WSDL). (Dmitry)
-- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
- (elod at itfais dot com)
-- Fixed bug #31683 (changes to $name in __get($name) override future
- parameters) (Dmitry)
-- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
-- Fixed bug #31562 (__autoload() problem with static variables). (Marcus)
-- Fixed bug #31651 (ReflectionClass::getDefaultProperties segfaults with arrays).
- (Marcus)
-- Fixed bug #31623 (OCILogin does not support password grace period).
- (daniel dot beet at accuratesoftware dot com, Tony)
-- Fixed bug #31527 (crash in msg_send() when non-string is stored without
- being serialized). (Ilia)
-- Fixed bug #31515 (Improve performance of scandir() by factor of 10 or so). (Ilia)
-- Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
- translation). (Ilia)
-- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia)
-- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia)
-- Fixed bug #31454 (session_set_save_handler crashes PHP when supplied
- non-existent object ref). (Tony)
-- Fixed bug #31444 (Memory leak in zend_language_scanner.c).
- (hexer at studentcenter dot org)
-- Fixed bug #31442 (unserialize broken on 64-bit systems). (Marcus)
-- Fixed bug #31440 ($GLOBALS can be overwritten via GPC when register_globals
- is enabled). (Ilia)
-- Fixed bug #31422 (No Error-Logging on SoapServer-Side). (Dmitry)
-- Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). (Joe)
-- Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani)
-- Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia)
-- Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob)
-- Fixed bug #31348 (CachingIterator::rewind() leaks). (Marcus)
-- Fixed bug #31346 (ArrayIterator::next segfaults). (Marcus)
-- Fixed bug #31190 (Unexpected warning then exception is thrown from
- call_user_func_array()). (phpbugs at domain51 dot net, Dmitry)
-- Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia)
-- Fixed bug #31139 (XML Parser Functions seem to drop &amp; when parsing). (Rob)
-- Fixed bug #31398 (When magic_guotes_gpc are enabled filenames with ' get cutoff).
- (Ilia)
-- Fixed bug #31288 (Possible crash in mysql_fetch_field(), if mysql_list_fields()
- was not called previously). (Ilia)
-- Fixed bug #31107, #31110, #31111, #31249 (Compile failure of zend_strtod.c).
- (Jani)
-- Fixed bug #31110 (PHP 4.3.10 does not compile on Tru64 UNIX 5.1B). (Derick)
-- Fixed bug #31107 (Compile failure on Solaris 9 (Intel) and gcc 3.4.3). (Derick)
-- Fixed bug #31103 (Better error message when c-client cannot be found). (Ilia)
-- Fixed bug #31101 (missing kerberos header file path with --with-openssl). (Jani)
-- Fixed bug #31098 (isset() / empty() incorrectly return true in dereference of
- a string type). (Moriyoshi)
-- Fixed bug #31087 (broken php_url_encode_hash macro). (Ilia)
-- Fixed bug #31072 (var_export() does not output an array element with an empty
- string key). (Derick)
-- Fixed bug #31060 (imageftbbox() does not use linespacing parameter). (Jani)
-- Fixed bug #31056 (php_std_date() returns invalid formatted date if
- y2k_compliance is On). (Ilia)
-- Fixed bug #31055 (apache2filter: per request leak proportional to the full
- path of the request URI). (kameshj at fastmail dot fm)
-- Fixed bug #30901 (can't send cookies with soap envelop). (Dmitry)
-- Fixed bug #30871 (Misleading warning message for array_combine()). (Andrey)
-- Fixed bug #30868 (evaluated pointer comparison in mbregex causes compile
- failure). (Moriyoshi)
-- Fixed bug #30862 (Static array with boolean indexes). (Marcus)
-- Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia)
-- Fixed bug #30725 (PHP segfaults when an exception is thrown in getIterator()
- within foreach). (Marcus)
-- Fixed bug #30609 (cURL functions bypass open_basedir). (Jani)
-- Fixed bug #30446 (apache2handler: virtual() includes files out of sequence)
-- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results
- in segfault). (pdan-php at esync dot org, Tony)
-- Fixed bug #30266 (Invalid opcode 137/1/8). (Marcus)
-- Fixed bug #30120 imagettftext() and imagettfbbox() accept too many
- parameters). (Jani)
-- Fixed bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught
- SoapFault exception). (Dmitry)
-- Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi)
-- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
- because of fflush() called on already closed filedescriptor). (Tony)
-- Fixed bug #29767 (Weird behaviour of __set($name, $value)). (Dmitry)
-- Fixed bug #29733 (printf() handles repeated placeholders wrong).
- (bugs dot php dot net at bluetwanger dot de, Ilia)
-- Fixed bug #29424 (width and height inverted for JPEG2000 files). (Ilia)
-- Fixed bug #29329 (configure for mysqli with shared doesn't work). (Georg)
-- Fixed bug #29136 (make test - libtool failure on MacOSX). (Jani)
-- Fixed bug #28976 (mail(): use "From:" from headers if sendmail_from is empty).
- (Jani)
-- Fixed bug #28930 (PHP sources pick wrong header files generated by bison).
- (eggert at gnu dot org, Jani)
-- Fixed bug #28840 (__destruct of a class that extends mysqli not called).
- (Marcus)
-- Fixed bug #28804 (ini-file section parsing pattern is buggy).
- (wendland at scan-plus dot de)
-- Fixed bug #28451 (corrupt EXIF headers have unlimited recursive IFD directory
- entries). (Andrei)
-- Fixed bug #28444 (Cannot access undefined property for object with overloaded
- property access). (Dmitry)
-- Fixed bug #28442 (Changing a static variables in a class changes it across
- sub/super classes.) (Marcus)
-- Fixed bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is
- Off). (Tony)
-- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
- (chris at ex-parrot dot com)
-- Fixed bug #28067 (partially incorrect utf8 to htmlentities mapping). (Derick,
- Benjamin Greiner)
-- Fixed bug #28041 (SOAP HTTP Digest Access Authentication). (Dmitry)
-- Fixed bug #27633 (Double \r problem on ftp_get in ASCII mode on Win32). (Ilia)
-- Fixed bug #18613 (Multiple OUs in x509 certificate not handled properly).
- (Jani)
-
-15 Dec 2004, PHP 5.0.3
-- Added the %F modifier to *printf to render a non-locale-aware representation
- of a float with the . as decimal seperator. (Derick)
-- Fixed error handling in mysqli_multi_query. (Georg)
-- Extended the functionality of is_subclass_of() to accept either a class name
- or an object as first parameter. (Andrey)
-- Fixed potential problems with unserializing invalid serialize data. (Marcus)
-- Fixed bug #32076 (ReflectionMethod::isDestructor() always return true).
- (Derick, Tony)
-- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
-- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
-- Fixed bug #30994 (SOAP server unable to handle request with references).
- (Dmitry)
-- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
-- Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg)
-- Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or
- protected properties). (Dmitry)
-- Fixed bug #30922 (reflective functions crash PHP when interfaces extend
- themselves). (Tony, Dmitry)
-- Fixed bug #30904 (segfault when recording soapclient into session). (Tony,
- Dmitry)
-- Fixed bug #30890 (MySQLi testsuite)
-- Fixed bug #30856 (ReflectionClass::getStaticProperties segfaults). (Marcus)
-- Fixed bug #30832 ("!" stripped off comments in xml parser). (Rob)
-- Fixed bug #30799 (SoapServer doesn't handle private or protected properties).
- (Dmitry)
-- Fixed bug #30783 (Apache crash when using ReflectionFunction::
- getStaticVariables()). (Marcus)
-- Fixed bug #30750 (Meaningful error message when upload directory is not
- accessible). (Ilia)
-- Fixed bug #30685 (Malformed SOAPClient http header reequest). (Dmitry)
-- Fixed bug #30672 (Problem handling exif data in jpeg images at unusual
- places). (Marcus)
-- Fixed bug #30658 (Ensure that temporary files created by GD are removed).
- (Ilia)
-- Fixed bug #30645 (def. multi result set support for mysql_connect). (Georg)
-- Fixed bug #30637 (compile with pear error). (Antony)
-- Fixed bug #30587 (array_multisort doesn't separate zvals before
- changing them). (Tony)
-- Fixed bug #30572 (crash when comparing SimpleXML attribute to a boolean).
- (Andi)
-- Fixed bug #30566 (attribute namespace URIs are inconsistent when parsing).
- (Rob)
-- Fixed bug #30490 (PEAR installation fails). (Antony)
-- Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
-- Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
-- Fixed bug #30388 (rename across filesystems loses ownership and
- permission info). (Tony)
-- Fixed bug #30387 (stream_socket_client async connect was broken).
- (vnegrier at esds dot com, Wez).
-- Fixed bug #30381 (Strange results with get_class_vars()). (Marcus)
-- Fixed bug #30375 (cal_info() does not work without a parameter). (Ilia)
-- Fixed bug #30362 (stream_get_line() not handling end string correctly).
- (Ilia)
-- Fixed bug #30359 (SOAP client requests have no port in "Host" field).
- (Dmitry)
-- Fixed bug #30356 (str_ireplace() does not work on all strings). (Ilia)
-- Fixed bug #30344 (Reflection::getModifierNames() returns too long strings).
- (Marcus)
-- Fixed bug #30329 (Error Fetching http body, No Content-Length, connection
- closed or chunked data). (Dmitry)
-- Fixed bug #30282 (segfault when using unknown/unsupported
- session.save_handler and/or session.serialize_handler). (Tony)
-- Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
- (Ilia)
-- Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
-- Fixed bug #30230 (exception handler not working with objects). (Marcus)
-- Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
- (Ilia)
-- Fixed bug #30175 (SOAP results aren't parsed correctly). (Dmitry)
-- Fixed bug #30147 (OO sqlite_fetch_object did not reset error handler). (Wez)
-- Fixed bug #30133 (get_current_user() crashes on Windows). (Edin)
-- Fixed bug #30061 (xml_set_start_namespace_decl_handler not called). (Rob)
-- Fixed bug #30057 (did not detect IPV6 on FreeBSD 4.1). (Wez)
-- Fixed bug #30042 (strtotime does not use second param). (Derick)
-- Fixed bug #30027 (Possible crash inside ftp_get()).
- (cfield at affinitysolutions dot com)
-- Fixed bug #29954 (array_reduce segfaults when initial value is array). (Tony)
-- Fixed bug #29883 (isset gives invalid values on strings). (Tony, Dmitry)
-- Fixed bug #29801 (Set limit on the size of mmapable data). (Ilia)
-- Fixed bug #29557 (strtotime error). (Derick)
-- Fixed bug #29418 (double free when openssl_csr_new fails).
- (Kamesh Jayachandran).
-- Fixed bug #29385 (Soapserver always uses std class). (David, Dmitry)
-- Fixed bug #29211 (SoapClient doesn't request wsdl through proxy). (Rob)
-- Fixed bug #28817 (Var problem when extending domDocument). (Georg)
-- Fixed bug #28599 (strtotime fails with zero base time). (Derick)
-- Fixed bug #28598 (Lost support for MS Symbol fonts). (Pierre)
-- Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul
- characters). (Moriyoshi)
-- Fixed bug #28228 (NULL decimal separator is not being handled correctly).
- (Ilia)
-- Fixed bug #28209 (strtotime("now")). (Derick)
-- Fixed bug #27798 (private / protected variables not exposed by
- get_object_vars() inside class). (Marcus)
-- Fixed bug #27728 (Can't return within a zend_try {} block or the previous
- bailout state isn't restored. (Andi)
-- Fixed bug #27183 (Userland stream wrapper segfaults on stream_write).
- (Christian)
-
-23 Sep 2004, PHP 5.0.2
-- Added new boolean (fourth) parameter to array_slice() that turns on the
- preservation of keys in the returned array. (Derick)
-- Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes
- them sort based on the current locale. (Derick)
-- Added interface_exists() and make class_exists() only return true for real
- classes. (Andrey)
-- Added PHP_EOL constant that contains the OS way of representing newlines.
- (Paul Hudson, Derick)
-- Implemented periodic PCRE compiled regexp cache cleanup, to avoid memory
- exhaustion. (Andrei)
-- Renamed SoapClient->__call() to SoapClinet->__soapCall(). (Dmitry)
-- Fixed bug with raw_post_data not getting set (Brian)
-- Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
-- Fixed bug #30209 (ReflectionClass::getMethod() lowercases attribute).
- (Marcus)
-- Fixed bug #30182 (SOAP module processing WSDL file dumps core). (Dmitry)
-- Fixed bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests).
- (Dmitry)
-- Fixed bug #29985 (unserialize()/ __PHP_Incomplete_class does not report
- correctly class name). (Marcus, Tony)
-- Fixed bug #29945 (simplexml_load_file URL limitation 255 char). (Rob)
-- Fixed bug #29873 (No defines around pcntl_*priority definitions). (Derick)
-- Fixed bug #29844 (SOAP doesn't return the result of a valid SOAP request).
- (Dmitry)
-- Fixed bug #29842 (soapclient return null value). (Dmitry)
-- Fixed bug #29839 (incorrect convert (xml:lang to lang)). (Dmitry)
-- Fixed bug #29830 (SoapServer::setClass() should not export non-public
- methods). (Dmitry)
-- Fixed bug #29828 (Interfaces no longer work). (Marcus)
-- Fixed bug #29821 (Fixed possible crashes in convert_uudecode() on invalid
- data). (Ilia)
-- Fixed bug #29808 (array_count_values() breaks with numeric strings). (Ilia)
-- Fixed bug #29805 (HTTP Authentication Issues). (Uwe Schindler)
-- Fixed bug #29795 (SegFault with Soap and Amazon's Web Services). (Dmitry)
-- Fixed bug #29737 (ip2long should return -1 if IP is 255.255.255.255 and FALSE
- on error). (Tony)
-- Fixed bug #29711 (Changed ext/xml to default to UTF-8 output). (Rob)
-- Fixed bug #29678 (opendir() with ftp:// wrapper segfaults if path does not
- have trailing slash). (Ilia)
-- Fixed bug #29657 (xml_* functions throw non descriptive error).
- (Christian, Rob)
-- Fixed bug #29656 (segfault on result and statement properties). (Georg)
-- Fixed bug #29566 (foreach/string handling strangeness (crash)). (Dmitry)
-- Fixed bug #29447 (Reflection API issues). (Marcus)
-- Fixed bug #29296 (Added sslv2 and sslv3 transports). (Wez)
-- Fixed bug #29283 (Invalid statement handle in mysqli on execute). (Georg)
-- Fixed bug #29913 (parse_url() is now binary safe). (Ilia)
-- Fixed bug #27994 (segfault with Soapserver when WSDL-Cache is enabled).
- (Dmitry)
-- Fixed bug #27791 (Apache 2.0 SAPI build against Apache 2 HEAD). (Joe Orton,
- Derick)
-- Fixed bug #26737 (private/protected properties not serialized when user
- declared method __sleep() exists). E_NOTICE thrown when __sleep() returns
- name of non-existing member. (Andrey, Curt)
-
-12 Aug 2004, PHP 5.0.1
-- Changed destructor mechanism so that destructors are called prior to request
- shutdown. (Marcus)
-- Rewritten UNIX and Windows install help files. (Documentation Team)
-- Updated several libraries bundled with the windows release which now
- includes libxml2-2.6.11, libxslt-1.1.7 and iconv-1.9.1. (Rob, Edin)
-- Improved and moved ActiveScript SAPI to PECL. (Wez)
-- Fixed bug #29606 (php_strip_whitespace() prints to stdout rather then
- returning the value). (Ilia)
-- Fixed bug #29577 (MYSQLI_CLIENT_FOUND_ROWS undefined) (Georg)
-- Fixed bug #29573 (Segmentation fault, when exception thrown within
- PHP function called from XSLT). (Christian)
-- Fixed bug #29522 (accessing properties without connection) (Georg)
-- Fixed bug #29505 (get_class_vars() severely broken when used with arrays).
- (Marcus)
-- Fixed bug #29490 (.Net object instantiation failed). (Michael Sisolak).
-- Fixed bug #29474 (win32: usleep() doesn't work). (Wez)
-- Fixed bug #29449 (win32: feof() hangs on empty tcp stream). (Wez)
-- Fixed bug #29437 (Possible crash inside array_walk_recursive()). (Ilia)
-- Fixed bug #29431 (crash when parsing invalid address; invalid address
- returned by stream_socket_recvfrom(), stream_socket_getname()). (Wez)
-- Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
-- Fixed unloading of dynamically loaded extensions.
- (Marcus, kameshj at fastmail dot fm)
-- Fixed bug #29395 (sqlite_escape_string() returns bogus data on empty
- strings). (Ilia, Tony)
-- Fixed bug #29392 (com_dotnet crashes when echo'ing an object). (Wez)
-- Fixed bug #29368 (The destructor is called when an exception is thrown from
- the constructor). (Marcus)
-- Fixed bug #29354 (Exception constructor marked as both public and protected).
- (Marcus)
-- Fixed bug #29342 (strtotime() does not handle empty date string properly).
- (Ilia)
-- Fixed bug #29340 (win32 build produces invalid php_ifx.dll). (Edin)
-- Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default) (Georg)
-- Fixed bug #29291 (get_class_vars() return names with NULLs). (Marcus)
-- Fixed bug #29264 (gettext extension not working). (Edin)
-- Fixed bug #29258 (variant_date_from_timestamp() does not honour
- timezone). (Wez)
-- Fixed bug #29256 (error when sending large packets on a socket). (Dmitry)
-- Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
-- Fixed bug #29147 (Compile Error in mnoGoSearch functions). (Sergey, Antony)
-- Fixed bug #29132 ($_SERVER["PHP_AUTH_USER"] isn't defined). (Stefan)
-- Fixed bug #29119 (html_entity_decode() misbehaves with UTF-8). (Moriyoshi)
-- Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
-- Fixed bug #29061 (soap extension segfaults). (Dmitry)
-- Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry)
-- Fixed bug #28969 (Wrong data encoding of special characters). (Dmitry)
-- Fixed bug #28895 (ReflectionClass::isAbstract always returns false). (Marcus)
-- Fixed bug #28829 (Thread-unsafety in bcmath elementary values). (Sara)
-- Fixed bug #28464 (catch() does not catch exceptions by interfaces). (Marcus)
-- Fixed bug #27669 (PHP 5 didn't support all possibilities for calling static
- methods dynamically). (Dmitry)
-- Fixed ReflectionClass::getMethod() and ReflectionClass::getProperty() to
- raise an ReflectionException instead of returning NULL on failure.
- (Sebastian)
-- Fixed convert.* filters to consume remaining buckets_in on flush. (Sara)
-- Fixed bug in mysqli->client_version. (Georg)
+ . Fixed bug #63248 (Load multiple magic files from a directory under Windows).
+ (Anatoliy)
-13 Jul 2004, PHP 5.0.0
-- Updated PCRE to provide better error handling in certain cases. (Andrei)
-- Changed doc comments to require a single white space after '/**'. (Marcus)
-- Fixed bug #29019 (Database not closing). (Marcus)
-- Fixed bug #29008 (array_combine() does not handle non-numeric/string keys).
- (Ilia)
-- Fixed bug #28999 (fixed behaviour of exec() to work as it did in 4.X). (Ilia)
-- Fixed bug #28868 (Internal filter registry not thread safe). (Sara)
-- Fixed bug #28851 (call_user_func_array has typo in error message). (Marcus)
-- Fixed bug #28831 (ArrayObject::offsetGet() does the work of offsetUnset()).
- (Marcus)
-- Fixed bug #28822 (ArrayObject::offsetExists() works inverted). (Marcus)
-- Fixed bug #28789 (ReflectionProperty getValue() fails on public static
- members). (Marcus)
-- Fixed bug #28771 (Segfault when using xslt and clone). (Rob)
-- Fixed bug #28751 (SoapServer does not call _autoload()). (Dmitry)
-- Fixed bug #28739 (array_*diff() and array_*intersect() not clearing the fci
- cache before work). (Andrey)
-- Fixed bug #28721 (appendChild() and insertBefore() unset DOMText).(Rob)
-- Fixed bug #28702 (SOAP does not parse WSDL service address correctly). (Dmitry)
-- Fixed bug #28699 (Reflection api bugs). (Marcus)
-- Fixed bug #28694 (ReflectionExtension::getFunctions() crashes PHP). (Marcus)
-- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
-- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
+<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
diff --git a/README.GIT-RULES b/README.GIT-RULES
index 289a4e743..90e0d83cb 100644
--- a/README.GIT-RULES
+++ b/README.GIT-RULES
@@ -45,14 +45,16 @@ Currently we have the following branches in use::
master The active development branch.
- PHP-5.4 Is used to release the PHP 5.4.x series. It still allows for
- larger enhancements.
+ PHP-5.5 Is used to release the PHP 5.5.x series. It allows for larger
+ enhancements.
+
+ PHP-5.4 Is used to release the PHP 5.4.x series. This is current
+ stable version and is open for bugfixes only.
PHP-5.3 Is used to release the PHP 5.3.x series. This is current
stable version and is open for bugfixes only.
- PHP-5.2 Is used to release the PHP 5.2.x series. It is closed for
- changes now.
+ PHP-5.2 This branch is closed.
PHP-5.1 This branch is closed.
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..51973854d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,30 @@
+The PHP Interpreter
+===================
+
+This is the github mirror of the official PHP repository located at
+http://git.php.net.
+
+[![Build Status](https://secure.travis-ci.org/php/php-src.png?branch=master)](http://travis-ci.org/php/php-src)
+
+Pull Requests
+=============
+PHP accepts pull requests via github. Discussions are done on github, but
+depending on the topic can also be relayed to the official PHP developer
+mailinglist internals@lists.php.net.
+
+New features require an RFC and must be accepted by the developers.
+See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
+information on the process.
+
+Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always
+open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
+
+ Fix #55371: get_magic_quotes_gpc() throws deprecation warning
+
+ After removing magic quotes, the get_magic_quotes_gpc function caused
+ a deprecate warning. get_magic_quotes_gpc can be used to detected
+ the magic_quotes behavior and therefore should not raise a warning at any
+ time. The patch removes this warning
+
+We do not merge pull requests directly on github. All PRs will be
+pulled and pushed through http://git.php.net.
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 683d6a4d5..6779b5697 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -40,6 +40,10 @@
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
# endif
+# ifndef IO_REPARSE_TAG_DEDUP
+# define IO_REPARSE_TAG_DEDUP 0x80000013
+# endif
+
# ifndef VOLUME_NAME_NT
# define VOLUME_NAME_NT 0x2
# endif
@@ -945,6 +949,11 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
return -1;
};
substitutename[substitutename_len] = 0;
+ }
+ else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP) {
+ isabsolute = 1;
+ memcpy(substitutename, path, len + 1);
+ substitutename_len = len;
} else {
tsrm_free_alloca(pbuffer, use_heap_large);
return -1;
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index b40af77c4..c33b59914 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -193,7 +193,7 @@ Finished:
TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC)
{
time_t t;
- HANDLE thread_token;
+ HANDLE thread_token = NULL;
PSID token_sid;
SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION;
GENERIC_MAPPING gen_map = { FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS };
@@ -363,6 +363,9 @@ Finished_Impersonate:
}
Finished:
+ if(thread_token != NULL) {
+ CloseHandle(thread_token);
+ }
if(real_path != NULL) {
free(real_path);
real_path = NULL;
diff --git a/UPGRADING b/UPGRADING
index 68102b844..0e497f743 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -1,815 +1,255 @@
$Id$
-PHP 5.4 UPGRADE NOTES
+PHP X.Y UPGRADE NOTES
+
+1. Backward Incompatible Changes
+2. New Features
+2. Changes in SAPI modules
+3. Deprecated Functionality
+4. Changed Functions
+5. New Functions
+6. New Classes and Interfaces
+7. Removed Extensions
+8. Other Changes to Extensions
+9. New Global Constants
+10. Changes to INI File Handling
+11. Other Changes
-===========
-0. Contents
-===========
-
-1. Changes to INI directives
-2. Changes to reserved words and classes
-3. Changes to engine behavior
-4. Changes to existing functions
-5. Changes to existing classes
-6. Changes to existing methods
-7. Deprecated Functionality
-8. Removed Functionality
- a. Removed features
- b. Removed functions
- c. Removed syntax
- d. Removed hash algorithms
-9. Extension Changes:
- a. Extensions no longer maintained
- b. Extensions with changed behavior
-10. Changes in SAPI support
-11. Windows support
-12. New in PHP 5.4:
- a. New features
- b. Syntax additions
- c. New functions
- d. New global constants
- e. New classes
- f. New methods
- g. New hash algorithms
-
-=============================
-1. Changes to INI directives
-=============================
-
-- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom
- are present. If either is available, session.entropy_file now
- defaults to that file and session.entropy_length defaults to 32.
- This provides non-blocking entropy to session id generation. If you
- do not want extra entropy for your session ids, add:
-
- session.entropy_file=
- session.entropy_length=0
-
- to your php.ini to preserve pre-PHP 5.4 behavior.
-
-- Deprecated php.ini directives will now throw an E_CORE_WARNING's
- instead of the previous E_WARNING's.
-
-- The following php.ini directives are no longer available in PHP 5.4
- and will now throw an E_CORE_ERROR upon startup:
- - allow_call_time_pass_reference
- - define_syslog_variables
- - highlight.bg
- - magic_quotes_gpc
- - magic_quotes_runtime
- - magic_quotes_sybase
- - register_globals
- - register_long_arrays
- - safe_mode
- - safe_mode_gid
- - safe_mode_include_dir
- - safe_mode_exec_dir
- - safe_mode_allowed_env_vars
- - safe_mode_protected_env_vars
- - session.bug_compat_42
- - session.bug_compat_warn
- - y2k_compliance
- - zend.ze1_compatibility_mode
-
-- the following new php.ini directives were added:
- - max_input_vars - specifies how many GET/POST/COOKIE input
- variables may be accepted. The default value is 1000.
-
-- E_ALL now includes E_STRICT.
-
-- The recommended production value for error_reporting changed to E_ALL &
- ~E_DEPRECATED & ~E_STRICT.
-
-- Added new session support directives:
- session.upload_progress.enabled
- session.upload_progress.cleanup
- session.upload_progress.prefix
- session.upload_progress.name
- session.upload_progress.freq
- session.upload_progress.min_freq
-
-- Added a zend.multibyte directive as a replacement of the PHP compile time
- configuration option --enable-zend-multibyte. Now the Zend Engine always
- contains code for multibyte support, which can be enabled or disabled at
- runtime. Note: It doesn't make a lot of sense to enable this option if
- ext/mbstring is not enabled, because most functionality is implemented by
- mbstrings callbacks.
-
-- Added zend.script_encoding. This value will be used unless a
- "declare(encoding=...)" directive appears at the top of the script.
-
-- Added zend.signal_check to check for replaced signal handlers on shutdown
-
-- Added enable_post_data_reading, which is enabled by default. When it's
- disabled, the POST data is not read (or processed); the behavior is similar
- to that of other request methods with body, like PUT. This allows reading
- the raw POST data in multipart requests and reading/processing the POST data
- in a stream fashion (through php://input) without having it copied in memory
- multiple times.
-
-- Added windows_show_crt_warning. This directive shows the CRT warnings when
- enabled. These warnings were displayed by default until now. It is disabled
- by default.
-
-- Added cli.pager to set a pager for CLI interactive shell output.
-
-- Added cli.prompt to configure the CLI interactive shell prompt.
-
-- Added cli_server.color to enable the CLI web server to use ANSI color coding
- in terminal output.
========================================
-2. Changes to reserved words and classes
+1. Backward Incompatible Changes
========================================
-- "callable", "insteadof" and "trait" are now reserved words.
-
-=============================
-3. Changes to engine behavior
-=============================
-
-- The __construct arguments of an extended abstract constructor must
- now match:
-
- abstract class Base
- {
- abstract public function __construct();
- }
- class Foo extends Base
- {
- public function __construct($bar) {}
- }
-
- This now emits a Fatal error due the incompatible declaration.
-
-- In previous versions, superglobal names could be used for parameter
- names, thereby shadowing the corresponding superglobal. In PHP 5.4
- this now causes a fatal error such as "Cannot re-assign auto-global
- variable GLOBALS".
-
-- Turning null, false or an empty string into an object by adding a
- property will now emit a warning instead of an E_STRICT error.
-
- $test = null;
- $test->baz = 1;
-
- To create a generic object you can use StdClass:
-
- $test = new StdClass;
- $test->baz = 1;
-
-- Converting an array to a string now will cause an E_NOTICE warning.
-
-- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now
- return false on isset() and true on empty(), and produce warning if
- trying to use them. Offsets of types double, bool and null produce
- notice. Numeric strings ($a['2']) still work as before.
-
- Note that offsets like '12.3' and '5 and a half' are considered
- non-numeric and produce warning, but are converted to 12 and 5
- respectively for backwards compatibility reasons.
-
-- Long numeric strings that do not fit in integer or double (such as
- "92233720368547758070") are compared using string comparison if
- they could otherwise result in precision loss - since 5.4.4.
-
-- Closures now support scopes and $this and can be rebound to
- objects using Closure::bind() and Closure::bindTo().
-
-- <?= is now always available regardless of the short_open_tag
- setting.
-
-- Parse error messages are changed to contain more information about
- the error.
-
-- __clone and __destruct since 5.4.4 follow the same scoping rules as
- the rest of the methods (see bug #61782 for details).
-
-================================
-4. Changes to existing functions
-================================
-
-- array_combine now returns array() instead of FALSE when two empty arrays are
- provided as parameters.
-
-- dns_get_record() has an extra parameter which allows requesting DNS records
- by numeric type and makes the result include only the raw data of the
- response.
-
-- call_user_func_array() no longer allows call-time pass by reference.
-
-- the default character set for htmlspecialchars() and htmlentities() is
- now UTF-8. In previous versions it was ISO-8859-1. Note that changing
- your output charset via the php.ini default_charset directive does not
- affect htmlspecialchars/htmlentities unless you are passing "" (an
- empty string) as the encoding parameter to your htmlspecialchars/htmlentities
- calls.
-
-- htmlentities() and htmlspecialchars() are stricter in the code units they
- accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are
- rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
- rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected,
- except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and
- 0xFF are rejected.
-
-- htmlentities() now emits an E_STRICT warning when used with asian characters,
- as in that case htmlentities has (and already had before this version) the
- same functionality as htmlspecialchars.
+- Drop Windows XP and 2003 support. (Pierre)
+- All internal case insensitivity handling for class, function and constant
+ names is done according to ASCII rules, current locale settings are ignored.
+- php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
+ zend_logo_guid() have been removed
+- Removal of Logo GUIDs
-- htmlentities() no longer numerically encodes high characters for single-byte
- encodings (except when there's actually a corresponding named entity). This
- behavior was not documented and was inconsistent with that for "UTF-8".
-
-- html_entity_decode() and htmlspecialchars_decode() behave more consistently,
- now decoding entities in malformed strings such as "&&amp;" or "&#&amp;".
-
-- htmlentities(), htmlspecialchars(), html_entity_decode(), and
- htmlspecialchars_decode: Added the flags ENT_HTML401, ENT_XML1, ENT_XHTML,
- and ENT_HTML5. The behavior of these functions including, but not limited to,
- the characters that are encoded and the entities that are decoded depend on
- the document type that is specified by those flags.
-
-- htmlentities() and htmlspecialchars() with !$double_encode do more strict
- checks on the validity of the entities. Numerical entities are checked for a
- valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the
- validity of such numerical entity in the target document type is also
- checked. Named entities are checked for necessary existence in the target
- document type instead of only checking whether they were constituted by
- alphanumeric characters.
-
-- The flag ENT_DISALLOWED was added. In addition to the behavior described in
- the item before, it also makes htmlentities() and htmlspecialchars()
- substitute characters that appear literally in the argument string and which
- are not allowed in the target document type with U+FFFD (UTF-8) or &#xFFFD;.
-
-- The flag ENT_SUBSTITUTE was added. This flag makes invalid multibyte
- sequences be replaced by U+FFFD (UTF-8) or &#FFFD; by htmlspecialchars() and
- htmlentities(). It is an alternative to the default behavior, which just
- returns an empty string and to ENT_IGNORE, which is a security risk. The
- behavior follows the recommendations of Unicode Technical Report #36.
-
-- htmlspecialchars_decode() and html_entity_decode() now decode &apos; if the
- document type is ENT_XML1, ENT_XHTML, or ENT_HTML5.
-
-- Charset detection with $charset == '' no longer turns to mbstring's
- internal encoding defined through mb_internal_encoding(). Only the encoding
- defined through the php.ini setting mbstring.internal_encoding is considered.
-
-- number_format() no longer truncates multibyte decimal points and thousand
- separators to the first byte.
-
-- The third parameter ($matches) to preg_match_all() is now optional. If
- omitted, the function will simply return the number of times the pattern was
- matched in the subject and will have no other side effects.
-
-- The second argument of scandir() now accepts SCANDIR_SORT_NONE (2) as a
- possible value. This value results in scandir() performing no sorting: on
- local filesystems, this allows files to be returned in native filesystem
- order.
-
-- stream_select() now preserves the keys of the passed array, be they numeric or
- strings. This breaks code that iterated the resulting stream array using a
- numeric index, but makes easier to identify which of the passed streams are
- present in the result.
-
-- stream_set_write_buffer() no longer disables the read buffer of a plain
- stream when 0 is given as the second argument.
-
-- stream_set_write_buffer() no longer changes the chunk size in socket streams.
-
-- fclose() closes streams with resource refcount > 1; it doesn't merely
- decrement the resource refcount.
-
-- socket_set_options() and socket_get_options() now support multicast options.
-
-- The raw data parameter in openssl_encrypt() and openssl_decrypt() is now an
- options integer rather than a boolean. A value of true produces the same
- behavior.
-
-- Write operations within XSLT (for example with the extension sax:output) are
- disabled by default. You can define what is forbidden with the method
- XsltProcess::setSecurityPrefs($options).
-
-- Added AES support to OpenSSL.
-
-- openssl_csr_new() expects the textual data to be in UTF-8.
-
-- Added no-padding option to openssl_encrypt() and openssl_decrypt().
-
-- Added a "no_ticket" SSL context option to disable the SessionTicket TLS
- extension.
-
-- Added new json_encode() options: JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES,
- JSON_NUMERIC_CHECK, JSON_BIGINT_AS_STRING, JSON_UNESCAPED_UNICODE.
-
-- Added Tokyo Cabinet and Berkley DB 5 support to DBA extension.
-
-- Added support for CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE
- to cURL.
-
-- Added optional argument to debug_backtrace() and debug_print_backtrace()
- to limit the amount of stack frames returned.
-
-- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode
- now supports hashes marked $2a$, $2x$, $2y$ and $2z$.
-
-- mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji,
- JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004),
- MacJapanese (Shift_JIS), gb18030.
-
-- Added encode and decode in hex format to mb_encode_numericentity() and
- mb_decode_numericentity().
-
-- Added support for SORT_NATURAL and SORT_FLAG_CASE in array sort functions:
- sort(), rsort(), ksort(), krsort(), asort(), arsort() and array_multisort().
-
-- is_a() and is_subclass_of() now have third boolean parameter, which specifies
- if the first argument can be a string class name. Default if false for is_a
- and true for is_subclass_of() for BC reasons.
-
-- ob_start() will now treat a chunk size of 1 as meaning 1 byte, rather than
- the previous special case behavior of treating it as 4096 bytes.
-
-- idn_to_ascii() and idn_to_utf8() now take two extra parameters, one indicating
- the variant (IDNA 2003 or UTS #46) and another, passed by reference, to return
- details about the operation in case UTS #46 is chosen.
-
-- gzencode() used with FORCE_DEFLATE now generates RFC1950 compliant data.
-
-- ob_start() no longer starts multiple output buffers when passed
- array("callback1", "callback2", "callback3", ...).
-
-- Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
-
-- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
-
-- Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which
- allows for toggling if the list of namespaces starts from the document root
- or from the node you call the method on
-
-- Since 5.4.7, ctor is always called when new user stream wrapper object is created.
- Before, it was called only when stream_open was called.
-
-==============================
-5. Changes to existing classes
-==============================
-
-- Classes that implement stream wrappers can define a method called
- stream_truncate that will respond to truncation, e.g. through ftruncate.
- Strictly speaking, this is an addition to the user-space stream wrapper
- template, not a change to an actual class.
-
-- Classes that implement stream wrappers can define a method called
- stream_metadata that will be called on touch(), chmod(), chgrp(), chown().
-
-- Arrays cast from SimpleXMLElement now always contain all nodes instead of
- just the first matching node.
+========================================
+2. New Features
+========================================
-- All SimpleXMLElement children are now always printed when using var_dump(),
- var_export(), and print_r().
+- Support list in foreach. (Laruence)
+ (wiki.php.net/rfc/foreachlist)
+- Support finally keyword. (Laruence)
+ (wiki.php.net/rfc/finally)
+- Support constant array/string dereferencing. (Laruence)
+ (https://wiki.php.net/rfc/constdereference)
+- Add support for using empty() on the result of function calls and
+ other expressions. Thus it is now possible to write empty(getArray()),
+ for example. (https://wiki.php.net/rfc/empty_isset_exprs)
+- Added generators.
+ (https://wiki.php.net/rfc/generators)
-- Added iterator support in MySQLi. mysqli_result implements Traversable.
+========================================
+2. Changes in SAPI modules
+========================================
-==============================
-6. Changes to existing methods
-==============================
-- DateTime::parseFromFormat() now has a "+" modifier to allow trailing text in
- the string to parse without throwing an error.
+========================================
+3. Deprecated Functionality
+========================================
-- Added the ability to pass options to DOMDocument::loadHTML().
+- The preg_replace /e modifier is now deprecated. Use
+ preg_replace_callback instead.
+ (https://wiki.php.net/rfc/remove_preg_replace_eval_modifier)
-- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
- the default stream context.
+========================================
+4. Changed Functions
+========================================
-- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two
+- pack()/unpack() had the following changes, which bring it more in line
+ with Perl's behavior:
+ - Implemented format character "Z": NUL-padded string
+ - "a" now does not remove trailing NUL characters on unpack() anymore
+ - "A" will now strip all trailing ASCII whitespace on unpack() (it used to
+ remove only trailing spaces).
+- MessageFormatter::format() and related functions now accepted named arguments
+ and mixed numeric/named arguments in ICU 4.8+.
+- MessageFormatter::format() and related functions now don't error out when
+ an insufficient argument count is provided. Instead, the placeholders will
+ remain unsubstituted.
+- MessageFormatter::parse() and MessageFormat::format() (and their static
+ equivalents) now don't throw away better than second precision in the
arguments.
+- IntlDateFormatter::__construct and datefmt_create() now accept for the
+ $timezone argument time zone identifiers, IntlTimeZone objects, DateTimeZone
+ objects and NULL. It used to accept only time zone identifiers and NULL.
+ Invalid time zone identifiers are no longer accepted. Emptry strings are
+ no longer accepted.
+- The default time zone used in IntlDateFormatter::__construct and
+ datefmt_create() (when the corresponding argument is not passed or NULL is
+ passed) is now the one given by date_default_timezone_get(), not the
+ default ICU time zone.
+- The time zone passed to the IntlDateFormatter is ignored if it is NULL and if
+ the calendar passed is an IntlCalendar object -- in this case, the
+ IntlCalendar's time zone will be used instead. Otherwise, the time zone
+ specified in the $timezone argument is used instead. This does not affect
+ old code, as IntlCalendar was introduced in this version.
+- IntlDateFormatter::__construct and datefmt_create() now accept for the
+ $calendar argument also IntlCalendar objects.
+- IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false
+ if the IntlDateFormatter was set up with an IntlCalendar instead of the
+ constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not
+ exist before this version.
+- IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept
+ an IntlCalendar object, in which case its time zone is taken. Passing a
+ constant is still allowed, and still keeps the time zone.
+- IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
+ deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone()
+ instead.
+- IntlDateFormatter::format() and datefmt_format() now also accept an
+ IntlCalendar object for formatting.
+- mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
+ E_DEPRECATED. Their use was already previously discouraged in the docs,
+ but that predated the existence of E_DEPRECATED.
+- php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
+ zend_logo_guid() have been removed
+- set_error_handler(NULL) can now be used to reset the error handler.
+ Furthermore both set_error_handler(NULL) and set_exception_handler(NULL) will
+ now return the previously defined error/exception handler. Previously
+ bool(true) was returned.
-===========================
-7. Deprecated Functionality
-===========================
-
-- The following functions are deprecated in PHP 5.4:
- - mcrypt_generic_end(): use mcrypt_generic_deinit() instead
- - mysql_list_dbs()
-
-========================
-8. Removed Functionality
-========================
-
-a. Removed features
-
- The following features have been removed from PHP 5.4:
-
- - Magic quotes
- - Register globals
- - Safe mode
- - Session extension bug compatibility mode
- - Y2K compliance mode
-
-b. Removed functions
-
- The following functions are no longer available in PHP 5.4:
-
- - define_syslog_variables()
- - import_request_variables()
- - session_is_registered()
- - session_register()
- - session_unregister()
- - set_magic_quotes_runtime()
- - mysqli_bind_param() (alias of mysqli_stmt_bind_param())
- - mysqli_bind_result() (alias of mysqli_stmt_bind_result())
- - mysqli_client_encoding() (alias of mysqli_character_set_name())
- - mysqli_fetch() (alias of mysqli_stmt_fetch())
- - mysqli_param_count() (alias of mysqli_stmt_param_count())
- - mysqli_get_metadata() (alias of mysqli_stmt_result_metadata())
- - mysqli_send_long_data() (alias of mysqli_stmt_send_long_data())
- - mysqli::client_encoding() (alias of mysqli::character_set_name)
- - mysqli_stmt::stmt() (never worked/always throws, undocumented)
-
-c. Removed syntax
-
- - break $var;
- - continue $var;
-
-d. Removed hash algorithms
-
- - Salsa10 and Salsa20, which are actually stream ciphers
-
-====================
-9. Extension Changes
-====================
-
-a. Extensions no longer maintained
-
- - ext/sqlite is no longer part of the base distribution and has been moved
- to PECL. Use sqlite3 or PDO_SQLITE instead.
-
-b. Extensions with changed behavior
-
- - The MySQL extensions (ext/mysql, mysqli and PDO_MYSQL) use mysqlnd
- as the default library now. It is still possible to use libmysql by
- specifying a path to the configure options.
-
- - PDO_MYSQL: Support for linking with MySQL client libraries older
- than 4.1 is removed.
-
- - The session extension now can hook into the file upload feature
- in order to provide upload progress information through session
- variables.
-
- - SNMP extension
- - Functions in SNMP extension now returns FALSE on every error
- condition including SNMP-related (no such instance, end of MIB,
- etc). Thus, in patricular, breaks previous behavior of get/walk
- functions returning an empty string on SNMP-related errors.
- - Multi OID get/getnext/set queries are now supported.
- - New constants added for use in snmp_set_oid_output_format()
- function.
- - Function snmp_set_valueretrieval() changed it's behavior:
- SNMP_VALUE_OBJECT can be combined with one of
- SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY resulting OID value
- changes. When no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
- is supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used.
- Prior to 5.4.0 when no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
- was supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_PLAIN was used.
- - Added feature-rich OO API (SNMP class)
- - Dropped UCD-SNMP compatibility code. Consider upgrading to
- net-snmp v5.3+. Net-SNMP v5.4+ is required for Windows version.
- - In sake of adding support for IPv6 DNS name resolution of
- remote SNMP agent (peer) is done by extension now, not by Net-SNMP
- library anymore.
-
- - Date extension
- - Setting the timezone with the TZ environment variable is no longer
- supported, instead date.timezone and/or date_default_timezone_set()
- have to be used.
- - The extension will no longer guess the default timezone if none
- is set with date.timezone and/or date_default_timezone_set().
- Instead it will always fall back to "UTC".
-
- - Hash extension
- - the output of the tiger hash family has been corrected, see
- https://bugs.php.net/61307
-
-===========================
-10. Changes in SAPI support
-===========================
-
-- A REQUEST_TIME_FLOAT value returns a floating point number indicating the
- time with microsecond precision. All SAPIs providing this value should be
- returning float and not time_t.
-
-- apache_child_terminate(), getallheaders(), apache_request_headers()
- and apache_response_headers() are now supported on FastCGI.
-
-- The interactive shell allows a shortcut #inisetting=value to change php.ini
- settings at run-time.
-
-- The interactive shell now works with the shared readline extension.
-
-- The interactive shell no longer terminates on fatal errors.
-
-- A new PHP CLI command line option --rz <name> shows information about the
- named Zend extension.
-
-===================
-11. Windows support
-===================
-
-- is_link now works properly for symbolic links on Windows Vista
- or later. Earlier systems do not support symbolic links.
-
-- As of PHP 5.4.5 and above the COM extension isn't compiled statically in PHP
- anymore but shared. It'll still be delivered with the standard PHP release but
- must be activated manually with the "extension = php_com_dotnet.dll" directive
- in php.ini.
-
-==================
-12. New in PHP 5.4
-==================
-
-a. New Features
-
- - A built-in CLI web server for testing purposes is now available:
- $ php -S 127.0.0.1:8888
-
- - File Upload Progress support is implemented in the Session extension.
-
-b. Syntax additions
-
- - Traits:
- trait HelloWorld {
- public function sayHello() {
- echo 'Hello World!';
- }
- }
-
- class CanIGetHello {
- use HelloWorld;
- }
-
- $hello = new CanIGetHello();
- $hello->sayHello();
-
- - Function call result array access, e.g.:
- foo()[0]
- $foo->bar()[0]
-
- - Callable typehint indicating argument must be callable:
- function foo(callable $do) {
- }
- foo("strcmp");
- foo(function() {});
- $o = new ArrayObject();
- foo(array($o, "count"));
-
- - Short array syntax:
- $a = [1, 2, 3, 4];
- $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];
- $a = ['one' => 1, 2, 'three' => 3, 4];
-
- - Binary number format:
- 0b00100 0b010101
-
- - Chained string array offsets now work.
- $a = "abc";
- echo $a[0][0];
-
- - Anonymous functions now support using $this and class scope.
- Anonymous function can be declared as "static" to ignore the scope.
-
- - Class::{expr}() syntax is now supported:
- class A {
- static function foo() {
- echo "Hello world!\n";
- }
- }
- $x = "f";
- $y = "o";
- A::{$x.$y.$y}();
-
- - Class member access on instantiation:
- (new foo)->method()
- (new foo)->property
- (new foo)[0]
-
-
-c. New functions
-
- - Core:
- - get_declared_traits()
- - getimagesizefromstring()
- - hex2bin()
- - header_register_callback()
- - http_response_code()
- - stream_set_chunk_size()
- - socket_import_stream()
- - trait_exists()
-
- - Intl:
- - transliterator_create()
- - transliterator_create_from_rules()
- - transliterator_create_inverse()
- - transliterator_get_error_code()
- - transliterator_get_error_message()
- - transliterator_list_ids()
- - transliterator_transliterate()
-
- - LDAP:
- - ldap_control_paged_result()
- - ldap_control_paged_result_response()
-
- - libxml:
- - libxml_set_external_entity_loader()
-
- - mysqli:
- - mysqli_error_list()
- - mysqli_stmt_error_list()
-
- - pgsql
- - pg_escape_identifier() (5.4.4)
- - pg_escape_literal() (5.4.4)
-
- - Session:
- - session_register_shutdown()
- - session_status()
-
- - SPL
- - class_uses()
-
-d. New global constants
-
- - CURLOPT_MAX_RECV_SPEED_LARGE
- - CURLOPT_MAX_SEND_SPEED_LARGE
- - ENT_DISALLOWED
- - ENT_HTML401
- - ENT_HTML5
- - ENT_SUBSTITUTE
- - ENT_XHTML
- - ENT_XML1
- - IPPROTO_IP
- - IPPROTO_IPV6
- - IPV6_MULTICAST_HOPS
- - IPV6_MULTICAST_IF
- - IPV6_MULTICAST_LOOP
- - IP_MULTICAST_IF
- - IP_MULTICAST_LOOP
- - IP_MULTICAST_TTL
- - JSON_BIGINT_AS_STRING
- - JSON_OBJECT_AS_ARRAY
- - JSON_PRETTY_PRINT
- - JSON_UNESCAPED_SLASHES
- - JSON_UNESCAPED_UNICODE
- - LIBXML_HTML_NODEFDTD
- - LIBXML_HTML_NOIMPLIED
- - LIBXML_PEDANTIC
- - MCAST_JOIN_GROUP
- - MCAST_LEAVE_GROUP
- - MCAST_BLOCK_SOURCE
- - MCAST_UNBLOCK_SOURCE
- - MCAST_JOIN_SOURCE_GROUP
- - MCAST_LEAVE_SOURCE_GROUP
- - OPENSSL_CIPHER_AES_128_CBC
- - OPENSSL_CIPHER_AES_192_CBC
- - OPENSSL_CIPHER_AES_256_CBC
- - OPENSSL_RAW_DATA
- - OPENSSL_ZERO_PADDING
- - PHP_OUTPUT_HANDLER_CLEAN
- - PHP_OUTPUT_HANDLER_CLEANABLE
- - PHP_OUTPUT_HANDLER_DISABLED
- - PHP_OUTPUT_HANDLER_FINAL
- - PHP_OUTPUT_HANDLER_FLUSH
- - PHP_OUTPUT_HANDLER_FLUSHABLE
- - PHP_OUTPUT_HANDLER_REMOVABLE
- - PHP_OUTPUT_HANDLER_STARTED
- - PHP_OUTPUT_HANDLER_STDFLAGS
- - PHP_OUTPUT_HANDLER_WRITE
- - PHP_QUERY_RFC1738
- - PHP_QUERY_RFC3986
- - PHP_SESSION_ACTIVE
- - PHP_SESSION_DISABLED
- - PHP_SESSION_NONE
- - SCANDIR_SORT_ASCENDING
- - SCANDIR_SORT_DESCENDING
- - SCANDIR_SORT_NONE
- - SORT_FLAG_CASE
- - SORT_NATURAL
- - STREAM_META_ACCESS
- - STREAM_META_GROUP
- - STREAM_META_GROUP_NAME
- - STREAM_META_OWNER
- - STREAM_META_OWNER_NAME
- - STREAM_META_TOUCH
- - T_CALLABLE
- - T_INSTEADOF
- - T_TRAIT
- - T_TRAIT_C
- - ZLIB_ENCODING_DEFLATE
- - ZLIB_ENCODING_GZIP
- - ZLIB_ENCODING_RAW
- - U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
- - IDNA_CHECK_BIDI
- - IDNA_CHECK_CONTEXTJ
- - IDNA_NONTRANSITIONAL_TO_ASCII
- - IDNA_NONTRANSITIONAL_TO_UNICODE
- - INTL_IDNA_VARIANT_2003
- - INTL_IDNA_VARIANT_UTS46
- - IDNA_ERROR_EMPTY_LABEL
- - IDNA_ERROR_LABEL_TOO_LONG
- - IDNA_ERROR_DOMAIN_NAME_TOO_LONG
- - IDNA_ERROR_LEADING_HYPHEN
- - IDNA_ERROR_TRAILING_HYPHEN
- - IDNA_ERROR_HYPHEN_3_4
- - IDNA_ERROR_LEADING_COMBINING_MARK
- - IDNA_ERROR_DISALLOWED
- - IDNA_ERROR_PUNYCODE
- - IDNA_ERROR_LABEL_HAS_DOT
- - IDNA_ERROR_INVALID_ACE_LABEL
- - IDNA_ERROR_BIDI
- - IDNA_ERROR_CONTEXTJ
-
-e. New classes
-
- - Reflection:
- - ReflectionZendExtension
-
- - Intl:
- - Transliterator
- - Spoofchecker
-
- - JSON:
- - JsonSerializable
+========================================
+5. New Functions
+========================================
- - Session:
- - SessionHandler
+- Core:
+ - boolval()
+
+- Hash:
+ - hash_pbkdf2()
+
+- Intl:
+ - datefmt_format_object()
+ - datefmt_get_calendar_object()
+ - datefmt_get_timezone()
+ - datefmt_set_timezone()
+ - datefmt_get_calendar_object()
+ - intlcal_create_instance()
+ - intlcal_get_keyword_values_for_locale()
+ - intlcal_get_now()
+ - intlcal_get_available_locales()
+ - intlcal_get()
+ - intlcal_get_time()
+ - intlcal_set_time()
+ - intlcal_add()
+ - intlcal_set_time_zone()
+ - intlcal_after()
+ - intlcal_before()
+ - intlcal_set()
+ - intlcal_roll()
+ - intlcal_clear()
+ - intlcal_field_difference()
+ - intlcal_get_actual_maximum()
+ - intlcal_get_actual_minimum()
+ - intlcal_get_day_of_week_type()
+ - intlcal_get_first_day_of_week()
+ - intlcal_get_greatest_minimum()
+ - intlcal_get_least_maximum()
+ - intlcal_get_locale()
+ - intlcal_get_maximum()
+ - intlcal_get_minimal_days_in_first_week()
+ - intlcal_get_minimum()
+ - intlcal_get_time_zone()
+ - intlcal_get_type()
+ - intlcal_get_weekend_transition()
+ - intlcal_in_daylight_time()
+ - intlcal_is_equivalent_to()
+ - intlcal_is_lenient()
+ - intlcal_is_set()
+ - intlcal_is_weekend()
+ - intlcal_set_first_day_of_week()
+ - intlcal_set_lenient()
+ - intlcal_equals()
+ - intlcal_get_repeated_wall_time_option()
+ - intlcal_get_skipped_wall_time_option()
+ - intlcal_set_repeated_wall_time_option()
+ - intlcal_set_skipped_wall_time_option()
+ - intlcal_from_date_time()
+ - intlcal_to_date_time()
+ - intlcal_get_error_code()
+ - intlcal_get_error_message()
+ - intlgregcal_create_instance()
+ - intlgregcal_set_gregorian_change()
+ - intlgregcal_get_gregorian_change()
+ - intlgregcal_is_leap_year()
+ - intltz_create_time_zone()
+ - intltz_create_default()
+ - intltz_get_id()
+ - intltz_get_gmt()
+ - intltz_get_unknown()
+ - intltz_create_enumeration()
+ - intltz_count_equivalent_ids()
+ - intltz_create_time_zone_id_enumeration()
+ - intltz_get_canonical_id()
+ - intltz_get_region()
+ - intltz_get_tz_data_version()
+ - intltz_get_equivalent_id()
+ - intltz_use_daylight_time()
+ - intltz_get_offset()
+ - intltz_get_raw_offset()
+ - intltz_has_same_rules()
+ - intltz_get_display_name()
+ - intltz_get_dst_savings()
+ - intltz_from_date_time_zone()
+ - intltz_to_date_time_zone()
+ - intltz_get_error_code()
+ - intltz_get_error_message()
+
+ - IntlDateFormatter::formatObject()
+ - IntlDateFormatter::getCalendarObject()
+ - IntlDateFormatter::getTimeZone()
+ - IntlDateFormatter::setTimeZone()
+
+- SPL:
+ - SplFixedArray::__wakeup()
- - SNMP:
- - SNMP
+========================================
+6. New Classes and Interfaces
+========================================
- - SPL:
- - CallbackFilterIterator
- - RecursiveCallbackFilterIterator
+- Intl:
+ - IntlCalendar
+ - IntlGregorianCalendar
+ - IntlTimeZone
+ - IntlBreakIterator
+ - IntlRuleBasedBreakIterator
+ - IntlCodePointBreakIterator
-f. New methods
+========================================
+7. Removed Extensions
+========================================
- - Closure:
- - Closure::bind()
- - Closure::bindTo()
- - Reflection:
- - ReflectionClass::getTraitAliases()
- - ReflectionClass::getTraitNames()
- - ReflectionClass::getTraits()
- - ReflectionClass::isCloneable()
- - ReflectionClass::isTrait()
- - ReflectionClass::newInstanceWithoutConstructor()
- - ReflectionExtension::isPersistent()
- - ReflectionExtension::isTemporary()
- - ReflectionFunction::getClosure()
- - ReflectionFunction::getClosureScopeClass()
- - ReflectionFunction::getClosureThis()
- - ReflectionFunctionAbstract::getClosureScopeClass()
- - ReflectionFunctionAbstract::getClosureThis()
- - ReflectionMethod::getClosure()
- - ReflectionMethod::getClosureScopeClass()
- - ReflectionMethod::getClosureThis()
- - ReflectionObject::getTraitAliases()
- - ReflectionObject::getTraitNames()
- - ReflectionObject::getTraits()
- - ReflectionObject::isCloneable()
- - ReflectionObject::isTrait()
- - ReflectionObject::newInstanceWithoutConstructor()
- - ReflectionParameter::canBePassedByValue()
- - ReflectionParameter::isCallable()
+========================================
+8. Other Changes to Extensions
+========================================
- - PDO_DBLIB:
- - PDO::newRowset()
+- Intl:
+ - This extension now requires ICU 4.0+.
+ - Added intl.use_exceptions INI directive, which controls what happens when
+ global errors are set together with intl.error_level.
- - SPL:
- - DirectoryIterator::getExtension()
- - RegexIterator::getRegex()
- - SplDoublyLinkedList::serialize()
- - SplDoublyLinkedList::unserialize()
- - SplFileInfo::getExtension()
- - SplFileObject::fputcsv()
- - SplObjectStorage::getHash()
- - SplQueue::serialize
- - SplQueue::unserialize
- - SplStack::serialize
- - SplStack::unserialize
- - SplTempFileObject::fputcsv
+========================================
+9. New Global Constants
+========================================
+- mysqli
+ - Added MYSQLI_SERVER_PUBLIC_KEY constant to be used with mysqli_options()
- - XSLT:
- - XsltProcessor::setSecurityPrefs()
- - XsltProcessor::getSecurityPrefs()
+========================================
+10. Changes to INI File Handling
+========================================
+- mysqlnd
+ - Added mysqlnd.sha256_server_public_key INI PERDIR setting that affects all
+ APIs which use(are built) for mysqlnd. This allows ext/mysqli to be used
+ with the new auth protocol, although at coarser level.
- - Zlib:
- - zlib_decode()
- - zlib_encode()
-g. New Hash algorithms
+========================================
+11. Other Changes
+========================================
- - fnv132
- - fnv164
- - joaat
+- Logo GUIDs will no longer work
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index e9d0adf55..90c7a4394 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -3,15 +3,8 @@ $Id$
UPGRADE NOTES - PHP X.Y
1. Internal API changes
- a. virtual_file_ex
- b. stat/lstat support
- c. readlink support
- d. layout of some core ZE structures (zend_op_array, zend_class_entry, ...)
- e. Zend\zend_fast_cache.h has been removed
- f. streams that enclose private streams
- g. leak_variable
- h. API Signature changes
- i. new TSRM function expand_filepath_with_mode
+ a. Streams pooling API
+ b. Lowercasing and locales
2. Build system changes
a. Unix build system changes
@@ -22,186 +15,51 @@ UPGRADE NOTES - PHP X.Y
1. Internal API changes
========================
- a. virtual_file_ex
+ a. Streams pooling API
-virtual_file_ex takes now a TSRM context as last parameter:
-CWD_API int virtual_file_ex(cwd_state *state, const char *path,
- verify_path_func verify_path, int use_realpath TSRLS_DC);
+The streams pooling API has been removed. The following functions no longer
+exist:
+PHPAPI int php_stream_context_get_link(php_stream_context *context,
+ const char *hostent, php_stream **stream);
+PHPAPI int php_stream_context_set_link(php_stream_context *context,
+ const char *hostent, php_stream *stream);
+PHPAPI int php_stream_context_del_link(php_stream_context *context,
+ php_stream *stream);
- b. stat/lstat support
+ b. Lowercasing and locales
-lstat is now available on all platforms. On unix-like platform
-php_sys_lstat is an alias to lstat (when avaible). On Windows it is now
-available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended
-instead of calling lstat directly, to ensure portability.
+The lowercasing functions in zend_operators.c were split into those that do
+lowercasing according to locale rules and those that do ASCII lowercasing.
+ASCII:
+ zend_str_tolower_copy
+ zend_str_tolower_dup
+ zend_str_tolower
+ zend_binary_strcasecmp
+ zend_binary_strncasecmp
- c. readlink support
+Locale-based:
+ zend_binary_strncasecmp_l
+ zend_binary_strcasecmp_l
+ zend_binary_zval_strcasecmp
+ zend_binary_zval_strncasecmp
+ string_compare_function_ex
+ string_case_compare_function
-readlink is now available on all platforms. On unix-like platform
-php_sys_readlink is an alias to readlink (when avaible). On Windows it is now
-available using php_sys_readlink. php_sys_readlink usage is recommended
-instead of calling readlink directly, to ensure portability.
+Internal engine lowercasing will be using ASCII-only rules. User-facing functions,
+such as strcasecmp, will be using locale rules.
-
- d. layout of some core ZE structures (zend_op_array, zend_class_entry, ...)
-
-. zend_function.pass_rest_by_reference is replaced by
- ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags
-. zend_function.return_reference is replaced by ZEND_ACC_RETURN_REFERENCE
- in zend_function.fn_flags
-. zend_arg_info.required_num_args removed. it was needed only for internal
- functions. Now the first arg_info for internal function (which has special
- meaning) is represented by zend_internal_function_info structure.
-. zend_op_array.size, size_var, size_literal, current_brk_cont,
- backpatch_count moved into CG(context), because they are used only during
- compilation.
-. zend_op_array.start_op is moved into EG(start_op), because it's used
- only for 'interactive' execution of single top-level op-array.
-. zend_op_array.done_pass_two is replaced by ZEND_ACC_DONE_PASS_TWO in
- zend_op_array.fn_flags.
-. op_array.vars array is trimmed (reallocated) during pass_two.
-. zend_class_entry.constants_updated is replaced by
- ZEND_ACC_CONSTANTS_UPDATED in zend_class_entry.ce_flags
-. the size of zend_class_entry is reduced by sharing the same memory space
- by different information for internal and user classes.
- See zend_class_inttry.info union.
-
-
- e. Zend\zend_fast_cache.h
-
-It should not have been used anymore since php5, but now this header has
-been removed. The following macros are not available anymore:
-
-ZEND_FAST_ALLOC(p, type, fc_type)
-ZEND_FAST_FREE(p, fc_type)
-ZEND_FAST_ALLOC_REL(p, type, fc_type)
-ZEND_FAST_FREE_REL(p, fc_type)
-
-Use emalloc, emalloc_rel, efree or efree_rel instead.
-
-
- f. Streams that enclose private streams
-
-Some streams, like the temp:// stream, may enclose private streams. If the
-outer stream leaks due to a programming error or is not exposed through a
-zval (and therefore is not deleted when all the zvals are gone), it will
-be destroyed on shutdown.
-The problem is that the outer usually wants itself to close the inner stream,
-so that it may do any other shutdown action that requires the inner stream to
-be live (e.g. commit data to it). If the outer stream is exposed through a
-zval and the inner one isn't, this is not a problem because the outer stream
-will be freed when the zval is destroyed, which happens before the resources
-are destroyed on shutdown.
-On resource list shutdown, the cleanup happens in reverse order of resource
-creation, so if the inner stream was created in the opener of the outer stream,
-it will be destroyed first.
-The following functions were added to the streams API to force a predictable
-destruction order:
-
-PHPAPI php_stream *php_stream_encloses(php_stream *enclosing, php_stream *enclosed);
-#define php_stream_free_enclosed(stream_enclosed, close_options)
-PHPAPI int _php_stream_free_enclosed(php_stream *stream_enclosed, int close_options TSRMLS_DC);
-
-Additionally, the following member was added to php_stream:
-
- struct _php_stream *enclosing_stream;
-
-and the following macro was added:
-
-#define PHP_STREAM_FREE_IGNORE_ENCLOSING 32
-
-The function php_stream_encloses declares the first stream encloses the second.
-This has the effect that, when the inner stream is closed from a resource
-destructor it will abort and try to free its enclosing stream instead.
-To prevent this from happening when the inner stream is freed from the outer
-stream, the macro php_stream_free_enclosed should be used instead of
-php_stream_free/php_stream_close/php_stream_pclose, or the flag
-PHP_STREAM_FREE_IGNORE_ENCLOSING should be directly passed to php_stream_free.
-The outer stream cannot abstain, in its close callback, from closing the inner
-stream or clear the enclosing_stream pointer in its enclosed stream by calling
-php_stream_encloses with the 2nd argument NULL. If this is not done, there will
-be problems, so observe this requirement when using php_stream_encloses.
-
-
- g. leak_variable
-
-The function leak_variable(variable [, leak_data]) was added. It is only
-available on debug builds. It increments the refcount of a zval or, if the
-second argument is true and the variable is either an object or a resource
-it increments the refcounts of those objects instead.
-
-
- h. API Signature changes
-
-. zend_list_insert
- ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC);
- call: zend_list_insert(a, SOMETYPE TSRMLS_CC);
- NB: If zend_list_insert is used to register a resource,
- ZEND_REGISTER_RESOURCE could be used instead.
-
-. php_le_stream_context(TSRMLS_C)
- PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D)
- call: context = php_stream_context_alloc(TSRMLS_C);
-
-. php_stream_context_alloc
- PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D);
- call: context = php_stream_context_alloc(TSRMLS_C);
-
-. sapi_get_request_time(TSRMLS_D);
- SAPI_API double sapi_get_request_time(TSRMLS_D);
-
-. sapi_register_default_post_reader
- SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D) TSRMLS_DC);
-
-. sapi_register_treat_data
- SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC) TSRMLS_DC);
-
-. sapi_register_input_filter
- SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC);
-
-. tsrm_win32_access
- TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC);
-
-. popen_ex (win32)
- TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC);
-
-. php_get_current_user
- PHPAPI php_get_current_user(TSRMLS_D)
- Call: char *user = php_get_current_user(TSRMLS_C);
-
-. php_idate
- PHPAPI php_idate(char format, time_t ts, int localtime TSRMLS_DC)
- Call: int ret = php_idate(format, ts, localtime TSRMLS_CC)
-
-. php_escape_html_entities
- (size_t parameters were ints, previous "quote_style" (now flags) has expanded meaning)
- PHPAPI char *php_escape_html_entities(unsigned char *old, size_t oldlen, size_t *newlen, int all, int flags, char *hint_charset TSRMLS_DC);
-
-. php_escape_html_entities_ex
- PHPAPI char *php_escape_html_entities_ex(unsigned char *old, size_t oldlen, size_t *newlen, int all, int flags, char *hint_charset, zend_bool double_encode TSRMLS_DC);
-
-. php_unescape_html_entities
- PHPAPI char *php_unescape_html_entities(unsigned char *old, size_t oldlen, size_t *newlen, int all, int flags, char *hint_charset TSRMLS_DC);
-
- i.
- PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len, int realpath_mode TSRMLS_DC);
- expand_filepath_with_mode lets define how realpath will behave, using one of the existing mode: CWD_EXPAND , CWD_FILEPATH or CWD_REALPATH.
+Two new functions - zend_binary_strncasecmp_l and zend_binary_strcasecmp_l - added as
+locale-based counterparts to zend_binary_strcasecmp and zend_binary_strncasecmp.
========================
2. Build system changes
========================
a. Unix build system changes
-
- - Changes in SAPI module build:
- . When adding new binary SAPI (executable, like CLI/CGI/FPM) use CLI config.m4 and Makefile.frag files as templates and replace CLI/cli with your SAPI name.
-
- - New macros:
- . PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
-
+ -
b. Windows build system changes
- -
+ - Drop Windows XP and 2003 support.
diff --git a/Zend/Makefile.am b/Zend/Makefile.am
index 5ec4590fe..e5757fac5 100644
--- a/Zend/Makefile.am
+++ b/Zend/Makefile.am
@@ -17,7 +17,8 @@ libZend_la_SOURCES=\
zend_objects_API.c zend_ts_hash.c zend_stream.c \
zend_default_classes.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c \
- zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c
+ zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c \
+ zend_generators.c
libZend_la_LDFLAGS =
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
diff --git a/Zend/Zend.dsp b/Zend/Zend.dsp
index ebe01978c..23ebd4532 100644
--- a/Zend/Zend.dsp
+++ b/Zend/Zend.dsp
@@ -159,6 +159,10 @@ SOURCE=.\zend_float.c
# End Source File
# Begin Source File
+SOURCE=.\zend_generators.c
+# End Source File
+# Begin Source File
+
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
diff --git a/Zend/ZendTS.dsp b/Zend/ZendTS.dsp
index 3494cd4e1..3be2c58be 100644
--- a/Zend/ZendTS.dsp
+++ b/Zend/ZendTS.dsp
@@ -185,6 +185,10 @@ SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
+SOURCE=.\zend_generators.c
+# End Source File
+# Begin Source File
+
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
index a7358fa85..136d2d8be 100644
--- a/Zend/acinclude.m4
+++ b/Zend/acinclude.m4
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
AC_DEFUN([LIBZEND_BISON_CHECK],[
# we only support certain bison versions
- bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1"
+ bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
diff --git a/Zend/tests/array_type_hint_001.phpt b/Zend/tests/array_type_hint_001.phpt
index a67699277..a67699277 100755..100644
--- a/Zend/tests/array_type_hint_001.phpt
+++ b/Zend/tests/array_type_hint_001.phpt
diff --git a/Zend/tests/bug18556.phpt b/Zend/tests/bug18556.phpt
new file mode 100644
index 000000000..036abb2ad
--- /dev/null
+++ b/Zend/tests/bug18556.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #18556 (Setting locale to 'tr_TR' lowercases class names)
+--FILE--
+<?php
+$g_lang = 'tr_TR';
+putenv("LANG=$g_lang");
+setlocale(LC_ALL, $g_lang);
+
+class InfoBlob {
+ var $foo;
+ function InfoBlob() {
+ $this->foo = "Foo";
+ }
+}
+
+echo "Instantiating an infoBlob with a lowercase i\n";
+$foobar = new infoBlob();
+echo $foobar->foo;
+echo "\nInstantiating an InfoBlob with an uppercase I\n";
+$foobar = new InfoBlob();
+echo $foobar->foo;
+echo "\n";
+setlocale(LC_ALL, "tr_TR.utf8");
+foreach(get_declared_classes() as $class)
+{
+ if(!class_exists($class))
+ echo "$class No Longer Exists!\n";
+
+}
+echo "Done.\n";
+?>
+--EXPECT--
+Instantiating an infoBlob with a lowercase i
+Foo
+Instantiating an InfoBlob with an uppercase I
+Foo
+Done.
diff --git a/Zend/tests/bug20240.phpt b/Zend/tests/bug20240.phpt
index acf673a27..acf673a27 100755..100644
--- a/Zend/tests/bug20240.phpt
+++ b/Zend/tests/bug20240.phpt
diff --git a/Zend/tests/bug20242.phpt b/Zend/tests/bug20242.phpt
index 064f8235f..064f8235f 100755..100644
--- a/Zend/tests/bug20242.phpt
+++ b/Zend/tests/bug20242.phpt
diff --git a/Zend/tests/bug21478.phpt b/Zend/tests/bug21478.phpt
index 8b38f24d6..8b38f24d6 100755..100644
--- a/Zend/tests/bug21478.phpt
+++ b/Zend/tests/bug21478.phpt
diff --git a/Zend/tests/bug21888.phpt b/Zend/tests/bug21888.phpt
index a13da1943..a13da1943 100755..100644
--- a/Zend/tests/bug21888.phpt
+++ b/Zend/tests/bug21888.phpt
diff --git a/Zend/tests/bug22725.phpt b/Zend/tests/bug22725.phpt
index 5f3c258b1..5f3c258b1 100755..100644
--- a/Zend/tests/bug22725.phpt
+++ b/Zend/tests/bug22725.phpt
diff --git a/Zend/tests/bug24436.phpt b/Zend/tests/bug24436.phpt
index 0c261b668..0c261b668 100755..100644
--- a/Zend/tests/bug24436.phpt
+++ b/Zend/tests/bug24436.phpt
diff --git a/Zend/tests/bug24884.phpt b/Zend/tests/bug24884.phpt
index 457acd00d..457acd00d 100755..100644
--- a/Zend/tests/bug24884.phpt
+++ b/Zend/tests/bug24884.phpt
diff --git a/Zend/tests/bug26077.phpt b/Zend/tests/bug26077.phpt
index dc7686e0a..dc7686e0a 100755..100644
--- a/Zend/tests/bug26077.phpt
+++ b/Zend/tests/bug26077.phpt
diff --git a/Zend/tests/bug26166.phpt b/Zend/tests/bug26166.phpt
index 60624ed98..60624ed98 100755..100644
--- a/Zend/tests/bug26166.phpt
+++ b/Zend/tests/bug26166.phpt
diff --git a/Zend/tests/bug26229.phpt b/Zend/tests/bug26229.phpt
index 347eb5557..347eb5557 100755..100644
--- a/Zend/tests/bug26229.phpt
+++ b/Zend/tests/bug26229.phpt
diff --git a/Zend/tests/bug26281.phpt b/Zend/tests/bug26281.phpt
index e1888a88d..e1888a88d 100755..100644
--- a/Zend/tests/bug26281.phpt
+++ b/Zend/tests/bug26281.phpt
diff --git a/Zend/tests/bug26696.phpt b/Zend/tests/bug26696.phpt
index 62ceacda5..62ceacda5 100755..100644
--- a/Zend/tests/bug26696.phpt
+++ b/Zend/tests/bug26696.phpt
diff --git a/Zend/tests/bug26697.phpt b/Zend/tests/bug26697.phpt
index 8266a23e3..8266a23e3 100755..100644
--- a/Zend/tests/bug26697.phpt
+++ b/Zend/tests/bug26697.phpt
diff --git a/Zend/tests/bug26698.phpt b/Zend/tests/bug26698.phpt
index aecc708a0..aecc708a0 100755..100644
--- a/Zend/tests/bug26698.phpt
+++ b/Zend/tests/bug26698.phpt
diff --git a/Zend/tests/bug26801.phpt b/Zend/tests/bug26801.phpt
index b8cc37aa1..b8cc37aa1 100755..100644
--- a/Zend/tests/bug26801.phpt
+++ b/Zend/tests/bug26801.phpt
diff --git a/Zend/tests/bug26802.phpt b/Zend/tests/bug26802.phpt
index ab0ad25aa..ab0ad25aa 100755..100644
--- a/Zend/tests/bug26802.phpt
+++ b/Zend/tests/bug26802.phpt
diff --git a/Zend/tests/bug27268.phpt b/Zend/tests/bug27268.phpt
index a86e8d029..a86e8d029 100755..100644
--- a/Zend/tests/bug27268.phpt
+++ b/Zend/tests/bug27268.phpt
diff --git a/Zend/tests/bug27304.phpt b/Zend/tests/bug27304.phpt
index 0f248346c..0f248346c 100755..100644
--- a/Zend/tests/bug27304.phpt
+++ b/Zend/tests/bug27304.phpt
diff --git a/Zend/tests/bug27598.phpt b/Zend/tests/bug27598.phpt
index 534e8cf85..534e8cf85 100755..100644
--- a/Zend/tests/bug27598.phpt
+++ b/Zend/tests/bug27598.phpt
diff --git a/Zend/tests/bug27669.phpt b/Zend/tests/bug27669.phpt
index 4d513e91a..4d513e91a 100755..100644
--- a/Zend/tests/bug27669.phpt
+++ b/Zend/tests/bug27669.phpt
diff --git a/Zend/tests/bug27798.phpt b/Zend/tests/bug27798.phpt
index 9e54efa83..9e54efa83 100755..100644
--- a/Zend/tests/bug27798.phpt
+++ b/Zend/tests/bug27798.phpt
diff --git a/Zend/tests/bug28072.phpt b/Zend/tests/bug28072.phpt
index 76208733f..76208733f 100755..100644
--- a/Zend/tests/bug28072.phpt
+++ b/Zend/tests/bug28072.phpt
diff --git a/Zend/tests/bug28377.phpt b/Zend/tests/bug28377.phpt
index 9d1b43472..9d1b43472 100755..100644
--- a/Zend/tests/bug28377.phpt
+++ b/Zend/tests/bug28377.phpt
diff --git a/Zend/tests/bug28442.phpt b/Zend/tests/bug28442.phpt
index 1237357cc..1237357cc 100755..100644
--- a/Zend/tests/bug28442.phpt
+++ b/Zend/tests/bug28442.phpt
diff --git a/Zend/tests/bug28444.phpt b/Zend/tests/bug28444.phpt
index 78c08d2fc..78c08d2fc 100755..100644
--- a/Zend/tests/bug28444.phpt
+++ b/Zend/tests/bug28444.phpt
diff --git a/Zend/tests/bug29368.phpt b/Zend/tests/bug29368.phpt
index c16399abb..c16399abb 100755..100644
--- a/Zend/tests/bug29368.phpt
+++ b/Zend/tests/bug29368.phpt
diff --git a/Zend/tests/bug29505.phpt b/Zend/tests/bug29505.phpt
index 4d7c05351..4d7c05351 100755..100644
--- a/Zend/tests/bug29505.phpt
+++ b/Zend/tests/bug29505.phpt
diff --git a/Zend/tests/bug29674.phpt b/Zend/tests/bug29674.phpt
index 30c23faa0..30c23faa0 100755..100644
--- a/Zend/tests/bug29674.phpt
+++ b/Zend/tests/bug29674.phpt
diff --git a/Zend/tests/bug29896.phpt b/Zend/tests/bug29896.phpt
index 1e2eb0b06..1e2eb0b06 100755..100644
--- a/Zend/tests/bug29896.phpt
+++ b/Zend/tests/bug29896.phpt
diff --git a/Zend/tests/bug30080.phpt b/Zend/tests/bug30080.phpt
index bd8401e1b..bd8401e1b 100755..100644
--- a/Zend/tests/bug30080.phpt
+++ b/Zend/tests/bug30080.phpt
diff --git a/Zend/tests/bug30140.phpt b/Zend/tests/bug30140.phpt
index 1dfb83500..1dfb83500 100755..100644
--- a/Zend/tests/bug30140.phpt
+++ b/Zend/tests/bug30140.phpt
diff --git a/Zend/tests/bug30161.phpt b/Zend/tests/bug30161.phpt
index 22f8fb59e..22f8fb59e 100755..100644
--- a/Zend/tests/bug30161.phpt
+++ b/Zend/tests/bug30161.phpt
diff --git a/Zend/tests/bug30162.phpt b/Zend/tests/bug30162.phpt
index a011292a1..a011292a1 100755..100644
--- a/Zend/tests/bug30162.phpt
+++ b/Zend/tests/bug30162.phpt
diff --git a/Zend/tests/bug30346.phpt b/Zend/tests/bug30346.phpt
index 30f36fbde..30f36fbde 100755..100644
--- a/Zend/tests/bug30346.phpt
+++ b/Zend/tests/bug30346.phpt
diff --git a/Zend/tests/bug30394.phpt b/Zend/tests/bug30394.phpt
index b69eda4fe..b69eda4fe 100755..100644
--- a/Zend/tests/bug30394.phpt
+++ b/Zend/tests/bug30394.phpt
diff --git a/Zend/tests/bug30519.phpt b/Zend/tests/bug30519.phpt
index 7d70cba07..7d70cba07 100755..100644
--- a/Zend/tests/bug30519.phpt
+++ b/Zend/tests/bug30519.phpt
diff --git a/Zend/tests/bug30707.phpt b/Zend/tests/bug30707.phpt
index d37d32974..d37d32974 100755..100644
--- a/Zend/tests/bug30707.phpt
+++ b/Zend/tests/bug30707.phpt
diff --git a/Zend/tests/bug30725.phpt b/Zend/tests/bug30725.phpt
index ce6c9a50a..ce6c9a50a 100755..100644
--- a/Zend/tests/bug30725.phpt
+++ b/Zend/tests/bug30725.phpt
diff --git a/Zend/tests/bug30791.phpt b/Zend/tests/bug30791.phpt
index e9991f3ad..e9991f3ad 100755..100644
--- a/Zend/tests/bug30791.phpt
+++ b/Zend/tests/bug30791.phpt
diff --git a/Zend/tests/bug30820.phpt b/Zend/tests/bug30820.phpt
index 97e46e928..97e46e928 100755..100644
--- a/Zend/tests/bug30820.phpt
+++ b/Zend/tests/bug30820.phpt
diff --git a/Zend/tests/bug30828.phpt b/Zend/tests/bug30828.phpt
index d05dbb606..d05dbb606 100755..100644
--- a/Zend/tests/bug30828.phpt
+++ b/Zend/tests/bug30828.phpt
diff --git a/Zend/tests/bug30998.phpt b/Zend/tests/bug30998.phpt
index d0ace9fa1..d0ace9fa1 100755..100644
--- a/Zend/tests/bug30998.phpt
+++ b/Zend/tests/bug30998.phpt
diff --git a/Zend/tests/bug31102.phpt b/Zend/tests/bug31102.phpt
index b7911bea5..b7911bea5 100755..100644
--- a/Zend/tests/bug31102.phpt
+++ b/Zend/tests/bug31102.phpt
diff --git a/Zend/tests/bug31177-2.phpt b/Zend/tests/bug31177-2.phpt
index 10083c59e..10083c59e 100755..100644
--- a/Zend/tests/bug31177-2.phpt
+++ b/Zend/tests/bug31177-2.phpt
diff --git a/Zend/tests/bug31177.phpt b/Zend/tests/bug31177.phpt
index 5e8457362..5e8457362 100755..100644
--- a/Zend/tests/bug31177.phpt
+++ b/Zend/tests/bug31177.phpt
diff --git a/Zend/tests/bug31341.phpt b/Zend/tests/bug31341.phpt
index 309a54d76..309a54d76 100755..100644
--- a/Zend/tests/bug31341.phpt
+++ b/Zend/tests/bug31341.phpt
diff --git a/Zend/tests/bug31525.phpt b/Zend/tests/bug31525.phpt
index b1a01b61e..b1a01b61e 100755..100644
--- a/Zend/tests/bug31525.phpt
+++ b/Zend/tests/bug31525.phpt
diff --git a/Zend/tests/bug32226.phpt b/Zend/tests/bug32226.phpt
index 9536c921a..9536c921a 100755..100644
--- a/Zend/tests/bug32226.phpt
+++ b/Zend/tests/bug32226.phpt
diff --git a/Zend/tests/bug32252.phpt b/Zend/tests/bug32252.phpt
index 706da18cf..706da18cf 100755..100644
--- a/Zend/tests/bug32252.phpt
+++ b/Zend/tests/bug32252.phpt
diff --git a/Zend/tests/bug32290.phpt b/Zend/tests/bug32290.phpt
index 89da67b19..89da67b19 100755..100644
--- a/Zend/tests/bug32290.phpt
+++ b/Zend/tests/bug32290.phpt
diff --git a/Zend/tests/bug32296.phpt b/Zend/tests/bug32296.phpt
index b3e705ec1..b3e705ec1 100755..100644
--- a/Zend/tests/bug32296.phpt
+++ b/Zend/tests/bug32296.phpt
diff --git a/Zend/tests/bug32322.phpt b/Zend/tests/bug32322.phpt
index f69c5259e..f69c5259e 100755..100644
--- a/Zend/tests/bug32322.phpt
+++ b/Zend/tests/bug32322.phpt
diff --git a/Zend/tests/bug32428.phpt b/Zend/tests/bug32428.phpt
index 0b5ca6aeb..0b5ca6aeb 100755..100644
--- a/Zend/tests/bug32428.phpt
+++ b/Zend/tests/bug32428.phpt
diff --git a/Zend/tests/bug32596.phpt b/Zend/tests/bug32596.phpt
index 2dd0cfe9f..2dd0cfe9f 100755..100644
--- a/Zend/tests/bug32596.phpt
+++ b/Zend/tests/bug32596.phpt
diff --git a/Zend/tests/bug32660.phpt b/Zend/tests/bug32660.phpt
index 3a307189a..3a307189a 100755..100644
--- a/Zend/tests/bug32660.phpt
+++ b/Zend/tests/bug32660.phpt
diff --git a/Zend/tests/bug32799.phpt b/Zend/tests/bug32799.phpt
index c76daedde..c76daedde 100755..100644
--- a/Zend/tests/bug32799.phpt
+++ b/Zend/tests/bug32799.phpt
diff --git a/Zend/tests/bug32993.phpt b/Zend/tests/bug32993.phpt
index 88fb0230b..88fb0230b 100755..100644
--- a/Zend/tests/bug32993.phpt
+++ b/Zend/tests/bug32993.phpt
diff --git a/Zend/tests/bug33116.phpt b/Zend/tests/bug33116.phpt
index aa714a1f8..aa714a1f8 100755..100644
--- a/Zend/tests/bug33116.phpt
+++ b/Zend/tests/bug33116.phpt
diff --git a/Zend/tests/bug33171.phpt b/Zend/tests/bug33171.phpt
index 27f5264ba..27f5264ba 100755..100644
--- a/Zend/tests/bug33171.phpt
+++ b/Zend/tests/bug33171.phpt
diff --git a/Zend/tests/bug33257.phpt b/Zend/tests/bug33257.phpt
index c17ddfd17..c17ddfd17 100755..100644
--- a/Zend/tests/bug33257.phpt
+++ b/Zend/tests/bug33257.phpt
diff --git a/Zend/tests/bug33318.phpt b/Zend/tests/bug33318.phpt
index dc1afbb15..dc1afbb15 100755..100644
--- a/Zend/tests/bug33318.phpt
+++ b/Zend/tests/bug33318.phpt
diff --git a/Zend/tests/bug33512.phpt b/Zend/tests/bug33512.phpt
index 9dd4e4e5f..9dd4e4e5f 100755..100644
--- a/Zend/tests/bug33512.phpt
+++ b/Zend/tests/bug33512.phpt
diff --git a/Zend/tests/bug33558.phpt b/Zend/tests/bug33558.phpt
index 9c87fc601..9c87fc601 100755..100644
--- a/Zend/tests/bug33558.phpt
+++ b/Zend/tests/bug33558.phpt
diff --git a/Zend/tests/bug33710.phpt b/Zend/tests/bug33710.phpt
index 330bb584a..330bb584a 100755..100644
--- a/Zend/tests/bug33710.phpt
+++ b/Zend/tests/bug33710.phpt
diff --git a/Zend/tests/bug33732.phpt b/Zend/tests/bug33732.phpt
index 4969791fa..4969791fa 100755..100644
--- a/Zend/tests/bug33732.phpt
+++ b/Zend/tests/bug33732.phpt
diff --git a/Zend/tests/bug33802.phpt b/Zend/tests/bug33802.phpt
index d2f8cd736..d2f8cd736 100755..100644
--- a/Zend/tests/bug33802.phpt
+++ b/Zend/tests/bug33802.phpt
diff --git a/Zend/tests/bug33996.phpt b/Zend/tests/bug33996.phpt
index e722eceaf..e722eceaf 100755..100644
--- a/Zend/tests/bug33996.phpt
+++ b/Zend/tests/bug33996.phpt
diff --git a/Zend/tests/bug33999.phpt b/Zend/tests/bug33999.phpt
index 194628071..194628071 100755..100644
--- a/Zend/tests/bug33999.phpt
+++ b/Zend/tests/bug33999.phpt
diff --git a/Zend/tests/bug34045.phpt b/Zend/tests/bug34045.phpt
index 61886cf35..61886cf35 100755..100644
--- a/Zend/tests/bug34045.phpt
+++ b/Zend/tests/bug34045.phpt
diff --git a/Zend/tests/bug34062.phpt b/Zend/tests/bug34062.phpt
index bcb4ad8c6..bcb4ad8c6 100755..100644
--- a/Zend/tests/bug34062.phpt
+++ b/Zend/tests/bug34062.phpt
diff --git a/Zend/tests/bug34064.phpt b/Zend/tests/bug34064.phpt
index 84208a54f..84208a54f 100755..100644
--- a/Zend/tests/bug34064.phpt
+++ b/Zend/tests/bug34064.phpt
diff --git a/Zend/tests/bug34065.phpt b/Zend/tests/bug34065.phpt
index 9d76fca64..9d76fca64 100755..100644
--- a/Zend/tests/bug34065.phpt
+++ b/Zend/tests/bug34065.phpt
diff --git a/Zend/tests/bug34137.phpt b/Zend/tests/bug34137.phpt
index 585633333..585633333 100755..100644
--- a/Zend/tests/bug34137.phpt
+++ b/Zend/tests/bug34137.phpt
diff --git a/Zend/tests/bug34199.phpt b/Zend/tests/bug34199.phpt
index 3012d808f..3012d808f 100755..100644
--- a/Zend/tests/bug34199.phpt
+++ b/Zend/tests/bug34199.phpt
diff --git a/Zend/tests/bug34260.phpt b/Zend/tests/bug34260.phpt
index fa393d065..fa393d065 100755..100644
--- a/Zend/tests/bug34260.phpt
+++ b/Zend/tests/bug34260.phpt
diff --git a/Zend/tests/bug34358.phpt b/Zend/tests/bug34358.phpt
index b9c6565f5..b9c6565f5 100755..100644
--- a/Zend/tests/bug34358.phpt
+++ b/Zend/tests/bug34358.phpt
diff --git a/Zend/tests/bug34467.phpt b/Zend/tests/bug34467.phpt
index 5f0ccafc4..5f0ccafc4 100755..100644
--- a/Zend/tests/bug34467.phpt
+++ b/Zend/tests/bug34467.phpt
diff --git a/Zend/tests/bug34518.phpt b/Zend/tests/bug34518.phpt
index b94fdf498..b94fdf498 100755..100644
--- a/Zend/tests/bug34518.phpt
+++ b/Zend/tests/bug34518.phpt
diff --git a/Zend/tests/bug34617.phpt b/Zend/tests/bug34617.phpt
index 25f785f90..25f785f90 100755..100644
--- a/Zend/tests/bug34617.phpt
+++ b/Zend/tests/bug34617.phpt
diff --git a/Zend/tests/bug34678.phpt b/Zend/tests/bug34678.phpt
index 2a13201f2..2a13201f2 100755..100644
--- a/Zend/tests/bug34678.phpt
+++ b/Zend/tests/bug34678.phpt
diff --git a/Zend/tests/bug34786.phpt b/Zend/tests/bug34786.phpt
index 18642848d..18642848d 100755..100644
--- a/Zend/tests/bug34786.phpt
+++ b/Zend/tests/bug34786.phpt
diff --git a/Zend/tests/bug34879.phpt b/Zend/tests/bug34879.phpt
index 606142bde..606142bde 100755..100644
--- a/Zend/tests/bug34879.phpt
+++ b/Zend/tests/bug34879.phpt
diff --git a/Zend/tests/bug34893.phpt b/Zend/tests/bug34893.phpt
index bbe02358e..bbe02358e 100755..100644
--- a/Zend/tests/bug34893.phpt
+++ b/Zend/tests/bug34893.phpt
diff --git a/Zend/tests/bug35017.phpt b/Zend/tests/bug35017.phpt
index 0a89d23aa..0a89d23aa 100755..100644
--- a/Zend/tests/bug35017.phpt
+++ b/Zend/tests/bug35017.phpt
diff --git a/Zend/tests/bug35106.phpt b/Zend/tests/bug35106.phpt
index 61a66d014..61a66d014 100755..100644
--- a/Zend/tests/bug35106.phpt
+++ b/Zend/tests/bug35106.phpt
diff --git a/Zend/tests/bug35163.phpt b/Zend/tests/bug35163.phpt
index 6a10d244b..6a10d244b 100755..100644
--- a/Zend/tests/bug35163.phpt
+++ b/Zend/tests/bug35163.phpt
diff --git a/Zend/tests/bug35163_2.phpt b/Zend/tests/bug35163_2.phpt
index 01387204c..01387204c 100755..100644
--- a/Zend/tests/bug35163_2.phpt
+++ b/Zend/tests/bug35163_2.phpt
diff --git a/Zend/tests/bug35163_3.phpt b/Zend/tests/bug35163_3.phpt
index 6c6a57f25..6c6a57f25 100755..100644
--- a/Zend/tests/bug35163_3.phpt
+++ b/Zend/tests/bug35163_3.phpt
diff --git a/Zend/tests/bug35239.phpt b/Zend/tests/bug35239.phpt
index 869971e2a..869971e2a 100755..100644
--- a/Zend/tests/bug35239.phpt
+++ b/Zend/tests/bug35239.phpt
diff --git a/Zend/tests/bug35393.phpt b/Zend/tests/bug35393.phpt
index ce3bdd001..ce3bdd001 100755..100644
--- a/Zend/tests/bug35393.phpt
+++ b/Zend/tests/bug35393.phpt
diff --git a/Zend/tests/bug35411.phpt b/Zend/tests/bug35411.phpt
index 90957aa57..90957aa57 100755..100644
--- a/Zend/tests/bug35411.phpt
+++ b/Zend/tests/bug35411.phpt
diff --git a/Zend/tests/bug35437.phpt b/Zend/tests/bug35437.phpt
index 73222a9f2..73222a9f2 100755..100644
--- a/Zend/tests/bug35437.phpt
+++ b/Zend/tests/bug35437.phpt
diff --git a/Zend/tests/bug35470.phpt b/Zend/tests/bug35470.phpt
index 5a854552b..5a854552b 100755..100644
--- a/Zend/tests/bug35470.phpt
+++ b/Zend/tests/bug35470.phpt
diff --git a/Zend/tests/bug35509.phpt b/Zend/tests/bug35509.phpt
index 6cb54c03e..6cb54c03e 100755..100644
--- a/Zend/tests/bug35509.phpt
+++ b/Zend/tests/bug35509.phpt
diff --git a/Zend/tests/bug35634.phpt b/Zend/tests/bug35634.phpt
index 1437017a3..1437017a3 100755..100644
--- a/Zend/tests/bug35634.phpt
+++ b/Zend/tests/bug35634.phpt
diff --git a/Zend/tests/bug35655.phpt b/Zend/tests/bug35655.phpt
index bbb137799..bbb137799 100755..100644
--- a/Zend/tests/bug35655.phpt
+++ b/Zend/tests/bug35655.phpt
diff --git a/Zend/tests/bug36006.phpt b/Zend/tests/bug36006.phpt
index 79f9897d1..79f9897d1 100755..100644
--- a/Zend/tests/bug36006.phpt
+++ b/Zend/tests/bug36006.phpt
diff --git a/Zend/tests/bug36037.phpt b/Zend/tests/bug36037.phpt
index 3ccebf652..3ccebf652 100755..100644
--- a/Zend/tests/bug36037.phpt
+++ b/Zend/tests/bug36037.phpt
diff --git a/Zend/tests/bug36071.phpt b/Zend/tests/bug36071.phpt
index e5146091e..e5146091e 100755..100644
--- a/Zend/tests/bug36071.phpt
+++ b/Zend/tests/bug36071.phpt
diff --git a/Zend/tests/bug36214.phpt b/Zend/tests/bug36214.phpt
index 630773713..630773713 100755..100644
--- a/Zend/tests/bug36214.phpt
+++ b/Zend/tests/bug36214.phpt
diff --git a/Zend/tests/bug36268.phpt b/Zend/tests/bug36268.phpt
index 5276d50d4..5276d50d4 100755..100644
--- a/Zend/tests/bug36268.phpt
+++ b/Zend/tests/bug36268.phpt
diff --git a/Zend/tests/bug36303.phpt b/Zend/tests/bug36303.phpt
index 0f9232383..0f9232383 100755..100644
--- a/Zend/tests/bug36303.phpt
+++ b/Zend/tests/bug36303.phpt
diff --git a/Zend/tests/bug36513.phpt b/Zend/tests/bug36513.phpt
index f46da4efc..f46da4efc 100755..100644
--- a/Zend/tests/bug36513.phpt
+++ b/Zend/tests/bug36513.phpt
diff --git a/Zend/tests/bug36568.phpt b/Zend/tests/bug36568.phpt
index d621491a4..d621491a4 100755..100644
--- a/Zend/tests/bug36568.phpt
+++ b/Zend/tests/bug36568.phpt
diff --git a/Zend/tests/bug36759.phpt b/Zend/tests/bug36759.phpt
index 8aa9977a0..8aa9977a0 100755..100644
--- a/Zend/tests/bug36759.phpt
+++ b/Zend/tests/bug36759.phpt
diff --git a/Zend/tests/bug37046.phpt b/Zend/tests/bug37046.phpt
index 09b8f0cb5..09b8f0cb5 100755..100644
--- a/Zend/tests/bug37046.phpt
+++ b/Zend/tests/bug37046.phpt
diff --git a/Zend/tests/bug37138.phpt b/Zend/tests/bug37138.phpt
index f8503f8da..f8503f8da 100755..100644
--- a/Zend/tests/bug37138.phpt
+++ b/Zend/tests/bug37138.phpt
diff --git a/Zend/tests/bug37144.phpt b/Zend/tests/bug37144.phpt
index b3e548946..b3e548946 100755..100644
--- a/Zend/tests/bug37144.phpt
+++ b/Zend/tests/bug37144.phpt
diff --git a/Zend/tests/bug37212.phpt b/Zend/tests/bug37212.phpt
index 212ef23ec..212ef23ec 100755..100644
--- a/Zend/tests/bug37212.phpt
+++ b/Zend/tests/bug37212.phpt
diff --git a/Zend/tests/bug37632.phpt b/Zend/tests/bug37632.phpt
index fb72f8934..fb72f8934 100755..100644
--- a/Zend/tests/bug37632.phpt
+++ b/Zend/tests/bug37632.phpt
diff --git a/Zend/tests/bug37667.phpt b/Zend/tests/bug37667.phpt
index ecf43c5b8..ecf43c5b8 100755..100644
--- a/Zend/tests/bug37667.phpt
+++ b/Zend/tests/bug37667.phpt
diff --git a/Zend/tests/bug37707.phpt b/Zend/tests/bug37707.phpt
index 196495852..196495852 100755..100644
--- a/Zend/tests/bug37707.phpt
+++ b/Zend/tests/bug37707.phpt
diff --git a/Zend/tests/bug37715.phpt b/Zend/tests/bug37715.phpt
index a585c78e5..a585c78e5 100755..100644
--- a/Zend/tests/bug37715.phpt
+++ b/Zend/tests/bug37715.phpt
diff --git a/Zend/tests/bug37811.phpt b/Zend/tests/bug37811.phpt
index 70c4c90ed..70c4c90ed 100755..100644
--- a/Zend/tests/bug37811.phpt
+++ b/Zend/tests/bug37811.phpt
diff --git a/Zend/tests/bug38047.phpt b/Zend/tests/bug38047.phpt
index 00290ee54..00290ee54 100755..100644
--- a/Zend/tests/bug38047.phpt
+++ b/Zend/tests/bug38047.phpt
diff --git a/Zend/tests/bug38146.phpt b/Zend/tests/bug38146.phpt
index e321e11c8..e321e11c8 100755..100644
--- a/Zend/tests/bug38146.phpt
+++ b/Zend/tests/bug38146.phpt
diff --git a/Zend/tests/bug38211.phpt b/Zend/tests/bug38211.phpt
index 6ae9430e8..6ae9430e8 100755..100644
--- a/Zend/tests/bug38211.phpt
+++ b/Zend/tests/bug38211.phpt
diff --git a/Zend/tests/bug38220.phpt b/Zend/tests/bug38220.phpt
index bee3ffc75..bee3ffc75 100755..100644
--- a/Zend/tests/bug38220.phpt
+++ b/Zend/tests/bug38220.phpt
diff --git a/Zend/tests/bug38234.phpt b/Zend/tests/bug38234.phpt
index a81a3aadc..a81a3aadc 100755..100644
--- a/Zend/tests/bug38234.phpt
+++ b/Zend/tests/bug38234.phpt
diff --git a/Zend/tests/bug38287.phpt b/Zend/tests/bug38287.phpt
index 9a53a9335..9a53a9335 100755..100644
--- a/Zend/tests/bug38287.phpt
+++ b/Zend/tests/bug38287.phpt
diff --git a/Zend/tests/bug38623.phpt b/Zend/tests/bug38623.phpt
index 9b042a914..9b042a914 100755..100644
--- a/Zend/tests/bug38623.phpt
+++ b/Zend/tests/bug38623.phpt
diff --git a/Zend/tests/bug38772.phpt b/Zend/tests/bug38772.phpt
index 0e97c291c..0e97c291c 100755..100644
--- a/Zend/tests/bug38772.phpt
+++ b/Zend/tests/bug38772.phpt
diff --git a/Zend/tests/bug38808.phpt b/Zend/tests/bug38808.phpt
index 0fc4bfecd..0fc4bfecd 100755..100644
--- a/Zend/tests/bug38808.phpt
+++ b/Zend/tests/bug38808.phpt
diff --git a/Zend/tests/bug38942.phpt b/Zend/tests/bug38942.phpt
index 85bb56d20..85bb56d20 100755..100644
--- a/Zend/tests/bug38942.phpt
+++ b/Zend/tests/bug38942.phpt
diff --git a/Zend/tests/bug39017.phpt b/Zend/tests/bug39017.phpt
index 70204758d..70204758d 100755..100644
--- a/Zend/tests/bug39017.phpt
+++ b/Zend/tests/bug39017.phpt
diff --git a/Zend/tests/bug39297.phpt b/Zend/tests/bug39297.phpt
index 92f91a555..92f91a555 100755..100644
--- a/Zend/tests/bug39297.phpt
+++ b/Zend/tests/bug39297.phpt
diff --git a/Zend/tests/bug39304.phpt b/Zend/tests/bug39304.phpt
index 8303b8257..8303b8257 100755..100644
--- a/Zend/tests/bug39304.phpt
+++ b/Zend/tests/bug39304.phpt
diff --git a/Zend/tests/bug39438.phpt b/Zend/tests/bug39438.phpt
index e1ed8e886..e1ed8e886 100755..100644
--- a/Zend/tests/bug39438.phpt
+++ b/Zend/tests/bug39438.phpt
diff --git a/Zend/tests/bug39445.phpt b/Zend/tests/bug39445.phpt
index cf1607f2d..cf1607f2d 100755..100644
--- a/Zend/tests/bug39445.phpt
+++ b/Zend/tests/bug39445.phpt
diff --git a/Zend/tests/bug39449.phpt b/Zend/tests/bug39449.phpt
index c725147ac..c725147ac 100755..100644
--- a/Zend/tests/bug39449.phpt
+++ b/Zend/tests/bug39449.phpt
diff --git a/Zend/tests/bug39542.phpt b/Zend/tests/bug39542.phpt
index 13ddc0a91..13ddc0a91 100755..100644
--- a/Zend/tests/bug39542.phpt
+++ b/Zend/tests/bug39542.phpt
diff --git a/Zend/tests/bug39602.phpt b/Zend/tests/bug39602.phpt
index db8763d8a..db8763d8a 100755..100644
--- a/Zend/tests/bug39602.phpt
+++ b/Zend/tests/bug39602.phpt
diff --git a/Zend/tests/bug39721.phpt b/Zend/tests/bug39721.phpt
index 63edfc23e..63edfc23e 100755..100644
--- a/Zend/tests/bug39721.phpt
+++ b/Zend/tests/bug39721.phpt
diff --git a/Zend/tests/bug39775.phpt b/Zend/tests/bug39775.phpt
index 4c6ce6baf..4c6ce6baf 100755..100644
--- a/Zend/tests/bug39775.phpt
+++ b/Zend/tests/bug39775.phpt
diff --git a/Zend/tests/bug39825.phpt b/Zend/tests/bug39825.phpt
index 791b329f7..791b329f7 100755..100644
--- a/Zend/tests/bug39825.phpt
+++ b/Zend/tests/bug39825.phpt
diff --git a/Zend/tests/bug39944.phpt b/Zend/tests/bug39944.phpt
index 4249988ff..4249988ff 100755..100644
--- a/Zend/tests/bug39944.phpt
+++ b/Zend/tests/bug39944.phpt
diff --git a/Zend/tests/bug39990.phpt b/Zend/tests/bug39990.phpt
index d7545eeec..d7545eeec 100755..100644
--- a/Zend/tests/bug39990.phpt
+++ b/Zend/tests/bug39990.phpt
diff --git a/Zend/tests/bug40236.inc b/Zend/tests/bug40236.inc
index fc03349f7..fc03349f7 100755..100644
--- a/Zend/tests/bug40236.inc
+++ b/Zend/tests/bug40236.inc
diff --git a/Zend/tests/bug40236.phpt b/Zend/tests/bug40236.phpt
index f9a427724..f9a427724 100755..100644
--- a/Zend/tests/bug40236.phpt
+++ b/Zend/tests/bug40236.phpt
diff --git a/Zend/tests/bug40261.phpt b/Zend/tests/bug40261.phpt
index b7e2c98c5..b7e2c98c5 100755..100644
--- a/Zend/tests/bug40261.phpt
+++ b/Zend/tests/bug40261.phpt
diff --git a/Zend/tests/bug40509.phpt b/Zend/tests/bug40509.phpt
index 21eaae944..21eaae944 100755..100644
--- a/Zend/tests/bug40509.phpt
+++ b/Zend/tests/bug40509.phpt
diff --git a/Zend/tests/bug40705.phpt b/Zend/tests/bug40705.phpt
index 374f73b75..374f73b75 100755..100644
--- a/Zend/tests/bug40705.phpt
+++ b/Zend/tests/bug40705.phpt
diff --git a/Zend/tests/bug40757.phpt b/Zend/tests/bug40757.phpt
index b5c91c79c..b5c91c79c 100755..100644
--- a/Zend/tests/bug40757.phpt
+++ b/Zend/tests/bug40757.phpt
diff --git a/Zend/tests/bug40770.phpt b/Zend/tests/bug40770.phpt
index c4c78c222..c4c78c222 100755..100644
--- a/Zend/tests/bug40770.phpt
+++ b/Zend/tests/bug40770.phpt
diff --git a/Zend/tests/bug40809.phpt b/Zend/tests/bug40809.phpt
index 08fc89f55..08fc89f55 100755..100644
--- a/Zend/tests/bug40809.phpt
+++ b/Zend/tests/bug40809.phpt
diff --git a/Zend/tests/bug40833.phpt b/Zend/tests/bug40833.phpt
index c56ca4c3b..c56ca4c3b 100755..100644
--- a/Zend/tests/bug40833.phpt
+++ b/Zend/tests/bug40833.phpt
diff --git a/Zend/tests/bug41117_1.phpt b/Zend/tests/bug41117_1.phpt
index f555b637a..f555b637a 100755..100644
--- a/Zend/tests/bug41117_1.phpt
+++ b/Zend/tests/bug41117_1.phpt
diff --git a/Zend/tests/bug41372.phpt b/Zend/tests/bug41372.phpt
index 3446150f5..3446150f5 100755..100644
--- a/Zend/tests/bug41372.phpt
+++ b/Zend/tests/bug41372.phpt
diff --git a/Zend/tests/bug41401.phpt b/Zend/tests/bug41401.phpt
index 50d2109ca..50d2109ca 100755..100644
--- a/Zend/tests/bug41401.phpt
+++ b/Zend/tests/bug41401.phpt
diff --git a/Zend/tests/bug41633_1.phpt b/Zend/tests/bug41633_1.phpt
index 1c1d552dd..1c1d552dd 100755..100644
--- a/Zend/tests/bug41633_1.phpt
+++ b/Zend/tests/bug41633_1.phpt
diff --git a/Zend/tests/bug41633_2.phpt b/Zend/tests/bug41633_2.phpt
index 3deb4516a..3deb4516a 100755..100644
--- a/Zend/tests/bug41633_2.phpt
+++ b/Zend/tests/bug41633_2.phpt
diff --git a/Zend/tests/bug41633_3.phpt b/Zend/tests/bug41633_3.phpt
index 7b9452db8..7b9452db8 100755..100644
--- a/Zend/tests/bug41633_3.phpt
+++ b/Zend/tests/bug41633_3.phpt
diff --git a/Zend/tests/bug41633_4.phpt b/Zend/tests/bug41633_4.phpt
index 3507f6a08..3507f6a08 100755..100644
--- a/Zend/tests/bug41633_4.phpt
+++ b/Zend/tests/bug41633_4.phpt
diff --git a/Zend/tests/bug41929.phpt b/Zend/tests/bug41929.phpt
index c332aba2d..c332aba2d 100755..100644
--- a/Zend/tests/bug41929.phpt
+++ b/Zend/tests/bug41929.phpt
diff --git a/Zend/tests/bug41961.phpt b/Zend/tests/bug41961.phpt
index 514265b60..514265b60 100755..100644
--- a/Zend/tests/bug41961.phpt
+++ b/Zend/tests/bug41961.phpt
diff --git a/Zend/tests/bug42772.phpt b/Zend/tests/bug42772.phpt
index 8887bdbd7..8887bdbd7 100755..100644
--- a/Zend/tests/bug42772.phpt
+++ b/Zend/tests/bug42772.phpt
diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt
index 2aa7061f3..2aa7061f3 100755..100644
--- a/Zend/tests/bug42802.phpt
+++ b/Zend/tests/bug42802.phpt
diff --git a/Zend/tests/bug42819.phpt b/Zend/tests/bug42819.phpt
index e52660369..e52660369 100755..100644
--- a/Zend/tests/bug42819.phpt
+++ b/Zend/tests/bug42819.phpt
diff --git a/Zend/tests/bug42820.phpt b/Zend/tests/bug42820.phpt
index 921f0090a..921f0090a 100755..100644
--- a/Zend/tests/bug42820.phpt
+++ b/Zend/tests/bug42820.phpt
diff --git a/Zend/tests/bug42859.phpt b/Zend/tests/bug42859.phpt
index 755f41f8d..755f41f8d 100755..100644
--- a/Zend/tests/bug42859.phpt
+++ b/Zend/tests/bug42859.phpt
diff --git a/Zend/tests/bug42937.phpt b/Zend/tests/bug42937.phpt
index 537c56792..537c56792 100755..100644
--- a/Zend/tests/bug42937.phpt
+++ b/Zend/tests/bug42937.phpt
diff --git a/Zend/tests/bug43027.phpt b/Zend/tests/bug43027.phpt
index adecf3e39..adecf3e39 100755..100644
--- a/Zend/tests/bug43027.phpt
+++ b/Zend/tests/bug43027.phpt
diff --git a/Zend/tests/bug43128.phpt b/Zend/tests/bug43128.phpt
index 629f46c59..629f46c59 100755..100644
--- a/Zend/tests/bug43128.phpt
+++ b/Zend/tests/bug43128.phpt
diff --git a/Zend/tests/bug43175.phpt b/Zend/tests/bug43175.phpt
index 3bf6befc1..3bf6befc1 100755..100644
--- a/Zend/tests/bug43175.phpt
+++ b/Zend/tests/bug43175.phpt
diff --git a/Zend/tests/bug43183.phpt b/Zend/tests/bug43183.phpt
index a8ca698e9..a8ca698e9 100755..100644
--- a/Zend/tests/bug43183.phpt
+++ b/Zend/tests/bug43183.phpt
diff --git a/Zend/tests/bug43201.phpt b/Zend/tests/bug43201.phpt
index 89e1b6672..89e1b6672 100755..100644
--- a/Zend/tests/bug43201.phpt
+++ b/Zend/tests/bug43201.phpt
diff --git a/Zend/tests/bug44660.phpt b/Zend/tests/bug44660.phpt
index 1027377d3..1027377d3 100755..100644
--- a/Zend/tests/bug44660.phpt
+++ b/Zend/tests/bug44660.phpt
diff --git a/Zend/tests/bug45178.phpt b/Zend/tests/bug45178.phpt
index 5ce185994..5ce185994 100755..100644
--- a/Zend/tests/bug45178.phpt
+++ b/Zend/tests/bug45178.phpt
diff --git a/Zend/tests/bug45805.phpt b/Zend/tests/bug45805.phpt
index 986187ee6..986187ee6 100755..100644
--- a/Zend/tests/bug45805.phpt
+++ b/Zend/tests/bug45805.phpt
diff --git a/Zend/tests/bug46304.phpt b/Zend/tests/bug46304.phpt
index 0a6e3bffc..0a6e3bffc 100755..100644
--- a/Zend/tests/bug46304.phpt
+++ b/Zend/tests/bug46304.phpt
diff --git a/Zend/tests/bug60169.phpt b/Zend/tests/bug60169.phpt
index f97574191..f97574191 100755..100644
--- a/Zend/tests/bug60169.phpt
+++ b/Zend/tests/bug60169.phpt
diff --git a/Zend/tests/bug60573.phpt b/Zend/tests/bug60573.phpt
index d41a5f3ec..d41a5f3ec 100755..100644
--- a/Zend/tests/bug60573.phpt
+++ b/Zend/tests/bug60573.phpt
diff --git a/Zend/tests/bug60738.phpt b/Zend/tests/bug60738.phpt
new file mode 100644
index 000000000..e4080715e
--- /dev/null
+++ b/Zend/tests/bug60738.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #60738 Allow 'set_error_handler' to handle NULL
+--FILE--
+<?php
+
+var_dump(set_error_handler(
+ function() { echo 'Intercepted error!', "\n"; }
+));
+
+trigger_error('Error!');
+
+var_dump(set_error_handler(null));
+
+trigger_error('Error!');
+?>
+--EXPECTF--
+NULL
+Intercepted error!
+object(Closure)#1 (0) {
+}
+
+Notice: Error! in %s on line %d
diff --git a/Zend/tests/bug60738_variation.phpt b/Zend/tests/bug60738_variation.phpt
new file mode 100644
index 000000000..d7cf00ecd
--- /dev/null
+++ b/Zend/tests/bug60738_variation.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #60738 Allow 'set_error_handler' to handle NULL
+--FILE--
+<?php
+
+var_dump(set_exception_handler(
+ function() { echo 'Intercepted exception!', "\n"; }
+));
+
+var_dump(set_exception_handler(null));
+
+throw new Exception('Exception!');
+?>
+--EXPECTF--
+NULL
+object(Closure)#1 (0) {
+}
+
+Fatal error: Uncaught exception 'Exception' with message 'Exception!' in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
+
diff --git a/Zend/tests/bug60978.phpt b/Zend/tests/bug60978.phpt
index 5dc6fe31e..5dc6fe31e 100755..100644
--- a/Zend/tests/bug60978.phpt
+++ b/Zend/tests/bug60978.phpt
diff --git a/Zend/tests/bug61681.phpt b/Zend/tests/bug61681.phpt
new file mode 100644
index 000000000..acc027539
--- /dev/null
+++ b/Zend/tests/bug61681.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #61681: Malformed grammar
+--FILE--
+<?php
+$la = "ooxx";
+
+echo "${substr('laruence', 0, 2)}";
+
+?>
+--EXPECT--
+ooxx
diff --git a/Zend/tests/bug61761.phpt b/Zend/tests/bug61761.phpt
index 24c69ae79..24c69ae79 100755..100644
--- a/Zend/tests/bug61761.phpt
+++ b/Zend/tests/bug61761.phpt
diff --git a/Zend/tests/bug62991.phpt b/Zend/tests/bug62991.phpt
new file mode 100644
index 000000000..cb4ff9335
--- /dev/null
+++ b/Zend/tests/bug62991.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #62991 (Segfault with generator and closure)
+--FILE--
+<?php
+
+function test( array $array )
+{
+ $closure = function() use ( $array ) {
+ print_r( $array );
+ yield "hi";
+ };
+ return $closure();
+}
+
+function test2( array $array )
+{
+ $closure = function() use ( $array ) {
+ print_r( $array );
+ yield "hi";
+ };
+ return $closure; // if you return the $closure and call it outside this function it works.
+}
+
+$generator = test(array( 1, 2, 3 ) );
+foreach($generator as $something) {
+}
+
+$generator = test2(array( 1, 2, 3 ) );
+foreach($generator() as $something) {
+}
+
+
+$generator = test2(array( 1, 2, 3 ) );
+
+echo "okey\n";
+?>
+--EXPECT--
+Array
+(
+ [0] => 1
+ [1] => 2
+ [2] => 3
+)
+Array
+(
+ [0] => 1
+ [1] => 2
+ [2] => 3
+)
+okey
diff --git a/Zend/tests/bug63055.phpt b/Zend/tests/bug63055.phpt
new file mode 100644
index 000000000..711385a3c
--- /dev/null
+++ b/Zend/tests/bug63055.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #63055 (Segfault in zend_gc with SF2 testsuite)
+--FILE--
+<?php
+/* the default gc root size is 10,000 */
+for ($i=0; $i<9998; $i++) {
+ $array = array();
+ $array[0] = &$array;
+ unset($array);
+}
+
+$matches = array("foo" => "bar"); /* this bucket will trigger the segfault */
+$dummy = array("dummy"); /* used to trigger gc_collect_cycles */
+$dummy[1] = &$dummy;
+
+$matches[1] = &$matches;
+$matches[2] = $dummy;
+
+str_replace("foo", "bar", "foobar", $matches);
+echo "okey";
+?>
+--EXPECTF--
+okey
diff --git a/Zend/tests/bug63219.phpt b/Zend/tests/bug63219.phpt
new file mode 100644
index 000000000..999be4a85
--- /dev/null
+++ b/Zend/tests/bug63219.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion)
+--FILE--
+<?php
+trait TFoo {
+ public function fooMethod(){}
+}
+
+class C {
+ use TFoo {
+ Typo::fooMethod as tf;
+ }
+}
+
+echo "okey";
+?>
+--EXPECTF--
+Fatal error: Could not find trait Typo in %sbug63219.php on line %d
diff --git a/Zend/tests/bug63305.phpt b/Zend/tests/bug63305.phpt
new file mode 100644
index 000000000..4bd3a4dbe
--- /dev/null
+++ b/Zend/tests/bug63305.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #63305 (zend_mm_heap corrupted with traits)
+--FILE--
+<?php
+new Attachment("");
+
+function __autoload($class) {
+ switch ($class) {
+ case "Attachment":
+ eval(<<<'PHP'
+class Attachment extends File {
+}
+PHP
+ );
+ break;
+ case "File":
+ eval(<<<'PHP'
+class File {
+ use TDatabaseObject {
+ TDatabaseObject::__construct as private databaseObjectConstruct;
+ }
+ public function __construct() {
+ }
+}
+PHP
+ );
+ break;
+ case "TDatabaseObject":
+ eval(<<<'PHP'
+trait TDatabaseObject {
+ public function __construct() {
+ }
+}
+PHP
+ );
+ break;
+ }
+ return TRUE;
+}
+echo "okey";
+?>
+--EXPECT--
+okey
diff --git a/Zend/tests/bug63336.phpt b/Zend/tests/bug63336.phpt
new file mode 100644
index 000000000..d2c3d4113
--- /dev/null
+++ b/Zend/tests/bug63336.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #63336 (invalid E_NOTICE error occur)
+--XFAIL--
+Bug is not fixed yet
+--FILE--
+<?php
+error_reporting(E_ALL | E_NOTICE );
+define("TEST", "123");
+class Base {
+ const DUMMY = "XXX";
+ public function foo($var=TEST, $more=null) { return true; }
+ public function bar($more=self::DUMMY) { return true; }
+}
+
+class Child extends Base {
+ const DUMMY = "DDD";
+ public function foo($var=TEST, array $more = array()) { return true; }
+ public function bar($var, $more=self::DUMMY) { return true; }
+}
+?>
+--EXPECT--
+Strict Standards: Declaration of Child::foo() should be compatible with Base::foo($var = '123', $more = NULL) in %sbug63336.php on line %d
+
+Strict Standards: Declaration of Child::bar() should be compatible with Base::bar($var, $more = 'XXX') in %sbug63336.php on line %d
diff --git a/Zend/tests/bug_debug_backtrace.phpt b/Zend/tests/bug_debug_backtrace.phpt
index 3e4a0ec94..3e4a0ec94 100755..100644
--- a/Zend/tests/bug_debug_backtrace.phpt
+++ b/Zend/tests/bug_debug_backtrace.phpt
diff --git a/Zend/tests/call_static.phpt b/Zend/tests/call_static.phpt
index c37bc7223..c37bc7223 100755..100644
--- a/Zend/tests/call_static.phpt
+++ b/Zend/tests/call_static.phpt
diff --git a/Zend/tests/catch.phpt b/Zend/tests/catch.phpt
index 0ec5cf759..0ec5cf759 100755..100644
--- a/Zend/tests/catch.phpt
+++ b/Zend/tests/catch.phpt
diff --git a/Zend/tests/catch_002.phpt b/Zend/tests/catch_002.phpt
index 11d736abe..11d736abe 100755..100644
--- a/Zend/tests/catch_002.phpt
+++ b/Zend/tests/catch_002.phpt
diff --git a/Zend/tests/catch_003.phpt b/Zend/tests/catch_003.phpt
index 414d50f81..414d50f81 100755..100644
--- a/Zend/tests/catch_003.phpt
+++ b/Zend/tests/catch_003.phpt
diff --git a/Zend/tests/catch_004.phpt b/Zend/tests/catch_004.phpt
index 54920b894..54920b894 100755..100644
--- a/Zend/tests/catch_004.phpt
+++ b/Zend/tests/catch_004.phpt
diff --git a/Zend/tests/catch_finally_001.phpt b/Zend/tests/catch_finally_001.phpt
new file mode 100644
index 000000000..0c3f597a0
--- /dev/null
+++ b/Zend/tests/catch_finally_001.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Try catch finally (basic test)
+--FILE--
+<?php
+function foo ($throw = FALSE) {
+ try {
+ echo "try\n";
+ if ($throw) {
+ throw new Exception("ex");
+ }
+ } catch (Exception $e) {
+ echo "catch\n";
+ } finally {
+ echo "finally\n";
+ }
+
+ echo "end\n";
+}
+
+foo();
+echo "\n";
+foo(true);
+?>
+--EXPECTF--
+try
+finally
+end
+
+try
+catch
+finally
+end
diff --git a/Zend/tests/catch_finally_002.phpt b/Zend/tests/catch_finally_002.phpt
new file mode 100644
index 000000000..c54477ff8
--- /dev/null
+++ b/Zend/tests/catch_finally_002.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Try catch finally (basic test with return)
+--FILE--
+<?php
+function foo () {
+ try {
+ echo "try\n";
+ return 1;
+ } catch (Exception $e) {
+ } finally {
+ echo "finally\n";
+ }
+ return 2;
+}
+
+var_dump(foo());
+?>
+--EXPECTF--
+try
+finally
+int(1)
diff --git a/Zend/tests/catch_finally_003.phpt b/Zend/tests/catch_finally_003.phpt
new file mode 100644
index 000000000..24e468d33
--- /dev/null
+++ b/Zend/tests/catch_finally_003.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Try catch finally (with multi-returns)
+--FILE--
+<?php
+function dummy($msg) {
+ var_dump($msg);
+}
+
+function foo ($a) {
+ try {
+ dummy("try");
+ return $a;
+ } catch (Exception $e) {
+ throw $e;
+ } finally {
+ dummy("finally");
+ return "finally";
+ }
+ return "end";
+}
+
+function &bar($a) {
+ try {
+ echo "try\n";
+ throw new Exception("ex");
+ } catch (Exception $e) {
+ } finally {
+ return $a;
+ }
+ return ($c = "end");
+}
+var_dump(foo("para"));
+var_dump(bar("para"));
+?>
+--EXPECTF--
+string(3) "try"
+string(7) "finally"
+string(7) "finally"
+try
+string(4) "para"
diff --git a/Zend/tests/catch_finally_004.phpt b/Zend/tests/catch_finally_004.phpt
new file mode 100644
index 000000000..a2c22beab
--- /dev/null
+++ b/Zend/tests/catch_finally_004.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Try catch finally (nesting try-catch-finally)
+--FILE--
+<?php
+
+function throw_exception($msg) {
+ throw new Exception($msg);
+}
+
+function foo (&$ex) {
+ try {
+ echo "1";
+ try {
+ echo "2";
+ throw_exception("try");
+ } catch (Exception $e) {
+ echo "3";
+ throw_exception("catch");
+ } finally {
+ echo "4";
+ throw_exception("finally");
+ }
+ } catch (Exception $e) {
+ $ex = $e;
+ echo "3";
+ } finally {
+ echo "2";
+ }
+ return 1;
+}
+
+var_dump(foo($ex));
+
+do {
+ var_dump($ex->getMessage());
+} while ($ex = $ex->getPrevious());
+?>
+--EXPECT--
+123432int(1)
+string(7) "finally"
+string(5) "catch"
diff --git a/Zend/tests/catch_finally_005.phpt b/Zend/tests/catch_finally_005.phpt
new file mode 100644
index 000000000..c2fd55df2
--- /dev/null
+++ b/Zend/tests/catch_finally_005.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Try catch finally (with multi-returns and exception)
+--FILE--
+<?php
+function foo ($a) {
+ try {
+ throw new Exception("ex");
+ } catch (PdoException $e) {
+ die("error");
+ } catch (Exception $e) {
+ return 2;
+ } finally {
+ return 3;
+ }
+ return 1;
+}
+
+var_dump(foo("para"));
+?>
+--EXPECTF--
+int(3)
diff --git a/Zend/tests/catch_finally_006.phpt b/Zend/tests/catch_finally_006.phpt
new file mode 100644
index 000000000..9759eab37
--- /dev/null
+++ b/Zend/tests/catch_finally_006.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Try catch finally (re-throw exception in catch block)
+--FILE--
+<?php
+function foo ($a) {
+ try {
+ throw new Exception("ex");
+ } catch (Exception $e) {
+ var_dump($a);
+ throw $e;
+ } finally {
+ var_dump("finally");
+ return "return";
+ }
+ return 1;
+}
+
+try {
+ var_dump(foo("para"));
+} catch (Exception $e) {
+ "caught exception" . PHP_EOL;
+ var_dump($e->getMessage());
+}
+?>
+--EXPECT--
+string(4) "para"
+string(7) "finally"
+string(2) "ex"
diff --git a/Zend/tests/closure_016.phpt b/Zend/tests/closure_016.phpt
index ae0036586..ae0036586 100755..100644
--- a/Zend/tests/closure_016.phpt
+++ b/Zend/tests/closure_016.phpt
diff --git a/Zend/tests/closure_022.phpt b/Zend/tests/closure_022.phpt
index 8621d2c09..8621d2c09 100755..100644
--- a/Zend/tests/closure_022.phpt
+++ b/Zend/tests/closure_022.phpt
diff --git a/Zend/tests/closure_023.phpt b/Zend/tests/closure_023.phpt
index 634fb6dd5..634fb6dd5 100755..100644
--- a/Zend/tests/closure_023.phpt
+++ b/Zend/tests/closure_023.phpt
diff --git a/Zend/tests/closure_033.phpt b/Zend/tests/closure_033.phpt
index f6510066b..f6510066b 100755..100644
--- a/Zend/tests/closure_033.phpt
+++ b/Zend/tests/closure_033.phpt
diff --git a/Zend/tests/closure_036.phpt b/Zend/tests/closure_036.phpt
index 77d7ce690..77d7ce690 100755..100644
--- a/Zend/tests/closure_036.phpt
+++ b/Zend/tests/closure_036.phpt
diff --git a/Zend/tests/closure_037.phpt b/Zend/tests/closure_037.phpt
index 4b24c85d1..4b24c85d1 100755..100644
--- a/Zend/tests/closure_037.phpt
+++ b/Zend/tests/closure_037.phpt
diff --git a/Zend/tests/const_dereference_001.phpt b/Zend/tests/const_dereference_001.phpt
new file mode 100644
index 000000000..5fe6e4d43
--- /dev/null
+++ b/Zend/tests/const_dereference_001.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Const array deference
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+var_dump(array(1, 2, 3, 4,) [3]);
+var_dump(array(1, 2, 3, 4,) ['foo']);
+var_dump(array(array(1,2,3), array(4, 5, 6))[1][2]);
+
+foreach (array(array(1, 2, 3))[0] as $var) {
+ echo $var;
+}
+?>
+--EXPECTF--
+int(4)
+
+Notice: Undefined index: foo in %sconst_dereference_001.php on line %d
+NULL
+int(6)
+123
diff --git a/Zend/tests/const_dereference_002.phpt b/Zend/tests/const_dereference_002.phpt
new file mode 100644
index 000000000..ff8951975
--- /dev/null
+++ b/Zend/tests/const_dereference_002.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Const string dereference
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+var_dump("foobar"[3]);
+var_dump("foobar"[2][0]);
+var_dump("foobar"["foo"]["bar"]);
+
+--EXPECTF--
+string(1) "b"
+string(1) "o"
+
+Warning: Illegal string offset 'foo' in %sconst_dereference_002.php on line %d
+
+Warning: Illegal string offset 'bar' in %sconst_dereference_002.php on line %d
+string(1) "f"
diff --git a/Zend/tests/const_dereference_003.phpt b/Zend/tests/const_dereference_003.phpt
new file mode 100644
index 000000000..810ad14b8
--- /dev/null
+++ b/Zend/tests/const_dereference_003.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Const array deference
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+var_dump([1, 2, 3, 4,][3]);
+var_dump([1, 2, 3, 4]['foo']);
+var_dump([array(1,2,3), [4, 5, 6]][1][2]);
+
+foreach (array([1, 2, 3])[0] as $var) {
+ echo $var;
+}
+?>
+--EXPECTF--
+int(4)
+
+Notice: Undefined index: foo in %sconst_dereference_003.php on line %d
+NULL
+int(6)
+123
diff --git a/Zend/tests/constants/dir-constant-eval.phpt b/Zend/tests/constants/dir-constant-eval.phpt
index 8fe619d56..8fe619d56 100755..100644
--- a/Zend/tests/constants/dir-constant-eval.phpt
+++ b/Zend/tests/constants/dir-constant-eval.phpt
diff --git a/Zend/tests/constants/dir-constant-includes.phpt b/Zend/tests/constants/dir-constant-includes.phpt
index 8ea65292d..8ea65292d 100755..100644
--- a/Zend/tests/constants/dir-constant-includes.phpt
+++ b/Zend/tests/constants/dir-constant-includes.phpt
diff --git a/Zend/tests/constants/dir-constant-nested_includes.phpt b/Zend/tests/constants/dir-constant-nested_includes.phpt
index 18bdfa891..18bdfa891 100755..100644
--- a/Zend/tests/constants/dir-constant-nested_includes.phpt
+++ b/Zend/tests/constants/dir-constant-nested_includes.phpt
diff --git a/Zend/tests/constants/dir-constant-normal.phpt b/Zend/tests/constants/dir-constant-normal.phpt
index 1a573a205..1a573a205 100755..100644
--- a/Zend/tests/constants/dir-constant-normal.phpt
+++ b/Zend/tests/constants/dir-constant-normal.phpt
diff --git a/Zend/tests/constants_005.phpt b/Zend/tests/constants_005.phpt
index d2a205b78..d2a205b78 100755..100644
--- a/Zend/tests/constants_005.phpt
+++ b/Zend/tests/constants_005.phpt
diff --git a/Zend/tests/dtor_scope.phpt b/Zend/tests/dtor_scope.phpt
index ab991cf94..ab991cf94 100755..100644
--- a/Zend/tests/dtor_scope.phpt
+++ b/Zend/tests/dtor_scope.phpt
diff --git a/Zend/tests/empty_with_expr.phpt b/Zend/tests/empty_with_expr.phpt
new file mode 100644
index 000000000..582eb3d2d
--- /dev/null
+++ b/Zend/tests/empty_with_expr.phpt
@@ -0,0 +1,32 @@
+--TEST--
+empty() with arbitrary expressions
+--FILE--
+<?php
+
+function getEmptyArray() { return []; }
+function getNonEmptyArray() { return [1, 2, 3]; }
+
+var_dump(empty([]));
+var_dump(empty([1, 2, 3]));
+
+var_dump(empty(getEmptyArray()));
+var_dump(empty(getNonEmptyArray()));
+
+var_dump(empty([] + []));
+var_dump(empty([1, 2, 3] + []));
+
+var_dump(empty("string"));
+var_dump(empty(""));
+var_dump(empty(true));
+var_dump(empty(false));
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
diff --git a/Zend/tests/errmsg_043.phpt b/Zend/tests/errmsg_043.phpt
deleted file mode 100644
index 3de8bc206..000000000
--- a/Zend/tests/errmsg_043.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-errmsg: cannot create references to temp array
---FILE--
-<?php
-
-foreach (array(1,2,3) as $k=>&$v) {
-}
-
-echo "Done\n";
-?>
---EXPECTF--
-Fatal error: Cannot create references to elements of a temporary array expression in %s on line %d
diff --git a/Zend/tests/exception_007.phpt b/Zend/tests/exception_007.phpt
index 953e76513..953e76513 100755..100644
--- a/Zend/tests/exception_007.phpt
+++ b/Zend/tests/exception_007.phpt
diff --git a/Zend/tests/exception_008.phpt b/Zend/tests/exception_008.phpt
index 0d40541ee..0d40541ee 100755..100644
--- a/Zend/tests/exception_008.phpt
+++ b/Zend/tests/exception_008.phpt
diff --git a/Zend/tests/foreach_list_001.phpt b/Zend/tests/foreach_list_001.phpt
new file mode 100644
index 000000000..a318f1aad
--- /dev/null
+++ b/Zend/tests/foreach_list_001.phpt
@@ -0,0 +1,43 @@
+--TEST--
+foreach with list syntax
+--FILE--
+<?php
+
+foreach(array(array(1,2), array(3,4)) as list($a, $b)) {
+ var_dump($a . $b);
+}
+
+$array = array(
+ array('a', 'b'),
+ array('c', 'd'),
+);
+
+foreach ($array as list($a, $b)) {
+ var_dump($a . $b);
+}
+
+
+$multi = array(
+ array(array(1,2), array(3,4)),
+ array(array(5,6), array(7,8)),
+);
+
+foreach ($multi as list(list($a, $b), list($c, $d))) {
+ var_dump($a . $b . $c . $d);
+}
+
+foreach ($multi as $key => list(list($a, $b), list($c, $d))) {
+ var_dump($key . $a . $b . $c . $d);
+}
+
+
+?>
+--EXPECT--
+string(2) "12"
+string(2) "34"
+string(2) "ab"
+string(2) "cd"
+string(4) "1234"
+string(4) "5678"
+string(5) "01234"
+string(5) "15678"
diff --git a/Zend/tests/foreach_list_002.phpt b/Zend/tests/foreach_list_002.phpt
new file mode 100644
index 000000000..251870ba0
--- /dev/null
+++ b/Zend/tests/foreach_list_002.phpt
@@ -0,0 +1,26 @@
+--TEST--
+foreach with freak lists
+--FILE--
+<?php
+
+foreach (array(array(1,2), array(3,4)) as list($a, )) {
+ var_dump($a);
+}
+
+$array = [['a', 'b'], 'c', 'd'];
+
+foreach($array as list(list(), $a)) {
+ var_dump($a);
+}
+
+?>
+--EXPECTF--
+int(1)
+int(3)
+string(1) "b"
+
+Notice: Uninitialized string offset: 1 in %sforeach_list_002.php on line %d
+string(0) ""
+
+Notice: Uninitialized string offset: 1 in %sforeach_list_002.php on line %d
+string(0) ""
diff --git a/Zend/tests/foreach_list_003.phpt b/Zend/tests/foreach_list_003.phpt
new file mode 100644
index 000000000..8674ecd75
--- /dev/null
+++ b/Zend/tests/foreach_list_003.phpt
@@ -0,0 +1,13 @@
+--TEST--
+foreach with list key
+--FILE--
+<?php
+
+$array = [['a', 'b'], 'c', 'd'];
+
+foreach($array as list($key) => list(list(), $a)) {
+}
+
+?>
+--EXPECTF--
+Fatal error: Cannot use list as key element in %sforeach_list_003.php on line %d
diff --git a/Zend/tests/foreach_list_004.phpt b/Zend/tests/foreach_list_004.phpt
new file mode 100644
index 000000000..fd48e8a1f
--- /dev/null
+++ b/Zend/tests/foreach_list_004.phpt
@@ -0,0 +1,13 @@
+--TEST--
+foreach with empty list
+--FILE--
+<?php
+
+$array = [['a', 'b'], 'c', 'd'];
+
+foreach($array as $key => list()) {
+}
+
+?>
+--EXPECTF--
+Fatal error: Cannot use empty list in %sforeach_list_004.php on line %d
diff --git a/Zend/tests/foreach_temp_array_expr_with_refs.phpt b/Zend/tests/foreach_temp_array_expr_with_refs.phpt
new file mode 100644
index 000000000..8978b7b01
--- /dev/null
+++ b/Zend/tests/foreach_temp_array_expr_with_refs.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Temporary array expressions can be iterated by reference
+--FILE--
+<?php
+
+$a = 'a';
+$b = 'b';
+
+foreach ([&$a, &$b] as &$value) {
+ $value .= '-foo';
+}
+
+var_dump($a, $b);
+
+?>
+--EXPECT--
+string(5) "a-foo"
+string(5) "b-foo"
diff --git a/Zend/tests/generators/auto_incrementing_keys.phpt b/Zend/tests/generators/auto_incrementing_keys.phpt
new file mode 100644
index 000000000..acfb2f2ce
--- /dev/null
+++ b/Zend/tests/generators/auto_incrementing_keys.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Generator keys are auto-incrementing by default
+--FILE--
+<?php
+
+function gen() {
+ yield 'foo';
+ yield 'bar';
+ yield 5 => 'rab';
+ yield 'oof';
+}
+
+foreach (gen() as $k => $v) {
+ echo $k, ' => ', $v, "\n";
+}
+
+?>
+--EXPECT--
+0 => foo
+1 => bar
+5 => rab
+6 => oof
diff --git a/Zend/tests/generators/backtrace.phpt b/Zend/tests/generators/backtrace.phpt
new file mode 100644
index 000000000..5fed1d467
--- /dev/null
+++ b/Zend/tests/generators/backtrace.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Printing the stack trace in a generator
+--FILE--
+<?php
+
+function f1() {
+ debug_print_backtrace();
+}
+
+function f2($arg1, $arg2) {
+ f1();
+ yield; // force generator
+}
+
+function f3($gen) {
+ $gen->rewind(); // trigger run
+}
+
+$gen = f2('foo', 'bar');
+f3($gen);
+
+?>
+--EXPECTF--
+#0 f1() called at [%s:%d]
+#1 f2(foo, bar)
+#2 Generator->rewind() called at [%s:%d]
+#3 f3(Generator Object ()) called at [%s:%d]
diff --git a/Zend/tests/generators/clone.phpt b/Zend/tests/generators/clone.phpt
new file mode 100644
index 000000000..36811dfe6
--- /dev/null
+++ b/Zend/tests/generators/clone.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Generators can be cloned
+--FILE--
+<?php
+
+function firstN($end) {
+ for ($i = 0; $i < $end; ++$i) {
+ yield $i;
+ }
+}
+
+$g1 = firstN(5);
+var_dump($g1->current());
+$g1->next();
+
+$g2 = clone $g1;
+var_dump($g2->current());
+$g2->next();
+
+var_dump($g2->current());
+var_dump($g1->current());
+
+$g1->next();
+var_dump($g1->current());
+
+?>
+--EXPECT--
+int(0)
+int(1)
+int(2)
+int(1)
+int(2)
diff --git a/Zend/tests/generators/clone_with_foreach.phpt b/Zend/tests/generators/clone_with_foreach.phpt
new file mode 100644
index 000000000..b05ed0731
--- /dev/null
+++ b/Zend/tests/generators/clone_with_foreach.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Cloning a generator with a foreach loop properly adds a ref for the loop var
+--FILE--
+<?php
+
+function gen() {
+ foreach ([1, 2, 3] as $i) {
+ yield $i;
+ }
+}
+
+$g1 = gen();
+var_dump($g1->current());
+
+$g2 = clone $g1;
+var_dump($g2->current());
+
+$g1->next();
+$g2->next();
+var_dump($g1->current());
+var_dump($g2->current());
+
+unset($g1);
+$g2->next();
+var_dump($g2->current());
+
+?>
+--EXPECT--
+int(1)
+int(1)
+int(2)
+int(2)
+int(3)
diff --git a/Zend/tests/generators/clone_with_stack.phpt b/Zend/tests/generators/clone_with_stack.phpt
new file mode 100644
index 000000000..5a8e6d842
--- /dev/null
+++ b/Zend/tests/generators/clone_with_stack.phpt
@@ -0,0 +1,18 @@
+--TEST--
+A generator with an active stack can be cloned
+--FILE--
+<?php
+
+function gen() {
+ var_dump(str_repeat("x", yield));
+}
+
+$g1 = gen();
+$g1->rewind();
+$g2 = clone $g1;
+unset($g1);
+$g2->send(10);
+
+?>
+--EXPECT--
+string(10) "xxxxxxxxxx"
diff --git a/Zend/tests/generators/clone_with_symbol_table.phpt b/Zend/tests/generators/clone_with_symbol_table.phpt
new file mode 100644
index 000000000..e1fefebd8
--- /dev/null
+++ b/Zend/tests/generators/clone_with_symbol_table.phpt
@@ -0,0 +1,27 @@
+--TEST--
+A generator using a symbol table can be cloned
+--FILE--
+<?php
+
+function gen() {
+ // force compiled variable for $foo
+ $foo = 'foo';
+
+ // force symbol table
+ extract(['foo' => 'bar']);
+
+ // interrupt
+ yield;
+
+ var_dump($foo);
+}
+
+$g1 = gen();
+$g1->rewind();
+$g2 = clone $g1;
+unset($g1);
+$g2->next();
+
+?>
+--EXPECT--
+string(3) "bar"
diff --git a/Zend/tests/generators/clone_with_this.phpt b/Zend/tests/generators/clone_with_this.phpt
new file mode 100644
index 000000000..b242d851e
--- /dev/null
+++ b/Zend/tests/generators/clone_with_this.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Cloning a generator method (with $this)
+--FILE--
+<?php
+
+class Test {
+ protected $foo;
+
+ public function gen() {
+ $this->foo = 'bar';
+ yield; // interrupt
+ var_dump($this->foo);
+ }
+}
+
+$g1 = (new Test)->gen();
+$g1->rewind(); // goto yield
+$g2 = clone $g1;
+unset($g1);
+$g2->next();
+
+?>
+--EXPECT--
+string(3) "bar"
diff --git a/Zend/tests/generators/dynamic_call.phpt b/Zend/tests/generators/dynamic_call.phpt
new file mode 100644
index 000000000..d56454095
--- /dev/null
+++ b/Zend/tests/generators/dynamic_call.phpt
@@ -0,0 +1,19 @@
+--TEST--
+It's possible to invoke a generator dynamically
+--FILE--
+<?php
+
+function gen($foo, $bar) {
+ yield $foo;
+ yield $bar;
+}
+
+$gen = call_user_func('gen', 'bar', 'foo');
+foreach ($gen as $value) {
+ var_dump($value);
+}
+
+?>
+--EXPECT--
+string(3) "bar"
+string(3) "foo"
diff --git a/Zend/tests/generators/errors/generator_cannot_return_before_yield_error.phpt b/Zend/tests/generators/errors/generator_cannot_return_before_yield_error.phpt
new file mode 100644
index 000000000..ad618d20b
--- /dev/null
+++ b/Zend/tests/generators/errors/generator_cannot_return_before_yield_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Generators cannot return values (even before yield)
+--FILE--
+<?php
+
+function gen() {
+ return $foo;
+ yield;
+}
+
+?>
+--EXPECTF--
+Fatal error: Generators cannot return values using "return" in %s on line 4
diff --git a/Zend/tests/generators/errors/generator_cannot_return_error.phpt b/Zend/tests/generators/errors/generator_cannot_return_error.phpt
new file mode 100644
index 000000000..51149062a
--- /dev/null
+++ b/Zend/tests/generators/errors/generator_cannot_return_error.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Generators cannot return values
+--FILE--
+<?php
+
+function gen() {
+ yield;
+ return $abc;
+}
+
+?>
+--EXPECTF--
+Fatal error: Generators cannot return values using "return" in %s on line 5
diff --git a/Zend/tests/generators/errors/generator_extend_error.phpt b/Zend/tests/generators/errors/generator_extend_error.phpt
new file mode 100644
index 000000000..550f16ae0
--- /dev/null
+++ b/Zend/tests/generators/errors/generator_extend_error.phpt
@@ -0,0 +1,10 @@
+--TEST--
+The Generator class cannot be extended
+--FILE--
+<?php
+
+class ExtendedGenerator extends Generator { }
+
+?>
+--EXPECTF--
+Fatal error: Class ExtendedGenerator may not inherit from final class (Generator) in %s on line %d
diff --git a/Zend/tests/generators/errors/generator_instantiate_error.phpt b/Zend/tests/generators/errors/generator_instantiate_error.phpt
new file mode 100644
index 000000000..f8941c087
--- /dev/null
+++ b/Zend/tests/generators/errors/generator_instantiate_error.phpt
@@ -0,0 +1,10 @@
+--TEST--
+It's not possible to directly instantiate the Generator class
+--FILE--
+<?php
+
+new Generator;
+
+?>
+--EXPECTF--
+Catchable fatal error: The "Generator" class is reserved for internal use and cannot be manually instantiated in %s on line %d
diff --git a/Zend/tests/generators/errors/non_ref_generator_iterated_by_ref_error.phpt b/Zend/tests/generators/errors/non_ref_generator_iterated_by_ref_error.phpt
new file mode 100644
index 000000000..de5b22f6b
--- /dev/null
+++ b/Zend/tests/generators/errors/non_ref_generator_iterated_by_ref_error.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Non-ref generators cannot be iterated by-ref
+--FILE--
+<?php
+
+function gen() { yield; }
+
+$gen = gen();
+foreach ($gen as &$value) { }
+
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'Exception' with message 'You can only iterate a generator by-reference if it declared that it yields by-reference' in %s:%d
+Stack trace:
+#0 %s(%d): unknown()
+#1 {main}
+ thrown in %s on line %d
+
diff --git a/Zend/tests/generators/errors/resume_running_generator_error.phpt b/Zend/tests/generators/errors/resume_running_generator_error.phpt
new file mode 100644
index 000000000..567d72f3f
--- /dev/null
+++ b/Zend/tests/generators/errors/resume_running_generator_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+It is not possible to resume an already running generator
+--FILE--
+<?php
+
+function gen() {
+ $gen = yield;
+ $gen->next();
+}
+
+$gen = gen();
+$gen->send($gen);
+$gen->next();
+
+?>
+--EXPECTF--
+Fatal error: Cannot resume an already running generator in %s on line %d
diff --git a/Zend/tests/generators/errors/serialize_unserialize_error.phpt b/Zend/tests/generators/errors/serialize_unserialize_error.phpt
new file mode 100644
index 000000000..a8470b0a6
--- /dev/null
+++ b/Zend/tests/generators/errors/serialize_unserialize_error.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Generators can't be serialized or unserialized
+--FILE--
+<?php
+
+function gen() { yield; }
+
+$gen = gen();
+
+try {
+ serialize($gen);
+} catch (Exception $e) {
+ echo $e, "\n\n";
+}
+
+try {
+ var_dump(unserialize('O:9:"Generator":0:{}'));
+} catch (Exception $e) {
+ echo $e, "\n\n";
+}
+
+try {
+ var_dump(unserialize('C:9:"Generator":0:{}'));
+} catch (Exception $e) {
+ echo $e;
+}
+
+?>
+--EXPECTF--
+exception 'Exception' with message 'Serialization of 'Generator' is not allowed' in %s:%d
+Stack trace:
+#0 %s(%d): serialize(Object(Generator))
+#1 {main}
+
+exception 'Exception' with message 'Unserialization of 'Generator' is not allowed' in %s:%d
+Stack trace:
+#0 [internal function]: Generator->__wakeup()
+#1 %s(%d): unserialize('O:9:"Generator"...')
+#2 {main}
+
+
+Notice: unserialize(): Error at offset 19 of 20 bytes in %s on line %d
+exception 'Exception' with message 'Unserialization of 'Generator' is not allowed' in %s:%d
+Stack trace:
+#0 %s(%d): unserialize('C:9:"Generator"...')
+#1 {main}
diff --git a/Zend/tests/generators/errors/yield_const_by_ref_error.phpt b/Zend/tests/generators/errors/yield_const_by_ref_error.phpt
new file mode 100644
index 000000000..e79f83e24
--- /dev/null
+++ b/Zend/tests/generators/errors/yield_const_by_ref_error.phpt
@@ -0,0 +1,16 @@
+--TEST--
+A notice is thrown when yielding a constant value by reference
+--FILE--
+<?php
+
+function &gen() {
+ yield "foo";
+}
+
+$gen = gen();
+var_dump($gen->current());
+
+?>
+--EXPECTF--
+Notice: Only variable references should be yielded by reference in %s on line %d
+string(3) "foo"
diff --git a/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt
new file mode 100644
index 000000000..aada676a6
--- /dev/null
+++ b/Zend/tests/generators/errors/yield_in_force_closed_finally_error.phpt
@@ -0,0 +1,29 @@
+--TEST--
+yield cannot be used in a finally block when the generator is force-closed
+--FILE--
+<?php
+
+function gen() {
+ try {
+ echo "before yield\n";
+ yield;
+ echo "after yield\n";
+ } finally {
+ echo "before yield in finally\n";
+ yield;
+ echo "after yield in finally\n";
+ }
+
+ echo "after finally\n";
+}
+
+$gen = gen();
+$gen->rewind();
+unset($gen);
+
+?>
+--EXPECTF--
+before yield
+before yield in finally
+
+Fatal error: Cannot yield from finally in a force-closed generator in %s on line %d
diff --git a/Zend/tests/generators/errors/yield_non_ref_function_call_by_ref_error.phpt b/Zend/tests/generators/errors/yield_non_ref_function_call_by_ref_error.phpt
new file mode 100644
index 000000000..4b8563331
--- /dev/null
+++ b/Zend/tests/generators/errors/yield_non_ref_function_call_by_ref_error.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Yielding the result of a non-ref function call throw a notice
+--FILE--
+<?php
+
+function foo() {
+ return "bar";
+}
+
+function &gen() {
+ yield foo();
+}
+
+$gen = gen();
+var_dump($gen->current());
+
+?>
+--EXPECTF--
+Notice: Only variable references should be yielded by reference in %s on line %d
+string(3) "bar"
diff --git a/Zend/tests/generators/errors/yield_outside_function_error.phpt b/Zend/tests/generators/errors/yield_outside_function_error.phpt
new file mode 100644
index 000000000..f999c1c03
--- /dev/null
+++ b/Zend/tests/generators/errors/yield_outside_function_error.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Yield cannot be used outside of functions
+--FILE--
+<?php
+
+yield "Test";
+
+?>
+--EXPECTF--
+Fatal error: The "yield" expression can only be used inside a function in %s on line %d
diff --git a/Zend/tests/generators/fibonacci.phpt b/Zend/tests/generators/fibonacci.phpt
new file mode 100644
index 000000000..35b31352f
--- /dev/null
+++ b/Zend/tests/generators/fibonacci.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Creating an infinite fibonacci list using a generator
+--FILE--
+<?php
+
+function fib() {
+ list($a, $b) = [1, 1];
+ while (true) {
+ yield $b;
+ list($a, $b) = [$b, $a + $b];
+ }
+}
+
+foreach (fib() as $n) {
+ if ($n > 1000) break;
+
+ var_dump($n);
+}
+
+?>
+--EXPECT--
+int(1)
+int(2)
+int(3)
+int(5)
+int(8)
+int(13)
+int(21)
+int(34)
+int(55)
+int(89)
+int(144)
+int(233)
+int(377)
+int(610)
+int(987)
diff --git a/Zend/tests/generators/finally_ran_on_close.phpt b/Zend/tests/generators/finally_ran_on_close.phpt
new file mode 100644
index 000000000..44a84fae5
--- /dev/null
+++ b/Zend/tests/generators/finally_ran_on_close.phpt
@@ -0,0 +1,25 @@
+--TEST--
+finally is run even if a generator is closed mid-execution
+--FILE--
+<?php
+
+function gen() {
+ try {
+ echo "before yield\n";
+ yield;
+ echo "after yield\n";
+ } finally {
+ echo "finally run\n";
+ }
+
+ echo "code after finally\n";
+}
+
+$gen = gen();
+$gen->rewind();
+unset($gen);
+
+?>
+--EXPECT--
+before yield
+finally run
diff --git a/Zend/tests/generators/finally_uninterrupted.phpt b/Zend/tests/generators/finally_uninterrupted.phpt
new file mode 100644
index 000000000..64c94382a
--- /dev/null
+++ b/Zend/tests/generators/finally_uninterrupted.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Use of finally in generator without interrupt
+--FILE--
+<?php
+
+function gen() {
+ try {
+ throw new Exception;
+ } finally {
+ echo "finally run\n";
+ }
+
+ yield; // force generator
+}
+
+$gen = gen();
+$gen->rewind(); // force run
+
+?>
+--EXPECTF--
+finally run
+
+Fatal error: Uncaught exception 'Exception' in %s:%d
+Stack trace:
+#0 [internal function]: gen()
+#1 %s(%d): Generator->rewind()
+#2 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/generators/finally_with_return.phpt b/Zend/tests/generators/finally_with_return.phpt
new file mode 100644
index 000000000..b26a49f32
--- /dev/null
+++ b/Zend/tests/generators/finally_with_return.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Use of finally in generator with return
+--FILE--
+<?php
+
+function gen() {
+ try {
+ try {
+ echo "before return\n";
+ return;
+ echo "after return\n";
+ } finally {
+ echo "before return in inner finally\n";
+ return;
+ echo "after return in inner finally\n";
+ }
+ } finally {
+ echo "outer finally run\n";
+ }
+
+ echo "code after finally\n";
+
+ yield; // force generator
+}
+
+$gen = gen();
+$gen->rewind(); // force run
+
+?>
+--EXPECTF--
+before return
+before return in inner finally
+outer finally run
diff --git a/Zend/tests/generators/func_get_args.phpt b/Zend/tests/generators/func_get_args.phpt
new file mode 100644
index 000000000..f8d3fa7c1
--- /dev/null
+++ b/Zend/tests/generators/func_get_args.phpt
@@ -0,0 +1,21 @@
+--TEST--
+func_get_args() can be used inside generator functions
+--FILE--
+<?php
+
+function gen() {
+ var_dump(func_get_args());
+ yield; // trigger generator
+}
+
+$gen = gen("foo", "bar");
+$gen->rewind();
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(3) "bar"
+}
diff --git a/Zend/tests/generators/generator_closure.phpt b/Zend/tests/generators/generator_closure.phpt
new file mode 100644
index 000000000..bf8006601
--- /dev/null
+++ b/Zend/tests/generators/generator_closure.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Closures can be generators
+--FILE--
+<?php
+
+$genFactory = function() {
+ yield 1;
+ yield 2;
+ yield 3;
+};
+
+foreach ($genFactory() as $value) {
+ var_dump($value);
+}
+
+?>
+--EXPECT--
+int(1)
+int(2)
+int(3)
diff --git a/Zend/tests/generators/generator_closure_with_this.phpt b/Zend/tests/generators/generator_closure_with_this.phpt
new file mode 100644
index 000000000..d5a4861e8
--- /dev/null
+++ b/Zend/tests/generators/generator_closure_with_this.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Non-static closures can be generators
+--FILE--
+<?php
+
+class Test {
+ public function getGenFactory() {
+ return function() {
+ yield $this;
+ };
+ }
+}
+
+$genFactory = (new Test)->getGenFactory();
+var_dump($genFactory()->current());
+
+?>
+--EXPECT--
+object(Test)#1 (0) {
+}
diff --git a/Zend/tests/generators/generator_in_multipleiterator.phpt b/Zend/tests/generators/generator_in_multipleiterator.phpt
new file mode 100644
index 000000000..611dbc965
--- /dev/null
+++ b/Zend/tests/generators/generator_in_multipleiterator.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Generators work properly in MultipleIterator
+--FILE--
+<?php
+
+function gen1() {
+ yield 'a';
+ yield 'aa';
+}
+
+function gen2() {
+ yield 'b';
+ yield 'bb';
+}
+
+$it = new MultipleIterator;
+$it->attachIterator(gen1());
+$it->attachIterator(gen2());
+
+foreach ($it as $values) {
+ var_dump($values);
+}
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+}
+array(2) {
+ [0]=>
+ string(2) "aa"
+ [1]=>
+ string(2) "bb"
+}
diff --git a/Zend/tests/generators/generator_method.phpt b/Zend/tests/generators/generator_method.phpt
new file mode 100644
index 000000000..b8196c171
--- /dev/null
+++ b/Zend/tests/generators/generator_method.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Methods can be generators
+--FILE--
+<?php
+
+class Test implements IteratorAggregate {
+ protected $data;
+
+ public function __construct(array $data) {
+ $this->data = $data;
+ }
+
+ public function getIterator() {
+ foreach ($this->data as $value) {
+ yield $value;
+ }
+ }
+}
+
+$test = new Test(['foo', 'bar', 'baz']);
+foreach ($test as $value) {
+ var_dump($value);
+}
+
+?>
+--EXPECT--
+string(3) "foo"
+string(3) "bar"
+string(3) "baz"
diff --git a/Zend/tests/generators/generator_method_by_ref.phpt b/Zend/tests/generators/generator_method_by_ref.phpt
new file mode 100644
index 000000000..cfe52fe67
--- /dev/null
+++ b/Zend/tests/generators/generator_method_by_ref.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Generator methods can yield by reference
+--FILE--
+<?php
+
+class Test implements IteratorAggregate {
+ protected $data;
+
+ public function __construct(array $data) {
+ $this->data = $data;
+ }
+
+ public function getData() {
+ return $this->data;
+ }
+
+ public function &getIterator() {
+ foreach ($this->data as $key => &$value) {
+ yield $key => $value;
+ }
+ }
+}
+
+$test = new Test([1, 2, 3, 4, 5]);
+foreach ($test as &$value) {
+ $value *= -1;
+}
+
+var_dump($test->getData());
+
+?>
+--EXPECT--
+array(5) {
+ [0]=>
+ int(-1)
+ [1]=>
+ int(-2)
+ [2]=>
+ int(-3)
+ [3]=>
+ int(-4)
+ [4]=>
+ &int(-5)
+}
diff --git a/Zend/tests/generators/generator_returns_generator.phpt b/Zend/tests/generators/generator_returns_generator.phpt
new file mode 100644
index 000000000..ad332a3be
--- /dev/null
+++ b/Zend/tests/generators/generator_returns_generator.phpt
@@ -0,0 +1,18 @@
+--TEST--
+A generator function returns a Generator object
+--FILE--
+<?php
+
+function gen() {
+ // execution is suspended here, so the following never gets run:
+ echo "Foo";
+ // trigger a generator
+ yield;
+}
+
+$generator = gen();
+var_dump($generator instanceof Generator);
+
+?>
+--EXPECT--
+bool(true)
diff --git a/Zend/tests/generators/generator_rewind.phpt b/Zend/tests/generators/generator_rewind.phpt
new file mode 100644
index 000000000..c4b5bbbdf
--- /dev/null
+++ b/Zend/tests/generators/generator_rewind.phpt
@@ -0,0 +1,62 @@
+--TEST--
+A generator can only be rewinded before or at the first yield
+--FILE--
+<?php
+
+function gen() {
+ echo "before yield\n";
+ yield;
+ echo "after yield\n";
+ yield;
+}
+
+$gen = gen();
+$gen->rewind();
+$gen->rewind();
+$gen->next();
+
+try {
+ $gen->rewind();
+} catch (Exception $e) {
+ echo "\n", $e, "\n\n";
+}
+
+function &gen2() {
+ $foo = 'bar';
+ yield $foo;
+ yield $foo;
+}
+
+$gen = gen2();
+foreach ($gen as $v) { }
+try {
+ foreach ($gen as $v) { }
+} catch (Exception $e) {
+ echo $e, "\n\n";
+}
+
+function gen3() {
+ echo "in generator\n";
+
+ if (false) yield;
+}
+
+$gen = gen3();
+$gen->rewind();
+
+?>
+--EXPECTF--
+before yield
+after yield
+
+exception 'Exception' with message 'Cannot rewind a generator that was already run' in %s:%d
+Stack trace:
+#0 %s(%d): Generator->rewind()
+#1 {main}
+
+exception 'Exception' with message 'Cannot traverse an already closed generator' in %s:%d
+Stack trace:
+#0 %s(%d): unknown()
+#1 {main}
+
+in generator
diff --git a/Zend/tests/generators/generator_send.phpt b/Zend/tests/generators/generator_send.phpt
new file mode 100644
index 000000000..074d81538
--- /dev/null
+++ b/Zend/tests/generators/generator_send.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Values can be sent back to the generator
+--FILE--
+<?php
+
+function gen() {
+ var_dump(yield "yield foo");
+ var_dump(yield "yield bar");
+}
+
+$gen = gen();
+var_dump($gen->current());
+$gen->send("send bar");
+var_dump($gen->current());
+$gen->send("send foo");
+
+?>
+--EXPECT--
+string(9) "yield foo"
+string(8) "send bar"
+string(9) "yield bar"
+string(8) "send foo"
diff --git a/Zend/tests/generators/generator_static_method.phpt b/Zend/tests/generators/generator_static_method.phpt
new file mode 100644
index 000000000..cd9b450a7
--- /dev/null
+++ b/Zend/tests/generators/generator_static_method.phpt
@@ -0,0 +1,29 @@
+--TEST--
+A static method can be a generator
+--FILE--
+<?php
+
+class Test {
+ public static function gen() {
+ var_dump(get_class());
+ var_dump(get_called_class());
+ yield 1;
+ yield 2;
+ yield 3;
+ }
+}
+
+class ExtendedTest extends Test {
+}
+
+foreach (ExtendedTest::gen() as $i) {
+ var_dump($i);
+}
+
+?>
+--EXPECT--
+string(4) "Test"
+string(12) "ExtendedTest"
+int(1)
+int(2)
+int(3)
diff --git a/Zend/tests/generators/generator_throwing_during_function_call.phpt b/Zend/tests/generators/generator_throwing_during_function_call.phpt
new file mode 100644
index 000000000..bd0d2448b
--- /dev/null
+++ b/Zend/tests/generators/generator_throwing_during_function_call.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Stack is cleaned up properly when an exception is thrown during a function call
+--FILE--
+<?php
+
+function throwException() {
+ throw new Exception('test');
+}
+
+function gen() {
+ yield 'foo';
+ strlen("foo", "bar", throwException());
+ yield 'bar';
+}
+
+$gen = gen();
+
+var_dump($gen->current());
+
+try {
+ $gen->next();
+} catch (Exception $e) {
+ echo 'Caught exception with message "', $e->getMessage(), '"', "\n";
+}
+
+var_dump($gen->current());
+
+?>
+--EXPECT--
+string(3) "foo"
+Caught exception with message "test"
+NULL
diff --git a/Zend/tests/generators/generator_throwing_exception.phpt b/Zend/tests/generators/generator_throwing_exception.phpt
new file mode 100644
index 000000000..f537c3fc7
--- /dev/null
+++ b/Zend/tests/generators/generator_throwing_exception.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Generators can throw exceptions
+--FILE--
+<?php
+
+function gen() {
+ yield 'foo';
+ throw new Exception('test');
+ yield 'bar';
+}
+
+$gen = gen();
+
+var_dump($gen->current());
+
+try {
+ $gen->next();
+} catch (Exception $e) {
+ echo 'Caught exception with message "', $e->getMessage(), '"', "\n";
+}
+
+var_dump($gen->current());
+
+?>
+--EXPECT--
+string(3) "foo"
+Caught exception with message "test"
+NULL
diff --git a/Zend/tests/generators/generator_throwing_in_foreach.phpt b/Zend/tests/generators/generator_throwing_in_foreach.phpt
new file mode 100644
index 000000000..dbf20c2ca
--- /dev/null
+++ b/Zend/tests/generators/generator_throwing_in_foreach.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Exceptions throwing by generators during foreach iteration are properly handled
+--FILE--
+<?php
+
+function gen() {
+ throw new Exception("foo");
+ yield; // force generator
+}
+
+foreach (gen() as $value) { }
+
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'Exception' with message 'foo' in %s:%d
+Stack trace:
+#0 %s(%d): gen()
+#1 {main}
+ thrown in %s on line %d
+
diff --git a/Zend/tests/generators/generator_with_keys.phpt b/Zend/tests/generators/generator_with_keys.phpt
new file mode 100644
index 000000000..efb377679
--- /dev/null
+++ b/Zend/tests/generators/generator_with_keys.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Generators can also yield keys
+--FILE--
+<?php
+
+function reverse(array $array) {
+ end($array);
+ while (null !== $key = key($array)) {
+ yield $key => current($array);
+ prev($array);
+ }
+}
+
+$array = [
+ 'foo' => 'bar',
+ 'bar' => 'foo',
+];
+
+foreach (reverse($array) as $key => $value) {
+ echo $key, ' => ', $value, "\n";
+}
+
+?>
+--EXPECT--
+bar => foo
+foo => bar
diff --git a/Zend/tests/generators/nested_method_calls.phpt b/Zend/tests/generators/nested_method_calls.phpt
new file mode 100644
index 000000000..98aee2e60
--- /dev/null
+++ b/Zend/tests/generators/nested_method_calls.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Yield can be used in nested method calls
+--FILE--
+<?php
+
+class A {
+ function foo() {
+ echo "Called A::foo\n";
+ }
+}
+
+class B {
+ function foo() {
+ echo "Called B::foo\n";
+ }
+}
+
+function gen($obj) {
+ $obj->foo($obj->foo(yield));
+}
+
+$g1 = gen(new A);
+$g1->current();
+
+$g2 = gen(new B);
+$g2->current();
+
+$g1->next();
+
+$g3 = clone $g2;
+unset($g2);
+$g3->next();
+
+?>
+--EXPECT--
+Called A::foo
+Called A::foo
+Called B::foo
+Called B::foo
diff --git a/Zend/tests/generators/no_foreach_var_leaks.phpt b/Zend/tests/generators/no_foreach_var_leaks.phpt
new file mode 100644
index 000000000..62743895e
--- /dev/null
+++ b/Zend/tests/generators/no_foreach_var_leaks.phpt
@@ -0,0 +1,19 @@
+--TEST--
+foreach() (and other) variables aren't leaked on premature close
+--FILE--
+<?php
+
+function gen(array $array) {
+ foreach ($array as $value) {
+ yield $value;
+ }
+}
+
+$gen = gen(['Foo', 'Bar']);
+var_dump($gen->current());
+
+// generator is closed here, without running SWITCH_FREE
+
+?>
+--EXPECT--
+string(3) "Foo"
diff --git a/Zend/tests/generators/send_after_close.phpt b/Zend/tests/generators/send_after_close.phpt
new file mode 100644
index 000000000..806baf8ce
--- /dev/null
+++ b/Zend/tests/generators/send_after_close.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Calls to send() after close should do nothing
+--FILE--
+<?php
+
+function gen() { var_dump(yield); }
+
+$gen = gen();
+$gen->send('foo');
+$gen->send('bar');
+
+?>
+--EXPECT--
+string(3) "foo"
diff --git a/Zend/tests/generators/send_returns_current.phpt b/Zend/tests/generators/send_returns_current.phpt
new file mode 100644
index 000000000..27ba74bc1
--- /dev/null
+++ b/Zend/tests/generators/send_returns_current.phpt
@@ -0,0 +1,20 @@
+--TEST--
+$generator->send() returns the yielded value
+--FILE--
+<?php
+
+function reverseEchoGenerator() {
+ $data = yield;
+ while (true) {
+ $data = (yield strrev($data));
+ }
+}
+
+$gen = reverseEchoGenerator();
+var_dump($gen->send('foo'));
+var_dump($gen->send('bar'));
+
+?>
+--EXPECT--
+string(3) "oof"
+string(3) "rab"
diff --git a/Zend/tests/generators/unused_return_value.phpt b/Zend/tests/generators/unused_return_value.phpt
new file mode 100644
index 000000000..ddce64542
--- /dev/null
+++ b/Zend/tests/generators/unused_return_value.phpt
@@ -0,0 +1,13 @@
+--TEST--
+There shouldn't be any leaks when the genertor's return value isn't used
+--FILE--
+<?php
+
+function gen($foo) { yield; }
+
+gen('foo'); // return value not used
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/Zend/tests/generators/xrange.phpt b/Zend/tests/generators/xrange.phpt
new file mode 100644
index 000000000..4d8b60fa9
--- /dev/null
+++ b/Zend/tests/generators/xrange.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Simple generator xrange() test
+--FILE--
+<?php
+
+function xrange($start, $end, $step = 1) {
+ for ($i = $start; $i <= $end; $i += $step) {
+ yield $i;
+ }
+}
+
+foreach (xrange(10, 20, 2) as $i) {
+ var_dump($i);
+}
+
+?>
+--EXPECT--
+int(10)
+int(12)
+int(14)
+int(16)
+int(18)
+int(20)
diff --git a/Zend/tests/generators/yield_array_key.phpt b/Zend/tests/generators/yield_array_key.phpt
new file mode 100644
index 000000000..5afba00de
--- /dev/null
+++ b/Zend/tests/generators/yield_array_key.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Array keys can be yielded from generators
+--FILE--
+<?php
+
+function gen() {
+ yield [] => 1;
+}
+
+$gen = gen();
+var_dump($gen->key());
+var_dump($gen->current());
+
+?>
+--EXPECT--
+array(0) {
+}
+int(1)
diff --git a/Zend/tests/generators/yield_array_offset_by_ref.phpt b/Zend/tests/generators/yield_array_offset_by_ref.phpt
new file mode 100644
index 000000000..544108e64
--- /dev/null
+++ b/Zend/tests/generators/yield_array_offset_by_ref.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Array offsets can be yielded by reference
+--FILE--
+<?php
+
+function &gen(array &$array) {
+ yield $array[0];
+}
+
+$array = [1, 2, 3];
+$gen = gen($array);
+foreach ($gen as &$val) {
+ $val *= -1;
+}
+var_dump($array);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ &int(-1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
diff --git a/Zend/tests/generators/yield_by_reference.phpt b/Zend/tests/generators/yield_by_reference.phpt
new file mode 100644
index 000000000..dba0791c0
--- /dev/null
+++ b/Zend/tests/generators/yield_by_reference.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Generators can yield by-reference
+--FILE--
+<?php
+
+function &iter(array &$array) {
+ foreach ($array as $key => &$value) {
+ yield $key => $value;
+ }
+}
+
+$array = [1, 2, 3];
+$iter = iter($array);
+foreach ($iter as &$value) {
+ $value *= -1;
+}
+var_dump($array);
+
+$array = [1, 2, 3];
+foreach (iter($array) as &$value) {
+ $value *= -1;
+}
+var_dump($array);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(-1)
+ [1]=>
+ int(-2)
+ [2]=>
+ &int(-3)
+}
+array(3) {
+ [0]=>
+ int(-1)
+ [1]=>
+ int(-2)
+ [2]=>
+ &int(-3)
+}
diff --git a/Zend/tests/generators/yield_during_function_call.phpt b/Zend/tests/generators/yield_during_function_call.phpt
new file mode 100644
index 000000000..21071f9fb
--- /dev/null
+++ b/Zend/tests/generators/yield_during_function_call.phpt
@@ -0,0 +1,15 @@
+--TEST--
+"yield" can occur during a function call
+--FILE--
+<?php
+
+function gen() {
+ var_dump(str_repeat("x", yield));
+}
+
+$gen = gen();
+$gen->send(10);
+
+?>
+--EXPECT--
+string(10) "xxxxxxxxxx"
diff --git a/Zend/tests/generators/yield_during_method_call.phpt b/Zend/tests/generators/yield_during_method_call.phpt
new file mode 100644
index 000000000..5fbe84fff
--- /dev/null
+++ b/Zend/tests/generators/yield_during_method_call.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Yield can be used during a method call
+--FILE--
+<?php
+
+class A {
+ public function b($c) {
+ echo $c, "\n";
+ }
+}
+
+function gen() {
+ $a = new A;
+ $a->b(yield);
+}
+
+$gen = gen();
+$gen->send('foo');
+
+// test resource cleanup
+$gen = gen();
+$gen->rewind();
+unset($gen);
+
+// test cloning
+$g1 = gen();
+$g1->rewind();
+$g2 = clone $g1;
+unset($g1);
+$g2->send('bar');
+
+?>
+--EXPECT--
+foo
+bar
diff --git a/Zend/tests/generators/yield_in_finally.phpt b/Zend/tests/generators/yield_in_finally.phpt
new file mode 100644
index 000000000..805484ad1
--- /dev/null
+++ b/Zend/tests/generators/yield_in_finally.phpt
@@ -0,0 +1,29 @@
+--TEST--
+yield can be used in finally (apart from forced closes)
+--FILE--
+<?php
+
+function gen() {
+ try {
+ echo "before return\n";
+ return;
+ echo "after return\n";
+ } finally {
+ echo "before yield\n";
+ yield "yielded value";
+ echo "after yield\n";
+ }
+
+ echo "after finally\n";
+}
+
+$gen = gen();
+var_dump($gen->current());
+$gen->next();
+
+?>
+--EXPECTF--
+before return
+before yield
+string(%d) "yielded value"
+after yield
diff --git a/Zend/tests/generators/yield_in_parenthesis.phpt b/Zend/tests/generators/yield_in_parenthesis.phpt
new file mode 100644
index 000000000..4a603f4cc
--- /dev/null
+++ b/Zend/tests/generators/yield_in_parenthesis.phpt
@@ -0,0 +1,23 @@
+--TEST--
+No additional parenthesis are required around yield if they are already present
+--FILE--
+<?php
+
+function gen() {
+ if (yield $foo); elseif (yield $foo);
+ if (yield $foo): elseif (yield $foo): endif;
+ while (yield $foo);
+ do {} while (yield $foo);
+ switch (yield $foo) {}
+ (yield $foo);
+ die(yield $foo);
+ func(yield $foo);
+ $foo->func(yield $foo);
+ new Foo(yield $foo);
+}
+
+echo "Done";
+
+?>
+--EXPECT--
+Done
diff --git a/Zend/tests/generators/yield_ref_function_call_by_reference.phpt b/Zend/tests/generators/yield_ref_function_call_by_reference.phpt
new file mode 100644
index 000000000..e371affd9
--- /dev/null
+++ b/Zend/tests/generators/yield_ref_function_call_by_reference.phpt
@@ -0,0 +1,24 @@
+--TEST--
+The result of a by-ref function call can be yielded just fine
+--FILE--
+<?php
+
+function &nop(&$var) {
+ return $var;
+}
+
+function &gen(&$var) {
+ yield nop($var);
+}
+
+$var = "foo";
+$gen = gen($var);
+foreach ($gen as &$varRef) {
+ $varRef = "bar";
+}
+
+var_dump($var);
+
+?>
+--EXPECT--
+string(3) "bar"
diff --git a/Zend/tests/generators/yield_without_value.phpt b/Zend/tests/generators/yield_without_value.phpt
new file mode 100644
index 000000000..510c755bd
--- /dev/null
+++ b/Zend/tests/generators/yield_without_value.phpt
@@ -0,0 +1,27 @@
+--TEST--
+yield can be used without a value
+--FILE--
+<?php
+
+function recv() {
+ while (true) {
+ var_dump(yield);
+ }
+}
+
+$reciever = recv();
+var_dump($reciever->current());
+$reciever->send(1);
+var_dump($reciever->current());
+$reciever->send(2);
+var_dump($reciever->current());
+$reciever->send(3);
+
+?>
+--EXPECT--
+NULL
+int(1)
+NULL
+int(2)
+NULL
+int(3)
diff --git a/Zend/tests/instanceof.phpt b/Zend/tests/instanceof.phpt
index 8bcbede99..8bcbede99 100755..100644
--- a/Zend/tests/instanceof.phpt
+++ b/Zend/tests/instanceof.phpt
diff --git a/Zend/tests/is_a.phpt b/Zend/tests/is_a.phpt
index 0a01eb756..0a01eb756 100755..100644
--- a/Zend/tests/is_a.phpt
+++ b/Zend/tests/is_a.phpt
diff --git a/Zend/tests/isset_expr_error.phpt b/Zend/tests/isset_expr_error.phpt
new file mode 100644
index 000000000..27fc6cd8d
--- /dev/null
+++ b/Zend/tests/isset_expr_error.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Error message for isset(func())
+--FILE--
+<?php
+isset(1 + 1);
+?>
+--EXPECTF--
+Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in %s on line %d
diff --git a/Zend/tests/isset_func_error.phpt b/Zend/tests/isset_func_error.phpt
new file mode 100644
index 000000000..7d1036def
--- /dev/null
+++ b/Zend/tests/isset_func_error.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Error message for isset(func())
+--FILE--
+<?php
+isset(abc());
+?>
+--EXPECTF--
+Fatal error: Cannot use isset() on the result of a function call (you can use "null !== func()" instead) in %s on line %d
diff --git a/Zend/tests/jump01.phpt b/Zend/tests/jump01.phpt
index 87dba88ba..87dba88ba 100755..100644
--- a/Zend/tests/jump01.phpt
+++ b/Zend/tests/jump01.phpt
diff --git a/Zend/tests/jump02.phpt b/Zend/tests/jump02.phpt
index ff83bc4b9..ff83bc4b9 100755..100644
--- a/Zend/tests/jump02.phpt
+++ b/Zend/tests/jump02.phpt
diff --git a/Zend/tests/jump03.phpt b/Zend/tests/jump03.phpt
index 2399f30ad..2399f30ad 100755..100644
--- a/Zend/tests/jump03.phpt
+++ b/Zend/tests/jump03.phpt
diff --git a/Zend/tests/jump04.phpt b/Zend/tests/jump04.phpt
index 2bbf1f5c0..2bbf1f5c0 100755..100644
--- a/Zend/tests/jump04.phpt
+++ b/Zend/tests/jump04.phpt
diff --git a/Zend/tests/jump05.phpt b/Zend/tests/jump05.phpt
index 2e5e50c06..2e5e50c06 100755..100644
--- a/Zend/tests/jump05.phpt
+++ b/Zend/tests/jump05.phpt
diff --git a/Zend/tests/jump06.phpt b/Zend/tests/jump06.phpt
index ef01b0e5b..ef01b0e5b 100755..100644
--- a/Zend/tests/jump06.phpt
+++ b/Zend/tests/jump06.phpt
diff --git a/Zend/tests/jump07.phpt b/Zend/tests/jump07.phpt
index c0cb112a7..c0cb112a7 100755..100644
--- a/Zend/tests/jump07.phpt
+++ b/Zend/tests/jump07.phpt
diff --git a/Zend/tests/jump08.phpt b/Zend/tests/jump08.phpt
index 25a211c8c..25a211c8c 100755..100644
--- a/Zend/tests/jump08.phpt
+++ b/Zend/tests/jump08.phpt
diff --git a/Zend/tests/jump09.phpt b/Zend/tests/jump09.phpt
index 52a14b7d5..52a14b7d5 100755..100644
--- a/Zend/tests/jump09.phpt
+++ b/Zend/tests/jump09.phpt
diff --git a/Zend/tests/jump10.phpt b/Zend/tests/jump10.phpt
index 67206a29a..67206a29a 100755..100644
--- a/Zend/tests/jump10.phpt
+++ b/Zend/tests/jump10.phpt
diff --git a/Zend/tests/lsb_018.phpt b/Zend/tests/lsb_018.phpt
index c7877cddf..c7877cddf 100755..100644
--- a/Zend/tests/lsb_018.phpt
+++ b/Zend/tests/lsb_018.phpt
diff --git a/Zend/tests/lsb_022.phpt b/Zend/tests/lsb_022.phpt
index 016fde83c..016fde83c 100755..100644
--- a/Zend/tests/lsb_022.phpt
+++ b/Zend/tests/lsb_022.phpt
diff --git a/Zend/tests/multibyte/multibyte_encoding_001.phpt b/Zend/tests/multibyte/multibyte_encoding_001.phpt
index 38aa80a40..38aa80a40 100755..100644
--- a/Zend/tests/multibyte/multibyte_encoding_001.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_001.phpt
diff --git a/Zend/tests/multibyte/multibyte_encoding_002.phpt b/Zend/tests/multibyte/multibyte_encoding_002.phpt
index 6e1ad80c9..6e1ad80c9 100755..100644
--- a/Zend/tests/multibyte/multibyte_encoding_002.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_002.phpt
diff --git a/Zend/tests/multibyte/multibyte_encoding_003.phpt b/Zend/tests/multibyte/multibyte_encoding_003.phpt
index 0f873dd07..0f873dd07 100755..100644
--- a/Zend/tests/multibyte/multibyte_encoding_003.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_003.phpt
Binary files differ
diff --git a/Zend/tests/ns_001.phpt b/Zend/tests/ns_001.phpt
index 67715947a..67715947a 100755..100644
--- a/Zend/tests/ns_001.phpt
+++ b/Zend/tests/ns_001.phpt
diff --git a/Zend/tests/ns_002.phpt b/Zend/tests/ns_002.phpt
index 3d9e09869..3d9e09869 100755..100644
--- a/Zend/tests/ns_002.phpt
+++ b/Zend/tests/ns_002.phpt
diff --git a/Zend/tests/ns_003.phpt b/Zend/tests/ns_003.phpt
index 4372722c2..4372722c2 100755..100644
--- a/Zend/tests/ns_003.phpt
+++ b/Zend/tests/ns_003.phpt
diff --git a/Zend/tests/ns_004.phpt b/Zend/tests/ns_004.phpt
index d293f65dc..d293f65dc 100755..100644
--- a/Zend/tests/ns_004.phpt
+++ b/Zend/tests/ns_004.phpt
diff --git a/Zend/tests/ns_005.phpt b/Zend/tests/ns_005.phpt
index c082afc48..c082afc48 100755..100644
--- a/Zend/tests/ns_005.phpt
+++ b/Zend/tests/ns_005.phpt
diff --git a/Zend/tests/ns_006.phpt b/Zend/tests/ns_006.phpt
index 1c0ec3ab0..1c0ec3ab0 100755..100644
--- a/Zend/tests/ns_006.phpt
+++ b/Zend/tests/ns_006.phpt
diff --git a/Zend/tests/ns_007.phpt b/Zend/tests/ns_007.phpt
index 2f4d1361d..2f4d1361d 100755..100644
--- a/Zend/tests/ns_007.phpt
+++ b/Zend/tests/ns_007.phpt
diff --git a/Zend/tests/ns_008.phpt b/Zend/tests/ns_008.phpt
index 2c2c9180c..2c2c9180c 100755..100644
--- a/Zend/tests/ns_008.phpt
+++ b/Zend/tests/ns_008.phpt
diff --git a/Zend/tests/ns_009.phpt b/Zend/tests/ns_009.phpt
index 3481316f2..3481316f2 100755..100644
--- a/Zend/tests/ns_009.phpt
+++ b/Zend/tests/ns_009.phpt
diff --git a/Zend/tests/ns_010.phpt b/Zend/tests/ns_010.phpt
index 28ef61bcd..28ef61bcd 100755..100644
--- a/Zend/tests/ns_010.phpt
+++ b/Zend/tests/ns_010.phpt
diff --git a/Zend/tests/ns_011.phpt b/Zend/tests/ns_011.phpt
index 1706f2a00..1706f2a00 100755..100644
--- a/Zend/tests/ns_011.phpt
+++ b/Zend/tests/ns_011.phpt
diff --git a/Zend/tests/ns_012.phpt b/Zend/tests/ns_012.phpt
index 034f12492..034f12492 100755..100644
--- a/Zend/tests/ns_012.phpt
+++ b/Zend/tests/ns_012.phpt
diff --git a/Zend/tests/ns_013.phpt b/Zend/tests/ns_013.phpt
index ef73b1395..ef73b1395 100755..100644
--- a/Zend/tests/ns_013.phpt
+++ b/Zend/tests/ns_013.phpt
diff --git a/Zend/tests/ns_014.phpt b/Zend/tests/ns_014.phpt
index 6bcab51c8..6bcab51c8 100755..100644
--- a/Zend/tests/ns_014.phpt
+++ b/Zend/tests/ns_014.phpt
diff --git a/Zend/tests/ns_015.phpt b/Zend/tests/ns_015.phpt
index ae2c81834..ae2c81834 100755..100644
--- a/Zend/tests/ns_015.phpt
+++ b/Zend/tests/ns_015.phpt
diff --git a/Zend/tests/ns_016.phpt b/Zend/tests/ns_016.phpt
index bee8b5bee..bee8b5bee 100755..100644
--- a/Zend/tests/ns_016.phpt
+++ b/Zend/tests/ns_016.phpt
diff --git a/Zend/tests/ns_017.phpt b/Zend/tests/ns_017.phpt
index 888d8e5ef..888d8e5ef 100755..100644
--- a/Zend/tests/ns_017.phpt
+++ b/Zend/tests/ns_017.phpt
diff --git a/Zend/tests/ns_018.phpt b/Zend/tests/ns_018.phpt
index 5c2495c63..5c2495c63 100755..100644
--- a/Zend/tests/ns_018.phpt
+++ b/Zend/tests/ns_018.phpt
diff --git a/Zend/tests/ns_019.phpt b/Zend/tests/ns_019.phpt
index c3db78686..c3db78686 100755..100644
--- a/Zend/tests/ns_019.phpt
+++ b/Zend/tests/ns_019.phpt
diff --git a/Zend/tests/ns_020.phpt b/Zend/tests/ns_020.phpt
index ec4fda029..ec4fda029 100755..100644
--- a/Zend/tests/ns_020.phpt
+++ b/Zend/tests/ns_020.phpt
diff --git a/Zend/tests/ns_021.phpt b/Zend/tests/ns_021.phpt
index 405468399..405468399 100755..100644
--- a/Zend/tests/ns_021.phpt
+++ b/Zend/tests/ns_021.phpt
diff --git a/Zend/tests/ns_022.inc b/Zend/tests/ns_022.inc
index be571fc34..be571fc34 100755..100644
--- a/Zend/tests/ns_022.inc
+++ b/Zend/tests/ns_022.inc
diff --git a/Zend/tests/ns_022.phpt b/Zend/tests/ns_022.phpt
index 7aebe1d5a..7aebe1d5a 100755..100644
--- a/Zend/tests/ns_022.phpt
+++ b/Zend/tests/ns_022.phpt
diff --git a/Zend/tests/ns_023.phpt b/Zend/tests/ns_023.phpt
index 34fbb56f2..34fbb56f2 100755..100644
--- a/Zend/tests/ns_023.phpt
+++ b/Zend/tests/ns_023.phpt
diff --git a/Zend/tests/ns_024.phpt b/Zend/tests/ns_024.phpt
index 019a89c47..019a89c47 100755..100644
--- a/Zend/tests/ns_024.phpt
+++ b/Zend/tests/ns_024.phpt
diff --git a/Zend/tests/ns_025.phpt b/Zend/tests/ns_025.phpt
index 917a710d9..917a710d9 100755..100644
--- a/Zend/tests/ns_025.phpt
+++ b/Zend/tests/ns_025.phpt
diff --git a/Zend/tests/ns_026.phpt b/Zend/tests/ns_026.phpt
index af2bf2ca5..af2bf2ca5 100755..100644
--- a/Zend/tests/ns_026.phpt
+++ b/Zend/tests/ns_026.phpt
diff --git a/Zend/tests/ns_027.inc b/Zend/tests/ns_027.inc
index 382381829..382381829 100755..100644
--- a/Zend/tests/ns_027.inc
+++ b/Zend/tests/ns_027.inc
diff --git a/Zend/tests/ns_027.phpt b/Zend/tests/ns_027.phpt
index 88ef22f93..88ef22f93 100755..100644
--- a/Zend/tests/ns_027.phpt
+++ b/Zend/tests/ns_027.phpt
diff --git a/Zend/tests/ns_028.inc b/Zend/tests/ns_028.inc
index 5bd3ae776..5bd3ae776 100755..100644
--- a/Zend/tests/ns_028.inc
+++ b/Zend/tests/ns_028.inc
diff --git a/Zend/tests/ns_028.phpt b/Zend/tests/ns_028.phpt
index ec23dac81..ec23dac81 100755..100644
--- a/Zend/tests/ns_028.phpt
+++ b/Zend/tests/ns_028.phpt
diff --git a/Zend/tests/ns_029.phpt b/Zend/tests/ns_029.phpt
index f1aa954ae..f1aa954ae 100755..100644
--- a/Zend/tests/ns_029.phpt
+++ b/Zend/tests/ns_029.phpt
diff --git a/Zend/tests/ns_030.phpt b/Zend/tests/ns_030.phpt
index 69724159e..69724159e 100755..100644
--- a/Zend/tests/ns_030.phpt
+++ b/Zend/tests/ns_030.phpt
diff --git a/Zend/tests/ns_031.phpt b/Zend/tests/ns_031.phpt
index 840c08621..840c08621 100755..100644
--- a/Zend/tests/ns_031.phpt
+++ b/Zend/tests/ns_031.phpt
diff --git a/Zend/tests/ns_032.phpt b/Zend/tests/ns_032.phpt
index 5717a3368..5717a3368 100755..100644
--- a/Zend/tests/ns_032.phpt
+++ b/Zend/tests/ns_032.phpt
diff --git a/Zend/tests/ns_033.phpt b/Zend/tests/ns_033.phpt
index dc431d82b..dc431d82b 100755..100644
--- a/Zend/tests/ns_033.phpt
+++ b/Zend/tests/ns_033.phpt
diff --git a/Zend/tests/ns_034.phpt b/Zend/tests/ns_034.phpt
index 76775f118..76775f118 100755..100644
--- a/Zend/tests/ns_034.phpt
+++ b/Zend/tests/ns_034.phpt
diff --git a/Zend/tests/ns_035.phpt b/Zend/tests/ns_035.phpt
index fcc771a74..fcc771a74 100755..100644
--- a/Zend/tests/ns_035.phpt
+++ b/Zend/tests/ns_035.phpt
diff --git a/Zend/tests/ns_036.phpt b/Zend/tests/ns_036.phpt
index 245cf7d5b..245cf7d5b 100755..100644
--- a/Zend/tests/ns_036.phpt
+++ b/Zend/tests/ns_036.phpt
diff --git a/Zend/tests/ns_037.phpt b/Zend/tests/ns_037.phpt
index db0a76e94..db0a76e94 100755..100644
--- a/Zend/tests/ns_037.phpt
+++ b/Zend/tests/ns_037.phpt
diff --git a/Zend/tests/ns_038.phpt b/Zend/tests/ns_038.phpt
index f3a8c8cc6..f3a8c8cc6 100755..100644
--- a/Zend/tests/ns_038.phpt
+++ b/Zend/tests/ns_038.phpt
diff --git a/Zend/tests/ns_054.phpt b/Zend/tests/ns_054.phpt
index 54ab95861..54ab95861 100755..100644
--- a/Zend/tests/ns_054.phpt
+++ b/Zend/tests/ns_054.phpt
diff --git a/Zend/tests/ns_055.phpt b/Zend/tests/ns_055.phpt
index a692e4760..a692e4760 100755..100644
--- a/Zend/tests/ns_055.phpt
+++ b/Zend/tests/ns_055.phpt
diff --git a/Zend/tests/ns_056.phpt b/Zend/tests/ns_056.phpt
index 2390608d4..2390608d4 100755..100644
--- a/Zend/tests/ns_056.phpt
+++ b/Zend/tests/ns_056.phpt
diff --git a/Zend/tests/ns_057.phpt b/Zend/tests/ns_057.phpt
index 13bf3054c..13bf3054c 100755..100644
--- a/Zend/tests/ns_057.phpt
+++ b/Zend/tests/ns_057.phpt
diff --git a/Zend/tests/ns_058.phpt b/Zend/tests/ns_058.phpt
index 7a0cd97d9..7a0cd97d9 100755..100644
--- a/Zend/tests/ns_058.phpt
+++ b/Zend/tests/ns_058.phpt
diff --git a/Zend/tests/ns_059.phpt b/Zend/tests/ns_059.phpt
index ea66037b4..ea66037b4 100755..100644
--- a/Zend/tests/ns_059.phpt
+++ b/Zend/tests/ns_059.phpt
diff --git a/Zend/tests/ns_065.inc b/Zend/tests/ns_065.inc
index 963a74e14..963a74e14 100755..100644
--- a/Zend/tests/ns_065.inc
+++ b/Zend/tests/ns_065.inc
diff --git a/Zend/tests/ns_065.phpt b/Zend/tests/ns_065.phpt
index 40ccd1e15..40ccd1e15 100755..100644
--- a/Zend/tests/ns_065.phpt
+++ b/Zend/tests/ns_065.phpt
diff --git a/Zend/tests/ns_075.phpt b/Zend/tests/ns_075.phpt
index 0156e99eb..0156e99eb 100755..100644
--- a/Zend/tests/ns_075.phpt
+++ b/Zend/tests/ns_075.phpt
diff --git a/Zend/tests/ns_076.phpt b/Zend/tests/ns_076.phpt
index eeda39bd2..eeda39bd2 100755..100644
--- a/Zend/tests/ns_076.phpt
+++ b/Zend/tests/ns_076.phpt
diff --git a/Zend/tests/ns_077_1.phpt b/Zend/tests/ns_077_1.phpt
index 5a9c4b153..5a9c4b153 100755..100644
--- a/Zend/tests/ns_077_1.phpt
+++ b/Zend/tests/ns_077_1.phpt
diff --git a/Zend/tests/ns_077_2.phpt b/Zend/tests/ns_077_2.phpt
index 8c2672185..8c2672185 100755..100644
--- a/Zend/tests/ns_077_2.phpt
+++ b/Zend/tests/ns_077_2.phpt
diff --git a/Zend/tests/ns_077_3.phpt b/Zend/tests/ns_077_3.phpt
index bdeb7924e..bdeb7924e 100755..100644
--- a/Zend/tests/ns_077_3.phpt
+++ b/Zend/tests/ns_077_3.phpt
diff --git a/Zend/tests/ns_077_4.phpt b/Zend/tests/ns_077_4.phpt
index aef91fd3e..aef91fd3e 100755..100644
--- a/Zend/tests/ns_077_4.phpt
+++ b/Zend/tests/ns_077_4.phpt
diff --git a/Zend/tests/ns_077_5.phpt b/Zend/tests/ns_077_5.phpt
index 17afe03f4..17afe03f4 100755..100644
--- a/Zend/tests/ns_077_5.phpt
+++ b/Zend/tests/ns_077_5.phpt
diff --git a/Zend/tests/ns_077_6.phpt b/Zend/tests/ns_077_6.phpt
index 17afe03f4..17afe03f4 100755..100644
--- a/Zend/tests/ns_077_6.phpt
+++ b/Zend/tests/ns_077_6.phpt
diff --git a/Zend/tests/ns_077_7.phpt b/Zend/tests/ns_077_7.phpt
index 9bf5baf05..9bf5baf05 100755..100644
--- a/Zend/tests/ns_077_7.phpt
+++ b/Zend/tests/ns_077_7.phpt
diff --git a/Zend/tests/ns_077_8.phpt b/Zend/tests/ns_077_8.phpt
index 9f9240db0..9f9240db0 100755..100644
--- a/Zend/tests/ns_077_8.phpt
+++ b/Zend/tests/ns_077_8.phpt
diff --git a/Zend/tests/ns_078.phpt b/Zend/tests/ns_078.phpt
index ed6770ff4..ed6770ff4 100755..100644
--- a/Zend/tests/ns_078.phpt
+++ b/Zend/tests/ns_078.phpt
diff --git a/Zend/tests/object_handlers.phpt b/Zend/tests/object_handlers.phpt
index 3e8dfcc53..3e8dfcc53 100755..100644
--- a/Zend/tests/object_handlers.phpt
+++ b/Zend/tests/object_handlers.phpt
diff --git a/Zend/tests/objects_015.phpt b/Zend/tests/objects_015.phpt
index a923ee0c4..a923ee0c4 100755..100644
--- a/Zend/tests/objects_015.phpt
+++ b/Zend/tests/objects_015.phpt
diff --git a/Zend/tests/offset_assign.phpt b/Zend/tests/offset_assign.phpt
index 6a0059109..721516f53 100644
--- a/Zend/tests/offset_assign.phpt
+++ b/Zend/tests/offset_assign.phpt
@@ -3,11 +3,11 @@ Crash on $x['x']['y'] += 1 when $x is string
--FILE--
<?php
$x = "a";
-$x['x']['y'] += 1;
+$x['x']['y'] += 1;
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
Warning: Illegal string offset 'x' in %soffset_assign.php on line %d
Fatal error: Cannot use string offset as an array in %soffset_assign.php on line %d
diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt
index f7cb81bb2..c546b3718 100644
--- a/Zend/tests/offset_string.phpt
+++ b/Zend/tests/offset_string.phpt
@@ -27,7 +27,7 @@ var_dump($str[$arr]);
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
string(1) "i"
Notice: String offset cast occurred in %s on line %d
diff --git a/Zend/tests/selfParent_001.phpt b/Zend/tests/selfParent_001.phpt
index 9d8cd6e22..9d8cd6e22 100755..100644
--- a/Zend/tests/selfParent_001.phpt
+++ b/Zend/tests/selfParent_001.phpt
diff --git a/Zend/tests/selfParent_002.phpt b/Zend/tests/selfParent_002.phpt
index 18a8f09ea..18a8f09ea 100755..100644
--- a/Zend/tests/selfParent_002.phpt
+++ b/Zend/tests/selfParent_002.phpt
diff --git a/Zend/tests/try_catch_finally_001.phpt b/Zend/tests/try_catch_finally_001.phpt
new file mode 100644
index 000000000..3d478f461
--- /dev/null
+++ b/Zend/tests/try_catch_finally_001.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Try catch finally
+--FILE--
+<?php
+
+class AE extends Exception {};
+class BE extends Exception {};
+
+function foo () {
+ try {
+ try {
+ try {
+ throw new Exception("try");
+ } catch (AE $e) {
+ echo "0";
+ die("error");
+ } finally {
+ echo "1";
+ }
+ } finally {
+ echo "2";
+ }
+ } catch (BE $e) {
+ die("error");
+ } catch (Exception $e) {
+ echo "3";
+ } finally {
+ echo "4";
+ }
+ return 1;
+}
+
+var_dump(foo());
+?>
+--EXPECTF--
+1234int(1)
diff --git a/Zend/tests/try_catch_finally_002.phpt b/Zend/tests/try_catch_finally_002.phpt
new file mode 100644
index 000000000..79efcb3de
--- /dev/null
+++ b/Zend/tests/try_catch_finally_002.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Try catch finally catch(multi catch blocks)
+--FILE--
+<?php
+
+class AE extends Exception {};
+class BE extends Exception {};
+
+function foo () {
+ try {
+ try {
+ try {
+ try {
+ echo "1";
+ throw new Exception("try");
+ } catch (AE $e) {
+ die("error");
+ } finally {
+ echo "2";
+ }
+ } finally {
+ echo "3";
+ }
+ } catch (BE $e) {
+ die("error");
+ } finally {
+ echo "4";
+ }
+ } catch (Exception $e) {
+ echo "5";
+ } catch (AE $e) {
+ die("error");
+ } finally {
+ echo "6";
+ }
+ return 7;
+}
+
+var_dump(foo());
+?>
+--EXPECTF--
+123456int(7)
diff --git a/Zend/tests/try_catch_finally_003.phpt b/Zend/tests/try_catch_finally_003.phpt
new file mode 100644
index 000000000..784063b74
--- /dev/null
+++ b/Zend/tests/try_catch_finally_003.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Try catch finally (multi catch blocks with return)
+--FILE--
+<?php
+
+class AE extends Exception {};
+class BE extends Exception {};
+
+function foo () {
+ try {
+ try {
+ try {
+ throw new Exception("try");
+ } catch (AE $e) {
+ die("error");
+ } finally {
+ echo "1";
+ return 1;
+ }
+ } finally {
+ echo "2";
+ return 2;
+ }
+ } catch (BE $e) {
+ die("error");
+ } catch (Exception $e) {
+ echo "3";
+ } finally {
+ echo "4";
+ return 4;
+ }
+ return 5;
+}
+
+var_dump(foo());
+?>
+--EXPECTF--
+1234int(4)
diff --git a/Zend/tests/try_catch_finally_004.phpt b/Zend/tests/try_catch_finally_004.phpt
new file mode 100644
index 000000000..eb8d0966a
--- /dev/null
+++ b/Zend/tests/try_catch_finally_004.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Try catch finally (re-throw exception in catch block)
+--CREDITS--
+adoy
+--FILE--
+<?php
+function dummy($msg) {
+ var_dump($msg);
+}
+try {
+ try {
+ var_dump("try");
+ return;
+ } catch (Exception $e) {
+ dummy("catch");
+ throw $e;
+ } finally {
+ dummy("finally");
+ }
+} catch (Exception $e) {
+ dummy("catch2");
+} finally {
+ dummy("finally2");
+}
+var_dump("end");
+?>
+--EXPECTF--
+string(3) "try"
+string(7) "finally"
+string(8) "finally2"
diff --git a/Zend/tests/try_catch_finally_005.phpt b/Zend/tests/try_catch_finally_005.phpt
new file mode 100644
index 000000000..dafeb6bbe
--- /dev/null
+++ b/Zend/tests/try_catch_finally_005.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Try catch finally (break / cont in try block)
+--CREDITS--
+adoy
+--FILE--
+<?php
+for ($i = 0; $i < 100 ; $i ++) {
+ try {
+ break;
+ } finally {
+ var_dump("break");
+ }
+}
+
+
+for ($i = 0; $i < 2; $i ++) {
+ try {
+ continue;
+ } finally {
+ var_dump("continue1");
+ }
+}
+
+for ($i = 0; $i < 3; $i ++) {
+ try {
+ try {
+ continue;
+ } finally {
+ var_dump("continue2");
+ if ($i == 1) {
+ throw new Exception("continue exception");
+ }
+ }
+ } catch (Exception $e) {
+ var_dump("cactched");
+ } finally {
+ var_dump("finally");
+ }
+}
+
+?>
+--EXPECTF--
+string(5) "break"
+string(9) "continue1"
+string(9) "continue1"
+string(9) "continue2"
+string(7) "finally"
+string(9) "continue2"
+string(8) "cactched"
+string(7) "finally"
+string(9) "continue2"
+string(7) "finally"
diff --git a/Zend/tests/try_catch_finally_006.phpt b/Zend/tests/try_catch_finally_006.phpt
new file mode 100644
index 000000000..dab6af6a5
--- /dev/null
+++ b/Zend/tests/try_catch_finally_006.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Try catch finally (goto in try/catch block)
+--CREDITS--
+adoy
+--FILE--
+<?php
+function foo($ex = NULL) {
+ try {
+ try {
+ goto label;
+ } finally {
+ var_dump("finally1");
+ if ($ex) throw $ex;
+ }
+ } catch (Exception $e) {
+ var_dump("catched");
+ if ($ex) return "return1";
+ } finally {
+ var_dump("finally2");
+ }
+
+label:
+ var_dump("label");
+ return "return2";
+}
+
+var_dump(foo());
+var_dump(foo(new Exception()));
+
+?>
+--EXPECTF--
+string(8) "finally1"
+string(8) "finally2"
+string(5) "label"
+string(7) "return2"
+string(8) "finally1"
+string(7) "catched"
+string(8) "finally2"
+string(7) "return1"
diff --git a/Zend/tests/try_catch_finally_007.phpt b/Zend/tests/try_catch_finally_007.phpt
new file mode 100644
index 000000000..ad33c6813
--- /dev/null
+++ b/Zend/tests/try_catch_finally_007.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Try catch finally (goto in try/catch block)
+--CREDITS--
+adoy
+--FILE--
+<?php
+function foo($ret = FALSE) {
+ try {
+ try {
+ do {
+ goto label;
+ } while(0);
+ foreach (array() as $val) {
+ continue;
+ }
+ } finally {
+ var_dump("finally1");
+ throw new Exception("exception");
+ }
+ } catch (Exception $e) {
+ goto local;
+local:
+ var_dump("catched");
+ if ($ret) return "return";
+ } finally {
+ var_dump("finally2");
+ }
+
+label:
+ var_dump("label");
+}
+
+var_dump(foo());
+var_dump(foo(true));
+
+?>
+--EXPECTF--
+string(8) "finally1"
+string(7) "catched"
+string(8) "finally2"
+string(5) "label"
+NULL
+string(8) "finally1"
+string(7) "catched"
+string(8) "finally2"
+string(6) "return"
diff --git a/Zend/tests/try_finally_001.phpt b/Zend/tests/try_finally_001.phpt
new file mode 100644
index 000000000..0f740872c
--- /dev/null
+++ b/Zend/tests/try_finally_001.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Try finally (basic test)
+--FILE--
+<?php
+function foo ($a) {
+ try {
+ throw new Exception("ex");
+ } finally {
+ var_dump($a);
+ }
+}
+
+foo("finally");
+?>
+--EXPECTF--
+string(7) "finally"
+
+Fatal error: Uncaught exception 'Exception' with message 'ex' %s
+Stack trace:
+#0 %stry_finally_001.php(%d): foo('finally')
+#1 {main}
+ thrown in %stry_finally_001.php on line %d
diff --git a/Zend/tests/try_finally_002.phpt b/Zend/tests/try_finally_002.phpt
new file mode 100644
index 000000000..99a34f62f
--- /dev/null
+++ b/Zend/tests/try_finally_002.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Try finally (re-throw exception in finally block)
+--FILE--
+<?php
+function foo () {
+ try {
+ throw new Exception("try");
+ } finally {
+ throw new Exception("finally");
+ }
+}
+
+try {
+ foo();
+} catch (Exception $e) {
+ do {
+ var_dump($e->getMessage());
+ } while ($e = $e->getPrevious());
+}
+?>
+--EXPECT--
+string(7) "finally"
+string(3) "try"
diff --git a/Zend/tests/try_finally_003.phpt b/Zend/tests/try_finally_003.phpt
new file mode 100644
index 000000000..c1294911b
--- /dev/null
+++ b/Zend/tests/try_finally_003.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Try finally (call sequence test)
+--FILE--
+<?php
+function foo () {
+ try {
+ echo "1";
+ try {
+ echo "2";
+ throw new Exception("ex");
+ } finally {
+ echo "3";
+ }
+ } finally {
+ echo "4";
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+1234
+Fatal error: Uncaught exception 'Exception' with message 'ex' %s
+Stack trace:
+#0 %stry_finally_003.php(%d): foo()
+#1 {main}
+ thrown in %stry_finally_003.php on line %d
diff --git a/Zend/tests/try_finally_004.phpt b/Zend/tests/try_finally_004.phpt
new file mode 100644
index 000000000..08930a40c
--- /dev/null
+++ b/Zend/tests/try_finally_004.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Try finally (without catch/finally block)
+--FILE--
+<?php
+function foo () {
+ try {
+ echo "3";
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: Cannot use try without catch or finally in %stry_finally_004.php on line %d
diff --git a/Zend/tests/try_finally_005.phpt b/Zend/tests/try_finally_005.phpt
new file mode 100644
index 000000000..8664d6b1b
--- /dev/null
+++ b/Zend/tests/try_finally_005.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Try finally (with long goto)
+--FILE--
+<?php
+function foo () {
+ try {
+ } finally {
+ goto label;
+ }
+label:
+ return 1;
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_005.php on line %d
diff --git a/Zend/tests/try_finally_006.phpt b/Zend/tests/try_finally_006.phpt
new file mode 100644
index 000000000..f53e6b5bc
--- /dev/null
+++ b/Zend/tests/try_finally_006.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Try finally (with near goto)
+--FILE--
+<?php
+function foo () {
+ $jmp = 1;
+ try {
+ } finally {
+previous:
+ if ($jmp) {
+ goto label;
+ echo "dummy";
+label:
+ echo "label\n";
+ $jmp = 0;
+ goto previous;
+ }
+ echo "okey";
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+label
+okey
diff --git a/Zend/tests/try_finally_007.phpt b/Zend/tests/try_finally_007.phpt
new file mode 100644
index 000000000..634937495
--- /dev/null
+++ b/Zend/tests/try_finally_007.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Try finally (with goto previous label)
+--FILE--
+<?php
+function foo () {
+ try {
+label:
+ echo "label";
+ try {
+ } finally {
+ goto label;
+ echo "dummy";
+ }
+ } catch (Exception $e) {
+ } finally {
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_007.php on line %d
diff --git a/Zend/tests/try_finally_008.phpt b/Zend/tests/try_finally_008.phpt
new file mode 100644
index 000000000..cee37aeda
--- /dev/null
+++ b/Zend/tests/try_finally_008.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Try finally (with break in do...while)
+--FILE--
+<?php
+function foo () {
+ do {
+ try {
+ try {
+ } finally {
+ break;
+ }
+ } catch (Exception $e) {
+ } finally {
+ }
+ } while (0);
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_008.php on line %d
diff --git a/Zend/tests/try_finally_009.phpt b/Zend/tests/try_finally_009.phpt
new file mode 100644
index 000000000..b29930a75
--- /dev/null
+++ b/Zend/tests/try_finally_009.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Try finally (with for continue)
+--FILE--
+<?php
+function foo () {
+ for($i = 0; $i < 5; $i++) {
+ do {
+ try {
+ try {
+ } finally {
+ }
+ } catch (Exception $e) {
+ } finally {
+ continue;
+ }
+ } while (0);
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: jump out of a finally block is disallowed in %stry_finally_009.php on line %d
diff --git a/Zend/tests/unexpected_ref_bug.phpt b/Zend/tests/unexpected_ref_bug.phpt
index 61fe1aa5b..61fe1aa5b 100755..100644
--- a/Zend/tests/unexpected_ref_bug.phpt
+++ b/Zend/tests/unexpected_ref_bug.phpt
diff --git a/Zend/tests/unset_cv12.phpt b/Zend/tests/unset_cv12.phpt
index a22b13dea..a22b13dea 100755..100644
--- a/Zend/tests/unset_cv12.phpt
+++ b/Zend/tests/unset_cv12.phpt
diff --git a/Zend/zend.h b/Zend/zend.h
index 3226f8ce0..d2a4ef695 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -22,7 +22,7 @@
#ifndef ZEND_H
#define ZEND_H
-#define ZEND_VERSION "2.4.0"
+#define ZEND_VERSION "2.5.0-dev"
#define ZEND_ENGINE_2
@@ -133,6 +133,11 @@ char *alloca ();
# endif
#endif
+/* Compatibility with non-clang compilers */
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
/* GCC x.y.z supplies __GNUC__ = x and __GNUC_MINOR__ = y */
#ifdef __GNUC__
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
@@ -146,6 +151,14 @@ char *alloca ();
# define ZEND_ATTRIBUTE_MALLOC
#endif
+#if ZEND_GCC_VERSION >= 4003 || __has_attribute(alloc_size)
+# define ZEND_ATTRIBUTE_ALLOC_SIZE(X) __attribute__ ((alloc_size(X)))
+# define ZEND_ATTRIBUTE_ALLOC_SIZE2(X,Y) __attribute__ ((alloc_size(X,Y)))
+#else
+# define ZEND_ATTRIBUTE_ALLOC_SIZE(X)
+# define ZEND_ATTRIBUTE_ALLOC_SIZE2(X,Y)
+#endif
+
#if ZEND_GCC_VERSION >= 2007
# define ZEND_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first)))
#else
@@ -263,10 +276,10 @@ static const char long_min_digits[] = "9223372036854775808";
#define MAX_LENGTH_OF_DOUBLE 32
-#undef SUCCESS
-#undef FAILURE
-#define SUCCESS 0
-#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
+typedef enum {
+ SUCCESS = 0,
+ FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
+} ZEND_RESULT_CODE;
#include "zend_hash.h"
#include "zend_ts_hash.h"
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 0b0e8632c..155ae88b6 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -658,9 +658,9 @@ static unsigned int _mem_block_end_magic = 0;
#define ZEND_MM_LARGE_BUCKET_INDEX(S) zend_mm_high_bit(S)
-static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE(2);
static void _zend_mm_free_int(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
-static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_ALLOC_SIZE(3);
static inline unsigned int zend_mm_high_bit(size_t _size)
{
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index b8b800e0d..6b071c289 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -54,12 +54,12 @@ BEGIN_EXTERN_C()
ZEND_API char *zend_strndup(const char *s, unsigned int length) ZEND_ATTRIBUTE_MALLOC;
-ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE(1);
ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) ZEND_ATTRIBUTE_MALLOC;
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
-ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
-ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2(1,2);
+ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_ALLOC_SIZE(2);
ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset);
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
diff --git a/Zend/zend_build.h b/Zend/zend_build.h
index 042f50e80..042f50e80 100755..100644
--- a/Zend/zend_build.h
+++ b/Zend/zend_build.h
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index eab98ed94..698ef72e5 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1512,7 +1512,6 @@ ZEND_FUNCTION(trigger_error)
ZEND_FUNCTION(set_error_handler)
{
zval *error_handler;
- zend_bool had_orig_error_handler=0;
char *error_handler_name = NULL;
long error_type = E_ALL;
@@ -1520,38 +1519,31 @@ ZEND_FUNCTION(set_error_handler)
return;
}
- if (!zend_is_callable(error_handler, 0, &error_handler_name TSRMLS_CC)) {
- zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
- get_active_function_name(TSRMLS_C), error_handler_name?error_handler_name:"unknown");
+ if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */
+ if (!zend_is_callable(error_handler, 0, &error_handler_name TSRMLS_CC)) {
+ zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
+ get_active_function_name(TSRMLS_C), error_handler_name?error_handler_name:"unknown");
+ efree(error_handler_name);
+ return;
+ }
efree(error_handler_name);
- return;
}
- efree(error_handler_name);
if (EG(user_error_handler)) {
- had_orig_error_handler = 1;
- *return_value = *EG(user_error_handler);
- zval_copy_ctor(return_value);
- INIT_PZVAL(return_value);
+ RETVAL_ZVAL(EG(user_error_handler), 1, 0);
+
zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting), sizeof(EG(user_error_handler_error_reporting)));
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
}
- ALLOC_ZVAL(EG(user_error_handler));
- if (!zend_is_true(error_handler)) { /* unset user-defined handler */
- FREE_ZVAL(EG(user_error_handler));
+ if (Z_TYPE_P(error_handler) == IS_NULL) { /* unset user-defined handler */
EG(user_error_handler) = NULL;
- RETURN_TRUE;
+ return;
}
+ ALLOC_ZVAL(EG(user_error_handler));
+ MAKE_COPY_ZVAL(&error_handler, EG(user_error_handler));
EG(user_error_handler_error_reporting) = (int)error_type;
- *EG(user_error_handler) = *error_handler;
- zval_copy_ctor(EG(user_error_handler));
- INIT_PZVAL(EG(user_error_handler));
-
- if (!had_orig_error_handler) {
- RETURN_NULL();
- }
}
/* }}} */
@@ -1585,7 +1577,6 @@ ZEND_FUNCTION(set_exception_handler)
{
zval *exception_handler;
char *exception_handler_name = NULL;
- zend_bool had_orig_exception_handler=0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &exception_handler) == FAILURE) {
return;
@@ -1602,24 +1593,18 @@ ZEND_FUNCTION(set_exception_handler)
}
if (EG(user_exception_handler)) {
- had_orig_exception_handler = 1;
- *return_value = *EG(user_exception_handler);
- zval_copy_ctor(return_value);
+ RETVAL_ZVAL(EG(user_exception_handler), 1, 0);
+
zend_ptr_stack_push(&EG(user_exception_handlers), EG(user_exception_handler));
}
- ALLOC_ZVAL(EG(user_exception_handler));
if (Z_TYPE_P(exception_handler) == IS_NULL) { /* unset user-defined handler */
- FREE_ZVAL(EG(user_exception_handler));
EG(user_exception_handler) = NULL;
- RETURN_TRUE;
+ return;
}
+ ALLOC_ZVAL(EG(user_exception_handler));
MAKE_COPY_ZVAL(&exception_handler, EG(user_exception_handler))
-
- if (!had_orig_exception_handler) {
- RETURN_NULL();
- }
}
/* }}} */
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c39d8eaa1..2d2c284b7 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1722,7 +1722,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
}
{
- /* Push a seperator to the switch and foreach stacks */
+ /* Push a seperator to the switch stack */
zend_switch_entry switch_entry;
switch_entry.cond.op_type = IS_UNUSED;
@@ -1730,16 +1730,16 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
switch_entry.control_var = 0;
zend_stack_push(&CG(switch_cond_stack), (void *) &switch_entry, sizeof(switch_entry));
+ }
- {
- /* Foreach stack separator */
- zend_op dummy_opline;
+ {
+ /* Push a separator to the foreach stack */
+ zend_op dummy_opline;
- dummy_opline.result_type = IS_UNUSED;
- dummy_opline.op1_type = IS_UNUSED;
+ dummy_opline.result_type = IS_UNUSED;
+ dummy_opline.op1_type = IS_UNUSED;
- zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op));
- }
+ zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op));
}
if (CG(doc_comment)) {
@@ -2611,9 +2611,12 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) /* {{{ */
{
zend_op *opline;
int start_op_number, end_op_number;
+ zend_bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
+
+ /* The error for use of return inside a generator is thrown in pass_two. */
if (do_end_vparse) {
- if ((CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) && !zend_is_function_or_method_call(expr)) {
+ if (returns_reference && !zend_is_function_or_method_call(expr)) {
zend_do_end_variable_parse(expr, BP_VAR_W, 0 TSRMLS_CC);
} else {
zend_do_end_variable_parse(expr, BP_VAR_R, 0 TSRMLS_CC);
@@ -2638,7 +2641,7 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) /* {{{ */
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) ? ZEND_RETURN_BY_REF : ZEND_RETURN;
+ opline->opcode = returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN;
if (expr) {
SET_NODE(opline->op1, expr);
@@ -2655,12 +2658,58 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) /* {{{ */
}
/* }}} */
+void zend_do_yield(znode *result, znode *value, const znode *key, zend_bool is_variable TSRMLS_DC) /* {{{ */
+{
+ zend_op *opline;
+
+ if (!CG(active_op_array)->function_name) {
+ zend_error(E_COMPILE_ERROR, "The \"yield\" expression can only be used inside a function");
+ }
+
+ CG(active_op_array)->fn_flags |= ZEND_ACC_GENERATOR;
+
+ if (is_variable) {
+ if ((CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) && !zend_is_function_or_method_call(value)) {
+ zend_do_end_variable_parse(value, BP_VAR_W, 0 TSRMLS_CC);
+ } else {
+ zend_do_end_variable_parse(value, BP_VAR_R, 0 TSRMLS_CC);
+ }
+ }
+
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+
+ opline->opcode = ZEND_YIELD;
+
+ if (value) {
+ SET_NODE(opline->op1, value);
+
+ if (is_variable && zend_is_function_or_method_call(value)) {
+ opline->extended_value = ZEND_RETURNS_FUNCTION;
+ }
+ } else {
+ SET_UNUSED(opline->op1);
+ }
+
+ if (key) {
+ SET_NODE(opline->op2, key);
+ } else {
+ SET_UNUSED(opline->op2);
+ }
+
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
+}
+/* }}} */
+
static int zend_add_try_element(zend_uint try_op TSRMLS_DC) /* {{{ */
{
int try_catch_offset = CG(active_op_array)->last_try_catch++;
CG(active_op_array)->try_catch_array = erealloc(CG(active_op_array)->try_catch_array, sizeof(zend_try_catch_element)*CG(active_op_array)->last_try_catch);
CG(active_op_array)->try_catch_array[try_catch_offset].try_op = try_op;
+ CG(active_op_array)->try_catch_array[try_catch_offset].finally_op = 0;
+ CG(active_op_array)->try_catch_array[try_catch_offset].finally_end = 0;
return try_catch_offset;
}
/* }}} */
@@ -2677,7 +2726,7 @@ void zend_do_first_catch(znode *open_parentheses TSRMLS_DC) /* {{{ */
}
/* }}} */
-void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC) /* {{{ */
+void zend_initialize_try_catch_element(znode *catch_token TSRMLS_DC) /* {{{ */
{
int jmp_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@@ -2694,7 +2743,7 @@ void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC) /* {{{
zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr);
zend_llist_add_element(jmp_list_ptr, &jmp_op_number);
- zend_add_catch_element(try_token->u.op.opline_num, get_next_op_number(CG(active_op_array)) TSRMLS_CC);
+ catch_token->EA = get_next_op_number(CG(active_op_array));
}
/* }}} */
@@ -2720,7 +2769,11 @@ void zend_do_try(znode *try_token TSRMLS_DC) /* {{{ */
}
/* }}} */
-void zend_do_begin_catch(znode *try_token, znode *class_name, znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */
+void zend_do_finally(znode *finally_token TSRMLS_DC) /* {{{ */ {
+ finally_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
+} /* }}} */
+
+void zend_do_begin_catch(znode *catch_token, znode *class_name, znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */
{
long catch_op_number;
zend_op *opline;
@@ -2748,11 +2801,11 @@ void zend_do_begin_catch(znode *try_token, znode *class_name, znode *catch_var,
Z_STRVAL(catch_var->u.constant) = (char*)CG(active_op_array)->vars[opline->op2.var].name;
opline->result.num = 0; /* 1 means it's the last catch in the block */
- try_token->u.op.opline_num = catch_op_number;
+ catch_token->u.op.opline_num = catch_op_number;
}
/* }}} */
-void zend_do_end_catch(const znode *try_token TSRMLS_DC) /* {{{ */
+void zend_do_end_catch(znode *catch_token TSRMLS_DC) /* {{{ */
{
int jmp_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@@ -2766,7 +2819,35 @@ void zend_do_end_catch(const znode *try_token TSRMLS_DC) /* {{{ */
zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr);
zend_llist_add_element(jmp_list_ptr, &jmp_op_number);
- CG(active_op_array)->opcodes[try_token->u.op.opline_num].extended_value = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[catch_token->u.op.opline_num].extended_value = get_next_op_number(CG(active_op_array));
+}
+/* }}} */
+
+void zend_do_bind_catch(znode *try_token, znode *catch_token TSRMLS_DC) /* {{{ */ {
+ if (catch_token->op_type != IS_UNUSED) {
+ zend_add_catch_element(try_token->u.op.opline_num, catch_token->EA TSRMLS_CC);
+ }
+}
+/* }}} */
+
+void zend_do_end_finally(znode *try_token, znode* catch_token, znode *finally_token TSRMLS_DC) /* {{{ */
+{
+ if (catch_token->op_type == IS_UNUSED && finally_token->op_type == IS_UNUSED) {
+ zend_error(E_COMPILE_ERROR, "Cannot use try without catch or finally");
+ }
+ if (finally_token->op_type != IS_UNUSED) {
+ zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_op = finally_token->u.op.opline_num;
+ CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].finally_end = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->has_finally_block = 1;
+
+ opline->opcode = ZEND_LEAVE;
+ SET_UNUSED(opline->op1);
+ SET_UNUSED(opline->op2);
+ }
+ if (catch_token->op_type == IS_UNUSED) {
+ CG(active_op_array)->try_catch_array[try_token->u.op.opline_num].catch_op = 0;
+ }
}
/* }}} */
@@ -3885,7 +3966,7 @@ static int zend_traits_copy_functions(zend_function *fn TSRMLS_DC, int num_args,
/* if it is 0, no modifieres has been changed */
if (aliases[i]->modifiers) {
- fn_copy.common.fn_flags = aliases[i]->modifiers;
+ fn_copy.common.fn_flags = aliases[i]->modifiers | ZEND_ACC_ALIAS;
if (!(aliases[i]->modifiers & ZEND_ACC_PPP_MASK)) {
fn_copy.common.fn_flags |= ZEND_ACC_PUBLIC;
}
@@ -3926,7 +4007,7 @@ static int zend_traits_copy_functions(zend_function *fn TSRMLS_DC, int num_args,
&& (!aliases[i]->trait_method->ce || fn->common.scope == aliases[i]->trait_method->ce)
&& (aliases[i]->trait_method->mname_len == fnname_len)
&& (zend_binary_strcasecmp(aliases[i]->trait_method->method_name, aliases[i]->trait_method->mname_len, fn->common.function_name, fnname_len) == 0)) {
- fn_copy.common.fn_flags = aliases[i]->modifiers;
+ fn_copy.common.fn_flags = aliases[i]->modifiers | ZEND_ACC_ALIAS;
if (!(aliases[i]->modifiers & ZEND_ACC_PPP_MASK)) {
fn_copy.common.fn_flags |= ZEND_ACC_PUBLIC;
@@ -3975,8 +4056,10 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
/** Resolve classes for all precedence operations. */
if (cur_precedence->exclude_from_classes) {
cur_method_ref = cur_precedence->trait_method;
- cur_precedence->trait_method->ce = zend_fetch_class(cur_method_ref->class_name,
- cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ if (!(cur_precedence->trait_method->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len,
+ ZEND_FETCH_CLASS_TRAIT|ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC))) {
+ zend_error(E_COMPILE_ERROR, "Could not find trait %s", cur_method_ref->class_name);
+ }
/** Ensure that the prefered method is actually available. */
lcname = zend_str_tolower_dup(cur_method_ref->method_name,
@@ -4003,7 +4086,9 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
char* class_name = (char*)cur_precedence->exclude_from_classes[j];
zend_uint name_length = strlen(class_name);
- cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ if (!(cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT |ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC))) {
+ zend_error(E_COMPILE_ERROR, "Could not find trait %s", class_name);
+ }
/* make sure that the trait method is not from a class mentioned in
exclude_from_classes, for consistency */
@@ -4030,7 +4115,9 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
/** For all aliases with an explicit class name, resolve the class now. */
if (ce->trait_aliases[i]->trait_method->class_name) {
cur_method_ref = ce->trait_aliases[i]->trait_method;
- cur_method_ref->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ if (!(cur_method_ref->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT|ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC))) {
+ zend_error(E_COMPILE_ERROR, "Could not find trait %s", cur_method_ref->class_name);
+ }
/** And, ensure that the referenced method is resolvable, too. */
lcname = zend_str_tolower_dup(cur_method_ref->method_name,
@@ -6099,7 +6186,16 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC
zend_do_end_variable_parse(variable, BP_VAR_IS, 0 TSRMLS_CC);
- zend_check_writable_variable(variable);
+ if (zend_is_function_or_method_call(variable)) {
+ if (type == ZEND_ISEMPTY) {
+ /* empty(func()) can be transformed to !func() */
+ zend_do_unary_op(ZEND_BOOL_NOT, result, variable TSRMLS_CC);
+ } else {
+ zend_error(E_COMPILE_ERROR, "Cannot use isset() on the result of a function call (you can use \"null !== func()\" instead)");
+ }
+
+ return;
+ }
if (variable->op_type == IS_CV) {
last_op = get_next_op(CG(active_op_array) TSRMLS_CC);
@@ -6246,15 +6342,18 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
opline->extended_value |= ZEND_FE_FETCH_WITH_KEY;
}
- if ((key->op_type != IS_UNUSED) && (key->EA & ZEND_PARSED_REFERENCE_VARIABLE)) {
- zend_error(E_COMPILE_ERROR, "Key element cannot be a reference");
+ if ((key->op_type != IS_UNUSED)) {
+ if (key->EA & ZEND_PARSED_REFERENCE_VARIABLE) {
+ zend_error(E_COMPILE_ERROR, "Key element cannot be a reference");
+ }
+ if (key->EA & ZEND_PARSED_LIST_EXPR) {
+ zend_error(E_COMPILE_ERROR, "Cannot use list as key element");
+ }
}
if (value->EA & ZEND_PARSED_REFERENCE_VARIABLE) {
assign_by_ref = 1;
- if (!(opline-1)->extended_value) {
- zend_error(E_COMPILE_ERROR, "Cannot create references to elements of a temporary array expression");
- }
+
/* Mark extended_value for assign-by-reference */
opline->extended_value |= ZEND_FE_FETCH_BYREF;
CG(active_op_array)->opcodes[foreach_token->u.op.opline_num].extended_value |= ZEND_FE_RESET_REFERENCE;
@@ -6283,13 +6382,21 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
GET_NODE(&value_node, opline->result);
- if (assign_by_ref) {
- zend_do_end_variable_parse(value, BP_VAR_W, 0 TSRMLS_CC);
- /* Mark FE_FETCH as IS_VAR as it holds the data directly as a value */
- zend_do_assign_ref(NULL, value, &value_node TSRMLS_CC);
- } else {
- zend_do_assign(&dummy, value, &value_node TSRMLS_CC);
+ if (value->EA & ZEND_PARSED_LIST_EXPR) {
+ if (!CG(list_llist).head) {
+ zend_error(E_COMPILE_ERROR, "Cannot use empty list");
+ }
+ zend_do_list_end(&dummy, &value_node TSRMLS_CC);
zend_do_free(&dummy TSRMLS_CC);
+ } else {
+ if (assign_by_ref) {
+ zend_do_end_variable_parse(value, BP_VAR_W, 0 TSRMLS_CC);
+ /* Mark FE_FETCH as IS_VAR as it holds the data directly as a value */
+ zend_do_assign_ref(NULL, value, &value_node TSRMLS_CC);
+ } else {
+ zend_do_assign(&dummy, value, &value_node TSRMLS_CC);
+ zend_do_free(&dummy TSRMLS_CC);
+ }
}
if (key->op_type != IS_UNUSED) {
@@ -6718,9 +6825,6 @@ again:
case T_OPEN_TAG_WITH_ECHO:
retval = T_ECHO;
break;
- case T_END_HEREDOC:
- efree(Z_STRVAL(zendlval->u.constant));
- break;
}
INIT_PZVAL(&zendlval->u.constant);
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 79ace0c3c..77809dae5 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -80,7 +80,7 @@ typedef union _znode_op {
zend_op *jmp_addr;
zval *zv;
zend_literal *literal;
- void *ptr; /* Used for passing pointers from the compile to execution phase, currently used for traits */
+ void *ptr; /* Used for passing pointers from the compile to execution phase, currently used for traits */
} znode_op;
typedef struct _znode { /* used only during compilation */
@@ -132,6 +132,8 @@ typedef struct _zend_label {
typedef struct _zend_try_catch_element {
zend_uint try_op;
zend_uint catch_op; /* ketchup! */
+ zend_uint finally_op;
+ zend_uint finally_end;
} zend_try_catch_element;
#if SIZEOF_LONG == 8
@@ -194,6 +196,7 @@ typedef struct _zend_try_catch_element {
#define ZEND_ACC_CLOSURE 0x100000
+#define ZEND_ACC_GENERATOR 0x800000
/* function flag for internal user call handlers __call, __callstatic */
#define ZEND_ACC_CALL_VIA_HANDLER 0x200000
@@ -281,6 +284,7 @@ struct _zend_op_array {
zend_try_catch_element *try_catch_array;
int last_try_catch;
+ zend_bool has_finally_block;
/* static variables support */
HashTable *static_variables;
@@ -383,6 +387,8 @@ struct _zend_execute_data {
zend_class_entry *current_called_scope;
zval *current_this;
zval *current_object;
+ zend_uint leaving;
+ zend_uint leaving_dest;
};
#define EX(element) execute_data.element
@@ -491,6 +497,7 @@ void zend_do_build_full_name(znode *result, znode *prefix, znode *name, int is_c
int zend_do_begin_class_member_function_call(znode *class_name, znode *method_name TSRMLS_DC);
void zend_do_end_function_call(znode *function_name, znode *result, const znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC);
void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC);
+void zend_do_yield(znode *result, znode *value, const znode *key, zend_bool is_variable TSRMLS_DC);
void zend_do_handle_exception(TSRMLS_D);
void zend_do_begin_lambda_function_declaration(znode *result, znode *function_token, int return_reference, int is_static TSRMLS_DC);
@@ -498,7 +505,10 @@ void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC);
void zend_do_try(znode *try_token TSRMLS_DC);
void zend_do_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, znode *first_catch TSRMLS_DC);
-void zend_do_end_catch(const znode *try_token TSRMLS_DC);
+void zend_do_bind_catch(znode *try_token, znode *catch_token TSRMLS_DC);
+void zend_do_end_catch(znode *catch_token TSRMLS_DC);
+void zend_do_finally(znode *finally_token TSRMLS_DC);
+void zend_do_end_finally(znode *try_token, znode* catch_token, znode *finally_token TSRMLS_DC);
void zend_do_throw(const znode *expr TSRMLS_DC);
ZEND_API int do_bind_function(const zend_op_array *op_array, zend_op *opline, HashTable *function_table, zend_bool compile_time);
@@ -664,7 +674,7 @@ void print_op_array(zend_op_array *op_array, int optimizations);
ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
void zend_do_first_catch(znode *open_parentheses TSRMLS_DC);
-void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC);
+void zend_initialize_try_catch_element(znode *catch_token TSRMLS_DC);
void zend_do_mark_last_catch(const znode *first_catch, const znode *last_additional_catch TSRMLS_DC);
ZEND_API zend_bool zend_is_compiling(TSRMLS_D);
ZEND_API char *zend_make_compiled_string_description(const char *name TSRMLS_DC);
@@ -720,6 +730,7 @@ int zend_add_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC);
#define ZEND_PARSED_VARIABLE (1<<4)
#define ZEND_PARSED_REFERENCE_VARIABLE (1<<5)
#define ZEND_PARSED_NEW (1<<6)
+#define ZEND_PARSED_LIST_EXPR (1<<7)
/* unset types */
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c
index 73a765811..bcc43ea7d 100644
--- a/Zend/zend_default_classes.c
+++ b/Zend/zend_default_classes.c
@@ -25,6 +25,7 @@
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "zend_closures.h"
+#include "zend_generators.h"
ZEND_API void zend_register_default_classes(TSRMLS_D)
@@ -33,6 +34,7 @@ ZEND_API void zend_register_default_classes(TSRMLS_D)
zend_register_default_exception(TSRMLS_C);
zend_register_iterator_wrapper(TSRMLS_C);
zend_register_closure_ce(TSRMLS_C);
+ zend_register_generator_ce(TSRMLS_C);
}
/*
diff --git a/Zend/zend_dtrace.c b/Zend/zend_dtrace.c
index 5b2d0d2df..3d109deab 100644
--- a/Zend/zend_dtrace.c
+++ b/Zend/zend_dtrace.c
@@ -83,7 +83,7 @@ ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC)
}
}
-ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
+ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, zend_fcall_info *fci, int return_value_used TSRMLS_DC)
{
int lineno;
char *filename;
@@ -96,7 +96,7 @@ ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int r
DTRACE_EXECUTE_ENTRY(filename, lineno);
}
- execute_internal(execute_data_ptr, return_value_used TSRMLS_CC);
+ execute_internal(execute_data_ptr, fci, return_value_used TSRMLS_CC);
if (DTRACE_EXECUTE_RETURN_ENABLED()) {
DTRACE_EXECUTE_RETURN(filename, lineno);
diff --git a/Zend/zend_dtrace.h b/Zend/zend_dtrace.h
index 65d19ef34..49388e562 100644
--- a/Zend/zend_dtrace.h
+++ b/Zend/zend_dtrace.h
@@ -32,11 +32,11 @@ extern "C" {
#ifdef HAVE_DTRACE
ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
ZEND_API void (*zend_dtrace_execute)(zend_op_array *op_array TSRMLS_DC);
-ZEND_API void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+ZEND_API void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data_ptr, zend_fcall_info *fci, int return_value_used TSRMLS_DC);
ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC);
ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC);
-ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, zend_fcall_info *fci, int return_value_used TSRMLS_DC);
#include <zend_dtrace_gen.h>
#endif /* HAVE_DTRACE */
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index fbc73258c..361afc6f1 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -35,6 +35,7 @@
#include "zend_exceptions.h"
#include "zend_interfaces.h"
#include "zend_closures.h"
+#include "zend_generators.h"
#include "zend_vm.h"
#include "zend_dtrace.h"
@@ -1474,10 +1475,18 @@ static int zend_check_symbol(zval **pz TSRMLS_DC)
ZEND_API opcode_handler_t *zend_opcode_handlers;
-ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
+ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, zend_fcall_info *fci, int return_value_used TSRMLS_DC)
{
- zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.var)).var.ptr;
- ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr, (execute_data_ptr->function_state.function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)?return_value_ptr:NULL, execute_data_ptr->object, return_value_used TSRMLS_CC);
+ if(fci != NULL) {
+ ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(fci->param_count,
+ *fci->retval_ptr_ptr, fci->retval_ptr_ptr, fci->object_ptr, 1 TSRMLS_CC);
+
+ } else {
+ zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.var)).var.ptr;
+ ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr,
+ (execute_data_ptr->function_state.function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)?return_value_ptr:NULL,
+ execute_data_ptr->object, return_value_used TSRMLS_CC);
+ }
}
#define ZEND_VM_NEXT_OPCODE() \
@@ -1512,7 +1521,7 @@ ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler
{
if (opcode != ZEND_USER_OPCODE) {
if (handler == NULL) {
- /* restore the original handler */
+ /* restore the original handler */
zend_user_opcodes[opcode] = opcode;
} else {
zend_user_opcodes[opcode] = ZEND_USER_OPCODE;
@@ -1536,6 +1545,50 @@ ZEND_API zval **zend_get_zval_ptr_ptr(int op_type, const znode_op *node, const t
return get_zval_ptr_ptr(op_type, node, Ts, should_free, type);
}
+void zend_clean_and_cache_symbol_table(HashTable *symbol_table TSRMLS_DC) /* {{{ */
+{
+ if (EG(symtable_cache_ptr) >= EG(symtable_cache_limit)) {
+ zend_hash_destroy(symbol_table);
+ FREE_HASHTABLE(symbol_table);
+ } else {
+ /* clean before putting into the cache, since clean
+ could call dtors, which could use cached hash */
+ zend_hash_clean(symbol_table);
+ *(++EG(symtable_cache_ptr)) = symbol_table;
+ }
+}
+/* }}} */
+
+void zend_free_compiled_variables(zval ***CVs, int num) /* {{{ */
+{
+ int i;
+ for (i = 0; i < num; ++i) {
+ if (CVs[i]) {
+ zval_ptr_dtor(CVs[i]);
+ }
+ }
+}
+/* }}} */
+
+void** zend_copy_arguments(void **arguments_end) /* {{{ */
+{
+ int arguments_count = (int) (zend_uintptr_t) *arguments_end;
+ size_t arguments_size = (arguments_count + 1) * sizeof(void **);
+ void **arguments_start = arguments_end - arguments_count;
+ void **copied_arguments_start = emalloc(arguments_size);
+ void **copied_arguments_end = copied_arguments_start + arguments_count;
+ int i;
+
+ memcpy(copied_arguments_start, arguments_start, arguments_size);
+
+ for (i = 0; i < arguments_count; i++) {
+ Z_ADDREF_P((zval *) arguments_start[i]);
+ }
+
+ return copied_arguments_end;
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 7d427388b..4594eba9e 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -5,7 +5,7 @@
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
- | that is bundled with this package in the file LICENSE, and is |
+ | that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
@@ -49,14 +49,17 @@ typedef union _temp_variable {
BEGIN_EXTERN_C()
+struct _zend_fcall_info;
ZEND_API extern void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
-ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, struct _zend_fcall_info *fci, int return_value_used TSRMLS_DC);
void init_executor(TSRMLS_D);
void shutdown_executor(TSRMLS_D);
void shutdown_destructors(TSRMLS_D);
+zend_execute_data *zend_create_execute_data_from_op_array(zend_op_array *op_array, zend_bool nested TSRMLS_DC);
ZEND_API void execute(zend_op_array *op_array TSRMLS_DC);
-ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+ZEND_API void execute_ex(zend_execute_data *execute_data TSRMLS_DC);
+ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, struct _zend_fcall_info *fci, int return_value_used TSRMLS_DC);
ZEND_API int zend_is_true(zval *op);
#define safe_free_zval_ptr(p) safe_free_zval_ptr_rel(p ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
static zend_always_inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
@@ -270,7 +273,7 @@ static zend_always_inline void *zend_vm_stack_alloc(size_t size TSRMLS_DC)
}
static zend_always_inline void zend_vm_stack_free_int(void *ptr TSRMLS_DC)
-{
+{
if (UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (void**)ptr)) {
zend_vm_stack p = EG(argument_stack);
@@ -282,7 +285,7 @@ static zend_always_inline void zend_vm_stack_free_int(void *ptr TSRMLS_DC)
}
static zend_always_inline void zend_vm_stack_free(void *ptr TSRMLS_DC)
-{
+{
if (UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (void**)ptr)) {
zend_vm_stack p = EG(argument_stack);
@@ -302,7 +305,7 @@ static zend_always_inline void zend_vm_stack_free(void *ptr TSRMLS_DC)
static zend_always_inline void** zend_vm_stack_push_args(int count TSRMLS_DC)
{
- if (UNEXPECTED(EG(argument_stack)->top - ZEND_VM_STACK_ELEMETS(EG(argument_stack)) < count) ||
+ if (UNEXPECTED(EG(argument_stack)->top - ZEND_VM_STACK_ELEMETS(EG(argument_stack)) < count) ||
UNEXPECTED(EG(argument_stack)->top == EG(argument_stack)->end)) {
zend_vm_stack p = EG(argument_stack);
@@ -431,6 +434,10 @@ ZEND_API zval **zend_get_zval_ptr_ptr(int op_type, const znode_op *node, const t
ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS);
+void zend_clean_and_cache_symbol_table(HashTable *symbol_table TSRMLS_DC);
+void zend_free_compiled_variables(zval ***CVs, int num);
+void **zend_copy_arguments(void **arguments_end);
+
#define CACHED_PTR(num) \
EG(active_op_array)->run_time_cache[(num)]
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 1deee2a86..9787966f2 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -31,6 +31,7 @@
#include "zend_extensions.h"
#include "zend_exceptions.h"
#include "zend_closures.h"
+#include "zend_generators.h"
#include "zend_vm.h"
#include "zend_float.h"
#ifdef HAVE_SYS_TIME_H
@@ -38,7 +39,7 @@
#endif
ZEND_API void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
-ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, zend_fcall_info *fci, int return_value_used TSRMLS_DC);
/* true globals */
ZEND_API const zend_fcall_info empty_fcall_info = { 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0 };
@@ -406,7 +407,7 @@ ZEND_API const char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
ZEND_API uint zend_get_executed_lineno(TSRMLS_D) /* {{{ */
{
- if(EG(exception) && EG(opline_ptr) && active_opline->opcode == ZEND_HANDLE_EXCEPTION &&
+ if(EG(exception) && EG(opline_ptr) && active_opline->opcode == ZEND_HANDLE_EXCEPTION &&
active_opline->lineno == 0 && EG(opline_before_exception)) {
return EG(opline_before_exception)->lineno;
}
@@ -600,7 +601,7 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
zend_hash_init(tmp_ht, zend_hash_num_elements(Z_ARRVAL_P(p)), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(tmp_ht, Z_ARRVAL_P(p), (copy_ctor_func_t) zval_deep_copy, (void *) &tmp, sizeof(zval *));
Z_ARRVAL_P(p) = tmp_ht;
- }
+ }
/* First go over the array and see if there are any constant indices */
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));
@@ -955,17 +956,15 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
EG(return_value_ptr_ptr) = fci->retval_ptr_ptr;
EG(active_op_array) = (zend_op_array *) EX(function_state).function;
original_opline_ptr = EG(opline_ptr);
- zend_execute(EG(active_op_array) TSRMLS_CC);
+
+ if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ *fci->retval_ptr_ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
+ } else {
+ zend_execute(EG(active_op_array) TSRMLS_CC);
+ }
+
if (!fci->symbol_table && EG(active_symbol_table)) {
- if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
- zend_hash_destroy(EG(active_symbol_table));
- FREE_HASHTABLE(EG(active_symbol_table));
- } else {
- /* clean before putting into the cache, since clean
- could call dtors, which could use cached hash */
- zend_hash_clean(EG(active_symbol_table));
- *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
- }
+ zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
}
EG(active_symbol_table) = calling_symbol_table;
EG(active_op_array) = original_op_array;
@@ -977,7 +976,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
if (EX(function_state).function->common.scope) {
EG(scope) = EX(function_state).function->common.scope;
}
- ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, fci->object_ptr, 1 TSRMLS_CC);
+ if(EXPECTED(zend_execute_internal == NULL)) {
+ /* saves one function call if zend_execute_internal is not used */
+ ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, fci->object_ptr, 1 TSRMLS_CC);
+ } else {
+ zend_execute_internal(&execute_data, fci, 1 TSRMLS_CC);
+ }
/* We shouldn't fix bad extensions here,
because it can break proper ones (Bug #34045)
if (!EX(function_state).function->common.return_reference)
@@ -1312,9 +1316,9 @@ void execute_new_code(TSRMLS_D) /* {{{ */
ZEND_VM_SET_OPCODE_HANDLER(opline);
opline++;
}
-
+
zend_release_labels(TSRMLS_C);
-
+
EG(return_value_ptr_ptr) = NULL;
EG(active_op_array) = CG(active_op_array);
orig_interactive = CG(interactive);
@@ -1337,11 +1341,11 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */
if (zend_on_timeout) {
#ifdef ZEND_SIGNALS
- /*
+ /*
We got here because we got a timeout signal, so we are in a signal handler
at this point. However, we want to be able to timeout any user-supplied
shutdown functions, so pretend we are not in a signal handler while we are
- calling these
+ calling these
*/
SIGG(running) = 0;
#endif
@@ -1590,7 +1594,7 @@ check_fetch_type:
zend_error(E_ERROR, "Trait '%s' not found", class_name);
} else {
zend_error(E_ERROR, "Class '%s' not found", class_name);
- }
+ }
}
}
return NULL;
@@ -1613,7 +1617,7 @@ zend_class_entry *zend_fetch_class_by_name(const char *class_name, uint class_na
zend_error(E_ERROR, "Trait '%s' not found", class_name);
} else {
zend_error(E_ERROR, "Class '%s' not found", class_name);
- }
+ }
}
}
return NULL;
@@ -1754,7 +1758,7 @@ ZEND_API void zend_rebuild_symbol_table(TSRMLS_D) /* {{{ */
zend_execute_data *ex;
if (!EG(active_symbol_table)) {
-
+
/* Search for last called user function */
ex = EG(current_execute_data);
while (ex && !ex->op_array) {
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index b3f510ac1..703e03c3f 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -28,7 +28,7 @@
/* The first number is the engine version and the rest is the date.
* This way engine 2/3 API no. is always greater than engine 1 API no..
*/
-#define ZEND_EXTENSION_API_NO 220100525
+#define ZEND_EXTENSION_API_NO 220121113
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
new file mode 100644
index 000000000..87f0644e8
--- /dev/null
+++ b/Zend/zend_generators.c
@@ -0,0 +1,916 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Nikita Popov <nikic@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#include "zend.h"
+#include "zend_API.h"
+#include "zend_interfaces.h"
+#include "zend_exceptions.h"
+#include "zend_generators.h"
+
+ZEND_API zend_class_entry *zend_ce_generator;
+static zend_object_handlers zend_generator_handlers;
+
+void zend_generator_close(zend_generator *generator, zend_bool finished_execution TSRMLS_DC) /* {{{ */
+{
+ if (generator->execute_data) {
+ zend_execute_data *execute_data = generator->execute_data;
+ zend_op_array *op_array = execute_data->op_array;
+
+ if (!finished_execution) {
+ if (op_array->has_finally_block) {
+ /* -1 required because we want the last run opcode, not the
+ * next to-be-run one. */
+ zend_uint op_num = execute_data->opline - op_array->opcodes - 1;
+ zend_uint finally_op_num = 0;
+
+ /* Find next finally block */
+ int i;
+ for (i = 0; i < op_array->last_try_catch; i++) {
+ zend_try_catch_element *try_catch = &op_array->try_catch_array[i];
+
+ if (op_num < try_catch->try_op) {
+ break;
+ }
+
+ if (op_num < try_catch->finally_op) {
+ finally_op_num = try_catch->finally_op;
+ }
+ }
+
+ /* If a finally block was found we jump directly to it and
+ * resume the generator. Furthermore we abort this close call
+ * because the generator will already be closed somewhere in
+ * the resume. */
+ if (finally_op_num) {
+ execute_data->opline = &op_array->opcodes[finally_op_num];
+ execute_data->leaving = ZEND_RETURN;
+ generator->flags |= ZEND_GENERATOR_FORCED_CLOSE;
+ zend_generator_resume(generator TSRMLS_CC);
+ return;
+ }
+ }
+ }
+
+ if (!execute_data->symbol_table) {
+ zend_free_compiled_variables(execute_data->CVs, op_array->last_var);
+ } else {
+ zend_clean_and_cache_symbol_table(execute_data->symbol_table TSRMLS_CC);
+ }
+
+ if (execute_data->current_this) {
+ zval_ptr_dtor(&execute_data->current_this);
+ }
+
+ if (execute_data->object) {
+ zval_ptr_dtor(&execute_data->object);
+ }
+
+ /* If the generator is closed before it can finish execution (reach
+ * a return statement) we have to free loop variables manually, as
+ * we don't know whether the SWITCH_FREE / FREE opcodes have run */
+ if (!finished_execution) {
+ /* -1 required because we want the last run opcode, not the
+ * next to-be-run one. */
+ zend_uint op_num = execute_data->opline - op_array->opcodes - 1;
+
+ int i;
+ for (i = 0; i < op_array->last_brk_cont; ++i) {
+ zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
+
+ if (brk_cont->start < 0) {
+ continue;
+ } else if (brk_cont->start > op_num) {
+ break;
+ } else if (brk_cont->brk > op_num) {
+ zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
+
+ switch (brk_opline->opcode) {
+ case ZEND_SWITCH_FREE:
+ {
+ temp_variable *var = (temp_variable *) ((char *) execute_data->Ts + brk_opline->op1.var);
+ zval_ptr_dtor(&var->var.ptr);
+ }
+ break;
+ case ZEND_FREE:
+ {
+ temp_variable *var = (temp_variable *) ((char *) execute_data->Ts + brk_opline->op1.var);
+ zval_dtor(&var->tmp_var);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ /* Clear any backed up stack arguments */
+ if (generator->backed_up_stack) {
+ zval **zvals = (zval **) generator->backed_up_stack;
+ size_t zval_num = generator->backed_up_stack_size / sizeof(zval *);
+ int i;
+
+ for (i = 0; i < zval_num; i++) {
+ zval_ptr_dtor(&zvals[i]);
+ }
+
+ efree(generator->backed_up_stack);
+ }
+
+ if (generator->backed_up_arg_types_stack) {
+ /* The arg types stack contains three elements per call: fbc, object
+ * and called_scope. Here we traverse the stack from top to bottom
+ * and dtor the object. */
+ int i = generator->backed_up_arg_types_stack_count / 3;
+ while (i--) {
+ zval *object = (zval *) generator->backed_up_arg_types_stack[3*i + 1];
+ if (object) {
+ zval_ptr_dtor(&object);
+ }
+ }
+
+ efree(generator->backed_up_arg_types_stack);
+ }
+
+ /* We have added an additional stack frame in prev_execute_data, so we
+ * have to free it. It also contains the arguments passed to the
+ * generator (for func_get_args) so those have to be freed too. */
+ {
+ zend_execute_data *prev_execute_data = execute_data->prev_execute_data;
+ void **arguments = prev_execute_data->function_state.arguments;
+
+ if (arguments) {
+ int arguments_count = (int) (zend_uintptr_t) *arguments;
+ zval **arguments_start = (zval **) (arguments - arguments_count);
+ int i;
+
+ for (i = 0; i < arguments_count; ++i) {
+ zval_ptr_dtor(arguments_start + i);
+ }
+
+ efree(arguments_start);
+ }
+
+ efree(prev_execute_data);
+ }
+
+ /* Free a clone of closure */
+ if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
+ destroy_op_array(op_array TSRMLS_CC);
+ efree(op_array);
+ }
+
+ efree(execute_data);
+ generator->execute_data = NULL;
+ }
+
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ generator->value = NULL;
+ }
+
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ generator->key = NULL;
+ }
+}
+/* }}} */
+
+static void zend_generator_free_storage(zend_generator *generator TSRMLS_DC) /* {{{ */
+{
+ zend_generator_close(generator, 0 TSRMLS_CC);
+
+ zend_object_std_dtor(&generator->std TSRMLS_CC);
+ efree(generator);
+}
+/* }}} */
+
+static void zend_generator_clone_storage(zend_generator *orig, zend_generator **clone_ptr) /* {{{ */
+{
+ zend_generator *clone = emalloc(sizeof(zend_generator));
+ memcpy(clone, orig, sizeof(zend_generator));
+
+ if (orig->execute_data) {
+ /* Create a few shorter aliases to the old execution data */
+ zend_execute_data *execute_data = orig->execute_data;
+ zend_op_array *op_array = execute_data->op_array;
+ HashTable *symbol_table = execute_data->symbol_table;
+
+ /* Alloc separate execution context, as well as separate sections for
+ * compiled variables and temporary variables */
+ size_t execute_data_size = ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data));
+ size_t CVs_size = ZEND_MM_ALIGNED_SIZE(sizeof(zval **) * op_array->last_var * (symbol_table ? 1 : 2));
+ size_t Ts_size = ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T;
+ size_t total_size = execute_data_size + CVs_size + Ts_size;
+
+ clone->execute_data = emalloc(total_size);
+
+ /* Copy the zend_execute_data struct */
+ memcpy(clone->execute_data, execute_data, execute_data_size);
+
+ /* Set the pointers to the memory segments for the compiled and
+ * temporary variables (which are located after the execute_data) */
+ clone->execute_data->CVs = (zval ***) ((char *) clone->execute_data + execute_data_size);
+ clone->execute_data->Ts = (temp_variable *) ((char *) clone->execute_data->CVs + CVs_size);
+
+ /* Zero out the compiled variables section */
+ memset(clone->execute_data->CVs, 0, sizeof(zval **) * op_array->last_var);
+
+ if (!symbol_table) {
+ int i;
+
+ /* Copy compiled variables */
+ for (i = 0; i < op_array->last_var; i++) {
+ if (execute_data->CVs[i]) {
+ clone->execute_data->CVs[i] = (zval **) clone->execute_data->CVs + op_array->last_var + i;
+ *clone->execute_data->CVs[i] = (zval *) orig->execute_data->CVs[op_array->last_var + i];
+ Z_ADDREF_PP(clone->execute_data->CVs[i]);
+ }
+ }
+ } else {
+ /* Copy symbol table */
+ ALLOC_HASHTABLE(clone->execute_data->symbol_table);
+ zend_hash_init(clone->execute_data->symbol_table, zend_hash_num_elements(symbol_table), NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_copy(clone->execute_data->symbol_table, symbol_table, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
+
+ /* Update zval** pointers for compiled variables */
+ {
+ int i;
+ for (i = 0; i < op_array->last_var; i++) {
+ if (zend_hash_quick_find(clone->execute_data->symbol_table, op_array->vars[i].name, op_array->vars[i].name_len + 1, op_array->vars[i].hash_value, (void **) &clone->execute_data->CVs[i]) == FAILURE) {
+ clone->execute_data->CVs[i] = NULL;
+ }
+ }
+ }
+ }
+
+ /* Copy the temporary variables */
+ memcpy(clone->execute_data->Ts, orig->execute_data->Ts, Ts_size);
+
+ /* Add references to loop variables */
+ {
+ zend_uint op_num = execute_data->opline - op_array->opcodes;
+
+ int i;
+ for (i = 0; i < op_array->last_brk_cont; ++i) {
+ zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
+
+ if (brk_cont->start < 0) {
+ continue;
+ } else if (brk_cont->start > op_num) {
+ break;
+ } else if (brk_cont->brk > op_num) {
+ zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
+
+ if (brk_opline->opcode == ZEND_SWITCH_FREE) {
+ temp_variable *var = (temp_variable *) ((char *) execute_data->Ts + brk_opline->op1.var);
+
+ Z_ADDREF_P(var->var.ptr);
+ }
+ }
+ }
+ }
+
+ if (orig->backed_up_stack) {
+ /* Copy backed up stack */
+ clone->backed_up_stack = emalloc(orig->backed_up_stack_size);
+ memcpy(clone->backed_up_stack, orig->backed_up_stack, orig->backed_up_stack_size);
+
+ /* Add refs to stack variables */
+ {
+ zval **zvals = (zval **) orig->backed_up_stack;
+ size_t zval_num = orig->backed_up_stack_size / sizeof(zval *);
+ int i;
+
+ for (i = 0; i < zval_num; i++) {
+ Z_ADDREF_P(zvals[i]);
+ }
+ }
+ }
+
+ if (orig->backed_up_arg_types_stack) {
+ size_t stack_size = orig->backed_up_arg_types_stack_count * sizeof(void *);
+
+ clone->backed_up_arg_types_stack = emalloc(stack_size);
+ memcpy(clone->backed_up_arg_types_stack, orig->backed_up_arg_types_stack, stack_size);
+
+ /* We have to add refs to the objects in the arg types stack (the
+ * object is always the second element of a three-pack. */
+ {
+ int i, stack_frames = clone->backed_up_arg_types_stack_count / 3;
+ for (i = 0; i < stack_frames; i++) {
+ zval *object = (zval *) clone->backed_up_arg_types_stack[3*i + 1];
+ if (object) {
+ Z_ADDREF_P(object);
+ }
+ }
+ }
+ }
+
+ /* Update the send_target to use the temporary variable with the same
+ * offset as the original generator, but in our temporary variable
+ * memory segment. */
+ if (orig->send_target) {
+ size_t offset = (char *) orig->send_target - (char *) execute_data->Ts;
+ clone->send_target = (temp_variable *) (
+ (char *) clone->execute_data->Ts + offset
+ );
+ Z_ADDREF_P(clone->send_target->var.ptr);
+ }
+
+ if (execute_data->current_this) {
+ Z_ADDREF_P(execute_data->current_this);
+ }
+
+ if (execute_data->object) {
+ Z_ADDREF_P(execute_data->object);
+ }
+
+ /* Prev execute data contains an additional stack frame (for proper
+ * backtraces) which has to be copied. */
+ clone->execute_data->prev_execute_data = emalloc(sizeof(zend_execute_data));
+ memcpy(clone->execute_data->prev_execute_data, execute_data->prev_execute_data, sizeof(zend_execute_data));
+
+ /* It also contains the arguments passed to the generator, which also
+ * have to be copied */
+ if (execute_data->prev_execute_data->function_state.arguments) {
+ clone->execute_data->prev_execute_data->function_state.arguments
+ = zend_copy_arguments(execute_data->prev_execute_data->function_state.arguments);
+ }
+ }
+
+ /* The value and key are known not to be references, so simply add refs */
+ if (orig->value) {
+ Z_ADDREF_P(orig->value);
+ }
+
+ if (orig->key) {
+ Z_ADDREF_P(orig->key);
+ }
+
+ *clone_ptr = clone;
+}
+/* }}} */
+
+static zend_object_value zend_generator_create(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
+{
+ zend_generator *generator;
+ zend_object_value object;
+
+ generator = emalloc(sizeof(zend_generator));
+ memset(generator, 0, sizeof(zend_generator));
+
+ /* The key will be incremented on first use, so it'll start at 0 */
+ generator->largest_used_integer_key = -1;
+
+ zend_object_std_init(&generator->std, class_type TSRMLS_CC);
+
+ object.handle = zend_objects_store_put(generator, NULL,
+ (zend_objects_free_object_storage_t) zend_generator_free_storage,
+ (zend_objects_store_clone_t) zend_generator_clone_storage
+ TSRMLS_CC
+ );
+ object.handlers = &zend_generator_handlers;
+
+ return object;
+}
+/* }}} */
+
+/* Requires globals EG(scope), EG(current_scope), EG(This),
+ * EG(active_symbol_table) and EG(current_execute_data). */
+zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC) /* {{{ */
+{
+ zval *return_value;
+ zend_generator *generator;
+ zend_execute_data *current_execute_data;
+ zend_op **opline_ptr;
+ zend_execute_data *execute_data;
+
+ /* Create a clone of closure, because it may be destroyed */
+ if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
+ zend_op_array *op_array_copy = (zend_op_array*)emalloc(sizeof(zend_op_array));
+ *op_array_copy = *op_array;
+ function_add_ref((zend_function *) op_array_copy);
+ op_array = op_array_copy;
+ }
+
+ /* Create new execution context. We have to back up and restore
+ * EG(current_execute_data) and EG(opline_ptr) here because the function
+ * modifies it. */
+ current_execute_data = EG(current_execute_data);
+ opline_ptr = EG(opline_ptr);
+ execute_data = zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC);
+ EG(current_execute_data) = current_execute_data;
+ EG(opline_ptr) = opline_ptr;
+
+ ALLOC_INIT_ZVAL(return_value);
+ object_init_ex(return_value, zend_ce_generator);
+
+ if (EG(This)) {
+ Z_ADDREF_P(EG(This));
+ }
+
+ /* Back up executor globals. */
+ execute_data->current_scope = EG(scope);
+ execute_data->current_called_scope = EG(called_scope);
+ execute_data->symbol_table = EG(active_symbol_table);
+ execute_data->current_this = EG(This);
+
+ /* Save execution context in generator object. */
+ generator = (zend_generator *) zend_object_store_get_object(return_value TSRMLS_CC);
+ generator->execute_data = execute_data;
+
+ /* We have to add another stack frame so the generator function shows
+ * up in backtraces and func_get_all() can access the function
+ * arguments. */
+ execute_data->prev_execute_data = emalloc(sizeof(zend_execute_data));
+ memset(execute_data->prev_execute_data, 0, sizeof(zend_execute_data));
+ execute_data->prev_execute_data->function_state.function = (zend_function *) op_array;
+ if (EG(current_execute_data)) {
+ execute_data->prev_execute_data->function_state.arguments = zend_copy_arguments(EG(current_execute_data)->function_state.arguments);
+ } else {
+ execute_data->prev_execute_data->function_state.arguments = NULL;
+ }
+
+ return return_value;
+}
+/* }}} */
+
+static zend_function *zend_generator_get_constructor(zval *object TSRMLS_DC) /* {{{ */
+{
+ zend_error(E_RECOVERABLE_ERROR, "The \"Generator\" class is reserved for internal use and cannot be manually instantiated");
+
+ return NULL;
+}
+/* }}} */
+
+void zend_generator_resume(zend_generator *generator TSRMLS_DC) /* {{{ */
+{
+ if (EG(exception)) {
+ return;
+ }
+
+ /* The generator is already closed, thus can't resume */
+ if (!generator->execute_data) {
+ return;
+ }
+
+ if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
+ zend_error(E_ERROR, "Cannot resume an already running generator");
+ }
+
+ /* Drop the AT_FIRST_YIELD flag */
+ generator->flags &= ~ZEND_GENERATOR_AT_FIRST_YIELD;
+
+ {
+ /* Backup executor globals */
+ zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
+ zend_execute_data *original_execute_data = EG(current_execute_data);
+ zend_op **original_opline_ptr = EG(opline_ptr);
+ zend_op_array *original_active_op_array = EG(active_op_array);
+ HashTable *original_active_symbol_table = EG(active_symbol_table);
+ zval *original_This = EG(This);
+ zend_class_entry *original_scope = EG(scope);
+ zend_class_entry *original_called_scope = EG(called_scope);
+ int original_arg_types_stack_count = EG(arg_types_stack).top;
+
+ /* Remember the current stack position so we can back up pushed args */
+ generator->original_stack_top = zend_vm_stack_top(TSRMLS_C);
+
+ /* If there is a backed up stack copy it to the VM stack */
+ if (generator->backed_up_stack) {
+ void *stack = zend_vm_stack_alloc(generator->backed_up_stack_size TSRMLS_CC);
+ memcpy(stack, generator->backed_up_stack, generator->backed_up_stack_size);
+ efree(generator->backed_up_stack);
+ generator->backed_up_stack = NULL;
+ }
+
+ if (generator->backed_up_arg_types_stack) {
+ zend_ptr_stack_push_from_memory(
+ &EG(arg_types_stack),
+ generator->backed_up_arg_types_stack_count,
+ generator->backed_up_arg_types_stack
+ );
+ efree(generator->backed_up_arg_types_stack);
+ generator->backed_up_arg_types_stack = NULL;
+ }
+
+ /* We (mis)use the return_value_ptr_ptr to provide the generator object
+ * to the executor, so YIELD will be able to set the yielded value */
+ EG(return_value_ptr_ptr) = (zval **) generator;
+
+ /* Set executor globals */
+ EG(current_execute_data) = generator->execute_data;
+ EG(opline_ptr) = &generator->execute_data->opline;
+ EG(active_op_array) = generator->execute_data->op_array;
+ EG(active_symbol_table) = generator->execute_data->symbol_table;
+ EG(This) = generator->execute_data->current_this;
+ EG(scope) = generator->execute_data->current_scope;
+ EG(called_scope) = generator->execute_data->current_called_scope;
+
+ /* We want the backtrace to look as if the generator function was
+ * called from whatever method we are current running (e.g. next()).
+ * The first prev_execute_data contains an additional stack frame,
+ * which makes the generator function show up in the backtrace and
+ * makes the arguments available to func_get_args(). So we have to
+ * set the prev_execute_data of that prev_execute_data :) */
+ generator->execute_data->prev_execute_data->prev_execute_data = original_execute_data;
+
+ /* Resume execution */
+ generator->flags |= ZEND_GENERATOR_CURRENTLY_RUNNING;
+ execute_ex(generator->execute_data TSRMLS_CC);
+ generator->flags &= ~ZEND_GENERATOR_CURRENTLY_RUNNING;
+
+ /* Restore executor globals */
+ EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
+ EG(current_execute_data) = original_execute_data;
+ EG(opline_ptr) = original_opline_ptr;
+ EG(active_op_array) = original_active_op_array;
+ EG(active_symbol_table) = original_active_symbol_table;
+ EG(This) = original_This;
+ EG(scope) = original_scope;
+ EG(called_scope) = original_called_scope;
+
+ /* The stack top before and after the execution differ, i.e. there are
+ * arguments pushed to the stack. */
+ if (generator->original_stack_top != zend_vm_stack_top(TSRMLS_C)) {
+ generator->backed_up_stack_size = (zend_vm_stack_top(TSRMLS_C) - generator->original_stack_top) * sizeof(void *);
+ generator->backed_up_stack = emalloc(generator->backed_up_stack_size);
+ memcpy(generator->backed_up_stack, generator->original_stack_top, generator->backed_up_stack_size);
+ zend_vm_stack_free(generator->original_stack_top TSRMLS_CC);
+ }
+
+ if (original_arg_types_stack_count != EG(arg_types_stack).top) {
+ generator->backed_up_arg_types_stack_count =
+ EG(arg_types_stack).top - original_arg_types_stack_count;
+
+ generator->backed_up_arg_types_stack = emalloc(generator->backed_up_arg_types_stack_count * sizeof(void *));
+ zend_ptr_stack_pop_into_memory(
+ &EG(arg_types_stack),
+ generator->backed_up_arg_types_stack_count,
+ generator->backed_up_arg_types_stack
+ );
+ }
+
+ /* If an exception was thrown in the generator we have to internally
+ * rethrow it in the parent scope. */
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL TSRMLS_CC);
+ }
+ }
+}
+/* }}} */
+
+static void zend_generator_ensure_initialized(zend_generator *generator TSRMLS_DC) /* {{{ */
+{
+ if (generator->execute_data && !generator->value) {
+ zend_generator_resume(generator TSRMLS_CC);
+ generator->flags |= ZEND_GENERATOR_AT_FIRST_YIELD;
+ }
+}
+/* }}} */
+
+static void zend_generator_rewind(zend_generator *generator TSRMLS_DC) /* {{{ */
+{
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ if (!(generator->flags & ZEND_GENERATOR_AT_FIRST_YIELD)) {
+ zend_throw_exception(NULL, "Cannot rewind a generator that was already run", 0 TSRMLS_CC);
+ }
+}
+/* }}} */
+
+/* {{{ proto void Generator::rewind()
+ * Rewind the generator */
+ZEND_METHOD(Generator, rewind)
+{
+ zend_generator *generator;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ zend_generator_rewind(generator TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ proto bool Generator::valid()
+ * Check whether the generator is valid */
+ZEND_METHOD(Generator, valid)
+{
+ zend_generator *generator;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ RETURN_BOOL(generator->value != NULL);
+}
+/* }}} */
+
+/* {{{ proto mixed Generator::current()
+ * Get the current value */
+ZEND_METHOD(Generator, current)
+{
+ zend_generator *generator;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ if (generator->value) {
+ RETURN_ZVAL(generator->value, 1, 0);
+ }
+}
+/* }}} */
+
+/* {{{ proto mixed Generator::key()
+ * Get the current key */
+ZEND_METHOD(Generator, key)
+{
+ zend_generator *generator;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ if (generator->key) {
+ RETURN_ZVAL(generator->key, 1, 0);
+ }
+}
+/* }}} */
+
+/* {{{ proto void Generator::next()
+ * Advances the generator */
+ZEND_METHOD(Generator, next)
+{
+ zend_generator *generator;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ zend_generator_resume(generator TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ proto mixed Generator::send()
+ * Sends a value to the generator */
+ZEND_METHOD(Generator, send)
+{
+ zval *value;
+ zend_generator *generator;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) {
+ return;
+ }
+
+ generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ /* The generator is already closed, thus can't send anything */
+ if (!generator->execute_data) {
+ return;
+ }
+
+ /* The sent value was initialized to NULL, so dtor that */
+ zval_ptr_dtor(&generator->send_target->var.ptr);
+
+ /* Set new sent value */
+ Z_ADDREF_P(value);
+ generator->send_target->var.ptr = value;
+ generator->send_target->var.ptr_ptr = &value;
+
+ zend_generator_resume(generator TSRMLS_CC);
+
+ if (generator->value) {
+ RETURN_ZVAL(generator->value, 1, 0);
+ }
+}
+/* }}} */
+
+/* {{{ proto void Generator::__wakeup()
+ * Throws an Exception as generators can't be serialized */
+ZEND_METHOD(Generator, __wakeup)
+{
+ /* Just specifying the zend_class_unserialize_deny handler is not enough,
+ * because it is only invoked for C unserialization. For O the error has
+ * to be thrown in __wakeup. */
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ zend_throw_exception(NULL, "Unserialization of 'Generator' is not allowed", 0 TSRMLS_CC);
+}
+/* }}} */
+
+/* get_iterator implementation */
+
+typedef struct _zend_generator_iterator {
+ zend_object_iterator intern;
+
+ /* The generator object zval has to be stored, because the iterator is
+ * holding a ref to it, which has to be dtored. */
+ zval *object;
+} zend_generator_iterator;
+
+static void zend_generator_iterator_dtor(zend_object_iterator *iterator TSRMLS_DC) /* {{{ */
+{
+ zval *object = ((zend_generator_iterator *) iterator)->object;
+
+ zval_ptr_dtor(&object);
+
+ efree(iterator);
+}
+/* }}} */
+
+static int zend_generator_iterator_valid(zend_object_iterator *iterator TSRMLS_DC) /* {{{ */
+{
+ zend_generator *generator = (zend_generator *) iterator->data;
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ return generator->value != NULL ? SUCCESS : FAILURE;
+}
+/* }}} */
+
+static void zend_generator_iterator_get_data(zend_object_iterator *iterator, zval ***data TSRMLS_DC) /* {{{ */
+{
+ zend_generator *generator = (zend_generator *) iterator->data;
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ if (generator->value) {
+ *data = &generator->value;
+ } else {
+ *data = NULL;
+ }
+}
+/* }}} */
+
+static int zend_generator_iterator_get_key(zend_object_iterator *iterator, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) /* {{{ */
+{
+ zend_generator *generator = (zend_generator *) iterator->data;
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ if (!generator->key) {
+ return HASH_KEY_NON_EXISTANT;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG) {
+ *int_key = Z_LVAL_P(generator->key);
+ return HASH_KEY_IS_LONG;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_STRING) {
+ *str_key = estrndup(Z_STRVAL_P(generator->key), Z_STRLEN_P(generator->key));
+ *str_key_len = Z_STRLEN_P(generator->key) + 1;
+ return HASH_KEY_IS_STRING;
+ }
+
+ /* Waiting for Etienne's patch to allow arbitrary zval keys. Until then
+ * error out on non-int and non-string keys. */
+ zend_error_noreturn(E_ERROR, "Currently only int and string keys can be yielded");
+}
+/* }}} */
+
+static void zend_generator_iterator_move_forward(zend_object_iterator *iterator TSRMLS_DC) /* {{{ */
+{
+ zend_generator *generator = (zend_generator *) iterator->data;
+
+ zend_generator_ensure_initialized(generator TSRMLS_CC);
+
+ zend_generator_resume(generator TSRMLS_CC);
+}
+/* }}} */
+
+static void zend_generator_iterator_rewind(zend_object_iterator *iterator TSRMLS_DC) /* {{{ */
+{
+ zend_generator *generator = (zend_generator *) iterator->data;
+
+ zend_generator_rewind(generator TSRMLS_CC);
+}
+/* }}} */
+
+static zend_object_iterator_funcs zend_generator_iterator_functions = {
+ zend_generator_iterator_dtor,
+ zend_generator_iterator_valid,
+ zend_generator_iterator_get_data,
+ zend_generator_iterator_get_key,
+ zend_generator_iterator_move_forward,
+ zend_generator_iterator_rewind
+};
+
+zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC) /* {{{ */
+{
+ zend_generator_iterator *iterator;
+ zend_generator *generator;
+
+ generator = (zend_generator *) zend_object_store_get_object(object TSRMLS_CC);
+
+ if (!generator->execute_data) {
+ zend_throw_exception(NULL, "Cannot traverse an already closed generator", 0 TSRMLS_CC);
+ return NULL;
+ }
+
+ if (by_ref && !(generator->execute_data->op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
+ zend_throw_exception(NULL, "You can only iterate a generator by-reference if it declared that it yields by-reference", 0 TSRMLS_CC);
+ return NULL;
+ }
+
+ iterator = emalloc(sizeof(zend_generator_iterator));
+ iterator->intern.funcs = &zend_generator_iterator_functions;
+ iterator->intern.data = (void *) generator;
+
+ /* We have to keep a reference to the generator object zval around,
+ * otherwise the generator may be destroyed during iteration. */
+ Z_ADDREF_P(object);
+ iterator->object = object;
+
+ return (zend_object_iterator *) iterator;
+}
+/* }}} */
+
+ZEND_BEGIN_ARG_INFO(arginfo_generator_void, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_send, 0, 0, 1)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+static const zend_function_entry generator_functions[] = {
+ ZEND_ME(Generator, rewind, arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, valid, arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, current, arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, key, arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, next, arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, send, arginfo_generator_send, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, __wakeup, arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
+
+void zend_register_generator_ce(TSRMLS_D) /* {{{ */
+{
+ zend_class_entry ce;
+
+ INIT_CLASS_ENTRY(ce, "Generator", generator_functions);
+ zend_ce_generator = zend_register_internal_class(&ce TSRMLS_CC);
+ zend_ce_generator->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ zend_ce_generator->create_object = zend_generator_create;
+ zend_ce_generator->serialize = zend_class_serialize_deny;
+ zend_ce_generator->unserialize = zend_class_unserialize_deny;
+
+ /* get_iterator has to be assigned *after* implementing the inferface */
+ zend_class_implements(zend_ce_generator TSRMLS_CC, 1, zend_ce_iterator);
+ zend_ce_generator->get_iterator = zend_generator_get_iterator;
+ zend_ce_generator->iterator_funcs.funcs = &zend_generator_iterator_functions;
+
+ memcpy(&zend_generator_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ zend_generator_handlers.get_constructor = zend_generator_get_constructor;
+ zend_generator_handlers.clone_obj = zend_objects_store_clone_obj;
+}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h
new file mode 100644
index 000000000..3dc3e6fec
--- /dev/null
+++ b/Zend/zend_generators.h
@@ -0,0 +1,78 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Nikita Popov <nikic@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#ifndef ZEND_GENERATORS_H
+#define ZEND_GENERATORS_H
+
+BEGIN_EXTERN_C()
+extern ZEND_API zend_class_entry *zend_ce_generator;
+END_EXTERN_C()
+
+typedef struct _zend_generator {
+ zend_object std;
+
+ /* The suspended execution context. */
+ zend_execute_data *execute_data;
+
+ /* If the execution is suspended during a function call there may be
+ * arguments pushed to the stack, so it has to be backed up. */
+ void *backed_up_stack;
+ size_t backed_up_stack_size;
+
+ /* For method calls PHP also pushes various type information on a second
+ * stack, which also needs to be backed up. */
+ void **backed_up_arg_types_stack;
+ int backed_up_arg_types_stack_count;
+
+ /* The original stack top before resuming the generator. This is required
+ * for proper cleanup during exception handling. */
+ void **original_stack_top;
+
+ /* Current value */
+ zval *value;
+ /* Current key */
+ zval *key;
+ /* Variable to put sent value into */
+ temp_variable *send_target;
+ /* Largest used integer key for auto-incrementing keys */
+ long largest_used_integer_key;
+
+ /* ZEND_GENERATOR_* flags */
+ zend_uchar flags;
+} zend_generator;
+
+static const zend_uchar ZEND_GENERATOR_CURRENTLY_RUNNING = 0x1;
+static const zend_uchar ZEND_GENERATOR_FORCED_CLOSE = 0x2;
+static const zend_uchar ZEND_GENERATOR_AT_FIRST_YIELD = 0x4;
+
+void zend_register_generator_ce(TSRMLS_D);
+zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC);
+void zend_generator_close(zend_generator *generator, zend_bool finished_execution TSRMLS_DC);
+void zend_generator_resume(zend_generator *generator TSRMLS_DC);
+
+#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index dbbcf972a..e5aba0df6 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -89,9 +89,6 @@ struct _zend_compiler_globals {
int zend_lineno;
- char *heredoc;
- int heredoc_len;
-
zend_op_array *active_op_array;
HashTable *function_table; /* function symbol table */
@@ -297,6 +294,7 @@ struct _zend_php_scanner_globals {
unsigned char *yy_limit;
int yy_state;
zend_stack state_stack;
+ zend_ptr_stack heredoc_label_stack;
/* original (unfiltered) script */
unsigned char *script_org;
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index e9fd850e6..938e1c612 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -153,8 +153,6 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
efree(token.value.str.val);
break;
}
- } else if (token_type == T_END_HEREDOC) {
- efree(token.value.str.val);
}
token.type = 0;
}
diff --git a/Zend/zend_ini_parser.c b/Zend/zend_ini_parser.c
index d97f68967..e0198e37b 100644
--- a/Zend/zend_ini_parser.c
+++ b/Zend/zend_ini_parser.c
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,58 +52,23 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse ini_parse
-#define yylex ini_lex
-#define yyerror ini_error
-#define yylval ini_lval
-#define yychar ini_char
-#define yydebug ini_debug
-#define yynerrs ini_nerrs
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TC_SECTION = 258,
- TC_RAW = 259,
- TC_CONSTANT = 260,
- TC_NUMBER = 261,
- TC_STRING = 262,
- TC_WHITESPACE = 263,
- TC_LABEL = 264,
- TC_OFFSET = 265,
- TC_DOLLAR_CURLY = 266,
- TC_VARNAME = 267,
- TC_QUOTED_STRING = 268,
- BOOL_TRUE = 269,
- BOOL_FALSE = 270,
- END_OF_LINE = 271
- };
-#endif
-/* Tokens. */
-#define TC_SECTION 258
-#define TC_RAW 259
-#define TC_CONSTANT 260
-#define TC_NUMBER 261
-#define TC_STRING 262
-#define TC_WHITESPACE 263
-#define TC_LABEL 264
-#define TC_OFFSET 265
-#define TC_DOLLAR_CURLY 266
-#define TC_VARNAME 267
-#define TC_QUOTED_STRING 268
-#define BOOL_TRUE 269
-#define BOOL_FALSE 270
-#define END_OF_LINE 271
-
-
+#define yyparse ini_parse
+#define yylex ini_lex
+#define yyerror ini_error
+#define yylval ini_lval
+#define yychar ini_char
+#define yydebug ini_debug
+#define yynerrs ini_nerrs
/* Copy the first part of user declarations. */
@@ -359,6 +321,7 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -377,20 +340,59 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TC_SECTION = 258,
+ TC_RAW = 259,
+ TC_CONSTANT = 260,
+ TC_NUMBER = 261,
+ TC_STRING = 262,
+ TC_WHITESPACE = 263,
+ TC_LABEL = 264,
+ TC_OFFSET = 265,
+ TC_DOLLAR_CURLY = 266,
+ TC_VARNAME = 267,
+ TC_QUOTED_STRING = 268,
+ BOOL_TRUE = 269,
+ BOOL_FALSE = 270,
+ END_OF_LINE = 271
+ };
+#endif
+/* Tokens. */
+#define TC_SECTION 258
+#define TC_RAW 259
+#define TC_CONSTANT 260
+#define TC_NUMBER 261
+#define TC_STRING 262
+#define TC_WHITESPACE 263
+#define TC_LABEL 264
+#define TC_OFFSET 265
+#define TC_DOLLAR_CURLY 266
+#define TC_VARNAME 267
+#define TC_QUOTED_STRING 268
+#define BOOL_TRUE 269
+#define BOOL_FALSE 270
+#define END_OF_LINE 271
+
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-
#ifdef short
# undef short
@@ -465,14 +467,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -493,11 +495,11 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -520,24 +522,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -553,9 +555,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -566,6 +568,27 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
@@ -583,24 +606,7 @@ union yyalloc
while (YYID (0))
# endif
# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
+#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
@@ -705,7 +711,7 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "TC_SECTION", "TC_RAW", "TC_CONSTANT",
"TC_NUMBER", "TC_STRING", "TC_WHITESPACE", "TC_LABEL", "TC_OFFSET",
"TC_DOLLAR_CURLY", "TC_VARNAME", "TC_QUOTED_STRING", "BOOL_TRUE",
- "BOOL_FALSE", "END_OF_LINE", "'='", "':'", "','", "'.'", "'\"'", "'''",
+ "BOOL_FALSE", "END_OF_LINE", "'='", "':'", "','", "'.'", "'\"'", "'\\''",
"'^'", "'+'", "'-'", "'/'", "'*'", "'%'", "'$'", "'~'", "'<'", "'>'",
"'?'", "'@'", "'{'", "'}'", "'|'", "'&'", "'!'", "']'", "'('", "')'",
"$accept", "statement_list", "statement", "section_string_or_value",
@@ -748,8 +754,8 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 1, 1, 1, 1
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
@@ -792,8 +798,7 @@ static const yytype_int8 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
+ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
@@ -810,6 +815,12 @@ static const yytype_uint8 yytable[] =
0, 0, 4, 5, 0, 47, 0, 68, 0, 6
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-36))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
static const yytype_int8 yycheck[] =
{
3, 25, 37, 38, 4, 5, 6, 7, 8, 33,
@@ -850,9 +861,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -862,7 +882,6 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -904,19 +923,10 @@ while (YYID (0))
#endif
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
+/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
@@ -1020,17 +1030,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -1064,11 +1077,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1105,7 +1118,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -1208,115 +1220,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1348,10 +1387,9 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
-
-/* Prevent warnings from -Wmissing-prototypes. */
+/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1367,10 +1405,6 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */
-
-
-
-
/*----------.
| yyparse. |
`----------*/
@@ -1397,74 +1431,75 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
@@ -1494,7 +1529,6 @@ int yynerrs;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
-
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -1502,7 +1536,6 @@ int yynerrs;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-
&yystacksize);
yyss = yyss1;
@@ -1525,9 +1558,8 @@ int yynerrs;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1538,7 +1570,6 @@ int yynerrs;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -1548,6 +1579,9 @@ int yynerrs;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1556,16 +1590,16 @@ int yynerrs;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1591,26 +1625,22 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1891,10 +1921,20 @@ yyreduce:
break;
-/* Line 1267 of yacc.c. */
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -1903,7 +1943,6 @@ yyreduce:
*++yyvsp = yyval;
-
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1923,6 +1962,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -1930,37 +1973,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
@@ -1968,7 +2010,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -1985,7 +2027,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2019,7 +2061,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2042,9 +2084,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
@@ -2069,7 +2108,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2080,9 +2119,14 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
diff --git a/Zend/zend_ini_parser.h b/Zend/zend_ini_parser.h
index d883f9d40..b1538eafd 100644
--- a/Zend/zend_ini_parser.h
+++ b/Zend/zend_ini_parser.h
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -76,10 +74,11 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
+
diff --git a/Zend/zend_ini_parser.output b/Zend/zend_ini_parser.output
index 9f7bcda21..fc6468a7f 100644
--- a/Zend/zend_ini_parser.output
+++ b/Zend/zend_ini_parser.output
@@ -1,9 +1,9 @@
-Terminals which are not used
+Terminals unused in grammar
':'
','
'.'
- '''
+ '\''
'^'
'+'
'-'
@@ -90,7 +90,7 @@ $end (0) 0
'$' (36)
'%' (37)
'&' (38) 33
-''' (39)
+'\'' (39)
'(' (40) 36
')' (41) 36
'*' (42)
diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c
index 94c48c897..470f52360 100644
--- a/Zend/zend_ini_scanner.c
+++ b/Zend/zend_ini_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */
+/* Generated by re2c 0.13.5 on Thu Jun 7 17:55:40 2012 */
#line 1 "Zend/zend_ini_scanner.l"
/*
+----------------------------------------------------------------------+
diff --git a/Zend/zend_ini_scanner_defs.h b/Zend/zend_ini_scanner_defs.h
index 0c0471373..9c99cc43d 100644
--- a/Zend/zend_ini_scanner_defs.h
+++ b/Zend/zend_ini_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */
+/* Generated by re2c 0.13.5 on Thu Jun 7 17:55:41 2012 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index aee0d612d..aee0d612d 100755..100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h
index e3e3629c5..e3e3629c5 100755..100644
--- a/Zend/zend_interfaces.h
+++ b/Zend/zend_interfaces.h
diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c
index d0572b25c..d0572b25c 100755..100644
--- a/Zend/zend_iterators.c
+++ b/Zend/zend_iterators.c
diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h
index dba05850a..dba05850a 100755..100644
--- a/Zend/zend_iterators.h
+++ b/Zend/zend_iterators.h
diff --git a/Zend/zend_language_parser.c b/Zend/zend_language_parser.c
index 353a10960..7b941accb 100644
--- a/Zend/zend_language_parser.c
+++ b/Zend/zend_language_parser.c
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,286 +52,23 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse zendparse
-#define yylex zendlex
-#define yyerror zenderror
-#define yylval zendlval
-#define yychar zendchar
-#define yydebug zenddebug
-#define yynerrs zendnerrs
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- END = 0,
- T_REQUIRE_ONCE = 258,
- T_REQUIRE = 259,
- T_EVAL = 260,
- T_INCLUDE_ONCE = 261,
- T_INCLUDE = 262,
- T_LOGICAL_OR = 263,
- T_LOGICAL_XOR = 264,
- T_LOGICAL_AND = 265,
- T_PRINT = 266,
- T_SR_EQUAL = 267,
- T_SL_EQUAL = 268,
- T_XOR_EQUAL = 269,
- T_OR_EQUAL = 270,
- T_AND_EQUAL = 271,
- T_MOD_EQUAL = 272,
- T_CONCAT_EQUAL = 273,
- T_DIV_EQUAL = 274,
- T_MUL_EQUAL = 275,
- T_MINUS_EQUAL = 276,
- T_PLUS_EQUAL = 277,
- T_BOOLEAN_OR = 278,
- T_BOOLEAN_AND = 279,
- T_IS_NOT_IDENTICAL = 280,
- T_IS_IDENTICAL = 281,
- T_IS_NOT_EQUAL = 282,
- T_IS_EQUAL = 283,
- T_IS_GREATER_OR_EQUAL = 284,
- T_IS_SMALLER_OR_EQUAL = 285,
- T_SR = 286,
- T_SL = 287,
- T_INSTANCEOF = 288,
- T_UNSET_CAST = 289,
- T_BOOL_CAST = 290,
- T_OBJECT_CAST = 291,
- T_ARRAY_CAST = 292,
- T_STRING_CAST = 293,
- T_DOUBLE_CAST = 294,
- T_INT_CAST = 295,
- T_DEC = 296,
- T_INC = 297,
- T_CLONE = 298,
- T_NEW = 299,
- T_EXIT = 300,
- T_IF = 301,
- T_ELSEIF = 302,
- T_ELSE = 303,
- T_ENDIF = 304,
- T_LNUMBER = 305,
- T_DNUMBER = 306,
- T_STRING = 307,
- T_STRING_VARNAME = 308,
- T_VARIABLE = 309,
- T_NUM_STRING = 310,
- T_INLINE_HTML = 311,
- T_CHARACTER = 312,
- T_BAD_CHARACTER = 313,
- T_ENCAPSED_AND_WHITESPACE = 314,
- T_CONSTANT_ENCAPSED_STRING = 315,
- T_ECHO = 316,
- T_DO = 317,
- T_WHILE = 318,
- T_ENDWHILE = 319,
- T_FOR = 320,
- T_ENDFOR = 321,
- T_FOREACH = 322,
- T_ENDFOREACH = 323,
- T_DECLARE = 324,
- T_ENDDECLARE = 325,
- T_AS = 326,
- T_SWITCH = 327,
- T_ENDSWITCH = 328,
- T_CASE = 329,
- T_DEFAULT = 330,
- T_BREAK = 331,
- T_CONTINUE = 332,
- T_GOTO = 333,
- T_FUNCTION = 334,
- T_CONST = 335,
- T_RETURN = 336,
- T_TRY = 337,
- T_CATCH = 338,
- T_THROW = 339,
- T_USE = 340,
- T_INSTEADOF = 341,
- T_GLOBAL = 342,
- T_PUBLIC = 343,
- T_PROTECTED = 344,
- T_PRIVATE = 345,
- T_FINAL = 346,
- T_ABSTRACT = 347,
- T_STATIC = 348,
- T_VAR = 349,
- T_UNSET = 350,
- T_ISSET = 351,
- T_EMPTY = 352,
- T_HALT_COMPILER = 353,
- T_CLASS = 354,
- T_TRAIT = 355,
- T_INTERFACE = 356,
- T_EXTENDS = 357,
- T_IMPLEMENTS = 358,
- T_OBJECT_OPERATOR = 359,
- T_DOUBLE_ARROW = 360,
- T_LIST = 361,
- T_ARRAY = 362,
- T_CALLABLE = 363,
- T_CLASS_C = 364,
- T_TRAIT_C = 365,
- T_METHOD_C = 366,
- T_FUNC_C = 367,
- T_LINE = 368,
- T_FILE = 369,
- T_COMMENT = 370,
- T_DOC_COMMENT = 371,
- T_OPEN_TAG = 372,
- T_OPEN_TAG_WITH_ECHO = 373,
- T_CLOSE_TAG = 374,
- T_WHITESPACE = 375,
- T_START_HEREDOC = 376,
- T_END_HEREDOC = 377,
- T_DOLLAR_OPEN_CURLY_BRACES = 378,
- T_CURLY_OPEN = 379,
- T_PAAMAYIM_NEKUDOTAYIM = 380,
- T_NAMESPACE = 381,
- T_NS_C = 382,
- T_DIR = 383,
- T_NS_SEPARATOR = 384
- };
-#endif
-/* Tokens. */
-#define END 0
-#define T_REQUIRE_ONCE 258
-#define T_REQUIRE 259
-#define T_EVAL 260
-#define T_INCLUDE_ONCE 261
-#define T_INCLUDE 262
-#define T_LOGICAL_OR 263
-#define T_LOGICAL_XOR 264
-#define T_LOGICAL_AND 265
-#define T_PRINT 266
-#define T_SR_EQUAL 267
-#define T_SL_EQUAL 268
-#define T_XOR_EQUAL 269
-#define T_OR_EQUAL 270
-#define T_AND_EQUAL 271
-#define T_MOD_EQUAL 272
-#define T_CONCAT_EQUAL 273
-#define T_DIV_EQUAL 274
-#define T_MUL_EQUAL 275
-#define T_MINUS_EQUAL 276
-#define T_PLUS_EQUAL 277
-#define T_BOOLEAN_OR 278
-#define T_BOOLEAN_AND 279
-#define T_IS_NOT_IDENTICAL 280
-#define T_IS_IDENTICAL 281
-#define T_IS_NOT_EQUAL 282
-#define T_IS_EQUAL 283
-#define T_IS_GREATER_OR_EQUAL 284
-#define T_IS_SMALLER_OR_EQUAL 285
-#define T_SR 286
-#define T_SL 287
-#define T_INSTANCEOF 288
-#define T_UNSET_CAST 289
-#define T_BOOL_CAST 290
-#define T_OBJECT_CAST 291
-#define T_ARRAY_CAST 292
-#define T_STRING_CAST 293
-#define T_DOUBLE_CAST 294
-#define T_INT_CAST 295
-#define T_DEC 296
-#define T_INC 297
-#define T_CLONE 298
-#define T_NEW 299
-#define T_EXIT 300
-#define T_IF 301
-#define T_ELSEIF 302
-#define T_ELSE 303
-#define T_ENDIF 304
-#define T_LNUMBER 305
-#define T_DNUMBER 306
-#define T_STRING 307
-#define T_STRING_VARNAME 308
-#define T_VARIABLE 309
-#define T_NUM_STRING 310
-#define T_INLINE_HTML 311
-#define T_CHARACTER 312
-#define T_BAD_CHARACTER 313
-#define T_ENCAPSED_AND_WHITESPACE 314
-#define T_CONSTANT_ENCAPSED_STRING 315
-#define T_ECHO 316
-#define T_DO 317
-#define T_WHILE 318
-#define T_ENDWHILE 319
-#define T_FOR 320
-#define T_ENDFOR 321
-#define T_FOREACH 322
-#define T_ENDFOREACH 323
-#define T_DECLARE 324
-#define T_ENDDECLARE 325
-#define T_AS 326
-#define T_SWITCH 327
-#define T_ENDSWITCH 328
-#define T_CASE 329
-#define T_DEFAULT 330
-#define T_BREAK 331
-#define T_CONTINUE 332
-#define T_GOTO 333
-#define T_FUNCTION 334
-#define T_CONST 335
-#define T_RETURN 336
-#define T_TRY 337
-#define T_CATCH 338
-#define T_THROW 339
-#define T_USE 340
-#define T_INSTEADOF 341
-#define T_GLOBAL 342
-#define T_PUBLIC 343
-#define T_PROTECTED 344
-#define T_PRIVATE 345
-#define T_FINAL 346
-#define T_ABSTRACT 347
-#define T_STATIC 348
-#define T_VAR 349
-#define T_UNSET 350
-#define T_ISSET 351
-#define T_EMPTY 352
-#define T_HALT_COMPILER 353
-#define T_CLASS 354
-#define T_TRAIT 355
-#define T_INTERFACE 356
-#define T_EXTENDS 357
-#define T_IMPLEMENTS 358
-#define T_OBJECT_OPERATOR 359
-#define T_DOUBLE_ARROW 360
-#define T_LIST 361
-#define T_ARRAY 362
-#define T_CALLABLE 363
-#define T_CLASS_C 364
-#define T_TRAIT_C 365
-#define T_METHOD_C 366
-#define T_FUNC_C 367
-#define T_LINE 368
-#define T_FILE 369
-#define T_COMMENT 370
-#define T_DOC_COMMENT 371
-#define T_OPEN_TAG 372
-#define T_OPEN_TAG_WITH_ECHO 373
-#define T_CLOSE_TAG 374
-#define T_WHITESPACE 375
-#define T_START_HEREDOC 376
-#define T_END_HEREDOC 377
-#define T_DOLLAR_OPEN_CURLY_BRACES 378
-#define T_CURLY_OPEN 379
-#define T_PAAMAYIM_NEKUDOTAYIM 380
-#define T_NAMESPACE 381
-#define T_NS_C 382
-#define T_DIR 383
-#define T_NS_SEPARATOR 384
-
-
+#define yyparse zendparse
+#define yylex zendlex
+#define yyerror zenderror
+#define yylval zendlval
+#define yychar zendchar
+#define yydebug zenddebug
+#define yynerrs zendnerrs
/* Copy the first part of user declarations. */
@@ -390,6 +124,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -408,20 +143,291 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ END = 0,
+ T_REQUIRE_ONCE = 258,
+ T_REQUIRE = 259,
+ T_EVAL = 260,
+ T_INCLUDE_ONCE = 261,
+ T_INCLUDE = 262,
+ T_LOGICAL_OR = 263,
+ T_LOGICAL_XOR = 264,
+ T_LOGICAL_AND = 265,
+ T_PRINT = 266,
+ T_YIELD = 267,
+ T_SR_EQUAL = 268,
+ T_SL_EQUAL = 269,
+ T_XOR_EQUAL = 270,
+ T_OR_EQUAL = 271,
+ T_AND_EQUAL = 272,
+ T_MOD_EQUAL = 273,
+ T_CONCAT_EQUAL = 274,
+ T_DIV_EQUAL = 275,
+ T_MUL_EQUAL = 276,
+ T_MINUS_EQUAL = 277,
+ T_PLUS_EQUAL = 278,
+ T_BOOLEAN_OR = 279,
+ T_BOOLEAN_AND = 280,
+ T_IS_NOT_IDENTICAL = 281,
+ T_IS_IDENTICAL = 282,
+ T_IS_NOT_EQUAL = 283,
+ T_IS_EQUAL = 284,
+ T_IS_GREATER_OR_EQUAL = 285,
+ T_IS_SMALLER_OR_EQUAL = 286,
+ T_SR = 287,
+ T_SL = 288,
+ T_INSTANCEOF = 289,
+ T_UNSET_CAST = 290,
+ T_BOOL_CAST = 291,
+ T_OBJECT_CAST = 292,
+ T_ARRAY_CAST = 293,
+ T_STRING_CAST = 294,
+ T_DOUBLE_CAST = 295,
+ T_INT_CAST = 296,
+ T_DEC = 297,
+ T_INC = 298,
+ T_CLONE = 299,
+ T_NEW = 300,
+ T_EXIT = 301,
+ T_IF = 302,
+ T_ELSEIF = 303,
+ T_ELSE = 304,
+ T_ENDIF = 305,
+ T_LNUMBER = 306,
+ T_DNUMBER = 307,
+ T_STRING = 308,
+ T_STRING_VARNAME = 309,
+ T_VARIABLE = 310,
+ T_NUM_STRING = 311,
+ T_INLINE_HTML = 312,
+ T_CHARACTER = 313,
+ T_BAD_CHARACTER = 314,
+ T_ENCAPSED_AND_WHITESPACE = 315,
+ T_CONSTANT_ENCAPSED_STRING = 316,
+ T_ECHO = 317,
+ T_DO = 318,
+ T_WHILE = 319,
+ T_ENDWHILE = 320,
+ T_FOR = 321,
+ T_ENDFOR = 322,
+ T_FOREACH = 323,
+ T_ENDFOREACH = 324,
+ T_DECLARE = 325,
+ T_ENDDECLARE = 326,
+ T_AS = 327,
+ T_SWITCH = 328,
+ T_ENDSWITCH = 329,
+ T_CASE = 330,
+ T_DEFAULT = 331,
+ T_BREAK = 332,
+ T_CONTINUE = 333,
+ T_GOTO = 334,
+ T_FUNCTION = 335,
+ T_CONST = 336,
+ T_RETURN = 337,
+ T_TRY = 338,
+ T_CATCH = 339,
+ T_FINALLY = 340,
+ T_THROW = 341,
+ T_USE = 342,
+ T_INSTEADOF = 343,
+ T_GLOBAL = 344,
+ T_PUBLIC = 345,
+ T_PROTECTED = 346,
+ T_PRIVATE = 347,
+ T_FINAL = 348,
+ T_ABSTRACT = 349,
+ T_STATIC = 350,
+ T_VAR = 351,
+ T_UNSET = 352,
+ T_ISSET = 353,
+ T_EMPTY = 354,
+ T_HALT_COMPILER = 355,
+ T_CLASS = 356,
+ T_TRAIT = 357,
+ T_INTERFACE = 358,
+ T_EXTENDS = 359,
+ T_IMPLEMENTS = 360,
+ T_OBJECT_OPERATOR = 361,
+ T_DOUBLE_ARROW = 362,
+ T_LIST = 363,
+ T_ARRAY = 364,
+ T_CALLABLE = 365,
+ T_CLASS_C = 366,
+ T_TRAIT_C = 367,
+ T_METHOD_C = 368,
+ T_FUNC_C = 369,
+ T_LINE = 370,
+ T_FILE = 371,
+ T_COMMENT = 372,
+ T_DOC_COMMENT = 373,
+ T_OPEN_TAG = 374,
+ T_OPEN_TAG_WITH_ECHO = 375,
+ T_CLOSE_TAG = 376,
+ T_WHITESPACE = 377,
+ T_START_HEREDOC = 378,
+ T_END_HEREDOC = 379,
+ T_DOLLAR_OPEN_CURLY_BRACES = 380,
+ T_CURLY_OPEN = 381,
+ T_PAAMAYIM_NEKUDOTAYIM = 382,
+ T_NAMESPACE = 383,
+ T_NS_C = 384,
+ T_DIR = 385,
+ T_NS_SEPARATOR = 386
+ };
+#endif
+/* Tokens. */
+#define END 0
+#define T_REQUIRE_ONCE 258
+#define T_REQUIRE 259
+#define T_EVAL 260
+#define T_INCLUDE_ONCE 261
+#define T_INCLUDE 262
+#define T_LOGICAL_OR 263
+#define T_LOGICAL_XOR 264
+#define T_LOGICAL_AND 265
+#define T_PRINT 266
+#define T_YIELD 267
+#define T_SR_EQUAL 268
+#define T_SL_EQUAL 269
+#define T_XOR_EQUAL 270
+#define T_OR_EQUAL 271
+#define T_AND_EQUAL 272
+#define T_MOD_EQUAL 273
+#define T_CONCAT_EQUAL 274
+#define T_DIV_EQUAL 275
+#define T_MUL_EQUAL 276
+#define T_MINUS_EQUAL 277
+#define T_PLUS_EQUAL 278
+#define T_BOOLEAN_OR 279
+#define T_BOOLEAN_AND 280
+#define T_IS_NOT_IDENTICAL 281
+#define T_IS_IDENTICAL 282
+#define T_IS_NOT_EQUAL 283
+#define T_IS_EQUAL 284
+#define T_IS_GREATER_OR_EQUAL 285
+#define T_IS_SMALLER_OR_EQUAL 286
+#define T_SR 287
+#define T_SL 288
+#define T_INSTANCEOF 289
+#define T_UNSET_CAST 290
+#define T_BOOL_CAST 291
+#define T_OBJECT_CAST 292
+#define T_ARRAY_CAST 293
+#define T_STRING_CAST 294
+#define T_DOUBLE_CAST 295
+#define T_INT_CAST 296
+#define T_DEC 297
+#define T_INC 298
+#define T_CLONE 299
+#define T_NEW 300
+#define T_EXIT 301
+#define T_IF 302
+#define T_ELSEIF 303
+#define T_ELSE 304
+#define T_ENDIF 305
+#define T_LNUMBER 306
+#define T_DNUMBER 307
+#define T_STRING 308
+#define T_STRING_VARNAME 309
+#define T_VARIABLE 310
+#define T_NUM_STRING 311
+#define T_INLINE_HTML 312
+#define T_CHARACTER 313
+#define T_BAD_CHARACTER 314
+#define T_ENCAPSED_AND_WHITESPACE 315
+#define T_CONSTANT_ENCAPSED_STRING 316
+#define T_ECHO 317
+#define T_DO 318
+#define T_WHILE 319
+#define T_ENDWHILE 320
+#define T_FOR 321
+#define T_ENDFOR 322
+#define T_FOREACH 323
+#define T_ENDFOREACH 324
+#define T_DECLARE 325
+#define T_ENDDECLARE 326
+#define T_AS 327
+#define T_SWITCH 328
+#define T_ENDSWITCH 329
+#define T_CASE 330
+#define T_DEFAULT 331
+#define T_BREAK 332
+#define T_CONTINUE 333
+#define T_GOTO 334
+#define T_FUNCTION 335
+#define T_CONST 336
+#define T_RETURN 337
+#define T_TRY 338
+#define T_CATCH 339
+#define T_FINALLY 340
+#define T_THROW 341
+#define T_USE 342
+#define T_INSTEADOF 343
+#define T_GLOBAL 344
+#define T_PUBLIC 345
+#define T_PROTECTED 346
+#define T_PRIVATE 347
+#define T_FINAL 348
+#define T_ABSTRACT 349
+#define T_STATIC 350
+#define T_VAR 351
+#define T_UNSET 352
+#define T_ISSET 353
+#define T_EMPTY 354
+#define T_HALT_COMPILER 355
+#define T_CLASS 356
+#define T_TRAIT 357
+#define T_INTERFACE 358
+#define T_EXTENDS 359
+#define T_IMPLEMENTS 360
+#define T_OBJECT_OPERATOR 361
+#define T_DOUBLE_ARROW 362
+#define T_LIST 363
+#define T_ARRAY 364
+#define T_CALLABLE 365
+#define T_CLASS_C 366
+#define T_TRAIT_C 367
+#define T_METHOD_C 368
+#define T_FUNC_C 369
+#define T_LINE 370
+#define T_FILE 371
+#define T_COMMENT 372
+#define T_DOC_COMMENT 373
+#define T_OPEN_TAG 374
+#define T_OPEN_TAG_WITH_ECHO 375
+#define T_CLOSE_TAG 376
+#define T_WHITESPACE 377
+#define T_START_HEREDOC 378
+#define T_END_HEREDOC 379
+#define T_DOLLAR_OPEN_CURLY_BRACES 380
+#define T_CURLY_OPEN 381
+#define T_PAAMAYIM_NEKUDOTAYIM 382
+#define T_NAMESPACE 383
+#define T_NS_C 384
+#define T_DIR 385
+#define T_NS_SEPARATOR 386
+
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-
#ifdef short
# undef short
@@ -496,14 +502,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -524,11 +530,11 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -551,24 +557,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -584,9 +590,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -597,6 +603,27 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
@@ -614,42 +641,25 @@ union yyalloc
while (YYID (0))
# endif
# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
+#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 5312
+#define YYLAST 5133
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 158
+#define YYNTOKENS 160
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 206
+#define YYNNTS 216
/* YYNRULES -- Number of rules. */
-#define YYNRULES 516
+#define YYNRULES 541
/* YYNRULES -- Number of states. */
-#define YYNSTATES 983
+#define YYNSTATES 998
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 384
+#define YYMAXUTOK 386
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -660,16 +670,16 @@ static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 48, 157, 2, 154, 47, 31, 2,
- 149, 150, 45, 42, 8, 43, 44, 46, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 26, 151,
- 36, 13, 37, 25, 51, 2, 2, 2, 2, 2,
+ 2, 2, 2, 49, 159, 2, 156, 48, 32, 2,
+ 151, 152, 46, 43, 8, 44, 45, 47, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 27, 153,
+ 37, 14, 38, 26, 52, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 61, 2, 155, 30, 2, 156, 2, 2, 2,
+ 2, 62, 2, 157, 31, 2, 158, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 152, 29, 153, 50, 2, 2, 2,
+ 2, 2, 2, 154, 30, 155, 51, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -683,10 +693,10 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 9, 10, 11, 12, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 27, 28,
- 32, 33, 34, 35, 38, 39, 40, 41, 49, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 62, 63,
+ 5, 6, 7, 9, 10, 11, 12, 13, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 28,
+ 29, 33, 34, 35, 36, 39, 40, 41, 42, 50,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
@@ -695,7 +705,7 @@ static const yytype_uint8 yytranslate[] =
114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148
+ 144, 145, 146, 147, 148, 149, 150
};
#if YYDEBUG
@@ -707,284 +717,295 @@ static const yytype_uint16 yyprhs[] =
21, 23, 28, 32, 33, 40, 41, 47, 51, 54,
58, 60, 62, 66, 69, 74, 80, 85, 86, 90,
91, 93, 95, 97, 102, 104, 107, 111, 112, 113,
- 123, 124, 125, 138, 139, 140, 148, 149, 150, 160,
- 161, 162, 163, 176, 177, 184, 187, 191, 194, 198,
- 201, 205, 209, 213, 217, 221, 223, 226, 232, 233,
- 234, 245, 246, 247, 258, 259, 266, 268, 269, 270,
- 271, 272, 273, 292, 296, 300, 302, 303, 305, 308,
- 309, 310, 321, 323, 327, 329, 331, 333, 334, 336,
- 337, 348, 349, 358, 359, 367, 369, 372, 374, 377,
- 378, 381, 383, 384, 387, 388, 391, 393, 397, 398,
- 401, 403, 406, 408, 413, 415, 420, 422, 427, 431,
- 437, 441, 446, 451, 457, 458, 459, 466, 467, 473,
- 475, 477, 479, 484, 485, 486, 494, 495, 496, 505,
- 506, 509, 510, 514, 516, 517, 520, 524, 530, 535,
- 540, 546, 554, 561, 562, 564, 566, 568, 570, 571,
- 573, 575, 578, 582, 586, 591, 595, 597, 599, 602,
- 607, 611, 617, 619, 623, 626, 627, 628, 633, 636,
- 638, 639, 649, 653, 655, 659, 661, 665, 666, 668,
- 670, 673, 676, 679, 683, 685, 689, 691, 693, 697,
- 702, 706, 707, 709, 711, 715, 717, 719, 720, 722,
- 724, 727, 729, 731, 733, 735, 737, 739, 743, 749,
- 751, 755, 761, 766, 770, 772, 773, 775, 776, 781,
- 783, 786, 788, 793, 797, 798, 802, 804, 806, 807,
- 808, 811, 812, 817, 818, 826, 830, 835, 836, 844,
- 847, 851, 855, 859, 863, 867, 871, 875, 879, 883,
- 887, 891, 894, 897, 900, 903, 904, 909, 910, 915,
- 916, 921, 922, 927, 931, 935, 939, 943, 947, 951,
- 955, 959, 963, 967, 971, 975, 978, 981, 984, 987,
- 991, 995, 999, 1003, 1007, 1011, 1015, 1019, 1023, 1027,
- 1029, 1030, 1036, 1037, 1038, 1046, 1047, 1053, 1055, 1058,
- 1061, 1064, 1067, 1070, 1073, 1076, 1079, 1080, 1084, 1086,
- 1091, 1095, 1099, 1102, 1103, 1114, 1115, 1127, 1129, 1130,
- 1135, 1139, 1144, 1146, 1149, 1150, 1156, 1157, 1165, 1166,
- 1173, 1174, 1182, 1183, 1191, 1192, 1200, 1201, 1209, 1210,
- 1216, 1218, 1220, 1224, 1227, 1229, 1233, 1236, 1238, 1240,
- 1241, 1242, 1249, 1251, 1254, 1255, 1258, 1259, 1262, 1266,
- 1267, 1269, 1271, 1272, 1276, 1278, 1280, 1282, 1284, 1286,
- 1288, 1290, 1292, 1294, 1296, 1300, 1303, 1305, 1307, 1311,
- 1314, 1317, 1320, 1325, 1329, 1331, 1333, 1337, 1339, 1341,
- 1343, 1347, 1350, 1352, 1356, 1360, 1362, 1363, 1366, 1367,
- 1369, 1375, 1379, 1383, 1385, 1387, 1389, 1391, 1393, 1395,
- 1396, 1397, 1405, 1407, 1410, 1411, 1412, 1417, 1422, 1427,
- 1428, 1433, 1435, 1437, 1438, 1440, 1443, 1447, 1451, 1453,
- 1458, 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1483,
- 1488, 1490, 1492, 1497, 1498, 1500, 1502, 1503, 1506, 1511,
- 1516, 1518, 1520, 1524, 1526, 1529, 1533, 1535, 1537, 1538,
- 1544, 1545, 1546, 1549, 1555, 1559, 1563, 1565, 1572, 1577,
- 1582, 1585, 1588, 1591, 1593, 1596, 1598, 1599, 1605, 1609,
- 1613, 1620, 1624, 1626, 1628, 1630, 1635, 1640, 1643, 1646,
- 1651, 1654, 1657, 1659, 1660, 1665, 1669
+ 121, 122, 123, 134, 135, 136, 142, 143, 144, 152,
+ 153, 154, 155, 168, 169, 174, 177, 181, 184, 188,
+ 191, 195, 199, 202, 206, 210, 214, 216, 219, 225,
+ 226, 227, 238, 239, 240, 251, 252, 259, 261, 262,
+ 263, 272, 276, 280, 281, 282, 283, 284, 285, 299,
+ 300, 301, 307, 309, 310, 312, 315, 316, 317, 328,
+ 330, 334, 336, 338, 340, 341, 343, 344, 355, 356,
+ 365, 366, 374, 376, 379, 381, 384, 385, 388, 390,
+ 391, 394, 395, 398, 400, 404, 405, 408, 410, 413,
+ 414, 420, 422, 427, 429, 434, 436, 441, 445, 451,
+ 455, 460, 465, 471, 472, 473, 480, 481, 487, 489,
+ 491, 493, 498, 499, 500, 506, 507, 508, 515, 516,
+ 519, 520, 524, 526, 527, 530, 534, 540, 545, 550,
+ 556, 564, 571, 572, 574, 576, 578, 581, 585, 589,
+ 591, 593, 596, 600, 604, 609, 613, 615, 617, 620,
+ 625, 629, 635, 637, 641, 644, 645, 646, 651, 654,
+ 656, 657, 667, 671, 673, 677, 679, 683, 684, 686,
+ 688, 691, 694, 697, 701, 703, 707, 709, 711, 715,
+ 720, 724, 725, 727, 729, 733, 735, 737, 738, 740,
+ 742, 745, 747, 749, 751, 753, 755, 757, 761, 767,
+ 769, 773, 779, 784, 788, 790, 791, 793, 794, 799,
+ 801, 804, 806, 811, 815, 816, 820, 822, 824, 825,
+ 826, 829, 830, 835, 836, 844, 848, 853, 854, 862,
+ 865, 869, 873, 877, 881, 885, 889, 893, 897, 901,
+ 905, 909, 912, 915, 918, 921, 922, 927, 928, 933,
+ 934, 939, 940, 945, 949, 953, 957, 961, 965, 969,
+ 973, 977, 981, 985, 989, 993, 996, 999, 1002, 1005,
+ 1009, 1013, 1017, 1021, 1025, 1029, 1033, 1037, 1041, 1043,
+ 1045, 1046, 1052, 1053, 1054, 1062, 1063, 1069, 1071, 1074,
+ 1077, 1080, 1083, 1086, 1089, 1092, 1095, 1096, 1100, 1102,
+ 1104, 1106, 1110, 1113, 1115, 1116, 1127, 1128, 1140, 1143,
+ 1146, 1151, 1156, 1161, 1166, 1171, 1176, 1180, 1182, 1183,
+ 1188, 1192, 1197, 1199, 1202, 1203, 1207, 1208, 1214, 1215,
+ 1220, 1221, 1227, 1228, 1234, 1235, 1241, 1242, 1248, 1249,
+ 1253, 1255, 1257, 1261, 1264, 1266, 1270, 1273, 1275, 1277,
+ 1278, 1279, 1286, 1288, 1291, 1292, 1295, 1296, 1299, 1301,
+ 1302, 1304, 1306, 1307, 1309, 1311, 1313, 1315, 1317, 1319,
+ 1321, 1323, 1325, 1327, 1329, 1333, 1336, 1338, 1340, 1344,
+ 1347, 1350, 1353, 1358, 1362, 1364, 1366, 1370, 1372, 1374,
+ 1376, 1380, 1383, 1385, 1389, 1393, 1395, 1396, 1399, 1400,
+ 1402, 1408, 1412, 1416, 1418, 1420, 1422, 1426, 1430, 1432,
+ 1434, 1436, 1437, 1438, 1446, 1448, 1451, 1452, 1453, 1458,
+ 1463, 1468, 1469, 1472, 1474, 1476, 1477, 1479, 1482, 1486,
+ 1490, 1492, 1497, 1498, 1504, 1506, 1508, 1510, 1512, 1515,
+ 1517, 1522, 1527, 1529, 1531, 1536, 1537, 1539, 1541, 1542,
+ 1545, 1550, 1555, 1557, 1559, 1563, 1565, 1568, 1572, 1574,
+ 1576, 1577, 1583, 1584, 1585, 1588, 1594, 1598, 1602, 1604,
+ 1611, 1616, 1621, 1624, 1627, 1630, 1632, 1635, 1637, 1638,
+ 1644, 1648, 1652, 1659, 1663, 1665, 1667, 1669, 1674, 1679,
+ 1684, 1687, 1690, 1695, 1698, 1701, 1703, 1704, 1709, 1711,
+ 1713, 1717
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 159, 0, -1, 160, -1, -1, 160, 161, 163, -1,
- -1, 71, -1, 162, 148, 71, -1, 172, -1, 203,
- -1, 204, -1, 117, 149, 150, 151, -1, 145, 162,
- 151, -1, -1, 145, 162, 152, 164, 160, 153, -1,
- -1, 145, 152, 165, 160, 153, -1, 104, 166, 151,
- -1, 168, 151, -1, 166, 8, 167, -1, 167, -1,
- 162, -1, 162, 90, 71, -1, 148, 162, -1, 148,
- 162, 90, 71, -1, 168, 8, 71, 13, 316, -1,
- 99, 71, 13, 316, -1, -1, 169, 170, 171, -1,
- -1, 172, -1, 203, -1, 204, -1, 117, 149, 150,
- 151, -1, 173, -1, 71, 26, -1, 152, 169, 153,
- -1, -1, -1, 65, 149, 322, 150, 174, 172, 175,
- 229, 233, -1, -1, -1, 65, 149, 322, 150, 26,
- 176, 169, 177, 231, 234, 68, 151, -1, -1, -1,
- 82, 149, 178, 322, 150, 179, 228, -1, -1, -1,
- 81, 180, 172, 82, 149, 181, 322, 150, 151, -1,
- -1, -1, -1, 84, 149, 267, 151, 182, 267, 151,
- 183, 267, 150, 184, 219, -1, -1, 91, 149, 322,
- 150, 185, 223, -1, 95, 151, -1, 95, 322, 151,
- -1, 96, 151, -1, 96, 322, 151, -1, 100, 151,
- -1, 100, 278, 151, -1, 100, 326, 151, -1, 106,
- 240, 151, -1, 112, 242, 151, -1, 80, 266, 151,
- -1, 75, -1, 322, 151, -1, 114, 149, 201, 150,
- 151, -1, -1, -1, 86, 149, 326, 90, 186, 218,
- 217, 150, 187, 220, -1, -1, -1, 86, 149, 278,
- 90, 188, 326, 217, 150, 189, 220, -1, -1, 88,
- 190, 149, 222, 150, 221, -1, 151, -1, -1, -1,
- -1, -1, -1, 101, 191, 152, 169, 153, 102, 149,
- 192, 305, 193, 73, 150, 194, 152, 169, 153, 195,
- 196, -1, 103, 322, 151, -1, 97, 71, 151, -1,
- 197, -1, -1, 198, -1, 197, 198, -1, -1, -1,
- 102, 149, 305, 199, 73, 150, 200, 152, 169, 153,
- -1, 202, -1, 201, 8, 202, -1, 326, -1, 206,
- -1, 208, -1, -1, 31, -1, -1, 292, 205, 71,
- 207, 149, 235, 150, 152, 169, 153, -1, -1, 211,
- 71, 212, 209, 215, 152, 243, 153, -1, -1, 213,
- 71, 210, 214, 152, 243, 153, -1, 118, -1, 111,
- 118, -1, 119, -1, 110, 118, -1, -1, 121, 305,
- -1, 120, -1, -1, 121, 216, -1, -1, 122, 216,
- -1, 305, -1, 216, 8, 305, -1, -1, 124, 218,
- -1, 326, -1, 31, 326, -1, 172, -1, 26, 169,
- 85, 151, -1, 172, -1, 26, 169, 87, 151, -1,
- 172, -1, 26, 169, 89, 151, -1, 71, 13, 316,
- -1, 222, 8, 71, 13, 316, -1, 152, 224, 153,
- -1, 152, 151, 224, 153, -1, 26, 224, 92, 151,
- -1, 26, 151, 224, 92, 151, -1, -1, -1, 224,
- 93, 322, 227, 225, 169, -1, -1, 224, 94, 227,
- 226, 169, -1, 26, -1, 151, -1, 172, -1, 26,
- 169, 83, 151, -1, -1, -1, 229, 66, 149, 322,
- 150, 230, 172, -1, -1, -1, 231, 66, 149, 322,
- 150, 26, 232, 169, -1, -1, 67, 172, -1, -1,
- 67, 26, 169, -1, 236, -1, -1, 237, 73, -1,
- 237, 31, 73, -1, 237, 31, 73, 13, 316, -1,
- 237, 73, 13, 316, -1, 236, 8, 237, 73, -1,
- 236, 8, 237, 31, 73, -1, 236, 8, 237, 31,
- 73, 13, 316, -1, 236, 8, 237, 73, 13, 316,
- -1, -1, 126, -1, 127, -1, 305, -1, 239, -1,
- -1, 278, -1, 326, -1, 31, 324, -1, 239, 8,
- 278, -1, 239, 8, 326, -1, 239, 8, 31, 324,
- -1, 240, 8, 241, -1, 241, -1, 73, -1, 154,
- 323, -1, 154, 152, 322, 153, -1, 242, 8, 73,
- -1, 242, 8, 73, 13, 316, -1, 73, -1, 73,
- 13, 316, -1, 243, 244, -1, -1, -1, 260, 245,
- 264, 151, -1, 265, 151, -1, 247, -1, -1, 261,
- 292, 205, 71, 246, 149, 235, 150, 259, -1, 104,
- 248, 249, -1, 305, -1, 248, 8, 305, -1, 151,
- -1, 152, 250, 153, -1, -1, 251, -1, 252, -1,
- 251, 252, -1, 253, 151, -1, 257, 151, -1, 256,
- 105, 254, -1, 305, -1, 254, 8, 305, -1, 71,
- -1, 256, -1, 305, 144, 71, -1, 255, 90, 258,
- 71, -1, 255, 90, 263, -1, -1, 263, -1, 151,
- -1, 152, 169, 153, -1, 262, -1, 113, -1, -1,
- 262, -1, 263, -1, 262, 263, -1, 107, -1, 108,
- -1, 109, -1, 112, -1, 111, -1, 110, -1, 264,
- 8, 73, -1, 264, 8, 73, 13, 316, -1, 73,
- -1, 73, 13, 316, -1, 265, 8, 71, 13, 316,
- -1, 99, 71, 13, 316, -1, 266, 8, 322, -1,
- 322, -1, -1, 268, -1, -1, 268, 8, 269, 322,
- -1, 322, -1, 270, 330, -1, 330, -1, 271, 61,
- 345, 155, -1, 61, 345, 155, -1, -1, 271, 273,
- 270, -1, 271, -1, 270, -1, -1, -1, 275, 272,
- -1, -1, 63, 306, 277, 314, -1, -1, 125, 149,
- 279, 351, 150, 13, 322, -1, 326, 13, 322, -1,
- 326, 13, 31, 326, -1, -1, 326, 13, 31, 63,
- 306, 280, 314, -1, 62, 322, -1, 326, 24, 322,
- -1, 326, 23, 322, -1, 326, 22, 322, -1, 326,
- 21, 322, -1, 326, 20, 322, -1, 326, 19, 322,
- -1, 326, 18, 322, -1, 326, 17, 322, -1, 326,
- 16, 322, -1, 326, 15, 322, -1, 326, 14, 322,
- -1, 325, 60, -1, 60, 325, -1, 325, 59, -1,
- 59, 325, -1, -1, 322, 27, 281, 322, -1, -1,
- 322, 28, 282, 322, -1, -1, 322, 9, 283, 322,
- -1, -1, 322, 11, 284, 322, -1, 322, 10, 322,
- -1, 322, 29, 322, -1, 322, 31, 322, -1, 322,
- 30, 322, -1, 322, 44, 322, -1, 322, 42, 322,
- -1, 322, 43, 322, -1, 322, 45, 322, -1, 322,
- 46, 322, -1, 322, 47, 322, -1, 322, 41, 322,
- -1, 322, 40, 322, -1, 42, 322, -1, 43, 322,
- -1, 48, 322, -1, 50, 322, -1, 322, 33, 322,
- -1, 322, 32, 322, -1, 322, 35, 322, -1, 322,
- 34, 322, -1, 322, 36, 322, -1, 322, 39, 322,
- -1, 322, 37, 322, -1, 322, 38, 322, -1, 322,
- 49, 306, -1, 149, 322, 150, -1, 276, -1, -1,
- 149, 276, 150, 285, 274, -1, -1, -1, 322, 25,
- 286, 322, 26, 287, 322, -1, -1, 322, 25, 26,
- 288, 322, -1, 360, -1, 58, 322, -1, 57, 322,
- -1, 56, 322, -1, 55, 322, -1, 54, 322, -1,
- 53, 322, -1, 52, 322, -1, 64, 312, -1, -1,
- 51, 289, 322, -1, 318, -1, 126, 149, 354, 150,
- -1, 61, 354, 155, -1, 156, 313, 156, -1, 12,
- 322, -1, -1, 292, 205, 149, 290, 235, 150, 293,
- 152, 169, 153, -1, -1, 112, 292, 205, 149, 291,
- 235, 150, 293, 152, 169, 153, -1, 98, -1, -1,
- 104, 149, 294, 150, -1, 294, 8, 73, -1, 294,
- 8, 31, 73, -1, 73, -1, 31, 73, -1, -1,
- 162, 149, 296, 238, 150, -1, -1, 145, 148, 162,
- 149, 297, 238, 150, -1, -1, 148, 162, 149, 298,
- 238, 150, -1, -1, 304, 144, 349, 149, 299, 238,
- 150, -1, -1, 304, 144, 336, 149, 300, 238, 150,
- -1, -1, 338, 144, 349, 149, 301, 238, 150, -1,
- -1, 338, 144, 336, 149, 302, 238, 150, -1, -1,
- 336, 149, 303, 238, 150, -1, 112, -1, 162, -1,
- 145, 148, 162, -1, 148, 162, -1, 162, -1, 145,
- 148, 162, -1, 148, 162, -1, 304, -1, 307, -1,
- -1, -1, 342, 123, 308, 346, 309, 310, -1, 342,
- -1, 310, 311, -1, -1, 123, 346, -1, -1, 149,
- 150, -1, 149, 322, 150, -1, -1, 78, -1, 356,
- -1, -1, 149, 238, 150, -1, 69, -1, 70, -1,
- 79, -1, 132, -1, 133, -1, 147, -1, 129, -1,
- 130, -1, 131, -1, 146, -1, 140, 78, 141, -1,
- 140, 141, -1, 315, -1, 162, -1, 145, 148, 162,
- -1, 148, 162, -1, 42, 316, -1, 43, 316, -1,
- 126, 149, 319, 150, -1, 61, 319, 155, -1, 317,
- -1, 128, -1, 304, 144, 71, -1, 72, -1, 363,
- -1, 162, -1, 145, 148, 162, -1, 148, 162, -1,
- 315, -1, 157, 356, 157, -1, 140, 356, 141, -1,
- 128, -1, -1, 321, 320, -1, -1, 8, -1, 321,
- 8, 316, 124, 316, -1, 321, 8, 316, -1, 316,
- 124, 316, -1, 316, -1, 323, -1, 278, -1, 326,
- -1, 326, -1, 326, -1, -1, -1, 341, 123, 327,
- 346, 328, 335, 329, -1, 341, -1, 329, 330, -1,
- -1, -1, 123, 346, 331, 335, -1, 332, 61, 345,
- 155, -1, 333, 61, 345, 155, -1, -1, 149, 334,
- 238, 150, -1, 333, -1, 332, -1, -1, 343, -1,
- 350, 343, -1, 304, 144, 336, -1, 338, 144, 336,
- -1, 343, -1, 339, 61, 345, 155, -1, -1, 295,
- 340, 61, 345, 155, -1, 342, -1, 339, -1, 295,
- -1, 343, -1, 350, 343, -1, 337, -1, 343, 61,
- 345, 155, -1, 343, 152, 322, 153, -1, 344, -1,
- 73, -1, 154, 152, 322, 153, -1, -1, 322, -1,
- 348, -1, -1, 336, 347, -1, 348, 61, 345, 155,
- -1, 348, 152, 322, 153, -1, 349, -1, 71, -1,
- 152, 322, 153, -1, 154, -1, 350, 154, -1, 351,
- 8, 352, -1, 352, -1, 326, -1, -1, 125, 149,
- 353, 351, 150, -1, -1, -1, 355, 320, -1, 355,
- 8, 322, 124, 322, -1, 355, 8, 322, -1, 322,
- 124, 322, -1, 322, -1, 355, 8, 322, 124, 31,
- 324, -1, 355, 8, 31, 324, -1, 322, 124, 31,
- 324, -1, 31, 324, -1, 356, 357, -1, 356, 78,
- -1, 357, -1, 78, 357, -1, 73, -1, -1, 73,
- 61, 358, 359, 155, -1, 73, 123, 71, -1, 142,
- 322, 153, -1, 142, 72, 61, 322, 155, 153, -1,
- 143, 326, 153, -1, 71, -1, 74, -1, 73, -1,
- 115, 149, 361, 150, -1, 116, 149, 326, 150, -1,
- 7, 322, -1, 6, 322, -1, 5, 149, 322, 150,
- -1, 4, 322, -1, 3, 322, -1, 326, -1, -1,
- 361, 8, 362, 326, -1, 304, 144, 71, -1, 338,
- 144, 71, -1
+ 161, 0, -1, 162, -1, -1, 162, 163, 165, -1,
+ -1, 72, -1, 164, 150, 72, -1, 174, -1, 209,
+ -1, 210, -1, 119, 151, 152, 153, -1, 147, 164,
+ 153, -1, -1, 147, 164, 154, 166, 162, 155, -1,
+ -1, 147, 154, 167, 162, 155, -1, 106, 168, 153,
+ -1, 170, 153, -1, 168, 8, 169, -1, 169, -1,
+ 164, -1, 164, 91, 72, -1, 150, 164, -1, 150,
+ 164, 91, 72, -1, 170, 8, 72, 14, 326, -1,
+ 100, 72, 14, 326, -1, -1, 171, 172, 173, -1,
+ -1, 174, -1, 209, -1, 210, -1, 119, 151, 152,
+ 153, -1, 175, -1, 72, 27, -1, 154, 171, 155,
+ -1, -1, -1, 66, 333, 176, 174, 177, 236, 240,
+ -1, -1, -1, 66, 333, 27, 178, 171, 179, 238,
+ 241, 69, 153, -1, -1, -1, 83, 180, 333, 181,
+ 235, -1, -1, -1, 82, 182, 174, 83, 183, 333,
+ 153, -1, -1, -1, -1, 85, 151, 274, 153, 184,
+ 274, 153, 185, 274, 152, 186, 226, -1, -1, 92,
+ 333, 187, 230, -1, 96, 153, -1, 96, 332, 153,
+ -1, 97, 153, -1, 97, 332, 153, -1, 101, 153,
+ -1, 101, 285, 153, -1, 101, 337, 153, -1, 299,
+ 153, -1, 108, 247, 153, -1, 114, 249, 153, -1,
+ 81, 273, 153, -1, 76, -1, 332, 153, -1, 116,
+ 151, 207, 152, 153, -1, -1, -1, 87, 151, 337,
+ 91, 188, 224, 223, 152, 189, 227, -1, -1, -1,
+ 87, 151, 285, 91, 190, 224, 223, 152, 191, 227,
+ -1, -1, 89, 192, 151, 229, 152, 228, -1, 153,
+ -1, -1, -1, 102, 193, 154, 171, 155, 195, 194,
+ 200, -1, 105, 332, 153, -1, 98, 72, 153, -1,
+ -1, -1, -1, -1, -1, 103, 151, 196, 315, 197,
+ 74, 152, 198, 154, 171, 155, 199, 202, -1, -1,
+ -1, 104, 201, 154, 171, 155, -1, 203, -1, -1,
+ 204, -1, 203, 204, -1, -1, -1, 103, 151, 315,
+ 205, 74, 152, 206, 154, 171, 155, -1, 208, -1,
+ 207, 8, 208, -1, 337, -1, 212, -1, 214, -1,
+ -1, 32, -1, -1, 302, 211, 72, 213, 151, 242,
+ 152, 154, 171, 155, -1, -1, 217, 72, 218, 215,
+ 221, 154, 250, 155, -1, -1, 219, 72, 216, 220,
+ 154, 250, 155, -1, 120, -1, 113, 120, -1, 121,
+ -1, 112, 120, -1, -1, 123, 315, -1, 122, -1,
+ -1, 123, 222, -1, -1, 124, 222, -1, 315, -1,
+ 222, 8, 315, -1, -1, 126, 224, -1, 337, -1,
+ 32, 337, -1, -1, 127, 151, 225, 362, 152, -1,
+ 174, -1, 27, 171, 86, 153, -1, 174, -1, 27,
+ 171, 88, 153, -1, 174, -1, 27, 171, 90, 153,
+ -1, 72, 14, 326, -1, 229, 8, 72, 14, 326,
+ -1, 154, 231, 155, -1, 154, 153, 231, 155, -1,
+ 27, 231, 93, 153, -1, 27, 153, 231, 93, 153,
+ -1, -1, -1, 231, 94, 332, 234, 232, 171, -1,
+ -1, 231, 95, 234, 233, 171, -1, 27, -1, 153,
+ -1, 174, -1, 27, 171, 84, 153, -1, -1, -1,
+ 236, 67, 333, 237, 174, -1, -1, -1, 238, 67,
+ 333, 27, 239, 171, -1, -1, 68, 174, -1, -1,
+ 68, 27, 171, -1, 243, -1, -1, 244, 74, -1,
+ 244, 32, 74, -1, 244, 32, 74, 14, 326, -1,
+ 244, 74, 14, 326, -1, 243, 8, 244, 74, -1,
+ 243, 8, 244, 32, 74, -1, 243, 8, 244, 32,
+ 74, 14, 326, -1, 243, 8, 244, 74, 14, 326,
+ -1, -1, 128, -1, 129, -1, 315, -1, 151, 152,
+ -1, 151, 246, 152, -1, 151, 299, 152, -1, 285,
+ -1, 337, -1, 32, 335, -1, 246, 8, 285, -1,
+ 246, 8, 337, -1, 246, 8, 32, 335, -1, 247,
+ 8, 248, -1, 248, -1, 74, -1, 156, 334, -1,
+ 156, 154, 332, 155, -1, 249, 8, 74, -1, 249,
+ 8, 74, 14, 326, -1, 74, -1, 74, 14, 326,
+ -1, 250, 251, -1, -1, -1, 267, 252, 271, 153,
+ -1, 272, 153, -1, 254, -1, -1, 268, 302, 211,
+ 72, 253, 151, 242, 152, 266, -1, 106, 255, 256,
+ -1, 315, -1, 255, 8, 315, -1, 153, -1, 154,
+ 257, 155, -1, -1, 258, -1, 259, -1, 258, 259,
+ -1, 260, 153, -1, 264, 153, -1, 263, 107, 261,
+ -1, 315, -1, 261, 8, 315, -1, 72, -1, 263,
+ -1, 315, 146, 72, -1, 262, 91, 265, 72, -1,
+ 262, 91, 270, -1, -1, 270, -1, 153, -1, 154,
+ 171, 155, -1, 269, -1, 115, -1, -1, 269, -1,
+ 270, -1, 269, 270, -1, 109, -1, 110, -1, 111,
+ -1, 114, -1, 113, -1, 112, -1, 271, 8, 74,
+ -1, 271, 8, 74, 14, 326, -1, 74, -1, 74,
+ 14, 326, -1, 272, 8, 72, 14, 326, -1, 100,
+ 72, 14, 326, -1, 273, 8, 332, -1, 332, -1,
+ -1, 275, -1, -1, 275, 8, 276, 332, -1, 332,
+ -1, 277, 341, -1, 341, -1, 278, 62, 356, 157,
+ -1, 62, 356, 157, -1, -1, 278, 280, 277, -1,
+ 278, -1, 277, -1, -1, -1, 282, 279, -1, -1,
+ 64, 316, 284, 324, -1, -1, 127, 151, 286, 362,
+ 152, 14, 332, -1, 337, 14, 332, -1, 337, 14,
+ 32, 337, -1, -1, 337, 14, 32, 64, 316, 287,
+ 324, -1, 63, 332, -1, 337, 25, 332, -1, 337,
+ 24, 332, -1, 337, 23, 332, -1, 337, 22, 332,
+ -1, 337, 21, 332, -1, 337, 20, 332, -1, 337,
+ 19, 332, -1, 337, 18, 332, -1, 337, 17, 332,
+ -1, 337, 16, 332, -1, 337, 15, 332, -1, 336,
+ 61, -1, 61, 336, -1, 336, 60, -1, 60, 336,
+ -1, -1, 332, 28, 288, 332, -1, -1, 332, 29,
+ 289, 332, -1, -1, 332, 9, 290, 332, -1, -1,
+ 332, 11, 291, 332, -1, 332, 10, 332, -1, 332,
+ 30, 332, -1, 332, 32, 332, -1, 332, 31, 332,
+ -1, 332, 45, 332, -1, 332, 43, 332, -1, 332,
+ 44, 332, -1, 332, 46, 332, -1, 332, 47, 332,
+ -1, 332, 48, 332, -1, 332, 42, 332, -1, 332,
+ 41, 332, -1, 43, 332, -1, 44, 332, -1, 49,
+ 332, -1, 51, 332, -1, 332, 34, 332, -1, 332,
+ 33, 332, -1, 332, 36, 332, -1, 332, 35, 332,
+ -1, 332, 37, 332, -1, 332, 40, 332, -1, 332,
+ 38, 332, -1, 332, 39, 332, -1, 332, 50, 316,
+ -1, 333, -1, 283, -1, -1, 151, 283, 152, 292,
+ 281, -1, -1, -1, 332, 26, 293, 332, 27, 294,
+ 332, -1, -1, 332, 26, 27, 295, 332, -1, 371,
+ -1, 59, 332, -1, 58, 332, -1, 57, 332, -1,
+ 56, 332, -1, 55, 332, -1, 54, 332, -1, 53,
+ 332, -1, 65, 322, -1, -1, 52, 296, 332, -1,
+ 328, -1, 300, -1, 301, -1, 158, 323, 158, -1,
+ 12, 332, -1, 13, -1, -1, 302, 211, 297, 151,
+ 242, 152, 303, 154, 171, 155, -1, -1, 114, 302,
+ 211, 298, 151, 242, 152, 303, 154, 171, 155, -1,
+ 13, 285, -1, 13, 337, -1, 13, 332, 126, 285,
+ -1, 13, 332, 126, 337, -1, 301, 62, 356, 157,
+ -1, 300, 62, 356, 157, -1, 80, 62, 356, 157,
+ -1, 128, 151, 365, 152, -1, 62, 365, 157, -1,
+ 99, -1, -1, 106, 151, 304, 152, -1, 304, 8,
+ 74, -1, 304, 8, 32, 74, -1, 74, -1, 32,
+ 74, -1, -1, 164, 306, 245, -1, -1, 147, 150,
+ 164, 307, 245, -1, -1, 150, 164, 308, 245, -1,
+ -1, 314, 146, 360, 309, 245, -1, -1, 314, 146,
+ 347, 310, 245, -1, -1, 349, 146, 360, 311, 245,
+ -1, -1, 349, 146, 347, 312, 245, -1, -1, 347,
+ 313, 245, -1, 114, -1, 164, -1, 147, 150, 164,
+ -1, 150, 164, -1, 164, -1, 147, 150, 164, -1,
+ 150, 164, -1, 314, -1, 317, -1, -1, -1, 353,
+ 125, 318, 357, 319, 320, -1, 353, -1, 320, 321,
+ -1, -1, 125, 357, -1, -1, 151, 152, -1, 333,
+ -1, -1, 79, -1, 367, -1, -1, 245, -1, 70,
+ -1, 71, -1, 80, -1, 134, -1, 135, -1, 149,
+ -1, 131, -1, 132, -1, 133, -1, 148, -1, 142,
+ 79, 143, -1, 142, 143, -1, 325, -1, 164, -1,
+ 147, 150, 164, -1, 150, 164, -1, 43, 326, -1,
+ 44, 326, -1, 128, 151, 329, 152, -1, 62, 329,
+ 157, -1, 327, -1, 130, -1, 314, 146, 72, -1,
+ 73, -1, 375, -1, 164, -1, 147, 150, 164, -1,
+ 150, 164, -1, 325, -1, 159, 367, 159, -1, 142,
+ 367, 143, -1, 130, -1, -1, 331, 330, -1, -1,
+ 8, -1, 331, 8, 326, 126, 326, -1, 331, 8,
+ 326, -1, 326, 126, 326, -1, 326, -1, 334, -1,
+ 285, -1, 151, 332, 152, -1, 151, 299, 152, -1,
+ 337, -1, 337, -1, 337, -1, -1, -1, 352, 125,
+ 338, 357, 339, 346, 340, -1, 352, -1, 340, 341,
+ -1, -1, -1, 125, 357, 342, 346, -1, 343, 62,
+ 356, 157, -1, 344, 62, 356, 157, -1, -1, 345,
+ 245, -1, 344, -1, 343, -1, -1, 354, -1, 361,
+ 354, -1, 314, 146, 347, -1, 349, 146, 347, -1,
+ 354, -1, 350, 62, 356, 157, -1, -1, 305, 351,
+ 62, 356, 157, -1, 353, -1, 350, -1, 305, -1,
+ 354, -1, 361, 354, -1, 348, -1, 354, 62, 356,
+ 157, -1, 354, 154, 332, 155, -1, 355, -1, 74,
+ -1, 156, 154, 332, 155, -1, -1, 332, -1, 359,
+ -1, -1, 347, 358, -1, 359, 62, 356, 157, -1,
+ 359, 154, 332, 155, -1, 360, -1, 72, -1, 154,
+ 332, 155, -1, 156, -1, 361, 156, -1, 362, 8,
+ 363, -1, 363, -1, 337, -1, -1, 127, 151, 364,
+ 362, 152, -1, -1, -1, 366, 330, -1, 366, 8,
+ 332, 126, 332, -1, 366, 8, 332, -1, 332, 126,
+ 332, -1, 332, -1, 366, 8, 332, 126, 32, 335,
+ -1, 366, 8, 32, 335, -1, 332, 126, 32, 335,
+ -1, 32, 335, -1, 367, 368, -1, 367, 79, -1,
+ 368, -1, 79, 368, -1, 74, -1, -1, 74, 62,
+ 369, 370, 157, -1, 74, 125, 72, -1, 144, 332,
+ 155, -1, 144, 73, 62, 332, 157, 155, -1, 145,
+ 337, 155, -1, 72, -1, 75, -1, 74, -1, 117,
+ 151, 372, 152, -1, 118, 151, 337, 152, -1, 118,
+ 151, 285, 152, -1, 7, 332, -1, 6, 332, -1,
+ 5, 151, 332, 152, -1, 4, 332, -1, 3, 332,
+ -1, 374, -1, -1, 372, 8, 373, 374, -1, 337,
+ -1, 285, -1, 314, 146, 72, -1, 349, 146, 72,
+ -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 214, 214, 218, 218, 219, 223, 224, 228, 229,
- 230, 231, 232, 233, 233, 235, 235, 237, 238, 242,
- 243, 247, 248, 249, 250, 254, 255, 259, 259, 260,
- 265, 266, 267, 268, 273, 274, 278, 279, 279, 279,
- 280, 280, 280, 281, 281, 281, 282, 282, 282, 286,
- 288, 290, 283, 292, 292, 293, 294, 295, 296, 297,
- 298, 299, 300, 301, 302, 303, 304, 305, 307, 308,
- 306, 311, 312, 310, 314, 314, 315, 316, 317, 318,
- 319, 320, 316, 322, 323, 328, 329, 333, 334, 339,
- 339, 339, 344, 345, 349, 353, 357, 362, 363, 368,
- 368, 374, 373, 380, 379, 389, 390, 391, 392, 396,
- 397, 401, 404, 406, 409, 411, 415, 416, 420, 421,
- 426, 427, 431, 432, 437, 438, 443, 444, 449, 450,
- 455, 456, 457, 458, 463, 464, 464, 465, 465, 470,
- 471, 476, 477, 482, 484, 484, 488, 490, 490, 494,
- 496, 500, 502, 507, 508, 513, 514, 515, 516, 517,
- 518, 519, 520, 525, 526, 527, 528, 533, 534, 539,
- 540, 541, 542, 543, 544, 548, 549, 554, 555, 556,
- 561, 562, 563, 564, 570, 571, 576, 576, 577, 578,
- 579, 579, 584, 588, 589, 593, 594, 597, 599, 603,
- 604, 608, 609, 613, 617, 618, 622, 623, 627, 631,
- 632, 636, 637, 641, 642, 646, 647, 651, 652, 656,
- 657, 661, 662, 663, 664, 665, 666, 670, 671, 672,
- 673, 677, 678, 682, 683, 688, 689, 693, 693, 694,
- 698, 699, 703, 704, 708, 708, 709, 710, 714, 715,
- 715, 720, 720, 724, 724, 725, 726, 727, 727, 728,
- 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
- 739, 740, 741, 742, 743, 744, 744, 745, 745, 746,
- 746, 747, 747, 748, 749, 750, 751, 752, 753, 754,
- 755, 756, 757, 758, 759, 760, 761, 762, 763, 764,
- 765, 766, 767, 768, 769, 770, 771, 772, 773, 774,
- 775, 775, 776, 777, 776, 779, 779, 781, 782, 783,
- 784, 785, 786, 787, 788, 789, 790, 790, 791, 792,
- 793, 794, 795, 796, 796, 798, 798, 803, 806, 808,
- 812, 813, 814, 815, 819, 819, 822, 822, 825, 825,
- 828, 828, 831, 831, 834, 834, 837, 837, 840, 840,
- 846, 847, 848, 849, 853, 854, 855, 861, 862, 867,
- 868, 867, 870, 875, 876, 881, 885, 886, 887, 891,
- 892, 893, 898, 899, 904, 905, 906, 907, 908, 909,
- 910, 911, 912, 913, 914, 915, 920, 921, 922, 923,
- 924, 925, 926, 927, 928, 929, 933, 937, 938, 939,
- 940, 941, 942, 943, 944, 945, 950, 951, 954, 956,
- 960, 961, 962, 963, 967, 968, 973, 978, 983, 988,
- 989, 988, 991, 995, 996, 1001, 1001, 1005, 1006, 1010,
- 1010, 1016, 1017, 1018, 1022, 1023, 1027, 1028, 1033, 1037,
- 1038, 1038, 1043, 1044, 1045, 1050, 1051, 1052, 1056, 1057,
- 1058, 1063, 1064, 1068, 1069, 1074, 1075, 1075, 1079, 1080,
- 1081, 1085, 1086, 1090, 1091, 1095, 1096, 1101, 1102, 1102,
- 1103, 1108, 1109, 1113, 1114, 1115, 1116, 1117, 1118, 1119,
- 1120, 1124, 1125, 1126, 1127, 1133, 1134, 1134, 1135, 1136,
- 1137, 1138, 1143, 1144, 1145, 1150, 1151, 1152, 1153, 1154,
- 1155, 1156, 1160, 1161, 1161, 1165, 1166
+ 0, 217, 217, 221, 221, 222, 226, 227, 231, 232,
+ 233, 234, 235, 236, 236, 238, 238, 240, 241, 245,
+ 246, 250, 251, 252, 253, 257, 258, 262, 262, 263,
+ 268, 269, 270, 271, 276, 277, 281, 282, 282, 282,
+ 283, 283, 283, 284, 284, 284, 285, 285, 285, 289,
+ 291, 293, 286, 295, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 311,
+ 312, 310, 315, 316, 314, 318, 318, 319, 320, 321,
+ 320, 323, 324, 328, 329, 330, 331, 332, 329, 336,
+ 337, 337, 341, 342, 346, 347, 351, 351, 351, 355,
+ 356, 360, 364, 368, 372, 373, 378, 378, 385, 384,
+ 391, 390, 400, 401, 402, 403, 407, 408, 412, 415,
+ 417, 420, 422, 426, 427, 431, 432, 436, 437, 438,
+ 438, 442, 443, 448, 449, 454, 455, 460, 461, 466,
+ 467, 468, 469, 474, 475, 475, 476, 476, 481, 482,
+ 487, 488, 493, 495, 495, 499, 501, 501, 505, 507,
+ 511, 513, 518, 519, 524, 525, 526, 527, 528, 529,
+ 530, 531, 536, 537, 538, 539, 544, 545, 546, 551,
+ 552, 553, 554, 555, 556, 560, 561, 566, 567, 568,
+ 573, 574, 575, 576, 582, 583, 588, 588, 589, 590,
+ 591, 591, 597, 601, 602, 606, 607, 610, 612, 616,
+ 617, 621, 622, 626, 630, 631, 635, 636, 640, 644,
+ 645, 649, 650, 654, 655, 659, 660, 664, 665, 669,
+ 670, 674, 675, 676, 677, 678, 679, 683, 684, 685,
+ 686, 690, 691, 695, 696, 701, 702, 706, 706, 707,
+ 711, 712, 716, 717, 721, 721, 722, 723, 727, 728,
+ 728, 733, 733, 737, 737, 738, 739, 740, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, 755, 756, 757, 757, 758, 758, 759,
+ 759, 760, 760, 761, 762, 763, 764, 765, 766, 767,
+ 768, 769, 770, 771, 772, 773, 774, 775, 776, 777,
+ 778, 779, 780, 781, 782, 783, 784, 785, 786, 787,
+ 788, 788, 789, 790, 789, 792, 792, 794, 795, 796,
+ 797, 798, 799, 800, 801, 802, 803, 803, 804, 805,
+ 806, 807, 808, 809, 810, 810, 813, 813, 819, 820,
+ 821, 822, 826, 827, 828, 831, 832, 835, 838, 840,
+ 844, 845, 846, 847, 851, 851, 853, 853, 855, 855,
+ 857, 857, 859, 859, 861, 861, 863, 863, 865, 865,
+ 870, 871, 872, 873, 877, 878, 879, 885, 886, 891,
+ 892, 891, 894, 899, 900, 905, 909, 910, 911, 915,
+ 916, 917, 922, 923, 928, 929, 930, 931, 932, 933,
+ 934, 935, 936, 937, 938, 939, 944, 945, 946, 947,
+ 948, 949, 950, 951, 952, 953, 957, 961, 962, 963,
+ 964, 965, 966, 967, 968, 969, 974, 975, 978, 980,
+ 984, 985, 986, 987, 991, 992, 996, 997, 1002, 1007,
+ 1012, 1017, 1018, 1017, 1020, 1024, 1025, 1030, 1030, 1034,
+ 1035, 1039, 1039, 1044, 1045, 1046, 1050, 1051, 1055, 1056,
+ 1061, 1065, 1066, 1066, 1071, 1072, 1073, 1078, 1079, 1080,
+ 1084, 1085, 1086, 1091, 1092, 1096, 1097, 1102, 1103, 1103,
+ 1107, 1108, 1109, 1113, 1114, 1118, 1119, 1123, 1124, 1129,
+ 1130, 1130, 1131, 1136, 1137, 1141, 1142, 1143, 1144, 1145,
+ 1146, 1147, 1148, 1152, 1153, 1154, 1155, 1161, 1162, 1162,
+ 1163, 1164, 1165, 1166, 1171, 1172, 1173, 1178, 1179, 1180,
+ 1181, 1182, 1183, 1184, 1185, 1189, 1190, 1190, 1194, 1195,
+ 1199, 1200
};
#endif
@@ -998,9 +1019,9 @@ static const char *const yytname[] =
"\"eval (T_EVAL)\"", "\"include_once (T_INCLUDE_ONCE)\"",
"\"include (T_INCLUDE)\"", "','", "\"or (T_LOGICAL_OR)\"",
"\"xor (T_LOGICAL_XOR)\"", "\"and (T_LOGICAL_AND)\"",
- "\"print (T_PRINT)\"", "'='", "\">>= (T_SR_EQUAL)\"",
- "\"<<= (T_SL_EQUAL)\"", "\"^= (T_XOR_EQUAL)\"", "\"|= (T_OR_EQUAL)\"",
- "\"&= (T_AND_EQUAL)\"", "\"%= (T_MOD_EQUAL)\"",
+ "\"print (T_PRINT)\"", "\"yield (T_YIELD)\"", "'='",
+ "\">>= (T_SR_EQUAL)\"", "\"<<= (T_SL_EQUAL)\"", "\"^= (T_XOR_EQUAL)\"",
+ "\"|= (T_OR_EQUAL)\"", "\"&= (T_AND_EQUAL)\"", "\"%= (T_MOD_EQUAL)\"",
"\".= (T_CONCAT_EQUAL)\"", "\"/= (T_DIV_EQUAL)\"",
"\"*= (T_MUL_EQUAL)\"", "\"-= (T_MINUS_EQUAL)\"",
"\"+= (T_PLUS_EQUAL)\"", "'?'", "':'", "\"|| (T_BOOLEAN_OR)\"",
@@ -1032,12 +1053,12 @@ static const char *const yytname[] =
"\"continue (T_CONTINUE)\"", "\"goto (T_GOTO)\"",
"\"function (T_FUNCTION)\"", "\"const (T_CONST)\"",
"\"return (T_RETURN)\"", "\"try (T_TRY)\"", "\"catch (T_CATCH)\"",
- "\"throw (T_THROW)\"", "\"use (T_USE)\"", "\"insteadof (T_INSTEADOF)\"",
- "\"global (T_GLOBAL)\"", "\"public (T_PUBLIC)\"",
- "\"protected (T_PROTECTED)\"", "\"private (T_PRIVATE)\"",
- "\"final (T_FINAL)\"", "\"abstract (T_ABSTRACT)\"",
- "\"static (T_STATIC)\"", "\"var (T_VAR)\"", "\"unset (T_UNSET)\"",
- "\"isset (T_ISSET)\"", "\"empty (T_EMPTY)\"",
+ "\"finally (T_FINALLY)\"", "\"throw (T_THROW)\"", "\"use (T_USE)\"",
+ "\"insteadof (T_INSTEADOF)\"", "\"global (T_GLOBAL)\"",
+ "\"public (T_PUBLIC)\"", "\"protected (T_PROTECTED)\"",
+ "\"private (T_PRIVATE)\"", "\"final (T_FINAL)\"",
+ "\"abstract (T_ABSTRACT)\"", "\"static (T_STATIC)\"", "\"var (T_VAR)\"",
+ "\"unset (T_UNSET)\"", "\"isset (T_ISSET)\"", "\"empty (T_EMPTY)\"",
"\"__halt_compiler (T_HALT_COMPILER)\"", "\"class (T_CLASS)\"",
"\"trait (T_TRAIT)\"", "\"interface (T_INTERFACE)\"",
"\"extends (T_EXTENDS)\"", "\"implements (T_IMPLEMENTS)\"",
@@ -1055,27 +1076,29 @@ static const char *const yytname[] =
"\":: (T_PAAMAYIM_NEKUDOTAYIM)\"", "\"namespace (T_NAMESPACE)\"",
"\"__NAMESPACE__ (T_NS_C)\"", "\"__DIR__ (T_DIR)\"",
"\"\\\\ (T_NS_SEPARATOR)\"", "'('", "')'", "';'", "'{'", "'}'", "'$'",
- "']'", "'`'", "'\"'", "$accept", "start", "top_statement_list", "@1",
- "namespace_name", "top_statement", "@2", "@3", "use_declarations",
- "use_declaration", "constant_declaration", "inner_statement_list", "@4",
- "inner_statement", "statement", "unticked_statement", "@5", "@6", "@7",
- "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", "@17",
- "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25", "@26",
- "additional_catches", "non_empty_additional_catches", "additional_catch",
- "@27", "@28", "unset_variables", "unset_variable",
+ "']'", "'`'", "'\"'", "$accept", "start", "top_statement_list", "$@1",
+ "namespace_name", "top_statement", "$@2", "$@3", "use_declarations",
+ "use_declaration", "constant_declaration", "inner_statement_list", "$@4",
+ "inner_statement", "statement", "unticked_statement", "$@5", "$@6",
+ "$@7", "$@8", "$@9", "@10", "$@11", "$@12", "$@13", "$@14", "$@15",
+ "$@16", "$@17", "$@18", "$@19", "$@20", "$@21", "$@22", "$@23",
+ "catch_statement", "$@24", "$@25", "$@26", "$@27", "finally_statement",
+ "$@28", "additional_catches", "non_empty_additional_catches",
+ "additional_catch", "@29", "$@30", "unset_variables", "unset_variable",
"function_declaration_statement", "class_declaration_statement",
- "is_reference", "unticked_function_declaration_statement", "@29",
- "unticked_class_declaration_statement", "@30", "@31", "class_entry_type",
- "extends_from", "interface_entry", "interface_extends_list",
- "implements_list", "interface_list", "foreach_optional_arg",
- "foreach_variable", "for_statement", "foreach_statement",
- "declare_statement", "declare_list", "switch_case_list", "case_list",
- "@32", "@33", "case_separator", "while_statement", "elseif_list", "@34",
- "new_elseif_list", "@35", "else_single", "new_else_single",
- "parameter_list", "non_empty_parameter_list", "optional_class_type",
+ "is_reference", "unticked_function_declaration_statement", "$@31",
+ "unticked_class_declaration_statement", "$@32", "$@33",
+ "class_entry_type", "extends_from", "interface_entry",
+ "interface_extends_list", "implements_list", "interface_list",
+ "foreach_optional_arg", "foreach_variable", "$@34", "for_statement",
+ "foreach_statement", "declare_statement", "declare_list",
+ "switch_case_list", "case_list", "$@35", "$@36", "case_separator",
+ "while_statement", "elseif_list", "$@37", "new_elseif_list", "$@38",
+ "else_single", "new_else_single", "parameter_list",
+ "non_empty_parameter_list", "optional_class_type",
"function_call_parameter_list", "non_empty_function_call_parameter_list",
"global_var_list", "global_var", "static_var_list",
- "class_statement_list", "class_statement", "@36", "@37",
+ "class_statement_list", "class_statement", "$@39", "$@40",
"trait_use_statement", "trait_list", "trait_adaptations",
"trait_adaptation_list", "non_empty_trait_adaptation_list",
"trait_adaptation_statement", "trait_precedence", "trait_reference_list",
@@ -1083,32 +1106,34 @@ static const char *const yytname[] =
"trait_alias", "trait_modifiers", "method_body", "variable_modifiers",
"method_modifiers", "non_empty_member_modifiers", "member_modifier",
"class_variable_declaration", "class_constant_declaration",
- "echo_expr_list", "for_expr", "non_empty_for_expr", "@38",
+ "echo_expr_list", "for_expr", "non_empty_for_expr", "$@41",
"chaining_method_or_property", "chaining_dereference",
- "chaining_instance_call", "@39", "instance_call", "@40", "new_expr",
- "@41", "expr_without_variable", "@42", "@43", "@44", "@45", "@46", "@47",
- "@48", "@49", "@50", "@51", "@52", "@53", "@54", "function",
- "lexical_vars", "lexical_var_list", "function_call", "@55", "@56", "@57",
- "@58", "@59", "@60", "@61", "@62", "class_name",
+ "chaining_instance_call", "$@42", "instance_call", "$@43", "new_expr",
+ "$@44", "expr_without_variable", "$@45", "$@46", "$@47", "$@48", "$@49",
+ "$@50", "@51", "$@52", "$@53", "$@54", "$@55", "@56", "@57",
+ "yield_expr", "combined_scalar_offset", "combined_scalar", "function",
+ "lexical_vars", "lexical_var_list", "function_call", "@58", "@59", "@60",
+ "@61", "$@62", "$@63", "$@64", "$@65", "class_name",
"fully_qualified_class_name", "class_name_reference",
- "dynamic_class_name_reference", "@63", "@64",
+ "dynamic_class_name_reference", "$@66", "$@67",
"dynamic_class_name_variable_properties",
"dynamic_class_name_variable_property", "exit_expr", "backticks_expr",
"ctor_arguments", "common_scalar", "static_scalar",
"static_class_constant", "scalar", "static_array_pair_list",
"possible_comma", "non_empty_static_array_pair_list", "expr",
- "r_variable", "w_variable", "rw_variable", "variable", "@65", "@66",
- "variable_properties", "variable_property", "@67",
- "array_method_dereference", "method", "@68", "method_or_not",
+ "parenthesis_expr", "r_variable", "w_variable", "rw_variable",
+ "variable", "$@68", "$@69", "variable_properties", "variable_property",
+ "$@70", "array_method_dereference", "method", "@71", "method_or_not",
"variable_without_objects", "static_member", "variable_class_name",
- "array_function_dereference", "@69", "base_variable_with_function_calls",
- "base_variable", "reference_variable", "compound_variable", "dim_offset",
- "object_property", "@70", "object_dim_list", "variable_name",
+ "array_function_dereference", "$@72",
+ "base_variable_with_function_calls", "base_variable",
+ "reference_variable", "compound_variable", "dim_offset",
+ "object_property", "$@73", "object_dim_list", "variable_name",
"simple_indirect_reference", "assignment_list",
- "assignment_list_element", "@71", "array_pair_list",
- "non_empty_array_pair_list", "encaps_list", "encaps_var", "@72",
+ "assignment_list_element", "$@74", "array_pair_list",
+ "non_empty_array_pair_list", "encaps_list", "encaps_var", "$@75",
"encaps_var_offset", "internal_functions_in_yacc", "isset_variables",
- "@73", "class_constant", 0
+ "$@76", "isset_variable", "class_constant", 0
};
#endif
@@ -1118,12 +1143,12 @@ static const char *const yytname[] =
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 44, 263,
- 264, 265, 266, 61, 267, 268, 269, 270, 271, 272,
- 273, 274, 275, 276, 277, 63, 58, 278, 279, 124,
- 94, 38, 280, 281, 282, 283, 60, 62, 284, 285,
- 286, 287, 43, 45, 46, 42, 47, 37, 33, 288,
- 126, 64, 289, 290, 291, 292, 293, 294, 295, 296,
- 297, 91, 298, 299, 300, 301, 302, 303, 304, 305,
+ 264, 265, 266, 267, 61, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 63, 58, 279, 280,
+ 124, 94, 38, 281, 282, 283, 284, 60, 62, 285,
+ 286, 287, 288, 43, 45, 46, 42, 47, 37, 33,
+ 289, 126, 64, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 91, 299, 300, 301, 302, 303, 304, 305,
306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
@@ -1131,66 +1156,69 @@ static const yytype_uint16 yytoknum[] =
346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
- 376, 377, 378, 379, 380, 381, 382, 383, 384, 40,
- 41, 59, 123, 125, 36, 93, 96, 34
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 40, 41, 59, 123, 125, 36, 93, 96, 34
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 158, 159, 161, 160, 160, 162, 162, 163, 163,
- 163, 163, 163, 164, 163, 165, 163, 163, 163, 166,
- 166, 167, 167, 167, 167, 168, 168, 170, 169, 169,
- 171, 171, 171, 171, 172, 172, 173, 174, 175, 173,
- 176, 177, 173, 178, 179, 173, 180, 181, 173, 182,
- 183, 184, 173, 185, 173, 173, 173, 173, 173, 173,
- 173, 173, 173, 173, 173, 173, 173, 173, 186, 187,
- 173, 188, 189, 173, 190, 173, 173, 191, 192, 193,
- 194, 195, 173, 173, 173, 196, 196, 197, 197, 199,
- 200, 198, 201, 201, 202, 203, 204, 205, 205, 207,
- 206, 209, 208, 210, 208, 211, 211, 211, 211, 212,
- 212, 213, 214, 214, 215, 215, 216, 216, 217, 217,
- 218, 218, 219, 219, 220, 220, 221, 221, 222, 222,
- 223, 223, 223, 223, 224, 225, 224, 226, 224, 227,
- 227, 228, 228, 229, 230, 229, 231, 232, 231, 233,
- 233, 234, 234, 235, 235, 236, 236, 236, 236, 236,
- 236, 236, 236, 237, 237, 237, 237, 238, 238, 239,
- 239, 239, 239, 239, 239, 240, 240, 241, 241, 241,
- 242, 242, 242, 242, 243, 243, 245, 244, 244, 244,
- 246, 244, 247, 248, 248, 249, 249, 250, 250, 251,
- 251, 252, 252, 253, 254, 254, 255, 255, 256, 257,
- 257, 258, 258, 259, 259, 260, 260, 261, 261, 262,
- 262, 263, 263, 263, 263, 263, 263, 264, 264, 264,
- 264, 265, 265, 266, 266, 267, 267, 269, 268, 268,
- 270, 270, 271, 271, 273, 272, 272, 272, 274, 275,
- 274, 277, 276, 279, 278, 278, 278, 280, 278, 278,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 281, 278, 282, 278, 283,
- 278, 284, 278, 278, 278, 278, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 285, 278, 286, 287, 278, 288, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 278, 289, 278, 278, 278,
- 278, 278, 278, 290, 278, 291, 278, 292, 293, 293,
- 294, 294, 294, 294, 296, 295, 297, 295, 298, 295,
- 299, 295, 300, 295, 301, 295, 302, 295, 303, 295,
- 304, 304, 304, 304, 305, 305, 305, 306, 306, 308,
- 309, 307, 307, 310, 310, 311, 312, 312, 312, 313,
- 313, 313, 314, 314, 315, 315, 315, 315, 315, 315,
- 315, 315, 315, 315, 315, 315, 316, 316, 316, 316,
- 316, 316, 316, 316, 316, 316, 317, 318, 318, 318,
- 318, 318, 318, 318, 318, 318, 319, 319, 320, 320,
- 321, 321, 321, 321, 322, 322, 323, 324, 325, 327,
- 328, 326, 326, 329, 329, 331, 330, 332, 332, 334,
- 333, 335, 335, 335, 336, 336, 337, 337, 338, 339,
- 340, 339, 341, 341, 341, 342, 342, 342, 343, 343,
- 343, 344, 344, 345, 345, 346, 347, 346, 348, 348,
- 348, 349, 349, 350, 350, 351, 351, 352, 353, 352,
- 352, 354, 354, 355, 355, 355, 355, 355, 355, 355,
- 355, 356, 356, 356, 356, 357, 358, 357, 357, 357,
- 357, 357, 359, 359, 359, 360, 360, 360, 360, 360,
- 360, 360, 361, 362, 361, 363, 363
+ 0, 160, 161, 163, 162, 162, 164, 164, 165, 165,
+ 165, 165, 165, 166, 165, 167, 165, 165, 165, 168,
+ 168, 169, 169, 169, 169, 170, 170, 172, 171, 171,
+ 173, 173, 173, 173, 174, 174, 175, 176, 177, 175,
+ 178, 179, 175, 180, 181, 175, 182, 183, 175, 184,
+ 185, 186, 175, 187, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 188,
+ 189, 175, 190, 191, 175, 192, 175, 175, 193, 194,
+ 175, 175, 175, 195, 196, 197, 198, 199, 195, 200,
+ 201, 200, 202, 202, 203, 203, 205, 206, 204, 207,
+ 207, 208, 209, 210, 211, 211, 213, 212, 215, 214,
+ 216, 214, 217, 217, 217, 217, 218, 218, 219, 220,
+ 220, 221, 221, 222, 222, 223, 223, 224, 224, 225,
+ 224, 226, 226, 227, 227, 228, 228, 229, 229, 230,
+ 230, 230, 230, 231, 232, 231, 233, 231, 234, 234,
+ 235, 235, 236, 237, 236, 238, 239, 238, 240, 240,
+ 241, 241, 242, 242, 243, 243, 243, 243, 243, 243,
+ 243, 243, 244, 244, 244, 244, 245, 245, 245, 246,
+ 246, 246, 246, 246, 246, 247, 247, 248, 248, 248,
+ 249, 249, 249, 249, 250, 250, 252, 251, 251, 251,
+ 253, 251, 254, 255, 255, 256, 256, 257, 257, 258,
+ 258, 259, 259, 260, 261, 261, 262, 262, 263, 264,
+ 264, 265, 265, 266, 266, 267, 267, 268, 268, 269,
+ 269, 270, 270, 270, 270, 270, 270, 271, 271, 271,
+ 271, 272, 272, 273, 273, 274, 274, 276, 275, 275,
+ 277, 277, 278, 278, 280, 279, 279, 279, 281, 282,
+ 281, 284, 283, 286, 285, 285, 285, 287, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 288, 285, 289, 285, 290,
+ 285, 291, 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
+ 292, 285, 293, 294, 285, 295, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 285, 296, 285, 285, 285,
+ 285, 285, 285, 285, 297, 285, 298, 285, 299, 299,
+ 299, 299, 300, 300, 300, 301, 301, 302, 303, 303,
+ 304, 304, 304, 304, 306, 305, 307, 305, 308, 305,
+ 309, 305, 310, 305, 311, 305, 312, 305, 313, 305,
+ 314, 314, 314, 314, 315, 315, 315, 316, 316, 318,
+ 319, 317, 317, 320, 320, 321, 322, 322, 322, 323,
+ 323, 323, 324, 324, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 326, 326, 326, 326,
+ 326, 326, 326, 326, 326, 326, 327, 328, 328, 328,
+ 328, 328, 328, 328, 328, 328, 329, 329, 330, 330,
+ 331, 331, 331, 331, 332, 332, 333, 333, 334, 335,
+ 336, 338, 339, 337, 337, 340, 340, 342, 341, 343,
+ 343, 345, 344, 346, 346, 346, 347, 347, 348, 348,
+ 349, 350, 351, 350, 352, 352, 352, 353, 353, 353,
+ 354, 354, 354, 355, 355, 356, 356, 357, 358, 357,
+ 359, 359, 359, 360, 360, 361, 361, 362, 362, 363,
+ 364, 363, 363, 365, 365, 366, 366, 366, 366, 366,
+ 366, 366, 366, 367, 367, 367, 367, 368, 369, 368,
+ 368, 368, 368, 368, 370, 370, 370, 371, 371, 371,
+ 371, 371, 371, 371, 371, 372, 373, 372, 374, 374,
+ 375, 375
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -1199,20 +1227,21 @@ static const yytype_uint8 yyr2[] =
0, 2, 1, 0, 3, 0, 1, 3, 1, 1,
1, 4, 3, 0, 6, 0, 5, 3, 2, 3,
1, 1, 3, 2, 4, 5, 4, 0, 3, 0,
- 1, 1, 1, 4, 1, 2, 3, 0, 0, 9,
- 0, 0, 12, 0, 0, 7, 0, 0, 9, 0,
- 0, 0, 12, 0, 6, 2, 3, 2, 3, 2,
- 3, 3, 3, 3, 3, 1, 2, 5, 0, 0,
- 10, 0, 0, 10, 0, 6, 1, 0, 0, 0,
- 0, 0, 18, 3, 3, 1, 0, 1, 2, 0,
- 0, 10, 1, 3, 1, 1, 1, 0, 1, 0,
- 10, 0, 8, 0, 7, 1, 2, 1, 2, 0,
- 2, 1, 0, 2, 0, 2, 1, 3, 0, 2,
- 1, 2, 1, 4, 1, 4, 1, 4, 3, 5,
- 3, 4, 4, 5, 0, 0, 6, 0, 5, 1,
- 1, 1, 4, 0, 0, 7, 0, 0, 8, 0,
- 2, 0, 3, 1, 0, 2, 3, 5, 4, 4,
- 5, 7, 6, 0, 1, 1, 1, 1, 0, 1,
+ 1, 1, 1, 4, 1, 2, 3, 0, 0, 7,
+ 0, 0, 10, 0, 0, 5, 0, 0, 7, 0,
+ 0, 0, 12, 0, 4, 2, 3, 2, 3, 2,
+ 3, 3, 2, 3, 3, 3, 1, 2, 5, 0,
+ 0, 10, 0, 0, 10, 0, 6, 1, 0, 0,
+ 8, 3, 3, 0, 0, 0, 0, 0, 13, 0,
+ 0, 5, 1, 0, 1, 2, 0, 0, 10, 1,
+ 3, 1, 1, 1, 0, 1, 0, 10, 0, 8,
+ 0, 7, 1, 2, 1, 2, 0, 2, 1, 0,
+ 2, 0, 2, 1, 3, 0, 2, 1, 2, 0,
+ 5, 1, 4, 1, 4, 1, 4, 3, 5, 3,
+ 4, 4, 5, 0, 0, 6, 0, 5, 1, 1,
+ 1, 4, 0, 0, 5, 0, 0, 6, 0, 2,
+ 0, 3, 1, 0, 2, 3, 5, 4, 4, 5,
+ 7, 6, 0, 1, 1, 1, 2, 3, 3, 1,
1, 2, 3, 3, 4, 3, 1, 1, 2, 4,
3, 5, 1, 3, 2, 0, 0, 4, 2, 1,
0, 9, 3, 1, 3, 1, 3, 0, 1, 1,
@@ -1226,1474 +1255,1450 @@ static const yytype_uint8 yyr2[] =
3, 2, 2, 2, 2, 0, 4, 0, 4, 0,
4, 0, 4, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 2, 2, 2, 2, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
+ 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
0, 5, 0, 0, 7, 0, 5, 1, 2, 2,
- 2, 2, 2, 2, 2, 2, 0, 3, 1, 4,
- 3, 3, 2, 0, 10, 0, 11, 1, 0, 4,
- 3, 4, 1, 2, 0, 5, 0, 7, 0, 6,
- 0, 7, 0, 7, 0, 7, 0, 7, 0, 5,
+ 2, 2, 2, 2, 2, 2, 0, 3, 1, 1,
+ 1, 3, 2, 1, 0, 10, 0, 11, 2, 2,
+ 4, 4, 4, 4, 4, 4, 3, 1, 0, 4,
+ 3, 4, 1, 2, 0, 3, 0, 5, 0, 4,
+ 0, 5, 0, 5, 0, 5, 0, 5, 0, 3,
1, 1, 3, 2, 1, 3, 2, 1, 1, 0,
- 0, 6, 1, 2, 0, 2, 0, 2, 3, 0,
- 1, 1, 0, 3, 1, 1, 1, 1, 1, 1,
+ 0, 6, 1, 2, 0, 2, 0, 2, 1, 0,
+ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 3, 2, 1, 1, 3, 2,
2, 2, 4, 3, 1, 1, 3, 1, 1, 1,
3, 2, 1, 3, 3, 1, 0, 2, 0, 1,
- 5, 3, 3, 1, 1, 1, 1, 1, 1, 0,
- 0, 7, 1, 2, 0, 0, 4, 4, 4, 0,
- 4, 1, 1, 0, 1, 2, 3, 3, 1, 4,
- 0, 5, 1, 1, 1, 1, 2, 1, 4, 4,
- 1, 1, 4, 0, 1, 1, 0, 2, 4, 4,
- 1, 1, 3, 1, 2, 3, 1, 1, 0, 5,
- 0, 0, 2, 5, 3, 3, 1, 6, 4, 4,
- 2, 2, 2, 1, 2, 1, 0, 5, 3, 3,
- 6, 3, 1, 1, 1, 4, 4, 2, 2, 4,
- 2, 2, 1, 0, 4, 3, 3
+ 5, 3, 3, 1, 1, 1, 3, 3, 1, 1,
+ 1, 0, 0, 7, 1, 2, 0, 0, 4, 4,
+ 4, 0, 2, 1, 1, 0, 1, 2, 3, 3,
+ 1, 4, 0, 5, 1, 1, 1, 1, 2, 1,
+ 4, 4, 1, 1, 4, 0, 1, 1, 0, 2,
+ 4, 4, 1, 1, 3, 1, 2, 3, 1, 1,
+ 0, 5, 0, 0, 2, 5, 3, 3, 1, 6,
+ 4, 4, 2, 2, 2, 1, 2, 1, 0, 5,
+ 3, 3, 6, 3, 1, 1, 1, 4, 4, 4,
+ 2, 2, 4, 2, 2, 1, 0, 4, 1, 1,
+ 3, 3
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
5, 0, 3, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 326, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 481, 0, 0, 376, 0,
- 384, 385, 6, 407, 461, 65, 386, 0, 46, 0,
- 0, 0, 74, 0, 0, 0, 0, 337, 0, 0,
- 77, 0, 0, 0, 0, 0, 360, 0, 0, 0,
- 0, 105, 107, 111, 0, 0, 415, 390, 391, 392,
- 387, 388, 0, 0, 393, 389, 0, 0, 76, 29,
- 473, 379, 0, 409, 4, 0, 8, 34, 9, 10,
- 95, 96, 0, 0, 309, 425, 97, 454, 0, 412,
- 328, 0, 424, 0, 426, 0, 457, 0, 453, 432,
- 452, 455, 460, 0, 317, 408, 6, 360, 0, 97,
- 511, 510, 0, 508, 507, 332, 295, 296, 297, 298,
- 0, 324, 323, 322, 321, 320, 319, 318, 360, 0,
- 0, 361, 0, 274, 428, 0, 272, 0, 486, 0,
- 418, 259, 0, 0, 361, 367, 251, 368, 0, 372,
- 455, 0, 0, 325, 0, 35, 0, 234, 0, 43,
- 235, 0, 0, 0, 55, 0, 57, 0, 0, 0,
- 59, 425, 0, 426, 0, 0, 0, 21, 0, 20,
- 177, 0, 0, 176, 108, 106, 182, 0, 97, 0,
- 0, 0, 0, 253, 481, 495, 0, 395, 0, 0,
- 0, 493, 0, 15, 0, 411, 309, 0, 27, 0,
- 380, 0, 381, 0, 0, 0, 344, 0, 18, 109,
- 103, 98, 0, 0, 0, 279, 0, 281, 312, 275,
- 277, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 343, 0, 0, 0, 0, 336, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 503, 0, 0, 396,
+ 0, 404, 405, 6, 427, 483, 66, 406, 0, 46,
+ 43, 0, 0, 75, 0, 0, 0, 0, 357, 0,
+ 0, 78, 0, 0, 0, 0, 0, 380, 0, 0,
+ 0, 0, 112, 114, 118, 0, 0, 435, 410, 411,
+ 412, 407, 408, 0, 0, 413, 409, 0, 0, 77,
+ 29, 495, 399, 0, 429, 4, 0, 8, 34, 9,
+ 10, 102, 103, 0, 0, 319, 445, 0, 339, 340,
+ 104, 476, 0, 432, 338, 0, 318, 444, 0, 448,
+ 378, 479, 0, 475, 454, 474, 477, 482, 0, 327,
+ 428, 343, 6, 380, 0, 104, 534, 533, 0, 531,
+ 530, 342, 445, 0, 448, 305, 306, 307, 308, 0,
+ 334, 333, 332, 331, 330, 329, 328, 380, 0, 0,
+ 364, 0, 284, 450, 0, 282, 0, 508, 0, 438,
+ 269, 0, 0, 381, 387, 261, 388, 0, 392, 477,
+ 0, 0, 335, 398, 0, 37, 35, 485, 0, 244,
+ 0, 0, 245, 0, 0, 53, 55, 0, 57, 0,
+ 0, 0, 59, 445, 0, 448, 0, 0, 0, 21,
+ 0, 20, 187, 0, 0, 186, 115, 113, 192, 0,
+ 104, 0, 0, 0, 0, 263, 503, 517, 0, 415,
+ 0, 0, 0, 515, 0, 15, 0, 431, 319, 0,
+ 0, 27, 0, 400, 0, 401, 0, 0, 0, 0,
+ 0, 18, 116, 110, 62, 485, 485, 105, 344, 0,
+ 0, 289, 0, 291, 322, 285, 287, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 66, 273, 271, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 358, 0, 463, 429,
- 463, 0, 474, 456, 0, 0, 327, 0, 363, 0,
- 0, 490, 427, 0, 330, 419, 482, 0, 363, 0,
- 382, 0, 369, 456, 377, 0, 0, 0, 64, 0,
- 0, 0, 236, 239, 425, 426, 0, 0, 56, 58,
- 84, 0, 60, 61, 29, 83, 23, 0, 0, 17,
- 0, 178, 426, 0, 62, 0, 0, 63, 0, 0,
- 92, 94, 512, 0, 0, 0, 480, 0, 496, 0,
- 394, 494, 407, 0, 0, 492, 414, 491, 410, 5,
- 12, 13, 348, 310, 308, 36, 0, 0, 331, 413,
- 7, 168, 0, 0, 101, 112, 99, 333, 463, 515,
- 0, 446, 444, 0, 0, 0, 283, 0, 315, 0,
- 0, 0, 284, 286, 285, 300, 299, 302, 301, 303,
- 305, 306, 304, 294, 293, 288, 289, 287, 290, 291,
- 292, 307, 0, 255, 270, 269, 268, 267, 266, 265,
- 264, 263, 262, 261, 260, 168, 516, 447, 0, 464,
- 0, 0, 0, 0, 509, 362, 471, 0, 485, 0,
- 484, 362, 446, 168, 252, 447, 0, 378, 37, 233,
- 0, 0, 49, 237, 71, 68, 0, 0, 53, 0,
- 0, 416, 0, 405, 0, 0, 0, 397, 0, 396,
- 26, 404, 27, 0, 22, 19, 0, 175, 183, 180,
- 335, 0, 0, 513, 505, 506, 11, 0, 477, 0,
- 476, 329, 0, 498, 0, 499, 501, 346, 3, 5,
- 168, 248, 0, 28, 30, 31, 32, 462, 0, 0,
- 167, 425, 426, 0, 0, 0, 364, 110, 114, 0,
- 0, 0, 163, 0, 0, 352, 350, 445, 280, 282,
- 0, 0, 276, 278, 0, 256, 0, 356, 354, 449,
- 466, 430, 465, 470, 458, 459, 489, 488, 0, 0,
- 370, 40, 0, 47, 44, 235, 0, 0, 0, 0,
- 0, 0, 0, 400, 401, 423, 0, 418, 416, 0,
- 0, 399, 0, 0, 24, 179, 0, 163, 93, 67,
- 0, 478, 480, 0, 502, 504, 503, 0, 0, 168,
- 16, 3, 0, 311, 0, 0, 171, 345, 0, 25,
- 0, 366, 0, 0, 113, 116, 185, 163, 164, 165,
- 0, 153, 0, 166, 451, 472, 168, 168, 316, 313,
- 257, 359, 168, 168, 467, 443, 463, 0, 0, 483,
- 383, 374, 29, 38, 0, 0, 0, 238, 118, 0,
- 118, 120, 128, 0, 29, 126, 75, 134, 134, 54,
- 0, 403, 419, 417, 0, 398, 406, 0, 181, 0,
- 514, 480, 475, 0, 497, 0, 0, 14, 349, 463,
- 0, 247, 246, 250, 241, 0, 0, 425, 426, 365,
- 115, 185, 0, 217, 0, 338, 163, 0, 155, 0,
- 0, 0, 382, 0, 0, 439, 442, 441, 434, 0,
- 0, 487, 371, 27, 143, 0, 29, 141, 45, 50,
- 0, 0, 121, 0, 0, 27, 134, 0, 134, 0,
- 422, 421, 402, 78, 338, 0, 254, 500, 347, 0,
- 435, 240, 463, 0, 33, 174, 217, 117, 0, 0,
- 221, 222, 223, 226, 225, 224, 216, 104, 184, 189,
- 186, 0, 215, 219, 0, 0, 0, 0, 0, 156,
- 0, 353, 351, 314, 258, 357, 355, 168, 463, 463,
- 431, 468, 469, 0, 373, 146, 149, 0, 27, 235,
- 119, 72, 69, 129, 0, 0, 0, 0, 0, 0,
- 130, 0, 0, 0, 479, 243, 443, 0, 245, 102,
- 0, 0, 193, 0, 97, 220, 0, 188, 29, 0,
- 29, 0, 159, 0, 158, 0, 0, 0, 433, 375,
- 151, 0, 0, 39, 48, 0, 0, 0, 0, 127,
- 0, 132, 0, 139, 140, 137, 131, 420, 79, 29,
- 436, 242, 0, 0, 195, 197, 192, 229, 0, 0,
- 0, 27, 0, 342, 0, 27, 160, 0, 157, 440,
- 437, 438, 0, 0, 0, 0, 150, 142, 51, 29,
- 124, 73, 70, 133, 135, 29, 0, 27, 232, 194,
- 6, 0, 198, 199, 0, 0, 207, 0, 0, 0,
- 0, 187, 190, 0, 100, 343, 0, 339, 334, 0,
- 162, 0, 29, 0, 0, 0, 27, 29, 27, 0,
- 336, 196, 200, 201, 211, 0, 202, 0, 230, 227,
- 0, 231, 0, 340, 161, 0, 27, 42, 144, 29,
- 122, 52, 0, 27, 80, 0, 210, 203, 204, 208,
- 0, 163, 341, 0, 0, 27, 125, 0, 209, 0,
- 228, 0, 147, 145, 0, 29, 205, 0, 29, 123,
- 27, 213, 29, 191, 27, 81, 27, 86, 214, 0,
- 82, 85, 87, 0, 88, 89, 0, 0, 90, 0,
- 29, 27, 91
+ 0, 0, 0, 0, 0, 0, 0, 67, 283, 281,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 485, 451, 485, 0, 496, 478,
+ 344, 0, 0, 337, 0, 368, 0, 0, 512, 449,
+ 0, 356, 439, 504, 0, 383, 0, 402, 0, 389,
+ 478, 397, 40, 0, 486, 0, 0, 65, 0, 44,
+ 0, 246, 249, 445, 448, 0, 0, 56, 58, 82,
+ 0, 60, 61, 29, 81, 23, 0, 0, 17, 0,
+ 188, 448, 0, 63, 0, 0, 64, 346, 0, 99,
+ 101, 445, 448, 0, 535, 445, 448, 0, 502, 0,
+ 518, 0, 414, 516, 427, 0, 0, 514, 434, 513,
+ 430, 5, 12, 13, 0, 320, 447, 446, 36, 0,
+ 0, 341, 433, 7, 0, 365, 0, 0, 108, 119,
+ 0, 0, 106, 0, 485, 540, 0, 468, 466, 370,
+ 0, 0, 293, 0, 325, 0, 0, 0, 294, 296,
+ 295, 310, 309, 312, 311, 313, 315, 316, 314, 304,
+ 303, 298, 299, 297, 300, 301, 302, 317, 0, 265,
+ 280, 279, 278, 277, 276, 275, 274, 273, 272, 271,
+ 270, 379, 541, 469, 374, 0, 0, 0, 0, 532,
+ 445, 448, 366, 493, 0, 507, 0, 506, 382, 468,
+ 403, 262, 469, 0, 29, 38, 354, 243, 47, 0,
+ 49, 247, 72, 69, 0, 0, 143, 143, 54, 0,
+ 0, 436, 406, 0, 425, 0, 0, 0, 417, 0,
+ 416, 26, 424, 27, 0, 22, 19, 0, 185, 193,
+ 190, 0, 0, 0, 536, 527, 529, 528, 11, 0,
+ 499, 0, 498, 355, 0, 520, 0, 521, 523, 0,
+ 3, 5, 369, 258, 0, 28, 30, 31, 32, 484,
+ 0, 176, 0, 445, 0, 448, 0, 0, 0, 384,
+ 117, 121, 0, 0, 353, 352, 0, 172, 0, 0,
+ 0, 0, 467, 290, 292, 0, 0, 286, 288, 0,
+ 266, 0, 0, 471, 488, 452, 487, 492, 480, 481,
+ 511, 510, 0, 390, 27, 152, 0, 29, 150, 45,
+ 245, 0, 0, 0, 0, 0, 0, 143, 0, 143,
+ 0, 420, 421, 443, 0, 438, 436, 0, 0, 419,
+ 0, 83, 24, 189, 0, 172, 100, 68, 0, 500,
+ 502, 0, 524, 526, 525, 0, 0, 367, 16, 3,
+ 321, 0, 0, 181, 0, 177, 178, 25, 0, 386,
+ 0, 0, 120, 123, 195, 172, 173, 174, 0, 162,
+ 0, 175, 473, 494, 373, 371, 326, 323, 267, 377,
+ 375, 489, 465, 485, 0, 0, 505, 394, 155, 158,
+ 0, 27, 0, 248, 0, 0, 125, 127, 125, 137,
+ 0, 29, 135, 76, 0, 0, 0, 0, 0, 139,
+ 0, 423, 439, 437, 0, 418, 426, 0, 79, 191,
+ 0, 537, 502, 497, 0, 519, 0, 14, 485, 0,
+ 257, 256, 260, 251, 0, 0, 445, 448, 385, 122,
+ 195, 0, 227, 0, 358, 172, 0, 164, 0, 402,
+ 464, 463, 0, 456, 0, 0, 509, 391, 160, 0,
+ 0, 39, 48, 0, 50, 128, 129, 0, 0, 0,
+ 0, 27, 0, 141, 0, 148, 149, 146, 140, 442,
+ 441, 422, 84, 89, 358, 0, 264, 522, 0, 457,
+ 250, 485, 0, 33, 184, 227, 124, 0, 0, 231,
+ 232, 233, 236, 235, 234, 226, 111, 194, 199, 196,
+ 0, 225, 229, 0, 0, 0, 0, 0, 165, 0,
+ 324, 268, 485, 485, 462, 453, 490, 491, 0, 393,
+ 0, 0, 0, 153, 159, 151, 245, 502, 126, 73,
+ 70, 138, 0, 142, 144, 29, 0, 0, 90, 80,
+ 0, 501, 253, 465, 0, 255, 109, 0, 0, 203,
+ 0, 104, 230, 0, 198, 29, 0, 29, 0, 168,
+ 0, 167, 0, 0, 455, 395, 0, 29, 0, 0,
+ 0, 0, 0, 0, 136, 29, 27, 440, 85, 0,
+ 29, 458, 252, 0, 0, 205, 207, 202, 239, 0,
+ 0, 0, 27, 0, 362, 0, 27, 169, 0, 166,
+ 459, 460, 156, 27, 42, 154, 51, 130, 29, 133,
+ 74, 71, 27, 0, 29, 27, 242, 204, 6, 0,
+ 208, 209, 0, 0, 217, 0, 0, 0, 0, 197,
+ 200, 0, 107, 363, 0, 359, 345, 0, 171, 29,
+ 0, 27, 0, 27, 347, 206, 210, 211, 221, 0,
+ 212, 0, 240, 237, 0, 241, 0, 360, 170, 27,
+ 29, 131, 52, 0, 86, 91, 0, 220, 213, 214,
+ 218, 0, 172, 361, 27, 134, 0, 219, 0, 238,
+ 0, 0, 29, 215, 0, 132, 27, 223, 29, 201,
+ 87, 27, 93, 224, 0, 88, 92, 94, 0, 95,
+ 96, 0, 0, 97, 0, 29, 27, 98
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 2, 4, 83, 84, 499, 359, 188, 189,
- 85, 218, 366, 503, 870, 87, 552, 704, 632, 775,
- 310, 635, 168, 634, 555, 779, 905, 562, 558, 828,
- 557, 827, 172, 184, 792, 876, 947, 967, 970, 971,
- 972, 976, 979, 339, 340, 88, 89, 232, 90, 521,
- 91, 518, 375, 92, 374, 93, 520, 603, 604, 711,
- 640, 931, 871, 646, 457, 649, 717, 907, 875, 835,
- 708, 776, 944, 820, 958, 823, 864, 610, 611, 612,
- 509, 510, 192, 193, 197, 683, 748, 803, 920, 749,
- 801, 846, 881, 882, 883, 884, 937, 885, 886, 887,
- 935, 963, 750, 751, 752, 753, 848, 754, 166, 311,
- 312, 556, 671, 672, 673, 733, 593, 594, 94, 300,
- 95, 346, 692, 390, 391, 385, 387, 501, 389, 691,
- 530, 130, 522, 577, 119, 757, 854, 97, 371, 589,
- 500, 617, 616, 623, 622, 425, 98, 613, 156, 157,
- 446, 631, 702, 774, 163, 221, 444, 99, 565, 471,
- 100, 566, 296, 567, 182, 102, 291, 103, 104, 431,
- 625, 770, 674, 796, 696, 697, 767, 698, 105, 106,
- 107, 108, 233, 109, 110, 111, 112, 430, 541, 624,
- 542, 543, 113, 489, 490, 661, 149, 150, 210, 211,
- 492, 587, 114, 343, 580, 115
+ -1, 1, 2, 4, 84, 85, 531, 381, 200, 201,
+ 86, 231, 389, 535, 899, 88, 323, 585, 474, 668,
+ 181, 479, 180, 586, 590, 816, 930, 336, 593, 863,
+ 592, 862, 184, 196, 763, 698, 827, 903, 966, 982,
+ 829, 869, 985, 986, 987, 991, 994, 358, 359, 89,
+ 90, 248, 91, 556, 92, 551, 399, 93, 398, 94,
+ 553, 641, 642, 748, 676, 817, 952, 900, 683, 485,
+ 488, 598, 865, 825, 757, 589, 669, 859, 738, 929,
+ 741, 812, 648, 649, 650, 470, 542, 204, 205, 209,
+ 722, 787, 840, 944, 788, 838, 877, 909, 910, 911,
+ 912, 958, 913, 914, 915, 956, 979, 789, 790, 791,
+ 792, 879, 793, 178, 330, 331, 591, 710, 711, 712,
+ 772, 630, 631, 95, 317, 96, 368, 729, 416, 417,
+ 411, 413, 533, 415, 728, 565, 139, 403, 511, 97,
+ 98, 99, 125, 796, 885, 101, 239, 529, 384, 561,
+ 560, 572, 571, 292, 102, 651, 165, 166, 473, 667,
+ 737, 809, 172, 234, 471, 103, 603, 502, 104, 604,
+ 313, 605, 105, 106, 107, 308, 108, 109, 456, 662,
+ 805, 713, 833, 730, 731, 732, 733, 110, 111, 112,
+ 113, 249, 114, 115, 116, 117, 325, 575, 661, 576,
+ 577, 118, 521, 522, 702, 158, 159, 222, 223, 524,
+ 625, 119, 363, 618, 364, 120
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -736
+#define YYPACT_NINF -769
static const yytype_int16 yypact[] =
{
- -736, 64, 80, -736, 1600, 3962, 3962, -83, 3962, 3962,
- 3962, 3962, 3962, 3962, 3962, -736, 3962, 3962, 3962, 3962,
- 3962, 3962, 3962, 171, 171, 2521, 3962, 187, -54, -52,
- -736, -736, 76, -736, -736, -736, -736, 3962, -736, -44,
- -36, 68, -736, 86, 2652, 2783, 57, -736, 82, 2914,
- -736, 3962, -15, -13, 145, 153, -11, 100, 124, 152,
- 168, -736, -736, -736, 185, 195, -736, -736, -736, -736,
- -736, -736, 172, 127, -736, -736, 205, 3962, -736, -736,
- 179, 178, 303, -66, -736, 11, -736, -736, -736, -736,
- -736, -736, 282, 295, -736, -736, 338, 323, 252, -736,
- -736, 4480, -736, 341, 1199, 249, -736, 261, 349, 292,
- -736, -10, -736, 27, -736, -736, -736, 320, 287, 338,
- 5120, 5120, 3962, 5120, 5120, 1452, -736, -736, 399, -736,
- 3962, -736, -736, -736, -736, -736, -736, -736, -736, 296,
- 205, -77, 306, -736, -736, 336, -736, 171, 1506, 302,
- 456, -736, 334, 205, 340, 345, -736, -736, 347, 361,
- -17, 27, 3045, -736, 3962, -736, 14, 5120, 2390, -736,
- 3962, 3962, 346, 3962, -736, 4521, -736, 4562, 358, 485,
- -736, 359, 5120, 1056, 362, 4605, 205, 98, 16, -736,
- -736, -8, 18, -736, -736, -736, 487, 19, 338, 171,
- 171, 171, 365, -736, 2521, 131, 63, -736, 4093, 171,
- 290, -736, 205, -736, 260, -58, 366, 4646, 364, 3962,
- 231, 367, 317, 231, 53, 450, -736, 455, -736, 416,
- -736, -736, 5, 477, 45, -736, 3962, -736, 513, -736,
- -736, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962,
- 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962,
- 187, -736, -736, -736, 3176, 3962, 3962, 3962, 3962, 3962,
- 3962, 3962, 3962, 3962, 3962, 3962, -736, 170, 3962, -736,
- 3962, 3962, 179, -27, 391, 4687, -736, 205, 281, 188,
- 188, -736, -736, 3307, -736, 3438, -736, 205, 340, 39,
- 392, 39, -736, -9, -736, 4730, 4772, 3962, -736, 461,
- 3962, 393, 540, 5120, 460, 1219, 481, 4813, -736, -736,
- -736, 1020, -736, -736, -736, -736, 162, 484, -15, -736,
- 3962, -736, -736, -13, -736, 1020, 488, -736, 413, 30,
- -736, -736, -736, 32, 414, 415, 143, 417, -736, 497,
- -736, -736, 514, 1549, 425, -736, -736, -736, -50, -736,
- -736, -736, -736, -736, -736, -736, 1731, 4226, -736, -736,
- -736, 3569, 569, 148, -736, 462, -736, -736, 3962, 432,
- 3962, 437, -9, 438, 27, 3962, 5197, 3962, -736, 3962,
- 3962, 3962, 2571, 1582, 1373, 2700, 2700, 2700, 2700, 1288,
- 1288, 1288, 1288, 568, 568, 61, 61, 61, 399, 399,
- 399, -736, -16, 1452, 1452, 1452, 1452, 1452, 1452, 1452,
- 1452, 1452, 1452, 1452, 1452, 3569, 432, 444, 446, 5120,
- 443, 188, 447, 4267, -736, 319, -736, 171, 5120, 171,
- 5020, 340, -736, 3569, -736, -736, 188, -736, 573, 5120,
- 452, 4854, -736, -736, -736, -736, 590, 33, -736, 1020,
- 1020, 1020, 457, -736, 25, 459, 205, -56, 464, -736,
- -736, -736, 451, 549, -736, -736, 4308, -736, -736, 608,
- -736, 171, 471, -736, -736, -736, -736, 475, -736, 34,
- -736, -736, 221, -736, 3962, -736, -736, -736, 473, -736,
- 3569, 159, 492, -736, -736, -736, -736, -736, 171, 480,
- 634, 35, 210, 1020, 495, 205, 340, -736, 522, 148,
- 494, 498, 235, 493, 4353, -736, -736, -9, 5160, 1452,
- 3962, 5063, 5242, 5263, 187, -736, 499, -736, -736, -736,
- -736, -736, 0, -736, -736, -736, -736, -736, 3700, 500,
- -736, -736, 2390, -736, -736, 3962, 3962, 171, 2, 1020,
- 583, 1863, -1, -736, -736, 531, 501, 652, 1020, 520,
- 205, 118, 601, 572, -736, -736, 1020, 235, -736, -736,
- 171, -736, 143, 662, -736, -736, -736, 521, 1418, 3569,
- -736, 525, 530, -736, 206, 532, -736, -736, 3831, -736,
- 205, 340, 148, 529, 675, -736, -736, 235, -736, -736,
- 534, 677, 36, -736, -736, -736, 3569, 3569, 5220, -736,
- -736, -736, 3569, 3569, -736, 537, 3962, 3962, 171, 5120,
- -736, -736, -736, -736, 3962, 1995, 541, 5120, 574, 171,
- 574, -736, -736, 680, -736, -736, -736, 545, 546, -736,
- 1020, -736, 1020, -736, 550, 163, -736, 552, -736, 554,
- -736, 143, -736, 3962, -736, 553, 557, -736, -736, 3962,
- 188, 576, 225, -736, -736, 551, 171, 37, 1034, 340,
- 675, -736, 148, 420, 559, 606, 182, 638, 700, 564,
- 565, 3962, 392, 570, 571, -736, 657, 663, -736, 577,
- 4394, -736, 600, 311, -736, 4896, -736, -736, -736, -736,
- 2, 575, -736, 578, 1020, 640, -736, 328, -736, 310,
- -736, 603, -736, -736, 606, 40, 1452, -736, -736, 580,
- -736, -736, 3962, 576, -736, -736, 524, -736, 660, 148,
- -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
- -736, 320, 396, -736, 22, 581, 585, 605, 46, 745,
- 1020, -736, -736, 5220, -736, -736, -736, 3569, 3962, 3962,
- 576, -736, -736, 188, -736, -736, 395, 611, 681, 3962,
- -736, -736, -736, -736, 612, 348, 615, 3962, 43, 313,
- -736, 1020, 148, 618, -736, -736, 537, 619, 576, -736,
- 754, 6, -736, 702, 338, -736, 706, -736, -736, 48,
- -736, 707, 760, 1020, -736, 631, 627, 628, -736, -736,
- 403, 635, 2390, -736, -736, 636, 641, 2127, 2127, -736,
- 642, -736, 4437, -736, -736, -736, -736, -736, -736, -736,
- -736, -736, 1020, 148, -736, 209, -736, 773, 24, 721,
- 781, 643, 722, -736, 41, 644, 786, 1020, -736, -736,
- -736, -736, 651, 775, 736, 3962, -736, -736, -736, -736,
- -736, -736, -736, -736, -736, -736, 729, 653, -736, -736,
- 715, 654, 209, -736, 658, 718, 705, 661, 671, 1020,
- 743, -736, -736, 1020, -736, -736, 50, -736, -736, 1020,
- -736, 3962, -736, 666, 4937, 2259, 731, -736, 294, 673,
- -736, -736, -736, -736, 558, 148, -736, 750, -736, 811,
- 682, -736, 756, -736, -736, 4978, 762, -736, -736, -736,
- -736, -736, 684, 299, -736, 761, 766, 825, -736, -736,
- 1020, 235, -736, 810, 2390, 753, -736, 688, -736, 148,
- -736, 691, -736, -736, 692, -736, -736, 324, -736, -736,
- 689, -736, -736, -736, 387, -736, 693, 742, -736, 696,
- -736, 742, -736, 148, -736, -736, 776, 698, -736, 699,
- -736, 697, -736
+ -769, 118, 121, -769, 1586, 3871, 3871, -25, 3871, 3871,
+ 3871, 3871, 3871, 3871, 3871, 3871, -769, 3871, 3871, 3871,
+ 3871, 3871, 3871, 3871, 187, 187, 2541, 3871, 349, -22,
+ -20, -769, -769, 107, -769, -769, -769, 74, 3871, -769,
+ -769, 47, 78, -769, -20, 2674, 2807, 163, -769, 170,
+ 2940, -769, 3871, -47, -26, 26, 111, 14, 109, 112,
+ 114, 116, -769, -769, -769, 149, 164, -769, -769, -769,
+ -769, -769, -769, 374, -27, -769, -769, 200, 4004, -769,
+ -769, 150, 194, 253, 278, -769, 13, -769, -769, -769,
+ -769, -769, -769, 247, 275, -769, -769, 172, 288, 303,
+ 340, 315, 249, -769, -769, 4485, -769, -769, 29, 2292,
+ -769, -769, 255, 364, 307, -769, 66, -769, -16, -769,
+ -769, -769, -769, 369, 285, 340, 4938, 4938, 3871, 4938,
+ 4938, 937, -11, 4737, 1760, -769, -769, 353, -769, 3871,
+ -769, -769, -769, -769, -769, -769, -769, -769, 299, 200,
+ -49, 334, -769, -769, 338, -769, 187, 4780, 344, 498,
+ -769, 360, 200, 362, 377, -769, -769, 386, 390, -35,
+ -16, 3073, -769, -769, 4004, 503, -769, 3871, 20, 4938,
+ 2275, -20, 3871, 3871, 387, -769, -769, 4527, -769, 4569,
+ 388, 526, -769, 391, 4938, 1380, 392, 4611, 200, -5,
+ 23, -769, -769, 246, 24, -769, -769, -769, 535, 25,
+ 340, 187, 3871, 3871, 401, -769, 2541, 100, 131, -769,
+ 4137, 187, 413, -769, 200, -769, 306, 293, 402, 412,
+ 4653, 416, 3871, 144, 420, 359, 144, 158, 507, 429,
+ 509, -769, 462, -769, -769, 3871, 3871, -769, 514, 527,
+ 220, -769, 3871, -769, 565, -769, -769, 3871, 3871, 3871,
+ 3871, 3871, 3871, 3871, 3871, 3871, 3871, 3871, 3871, 3871,
+ 3871, 3871, 3871, 3871, 3871, 3871, 349, -769, -769, -769,
+ 3206, 3871, 3871, 3871, 3871, 3871, 3871, 3871, 3871, 3871,
+ 3871, 3871, 429, 235, 3871, -769, 3871, 3871, 150, -7,
+ -769, 4695, 3871, -769, 200, -38, 250, 250, -769, -769,
+ 3339, -769, 3472, -769, 200, 362, -8, 429, -8, -769,
+ 36, -769, -769, 2275, 4938, 436, 3871, -769, 511, -769,
+ 445, 592, 4938, 512, 1208, 534, 10, -769, -769, -769,
+ 757, -769, -769, -769, -769, 162, 538, -47, -769, 3871,
+ -769, -769, -26, -769, 757, 533, -769, -769, 33, -769,
+ -769, 34, 56, 41, -769, 461, 1560, 464, 280, 463,
+ -769, 546, -769, -769, 557, 1066, 465, -769, -769, -769,
+ 304, -769, -769, -769, 429, -769, -769, -769, -769, 1743,
+ 1327, -769, -769, -769, 2408, -769, 609, 89, -769, 504,
+ 469, 471, -769, 479, 3871, 480, 3871, 481, 36, -769,
+ -16, 3871, 5017, 3871, -769, 3871, 3871, 3871, 2458, 2591,
+ 2722, 2855, 2855, 2855, 2855, 1563, 1563, 1563, 1563, 642,
+ 642, 370, 370, 370, 353, 353, 353, -769, 219, 937,
+ 937, 937, 937, 937, 937, 937, 937, 937, 937, 937,
+ 937, -769, 480, 486, -769, 483, 250, 487, 4271, -769,
+ 210, 2026, -36, -769, 187, 4938, 187, 4839, 362, -769,
+ -769, -769, -769, 250, -769, -769, -769, 4938, -769, 1404,
+ -769, -769, -769, -769, 624, 49, 490, 495, -769, 757,
+ 757, 757, -769, 500, -769, 45, 499, 200, -49, 506,
+ -769, -769, -769, 501, 581, -769, -769, 4313, -769, -769,
+ 640, 508, 187, 505, -769, -769, -769, -769, -769, 513,
+ -769, 51, -769, -769, 207, -769, 3871, -769, -769, 429,
+ 502, -769, -769, 153, 516, -769, -769, -769, -769, -769,
+ 187, -769, 52, 54, 510, 135, 757, 515, 200, 362,
+ -769, 536, 89, 518, -769, -769, 519, 350, 517, 4355,
+ 429, 429, 36, 4979, 937, 3871, 4881, 5062, 5083, 349,
+ -769, 429, 429, -769, -769, -769, 53, -769, -769, -769,
+ -769, -769, 3605, -769, 341, -769, -20, -769, -769, -769,
+ 3871, 3871, 234, 234, 757, 597, 1876, -769, 382, -769,
+ 176, -769, -769, 550, 522, 672, 757, 539, 200, -38,
+ 622, 595, -769, -769, 757, 350, -769, -769, 3871, -769,
+ 280, 681, -769, -769, -769, 543, 985, -769, -769, 547,
+ -769, 159, 551, -769, 3738, -769, -769, -769, 200, 362,
+ 89, 553, 696, -769, -769, 350, -769, -769, 563, 697,
+ 59, -769, -769, -769, -769, -769, 5040, -769, -769, -769,
+ -769, -769, 568, 3871, 3871, 187, 4938, -769, -769, 384,
+ 567, 632, 569, 4938, 187, 573, 603, -769, 603, -769,
+ 716, -769, -769, -769, 441, 579, 3871, 58, 291, -769,
+ 757, -769, 757, -769, 589, -36, -769, 582, -769, -769,
+ 590, -769, 280, -769, 3871, -769, 591, -769, 3871, 250,
+ 623, 171, -769, -769, 594, 187, 57, 1227, 362, 696,
+ -769, 89, 650, 599, 646, 284, 679, 743, 3871, 429,
+ 705, 706, 429, -769, 612, 4399, -769, 645, 394, -20,
+ 2275, -769, -769, 618, -769, -769, -769, 234, 625, 627,
+ 757, 684, 628, -769, 4443, -769, -769, -769, -769, -769,
+ 652, -769, -769, 678, 646, 61, 937, -769, 619, -769,
+ -769, 3871, 623, -769, -769, 1167, -769, 711, 89, -769,
+ -769, -769, -769, -769, -769, -769, -769, -769, -769, -769,
+ 369, 600, -769, 27, 630, 634, 633, 212, 772, 757,
+ 5040, -769, 3871, 3871, -769, 623, -769, -769, 250, -769,
+ -20, 761, 722, -769, -769, -769, 3871, 280, -769, -769,
+ -769, -769, 639, -769, -769, -769, 757, 89, -769, -769,
+ 641, -769, -769, 568, 637, 623, -769, 783, 18, -769,
+ 730, 340, -769, 736, -769, -769, 351, -769, 735, 796,
+ 757, -769, 654, 655, -769, -769, 787, -769, 662, 2275,
+ 664, 75, 2009, 2009, -769, -769, 155, -769, -769, 663,
+ -769, -769, -769, 757, 89, -769, 91, -769, 804, 28,
+ 749, 808, 668, 750, -769, 76, 670, 816, 757, -769,
+ -769, -769, -769, 763, -769, -769, -769, -769, -769, -769,
+ -769, -769, 204, 759, -769, 680, -769, -769, 747, 685,
+ 91, -769, 686, 751, 727, 688, 698, 757, 771, -769,
+ -769, 757, -769, -769, 367, -769, -769, 757, -769, -769,
+ 2142, 758, 695, 693, -769, -769, -769, -769, 626, 89,
+ -769, 779, -769, 839, 704, -769, 782, -769, -769, 493,
+ -769, -769, -769, 708, -769, -769, 785, 786, 851, -769,
+ -769, 757, 350, -769, 777, -769, 712, -769, 89, -769,
+ 713, 714, -769, -769, 336, -769, 715, -769, -769, -769,
+ -769, 718, 765, -769, 723, -769, 765, -769, 89, -769,
+ -769, 801, 724, -769, 725, -769, 726, -769
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -736, -736, -328, -736, -23, -736, -736, -736, -736, 527,
- -736, -250, -736, -736, 4, -736, -736, -736, -736, -736,
- -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
- -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
- -119, -736, -736, -736, 372, 491, 496, -114, -736, -736,
- -736, -736, -736, -736, -736, -736, -736, -736, 256, 220,
- 151, -736, 44, -736, -736, -736, -367, -736, -736, 31,
- -736, -736, -736, -736, -736, -736, -736, -570, -736, 181,
- -415, -736, -736, 535, -736, 184, -736, -736, -736, -736,
- -736, -736, -736, -736, -7, -736, -736, -736, -736, -736,
- -736, -736, -736, -736, -736, -735, -736, -736, -736, -539,
- -736, -736, 138, -736, -736, -736, -736, -736, 796, -736,
- -26, -736, -736, -736, -736, -736, -736, -736, -736, -736,
- -736, -736, -736, -736, -2, 150, -736, -736, -736, -736,
- -736, -736, -736, -736, -736, -736, 12, -364, -249, -736,
- -736, -736, -736, -736, -736, -736, 186, 579, 368, -736,
- -736, 309, 312, -736, 734, 694, -419, 454, 765, -736,
- -736, -736, -650, -736, -736, -736, -736, 84, -231, -736,
- 137, -736, -736, -736, -21, -12, -736, -267, -434, -736,
- -736, 13, 66, 222, 300, -736, 683, -736, 405, 203,
- -736, -736, -736, -736, -736, -736
+ -769, -769, -362, -769, -24, -769, -769, -769, -769, 530,
+ -769, -223, -769, -769, 3, -769, -769, -769, -769, -769,
+ -769, -769, -769, -769, -769, -769, -769, -769, -769, -769,
+ -769, -769, -769, -769, -769, -769, -769, -769, -769, -769,
+ -769, -769, -769, -769, -108, -769, -769, -769, 368, 494,
+ 520, -123, -769, -769, -769, -769, -769, -769, -769, -769,
+ -769, -769, 242, 206, -579, -769, -769, 31, -769, -769,
+ -769, -383, -769, -769, 141, -769, -769, -769, -769, -769,
+ -769, -769, -607, -769, 175, -193, -769, -769, 544, -769,
+ 181, -769, -769, -769, -769, -769, -769, -769, -769, 0,
+ -769, -769, -769, -769, -769, -769, -769, -769, -769, -769,
+ -768, -769, -769, -769, -573, -769, -769, 139, -769, -769,
+ -769, -769, -769, 834, -769, 11, -769, -769, -769, -769,
+ -769, -769, -769, -769, -769, -769, -769, -769, -769, -65,
+ -769, -769, -1, 160, -769, -769, -769, -769, -769, -769,
+ -769, -769, -769, -769, -19, -363, -264, -769, -769, -769,
+ -769, -769, -769, -769, 203, 459, 466, -769, -769, 333,
+ 331, -769, 908, -14, 737, -446, 470, 43, -769, -769,
+ -769, -670, -769, -769, -769, -769, 108, -211, -769, 19,
+ -769, -769, -769, -18, 64, -769, -194, -462, -769, -769,
+ 236, 35, -678, 323, -769, 729, -769, 443, 330, -769,
+ -769, -769, -769, -769, 329, -769
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -472
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -540
static const yytype_int16 yytable[] =
{
- 141, 141, 96, 381, 154, 284, 159, 659, 86, 517,
- 536, 411, 550, 432, 843, 160, 636, 805, 546, 227,
- 547, 731, 307, 181, 328, 647, 333, 336, 549, 187,
- 806, 498, 890, 639, 280, 142, 142, 684, 481, 155,
- 483, 560, 582, -169, 280, -172, 427, 534, 582, 896,
- 214, 280, 280, 215, 198, 116, 116, 34, 381, 427,
- 190, 626, 196, 116, 3, 34, 122, 687, 442, 833,
- 445, 225, 226, 116, 472, 34, 376, 811, -361, 852,
- -2, 922, 225, 226, 338, 592, -363, 47, -361, 596,
- 225, 362, 225, 161, -362, 162, 138, 164, 225, 497,
- 34, 283, 165, 569, 138, 169, 257, 258, 259, 688,
- 260, 523, 34, 170, 138, 198, 379, 288, 34, 812,
- 818, 853, -445, 923, 141, 281, 205, -448, 178, 139,
- 298, 355, 140, 186, -448, 281, 205, 139, 80, -444,
- 140, 191, 281, 281, 330, 314, 80, 139, 731, 303,
- 140, 648, 627, 179, 377, 605, 80, 844, 845, 142,
- 145, 145, 228, 326, 158, 308, 207, 329, 141, 334,
- 337, 591, 309, 807, 666, 891, 141, 141, 141, 936,
- 482, 282, 484, 561, 583, -169, 141, -172, 327, 358,
- 794, 897, 348, 80, 834, 208, 209, 380, 116, 80,
- 540, 689, 690, 142, 350, 208, 209, 693, 694, 701,
- 369, 142, 142, 142, 116, 540, 34, 171, -170, 116,
- -249, 142, 382, 264, 265, 266, 267, 268, 269, 270,
- 271, 272, 273, 274, 275, 173, 730, 154, 605, 159,
- 826, 426, 116, 34, 34, 205, 225, 383, 160, 199,
- 206, 205, 473, 116, 349, 138, 220, 735, 116, 436,
- 34, 34, -363, 194, 435, 382, 225, 669, 487, -428,
- -428, 195, 155, 200, 441, 212, 116, 382, 382, 213,
- 880, 719, -249, 138, 145, 620, 732, 382, 139, 382,
- 428, 140, 584, 514, 585, 586, 515, 80, 467, 138,
- 384, 201, 383, 428, 205, 187, 116, -362, 608, 609,
- 225, 225, 467, 207, 208, 209, 139, 202, 737, 140,
- 208, 209, 380, 141, 80, 80, 161, 514, 145, 670,
- 515, 219, 152, 468, 203, 153, 145, 145, 145, 819,
- 380, 80, 80, 384, 204, 511, 145, 468, -244, 785,
- 516, 789, 815, 229, 514, 384, 384, 515, 142, 699,
- -170, 608, 609, 205, 96, 384, 230, 384, 355, 231,
- 504, 951, 527, 208, 209, 802, 205, -41, -41, -41,
- 514, 223, 703, 515, -450, -154, -138, -138, -138, 141,
- 205, -136, -136, -136, 715, 355, 234, 158, 276, 511,
- 262, 263, 729, 787, 788, 277, 787, 788, 225, 351,
- 278, 360, 361, 357, 141, 279, 141, 511, 47, 382,
- 786, 787, 788, 351, 142, 357, 351, 357, 838, 225,
- 362, 356, 208, 209, 382, 212, 467, 467, 467, 540,
- 830, 787, 788, 571, 287, 208, 209, -138, 260, 142,
- 289, 142, -136, -148, -148, -148, 778, 294, 141, 208,
- 209, 821, 822, 790, 295, 797, 836, 225, 497, 862,
- 863, 468, 468, 468, 511, 961, 962, 143, 146, 879,
- 290, 888, 297, 145, 302, 141, 222, 224, 225, 299,
- 467, 301, 601, 142, -218, 316, 516, 384, 321, 516,
- 335, 816, 817, 740, 741, 742, 743, 744, 745, 320,
- 322, 154, 384, 159, 324, 345, 363, 365, 888, 738,
- 142, 370, 160, 368, 739, 468, 372, 740, 741, 742,
- 743, 744, 745, 746, 141, 141, 467, 373, 378, 388,
- 377, 443, 540, 450, 452, 467, 155, 655, 453, 145,
- 454, 938, 456, 467, 516, 474, 633, 141, 851, 141,
- 855, 479, 480, 511, 485, 645, 486, 491, 493, 142,
- 142, 468, 677, 747, 145, 494, 145, 679, 496, 516,
- 468, -471, 513, 519, 516, 956, 525, 526, 468, 877,
- 511, 511, 142, 537, 142, 538, 511, 511, 539, 551,
- 161, 553, 544, 559, 573, 141, 568, 570, 572, 975,
- 254, 255, 256, 257, 258, 259, 141, 260, 145, 906,
- 574, 576, 579, 738, 581, 908, 590, 467, 739, 467,
- 597, 740, 741, 742, 743, 744, 745, 746, 141, 707,
- 142, 595, 598, 600, 602, 145, 606, 607, 614, 621,
- 630, 142, 926, 141, 643, 650, 651, 933, 382, 516,
- 652, 350, 468, 516, 468, 740, 741, 742, 743, 744,
- 745, 158, 656, 142, 657, 663, 664, 799, 667, 945,
- 668, 681, 675, 682, 685, 686, 695, 141, 142, 470,
- 849, 467, 709, 714, 145, 145, 716, 718, 710, 670,
- 722, 723, 734, 478, 724, 960, 727, 728, 964, 755,
- 756, 759, 966, 760, 761, 762, 516, 145, 768, 145,
- 765, 766, 142, 773, 769, 781, 468, 791, 782, 784,
- 981, 800, 771, 808, 809, 795, 384, 467, 101, 120,
- 121, 511, 123, 124, 125, 126, 127, 128, 129, 804,
- 131, 132, 133, 134, 135, 136, 137, 810, 813, 148,
- 151, 382, 824, 829, 825, 145, 831, 842, 467, 516,
- 839, 167, 468, 857, 841, 847, 145, 850, 175, 177,
- 856, 859, 860, 861, 865, 185, 889, 867, 144, 144,
- 467, 868, 892, 873, 893, 895, 894, 898, 145, 899,
- 901, 902, 909, 468, 903, -206, 910, 911, 914, 913,
- 915, 217, 916, 145, 183, 917, 919, 927, 932, 467,
- 516, 939, 516, 934, 940, 468, 866, 563, 564, 942,
- -152, 941, 948, 949, 467, 946, 952, -212, 954, 384,
- 955, 957, 965, 959, 969, 973, 968, 145, 978, 977,
- 982, 980, 974, 578, 468, 475, 285, 505, 680, 516,
- 713, 780, 506, 874, 286, 736, 467, 758, 477, 468,
- 467, 798, 872, 216, 793, 912, 467, 654, 764, 653,
- 840, 599, 662, 725, 0, 331, 0, 347, 0, 0,
- 0, 0, 516, 0, 0, 0, 305, 0, 306, 0,
- 469, 468, 101, 0, 313, 468, 0, 317, 0, 930,
- 0, 468, 292, 0, 469, 0, 0, 467, 516, 0,
- 0, 0, 0, 0, 0, 0, 516, 642, 0, 0,
- 0, 0, 0, 0, 0, 0, 315, 0, 148, 0,
- 0, 0, 353, 0, 658, 0, 0, 0, 953, 0,
- 516, 0, 468, 367, 0, 0, 332, 0, 0, 0,
- 0, 0, 0, 0, 341, 342, 344, 0, 0, 0,
- 386, 0, 0, 0, 354, 392, 393, 394, 395, 396,
- 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
- 407, 408, 409, 410, 0, 0, 0, 0, 413, 414,
- 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
- 0, 0, 429, 0, 429, 433, 0, 0, 720, 0,
- 721, 0, 0, 0, 0, 0, 0, 438, 0, 440,
- 0, 0, 0, 0, 0, 0, 0, 0, 469, 469,
- 469, 449, -173, 0, 451, 0, 0, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
- 0, 0, 459, 460, 476, 0, 0, 0, 0, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 461, 783, 0, 0, 0, 0, 0, 0, 30,
- 31, 116, 469, -428, -428, 0, 0, 0, 0, 36,
- 101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 488, 429, 0, 524, -428, -428, 0, 0, 528,
- 0, 529, 0, 531, 532, 533, 0, 0, 814, 0,
- 0, 0, 138, 0, 0, 0, 512, 0, 469, 0,
- 0, 0, 0, 0, 0, 0, 462, 469, 463, 67,
- 68, 69, 70, 71, 0, 469, 0, 0, 0, 837,
- 464, 0, 0, 0, 0, 465, 74, 75, 466, 0,
- 0, 0, 0, 0, 0, 0, 0, 535, 0, 0,
- 0, 858, 0, 0, -173, 0, 0, 0, 0, 0,
- 512, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 292, 0, 292, 0, 0, 323, 512, 0,
- 878, 0, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, 0, 900, 0, 0, 588, 469,
- 0, 469, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, 0, 0, 341, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 918, -428, -428,
- 0, 921, 0, 0, 618, 512, 0, 924, 0, 0,
- 0, 0, 0, 292, 0, 0, 0, 0, -428, -428,
- 0, 0, 629, 0, 0, 0, 101, 0, 0, 313,
- 637, 0, 0, 469, 0, 101, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 950, 455,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 638, 641, -472, -472, -472, -472, 252, 253,
- 254, 255, 256, 257, 258, 259, 0, 260, 0, 469,
- 0, 0, 0, 0, 0, 660, 0, 488, 0, 0,
- 0, 0, 0, 0, 512, 0, 0, 0, 0, 0,
- 429, 700, 0, 678, 0, 0, 0, 0, 705, 101,
- 469, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 512, 512, 0, 0, 0, 0, 512, 512, 0,
- 0, 0, 469, 292, 0, 0, 0, 726, 0, 0,
- 0, 0, 0, 429, 712, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 469, 260, 0, 0, 763, 488, 235, 236, 237,
- 0, 0, 0, 0, 0, 0, 469, 0, 0, 0,
- 0, 292, 0, 238, 0, 239, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
- 254, 255, 256, 257, 258, 259, 429, 260, 469, 0,
- 0, 0, 469, 0, 0, 641, 0, 238, 469, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 0, 260, 429, 429, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 313, 0, 235, 236, 237, 0, 469,
- 0, 832, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 238, 512, 239, 240, 241, 242, 243, 244, 245,
- 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
- 256, 257, 258, 259, 0, 260, 101, 0, 235, 236,
- 237, 101, 101, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 665, 238, 0, 239, 240, 241, 242,
- 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
- 253, 254, 255, 256, 257, 258, 259, 0, 260, 904,
- 0, 0, 0, 5, 6, 7, 8, 9, 0, 0,
- 0, 0, 10, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 293, 260, 0, 0, 0, 925, 0, 0, 0, 101,
- 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 0, 0, 0, 30,
- 31, 32, 33, 34, 0, 35, 0, 0, 101, 36,
- 37, 38, 39, 0, 40, 0, 41, 0, 42, 0,
- 0, 43, 0, 0, 0, 44, 45, 46, 47, 48,
- 49, 50, 495, 51, 52, 0, 53, 0, 0, 0,
- 54, 55, 56, 0, 57, 58, 59, 60, 61, 62,
- 63, 0, 0, 0, 0, 64, 65, 0, 66, 67,
- 68, 69, 70, 71, 5, 6, 7, 8, 9, 0,
- 72, 0, 0, 10, 0, 73, 74, 75, 76, 77,
- 0, 78, 79, 0, 80, 0, 81, 82, 0, 0,
+ 150, 150, 300, 100, 163, 151, 151, 87, 700, 164,
+ 168, 583, 437, 229, 678, 173, 175, 672, 580, 530,
+ 581, 240, 132, 842, 765, 122, 874, 296, 326, 199,
+ 185, 347, 352, 355, 550, 843, 918, 486, 723, 407,
+ 770, 512, -539, 154, 154, 122, 395, 167, 202, 514,
+ 226, 400, 401, 227, 134, 296, 210, 595, 35, 620,
+ 634, 193, -179, 170, -538, -182, 35, 153, 153, 620,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 453, 620, 924, 755, 346, 357, 208, 278,
+ 279, 726, 169, 195, 633, 407, 453, -381, 296, 451,
+ 455, 238, 457, 198, 600, 469, 229, 472, -383, 229,
+ -382, -470, 238, 48, 238, 663, -450, -450, 3, 297,
+ 503, -2, 210, 224, 607, 305, 128, 225, 296, 171,
+ 203, 174, 150, 727, 176, 854, 177, 151, 315, 861,
+ 298, -348, -348, -180, -467, 238, 206, 297, 81, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 122, 370, 908, 487, 770, 241, 329, 818, 629,
+ 957, 875, 876, 327, 345, 154, 348, 353, 356, 150,
+ 844, 919, 299, 328, 151, 513, -539, 150, 219, 643,
+ 297, 532, 151, 515, 333, -450, -450, 150, 182, 309,
+ 380, 596, 151, 621, 635, 217, -179, 664, -538, -182,
+ 558, 756, -470, 831, 684, -259, 688, -466, 217, 736,
+ 297, 708, 154, 361, 365, 371, 334, 897, 925, 183,
+ 154, 207, 217, 771, 320, 190, 547, 377, 547, 548,
+ 154, 548, 191, 860, 848, 574, 351, 769, -147, -147,
+ -147, 584, 163, 504, 360, 362, 366, 164, 168, 122,
+ 211, 35, 574, 212, 376, 213, 674, 214, 217, 774,
+ 686, 687, 122, 233, 372, 220, 221, 643, -259, 622,
+ 462, 623, 624, 569, 709, 410, 849, -180, 220, 221,
+ 468, 122, 405, 35, 35, 167, -254, -145, -145, -145,
+ 215, 147, 220, 221, 232, 658, 122, 452, 35, 35,
+ -147, 170, 238, 460, 408, 216, 498, 392, 122, 242,
+ 35, 499, 463, 199, 35, 244, 475, 217, 410, 544,
+ 498, 689, 236, 147, 148, 499, 627, 149, 220, 221,
+ 169, 410, 410, 81, 150, 461, 855, 243, 147, 151,
+ 245, 410, 122, 410, 35, 970, 122, 408, 776, -145,
+ 147, 675, -350, -350, 671, 246, 148, 654, 655, 149,
+ 408, 408, 247, 549, 406, 81, 81, -472, 659, 660,
+ 408, 148, 408, 883, 149, 686, 687, 154, 100, 406,
+ 81, 81, 536, 148, 147, 250, 149, 220, 221, 946,
+ 349, 293, 81, 276, 406, 543, 81, 519, -41, -41,
+ -41, 520, 646, 647, 150, 839, 273, 274, 275, 151,
+ 276, 122, 122, 35, -381, 884, 294, 148, 238, -364,
+ 149, 547, 295, 217, 548, 224, 81, 545, 377, -383,
+ 150, 947, 150, 238, -368, 151, 758, 151, 217, 304,
+ -382, 739, 740, 218, 238, -366, 238, 154, 751, 382,
+ 383, 810, 811, 147, 868, 498, 498, 498, 48, 734,
+ 499, 499, 499, 609, 562, 685, 686, 687, 646, 647,
+ 306, 570, 588, 154, 307, 154, 409, 217, 150, 977,
+ 978, 410, 377, 151, 152, 155, 161, 547, 574, 162,
+ 548, 311, -163, 220, 221, 81, 312, 309, 410, 309,
+ 314, 907, 238, 916, 768, 319, 150, 219, 220, 221,
+ 408, 151, 498, 316, 639, 235, 237, 499, 549, 454,
+ 322, 154, 318, 549, 752, 686, 687, 408, 335, 804,
+ 340, 339, 409, 454, 341, 163, 343, 916, 373, 354,
+ 164, 168, 379, 367, 385, 360, 378, 220, 221, 154,
+ -157, -157, -157, 373, 386, 379, 373, 379, 150, 150,
+ 498, 388, 670, 151, 151, 499, 959, 834, 391, 393,
+ 394, 396, 498, 309, 695, 397, 402, 499, 167, 404,
+ 498, 549, 414, 476, 478, 499, 150, 574, 480, 682,
+ 481, 151, 866, 482, 170, 973, 484, 510, 852, 853,
+ 505, 154, 154, 516, 718, 523, 549, 518, 525, 526,
+ 528, 549, 882, 546, 886, 990, 554, 552, 555, 361,
+ 557, -493, -372, 169, 893, 677, 677, -376, 594, 154,
+ 573, 150, 902, 597, 578, 716, 151, 905, 599, 608,
+ 150, 606, 610, 612, 614, 151, 611, 628, 617, 615,
+ 640, 362, 636, 520, 619, 638, 498, 632, 498, 680,
+ 645, 499, 644, 499, 652, 931, 690, 717, 150, 691,
+ 692, 933, 372, 151, 154, 270, 271, 272, 273, 274,
+ 275, 150, 276, 154, 696, 704, 151, 549, 697, -228,
+ 705, 549, 707, 714, 721, 725, 949, 720, 309, 779,
+ 780, 781, 782, 783, 784, 724, 743, 745, 880, -461,
+ 742, 154, 744, 150, 746, 813, 498, 964, 151, 747,
+ 750, 499, 753, 762, 154, 779, 780, 781, 782, 783,
+ 784, 761, 764, 814, 410, 520, 767, 773, 709, 976,
+ 777, 794, 795, 798, 549, 981, 778, 799, 309, 779,
+ 780, 781, 782, 783, 784, 785, 154, 802, 803, 806,
+ 808, 815, 996, 408, 822, 498, 832, 819, 826, 820,
+ 499, 823, 828, 837, 845, 846, 850, 847, 857, 841,
+ 677, 858, 864, 150, 872, 870, 856, 873, 151, 500,
+ 489, 490, 498, 549, 878, 786, 501, 499, 881, 887,
+ 888, 890, 891, 500, 892, 894, 896, 904, 917, 491,
+ 509, 920, 921, 922, 923, 926, 498, 31, 32, 122,
+ 927, 499, -161, 932, 939, 934, 154, 492, -216, 937,
+ 935, 940, 938, 410, 941, 943, 953, 954, 955, 498,
+ 549, 960, 549, 961, 499, 962, 963, 967, -222, 968,
+ 520, 965, 895, 971, 498, 974, 972, 975, 984, 499,
+ 980, 147, 408, 983, 988, 992, 993, 506, 989, 995,
+ 616, 997, 719, 537, 749, 493, 549, 494, 68, 69,
+ 70, 71, 72, 498, 901, 824, 508, 498, 499, 495,
+ 797, 775, 499, 498, 496, 75, 76, 497, 499, 538,
+ 936, 835, 228, 126, 127, 549, 129, 130, 131, 133,
+ 135, 136, 137, 138, 830, 140, 141, 142, 143, 144,
+ 145, 146, 801, 951, 157, 160, 693, 498, 549, 694,
+ 350, 871, 499, 703, 549, 369, 179, 701, 500, 500,
+ 500, 0, 0, 187, 189, 601, 602, 0, 194, 0,
+ 197, 0, 0, 254, 549, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 230, 276, 0, 0,
+ 0, 0, 0, 0, 251, 252, 253, 0, 0, 0,
+ 0, 0, 0, 0, 0, 500, 0, 0, 0, 0,
+ 0, 254, 637, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 301, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
+ 0, 0, 0, 500, 0, 0, 0, 0, 0, 0,
+ 679, 0, 0, 0, 0, 500, 0, 0, 0, 0,
+ 0, 0, 0, 500, 0, 251, 252, 253, 0, 230,
+ 699, 0, 230, 0, 0, 324, 0, 0, 0, 0,
+ 332, 194, 254, 0, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 0, 0, 0,
+ 194, 194, 0, 0, 157, 0, 0, 0, 375, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
- 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 0, 0, 0,
- 30, 31, 32, 33, 34, 0, 35, 0, 0, 0,
- 36, 37, 38, 39, 0, 40, 0, 41, 0, 42,
- 0, 0, 43, 0, 0, 0, 44, 45, 46, 47,
- 0, 49, 50, 0, 51, 0, 0, 53, 0, 0,
- 0, 54, 55, 56, 0, 57, 58, 59, 502, 61,
- 62, 63, 0, 0, 0, 0, 64, 65, 0, 66,
- 67, 68, 69, 70, 71, 0, 5, 6, 7, 8,
- 9, 72, 0, 0, 0, 10, 118, 74, 75, 76,
- 77, 0, 78, 79, 0, 80, 0, 81, 82, 644,
+ 390, 0, 706, 0, 0, 0, 0, 0, 0, 500,
+ 0, 500, 0, 324, 324, 0, 759, 0, 760, 0,
+ 412, 0, 0, 0, 0, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 0, 0, 0, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 0, 0, 324, 0, 324, 458, 0, 0, 0, 500,
+ 194, 0, 0, 0, 0, 0, 821, 0, 465, 0,
+ 467, 527, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 477, -183, 0, 0, 0, 0,
+ 0, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 0, 0, 0, 0, 507, 500, 0,
+ 0, 0, 0, 0, 0, 851, 0, 777, -450, -450,
+ 0, 0, 0, 778, 0, 0, 779, 780, 781, 782,
+ 783, 784, 785, 0, 0, 500, 0, -450, -450, 0,
+ 0, 0, 867, 0, 0, 0, 0, 0, 0, 483,
+ 0, 0, 194, 0, 0, 0, 0, 0, 0, 500,
+ 0, 0, 324, 0, 559, 0, 889, 0, 0, 563,
+ 0, 564, 836, 566, 567, 568, 0, 0, 0, 0,
+ 0, 0, 500, 0, 0, 0, 251, 252, 253, 906,
+ 0, 0, 0, 0, 0, 0, 0, 500, 0, 0,
+ 0, 0, 0, 254, 928, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 500, 276, 0, -183,
+ 500, 0, 0, 942, 0, 0, 500, 945, 0, 0,
+ 0, 0, 0, 948, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 0, 5, 6, 7,
+ 8, 9, 0, 0, 0, 0, 10, 11, 0, 0,
+ 500, 0, 0, 0, 0, 0, 0, 969, 0, 0,
+ 0, 587, 0, 0, 626, 0, 0, 0, 0, 0,
+ -450, -450, 0, 0, 0, 0, 0, 12, 13, 0,
+ 0, 0, 0, 14, 0, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 0, 0, 656, 31, 32, 33, 34, 35, 0,
+ 36, 0, 539, 0, 37, 38, 39, 40, 0, 41,
+ 666, 42, 0, 43, 0, 0, 44, 0, 332, 673,
+ 45, 46, 47, 48, 0, 50, 51, 0, 0, 52,
+ 0, 0, 54, 0, 0, 0, 0, 0, 57, 0,
+ 58, 59, 60, 0, 0, 0, 194, 0, 0, 0,
+ 0, 65, 66, 342, 67, 68, 69, 70, 71, 72,
+ 0, 0, 194, 0, 0, 0, 73, 0, 0, 0,
+ 0, 124, 75, 76, 77, 78, 0, 79, 80, 0,
+ 81, 0, 82, 83, 0, 0, 0, 0, 0, 0,
+ 0, 324, 735, 0, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 0, 0, 0, 5,
+ 6, 7, 8, 9, 754, 0, 0, 0, 10, 11,
+ -540, -540, -540, -540, 268, 269, 270, 271, 272, 273,
+ 274, 275, 766, 276, 0, 0, 324, 0, 0, 0,
+ -450, -450, 0, 0, 0, 0, 0, 0, 0, 12,
+ 13, 0, 0, 0, 0, 14, 800, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 0, 0, 0, 31, 32, 33, 34,
+ 35, 0, 36, 0, 0, 0, 37, 38, 39, 40,
+ 0, 41, 0, 42, 0, 43, 0, 0, 44, 324,
+ 0, 0, 45, 46, 47, 48, 49, 50, 51, 0,
+ 0, 52, 53, 0, 54, 0, 0, 0, 55, 56,
+ 57, 0, 58, 59, 60, 61, 62, 63, 64, 0,
+ 324, 324, 517, 65, 66, 0, 67, 68, 69, 70,
+ 71, 72, 0, 0, 332, 0, 0, 0, 73, 0,
+ 0, 0, 0, 74, 75, 76, 77, 78, 0, 79,
+ 80, 0, 81, 0, 82, 83, 5, 6, 7, 8,
+ 9, 0, 0, 0, 0, 10, 11, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
- 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 0,
- 0, 0, 30, 31, 32, 33, 34, 0, 35, 0,
- 0, 0, 36, 37, 38, 39, 0, 40, 0, 41,
- 0, 42, 0, 0, 43, 0, 0, 0, 44, 45,
- 46, 47, 0, 49, 50, 0, 51, 0, 0, 53,
- 0, 0, 0, 0, 0, 56, 0, 57, 58, 59,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
- 0, 66, 67, 68, 69, 70, 71, 0, 5, 6,
- 7, 8, 9, 72, 0, 0, 0, 10, 118, 74,
- 75, 76, 77, 0, 78, 79, 0, 80, 0, 81,
- 82, 706, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 11, 12, 0,
- 0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
+ 0, 0, 0, 0, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 12, 13, 0, 0,
+ 0, 0, 14, 0, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 0, 0, 0, 31, 32, 33, 34, 35, 0, 36,
+ -450, -450, 0, 37, 38, 39, 40, 0, 41, 0,
+ 42, 0, 43, 0, 0, 44, 0, 0, 0, 45,
+ 46, 47, 48, 0, 50, 51, 0, 0, 52, 0,
+ 0, 54, 0, 0, 0, 55, 56, 57, 0, 58,
+ 59, 60, 534, 62, 63, 64, 0, 0, 0, 0,
+ 65, 66, 0, 67, 68, 69, 70, 71, 72, 5,
+ 6, 7, 8, 9, 0, 73, 0, 0, 10, 11,
+ 124, 75, 76, 77, 78, 0, 79, 80, 0, 81,
+ 0, 82, 83, 681, 0, 0, 0, 0, 0, 0,
+ 0, 0, -349, -349, 0, 0, 0, 0, 0, 12,
+ 13, 0, 0, 0, 0, 14, 0, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 0, 0, 0, 31, 32, 33, 34,
+ 35, 0, 36, 0, 0, 0, 37, 38, 39, 40,
+ 0, 41, 0, 42, 0, 43, 0, 0, 44, 0,
+ 0, 0, 45, 46, 47, 48, 0, 50, 51, 0,
+ 0, 52, 0, 0, 54, 0, 0, 0, 0, 0,
+ 57, 0, 58, 59, 60, 0, 0, 0, 0, 0,
+ 0, 0, 0, 65, 66, 0, 67, 68, 69, 70,
+ 71, 72, 5, 6, 7, 8, 9, 0, 73, 0,
+ 0, 10, 11, 124, 75, 76, 77, 78, 0, 79,
+ 80, 0, 81, 0, 82, 83, 898, 0, 0, 0,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 12, 13, 0, 0, 0, 0, 14, 0,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 0, 0, 0, 31,
+ 32, 33, 34, 35, 0, 36, -450, -450, 0, 37,
+ 38, 39, 40, 0, 41, 0, 42, 0, 43, 0,
+ 0, 44, 0, 0, 0, 45, 46, 47, 48, 0,
+ 50, 51, 0, 0, 52, 0, 0, 54, 0, 0,
+ 0, 0, 0, 57, 0, 58, 59, 60, 0, 0,
+ 0, 0, 0, 0, 0, 0, 65, 66, 0, 67,
+ 68, 69, 70, 71, 72, 5, 6, 7, 8, 9,
+ 0, 73, 0, 0, 10, 11, 124, 75, 76, 77,
+ 78, 0, 79, 80, 0, 81, 0, 82, 83, 950,
+ 0, 0, 0, 0, 0, 0, 0, 0, -351, -351,
+ 0, 0, 0, 0, 0, 12, 13, 0, 0, 0,
+ 0, 14, 0, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 0,
+ 0, 0, 31, 32, 33, 34, 35, 0, 36, 0,
+ 0, 0, 37, 38, 39, 40, 0, 41, 0, 42,
+ 0, 43, 0, 0, 44, 0, 0, 0, 45, 46,
+ 47, 48, 0, 50, 51, 0, 0, 52, 0, 0,
+ 54, 0, 0, 0, 0, 0, 57, 0, 58, 59,
+ 60, 0, 0, 0, 0, 0, 0, 0, 0, 65,
+ 66, 0, 67, 68, 69, 70, 71, 72, 5, 6,
+ 7, 8, 9, 0, 73, 0, 0, 10, 11, 124,
+ 75, 76, 77, 78, 0, 79, 80, 0, 81, 0,
+ 82, 83, 0, 0, 0, 0, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 12, 13,
+ 0, 0, 0, 0, 14, 0, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 0, 0, 0, 30, 31, 32, 33, 34, 0,
- 35, 0, 0, 0, 36, 37, 38, 39, 0, 40,
- 0, 41, 0, 42, 0, 0, 43, 0, 0, 0,
- 44, 45, 46, 47, 0, 49, 50, 0, 51, 0,
- 0, 53, 0, 0, 0, 0, 0, 56, 0, 57,
- 58, 59, 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 65, 0, 66, 67, 68, 69, 70, 71, 0,
- 5, 6, 7, 8, 9, 72, 0, 0, 0, 10,
- 118, 74, 75, 76, 77, 0, 78, 79, 0, 80,
- 0, 81, 82, 869, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
- 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 0, 0, 0, 30, 31, 32, 33,
- 34, 0, 35, 0, 0, 0, 36, 37, 38, 39,
- 0, 40, 0, 41, 0, 42, 0, 0, 43, 0,
- 0, 0, 44, 45, 46, 47, 0, 49, 50, 0,
- 51, 0, 0, 53, 0, 0, 0, 0, 0, 56,
- 0, 57, 58, 59, 0, 0, 0, 0, 0, 0,
- 0, 0, 64, 65, 0, 66, 67, 68, 69, 70,
- 71, 0, 5, 6, 7, 8, 9, 72, 0, 0,
- 0, 10, 118, 74, 75, 76, 77, 0, 78, 79,
- 0, 80, 0, 81, 82, 929, 0, 0, 0, 0,
+ 29, 30, 0, 0, 0, 31, 32, 33, 34, 35,
+ 0, 36, -450, -450, 0, 37, 38, 39, 40, 0,
+ 41, 0, 42, 0, 43, 0, 0, 44, 0, 0,
+ 0, 45, 46, 47, 48, 0, 50, 51, 0, 0,
+ 52, 0, 0, 54, 0, 0, 0, 0, 0, 57,
+ 0, 58, 59, 60, 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 66, 0, 67, 68, 69, 70, 71,
+ 72, 5, 6, 7, 8, 9, 0, 73, 0, 0,
+ 10, 11, 124, 75, 76, 77, 78, 0, 79, 80,
+ 0, 81, 0, 82, 83, 0, 0, 0, 0, 0,
+ 540, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 12, 13, 0, 0, 0, 0, 14, 0, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 0, 0, 0, 0, 31, 32,
+ 122, 34, 35, 0, 0, 0, 0, 0, 37, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 48, 276, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 11, 12, 0, 0, 0, 0, 13, 0, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 0, 0, 0, 30, 31,
- 32, 33, 34, 0, 35, 0, 0, 0, 36, 37,
- 38, 39, 0, 40, 0, 41, 0, 42, 0, 0,
- 43, 0, 0, 0, 44, 45, 46, 47, 0, 49,
- 50, 0, 51, 0, 0, 53, 0, 0, 0, 0,
- 0, 56, 0, 57, 58, 59, 0, 0, 0, 0,
- 0, 0, 0, 0, 64, 65, 0, 66, 67, 68,
- 69, 70, 71, 5, 6, 7, 8, 9, 0, 72,
- 0, 0, 10, 0, 118, 74, 75, 76, 77, 0,
- 78, 79, 0, 80, 0, 81, 82, 0, 0, 0,
+ 0, 0, 123, 0, 0, 59, 60, 0, 0, 0,
+ 0, 0, 0, 0, 0, 65, 66, 0, 67, 68,
+ 69, 70, 71, 72, 5, 6, 7, 8, 9, 0,
+ 73, 0, 0, 10, 121, 124, 75, 76, 77, 78,
+ 541, 0, 0, 0, 81, 0, 82, 83, 0, 0,
+ 0, 0, 0, 156, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 12, 13, 0, 0, 0, 0,
+ 14, 0, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 0, 0, 0,
+ 0, 31, 32, 122, 34, 35, 0, 0, 0, 0,
+ 0, 37, 0, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 48, 276, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 123, 0, 0, 59, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 0, 67, 68, 69, 70, 71, 72, 5, 6, 7,
+ 8, 9, 0, 73, 0, 0, 10, 121, 124, 75,
+ 76, 77, 78, 0, 0, 0, 0, 81, 0, 82,
+ 83, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 12, 13, 0,
+ 0, 0, 0, 14, 0, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 0, 0, 0, 0, 31, 32, 122, 34, 35, 0,
+ 0, 0, 0, 0, 37, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 48, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 123, 0,
+ 0, 59, 60, 0, 0, 0, 0, 0, 0, 0,
+ 0, 65, 66, 0, 67, 68, 69, 70, 71, 72,
+ 5, 6, 7, 8, 9, 0, 73, 0, 0, 10,
+ 121, 124, 75, 76, 77, 78, 0, 186, 0, 0,
+ 81, 0, 82, 83, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 0, 0, 0, 30,
- 31, 32, 33, 34, 0, 35, 0, 0, 0, 36,
- 37, 38, 39, 0, 40, 0, 41, 0, 42, 0,
- 0, 43, 0, 0, 0, 44, 45, 46, 47, 0,
- 49, 50, 0, 51, 0, 0, 53, 0, 0, 0,
- 0, 0, 56, 0, 57, 58, 59, 0, 0, 0,
- 0, 0, 0, 0, 0, 64, 65, 0, 66, 67,
- 68, 69, 70, 71, 5, 6, 7, 8, 9, 0,
- 72, 0, 0, 10, 0, 118, 74, 75, 76, 77,
- 0, 78, 79, 0, 80, 0, 81, 82, 0, 0,
- 0, 0, 147, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
- 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 0, 0, 0, 0,
- 30, 31, 116, 33, 34, 0, 0, 0, 0, 0,
- 36, 242, 243, 244, 245, 246, 247, 248, 249, 250,
- 251, 252, 253, 254, 255, 256, 257, 258, 259, 47,
- 260, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 117, 0, 0, 58, 59, 0, 0,
- 0, 0, 0, 0, 0, 0, 64, 65, 0, 66,
- 67, 68, 69, 70, 71, 5, 6, 7, 8, 9,
- 0, 72, 0, 0, 10, 0, 118, 74, 75, 76,
- 77, 0, 0, 0, 0, 80, 0, 81, 82, 0,
+ 12, 13, 0, 0, 0, 0, 14, 0, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 0, 0, 0, 0, 31, 32, 122,
+ 34, 35, 0, 0, 0, 0, 0, 37, -540, -540,
+ -540, -540, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 0, 0, 0,
- 0, 30, 31, 116, 33, 34, 0, 0, 0, 0,
- 0, 36, -472, -472, -472, -472, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
- 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 117, 0, 0, 58, 59, 0,
- 0, 0, 0, 0, 0, 0, 0, 64, 65, 0,
- 66, 67, 68, 69, 70, 71, 5, 6, 7, 8,
- 9, 0, 72, 0, 0, 10, 0, 118, 74, 75,
- 76, 77, 0, 174, 0, 0, 80, 0, 81, 82,
+ 0, 123, 0, 0, 59, 60, 0, 0, 0, 0,
+ 0, 0, 0, 0, 65, 66, 0, 67, 68, 69,
+ 70, 71, 72, 5, 6, 7, 8, 9, 0, 73,
+ 0, 0, 10, 121, 124, 75, 76, 77, 78, 0,
+ 188, 0, 0, 81, 0, 82, 83, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
- 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 0, 0,
- 0, 0, 30, 31, 116, 33, 34, 0, 0, 0,
- 0, 0, 36, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 12, 13, 0, 0, 0, 0, 14,
+ 0, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 0, 0, 0, 0,
+ 31, 32, 122, 34, 35, 0, 0, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 117, 0, 0, 58, 59,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
- 0, 66, 67, 68, 69, 70, 71, 5, 6, 7,
- 8, 9, 0, 72, 0, 0, 10, 0, 118, 74,
- 75, 76, 77, 0, 176, 0, 0, 80, 0, 81,
- 82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 11, 12, 0, 0,
- 0, 0, 13, 0, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
- 0, 0, 0, 30, 31, 116, 33, 34, 0, 0,
- 0, 0, 0, 36, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 123, 0, 0, 59, 60, 0,
+ 0, 0, 0, 0, 0, 0, 0, 65, 66, 0,
+ 67, 68, 69, 70, 71, 72, 5, 6, 7, 8,
+ 9, 0, 73, 0, 0, 10, 11, 124, 75, 76,
+ 77, 78, 0, 192, 0, 0, 81, 0, 82, 83,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 47, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 117, 0, 0, 58,
- 59, 0, 0, 0, 0, 0, 0, 0, 0, 64,
- 65, 0, 66, 67, 68, 69, 70, 71, 5, 6,
- 7, 8, 9, 0, 72, 0, 0, 10, 0, 118,
- 74, 75, 76, 77, 0, 180, 0, 0, 80, 0,
- 81, 82, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 11, 12, 0,
- 0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 0, 0, 0, 0, 30, 31, 116, 33, 34, 0,
- 0, 0, 0, 0, 36, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 12, 13, 0, 0,
+ 0, 0, 14, 0, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 0,
+ 0, 0, 0, 31, 32, 122, 34, 35, 0, 0,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 47, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 117, 0, 0,
- 58, 59, 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 65, 0, 66, 67, 68, 69, 70, 71, 5,
- 6, 7, 8, 9, 0, 72, 0, 0, 10, 0,
- 118, 74, 75, 76, 77, 304, 0, 0, 0, 80,
- 0, 81, 82, 0, 0, 0, 0, 412, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
- 0, 0, 0, 0, 13, 0, 14, 15, 16, 17,
+ 0, 0, 48, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 123, 0, 0,
+ 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
+ 65, 66, 0, 67, 68, 69, 70, 71, 72, 5,
+ 6, 7, 8, 9, 0, 73, 0, 0, 10, 121,
+ 124, 75, 76, 77, 78, 321, 0, 0, 0, 81,
+ 0, 82, 83, 0, 0, 0, 0, 0, 438, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
+ 13, 0, 0, 0, 0, 14, 0, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 0, 0, 0, 0, 30, 31, 116, 33, 34,
- 0, 0, 0, 0, 0, 36, 0, 0, 0, 0,
+ 28, 29, 0, 0, 0, 0, 31, 32, 122, 34,
+ 35, 0, 0, 0, 0, 0, 37, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 47, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 117, 0,
- 0, 58, 59, 0, 0, 0, 0, 0, 0, 0,
- 0, 64, 65, 0, 66, 67, 68, 69, 70, 71,
- 5, 6, 7, 8, 9, 0, 72, 0, 0, 10,
- 0, 118, 74, 75, 76, 77, 0, 0, 0, 0,
- 80, 0, 81, 82, 0, 0, 0, 0, 437, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
- 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 0, 0, 0, 0, 30, 31, 116, 33,
- 34, 0, 0, 0, 0, 0, 36, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 47, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
- 0, 0, 58, 59, 0, 0, 0, 0, 0, 0,
- 0, 0, 64, 65, 0, 66, 67, 68, 69, 70,
- 71, 5, 6, 7, 8, 9, 0, 72, 0, 0,
- 10, 0, 118, 74, 75, 76, 77, 0, 0, 0,
- 0, 80, 0, 81, 82, 0, 0, 0, 0, 439,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 11, 12, 0, 0, 0, 0, 13, 0, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 0, 0, 0, 0, 30, 31, 116,
- 33, 34, 0, 0, 0, 0, 0, 36, 0, 0,
+ 0, 0, 0, 0, 0, 48, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 47, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 117, 0, 0, 58, 59, 0, 0, 0, 0, 0,
- 0, 0, 0, 64, 65, 0, 66, 67, 68, 69,
- 70, 71, 5, 6, 7, 8, 9, 0, 72, 0,
- 0, 10, 0, 118, 74, 75, 76, 77, 0, 0,
- 0, 0, 80, 0, 81, 82, 0, 0, 0, 0,
- 508, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 11, 12, 0, 0, 0, 0, 13, 0, 14,
+ 123, 0, 0, 59, 60, 0, 0, 0, 0, 0,
+ 0, 0, 0, 65, 66, 0, 67, 68, 69, 70,
+ 71, 72, 5, 6, 7, 8, 9, 0, 73, 0,
+ 0, 10, 121, 124, 75, 76, 77, 78, 0, 0,
+ 0, 0, 81, 0, 82, 83, 0, 0, 0, 0,
+ 0, 464, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 12, 13, 0, 0, 0, 0, 14, 0,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 0, 0, 0, 0, 30, 31,
- 116, 33, 34, 0, 0, 0, 0, 0, 36, 0,
+ 25, 26, 27, 28, 29, 0, 0, 0, 0, 31,
+ 32, 122, 34, 35, 0, 0, 0, 0, 0, 37,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 47, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 117, 0, 0, 58, 59, 0, 0, 0, 0,
- 0, 0, 0, 0, 64, 65, 0, 66, 67, 68,
- 69, 70, 71, 5, 6, 7, 8, 9, 0, 72,
- 0, 0, 10, 0, 118, 74, 75, 76, 77, 0,
- 0, 0, 0, 80, 0, 81, 82, 0, 0, 0,
- 0, 628, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 0, 0, 0, 0, 30,
- 31, 116, 33, 34, 0, 0, 0, 0, 0, 36,
+ 0, 0, 0, 123, 0, 0, 59, 60, 0, 0,
+ 0, 0, 0, 0, 0, 0, 65, 66, 0, 67,
+ 68, 69, 70, 71, 72, 5, 6, 7, 8, 9,
+ 0, 73, 0, 0, 10, 121, 124, 75, 76, 77,
+ 78, 0, 0, 0, 0, 81, 0, 82, 83, 0,
+ 0, 0, 0, 0, 466, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 12, 13, 0, 0, 0,
+ 0, 14, 0, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 0, 0,
+ 0, 0, 31, 32, 122, 34, 35, 0, 0, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 47, 0,
+ 0, 48, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 123, 0, 0, 59,
+ 60, 0, 0, 0, 0, 0, 0, 0, 0, 65,
+ 66, 0, 67, 68, 69, 70, 71, 72, 5, 6,
+ 7, 8, 9, 0, 73, 0, 0, 10, 121, 124,
+ 75, 76, 77, 78, 0, 0, 0, 0, 81, 0,
+ 82, 83, 0, 0, 0, 0, 0, 665, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
+ 0, 0, 0, 0, 14, 0, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 0, 0, 0, 0, 31, 32, 122, 34, 35,
+ 0, 0, 0, 0, 0, 37, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 117, 0, 0, 58, 59, 0, 0, 0,
- 0, 0, 0, 0, 0, 64, 65, 0, 66, 67,
- 68, 69, 70, 71, 5, 6, 7, 8, 9, 0,
- 72, 0, 0, 10, 0, 118, 74, 75, 76, 77,
- 0, 0, 0, 0, 80, 0, 81, 82, 0, 0,
- 0, 0, 676, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
- 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 0, 0, 0, 0,
- 30, 31, 116, 33, 34, 0, 0, 0, 0, 0,
- 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
+ 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 123,
+ 0, 0, 59, 60, 0, 0, 0, 0, 0, 0,
+ 0, 0, 65, 66, 0, 67, 68, 69, 70, 71,
+ 72, 5, 6, 7, 8, 9, 0, 73, 0, 0,
+ 10, 121, 124, 75, 76, 77, 78, 0, 0, 0,
+ 0, 81, 0, 82, 83, 0, 0, 0, 0, 0,
+ 715, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 12, 13, 0, 0, 0, 0, 14, 0, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 0, 0, 0, 0, 31, 32,
+ 122, 34, 35, 0, 0, 0, 0, 0, 37, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 117, 0, 0, 58, 59, 0, 0,
- 0, 0, 0, 0, 0, 0, 64, 65, 0, 66,
- 67, 68, 69, 70, 71, 5, 6, 7, 8, 9,
- 0, 72, 0, 0, 10, 0, 118, 74, 75, 76,
- 77, 0, 0, 0, 0, 80, 0, 81, 82, 0,
+ 0, 0, 0, 0, 0, 0, 0, 48, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 0, 0, 0,
- 0, 30, 31, 116, 33, 34, 0, 0, 0, 0,
- 0, 36, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 123, 0, 0, 59, 60, 0, 0, 0,
+ 0, 0, 0, 0, 0, 65, 66, 0, 67, 68,
+ 69, 70, 71, 72, 5, 6, 7, 8, 9, 0,
+ 73, 0, 0, 10, 121, 124, 75, 76, 77, 78,
+ 0, 0, 0, 0, 81, 0, 82, 83, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 117, 0, 0, 58, 59, 0,
- 0, 0, 0, 0, 0, 0, 0, 64, 65, 0,
- 66, 67, 68, 69, 70, 71, 5, 6, 7, 8,
- 9, 0, 72, 0, 0, 10, 0, 118, 74, 75,
- 76, 77, 0, 0, 0, 0, 80, 0, 81, 82,
+ 0, 0, 0, 0, 12, 13, 0, 0, 0, 0,
+ 14, 0, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 0, 0, 0,
+ 0, 31, 32, 122, 34, 35, 0, 0, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
- 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 0, 0,
- 0, 0, 30, 31, 116, 352, 34, 0, 0, 0,
- 0, 0, 36, 0, 0, 0, 0, 0, 0, 0,
+ 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 123, 0, 0, 59, 60,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 0, 67, 68, 69, 70, 71, 72, 5, 6, 7,
+ 8, 9, 0, 73, 0, 0, 10, 11, 124, 75,
+ 76, 77, 78, 0, 0, 0, 0, 81, 0, 82,
+ 83, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 12, 13, 0,
+ 0, 0, 0, 14, 0, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 0, 0, 0, 0, 31, 32, 122, 34, 35, 0,
+ 0, 0, 0, 0, 37, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 117, 0, 0, 58, 59,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
- 0, 66, 67, 68, 69, 70, 71, 0, 0, 0,
- 0, 0, 0, 72, 0, 235, 236, 237, 118, 74,
- 75, 76, 77, 0, 0, 0, 0, 80, 0, 81,
- 82, 238, 0, 239, 240, 241, 242, 243, 244, 245,
- 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
- 256, 257, 258, 259, 0, 260, 235, 236, 237, 0,
+ 0, 0, 0, 48, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 123, 0,
+ 0, 59, 60, 0, 0, 0, 0, 0, 0, 0,
+ 0, 65, 66, 0, 67, 68, 69, 70, 71, 72,
+ 5, 6, 7, 8, 9, 0, 73, 0, 0, 10,
+ 121, 124, 75, 76, 77, 78, 0, 0, 0, 0,
+ 81, 0, 82, 83, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 238, 0, 239, 240, 241, 242, 243, 244,
- 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 258, 259, 0, 260, 235, 236, 237,
+ 12, 13, 0, 0, 0, 0, 14, 0, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 0, 0, 0, 0, 31, 32, 122,
+ 374, 35, 0, 0, 0, 0, 0, 37, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 238, 0, 239, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
- 254, 255, 256, 257, 258, 259, 0, 260, 0, 0,
- 0, 0, 235, 236, 237, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 238, 507,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 0, 260, 235, 236, 237, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 238,
- 545, 239, 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
- 258, 259, 0, 260, 0, 0, 235, 236, 237, 0,
+ 0, 0, 0, 0, 0, 0, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 575, 238, 833, 239, 240, 241, 242, 243, 244,
- 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 258, 259, 0, 260, 0, 0, 235,
- 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 238, 615, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
- 235, 236, 237, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 238, 772, 239, 240,
- 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
- 251, 252, 253, 254, 255, 256, 257, 258, 259, 0,
- 260, 235, 236, 237, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 238, 834, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 0, 260, 0, 0, 235, 236, 237, 0, 0, 0,
+ 0, 123, 0, 0, 59, 60, 0, 0, 0, 0,
+ 0, 0, 0, 0, 65, 66, 0, 67, 68, 69,
+ 70, 71, 72, 0, 0, 0, 0, 0, 0, 73,
+ 251, 252, 253, 0, 124, 75, 76, 77, 78, 0,
+ 0, 0, 0, 81, 0, 82, 83, 254, 0, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 251, 252, 253, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 254,
+ 0, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 251, 252, 253, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 238, 261, 239, 240, 241, 242, 243, 244, 245, 246,
- 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 0, 260, 235, 236, 237, 0, 0,
+ 0, 254, 0, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 0, 0, 251, 252,
+ 253, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 254, 579, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 0, 0, 251, 252, 253, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 613, 254,
+ 755, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 251, 252, 253, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 238, 318, 239, 240, 241, 242, 243, 244, 245,
- 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
- 256, 257, 258, 259, 0, 260, 235, 236, 237, 0,
+ 653, 254, 0, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 251, 252, 253, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 238, 319, 239, 240, 241, 242, 243, 244,
- 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 258, 259, 0, 260, 0, 0, 235,
- 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 238, 325, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
- 0, 235, 236, 237, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 364, 238, 0, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 0, 260, 235, 236, 237, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 434, 238, 0,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 0, 260, 235, 236, 237, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 238,
- 447, 239, 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
- 258, 259, 0, 260, 0, 235, 236, 237, 0, 0,
+ 0, 0, 0, 254, 807, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 251, 252,
+ 253, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 254, 756, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 251, 252, 253, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 254, 277, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 251, 252, 253, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 254,
+ 337, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 251, 252, 253, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 238, 448, 239, 240, 241, 242, 243, 244, 245,
- 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
- 256, 257, 258, 259, 0, 260, 235, 236, 237, 0,
+ 0, 254, 338, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 251, 252, 253, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 238, 458, 239, 240, 241, 242, 243, 244,
- 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 258, 259, 0, 260, 235, 236, 237,
+ 0, 0, 0, 254, 344, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 0, 251,
+ 252, 253, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 387, 254, 0, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 459, 251, 252,
+ 253, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 302, 0, 254, 0, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 251, 252, 253, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 310, 254, 657, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 251, 252, 253,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 238, 554, 239, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
- 254, 255, 256, 257, 258, 259, 0, 260, 0, 235,
- 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 238, 777, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
- 0, 0, 235, 236, 237, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 928, 238, 619,
- 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 0, 260, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 943, 235,
- 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 548, 238, 0, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
- 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 238, 0, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 237, 260,
+ 0, 0, 0, 0, 254, 582, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 252,
+ 253, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 254, 0, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 253, 276,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 238, 0, 239, 240, 241, 242, 243, 244,
- 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- 255, 256, 257, 258, 259, 0, 260, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 0, 260, 241, 242, 243, 244, 245, 246, 247, 248,
- 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 0, 260
+ 0, 0, 0, 254, 0, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-769))
+
+#define yytable_value_is_error(yytable_value) \
+ ((yytable_value) == (-540))
+
static const yytype_int16 yycheck[] =
{
- 23, 24, 4, 234, 27, 119, 27, 577, 4, 373,
- 425, 260, 446, 280, 8, 27, 555, 752, 437, 8,
- 439, 671, 8, 49, 8, 26, 8, 8, 443, 52,
- 8, 359, 8, 31, 61, 23, 24, 607, 8, 27,
- 8, 8, 8, 8, 61, 8, 277, 63, 8, 8,
- 73, 61, 61, 76, 56, 71, 71, 73, 289, 290,
- 73, 61, 73, 71, 0, 73, 149, 31, 299, 26,
- 301, 148, 149, 71, 324, 73, 71, 31, 144, 31,
- 0, 31, 148, 149, 198, 500, 144, 98, 144, 508,
- 148, 149, 148, 27, 144, 149, 112, 149, 148, 149,
- 73, 113, 26, 78, 112, 149, 45, 46, 47, 73,
- 49, 378, 73, 149, 112, 117, 71, 140, 73, 73,
- 770, 73, 149, 73, 147, 152, 73, 144, 71, 145,
- 153, 78, 148, 148, 144, 152, 73, 145, 154, 149,
- 148, 154, 152, 152, 152, 171, 154, 145, 798, 161,
- 148, 152, 152, 71, 149, 519, 154, 151, 152, 147,
- 23, 24, 151, 186, 27, 151, 141, 151, 191, 151,
- 151, 499, 168, 151, 589, 151, 199, 200, 201, 914,
- 150, 154, 150, 150, 150, 150, 209, 150, 90, 212,
- 150, 150, 61, 154, 151, 142, 143, 152, 71, 154,
- 431, 616, 617, 191, 141, 142, 143, 622, 623, 628,
- 157, 199, 200, 201, 71, 446, 73, 149, 8, 71,
- 61, 209, 234, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 149, 670, 260, 602, 260,
- 779, 71, 71, 73, 73, 73, 148, 234, 260, 149,
- 78, 73, 90, 71, 123, 112, 78, 676, 71, 71,
- 73, 73, 144, 118, 287, 277, 148, 61, 125, 59,
- 60, 118, 260, 149, 297, 148, 71, 289, 290, 152,
- 71, 648, 123, 112, 147, 534, 61, 299, 145, 301,
- 277, 148, 71, 145, 73, 74, 148, 154, 321, 112,
- 234, 149, 289, 290, 73, 328, 71, 144, 126, 127,
- 148, 148, 335, 141, 142, 143, 145, 149, 682, 148,
- 142, 143, 152, 346, 154, 154, 260, 145, 191, 123,
- 148, 152, 145, 321, 149, 148, 199, 200, 201, 773,
- 152, 154, 154, 277, 149, 371, 209, 335, 123, 716,
- 373, 718, 767, 71, 145, 289, 290, 148, 346, 626,
- 150, 126, 127, 73, 366, 299, 71, 301, 78, 31,
- 366, 941, 384, 142, 143, 739, 73, 66, 67, 68,
- 145, 78, 632, 148, 61, 150, 92, 93, 94, 412,
- 73, 92, 93, 94, 644, 78, 144, 260, 149, 425,
- 59, 60, 669, 93, 94, 144, 93, 94, 148, 206,
- 61, 151, 152, 210, 437, 123, 439, 443, 98, 431,
- 92, 93, 94, 220, 412, 222, 223, 224, 792, 148,
- 149, 141, 142, 143, 446, 148, 459, 460, 461, 670,
- 92, 93, 94, 466, 148, 142, 143, 153, 49, 437,
- 144, 439, 153, 66, 67, 68, 706, 155, 481, 142,
- 143, 66, 67, 153, 8, 732, 153, 148, 149, 66,
- 67, 459, 460, 461, 500, 151, 152, 23, 24, 843,
- 144, 845, 148, 346, 123, 508, 81, 82, 148, 144,
- 513, 144, 515, 481, 98, 149, 519, 431, 13, 522,
- 13, 768, 769, 107, 108, 109, 110, 111, 112, 151,
- 151, 534, 446, 534, 152, 150, 150, 153, 882, 99,
- 508, 71, 534, 156, 104, 513, 71, 107, 108, 109,
- 110, 111, 112, 113, 557, 558, 559, 121, 61, 26,
- 149, 149, 773, 82, 151, 568, 534, 570, 8, 412,
- 90, 915, 71, 576, 577, 71, 552, 580, 808, 582,
- 810, 73, 149, 589, 150, 561, 151, 150, 71, 557,
- 558, 559, 598, 153, 437, 61, 439, 600, 153, 602,
- 568, 149, 13, 121, 607, 949, 149, 149, 576, 839,
- 616, 617, 580, 149, 582, 149, 622, 623, 155, 26,
- 534, 149, 155, 13, 153, 628, 149, 148, 144, 973,
- 42, 43, 44, 45, 46, 47, 639, 49, 481, 869,
- 71, 13, 151, 99, 149, 875, 153, 650, 104, 652,
- 150, 107, 108, 109, 110, 111, 112, 113, 661, 635,
- 628, 149, 8, 148, 122, 508, 152, 149, 155, 150,
- 150, 639, 902, 676, 71, 124, 155, 907, 670, 682,
- 8, 141, 650, 686, 652, 107, 108, 109, 110, 111,
- 112, 534, 71, 661, 102, 13, 155, 153, 153, 929,
- 150, 152, 150, 8, 150, 8, 149, 710, 676, 321,
- 804, 714, 151, 13, 557, 558, 151, 151, 124, 123,
- 150, 149, 151, 335, 150, 955, 153, 150, 958, 150,
- 104, 73, 962, 13, 150, 150, 739, 580, 61, 582,
- 150, 150, 710, 123, 61, 150, 714, 124, 150, 89,
- 980, 71, 155, 152, 149, 155, 670, 760, 4, 5,
- 6, 767, 8, 9, 10, 11, 12, 13, 14, 751,
- 16, 17, 18, 19, 20, 21, 22, 152, 13, 25,
- 26, 773, 151, 151, 83, 628, 151, 13, 791, 792,
- 152, 37, 760, 13, 155, 73, 639, 71, 44, 45,
- 73, 150, 155, 155, 149, 51, 13, 151, 23, 24,
- 813, 150, 71, 151, 13, 73, 153, 153, 661, 13,
- 149, 26, 73, 791, 68, 90, 153, 153, 90, 151,
- 105, 77, 151, 676, 49, 144, 73, 151, 87, 842,
- 843, 71, 845, 150, 13, 813, 822, 459, 460, 73,
- 68, 149, 71, 8, 857, 151, 26, 71, 85, 773,
- 152, 150, 153, 151, 102, 149, 153, 710, 150, 73,
- 153, 152, 971, 481, 842, 328, 122, 366, 602, 882,
- 640, 710, 366, 832, 130, 681, 889, 686, 333, 857,
- 893, 733, 828, 77, 724, 882, 899, 568, 692, 567,
- 796, 513, 582, 661, -1, 191, -1, 204, -1, -1,
- -1, -1, 915, -1, -1, -1, 162, -1, 164, -1,
- 321, 889, 168, -1, 170, 893, -1, 173, -1, 905,
- -1, 899, 147, -1, 335, -1, -1, 940, 941, -1,
- -1, -1, -1, -1, -1, -1, 949, 559, -1, -1,
- -1, -1, -1, -1, -1, -1, 171, -1, 204, -1,
- -1, -1, 208, -1, 576, -1, -1, -1, 944, -1,
- 973, -1, 940, 219, -1, -1, 191, -1, -1, -1,
- -1, -1, -1, -1, 199, 200, 201, -1, -1, -1,
- 236, -1, -1, -1, 209, 241, 242, 243, 244, 245,
- 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
- 256, 257, 258, 259, -1, -1, -1, -1, 264, 265,
- 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
- -1, -1, 278, -1, 280, 281, -1, -1, 650, -1,
- 652, -1, -1, -1, -1, -1, -1, 293, -1, 295,
- -1, -1, -1, -1, -1, -1, -1, -1, 459, 460,
- 461, 307, 8, -1, 310, -1, -1, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, 42, 43, 330, -1, -1, -1, -1, 13,
+ 24, 25, 125, 4, 28, 24, 25, 4, 615, 28,
+ 28, 473, 276, 78, 593, 29, 30, 590, 464, 381,
+ 466, 8, 11, 791, 702, 72, 8, 62, 8, 53,
+ 44, 8, 8, 8, 397, 8, 8, 27, 645, 250,
+ 710, 8, 8, 24, 25, 72, 239, 28, 74, 8,
+ 74, 245, 246, 77, 11, 62, 57, 8, 74, 8,
+ 8, 50, 8, 28, 8, 8, 74, 24, 25, 8,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 61, 714, -1, -1, -1, -1, -1, -1, 69,
- 70, 71, 513, 59, 60, -1, -1, -1, -1, 79,
- 366, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 346, 378, -1, 380, 59, 60, -1, -1, 385,
- -1, 387, -1, 389, 390, 391, -1, -1, 760, -1,
- -1, -1, 112, -1, -1, -1, 371, -1, 559, -1,
- -1, -1, -1, -1, -1, -1, 126, 568, 128, 129,
- 130, 131, 132, 133, -1, 576, -1, -1, -1, 791,
- 140, -1, -1, -1, -1, 145, 146, 147, 148, -1,
- -1, -1, -1, -1, -1, -1, -1, 412, -1, -1,
- -1, 813, -1, -1, 150, -1, -1, -1, -1, -1,
- 425, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 437, -1, 439, -1, -1, 151, 443, -1,
- 842, -1, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, -1, 857, -1, -1, 494, 650,
- -1, 652, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, -1, -1, 481, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 889, 59, 60,
- -1, 893, -1, -1, 530, 500, -1, 899, -1, -1,
- -1, -1, -1, 508, -1, -1, -1, -1, 59, 60,
- -1, -1, 548, -1, -1, -1, 552, -1, -1, 555,
- 556, -1, -1, 714, -1, 561, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 940, 90,
+ 24, 25, 293, 8, 8, 27, 91, 210, 74, 60,
+ 61, 32, 28, 50, 540, 306, 307, 146, 62, 292,
+ 294, 150, 296, 150, 487, 316, 171, 318, 146, 174,
+ 146, 146, 150, 99, 150, 62, 60, 61, 0, 154,
+ 343, 0, 123, 150, 79, 149, 151, 154, 62, 151,
+ 156, 151, 156, 74, 27, 805, 62, 156, 162, 817,
+ 156, 152, 153, 8, 151, 150, 120, 154, 156, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 72, 62, 72, 154, 835, 153, 181, 747, 531,
+ 938, 153, 154, 153, 198, 156, 153, 153, 153, 203,
+ 153, 153, 118, 180, 203, 152, 152, 211, 143, 552,
+ 154, 384, 211, 152, 183, 60, 61, 221, 151, 156,
+ 224, 152, 221, 152, 152, 74, 152, 154, 152, 152,
+ 404, 153, 146, 152, 597, 62, 599, 151, 74, 665,
+ 154, 62, 203, 212, 213, 125, 183, 152, 152, 151,
+ 211, 120, 74, 62, 170, 72, 147, 79, 147, 150,
+ 221, 150, 72, 816, 32, 456, 203, 709, 93, 94,
+ 95, 474, 276, 91, 211, 212, 213, 276, 276, 72,
+ 151, 74, 473, 151, 221, 151, 32, 151, 74, 715,
+ 94, 95, 72, 79, 143, 144, 145, 640, 125, 72,
+ 304, 74, 75, 64, 125, 250, 74, 152, 144, 145,
+ 314, 72, 72, 74, 74, 276, 125, 93, 94, 95,
+ 151, 114, 144, 145, 154, 569, 72, 72, 74, 74,
+ 155, 276, 150, 302, 250, 151, 340, 159, 72, 72,
+ 74, 340, 72, 347, 74, 153, 323, 74, 293, 394,
+ 354, 155, 79, 114, 147, 354, 529, 150, 144, 145,
+ 276, 306, 307, 156, 368, 302, 808, 72, 114, 368,
+ 62, 316, 72, 318, 74, 962, 72, 293, 721, 155,
+ 114, 127, 152, 153, 587, 62, 147, 560, 561, 150,
+ 306, 307, 32, 397, 154, 156, 156, 62, 571, 572,
+ 316, 147, 318, 32, 150, 94, 95, 368, 389, 154,
+ 156, 156, 389, 147, 114, 146, 150, 144, 145, 32,
+ 154, 146, 156, 50, 154, 394, 156, 127, 67, 68,
+ 69, 368, 128, 129, 438, 778, 46, 47, 48, 438,
+ 50, 72, 72, 74, 146, 74, 62, 147, 150, 151,
+ 150, 147, 125, 74, 150, 150, 156, 394, 79, 146,
+ 464, 74, 466, 150, 151, 464, 155, 466, 74, 150,
+ 146, 67, 68, 79, 150, 151, 150, 438, 681, 153,
+ 154, 67, 68, 114, 827, 489, 490, 491, 99, 663,
+ 489, 490, 491, 497, 410, 93, 94, 95, 128, 129,
+ 146, 438, 479, 464, 146, 466, 250, 74, 512, 153,
+ 154, 456, 79, 512, 24, 25, 147, 147, 709, 150,
+ 150, 157, 152, 144, 145, 156, 8, 464, 473, 466,
+ 150, 874, 150, 876, 708, 125, 540, 143, 144, 145,
+ 456, 540, 546, 146, 548, 82, 83, 546, 552, 293,
+ 27, 512, 146, 557, 93, 94, 95, 473, 151, 732,
+ 14, 153, 306, 307, 153, 569, 154, 910, 218, 14,
+ 569, 569, 222, 152, 152, 512, 143, 144, 145, 540,
+ 67, 68, 69, 233, 152, 235, 236, 237, 592, 593,
+ 594, 155, 586, 592, 593, 594, 939, 771, 158, 72,
+ 151, 72, 606, 540, 608, 123, 72, 606, 569, 62,
+ 614, 615, 27, 157, 83, 614, 620, 808, 153, 596,
+ 8, 620, 825, 91, 569, 968, 72, 74, 802, 803,
+ 72, 592, 593, 152, 638, 152, 640, 153, 72, 62,
+ 155, 645, 845, 14, 847, 988, 157, 123, 157, 618,
+ 151, 151, 151, 569, 857, 592, 593, 151, 14, 620,
+ 157, 665, 865, 153, 157, 634, 665, 870, 153, 150,
+ 674, 151, 146, 72, 14, 674, 155, 155, 153, 151,
+ 124, 618, 152, 620, 151, 150, 690, 151, 692, 72,
+ 151, 690, 154, 692, 157, 898, 126, 634, 702, 157,
+ 8, 904, 143, 702, 665, 43, 44, 45, 46, 47,
+ 48, 715, 50, 674, 72, 14, 715, 721, 103, 99,
+ 157, 725, 155, 152, 8, 8, 929, 154, 665, 109,
+ 110, 111, 112, 113, 114, 152, 84, 674, 841, 151,
+ 153, 702, 153, 747, 151, 739, 750, 950, 747, 126,
+ 14, 750, 153, 151, 715, 109, 110, 111, 112, 113,
+ 114, 152, 152, 740, 709, 702, 155, 153, 125, 972,
+ 100, 152, 106, 74, 778, 978, 106, 14, 715, 109,
+ 110, 111, 112, 113, 114, 115, 747, 62, 62, 157,
+ 125, 153, 995, 709, 90, 799, 157, 152, 126, 152,
+ 799, 153, 104, 72, 154, 151, 14, 154, 27, 790,
+ 747, 69, 153, 817, 157, 154, 810, 14, 817, 340,
+ 43, 44, 826, 827, 74, 155, 340, 826, 72, 74,
+ 14, 157, 157, 354, 27, 153, 152, 154, 14, 62,
+ 354, 72, 14, 155, 74, 155, 850, 70, 71, 72,
+ 14, 850, 69, 74, 107, 155, 817, 80, 91, 153,
+ 155, 153, 91, 808, 146, 74, 88, 152, 155, 873,
+ 874, 72, 876, 14, 873, 151, 74, 72, 72, 8,
+ 817, 153, 859, 86, 888, 152, 154, 153, 103, 888,
+ 155, 114, 808, 155, 151, 74, 152, 347, 986, 154,
+ 512, 155, 640, 389, 678, 128, 910, 130, 131, 132,
+ 133, 134, 135, 917, 863, 754, 352, 921, 917, 142,
+ 725, 720, 921, 927, 147, 148, 149, 150, 927, 389,
+ 910, 772, 78, 5, 6, 939, 8, 9, 10, 11,
+ 12, 13, 14, 15, 764, 17, 18, 19, 20, 21,
+ 22, 23, 729, 930, 26, 27, 605, 961, 962, 606,
+ 203, 833, 961, 620, 968, 216, 38, 618, 489, 490,
+ 491, -1, -1, 45, 46, 489, 490, -1, 50, -1,
+ 52, -1, -1, 26, 988, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 78, 50, -1, -1,
+ -1, -1, -1, -1, 9, 10, 11, -1, -1, -1,
+ -1, -1, -1, -1, -1, 546, -1, -1, -1, -1,
+ -1, 26, 546, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, -1, 50, 128, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 139, -1, -1,
+ -1, -1, -1, 594, -1, -1, -1, -1, -1, -1,
+ 594, -1, -1, -1, -1, 606, -1, -1, -1, -1,
+ -1, -1, -1, 614, -1, 9, 10, 11, -1, 171,
+ 614, -1, 174, -1, -1, 177, -1, -1, -1, -1,
+ 182, 183, 26, -1, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, -1, 50, -1, -1, -1,
+ 212, 213, -1, -1, 216, -1, -1, -1, 220, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 557, 558, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, -1, 760,
- -1, -1, -1, -1, -1, 580, -1, 582, -1, -1,
- -1, -1, -1, -1, 589, -1, -1, -1, -1, -1,
- 626, 627, -1, 598, -1, -1, -1, -1, 634, 635,
- 791, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 616, 617, -1, -1, -1, -1, 622, 623, -1,
- -1, -1, 813, 628, -1, -1, -1, 663, -1, -1,
- -1, -1, -1, 669, 639, 32, 33, 34, 35, 36,
+ 232, -1, 157, -1, -1, -1, -1, -1, -1, 690,
+ -1, 692, -1, 245, 246, -1, 690, -1, 692, -1,
+ 252, -1, -1, -1, -1, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, -1, -1, -1, -1, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ -1, -1, 294, -1, 296, 297, -1, -1, -1, 750,
+ 302, -1, -1, -1, -1, -1, 750, -1, 310, -1,
+ 312, 155, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 326, 8, -1, -1, -1, -1,
+ -1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, -1, -1, -1, -1, 349, 799, -1,
+ -1, -1, -1, -1, -1, 799, -1, 100, 60, 61,
+ -1, -1, -1, 106, -1, -1, 109, 110, 111, 112,
+ 113, 114, 115, -1, -1, 826, -1, 60, 61, -1,
+ -1, -1, 826, -1, -1, -1, -1, -1, -1, 91,
+ -1, -1, 394, -1, -1, -1, -1, -1, -1, 850,
+ -1, -1, 404, -1, 406, -1, 850, -1, -1, 411,
+ -1, 413, 155, 415, 416, 417, -1, -1, -1, -1,
+ -1, -1, 873, -1, -1, -1, 9, 10, 11, 873,
+ -1, -1, -1, -1, -1, -1, -1, 888, -1, -1,
+ -1, -1, -1, 26, 888, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 917, 50, -1, 152,
+ 921, -1, -1, 917, -1, -1, 927, 921, -1, -1,
+ -1, -1, -1, 927, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, -1, 3, 4, 5,
+ 6, 7, -1, -1, -1, -1, 12, 13, -1, -1,
+ 961, -1, -1, -1, -1, -1, -1, 961, -1, -1,
+ -1, 27, -1, -1, 526, -1, -1, -1, -1, -1,
+ 60, 61, -1, -1, -1, -1, -1, 43, 44, -1,
+ -1, -1, -1, 49, -1, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, -1, -1, 565, 70, 71, 72, 73, 74, -1,
+ 76, -1, 155, -1, 80, 81, 82, 83, -1, 85,
+ 582, 87, -1, 89, -1, -1, 92, -1, 590, 591,
+ 96, 97, 98, 99, -1, 101, 102, -1, -1, 105,
+ -1, -1, 108, -1, -1, -1, -1, -1, 114, -1,
+ 116, 117, 118, -1, -1, -1, 618, -1, -1, -1,
+ -1, 127, 128, 153, 130, 131, 132, 133, 134, 135,
+ -1, -1, 634, -1, -1, -1, 142, -1, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, -1,
+ 156, -1, 158, 159, -1, -1, -1, -1, -1, -1,
+ -1, 663, 664, -1, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, -1, -1, -1, 3,
+ 4, 5, 6, 7, 686, -1, -1, -1, 12, 13,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 842, 49, -1, -1, 691, 661, 9, 10, 11,
- -1, -1, -1, -1, -1, -1, 857, -1, -1, -1,
- -1, 676, -1, 25, -1, 27, 28, 29, 30, 31,
+ 47, 48, 704, 50, -1, -1, 708, -1, -1, -1,
+ 60, 61, -1, -1, -1, -1, -1, -1, -1, 43,
+ 44, -1, -1, -1, -1, 49, 728, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, -1, -1, -1, 70, 71, 72, 73,
+ 74, -1, 76, -1, -1, -1, 80, 81, 82, 83,
+ -1, 85, -1, 87, -1, 89, -1, -1, 92, 771,
+ -1, -1, 96, 97, 98, 99, 100, 101, 102, -1,
+ -1, 105, 106, -1, 108, -1, -1, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, 121, 122, -1,
+ 802, 803, 152, 127, 128, -1, 130, 131, 132, 133,
+ 134, 135, -1, -1, 816, -1, -1, -1, 142, -1,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, -1, 156, -1, 158, 159, 3, 4, 5, 6,
+ 7, -1, -1, -1, -1, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 43, 44, -1, -1,
+ -1, -1, 49, -1, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ -1, -1, -1, 70, 71, 72, 73, 74, -1, 76,
+ 60, 61, -1, 80, 81, 82, 83, -1, 85, -1,
+ 87, -1, 89, -1, -1, 92, -1, -1, -1, 96,
+ 97, 98, 99, -1, 101, 102, -1, -1, 105, -1,
+ -1, 108, -1, -1, -1, 112, 113, 114, -1, 116,
+ 117, 118, 119, 120, 121, 122, -1, -1, -1, -1,
+ 127, 128, -1, 130, 131, 132, 133, 134, 135, 3,
+ 4, 5, 6, 7, -1, 142, -1, -1, 12, 13,
+ 147, 148, 149, 150, 151, -1, 153, 154, -1, 156,
+ -1, 158, 159, 27, -1, -1, -1, -1, -1, -1,
+ -1, -1, 152, 153, -1, -1, -1, -1, -1, 43,
+ 44, -1, -1, -1, -1, 49, -1, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, -1, -1, -1, 70, 71, 72, 73,
+ 74, -1, 76, -1, -1, -1, 80, 81, 82, 83,
+ -1, 85, -1, 87, -1, 89, -1, -1, 92, -1,
+ -1, -1, 96, 97, 98, 99, -1, 101, 102, -1,
+ -1, 105, -1, -1, 108, -1, -1, -1, -1, -1,
+ 114, -1, 116, 117, 118, -1, -1, -1, -1, -1,
+ -1, -1, -1, 127, 128, -1, 130, 131, 132, 133,
+ 134, 135, 3, 4, 5, 6, 7, -1, 142, -1,
+ -1, 12, 13, 147, 148, 149, 150, 151, -1, 153,
+ 154, -1, 156, -1, 158, 159, 27, -1, -1, -1,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 43, 44, -1, -1, -1, -1, 49, -1,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, -1, -1, -1, 70,
+ 71, 72, 73, 74, -1, 76, 60, 61, -1, 80,
+ 81, 82, 83, -1, 85, -1, 87, -1, 89, -1,
+ -1, 92, -1, -1, -1, 96, 97, 98, 99, -1,
+ 101, 102, -1, -1, 105, -1, -1, 108, -1, -1,
+ -1, -1, -1, 114, -1, 116, 117, 118, -1, -1,
+ -1, -1, -1, -1, -1, -1, 127, 128, -1, 130,
+ 131, 132, 133, 134, 135, 3, 4, 5, 6, 7,
+ -1, 142, -1, -1, 12, 13, 147, 148, 149, 150,
+ 151, -1, 153, 154, -1, 156, -1, 158, 159, 27,
+ -1, -1, -1, -1, -1, -1, -1, -1, 152, 153,
+ -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
+ -1, 49, -1, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, -1,
+ -1, -1, 70, 71, 72, 73, 74, -1, 76, -1,
+ -1, -1, 80, 81, 82, 83, -1, 85, -1, 87,
+ -1, 89, -1, -1, 92, -1, -1, -1, 96, 97,
+ 98, 99, -1, 101, 102, -1, -1, 105, -1, -1,
+ 108, -1, -1, -1, -1, -1, 114, -1, 116, 117,
+ 118, -1, -1, -1, -1, -1, -1, -1, -1, 127,
+ 128, -1, 130, 131, 132, 133, 134, 135, 3, 4,
+ 5, 6, 7, -1, 142, -1, -1, 12, 13, 147,
+ 148, 149, 150, 151, -1, 153, 154, -1, 156, -1,
+ 158, 159, -1, -1, -1, -1, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 43, 44,
+ -1, -1, -1, -1, 49, -1, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, -1, -1, -1, 70, 71, 72, 73, 74,
+ -1, 76, 60, 61, -1, 80, 81, 82, 83, -1,
+ 85, -1, 87, -1, 89, -1, -1, 92, -1, -1,
+ -1, 96, 97, 98, 99, -1, 101, 102, -1, -1,
+ 105, -1, -1, 108, -1, -1, -1, -1, -1, 114,
+ -1, 116, 117, 118, -1, -1, -1, -1, -1, -1,
+ -1, -1, 127, 128, -1, 130, 131, 132, 133, 134,
+ 135, 3, 4, 5, 6, 7, -1, 142, -1, -1,
+ 12, 13, 147, 148, 149, 150, 151, -1, 153, 154,
+ -1, 156, -1, 158, 159, -1, -1, -1, -1, -1,
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 43, 44, -1, -1, -1, -1, 49, -1, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, -1, -1, -1, -1, 70, 71,
+ 72, 73, 74, -1, -1, -1, -1, -1, 80, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 732, 49, 889, -1,
- -1, -1, 893, -1, -1, 710, -1, 25, 899, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, 768, 769, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 779, -1, 9, 10, 11, -1, 940,
- -1, 787, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 25, 767, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 822, -1, 9, 10,
- 11, 827, 828, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 155, 25, -1, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49, 865,
- -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
- -1, -1, 12, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 124, 49, -1, -1, -1, 901, -1, -1, -1, 905,
- -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, -1, -1, -1, 69,
- 70, 71, 72, 73, -1, 75, -1, -1, 944, 79,
- 80, 81, 82, -1, 84, -1, 86, -1, 88, -1,
- -1, 91, -1, -1, -1, 95, 96, 97, 98, 99,
- 100, 101, 153, 103, 104, -1, 106, -1, -1, -1,
- 110, 111, 112, -1, 114, 115, 116, 117, 118, 119,
- 120, -1, -1, -1, -1, 125, 126, -1, 128, 129,
- 130, 131, 132, 133, 3, 4, 5, 6, 7, -1,
- 140, -1, -1, 12, -1, 145, 146, 147, 148, 149,
- -1, 151, 152, -1, 154, -1, 156, 157, -1, -1,
+ 42, 43, 44, 45, 46, 47, 48, 99, 50, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
- -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ -1, -1, 114, -1, -1, 117, 118, -1, -1, -1,
+ -1, -1, -1, -1, -1, 127, 128, -1, 130, 131,
+ 132, 133, 134, 135, 3, 4, 5, 6, 7, -1,
+ 142, -1, -1, 12, 13, 147, 148, 149, 150, 151,
+ 152, -1, -1, -1, 156, -1, 158, 159, -1, -1,
+ -1, -1, -1, 32, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 43, 44, -1, -1, -1, -1,
+ 49, -1, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
- 69, 70, 71, 72, 73, -1, 75, -1, -1, -1,
- 79, 80, 81, 82, -1, 84, -1, 86, -1, 88,
- -1, -1, 91, -1, -1, -1, 95, 96, 97, 98,
- -1, 100, 101, -1, 103, -1, -1, 106, -1, -1,
- -1, 110, 111, 112, -1, 114, 115, 116, 117, 118,
- 119, 120, -1, -1, -1, -1, 125, 126, -1, 128,
- 129, 130, 131, 132, 133, -1, 3, 4, 5, 6,
- 7, 140, -1, -1, -1, 12, 145, 146, 147, 148,
- 149, -1, 151, 152, -1, 154, -1, 156, 157, 26,
+ -1, 70, 71, 72, 73, 74, -1, -1, -1, -1,
+ -1, 80, -1, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 99, 50, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 114, -1, -1, 117, 118,
+ -1, -1, -1, -1, -1, -1, -1, -1, 127, 128,
+ -1, 130, 131, 132, 133, 134, 135, 3, 4, 5,
+ 6, 7, -1, 142, -1, -1, 12, 13, 147, 148,
+ 149, 150, 151, -1, -1, -1, -1, 156, -1, 158,
+ 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 43, 44, -1,
+ -1, -1, -1, 49, -1, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ -1, -1, -1, -1, 70, 71, 72, 73, 74, -1,
+ -1, -1, -1, -1, 80, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, -1, 50, 99, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 114, -1,
+ -1, 117, 118, -1, -1, -1, -1, -1, -1, -1,
+ -1, 127, 128, -1, 130, 131, 132, 133, 134, 135,
+ 3, 4, 5, 6, 7, -1, 142, -1, -1, 12,
+ 13, 147, 148, 149, 150, 151, -1, 153, -1, -1,
+ 156, -1, 158, 159, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
- -1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
- -1, -1, 69, 70, 71, 72, 73, -1, 75, -1,
- -1, -1, 79, 80, 81, 82, -1, 84, -1, 86,
- -1, 88, -1, -1, 91, -1, -1, -1, 95, 96,
- 97, 98, -1, 100, 101, -1, 103, -1, -1, 106,
- -1, -1, -1, -1, -1, 112, -1, 114, 115, 116,
- -1, -1, -1, -1, -1, -1, -1, -1, 125, 126,
- -1, 128, 129, 130, 131, 132, 133, -1, 3, 4,
- 5, 6, 7, 140, -1, -1, -1, 12, 145, 146,
- 147, 148, 149, -1, 151, 152, -1, 154, -1, 156,
- 157, 26, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 42, 43, -1,
- -1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, -1, -1, -1, 69, 70, 71, 72, 73, -1,
- 75, -1, -1, -1, 79, 80, 81, 82, -1, 84,
- -1, 86, -1, 88, -1, -1, 91, -1, -1, -1,
- 95, 96, 97, 98, -1, 100, 101, -1, 103, -1,
- -1, 106, -1, -1, -1, -1, -1, 112, -1, 114,
- 115, 116, -1, -1, -1, -1, -1, -1, -1, -1,
- 125, 126, -1, 128, 129, 130, 131, 132, 133, -1,
- 3, 4, 5, 6, 7, 140, -1, -1, -1, 12,
- 145, 146, 147, 148, 149, -1, 151, 152, -1, 154,
- -1, 156, 157, 26, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
- 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
+ 43, 44, -1, -1, -1, -1, 49, -1, 51, 52,
53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, -1, -1, -1, 69, 70, 71, 72,
- 73, -1, 75, -1, -1, -1, 79, 80, 81, 82,
- -1, 84, -1, 86, -1, 88, -1, -1, 91, -1,
- -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
- 103, -1, -1, 106, -1, -1, -1, -1, -1, 112,
- -1, 114, 115, 116, -1, -1, -1, -1, -1, -1,
- -1, -1, 125, 126, -1, 128, 129, 130, 131, 132,
- 133, -1, 3, 4, 5, 6, 7, 140, -1, -1,
- -1, 12, 145, 146, 147, 148, 149, -1, 151, 152,
- -1, 154, -1, 156, 157, 26, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 42, 43, -1, -1, -1, -1, 48, -1, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, -1, -1, -1, 69, 70,
- 71, 72, 73, -1, 75, -1, -1, -1, 79, 80,
- 81, 82, -1, 84, -1, 86, -1, 88, -1, -1,
- 91, -1, -1, -1, 95, 96, 97, 98, -1, 100,
- 101, -1, 103, -1, -1, 106, -1, -1, -1, -1,
- -1, 112, -1, 114, 115, 116, -1, -1, -1, -1,
- -1, -1, -1, -1, 125, 126, -1, 128, 129, 130,
- 131, 132, 133, 3, 4, 5, 6, 7, -1, 140,
- -1, -1, 12, -1, 145, 146, 147, 148, 149, -1,
- 151, 152, -1, 154, -1, 156, 157, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, -1, -1, -1, 69,
- 70, 71, 72, 73, -1, 75, -1, -1, -1, 79,
- 80, 81, 82, -1, 84, -1, 86, -1, 88, -1,
- -1, 91, -1, -1, -1, 95, 96, 97, 98, -1,
- 100, 101, -1, 103, -1, -1, 106, -1, -1, -1,
- -1, -1, 112, -1, 114, 115, 116, -1, -1, -1,
- -1, -1, -1, -1, -1, 125, 126, -1, 128, 129,
- 130, 131, 132, 133, 3, 4, 5, 6, 7, -1,
- 140, -1, -1, 12, -1, 145, 146, 147, 148, 149,
- -1, 151, 152, -1, 154, -1, 156, 157, -1, -1,
- -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
- -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, -1, -1, -1, -1,
- 69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
- 79, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 98,
- 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 112, -1, -1, 115, 116, -1, -1,
- -1, -1, -1, -1, -1, -1, 125, 126, -1, 128,
- 129, 130, 131, 132, 133, 3, 4, 5, 6, 7,
- -1, 140, -1, -1, 12, -1, 145, 146, 147, 148,
- 149, -1, -1, -1, -1, 154, -1, 156, 157, -1,
+ 63, 64, 65, -1, -1, -1, -1, 70, 71, 72,
+ 73, 74, -1, -1, -1, -1, -1, 80, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, -1, 50, 99, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- 98, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 112, -1, -1, 115, 116, -1,
- -1, -1, -1, -1, -1, -1, -1, 125, 126, -1,
- 128, 129, 130, 131, 132, 133, 3, 4, 5, 6,
- 7, -1, 140, -1, -1, 12, -1, 145, 146, 147,
- 148, 149, -1, 151, -1, -1, 154, -1, 156, 157,
+ -1, 114, -1, -1, 117, 118, -1, -1, -1, -1,
+ -1, -1, -1, -1, 127, 128, -1, 130, 131, 132,
+ 133, 134, 135, 3, 4, 5, 6, 7, -1, 142,
+ -1, -1, 12, 13, 147, 148, 149, 150, 151, -1,
+ 153, -1, -1, 156, -1, 158, 159, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
- -1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
- -1, -1, 69, 70, 71, 72, 73, -1, -1, -1,
- -1, -1, 79, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 43, 44, -1, -1, -1, -1, 49,
+ -1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
+ 70, 71, 72, 73, 74, -1, -1, -1, -1, -1,
+ 80, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 98, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 112, -1, -1, 115, 116,
- -1, -1, -1, -1, -1, -1, -1, -1, 125, 126,
- -1, 128, 129, 130, 131, 132, 133, 3, 4, 5,
- 6, 7, -1, 140, -1, -1, 12, -1, 145, 146,
- 147, 148, 149, -1, 151, -1, -1, 154, -1, 156,
- 157, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 42, 43, -1, -1,
- -1, -1, 48, -1, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, -1,
- -1, -1, -1, 69, 70, 71, 72, 73, -1, -1,
- -1, -1, -1, 79, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 114, -1, -1, 117, 118, -1,
+ -1, -1, -1, -1, -1, -1, -1, 127, 128, -1,
+ 130, 131, 132, 133, 134, 135, 3, 4, 5, 6,
+ 7, -1, 142, -1, -1, 12, 13, 147, 148, 149,
+ 150, 151, -1, 153, -1, -1, 156, -1, 158, 159,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 98, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 112, -1, -1, 115,
- 116, -1, -1, -1, -1, -1, -1, -1, -1, 125,
- 126, -1, 128, 129, 130, 131, 132, 133, 3, 4,
- 5, 6, 7, -1, 140, -1, -1, 12, -1, 145,
- 146, 147, 148, 149, -1, 151, -1, -1, 154, -1,
- 156, 157, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 42, 43, -1,
- -1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- -1, -1, -1, -1, 69, 70, 71, 72, 73, -1,
- -1, -1, -1, -1, 79, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 43, 44, -1, -1,
+ -1, -1, 49, -1, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
+ -1, -1, -1, 70, 71, 72, 73, 74, -1, -1,
+ -1, -1, -1, 80, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 98, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 112, -1, -1,
- 115, 116, -1, -1, -1, -1, -1, -1, -1, -1,
- 125, 126, -1, 128, 129, 130, 131, 132, 133, 3,
- 4, 5, 6, 7, -1, 140, -1, -1, 12, -1,
- 145, 146, 147, 148, 149, 150, -1, -1, -1, 154,
- -1, 156, 157, -1, -1, -1, -1, 31, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
- -1, -1, -1, -1, 48, -1, 50, 51, 52, 53,
+ -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 114, -1, -1,
+ 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
+ 127, 128, -1, 130, 131, 132, 133, 134, 135, 3,
+ 4, 5, 6, 7, -1, 142, -1, -1, 12, 13,
+ 147, 148, 149, 150, 151, 152, -1, -1, -1, 156,
+ -1, 158, 159, -1, -1, -1, -1, -1, 32, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
+ 44, -1, -1, -1, -1, 49, -1, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, 72, 73,
- -1, -1, -1, -1, -1, 79, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 98, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 112, -1,
- -1, 115, 116, -1, -1, -1, -1, -1, -1, -1,
- -1, 125, 126, -1, 128, 129, 130, 131, 132, 133,
- 3, 4, 5, 6, 7, -1, 140, -1, -1, 12,
- -1, 145, 146, 147, 148, 149, -1, -1, -1, -1,
- 154, -1, 156, 157, -1, -1, -1, -1, 31, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
- 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, 72,
- 73, -1, -1, -1, -1, -1, 79, -1, -1, -1,
+ 64, 65, -1, -1, -1, -1, 70, 71, 72, 73,
+ 74, -1, -1, -1, -1, -1, 80, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 98, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
- -1, -1, 115, 116, -1, -1, -1, -1, -1, -1,
- -1, -1, 125, 126, -1, 128, 129, 130, 131, 132,
- 133, 3, 4, 5, 6, 7, -1, 140, -1, -1,
- 12, -1, 145, 146, 147, 148, 149, -1, -1, -1,
- -1, 154, -1, 156, 157, -1, -1, -1, -1, 31,
+ -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 42, 43, -1, -1, -1, -1, 48, -1, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, -1, -1, -1, -1, 69, 70, 71,
- 72, 73, -1, -1, -1, -1, -1, 79, -1, -1,
+ 114, -1, -1, 117, 118, -1, -1, -1, -1, -1,
+ -1, -1, -1, 127, 128, -1, 130, 131, 132, 133,
+ 134, 135, 3, 4, 5, 6, 7, -1, 142, -1,
+ -1, 12, 13, 147, 148, 149, 150, 151, -1, -1,
+ -1, -1, 156, -1, 158, 159, -1, -1, -1, -1,
+ -1, 32, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 43, 44, -1, -1, -1, -1, 49, -1,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, -1, -1, -1, -1, 70,
+ 71, 72, 73, 74, -1, -1, -1, -1, -1, 80,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 98, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 112, -1, -1, 115, 116, -1, -1, -1, -1, -1,
- -1, -1, -1, 125, 126, -1, 128, 129, 130, 131,
- 132, 133, 3, 4, 5, 6, 7, -1, 140, -1,
- -1, 12, -1, 145, 146, 147, 148, 149, -1, -1,
- -1, -1, 154, -1, 156, 157, -1, -1, -1, -1,
- 31, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 42, 43, -1, -1, -1, -1, 48, -1, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, -1, -1, -1, -1, 69, 70,
- 71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
+ -1, -1, -1, 114, -1, -1, 117, 118, -1, -1,
+ -1, -1, -1, -1, -1, -1, 127, 128, -1, 130,
+ 131, 132, 133, 134, 135, 3, 4, 5, 6, 7,
+ -1, 142, -1, -1, 12, 13, 147, 148, 149, 150,
+ 151, -1, -1, -1, -1, 156, -1, 158, 159, -1,
+ -1, -1, -1, -1, 32, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
+ -1, 49, -1, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
+ -1, -1, 70, 71, 72, 73, 74, -1, -1, -1,
+ -1, -1, 80, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
+ -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 114, -1, -1, 117,
+ 118, -1, -1, -1, -1, -1, -1, -1, -1, 127,
+ 128, -1, 130, 131, 132, 133, 134, 135, 3, 4,
+ 5, 6, 7, -1, 142, -1, -1, 12, 13, 147,
+ 148, 149, 150, 151, -1, -1, -1, -1, 156, -1,
+ 158, 159, -1, -1, -1, -1, -1, 32, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 43, 44,
+ -1, -1, -1, -1, 49, -1, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, -1, -1, -1, -1, 70, 71, 72, 73, 74,
+ -1, -1, -1, -1, -1, 80, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 112, -1, -1, 115, 116, -1, -1, -1, -1,
- -1, -1, -1, -1, 125, 126, -1, 128, 129, 130,
- 131, 132, 133, 3, 4, 5, 6, 7, -1, 140,
- -1, -1, 12, -1, 145, 146, 147, 148, 149, -1,
- -1, -1, -1, 154, -1, 156, 157, -1, -1, -1,
- -1, 31, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, -1, -1, -1, -1, 69,
- 70, 71, 72, 73, -1, -1, -1, -1, -1, 79,
+ -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 114,
+ -1, -1, 117, 118, -1, -1, -1, -1, -1, -1,
+ -1, -1, 127, 128, -1, 130, 131, 132, 133, 134,
+ 135, 3, 4, 5, 6, 7, -1, 142, -1, -1,
+ 12, 13, 147, 148, 149, 150, 151, -1, -1, -1,
+ -1, 156, -1, 158, 159, -1, -1, -1, -1, -1,
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 43, 44, -1, -1, -1, -1, 49, -1, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, -1, -1, -1, -1, 70, 71,
+ 72, 73, 74, -1, -1, -1, -1, -1, 80, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 98, -1,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 112, -1, -1, 115, 116, -1, -1, -1,
- -1, -1, -1, -1, -1, 125, 126, -1, 128, 129,
- 130, 131, 132, 133, 3, 4, 5, 6, 7, -1,
- 140, -1, -1, 12, -1, 145, 146, 147, 148, 149,
- -1, -1, -1, -1, 154, -1, 156, 157, -1, -1,
- -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
- -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, -1, -1, -1, -1,
- 69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
- 79, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
+ -1, -1, 114, -1, -1, 117, 118, -1, -1, -1,
+ -1, -1, -1, -1, -1, 127, 128, -1, 130, 131,
+ 132, 133, 134, 135, 3, 4, 5, 6, 7, -1,
+ 142, -1, -1, 12, 13, 147, 148, 149, 150, 151,
+ -1, -1, -1, -1, 156, -1, 158, 159, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 112, -1, -1, 115, 116, -1, -1,
- -1, -1, -1, -1, -1, -1, 125, 126, -1, 128,
- 129, 130, 131, 132, 133, 3, 4, 5, 6, 7,
- -1, 140, -1, -1, 12, -1, 145, 146, 147, 148,
- 149, -1, -1, -1, -1, 154, -1, 156, 157, -1,
+ -1, -1, -1, -1, 43, 44, -1, -1, -1, -1,
+ 49, -1, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
+ -1, 70, 71, 72, 73, 74, -1, -1, -1, -1,
+ -1, 80, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 114, -1, -1, 117, 118,
+ -1, -1, -1, -1, -1, -1, -1, -1, 127, 128,
+ -1, 130, 131, 132, 133, 134, 135, 3, 4, 5,
+ 6, 7, -1, 142, -1, -1, 12, 13, 147, 148,
+ 149, 150, 151, -1, -1, -1, -1, 156, -1, 158,
+ 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 43, 44, -1,
+ -1, -1, -1, 49, -1, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ -1, -1, -1, -1, 70, 71, 72, 73, 74, -1,
+ -1, -1, -1, -1, 80, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 98, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 112, -1, -1, 115, 116, -1,
- -1, -1, -1, -1, -1, -1, -1, 125, 126, -1,
- 128, 129, 130, 131, 132, 133, 3, 4, 5, 6,
- 7, -1, 140, -1, -1, 12, -1, 145, 146, 147,
- 148, 149, -1, -1, -1, -1, 154, -1, 156, 157,
+ -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 114, -1,
+ -1, 117, 118, -1, -1, -1, -1, -1, -1, -1,
+ -1, 127, 128, -1, 130, 131, 132, 133, 134, 135,
+ 3, 4, 5, 6, 7, -1, 142, -1, -1, 12,
+ 13, 147, 148, 149, 150, 151, -1, -1, -1, -1,
+ 156, -1, 158, 159, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
- -1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
- -1, -1, 69, 70, 71, 72, 73, -1, -1, -1,
- -1, -1, 79, -1, -1, -1, -1, -1, -1, -1,
+ 43, 44, -1, -1, -1, -1, 49, -1, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, -1, -1, -1, -1, 70, 71, 72,
+ 73, 74, -1, -1, -1, -1, -1, 80, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 98, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 112, -1, -1, 115, 116,
- -1, -1, -1, -1, -1, -1, -1, -1, 125, 126,
- -1, 128, 129, 130, 131, 132, 133, -1, -1, -1,
- -1, -1, -1, 140, -1, 9, 10, 11, 145, 146,
- 147, 148, 149, -1, -1, -1, -1, 154, -1, 156,
- 157, 25, -1, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 25, -1, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
+ -1, 114, -1, -1, 117, 118, -1, -1, -1, -1,
+ -1, -1, -1, -1, 127, 128, -1, 130, 131, 132,
+ 133, 134, 135, -1, -1, -1, -1, -1, -1, 142,
+ 9, 10, 11, -1, 147, 148, 149, 150, 151, -1,
+ -1, -1, -1, 156, -1, 158, 159, 26, -1, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ -1, 50, 9, 10, 11, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 26,
+ -1, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, -1, 50, 9, 10, 11, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 25, -1, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, -1, -1,
+ -1, 26, -1, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, -1, 50, -1, -1, 9, 10,
+ 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 26, 155, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, -1, 50,
-1, -1, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 25, 153,
+ -1, -1, -1, -1, -1, -1, -1, -1, 155, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 9, 10, 11, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
- 153, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, -1, 49, -1, -1, 9, 10, 11, -1,
+ 47, 48, -1, 50, 9, 10, 11, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 155, 26, -1, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, -1, 50, 9, 10, 11, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 153, 25, 26, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, 26, 155, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, -1, -1, 9,
- 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 25, 153, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ 43, 44, 45, 46, 47, 48, -1, 50, 9, 10,
+ 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 26, 153, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, -1, 50,
9, 10, 11, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 25, 153, 27, 28,
+ -1, -1, -1, -1, -1, -1, -1, 26, 153, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 25, 151, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, -1, -1, 9, 10, 11, -1, -1, -1,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ -1, 50, 9, 10, 11, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 26,
+ 153, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, -1, 50, 9, 10, 11, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 25, 151, 27, 28, 29, 30, 31, 32, 33, 34,
+ -1, 26, 153, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
+ 45, 46, 47, 48, -1, 50, 9, 10, 11, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 25, 151, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 25, 151, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, 26, 153, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, -1, -1, 9,
+ 43, 44, 45, 46, 47, 48, -1, 50, -1, 9,
10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 25, 151, 27, 28, 29,
+ -1, -1, -1, -1, -1, 152, 26, -1, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- -1, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 150, 25, -1, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 150, 25, -1,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 9, 10, 11, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
- 150, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, -1, 49, -1, 9, 10, 11, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 25, 150, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 25, 150, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, -1,
+ 50, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 152, 9, 10,
+ 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 126, -1, 26, -1, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, -1, 50,
+ 9, 10, 11, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 126, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ -1, 50, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 9, 10, 11,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 25, 150, 27, 28, 29, 30, 31,
+ -1, -1, -1, -1, 26, 126, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, -1, 9,
- 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 25, 150, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- -1, -1, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 150, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 150, 9,
- 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 124, 25, -1, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 11, 49,
+ 42, 43, 44, 45, 46, 47, 48, -1, 50, 10,
+ 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 26, -1, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 11, 50,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 25, -1, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, 26, -1, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 27, 28, 29,
+ 43, 44, 45, 46, 47, 48, -1, 50, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, -1,
+ 50, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, 29, 30, 31, 32, 33, 34, 35, 36,
+ 48, -1, 50, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49
+ 47, 48, -1, 50
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 159, 160, 0, 161, 3, 4, 5, 6, 7,
- 12, 42, 43, 48, 50, 51, 52, 53, 54, 55,
+ 0, 161, 162, 0, 163, 3, 4, 5, 6, 7,
+ 12, 13, 43, 44, 49, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 69, 70, 71, 72, 73, 75, 79, 80, 81, 82,
- 84, 86, 88, 91, 95, 96, 97, 98, 99, 100,
- 101, 103, 104, 106, 110, 111, 112, 114, 115, 116,
- 117, 118, 119, 120, 125, 126, 128, 129, 130, 131,
- 132, 133, 140, 145, 146, 147, 148, 149, 151, 152,
- 154, 156, 157, 162, 163, 168, 172, 173, 203, 204,
- 206, 208, 211, 213, 276, 278, 292, 295, 304, 315,
- 318, 322, 323, 325, 326, 336, 337, 338, 339, 341,
- 342, 343, 344, 350, 360, 363, 71, 112, 145, 292,
- 322, 322, 149, 322, 322, 322, 322, 322, 322, 322,
- 289, 322, 322, 322, 322, 322, 322, 322, 112, 145,
- 148, 162, 304, 325, 326, 338, 325, 31, 322, 354,
- 355, 322, 145, 148, 162, 304, 306, 307, 338, 342,
- 343, 350, 149, 312, 149, 26, 266, 322, 180, 149,
- 149, 149, 190, 149, 151, 322, 151, 322, 71, 71,
- 151, 278, 322, 326, 191, 322, 148, 162, 166, 167,
- 73, 154, 240, 241, 118, 118, 73, 242, 292, 149,
- 149, 149, 149, 149, 149, 73, 78, 141, 142, 143,
- 356, 357, 148, 152, 162, 162, 276, 322, 169, 152,
- 78, 313, 356, 78, 356, 148, 149, 8, 151, 71,
- 71, 31, 205, 340, 144, 9, 10, 11, 25, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 49, 151, 59, 60, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 149, 144, 61, 123,
- 61, 152, 154, 343, 205, 322, 322, 148, 162, 144,
- 144, 324, 326, 124, 155, 8, 320, 148, 162, 144,
- 277, 144, 123, 343, 150, 322, 322, 8, 151, 172,
- 178, 267, 268, 322, 278, 326, 149, 322, 151, 151,
- 151, 13, 151, 151, 152, 151, 162, 90, 8, 151,
- 152, 323, 326, 8, 151, 13, 8, 151, 205, 201,
- 202, 326, 326, 361, 326, 150, 279, 354, 61, 123,
- 141, 357, 72, 322, 326, 78, 141, 357, 162, 165,
- 151, 152, 149, 150, 150, 153, 170, 322, 156, 157,
- 71, 296, 71, 121, 212, 210, 71, 149, 61, 71,
- 152, 336, 343, 349, 350, 283, 322, 284, 26, 286,
- 281, 282, 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
- 322, 306, 31, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 322, 303, 71, 336, 349, 322,
- 345, 327, 345, 322, 150, 162, 71, 31, 322, 31,
- 322, 162, 336, 149, 314, 336, 308, 150, 150, 322,
- 82, 322, 151, 8, 90, 90, 71, 222, 150, 42,
- 43, 61, 126, 128, 140, 145, 148, 162, 304, 315,
- 316, 317, 169, 90, 71, 167, 322, 241, 316, 73,
- 149, 8, 150, 8, 150, 150, 151, 125, 326, 351,
- 352, 150, 358, 71, 61, 153, 153, 149, 160, 164,
- 298, 285, 117, 171, 172, 203, 204, 153, 31, 238,
- 239, 278, 326, 13, 145, 148, 162, 305, 209, 121,
- 214, 207, 290, 345, 322, 149, 149, 343, 322, 322,
- 288, 322, 322, 322, 63, 326, 238, 149, 149, 155,
- 336, 346, 348, 349, 155, 153, 324, 324, 124, 238,
- 346, 26, 174, 149, 150, 182, 269, 188, 186, 13,
- 8, 150, 185, 316, 316, 316, 319, 321, 149, 78,
- 148, 162, 144, 153, 71, 153, 13, 291, 202, 151,
- 362, 149, 8, 150, 71, 73, 74, 359, 322, 297,
- 153, 160, 238, 274, 275, 149, 324, 150, 8, 316,
- 148, 162, 122, 215, 216, 305, 152, 149, 126, 127,
- 235, 236, 237, 305, 155, 153, 300, 299, 322, 26,
- 306, 150, 302, 301, 347, 328, 61, 152, 31, 322,
- 150, 309, 176, 172, 181, 179, 267, 322, 326, 31,
- 218, 326, 316, 71, 26, 172, 221, 26, 152, 223,
- 124, 155, 8, 320, 319, 162, 71, 102, 316, 235,
- 326, 353, 352, 13, 155, 155, 238, 153, 150, 61,
- 123, 270, 271, 272, 330, 150, 31, 278, 326, 162,
- 216, 152, 8, 243, 235, 150, 8, 31, 73, 238,
- 238, 287, 280, 238, 238, 149, 332, 333, 335, 345,
- 322, 324, 310, 169, 175, 322, 26, 172, 228, 151,
- 124, 217, 326, 217, 13, 169, 151, 224, 151, 224,
- 316, 316, 150, 149, 150, 351, 322, 153, 150, 345,
- 346, 330, 61, 273, 151, 324, 243, 305, 99, 104,
- 107, 108, 109, 110, 111, 112, 113, 153, 244, 247,
- 260, 261, 262, 263, 265, 150, 104, 293, 237, 73,
- 13, 150, 150, 322, 314, 150, 150, 334, 61, 61,
- 329, 155, 153, 123, 311, 177, 229, 150, 169, 183,
- 218, 150, 150, 316, 89, 224, 92, 93, 94, 224,
- 153, 124, 192, 293, 150, 155, 331, 345, 270, 153,
- 71, 248, 305, 245, 292, 263, 8, 151, 152, 149,
- 152, 31, 73, 13, 316, 238, 345, 345, 330, 346,
- 231, 66, 67, 233, 151, 83, 267, 189, 187, 151,
- 92, 151, 322, 26, 151, 227, 153, 316, 305, 152,
- 335, 155, 13, 8, 151, 152, 249, 73, 264, 205,
- 71, 169, 31, 73, 294, 169, 73, 13, 316, 150,
- 155, 155, 66, 67, 234, 149, 172, 151, 150, 26,
- 172, 220, 220, 151, 227, 226, 193, 169, 316, 305,
- 71, 250, 251, 252, 253, 255, 256, 257, 305, 13,
- 8, 151, 71, 13, 153, 73, 8, 150, 153, 13,
- 316, 149, 26, 68, 322, 184, 169, 225, 169, 73,
- 153, 153, 252, 151, 90, 105, 151, 144, 316, 73,
- 246, 316, 31, 73, 316, 322, 169, 151, 150, 26,
- 172, 219, 87, 169, 150, 258, 263, 254, 305, 71,
- 13, 149, 73, 150, 230, 169, 151, 194, 71, 8,
- 316, 235, 26, 172, 85, 152, 305, 150, 232, 151,
- 169, 151, 152, 259, 169, 153, 169, 195, 153, 102,
- 196, 197, 198, 149, 198, 305, 199, 73, 150, 200,
- 152, 169, 153
+ 66, 70, 71, 72, 73, 74, 76, 80, 81, 82,
+ 83, 85, 87, 89, 92, 96, 97, 98, 99, 100,
+ 101, 102, 105, 106, 108, 112, 113, 114, 116, 117,
+ 118, 119, 120, 121, 122, 127, 128, 130, 131, 132,
+ 133, 134, 135, 142, 147, 148, 149, 150, 151, 153,
+ 154, 156, 158, 159, 164, 165, 170, 174, 175, 209,
+ 210, 212, 214, 217, 219, 283, 285, 299, 300, 301,
+ 302, 305, 314, 325, 328, 332, 333, 334, 336, 337,
+ 347, 348, 349, 350, 352, 353, 354, 355, 361, 371,
+ 375, 13, 72, 114, 147, 302, 332, 332, 151, 332,
+ 332, 332, 285, 332, 337, 332, 332, 332, 332, 296,
+ 332, 332, 332, 332, 332, 332, 332, 114, 147, 150,
+ 164, 314, 336, 337, 349, 336, 32, 332, 365, 366,
+ 332, 147, 150, 164, 314, 316, 317, 349, 353, 354,
+ 361, 151, 322, 333, 151, 333, 27, 62, 273, 332,
+ 182, 180, 151, 151, 192, 333, 153, 332, 153, 332,
+ 72, 72, 153, 285, 332, 337, 193, 332, 150, 164,
+ 168, 169, 74, 156, 247, 248, 120, 120, 74, 249,
+ 302, 151, 151, 151, 151, 151, 151, 74, 79, 143,
+ 144, 145, 367, 368, 150, 154, 164, 164, 283, 299,
+ 332, 171, 154, 79, 323, 367, 79, 367, 150, 306,
+ 8, 153, 72, 72, 153, 62, 62, 32, 211, 351,
+ 146, 9, 10, 11, 26, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 50, 153, 60, 61,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 313, 146, 62, 125, 62, 154, 156, 354,
+ 211, 332, 126, 332, 150, 164, 146, 146, 335, 337,
+ 126, 157, 8, 330, 150, 164, 146, 284, 146, 125,
+ 354, 152, 27, 176, 332, 356, 8, 153, 174, 333,
+ 274, 275, 332, 285, 337, 151, 187, 153, 153, 153,
+ 14, 153, 153, 154, 153, 164, 91, 8, 153, 154,
+ 334, 337, 8, 153, 14, 8, 153, 211, 207, 208,
+ 337, 285, 337, 372, 374, 285, 337, 152, 286, 365,
+ 62, 125, 143, 368, 73, 332, 337, 79, 143, 368,
+ 164, 167, 153, 154, 308, 152, 152, 152, 155, 172,
+ 332, 158, 159, 72, 151, 245, 72, 123, 218, 216,
+ 356, 356, 72, 297, 62, 72, 154, 347, 354, 360,
+ 361, 290, 332, 291, 27, 293, 288, 289, 332, 332,
+ 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 332, 332, 332, 332, 332, 332, 316, 32, 332,
+ 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 245, 72, 347, 360, 356, 338, 356, 332, 152,
+ 285, 337, 164, 72, 32, 332, 32, 332, 164, 347,
+ 245, 324, 347, 318, 178, 174, 157, 332, 83, 181,
+ 153, 8, 91, 91, 72, 229, 27, 154, 230, 43,
+ 44, 62, 80, 128, 130, 142, 147, 150, 164, 314,
+ 325, 326, 327, 171, 91, 72, 169, 332, 248, 326,
+ 74, 298, 8, 152, 8, 152, 152, 152, 153, 127,
+ 337, 362, 363, 152, 369, 72, 62, 155, 155, 307,
+ 162, 166, 245, 292, 119, 173, 174, 209, 210, 155,
+ 32, 152, 246, 285, 299, 337, 14, 147, 150, 164,
+ 315, 215, 123, 220, 157, 157, 213, 151, 356, 332,
+ 310, 309, 354, 332, 332, 295, 332, 332, 332, 64,
+ 337, 312, 311, 157, 347, 357, 359, 360, 157, 155,
+ 335, 335, 126, 357, 171, 177, 183, 27, 174, 235,
+ 184, 276, 190, 188, 14, 8, 152, 153, 231, 153,
+ 231, 326, 326, 326, 329, 331, 151, 79, 150, 164,
+ 146, 155, 72, 155, 14, 151, 208, 153, 373, 151,
+ 8, 152, 72, 74, 75, 370, 332, 245, 155, 162,
+ 281, 282, 151, 335, 8, 152, 152, 326, 150, 164,
+ 124, 221, 222, 315, 154, 151, 128, 129, 242, 243,
+ 244, 315, 157, 155, 245, 245, 332, 27, 316, 245,
+ 245, 358, 339, 62, 154, 32, 332, 319, 179, 236,
+ 333, 171, 274, 332, 32, 127, 224, 337, 224, 326,
+ 72, 27, 174, 228, 231, 93, 94, 95, 231, 155,
+ 126, 157, 8, 330, 329, 164, 72, 103, 195, 326,
+ 242, 374, 364, 363, 14, 157, 157, 155, 62, 125,
+ 277, 278, 279, 341, 152, 32, 285, 337, 164, 222,
+ 154, 8, 250, 242, 152, 8, 32, 74, 294, 287,
+ 343, 344, 345, 346, 356, 332, 335, 320, 238, 67,
+ 68, 240, 153, 84, 153, 337, 151, 126, 223, 223,
+ 14, 171, 93, 153, 332, 27, 153, 234, 155, 326,
+ 326, 152, 151, 194, 152, 362, 332, 155, 356, 357,
+ 341, 62, 280, 153, 335, 250, 315, 100, 106, 109,
+ 110, 111, 112, 113, 114, 115, 155, 251, 254, 267,
+ 268, 269, 270, 272, 152, 106, 303, 244, 74, 14,
+ 332, 324, 62, 62, 245, 340, 157, 155, 125, 321,
+ 67, 68, 241, 333, 174, 153, 185, 225, 224, 152,
+ 152, 326, 90, 153, 234, 233, 126, 196, 104, 200,
+ 303, 152, 157, 342, 356, 277, 155, 72, 255, 315,
+ 252, 302, 270, 8, 153, 154, 151, 154, 32, 74,
+ 14, 326, 356, 356, 341, 357, 333, 27, 69, 237,
+ 274, 362, 191, 189, 153, 232, 171, 326, 315, 201,
+ 154, 346, 157, 14, 8, 153, 154, 256, 74, 271,
+ 211, 72, 171, 32, 74, 304, 171, 74, 14, 326,
+ 157, 157, 27, 171, 153, 174, 152, 152, 27, 174,
+ 227, 227, 171, 197, 154, 171, 326, 315, 72, 257,
+ 258, 259, 260, 262, 263, 264, 315, 14, 8, 153,
+ 72, 14, 155, 74, 8, 152, 155, 14, 326, 239,
+ 186, 171, 74, 171, 155, 155, 259, 153, 91, 107,
+ 153, 146, 326, 74, 253, 326, 32, 74, 326, 171,
+ 27, 174, 226, 88, 152, 155, 265, 270, 261, 315,
+ 72, 14, 151, 74, 171, 153, 198, 72, 8, 326,
+ 242, 86, 154, 315, 152, 153, 171, 153, 154, 266,
+ 155, 171, 199, 155, 103, 202, 203, 204, 151, 204,
+ 315, 205, 74, 152, 206, 154, 171, 155
};
#define yyerrok (yyerrstatus = 0)
@@ -2708,9 +2713,18 @@ static const yytype_uint16 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -2720,7 +2734,6 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -2762,19 +2775,10 @@ while (YYID (0))
#endif
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
+/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
@@ -2878,17 +2882,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -2922,11 +2929,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -2963,7 +2970,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -3066,115 +3072,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -3206,10 +3239,9 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
-
-/* Prevent warnings from -Wmissing-prototypes. */
+/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -3225,10 +3257,6 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */
-
-
-
-
/*----------.
| yyparse. |
`----------*/
@@ -3255,74 +3283,75 @@ yyparse ()
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ YYSIZE_T yystacksize;
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
@@ -3352,7 +3381,6 @@ int yynerrs;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
-
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -3360,7 +3388,6 @@ int yynerrs;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-
&yystacksize);
yyss = yyss1;
@@ -3383,9 +3410,8 @@ int yynerrs;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -3396,7 +3422,6 @@ int yynerrs;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -3406,6 +3431,9 @@ int yynerrs;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -3414,16 +3442,16 @@ int yynerrs;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -3449,26 +3477,22 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -3644,12 +3668,12 @@ yyreduce:
case 37:
- { zend_do_if_cond(&(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
+ { zend_do_if_cond(&(yyvsp[(2) - (2)]), &(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
case 38:
- { zend_do_if_after_statement(&(yyvsp[(4) - (6)]), 1 TSRMLS_CC); }
+ { zend_do_if_after_statement(&(yyvsp[(1) - (4)]), 1 TSRMLS_CC); }
break;
case 39:
@@ -3659,12 +3683,12 @@ yyreduce:
case 40:
- { zend_do_if_cond(&(yyvsp[(3) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
+ { zend_do_if_cond(&(yyvsp[(2) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
case 41:
- { zend_do_if_after_statement(&(yyvsp[(4) - (7)]), 1 TSRMLS_CC); }
+ { zend_do_if_after_statement(&(yyvsp[(1) - (5)]), 1 TSRMLS_CC); }
break;
case 42:
@@ -3674,17 +3698,17 @@ yyreduce:
case 43:
- { (yyvsp[(1) - (2)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
+ { (yyvsp[(1) - (1)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 44:
- { zend_do_while_cond(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
+ { zend_do_while_cond(&(yyvsp[(3) - (3)]), &(yyval) TSRMLS_CC); }
break;
case 45:
- { zend_do_while_end(&(yyvsp[(1) - (7)]), &(yyvsp[(5) - (7)]) TSRMLS_CC); }
+ { zend_do_while_end(&(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
break;
case 46:
@@ -3694,12 +3718,12 @@ yyreduce:
case 47:
- { (yyvsp[(5) - (5)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
+ { (yyvsp[(4) - (4)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 48:
- { zend_do_do_while_end(&(yyvsp[(1) - (9)]), &(yyvsp[(5) - (9)]), &(yyvsp[(7) - (9)]) TSRMLS_CC); }
+ { zend_do_do_while_end(&(yyvsp[(1) - (7)]), &(yyvsp[(4) - (7)]), &(yyvsp[(6) - (7)]) TSRMLS_CC); }
break;
case 49:
@@ -3724,12 +3748,12 @@ yyreduce:
case 53:
- { zend_do_switch_cond(&(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { zend_do_switch_cond(&(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
case 54:
- { zend_do_switch_end(&(yyvsp[(6) - (6)]) TSRMLS_CC); }
+ { zend_do_switch_end(&(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
case 55:
@@ -3767,2043 +3791,2178 @@ yyreduce:
{ zend_do_return(&(yyvsp[(2) - (3)]), 1 TSRMLS_CC); }
break;
- case 65:
+ case 62:
- { zend_do_echo(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { (yyval) = (yyvsp[(1) - (2)]); }
break;
case 66:
- { zend_do_free(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
+ { zend_do_echo(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 68:
+ case 67:
- { zend_do_foreach_begin(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]), 1 TSRMLS_CC); }
+ { zend_do_free(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
case 69:
- { zend_do_foreach_cont(&(yyvsp[(1) - (8)]), &(yyvsp[(2) - (8)]), &(yyvsp[(4) - (8)]), &(yyvsp[(6) - (8)]), &(yyvsp[(7) - (8)]) TSRMLS_CC); }
+ { zend_do_foreach_begin(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]), 1 TSRMLS_CC); }
break;
case 70:
- { zend_do_foreach_end(&(yyvsp[(1) - (10)]), &(yyvsp[(4) - (10)]) TSRMLS_CC); }
+ { zend_do_foreach_cont(&(yyvsp[(1) - (8)]), &(yyvsp[(2) - (8)]), &(yyvsp[(4) - (8)]), &(yyvsp[(6) - (8)]), &(yyvsp[(7) - (8)]) TSRMLS_CC); }
break;
case 71:
- { zend_do_foreach_begin(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]), 0 TSRMLS_CC); }
+ { zend_do_foreach_end(&(yyvsp[(1) - (10)]), &(yyvsp[(4) - (10)]) TSRMLS_CC); }
break;
case 72:
- { zend_check_writable_variable(&(yyvsp[(6) - (8)])); zend_do_foreach_cont(&(yyvsp[(1) - (8)]), &(yyvsp[(2) - (8)]), &(yyvsp[(4) - (8)]), &(yyvsp[(6) - (8)]), &(yyvsp[(7) - (8)]) TSRMLS_CC); }
+ { zend_do_foreach_begin(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]), 0 TSRMLS_CC); }
break;
case 73:
- { zend_do_foreach_end(&(yyvsp[(1) - (10)]), &(yyvsp[(4) - (10)]) TSRMLS_CC); }
+ { zend_do_foreach_cont(&(yyvsp[(1) - (8)]), &(yyvsp[(2) - (8)]), &(yyvsp[(4) - (8)]), &(yyvsp[(6) - (8)]), &(yyvsp[(7) - (8)]) TSRMLS_CC); }
break;
case 74:
- { (yyvsp[(1) - (1)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); }
+ { zend_do_foreach_end(&(yyvsp[(1) - (10)]), &(yyvsp[(4) - (10)]) TSRMLS_CC); }
break;
case 75:
- { zend_do_declare_end(&(yyvsp[(1) - (6)]) TSRMLS_CC); }
+ { (yyvsp[(1) - (1)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); }
break;
- case 77:
+ case 76:
- { zend_do_try(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { zend_do_declare_end(&(yyvsp[(1) - (6)]) TSRMLS_CC); }
break;
case 78:
- { zend_initialize_try_catch_element(&(yyvsp[(1) - (7)]) TSRMLS_CC); }
+ { zend_do_try(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
case 79:
- { zend_do_first_catch(&(yyvsp[(7) - (9)]) TSRMLS_CC); }
+ { zend_do_bind_catch(&(yyvsp[(1) - (6)]), &(yyvsp[(6) - (6)]) TSRMLS_CC); }
break;
case 80:
- { zend_do_begin_catch(&(yyvsp[(1) - (12)]), &(yyvsp[(9) - (12)]), &(yyvsp[(11) - (12)]), &(yyvsp[(7) - (12)]) TSRMLS_CC); }
+ { zend_do_end_finally(&(yyvsp[(1) - (8)]), &(yyvsp[(6) - (8)]), &(yyvsp[(8) - (8)]) TSRMLS_CC); }
break;
case 81:
- { zend_do_end_catch(&(yyvsp[(1) - (16)]) TSRMLS_CC); }
+ { zend_do_throw(&(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
case 82:
- { zend_do_mark_last_catch(&(yyvsp[(7) - (18)]), &(yyvsp[(18) - (18)]) TSRMLS_CC); }
+ { zend_do_goto(&(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
case 83:
- { zend_do_throw(&(yyvsp[(2) - (3)]) TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; }
break;
case 84:
- { zend_do_goto(&(yyvsp[(2) - (3)]) TSRMLS_CC); }
+ { zend_initialize_try_catch_element(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
case 85:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { zend_do_first_catch(&(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
case 86:
- { (yyval).u.op.opline_num = -1; }
+ { zend_do_begin_catch(&(yyvsp[(1) - (7)]), &(yyvsp[(4) - (7)]), &(yyvsp[(6) - (7)]), &(yyvsp[(2) - (7)]) TSRMLS_CC); }
break;
case 87:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { zend_do_end_catch(&(yyvsp[(1) - (11)]) TSRMLS_CC); }
break;
case 88:
- { (yyval) = (yyvsp[(2) - (2)]); }
+ { zend_do_mark_last_catch(&(yyvsp[(2) - (13)]), &(yyvsp[(13) - (13)]) TSRMLS_CC); (yyval) = (yyvsp[(1) - (13)]);}
break;
case 89:
- { (yyval).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
+ { (yyval).op_type = IS_UNUSED; }
break;
case 90:
- { zend_do_begin_catch(&(yyvsp[(1) - (6)]), &(yyvsp[(3) - (6)]), &(yyvsp[(5) - (6)]), NULL TSRMLS_CC); }
+ { zend_do_finally(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
case 91:
- { zend_do_end_catch(&(yyvsp[(1) - (10)]) TSRMLS_CC); }
+ { (yyval) = (yyvsp[(1) - (5)]); }
+ break;
+
+ case 92:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 93:
+
+ { (yyval).u.op.opline_num = -1; }
break;
case 94:
- { zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 95:
- { DO_TICKS(); }
+ { (yyval) = (yyvsp[(2) - (2)]); }
break;
case 96:
- { DO_TICKS(); }
+ { (yyval).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 97:
- { (yyval).op_type = ZEND_RETURN_VAL; }
+ { zend_do_begin_catch(&(yyvsp[(1) - (6)]), &(yyvsp[(3) - (6)]), &(yyvsp[(5) - (6)]), NULL TSRMLS_CC); }
break;
case 98:
+ { zend_do_end_catch(&(yyvsp[(1) - (10)]) TSRMLS_CC); }
+ break;
+
+ case 101:
+
+ { zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ break;
+
+ case 102:
+
+ { DO_TICKS(); }
+ break;
+
+ case 103:
+
+ { DO_TICKS(); }
+ break;
+
+ case 104:
+
+ { (yyval).op_type = ZEND_RETURN_VAL; }
+ break;
+
+ case 105:
+
{ (yyval).op_type = ZEND_RETURN_REF; }
break;
- case 99:
+ case 106:
{ zend_do_begin_function_declaration(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), 0, (yyvsp[(2) - (3)]).op_type, NULL TSRMLS_CC); }
break;
- case 100:
+ case 107:
{ zend_do_end_function_declaration(&(yyvsp[(1) - (10)]) TSRMLS_CC); }
break;
- case 101:
+ case 108:
{ zend_do_begin_class_declaration(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 102:
+ case 109:
{ zend_do_end_class_declaration(&(yyvsp[(1) - (8)]), &(yyvsp[(2) - (8)]) TSRMLS_CC); }
break;
- case 103:
+ case 110:
{ zend_do_begin_class_declaration(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]), NULL TSRMLS_CC); }
break;
- case 104:
+ case 111:
{ zend_do_end_class_declaration(&(yyvsp[(1) - (7)]), &(yyvsp[(2) - (7)]) TSRMLS_CC); }
break;
- case 105:
+ case 112:
{ (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = 0; }
break;
- case 106:
+ case 113:
{ (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
break;
- case 107:
+ case 114:
{ (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_TRAIT; }
break;
- case 108:
+ case 115:
{ (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_FINAL_CLASS; }
break;
- case 109:
+ case 116:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 110:
+ case 117:
{ zend_do_fetch_class(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 111:
+ case 118:
{ (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_INTERFACE; }
break;
- case 116:
+ case 123:
{ zend_do_implements_interface(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 117:
+ case 124:
{ zend_do_implements_interface(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 118:
+ case 125:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 119:
+ case 126:
{ (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 120:
+ case 127:
{ zend_check_writable_variable(&(yyvsp[(1) - (1)])); (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 121:
+ case 128:
{ zend_check_writable_variable(&(yyvsp[(2) - (2)])); (yyval) = (yyvsp[(2) - (2)]); (yyval).EA |= ZEND_PARSED_REFERENCE_VARIABLE; }
break;
- case 128:
+ case 129:
+
+ { zend_do_list_init(TSRMLS_C); }
+ break;
+
+ case 130:
+
+ { (yyval) = (yyvsp[(1) - (5)]); (yyval).EA = ZEND_PARSED_LIST_EXPR; }
+ break;
+
+ case 137:
{ zend_do_declare_stmt(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 129:
+ case 138:
{ zend_do_declare_stmt(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 130:
+ case 139:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 131:
+ case 140:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 132:
+ case 141:
{ (yyval) = (yyvsp[(2) - (4)]); }
break;
- case 133:
+ case 142:
{ (yyval) = (yyvsp[(3) - (5)]); }
break;
- case 134:
+ case 143:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 135:
+ case 144:
{ zend_do_extended_info(TSRMLS_C); zend_do_case_before_statement(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 136:
+ case 145:
{ zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (6)]) TSRMLS_CC); (yyval).op_type = IS_CONST; }
break;
- case 137:
+ case 146:
{ zend_do_extended_info(TSRMLS_C); zend_do_default_before_statement(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 138:
+ case 147:
{ zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (5)]) TSRMLS_CC); (yyval).op_type = IS_CONST; }
break;
- case 144:
+ case 153:
- { zend_do_if_cond(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
+ { zend_do_if_cond(&(yyvsp[(3) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 145:
+ case 154:
- { zend_do_if_after_statement(&(yyvsp[(5) - (7)]), 0 TSRMLS_CC); }
+ { zend_do_if_after_statement(&(yyvsp[(2) - (5)]), 0 TSRMLS_CC); }
break;
- case 147:
+ case 156:
- { zend_do_if_cond(&(yyvsp[(4) - (6)]), &(yyvsp[(5) - (6)]) TSRMLS_CC); }
+ { zend_do_if_cond(&(yyvsp[(3) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 148:
+ case 157:
- { zend_do_if_after_statement(&(yyvsp[(5) - (8)]), 0 TSRMLS_CC); }
+ { zend_do_if_after_statement(&(yyvsp[(2) - (6)]), 0 TSRMLS_CC); }
break;
- case 155:
+ case 164:
{ (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(2) - (2)]), &(yyval), NULL, &(yyvsp[(1) - (2)]), 0 TSRMLS_CC); }
break;
- case 156:
+ case 165:
{ (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(3) - (3)]), &(yyval), NULL, &(yyvsp[(1) - (3)]), 1 TSRMLS_CC); }
break;
- case 157:
+ case 166:
{ (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(3) - (5)]), &(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(1) - (5)]), 1 TSRMLS_CC); }
break;
- case 158:
+ case 167:
{ (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(2) - (4)]), &(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), 0 TSRMLS_CC); }
break;
- case 159:
+ case 168:
{ (yyval)=(yyvsp[(1) - (4)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(4) - (4)]), &(yyval), NULL, &(yyvsp[(3) - (4)]), 0 TSRMLS_CC); }
break;
- case 160:
+ case 169:
{ (yyval)=(yyvsp[(1) - (5)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(5) - (5)]), &(yyval), NULL, &(yyvsp[(3) - (5)]), 1 TSRMLS_CC); }
break;
- case 161:
+ case 170:
{ (yyval)=(yyvsp[(1) - (7)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(5) - (7)]), &(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(3) - (7)]), 1 TSRMLS_CC); }
break;
- case 162:
+ case 171:
{ (yyval)=(yyvsp[(1) - (6)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(4) - (6)]), &(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), 0 TSRMLS_CC); }
break;
- case 163:
+ case 172:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 164:
+ case 173:
{ (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant)=IS_ARRAY; }
break;
- case 165:
+ case 174:
{ (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant)=IS_CALLABLE; }
break;
- case 166:
+ case 175:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 167:
+ case 176:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { Z_LVAL((yyval).u.constant) = 0; }
break;
- case 168:
+ case 177:
- { Z_LVAL((yyval).u.constant) = 0; }
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 169:
+ case 178:
+
+ { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(2) - (3)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ break;
+
+ case 179:
{ Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
- case 170:
+ case 180:
{ Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAR, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
- case 171:
+ case 181:
{ Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(2) - (2)]), ZEND_SEND_REF, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
- case 172:
+ case 182:
{ Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (3)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
- case 173:
+ case 183:
{ Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (3)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAR, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
- case 174:
+ case 184:
{ Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (4)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(4) - (4)]), ZEND_SEND_REF, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
- case 175:
+ case 185:
{ zend_do_fetch_global_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
break;
- case 176:
+ case 186:
{ zend_do_fetch_global_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
break;
- case 177:
+ case 187:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 178:
+ case 188:
{ (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 179:
+ case 189:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 180:
+ case 190:
{ zend_do_fetch_static_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
break;
- case 181:
+ case 191:
{ zend_do_fetch_static_variable(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), ZEND_FETCH_STATIC TSRMLS_CC); }
break;
- case 182:
+ case 192:
{ zend_do_fetch_static_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
break;
- case 183:
+ case 193:
{ zend_do_fetch_static_variable(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_FETCH_STATIC TSRMLS_CC); }
break;
- case 186:
+ case 196:
{ CG(access_type) = Z_LVAL((yyvsp[(1) - (1)]).u.constant); }
break;
- case 190:
+ case 200:
{ zend_do_begin_function_declaration(&(yyvsp[(2) - (4)]), &(yyvsp[(4) - (4)]), 1, (yyvsp[(3) - (4)]).op_type, &(yyvsp[(1) - (4)]) TSRMLS_CC); }
break;
- case 191:
+ case 201:
{ zend_do_abstract_method(&(yyvsp[(4) - (9)]), &(yyvsp[(1) - (9)]), &(yyvsp[(9) - (9)]) TSRMLS_CC); zend_do_end_function_declaration(&(yyvsp[(2) - (9)]) TSRMLS_CC); }
break;
- case 193:
+ case 203:
{ zend_do_implements_trait(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 194:
+ case 204:
{ zend_do_implements_trait(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 201:
+ case 211:
{ zend_add_trait_precedence(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 202:
+ case 212:
{ zend_add_trait_alias(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 203:
+ case 213:
{ zend_prepare_trait_precedence(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 204:
+ case 214:
{ zend_resolve_class_name(&(yyvsp[(1) - (1)]), ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC); zend_init_list(&(yyval).u.op.ptr, Z_STRVAL((yyvsp[(1) - (1)]).u.constant) TSRMLS_CC); }
break;
- case 205:
+ case 215:
{ zend_resolve_class_name(&(yyvsp[(3) - (3)]), ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC); zend_add_to_list(&(yyvsp[(1) - (3)]).u.op.ptr, Z_STRVAL((yyvsp[(3) - (3)]).u.constant) TSRMLS_CC); (yyval) = (yyvsp[(1) - (3)]); }
break;
- case 206:
+ case 216:
{ zend_prepare_reference(&(yyval), NULL, &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 207:
+ case 217:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 208:
+ case 218:
{ zend_prepare_reference(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 209:
+ case 219:
{ zend_prepare_trait_alias(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 210:
+ case 220:
{ zend_prepare_trait_alias(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), NULL TSRMLS_CC); }
break;
- case 211:
+ case 221:
{ Z_LVAL((yyval).u.constant) = 0x0; }
break;
- case 212:
+ case 222:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 213:
+ case 223:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_ABSTRACT; }
break;
- case 214:
+ case 224:
{ Z_LVAL((yyval).u.constant) = 0; }
break;
- case 215:
+ case 225:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 216:
+ case 226:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PUBLIC; }
break;
- case 217:
+ case 227:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PUBLIC; }
break;
- case 218:
+ case 228:
{ (yyval) = (yyvsp[(1) - (1)]); if (!(Z_LVAL((yyval).u.constant) & ZEND_ACC_PPP_MASK)) { Z_LVAL((yyval).u.constant) |= ZEND_ACC_PUBLIC; } }
break;
- case 219:
+ case 229:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 220:
+ case 230:
{ Z_LVAL((yyval).u.constant) = zend_do_verify_access_types(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); }
break;
- case 221:
+ case 231:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PUBLIC; }
break;
- case 222:
+ case 232:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PROTECTED; }
break;
- case 223:
+ case 233:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PRIVATE; }
break;
- case 224:
+ case 234:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_STATIC; }
break;
- case 225:
+ case 235:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_ABSTRACT; }
break;
- case 226:
+ case 236:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_FINAL; }
break;
- case 227:
+ case 237:
{ zend_do_declare_property(&(yyvsp[(3) - (3)]), NULL, CG(access_type) TSRMLS_CC); }
break;
- case 228:
+ case 238:
{ zend_do_declare_property(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), CG(access_type) TSRMLS_CC); }
break;
- case 229:
+ case 239:
{ zend_do_declare_property(&(yyvsp[(1) - (1)]), NULL, CG(access_type) TSRMLS_CC); }
break;
- case 230:
+ case 240:
{ zend_do_declare_property(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), CG(access_type) TSRMLS_CC); }
break;
- case 231:
+ case 241:
{ zend_do_declare_class_constant(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 232:
+ case 242:
{ zend_do_declare_class_constant(&(yyvsp[(2) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 233:
+ case 243:
{ zend_do_echo(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 234:
+ case 244:
{ zend_do_echo(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 235:
+ case 245:
{ (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant) = IS_BOOL; Z_LVAL((yyval).u.constant) = 1; }
break;
- case 236:
+ case 246:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 237:
+ case 247:
{ zend_do_free(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 238:
+ case 248:
{ (yyval) = (yyvsp[(4) - (4)]); }
break;
- case 239:
+ case 249:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 240:
+ case 250:
{ (yyval).EA = (yyvsp[(2) - (2)]).EA; }
break;
- case 241:
+ case 251:
{ (yyval).EA = (yyvsp[(1) - (1)]).EA; }
break;
- case 242:
+ case 252:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 243:
+ case 253:
{ zend_do_pop_object(&(yyvsp[(1) - (3)]) TSRMLS_CC); fetch_array_dim(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 244:
+ case 254:
{ zend_do_push_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 245:
+ case 255:
{ (yyval) = (yyvsp[(3) - (3)]); }
break;
- case 246:
+ case 256:
{ zend_do_push_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 247:
+ case 257:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 248:
+ case 258:
{ (yyval) = (yyvsp[(0) - (0)]); }
break;
- case 249:
+ case 259:
{ zend_do_push_object(&(yyvsp[(0) - (0)]) TSRMLS_CC); zend_do_begin_variable_parse(TSRMLS_C); }
break;
- case 250:
+ case 260:
{ zend_do_pop_object(&(yyval) TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(2) - (2)]), BP_VAR_R, 0 TSRMLS_CC); }
break;
- case 251:
+ case 261:
{ zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 252:
+ case 262:
{ zend_do_end_new_object(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 253:
+ case 263:
{ zend_do_list_init(TSRMLS_C); }
break;
- case 254:
+ case 264:
{ zend_do_list_end(&(yyval), &(yyvsp[(7) - (7)]) TSRMLS_CC); }
break;
- case 255:
+ case 265:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_assign(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 256:
+ case 266:
{ zend_check_writable_variable(&(yyvsp[(1) - (4)])); zend_do_end_variable_parse(&(yyvsp[(4) - (4)]), BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(1) - (4)]), BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 257:
+ case 267:
{ zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&(yyvsp[(1) - (5)])); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 258:
+ case 268:
{ zend_do_end_new_object(&(yyvsp[(3) - (7)]), &(yyvsp[(4) - (7)]), &(yyvsp[(7) - (7)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(&(yyvsp[(1) - (7)]), BP_VAR_W, 0 TSRMLS_CC); (yyvsp[(3) - (7)]).EA = ZEND_PARSED_NEW; zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (7)]), &(yyvsp[(3) - (7)]) TSRMLS_CC); }
break;
- case 259:
+ case 269:
{ zend_do_clone(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 260:
+ case 270:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 261:
+ case 271:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 262:
+ case 272:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 263:
+ case 273:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 264:
+ case 274:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 265:
+ case 275:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 266:
+ case 276:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 267:
+ case 277:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 268:
+ case 278:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 269:
+ case 279:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 270:
+ case 280:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 271:
+ case 281:
{ zend_do_post_incdec(&(yyval), &(yyvsp[(1) - (2)]), ZEND_POST_INC TSRMLS_CC); }
break;
- case 272:
+ case 282:
{ zend_do_pre_incdec(&(yyval), &(yyvsp[(2) - (2)]), ZEND_PRE_INC TSRMLS_CC); }
break;
- case 273:
+ case 283:
{ zend_do_post_incdec(&(yyval), &(yyvsp[(1) - (2)]), ZEND_POST_DEC TSRMLS_CC); }
break;
- case 274:
+ case 284:
{ zend_do_pre_incdec(&(yyval), &(yyvsp[(2) - (2)]), ZEND_PRE_DEC TSRMLS_CC); }
break;
- case 275:
+ case 285:
{ zend_do_boolean_or_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 276:
+ case 286:
{ zend_do_boolean_or_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 277:
+ case 287:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 278:
+ case 288:
{ zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 279:
+ case 289:
{ zend_do_boolean_or_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 280:
+ case 290:
{ zend_do_boolean_or_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 281:
+ case 291:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 282:
+ case 292:
{ zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 283:
+ case 293:
{ zend_do_binary_op(ZEND_BOOL_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 284:
+ case 294:
{ zend_do_binary_op(ZEND_BW_OR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 285:
+ case 295:
{ zend_do_binary_op(ZEND_BW_AND, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 286:
+ case 296:
{ zend_do_binary_op(ZEND_BW_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 287:
+ case 297:
{ zend_do_binary_op(ZEND_CONCAT, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 288:
+ case 298:
{ zend_do_binary_op(ZEND_ADD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 289:
+ case 299:
{ zend_do_binary_op(ZEND_SUB, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 290:
+ case 300:
{ zend_do_binary_op(ZEND_MUL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 291:
+ case 301:
{ zend_do_binary_op(ZEND_DIV, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 292:
+ case 302:
{ zend_do_binary_op(ZEND_MOD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 293:
+ case 303:
{ zend_do_binary_op(ZEND_SL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 294:
+ case 304:
{ zend_do_binary_op(ZEND_SR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 295:
+ case 305:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); if ((yyvsp[(2) - (2)]).op_type == IS_CONST) { add_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); } else { (yyvsp[(1) - (2)]).op_type = IS_CONST; INIT_PZVAL(&(yyvsp[(1) - (2)]).u.constant); zend_do_binary_op(ZEND_ADD, &(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } }
break;
- case 296:
+ case 306:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); if ((yyvsp[(2) - (2)]).op_type == IS_CONST) { sub_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); } else { (yyvsp[(1) - (2)]).op_type = IS_CONST; INIT_PZVAL(&(yyvsp[(1) - (2)]).u.constant); zend_do_binary_op(ZEND_SUB, &(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } }
break;
- case 297:
+ case 307:
{ zend_do_unary_op(ZEND_BOOL_NOT, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 298:
+ case 308:
{ zend_do_unary_op(ZEND_BW_NOT, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 299:
+ case 309:
{ zend_do_binary_op(ZEND_IS_IDENTICAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 300:
+ case 310:
{ zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 301:
+ case 311:
{ zend_do_binary_op(ZEND_IS_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 302:
+ case 312:
{ zend_do_binary_op(ZEND_IS_NOT_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 303:
+ case 313:
{ zend_do_binary_op(ZEND_IS_SMALLER, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 304:
+ case 314:
{ zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 305:
+ case 315:
{ zend_do_binary_op(ZEND_IS_SMALLER, &(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 306:
+ case 316:
{ zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 307:
+ case 317:
{ zend_do_instanceof(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), 0 TSRMLS_CC); }
break;
- case 308:
+ case 318:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 309:
+ case 319:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 310:
+ case 320:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 311:
+ case 321:
{ (yyval) = (yyvsp[(5) - (5)]); }
break;
- case 312:
+ case 322:
{ zend_do_begin_qm_op(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 313:
+ case 323:
{ zend_do_qm_true(&(yyvsp[(4) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 314:
+ case 324:
{ zend_do_qm_false(&(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(2) - (7)]), &(yyvsp[(5) - (7)]) TSRMLS_CC); }
break;
- case 315:
+ case 325:
{ zend_do_jmp_set(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 316:
+ case 326:
{ zend_do_jmp_set_else(&(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(3) - (5)]) TSRMLS_CC); }
break;
- case 317:
+ case 327:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 318:
+ case 328:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_LONG TSRMLS_CC); }
break;
- case 319:
+ case 329:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_DOUBLE TSRMLS_CC); }
break;
- case 320:
+ case 330:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_STRING TSRMLS_CC); }
break;
- case 321:
+ case 331:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_ARRAY TSRMLS_CC); }
break;
- case 322:
+ case 332:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_OBJECT TSRMLS_CC); }
break;
- case 323:
+ case 333:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_BOOL TSRMLS_CC); }
break;
- case 324:
+ case 334:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_NULL TSRMLS_CC); }
break;
- case 325:
+ case 335:
{ zend_do_exit(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 326:
+ case 336:
{ zend_do_begin_silence(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 327:
+ case 337:
{ zend_do_end_silence(&(yyvsp[(1) - (3)]) TSRMLS_CC); (yyval) = (yyvsp[(3) - (3)]); }
break;
- case 328:
+ case 338:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 329:
+ case 339:
- { (yyval) = (yyvsp[(3) - (4)]); }
+ { zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); }
break;
- case 330:
+ case 340:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 331:
+ case 341:
{ zend_do_shell_exec(&(yyval), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 332:
+ case 342:
{ zend_do_print(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 333:
+ case 343:
- { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]).op_type, 0 TSRMLS_CC); }
+ { zend_do_yield(&(yyval), NULL, NULL, 0 TSRMLS_CC); }
break;
- case 334:
+ case 344:
- { zend_do_end_function_declaration(&(yyvsp[(1) - (10)]) TSRMLS_CC); (yyval) = (yyvsp[(4) - (10)]); }
+ { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]).op_type, 0 TSRMLS_CC); }
break;
- case 335:
+ case 345:
- { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]).op_type, 1 TSRMLS_CC); }
+ { zend_do_end_function_declaration(&(yyvsp[(1) - (10)]) TSRMLS_CC); (yyval) = (yyvsp[(3) - (10)]); }
break;
- case 336:
+ case 346:
- { zend_do_end_function_declaration(&(yyvsp[(2) - (11)]) TSRMLS_CC); (yyval) = (yyvsp[(5) - (11)]); }
+ { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]).op_type, 1 TSRMLS_CC); }
break;
- case 337:
+ case 347:
+
+ { zend_do_end_function_declaration(&(yyvsp[(2) - (11)]) TSRMLS_CC); (yyval) = (yyvsp[(4) - (11)]); }
+ break;
+
+ case 348:
+
+ { zend_do_yield(&(yyval), &(yyvsp[(2) - (2)]), NULL, 0 TSRMLS_CC); }
+ break;
+
+ case 349:
+
+ { zend_do_yield(&(yyval), &(yyvsp[(2) - (2)]), NULL, 1 TSRMLS_CC); }
+ break;
+
+ case 350:
+
+ { zend_do_yield(&(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]), 0 TSRMLS_CC); }
+ break;
+
+ case 351:
+
+ { zend_do_yield(&(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]), 1 TSRMLS_CC); }
+ break;
+
+ case 352:
+
+ { zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 353:
+
+ { fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 354:
+
+ { (yyvsp[(1) - (4)]).EA = 0; zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 355:
+
+ { (yyval) = (yyvsp[(3) - (4)]); }
+ break;
+
+ case 356:
+
+ { (yyval) = (yyvsp[(2) - (3)]); }
+ break;
+
+ case 357:
{ (yyval).u.op.opline_num = CG(zend_lineno); }
break;
- case 340:
+ case 360:
{ zend_do_fetch_lexical_variable(&(yyvsp[(3) - (3)]), 0 TSRMLS_CC); }
break;
- case 341:
+ case 361:
{ zend_do_fetch_lexical_variable(&(yyvsp[(4) - (4)]), 1 TSRMLS_CC); }
break;
- case 342:
+ case 362:
{ zend_do_fetch_lexical_variable(&(yyvsp[(1) - (1)]), 0 TSRMLS_CC); }
break;
- case 343:
+ case 363:
{ zend_do_fetch_lexical_variable(&(yyvsp[(2) - (2)]), 1 TSRMLS_CC); }
break;
- case 344:
+ case 364:
- { (yyvsp[(2) - (2)]).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (2)]), 1 TSRMLS_CC); }
+ { (yyval).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 345:
+ case 365:
- { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, (yyvsp[(2) - (5)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(1) - (3)]), &(yyval), &(yyvsp[(3) - (3)]), 0, (yyvsp[(2) - (3)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 346:
+ case 366:
- { (yyvsp[(1) - (4)]).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyvsp[(1) - (4)]).u.constant); zend_do_build_namespace_name(&(yyvsp[(1) - (4)]), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); (yyvsp[(4) - (4)]).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (4)]), 0 TSRMLS_CC); }
+ { (yyvsp[(1) - (3)]).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyvsp[(1) - (3)]).u.constant); zend_do_build_namespace_name(&(yyvsp[(1) - (3)]), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); (yyval).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (3)]), 0 TSRMLS_CC); }
break;
- case 347:
+ case 367:
- { zend_do_end_function_call(&(yyvsp[(1) - (7)]), &(yyval), &(yyvsp[(6) - (7)]), 0, (yyvsp[(4) - (7)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(5) - (5)]), 0, (yyvsp[(4) - (5)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 348:
+ case 368:
- { (yyvsp[(3) - (3)]).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(2) - (3)]), 0 TSRMLS_CC); }
+ { (yyval).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(2) - (2)]), 0 TSRMLS_CC); }
break;
- case 349:
+ case 369:
- { zend_do_end_function_call(&(yyvsp[(2) - (6)]), &(yyval), &(yyvsp[(5) - (6)]), 0, (yyvsp[(3) - (6)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(2) - (4)]), &(yyval), &(yyvsp[(4) - (4)]), 0, (yyvsp[(3) - (4)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 350:
+ case 370:
- { (yyvsp[(4) - (4)]).u.op.opline_num = zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { (yyval).u.op.opline_num = zend_do_begin_class_member_function_call(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 351:
+ case 371:
- { zend_do_end_function_call((yyvsp[(4) - (7)]).u.op.opline_num?NULL:&(yyvsp[(3) - (7)]), &(yyval), &(yyvsp[(6) - (7)]), (yyvsp[(4) - (7)]).u.op.opline_num, (yyvsp[(4) - (7)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ { zend_do_end_function_call((yyvsp[(4) - (5)]).u.op.opline_num?NULL:&(yyvsp[(3) - (5)]), &(yyval), &(yyvsp[(5) - (5)]), (yyvsp[(4) - (5)]).u.op.opline_num, (yyvsp[(4) - (5)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 352:
+ case 372:
- { zend_do_end_variable_parse(&(yyvsp[(3) - (4)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { zend_do_end_variable_parse(&(yyvsp[(3) - (3)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 353:
+ case 373:
- { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(5) - (5)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 354:
+ case 374:
- { zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { zend_do_begin_class_member_function_call(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 355:
+ case 375:
- { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(5) - (5)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 356:
+ case 376:
- { zend_do_end_variable_parse(&(yyvsp[(3) - (4)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { zend_do_end_variable_parse(&(yyvsp[(3) - (3)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 357:
+ case 377:
- { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(5) - (5)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 358:
+ case 378:
- { zend_do_end_variable_parse(&(yyvsp[(1) - (2)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&(yyvsp[(1) - (2)]), 0 TSRMLS_CC); }
+ { zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&(yyvsp[(1) - (1)]), 0 TSRMLS_CC); }
break;
- case 359:
+ case 379:
- { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ { zend_do_end_function_call(&(yyvsp[(1) - (3)]), &(yyval), &(yyvsp[(3) - (3)]), 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 360:
+ case 380:
{ (yyval).op_type = IS_CONST; ZVAL_STRINGL(&(yyval).u.constant, "static", sizeof("static")-1, 1);}
break;
- case 361:
+ case 381:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 362:
+ case 382:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 363:
+ case 383:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 364:
+ case 384:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 365:
+ case 385:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 366:
+ case 386:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 367:
+ case 387:
{ zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 368:
+ case 388:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 369:
+ case 389:
{ zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 370:
+ case 390:
{ zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 371:
+ case 391:
{ zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).EA = ZEND_PARSED_MEMBER; }
break;
- case 372:
+ case 392:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 375:
+ case 395:
{ zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 376:
+ case 396:
{ memset(&(yyval), 0, sizeof(znode)); (yyval).op_type = IS_UNUSED; }
break;
- case 377:
+ case 397:
{ memset(&(yyval), 0, sizeof(znode)); (yyval).op_type = IS_UNUSED; }
break;
- case 378:
+ case 398:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 379:
+ case 399:
{ ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; }
break;
- case 380:
+ case 400:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 381:
+ case 401:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 382:
+ case 402:
- { Z_LVAL((yyval).u.constant)=0; }
+ { Z_LVAL((yyval).u.constant) = 0; }
break;
- case 383:
+ case 403:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 384:
+ case 404:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 385:
+ case 405:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 386:
+ case 406:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 387:
+ case 407:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 388:
+ case 408:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 389:
+ case 409:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 390:
+ case 410:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 391:
+ case 411:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 392:
+ case 412:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 393:
+ case 413:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 394:
+ case 414:
- { (yyval) = (yyvsp[(2) - (3)]); CG(heredoc) = Z_STRVAL((yyvsp[(1) - (3)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (3)]).u.constant); }
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 395:
+ case 415:
- { ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; CG(heredoc) = Z_STRVAL((yyvsp[(1) - (2)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (2)]).u.constant); }
+ { ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; }
break;
- case 396:
+ case 416:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 397:
+ case 417:
{ zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_CT, 1 TSRMLS_CC); }
break;
- case 398:
+ case 418:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); (yyvsp[(3) - (3)]) = (yyval); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(3) - (3)]), ZEND_CT, 0 TSRMLS_CC); }
break;
- case 399:
+ case 419:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(2) - (2)]), ZEND_CT, 0 TSRMLS_CC); }
break;
- case 400:
+ case 420:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); add_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 401:
+ case 421:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); sub_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 402:
+ case 422:
{ (yyval) = (yyvsp[(3) - (4)]); Z_TYPE((yyval).u.constant) = IS_CONSTANT_ARRAY; }
break;
- case 403:
+ case 423:
{ (yyval) = (yyvsp[(2) - (3)]); Z_TYPE((yyval).u.constant) = IS_CONSTANT_ARRAY; }
break;
- case 404:
+ case 424:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 405:
+ case 425:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 406:
+ case 426:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_CT, 0 TSRMLS_CC); }
break;
- case 407:
+ case 427:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 408:
+ case 428:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 409:
+ case 429:
{ zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_RT, 1 TSRMLS_CC); }
break;
- case 410:
+ case 430:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); (yyvsp[(3) - (3)]) = (yyval); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(3) - (3)]), ZEND_RT, 0 TSRMLS_CC); }
break;
- case 411:
+ case 431:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(2) - (2)]), ZEND_RT, 0 TSRMLS_CC); }
break;
- case 412:
+ case 432:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 413:
+ case 433:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 414:
+ case 434:
- { (yyval) = (yyvsp[(2) - (3)]); CG(heredoc) = Z_STRVAL((yyvsp[(1) - (3)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (3)]).u.constant); }
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 415:
+ case 435:
{ if (Z_TYPE((yyvsp[(1) - (1)]).u.constant) == IS_CONSTANT) {zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_RT, 1 TSRMLS_CC);} else {(yyval) = (yyvsp[(1) - (1)]);} }
break;
- case 416:
+ case 436:
{ (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); }
break;
- case 417:
+ case 437:
{ (yyval) = (yyvsp[(1) - (2)]); }
break;
- case 420:
+ case 440:
{ zend_do_add_static_array_element(&(yyval), &(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)])); }
break;
- case 421:
+ case 441:
{ zend_do_add_static_array_element(&(yyval), NULL, &(yyvsp[(3) - (3)])); }
break;
- case 422:
+ case 442:
{ (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); zend_do_add_static_array_element(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
break;
- case 423:
+ case 443:
{ (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); zend_do_add_static_array_element(&(yyval), NULL, &(yyvsp[(1) - (1)])); }
break;
- case 424:
+ case 444:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 425:
+ case 445:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 426:
+ case 446:
+
+ { (yyval) = (yyvsp[(2) - (3)]); }
+ break;
+
+ case 447:
+
+ { (yyval) = (yyvsp[(2) - (3)]); }
+ break;
+
+ case 448:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 427:
+ case 449:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_W, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]);
zend_check_writable_variable(&(yyvsp[(1) - (1)])); }
break;
- case 428:
+ case 450:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_RW, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]);
zend_check_writable_variable(&(yyvsp[(1) - (1)])); }
break;
- case 429:
+ case 451:
{ zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 430:
+ case 452:
{ zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 431:
+ case 453:
{ zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).EA = (yyvsp[(1) - (7)]).EA | ((yyvsp[(7) - (7)]).EA ? (yyvsp[(7) - (7)]).EA : (yyvsp[(6) - (7)]).EA); }
break;
- case 432:
+ case 454:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 433:
+ case 455:
{ (yyval).EA = (yyvsp[(2) - (2)]).EA; }
break;
- case 434:
+ case 456:
{ (yyval).EA = 0; }
break;
- case 435:
+ case 457:
{ zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 436:
+ case 458:
{ (yyval).EA = (yyvsp[(4) - (4)]).EA; }
break;
- case 437:
+ case 459:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 438:
+ case 460:
{ (yyvsp[(1) - (4)]).EA = ZEND_PARSED_METHOD_CALL; fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 439:
+ case 461:
- { zend_do_pop_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); zend_do_begin_method_call(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { zend_do_pop_object(&(yyval) TSRMLS_CC); zend_do_begin_method_call(&(yyval) TSRMLS_CC); }
break;
- case 440:
+ case 462:
- { zend_do_end_function_call(&(yyvsp[(1) - (4)]), &(yyval), &(yyvsp[(3) - (4)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(1) - (2)]), &(yyval), &(yyvsp[(2) - (2)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 441:
+ case 463:
{ (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_METHOD_CALL; zend_do_push_object(&(yyval) TSRMLS_CC); }
break;
- case 442:
+ case 464:
{ (yyval) = (yyvsp[(1) - (1)]); zend_do_push_object(&(yyval) TSRMLS_CC); }
break;
- case 443:
+ case 465:
{ (yyval).EA = ZEND_PARSED_MEMBER; }
break;
- case 444:
+ case 466:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 445:
+ case 467:
{ zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 446:
+ case 468:
{ (yyval) = (yyvsp[(3) - (3)]); zend_do_fetch_static_member(&(yyval), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 447:
+ case 469:
{ (yyval) = (yyvsp[(3) - (3)]); zend_do_fetch_static_member(&(yyval), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 448:
+ case 470:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (1)]);; }
break;
- case 449:
+ case 471:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 450:
+ case 472:
{ zend_do_begin_variable_parse(TSRMLS_C); (yyvsp[(1) - (1)]).EA = ZEND_PARSED_FUNCTION_CALL; }
break;
- case 451:
+ case 473:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
break;
- case 452:
+ case 474:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 453:
+ case 475:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 454:
+ case 476:
{ zend_do_begin_variable_parse(TSRMLS_C); (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_FUNCTION_CALL; }
break;
- case 455:
+ case 477:
{ (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_VARIABLE; }
break;
- case 456:
+ case 478:
{ zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); (yyval).EA = ZEND_PARSED_VARIABLE; }
break;
- case 457:
+ case 479:
{ (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_STATIC_MEMBER; }
break;
- case 458:
+ case 480:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 459:
+ case 481:
{ fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 460:
+ case 482:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 461:
+ case 483:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 462:
+ case 484:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 463:
+ case 485:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 464:
+ case 486:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 465:
+ case 487:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 466:
+ case 488:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); }
break;
- case 467:
+ case 489:
{ znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (2)]) TSRMLS_CC);}
break;
- case 468:
+ case 490:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 469:
+ case 491:
{ fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 470:
+ case 492:
{ znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (1)]) TSRMLS_CC);}
break;
- case 471:
+ case 493:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 472:
+ case 494:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 473:
+ case 495:
{ Z_LVAL((yyval).u.constant) = 1; }
break;
- case 474:
+ case 496:
{ Z_LVAL((yyval).u.constant)++; }
break;
- case 477:
+ case 499:
{ zend_do_add_list_element(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 478:
+ case 500:
{ zend_do_new_list_begin(TSRMLS_C); }
break;
- case 479:
+ case 501:
{ zend_do_new_list_end(TSRMLS_C); }
break;
- case 480:
+ case 502:
{ zend_do_add_list_element(NULL TSRMLS_CC); }
break;
- case 481:
+ case 503:
{ zend_do_init_array(&(yyval), NULL, NULL, 0 TSRMLS_CC); }
break;
- case 482:
+ case 504:
{ (yyval) = (yyvsp[(1) - (2)]); }
break;
- case 483:
+ case 505:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(3) - (5)]), 0 TSRMLS_CC); }
break;
- case 484:
+ case 506:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(3) - (3)]), NULL, 0 TSRMLS_CC); }
break;
- case 485:
+ case 507:
{ zend_do_init_array(&(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]), 0 TSRMLS_CC); }
break;
- case 486:
+ case 508:
{ zend_do_init_array(&(yyval), &(yyvsp[(1) - (1)]), NULL, 0 TSRMLS_CC); }
break;
- case 487:
+ case 509:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), 1 TSRMLS_CC); }
break;
- case 488:
+ case 510:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(4) - (4)]), NULL, 1 TSRMLS_CC); }
break;
- case 489:
+ case 511:
{ zend_do_init_array(&(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), 1 TSRMLS_CC); }
break;
- case 490:
+ case 512:
{ zend_do_init_array(&(yyval), &(yyvsp[(2) - (2)]), NULL, 1 TSRMLS_CC); }
break;
- case 491:
+ case 513:
{ zend_do_end_variable_parse(&(yyvsp[(2) - (2)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 492:
+ case 514:
{ zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 493:
+ case 515:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), NULL, &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 494:
+ case 516:
{ zend_do_add_string(&(yyval), NULL, &(yyvsp[(1) - (2)]) TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(2) - (2)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 495:
+ case 517:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 496:
+ case 518:
{ zend_do_begin_variable_parse(TSRMLS_C); }
break;
- case 497:
+ case 519:
{ fetch_array_begin(&(yyval), &(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
break;
- case 498:
+ case 520:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyvsp[(2) - (3)]), &(yyvsp[(1) - (3)]), 1 TSRMLS_CC); zend_do_fetch_property(&(yyval), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 499:
+ case 521:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(2) - (3)]), 1 TSRMLS_CC); }
break;
- case 500:
+ case 522:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_array_begin(&(yyval), &(yyvsp[(2) - (6)]), &(yyvsp[(4) - (6)]) TSRMLS_CC); }
break;
- case 501:
+ case 523:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 502:
+ case 524:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 503:
+ case 525:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 504:
+ case 526:
{ fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 505:
+ case 527:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 506:
+ case 528:
{ zend_do_isset_or_isempty(ZEND_ISEMPTY, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 507:
+ case 529:
+
+ { zend_do_unary_op(ZEND_BOOL_NOT, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 530:
{ zend_do_include_or_eval(ZEND_INCLUDE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 508:
+ case 531:
{ zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 509:
+ case 532:
{ zend_do_include_or_eval(ZEND_EVAL, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 510:
+ case 533:
{ zend_do_include_or_eval(ZEND_REQUIRE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 511:
+ case 534:
{ zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 512:
+ case 535:
- { zend_do_isset_or_isempty(ZEND_ISSET, &(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 513:
+ case 536:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 514:
+ case 537:
- { znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &tmp, &(yyvsp[(2) - (4)]) TSRMLS_CC); }
+ { zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 515:
+ case 538:
+
+ { zend_do_isset_or_isempty(ZEND_ISSET, &(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ break;
+
+ case 539:
+
+ { zend_error(E_COMPILE_ERROR, "Cannot use isset() on the result of an expression (you can use \"null !== expression\" instead)"); }
+ break;
+
+ case 540:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_RT, 0 TSRMLS_CC); }
break;
- case 516:
+ case 541:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_RT, 0 TSRMLS_CC); }
break;
-/* Line 1267 of yacc.c. */
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -5812,7 +5971,6 @@ yyreduce:
*++yyvsp = yyval;
-
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -5832,6 +5990,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -5839,37 +6001,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
@@ -5877,7 +6038,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5894,7 +6055,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -5928,7 +6089,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -5951,9 +6112,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
@@ -5978,7 +6136,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -5989,9 +6147,14 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
diff --git a/Zend/zend_language_parser.h b/Zend/zend_language_parser.h
index 152ff00e7..ee3362cff 100644
--- a/Zend/zend_language_parser.h
+++ b/Zend/zend_language_parser.h
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -49,124 +47,126 @@
T_LOGICAL_XOR = 264,
T_LOGICAL_AND = 265,
T_PRINT = 266,
- T_SR_EQUAL = 267,
- T_SL_EQUAL = 268,
- T_XOR_EQUAL = 269,
- T_OR_EQUAL = 270,
- T_AND_EQUAL = 271,
- T_MOD_EQUAL = 272,
- T_CONCAT_EQUAL = 273,
- T_DIV_EQUAL = 274,
- T_MUL_EQUAL = 275,
- T_MINUS_EQUAL = 276,
- T_PLUS_EQUAL = 277,
- T_BOOLEAN_OR = 278,
- T_BOOLEAN_AND = 279,
- T_IS_NOT_IDENTICAL = 280,
- T_IS_IDENTICAL = 281,
- T_IS_NOT_EQUAL = 282,
- T_IS_EQUAL = 283,
- T_IS_GREATER_OR_EQUAL = 284,
- T_IS_SMALLER_OR_EQUAL = 285,
- T_SR = 286,
- T_SL = 287,
- T_INSTANCEOF = 288,
- T_UNSET_CAST = 289,
- T_BOOL_CAST = 290,
- T_OBJECT_CAST = 291,
- T_ARRAY_CAST = 292,
- T_STRING_CAST = 293,
- T_DOUBLE_CAST = 294,
- T_INT_CAST = 295,
- T_DEC = 296,
- T_INC = 297,
- T_CLONE = 298,
- T_NEW = 299,
- T_EXIT = 300,
- T_IF = 301,
- T_ELSEIF = 302,
- T_ELSE = 303,
- T_ENDIF = 304,
- T_LNUMBER = 305,
- T_DNUMBER = 306,
- T_STRING = 307,
- T_STRING_VARNAME = 308,
- T_VARIABLE = 309,
- T_NUM_STRING = 310,
- T_INLINE_HTML = 311,
- T_CHARACTER = 312,
- T_BAD_CHARACTER = 313,
- T_ENCAPSED_AND_WHITESPACE = 314,
- T_CONSTANT_ENCAPSED_STRING = 315,
- T_ECHO = 316,
- T_DO = 317,
- T_WHILE = 318,
- T_ENDWHILE = 319,
- T_FOR = 320,
- T_ENDFOR = 321,
- T_FOREACH = 322,
- T_ENDFOREACH = 323,
- T_DECLARE = 324,
- T_ENDDECLARE = 325,
- T_AS = 326,
- T_SWITCH = 327,
- T_ENDSWITCH = 328,
- T_CASE = 329,
- T_DEFAULT = 330,
- T_BREAK = 331,
- T_CONTINUE = 332,
- T_GOTO = 333,
- T_FUNCTION = 334,
- T_CONST = 335,
- T_RETURN = 336,
- T_TRY = 337,
- T_CATCH = 338,
- T_THROW = 339,
- T_USE = 340,
- T_INSTEADOF = 341,
- T_GLOBAL = 342,
- T_PUBLIC = 343,
- T_PROTECTED = 344,
- T_PRIVATE = 345,
- T_FINAL = 346,
- T_ABSTRACT = 347,
- T_STATIC = 348,
- T_VAR = 349,
- T_UNSET = 350,
- T_ISSET = 351,
- T_EMPTY = 352,
- T_HALT_COMPILER = 353,
- T_CLASS = 354,
- T_TRAIT = 355,
- T_INTERFACE = 356,
- T_EXTENDS = 357,
- T_IMPLEMENTS = 358,
- T_OBJECT_OPERATOR = 359,
- T_DOUBLE_ARROW = 360,
- T_LIST = 361,
- T_ARRAY = 362,
- T_CALLABLE = 363,
- T_CLASS_C = 364,
- T_TRAIT_C = 365,
- T_METHOD_C = 366,
- T_FUNC_C = 367,
- T_LINE = 368,
- T_FILE = 369,
- T_COMMENT = 370,
- T_DOC_COMMENT = 371,
- T_OPEN_TAG = 372,
- T_OPEN_TAG_WITH_ECHO = 373,
- T_CLOSE_TAG = 374,
- T_WHITESPACE = 375,
- T_START_HEREDOC = 376,
- T_END_HEREDOC = 377,
- T_DOLLAR_OPEN_CURLY_BRACES = 378,
- T_CURLY_OPEN = 379,
- T_PAAMAYIM_NEKUDOTAYIM = 380,
- T_NAMESPACE = 381,
- T_NS_C = 382,
- T_DIR = 383,
- T_NS_SEPARATOR = 384
+ T_YIELD = 267,
+ T_SR_EQUAL = 268,
+ T_SL_EQUAL = 269,
+ T_XOR_EQUAL = 270,
+ T_OR_EQUAL = 271,
+ T_AND_EQUAL = 272,
+ T_MOD_EQUAL = 273,
+ T_CONCAT_EQUAL = 274,
+ T_DIV_EQUAL = 275,
+ T_MUL_EQUAL = 276,
+ T_MINUS_EQUAL = 277,
+ T_PLUS_EQUAL = 278,
+ T_BOOLEAN_OR = 279,
+ T_BOOLEAN_AND = 280,
+ T_IS_NOT_IDENTICAL = 281,
+ T_IS_IDENTICAL = 282,
+ T_IS_NOT_EQUAL = 283,
+ T_IS_EQUAL = 284,
+ T_IS_GREATER_OR_EQUAL = 285,
+ T_IS_SMALLER_OR_EQUAL = 286,
+ T_SR = 287,
+ T_SL = 288,
+ T_INSTANCEOF = 289,
+ T_UNSET_CAST = 290,
+ T_BOOL_CAST = 291,
+ T_OBJECT_CAST = 292,
+ T_ARRAY_CAST = 293,
+ T_STRING_CAST = 294,
+ T_DOUBLE_CAST = 295,
+ T_INT_CAST = 296,
+ T_DEC = 297,
+ T_INC = 298,
+ T_CLONE = 299,
+ T_NEW = 300,
+ T_EXIT = 301,
+ T_IF = 302,
+ T_ELSEIF = 303,
+ T_ELSE = 304,
+ T_ENDIF = 305,
+ T_LNUMBER = 306,
+ T_DNUMBER = 307,
+ T_STRING = 308,
+ T_STRING_VARNAME = 309,
+ T_VARIABLE = 310,
+ T_NUM_STRING = 311,
+ T_INLINE_HTML = 312,
+ T_CHARACTER = 313,
+ T_BAD_CHARACTER = 314,
+ T_ENCAPSED_AND_WHITESPACE = 315,
+ T_CONSTANT_ENCAPSED_STRING = 316,
+ T_ECHO = 317,
+ T_DO = 318,
+ T_WHILE = 319,
+ T_ENDWHILE = 320,
+ T_FOR = 321,
+ T_ENDFOR = 322,
+ T_FOREACH = 323,
+ T_ENDFOREACH = 324,
+ T_DECLARE = 325,
+ T_ENDDECLARE = 326,
+ T_AS = 327,
+ T_SWITCH = 328,
+ T_ENDSWITCH = 329,
+ T_CASE = 330,
+ T_DEFAULT = 331,
+ T_BREAK = 332,
+ T_CONTINUE = 333,
+ T_GOTO = 334,
+ T_FUNCTION = 335,
+ T_CONST = 336,
+ T_RETURN = 337,
+ T_TRY = 338,
+ T_CATCH = 339,
+ T_FINALLY = 340,
+ T_THROW = 341,
+ T_USE = 342,
+ T_INSTEADOF = 343,
+ T_GLOBAL = 344,
+ T_PUBLIC = 345,
+ T_PROTECTED = 346,
+ T_PRIVATE = 347,
+ T_FINAL = 348,
+ T_ABSTRACT = 349,
+ T_STATIC = 350,
+ T_VAR = 351,
+ T_UNSET = 352,
+ T_ISSET = 353,
+ T_EMPTY = 354,
+ T_HALT_COMPILER = 355,
+ T_CLASS = 356,
+ T_TRAIT = 357,
+ T_INTERFACE = 358,
+ T_EXTENDS = 359,
+ T_IMPLEMENTS = 360,
+ T_OBJECT_OPERATOR = 361,
+ T_DOUBLE_ARROW = 362,
+ T_LIST = 363,
+ T_ARRAY = 364,
+ T_CALLABLE = 365,
+ T_CLASS_C = 366,
+ T_TRAIT_C = 367,
+ T_METHOD_C = 368,
+ T_FUNC_C = 369,
+ T_LINE = 370,
+ T_FILE = 371,
+ T_COMMENT = 372,
+ T_DOC_COMMENT = 373,
+ T_OPEN_TAG = 374,
+ T_OPEN_TAG_WITH_ECHO = 375,
+ T_CLOSE_TAG = 376,
+ T_WHITESPACE = 377,
+ T_START_HEREDOC = 378,
+ T_END_HEREDOC = 379,
+ T_DOLLAR_OPEN_CURLY_BRACES = 380,
+ T_CURLY_OPEN = 381,
+ T_PAAMAYIM_NEKUDOTAYIM = 382,
+ T_NAMESPACE = 383,
+ T_NS_C = 384,
+ T_DIR = 385,
+ T_NS_SEPARATOR = 386
};
#endif
/* Tokens. */
@@ -180,134 +180,137 @@
#define T_LOGICAL_XOR 264
#define T_LOGICAL_AND 265
#define T_PRINT 266
-#define T_SR_EQUAL 267
-#define T_SL_EQUAL 268
-#define T_XOR_EQUAL 269
-#define T_OR_EQUAL 270
-#define T_AND_EQUAL 271
-#define T_MOD_EQUAL 272
-#define T_CONCAT_EQUAL 273
-#define T_DIV_EQUAL 274
-#define T_MUL_EQUAL 275
-#define T_MINUS_EQUAL 276
-#define T_PLUS_EQUAL 277
-#define T_BOOLEAN_OR 278
-#define T_BOOLEAN_AND 279
-#define T_IS_NOT_IDENTICAL 280
-#define T_IS_IDENTICAL 281
-#define T_IS_NOT_EQUAL 282
-#define T_IS_EQUAL 283
-#define T_IS_GREATER_OR_EQUAL 284
-#define T_IS_SMALLER_OR_EQUAL 285
-#define T_SR 286
-#define T_SL 287
-#define T_INSTANCEOF 288
-#define T_UNSET_CAST 289
-#define T_BOOL_CAST 290
-#define T_OBJECT_CAST 291
-#define T_ARRAY_CAST 292
-#define T_STRING_CAST 293
-#define T_DOUBLE_CAST 294
-#define T_INT_CAST 295
-#define T_DEC 296
-#define T_INC 297
-#define T_CLONE 298
-#define T_NEW 299
-#define T_EXIT 300
-#define T_IF 301
-#define T_ELSEIF 302
-#define T_ELSE 303
-#define T_ENDIF 304
-#define T_LNUMBER 305
-#define T_DNUMBER 306
-#define T_STRING 307
-#define T_STRING_VARNAME 308
-#define T_VARIABLE 309
-#define T_NUM_STRING 310
-#define T_INLINE_HTML 311
-#define T_CHARACTER 312
-#define T_BAD_CHARACTER 313
-#define T_ENCAPSED_AND_WHITESPACE 314
-#define T_CONSTANT_ENCAPSED_STRING 315
-#define T_ECHO 316
-#define T_DO 317
-#define T_WHILE 318
-#define T_ENDWHILE 319
-#define T_FOR 320
-#define T_ENDFOR 321
-#define T_FOREACH 322
-#define T_ENDFOREACH 323
-#define T_DECLARE 324
-#define T_ENDDECLARE 325
-#define T_AS 326
-#define T_SWITCH 327
-#define T_ENDSWITCH 328
-#define T_CASE 329
-#define T_DEFAULT 330
-#define T_BREAK 331
-#define T_CONTINUE 332
-#define T_GOTO 333
-#define T_FUNCTION 334
-#define T_CONST 335
-#define T_RETURN 336
-#define T_TRY 337
-#define T_CATCH 338
-#define T_THROW 339
-#define T_USE 340
-#define T_INSTEADOF 341
-#define T_GLOBAL 342
-#define T_PUBLIC 343
-#define T_PROTECTED 344
-#define T_PRIVATE 345
-#define T_FINAL 346
-#define T_ABSTRACT 347
-#define T_STATIC 348
-#define T_VAR 349
-#define T_UNSET 350
-#define T_ISSET 351
-#define T_EMPTY 352
-#define T_HALT_COMPILER 353
-#define T_CLASS 354
-#define T_TRAIT 355
-#define T_INTERFACE 356
-#define T_EXTENDS 357
-#define T_IMPLEMENTS 358
-#define T_OBJECT_OPERATOR 359
-#define T_DOUBLE_ARROW 360
-#define T_LIST 361
-#define T_ARRAY 362
-#define T_CALLABLE 363
-#define T_CLASS_C 364
-#define T_TRAIT_C 365
-#define T_METHOD_C 366
-#define T_FUNC_C 367
-#define T_LINE 368
-#define T_FILE 369
-#define T_COMMENT 370
-#define T_DOC_COMMENT 371
-#define T_OPEN_TAG 372
-#define T_OPEN_TAG_WITH_ECHO 373
-#define T_CLOSE_TAG 374
-#define T_WHITESPACE 375
-#define T_START_HEREDOC 376
-#define T_END_HEREDOC 377
-#define T_DOLLAR_OPEN_CURLY_BRACES 378
-#define T_CURLY_OPEN 379
-#define T_PAAMAYIM_NEKUDOTAYIM 380
-#define T_NAMESPACE 381
-#define T_NS_C 382
-#define T_DIR 383
-#define T_NS_SEPARATOR 384
+#define T_YIELD 267
+#define T_SR_EQUAL 268
+#define T_SL_EQUAL 269
+#define T_XOR_EQUAL 270
+#define T_OR_EQUAL 271
+#define T_AND_EQUAL 272
+#define T_MOD_EQUAL 273
+#define T_CONCAT_EQUAL 274
+#define T_DIV_EQUAL 275
+#define T_MUL_EQUAL 276
+#define T_MINUS_EQUAL 277
+#define T_PLUS_EQUAL 278
+#define T_BOOLEAN_OR 279
+#define T_BOOLEAN_AND 280
+#define T_IS_NOT_IDENTICAL 281
+#define T_IS_IDENTICAL 282
+#define T_IS_NOT_EQUAL 283
+#define T_IS_EQUAL 284
+#define T_IS_GREATER_OR_EQUAL 285
+#define T_IS_SMALLER_OR_EQUAL 286
+#define T_SR 287
+#define T_SL 288
+#define T_INSTANCEOF 289
+#define T_UNSET_CAST 290
+#define T_BOOL_CAST 291
+#define T_OBJECT_CAST 292
+#define T_ARRAY_CAST 293
+#define T_STRING_CAST 294
+#define T_DOUBLE_CAST 295
+#define T_INT_CAST 296
+#define T_DEC 297
+#define T_INC 298
+#define T_CLONE 299
+#define T_NEW 300
+#define T_EXIT 301
+#define T_IF 302
+#define T_ELSEIF 303
+#define T_ELSE 304
+#define T_ENDIF 305
+#define T_LNUMBER 306
+#define T_DNUMBER 307
+#define T_STRING 308
+#define T_STRING_VARNAME 309
+#define T_VARIABLE 310
+#define T_NUM_STRING 311
+#define T_INLINE_HTML 312
+#define T_CHARACTER 313
+#define T_BAD_CHARACTER 314
+#define T_ENCAPSED_AND_WHITESPACE 315
+#define T_CONSTANT_ENCAPSED_STRING 316
+#define T_ECHO 317
+#define T_DO 318
+#define T_WHILE 319
+#define T_ENDWHILE 320
+#define T_FOR 321
+#define T_ENDFOR 322
+#define T_FOREACH 323
+#define T_ENDFOREACH 324
+#define T_DECLARE 325
+#define T_ENDDECLARE 326
+#define T_AS 327
+#define T_SWITCH 328
+#define T_ENDSWITCH 329
+#define T_CASE 330
+#define T_DEFAULT 331
+#define T_BREAK 332
+#define T_CONTINUE 333
+#define T_GOTO 334
+#define T_FUNCTION 335
+#define T_CONST 336
+#define T_RETURN 337
+#define T_TRY 338
+#define T_CATCH 339
+#define T_FINALLY 340
+#define T_THROW 341
+#define T_USE 342
+#define T_INSTEADOF 343
+#define T_GLOBAL 344
+#define T_PUBLIC 345
+#define T_PROTECTED 346
+#define T_PRIVATE 347
+#define T_FINAL 348
+#define T_ABSTRACT 349
+#define T_STATIC 350
+#define T_VAR 351
+#define T_UNSET 352
+#define T_ISSET 353
+#define T_EMPTY 354
+#define T_HALT_COMPILER 355
+#define T_CLASS 356
+#define T_TRAIT 357
+#define T_INTERFACE 358
+#define T_EXTENDS 359
+#define T_IMPLEMENTS 360
+#define T_OBJECT_OPERATOR 361
+#define T_DOUBLE_ARROW 362
+#define T_LIST 363
+#define T_ARRAY 364
+#define T_CALLABLE 365
+#define T_CLASS_C 366
+#define T_TRAIT_C 367
+#define T_METHOD_C 368
+#define T_FUNC_C 369
+#define T_LINE 370
+#define T_FILE 371
+#define T_COMMENT 372
+#define T_DOC_COMMENT 373
+#define T_OPEN_TAG 374
+#define T_OPEN_TAG_WITH_ECHO 375
+#define T_CLOSE_TAG 376
+#define T_WHITESPACE 377
+#define T_START_HEREDOC 378
+#define T_END_HEREDOC 379
+#define T_DOLLAR_OPEN_CURLY_BRACES 380
+#define T_CURLY_OPEN 381
+#define T_PAAMAYIM_NEKUDOTAYIM 382
+#define T_NAMESPACE 383
+#define T_NS_C 384
+#define T_DIR 385
+#define T_NS_SEPARATOR 386
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
+
diff --git a/Zend/zend_language_parser.output b/Zend/zend_language_parser.output
index a67c1a458..bac71177e 100644
--- a/Zend/zend_language_parser.output
+++ b/Zend/zend_language_parser.output
@@ -1,4 +1,4 @@
-Terminals which are not used
+Terminals unused in grammar
T_CHARACTER
T_BAD_CHARACTER
@@ -10,8 +10,8 @@ Terminals which are not used
"whitespace (T_WHITESPACE)"
-State 216 conflicts: 1 shift/reduce
-State 776 conflicts: 2 shift/reduce
+State 228 conflicts: 1 shift/reduce
+State 669 conflicts: 2 shift/reduce
Grammar
@@ -20,9 +20,9 @@ Grammar
1 start: top_statement_list
- 2 @1: /* empty */
+ 2 $@1: /* empty */
- 3 top_statement_list: top_statement_list @1 top_statement
+ 3 top_statement_list: top_statement_list $@1 top_statement
4 | /* empty */
5 namespace_name: "identifier (T_STRING)"
@@ -34,13 +34,13 @@ Grammar
10 | "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';'
11 | "namespace (T_NAMESPACE)" namespace_name ';'
- 12 @2: /* empty */
+ 12 $@2: /* empty */
- 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 top_statement_list '}'
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' $@2 top_statement_list '}'
- 14 @3: /* empty */
+ 14 $@3: /* empty */
- 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 top_statement_list '}'
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' $@3 top_statement_list '}'
16 | "use (T_USE)" use_declarations ';'
17 | constant_declaration ';'
@@ -55,9 +55,9 @@ Grammar
24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' static_scalar
25 | "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar
- 26 @4: /* empty */
+ 26 $@4: /* empty */
- 27 inner_statement_list: inner_statement_list @4 inner_statement
+ 27 inner_statement_list: inner_statement_list $@4 inner_statement
28 | /* empty */
29 inner_statement: statement
@@ -70,41 +70,41 @@ Grammar
35 unticked_statement: '{' inner_statement_list '}'
- 36 @5: /* empty */
+ 36 $@5: /* empty */
- 37 @6: /* empty */
+ 37 $@6: /* empty */
- 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 elseif_list else_single
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr $@5 statement $@6 elseif_list else_single
- 39 @7: /* empty */
+ 39 $@7: /* empty */
- 40 @8: /* empty */
+ 40 $@8: /* empty */
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- 42 @9: /* empty */
+ 42 $@9: /* empty */
43 @10: /* empty */
- 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' @10 while_statement
+ 44 unticked_statement: "while (T_WHILE)" $@9 parenthesis_expr @10 while_statement
- 45 @11: /* empty */
+ 45 $@11: /* empty */
- 46 @12: /* empty */
+ 46 $@12: /* empty */
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr ')' ';'
+ 47 unticked_statement: "do (T_DO)" $@11 statement "while (T_WHILE)" $@12 parenthesis_expr ';'
- 48 @13: /* empty */
+ 48 $@13: /* empty */
- 49 @14: /* empty */
+ 49 $@14: /* empty */
- 50 @15: /* empty */
+ 50 $@15: /* empty */
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
- 52 @16: /* empty */
+ 52 $@16: /* empty */
- 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' @16 switch_case_list
+ 53 unticked_statement: "switch (T_SWITCH)" parenthesis_expr $@16 switch_case_list
54 | "break (T_BREAK)" ';'
55 | "break (T_BREAK)" expr ';'
56 | "continue (T_CONTINUE)" ';'
@@ -112,1289 +112,1350 @@ Grammar
58 | "return (T_RETURN)" ';'
59 | "return (T_RETURN)" expr_without_variable ';'
60 | "return (T_RETURN)" variable ';'
- 61 | "global (T_GLOBAL)" global_var_list ';'
- 62 | "static (T_STATIC)" static_var_list ';'
- 63 | "echo (T_ECHO)" echo_expr_list ';'
- 64 | T_INLINE_HTML
- 65 | expr ';'
- 66 | "unset (T_UNSET)" '(' unset_variables ')' ';'
+ 61 | yield_expr ';'
+ 62 | "global (T_GLOBAL)" global_var_list ';'
+ 63 | "static (T_STATIC)" static_var_list ';'
+ 64 | "echo (T_ECHO)" echo_expr_list ';'
+ 65 | T_INLINE_HTML
+ 66 | expr ';'
+ 67 | "unset (T_UNSET)" '(' unset_variables ')' ';'
- 67 @17: /* empty */
+ 68 $@17: /* empty */
- 68 @18: /* empty */
+ 69 $@18: /* empty */
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
- 70 @19: /* empty */
+ 71 $@19: /* empty */
- 71 @20: /* empty */
+ 72 $@20: /* empty */
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' $@20 foreach_statement
- 73 @21: /* empty */
+ 74 $@21: /* empty */
- 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list ')' declare_statement
- 75 | ';'
+ 75 unticked_statement: "declare (T_DECLARE)" $@21 '(' declare_list ')' declare_statement
+ 76 | ';'
- 76 @22: /* empty */
+ 77 $@22: /* empty */
- 77 @23: /* empty */
+ 78 $@23: /* empty */
- 78 @24: /* empty */
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' inner_statement_list '}' catch_statement $@23 finally_statement
+ 80 | "throw (T_THROW)" expr ';'
+ 81 | "goto (T_GOTO)" "identifier (T_STRING)" ';'
- 79 @25: /* empty */
+ 82 catch_statement: /* empty */
- 80 @26: /* empty */
+ 83 $@24: /* empty */
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- 82 | "throw (T_THROW)" expr ';'
- 83 | "goto (T_GOTO)" "identifier (T_STRING)" ';'
+ 84 $@25: /* empty */
- 84 additional_catches: non_empty_additional_catches
- 85 | /* empty */
+ 85 $@26: /* empty */
- 86 non_empty_additional_catches: additional_catch
- 87 | non_empty_additional_catches additional_catch
+ 86 $@27: /* empty */
- 88 @27: /* empty */
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
- 89 @28: /* empty */
+ 88 finally_statement: /* empty */
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
+ 89 $@28: /* empty */
- 91 unset_variables: unset_variable
- 92 | unset_variables ',' unset_variable
+ 90 finally_statement: "finally (T_FINALLY)" $@28 '{' inner_statement_list '}'
- 93 unset_variable: variable
+ 91 additional_catches: non_empty_additional_catches
+ 92 | /* empty */
- 94 function_declaration_statement: unticked_function_declaration_statement
+ 93 non_empty_additional_catches: additional_catch
+ 94 | non_empty_additional_catches additional_catch
- 95 class_declaration_statement: unticked_class_declaration_statement
+ 95 @29: /* empty */
- 96 is_reference: /* empty */
- 97 | '&'
+ 96 $@30: /* empty */
- 98 @29: /* empty */
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list '}'
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}'
+ 98 unset_variables: unset_variable
+ 99 | unset_variables ',' unset_variable
- 100 @30: /* empty */
+ 100 unset_variable: variable
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list '}'
+ 101 function_declaration_statement: unticked_function_declaration_statement
- 102 @31: /* empty */
+ 102 class_declaration_statement: unticked_class_declaration_statement
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list '}'
+ 103 is_reference: /* empty */
+ 104 | '&'
- 104 class_entry_type: "class (T_CLASS)"
- 105 | "abstract (T_ABSTRACT)" "class (T_CLASS)"
- 106 | "trait (T_TRAIT)"
- 107 | "final (T_FINAL)" "class (T_CLASS)"
+ 105 $@31: /* empty */
- 108 extends_from: /* empty */
- 109 | "extends (T_EXTENDS)" fully_qualified_class_name
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' parameter_list ')' '{' inner_statement_list '}'
- 110 interface_entry: "interface (T_INTERFACE)"
+ 107 $@32: /* empty */
- 111 interface_extends_list: /* empty */
- 112 | "extends (T_EXTENDS)" interface_list
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from $@32 implements_list '{' class_statement_list '}'
- 113 implements_list: /* empty */
- 114 | "implements (T_IMPLEMENTS)" interface_list
+ 109 $@33: /* empty */
- 115 interface_list: fully_qualified_class_name
- 116 | interface_list ',' fully_qualified_class_name
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" $@33 interface_extends_list '{' class_statement_list '}'
- 117 foreach_optional_arg: /* empty */
- 118 | "=> (T_DOUBLE_ARROW)" foreach_variable
+ 111 class_entry_type: "class (T_CLASS)"
+ 112 | "abstract (T_ABSTRACT)" "class (T_CLASS)"
+ 113 | "trait (T_TRAIT)"
+ 114 | "final (T_FINAL)" "class (T_CLASS)"
- 119 foreach_variable: variable
- 120 | '&' variable
+ 115 extends_from: /* empty */
+ 116 | "extends (T_EXTENDS)" fully_qualified_class_name
- 121 for_statement: statement
- 122 | ':' inner_statement_list "endfor (T_ENDFOR)" ';'
+ 117 interface_entry: "interface (T_INTERFACE)"
- 123 foreach_statement: statement
- 124 | ':' inner_statement_list "endforeach (T_ENDFOREACH)" ';'
+ 118 interface_extends_list: /* empty */
+ 119 | "extends (T_EXTENDS)" interface_list
- 125 declare_statement: statement
- 126 | ':' inner_statement_list "enddeclare (T_ENDDECLARE)" ';'
+ 120 implements_list: /* empty */
+ 121 | "implements (T_IMPLEMENTS)" interface_list
- 127 declare_list: "identifier (T_STRING)" '=' static_scalar
- 128 | declare_list ',' "identifier (T_STRING)" '=' static_scalar
+ 122 interface_list: fully_qualified_class_name
+ 123 | interface_list ',' fully_qualified_class_name
- 129 switch_case_list: '{' case_list '}'
- 130 | '{' ';' case_list '}'
- 131 | ':' case_list "endswitch (T_ENDSWITCH)" ';'
- 132 | ':' ';' case_list "endswitch (T_ENDSWITCH)" ';'
+ 124 foreach_optional_arg: /* empty */
+ 125 | "=> (T_DOUBLE_ARROW)" foreach_variable
- 133 case_list: /* empty */
+ 126 foreach_variable: variable
+ 127 | '&' variable
- 134 @32: /* empty */
+ 128 $@34: /* empty */
- 135 case_list: case_list "case (T_CASE)" expr case_separator @32 inner_statement_list
+ 129 foreach_variable: "list (T_LIST)" '(' $@34 assignment_list ')'
- 136 @33: /* empty */
+ 130 for_statement: statement
+ 131 | ':' inner_statement_list "endfor (T_ENDFOR)" ';'
- 137 case_list: case_list "default (T_DEFAULT)" case_separator @33 inner_statement_list
+ 132 foreach_statement: statement
+ 133 | ':' inner_statement_list "endforeach (T_ENDFOREACH)" ';'
- 138 case_separator: ':'
- 139 | ';'
+ 134 declare_statement: statement
+ 135 | ':' inner_statement_list "enddeclare (T_ENDDECLARE)" ';'
- 140 while_statement: statement
- 141 | ':' inner_statement_list "endwhile (T_ENDWHILE)" ';'
+ 136 declare_list: "identifier (T_STRING)" '=' static_scalar
+ 137 | declare_list ',' "identifier (T_STRING)" '=' static_scalar
- 142 elseif_list: /* empty */
+ 138 switch_case_list: '{' case_list '}'
+ 139 | '{' ';' case_list '}'
+ 140 | ':' case_list "endswitch (T_ENDSWITCH)" ';'
+ 141 | ':' ';' case_list "endswitch (T_ENDSWITCH)" ';'
- 143 @34: /* empty */
+ 142 case_list: /* empty */
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' @34 statement
+ 143 $@35: /* empty */
- 145 new_elseif_list: /* empty */
+ 144 case_list: case_list "case (T_CASE)" expr case_separator $@35 inner_statement_list
- 146 @35: /* empty */
+ 145 $@36: /* empty */
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' @35 inner_statement_list
+ 146 case_list: case_list "default (T_DEFAULT)" case_separator $@36 inner_statement_list
- 148 else_single: /* empty */
- 149 | "else (T_ELSE)" statement
+ 147 case_separator: ':'
+ 148 | ';'
- 150 new_else_single: /* empty */
- 151 | "else (T_ELSE)" ':' inner_statement_list
+ 149 while_statement: statement
+ 150 | ':' inner_statement_list "endwhile (T_ENDWHILE)" ';'
- 152 parameter_list: non_empty_parameter_list
- 153 | /* empty */
+ 151 elseif_list: /* empty */
- 154 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)"
- 155 | optional_class_type '&' "variable (T_VARIABLE)"
- 156 | optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
- 157 | optional_class_type "variable (T_VARIABLE)" '=' static_scalar
- 158 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)"
- 159 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)"
- 160 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
- 161 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar
+ 152 $@37: /* empty */
- 162 optional_class_type: /* empty */
- 163 | "array (T_ARRAY)"
- 164 | "callable (T_CALLABLE)"
- 165 | fully_qualified_class_name
+ 153 elseif_list: elseif_list "elseif (T_ELSEIF)" parenthesis_expr $@37 statement
- 166 function_call_parameter_list: non_empty_function_call_parameter_list
- 167 | /* empty */
+ 154 new_elseif_list: /* empty */
- 168 non_empty_function_call_parameter_list: expr_without_variable
- 169 | variable
- 170 | '&' w_variable
- 171 | non_empty_function_call_parameter_list ',' expr_without_variable
- 172 | non_empty_function_call_parameter_list ',' variable
- 173 | non_empty_function_call_parameter_list ',' '&' w_variable
+ 155 $@38: /* empty */
- 174 global_var_list: global_var_list ',' global_var
- 175 | global_var
+ 156 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" parenthesis_expr ':' $@38 inner_statement_list
- 176 global_var: "variable (T_VARIABLE)"
- 177 | '$' r_variable
- 178 | '$' '{' expr '}'
+ 157 else_single: /* empty */
+ 158 | "else (T_ELSE)" statement
- 179 static_var_list: static_var_list ',' "variable (T_VARIABLE)"
- 180 | static_var_list ',' "variable (T_VARIABLE)" '=' static_scalar
- 181 | "variable (T_VARIABLE)"
- 182 | "variable (T_VARIABLE)" '=' static_scalar
+ 159 new_else_single: /* empty */
+ 160 | "else (T_ELSE)" ':' inner_statement_list
- 183 class_statement_list: class_statement_list class_statement
- 184 | /* empty */
+ 161 parameter_list: non_empty_parameter_list
+ 162 | /* empty */
- 185 @36: /* empty */
+ 163 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)"
+ 164 | optional_class_type '&' "variable (T_VARIABLE)"
+ 165 | optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 166 | optional_class_type "variable (T_VARIABLE)" '=' static_scalar
+ 167 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)"
+ 168 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)"
+ 169 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 170 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar
- 186 class_statement: variable_modifiers @36 class_variable_declaration ';'
- 187 | class_constant_declaration ';'
- 188 | trait_use_statement
+ 171 optional_class_type: /* empty */
+ 172 | "array (T_ARRAY)"
+ 173 | "callable (T_CALLABLE)"
+ 174 | fully_qualified_class_name
- 189 @37: /* empty */
+ 175 function_call_parameter_list: '(' ')'
+ 176 | '(' non_empty_function_call_parameter_list ')'
+ 177 | '(' yield_expr ')'
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
+ 178 non_empty_function_call_parameter_list: expr_without_variable
+ 179 | variable
+ 180 | '&' w_variable
+ 181 | non_empty_function_call_parameter_list ',' expr_without_variable
+ 182 | non_empty_function_call_parameter_list ',' variable
+ 183 | non_empty_function_call_parameter_list ',' '&' w_variable
- 191 trait_use_statement: "use (T_USE)" trait_list trait_adaptations
+ 184 global_var_list: global_var_list ',' global_var
+ 185 | global_var
- 192 trait_list: fully_qualified_class_name
- 193 | trait_list ',' fully_qualified_class_name
+ 186 global_var: "variable (T_VARIABLE)"
+ 187 | '$' r_variable
+ 188 | '$' '{' expr '}'
- 194 trait_adaptations: ';'
- 195 | '{' trait_adaptation_list '}'
+ 189 static_var_list: static_var_list ',' "variable (T_VARIABLE)"
+ 190 | static_var_list ',' "variable (T_VARIABLE)" '=' static_scalar
+ 191 | "variable (T_VARIABLE)"
+ 192 | "variable (T_VARIABLE)" '=' static_scalar
- 196 trait_adaptation_list: /* empty */
- 197 | non_empty_trait_adaptation_list
+ 193 class_statement_list: class_statement_list class_statement
+ 194 | /* empty */
- 198 non_empty_trait_adaptation_list: trait_adaptation_statement
- 199 | non_empty_trait_adaptation_list trait_adaptation_statement
+ 195 $@39: /* empty */
- 200 trait_adaptation_statement: trait_precedence ';'
- 201 | trait_alias ';'
+ 196 class_statement: variable_modifiers $@39 class_variable_declaration ';'
+ 197 | class_constant_declaration ';'
+ 198 | trait_use_statement
- 202 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" trait_reference_list
+ 199 $@40: /* empty */
- 203 trait_reference_list: fully_qualified_class_name
- 204 | trait_reference_list ',' fully_qualified_class_name
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" $@40 '(' parameter_list ')' method_body
- 205 trait_method_reference: "identifier (T_STRING)"
- 206 | trait_method_reference_fully_qualified
+ 201 trait_use_statement: "use (T_USE)" trait_list trait_adaptations
- 207 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 202 trait_list: fully_qualified_class_name
+ 203 | trait_list ',' fully_qualified_class_name
- 208 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers "identifier (T_STRING)"
- 209 | trait_method_reference "as (T_AS)" member_modifier
+ 204 trait_adaptations: ';'
+ 205 | '{' trait_adaptation_list '}'
- 210 trait_modifiers: /* empty */
- 211 | member_modifier
+ 206 trait_adaptation_list: /* empty */
+ 207 | non_empty_trait_adaptation_list
- 212 method_body: ';'
- 213 | '{' inner_statement_list '}'
+ 208 non_empty_trait_adaptation_list: trait_adaptation_statement
+ 209 | non_empty_trait_adaptation_list trait_adaptation_statement
- 214 variable_modifiers: non_empty_member_modifiers
- 215 | "var (T_VAR)"
+ 210 trait_adaptation_statement: trait_precedence ';'
+ 211 | trait_alias ';'
- 216 method_modifiers: /* empty */
- 217 | non_empty_member_modifiers
+ 212 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" trait_reference_list
- 218 non_empty_member_modifiers: member_modifier
- 219 | non_empty_member_modifiers member_modifier
+ 213 trait_reference_list: fully_qualified_class_name
+ 214 | trait_reference_list ',' fully_qualified_class_name
- 220 member_modifier: "public (T_PUBLIC)"
- 221 | "protected (T_PROTECTED)"
- 222 | "private (T_PRIVATE)"
- 223 | "static (T_STATIC)"
- 224 | "abstract (T_ABSTRACT)"
- 225 | "final (T_FINAL)"
+ 215 trait_method_reference: "identifier (T_STRING)"
+ 216 | trait_method_reference_fully_qualified
- 226 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)"
- 227 | class_variable_declaration ',' "variable (T_VARIABLE)" '=' static_scalar
- 228 | "variable (T_VARIABLE)"
- 229 | "variable (T_VARIABLE)" '=' static_scalar
+ 217 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' static_scalar
- 231 | "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar
+ 218 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers "identifier (T_STRING)"
+ 219 | trait_method_reference "as (T_AS)" member_modifier
- 232 echo_expr_list: echo_expr_list ',' expr
- 233 | expr
+ 220 trait_modifiers: /* empty */
+ 221 | member_modifier
- 234 for_expr: /* empty */
- 235 | non_empty_for_expr
+ 222 method_body: ';'
+ 223 | '{' inner_statement_list '}'
- 236 @38: /* empty */
+ 224 variable_modifiers: non_empty_member_modifiers
+ 225 | "var (T_VAR)"
- 237 non_empty_for_expr: non_empty_for_expr ',' @38 expr
- 238 | expr
+ 226 method_modifiers: /* empty */
+ 227 | non_empty_member_modifiers
- 239 chaining_method_or_property: chaining_method_or_property variable_property
- 240 | variable_property
+ 228 non_empty_member_modifiers: member_modifier
+ 229 | non_empty_member_modifiers member_modifier
- 241 chaining_dereference: chaining_dereference '[' dim_offset ']'
- 242 | '[' dim_offset ']'
+ 230 member_modifier: "public (T_PUBLIC)"
+ 231 | "protected (T_PROTECTED)"
+ 232 | "private (T_PRIVATE)"
+ 233 | "static (T_STATIC)"
+ 234 | "abstract (T_ABSTRACT)"
+ 235 | "final (T_FINAL)"
- 243 @39: /* empty */
+ 236 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)"
+ 237 | class_variable_declaration ',' "variable (T_VARIABLE)" '=' static_scalar
+ 238 | "variable (T_VARIABLE)"
+ 239 | "variable (T_VARIABLE)" '=' static_scalar
- 244 chaining_instance_call: chaining_dereference @39 chaining_method_or_property
- 245 | chaining_dereference
- 246 | chaining_method_or_property
+ 240 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' static_scalar
+ 241 | "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar
- 247 instance_call: /* empty */
+ 242 echo_expr_list: echo_expr_list ',' expr
+ 243 | expr
- 248 @40: /* empty */
+ 244 for_expr: /* empty */
+ 245 | non_empty_for_expr
- 249 instance_call: @40 chaining_instance_call
+ 246 $@41: /* empty */
- 250 @41: /* empty */
+ 247 non_empty_for_expr: non_empty_for_expr ',' $@41 expr
+ 248 | expr
- 251 new_expr: "new (T_NEW)" class_name_reference @41 ctor_arguments
+ 249 chaining_method_or_property: chaining_method_or_property variable_property
+ 250 | variable_property
- 252 @42: /* empty */
+ 251 chaining_dereference: chaining_dereference '[' dim_offset ']'
+ 252 | '[' dim_offset ']'
- 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' '=' expr
- 254 | variable '=' expr
- 255 | variable '=' '&' variable
+ 253 $@42: /* empty */
- 256 @43: /* empty */
+ 254 chaining_instance_call: chaining_dereference $@42 chaining_method_or_property
+ 255 | chaining_dereference
+ 256 | chaining_method_or_property
- 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
- 258 | "clone (T_CLONE)" expr
- 259 | variable "+= (T_PLUS_EQUAL)" expr
- 260 | variable "-= (T_MINUS_EQUAL)" expr
- 261 | variable "*= (T_MUL_EQUAL)" expr
- 262 | variable "/= (T_DIV_EQUAL)" expr
- 263 | variable ".= (T_CONCAT_EQUAL)" expr
- 264 | variable "%= (T_MOD_EQUAL)" expr
- 265 | variable "&= (T_AND_EQUAL)" expr
- 266 | variable "|= (T_OR_EQUAL)" expr
- 267 | variable "^= (T_XOR_EQUAL)" expr
- 268 | variable "<<= (T_SL_EQUAL)" expr
- 269 | variable ">>= (T_SR_EQUAL)" expr
- 270 | rw_variable "++ (T_INC)"
- 271 | "++ (T_INC)" rw_variable
- 272 | rw_variable "-- (T_DEC)"
- 273 | "-- (T_DEC)" rw_variable
+ 257 instance_call: /* empty */
- 274 @44: /* empty */
+ 258 $@43: /* empty */
- 275 expr_without_variable: expr "|| (T_BOOLEAN_OR)" @44 expr
+ 259 instance_call: $@43 chaining_instance_call
- 276 @45: /* empty */
+ 260 $@44: /* empty */
- 277 expr_without_variable: expr "&& (T_BOOLEAN_AND)" @45 expr
+ 261 new_expr: "new (T_NEW)" class_name_reference $@44 ctor_arguments
- 278 @46: /* empty */
+ 262 $@45: /* empty */
- 279 expr_without_variable: expr "or (T_LOGICAL_OR)" @46 expr
+ 263 expr_without_variable: "list (T_LIST)" '(' $@45 assignment_list ')' '=' expr
+ 264 | variable '=' expr
+ 265 | variable '=' '&' variable
- 280 @47: /* empty */
+ 266 $@46: /* empty */
- 281 expr_without_variable: expr "and (T_LOGICAL_AND)" @47 expr
- 282 | expr "xor (T_LOGICAL_XOR)" expr
- 283 | expr '|' expr
- 284 | expr '&' expr
- 285 | expr '^' expr
- 286 | expr '.' expr
- 287 | expr '+' expr
- 288 | expr '-' expr
- 289 | expr '*' expr
- 290 | expr '/' expr
- 291 | expr '%' expr
- 292 | expr "<< (T_SL)" expr
- 293 | expr ">> (T_SR)" expr
- 294 | '+' expr
- 295 | '-' expr
- 296 | '!' expr
- 297 | '~' expr
- 298 | expr "=== (T_IS_IDENTICAL)" expr
- 299 | expr "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr "== (T_IS_EQUAL)" expr
- 301 | expr "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr '<' expr
- 303 | expr "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr '>' expr
- 305 | expr ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr "instanceof (T_INSTANCEOF)" class_name_reference
- 307 | '(' expr ')'
- 308 | new_expr
+ 267 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 268 | "clone (T_CLONE)" expr
+ 269 | variable "+= (T_PLUS_EQUAL)" expr
+ 270 | variable "-= (T_MINUS_EQUAL)" expr
+ 271 | variable "*= (T_MUL_EQUAL)" expr
+ 272 | variable "/= (T_DIV_EQUAL)" expr
+ 273 | variable ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable "%= (T_MOD_EQUAL)" expr
+ 275 | variable "&= (T_AND_EQUAL)" expr
+ 276 | variable "|= (T_OR_EQUAL)" expr
+ 277 | variable "^= (T_XOR_EQUAL)" expr
+ 278 | variable "<<= (T_SL_EQUAL)" expr
+ 279 | variable ">>= (T_SR_EQUAL)" expr
+ 280 | rw_variable "++ (T_INC)"
+ 281 | "++ (T_INC)" rw_variable
+ 282 | rw_variable "-- (T_DEC)"
+ 283 | "-- (T_DEC)" rw_variable
- 309 @48: /* empty */
+ 284 $@47: /* empty */
- 310 expr_without_variable: '(' new_expr ')' @48 instance_call
+ 285 expr_without_variable: expr "|| (T_BOOLEAN_OR)" $@47 expr
- 311 @49: /* empty */
+ 286 $@48: /* empty */
- 312 @50: /* empty */
+ 287 expr_without_variable: expr "&& (T_BOOLEAN_AND)" $@48 expr
- 313 expr_without_variable: expr '?' @49 expr ':' @50 expr
+ 288 $@49: /* empty */
- 314 @51: /* empty */
+ 289 expr_without_variable: expr "or (T_LOGICAL_OR)" $@49 expr
- 315 expr_without_variable: expr '?' ':' @51 expr
- 316 | internal_functions_in_yacc
- 317 | "(int) (T_INT_CAST)" expr
- 318 | "(double) (T_DOUBLE_CAST)" expr
- 319 | "(string) (T_STRING_CAST)" expr
- 320 | "(array) (T_ARRAY_CAST)" expr
- 321 | "(object) (T_OBJECT_CAST)" expr
- 322 | "(bool) (T_BOOL_CAST)" expr
- 323 | "(unset) (T_UNSET_CAST)" expr
- 324 | "exit (T_EXIT)" exit_expr
+ 290 $@50: /* empty */
- 325 @52: /* empty */
+ 291 expr_without_variable: expr "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr "xor (T_LOGICAL_XOR)" expr
+ 293 | expr '|' expr
+ 294 | expr '&' expr
+ 295 | expr '^' expr
+ 296 | expr '.' expr
+ 297 | expr '+' expr
+ 298 | expr '-' expr
+ 299 | expr '*' expr
+ 300 | expr '/' expr
+ 301 | expr '%' expr
+ 302 | expr "<< (T_SL)" expr
+ 303 | expr ">> (T_SR)" expr
+ 304 | '+' expr
+ 305 | '-' expr
+ 306 | '!' expr
+ 307 | '~' expr
+ 308 | expr "=== (T_IS_IDENTICAL)" expr
+ 309 | expr "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr "== (T_IS_EQUAL)" expr
+ 311 | expr "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr '<' expr
+ 313 | expr "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr '>' expr
+ 315 | expr ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr "instanceof (T_INSTANCEOF)" class_name_reference
+ 317 | parenthesis_expr
+ 318 | new_expr
- 326 expr_without_variable: '@' @52 expr
- 327 | scalar
- 328 | "array (T_ARRAY)" '(' array_pair_list ')'
- 329 | '[' array_pair_list ']'
- 330 | '`' backticks_expr '`'
- 331 | "print (T_PRINT)" expr
+ 319 @51: /* empty */
- 332 @53: /* empty */
+ 320 expr_without_variable: '(' new_expr ')' @51 instance_call
- 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 321 $@52: /* empty */
- 334 @54: /* empty */
+ 322 $@53: /* empty */
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 323 expr_without_variable: expr '?' $@52 expr ':' $@53 expr
- 336 function: "function (T_FUNCTION)"
+ 324 $@54: /* empty */
- 337 lexical_vars: /* empty */
- 338 | "use (T_USE)" '(' lexical_var_list ')'
+ 325 expr_without_variable: expr '?' ':' $@54 expr
+ 326 | internal_functions_in_yacc
+ 327 | "(int) (T_INT_CAST)" expr
+ 328 | "(double) (T_DOUBLE_CAST)" expr
+ 329 | "(string) (T_STRING_CAST)" expr
+ 330 | "(array) (T_ARRAY_CAST)" expr
+ 331 | "(object) (T_OBJECT_CAST)" expr
+ 332 | "(bool) (T_BOOL_CAST)" expr
+ 333 | "(unset) (T_UNSET_CAST)" expr
+ 334 | "exit (T_EXIT)" exit_expr
- 339 lexical_var_list: lexical_var_list ',' "variable (T_VARIABLE)"
- 340 | lexical_var_list ',' '&' "variable (T_VARIABLE)"
- 341 | "variable (T_VARIABLE)"
- 342 | '&' "variable (T_VARIABLE)"
+ 335 $@55: /* empty */
- 343 @55: /* empty */
+ 336 expr_without_variable: '@' $@55 expr
+ 337 | scalar
+ 338 | combined_scalar_offset
+ 339 | combined_scalar
+ 340 | '`' backticks_expr '`'
+ 341 | "print (T_PRINT)" expr
+ 342 | "yield (T_YIELD)"
- 344 function_call: namespace_name '(' @55 function_call_parameter_list ')'
+ 343 @56: /* empty */
- 345 @56: /* empty */
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
+ 345 @57: /* empty */
- 347 @57: /* empty */
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 function_call_parameter_list ')'
+ 347 yield_expr: "yield (T_YIELD)" expr_without_variable
+ 348 | "yield (T_YIELD)" variable
+ 349 | "yield (T_YIELD)" expr "=> (T_DOUBLE_ARROW)" expr_without_variable
+ 350 | "yield (T_YIELD)" expr "=> (T_DOUBLE_ARROW)" variable
- 349 @58: /* empty */
+ 351 combined_scalar_offset: combined_scalar '[' dim_offset ']'
+ 352 | combined_scalar_offset '[' dim_offset ']'
+ 353 | "quoted-string (T_CONSTANT_ENCAPSED_STRING)" '[' dim_offset ']'
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')'
+ 354 combined_scalar: "array (T_ARRAY)" '(' array_pair_list ')'
+ 355 | '[' array_pair_list ']'
- 351 @59: /* empty */
+ 356 function: "function (T_FUNCTION)"
- 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')'
+ 357 lexical_vars: /* empty */
+ 358 | "use (T_USE)" '(' lexical_var_list ')'
- 353 @60: /* empty */
+ 359 lexical_var_list: lexical_var_list ',' "variable (T_VARIABLE)"
+ 360 | lexical_var_list ',' '&' "variable (T_VARIABLE)"
+ 361 | "variable (T_VARIABLE)"
+ 362 | '&' "variable (T_VARIABLE)"
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')'
+ 363 @58: /* empty */
- 355 @61: /* empty */
+ 364 function_call: namespace_name @58 function_call_parameter_list
- 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')'
+ 365 @59: /* empty */
- 357 @62: /* empty */
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name @59 function_call_parameter_list
- 358 function_call: variable_without_objects '(' @62 function_call_parameter_list ')'
+ 367 @60: /* empty */
- 359 class_name: "static (T_STATIC)"
- 360 | namespace_name
- 361 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
- 362 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 368 function_call: "\\ (T_NS_SEPARATOR)" namespace_name @60 function_call_parameter_list
- 363 fully_qualified_class_name: namespace_name
- 364 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
- 365 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 369 @61: /* empty */
- 366 class_name_reference: class_name
- 367 | dynamic_class_name_reference
+ 370 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name @61 function_call_parameter_list
- 368 @63: /* empty */
+ 371 $@62: /* empty */
- 369 @64: /* empty */
+ 372 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@62 function_call_parameter_list
- 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property @64 dynamic_class_name_variable_properties
- 371 | base_variable
+ 373 $@63: /* empty */
- 372 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property
- 373 | /* empty */
+ 374 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name $@63 function_call_parameter_list
- 374 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" object_property
+ 375 $@64: /* empty */
- 375 exit_expr: /* empty */
- 376 | '(' ')'
- 377 | '(' expr ')'
+ 376 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@64 function_call_parameter_list
- 378 backticks_expr: /* empty */
- 379 | "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- 380 | encaps_list
+ 377 $@65: /* empty */
- 381 ctor_arguments: /* empty */
- 382 | '(' function_call_parameter_list ')'
+ 378 function_call: variable_without_objects $@65 function_call_parameter_list
- 383 common_scalar: "integer number (T_LNUMBER)"
- 384 | "floating-point number (T_DNUMBER)"
- 385 | "quoted-string (T_CONSTANT_ENCAPSED_STRING)"
- 386 | "__LINE__ (T_LINE)"
- 387 | "__FILE__ (T_FILE)"
- 388 | "__DIR__ (T_DIR)"
- 389 | "__TRAIT__ (T_TRAIT_C)"
- 390 | "__METHOD__ (T_METHOD_C)"
- 391 | "__FUNCTION__ (T_FUNC_C)"
- 392 | "__NAMESPACE__ (T_NS_C)"
- 393 | "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
- 394 | "heredoc start (T_START_HEREDOC)" "heredoc end (T_END_HEREDOC)"
+ 379 class_name: "static (T_STATIC)"
+ 380 | namespace_name
+ 381 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 382 | "\\ (T_NS_SEPARATOR)" namespace_name
- 395 static_scalar: common_scalar
- 396 | namespace_name
- 397 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
- 398 | "\\ (T_NS_SEPARATOR)" namespace_name
- 399 | '+' static_scalar
- 400 | '-' static_scalar
- 401 | "array (T_ARRAY)" '(' static_array_pair_list ')'
- 402 | '[' static_array_pair_list ']'
- 403 | static_class_constant
- 404 | "__CLASS__ (T_CLASS_C)"
+ 383 fully_qualified_class_name: namespace_name
+ 384 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 385 | "\\ (T_NS_SEPARATOR)" namespace_name
- 405 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 386 class_name_reference: class_name
+ 387 | dynamic_class_name_reference
- 406 scalar: "variable name (T_STRING_VARNAME)"
- 407 | class_constant
- 408 | namespace_name
- 409 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
- 410 | "\\ (T_NS_SEPARATOR)" namespace_name
- 411 | common_scalar
- 412 | '"' encaps_list '"'
- 413 | "heredoc start (T_START_HEREDOC)" encaps_list "heredoc end (T_END_HEREDOC)"
- 414 | "__CLASS__ (T_CLASS_C)"
+ 388 $@66: /* empty */
- 415 static_array_pair_list: /* empty */
- 416 | non_empty_static_array_pair_list possible_comma
+ 389 $@67: /* empty */
- 417 possible_comma: /* empty */
- 418 | ','
+ 390 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" $@66 object_property $@67 dynamic_class_name_variable_properties
+ 391 | base_variable
- 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
- 420 | non_empty_static_array_pair_list ',' static_scalar
- 421 | static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
- 422 | static_scalar
+ 392 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property
+ 393 | /* empty */
- 423 expr: r_variable
- 424 | expr_without_variable
+ 394 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" object_property
- 425 r_variable: variable
+ 395 exit_expr: /* empty */
+ 396 | '(' ')'
+ 397 | parenthesis_expr
- 426 w_variable: variable
+ 398 backticks_expr: /* empty */
+ 399 | "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 400 | encaps_list
- 427 rw_variable: variable
+ 401 ctor_arguments: /* empty */
+ 402 | function_call_parameter_list
- 428 @65: /* empty */
+ 403 common_scalar: "integer number (T_LNUMBER)"
+ 404 | "floating-point number (T_DNUMBER)"
+ 405 | "quoted-string (T_CONSTANT_ENCAPSED_STRING)"
+ 406 | "__LINE__ (T_LINE)"
+ 407 | "__FILE__ (T_FILE)"
+ 408 | "__DIR__ (T_DIR)"
+ 409 | "__TRAIT__ (T_TRAIT_C)"
+ 410 | "__METHOD__ (T_METHOD_C)"
+ 411 | "__FUNCTION__ (T_FUNC_C)"
+ 412 | "__NAMESPACE__ (T_NS_C)"
+ 413 | "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
+ 414 | "heredoc start (T_START_HEREDOC)" "heredoc end (T_END_HEREDOC)"
- 429 @66: /* empty */
+ 415 static_scalar: common_scalar
+ 416 | namespace_name
+ 417 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 418 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 419 | '+' static_scalar
+ 420 | '-' static_scalar
+ 421 | "array (T_ARRAY)" '(' static_array_pair_list ')'
+ 422 | '[' static_array_pair_list ']'
+ 423 | static_class_constant
+ 424 | "__CLASS__ (T_CLASS_C)"
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not variable_properties
- 431 | base_variable_with_function_calls
+ 425 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- 432 variable_properties: variable_properties variable_property
- 433 | /* empty */
+ 426 scalar: "variable name (T_STRING_VARNAME)"
+ 427 | class_constant
+ 428 | namespace_name
+ 429 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 430 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 431 | common_scalar
+ 432 | '"' encaps_list '"'
+ 433 | "heredoc start (T_START_HEREDOC)" encaps_list "heredoc end (T_END_HEREDOC)"
+ 434 | "__CLASS__ (T_CLASS_C)"
- 434 @67: /* empty */
+ 435 static_array_pair_list: /* empty */
+ 436 | non_empty_static_array_pair_list possible_comma
- 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property @67 method_or_not
+ 437 possible_comma: /* empty */
+ 438 | ','
- 436 array_method_dereference: array_method_dereference '[' dim_offset ']'
- 437 | method '[' dim_offset ']'
+ 439 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 440 | non_empty_static_array_pair_list ',' static_scalar
+ 441 | static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 442 | static_scalar
- 438 @68: /* empty */
+ 443 expr: r_variable
+ 444 | expr_without_variable
- 439 method: '(' @68 function_call_parameter_list ')'
+ 445 parenthesis_expr: '(' expr ')'
+ 446 | '(' yield_expr ')'
- 440 method_or_not: method
- 441 | array_method_dereference
- 442 | /* empty */
+ 447 r_variable: variable
- 443 variable_without_objects: reference_variable
- 444 | simple_indirect_reference reference_variable
+ 448 w_variable: variable
- 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- 446 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 449 rw_variable: variable
- 447 variable_class_name: reference_variable
+ 450 $@68: /* empty */
- 448 array_function_dereference: array_function_dereference '[' dim_offset ']'
+ 451 $@69: /* empty */
- 449 @69: /* empty */
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" $@68 object_property $@69 method_or_not variable_properties
+ 453 | base_variable_with_function_calls
- 450 array_function_dereference: function_call @69 '[' dim_offset ']'
+ 454 variable_properties: variable_properties variable_property
+ 455 | /* empty */
- 451 base_variable_with_function_calls: base_variable
- 452 | array_function_dereference
- 453 | function_call
+ 456 $@70: /* empty */
- 454 base_variable: reference_variable
- 455 | simple_indirect_reference reference_variable
- 456 | static_member
+ 457 variable_property: "-> (T_OBJECT_OPERATOR)" object_property $@70 method_or_not
- 457 reference_variable: reference_variable '[' dim_offset ']'
- 458 | reference_variable '{' expr '}'
- 459 | compound_variable
+ 458 array_method_dereference: array_method_dereference '[' dim_offset ']'
+ 459 | method '[' dim_offset ']'
- 460 compound_variable: "variable (T_VARIABLE)"
- 461 | '$' '{' expr '}'
+ 460 @71: /* empty */
- 462 dim_offset: /* empty */
- 463 | expr
+ 461 method: @71 function_call_parameter_list
- 464 object_property: object_dim_list
+ 462 method_or_not: method
+ 463 | array_method_dereference
+ 464 | /* empty */
- 465 @70: /* empty */
+ 465 variable_without_objects: reference_variable
+ 466 | simple_indirect_reference reference_variable
- 466 object_property: variable_without_objects @70
+ 467 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 468 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- 467 object_dim_list: object_dim_list '[' dim_offset ']'
- 468 | object_dim_list '{' expr '}'
- 469 | variable_name
+ 469 variable_class_name: reference_variable
- 470 variable_name: "identifier (T_STRING)"
- 471 | '{' expr '}'
+ 470 array_function_dereference: array_function_dereference '[' dim_offset ']'
- 472 simple_indirect_reference: '$'
- 473 | simple_indirect_reference '$'
+ 471 $@72: /* empty */
- 474 assignment_list: assignment_list ',' assignment_list_element
- 475 | assignment_list_element
+ 472 array_function_dereference: function_call $@72 '[' dim_offset ']'
- 476 assignment_list_element: variable
+ 473 base_variable_with_function_calls: base_variable
+ 474 | array_function_dereference
+ 475 | function_call
- 477 @71: /* empty */
+ 476 base_variable: reference_variable
+ 477 | simple_indirect_reference reference_variable
+ 478 | static_member
- 478 assignment_list_element: "list (T_LIST)" '(' @71 assignment_list ')'
- 479 | /* empty */
+ 479 reference_variable: reference_variable '[' dim_offset ']'
+ 480 | reference_variable '{' expr '}'
+ 481 | compound_variable
- 480 array_pair_list: /* empty */
- 481 | non_empty_array_pair_list possible_comma
+ 482 compound_variable: "variable (T_VARIABLE)"
+ 483 | '$' '{' expr '}'
- 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" expr
- 483 | non_empty_array_pair_list ',' expr
- 484 | expr "=> (T_DOUBLE_ARROW)" expr
- 485 | expr
- 486 | non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable
- 487 | non_empty_array_pair_list ',' '&' w_variable
- 488 | expr "=> (T_DOUBLE_ARROW)" '&' w_variable
- 489 | '&' w_variable
+ 484 dim_offset: /* empty */
+ 485 | expr
- 490 encaps_list: encaps_list encaps_var
- 491 | encaps_list "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- 492 | encaps_var
- 493 | "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" encaps_var
+ 486 object_property: object_dim_list
- 494 encaps_var: "variable (T_VARIABLE)"
+ 487 $@73: /* empty */
- 495 @72: /* empty */
+ 488 object_property: variable_without_objects $@73
- 496 encaps_var: "variable (T_VARIABLE)" '[' @72 encaps_var_offset ']'
- 497 | "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)"
- 498 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr '}'
- 499 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' '}'
- 500 | "{$ (T_CURLY_OPEN)" variable '}'
+ 489 object_dim_list: object_dim_list '[' dim_offset ']'
+ 490 | object_dim_list '{' expr '}'
+ 491 | variable_name
- 501 encaps_var_offset: "identifier (T_STRING)"
- 502 | "number (T_NUM_STRING)"
- 503 | "variable (T_VARIABLE)"
+ 492 variable_name: "identifier (T_STRING)"
+ 493 | '{' expr '}'
- 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables ')'
- 505 | "empty (T_EMPTY)" '(' variable ')'
- 506 | "include (T_INCLUDE)" expr
- 507 | "include_once (T_INCLUDE_ONCE)" expr
- 508 | "eval (T_EVAL)" '(' expr ')'
- 509 | "require (T_REQUIRE)" expr
- 510 | "require_once (T_REQUIRE_ONCE)" expr
+ 494 simple_indirect_reference: '$'
+ 495 | simple_indirect_reference '$'
- 511 isset_variables: variable
+ 496 assignment_list: assignment_list ',' assignment_list_element
+ 497 | assignment_list_element
- 512 @73: /* empty */
+ 498 assignment_list_element: variable
- 513 isset_variables: isset_variables ',' @73 variable
+ 499 $@74: /* empty */
- 514 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- 515 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 500 assignment_list_element: "list (T_LIST)" '(' $@74 assignment_list ')'
+ 501 | /* empty */
+
+ 502 array_pair_list: /* empty */
+ 503 | non_empty_array_pair_list possible_comma
+
+ 504 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" expr
+ 505 | non_empty_array_pair_list ',' expr
+ 506 | expr "=> (T_DOUBLE_ARROW)" expr
+ 507 | expr
+ 508 | non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 509 | non_empty_array_pair_list ',' '&' w_variable
+ 510 | expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 511 | '&' w_variable
+
+ 512 encaps_list: encaps_list encaps_var
+ 513 | encaps_list "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 514 | encaps_var
+ 515 | "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" encaps_var
+
+ 516 encaps_var: "variable (T_VARIABLE)"
+
+ 517 $@75: /* empty */
+
+ 518 encaps_var: "variable (T_VARIABLE)" '[' $@75 encaps_var_offset ']'
+ 519 | "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)"
+ 520 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr '}'
+ 521 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' '}'
+ 522 | "{$ (T_CURLY_OPEN)" variable '}'
+
+ 523 encaps_var_offset: "identifier (T_STRING)"
+ 524 | "number (T_NUM_STRING)"
+ 525 | "variable (T_VARIABLE)"
+
+ 526 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables ')'
+ 527 | "empty (T_EMPTY)" '(' variable ')'
+ 528 | "empty (T_EMPTY)" '(' expr_without_variable ')'
+ 529 | "include (T_INCLUDE)" expr
+ 530 | "include_once (T_INCLUDE_ONCE)" expr
+ 531 | "eval (T_EVAL)" '(' expr ')'
+ 532 | "require (T_REQUIRE)" expr
+ 533 | "require_once (T_REQUIRE_ONCE)" expr
+
+ 534 isset_variables: isset_variable
+
+ 535 $@76: /* empty */
+
+ 536 isset_variables: isset_variables ',' $@76 isset_variable
+
+ 537 isset_variable: variable
+ 538 | expr_without_variable
+
+ 539 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 540 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
Terminals, with rules where they appear
"end of file" (0) 0
-'!' (33) 296
-'"' (34) 412
-'$' (36) 177 178 461 472 473
-'%' (37) 291
-'&' (38) 97 120 155 156 159 160 170 173 255 257 284 340 342 486 487
- 488 489
-'(' (40) 10 32 38 41 44 47 51 53 66 69 72 74 81 90 99 144 147 190 253
- 307 310 328 333 335 338 344 346 348 350 352 354 356 358 376 377
- 382 401 439 478 504 505 508
-')' (41) 10 32 38 41 44 47 51 53 66 69 72 74 81 90 99 144 147 190 253
- 307 310 328 333 335 338 344 346 348 350 352 354 356 358 376 377
- 382 401 439 478 504 505 508
-'*' (42) 289
-'+' (43) 287 294 399
-',' (44) 18 24 92 116 128 158 159 160 161 171 172 173 174 179 180 193
- 204 226 227 230 232 237 339 340 418 419 420 474 482 483 486 487
- 513
-'-' (45) 288 295 400
-'.' (46) 286
-'/' (47) 290
-':' (58) 34 41 122 124 126 131 132 138 141 147 151 313 315
-';' (59) 10 11 16 17 32 41 47 51 54 55 56 57 58 59 60 61 62 63 65 66
- 75 82 83 122 124 126 130 131 132 139 141 186 187 194 200 201 212
-'<' (60) 302
-'=' (61) 24 25 127 128 156 157 160 161 180 182 227 229 230 231 253
- 254 255 257
-'>' (62) 304
-'?' (63) 313 315
-'@' (64) 326
-'[' (91) 241 242 329 402 436 437 448 450 457 467 496 499
-']' (93) 241 242 329 402 436 437 448 450 457 467 496 499
-'^' (94) 285
-'`' (96) 330
-'{' (123) 13 15 35 81 90 99 101 103 129 130 178 195 213 333 335 458
- 461 468 471
-'|' (124) 283
-'}' (125) 13 15 35 81 90 99 101 103 129 130 178 195 213 333 335 458
- 461 468 471 498 499 500
-'~' (126) 297
+'!' (33) 306
+'"' (34) 432
+'$' (36) 187 188 483 494 495
+'%' (37) 301
+'&' (38) 104 127 164 165 168 169 180 183 265 267 294 360 362 508 509
+ 510 511
+'(' (40) 10 32 51 67 70 73 75 87 97 106 129 175 176 177 200 263 320
+ 344 346 354 358 396 421 445 446 500 526 527 528 531
+')' (41) 10 32 51 67 70 73 75 87 97 106 129 175 176 177 200 263 320
+ 344 346 354 358 396 421 445 446 500 526 527 528 531
+'*' (42) 299
+'+' (43) 297 304 419
+',' (44) 18 24 99 123 137 167 168 169 170 181 182 183 184 189 190 203
+ 214 236 237 240 242 247 359 360 438 439 440 496 504 505 508 509
+ 536
+'-' (45) 298 305 420
+'.' (46) 296
+'/' (47) 300
+':' (58) 34 41 131 133 135 140 141 147 150 156 160 323 325
+';' (59) 10 11 16 17 32 41 47 51 54 55 56 57 58 59 60 61 62 63 64 66
+ 67 76 80 81 131 133 135 139 140 141 148 150 196 197 204 210 211
+ 222
+'<' (60) 312
+'=' (61) 24 25 136 137 165 166 169 170 190 192 237 239 240 241 263
+ 264 265 267
+'>' (62) 314
+'?' (63) 323 325
+'@' (64) 336
+'[' (91) 251 252 351 352 353 355 422 458 459 470 472 479 489 518 521
+']' (93) 251 252 351 352 353 355 422 458 459 470 472 479 489 518 521
+'^' (94) 295
+'`' (96) 340
+'{' (123) 13 15 35 79 87 90 97 106 108 110 138 139 188 205 223 344
+ 346 480 483 490 493
+'|' (124) 293
+'}' (125) 13 15 35 79 87 90 97 106 108 110 138 139 188 205 223 344
+ 346 480 483 490 493 520 521 522
+'~' (126) 307
error (256)
-"require_once (T_REQUIRE_ONCE)" (258) 510
-"require (T_REQUIRE)" (259) 509
-"eval (T_EVAL)" (260) 508
-"include_once (T_INCLUDE_ONCE)" (261) 507
-"include (T_INCLUDE)" (262) 506
-"or (T_LOGICAL_OR)" (263) 279
-"xor (T_LOGICAL_XOR)" (264) 282
-"and (T_LOGICAL_AND)" (265) 281
-"print (T_PRINT)" (266) 331
-">>= (T_SR_EQUAL)" (267) 269
-"<<= (T_SL_EQUAL)" (268) 268
-"^= (T_XOR_EQUAL)" (269) 267
-"|= (T_OR_EQUAL)" (270) 266
-"&= (T_AND_EQUAL)" (271) 265
-"%= (T_MOD_EQUAL)" (272) 264
-".= (T_CONCAT_EQUAL)" (273) 263
-"/= (T_DIV_EQUAL)" (274) 262
-"*= (T_MUL_EQUAL)" (275) 261
-"-= (T_MINUS_EQUAL)" (276) 260
-"+= (T_PLUS_EQUAL)" (277) 259
-"|| (T_BOOLEAN_OR)" (278) 275
-"&& (T_BOOLEAN_AND)" (279) 277
-"!== (T_IS_NOT_IDENTICAL)" (280) 299
-"=== (T_IS_IDENTICAL)" (281) 298
-"!= (T_IS_NOT_EQUAL)" (282) 301
-"== (T_IS_EQUAL)" (283) 300
-">= (T_IS_GREATER_OR_EQUAL)" (284) 305
-"<= (T_IS_SMALLER_OR_EQUAL)" (285) 303
-">> (T_SR)" (286) 293
-"<< (T_SL)" (287) 292
-"instanceof (T_INSTANCEOF)" (288) 306
-"(unset) (T_UNSET_CAST)" (289) 323
-"(bool) (T_BOOL_CAST)" (290) 322
-"(object) (T_OBJECT_CAST)" (291) 321
-"(array) (T_ARRAY_CAST)" (292) 320
-"(string) (T_STRING_CAST)" (293) 319
-"(double) (T_DOUBLE_CAST)" (294) 318
-"(int) (T_INT_CAST)" (295) 317
-"-- (T_DEC)" (296) 272 273
-"++ (T_INC)" (297) 270 271
-"clone (T_CLONE)" (298) 258
-"new (T_NEW)" (299) 251 257
-"exit (T_EXIT)" (300) 324
-"if (T_IF)" (301) 38 41
-"elseif (T_ELSEIF)" (302) 144 147
-"else (T_ELSE)" (303) 149 151
-"endif (T_ENDIF)" (304) 41
-"integer number (T_LNUMBER)" (305) 383
-"floating-point number (T_DNUMBER)" (306) 384
-"identifier (T_STRING)" (307) 5 6 21 23 24 25 34 83 99 101 103 127
- 128 190 205 207 208 230 231 405 470 497 501 514 515
-"variable name (T_STRING_VARNAME)" (308) 406 499
-"variable (T_VARIABLE)" (309) 81 90 154 155 156 157 158 159 160 161
- 176 179 180 181 182 226 227 228 229 339 340 341 342 460 494 496
- 497 503
-"number (T_NUM_STRING)" (310) 502
-T_INLINE_HTML (311) 64
-T_CHARACTER (312)
-T_BAD_CHARACTER (313)
-"quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- (314) 379 393 491 493
-"quoted-string (T_CONSTANT_ENCAPSED_STRING)" (315) 385
-"echo (T_ECHO)" (316) 63
-"do (T_DO)" (317) 47
-"while (T_WHILE)" (318) 44 47
-"endwhile (T_ENDWHILE)" (319) 141
-"for (T_FOR)" (320) 51
-"endfor (T_ENDFOR)" (321) 122
-"foreach (T_FOREACH)" (322) 69 72
-"endforeach (T_ENDFOREACH)" (323) 124
-"declare (T_DECLARE)" (324) 74
-"enddeclare (T_ENDDECLARE)" (325) 126
-"as (T_AS)" (326) 21 23 69 72 208 209
-"switch (T_SWITCH)" (327) 53
-"endswitch (T_ENDSWITCH)" (328) 131 132
-"case (T_CASE)" (329) 135
-"default (T_DEFAULT)" (330) 137
-"break (T_BREAK)" (331) 54 55
-"continue (T_CONTINUE)" (332) 56 57
-"goto (T_GOTO)" (333) 83
-"function (T_FUNCTION)" (334) 336
-"const (T_CONST)" (335) 25 231
-"return (T_RETURN)" (336) 58 59 60
-"try (T_TRY)" (337) 81
-"catch (T_CATCH)" (338) 81 90
-"throw (T_THROW)" (339) 82
-"use (T_USE)" (340) 16 191 338
-"insteadof (T_INSTEADOF)" (341) 202
-"global (T_GLOBAL)" (342) 61
-"public (T_PUBLIC)" (343) 220
-"protected (T_PROTECTED)" (344) 221
-"private (T_PRIVATE)" (345) 222
-"final (T_FINAL)" (346) 107 225
-"abstract (T_ABSTRACT)" (347) 105 224
-"static (T_STATIC)" (348) 62 223 335 359
-"var (T_VAR)" (349) 215
-"unset (T_UNSET)" (350) 66
-"isset (T_ISSET)" (351) 504
-"empty (T_EMPTY)" (352) 505
-"__halt_compiler (T_HALT_COMPILER)" (353) 10 32
-"class (T_CLASS)" (354) 104 105 107
-"trait (T_TRAIT)" (355) 106
-"interface (T_INTERFACE)" (356) 110
-"extends (T_EXTENDS)" (357) 109 112
-"implements (T_IMPLEMENTS)" (358) 114
-"-> (T_OBJECT_OPERATOR)" (359) 370 374 430 435 497
-"=> (T_DOUBLE_ARROW)" (360) 118 419 421 482 484 486 488
-"list (T_LIST)" (361) 253 478
-"array (T_ARRAY)" (362) 163 328 401
-"callable (T_CALLABLE)" (363) 164
-"__CLASS__ (T_CLASS_C)" (364) 404 414
-"__TRAIT__ (T_TRAIT_C)" (365) 389
-"__METHOD__ (T_METHOD_C)" (366) 390
-"__FUNCTION__ (T_FUNC_C)" (367) 391
-"__LINE__ (T_LINE)" (368) 386
-"__FILE__ (T_FILE)" (369) 387
-"comment (T_COMMENT)" (370)
-"doc comment (T_DOC_COMMENT)" (371)
-"open tag (T_OPEN_TAG)" (372)
-"open tag with echo (T_OPEN_TAG_WITH_ECHO)" (373)
-"close tag (T_CLOSE_TAG)" (374)
-"whitespace (T_WHITESPACE)" (375)
-"heredoc start (T_START_HEREDOC)" (376) 393 394 413
-"heredoc end (T_END_HEREDOC)" (377) 393 394 413
-"${ (T_DOLLAR_OPEN_CURLY_BRACES)" (378) 498 499
-"{$ (T_CURLY_OPEN)" (379) 500
-":: (T_PAAMAYIM_NEKUDOTAYIM)" (380) 207 350 352 354 356 405 445 446
- 514 515
-"namespace (T_NAMESPACE)" (381) 11 13 15 346 361 364 397 409
-"__NAMESPACE__ (T_NS_C)" (382) 392
-"__DIR__ (T_DIR)" (383) 388
-"\\ (T_NS_SEPARATOR)" (384) 6 22 23 346 348 361 362 364 365 397 398
- 409 410
+"require_once (T_REQUIRE_ONCE)" (258) 533
+"require (T_REQUIRE)" (259) 532
+"eval (T_EVAL)" (260) 531
+"include_once (T_INCLUDE_ONCE)" (261) 530
+"include (T_INCLUDE)" (262) 529
+"or (T_LOGICAL_OR)" (263) 289
+"xor (T_LOGICAL_XOR)" (264) 292
+"and (T_LOGICAL_AND)" (265) 291
+"print (T_PRINT)" (266) 341
+"yield (T_YIELD)" (267) 342 347 348 349 350
+">>= (T_SR_EQUAL)" (268) 279
+"<<= (T_SL_EQUAL)" (269) 278
+"^= (T_XOR_EQUAL)" (270) 277
+"|= (T_OR_EQUAL)" (271) 276
+"&= (T_AND_EQUAL)" (272) 275
+"%= (T_MOD_EQUAL)" (273) 274
+".= (T_CONCAT_EQUAL)" (274) 273
+"/= (T_DIV_EQUAL)" (275) 272
+"*= (T_MUL_EQUAL)" (276) 271
+"-= (T_MINUS_EQUAL)" (277) 270
+"+= (T_PLUS_EQUAL)" (278) 269
+"|| (T_BOOLEAN_OR)" (279) 285
+"&& (T_BOOLEAN_AND)" (280) 287
+"!== (T_IS_NOT_IDENTICAL)" (281) 309
+"=== (T_IS_IDENTICAL)" (282) 308
+"!= (T_IS_NOT_EQUAL)" (283) 311
+"== (T_IS_EQUAL)" (284) 310
+">= (T_IS_GREATER_OR_EQUAL)" (285) 315
+"<= (T_IS_SMALLER_OR_EQUAL)" (286) 313
+">> (T_SR)" (287) 303
+"<< (T_SL)" (288) 302
+"instanceof (T_INSTANCEOF)" (289) 316
+"(unset) (T_UNSET_CAST)" (290) 333
+"(bool) (T_BOOL_CAST)" (291) 332
+"(object) (T_OBJECT_CAST)" (292) 331
+"(array) (T_ARRAY_CAST)" (293) 330
+"(string) (T_STRING_CAST)" (294) 329
+"(double) (T_DOUBLE_CAST)" (295) 328
+"(int) (T_INT_CAST)" (296) 327
+"-- (T_DEC)" (297) 282 283
+"++ (T_INC)" (298) 280 281
+"clone (T_CLONE)" (299) 268
+"new (T_NEW)" (300) 261 267
+"exit (T_EXIT)" (301) 334
+"if (T_IF)" (302) 38 41
+"elseif (T_ELSEIF)" (303) 153 156
+"else (T_ELSE)" (304) 158 160
+"endif (T_ENDIF)" (305) 41
+"integer number (T_LNUMBER)" (306) 403
+"floating-point number (T_DNUMBER)" (307) 404
+"identifier (T_STRING)" (308) 5 6 21 23 24 25 34 81 106 108 110 136
+ 137 200 215 217 218 240 241 425 492 519 523 539 540
+"variable name (T_STRING_VARNAME)" (309) 426 521
+"variable (T_VARIABLE)" (310) 87 97 163 164 165 166 167 168 169 170
+ 186 189 190 191 192 236 237 238 239 359 360 361 362 482 516 518
+ 519 525
+"number (T_NUM_STRING)" (311) 524
+T_INLINE_HTML (312) 65
+T_CHARACTER (313)
+T_BAD_CHARACTER (314)
+"quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" (315) 399
+ 413 513 515
+"quoted-string (T_CONSTANT_ENCAPSED_STRING)" (316) 353 405
+"echo (T_ECHO)" (317) 64
+"do (T_DO)" (318) 47
+"while (T_WHILE)" (319) 44 47
+"endwhile (T_ENDWHILE)" (320) 150
+"for (T_FOR)" (321) 51
+"endfor (T_ENDFOR)" (322) 131
+"foreach (T_FOREACH)" (323) 70 73
+"endforeach (T_ENDFOREACH)" (324) 133
+"declare (T_DECLARE)" (325) 75
+"enddeclare (T_ENDDECLARE)" (326) 135
+"as (T_AS)" (327) 21 23 70 73 218 219
+"switch (T_SWITCH)" (328) 53
+"endswitch (T_ENDSWITCH)" (329) 140 141
+"case (T_CASE)" (330) 144
+"default (T_DEFAULT)" (331) 146
+"break (T_BREAK)" (332) 54 55
+"continue (T_CONTINUE)" (333) 56 57
+"goto (T_GOTO)" (334) 81
+"function (T_FUNCTION)" (335) 356
+"const (T_CONST)" (336) 25 241
+"return (T_RETURN)" (337) 58 59 60
+"try (T_TRY)" (338) 79
+"catch (T_CATCH)" (339) 87 97
+"finally (T_FINALLY)" (340) 90
+"throw (T_THROW)" (341) 80
+"use (T_USE)" (342) 16 201 358
+"insteadof (T_INSTEADOF)" (343) 212
+"global (T_GLOBAL)" (344) 62
+"public (T_PUBLIC)" (345) 230
+"protected (T_PROTECTED)" (346) 231
+"private (T_PRIVATE)" (347) 232
+"final (T_FINAL)" (348) 114 235
+"abstract (T_ABSTRACT)" (349) 112 234
+"static (T_STATIC)" (350) 63 233 346 379
+"var (T_VAR)" (351) 225
+"unset (T_UNSET)" (352) 67
+"isset (T_ISSET)" (353) 526
+"empty (T_EMPTY)" (354) 527 528
+"__halt_compiler (T_HALT_COMPILER)" (355) 10 32
+"class (T_CLASS)" (356) 111 112 114
+"trait (T_TRAIT)" (357) 113
+"interface (T_INTERFACE)" (358) 117
+"extends (T_EXTENDS)" (359) 116 119
+"implements (T_IMPLEMENTS)" (360) 121
+"-> (T_OBJECT_OPERATOR)" (361) 390 394 452 457 519
+"=> (T_DOUBLE_ARROW)" (362) 125 349 350 439 441 504 506 508 510
+"list (T_LIST)" (363) 129 263 500
+"array (T_ARRAY)" (364) 172 354 421
+"callable (T_CALLABLE)" (365) 173
+"__CLASS__ (T_CLASS_C)" (366) 424 434
+"__TRAIT__ (T_TRAIT_C)" (367) 409
+"__METHOD__ (T_METHOD_C)" (368) 410
+"__FUNCTION__ (T_FUNC_C)" (369) 411
+"__LINE__ (T_LINE)" (370) 406
+"__FILE__ (T_FILE)" (371) 407
+"comment (T_COMMENT)" (372)
+"doc comment (T_DOC_COMMENT)" (373)
+"open tag (T_OPEN_TAG)" (374)
+"open tag with echo (T_OPEN_TAG_WITH_ECHO)" (375)
+"close tag (T_CLOSE_TAG)" (376)
+"whitespace (T_WHITESPACE)" (377)
+"heredoc start (T_START_HEREDOC)" (378) 413 414 433
+"heredoc end (T_END_HEREDOC)" (379) 413 414 433
+"${ (T_DOLLAR_OPEN_CURLY_BRACES)" (380) 520 521
+"{$ (T_CURLY_OPEN)" (381) 522
+":: (T_PAAMAYIM_NEKUDOTAYIM)" (382) 217 370 372 374 376 425 467 468
+ 539 540
+"namespace (T_NAMESPACE)" (383) 11 13 15 366 381 384 417 429
+"__NAMESPACE__ (T_NS_C)" (384) 412
+"__DIR__ (T_DIR)" (385) 408
+"\\ (T_NS_SEPARATOR)" (386) 6 22 23 366 368 381 382 384 385 417 418
+ 429 430
Nonterminals, with rules where they appear
-$accept (158)
+$accept (160)
on left: 0
-start (159)
+start (161)
on left: 1, on right: 0
-top_statement_list (160)
+top_statement_list (162)
on left: 3 4, on right: 1 3 13 15
-@1 (161)
+$@1 (163)
on left: 2, on right: 3
-namespace_name (162)
- on left: 5 6, on right: 6 11 13 20 21 22 23 344 346 348 360 361
- 362 363 364 365 396 397 398 408 409 410
-top_statement (163)
+namespace_name (164)
+ on left: 5 6, on right: 6 11 13 20 21 22 23 364 366 368 380 381
+ 382 383 384 385 416 417 418 428 429 430
+top_statement (165)
on left: 7 8 9 10 11 13 15 16 17, on right: 3
-@2 (164)
+$@2 (166)
on left: 12, on right: 13
-@3 (165)
+$@3 (167)
on left: 14, on right: 15
-use_declarations (166)
+use_declarations (168)
on left: 18 19, on right: 16 18
-use_declaration (167)
+use_declaration (169)
on left: 20 21 22 23, on right: 18 19
-constant_declaration (168)
+constant_declaration (170)
on left: 24 25, on right: 17 24
-inner_statement_list (169)
- on left: 27 28, on right: 27 35 41 81 90 99 122 124 126 135 137
- 141 147 151 213 333 335
-@4 (170)
+inner_statement_list (171)
+ on left: 27 28, on right: 27 35 41 79 87 90 97 106 131 133 135
+ 144 146 150 156 160 223 344 346
+$@4 (172)
on left: 26, on right: 27
-inner_statement (171)
+inner_statement (173)
on left: 29 30 31 32, on right: 27
-statement (172)
- on left: 33 34, on right: 7 29 38 47 121 123 125 140 144 149
-unticked_statement (173)
+statement (174)
+ on left: 33 34, on right: 7 29 38 47 130 132 134 149 153 158
+unticked_statement (175)
on left: 35 38 41 44 47 51 53 54 55 56 57 58 59 60 61 62 63 64
- 65 66 69 72 74 75 81 82 83, on right: 33
-@5 (174)
+ 65 66 67 70 73 75 76 79 80 81, on right: 33
+$@5 (176)
on left: 36, on right: 38
-@6 (175)
+$@6 (177)
on left: 37, on right: 38
-@7 (176)
+$@7 (178)
on left: 39, on right: 41
-@8 (177)
+$@8 (179)
on left: 40, on right: 41
-@9 (178)
+$@9 (180)
on left: 42, on right: 44
-@10 (179)
+@10 (181)
on left: 43, on right: 44
-@11 (180)
+$@11 (182)
on left: 45, on right: 47
-@12 (181)
+$@12 (183)
on left: 46, on right: 47
-@13 (182)
+$@13 (184)
on left: 48, on right: 51
-@14 (183)
+$@14 (185)
on left: 49, on right: 51
-@15 (184)
+$@15 (186)
on left: 50, on right: 51
-@16 (185)
+$@16 (187)
on left: 52, on right: 53
-@17 (186)
- on left: 67, on right: 69
-@18 (187)
- on left: 68, on right: 69
-@19 (188)
- on left: 70, on right: 72
-@20 (189)
- on left: 71, on right: 72
-@21 (190)
- on left: 73, on right: 74
-@22 (191)
- on left: 76, on right: 81
-@23 (192)
- on left: 77, on right: 81
-@24 (193)
- on left: 78, on right: 81
-@25 (194)
- on left: 79, on right: 81
-@26 (195)
- on left: 80, on right: 81
-additional_catches (196)
- on left: 84 85, on right: 81
-non_empty_additional_catches (197)
- on left: 86 87, on right: 84 87
-additional_catch (198)
- on left: 90, on right: 86 87
-@27 (199)
- on left: 88, on right: 90
-@28 (200)
+$@17 (188)
+ on left: 68, on right: 70
+$@18 (189)
+ on left: 69, on right: 70
+$@19 (190)
+ on left: 71, on right: 73
+$@20 (191)
+ on left: 72, on right: 73
+$@21 (192)
+ on left: 74, on right: 75
+$@22 (193)
+ on left: 77, on right: 79
+$@23 (194)
+ on left: 78, on right: 79
+catch_statement (195)
+ on left: 82 87, on right: 79
+$@24 (196)
+ on left: 83, on right: 87
+$@25 (197)
+ on left: 84, on right: 87
+$@26 (198)
+ on left: 85, on right: 87
+$@27 (199)
+ on left: 86, on right: 87
+finally_statement (200)
+ on left: 88 90, on right: 79
+$@28 (201)
on left: 89, on right: 90
-unset_variables (201)
- on left: 91 92, on right: 66 92
-unset_variable (202)
- on left: 93, on right: 91 92
-function_declaration_statement (203)
- on left: 94, on right: 8 30
-class_declaration_statement (204)
- on left: 95, on right: 9 31
-is_reference (205)
- on left: 96 97, on right: 99 190 333 335
-unticked_function_declaration_statement (206)
- on left: 99, on right: 94
-@29 (207)
- on left: 98, on right: 99
-unticked_class_declaration_statement (208)
- on left: 101 103, on right: 95
-@30 (209)
- on left: 100, on right: 101
-@31 (210)
- on left: 102, on right: 103
-class_entry_type (211)
- on left: 104 105 106 107, on right: 101
-extends_from (212)
- on left: 108 109, on right: 101
-interface_entry (213)
- on left: 110, on right: 103
-interface_extends_list (214)
- on left: 111 112, on right: 103
-implements_list (215)
- on left: 113 114, on right: 101
-interface_list (216)
- on left: 115 116, on right: 112 114 116
-foreach_optional_arg (217)
- on left: 117 118, on right: 69 72
-foreach_variable (218)
- on left: 119 120, on right: 69 118
-for_statement (219)
- on left: 121 122, on right: 51
-foreach_statement (220)
- on left: 123 124, on right: 69 72
-declare_statement (221)
- on left: 125 126, on right: 74
-declare_list (222)
- on left: 127 128, on right: 74 128
-switch_case_list (223)
- on left: 129 130 131 132, on right: 53
-case_list (224)
- on left: 133 135 137, on right: 129 130 131 132 135 137
-@32 (225)
- on left: 134, on right: 135
-@33 (226)
- on left: 136, on right: 137
-case_separator (227)
- on left: 138 139, on right: 135 137
-while_statement (228)
- on left: 140 141, on right: 44
-elseif_list (229)
- on left: 142 144, on right: 38 144
-@34 (230)
+additional_catches (202)
+ on left: 91 92, on right: 87
+non_empty_additional_catches (203)
+ on left: 93 94, on right: 91 94
+additional_catch (204)
+ on left: 97, on right: 93 94
+@29 (205)
+ on left: 95, on right: 97
+$@30 (206)
+ on left: 96, on right: 97
+unset_variables (207)
+ on left: 98 99, on right: 67 99
+unset_variable (208)
+ on left: 100, on right: 98 99
+function_declaration_statement (209)
+ on left: 101, on right: 8 30
+class_declaration_statement (210)
+ on left: 102, on right: 9 31
+is_reference (211)
+ on left: 103 104, on right: 106 200 344 346
+unticked_function_declaration_statement (212)
+ on left: 106, on right: 101
+$@31 (213)
+ on left: 105, on right: 106
+unticked_class_declaration_statement (214)
+ on left: 108 110, on right: 102
+$@32 (215)
+ on left: 107, on right: 108
+$@33 (216)
+ on left: 109, on right: 110
+class_entry_type (217)
+ on left: 111 112 113 114, on right: 108
+extends_from (218)
+ on left: 115 116, on right: 108
+interface_entry (219)
+ on left: 117, on right: 110
+interface_extends_list (220)
+ on left: 118 119, on right: 110
+implements_list (221)
+ on left: 120 121, on right: 108
+interface_list (222)
+ on left: 122 123, on right: 119 121 123
+foreach_optional_arg (223)
+ on left: 124 125, on right: 70 73
+foreach_variable (224)
+ on left: 126 127 129, on right: 70 73 125
+$@34 (225)
+ on left: 128, on right: 129
+for_statement (226)
+ on left: 130 131, on right: 51
+foreach_statement (227)
+ on left: 132 133, on right: 70 73
+declare_statement (228)
+ on left: 134 135, on right: 75
+declare_list (229)
+ on left: 136 137, on right: 75 137
+switch_case_list (230)
+ on left: 138 139 140 141, on right: 53
+case_list (231)
+ on left: 142 144 146, on right: 138 139 140 141 144 146
+$@35 (232)
on left: 143, on right: 144
-new_elseif_list (231)
- on left: 145 147, on right: 41 147
-@35 (232)
- on left: 146, on right: 147
-else_single (233)
- on left: 148 149, on right: 38
-new_else_single (234)
- on left: 150 151, on right: 41
-parameter_list (235)
- on left: 152 153, on right: 99 190 333 335
-non_empty_parameter_list (236)
- on left: 154 155 156 157 158 159 160 161, on right: 152 158 159
- 160 161
-optional_class_type (237)
- on left: 162 163 164 165, on right: 154 155 156 157 158 159 160
- 161
-function_call_parameter_list (238)
- on left: 166 167, on right: 344 346 348 350 352 354 356 358 382
- 439
-non_empty_function_call_parameter_list (239)
- on left: 168 169 170 171 172 173, on right: 166 171 172 173
-global_var_list (240)
- on left: 174 175, on right: 61 174
-global_var (241)
- on left: 176 177 178, on right: 174 175
-static_var_list (242)
- on left: 179 180 181 182, on right: 62 179 180
-class_statement_list (243)
- on left: 183 184, on right: 101 103 183
-class_statement (244)
- on left: 186 187 188 190, on right: 183
-@36 (245)
- on left: 185, on right: 186
-@37 (246)
- on left: 189, on right: 190
-trait_use_statement (247)
- on left: 191, on right: 188
-trait_list (248)
- on left: 192 193, on right: 191 193
-trait_adaptations (249)
- on left: 194 195, on right: 191
-trait_adaptation_list (250)
- on left: 196 197, on right: 195
-non_empty_trait_adaptation_list (251)
- on left: 198 199, on right: 197 199
-trait_adaptation_statement (252)
- on left: 200 201, on right: 198 199
-trait_precedence (253)
- on left: 202, on right: 200
-trait_reference_list (254)
- on left: 203 204, on right: 202 204
-trait_method_reference (255)
- on left: 205 206, on right: 208 209
-trait_method_reference_fully_qualified (256)
- on left: 207, on right: 202 206
-trait_alias (257)
- on left: 208 209, on right: 201
-trait_modifiers (258)
- on left: 210 211, on right: 208
-method_body (259)
- on left: 212 213, on right: 190
-variable_modifiers (260)
- on left: 214 215, on right: 186
-method_modifiers (261)
- on left: 216 217, on right: 190
-non_empty_member_modifiers (262)
- on left: 218 219, on right: 214 217 219
-member_modifier (263)
- on left: 220 221 222 223 224 225, on right: 209 211 218 219
-class_variable_declaration (264)
- on left: 226 227 228 229, on right: 186 226 227
-class_constant_declaration (265)
- on left: 230 231, on right: 187 230
-echo_expr_list (266)
- on left: 232 233, on right: 63 232
-for_expr (267)
- on left: 234 235, on right: 51
-non_empty_for_expr (268)
- on left: 237 238, on right: 235 237
-@38 (269)
- on left: 236, on right: 237
-chaining_method_or_property (270)
- on left: 239 240, on right: 239 244 246
-chaining_dereference (271)
- on left: 241 242, on right: 241 244 245
-chaining_instance_call (272)
- on left: 244 245 246, on right: 249
-@39 (273)
- on left: 243, on right: 244
-instance_call (274)
- on left: 247 249, on right: 310
-@40 (275)
- on left: 248, on right: 249
-new_expr (276)
- on left: 251, on right: 308 310
-@41 (277)
- on left: 250, on right: 251
-expr_without_variable (278)
- on left: 253 254 255 257 258 259 260 261 262 263 264 265 266 267
- 268 269 270 271 272 273 275 277 279 281 282 283 284 285 286 287
- 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
- 304 305 306 307 308 310 313 315 316 317 318 319 320 321 322 323
- 324 326 327 328 329 330 331 333 335, on right: 59 72 168 171 424
-@42 (279)
- on left: 252, on right: 253
-@43 (280)
- on left: 256, on right: 257
-@44 (281)
- on left: 274, on right: 275
-@45 (282)
- on left: 276, on right: 277
-@46 (283)
- on left: 278, on right: 279
-@47 (284)
- on left: 280, on right: 281
-@48 (285)
- on left: 309, on right: 310
-@49 (286)
- on left: 311, on right: 313
-@50 (287)
- on left: 312, on right: 313
-@51 (288)
- on left: 314, on right: 315
-@52 (289)
- on left: 325, on right: 326
-@53 (290)
- on left: 332, on right: 333
-@54 (291)
- on left: 334, on right: 335
-function (292)
- on left: 336, on right: 99 190 333 335
-lexical_vars (293)
- on left: 337 338, on right: 333 335
-lexical_var_list (294)
- on left: 339 340 341 342, on right: 338 339 340
-function_call (295)
- on left: 344 346 348 350 352 354 356 358, on right: 450 453
-@55 (296)
- on left: 343, on right: 344
+$@36 (233)
+ on left: 145, on right: 146
+case_separator (234)
+ on left: 147 148, on right: 144 146
+while_statement (235)
+ on left: 149 150, on right: 44
+elseif_list (236)
+ on left: 151 153, on right: 38 153
+$@37 (237)
+ on left: 152, on right: 153
+new_elseif_list (238)
+ on left: 154 156, on right: 41 156
+$@38 (239)
+ on left: 155, on right: 156
+else_single (240)
+ on left: 157 158, on right: 38
+new_else_single (241)
+ on left: 159 160, on right: 41
+parameter_list (242)
+ on left: 161 162, on right: 106 200 344 346
+non_empty_parameter_list (243)
+ on left: 163 164 165 166 167 168 169 170, on right: 161 167 168
+ 169 170
+optional_class_type (244)
+ on left: 171 172 173 174, on right: 163 164 165 166 167 168 169
+ 170
+function_call_parameter_list (245)
+ on left: 175 176 177, on right: 364 366 368 370 372 374 376 378
+ 402 461
+non_empty_function_call_parameter_list (246)
+ on left: 178 179 180 181 182 183, on right: 176 181 182 183
+global_var_list (247)
+ on left: 184 185, on right: 62 184
+global_var (248)
+ on left: 186 187 188, on right: 184 185
+static_var_list (249)
+ on left: 189 190 191 192, on right: 63 189 190
+class_statement_list (250)
+ on left: 193 194, on right: 108 110 193
+class_statement (251)
+ on left: 196 197 198 200, on right: 193
+$@39 (252)
+ on left: 195, on right: 196
+$@40 (253)
+ on left: 199, on right: 200
+trait_use_statement (254)
+ on left: 201, on right: 198
+trait_list (255)
+ on left: 202 203, on right: 201 203
+trait_adaptations (256)
+ on left: 204 205, on right: 201
+trait_adaptation_list (257)
+ on left: 206 207, on right: 205
+non_empty_trait_adaptation_list (258)
+ on left: 208 209, on right: 207 209
+trait_adaptation_statement (259)
+ on left: 210 211, on right: 208 209
+trait_precedence (260)
+ on left: 212, on right: 210
+trait_reference_list (261)
+ on left: 213 214, on right: 212 214
+trait_method_reference (262)
+ on left: 215 216, on right: 218 219
+trait_method_reference_fully_qualified (263)
+ on left: 217, on right: 212 216
+trait_alias (264)
+ on left: 218 219, on right: 211
+trait_modifiers (265)
+ on left: 220 221, on right: 218
+method_body (266)
+ on left: 222 223, on right: 200
+variable_modifiers (267)
+ on left: 224 225, on right: 196
+method_modifiers (268)
+ on left: 226 227, on right: 200
+non_empty_member_modifiers (269)
+ on left: 228 229, on right: 224 227 229
+member_modifier (270)
+ on left: 230 231 232 233 234 235, on right: 219 221 228 229
+class_variable_declaration (271)
+ on left: 236 237 238 239, on right: 196 236 237
+class_constant_declaration (272)
+ on left: 240 241, on right: 197 240
+echo_expr_list (273)
+ on left: 242 243, on right: 64 242
+for_expr (274)
+ on left: 244 245, on right: 51
+non_empty_for_expr (275)
+ on left: 247 248, on right: 245 247
+$@41 (276)
+ on left: 246, on right: 247
+chaining_method_or_property (277)
+ on left: 249 250, on right: 249 254 256
+chaining_dereference (278)
+ on left: 251 252, on right: 251 254 255
+chaining_instance_call (279)
+ on left: 254 255 256, on right: 259
+$@42 (280)
+ on left: 253, on right: 254
+instance_call (281)
+ on left: 257 259, on right: 320
+$@43 (282)
+ on left: 258, on right: 259
+new_expr (283)
+ on left: 261, on right: 318 320
+$@44 (284)
+ on left: 260, on right: 261
+expr_without_variable (285)
+ on left: 263 264 265 267 268 269 270 271 272 273 274 275 276 277
+ 278 279 280 281 282 283 285 287 289 291 292 293 294 295 296 297
+ 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
+ 314 315 316 317 318 320 323 325 326 327 328 329 330 331 332 333
+ 334 336 337 338 339 340 341 342 344 346, on right: 59 73 178 181
+ 347 349 444 528 538
+$@45 (286)
+ on left: 262, on right: 263
+$@46 (287)
+ on left: 266, on right: 267
+$@47 (288)
+ on left: 284, on right: 285
+$@48 (289)
+ on left: 286, on right: 287
+$@49 (290)
+ on left: 288, on right: 289
+$@50 (291)
+ on left: 290, on right: 291
+@51 (292)
+ on left: 319, on right: 320
+$@52 (293)
+ on left: 321, on right: 323
+$@53 (294)
+ on left: 322, on right: 323
+$@54 (295)
+ on left: 324, on right: 325
+$@55 (296)
+ on left: 335, on right: 336
@56 (297)
- on left: 345, on right: 346
+ on left: 343, on right: 344
@57 (298)
- on left: 347, on right: 348
-@58 (299)
- on left: 349, on right: 350
-@59 (300)
- on left: 351, on right: 352
-@60 (301)
- on left: 353, on right: 354
-@61 (302)
- on left: 355, on right: 356
-@62 (303)
- on left: 357, on right: 358
-class_name (304)
- on left: 359 360 361 362, on right: 350 352 366 405 445 514
-fully_qualified_class_name (305)
- on left: 363 364 365, on right: 81 90 109 115 116 165 192 193 203
- 204 207
-class_name_reference (306)
- on left: 366 367, on right: 251 257 306
-dynamic_class_name_reference (307)
- on left: 370 371, on right: 367
-@63 (308)
- on left: 368, on right: 370
-@64 (309)
+ on left: 345, on right: 346
+yield_expr (299)
+ on left: 347 348 349 350, on right: 61 177 446
+combined_scalar_offset (300)
+ on left: 351 352 353, on right: 338 352
+combined_scalar (301)
+ on left: 354 355, on right: 339 351
+function (302)
+ on left: 356, on right: 106 200 344 346
+lexical_vars (303)
+ on left: 357 358, on right: 344 346
+lexical_var_list (304)
+ on left: 359 360 361 362, on right: 358 359 360
+function_call (305)
+ on left: 364 366 368 370 372 374 376 378, on right: 472 475
+@58 (306)
+ on left: 363, on right: 364
+@59 (307)
+ on left: 365, on right: 366
+@60 (308)
+ on left: 367, on right: 368
+@61 (309)
on left: 369, on right: 370
-dynamic_class_name_variable_properties (310)
- on left: 372 373, on right: 370 372
-dynamic_class_name_variable_property (311)
- on left: 374, on right: 372
-exit_expr (312)
- on left: 375 376 377, on right: 324
-backticks_expr (313)
- on left: 378 379 380, on right: 330
-ctor_arguments (314)
- on left: 381 382, on right: 251 257
-common_scalar (315)
- on left: 383 384 385 386 387 388 389 390 391 392 393 394,
- on right: 395 411
-static_scalar (316)
- on left: 395 396 397 398 399 400 401 402 403 404,
- on right: 24 25 127 128 156 157 160 161 180 182 227 229 230 231
- 399 400 419 420 421 422
-static_class_constant (317)
- on left: 405, on right: 403
-scalar (318)
- on left: 406 407 408 409 410 411 412 413 414, on right: 327
-static_array_pair_list (319)
- on left: 415 416, on right: 401 402
-possible_comma (320)
- on left: 417 418, on right: 416 481
-non_empty_static_array_pair_list (321)
- on left: 419 420 421 422, on right: 416 419 420
-expr (322)
- on left: 423 424, on right: 38 41 44 47 53 55 57 65 82 135 144
- 147 178 232 233 237 238 253 254 258 259 260 261 262 263 264 265
- 266 267 268 269 275 277 279 281 282 283 284 285 286 287 288 289
- 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
- 306 307 313 315 317 318 319 320 321 322 323 326 331 377 458 461
- 463 468 471 482 483 484 485 486 488 498 499 506 507 508 509 510
-r_variable (323)
- on left: 425, on right: 177 423
-w_variable (324)
- on left: 426, on right: 170 173 486 487 488 489
-rw_variable (325)
- on left: 427, on right: 270 271 272 273
-variable (326)
- on left: 430 431, on right: 60 69 72 93 119 120 169 172 254 255
- 257 259 260 261 262 263 264 265 266 267 268 269 425 426 427 476
- 500 505 511 513
-@65 (327)
- on left: 428, on right: 430
-@66 (328)
- on left: 429, on right: 430
-variable_properties (329)
- on left: 432 433, on right: 430 432
-variable_property (330)
- on left: 435, on right: 239 240 432
-@67 (331)
- on left: 434, on right: 435
-array_method_dereference (332)
- on left: 436 437, on right: 436 441
-method (333)
- on left: 439, on right: 437 440
-@68 (334)
- on left: 438, on right: 439
-method_or_not (335)
- on left: 440 441 442, on right: 430 435
-variable_without_objects (336)
- on left: 443 444, on right: 352 356 358 445 446 466
-static_member (337)
- on left: 445 446, on right: 456
-variable_class_name (338)
- on left: 447, on right: 354 356 446 515
-array_function_dereference (339)
- on left: 448 450, on right: 448 452
-@69 (340)
- on left: 449, on right: 450
-base_variable_with_function_calls (341)
- on left: 451 452 453, on right: 430 431
-base_variable (342)
- on left: 454 455 456, on right: 370 371 451
-reference_variable (343)
- on left: 457 458 459, on right: 443 444 447 454 455 457 458
-compound_variable (344)
- on left: 460 461, on right: 459
-dim_offset (345)
- on left: 462 463, on right: 241 242 436 437 448 450 457 467
-object_property (346)
- on left: 464 466, on right: 370 374 430 435
-@70 (347)
- on left: 465, on right: 466
-object_dim_list (348)
- on left: 467 468 469, on right: 464 467 468
-variable_name (349)
- on left: 470 471, on right: 350 354 469
-simple_indirect_reference (350)
- on left: 472 473, on right: 444 455 473
-assignment_list (351)
- on left: 474 475, on right: 253 474 478
-assignment_list_element (352)
- on left: 476 478 479, on right: 474 475
-@71 (353)
- on left: 477, on right: 478
-array_pair_list (354)
- on left: 480 481, on right: 328 329
-non_empty_array_pair_list (355)
- on left: 482 483 484 485 486 487 488 489, on right: 481 482 483
- 486 487
-encaps_list (356)
- on left: 490 491 492 493, on right: 380 412 413 490 491
-encaps_var (357)
- on left: 494 496 497 498 499 500, on right: 490 492 493
-@72 (358)
- on left: 495, on right: 496
-encaps_var_offset (359)
- on left: 501 502 503, on right: 496
-internal_functions_in_yacc (360)
- on left: 504 505 506 507 508 509 510, on right: 316
-isset_variables (361)
- on left: 511 513, on right: 504 513
-@73 (362)
- on left: 512, on right: 513
-class_constant (363)
- on left: 514 515, on right: 407
+$@62 (310)
+ on left: 371, on right: 372
+$@63 (311)
+ on left: 373, on right: 374
+$@64 (312)
+ on left: 375, on right: 376
+$@65 (313)
+ on left: 377, on right: 378
+class_name (314)
+ on left: 379 380 381 382, on right: 370 372 386 425 467 539
+fully_qualified_class_name (315)
+ on left: 383 384 385, on right: 87 97 116 122 123 174 202 203 213
+ 214 217
+class_name_reference (316)
+ on left: 386 387, on right: 261 267 316
+dynamic_class_name_reference (317)
+ on left: 390 391, on right: 387
+$@66 (318)
+ on left: 388, on right: 390
+$@67 (319)
+ on left: 389, on right: 390
+dynamic_class_name_variable_properties (320)
+ on left: 392 393, on right: 390 392
+dynamic_class_name_variable_property (321)
+ on left: 394, on right: 392
+exit_expr (322)
+ on left: 395 396 397, on right: 334
+backticks_expr (323)
+ on left: 398 399 400, on right: 340
+ctor_arguments (324)
+ on left: 401 402, on right: 261 267
+common_scalar (325)
+ on left: 403 404 405 406 407 408 409 410 411 412 413 414, on right:
+ 415 431
+static_scalar (326)
+ on left: 415 416 417 418 419 420 421 422 423 424, on right: 24
+ 25 136 137 165 166 169 170 190 192 237 239 240 241 419 420 439
+ 440 441 442
+static_class_constant (327)
+ on left: 425, on right: 423
+scalar (328)
+ on left: 426 427 428 429 430 431 432 433 434, on right: 337
+static_array_pair_list (329)
+ on left: 435 436, on right: 421 422
+possible_comma (330)
+ on left: 437 438, on right: 436 503
+non_empty_static_array_pair_list (331)
+ on left: 439 440 441 442, on right: 436 439 440
+expr (332)
+ on left: 443 444, on right: 55 57 66 80 144 188 242 243 247 248
+ 263 264 268 269 270 271 272 273 274 275 276 277 278 279 285 287
+ 289 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
+ 306 307 308 309 310 311 312 313 314 315 316 323 325 327 328 329
+ 330 331 332 333 336 341 349 350 445 480 483 485 490 493 504 505
+ 506 507 508 510 520 521 529 530 531 532 533
+parenthesis_expr (333)
+ on left: 445 446, on right: 38 41 44 47 53 153 156 317 397
+r_variable (334)
+ on left: 447, on right: 187 443
+w_variable (335)
+ on left: 448, on right: 180 183 508 509 510 511
+rw_variable (336)
+ on left: 449, on right: 280 281 282 283
+variable (337)
+ on left: 452 453, on right: 60 70 100 126 127 179 182 264 265 267
+ 269 270 271 272 273 274 275 276 277 278 279 348 350 447 448 449
+ 498 522 527 537
+$@68 (338)
+ on left: 450, on right: 452
+$@69 (339)
+ on left: 451, on right: 452
+variable_properties (340)
+ on left: 454 455, on right: 452 454
+variable_property (341)
+ on left: 457, on right: 249 250 454
+$@70 (342)
+ on left: 456, on right: 457
+array_method_dereference (343)
+ on left: 458 459, on right: 458 463
+method (344)
+ on left: 461, on right: 459 462
+@71 (345)
+ on left: 460, on right: 461
+method_or_not (346)
+ on left: 462 463 464, on right: 452 457
+variable_without_objects (347)
+ on left: 465 466, on right: 372 376 378 467 468 488
+static_member (348)
+ on left: 467 468, on right: 478
+variable_class_name (349)
+ on left: 469, on right: 374 376 468 540
+array_function_dereference (350)
+ on left: 470 472, on right: 470 474
+$@72 (351)
+ on left: 471, on right: 472
+base_variable_with_function_calls (352)
+ on left: 473 474 475, on right: 452 453
+base_variable (353)
+ on left: 476 477 478, on right: 390 391 473
+reference_variable (354)
+ on left: 479 480 481, on right: 465 466 469 476 477 479 480
+compound_variable (355)
+ on left: 482 483, on right: 481
+dim_offset (356)
+ on left: 484 485, on right: 251 252 351 352 353 458 459 470 472
+ 479 489
+object_property (357)
+ on left: 486 488, on right: 390 394 452 457
+$@73 (358)
+ on left: 487, on right: 488
+object_dim_list (359)
+ on left: 489 490 491, on right: 486 489 490
+variable_name (360)
+ on left: 492 493, on right: 370 374 491
+simple_indirect_reference (361)
+ on left: 494 495, on right: 466 477 495
+assignment_list (362)
+ on left: 496 497, on right: 129 263 496 500
+assignment_list_element (363)
+ on left: 498 500 501, on right: 496 497
+$@74 (364)
+ on left: 499, on right: 500
+array_pair_list (365)
+ on left: 502 503, on right: 354 355
+non_empty_array_pair_list (366)
+ on left: 504 505 506 507 508 509 510 511, on right: 503 504 505
+ 508 509
+encaps_list (367)
+ on left: 512 513 514 515, on right: 400 432 433 512 513
+encaps_var (368)
+ on left: 516 518 519 520 521 522, on right: 512 514 515
+$@75 (369)
+ on left: 517, on right: 518
+encaps_var_offset (370)
+ on left: 523 524 525, on right: 518
+internal_functions_in_yacc (371)
+ on left: 526 527 528 529 530 531 532 533, on right: 326
+isset_variables (372)
+ on left: 534 536, on right: 526 536
+$@76 (373)
+ on left: 535, on right: 536
+isset_variable (374)
+ on left: 537 538, on right: 534 536
+class_constant (375)
+ on left: 539 540, on right: 427
state 0
@@ -1417,12 +1478,12 @@ state 1
state 2
1 start: top_statement_list .
- 3 top_statement_list: top_statement_list . @1 top_statement
+ 3 top_statement_list: top_statement_list . $@1 top_statement
"end of file" reduce using rule 1 (start)
- $default reduce using rule 2 (@1)
+ $default reduce using rule 2 ($@1)
- @1 go to state 4
+ $@1 go to state 4
state 3
@@ -1434,7 +1495,7 @@ state 3
state 4
- 3 top_statement_list: top_statement_list @1 . top_statement
+ 3 top_statement_list: top_statement_list $@1 . top_statement
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1442,117 +1503,122 @@ state 4
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "const (T_CONST)" shift, and go to state 48
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "use (T_USE)" shift, and go to state 52
- "global (T_GLOBAL)" shift, and go to state 53
- "final (T_FINAL)" shift, and go to state 54
- "abstract (T_ABSTRACT)" shift, and go to state 55
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "__halt_compiler (T_HALT_COMPILER)" shift, and go to state 60
- "class (T_CLASS)" shift, and go to state 61
- "trait (T_TRAIT)" shift, and go to state 62
- "interface (T_INTERFACE)" shift, and go to state 63
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 73
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- top_statement go to state 84
- constant_declaration go to state 85
- statement go to state 86
- unticked_statement go to state 87
- function_declaration_statement go to state 88
- class_declaration_statement go to state 89
- unticked_function_declaration_statement go to state 90
- unticked_class_declaration_statement go to state 91
- class_entry_type go to state 92
- interface_entry go to state 93
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 96
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "const (T_CONST)" shift, and go to state 49
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "use (T_USE)" shift, and go to state 53
+ "global (T_GLOBAL)" shift, and go to state 54
+ "final (T_FINAL)" shift, and go to state 55
+ "abstract (T_ABSTRACT)" shift, and go to state 56
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "__halt_compiler (T_HALT_COMPILER)" shift, and go to state 61
+ "class (T_CLASS)" shift, and go to state 62
+ "trait (T_TRAIT)" shift, and go to state 63
+ "interface (T_INTERFACE)" shift, and go to state 64
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 74
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ top_statement go to state 85
+ constant_declaration go to state 86
+ statement go to state 87
+ unticked_statement go to state 88
+ function_declaration_statement go to state 89
+ class_declaration_statement go to state 90
+ unticked_function_declaration_statement go to state 91
+ unticked_class_declaration_statement go to state 92
+ class_entry_type go to state 93
+ interface_entry go to state 94
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 100
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 5
- 510 internal_functions_in_yacc: "require_once (T_REQUIRE_ONCE)" . expr
+ 533 internal_functions_in_yacc: "require_once (T_REQUIRE_ONCE)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1560,80 +1626,84 @@ state 5
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 120
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 126
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 6
- 509 internal_functions_in_yacc: "require (T_REQUIRE)" . expr
+ 532 internal_functions_in_yacc: "require (T_REQUIRE)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1641,87 +1711,91 @@ state 6
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 121
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 127
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 7
- 508 internal_functions_in_yacc: "eval (T_EVAL)" . '(' expr ')'
+ 531 internal_functions_in_yacc: "eval (T_EVAL)" . '(' expr ')'
- '(' shift, and go to state 122
+ '(' shift, and go to state 128
state 8
- 507 internal_functions_in_yacc: "include_once (T_INCLUDE_ONCE)" . expr
+ 530 internal_functions_in_yacc: "include_once (T_INCLUDE_ONCE)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1729,80 +1803,84 @@ state 8
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 123
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 129
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 9
- 506 internal_functions_in_yacc: "include (T_INCLUDE)" . expr
+ 529 internal_functions_in_yacc: "include (T_INCLUDE)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1810,80 +1888,84 @@ state 9
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 124
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 130
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 10
- 331 expr_without_variable: "print (T_PRINT)" . expr
+ 341 expr_without_variable: "print (T_PRINT)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1891,80 +1973,88 @@ state 10
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 125
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 131
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 11
- 294 expr_without_variable: '+' . expr
+ 342 expr_without_variable: "yield (T_YIELD)" .
+ 347 yield_expr: "yield (T_YIELD)" . expr_without_variable
+ 348 | "yield (T_YIELD)" . variable
+ 349 | "yield (T_YIELD)" . expr "=> (T_DOUBLE_ARROW)" expr_without_variable
+ 350 | "yield (T_YIELD)" . expr "=> (T_DOUBLE_ARROW)" variable
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -1972,80 +2062,86 @@ state 11
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 126
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 342 (expr_without_variable)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 132
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 133
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 134
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 12
- 295 expr_without_variable: '-' . expr
+ 304 expr_without_variable: '+' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2053,80 +2149,84 @@ state 12
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 127
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 135
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 13
- 296 expr_without_variable: '!' . expr
+ 305 expr_without_variable: '-' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2134,80 +2234,84 @@ state 13
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 128
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 136
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 14
- 297 expr_without_variable: '~' . expr
+ 306 expr_without_variable: '!' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2215,89 +2319,84 @@ state 14
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 129
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 137
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 15
- 326 expr_without_variable: '@' . @52 expr
-
- $default reduce using rule 325 (@52)
-
- @52 go to state 130
-
-
-state 16
-
- 323 expr_without_variable: "(unset) (T_UNSET_CAST)" . expr
+ 307 expr_without_variable: '~' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2305,80 +2404,93 @@ state 16
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 131
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 138
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
+
+
+state 16
+
+ 336 expr_without_variable: '@' . $@55 expr
+
+ $default reduce using rule 335 ($@55)
+
+ $@55 go to state 139
state 17
- 322 expr_without_variable: "(bool) (T_BOOL_CAST)" . expr
+ 333 expr_without_variable: "(unset) (T_UNSET_CAST)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2386,80 +2498,84 @@ state 17
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 132
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 140
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 18
- 321 expr_without_variable: "(object) (T_OBJECT_CAST)" . expr
+ 332 expr_without_variable: "(bool) (T_BOOL_CAST)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2467,80 +2583,84 @@ state 18
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 133
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 141
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 19
- 320 expr_without_variable: "(array) (T_ARRAY_CAST)" . expr
+ 331 expr_without_variable: "(object) (T_OBJECT_CAST)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2548,80 +2668,84 @@ state 19
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 134
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 142
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 20
- 319 expr_without_variable: "(string) (T_STRING_CAST)" . expr
+ 330 expr_without_variable: "(array) (T_ARRAY_CAST)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2629,80 +2753,84 @@ state 20
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 135
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 143
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 21
- 318 expr_without_variable: "(double) (T_DOUBLE_CAST)" . expr
+ 329 expr_without_variable: "(string) (T_STRING_CAST)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2710,80 +2838,84 @@ state 21
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 136
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 144
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 22
- 317 expr_without_variable: "(int) (T_INT_CAST)" . expr
+ 328 expr_without_variable: "(double) (T_DOUBLE_CAST)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2791,134 +2923,223 @@ state 22
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 137
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 145
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 23
- 273 expr_without_variable: "-- (T_DEC)" . rw_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- rw_variable go to state 143
- variable go to state 144
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 327 expr_without_variable: "(int) (T_INT_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 146
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 24
- 271 expr_without_variable: "++ (T_INC)" . rw_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- rw_variable go to state 146
- variable go to state 144
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 283 expr_without_variable: "-- (T_DEC)" . rw_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ rw_variable go to state 152
+ variable go to state 153
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 25
- 329 expr_without_variable: '[' . array_pair_list ']'
+ 281 expr_without_variable: "++ (T_INC)" . rw_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ rw_variable go to state 155
+ variable go to state 153
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+
+
+state 26
+
+ 355 combined_scalar: '[' . array_pair_list ']'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -2926,85 +3147,89 @@ state 25
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 147
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 480 (array_pair_list)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 148
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- array_pair_list go to state 149
- non_empty_array_pair_list go to state 150
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 156
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 502 (array_pair_list)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 157
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ array_pair_list go to state 158
+ non_empty_array_pair_list go to state 159
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 26
+state 27
- 258 expr_without_variable: "clone (T_CLONE)" . expr
+ 268 expr_without_variable: "clone (T_CLONE)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -3012,174 +3237,184 @@ state 26
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 151
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
-
-state 27
-
- 251 new_expr: "new (T_NEW)" . class_name_reference @41 ctor_arguments
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 152
- "\\ (T_NS_SEPARATOR)" shift, and go to state 153
- '$' shift, and go to state 80
-
- namespace_name go to state 154
- class_name go to state 155
- class_name_reference go to state 156
- dynamic_class_name_reference go to state 157
- static_member go to state 106
- variable_class_name go to state 158
- base_variable go to state 159
- reference_variable go to state 160
- compound_variable go to state 112
- simple_indirect_reference go to state 161
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 160
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 28
- 324 expr_without_variable: "exit (T_EXIT)" . exit_expr
+ 261 new_expr: "new (T_NEW)" . class_name_reference $@44 ctor_arguments
- '(' shift, and go to state 162
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 161
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 162
+ '$' shift, and go to state 81
- $default reduce using rule 375 (exit_expr)
-
- exit_expr go to state 163
+ namespace_name go to state 163
+ class_name go to state 164
+ class_name_reference go to state 165
+ dynamic_class_name_reference go to state 166
+ static_member go to state 111
+ variable_class_name go to state 167
+ base_variable go to state 168
+ reference_variable go to state 169
+ compound_variable go to state 117
+ simple_indirect_reference go to state 170
state 29
- 38 unticked_statement: "if (T_IF)" . '(' expr ')' @5 statement @6 elseif_list else_single
- 41 | "if (T_IF)" . '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+ 334 expr_without_variable: "exit (T_EXIT)" . exit_expr
+
+ '(' shift, and go to state 171
+
+ $default reduce using rule 395 (exit_expr)
- '(' shift, and go to state 164
+ exit_expr go to state 172
+ parenthesis_expr go to state 173
state 30
- 383 common_scalar: "integer number (T_LNUMBER)" .
+ 38 unticked_statement: "if (T_IF)" . parenthesis_expr $@5 statement $@6 elseif_list else_single
+ 41 | "if (T_IF)" . parenthesis_expr ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- $default reduce using rule 383 (common_scalar)
+ '(' shift, and go to state 174
+
+ parenthesis_expr go to state 175
state 31
- 384 common_scalar: "floating-point number (T_DNUMBER)" .
+ 403 common_scalar: "integer number (T_LNUMBER)" .
- $default reduce using rule 384 (common_scalar)
+ $default reduce using rule 403 (common_scalar)
state 32
- 5 namespace_name: "identifier (T_STRING)" .
- 34 statement: "identifier (T_STRING)" . ':'
+ 404 common_scalar: "floating-point number (T_DNUMBER)" .
- ':' shift, and go to state 165
-
- $default reduce using rule 5 (namespace_name)
+ $default reduce using rule 404 (common_scalar)
state 33
- 406 scalar: "variable name (T_STRING_VARNAME)" .
+ 5 namespace_name: "identifier (T_STRING)" .
+ 34 statement: "identifier (T_STRING)" . ':'
- $default reduce using rule 406 (scalar)
+ ':' shift, and go to state 176
+
+ $default reduce using rule 5 (namespace_name)
state 34
- 460 compound_variable: "variable (T_VARIABLE)" .
+ 426 scalar: "variable name (T_STRING_VARNAME)" .
- $default reduce using rule 460 (compound_variable)
+ $default reduce using rule 426 (scalar)
state 35
- 64 unticked_statement: T_INLINE_HTML .
+ 482 compound_variable: "variable (T_VARIABLE)" .
- $default reduce using rule 64 (unticked_statement)
+ $default reduce using rule 482 (compound_variable)
state 36
- 385 common_scalar: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" .
+ 65 unticked_statement: T_INLINE_HTML .
- $default reduce using rule 385 (common_scalar)
+ $default reduce using rule 65 (unticked_statement)
state 37
- 63 unticked_statement: "echo (T_ECHO)" . echo_expr_list ';'
+ 353 combined_scalar_offset: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" . '[' dim_offset ']'
+ 405 common_scalar: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" .
+
+ '[' shift, and go to state 177
+
+ $default reduce using rule 405 (common_scalar)
+
+
+state 38
+
+ 64 unticked_statement: "echo (T_ECHO)" . echo_expr_list ';'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -3187,127 +3422,135 @@ state 37
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- echo_expr_list go to state 166
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 167
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
-
-state 38
-
- 47 unticked_statement: "do (T_DO)" . @11 statement "while (T_WHILE)" '(' @12 expr ')' ';'
-
- $default reduce using rule 45 (@11)
-
- @11 go to state 168
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ echo_expr_list go to state 178
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 179
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 39
- 44 unticked_statement: "while (T_WHILE)" . '(' @9 expr ')' @10 while_statement
+ 47 unticked_statement: "do (T_DO)" . $@11 statement "while (T_WHILE)" $@12 parenthesis_expr ';'
+
+ $default reduce using rule 45 ($@11)
- '(' shift, and go to state 169
+ $@11 go to state 180
state 40
- 51 unticked_statement: "for (T_FOR)" . '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
+ 44 unticked_statement: "while (T_WHILE)" . $@9 parenthesis_expr @10 while_statement
- '(' shift, and go to state 170
+ $default reduce using rule 42 ($@9)
+
+ $@9 go to state 181
state 41
- 69 unticked_statement: "foreach (T_FOREACH)" . '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
- 72 | "foreach (T_FOREACH)" . '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
+ 51 unticked_statement: "for (T_FOR)" . '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
- '(' shift, and go to state 171
+ '(' shift, and go to state 182
state 42
- 74 unticked_statement: "declare (T_DECLARE)" . @21 '(' declare_list ')' declare_statement
+ 70 unticked_statement: "foreach (T_FOREACH)" . '(' variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
+ 73 | "foreach (T_FOREACH)" . '(' expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' $@20 foreach_statement
- $default reduce using rule 73 (@21)
-
- @21 go to state 172
+ '(' shift, and go to state 183
state 43
- 53 unticked_statement: "switch (T_SWITCH)" . '(' expr ')' @16 switch_case_list
+ 75 unticked_statement: "declare (T_DECLARE)" . $@21 '(' declare_list ')' declare_statement
+
+ $default reduce using rule 74 ($@21)
- '(' shift, and go to state 173
+ $@21 go to state 184
state 44
+ 53 unticked_statement: "switch (T_SWITCH)" . parenthesis_expr $@16 switch_case_list
+
+ '(' shift, and go to state 174
+
+ parenthesis_expr go to state 185
+
+
+state 45
+
54 unticked_statement: "break (T_BREAK)" . ';'
55 | "break (T_BREAK)" . expr ';'
@@ -3317,79 +3560,83 @@ state 44
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 174
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 175
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 186
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 187
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 45
+state 46
56 unticked_statement: "continue (T_CONTINUE)" . ';'
57 | "continue (T_CONTINUE)" . expr ';'
@@ -3400,100 +3647,104 @@ state 45
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 176
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 177
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 188
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 189
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 46
+state 47
- 83 unticked_statement: "goto (T_GOTO)" . "identifier (T_STRING)" ';'
+ 81 unticked_statement: "goto (T_GOTO)" . "identifier (T_STRING)" ';'
- "identifier (T_STRING)" shift, and go to state 178
+ "identifier (T_STRING)" shift, and go to state 190
-state 47
+state 48
- 336 function: "function (T_FUNCTION)" .
+ 356 function: "function (T_FUNCTION)" .
- $default reduce using rule 336 (function)
+ $default reduce using rule 356 (function)
-state 48
+state 49
25 constant_declaration: "const (T_CONST)" . "identifier (T_STRING)" '=' static_scalar
- "identifier (T_STRING)" shift, and go to state 179
+ "identifier (T_STRING)" shift, and go to state 191
-state 49
+state 50
58 unticked_statement: "return (T_RETURN)" . ';'
59 | "return (T_RETURN)" . expr_without_variable ';'
@@ -3505,90 +3756,94 @@ state 49
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 180
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 181
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 183
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 192
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 193
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 195
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 50
+state 51
- 81 unticked_statement: "try (T_TRY)" . @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 79 unticked_statement: "try (T_TRY)" . $@22 '{' inner_statement_list '}' catch_statement $@23 finally_statement
- $default reduce using rule 76 (@22)
+ $default reduce using rule 77 ($@22)
- @22 go to state 184
+ $@22 go to state 196
-state 51
+state 52
- 82 unticked_statement: "throw (T_THROW)" . expr ';'
+ 80 unticked_statement: "throw (T_THROW)" . expr ';'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -3596,295 +3851,301 @@ state 51
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 185
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
-
-state 52
-
- 16 top_statement: "use (T_USE)" . use_declarations ';'
-
- "identifier (T_STRING)" shift, and go to state 116
- "\\ (T_NS_SEPARATOR)" shift, and go to state 186
-
- namespace_name go to state 187
- use_declarations go to state 188
- use_declaration go to state 189
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 197
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 53
- 61 unticked_statement: "global (T_GLOBAL)" . global_var_list ';'
+ 16 top_statement: "use (T_USE)" . use_declarations ';'
- "variable (T_VARIABLE)" shift, and go to state 190
- '$' shift, and go to state 191
+ "identifier (T_STRING)" shift, and go to state 122
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 198
- global_var_list go to state 192
- global_var go to state 193
+ namespace_name go to state 199
+ use_declarations go to state 200
+ use_declaration go to state 201
state 54
- 107 class_entry_type: "final (T_FINAL)" . "class (T_CLASS)"
+ 62 unticked_statement: "global (T_GLOBAL)" . global_var_list ';'
+
+ "variable (T_VARIABLE)" shift, and go to state 202
+ '$' shift, and go to state 203
- "class (T_CLASS)" shift, and go to state 194
+ global_var_list go to state 204
+ global_var go to state 205
state 55
- 105 class_entry_type: "abstract (T_ABSTRACT)" . "class (T_CLASS)"
+ 114 class_entry_type: "final (T_FINAL)" . "class (T_CLASS)"
- "class (T_CLASS)" shift, and go to state 195
+ "class (T_CLASS)" shift, and go to state 206
state 56
- 62 unticked_statement: "static (T_STATIC)" . static_var_list ';'
- 335 expr_without_variable: "static (T_STATIC)" . function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- 359 class_name: "static (T_STATIC)" .
+ 112 class_entry_type: "abstract (T_ABSTRACT)" . "class (T_CLASS)"
- "variable (T_VARIABLE)" shift, and go to state 196
- "function (T_FUNCTION)" shift, and go to state 47
+ "class (T_CLASS)" shift, and go to state 207
- $default reduce using rule 359 (class_name)
- static_var_list go to state 197
- function go to state 198
+state 57
+ 63 unticked_statement: "static (T_STATIC)" . static_var_list ';'
+ 346 expr_without_variable: "static (T_STATIC)" . function is_reference @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 379 class_name: "static (T_STATIC)" .
-state 57
+ "variable (T_VARIABLE)" shift, and go to state 208
+ "function (T_FUNCTION)" shift, and go to state 48
- 66 unticked_statement: "unset (T_UNSET)" . '(' unset_variables ')' ';'
+ $default reduce using rule 379 (class_name)
- '(' shift, and go to state 199
+ static_var_list go to state 209
+ function go to state 210
state 58
- 504 internal_functions_in_yacc: "isset (T_ISSET)" . '(' isset_variables ')'
+ 67 unticked_statement: "unset (T_UNSET)" . '(' unset_variables ')' ';'
- '(' shift, and go to state 200
+ '(' shift, and go to state 211
state 59
- 505 internal_functions_in_yacc: "empty (T_EMPTY)" . '(' variable ')'
+ 526 internal_functions_in_yacc: "isset (T_ISSET)" . '(' isset_variables ')'
- '(' shift, and go to state 201
+ '(' shift, and go to state 212
state 60
- 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" . '(' ')' ';'
+ 527 internal_functions_in_yacc: "empty (T_EMPTY)" . '(' variable ')'
+ 528 | "empty (T_EMPTY)" . '(' expr_without_variable ')'
- '(' shift, and go to state 202
+ '(' shift, and go to state 213
state 61
- 104 class_entry_type: "class (T_CLASS)" .
+ 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" . '(' ')' ';'
- $default reduce using rule 104 (class_entry_type)
+ '(' shift, and go to state 214
state 62
- 106 class_entry_type: "trait (T_TRAIT)" .
+ 111 class_entry_type: "class (T_CLASS)" .
- $default reduce using rule 106 (class_entry_type)
+ $default reduce using rule 111 (class_entry_type)
state 63
- 110 interface_entry: "interface (T_INTERFACE)" .
+ 113 class_entry_type: "trait (T_TRAIT)" .
- $default reduce using rule 110 (interface_entry)
+ $default reduce using rule 113 (class_entry_type)
state 64
- 253 expr_without_variable: "list (T_LIST)" . '(' @42 assignment_list ')' '=' expr
+ 117 interface_entry: "interface (T_INTERFACE)" .
- '(' shift, and go to state 203
+ $default reduce using rule 117 (interface_entry)
state 65
- 328 expr_without_variable: "array (T_ARRAY)" . '(' array_pair_list ')'
+ 263 expr_without_variable: "list (T_LIST)" . '(' $@45 assignment_list ')' '=' expr
- '(' shift, and go to state 204
+ '(' shift, and go to state 215
state 66
- 414 scalar: "__CLASS__ (T_CLASS_C)" .
+ 354 combined_scalar: "array (T_ARRAY)" . '(' array_pair_list ')'
- $default reduce using rule 414 (scalar)
+ '(' shift, and go to state 216
state 67
- 389 common_scalar: "__TRAIT__ (T_TRAIT_C)" .
+ 434 scalar: "__CLASS__ (T_CLASS_C)" .
- $default reduce using rule 389 (common_scalar)
+ $default reduce using rule 434 (scalar)
state 68
- 390 common_scalar: "__METHOD__ (T_METHOD_C)" .
+ 409 common_scalar: "__TRAIT__ (T_TRAIT_C)" .
- $default reduce using rule 390 (common_scalar)
+ $default reduce using rule 409 (common_scalar)
state 69
- 391 common_scalar: "__FUNCTION__ (T_FUNC_C)" .
+ 410 common_scalar: "__METHOD__ (T_METHOD_C)" .
- $default reduce using rule 391 (common_scalar)
+ $default reduce using rule 410 (common_scalar)
state 70
- 386 common_scalar: "__LINE__ (T_LINE)" .
+ 411 common_scalar: "__FUNCTION__ (T_FUNC_C)" .
- $default reduce using rule 386 (common_scalar)
+ $default reduce using rule 411 (common_scalar)
state 71
- 387 common_scalar: "__FILE__ (T_FILE)" .
+ 406 common_scalar: "__LINE__ (T_LINE)" .
- $default reduce using rule 387 (common_scalar)
+ $default reduce using rule 406 (common_scalar)
state 72
- 393 common_scalar: "heredoc start (T_START_HEREDOC)" . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
- 394 | "heredoc start (T_START_HEREDOC)" . "heredoc end (T_END_HEREDOC)"
- 413 scalar: "heredoc start (T_START_HEREDOC)" . encaps_list "heredoc end (T_END_HEREDOC)"
+ 407 common_scalar: "__FILE__ (T_FILE)" .
- "variable (T_VARIABLE)" shift, and go to state 205
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 206
- "heredoc end (T_END_HEREDOC)" shift, and go to state 207
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
-
- encaps_list go to state 210
- encaps_var go to state 211
+ $default reduce using rule 407 (common_scalar)
state 73
- 11 top_statement: "namespace (T_NAMESPACE)" . namespace_name ';'
- 13 | "namespace (T_NAMESPACE)" . namespace_name '{' @2 top_statement_list '}'
- 15 | "namespace (T_NAMESPACE)" . '{' @3 top_statement_list '}'
- 346 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- 409 scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 413 common_scalar: "heredoc start (T_START_HEREDOC)" . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
+ 414 | "heredoc start (T_START_HEREDOC)" . "heredoc end (T_END_HEREDOC)"
+ 433 scalar: "heredoc start (T_START_HEREDOC)" . encaps_list "heredoc end (T_END_HEREDOC)"
- "identifier (T_STRING)" shift, and go to state 116
- "\\ (T_NS_SEPARATOR)" shift, and go to state 212
- '{' shift, and go to state 213
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 218
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 219
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- namespace_name go to state 214
+ encaps_list go to state 222
+ encaps_var go to state 223
state 74
- 392 common_scalar: "__NAMESPACE__ (T_NS_C)" .
+ 11 top_statement: "namespace (T_NAMESPACE)" . namespace_name ';'
+ 13 | "namespace (T_NAMESPACE)" . namespace_name '{' $@2 top_statement_list '}'
+ 15 | "namespace (T_NAMESPACE)" . '{' $@3 top_statement_list '}'
+ 366 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 429 scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 224
+ '{' shift, and go to state 225
- $default reduce using rule 392 (common_scalar)
+ namespace_name go to state 226
state 75
- 388 common_scalar: "__DIR__ (T_DIR)" .
+ 412 common_scalar: "__NAMESPACE__ (T_NS_C)" .
- $default reduce using rule 388 (common_scalar)
+ $default reduce using rule 412 (common_scalar)
state 76
- 348 function_call: "\\ (T_NS_SEPARATOR)" . namespace_name '(' @57 function_call_parameter_list ')'
- 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
- 410 scalar: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 408 common_scalar: "__DIR__ (T_DIR)" .
- "identifier (T_STRING)" shift, and go to state 116
-
- namespace_name go to state 215
+ $default reduce using rule 408 (common_scalar)
state 77
- 307 expr_without_variable: '(' . expr ')'
- 310 | '(' . new_expr ')' @48 instance_call
+ 368 function_call: "\\ (T_NS_SEPARATOR)" . namespace_name @60 function_call_parameter_list
+ 382 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 430 scalar: "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 122
+
+ namespace_name go to state 227
+
+
+state 78
+
+ 320 expr_without_variable: '(' . new_expr ')' @51 instance_call
+ 445 parenthesis_expr: '(' . expr ')'
+ 446 | '(' . yield_expr ')'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -3892,1694 +4153,1866 @@ state 77
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 216
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 217
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 228
+ expr_without_variable go to state 96
+ yield_expr go to state 229
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 230
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 78
+state 79
- 75 unticked_statement: ';' .
+ 76 unticked_statement: ';' .
- $default reduce using rule 75 (unticked_statement)
+ $default reduce using rule 76 (unticked_statement)
-state 79
+state 80
35 unticked_statement: '{' . inner_statement_list '}'
$default reduce using rule 28 (inner_statement_list)
- inner_statement_list go to state 218
+ inner_statement_list go to state 231
-state 80
+state 81
- 461 compound_variable: '$' . '{' expr '}'
- 472 simple_indirect_reference: '$' .
+ 483 compound_variable: '$' . '{' expr '}'
+ 494 simple_indirect_reference: '$' .
- '{' shift, and go to state 219
+ '{' shift, and go to state 232
- $default reduce using rule 472 (simple_indirect_reference)
+ $default reduce using rule 494 (simple_indirect_reference)
-state 81
+state 82
- 330 expr_without_variable: '`' . backticks_expr '`'
+ 340 expr_without_variable: '`' . backticks_expr '`'
- "variable (T_VARIABLE)" shift, and go to state 205
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 220
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 233
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- $default reduce using rule 378 (backticks_expr)
+ $default reduce using rule 398 (backticks_expr)
- backticks_expr go to state 221
- encaps_list go to state 222
- encaps_var go to state 211
+ backticks_expr go to state 234
+ encaps_list go to state 235
+ encaps_var go to state 223
-state 82
+state 83
- 412 scalar: '"' . encaps_list '"'
+ 432 scalar: '"' . encaps_list '"'
- "variable (T_VARIABLE)" shift, and go to state 205
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 223
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 236
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- encaps_list go to state 224
- encaps_var go to state 211
+ encaps_list go to state 237
+ encaps_var go to state 223
-state 83
+state 84
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 344 function_call: namespace_name . '(' @55 function_call_parameter_list ')'
- 360 class_name: namespace_name .
- 408 scalar: namespace_name .
+ 364 function_call: namespace_name . @58 function_call_parameter_list
+ 380 class_name: namespace_name .
+ 428 scalar: namespace_name .
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- '(' shift, and go to state 226
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 360 (class_name)
- $default reduce using rule 408 (scalar)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 380 (class_name)
+ '(' reduce using rule 363 (@58)
+ $default reduce using rule 428 (scalar)
+ @58 go to state 239
-state 84
- 3 top_statement_list: top_statement_list @1 top_statement .
+state 85
+
+ 3 top_statement_list: top_statement_list $@1 top_statement .
$default reduce using rule 3 (top_statement_list)
-state 85
+state 86
17 top_statement: constant_declaration . ';'
24 constant_declaration: constant_declaration . ',' "identifier (T_STRING)" '=' static_scalar
- ',' shift, and go to state 227
- ';' shift, and go to state 228
+ ',' shift, and go to state 240
+ ';' shift, and go to state 241
-state 86
+state 87
7 top_statement: statement .
$default reduce using rule 7 (top_statement)
-state 87
+state 88
33 statement: unticked_statement .
$default reduce using rule 33 (statement)
-state 88
+state 89
8 top_statement: function_declaration_statement .
$default reduce using rule 8 (top_statement)
-state 89
+state 90
9 top_statement: class_declaration_statement .
$default reduce using rule 9 (top_statement)
-state 90
-
- 94 function_declaration_statement: unticked_function_declaration_statement .
-
- $default reduce using rule 94 (function_declaration_statement)
-
-
state 91
- 95 class_declaration_statement: unticked_class_declaration_statement .
+ 101 function_declaration_statement: unticked_function_declaration_statement .
- $default reduce using rule 95 (class_declaration_statement)
+ $default reduce using rule 101 (function_declaration_statement)
state 92
- 101 unticked_class_declaration_statement: class_entry_type . "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list '}'
+ 102 class_declaration_statement: unticked_class_declaration_statement .
- "identifier (T_STRING)" shift, and go to state 229
+ $default reduce using rule 102 (class_declaration_statement)
state 93
- 103 unticked_class_declaration_statement: interface_entry . "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list '}'
+ 108 unticked_class_declaration_statement: class_entry_type . "identifier (T_STRING)" extends_from $@32 implements_list '{' class_statement_list '}'
- "identifier (T_STRING)" shift, and go to state 230
+ "identifier (T_STRING)" shift, and go to state 242
state 94
- 308 expr_without_variable: new_expr .
+ 110 unticked_class_declaration_statement: interface_entry . "identifier (T_STRING)" $@33 interface_extends_list '{' class_statement_list '}'
- $default reduce using rule 308 (expr_without_variable)
+ "identifier (T_STRING)" shift, and go to state 243
state 95
- 424 expr: expr_without_variable .
+ 318 expr_without_variable: new_expr .
- $default reduce using rule 424 (expr)
+ $default reduce using rule 318 (expr_without_variable)
state 96
- 99 unticked_function_declaration_statement: function . is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}'
- 333 expr_without_variable: function . is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
-
- '&' shift, and go to state 231
+ 444 expr: expr_without_variable .
- $default reduce using rule 96 (is_reference)
-
- is_reference go to state 232
+ $default reduce using rule 444 (expr)
state 97
- 450 array_function_dereference: function_call . @69 '[' dim_offset ']'
- 453 base_variable_with_function_calls: function_call .
-
- '[' reduce using rule 449 (@69)
- $default reduce using rule 453 (base_variable_with_function_calls)
+ 61 unticked_statement: yield_expr . ';'
- @69 go to state 233
+ ';' shift, and go to state 244
state 98
- 350 function_call: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')'
- 352 | class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')'
- 445 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- 514 class_constant: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 338 expr_without_variable: combined_scalar_offset .
+ 352 combined_scalar_offset: combined_scalar_offset . '[' dim_offset ']'
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 234
+ '[' shift, and go to state 245
+
+ $default reduce using rule 338 (expr_without_variable)
state 99
- 411 scalar: common_scalar .
+ 339 expr_without_variable: combined_scalar .
+ 351 combined_scalar_offset: combined_scalar . '[' dim_offset ']'
+
+ '[' shift, and go to state 246
- $default reduce using rule 411 (scalar)
+ $default reduce using rule 339 (expr_without_variable)
state 100
- 327 expr_without_variable: scalar .
+ 106 unticked_function_declaration_statement: function . is_reference "identifier (T_STRING)" $@31 '(' parameter_list ')' '{' inner_statement_list '}'
+ 344 expr_without_variable: function . is_reference @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 327 (expr_without_variable)
+ '&' shift, and go to state 247
+
+ $default reduce using rule 103 (is_reference)
+
+ is_reference go to state 248
state 101
- 65 unticked_statement: expr . ';'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ';' shift, and go to state 261
+ 472 array_function_dereference: function_call . $@72 '[' dim_offset ']'
+ 475 base_variable_with_function_calls: function_call .
+
+ '[' reduce using rule 471 ($@72)
+ $default reduce using rule 475 (base_variable_with_function_calls)
+
+ $@72 go to state 249
state 102
- 423 expr: r_variable .
+ 370 function_call: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name @61 function_call_parameter_list
+ 372 | class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@62 function_call_parameter_list
+ 467 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 539 class_constant: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 423 (expr)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 250
state 103
- 270 expr_without_variable: rw_variable . "++ (T_INC)"
- 272 | rw_variable . "-- (T_DEC)"
+ 431 scalar: common_scalar .
- "-- (T_DEC)" shift, and go to state 262
- "++ (T_INC)" shift, and go to state 263
+ $default reduce using rule 431 (scalar)
state 104
- 254 expr_without_variable: variable . '=' expr
- 255 | variable . '=' '&' variable
- 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
- 259 | variable . "+= (T_PLUS_EQUAL)" expr
- 260 | variable . "-= (T_MINUS_EQUAL)" expr
- 261 | variable . "*= (T_MUL_EQUAL)" expr
- 262 | variable . "/= (T_DIV_EQUAL)" expr
- 263 | variable . ".= (T_CONCAT_EQUAL)" expr
- 264 | variable . "%= (T_MOD_EQUAL)" expr
- 265 | variable . "&= (T_AND_EQUAL)" expr
- 266 | variable . "|= (T_OR_EQUAL)" expr
- 267 | variable . "^= (T_XOR_EQUAL)" expr
- 268 | variable . "<<= (T_SL_EQUAL)" expr
- 269 | variable . ">>= (T_SR_EQUAL)" expr
- 425 r_variable: variable .
- 427 rw_variable: variable .
-
- '=' shift, and go to state 264
- ">>= (T_SR_EQUAL)" shift, and go to state 265
- "<<= (T_SL_EQUAL)" shift, and go to state 266
- "^= (T_XOR_EQUAL)" shift, and go to state 267
- "|= (T_OR_EQUAL)" shift, and go to state 268
- "&= (T_AND_EQUAL)" shift, and go to state 269
- "%= (T_MOD_EQUAL)" shift, and go to state 270
- ".= (T_CONCAT_EQUAL)" shift, and go to state 271
- "/= (T_DIV_EQUAL)" shift, and go to state 272
- "*= (T_MUL_EQUAL)" shift, and go to state 273
- "-= (T_MINUS_EQUAL)" shift, and go to state 274
- "+= (T_PLUS_EQUAL)" shift, and go to state 275
-
- "-- (T_DEC)" reduce using rule 427 (rw_variable)
- "++ (T_INC)" reduce using rule 427 (rw_variable)
- $default reduce using rule 425 (r_variable)
+ 337 expr_without_variable: scalar .
+ $default reduce using rule 337 (expr_without_variable)
-state 105
- 358 function_call: variable_without_objects . '(' @62 function_call_parameter_list ')'
+state 105
- '(' shift, and go to state 276
+ 66 unticked_statement: expr . ';'
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ';' shift, and go to state 277
state 106
- 456 base_variable: static_member .
+ 317 expr_without_variable: parenthesis_expr .
- $default reduce using rule 456 (base_variable)
+ $default reduce using rule 317 (expr_without_variable)
state 107
- 354 function_call: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')'
- 356 | variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')'
- 446 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- 515 class_constant: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 443 expr: r_variable .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 277
+ $default reduce using rule 443 (expr)
state 108
- 448 array_function_dereference: array_function_dereference . '[' dim_offset ']'
- 452 base_variable_with_function_calls: array_function_dereference .
+ 280 expr_without_variable: rw_variable . "++ (T_INC)"
+ 282 | rw_variable . "-- (T_DEC)"
- '[' shift, and go to state 278
-
- $default reduce using rule 452 (base_variable_with_function_calls)
+ "-- (T_DEC)" shift, and go to state 278
+ "++ (T_INC)" shift, and go to state 279
state 109
- 430 variable: base_variable_with_function_calls . "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not variable_properties
- 431 | base_variable_with_function_calls .
-
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 279
-
- $default reduce using rule 431 (variable)
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ $default reduce using rule 447 (r_variable)
state 110
- 451 base_variable_with_function_calls: base_variable .
+ 378 function_call: variable_without_objects . $@65 function_call_parameter_list
- $default reduce using rule 451 (base_variable_with_function_calls)
+ $default reduce using rule 377 ($@65)
+ $@65 go to state 292
-state 111
- 443 variable_without_objects: reference_variable .
- 447 variable_class_name: reference_variable .
- 454 base_variable: reference_variable .
- 457 reference_variable: reference_variable . '[' dim_offset ']'
- 458 | reference_variable . '{' expr '}'
+state 111
- '[' shift, and go to state 280
- '{' shift, and go to state 281
+ 478 base_variable: static_member .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 447 (variable_class_name)
- '(' reduce using rule 443 (variable_without_objects)
- $default reduce using rule 454 (base_variable)
+ $default reduce using rule 478 (base_variable)
state 112
- 459 reference_variable: compound_variable .
+ 374 function_call: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name $@63 function_call_parameter_list
+ 376 | variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@64 function_call_parameter_list
+ 468 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 540 class_constant: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 459 (reference_variable)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 293
state 113
- 444 variable_without_objects: simple_indirect_reference . reference_variable
- 455 base_variable: simple_indirect_reference . reference_variable
- 473 simple_indirect_reference: simple_indirect_reference . '$'
+ 470 array_function_dereference: array_function_dereference . '[' dim_offset ']'
+ 474 base_variable_with_function_calls: array_function_dereference .
- "variable (T_VARIABLE)" shift, and go to state 34
- '$' shift, and go to state 282
+ '[' shift, and go to state 294
- reference_variable go to state 283
- compound_variable go to state 112
+ $default reduce using rule 474 (base_variable_with_function_calls)
state 114
- 316 expr_without_variable: internal_functions_in_yacc .
+ 452 variable: base_variable_with_function_calls . "-> (T_OBJECT_OPERATOR)" $@68 object_property $@69 method_or_not variable_properties
+ 453 | base_variable_with_function_calls .
- $default reduce using rule 316 (expr_without_variable)
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 295
+
+ $default reduce using rule 453 (variable)
state 115
- 407 scalar: class_constant .
+ 473 base_variable_with_function_calls: base_variable .
- $default reduce using rule 407 (scalar)
+ $default reduce using rule 473 (base_variable_with_function_calls)
state 116
- 5 namespace_name: "identifier (T_STRING)" .
-
- $default reduce using rule 5 (namespace_name)
+ 465 variable_without_objects: reference_variable .
+ 469 variable_class_name: reference_variable .
+ 476 base_variable: reference_variable .
+ 479 reference_variable: reference_variable . '[' dim_offset ']'
+ 480 | reference_variable . '{' expr '}'
+ '[' shift, and go to state 296
+ '{' shift, and go to state 297
-state 117
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 469 (variable_class_name)
+ '(' reduce using rule 465 (variable_without_objects)
+ $default reduce using rule 476 (base_variable)
- 335 expr_without_variable: "static (T_STATIC)" . function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- 359 class_name: "static (T_STATIC)" .
- "function (T_FUNCTION)" shift, and go to state 47
+state 117
- $default reduce using rule 359 (class_name)
+ 481 reference_variable: compound_variable .
- function go to state 198
+ $default reduce using rule 481 (reference_variable)
state 118
- 346 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- 409 scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 466 variable_without_objects: simple_indirect_reference . reference_variable
+ 477 base_variable: simple_indirect_reference . reference_variable
+ 495 simple_indirect_reference: simple_indirect_reference . '$'
- "\\ (T_NS_SEPARATOR)" shift, and go to state 212
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '$' shift, and go to state 298
+ reference_variable go to state 299
+ compound_variable go to state 117
-state 119
-
- 333 expr_without_variable: function . is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- '&' shift, and go to state 231
+state 119
- $default reduce using rule 96 (is_reference)
+ 326 expr_without_variable: internal_functions_in_yacc .
- is_reference go to state 284
+ $default reduce using rule 326 (expr_without_variable)
state 120
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 510 internal_functions_in_yacc: "require_once (T_REQUIRE_ONCE)" expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 510 (internal_functions_in_yacc)
+ 427 scalar: class_constant .
+
+ $default reduce using rule 427 (scalar)
state 121
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 509 internal_functions_in_yacc: "require (T_REQUIRE)" expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 509 (internal_functions_in_yacc)
+ 342 expr_without_variable: "yield (T_YIELD)" .
+
+ $default reduce using rule 342 (expr_without_variable)
state 122
- 508 internal_functions_in_yacc: "eval (T_EVAL)" '(' . expr ')'
+ 5 namespace_name: "identifier (T_STRING)" .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 285
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 5 (namespace_name)
state 123
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 507 internal_functions_in_yacc: "include_once (T_INCLUDE_ONCE)" expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 507 (internal_functions_in_yacc)
+ 346 expr_without_variable: "static (T_STATIC)" . function is_reference @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 379 class_name: "static (T_STATIC)" .
+
+ "function (T_FUNCTION)" shift, and go to state 48
+
+ $default reduce using rule 379 (class_name)
+
+ function go to state 210
state 124
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 506 internal_functions_in_yacc: "include (T_INCLUDE)" expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 506 (internal_functions_in_yacc)
+ 366 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 429 scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 224
state 125
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 331 | "print (T_PRINT)" expr .
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 344 expr_without_variable: function . is_reference @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 331 (expr_without_variable)
+ '&' shift, and go to state 247
+ $default reduce using rule 103 (is_reference)
-state 126
+ is_reference go to state 300
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 294 | '+' expr .
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- $default reduce using rule 294 (expr_without_variable)
+state 126
+
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 533 internal_functions_in_yacc: "require_once (T_REQUIRE_ONCE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 533 (internal_functions_in_yacc)
state 127
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 295 | '-' expr .
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- $default reduce using rule 295 (expr_without_variable)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 532 internal_functions_in_yacc: "require (T_REQUIRE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 532 (internal_functions_in_yacc)
state 128
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 296 | '!' expr .
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 531 internal_functions_in_yacc: "eval (T_EVAL)" '(' . expr ')'
- $default reduce using rule 296 (expr_without_variable)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 301
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 129
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 297 | '~' expr .
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- $default reduce using rule 297 (expr_without_variable)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 530 internal_functions_in_yacc: "include_once (T_INCLUDE_ONCE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 530 (internal_functions_in_yacc)
state 130
- 326 expr_without_variable: '@' @52 . expr
-
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 286
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 529 internal_functions_in_yacc: "include (T_INCLUDE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 529 (internal_functions_in_yacc)
state 131
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 323 | "(unset) (T_UNSET_CAST)" expr .
-
- $default reduce using rule 323 (expr_without_variable)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 341 | "print (T_PRINT)" expr .
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 341 (expr_without_variable)
state 132
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 322 | "(bool) (T_BOOL_CAST)" expr .
-
- $default reduce using rule 322 (expr_without_variable)
+ 347 yield_expr: "yield (T_YIELD)" expr_without_variable .
+ 444 expr: expr_without_variable .
+
+ ')' reduce using rule 347 (yield_expr)
+ ';' reduce using rule 347 (yield_expr)
+ $default reduce using rule 444 (expr)
state 133
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 321 | "(object) (T_OBJECT_CAST)" expr .
-
- $default reduce using rule 321 (expr_without_variable)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 349 yield_expr: "yield (T_YIELD)" expr . "=> (T_DOUBLE_ARROW)" expr_without_variable
+ 350 | "yield (T_YIELD)" expr . "=> (T_DOUBLE_ARROW)" variable
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 302
state 134
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 320 | "(array) (T_ARRAY_CAST)" expr .
-
- $default reduce using rule 320 (expr_without_variable)
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 348 yield_expr: "yield (T_YIELD)" variable .
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ ')' reduce using rule 348 (yield_expr)
+ ';' reduce using rule 348 (yield_expr)
+ $default reduce using rule 447 (r_variable)
state 135
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 319 | "(string) (T_STRING_CAST)" expr .
-
- $default reduce using rule 319 (expr_without_variable)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 304 | '+' expr .
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ $default reduce using rule 304 (expr_without_variable)
state 136
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 318 | "(double) (T_DOUBLE_CAST)" expr .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 305 | '-' expr .
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
- $default reduce using rule 318 (expr_without_variable)
+ $default reduce using rule 305 (expr_without_variable)
state 137
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 317 | "(int) (T_INT_CAST)" expr .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 306 | '!' expr .
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 317 (expr_without_variable)
+ $default reduce using rule 306 (expr_without_variable)
state 138
- 359 class_name: "static (T_STATIC)" .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 307 | '~' expr .
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
- $default reduce using rule 359 (class_name)
+ $default reduce using rule 307 (expr_without_variable)
state 139
- 346 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 336 expr_without_variable: '@' $@55 . expr
- "\\ (T_NS_SEPARATOR)" shift, and go to state 287
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 303
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 140
- 348 function_call: "\\ (T_NS_SEPARATOR)" . namespace_name '(' @57 function_call_parameter_list ')'
- 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 333 | "(unset) (T_UNSET_CAST)" expr .
- "identifier (T_STRING)" shift, and go to state 116
-
- namespace_name go to state 288
+ $default reduce using rule 333 (expr_without_variable)
state 141
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 344 function_call: namespace_name . '(' @55 function_call_parameter_list ')'
- 360 class_name: namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- '(' shift, and go to state 226
-
- $default reduce using rule 360 (class_name)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 332 | "(bool) (T_BOOL_CAST)" expr .
+
+ $default reduce using rule 332 (expr_without_variable)
state 142
- 350 function_call: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')'
- 352 | class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')'
- 445 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 331 | "(object) (T_OBJECT_CAST)" expr .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 289
+ $default reduce using rule 331 (expr_without_variable)
state 143
- 273 expr_without_variable: "-- (T_DEC)" rw_variable .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 330 | "(array) (T_ARRAY_CAST)" expr .
- $default reduce using rule 273 (expr_without_variable)
+ $default reduce using rule 330 (expr_without_variable)
state 144
- 427 rw_variable: variable .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 329 | "(string) (T_STRING_CAST)" expr .
- $default reduce using rule 427 (rw_variable)
+ $default reduce using rule 329 (expr_without_variable)
state 145
- 354 function_call: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')'
- 356 | variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')'
- 446 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 328 | "(double) (T_DOUBLE_CAST)" expr .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 290
+ $default reduce using rule 328 (expr_without_variable)
state 146
- 271 expr_without_variable: "++ (T_INC)" rw_variable .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 327 | "(int) (T_INT_CAST)" expr .
- $default reduce using rule 271 (expr_without_variable)
+ $default reduce using rule 327 (expr_without_variable)
state 147
- 489 non_empty_array_pair_list: '&' . w_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- w_variable go to state 291
- variable go to state 292
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 379 class_name: "static (T_STATIC)" .
+
+ $default reduce using rule 379 (class_name)
state 148
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 484 non_empty_array_pair_list: expr . "=> (T_DOUBLE_ARROW)" expr
- 485 | expr .
- 488 | expr . "=> (T_DOUBLE_ARROW)" '&' w_variable
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- "=> (T_DOUBLE_ARROW)" shift, and go to state 293
-
- $default reduce using rule 485 (non_empty_array_pair_list)
+ 366 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 304
state 149
- 329 expr_without_variable: '[' array_pair_list . ']'
+ 368 function_call: "\\ (T_NS_SEPARATOR)" . namespace_name @60 function_call_parameter_list
+ 382 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 122
- ']' shift, and go to state 294
+ namespace_name go to state 305
state 150
- 481 array_pair_list: non_empty_array_pair_list . possible_comma
- 482 non_empty_array_pair_list: non_empty_array_pair_list . ',' expr "=> (T_DOUBLE_ARROW)" expr
- 483 | non_empty_array_pair_list . ',' expr
- 486 | non_empty_array_pair_list . ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable
- 487 | non_empty_array_pair_list . ',' '&' w_variable
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 364 function_call: namespace_name . @58 function_call_parameter_list
+ 380 class_name: namespace_name .
- ',' shift, and go to state 295
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- $default reduce using rule 417 (possible_comma)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 380 (class_name)
+ $default reduce using rule 363 (@58)
- possible_comma go to state 296
+ @58 go to state 239
state 151
- 258 expr_without_variable: "clone (T_CLONE)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- $default reduce using rule 258 (expr_without_variable)
+ 370 function_call: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name @61 function_call_parameter_list
+ 372 | class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@62 function_call_parameter_list
+ 467 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 306
state 152
- 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 283 expr_without_variable: "-- (T_DEC)" rw_variable .
- "\\ (T_NS_SEPARATOR)" shift, and go to state 297
+ $default reduce using rule 283 (expr_without_variable)
state 153
- 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
-
- "identifier (T_STRING)" shift, and go to state 116
+ 449 rw_variable: variable .
- namespace_name go to state 298
+ $default reduce using rule 449 (rw_variable)
state 154
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 360 class_name: namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ 374 function_call: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name $@63 function_call_parameter_list
+ 376 | variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@64 function_call_parameter_list
+ 468 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- $default reduce using rule 360 (class_name)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 307
state 155
- 366 class_name_reference: class_name .
- 445 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 281 expr_without_variable: "++ (T_INC)" rw_variable .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 299
-
- $default reduce using rule 366 (class_name_reference)
+ $default reduce using rule 281 (expr_without_variable)
state 156
- 251 new_expr: "new (T_NEW)" class_name_reference . @41 ctor_arguments
-
- $default reduce using rule 250 (@41)
-
- @41 go to state 300
+ 511 non_empty_array_pair_list: '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ w_variable go to state 308
+ variable go to state 309
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 157
- 367 class_name_reference: dynamic_class_name_reference .
-
- $default reduce using rule 367 (class_name_reference)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 506 non_empty_array_pair_list: expr . "=> (T_DOUBLE_ARROW)" expr
+ 507 | expr .
+ 510 | expr . "=> (T_DOUBLE_ARROW)" '&' w_variable
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 310
+
+ $default reduce using rule 507 (non_empty_array_pair_list)
state 158
- 446 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 355 combined_scalar: '[' array_pair_list . ']'
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 301
+ ']' shift, and go to state 311
state 159
- 370 dynamic_class_name_reference: base_variable . "-> (T_OBJECT_OPERATOR)" @63 object_property @64 dynamic_class_name_variable_properties
- 371 | base_variable .
+ 503 array_pair_list: non_empty_array_pair_list . possible_comma
+ 504 non_empty_array_pair_list: non_empty_array_pair_list . ',' expr "=> (T_DOUBLE_ARROW)" expr
+ 505 | non_empty_array_pair_list . ',' expr
+ 508 | non_empty_array_pair_list . ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 509 | non_empty_array_pair_list . ',' '&' w_variable
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 302
+ ',' shift, and go to state 312
- $default reduce using rule 371 (dynamic_class_name_reference)
+ $default reduce using rule 437 (possible_comma)
+ possible_comma go to state 313
-state 160
- 447 variable_class_name: reference_variable .
- 454 base_variable: reference_variable .
- 457 reference_variable: reference_variable . '[' dim_offset ']'
- 458 | reference_variable . '{' expr '}'
+state 160
- '[' shift, and go to state 280
- '{' shift, and go to state 281
+ 268 expr_without_variable: "clone (T_CLONE)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 447 (variable_class_name)
- $default reduce using rule 454 (base_variable)
+ $default reduce using rule 268 (expr_without_variable)
state 161
- 455 base_variable: simple_indirect_reference . reference_variable
- 473 simple_indirect_reference: simple_indirect_reference . '$'
+ 381 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- "variable (T_VARIABLE)" shift, and go to state 34
- '$' shift, and go to state 282
-
- reference_variable go to state 303
- compound_variable go to state 112
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 314
state 162
- 376 exit_expr: '(' . ')'
- 377 | '(' . expr ')'
+ 382 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 122
+
+ namespace_name go to state 315
+
+
+state 163
+
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 380 class_name: namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
+
+ $default reduce using rule 380 (class_name)
+
+
+state 164
+
+ 386 class_name_reference: class_name .
+ 467 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 316
+
+ $default reduce using rule 386 (class_name_reference)
+
+
+state 165
+
+ 261 new_expr: "new (T_NEW)" class_name_reference . $@44 ctor_arguments
+
+ $default reduce using rule 260 ($@44)
+
+ $@44 go to state 317
+
+
+state 166
+
+ 387 class_name_reference: dynamic_class_name_reference .
+
+ $default reduce using rule 387 (class_name_reference)
+
+
+state 167
+
+ 468 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 318
+
+
+state 168
+
+ 390 dynamic_class_name_reference: base_variable . "-> (T_OBJECT_OPERATOR)" $@66 object_property $@67 dynamic_class_name_variable_properties
+ 391 | base_variable .
+
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 319
+
+ $default reduce using rule 391 (dynamic_class_name_reference)
+
+
+state 169
+
+ 469 variable_class_name: reference_variable .
+ 476 base_variable: reference_variable .
+ 479 reference_variable: reference_variable . '[' dim_offset ']'
+ 480 | reference_variable . '{' expr '}'
+
+ '[' shift, and go to state 296
+ '{' shift, and go to state 297
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 469 (variable_class_name)
+ $default reduce using rule 476 (base_variable)
+
+
+state 170
+
+ 477 base_variable: simple_indirect_reference . reference_variable
+ 495 simple_indirect_reference: simple_indirect_reference . '$'
+
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '$' shift, and go to state 298
+
+ reference_variable go to state 320
+ compound_variable go to state 117
+
+
+state 171
+
+ 396 exit_expr: '(' . ')'
+ 445 parenthesis_expr: '(' . expr ')'
+ 446 | '(' . yield_expr ')'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -5587,89 +6020,101 @@ state 162
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ')' shift, and go to state 304
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 305
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ')' shift, and go to state 321
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 229
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 230
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 163
+state 172
- 324 expr_without_variable: "exit (T_EXIT)" exit_expr .
+ 334 expr_without_variable: "exit (T_EXIT)" exit_expr .
- $default reduce using rule 324 (expr_without_variable)
+ $default reduce using rule 334 (expr_without_variable)
-state 164
+state 173
+
+ 397 exit_expr: parenthesis_expr .
+
+ $default reduce using rule 397 (exit_expr)
- 38 unticked_statement: "if (T_IF)" '(' . expr ')' @5 statement @6 elseif_list else_single
- 41 | "if (T_IF)" '(' . expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+
+state 174
+
+ 445 parenthesis_expr: '(' . expr ')'
+ 446 | '(' . yield_expr ')'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -5677,157 +6122,262 @@ state 164
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 306
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 229
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 230
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 165
+state 175
+
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr . $@5 statement $@6 elseif_list else_single
+ 41 | "if (T_IF)" parenthesis_expr . ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+
+ ':' shift, and go to state 322
+
+ $default reduce using rule 36 ($@5)
+
+ $@5 go to state 323
+
+
+state 176
34 statement: "identifier (T_STRING)" ':' .
$default reduce using rule 34 (statement)
-state 166
+state 177
- 63 unticked_statement: "echo (T_ECHO)" echo_expr_list . ';'
- 232 echo_expr_list: echo_expr_list . ',' expr
+ 353 combined_scalar_offset: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" '[' . dim_offset ']'
- ',' shift, and go to state 307
- ';' shift, and go to state 308
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 325
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 167
+state 178
- 233 echo_expr_list: expr .
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 233 (echo_expr_list)
+ 64 unticked_statement: "echo (T_ECHO)" echo_expr_list . ';'
+ 242 echo_expr_list: echo_expr_list . ',' expr
+ ',' shift, and go to state 326
+ ';' shift, and go to state 327
-state 168
- 47 unticked_statement: "do (T_DO)" @11 . statement "while (T_WHILE)" '(' @12 expr ')' ';'
+state 179
+
+ 243 echo_expr_list: expr .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 243 (echo_expr_list)
+
+
+state 180
+
+ 47 unticked_statement: "do (T_DO)" $@11 . statement "while (T_WHILE)" $@12 parenthesis_expr ';'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -5835,110 +6385,115 @@ state 168
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 309
- unticked_statement go to state 87
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 328
+ unticked_statement go to state 88
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 169
+state 181
- 44 unticked_statement: "while (T_WHILE)" '(' . @9 expr ')' @10 while_statement
+ 44 unticked_statement: "while (T_WHILE)" $@9 . parenthesis_expr @10 while_statement
- $default reduce using rule 42 (@9)
+ '(' shift, and go to state 174
- @9 go to state 310
+ parenthesis_expr go to state 329
-state 170
+state 182
- 51 unticked_statement: "for (T_FOR)" '(' . for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
+ 51 unticked_statement: "for (T_FOR)" '(' . for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -5946,85 +6501,89 @@ state 170
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 234 (for_expr)
-
- namespace_name go to state 83
- for_expr go to state 311
- non_empty_for_expr go to state 312
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 313
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 244 (for_expr)
+
+ namespace_name go to state 84
+ for_expr go to state 330
+ non_empty_for_expr go to state 331
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 332
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 171
+state 183
- 69 unticked_statement: "foreach (T_FOREACH)" '(' . variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
- 72 | "foreach (T_FOREACH)" '(' . expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' . variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
+ 73 | "foreach (T_FOREACH)" '(' . expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' $@20 foreach_statement
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -6032,729 +6591,781 @@ state 171
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 314
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 315
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 333
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 334
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 172
+state 184
- 74 unticked_statement: "declare (T_DECLARE)" @21 . '(' declare_list ')' declare_statement
+ 75 unticked_statement: "declare (T_DECLARE)" $@21 . '(' declare_list ')' declare_statement
- '(' shift, and go to state 316
+ '(' shift, and go to state 335
-state 173
+state 185
- 53 unticked_statement: "switch (T_SWITCH)" '(' . expr ')' @16 switch_case_list
+ 53 unticked_statement: "switch (T_SWITCH)" parenthesis_expr . $@16 switch_case_list
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 317
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 52 ($@16)
+ $@16 go to state 336
-state 174
+
+state 186
54 unticked_statement: "break (T_BREAK)" ';' .
$default reduce using rule 54 (unticked_statement)
-state 175
+state 187
55 unticked_statement: "break (T_BREAK)" expr . ';'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ';' shift, and go to state 318
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ';' shift, and go to state 337
-state 176
+state 188
56 unticked_statement: "continue (T_CONTINUE)" ';' .
$default reduce using rule 56 (unticked_statement)
-state 177
+state 189
57 unticked_statement: "continue (T_CONTINUE)" expr . ';'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ';' shift, and go to state 319
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ';' shift, and go to state 338
-state 178
+state 190
- 83 unticked_statement: "goto (T_GOTO)" "identifier (T_STRING)" . ';'
+ 81 unticked_statement: "goto (T_GOTO)" "identifier (T_STRING)" . ';'
- ';' shift, and go to state 320
+ ';' shift, and go to state 339
-state 179
+state 191
25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" . '=' static_scalar
- '=' shift, and go to state 321
+ '=' shift, and go to state 340
-state 180
+state 192
58 unticked_statement: "return (T_RETURN)" ';' .
$default reduce using rule 58 (unticked_statement)
-state 181
+state 193
59 unticked_statement: "return (T_RETURN)" expr_without_variable . ';'
- 424 expr: expr_without_variable .
+ 444 expr: expr_without_variable .
- ';' shift, and go to state 322
+ ';' shift, and go to state 341
- $default reduce using rule 424 (expr)
+ $default reduce using rule 444 (expr)
-state 182
+state 194
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
-state 183
+state 195
60 unticked_statement: "return (T_RETURN)" variable . ';'
- 254 expr_without_variable: variable . '=' expr
- 255 | variable . '=' '&' variable
- 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
- 259 | variable . "+= (T_PLUS_EQUAL)" expr
- 260 | variable . "-= (T_MINUS_EQUAL)" expr
- 261 | variable . "*= (T_MUL_EQUAL)" expr
- 262 | variable . "/= (T_DIV_EQUAL)" expr
- 263 | variable . ".= (T_CONCAT_EQUAL)" expr
- 264 | variable . "%= (T_MOD_EQUAL)" expr
- 265 | variable . "&= (T_AND_EQUAL)" expr
- 266 | variable . "|= (T_OR_EQUAL)" expr
- 267 | variable . "^= (T_XOR_EQUAL)" expr
- 268 | variable . "<<= (T_SL_EQUAL)" expr
- 269 | variable . ">>= (T_SR_EQUAL)" expr
- 425 r_variable: variable .
- 427 rw_variable: variable .
-
- '=' shift, and go to state 264
- ">>= (T_SR_EQUAL)" shift, and go to state 265
- "<<= (T_SL_EQUAL)" shift, and go to state 266
- "^= (T_XOR_EQUAL)" shift, and go to state 267
- "|= (T_OR_EQUAL)" shift, and go to state 268
- "&= (T_AND_EQUAL)" shift, and go to state 269
- "%= (T_MOD_EQUAL)" shift, and go to state 270
- ".= (T_CONCAT_EQUAL)" shift, and go to state 271
- "/= (T_DIV_EQUAL)" shift, and go to state 272
- "*= (T_MUL_EQUAL)" shift, and go to state 273
- "-= (T_MINUS_EQUAL)" shift, and go to state 274
- "+= (T_PLUS_EQUAL)" shift, and go to state 275
- ';' shift, and go to state 323
-
- "-- (T_DEC)" reduce using rule 427 (rw_variable)
- "++ (T_INC)" reduce using rule 427 (rw_variable)
- $default reduce using rule 425 (r_variable)
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+ ';' shift, and go to state 342
+
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ $default reduce using rule 447 (r_variable)
-state 184
+state 196
- 81 unticked_statement: "try (T_TRY)" @22 . '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 79 unticked_statement: "try (T_TRY)" $@22 . '{' inner_statement_list '}' catch_statement $@23 finally_statement
- '{' shift, and go to state 324
+ '{' shift, and go to state 343
-state 185
+state 197
- 82 unticked_statement: "throw (T_THROW)" expr . ';'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ';' shift, and go to state 325
+ 80 unticked_statement: "throw (T_THROW)" expr . ';'
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ';' shift, and go to state 344
-state 186
+state 198
22 use_declaration: "\\ (T_NS_SEPARATOR)" . namespace_name
23 | "\\ (T_NS_SEPARATOR)" . namespace_name "as (T_AS)" "identifier (T_STRING)"
- "identifier (T_STRING)" shift, and go to state 116
+ "identifier (T_STRING)" shift, and go to state 122
- namespace_name go to state 326
+ namespace_name go to state 345
-state 187
+state 199
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
20 use_declaration: namespace_name .
21 | namespace_name . "as (T_AS)" "identifier (T_STRING)"
- "as (T_AS)" shift, and go to state 327
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ "as (T_AS)" shift, and go to state 346
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
$default reduce using rule 20 (use_declaration)
-state 188
+state 200
16 top_statement: "use (T_USE)" use_declarations . ';'
18 use_declarations: use_declarations . ',' use_declaration
- ',' shift, and go to state 328
- ';' shift, and go to state 329
+ ',' shift, and go to state 347
+ ';' shift, and go to state 348
-state 189
+state 201
19 use_declarations: use_declaration .
$default reduce using rule 19 (use_declarations)
-state 190
+state 202
- 176 global_var: "variable (T_VARIABLE)" .
+ 186 global_var: "variable (T_VARIABLE)" .
- $default reduce using rule 176 (global_var)
+ $default reduce using rule 186 (global_var)
-state 191
+state 203
- 177 global_var: '$' . r_variable
- 178 | '$' . '{' expr '}'
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '{' shift, and go to state 330
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- r_variable go to state 331
- variable go to state 332
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 187 global_var: '$' . r_variable
+ 188 | '$' . '{' expr '}'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '{' shift, and go to state 349
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ r_variable go to state 350
+ variable go to state 351
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
-state 192
+state 204
- 61 unticked_statement: "global (T_GLOBAL)" global_var_list . ';'
- 174 global_var_list: global_var_list . ',' global_var
+ 62 unticked_statement: "global (T_GLOBAL)" global_var_list . ';'
+ 184 global_var_list: global_var_list . ',' global_var
- ',' shift, and go to state 333
- ';' shift, and go to state 334
+ ',' shift, and go to state 352
+ ';' shift, and go to state 353
-state 193
+state 205
- 175 global_var_list: global_var .
+ 185 global_var_list: global_var .
- $default reduce using rule 175 (global_var_list)
+ $default reduce using rule 185 (global_var_list)
-state 194
+state 206
- 107 class_entry_type: "final (T_FINAL)" "class (T_CLASS)" .
+ 114 class_entry_type: "final (T_FINAL)" "class (T_CLASS)" .
- $default reduce using rule 107 (class_entry_type)
+ $default reduce using rule 114 (class_entry_type)
-state 195
+state 207
- 105 class_entry_type: "abstract (T_ABSTRACT)" "class (T_CLASS)" .
+ 112 class_entry_type: "abstract (T_ABSTRACT)" "class (T_CLASS)" .
- $default reduce using rule 105 (class_entry_type)
+ $default reduce using rule 112 (class_entry_type)
-state 196
+state 208
- 181 static_var_list: "variable (T_VARIABLE)" .
- 182 | "variable (T_VARIABLE)" . '=' static_scalar
+ 191 static_var_list: "variable (T_VARIABLE)" .
+ 192 | "variable (T_VARIABLE)" . '=' static_scalar
- '=' shift, and go to state 335
+ '=' shift, and go to state 354
- $default reduce using rule 181 (static_var_list)
+ $default reduce using rule 191 (static_var_list)
-state 197
+state 209
- 62 unticked_statement: "static (T_STATIC)" static_var_list . ';'
- 179 static_var_list: static_var_list . ',' "variable (T_VARIABLE)"
- 180 | static_var_list . ',' "variable (T_VARIABLE)" '=' static_scalar
+ 63 unticked_statement: "static (T_STATIC)" static_var_list . ';'
+ 189 static_var_list: static_var_list . ',' "variable (T_VARIABLE)"
+ 190 | static_var_list . ',' "variable (T_VARIABLE)" '=' static_scalar
- ',' shift, and go to state 336
- ';' shift, and go to state 337
+ ',' shift, and go to state 355
+ ';' shift, and go to state 356
-state 198
+state 210
- 335 expr_without_variable: "static (T_STATIC)" function . is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 346 expr_without_variable: "static (T_STATIC)" function . is_reference @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- '&' shift, and go to state 231
+ '&' shift, and go to state 247
- $default reduce using rule 96 (is_reference)
+ $default reduce using rule 103 (is_reference)
- is_reference go to state 338
+ is_reference go to state 357
-state 199
+state 211
- 66 unticked_statement: "unset (T_UNSET)" '(' . unset_variables ')' ';'
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- unset_variables go to state 339
- unset_variable go to state 340
- function_call go to state 97
- class_name go to state 142
- variable go to state 341
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 67 unticked_statement: "unset (T_UNSET)" '(' . unset_variables ')' ';'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ unset_variables go to state 358
+ unset_variable go to state 359
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 360
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
-state 200
+state 212
- 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' . isset_variables ')'
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 342
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- isset_variables go to state 343
+ 526 internal_functions_in_yacc: "isset (T_ISSET)" '(' . isset_variables ')'
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 361
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 362
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ isset_variables go to state 363
+ isset_variable go to state 364
+ class_constant go to state 120
-state 201
- 505 internal_functions_in_yacc: "empty (T_EMPTY)" '(' . variable ')'
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 344
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+state 213
+ 527 internal_functions_in_yacc: "empty (T_EMPTY)" '(' . variable ')'
+ 528 | "empty (T_EMPTY)" '(' . expr_without_variable ')'
-state 202
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 365
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 366
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
+
+
+state 214
10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' . ')' ';'
- ')' shift, and go to state 345
+ ')' shift, and go to state 367
-state 203
+state 215
- 253 expr_without_variable: "list (T_LIST)" '(' . @42 assignment_list ')' '=' expr
+ 263 expr_without_variable: "list (T_LIST)" '(' . $@45 assignment_list ')' '=' expr
- $default reduce using rule 252 (@42)
+ $default reduce using rule 262 ($@45)
- @42 go to state 346
+ $@45 go to state 368
-state 204
+state 216
- 328 expr_without_variable: "array (T_ARRAY)" '(' . array_pair_list ')'
+ 354 combined_scalar: "array (T_ARRAY)" '(' . array_pair_list ')'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -6762,118 +7373,122 @@ state 204
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 147
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 480 (array_pair_list)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 148
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- array_pair_list go to state 347
- non_empty_array_pair_list go to state 150
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 156
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 502 (array_pair_list)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 157
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ array_pair_list go to state 369
+ non_empty_array_pair_list go to state 159
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 205
+state 217
- 494 encaps_var: "variable (T_VARIABLE)" .
- 496 | "variable (T_VARIABLE)" . '[' @72 encaps_var_offset ']'
- 497 | "variable (T_VARIABLE)" . "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)"
+ 516 encaps_var: "variable (T_VARIABLE)" .
+ 518 | "variable (T_VARIABLE)" . '[' $@75 encaps_var_offset ']'
+ 519 | "variable (T_VARIABLE)" . "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)"
- '[' shift, and go to state 348
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 349
+ '[' shift, and go to state 370
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 371
- $default reduce using rule 494 (encaps_var)
+ $default reduce using rule 516 (encaps_var)
-state 206
+state 218
- 393 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . "heredoc end (T_END_HEREDOC)"
- 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
+ 413 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . "heredoc end (T_END_HEREDOC)"
+ 515 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
- "variable (T_VARIABLE)" shift, and go to state 205
- "heredoc end (T_END_HEREDOC)" shift, and go to state 350
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 372
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- encaps_var go to state 351
+ encaps_var go to state 373
-state 207
+state 219
- 394 common_scalar: "heredoc start (T_START_HEREDOC)" "heredoc end (T_END_HEREDOC)" .
+ 414 common_scalar: "heredoc start (T_START_HEREDOC)" "heredoc end (T_END_HEREDOC)" .
- $default reduce using rule 394 (common_scalar)
+ $default reduce using rule 414 (common_scalar)
-state 208
+state 220
- 498 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" . expr '}'
- 499 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" . "variable name (T_STRING_VARNAME)" '[' expr ']' '}'
+ 520 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" . expr '}'
+ 521 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" . "variable name (T_STRING_VARNAME)" '[' expr ']' '}'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -6881,256 +7496,269 @@ state 208
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 352
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 353
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 374
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 375
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 209
+state 221
- 500 encaps_var: "{$ (T_CURLY_OPEN)" . variable '}'
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 354
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 522 encaps_var: "{$ (T_CURLY_OPEN)" . variable '}'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 376
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
-state 210
+state 222
- 413 scalar: "heredoc start (T_START_HEREDOC)" encaps_list . "heredoc end (T_END_HEREDOC)"
- 490 encaps_list: encaps_list . encaps_var
- 491 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 433 scalar: "heredoc start (T_START_HEREDOC)" encaps_list . "heredoc end (T_END_HEREDOC)"
+ 512 encaps_list: encaps_list . encaps_var
+ 513 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- "variable (T_VARIABLE)" shift, and go to state 205
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 355
- "heredoc end (T_END_HEREDOC)" shift, and go to state 356
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 377
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 378
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- encaps_var go to state 357
+ encaps_var go to state 379
-state 211
+state 223
- 492 encaps_list: encaps_var .
+ 514 encaps_list: encaps_var .
- $default reduce using rule 492 (encaps_list)
+ $default reduce using rule 514 (encaps_list)
-state 212
+state 224
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- 409 scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+ 429 scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- "identifier (T_STRING)" shift, and go to state 116
+ "identifier (T_STRING)" shift, and go to state 122
- namespace_name go to state 358
+ namespace_name go to state 380
-state 213
+state 225
- 15 top_statement: "namespace (T_NAMESPACE)" '{' . @3 top_statement_list '}'
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' . $@3 top_statement_list '}'
- $default reduce using rule 14 (@3)
+ $default reduce using rule 14 ($@3)
- @3 go to state 359
+ $@3 go to state 381
-state 214
+state 226
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
11 top_statement: "namespace (T_NAMESPACE)" namespace_name . ';'
- 13 | "namespace (T_NAMESPACE)" namespace_name . '{' @2 top_statement_list '}'
+ 13 | "namespace (T_NAMESPACE)" namespace_name . '{' $@2 top_statement_list '}'
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- ';' shift, and go to state 360
- '{' shift, and go to state 361
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
+ ';' shift, and go to state 382
+ '{' shift, and go to state 383
-state 215
+state 227
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name . '(' @57 function_call_parameter_list ')'
- 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
- 410 scalar: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 368 function_call: "\\ (T_NS_SEPARATOR)" namespace_name . @60 function_call_parameter_list
+ 382 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 430 scalar: "\\ (T_NS_SEPARATOR)" namespace_name .
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- '(' shift, and go to state 362
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 362 (class_name)
- $default reduce using rule 410 (scalar)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 382 (class_name)
+ '(' reduce using rule 367 (@60)
+ $default reduce using rule 430 (scalar)
+ @60 go to state 384
-state 216
- 308 expr_without_variable: new_expr .
- 310 | '(' new_expr . ')' @48 instance_call
+state 228
- ')' shift, and go to state 363
+ 318 expr_without_variable: new_expr .
+ 320 | '(' new_expr . ')' @51 instance_call
- ')' [reduce using rule 308 (expr_without_variable)]
- $default reduce using rule 308 (expr_without_variable)
+ ')' shift, and go to state 385
+ ')' [reduce using rule 318 (expr_without_variable)]
+ $default reduce using rule 318 (expr_without_variable)
-state 217
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 307 | '(' expr . ')'
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 364
+state 229
+ 446 parenthesis_expr: '(' yield_expr . ')'
-state 218
+ ')' shift, and go to state 386
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
+
+state 230
+
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 445 parenthesis_expr: '(' expr . ')'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ')' shift, and go to state 387
+
+
+state 231
+
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
35 unticked_statement: '{' inner_statement_list . '}'
- '}' shift, and go to state 365
+ '}' shift, and go to state 388
- $default reduce using rule 26 (@4)
+ $default reduce using rule 26 ($@4)
- @4 go to state 366
+ $@4 go to state 389
-state 219
+state 232
- 461 compound_variable: '$' '{' . expr '}'
+ 483 compound_variable: '$' '{' . expr '}'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7138,244 +7766,434 @@ state 219
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 367
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 390
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 220
+state 233
- 379 backticks_expr: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" .
- 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
+ 399 backticks_expr: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" .
+ 515 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
- "variable (T_VARIABLE)" shift, and go to state 205
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- $default reduce using rule 379 (backticks_expr)
+ $default reduce using rule 399 (backticks_expr)
- encaps_var go to state 351
+ encaps_var go to state 373
-state 221
+state 234
- 330 expr_without_variable: '`' backticks_expr . '`'
+ 340 expr_without_variable: '`' backticks_expr . '`'
- '`' shift, and go to state 368
+ '`' shift, and go to state 391
-state 222
+state 235
- 380 backticks_expr: encaps_list .
- 490 encaps_list: encaps_list . encaps_var
- 491 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 400 backticks_expr: encaps_list .
+ 512 encaps_list: encaps_list . encaps_var
+ 513 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- "variable (T_VARIABLE)" shift, and go to state 205
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 355
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 377
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- $default reduce using rule 380 (backticks_expr)
+ $default reduce using rule 400 (backticks_expr)
- encaps_var go to state 357
+ encaps_var go to state 379
-state 223
+state 236
- 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
+ 515 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
- "variable (T_VARIABLE)" shift, and go to state 205
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
- encaps_var go to state 351
+ encaps_var go to state 373
-state 224
+state 237
- 412 scalar: '"' encaps_list . '"'
- 490 encaps_list: encaps_list . encaps_var
- 491 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 432 scalar: '"' encaps_list . '"'
+ 512 encaps_list: encaps_list . encaps_var
+ 513 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- "variable (T_VARIABLE)" shift, and go to state 205
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 355
- "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
- "{$ (T_CURLY_OPEN)" shift, and go to state 209
- '"' shift, and go to state 369
+ "variable (T_VARIABLE)" shift, and go to state 217
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 377
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 220
+ "{$ (T_CURLY_OPEN)" shift, and go to state 221
+ '"' shift, and go to state 392
- encaps_var go to state 357
+ encaps_var go to state 379
-state 225
+state 238
6 namespace_name: namespace_name "\\ (T_NS_SEPARATOR)" . "identifier (T_STRING)"
- "identifier (T_STRING)" shift, and go to state 370
+ "identifier (T_STRING)" shift, and go to state 393
-state 226
+state 239
- 344 function_call: namespace_name '(' . @55 function_call_parameter_list ')'
+ 364 function_call: namespace_name @58 . function_call_parameter_list
- $default reduce using rule 343 (@55)
+ '(' shift, and go to state 394
- @55 go to state 371
+ function_call_parameter_list go to state 395
-state 227
+state 240
24 constant_declaration: constant_declaration ',' . "identifier (T_STRING)" '=' static_scalar
- "identifier (T_STRING)" shift, and go to state 372
+ "identifier (T_STRING)" shift, and go to state 396
-state 228
+state 241
17 top_statement: constant_declaration ';' .
$default reduce using rule 17 (top_statement)
-state 229
+state 242
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" . extends_from @30 implements_list '{' class_statement_list '}'
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" . extends_from $@32 implements_list '{' class_statement_list '}'
- "extends (T_EXTENDS)" shift, and go to state 373
+ "extends (T_EXTENDS)" shift, and go to state 397
- $default reduce using rule 108 (extends_from)
+ $default reduce using rule 115 (extends_from)
- extends_from go to state 374
+ extends_from go to state 398
-state 230
+state 243
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" . @31 interface_extends_list '{' class_statement_list '}'
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" . $@33 interface_extends_list '{' class_statement_list '}'
- $default reduce using rule 102 (@31)
+ $default reduce using rule 109 ($@33)
- @31 go to state 375
+ $@33 go to state 399
-state 231
+state 244
- 97 is_reference: '&' .
+ 61 unticked_statement: yield_expr ';' .
- $default reduce using rule 97 (is_reference)
+ $default reduce using rule 61 (unticked_statement)
-state 232
+state 245
+
+ 352 combined_scalar_offset: combined_scalar_offset '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 400
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
- 99 unticked_function_declaration_statement: function is_reference . "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}'
- 333 expr_without_variable: function is_reference . '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- "identifier (T_STRING)" shift, and go to state 376
- '(' shift, and go to state 377
+state 246
+ 351 combined_scalar_offset: combined_scalar '[' . dim_offset ']'
-state 233
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 401
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
- 450 array_function_dereference: function_call @69 . '[' dim_offset ']'
- '[' shift, and go to state 378
+state 247
+ 104 is_reference: '&' .
-state 234
+ $default reduce using rule 104 (is_reference)
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @58 function_call_parameter_list ')'
- 352 | class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @59 function_call_parameter_list ')'
- 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- 514 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
- "identifier (T_STRING)" shift, and go to state 379
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
+state 248
- variable_without_objects go to state 381
- reference_variable go to state 382
- compound_variable go to state 112
- variable_name go to state 383
- simple_indirect_reference go to state 384
+ 106 unticked_function_declaration_statement: function is_reference . "identifier (T_STRING)" $@31 '(' parameter_list ')' '{' inner_statement_list '}'
+ 344 expr_without_variable: function is_reference . @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ "identifier (T_STRING)" shift, and go to state 402
-state 235
+ $default reduce using rule 343 (@56)
- 279 expr_without_variable: expr "or (T_LOGICAL_OR)" . @46 expr
+ @56 go to state 403
- $default reduce using rule 278 (@46)
- @46 go to state 385
+state 249
+ 472 array_function_dereference: function_call $@72 . '[' dim_offset ']'
-state 236
+ '[' shift, and go to state 404
- 282 expr_without_variable: expr "xor (T_LOGICAL_XOR)" . expr
+
+state 250
+
+ 370 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name @61 function_call_parameter_list
+ 372 | class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects $@62 function_call_parameter_list
+ 467 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+ 539 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
+
+ "identifier (T_STRING)" shift, and go to state 405
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
+
+ variable_without_objects go to state 407
+ reference_variable go to state 408
+ compound_variable go to state 117
+ variable_name go to state 409
+ simple_indirect_reference go to state 410
+
+
+state 251
+
+ 289 expr_without_variable: expr "or (T_LOGICAL_OR)" . $@49 expr
+
+ $default reduce using rule 288 ($@49)
+
+ $@49 go to state 411
+
+
+state 252
+
+ 292 expr_without_variable: expr "xor (T_LOGICAL_XOR)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7383,119 +8201,123 @@ state 236
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 386
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 412
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 237
+state 253
- 281 expr_without_variable: expr "and (T_LOGICAL_AND)" . @47 expr
+ 291 expr_without_variable: expr "and (T_LOGICAL_AND)" . $@50 expr
- $default reduce using rule 280 (@47)
+ $default reduce using rule 290 ($@50)
- @47 go to state 387
+ $@50 go to state 413
-state 238
+state 254
- 313 expr_without_variable: expr '?' . @49 expr ':' @50 expr
- 315 | expr '?' . ':' @51 expr
+ 323 expr_without_variable: expr '?' . $@52 expr ':' $@53 expr
+ 325 | expr '?' . ':' $@54 expr
- ':' shift, and go to state 388
+ ':' shift, and go to state 414
- $default reduce using rule 311 (@49)
+ $default reduce using rule 321 ($@52)
- @49 go to state 389
+ $@52 go to state 415
-state 239
+state 255
- 275 expr_without_variable: expr "|| (T_BOOLEAN_OR)" . @44 expr
+ 285 expr_without_variable: expr "|| (T_BOOLEAN_OR)" . $@47 expr
- $default reduce using rule 274 (@44)
+ $default reduce using rule 284 ($@47)
- @44 go to state 390
+ $@47 go to state 416
-state 240
+state 256
- 277 expr_without_variable: expr "&& (T_BOOLEAN_AND)" . @45 expr
+ 287 expr_without_variable: expr "&& (T_BOOLEAN_AND)" . $@48 expr
- $default reduce using rule 276 (@45)
+ $default reduce using rule 286 ($@48)
- @45 go to state 391
+ $@48 go to state 417
-state 241
+state 257
- 283 expr_without_variable: expr '|' . expr
+ 293 expr_without_variable: expr '|' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7503,80 +8325,84 @@ state 241
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 392
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 418
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 242
+state 258
- 285 expr_without_variable: expr '^' . expr
+ 295 expr_without_variable: expr '^' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7584,80 +8410,84 @@ state 242
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 393
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 419
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 243
+state 259
- 284 expr_without_variable: expr '&' . expr
+ 294 expr_without_variable: expr '&' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7665,80 +8495,84 @@ state 243
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 394
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 420
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 244
+state 260
- 299 expr_without_variable: expr "!== (T_IS_NOT_IDENTICAL)" . expr
+ 309 expr_without_variable: expr "!== (T_IS_NOT_IDENTICAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7746,80 +8580,84 @@ state 244
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 395
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 421
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 245
+state 261
- 298 expr_without_variable: expr "=== (T_IS_IDENTICAL)" . expr
+ 308 expr_without_variable: expr "=== (T_IS_IDENTICAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7827,80 +8665,84 @@ state 245
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 396
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 422
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 246
+state 262
- 301 expr_without_variable: expr "!= (T_IS_NOT_EQUAL)" . expr
+ 311 expr_without_variable: expr "!= (T_IS_NOT_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7908,80 +8750,84 @@ state 246
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 397
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 423
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 247
+state 263
- 300 expr_without_variable: expr "== (T_IS_EQUAL)" . expr
+ 310 expr_without_variable: expr "== (T_IS_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -7989,80 +8835,84 @@ state 247
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 398
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 424
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 248
+state 264
- 302 expr_without_variable: expr '<' . expr
+ 312 expr_without_variable: expr '<' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8070,80 +8920,84 @@ state 248
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 399
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 425
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 249
+state 265
- 304 expr_without_variable: expr '>' . expr
+ 314 expr_without_variable: expr '>' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8151,80 +9005,84 @@ state 249
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 400
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 426
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 250
+state 266
- 305 expr_without_variable: expr ">= (T_IS_GREATER_OR_EQUAL)" . expr
+ 315 expr_without_variable: expr ">= (T_IS_GREATER_OR_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8232,80 +9090,84 @@ state 250
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 401
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 427
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 251
+state 267
- 303 expr_without_variable: expr "<= (T_IS_SMALLER_OR_EQUAL)" . expr
+ 313 expr_without_variable: expr "<= (T_IS_SMALLER_OR_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8313,80 +9175,84 @@ state 251
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 402
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 428
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 252
+state 268
- 293 expr_without_variable: expr ">> (T_SR)" . expr
+ 303 expr_without_variable: expr ">> (T_SR)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8394,80 +9260,84 @@ state 252
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 403
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 429
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 253
+state 269
- 292 expr_without_variable: expr "<< (T_SL)" . expr
+ 302 expr_without_variable: expr "<< (T_SL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8475,80 +9345,84 @@ state 253
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 404
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 430
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 254
+state 270
- 287 expr_without_variable: expr '+' . expr
+ 297 expr_without_variable: expr '+' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8556,80 +9430,84 @@ state 254
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 405
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 431
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 255
+state 271
- 288 expr_without_variable: expr '-' . expr
+ 298 expr_without_variable: expr '-' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8637,80 +9515,84 @@ state 255
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 406
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 432
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 256
+state 272
- 286 expr_without_variable: expr '.' . expr
+ 296 expr_without_variable: expr '.' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8718,80 +9600,84 @@ state 256
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 407
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 433
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 257
+state 273
- 289 expr_without_variable: expr '*' . expr
+ 299 expr_without_variable: expr '*' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8799,80 +9685,84 @@ state 257
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 408
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 434
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 258
+state 274
- 290 expr_without_variable: expr '/' . expr
+ 300 expr_without_variable: expr '/' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8880,80 +9770,84 @@ state 258
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 409
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 435
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 259
+state 275
- 291 expr_without_variable: expr '%' . expr
+ 301 expr_without_variable: expr '%' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -8961,126 +9855,130 @@ state 259
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 410
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 436
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 260
+state 276
- 306 expr_without_variable: expr "instanceof (T_INSTANCEOF)" . class_name_reference
+ 316 expr_without_variable: expr "instanceof (T_INSTANCEOF)" . class_name_reference
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 152
- "\\ (T_NS_SEPARATOR)" shift, and go to state 153
- '$' shift, and go to state 80
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 161
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 162
+ '$' shift, and go to state 81
- namespace_name go to state 154
- class_name go to state 155
- class_name_reference go to state 411
- dynamic_class_name_reference go to state 157
- static_member go to state 106
- variable_class_name go to state 158
- base_variable go to state 159
- reference_variable go to state 160
- compound_variable go to state 112
- simple_indirect_reference go to state 161
+ namespace_name go to state 163
+ class_name go to state 164
+ class_name_reference go to state 437
+ dynamic_class_name_reference go to state 166
+ static_member go to state 111
+ variable_class_name go to state 167
+ base_variable go to state 168
+ reference_variable go to state 169
+ compound_variable go to state 117
+ simple_indirect_reference go to state 170
-state 261
+state 277
- 65 unticked_statement: expr ';' .
+ 66 unticked_statement: expr ';' .
- $default reduce using rule 65 (unticked_statement)
+ $default reduce using rule 66 (unticked_statement)
-state 262
+state 278
- 272 expr_without_variable: rw_variable "-- (T_DEC)" .
+ 282 expr_without_variable: rw_variable "-- (T_DEC)" .
- $default reduce using rule 272 (expr_without_variable)
+ $default reduce using rule 282 (expr_without_variable)
-state 263
+state 279
- 270 expr_without_variable: rw_variable "++ (T_INC)" .
+ 280 expr_without_variable: rw_variable "++ (T_INC)" .
- $default reduce using rule 270 (expr_without_variable)
+ $default reduce using rule 280 (expr_without_variable)
-state 264
+state 280
- 254 expr_without_variable: variable '=' . expr
- 255 | variable '=' . '&' variable
- 257 | variable '=' . '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 264 expr_without_variable: variable '=' . expr
+ 265 | variable '=' . '&' variable
+ 267 | variable '=' . '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9088,81 +9986,85 @@ state 264
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 412
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 413
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 438
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 439
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 265
+state 281
- 269 expr_without_variable: variable ">>= (T_SR_EQUAL)" . expr
+ 279 expr_without_variable: variable ">>= (T_SR_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9170,80 +10072,84 @@ state 265
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 414
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 440
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 266
+state 282
- 268 expr_without_variable: variable "<<= (T_SL_EQUAL)" . expr
+ 278 expr_without_variable: variable "<<= (T_SL_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9251,80 +10157,84 @@ state 266
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 415
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 441
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 267
+state 283
- 267 expr_without_variable: variable "^= (T_XOR_EQUAL)" . expr
+ 277 expr_without_variable: variable "^= (T_XOR_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9332,80 +10242,84 @@ state 267
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 416
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 442
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 268
+state 284
- 266 expr_without_variable: variable "|= (T_OR_EQUAL)" . expr
+ 276 expr_without_variable: variable "|= (T_OR_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9413,80 +10327,84 @@ state 268
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 417
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 443
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 269
+state 285
- 265 expr_without_variable: variable "&= (T_AND_EQUAL)" . expr
+ 275 expr_without_variable: variable "&= (T_AND_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9494,80 +10412,84 @@ state 269
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 418
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 444
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 270
+state 286
- 264 expr_without_variable: variable "%= (T_MOD_EQUAL)" . expr
+ 274 expr_without_variable: variable "%= (T_MOD_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9575,80 +10497,84 @@ state 270
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 419
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 445
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 271
+state 287
- 263 expr_without_variable: variable ".= (T_CONCAT_EQUAL)" . expr
+ 273 expr_without_variable: variable ".= (T_CONCAT_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9656,80 +10582,84 @@ state 271
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 420
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 446
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 272
+state 288
- 262 expr_without_variable: variable "/= (T_DIV_EQUAL)" . expr
+ 272 expr_without_variable: variable "/= (T_DIV_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9737,80 +10667,84 @@ state 272
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 421
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 447
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 273
+state 289
- 261 expr_without_variable: variable "*= (T_MUL_EQUAL)" . expr
+ 271 expr_without_variable: variable "*= (T_MUL_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9818,80 +10752,84 @@ state 273
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 422
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 448
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 274
+state 290
- 260 expr_without_variable: variable "-= (T_MINUS_EQUAL)" . expr
+ 270 expr_without_variable: variable "-= (T_MINUS_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9899,80 +10837,84 @@ state 274
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 423
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 449
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 275
+state 291
- 259 expr_without_variable: variable "+= (T_PLUS_EQUAL)" . expr
+ 269 expr_without_variable: variable "+= (T_PLUS_EQUAL)" . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -9980,108 +10922,112 @@ state 275
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 424
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 450
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 276
+state 292
- 358 function_call: variable_without_objects '(' . @62 function_call_parameter_list ')'
+ 378 function_call: variable_without_objects $@65 . function_call_parameter_list
- $default reduce using rule 357 (@62)
+ '(' shift, and go to state 394
- @62 go to state 425
+ function_call_parameter_list go to state 451
-state 277
+state 293
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @60 function_call_parameter_list ')'
- 356 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @61 function_call_parameter_list ')'
- 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- 515 class_constant: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
+ 374 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name $@63 function_call_parameter_list
+ 376 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects $@64 function_call_parameter_list
+ 468 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+ 540 class_constant: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
- "identifier (T_STRING)" shift, and go to state 426
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
+ "identifier (T_STRING)" shift, and go to state 452
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
- variable_without_objects go to state 427
- reference_variable go to state 382
- compound_variable go to state 112
- variable_name go to state 428
- simple_indirect_reference go to state 384
+ variable_without_objects go to state 453
+ reference_variable go to state 408
+ compound_variable go to state 117
+ variable_name go to state 454
+ simple_indirect_reference go to state 410
-state 278
+state 294
- 448 array_function_dereference: array_function_dereference '[' . dim_offset ']'
+ 470 array_function_dereference: array_function_dereference '[' . dim_offset ']'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -10089,92 +11035,96 @@ state 278
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 430
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 455
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 279
+state 295
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" . @65 object_property @66 method_or_not variable_properties
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" . $@68 object_property $@69 method_or_not variable_properties
- $default reduce using rule 428 (@65)
+ $default reduce using rule 450 ($@68)
- @65 go to state 431
+ $@68 go to state 456
-state 280
+state 296
- 457 reference_variable: reference_variable '[' . dim_offset ']'
+ 479 reference_variable: reference_variable '[' . dim_offset ']'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -10182,83 +11132,87 @@ state 280
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 432
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 457
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 281
+state 297
- 458 reference_variable: reference_variable '{' . expr '}'
+ 480 reference_variable: reference_variable '{' . expr '}'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -10266,278 +11220,372 @@ state 281
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 433
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 458
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 282
+state 298
- 461 compound_variable: '$' . '{' expr '}'
- 473 simple_indirect_reference: simple_indirect_reference '$' .
+ 483 compound_variable: '$' . '{' expr '}'
+ 495 simple_indirect_reference: simple_indirect_reference '$' .
- '{' shift, and go to state 219
+ '{' shift, and go to state 232
- $default reduce using rule 473 (simple_indirect_reference)
+ $default reduce using rule 495 (simple_indirect_reference)
-state 283
+state 299
- 444 variable_without_objects: simple_indirect_reference reference_variable .
- 455 base_variable: simple_indirect_reference reference_variable .
- 457 reference_variable: reference_variable . '[' dim_offset ']'
- 458 | reference_variable . '{' expr '}'
+ 466 variable_without_objects: simple_indirect_reference reference_variable .
+ 477 base_variable: simple_indirect_reference reference_variable .
+ 479 reference_variable: reference_variable . '[' dim_offset ']'
+ 480 | reference_variable . '{' expr '}'
- '[' shift, and go to state 280
- '{' shift, and go to state 281
+ '[' shift, and go to state 296
+ '{' shift, and go to state 297
- '(' reduce using rule 444 (variable_without_objects)
- $default reduce using rule 455 (base_variable)
+ '(' reduce using rule 466 (variable_without_objects)
+ $default reduce using rule 477 (base_variable)
-state 284
+state 300
- 333 expr_without_variable: function is_reference . '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 344 expr_without_variable: function is_reference . @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- '(' shift, and go to state 377
+ $default reduce using rule 343 (@56)
+ @56 go to state 403
-state 285
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 508 internal_functions_in_yacc: "eval (T_EVAL)" '(' expr . ')'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 434
+state 301
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 531 internal_functions_in_yacc: "eval (T_EVAL)" '(' expr . ')'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ')' shift, and go to state 459
-state 286
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 326 | '@' @52 expr .
+state 302
- $default reduce using rule 326 (expr_without_variable)
+ 349 yield_expr: "yield (T_YIELD)" expr "=> (T_DOUBLE_ARROW)" . expr_without_variable
+ 350 | "yield (T_YIELD)" expr "=> (T_DOUBLE_ARROW)" . variable
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 460
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 461
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 287
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+state 303
- "identifier (T_STRING)" shift, and go to state 116
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 336 | '@' $@55 expr .
+
+ $default reduce using rule 336 (expr_without_variable)
- namespace_name go to state 435
+state 304
-state 288
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 122
+
+ namespace_name go to state 462
+
+
+state 305
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name . '(' @57 function_call_parameter_list ')'
- 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 368 function_call: "\\ (T_NS_SEPARATOR)" namespace_name . @60 function_call_parameter_list
+ 382 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- '(' shift, and go to state 362
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- $default reduce using rule 362 (class_name)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 382 (class_name)
+ $default reduce using rule 367 (@60)
+ @60 go to state 384
-state 289
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @58 function_call_parameter_list ')'
- 352 | class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @59 function_call_parameter_list ')'
- 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+state 306
- "identifier (T_STRING)" shift, and go to state 436
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
+ 370 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name @61 function_call_parameter_list
+ 372 | class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects $@62 function_call_parameter_list
+ 467 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- variable_without_objects go to state 381
- reference_variable go to state 382
- compound_variable go to state 112
- variable_name go to state 383
- simple_indirect_reference go to state 384
+ "identifier (T_STRING)" shift, and go to state 463
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
+ variable_without_objects go to state 407
+ reference_variable go to state 408
+ compound_variable go to state 117
+ variable_name go to state 409
+ simple_indirect_reference go to state 410
-state 290
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @60 function_call_parameter_list ')'
- 356 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @61 function_call_parameter_list ')'
- 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+state 307
- "identifier (T_STRING)" shift, and go to state 436
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
+ 374 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name $@63 function_call_parameter_list
+ 376 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects $@64 function_call_parameter_list
+ 468 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- variable_without_objects go to state 427
- reference_variable go to state 382
- compound_variable go to state 112
- variable_name go to state 428
- simple_indirect_reference go to state 384
+ "identifier (T_STRING)" shift, and go to state 463
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
+ variable_without_objects go to state 453
+ reference_variable go to state 408
+ compound_variable go to state 117
+ variable_name go to state 454
+ simple_indirect_reference go to state 410
-state 291
- 489 non_empty_array_pair_list: '&' w_variable .
+state 308
+
+ 511 non_empty_array_pair_list: '&' w_variable .
- $default reduce using rule 489 (non_empty_array_pair_list)
+ $default reduce using rule 511 (non_empty_array_pair_list)
-state 292
+state 309
- 426 w_variable: variable .
+ 448 w_variable: variable .
- $default reduce using rule 426 (w_variable)
+ $default reduce using rule 448 (w_variable)
-state 293
+state 310
- 484 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" . expr
- 488 | expr "=> (T_DOUBLE_ARROW)" . '&' w_variable
+ 506 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" . expr
+ 510 | expr "=> (T_DOUBLE_ARROW)" . '&' w_variable
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -10545,92 +11593,96 @@ state 293
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 437
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 438
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 464
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 465
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 294
+state 311
- 329 expr_without_variable: '[' array_pair_list ']' .
+ 355 combined_scalar: '[' array_pair_list ']' .
- $default reduce using rule 329 (expr_without_variable)
+ $default reduce using rule 355 (combined_scalar)
-state 295
+state 312
- 418 possible_comma: ',' .
- 482 non_empty_array_pair_list: non_empty_array_pair_list ',' . expr "=> (T_DOUBLE_ARROW)" expr
- 483 | non_empty_array_pair_list ',' . expr
- 486 | non_empty_array_pair_list ',' . expr "=> (T_DOUBLE_ARROW)" '&' w_variable
- 487 | non_empty_array_pair_list ',' . '&' w_variable
+ 438 possible_comma: ',' .
+ 504 non_empty_array_pair_list: non_empty_array_pair_list ',' . expr "=> (T_DOUBLE_ARROW)" expr
+ 505 | non_empty_array_pair_list ',' . expr
+ 508 | non_empty_array_pair_list ',' . expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 509 | non_empty_array_pair_list ',' . '&' w_variable
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -10638,295 +11690,188 @@ state 295
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 439
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 418 (possible_comma)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 440
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 466
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 438 (possible_comma)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 467
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 296
+state 313
- 481 array_pair_list: non_empty_array_pair_list possible_comma .
+ 503 array_pair_list: non_empty_array_pair_list possible_comma .
- $default reduce using rule 481 (array_pair_list)
+ $default reduce using rule 503 (array_pair_list)
-state 297
+state 314
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- "identifier (T_STRING)" shift, and go to state 116
+ "identifier (T_STRING)" shift, and go to state 122
- namespace_name go to state 441
+ namespace_name go to state 468
-state 298
+state 315
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ 382 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 362 (class_name)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
+ $default reduce using rule 382 (class_name)
-state 299
- 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+state 316
- "variable (T_VARIABLE)" shift, and go to state 34
- '$' shift, and go to state 80
+ 467 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- variable_without_objects go to state 442
- reference_variable go to state 382
- compound_variable go to state 112
- simple_indirect_reference go to state 384
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '$' shift, and go to state 81
+ variable_without_objects go to state 469
+ reference_variable go to state 408
+ compound_variable go to state 117
+ simple_indirect_reference go to state 410
-state 300
- 251 new_expr: "new (T_NEW)" class_name_reference @41 . ctor_arguments
+state 317
- '(' shift, and go to state 443
+ 261 new_expr: "new (T_NEW)" class_name_reference $@44 . ctor_arguments
- $default reduce using rule 381 (ctor_arguments)
+ '(' shift, and go to state 394
- ctor_arguments go to state 444
+ $default reduce using rule 401 (ctor_arguments)
+ function_call_parameter_list go to state 470
+ ctor_arguments go to state 471
-state 301
- 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+state 318
- "variable (T_VARIABLE)" shift, and go to state 34
- '$' shift, and go to state 80
+ 468 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- variable_without_objects go to state 445
- reference_variable go to state 382
- compound_variable go to state 112
- simple_indirect_reference go to state 384
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '$' shift, and go to state 81
+ variable_without_objects go to state 472
+ reference_variable go to state 408
+ compound_variable go to state 117
+ simple_indirect_reference go to state 410
-state 302
- 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" . @63 object_property @64 dynamic_class_name_variable_properties
+state 319
- $default reduce using rule 368 (@63)
+ 390 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" . $@66 object_property $@67 dynamic_class_name_variable_properties
- @63 go to state 446
+ $default reduce using rule 388 ($@66)
+ $@66 go to state 473
-state 303
- 455 base_variable: simple_indirect_reference reference_variable .
- 457 reference_variable: reference_variable . '[' dim_offset ']'
- 458 | reference_variable . '{' expr '}'
+state 320
- '[' shift, and go to state 280
- '{' shift, and go to state 281
+ 477 base_variable: simple_indirect_reference reference_variable .
+ 479 reference_variable: reference_variable . '[' dim_offset ']'
+ 480 | reference_variable . '{' expr '}'
- $default reduce using rule 455 (base_variable)
+ '[' shift, and go to state 296
+ '{' shift, and go to state 297
+ $default reduce using rule 477 (base_variable)
-state 304
- 376 exit_expr: '(' ')' .
+state 321
- $default reduce using rule 376 (exit_expr)
+ 396 exit_expr: '(' ')' .
+ $default reduce using rule 396 (exit_expr)
-state 305
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 377 exit_expr: '(' expr . ')'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 447
+state 322
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' . $@7 inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
-state 306
+ $default reduce using rule 39 ($@7)
- 38 unticked_statement: "if (T_IF)" '(' expr . ')' @5 statement @6 elseif_list else_single
- 41 | "if (T_IF)" '(' expr . ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 448
+ $@7 go to state 474
-state 307
+state 323
- 232 echo_expr_list: echo_expr_list ',' . expr
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr $@5 . statement $@6 elseif_list else_single
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -10934,94 +11879,174 @@ state 307
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 449
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 475
+ unticked_statement go to state 88
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 308
- 63 unticked_statement: "echo (T_ECHO)" echo_expr_list ';' .
+state 324
- $default reduce using rule 63 (unticked_statement)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 485 dim_offset: expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 485 (dim_offset)
-state 309
+state 325
- 47 unticked_statement: "do (T_DO)" @11 statement . "while (T_WHILE)" '(' @12 expr ')' ';'
+ 353 combined_scalar_offset: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" '[' dim_offset . ']'
- "while (T_WHILE)" shift, and go to state 450
+ ']' shift, and go to state 476
-state 310
+state 326
- 44 unticked_statement: "while (T_WHILE)" '(' @9 . expr ')' @10 while_statement
+ 242 echo_expr_list: echo_expr_list ',' . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -11029,396 +12054,373 @@ state 310
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 451
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 477
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 311
+state 327
- 51 unticked_statement: "for (T_FOR)" '(' for_expr . ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
+ 64 unticked_statement: "echo (T_ECHO)" echo_expr_list ';' .
- ';' shift, and go to state 452
+ $default reduce using rule 64 (unticked_statement)
-state 312
+state 328
- 235 for_expr: non_empty_for_expr .
- 237 non_empty_for_expr: non_empty_for_expr . ',' @38 expr
+ 47 unticked_statement: "do (T_DO)" $@11 statement . "while (T_WHILE)" $@12 parenthesis_expr ';'
- ',' shift, and go to state 453
+ "while (T_WHILE)" shift, and go to state 478
- $default reduce using rule 235 (for_expr)
+state 329
-state 313
+ 44 unticked_statement: "while (T_WHILE)" $@9 parenthesis_expr . @10 while_statement
- 238 non_empty_for_expr: expr .
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 238 (non_empty_for_expr)
+ $default reduce using rule 43 (@10)
+ @10 go to state 479
-state 314
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable . "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
- 424 expr: expr_without_variable .
+state 330
- "as (T_AS)" shift, and go to state 454
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr . ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
- $default reduce using rule 424 (expr)
+ ';' shift, and go to state 480
-state 315
+state 331
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable . "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
- 254 expr_without_variable: variable . '=' expr
- 255 | variable . '=' '&' variable
- 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
- 259 | variable . "+= (T_PLUS_EQUAL)" expr
- 260 | variable . "-= (T_MINUS_EQUAL)" expr
- 261 | variable . "*= (T_MUL_EQUAL)" expr
- 262 | variable . "/= (T_DIV_EQUAL)" expr
- 263 | variable . ".= (T_CONCAT_EQUAL)" expr
- 264 | variable . "%= (T_MOD_EQUAL)" expr
- 265 | variable . "&= (T_AND_EQUAL)" expr
- 266 | variable . "|= (T_OR_EQUAL)" expr
- 267 | variable . "^= (T_XOR_EQUAL)" expr
- 268 | variable . "<<= (T_SL_EQUAL)" expr
- 269 | variable . ">>= (T_SR_EQUAL)" expr
- 425 r_variable: variable .
- 427 rw_variable: variable .
-
- '=' shift, and go to state 264
- ">>= (T_SR_EQUAL)" shift, and go to state 265
- "<<= (T_SL_EQUAL)" shift, and go to state 266
- "^= (T_XOR_EQUAL)" shift, and go to state 267
- "|= (T_OR_EQUAL)" shift, and go to state 268
- "&= (T_AND_EQUAL)" shift, and go to state 269
- "%= (T_MOD_EQUAL)" shift, and go to state 270
- ".= (T_CONCAT_EQUAL)" shift, and go to state 271
- "/= (T_DIV_EQUAL)" shift, and go to state 272
- "*= (T_MUL_EQUAL)" shift, and go to state 273
- "-= (T_MINUS_EQUAL)" shift, and go to state 274
- "+= (T_PLUS_EQUAL)" shift, and go to state 275
- "as (T_AS)" shift, and go to state 455
-
- "-- (T_DEC)" reduce using rule 427 (rw_variable)
- "++ (T_INC)" reduce using rule 427 (rw_variable)
- $default reduce using rule 425 (r_variable)
+ 245 for_expr: non_empty_for_expr .
+ 247 non_empty_for_expr: non_empty_for_expr . ',' $@41 expr
+ ',' shift, and go to state 481
-state 316
+ $default reduce using rule 245 (for_expr)
- 74 unticked_statement: "declare (T_DECLARE)" @21 '(' . declare_list ')' declare_statement
- "identifier (T_STRING)" shift, and go to state 456
+state 332
- declare_list go to state 457
+ 248 non_empty_for_expr: expr .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 248 (non_empty_for_expr)
-state 317
+state 333
- 53 unticked_statement: "switch (T_SWITCH)" '(' expr . ')' @16 switch_case_list
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 458
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable . "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' $@20 foreach_statement
+ 444 expr: expr_without_variable .
+ "as (T_AS)" shift, and go to state 482
+
+ $default reduce using rule 444 (expr)
+
+
+state 334
+
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable . "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+ "as (T_AS)" shift, and go to state 483
+
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ $default reduce using rule 447 (r_variable)
+
+
+state 335
+
+ 75 unticked_statement: "declare (T_DECLARE)" $@21 '(' . declare_list ')' declare_statement
+
+ "identifier (T_STRING)" shift, and go to state 484
+
+ declare_list go to state 485
-state 318
+
+state 336
+
+ 53 unticked_statement: "switch (T_SWITCH)" parenthesis_expr $@16 . switch_case_list
+
+ ':' shift, and go to state 486
+ '{' shift, and go to state 487
+
+ switch_case_list go to state 488
+
+
+state 337
55 unticked_statement: "break (T_BREAK)" expr ';' .
$default reduce using rule 55 (unticked_statement)
-state 319
+state 338
57 unticked_statement: "continue (T_CONTINUE)" expr ';' .
$default reduce using rule 57 (unticked_statement)
-state 320
+state 339
- 83 unticked_statement: "goto (T_GOTO)" "identifier (T_STRING)" ';' .
+ 81 unticked_statement: "goto (T_GOTO)" "identifier (T_STRING)" ';' .
- $default reduce using rule 83 (unticked_statement)
+ $default reduce using rule 81 (unticked_statement)
-state 321
+state 340
25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' . static_scalar
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 470
- static_class_constant go to state 471
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 501
+ static_class_constant go to state 502
-state 322
+state 341
59 unticked_statement: "return (T_RETURN)" expr_without_variable ';' .
$default reduce using rule 59 (unticked_statement)
-state 323
+state 342
60 unticked_statement: "return (T_RETURN)" variable ';' .
$default reduce using rule 60 (unticked_statement)
-state 324
+state 343
- 81 unticked_statement: "try (T_TRY)" @22 '{' . inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' . inner_statement_list '}' catch_statement $@23 finally_statement
$default reduce using rule 28 (inner_statement_list)
- inner_statement_list go to state 472
+ inner_statement_list go to state 503
-state 325
+state 344
- 82 unticked_statement: "throw (T_THROW)" expr ';' .
+ 80 unticked_statement: "throw (T_THROW)" expr ';' .
- $default reduce using rule 82 (unticked_statement)
+ $default reduce using rule 80 (unticked_statement)
-state 326
+state 345
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
22 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name .
23 | "\\ (T_NS_SEPARATOR)" namespace_name . "as (T_AS)" "identifier (T_STRING)"
- "as (T_AS)" shift, and go to state 473
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ "as (T_AS)" shift, and go to state 504
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
$default reduce using rule 22 (use_declaration)
-state 327
+state 346
21 use_declaration: namespace_name "as (T_AS)" . "identifier (T_STRING)"
- "identifier (T_STRING)" shift, and go to state 474
+ "identifier (T_STRING)" shift, and go to state 505
-state 328
+state 347
18 use_declarations: use_declarations ',' . use_declaration
- "identifier (T_STRING)" shift, and go to state 116
- "\\ (T_NS_SEPARATOR)" shift, and go to state 186
+ "identifier (T_STRING)" shift, and go to state 122
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 198
- namespace_name go to state 187
- use_declaration go to state 475
+ namespace_name go to state 199
+ use_declaration go to state 506
-state 329
+state 348
16 top_statement: "use (T_USE)" use_declarations ';' .
$default reduce using rule 16 (top_statement)
-state 330
+state 349
- 178 global_var: '$' '{' . expr '}'
+ 188 global_var: '$' '{' . expr '}'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -11426,455 +12428,562 @@ state 330
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 476
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 507
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 331
+state 350
- 177 global_var: '$' r_variable .
+ 187 global_var: '$' r_variable .
- $default reduce using rule 177 (global_var)
+ $default reduce using rule 187 (global_var)
-state 332
+state 351
- 425 r_variable: variable .
+ 447 r_variable: variable .
- $default reduce using rule 425 (r_variable)
+ $default reduce using rule 447 (r_variable)
-state 333
+state 352
- 174 global_var_list: global_var_list ',' . global_var
+ 184 global_var_list: global_var_list ',' . global_var
- "variable (T_VARIABLE)" shift, and go to state 190
- '$' shift, and go to state 191
+ "variable (T_VARIABLE)" shift, and go to state 202
+ '$' shift, and go to state 203
- global_var go to state 477
+ global_var go to state 508
-state 334
+state 353
- 61 unticked_statement: "global (T_GLOBAL)" global_var_list ';' .
+ 62 unticked_statement: "global (T_GLOBAL)" global_var_list ';' .
- $default reduce using rule 61 (unticked_statement)
+ $default reduce using rule 62 (unticked_statement)
-state 335
+state 354
- 182 static_var_list: "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 478
- static_class_constant go to state 471
+ 192 static_var_list: "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 509
+ static_class_constant go to state 502
-state 336
+state 355
- 179 static_var_list: static_var_list ',' . "variable (T_VARIABLE)"
- 180 | static_var_list ',' . "variable (T_VARIABLE)" '=' static_scalar
+ 189 static_var_list: static_var_list ',' . "variable (T_VARIABLE)"
+ 190 | static_var_list ',' . "variable (T_VARIABLE)" '=' static_scalar
- "variable (T_VARIABLE)" shift, and go to state 479
+ "variable (T_VARIABLE)" shift, and go to state 510
-state 337
+state 356
- 62 unticked_statement: "static (T_STATIC)" static_var_list ';' .
+ 63 unticked_statement: "static (T_STATIC)" static_var_list ';' .
- $default reduce using rule 62 (unticked_statement)
+ $default reduce using rule 63 (unticked_statement)
-state 338
+state 357
- 335 expr_without_variable: "static (T_STATIC)" function is_reference . '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference . @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- '(' shift, and go to state 480
+ $default reduce using rule 345 (@57)
+ @57 go to state 511
-state 339
- 66 unticked_statement: "unset (T_UNSET)" '(' unset_variables . ')' ';'
- 92 unset_variables: unset_variables . ',' unset_variable
+state 358
- ',' shift, and go to state 481
- ')' shift, and go to state 482
+ 67 unticked_statement: "unset (T_UNSET)" '(' unset_variables . ')' ';'
+ 99 unset_variables: unset_variables . ',' unset_variable
+ ',' shift, and go to state 512
+ ')' shift, and go to state 513
-state 340
- 91 unset_variables: unset_variable .
+state 359
- $default reduce using rule 91 (unset_variables)
+ 98 unset_variables: unset_variable .
+ $default reduce using rule 98 (unset_variables)
-state 341
- 93 unset_variable: variable .
+state 360
- $default reduce using rule 93 (unset_variable)
+ 100 unset_variable: variable .
+ $default reduce using rule 100 (unset_variable)
-state 342
- 511 isset_variables: variable .
+state 361
- $default reduce using rule 511 (isset_variables)
+ 444 expr: expr_without_variable .
+ 538 isset_variable: expr_without_variable .
+ ',' reduce using rule 538 (isset_variable)
+ ')' reduce using rule 538 (isset_variable)
+ $default reduce using rule 444 (expr)
-state 343
- 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables . ')'
- 513 isset_variables: isset_variables . ',' @73 variable
+state 362
- ',' shift, and go to state 483
- ')' shift, and go to state 484
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+ 537 isset_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+
+ ',' reduce using rule 537 (isset_variable)
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ ')' reduce using rule 537 (isset_variable)
+ $default reduce using rule 447 (r_variable)
-state 344
+state 363
- 505 internal_functions_in_yacc: "empty (T_EMPTY)" '(' variable . ')'
+ 526 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables . ')'
+ 536 isset_variables: isset_variables . ',' $@76 isset_variable
- ')' shift, and go to state 485
+ ',' shift, and go to state 514
+ ')' shift, and go to state 515
-state 345
+state 364
+
+ 534 isset_variables: isset_variable .
+
+ $default reduce using rule 534 (isset_variables)
+
+
+state 365
+
+ 444 expr: expr_without_variable .
+ 528 internal_functions_in_yacc: "empty (T_EMPTY)" '(' expr_without_variable . ')'
+
+ ')' shift, and go to state 516
+
+ $default reduce using rule 444 (expr)
+
+
+state 366
+
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+ 527 internal_functions_in_yacc: "empty (T_EMPTY)" '(' variable . ')'
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+ ')' shift, and go to state 517
+
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ $default reduce using rule 447 (r_variable)
+
+
+state 367
10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' . ';'
- ';' shift, and go to state 486
+ ';' shift, and go to state 518
-state 346
+state 368
- 253 expr_without_variable: "list (T_LIST)" '(' @42 . assignment_list ')' '=' expr
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "list (T_LIST)" shift, and go to state 487
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- $default reduce using rule 479 (assignment_list_element)
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 488
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- assignment_list go to state 489
- assignment_list_element go to state 490
+ 263 expr_without_variable: "list (T_LIST)" '(' $@45 . assignment_list ')' '=' expr
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 519
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ $default reduce using rule 501 (assignment_list_element)
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 520
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ assignment_list go to state 521
+ assignment_list_element go to state 522
-state 347
+state 369
- 328 expr_without_variable: "array (T_ARRAY)" '(' array_pair_list . ')'
+ 354 combined_scalar: "array (T_ARRAY)" '(' array_pair_list . ')'
- ')' shift, and go to state 491
+ ')' shift, and go to state 523
-state 348
+state 370
- 496 encaps_var: "variable (T_VARIABLE)" '[' . @72 encaps_var_offset ']'
+ 518 encaps_var: "variable (T_VARIABLE)" '[' . $@75 encaps_var_offset ']'
- $default reduce using rule 495 (@72)
+ $default reduce using rule 517 ($@75)
- @72 go to state 492
+ $@75 go to state 524
-state 349
+state 371
- 497 encaps_var: "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" . "identifier (T_STRING)"
+ 519 encaps_var: "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" . "identifier (T_STRING)"
- "identifier (T_STRING)" shift, and go to state 493
+ "identifier (T_STRING)" shift, and go to state 525
-state 350
+state 372
- 393 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)" .
+ 413 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)" .
- $default reduce using rule 393 (common_scalar)
+ $default reduce using rule 413 (common_scalar)
-state 351
+state 373
- 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" encaps_var .
+ 515 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" encaps_var .
- $default reduce using rule 493 (encaps_list)
+ $default reduce using rule 515 (encaps_list)
-state 352
+state 374
- 406 scalar: "variable name (T_STRING_VARNAME)" .
- 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" . '[' expr ']' '}'
+ 426 scalar: "variable name (T_STRING_VARNAME)" .
+ 521 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" . '[' expr ']' '}'
- '[' shift, and go to state 494
+ '[' shift, and go to state 526
- $default reduce using rule 406 (scalar)
+ $default reduce using rule 426 (scalar)
-state 353
+state 375
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 498 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr . '}'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '}' shift, and go to state 495
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 520 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ '}' shift, and go to state 527
-state 354
+state 376
- 500 encaps_var: "{$ (T_CURLY_OPEN)" variable . '}'
+ 522 encaps_var: "{$ (T_CURLY_OPEN)" variable . '}'
- '}' shift, and go to state 496
+ '}' shift, and go to state 528
-state 355
+state 377
- 491 encaps_list: encaps_list "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" .
+ 513 encaps_list: encaps_list "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" .
- $default reduce using rule 491 (encaps_list)
+ $default reduce using rule 513 (encaps_list)
-state 356
+state 378
- 413 scalar: "heredoc start (T_START_HEREDOC)" encaps_list "heredoc end (T_END_HEREDOC)" .
+ 433 scalar: "heredoc start (T_START_HEREDOC)" encaps_list "heredoc end (T_END_HEREDOC)" .
- $default reduce using rule 413 (scalar)
+ $default reduce using rule 433 (scalar)
-state 357
+state 379
- 490 encaps_list: encaps_list encaps_var .
+ 512 encaps_list: encaps_list encaps_var .
- $default reduce using rule 490 (encaps_list)
+ $default reduce using rule 512 (encaps_list)
-state 358
+state 380
6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name . '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- 409 scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name . @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ 429 scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- '(' shift, and go to state 497
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 361 (class_name)
- $default reduce using rule 409 (scalar)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 381 (class_name)
+ '(' reduce using rule 365 (@59)
+ $default reduce using rule 429 (scalar)
+ @59 go to state 529
-state 359
- 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 . top_statement_list '}'
+state 381
+
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' $@3 . top_statement_list '}'
$default reduce using rule 4 (top_statement_list)
- top_statement_list go to state 498
+ top_statement_list go to state 530
-state 360
+state 382
11 top_statement: "namespace (T_NAMESPACE)" namespace_name ';' .
$default reduce using rule 11 (top_statement)
-state 361
+state 383
- 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' . @2 top_statement_list '}'
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' . $@2 top_statement_list '}'
- $default reduce using rule 12 (@2)
+ $default reduce using rule 12 ($@2)
- @2 go to state 499
+ $@2 go to state 531
-state 362
+state 384
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' . @57 function_call_parameter_list ')'
+ 368 function_call: "\\ (T_NS_SEPARATOR)" namespace_name @60 . function_call_parameter_list
- $default reduce using rule 347 (@57)
+ '(' shift, and go to state 394
- @57 go to state 500
+ function_call_parameter_list go to state 532
-state 363
+state 385
- 310 expr_without_variable: '(' new_expr ')' . @48 instance_call
+ 320 expr_without_variable: '(' new_expr ')' . @51 instance_call
- $default reduce using rule 309 (@48)
+ $default reduce using rule 319 (@51)
- @48 go to state 501
+ @51 go to state 533
-state 364
+state 386
- 307 expr_without_variable: '(' expr ')' .
+ 446 parenthesis_expr: '(' yield_expr ')' .
- $default reduce using rule 307 (expr_without_variable)
+ $default reduce using rule 446 (parenthesis_expr)
-state 365
+state 387
+
+ 445 parenthesis_expr: '(' expr ')' .
+
+ $default reduce using rule 445 (parenthesis_expr)
+
+
+state 388
35 unticked_statement: '{' inner_statement_list '}' .
$default reduce using rule 35 (unticked_statement)
-state 366
+state 389
- 27 inner_statement_list: inner_statement_list @4 . inner_statement
+ 27 inner_statement_list: inner_statement_list $@4 . inner_statement
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -11882,195 +12991,202 @@ state 366
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "final (T_FINAL)" shift, and go to state 54
- "abstract (T_ABSTRACT)" shift, and go to state 55
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "__halt_compiler (T_HALT_COMPILER)" shift, and go to state 502
- "class (T_CLASS)" shift, and go to state 61
- "trait (T_TRAIT)" shift, and go to state 62
- "interface (T_INTERFACE)" shift, and go to state 63
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- inner_statement go to state 503
- statement go to state 504
- unticked_statement go to state 87
- function_declaration_statement go to state 505
- class_declaration_statement go to state 506
- unticked_function_declaration_statement go to state 90
- unticked_class_declaration_statement go to state 91
- class_entry_type go to state 92
- interface_entry go to state 93
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 96
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "final (T_FINAL)" shift, and go to state 55
+ "abstract (T_ABSTRACT)" shift, and go to state 56
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "__halt_compiler (T_HALT_COMPILER)" shift, and go to state 534
+ "class (T_CLASS)" shift, and go to state 62
+ "trait (T_TRAIT)" shift, and go to state 63
+ "interface (T_INTERFACE)" shift, and go to state 64
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ inner_statement go to state 535
+ statement go to state 536
+ unticked_statement go to state 88
+ function_declaration_statement go to state 537
+ class_declaration_statement go to state 538
+ unticked_function_declaration_statement go to state 91
+ unticked_class_declaration_statement go to state 92
+ class_entry_type go to state 93
+ interface_entry go to state 94
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 100
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 367
+state 390
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 461 compound_variable: '$' '{' expr . '}'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '}' shift, and go to state 507
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 483 compound_variable: '$' '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ '}' shift, and go to state 539
-state 368
+state 391
- 330 expr_without_variable: '`' backticks_expr '`' .
+ 340 expr_without_variable: '`' backticks_expr '`' .
- $default reduce using rule 330 (expr_without_variable)
+ $default reduce using rule 340 (expr_without_variable)
-state 369
+state 392
- 412 scalar: '"' encaps_list '"' .
+ 432 scalar: '"' encaps_list '"' .
- $default reduce using rule 412 (scalar)
+ $default reduce using rule 432 (scalar)
-state 370
+state 393
6 namespace_name: namespace_name "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)" .
$default reduce using rule 6 (namespace_name)
-state 371
+state 394
- 344 function_call: namespace_name '(' @55 . function_call_parameter_list ')'
+ 175 function_call_parameter_list: '(' . ')'
+ 176 | '(' . non_empty_function_call_parameter_list ')'
+ 177 | '(' . yield_expr ')'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12078,142 +13194,164 @@ state 371
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 509
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 11
+ '&' shift, and go to state 540
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ')' shift, and go to state 541
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ non_empty_function_call_parameter_list go to state 542
+ new_expr go to state 95
+ expr_without_variable go to state 543
+ yield_expr go to state 544
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 545
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 372
+state 395
+
+ 364 function_call: namespace_name @58 function_call_parameter_list .
+
+ $default reduce using rule 364 (function_call)
+
+
+state 396
24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" . '=' static_scalar
- '=' shift, and go to state 513
+ '=' shift, and go to state 546
-state 373
+state 397
- 109 extends_from: "extends (T_EXTENDS)" . fully_qualified_class_name
+ 116 extends_from: "extends (T_EXTENDS)" . fully_qualified_class_name
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
- namespace_name go to state 516
- fully_qualified_class_name go to state 517
+ namespace_name go to state 549
+ fully_qualified_class_name go to state 550
-state 374
+state 398
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from . @30 implements_list '{' class_statement_list '}'
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from . $@32 implements_list '{' class_statement_list '}'
- $default reduce using rule 100 (@30)
+ $default reduce using rule 107 ($@32)
- @30 go to state 518
+ $@32 go to state 551
-state 375
+state 399
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 . interface_extends_list '{' class_statement_list '}'
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" $@33 . interface_extends_list '{' class_statement_list '}'
- "extends (T_EXTENDS)" shift, and go to state 519
+ "extends (T_EXTENDS)" shift, and go to state 552
- $default reduce using rule 111 (interface_extends_list)
+ $default reduce using rule 118 (interface_extends_list)
- interface_extends_list go to state 520
+ interface_extends_list go to state 553
-state 376
+state 400
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" . @29 '(' parameter_list ')' '{' inner_statement_list '}'
+ 352 combined_scalar_offset: combined_scalar_offset '[' dim_offset . ']'
- $default reduce using rule 98 (@29)
+ ']' shift, and go to state 554
- @29 go to state 521
+state 401
-state 377
+ 351 combined_scalar_offset: combined_scalar '[' dim_offset . ']'
- 333 expr_without_variable: function is_reference '(' . @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ ']' shift, and go to state 555
- $default reduce using rule 332 (@53)
- @53 go to state 522
+state 402
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" . $@31 '(' parameter_list ')' '{' inner_statement_list '}'
-state 378
+ $default reduce using rule 105 ($@31)
+
+ $@31 go to state 556
+
+
+state 403
+
+ 344 expr_without_variable: function is_reference @56 . '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
+
+ '(' shift, and go to state 557
- 450 array_function_dereference: function_call @69 '[' . dim_offset ']'
+
+state 404
+
+ 472 array_function_dereference: function_call $@72 '[' . dim_offset ']'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12221,92 +13359,96 @@ state 378
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 523
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 558
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 379
+state 405
- 470 variable_name: "identifier (T_STRING)" .
- 514 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
+ 492 variable_name: "identifier (T_STRING)" .
+ 539 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- '(' reduce using rule 470 (variable_name)
- $default reduce using rule 514 (class_constant)
+ '(' reduce using rule 492 (variable_name)
+ $default reduce using rule 539 (class_constant)
-state 380
+state 406
- 471 variable_name: '{' . expr '}'
+ 493 variable_name: '{' . expr '}'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12314,121 +13456,128 @@ state 380
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 524
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 559
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 381
+state 407
- 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects . '(' @59 function_call_parameter_list ')'
- 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
+ 372 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects . $@62 function_call_parameter_list
+ 467 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- '(' shift, and go to state 525
+ '(' reduce using rule 371 ($@62)
+ $default reduce using rule 467 (static_member)
- $default reduce using rule 445 (static_member)
+ $@62 go to state 560
-state 382
+state 408
- 443 variable_without_objects: reference_variable .
- 457 reference_variable: reference_variable . '[' dim_offset ']'
- 458 | reference_variable . '{' expr '}'
+ 465 variable_without_objects: reference_variable .
+ 479 reference_variable: reference_variable . '[' dim_offset ']'
+ 480 | reference_variable . '{' expr '}'
- '[' shift, and go to state 280
- '{' shift, and go to state 281
+ '[' shift, and go to state 296
+ '{' shift, and go to state 297
- $default reduce using rule 443 (variable_without_objects)
+ $default reduce using rule 465 (variable_without_objects)
-state 383
+state 409
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name . '(' @58 function_call_parameter_list ')'
+ 370 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name . @61 function_call_parameter_list
- '(' shift, and go to state 526
+ $default reduce using rule 369 (@61)
+ @61 go to state 561
-state 384
- 444 variable_without_objects: simple_indirect_reference . reference_variable
- 473 simple_indirect_reference: simple_indirect_reference . '$'
+state 410
- "variable (T_VARIABLE)" shift, and go to state 34
- '$' shift, and go to state 282
+ 466 variable_without_objects: simple_indirect_reference . reference_variable
+ 495 simple_indirect_reference: simple_indirect_reference . '$'
- reference_variable go to state 527
- compound_variable go to state 112
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '$' shift, and go to state 298
+ reference_variable go to state 562
+ compound_variable go to state 117
-state 385
- 279 expr_without_variable: expr "or (T_LOGICAL_OR)" @46 . expr
+state 411
+
+ 289 expr_without_variable: expr "or (T_LOGICAL_OR)" $@49 . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12436,139 +13585,143 @@ state 385
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 528
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 563
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 386
+state 412
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 282 | expr "xor (T_LOGICAL_XOR)" expr .
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 292 | expr "xor (T_LOGICAL_XOR)" expr .
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 282 (expr_without_variable)
+ $default reduce using rule 292 (expr_without_variable)
-state 387
+state 413
- 281 expr_without_variable: expr "and (T_LOGICAL_AND)" @47 . expr
+ 291 expr_without_variable: expr "and (T_LOGICAL_AND)" $@50 . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12576,89 +13729,93 @@ state 387
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 529
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 564
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 388
+state 414
- 315 expr_without_variable: expr '?' ':' . @51 expr
+ 325 expr_without_variable: expr '?' ':' . $@54 expr
- $default reduce using rule 314 (@51)
+ $default reduce using rule 324 ($@54)
- @51 go to state 530
+ $@54 go to state 565
-state 389
+state 415
- 313 expr_without_variable: expr '?' @49 . expr ':' @50 expr
+ 323 expr_without_variable: expr '?' $@52 . expr ':' $@53 expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12666,80 +13823,84 @@ state 389
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 531
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 566
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 390
+state 416
- 275 expr_without_variable: expr "|| (T_BOOLEAN_OR)" @44 . expr
+ 285 expr_without_variable: expr "|| (T_BOOLEAN_OR)" $@47 . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12747,80 +13908,84 @@ state 390
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 532
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 567
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 391
+state 417
- 277 expr_without_variable: expr "&& (T_BOOLEAN_AND)" @45 . expr
+ 287 expr_without_variable: expr "&& (T_BOOLEAN_AND)" $@48 . expr
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -12828,4968 +13993,4028 @@ state 391
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 533
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 568
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
-state 392
+state 418
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 283 | expr '|' expr .
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 293 | expr '|' expr .
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 283 (expr_without_variable)
+ $default reduce using rule 293 (expr_without_variable)
-state 393
+state 419
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 285 | expr '^' expr .
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 295 | expr '^' expr .
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 285 (expr_without_variable)
+ $default reduce using rule 295 (expr_without_variable)
-state 394
+state 420
+
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 294 | expr '&' expr .
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 284 | expr '&' expr .
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 284 (expr_without_variable)
+ $default reduce using rule 294 (expr_without_variable)
-state 395
+state 421
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 299 | expr "!== (T_IS_NOT_IDENTICAL)" expr .
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 309 | expr "!== (T_IS_NOT_IDENTICAL)" expr .
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
"!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
"=== (T_IS_IDENTICAL)" error (nonassociative)
"!= (T_IS_NOT_EQUAL)" error (nonassociative)
"== (T_IS_EQUAL)" error (nonassociative)
- $default reduce using rule 299 (expr_without_variable)
+ $default reduce using rule 309 (expr_without_variable)
-state 396
+state 422
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 298 | expr "=== (T_IS_IDENTICAL)" expr .
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 308 | expr "=== (T_IS_IDENTICAL)" expr .
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
"!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
"=== (T_IS_IDENTICAL)" error (nonassociative)
"!= (T_IS_NOT_EQUAL)" error (nonassociative)
"== (T_IS_EQUAL)" error (nonassociative)
- $default reduce using rule 298 (expr_without_variable)
+ $default reduce using rule 308 (expr_without_variable)
-state 397
+state 423
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 301 | expr "!= (T_IS_NOT_EQUAL)" expr .
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 311 | expr "!= (T_IS_NOT_EQUAL)" expr .
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
"!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
"=== (T_IS_IDENTICAL)" error (nonassociative)
"!= (T_IS_NOT_EQUAL)" error (nonassociative)
"== (T_IS_EQUAL)" error (nonassociative)
- $default reduce using rule 301 (expr_without_variable)
+ $default reduce using rule 311 (expr_without_variable)
-state 398
+state 424
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 300 | expr "== (T_IS_EQUAL)" expr .
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 310 | expr "== (T_IS_EQUAL)" expr .
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
"!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
"=== (T_IS_IDENTICAL)" error (nonassociative)
"!= (T_IS_NOT_EQUAL)" error (nonassociative)
"== (T_IS_EQUAL)" error (nonassociative)
- $default reduce using rule 300 (expr_without_variable)
+ $default reduce using rule 310 (expr_without_variable)
-state 399
+state 425
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 302 | expr '<' expr .
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 312 | expr '<' expr .
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
'<' error (nonassociative)
'>' error (nonassociative)
">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
"<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
- $default reduce using rule 302 (expr_without_variable)
+ $default reduce using rule 312 (expr_without_variable)
-state 400
+state 426
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 304 | expr '>' expr .
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 314 | expr '>' expr .
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
'<' error (nonassociative)
'>' error (nonassociative)
">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
"<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
- $default reduce using rule 304 (expr_without_variable)
+ $default reduce using rule 314 (expr_without_variable)
-state 401
+state 427
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 305 | expr ">= (T_IS_GREATER_OR_EQUAL)" expr .
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 315 | expr ">= (T_IS_GREATER_OR_EQUAL)" expr .
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
'<' error (nonassociative)
'>' error (nonassociative)
">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
"<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
- $default reduce using rule 305 (expr_without_variable)
+ $default reduce using rule 315 (expr_without_variable)
-state 402
+state 428
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 303 | expr "<= (T_IS_SMALLER_OR_EQUAL)" expr .
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 313 | expr "<= (T_IS_SMALLER_OR_EQUAL)" expr .
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
'<' error (nonassociative)
'>' error (nonassociative)
">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
"<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
- $default reduce using rule 303 (expr_without_variable)
-
-
-state 403
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 293 | expr ">> (T_SR)" expr .
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 293 (expr_without_variable)
-
-
-state 404
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 292 | expr "<< (T_SL)" expr .
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 292 (expr_without_variable)
-
-
-state 405
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 287 | expr '+' expr .
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 287 (expr_without_variable)
-
-
-state 406
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 288 | expr '-' expr .
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 288 (expr_without_variable)
-
-
-state 407
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 286 | expr '.' expr .
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 286 (expr_without_variable)
-
-
-state 408
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 289 | expr '*' expr .
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 289 (expr_without_variable)
-
-
-state 409
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 290 | expr '/' expr .
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 290 (expr_without_variable)
-
-
-state 410
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 291 | expr '%' expr .
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 291 (expr_without_variable)
-
-
-state 411
-
- 306 expr_without_variable: expr "instanceof (T_INSTANCEOF)" class_name_reference .
-
- $default reduce using rule 306 (expr_without_variable)
-
-
-state 412
-
- 255 expr_without_variable: variable '=' '&' . variable
- 257 | variable '=' '&' . "new (T_NEW)" class_name_reference @43 ctor_arguments
-
- "new (T_NEW)" shift, and go to state 534
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 535
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
-
-
-state 413
-
- 254 expr_without_variable: variable '=' expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 254 (expr_without_variable)
-
-
-state 414
-
- 269 expr_without_variable: variable ">>= (T_SR_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 269 (expr_without_variable)
-
-
-state 415
-
- 268 expr_without_variable: variable "<<= (T_SL_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 268 (expr_without_variable)
-
-
-state 416
-
- 267 expr_without_variable: variable "^= (T_XOR_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 267 (expr_without_variable)
-
-
-state 417
-
- 266 expr_without_variable: variable "|= (T_OR_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 266 (expr_without_variable)
-
-
-state 418
-
- 265 expr_without_variable: variable "&= (T_AND_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 265 (expr_without_variable)
-
-
-state 419
-
- 264 expr_without_variable: variable "%= (T_MOD_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 264 (expr_without_variable)
-
-
-state 420
-
- 263 expr_without_variable: variable ".= (T_CONCAT_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 263 (expr_without_variable)
-
-
-state 421
-
- 262 expr_without_variable: variable "/= (T_DIV_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 262 (expr_without_variable)
-
-
-state 422
-
- 261 expr_without_variable: variable "*= (T_MUL_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 261 (expr_without_variable)
-
-
-state 423
-
- 260 expr_without_variable: variable "-= (T_MINUS_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 260 (expr_without_variable)
-
-
-state 424
-
- 259 expr_without_variable: variable "+= (T_PLUS_EQUAL)" expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 259 (expr_without_variable)
-
-
-state 425
-
- 358 function_call: variable_without_objects '(' @62 . function_call_parameter_list ')'
-
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 536
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
-
-state 426
-
- 470 variable_name: "identifier (T_STRING)" .
- 515 class_constant: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
-
- '(' reduce using rule 470 (variable_name)
- $default reduce using rule 515 (class_constant)
-
-
-state 427
-
- 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects . '(' @61 function_call_parameter_list ')'
- 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
-
- '(' shift, and go to state 537
-
- $default reduce using rule 446 (static_member)
-
-
-state 428
-
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name . '(' @60 function_call_parameter_list ')'
-
- '(' shift, and go to state 538
+ $default reduce using rule 313 (expr_without_variable)
state 429
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 463 dim_offset: expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 463 (dim_offset)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 303 | expr ">> (T_SR)" expr .
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 303 (expr_without_variable)
state 430
- 448 array_function_dereference: array_function_dereference '[' dim_offset . ']'
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 302 | expr "<< (T_SL)" expr .
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- ']' shift, and go to state 539
+ $default reduce using rule 302 (expr_without_variable)
state 431
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 . object_property @66 method_or_not variable_properties
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 297 | expr '+' expr .
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- "identifier (T_STRING)" shift, and go to state 436
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
-
- variable_without_objects go to state 540
- reference_variable go to state 382
- compound_variable go to state 112
- object_property go to state 541
- object_dim_list go to state 542
- variable_name go to state 543
- simple_indirect_reference go to state 384
+ $default reduce using rule 297 (expr_without_variable)
state 432
- 457 reference_variable: reference_variable '[' dim_offset . ']'
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 298 | expr '-' expr .
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- ']' shift, and go to state 544
+ $default reduce using rule 298 (expr_without_variable)
state 433
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 458 reference_variable: reference_variable '{' expr . '}'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '}' shift, and go to state 545
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 296 | expr '.' expr .
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 296 (expr_without_variable)
state 434
- 508 internal_functions_in_yacc: "eval (T_EVAL)" '(' expr ')' .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 299 | expr '*' expr .
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 508 (internal_functions_in_yacc)
+ $default reduce using rule 299 (expr_without_variable)
state 435
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name . '(' @56 function_call_parameter_list ')'
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 300 | expr '/' expr .
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- '(' shift, and go to state 497
-
- $default reduce using rule 361 (class_name)
+ $default reduce using rule 300 (expr_without_variable)
state 436
- 470 variable_name: "identifier (T_STRING)" .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 301 | expr '%' expr .
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 470 (variable_name)
+ $default reduce using rule 301 (expr_without_variable)
state 437
- 488 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" '&' . w_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- w_variable go to state 546
- variable go to state 292
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 316 expr_without_variable: expr "instanceof (T_INSTANCEOF)" class_name_reference .
+
+ $default reduce using rule 316 (expr_without_variable)
state 438
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 484 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 484 (non_empty_array_pair_list)
+ 265 expr_without_variable: variable '=' '&' . variable
+ 267 | variable '=' '&' . "new (T_NEW)" class_name_reference $@46 ctor_arguments
+
+ "new (T_NEW)" shift, and go to state 569
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 570
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 439
- 487 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' . w_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- w_variable go to state 547
- variable go to state 292
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 264 expr_without_variable: variable '=' expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ $default reduce using rule 264 (expr_without_variable)
-state 440
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr . "=> (T_DOUBLE_ARROW)" expr
- 483 | non_empty_array_pair_list ',' expr .
- 486 | non_empty_array_pair_list ',' expr . "=> (T_DOUBLE_ARROW)" '&' w_variable
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- "=> (T_DOUBLE_ARROW)" shift, and go to state 548
-
- $default reduce using rule 483 (non_empty_array_pair_list)
+state 440
+ 279 expr_without_variable: variable ">>= (T_SR_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
-state 441
+ $default reduce using rule 279 (expr_without_variable)
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+state 441
- $default reduce using rule 361 (class_name)
+ 278 expr_without_variable: variable "<<= (T_SL_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 278 (expr_without_variable)
state 442
- 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
+ 277 expr_without_variable: variable "^= (T_XOR_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 445 (static_member)
+ $default reduce using rule 277 (expr_without_variable)
state 443
- 382 ctor_arguments: '(' . function_call_parameter_list ')'
-
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 549
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ 276 expr_without_variable: variable "|= (T_OR_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 276 (expr_without_variable)
state 444
- 251 new_expr: "new (T_NEW)" class_name_reference @41 ctor_arguments .
+ 275 expr_without_variable: variable "&= (T_AND_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 251 (new_expr)
+ $default reduce using rule 275 (expr_without_variable)
state 445
- 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
-
- $default reduce using rule 446 (static_member)
+ 274 expr_without_variable: variable "%= (T_MOD_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 274 (expr_without_variable)
state 446
- 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 . object_property @64 dynamic_class_name_variable_properties
+ 273 expr_without_variable: variable ".= (T_CONCAT_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- "identifier (T_STRING)" shift, and go to state 436
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
-
- variable_without_objects go to state 540
- reference_variable go to state 382
- compound_variable go to state 112
- object_property go to state 550
- object_dim_list go to state 542
- variable_name go to state 543
- simple_indirect_reference go to state 384
+ $default reduce using rule 273 (expr_without_variable)
state 447
- 377 exit_expr: '(' expr ')' .
+ 272 expr_without_variable: variable "/= (T_DIV_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 377 (exit_expr)
+ $default reduce using rule 272 (expr_without_variable)
state 448
- 38 unticked_statement: "if (T_IF)" '(' expr ')' . @5 statement @6 elseif_list else_single
- 41 | "if (T_IF)" '(' expr ')' . ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
-
- ':' shift, and go to state 551
+ 271 expr_without_variable: variable "*= (T_MUL_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 36 (@5)
-
- @5 go to state 552
+ $default reduce using rule 271 (expr_without_variable)
state 449
- 232 echo_expr_list: echo_expr_list ',' expr .
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 232 (echo_expr_list)
+ 270 expr_without_variable: variable "-= (T_MINUS_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 270 (expr_without_variable)
state 450
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" . '(' @12 expr ')' ';'
+ 269 expr_without_variable: variable "+= (T_PLUS_EQUAL)" expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- '(' shift, and go to state 553
+ $default reduce using rule 269 (expr_without_variable)
state 451
- 44 unticked_statement: "while (T_WHILE)" '(' @9 expr . ')' @10 while_statement
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 554
+ 378 function_call: variable_without_objects $@65 function_call_parameter_list .
+ $default reduce using rule 378 (function_call)
-state 452
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' . @13 for_expr ';' @14 for_expr ')' @15 for_statement
+state 452
- $default reduce using rule 48 (@13)
+ 492 variable_name: "identifier (T_STRING)" .
+ 540 class_constant: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- @13 go to state 555
+ '(' reduce using rule 492 (variable_name)
+ $default reduce using rule 540 (class_constant)
state 453
- 237 non_empty_for_expr: non_empty_for_expr ',' . @38 expr
+ 376 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects . $@64 function_call_parameter_list
+ 468 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 236 (@38)
+ '(' reduce using rule 375 ($@64)
+ $default reduce using rule 468 (static_member)
- @38 go to state 556
+ $@64 go to state 571
state 454
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" . @19 variable foreach_optional_arg ')' @20 foreach_statement
+ 374 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name . $@63 function_call_parameter_list
- $default reduce using rule 70 (@19)
+ $default reduce using rule 373 ($@63)
- @19 go to state 557
+ $@63 go to state 572
state 455
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" . @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
+ 470 array_function_dereference: array_function_dereference '[' dim_offset . ']'
- $default reduce using rule 67 (@17)
-
- @17 go to state 558
+ ']' shift, and go to state 573
state 456
- 127 declare_list: "identifier (T_STRING)" . '=' static_scalar
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" $@68 . object_property $@69 method_or_not variable_properties
+
+ "identifier (T_STRING)" shift, and go to state 463
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
- '=' shift, and go to state 559
+ variable_without_objects go to state 574
+ reference_variable go to state 408
+ compound_variable go to state 117
+ object_property go to state 575
+ object_dim_list go to state 576
+ variable_name go to state 577
+ simple_indirect_reference go to state 410
state 457
- 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list . ')' declare_statement
- 128 declare_list: declare_list . ',' "identifier (T_STRING)" '=' static_scalar
+ 479 reference_variable: reference_variable '[' dim_offset . ']'
- ',' shift, and go to state 560
- ')' shift, and go to state 561
+ ']' shift, and go to state 578
state 458
- 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' . @16 switch_case_list
-
- $default reduce using rule 52 (@16)
-
- @16 go to state 562
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 480 reference_variable: reference_variable '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ '}' shift, and go to state 579
state 459
- 399 static_scalar: '+' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 563
- static_class_constant go to state 471
+ 531 internal_functions_in_yacc: "eval (T_EVAL)" '(' expr ')' .
+
+ $default reduce using rule 531 (internal_functions_in_yacc)
state 460
- 400 static_scalar: '-' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 564
- static_class_constant go to state 471
+ 349 yield_expr: "yield (T_YIELD)" expr "=> (T_DOUBLE_ARROW)" expr_without_variable .
+ 444 expr: expr_without_variable .
+
+ ')' reduce using rule 349 (yield_expr)
+ ';' reduce using rule 349 (yield_expr)
+ $default reduce using rule 444 (expr)
state 461
- 402 static_scalar: '[' . static_array_pair_list ']'
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- $default reduce using rule 415 (static_array_pair_list)
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 565
- static_class_constant go to state 471
- static_array_pair_list go to state 566
- non_empty_static_array_pair_list go to state 567
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 350 yield_expr: "yield (T_YIELD)" expr "=> (T_DOUBLE_ARROW)" variable .
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ ')' reduce using rule 350 (yield_expr)
+ ';' reduce using rule 350 (yield_expr)
+ $default reduce using rule 447 (r_variable)
state 462
- 401 static_scalar: "array (T_ARRAY)" . '(' static_array_pair_list ')'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name . @59 function_call_parameter_list
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- '(' shift, and go to state 568
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 381 (class_name)
+ $default reduce using rule 365 (@59)
+
+ @59 go to state 529
state 463
- 404 static_scalar: "__CLASS__ (T_CLASS_C)" .
+ 492 variable_name: "identifier (T_STRING)" .
- $default reduce using rule 404 (static_scalar)
+ $default reduce using rule 492 (variable_name)
state 464
- 393 common_scalar: "heredoc start (T_START_HEREDOC)" . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
- 394 | "heredoc start (T_START_HEREDOC)" . "heredoc end (T_END_HEREDOC)"
-
- "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 569
- "heredoc end (T_END_HEREDOC)" shift, and go to state 207
+ 510 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ w_variable go to state 580
+ variable go to state 309
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 465
- 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- 397 static_scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 570
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 506 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 506 (non_empty_array_pair_list)
state 466
- 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
- 398 static_scalar: "\\ (T_NS_SEPARATOR)" . namespace_name
-
- "identifier (T_STRING)" shift, and go to state 116
-
- namespace_name go to state 571
+ 509 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ w_variable go to state 581
+ variable go to state 309
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 467
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 360 class_name: namespace_name .
- 396 static_scalar: namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
-
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 360 (class_name)
- $default reduce using rule 396 (static_scalar)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 504 non_empty_array_pair_list: non_empty_array_pair_list ',' expr . "=> (T_DOUBLE_ARROW)" expr
+ 505 | non_empty_array_pair_list ',' expr .
+ 508 | non_empty_array_pair_list ',' expr . "=> (T_DOUBLE_ARROW)" '&' w_variable
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 582
+
+ $default reduce using rule 505 (non_empty_array_pair_list)
state 468
- 405 static_class_constant: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 572
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
+
+ $default reduce using rule 381 (class_name)
state 469
- 395 static_scalar: common_scalar .
+ 467 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 395 (static_scalar)
+ $default reduce using rule 467 (static_member)
state 470
- 25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar .
+ 402 ctor_arguments: function_call_parameter_list .
- $default reduce using rule 25 (constant_declaration)
+ $default reduce using rule 402 (ctor_arguments)
state 471
- 403 static_scalar: static_class_constant .
+ 261 new_expr: "new (T_NEW)" class_name_reference $@44 ctor_arguments .
- $default reduce using rule 403 (static_scalar)
+ $default reduce using rule 261 (new_expr)
state 472
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list . '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
-
- '}' shift, and go to state 573
+ 468 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 26 (@4)
-
- @4 go to state 366
+ $default reduce using rule 468 (static_member)
state 473
- 23 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" . "identifier (T_STRING)"
+ 390 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" $@66 . object_property $@67 dynamic_class_name_variable_properties
- "identifier (T_STRING)" shift, and go to state 574
+ "identifier (T_STRING)" shift, and go to state 463
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
+
+ variable_without_objects go to state 574
+ reference_variable go to state 408
+ compound_variable go to state 117
+ object_property go to state 583
+ object_dim_list go to state 576
+ variable_name go to state 577
+ simple_indirect_reference go to state 410
state 474
- 21 use_declaration: namespace_name "as (T_AS)" "identifier (T_STRING)" .
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 . inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- $default reduce using rule 21 (use_declaration)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 584
state 475
- 18 use_declarations: use_declarations ',' use_declaration .
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr $@5 statement . $@6 elseif_list else_single
- $default reduce using rule 18 (use_declarations)
+ $default reduce using rule 37 ($@6)
+
+ $@6 go to state 585
state 476
- 178 global_var: '$' '{' expr . '}'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '}' shift, and go to state 575
+ 353 combined_scalar_offset: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" '[' dim_offset ']' .
+ $default reduce using rule 353 (combined_scalar_offset)
-state 477
- 174 global_var_list: global_var_list ',' global_var .
+state 477
- $default reduce using rule 174 (global_var_list)
+ 242 echo_expr_list: echo_expr_list ',' expr .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 242 (echo_expr_list)
state 478
- 182 static_var_list: "variable (T_VARIABLE)" '=' static_scalar .
+ 47 unticked_statement: "do (T_DO)" $@11 statement "while (T_WHILE)" . $@12 parenthesis_expr ';'
- $default reduce using rule 182 (static_var_list)
+ $default reduce using rule 46 ($@12)
+ $@12 go to state 586
-state 479
- 179 static_var_list: static_var_list ',' "variable (T_VARIABLE)" .
- 180 | static_var_list ',' "variable (T_VARIABLE)" . '=' static_scalar
+state 479
- '=' shift, and go to state 576
+ 44 unticked_statement: "while (T_WHILE)" $@9 parenthesis_expr @10 . while_statement
- $default reduce using rule 179 (static_var_list)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ ':' shift, and go to state 587
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 588
+ unticked_statement go to state 88
+ while_statement go to state 589
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 480
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' . @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' . $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
- $default reduce using rule 334 (@54)
+ $default reduce using rule 48 ($@13)
- @54 go to state 577
+ $@13 go to state 590
state 481
- 92 unset_variables: unset_variables ',' . unset_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- unset_variable go to state 578
- function_call go to state 97
- class_name go to state 142
- variable go to state 341
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 247 non_empty_for_expr: non_empty_for_expr ',' . $@41 expr
+
+ $default reduce using rule 246 ($@41)
+
+ $@41 go to state 591
state 482
- 66 unticked_statement: "unset (T_UNSET)" '(' unset_variables ')' . ';'
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" . $@19 foreach_variable foreach_optional_arg ')' $@20 foreach_statement
+
+ $default reduce using rule 71 ($@19)
- ';' shift, and go to state 579
+ $@19 go to state 592
state 483
- 513 isset_variables: isset_variables ',' . @73 variable
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" . $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
- $default reduce using rule 512 (@73)
+ $default reduce using rule 68 ($@17)
- @73 go to state 580
+ $@17 go to state 593
state 484
- 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables ')' .
+ 136 declare_list: "identifier (T_STRING)" . '=' static_scalar
- $default reduce using rule 504 (internal_functions_in_yacc)
+ '=' shift, and go to state 594
state 485
- 505 internal_functions_in_yacc: "empty (T_EMPTY)" '(' variable ')' .
+ 75 unticked_statement: "declare (T_DECLARE)" $@21 '(' declare_list . ')' declare_statement
+ 137 declare_list: declare_list . ',' "identifier (T_STRING)" '=' static_scalar
- $default reduce using rule 505 (internal_functions_in_yacc)
+ ',' shift, and go to state 595
+ ')' shift, and go to state 596
state 486
- 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';' .
+ 140 switch_case_list: ':' . case_list "endswitch (T_ENDSWITCH)" ';'
+ 141 | ':' . ';' case_list "endswitch (T_ENDSWITCH)" ';'
- $default reduce using rule 10 (top_statement)
+ ';' shift, and go to state 597
+
+ $default reduce using rule 142 (case_list)
+
+ case_list go to state 598
state 487
- 478 assignment_list_element: "list (T_LIST)" . '(' @71 assignment_list ')'
+ 138 switch_case_list: '{' . case_list '}'
+ 139 | '{' . ';' case_list '}'
- '(' shift, and go to state 581
+ ';' shift, and go to state 599
+
+ $default reduce using rule 142 (case_list)
+
+ case_list go to state 600
state 488
- 476 assignment_list_element: variable .
+ 53 unticked_statement: "switch (T_SWITCH)" parenthesis_expr $@16 switch_case_list .
- $default reduce using rule 476 (assignment_list_element)
+ $default reduce using rule 53 (unticked_statement)
state 489
- 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list . ')' '=' expr
- 474 assignment_list: assignment_list . ',' assignment_list_element
-
- ',' shift, and go to state 582
- ')' shift, and go to state 583
+ 419 static_scalar: '+' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 601
+ static_class_constant go to state 502
state 490
- 475 assignment_list: assignment_list_element .
-
- $default reduce using rule 475 (assignment_list)
+ 420 static_scalar: '-' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 602
+ static_class_constant go to state 502
state 491
- 328 expr_without_variable: "array (T_ARRAY)" '(' array_pair_list ')' .
-
- $default reduce using rule 328 (expr_without_variable)
+ 422 static_scalar: '[' . static_array_pair_list ']'
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ $default reduce using rule 435 (static_array_pair_list)
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 603
+ static_class_constant go to state 502
+ static_array_pair_list go to state 604
+ non_empty_static_array_pair_list go to state 605
state 492
- 496 encaps_var: "variable (T_VARIABLE)" '[' @72 . encaps_var_offset ']'
-
- "identifier (T_STRING)" shift, and go to state 584
- "variable (T_VARIABLE)" shift, and go to state 585
- "number (T_NUM_STRING)" shift, and go to state 586
+ 405 common_scalar: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" .
- encaps_var_offset go to state 587
+ $default reduce using rule 405 (common_scalar)
state 493
- 497 encaps_var: "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)" .
+ 421 static_scalar: "array (T_ARRAY)" . '(' static_array_pair_list ')'
- $default reduce using rule 497 (encaps_var)
+ '(' shift, and go to state 606
state 494
- 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' . expr ']' '}'
+ 424 static_scalar: "__CLASS__ (T_CLASS_C)" .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 588
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 424 (static_scalar)
state 495
- 498 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr '}' .
+ 413 common_scalar: "heredoc start (T_START_HEREDOC)" . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
+ 414 | "heredoc start (T_START_HEREDOC)" . "heredoc end (T_END_HEREDOC)"
- $default reduce using rule 498 (encaps_var)
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 607
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 219
state 496
- 500 encaps_var: "{$ (T_CURLY_OPEN)" variable '}' .
+ 381 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 417 static_scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- $default reduce using rule 500 (encaps_var)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 608
state 497
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' . @56 function_call_parameter_list ')'
+ 382 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 418 static_scalar: "\\ (T_NS_SEPARATOR)" . namespace_name
- $default reduce using rule 345 (@56)
+ "identifier (T_STRING)" shift, and go to state 122
- @56 go to state 589
+ namespace_name go to state 609
state 498
- 3 top_statement_list: top_statement_list . @1 top_statement
- 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 top_statement_list . '}'
-
- '}' shift, and go to state 590
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 380 class_name: namespace_name .
+ 416 static_scalar: namespace_name .
- $default reduce using rule 2 (@1)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- @1 go to state 4
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 380 (class_name)
+ $default reduce using rule 416 (static_scalar)
state 499
- 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 . top_statement_list '}'
+ 425 static_class_constant: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 4 (top_statement_list)
-
- top_statement_list go to state 591
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 610
state 500
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 . function_call_parameter_list ')'
+ 415 static_scalar: common_scalar .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 592
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 415 (static_scalar)
state 501
- 310 expr_without_variable: '(' new_expr ')' @48 . instance_call
-
- '[' reduce using rule 248 (@40)
- "-> (T_OBJECT_OPERATOR)" reduce using rule 248 (@40)
- $default reduce using rule 247 (instance_call)
+ 25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar .
- instance_call go to state 593
- @40 go to state 594
+ $default reduce using rule 25 (constant_declaration)
state 502
- 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" . '(' ')' ';'
+ 423 static_scalar: static_class_constant .
- '(' shift, and go to state 595
+ $default reduce using rule 423 (static_scalar)
state 503
- 27 inner_statement_list: inner_statement_list @4 inner_statement .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' inner_statement_list . '}' catch_statement $@23 finally_statement
- $default reduce using rule 27 (inner_statement_list)
+ '}' shift, and go to state 611
+
+ $default reduce using rule 26 ($@4)
+
+ $@4 go to state 389
state 504
- 29 inner_statement: statement .
+ 23 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" . "identifier (T_STRING)"
- $default reduce using rule 29 (inner_statement)
+ "identifier (T_STRING)" shift, and go to state 612
state 505
- 30 inner_statement: function_declaration_statement .
+ 21 use_declaration: namespace_name "as (T_AS)" "identifier (T_STRING)" .
- $default reduce using rule 30 (inner_statement)
+ $default reduce using rule 21 (use_declaration)
state 506
- 31 inner_statement: class_declaration_statement .
+ 18 use_declarations: use_declarations ',' use_declaration .
- $default reduce using rule 31 (inner_statement)
+ $default reduce using rule 18 (use_declarations)
state 507
- 461 compound_variable: '$' '{' expr '}' .
-
- $default reduce using rule 461 (compound_variable)
+ 188 global_var: '$' '{' expr . '}'
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ '}' shift, and go to state 613
state 508
- 170 non_empty_function_call_parameter_list: '&' . w_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- w_variable go to state 596
- variable go to state 292
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 184 global_var_list: global_var_list ',' global_var .
+
+ $default reduce using rule 184 (global_var_list)
state 509
- 344 function_call: namespace_name '(' @55 function_call_parameter_list . ')'
+ 192 static_var_list: "variable (T_VARIABLE)" '=' static_scalar .
- ')' shift, and go to state 597
+ $default reduce using rule 192 (static_var_list)
state 510
- 166 function_call_parameter_list: non_empty_function_call_parameter_list .
- 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list . ',' expr_without_variable
- 172 | non_empty_function_call_parameter_list . ',' variable
- 173 | non_empty_function_call_parameter_list . ',' '&' w_variable
+ 189 static_var_list: static_var_list ',' "variable (T_VARIABLE)" .
+ 190 | static_var_list ',' "variable (T_VARIABLE)" . '=' static_scalar
- ',' shift, and go to state 598
+ '=' shift, and go to state 614
- $default reduce using rule 166 (function_call_parameter_list)
+ $default reduce using rule 189 (static_var_list)
state 511
- 168 non_empty_function_call_parameter_list: expr_without_variable .
- 424 expr: expr_without_variable .
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 . '(' parameter_list ')' lexical_vars '{' inner_statement_list '}'
- ',' reduce using rule 168 (non_empty_function_call_parameter_list)
- ')' reduce using rule 168 (non_empty_function_call_parameter_list)
- $default reduce using rule 424 (expr)
+ '(' shift, and go to state 615
state 512
- 169 non_empty_function_call_parameter_list: variable .
- 254 expr_without_variable: variable . '=' expr
- 255 | variable . '=' '&' variable
- 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
- 259 | variable . "+= (T_PLUS_EQUAL)" expr
- 260 | variable . "-= (T_MINUS_EQUAL)" expr
- 261 | variable . "*= (T_MUL_EQUAL)" expr
- 262 | variable . "/= (T_DIV_EQUAL)" expr
- 263 | variable . ".= (T_CONCAT_EQUAL)" expr
- 264 | variable . "%= (T_MOD_EQUAL)" expr
- 265 | variable . "&= (T_AND_EQUAL)" expr
- 266 | variable . "|= (T_OR_EQUAL)" expr
- 267 | variable . "^= (T_XOR_EQUAL)" expr
- 268 | variable . "<<= (T_SL_EQUAL)" expr
- 269 | variable . ">>= (T_SR_EQUAL)" expr
- 425 r_variable: variable .
- 427 rw_variable: variable .
-
- '=' shift, and go to state 264
- ">>= (T_SR_EQUAL)" shift, and go to state 265
- "<<= (T_SL_EQUAL)" shift, and go to state 266
- "^= (T_XOR_EQUAL)" shift, and go to state 267
- "|= (T_OR_EQUAL)" shift, and go to state 268
- "&= (T_AND_EQUAL)" shift, and go to state 269
- "%= (T_MOD_EQUAL)" shift, and go to state 270
- ".= (T_CONCAT_EQUAL)" shift, and go to state 271
- "/= (T_DIV_EQUAL)" shift, and go to state 272
- "*= (T_MUL_EQUAL)" shift, and go to state 273
- "-= (T_MINUS_EQUAL)" shift, and go to state 274
- "+= (T_PLUS_EQUAL)" shift, and go to state 275
-
- ',' reduce using rule 169 (non_empty_function_call_parameter_list)
- "-- (T_DEC)" reduce using rule 427 (rw_variable)
- "++ (T_INC)" reduce using rule 427 (rw_variable)
- ')' reduce using rule 169 (non_empty_function_call_parameter_list)
- $default reduce using rule 425 (r_variable)
+ 99 unset_variables: unset_variables ',' . unset_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ unset_variable go to state 616
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 360
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 513
- 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' . static_scalar
+ 67 unticked_statement: "unset (T_UNSET)" '(' unset_variables ')' . ';'
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 599
- static_class_constant go to state 471
+ ';' shift, and go to state 617
state 514
- 364 fully_qualified_class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 536 isset_variables: isset_variables ',' . $@76 isset_variable
- "\\ (T_NS_SEPARATOR)" shift, and go to state 600
+ $default reduce using rule 535 ($@76)
+ $@76 go to state 618
-state 515
- 365 fully_qualified_class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+state 515
- "identifier (T_STRING)" shift, and go to state 116
+ 526 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables ')' .
- namespace_name go to state 601
+ $default reduce using rule 526 (internal_functions_in_yacc)
state 516
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 363 fully_qualified_class_name: namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ 528 internal_functions_in_yacc: "empty (T_EMPTY)" '(' expr_without_variable ')' .
- $default reduce using rule 363 (fully_qualified_class_name)
+ $default reduce using rule 528 (internal_functions_in_yacc)
state 517
- 109 extends_from: "extends (T_EXTENDS)" fully_qualified_class_name .
+ 527 internal_functions_in_yacc: "empty (T_EMPTY)" '(' variable ')' .
- $default reduce using rule 109 (extends_from)
+ $default reduce using rule 527 (internal_functions_in_yacc)
state 518
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 . implements_list '{' class_statement_list '}'
-
- "implements (T_IMPLEMENTS)" shift, and go to state 602
-
- $default reduce using rule 113 (implements_list)
+ 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';' .
- implements_list go to state 603
+ $default reduce using rule 10 (top_statement)
state 519
- 112 interface_extends_list: "extends (T_EXTENDS)" . interface_list
+ 500 assignment_list_element: "list (T_LIST)" . '(' $@74 assignment_list ')'
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
-
- namespace_name go to state 516
- interface_list go to state 604
- fully_qualified_class_name go to state 605
+ '(' shift, and go to state 619
state 520
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list . '{' class_statement_list '}'
+ 498 assignment_list_element: variable .
- '{' shift, and go to state 606
+ $default reduce using rule 498 (assignment_list_element)
state 521
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 . '(' parameter_list ')' '{' inner_statement_list '}'
+ 263 expr_without_variable: "list (T_LIST)" '(' $@45 assignment_list . ')' '=' expr
+ 496 assignment_list: assignment_list . ',' assignment_list_element
- '(' shift, and go to state 607
+ ',' shift, and go to state 620
+ ')' shift, and go to state 621
state 522
- 333 expr_without_variable: function is_reference '(' @53 . parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 497 assignment_list: assignment_list_element .
- "identifier (T_STRING)" shift, and go to state 116
- "array (T_ARRAY)" shift, and go to state 608
- "callable (T_CALLABLE)" shift, and go to state 609
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
-
- ')' reduce using rule 153 (parameter_list)
- $default reduce using rule 162 (optional_class_type)
-
- namespace_name go to state 516
- parameter_list go to state 610
- non_empty_parameter_list go to state 611
- optional_class_type go to state 612
- fully_qualified_class_name go to state 613
+ $default reduce using rule 497 (assignment_list)
state 523
- 450 array_function_dereference: function_call @69 '[' dim_offset . ']'
+ 354 combined_scalar: "array (T_ARRAY)" '(' array_pair_list ')' .
- ']' shift, and go to state 614
+ $default reduce using rule 354 (combined_scalar)
state 524
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 471 variable_name: '{' expr . '}'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '}' shift, and go to state 615
+ 518 encaps_var: "variable (T_VARIABLE)" '[' $@75 . encaps_var_offset ']'
+ "identifier (T_STRING)" shift, and go to state 622
+ "variable (T_VARIABLE)" shift, and go to state 623
+ "number (T_NUM_STRING)" shift, and go to state 624
-state 525
+ encaps_var_offset go to state 625
- 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' . @59 function_call_parameter_list ')'
- $default reduce using rule 351 (@59)
+state 525
- @59 go to state 616
+ 519 encaps_var: "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)" .
+ $default reduce using rule 519 (encaps_var)
-state 526
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' . @58 function_call_parameter_list ')'
+state 526
- $default reduce using rule 349 (@58)
+ 521 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' . expr ']' '}'
- @58 go to state 617
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 626
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 527
- 444 variable_without_objects: simple_indirect_reference reference_variable .
- 457 reference_variable: reference_variable . '[' dim_offset ']'
- 458 | reference_variable . '{' expr '}'
+ 520 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr '}' .
- '[' shift, and go to state 280
- '{' shift, and go to state 281
-
- $default reduce using rule 444 (variable_without_objects)
+ $default reduce using rule 520 (encaps_var)
state 528
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 279 | expr "or (T_LOGICAL_OR)" @46 expr .
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 522 encaps_var: "{$ (T_CURLY_OPEN)" variable '}' .
- $default reduce using rule 279 (expr_without_variable)
+ $default reduce using rule 522 (encaps_var)
state 529
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 281 | expr "and (T_LOGICAL_AND)" @47 expr .
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name @59 . function_call_parameter_list
- $default reduce using rule 281 (expr_without_variable)
+ '(' shift, and go to state 394
+
+ function_call_parameter_list go to state 627
state 530
- 315 expr_without_variable: expr '?' ':' @51 . expr
+ 3 top_statement_list: top_statement_list . $@1 top_statement
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' $@3 top_statement_list . '}'
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 618
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ '}' shift, and go to state 628
+
+ $default reduce using rule 2 ($@1)
+
+ $@1 go to state 4
state 531
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 313 | expr '?' @49 expr . ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- ':' shift, and go to state 619
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' $@2 . top_statement_list '}'
+
+ $default reduce using rule 4 (top_statement_list)
+
+ top_statement_list go to state 629
state 532
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 275 | expr "|| (T_BOOLEAN_OR)" @44 expr .
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 368 function_call: "\\ (T_NS_SEPARATOR)" namespace_name @60 function_call_parameter_list .
- $default reduce using rule 275 (expr_without_variable)
+ $default reduce using rule 368 (function_call)
state 533
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 277 | expr "&& (T_BOOLEAN_AND)" @45 expr .
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 320 expr_without_variable: '(' new_expr ')' @51 . instance_call
- $default reduce using rule 277 (expr_without_variable)
+ '[' reduce using rule 258 ($@43)
+ "-> (T_OBJECT_OPERATOR)" reduce using rule 258 ($@43)
+ $default reduce using rule 257 (instance_call)
+ instance_call go to state 630
+ $@43 go to state 631
-state 534
- 257 expr_without_variable: variable '=' '&' "new (T_NEW)" . class_name_reference @43 ctor_arguments
+state 534
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 152
- "\\ (T_NS_SEPARATOR)" shift, and go to state 153
- '$' shift, and go to state 80
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" . '(' ')' ';'
- namespace_name go to state 154
- class_name go to state 155
- class_name_reference go to state 620
- dynamic_class_name_reference go to state 157
- static_member go to state 106
- variable_class_name go to state 158
- base_variable go to state 159
- reference_variable go to state 160
- compound_variable go to state 112
- simple_indirect_reference go to state 161
+ '(' shift, and go to state 632
state 535
- 255 expr_without_variable: variable '=' '&' variable .
+ 27 inner_statement_list: inner_statement_list $@4 inner_statement .
- $default reduce using rule 255 (expr_without_variable)
+ $default reduce using rule 27 (inner_statement_list)
state 536
- 358 function_call: variable_without_objects '(' @62 function_call_parameter_list . ')'
+ 29 inner_statement: statement .
- ')' shift, and go to state 621
+ $default reduce using rule 29 (inner_statement)
state 537
- 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' . @61 function_call_parameter_list ')'
-
- $default reduce using rule 355 (@61)
+ 30 inner_statement: function_declaration_statement .
- @61 go to state 622
+ $default reduce using rule 30 (inner_statement)
state 538
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' . @60 function_call_parameter_list ')'
-
- $default reduce using rule 353 (@60)
+ 31 inner_statement: class_declaration_statement .
- @60 go to state 623
+ $default reduce using rule 31 (inner_statement)
state 539
- 448 array_function_dereference: array_function_dereference '[' dim_offset ']' .
+ 483 compound_variable: '$' '{' expr '}' .
- $default reduce using rule 448 (array_function_dereference)
+ $default reduce using rule 483 (compound_variable)
state 540
- 466 object_property: variable_without_objects . @70
-
- $default reduce using rule 465 (@70)
-
- @70 go to state 624
+ 180 non_empty_function_call_parameter_list: '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ w_variable go to state 633
+ variable go to state 309
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 541
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property . @66 method_or_not variable_properties
-
- $default reduce using rule 429 (@66)
+ 175 function_call_parameter_list: '(' ')' .
- @66 go to state 625
+ $default reduce using rule 175 (function_call_parameter_list)
state 542
- 464 object_property: object_dim_list .
- 467 object_dim_list: object_dim_list . '[' dim_offset ']'
- 468 | object_dim_list . '{' expr '}'
+ 176 function_call_parameter_list: '(' non_empty_function_call_parameter_list . ')'
+ 181 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list . ',' expr_without_variable
+ 182 | non_empty_function_call_parameter_list . ',' variable
+ 183 | non_empty_function_call_parameter_list . ',' '&' w_variable
- '[' shift, and go to state 626
- '{' shift, and go to state 627
-
- $default reduce using rule 464 (object_property)
+ ',' shift, and go to state 634
+ ')' shift, and go to state 635
state 543
- 469 object_dim_list: variable_name .
+ 178 non_empty_function_call_parameter_list: expr_without_variable .
+ 444 expr: expr_without_variable .
- $default reduce using rule 469 (object_dim_list)
+ ',' reduce using rule 178 (non_empty_function_call_parameter_list)
+ ')' reduce using rule 178 (non_empty_function_call_parameter_list)
+ $default reduce using rule 444 (expr)
state 544
- 457 reference_variable: reference_variable '[' dim_offset ']' .
+ 177 function_call_parameter_list: '(' yield_expr . ')'
- $default reduce using rule 457 (reference_variable)
+ ')' shift, and go to state 636
state 545
- 458 reference_variable: reference_variable '{' expr '}' .
-
- $default reduce using rule 458 (reference_variable)
+ 179 non_empty_function_call_parameter_list: variable .
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+
+ ',' reduce using rule 179 (non_empty_function_call_parameter_list)
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ ')' reduce using rule 179 (non_empty_function_call_parameter_list)
+ $default reduce using rule 447 (r_variable)
state 546
- 488 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" '&' w_variable .
+ 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' . static_scalar
- $default reduce using rule 488 (non_empty_array_pair_list)
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 637
+ static_class_constant go to state 502
state 547
- 487 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' w_variable .
+ 384 fully_qualified_class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- $default reduce using rule 487 (non_empty_array_pair_list)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 638
state 548
- 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" . expr
- 486 | non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" . '&' w_variable
+ 385 fully_qualified_class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 628
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 629
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "identifier (T_STRING)" shift, and go to state 122
+
+ namespace_name go to state 639
state 549
- 382 ctor_arguments: '(' function_call_parameter_list . ')'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 383 fully_qualified_class_name: namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- ')' shift, and go to state 630
+ $default reduce using rule 383 (fully_qualified_class_name)
state 550
- 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property . @64 dynamic_class_name_variable_properties
-
- $default reduce using rule 369 (@64)
+ 116 extends_from: "extends (T_EXTENDS)" fully_qualified_class_name .
- @64 go to state 631
+ $default reduce using rule 116 (extends_from)
state 551
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' . @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from $@32 . implements_list '{' class_statement_list '}'
- $default reduce using rule 39 (@7)
+ "implements (T_IMPLEMENTS)" shift, and go to state 640
- @7 go to state 632
+ $default reduce using rule 120 (implements_list)
+
+ implements_list go to state 641
state 552
- 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 . statement @6 elseif_list else_single
+ 119 interface_extends_list: "extends (T_EXTENDS)" . interface_list
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 633
- unticked_statement go to state 87
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+ namespace_name go to state 549
+ interface_list go to state 642
+ fully_qualified_class_name go to state 643
-state 553
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' . @12 expr ')' ';'
+state 553
- $default reduce using rule 46 (@12)
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" $@33 interface_extends_list . '{' class_statement_list '}'
- @12 go to state 634
+ '{' shift, and go to state 644
state 554
- 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' . @10 while_statement
+ 352 combined_scalar_offset: combined_scalar_offset '[' dim_offset ']' .
- $default reduce using rule 43 (@10)
-
- @10 go to state 635
+ $default reduce using rule 352 (combined_scalar_offset)
state 555
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 . for_expr ';' @14 for_expr ')' @15 for_statement
+ 351 combined_scalar_offset: combined_scalar '[' dim_offset ']' .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 234 (for_expr)
-
- namespace_name go to state 83
- for_expr go to state 636
- non_empty_for_expr go to state 312
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 313
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 351 (combined_scalar_offset)
state 556
- 237 non_empty_for_expr: non_empty_for_expr ',' @38 . expr
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 . '(' parameter_list ')' '{' inner_statement_list '}'
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 637
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ '(' shift, and go to state 645
state 557
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 . variable foreach_optional_arg ')' @20 foreach_statement
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 638
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 344 expr_without_variable: function is_reference @56 '(' . parameter_list ')' lexical_vars '{' inner_statement_list '}'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "array (T_ARRAY)" shift, and go to state 646
+ "callable (T_CALLABLE)" shift, and go to state 647
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ ')' reduce using rule 162 (parameter_list)
+ $default reduce using rule 171 (optional_class_type)
+
+ namespace_name go to state 549
+ parameter_list go to state 648
+ non_empty_parameter_list go to state 649
+ optional_class_type go to state 650
+ fully_qualified_class_name go to state 651
state 558
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 . foreach_variable foreach_optional_arg ')' @18 foreach_statement
-
- '&' shift, and go to state 639
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- foreach_variable go to state 640
- function_call go to state 97
- class_name go to state 142
- variable go to state 641
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 472 array_function_dereference: function_call $@72 '[' dim_offset . ']'
+
+ ']' shift, and go to state 652
state 559
- 127 declare_list: "identifier (T_STRING)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 642
- static_class_constant go to state 471
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 493 variable_name: '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ '}' shift, and go to state 653
state 560
- 128 declare_list: declare_list ',' . "identifier (T_STRING)" '=' static_scalar
+ 372 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@62 . function_call_parameter_list
+
+ '(' shift, and go to state 394
- "identifier (T_STRING)" shift, and go to state 643
+ function_call_parameter_list go to state 654
state 561
- 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list ')' . declare_statement
+ 370 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name @61 . function_call_parameter_list
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- ':' shift, and go to state 644
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 645
- unticked_statement go to state 87
- declare_statement go to state 646
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ '(' shift, and go to state 394
+
+ function_call_parameter_list go to state 655
state 562
- 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' @16 . switch_case_list
+ 466 variable_without_objects: simple_indirect_reference reference_variable .
+ 479 reference_variable: reference_variable . '[' dim_offset ']'
+ 480 | reference_variable . '{' expr '}'
- ':' shift, and go to state 647
- '{' shift, and go to state 648
+ '[' shift, and go to state 296
+ '{' shift, and go to state 297
- switch_case_list go to state 649
+ $default reduce using rule 466 (variable_without_objects)
state 563
- 399 static_scalar: '+' static_scalar .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 289 | expr "or (T_LOGICAL_OR)" $@49 expr .
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 399 (static_scalar)
+ $default reduce using rule 289 (expr_without_variable)
state 564
- 400 static_scalar: '-' static_scalar .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 291 | expr "and (T_LOGICAL_AND)" $@50 expr .
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 400 (static_scalar)
+ $default reduce using rule 291 (expr_without_variable)
state 565
- 421 non_empty_static_array_pair_list: static_scalar . "=> (T_DOUBLE_ARROW)" static_scalar
- 422 | static_scalar .
-
- "=> (T_DOUBLE_ARROW)" shift, and go to state 650
+ 325 expr_without_variable: expr '?' ':' $@54 . expr
- $default reduce using rule 422 (non_empty_static_array_pair_list)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 656
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 566
- 402 static_scalar: '[' static_array_pair_list . ']'
-
- ']' shift, and go to state 651
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 323 | expr '?' $@52 expr . ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ ':' shift, and go to state 657
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
state 567
- 416 static_array_pair_list: non_empty_static_array_pair_list . possible_comma
- 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list . ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
- 420 | non_empty_static_array_pair_list . ',' static_scalar
-
- ',' shift, and go to state 652
-
- $default reduce using rule 417 (possible_comma)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 285 | expr "|| (T_BOOLEAN_OR)" $@47 expr .
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- possible_comma go to state 653
+ $default reduce using rule 285 (expr_without_variable)
state 568
- 401 static_scalar: "array (T_ARRAY)" '(' . static_array_pair_list ')'
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- $default reduce using rule 415 (static_array_pair_list)
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 565
- static_class_constant go to state 471
- static_array_pair_list go to state 654
- non_empty_static_array_pair_list go to state 567
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 287 | expr "&& (T_BOOLEAN_AND)" $@48 expr .
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 287 (expr_without_variable)
state 569
- 393 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . "heredoc end (T_END_HEREDOC)"
+ 267 expr_without_variable: variable '=' '&' "new (T_NEW)" . class_name_reference $@46 ctor_arguments
- "heredoc end (T_END_HEREDOC)" shift, and go to state 350
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 161
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 162
+ '$' shift, and go to state 81
+ namespace_name go to state 163
+ class_name go to state 164
+ class_name_reference go to state 658
+ dynamic_class_name_reference go to state 166
+ static_member go to state 111
+ variable_class_name go to state 167
+ base_variable go to state 168
+ reference_variable go to state 169
+ compound_variable go to state 117
+ simple_indirect_reference go to state 170
-state 570
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- 397 static_scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+state 570
- "identifier (T_STRING)" shift, and go to state 116
+ 265 expr_without_variable: variable '=' '&' variable .
- namespace_name go to state 655
+ $default reduce using rule 265 (expr_without_variable)
state 571
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
- 398 static_scalar: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 376 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@64 . function_call_parameter_list
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 394
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 362 (class_name)
- $default reduce using rule 398 (static_scalar)
+ function_call_parameter_list go to state 659
state 572
- 405 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
+ 374 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name $@63 . function_call_parameter_list
+
+ '(' shift, and go to state 394
- "identifier (T_STRING)" shift, and go to state 656
+ function_call_parameter_list go to state 660
state 573
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' . "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 470 array_function_dereference: array_function_dereference '[' dim_offset ']' .
- "catch (T_CATCH)" shift, and go to state 657
+ $default reduce using rule 470 (array_function_dereference)
state 574
- 23 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" "identifier (T_STRING)" .
+ 488 object_property: variable_without_objects . $@73
- $default reduce using rule 23 (use_declaration)
+ $default reduce using rule 487 ($@73)
+
+ $@73 go to state 661
state 575
- 178 global_var: '$' '{' expr '}' .
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" $@68 object_property . $@69 method_or_not variable_properties
- $default reduce using rule 178 (global_var)
+ $default reduce using rule 451 ($@69)
+
+ $@69 go to state 662
state 576
- 180 static_var_list: static_var_list ',' "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 658
- static_class_constant go to state 471
+ 486 object_property: object_dim_list .
+ 489 object_dim_list: object_dim_list . '[' dim_offset ']'
+ 490 | object_dim_list . '{' expr '}'
+ '[' shift, and go to state 663
+ '{' shift, and go to state 664
-state 577
+ $default reduce using rule 486 (object_property)
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 . parameter_list ')' lexical_vars '{' inner_statement_list '}'
- "identifier (T_STRING)" shift, and go to state 116
- "array (T_ARRAY)" shift, and go to state 608
- "callable (T_CALLABLE)" shift, and go to state 609
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+state 577
- ')' reduce using rule 153 (parameter_list)
- $default reduce using rule 162 (optional_class_type)
+ 491 object_dim_list: variable_name .
- namespace_name go to state 516
- parameter_list go to state 659
- non_empty_parameter_list go to state 611
- optional_class_type go to state 612
- fully_qualified_class_name go to state 613
+ $default reduce using rule 491 (object_dim_list)
state 578
- 92 unset_variables: unset_variables ',' unset_variable .
+ 479 reference_variable: reference_variable '[' dim_offset ']' .
- $default reduce using rule 92 (unset_variables)
+ $default reduce using rule 479 (reference_variable)
state 579
- 66 unticked_statement: "unset (T_UNSET)" '(' unset_variables ')' ';' .
+ 480 reference_variable: reference_variable '{' expr '}' .
- $default reduce using rule 66 (unticked_statement)
+ $default reduce using rule 480 (reference_variable)
state 580
- 513 isset_variables: isset_variables ',' @73 . variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 660
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 510 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" '&' w_variable .
+ $default reduce using rule 510 (non_empty_array_pair_list)
-state 581
- 478 assignment_list_element: "list (T_LIST)" '(' . @71 assignment_list ')'
+state 581
- $default reduce using rule 477 (@71)
+ 509 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' w_variable .
- @71 go to state 661
+ $default reduce using rule 509 (non_empty_array_pair_list)
state 582
- 474 assignment_list: assignment_list ',' . assignment_list_element
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "list (T_LIST)" shift, and go to state 487
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- $default reduce using rule 479 (assignment_list_element)
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 488
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- assignment_list_element go to state 662
+ 504 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" . expr
+ 508 | non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" . '&' w_variable
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 665
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 666
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 583
- 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' . '=' expr
+ 390 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" $@66 object_property . $@67 dynamic_class_name_variable_properties
+
+ $default reduce using rule 389 ($@67)
- '=' shift, and go to state 663
+ $@67 go to state 667
state 584
- 501 encaps_var_offset: "identifier (T_STRING)" .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list . $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- $default reduce using rule 501 (encaps_var_offset)
+ "elseif (T_ELSEIF)" reduce using rule 40 ($@8)
+ "else (T_ELSE)" reduce using rule 40 ($@8)
+ "endif (T_ENDIF)" reduce using rule 40 ($@8)
+ $default reduce using rule 26 ($@4)
+
+ $@4 go to state 389
+ $@8 go to state 668
state 585
- 503 encaps_var_offset: "variable (T_VARIABLE)" .
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr $@5 statement $@6 . elseif_list else_single
+
+ $default reduce using rule 151 (elseif_list)
- $default reduce using rule 503 (encaps_var_offset)
+ elseif_list go to state 669
state 586
- 502 encaps_var_offset: "number (T_NUM_STRING)" .
+ 47 unticked_statement: "do (T_DO)" $@11 statement "while (T_WHILE)" $@12 . parenthesis_expr ';'
+
+ '(' shift, and go to state 174
- $default reduce using rule 502 (encaps_var_offset)
+ parenthesis_expr go to state 670
state 587
- 496 encaps_var: "variable (T_VARIABLE)" '[' @72 encaps_var_offset . ']'
+ 150 while_statement: ':' . inner_statement_list "endwhile (T_ENDWHILE)" ';'
+
+ $default reduce using rule 28 (inner_statement_list)
- ']' shift, and go to state 664
+ inner_statement_list go to state 671
state 588
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr . ']' '}'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ']' shift, and go to state 665
+ 149 while_statement: statement .
+
+ $default reduce using rule 149 (while_statement)
state 589
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 . function_call_parameter_list ')'
+ 44 unticked_statement: "while (T_WHILE)" $@9 parenthesis_expr @10 while_statement .
+
+ $default reduce using rule 44 (unticked_statement)
+
+
+state 590
+
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 . for_expr ';' $@14 for_expr ')' $@15 for_statement
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -17797,480 +18022,626 @@ state 589
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 666
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
-
-state 590
-
- 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 top_statement_list '}' .
-
- $default reduce using rule 15 (top_statement)
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 244 (for_expr)
+
+ namespace_name go to state 84
+ for_expr go to state 672
+ non_empty_for_expr go to state 331
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 332
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 591
- 3 top_statement_list: top_statement_list . @1 top_statement
- 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 top_statement_list . '}'
-
- '}' shift, and go to state 667
+ 247 non_empty_for_expr: non_empty_for_expr ',' $@41 . expr
- $default reduce using rule 2 (@1)
-
- @1 go to state 4
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 673
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 592
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 function_call_parameter_list . ')'
-
- ')' shift, and go to state 668
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 . foreach_variable foreach_optional_arg ')' $@20 foreach_statement
+
+ '&' shift, and go to state 674
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 675
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ foreach_variable go to state 676
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 677
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 593
- 310 expr_without_variable: '(' new_expr ')' @48 instance_call .
-
- $default reduce using rule 310 (expr_without_variable)
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 . foreach_variable foreach_optional_arg ')' $@18 foreach_statement
+
+ '&' shift, and go to state 674
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 675
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ foreach_variable go to state 678
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 677
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 594
- 249 instance_call: @40 . chaining_instance_call
-
- '[' shift, and go to state 669
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
-
- chaining_method_or_property go to state 671
- chaining_dereference go to state 672
- chaining_instance_call go to state 673
- variable_property go to state 674
+ 136 declare_list: "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 679
+ static_class_constant go to state 502
state 595
- 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' . ')' ';'
+ 137 declare_list: declare_list ',' . "identifier (T_STRING)" '=' static_scalar
- ')' shift, and go to state 675
+ "identifier (T_STRING)" shift, and go to state 680
state 596
- 170 non_empty_function_call_parameter_list: '&' w_variable .
+ 75 unticked_statement: "declare (T_DECLARE)" $@21 '(' declare_list ')' . declare_statement
- $default reduce using rule 170 (non_empty_function_call_parameter_list)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ ':' shift, and go to state 681
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 682
+ unticked_statement go to state 88
+ declare_statement go to state 683
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 597
- 344 function_call: namespace_name '(' @55 function_call_parameter_list ')' .
+ 141 switch_case_list: ':' ';' . case_list "endswitch (T_ENDSWITCH)" ';'
- $default reduce using rule 344 (function_call)
+ $default reduce using rule 142 (case_list)
+
+ case_list go to state 684
state 598
- 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' . expr_without_variable
- 172 | non_empty_function_call_parameter_list ',' . variable
- 173 | non_empty_function_call_parameter_list ',' . '&' w_variable
+ 140 switch_case_list: ':' case_list . "endswitch (T_ENDSWITCH)" ';'
+ 144 case_list: case_list . "case (T_CASE)" expr case_separator $@35 inner_statement_list
+ 146 | case_list . "default (T_DEFAULT)" case_separator $@36 inner_statement_list
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 676
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 677
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 678
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "endswitch (T_ENDSWITCH)" shift, and go to state 685
+ "case (T_CASE)" shift, and go to state 686
+ "default (T_DEFAULT)" shift, and go to state 687
state 599
- 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' static_scalar .
+ 139 switch_case_list: '{' ';' . case_list '}'
- $default reduce using rule 24 (constant_declaration)
+ $default reduce using rule 142 (case_list)
+ case_list go to state 688
-state 600
- 364 fully_qualified_class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+state 600
- "identifier (T_STRING)" shift, and go to state 116
+ 138 switch_case_list: '{' case_list . '}'
+ 144 case_list: case_list . "case (T_CASE)" expr case_separator $@35 inner_statement_list
+ 146 | case_list . "default (T_DEFAULT)" case_separator $@36 inner_statement_list
- namespace_name go to state 679
+ "case (T_CASE)" shift, and go to state 686
+ "default (T_DEFAULT)" shift, and go to state 687
+ '}' shift, and go to state 689
state 601
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 365 fully_qualified_class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ 419 static_scalar: '+' static_scalar .
- $default reduce using rule 365 (fully_qualified_class_name)
+ $default reduce using rule 419 (static_scalar)
state 602
- 114 implements_list: "implements (T_IMPLEMENTS)" . interface_list
-
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ 420 static_scalar: '-' static_scalar .
- namespace_name go to state 516
- interface_list go to state 680
- fully_qualified_class_name go to state 605
+ $default reduce using rule 420 (static_scalar)
state 603
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list . '{' class_statement_list '}'
+ 441 non_empty_static_array_pair_list: static_scalar . "=> (T_DOUBLE_ARROW)" static_scalar
+ 442 | static_scalar .
- '{' shift, and go to state 681
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 690
+ $default reduce using rule 442 (non_empty_static_array_pair_list)
-state 604
- 112 interface_extends_list: "extends (T_EXTENDS)" interface_list .
- 116 interface_list: interface_list . ',' fully_qualified_class_name
+state 604
- ',' shift, and go to state 682
+ 422 static_scalar: '[' static_array_pair_list . ']'
- $default reduce using rule 112 (interface_extends_list)
+ ']' shift, and go to state 691
state 605
- 115 interface_list: fully_qualified_class_name .
+ 436 static_array_pair_list: non_empty_static_array_pair_list . possible_comma
+ 439 non_empty_static_array_pair_list: non_empty_static_array_pair_list . ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 440 | non_empty_static_array_pair_list . ',' static_scalar
- $default reduce using rule 115 (interface_list)
+ ',' shift, and go to state 692
+ $default reduce using rule 437 (possible_comma)
-state 606
+ possible_comma go to state 693
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' . class_statement_list '}'
- $default reduce using rule 184 (class_statement_list)
+state 606
- class_statement_list go to state 683
+ 421 static_scalar: "array (T_ARRAY)" '(' . static_array_pair_list ')'
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ $default reduce using rule 435 (static_array_pair_list)
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 603
+ static_class_constant go to state 502
+ static_array_pair_list go to state 694
+ non_empty_static_array_pair_list go to state 605
state 607
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' . parameter_list ')' '{' inner_statement_list '}'
-
- "identifier (T_STRING)" shift, and go to state 116
- "array (T_ARRAY)" shift, and go to state 608
- "callable (T_CALLABLE)" shift, and go to state 609
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ 413 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . "heredoc end (T_END_HEREDOC)"
- ')' reduce using rule 153 (parameter_list)
- $default reduce using rule 162 (optional_class_type)
-
- namespace_name go to state 516
- parameter_list go to state 684
- non_empty_parameter_list go to state 611
- optional_class_type go to state 612
- fully_qualified_class_name go to state 613
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 372
state 608
- 163 optional_class_type: "array (T_ARRAY)" .
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+ 417 static_scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 122
- $default reduce using rule 163 (optional_class_type)
+ namespace_name go to state 695
state 609
- 164 optional_class_type: "callable (T_CALLABLE)" .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 382 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 418 static_scalar: "\\ (T_NS_SEPARATOR)" namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- $default reduce using rule 164 (optional_class_type)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 382 (class_name)
+ $default reduce using rule 418 (static_scalar)
state 610
- 333 expr_without_variable: function is_reference '(' @53 parameter_list . ')' lexical_vars '{' inner_statement_list '}'
+ 425 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
- ')' shift, and go to state 685
+ "identifier (T_STRING)" shift, and go to state 696
state 611
- 152 parameter_list: non_empty_parameter_list .
- 158 non_empty_parameter_list: non_empty_parameter_list . ',' optional_class_type "variable (T_VARIABLE)"
- 159 | non_empty_parameter_list . ',' optional_class_type '&' "variable (T_VARIABLE)"
- 160 | non_empty_parameter_list . ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
- 161 | non_empty_parameter_list . ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' inner_statement_list '}' . catch_statement $@23 finally_statement
- ',' shift, and go to state 686
+ "catch (T_CATCH)" shift, and go to state 697
- $default reduce using rule 152 (parameter_list)
+ $default reduce using rule 82 (catch_statement)
+
+ catch_statement go to state 698
state 612
- 154 non_empty_parameter_list: optional_class_type . "variable (T_VARIABLE)"
- 155 | optional_class_type . '&' "variable (T_VARIABLE)"
- 156 | optional_class_type . '&' "variable (T_VARIABLE)" '=' static_scalar
- 157 | optional_class_type . "variable (T_VARIABLE)" '=' static_scalar
+ 23 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" "identifier (T_STRING)" .
- '&' shift, and go to state 687
- "variable (T_VARIABLE)" shift, and go to state 688
+ $default reduce using rule 23 (use_declaration)
state 613
- 165 optional_class_type: fully_qualified_class_name .
+ 188 global_var: '$' '{' expr '}' .
- $default reduce using rule 165 (optional_class_type)
+ $default reduce using rule 188 (global_var)
state 614
- 450 array_function_dereference: function_call @69 '[' dim_offset ']' .
-
- $default reduce using rule 450 (array_function_dereference)
+ 190 static_var_list: static_var_list ',' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 699
+ static_class_constant go to state 502
state 615
- 471 variable_name: '{' expr '}' .
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' . parameter_list ')' lexical_vars '{' inner_statement_list '}'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "array (T_ARRAY)" shift, and go to state 646
+ "callable (T_CALLABLE)" shift, and go to state 647
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ ')' reduce using rule 162 (parameter_list)
+ $default reduce using rule 171 (optional_class_type)
- $default reduce using rule 471 (variable_name)
+ namespace_name go to state 549
+ parameter_list go to state 700
+ non_empty_parameter_list go to state 649
+ optional_class_type go to state 650
+ fully_qualified_class_name go to state 651
state 616
- 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 . function_call_parameter_list ')'
+ 99 unset_variables: unset_variables ',' unset_variable .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 689
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 99 (unset_variables)
state 617
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 . function_call_parameter_list ')'
+ 67 unticked_statement: "unset (T_UNSET)" '(' unset_variables ')' ';' .
+
+ $default reduce using rule 67 (unticked_statement)
+
+
+state 618
+
+ 536 isset_variables: isset_variables ',' $@76 . isset_variable
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -18278,646 +18649,281 @@ state 617
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 690
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
-
-
-state 618
-
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 315 | expr '?' ':' @51 expr .
-
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 315 (expr_without_variable)
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 361
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 362
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ isset_variable go to state 701
+ class_constant go to state 120
state 619
- 313 expr_without_variable: expr '?' @49 expr ':' . @50 expr
+ 500 assignment_list_element: "list (T_LIST)" '(' . $@74 assignment_list ')'
- $default reduce using rule 312 (@50)
+ $default reduce using rule 499 ($@74)
- @50 go to state 691
+ $@74 go to state 702
state 620
- 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference . @43 ctor_arguments
-
- $default reduce using rule 256 (@43)
-
- @43 go to state 692
+ 496 assignment_list: assignment_list ',' . assignment_list_element
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 519
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ $default reduce using rule 501 (assignment_list_element)
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 520
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ assignment_list_element go to state 703
state 621
- 358 function_call: variable_without_objects '(' @62 function_call_parameter_list ')' .
+ 263 expr_without_variable: "list (T_LIST)" '(' $@45 assignment_list ')' . '=' expr
- $default reduce using rule 358 (function_call)
+ '=' shift, and go to state 704
state 622
- 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 . function_call_parameter_list ')'
+ 523 encaps_var_offset: "identifier (T_STRING)" .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 693
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 523 (encaps_var_offset)
state 623
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 . function_call_parameter_list ')'
+ 525 encaps_var_offset: "variable (T_VARIABLE)" .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 694
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 525 (encaps_var_offset)
state 624
- 466 object_property: variable_without_objects @70 .
+ 524 encaps_var_offset: "number (T_NUM_STRING)" .
- $default reduce using rule 466 (object_property)
+ $default reduce using rule 524 (encaps_var_offset)
state 625
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 . method_or_not variable_properties
-
- '(' shift, and go to state 695
-
- $default reduce using rule 442 (method_or_not)
+ 518 encaps_var: "variable (T_VARIABLE)" '[' $@75 encaps_var_offset . ']'
- array_method_dereference go to state 696
- method go to state 697
- method_or_not go to state 698
+ ']' shift, and go to state 705
state 626
- 467 object_dim_list: object_dim_list '[' . dim_offset ']'
-
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 699
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 521 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr . ']' '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ']' shift, and go to state 706
state 627
- 468 object_dim_list: object_dim_list '{' . expr '}'
+ 366 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name @59 function_call_parameter_list .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 700
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 366 (function_call)
state 628
- 486 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' . w_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- w_variable go to state 701
- variable go to state 292
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' $@3 top_statement_list '}' .
+
+ $default reduce using rule 15 (top_statement)
state 629
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" expr .
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 482 (non_empty_array_pair_list)
+ 3 top_statement_list: top_statement_list . $@1 top_statement
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' $@2 top_statement_list . '}'
+
+ '}' shift, and go to state 707
+
+ $default reduce using rule 2 ($@1)
+
+ $@1 go to state 4
state 630
- 382 ctor_arguments: '(' function_call_parameter_list ')' .
+ 320 expr_without_variable: '(' new_expr ')' @51 instance_call .
- $default reduce using rule 382 (ctor_arguments)
+ $default reduce using rule 320 (expr_without_variable)
state 631
- 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property @64 . dynamic_class_name_variable_properties
+ 259 instance_call: $@43 . chaining_instance_call
- $default reduce using rule 373 (dynamic_class_name_variable_properties)
+ '[' shift, and go to state 708
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 709
- dynamic_class_name_variable_properties go to state 702
+ chaining_method_or_property go to state 710
+ chaining_dereference go to state 711
+ chaining_instance_call go to state 712
+ variable_property go to state 713
state 632
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 . inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
-
- $default reduce using rule 28 (inner_statement_list)
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' . ')' ';'
- inner_statement_list go to state 703
+ ')' shift, and go to state 714
state 633
- 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement . @6 elseif_list else_single
-
- $default reduce using rule 37 (@6)
+ 180 non_empty_function_call_parameter_list: '&' w_variable .
- @6 go to state 704
+ $default reduce using rule 180 (non_empty_function_call_parameter_list)
state 634
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 . expr ')' ';'
+ 181 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' . expr_without_variable
+ 182 | non_empty_function_call_parameter_list ',' . variable
+ 183 | non_empty_function_call_parameter_list ',' . '&' w_variable
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -18925,549 +18931,380 @@ state 634
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 705
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '&' shift, and go to state 715
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 716
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 194
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 717
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 635
- 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' @10 . while_statement
+ 176 function_call_parameter_list: '(' non_empty_function_call_parameter_list ')' .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- ':' shift, and go to state 706
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 707
- unticked_statement go to state 87
- while_statement go to state 708
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 176 (function_call_parameter_list)
state 636
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr . ';' @14 for_expr ')' @15 for_statement
+ 177 function_call_parameter_list: '(' yield_expr ')' .
- ';' shift, and go to state 709
+ $default reduce using rule 177 (function_call_parameter_list)
state 637
- 237 non_empty_for_expr: non_empty_for_expr ',' @38 expr .
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 237 (non_empty_for_expr)
+ 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' static_scalar .
+
+ $default reduce using rule 24 (constant_declaration)
state 638
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable . foreach_optional_arg ')' @20 foreach_statement
-
- "=> (T_DOUBLE_ARROW)" shift, and go to state 710
+ 384 fully_qualified_class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- $default reduce using rule 117 (foreach_optional_arg)
+ "identifier (T_STRING)" shift, and go to state 122
- foreach_optional_arg go to state 711
+ namespace_name go to state 718
state 639
- 120 foreach_variable: '&' . variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 712
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 385 fully_qualified_class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
-state 640
+ $default reduce using rule 385 (fully_qualified_class_name)
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable . foreach_optional_arg ')' @18 foreach_statement
- "=> (T_DOUBLE_ARROW)" shift, and go to state 710
+state 640
- $default reduce using rule 117 (foreach_optional_arg)
+ 121 implements_list: "implements (T_IMPLEMENTS)" . interface_list
- foreach_optional_arg go to state 713
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ namespace_name go to state 549
+ interface_list go to state 719
+ fully_qualified_class_name go to state 643
state 641
- 119 foreach_variable: variable .
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from $@32 implements_list . '{' class_statement_list '}'
- $default reduce using rule 119 (foreach_variable)
+ '{' shift, and go to state 720
state 642
- 127 declare_list: "identifier (T_STRING)" '=' static_scalar .
+ 119 interface_extends_list: "extends (T_EXTENDS)" interface_list .
+ 123 interface_list: interface_list . ',' fully_qualified_class_name
+
+ ',' shift, and go to state 721
- $default reduce using rule 127 (declare_list)
+ $default reduce using rule 119 (interface_extends_list)
state 643
- 128 declare_list: declare_list ',' "identifier (T_STRING)" . '=' static_scalar
+ 122 interface_list: fully_qualified_class_name .
- '=' shift, and go to state 714
+ $default reduce using rule 122 (interface_list)
state 644
- 126 declare_statement: ':' . inner_statement_list "enddeclare (T_ENDDECLARE)" ';'
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" $@33 interface_extends_list '{' . class_statement_list '}'
- $default reduce using rule 28 (inner_statement_list)
+ $default reduce using rule 194 (class_statement_list)
- inner_statement_list go to state 715
+ class_statement_list go to state 722
state 645
- 125 declare_statement: statement .
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' . parameter_list ')' '{' inner_statement_list '}'
- $default reduce using rule 125 (declare_statement)
+ "identifier (T_STRING)" shift, and go to state 122
+ "array (T_ARRAY)" shift, and go to state 646
+ "callable (T_CALLABLE)" shift, and go to state 647
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+ ')' reduce using rule 162 (parameter_list)
+ $default reduce using rule 171 (optional_class_type)
-state 646
+ namespace_name go to state 549
+ parameter_list go to state 723
+ non_empty_parameter_list go to state 649
+ optional_class_type go to state 650
+ fully_qualified_class_name go to state 651
- 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list ')' declare_statement .
- $default reduce using rule 74 (unticked_statement)
+state 646
+ 172 optional_class_type: "array (T_ARRAY)" .
-state 647
+ $default reduce using rule 172 (optional_class_type)
- 131 switch_case_list: ':' . case_list "endswitch (T_ENDSWITCH)" ';'
- 132 | ':' . ';' case_list "endswitch (T_ENDSWITCH)" ';'
- ';' shift, and go to state 716
+state 647
- $default reduce using rule 133 (case_list)
+ 173 optional_class_type: "callable (T_CALLABLE)" .
- case_list go to state 717
+ $default reduce using rule 173 (optional_class_type)
state 648
- 129 switch_case_list: '{' . case_list '}'
- 130 | '{' . ';' case_list '}'
-
- ';' shift, and go to state 718
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list . ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 133 (case_list)
-
- case_list go to state 719
+ ')' shift, and go to state 724
state 649
- 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' @16 switch_case_list .
+ 161 parameter_list: non_empty_parameter_list .
+ 167 non_empty_parameter_list: non_empty_parameter_list . ',' optional_class_type "variable (T_VARIABLE)"
+ 168 | non_empty_parameter_list . ',' optional_class_type '&' "variable (T_VARIABLE)"
+ 169 | non_empty_parameter_list . ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 170 | non_empty_parameter_list . ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 53 (unticked_statement)
+ ',' shift, and go to state 725
+
+ $default reduce using rule 161 (parameter_list)
state 650
- 421 non_empty_static_array_pair_list: static_scalar "=> (T_DOUBLE_ARROW)" . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 720
- static_class_constant go to state 471
+ 163 non_empty_parameter_list: optional_class_type . "variable (T_VARIABLE)"
+ 164 | optional_class_type . '&' "variable (T_VARIABLE)"
+ 165 | optional_class_type . '&' "variable (T_VARIABLE)" '=' static_scalar
+ 166 | optional_class_type . "variable (T_VARIABLE)" '=' static_scalar
+
+ '&' shift, and go to state 726
+ "variable (T_VARIABLE)" shift, and go to state 727
state 651
- 402 static_scalar: '[' static_array_pair_list ']' .
+ 174 optional_class_type: fully_qualified_class_name .
- $default reduce using rule 402 (static_scalar)
+ $default reduce using rule 174 (optional_class_type)
state 652
- 418 possible_comma: ',' .
- 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' . static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
- 420 | non_empty_static_array_pair_list ',' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- $default reduce using rule 418 (possible_comma)
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 721
- static_class_constant go to state 471
+ 472 array_function_dereference: function_call $@72 '[' dim_offset ']' .
+
+ $default reduce using rule 472 (array_function_dereference)
state 653
- 416 static_array_pair_list: non_empty_static_array_pair_list possible_comma .
+ 493 variable_name: '{' expr '}' .
- $default reduce using rule 416 (static_array_pair_list)
+ $default reduce using rule 493 (variable_name)
state 654
- 401 static_scalar: "array (T_ARRAY)" '(' static_array_pair_list . ')'
+ 372 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@62 function_call_parameter_list .
- ')' shift, and go to state 722
+ $default reduce using rule 372 (function_call)
state 655
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- 397 static_scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
-
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ 370 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name @61 function_call_parameter_list .
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 361 (class_name)
- $default reduce using rule 397 (static_scalar)
+ $default reduce using rule 370 (function_call)
state 656
- 405 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
-
- $default reduce using rule 405 (static_class_constant)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 325 | expr '?' ':' $@54 expr .
+
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 325 (expr_without_variable)
state 657
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" . '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 323 expr_without_variable: expr '?' $@52 expr ':' . $@53 expr
+
+ $default reduce using rule 322 ($@53)
- '(' shift, and go to state 723
+ $@53 go to state 728
state 658
- 180 static_var_list: static_var_list ',' "variable (T_VARIABLE)" '=' static_scalar .
+ 267 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference . $@46 ctor_arguments
- $default reduce using rule 180 (static_var_list)
+ $default reduce using rule 266 ($@46)
+
+ $@46 go to state 729
state 659
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list . ')' lexical_vars '{' inner_statement_list '}'
+ 376 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects $@64 function_call_parameter_list .
- ')' shift, and go to state 724
+ $default reduce using rule 376 (function_call)
state 660
- 513 isset_variables: isset_variables ',' @73 variable .
+ 374 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name $@63 function_call_parameter_list .
- $default reduce using rule 513 (isset_variables)
+ $default reduce using rule 374 (function_call)
state 661
- 478 assignment_list_element: "list (T_LIST)" '(' @71 . assignment_list ')'
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "list (T_LIST)" shift, and go to state 487
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- $default reduce using rule 479 (assignment_list_element)
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- variable go to state 488
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- assignment_list go to state 725
- assignment_list_element go to state 490
+ 488 object_property: variable_without_objects $@73 .
+
+ $default reduce using rule 488 (object_property)
state 662
- 474 assignment_list: assignment_list ',' assignment_list_element .
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" $@68 object_property $@69 . method_or_not variable_properties
+
+ '(' reduce using rule 460 (@71)
+ $default reduce using rule 464 (method_or_not)
- $default reduce using rule 474 (assignment_list)
+ array_method_dereference go to state 730
+ method go to state 731
+ @71 go to state 732
+ method_or_not go to state 733
state 663
- 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' '=' . expr
+ 489 object_dim_list: object_dim_list '[' . dim_offset ']'
"require_once (T_REQUIRE_ONCE)" shift, and go to state 5
"require (T_REQUIRE)" shift, and go to state 6
@@ -19475,4747 +19312,4950 @@ state 663
"include_once (T_INCLUDE_ONCE)" shift, and go to state 8
"include (T_INCLUDE)" shift, and go to state 9
"print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 726
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 734
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 664
- 496 encaps_var: "variable (T_VARIABLE)" '[' @72 encaps_var_offset ']' .
+ 490 object_dim_list: object_dim_list '{' . expr '}'
- $default reduce using rule 496 (encaps_var)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 735
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 665
- 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' . '}'
-
- '}' shift, and go to state 727
+ 508 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ w_variable go to state 736
+ variable go to state 309
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 666
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list . ')'
-
- ')' shift, and go to state 728
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 504 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 504 (non_empty_array_pair_list)
state 667
- 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 top_statement_list '}' .
+ 390 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" $@66 object_property $@67 . dynamic_class_name_variable_properties
- $default reduce using rule 13 (top_statement)
+ $default reduce using rule 393 (dynamic_class_name_variable_properties)
+
+ dynamic_class_name_variable_properties go to state 737
state 668
- 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 function_call_parameter_list ')' .
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list $@8 . new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+
+ $default reduce using rule 154 (new_elseif_list)
- $default reduce using rule 348 (function_call)
+ new_elseif_list go to state 738
state 669
- 242 chaining_dereference: '[' . dim_offset ']'
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr $@5 statement $@6 elseif_list . else_single
+ 153 elseif_list: elseif_list . "elseif (T_ELSEIF)" parenthesis_expr $@37 statement
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 729
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "elseif (T_ELSEIF)" shift, and go to state 739
+ "else (T_ELSE)" shift, and go to state 740
+ "elseif (T_ELSEIF)" [reduce using rule 157 (else_single)]
+ "else (T_ELSE)" [reduce using rule 157 (else_single)]
+ $default reduce using rule 157 (else_single)
-state 670
+ else_single go to state 741
- 435 variable_property: "-> (T_OBJECT_OPERATOR)" . object_property @67 method_or_not
- "identifier (T_STRING)" shift, and go to state 436
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
+state 670
+
+ 47 unticked_statement: "do (T_DO)" $@11 statement "while (T_WHILE)" $@12 parenthesis_expr . ';'
- variable_without_objects go to state 540
- reference_variable go to state 382
- compound_variable go to state 112
- object_property go to state 730
- object_dim_list go to state 542
- variable_name go to state 543
- simple_indirect_reference go to state 384
+ ';' shift, and go to state 742
state 671
- 239 chaining_method_or_property: chaining_method_or_property . variable_property
- 246 chaining_instance_call: chaining_method_or_property .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 150 while_statement: ':' inner_statement_list . "endwhile (T_ENDWHILE)" ';'
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+ "endwhile (T_ENDWHILE)" shift, and go to state 743
- $default reduce using rule 246 (chaining_instance_call)
+ $default reduce using rule 26 ($@4)
- variable_property go to state 731
+ $@4 go to state 389
state 672
- 241 chaining_dereference: chaining_dereference . '[' dim_offset ']'
- 244 chaining_instance_call: chaining_dereference . @39 chaining_method_or_property
- 245 | chaining_dereference .
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr . ';' $@14 for_expr ')' $@15 for_statement
- '[' shift, and go to state 732
-
- "-> (T_OBJECT_OPERATOR)" reduce using rule 243 (@39)
- $default reduce using rule 245 (chaining_instance_call)
-
- @39 go to state 733
+ ';' shift, and go to state 744
state 673
- 249 instance_call: @40 chaining_instance_call .
-
- $default reduce using rule 249 (instance_call)
+ 247 non_empty_for_expr: non_empty_for_expr ',' $@41 expr .
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+
+ $default reduce using rule 247 (non_empty_for_expr)
state 674
- 240 chaining_method_or_property: variable_property .
-
- $default reduce using rule 240 (chaining_method_or_property)
+ 127 foreach_variable: '&' . variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 745
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 675
- 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' . ';'
+ 129 foreach_variable: "list (T_LIST)" . '(' $@34 assignment_list ')'
- ';' shift, and go to state 734
+ '(' shift, and go to state 746
state 676
- 173 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' . w_variable
-
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- function_call go to state 97
- class_name go to state 142
- w_variable go to state 735
- variable go to state 292
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 foreach_variable . foreach_optional_arg ')' $@20 foreach_statement
+
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 747
+
+ $default reduce using rule 124 (foreach_optional_arg)
+
+ foreach_optional_arg go to state 748
state 677
- 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' expr_without_variable .
- 424 expr: expr_without_variable .
+ 126 foreach_variable: variable .
- ',' reduce using rule 171 (non_empty_function_call_parameter_list)
- ')' reduce using rule 171 (non_empty_function_call_parameter_list)
- $default reduce using rule 424 (expr)
+ $default reduce using rule 126 (foreach_variable)
state 678
- 172 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' variable .
- 254 expr_without_variable: variable . '=' expr
- 255 | variable . '=' '&' variable
- 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
- 259 | variable . "+= (T_PLUS_EQUAL)" expr
- 260 | variable . "-= (T_MINUS_EQUAL)" expr
- 261 | variable . "*= (T_MUL_EQUAL)" expr
- 262 | variable . "/= (T_DIV_EQUAL)" expr
- 263 | variable . ".= (T_CONCAT_EQUAL)" expr
- 264 | variable . "%= (T_MOD_EQUAL)" expr
- 265 | variable . "&= (T_AND_EQUAL)" expr
- 266 | variable . "|= (T_OR_EQUAL)" expr
- 267 | variable . "^= (T_XOR_EQUAL)" expr
- 268 | variable . "<<= (T_SL_EQUAL)" expr
- 269 | variable . ">>= (T_SR_EQUAL)" expr
- 425 r_variable: variable .
- 427 rw_variable: variable .
-
- '=' shift, and go to state 264
- ">>= (T_SR_EQUAL)" shift, and go to state 265
- "<<= (T_SL_EQUAL)" shift, and go to state 266
- "^= (T_XOR_EQUAL)" shift, and go to state 267
- "|= (T_OR_EQUAL)" shift, and go to state 268
- "&= (T_AND_EQUAL)" shift, and go to state 269
- "%= (T_MOD_EQUAL)" shift, and go to state 270
- ".= (T_CONCAT_EQUAL)" shift, and go to state 271
- "/= (T_DIV_EQUAL)" shift, and go to state 272
- "*= (T_MUL_EQUAL)" shift, and go to state 273
- "-= (T_MINUS_EQUAL)" shift, and go to state 274
- "+= (T_PLUS_EQUAL)" shift, and go to state 275
-
- ',' reduce using rule 172 (non_empty_function_call_parameter_list)
- "-- (T_DEC)" reduce using rule 427 (rw_variable)
- "++ (T_INC)" reduce using rule 427 (rw_variable)
- ')' reduce using rule 172 (non_empty_function_call_parameter_list)
- $default reduce using rule 425 (r_variable)
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 foreach_variable . foreach_optional_arg ')' $@18 foreach_statement
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 747
-state 679
+ $default reduce using rule 124 (foreach_optional_arg)
- 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
- 364 fully_qualified_class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ foreach_optional_arg go to state 749
- "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- $default reduce using rule 364 (fully_qualified_class_name)
+state 679
+ 136 declare_list: "identifier (T_STRING)" '=' static_scalar .
-state 680
+ $default reduce using rule 136 (declare_list)
- 114 implements_list: "implements (T_IMPLEMENTS)" interface_list .
- 116 interface_list: interface_list . ',' fully_qualified_class_name
- ',' shift, and go to state 682
+state 680
- $default reduce using rule 114 (implements_list)
+ 137 declare_list: declare_list ',' "identifier (T_STRING)" . '=' static_scalar
+
+ '=' shift, and go to state 750
state 681
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' . class_statement_list '}'
+ 135 declare_statement: ':' . inner_statement_list "enddeclare (T_ENDDECLARE)" ';'
- $default reduce using rule 184 (class_statement_list)
+ $default reduce using rule 28 (inner_statement_list)
- class_statement_list go to state 736
+ inner_statement_list go to state 751
state 682
- 116 interface_list: interface_list ',' . fully_qualified_class_name
+ 134 declare_statement: statement .
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
-
- namespace_name go to state 516
- fully_qualified_class_name go to state 737
+ $default reduce using rule 134 (declare_statement)
state 683
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list . '}'
- 183 class_statement_list: class_statement_list . class_statement
-
- "const (T_CONST)" shift, and go to state 738
- "use (T_USE)" shift, and go to state 739
- "public (T_PUBLIC)" shift, and go to state 740
- "protected (T_PROTECTED)" shift, and go to state 741
- "private (T_PRIVATE)" shift, and go to state 742
- "final (T_FINAL)" shift, and go to state 743
- "abstract (T_ABSTRACT)" shift, and go to state 744
- "static (T_STATIC)" shift, and go to state 745
- "var (T_VAR)" shift, and go to state 746
- '}' shift, and go to state 747
+ 75 unticked_statement: "declare (T_DECLARE)" $@21 '(' declare_list ')' declare_statement .
- $default reduce using rule 216 (method_modifiers)
-
- class_statement go to state 748
- trait_use_statement go to state 749
- variable_modifiers go to state 750
- method_modifiers go to state 751
- non_empty_member_modifiers go to state 752
- member_modifier go to state 753
- class_constant_declaration go to state 754
+ $default reduce using rule 75 (unticked_statement)
state 684
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list . ')' '{' inner_statement_list '}'
+ 141 switch_case_list: ':' ';' case_list . "endswitch (T_ENDSWITCH)" ';'
+ 144 case_list: case_list . "case (T_CASE)" expr case_separator $@35 inner_statement_list
+ 146 | case_list . "default (T_DEFAULT)" case_separator $@36 inner_statement_list
- ')' shift, and go to state 755
+ "endswitch (T_ENDSWITCH)" shift, and go to state 752
+ "case (T_CASE)" shift, and go to state 686
+ "default (T_DEFAULT)" shift, and go to state 687
state 685
- 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' . lexical_vars '{' inner_statement_list '}'
-
- "use (T_USE)" shift, and go to state 756
-
- $default reduce using rule 337 (lexical_vars)
+ 140 switch_case_list: ':' case_list "endswitch (T_ENDSWITCH)" . ';'
- lexical_vars go to state 757
+ ';' shift, and go to state 753
state 686
- 158 non_empty_parameter_list: non_empty_parameter_list ',' . optional_class_type "variable (T_VARIABLE)"
- 159 | non_empty_parameter_list ',' . optional_class_type '&' "variable (T_VARIABLE)"
- 160 | non_empty_parameter_list ',' . optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
- 161 | non_empty_parameter_list ',' . optional_class_type "variable (T_VARIABLE)" '=' static_scalar
+ 144 case_list: case_list "case (T_CASE)" . expr case_separator $@35 inner_statement_list
- "identifier (T_STRING)" shift, and go to state 116
- "array (T_ARRAY)" shift, and go to state 608
- "callable (T_CALLABLE)" shift, and go to state 609
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
-
- $default reduce using rule 162 (optional_class_type)
-
- namespace_name go to state 516
- optional_class_type go to state 758
- fully_qualified_class_name go to state 613
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 754
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 687
- 155 non_empty_parameter_list: optional_class_type '&' . "variable (T_VARIABLE)"
- 156 | optional_class_type '&' . "variable (T_VARIABLE)" '=' static_scalar
+ 146 case_list: case_list "default (T_DEFAULT)" . case_separator $@36 inner_statement_list
- "variable (T_VARIABLE)" shift, and go to state 759
+ ':' shift, and go to state 755
+ ';' shift, and go to state 756
+ case_separator go to state 757
-state 688
- 154 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" .
- 157 | optional_class_type "variable (T_VARIABLE)" . '=' static_scalar
+state 688
- '=' shift, and go to state 760
+ 139 switch_case_list: '{' ';' case_list . '}'
+ 144 case_list: case_list . "case (T_CASE)" expr case_separator $@35 inner_statement_list
+ 146 | case_list . "default (T_DEFAULT)" case_separator $@36 inner_statement_list
- $default reduce using rule 154 (non_empty_parameter_list)
+ "case (T_CASE)" shift, and go to state 686
+ "default (T_DEFAULT)" shift, and go to state 687
+ '}' shift, and go to state 758
state 689
- 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list . ')'
+ 138 switch_case_list: '{' case_list '}' .
- ')' shift, and go to state 761
+ $default reduce using rule 138 (switch_case_list)
state 690
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list . ')'
-
- ')' shift, and go to state 762
+ 441 non_empty_static_array_pair_list: static_scalar "=> (T_DOUBLE_ARROW)" . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 759
+ static_class_constant go to state 502
state 691
- 313 expr_without_variable: expr '?' @49 expr ':' @50 . expr
+ 422 static_scalar: '[' static_array_pair_list ']' .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 763
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 422 (static_scalar)
state 692
- 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference @43 . ctor_arguments
-
- '(' shift, and go to state 443
-
- $default reduce using rule 381 (ctor_arguments)
-
- ctor_arguments go to state 764
+ 438 possible_comma: ',' .
+ 439 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' . static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 440 | non_empty_static_array_pair_list ',' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ $default reduce using rule 438 (possible_comma)
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 760
+ static_class_constant go to state 502
state 693
- 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list . ')'
+ 436 static_array_pair_list: non_empty_static_array_pair_list possible_comma .
- ')' shift, and go to state 765
+ $default reduce using rule 436 (static_array_pair_list)
state 694
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list . ')'
+ 421 static_scalar: "array (T_ARRAY)" '(' static_array_pair_list . ')'
- ')' shift, and go to state 766
+ ')' shift, and go to state 761
state 695
- 439 method: '(' . @68 function_call_parameter_list ')'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 381 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ 417 static_scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 438 (@68)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- @68 go to state 767
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 381 (class_name)
+ $default reduce using rule 417 (static_scalar)
state 696
- 436 array_method_dereference: array_method_dereference . '[' dim_offset ']'
- 441 method_or_not: array_method_dereference .
-
- '[' shift, and go to state 768
+ 425 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- $default reduce using rule 441 (method_or_not)
+ $default reduce using rule 425 (static_class_constant)
state 697
- 437 array_method_dereference: method . '[' dim_offset ']'
- 440 method_or_not: method .
+ 87 catch_statement: "catch (T_CATCH)" . '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
- '[' shift, and go to state 769
-
- $default reduce using rule 440 (method_or_not)
+ '(' shift, and go to state 762
state 698
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not . variable_properties
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' inner_statement_list '}' catch_statement . $@23 finally_statement
- $default reduce using rule 433 (variable_properties)
+ $default reduce using rule 78 ($@23)
- variable_properties go to state 770
+ $@23 go to state 763
state 699
- 467 object_dim_list: object_dim_list '[' dim_offset . ']'
+ 190 static_var_list: static_var_list ',' "variable (T_VARIABLE)" '=' static_scalar .
- ']' shift, and go to state 771
+ $default reduce using rule 190 (static_var_list)
state 700
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
- 468 object_dim_list: object_dim_list '{' expr . '}'
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '}' shift, and go to state 772
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list . ')' lexical_vars '{' inner_statement_list '}'
+
+ ')' shift, and go to state 764
state 701
- 486 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable .
+ 536 isset_variables: isset_variables ',' $@76 isset_variable .
- $default reduce using rule 486 (non_empty_array_pair_list)
+ $default reduce using rule 536 (isset_variables)
state 702
- 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property @64 dynamic_class_name_variable_properties .
- 372 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties . dynamic_class_name_variable_property
-
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 773
-
- $default reduce using rule 370 (dynamic_class_name_reference)
-
- dynamic_class_name_variable_property go to state 774
+ 500 assignment_list_element: "list (T_LIST)" '(' $@74 . assignment_list ')'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 519
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ $default reduce using rule 501 (assignment_list_element)
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 520
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ assignment_list go to state 765
+ assignment_list_element go to state 522
state 703
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list . @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
-
- "elseif (T_ELSEIF)" reduce using rule 40 (@8)
- "else (T_ELSE)" reduce using rule 40 (@8)
- "endif (T_ENDIF)" reduce using rule 40 (@8)
- $default reduce using rule 26 (@4)
+ 496 assignment_list: assignment_list ',' assignment_list_element .
- @4 go to state 366
- @8 go to state 775
+ $default reduce using rule 496 (assignment_list)
state 704
- 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 . elseif_list else_single
+ 263 expr_without_variable: "list (T_LIST)" '(' $@45 assignment_list ')' '=' . expr
- $default reduce using rule 142 (elseif_list)
-
- elseif_list go to state 776
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 766
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 705
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr . ')' ';'
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 777
+ 518 encaps_var: "variable (T_VARIABLE)" '[' $@75 encaps_var_offset ']' .
+
+ $default reduce using rule 518 (encaps_var)
state 706
- 141 while_statement: ':' . inner_statement_list "endwhile (T_ENDWHILE)" ';'
+ 521 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' . '}'
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 778
+ '}' shift, and go to state 767
state 707
- 140 while_statement: statement .
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' $@2 top_statement_list '}' .
- $default reduce using rule 140 (while_statement)
+ $default reduce using rule 13 (top_statement)
state 708
- 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' @10 while_statement .
+ 252 chaining_dereference: '[' . dim_offset ']'
- $default reduce using rule 44 (unticked_statement)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 768
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 709
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' . @14 for_expr ')' @15 for_statement
+ 457 variable_property: "-> (T_OBJECT_OPERATOR)" . object_property $@70 method_or_not
- $default reduce using rule 49 (@14)
+ "identifier (T_STRING)" shift, and go to state 463
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
- @14 go to state 779
+ variable_without_objects go to state 574
+ reference_variable go to state 408
+ compound_variable go to state 117
+ object_property go to state 769
+ object_dim_list go to state 576
+ variable_name go to state 577
+ simple_indirect_reference go to state 410
state 710
- 118 foreach_optional_arg: "=> (T_DOUBLE_ARROW)" . foreach_variable
-
- '&' shift, and go to state 639
- "identifier (T_STRING)" shift, and go to state 116
- "variable (T_VARIABLE)" shift, and go to state 34
- "static (T_STATIC)" shift, and go to state 138
- "namespace (T_NAMESPACE)" shift, and go to state 139
- "\\ (T_NS_SEPARATOR)" shift, and go to state 140
- '$' shift, and go to state 80
-
- namespace_name go to state 141
- foreach_variable go to state 780
- function_call go to state 97
- class_name go to state 142
- variable go to state 641
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 145
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
+ 249 chaining_method_or_property: chaining_method_or_property . variable_property
+ 256 chaining_instance_call: chaining_method_or_property .
+
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 709
+
+ $default reduce using rule 256 (chaining_instance_call)
+
+ variable_property go to state 770
state 711
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg . ')' @20 foreach_statement
+ 251 chaining_dereference: chaining_dereference . '[' dim_offset ']'
+ 254 chaining_instance_call: chaining_dereference . $@42 chaining_method_or_property
+ 255 | chaining_dereference .
- ')' shift, and go to state 781
+ '[' shift, and go to state 771
+
+ "-> (T_OBJECT_OPERATOR)" reduce using rule 253 ($@42)
+ $default reduce using rule 255 (chaining_instance_call)
+
+ $@42 go to state 772
state 712
- 120 foreach_variable: '&' variable .
+ 259 instance_call: $@43 chaining_instance_call .
- $default reduce using rule 120 (foreach_variable)
+ $default reduce using rule 259 (instance_call)
state 713
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg . ')' @18 foreach_statement
+ 250 chaining_method_or_property: variable_property .
- ')' shift, and go to state 782
+ $default reduce using rule 250 (chaining_method_or_property)
state 714
- 128 declare_list: declare_list ',' "identifier (T_STRING)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 783
- static_class_constant go to state 471
-
-
-state 715
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' . ';'
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 126 declare_statement: ':' inner_statement_list . "enddeclare (T_ENDDECLARE)" ';'
+ ';' shift, and go to state 773
- "enddeclare (T_ENDDECLARE)" shift, and go to state 784
- $default reduce using rule 26 (@4)
+state 715
- @4 go to state 366
+ 183 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ w_variable go to state 774
+ variable go to state 309
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 716
- 132 switch_case_list: ':' ';' . case_list "endswitch (T_ENDSWITCH)" ';'
+ 181 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' expr_without_variable .
+ 444 expr: expr_without_variable .
- $default reduce using rule 133 (case_list)
-
- case_list go to state 785
+ ',' reduce using rule 181 (non_empty_function_call_parameter_list)
+ ')' reduce using rule 181 (non_empty_function_call_parameter_list)
+ $default reduce using rule 444 (expr)
state 717
- 131 switch_case_list: ':' case_list . "endswitch (T_ENDSWITCH)" ';'
- 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
- 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
-
- "endswitch (T_ENDSWITCH)" shift, and go to state 786
- "case (T_CASE)" shift, and go to state 787
- "default (T_DEFAULT)" shift, and go to state 788
+ 182 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' variable .
+ 264 expr_without_variable: variable . '=' expr
+ 265 | variable . '=' '&' variable
+ 267 | variable . '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments
+ 269 | variable . "+= (T_PLUS_EQUAL)" expr
+ 270 | variable . "-= (T_MINUS_EQUAL)" expr
+ 271 | variable . "*= (T_MUL_EQUAL)" expr
+ 272 | variable . "/= (T_DIV_EQUAL)" expr
+ 273 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 274 | variable . "%= (T_MOD_EQUAL)" expr
+ 275 | variable . "&= (T_AND_EQUAL)" expr
+ 276 | variable . "|= (T_OR_EQUAL)" expr
+ 277 | variable . "^= (T_XOR_EQUAL)" expr
+ 278 | variable . "<<= (T_SL_EQUAL)" expr
+ 279 | variable . ">>= (T_SR_EQUAL)" expr
+ 447 r_variable: variable .
+ 449 rw_variable: variable .
+
+ '=' shift, and go to state 280
+ ">>= (T_SR_EQUAL)" shift, and go to state 281
+ "<<= (T_SL_EQUAL)" shift, and go to state 282
+ "^= (T_XOR_EQUAL)" shift, and go to state 283
+ "|= (T_OR_EQUAL)" shift, and go to state 284
+ "&= (T_AND_EQUAL)" shift, and go to state 285
+ "%= (T_MOD_EQUAL)" shift, and go to state 286
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 287
+ "/= (T_DIV_EQUAL)" shift, and go to state 288
+ "*= (T_MUL_EQUAL)" shift, and go to state 289
+ "-= (T_MINUS_EQUAL)" shift, and go to state 290
+ "+= (T_PLUS_EQUAL)" shift, and go to state 291
+
+ ',' reduce using rule 182 (non_empty_function_call_parameter_list)
+ "-- (T_DEC)" reduce using rule 449 (rw_variable)
+ "++ (T_INC)" reduce using rule 449 (rw_variable)
+ ')' reduce using rule 182 (non_empty_function_call_parameter_list)
+ $default reduce using rule 447 (r_variable)
state 718
- 130 switch_case_list: '{' ';' . case_list '}'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 384 fully_qualified_class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 133 (case_list)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 238
- case_list go to state 789
+ $default reduce using rule 384 (fully_qualified_class_name)
state 719
- 129 switch_case_list: '{' case_list . '}'
- 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
- 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
+ 121 implements_list: "implements (T_IMPLEMENTS)" interface_list .
+ 123 interface_list: interface_list . ',' fully_qualified_class_name
+
+ ',' shift, and go to state 721
- "case (T_CASE)" shift, and go to state 787
- "default (T_DEFAULT)" shift, and go to state 788
- '}' shift, and go to state 790
+ $default reduce using rule 121 (implements_list)
state 720
- 421 non_empty_static_array_pair_list: static_scalar "=> (T_DOUBLE_ARROW)" static_scalar .
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from $@32 implements_list '{' . class_statement_list '}'
- $default reduce using rule 421 (non_empty_static_array_pair_list)
+ $default reduce using rule 194 (class_statement_list)
+
+ class_statement_list go to state 775
state 721
- 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar . "=> (T_DOUBLE_ARROW)" static_scalar
- 420 | non_empty_static_array_pair_list ',' static_scalar .
+ 123 interface_list: interface_list ',' . fully_qualified_class_name
- "=> (T_DOUBLE_ARROW)" shift, and go to state 791
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
- $default reduce using rule 420 (non_empty_static_array_pair_list)
+ namespace_name go to state 549
+ fully_qualified_class_name go to state 776
state 722
- 401 static_scalar: "array (T_ARRAY)" '(' static_array_pair_list ')' .
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" $@33 interface_extends_list '{' class_statement_list . '}'
+ 193 class_statement_list: class_statement_list . class_statement
- $default reduce using rule 401 (static_scalar)
+ "const (T_CONST)" shift, and go to state 777
+ "use (T_USE)" shift, and go to state 778
+ "public (T_PUBLIC)" shift, and go to state 779
+ "protected (T_PROTECTED)" shift, and go to state 780
+ "private (T_PRIVATE)" shift, and go to state 781
+ "final (T_FINAL)" shift, and go to state 782
+ "abstract (T_ABSTRACT)" shift, and go to state 783
+ "static (T_STATIC)" shift, and go to state 784
+ "var (T_VAR)" shift, and go to state 785
+ '}' shift, and go to state 786
+ $default reduce using rule 226 (method_modifiers)
-state 723
+ class_statement go to state 787
+ trait_use_statement go to state 788
+ variable_modifiers go to state 789
+ method_modifiers go to state 790
+ non_empty_member_modifiers go to state 791
+ member_modifier go to state 792
+ class_constant_declaration go to state 793
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' . @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- $default reduce using rule 77 (@23)
+state 723
+
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' parameter_list . ')' '{' inner_statement_list '}'
- @23 go to state 792
+ ')' shift, and go to state 794
state 724
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' . lexical_vars '{' inner_statement_list '}'
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list ')' . lexical_vars '{' inner_statement_list '}'
- "use (T_USE)" shift, and go to state 756
+ "use (T_USE)" shift, and go to state 795
- $default reduce using rule 337 (lexical_vars)
+ $default reduce using rule 357 (lexical_vars)
- lexical_vars go to state 793
+ lexical_vars go to state 796
state 725
- 474 assignment_list: assignment_list . ',' assignment_list_element
- 478 assignment_list_element: "list (T_LIST)" '(' @71 assignment_list . ')'
+ 167 non_empty_parameter_list: non_empty_parameter_list ',' . optional_class_type "variable (T_VARIABLE)"
+ 168 | non_empty_parameter_list ',' . optional_class_type '&' "variable (T_VARIABLE)"
+ 169 | non_empty_parameter_list ',' . optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 170 | non_empty_parameter_list ',' . optional_class_type "variable (T_VARIABLE)" '=' static_scalar
- ',' shift, and go to state 582
- ')' shift, and go to state 794
+ "identifier (T_STRING)" shift, and go to state 122
+ "array (T_ARRAY)" shift, and go to state 646
+ "callable (T_CALLABLE)" shift, and go to state 647
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ $default reduce using rule 171 (optional_class_type)
+
+ namespace_name go to state 549
+ optional_class_type go to state 797
+ fully_qualified_class_name go to state 651
state 726
- 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' '=' expr .
- 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
-
- $default reduce using rule 253 (expr_without_variable)
+ 164 non_empty_parameter_list: optional_class_type '&' . "variable (T_VARIABLE)"
+ 165 | optional_class_type '&' . "variable (T_VARIABLE)" '=' static_scalar
+
+ "variable (T_VARIABLE)" shift, and go to state 798
state 727
- 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' '}' .
+ 163 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" .
+ 166 | optional_class_type "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 499 (encaps_var)
+ '=' shift, and go to state 799
+
+ $default reduce using rule 163 (non_empty_parameter_list)
state 728
- 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')' .
+ 323 expr_without_variable: expr '?' $@52 expr ':' $@53 . expr
- $default reduce using rule 346 (function_call)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 800
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 729
- 242 chaining_dereference: '[' dim_offset . ']'
+ 267 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference $@46 . ctor_arguments
+
+ '(' shift, and go to state 394
- ']' shift, and go to state 795
+ $default reduce using rule 401 (ctor_arguments)
+
+ function_call_parameter_list go to state 470
+ ctor_arguments go to state 801
state 730
- 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property . @67 method_or_not
+ 458 array_method_dereference: array_method_dereference . '[' dim_offset ']'
+ 463 method_or_not: array_method_dereference .
- $default reduce using rule 434 (@67)
+ '[' shift, and go to state 802
- @67 go to state 796
+ $default reduce using rule 463 (method_or_not)
state 731
- 239 chaining_method_or_property: chaining_method_or_property variable_property .
+ 459 array_method_dereference: method . '[' dim_offset ']'
+ 462 method_or_not: method .
+
+ '[' shift, and go to state 803
- $default reduce using rule 239 (chaining_method_or_property)
+ $default reduce using rule 462 (method_or_not)
state 732
- 241 chaining_dereference: chaining_dereference '[' . dim_offset ']'
+ 461 method: @71 . function_call_parameter_list
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 797
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ '(' shift, and go to state 394
+
+ function_call_parameter_list go to state 804
state 733
- 244 chaining_instance_call: chaining_dereference @39 . chaining_method_or_property
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" $@68 object_property $@69 method_or_not . variable_properties
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+ $default reduce using rule 455 (variable_properties)
- chaining_method_or_property go to state 798
- variable_property go to state 674
+ variable_properties go to state 805
state 734
- 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';' .
+ 489 object_dim_list: object_dim_list '[' dim_offset . ']'
- $default reduce using rule 32 (inner_statement)
+ ']' shift, and go to state 806
state 735
- 173 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' w_variable .
-
- $default reduce using rule 173 (non_empty_function_call_parameter_list)
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+ 490 object_dim_list: object_dim_list '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ '}' shift, and go to state 807
state 736
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list . '}'
- 183 class_statement_list: class_statement_list . class_statement
+ 508 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable .
- "const (T_CONST)" shift, and go to state 738
- "use (T_USE)" shift, and go to state 739
- "public (T_PUBLIC)" shift, and go to state 740
- "protected (T_PROTECTED)" shift, and go to state 741
- "private (T_PRIVATE)" shift, and go to state 742
- "final (T_FINAL)" shift, and go to state 743
- "abstract (T_ABSTRACT)" shift, and go to state 744
- "static (T_STATIC)" shift, and go to state 745
- "var (T_VAR)" shift, and go to state 746
- '}' shift, and go to state 799
+ $default reduce using rule 508 (non_empty_array_pair_list)
- $default reduce using rule 216 (method_modifiers)
- class_statement go to state 748
- trait_use_statement go to state 749
- variable_modifiers go to state 750
- method_modifiers go to state 751
- non_empty_member_modifiers go to state 752
- member_modifier go to state 753
- class_constant_declaration go to state 754
+state 737
+ 390 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" $@66 object_property $@67 dynamic_class_name_variable_properties .
+ 392 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties . dynamic_class_name_variable_property
-state 737
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 808
- 116 interface_list: interface_list ',' fully_qualified_class_name .
+ $default reduce using rule 390 (dynamic_class_name_reference)
- $default reduce using rule 116 (interface_list)
+ dynamic_class_name_variable_property go to state 809
state 738
- 231 class_constant_declaration: "const (T_CONST)" . "identifier (T_STRING)" '=' static_scalar
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list $@8 new_elseif_list . new_else_single "endif (T_ENDIF)" ';'
+ 156 new_elseif_list: new_elseif_list . "elseif (T_ELSEIF)" parenthesis_expr ':' $@38 inner_statement_list
+
+ "elseif (T_ELSEIF)" shift, and go to state 810
+ "else (T_ELSE)" shift, and go to state 811
- "identifier (T_STRING)" shift, and go to state 800
+ $default reduce using rule 159 (new_else_single)
+
+ new_else_single go to state 812
state 739
- 191 trait_use_statement: "use (T_USE)" . trait_list trait_adaptations
+ 153 elseif_list: elseif_list "elseif (T_ELSEIF)" . parenthesis_expr $@37 statement
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ '(' shift, and go to state 174
- namespace_name go to state 516
- trait_list go to state 801
- fully_qualified_class_name go to state 802
+ parenthesis_expr go to state 813
state 740
- 220 member_modifier: "public (T_PUBLIC)" .
+ 158 else_single: "else (T_ELSE)" . statement
- $default reduce using rule 220 (member_modifier)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 814
+ unticked_statement go to state 88
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 741
- 221 member_modifier: "protected (T_PROTECTED)" .
+ 38 unticked_statement: "if (T_IF)" parenthesis_expr $@5 statement $@6 elseif_list else_single .
- $default reduce using rule 221 (member_modifier)
+ $default reduce using rule 38 (unticked_statement)
state 742
- 222 member_modifier: "private (T_PRIVATE)" .
+ 47 unticked_statement: "do (T_DO)" $@11 statement "while (T_WHILE)" $@12 parenthesis_expr ';' .
- $default reduce using rule 222 (member_modifier)
+ $default reduce using rule 47 (unticked_statement)
state 743
- 225 member_modifier: "final (T_FINAL)" .
+ 150 while_statement: ':' inner_statement_list "endwhile (T_ENDWHILE)" . ';'
- $default reduce using rule 225 (member_modifier)
+ ';' shift, and go to state 815
state 744
- 224 member_modifier: "abstract (T_ABSTRACT)" .
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' . $@14 for_expr ')' $@15 for_statement
- $default reduce using rule 224 (member_modifier)
+ $default reduce using rule 49 ($@14)
+
+ $@14 go to state 816
state 745
- 223 member_modifier: "static (T_STATIC)" .
+ 127 foreach_variable: '&' variable .
- $default reduce using rule 223 (member_modifier)
+ $default reduce using rule 127 (foreach_variable)
state 746
- 215 variable_modifiers: "var (T_VAR)" .
+ 129 foreach_variable: "list (T_LIST)" '(' . $@34 assignment_list ')'
- $default reduce using rule 215 (variable_modifiers)
+ $default reduce using rule 128 ($@34)
+ $@34 go to state 817
-state 747
- 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list '}' .
+state 747
- $default reduce using rule 103 (unticked_class_declaration_statement)
+ 125 foreach_optional_arg: "=> (T_DOUBLE_ARROW)" . foreach_variable
+
+ '&' shift, and go to state 674
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 675
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ namespace_name go to state 150
+ foreach_variable go to state 818
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 677
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
state 748
- 183 class_statement_list: class_statement_list class_statement .
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg . ')' $@20 foreach_statement
- $default reduce using rule 183 (class_statement_list)
+ ')' shift, and go to state 819
state 749
- 188 class_statement: trait_use_statement .
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg . ')' $@18 foreach_statement
- $default reduce using rule 188 (class_statement)
+ ')' shift, and go to state 820
state 750
- 186 class_statement: variable_modifiers . @36 class_variable_declaration ';'
-
- $default reduce using rule 185 (@36)
-
- @36 go to state 803
+ 137 declare_list: declare_list ',' "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 821
+ static_class_constant go to state 502
state 751
- 190 class_statement: method_modifiers . function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 135 declare_statement: ':' inner_statement_list . "enddeclare (T_ENDDECLARE)" ';'
- "function (T_FUNCTION)" shift, and go to state 47
+ "enddeclare (T_ENDDECLARE)" shift, and go to state 822
- function go to state 804
+ $default reduce using rule 26 ($@4)
+ $@4 go to state 389
-state 752
- 214 variable_modifiers: non_empty_member_modifiers .
- 217 method_modifiers: non_empty_member_modifiers .
- 219 non_empty_member_modifiers: non_empty_member_modifiers . member_modifier
-
- "public (T_PUBLIC)" shift, and go to state 740
- "protected (T_PROTECTED)" shift, and go to state 741
- "private (T_PRIVATE)" shift, and go to state 742
- "final (T_FINAL)" shift, and go to state 743
- "abstract (T_ABSTRACT)" shift, and go to state 744
- "static (T_STATIC)" shift, and go to state 745
+state 752
- "function (T_FUNCTION)" reduce using rule 217 (method_modifiers)
- $default reduce using rule 214 (variable_modifiers)
+ 141 switch_case_list: ':' ';' case_list "endswitch (T_ENDSWITCH)" . ';'
- member_modifier go to state 805
+ ';' shift, and go to state 823
state 753
- 218 non_empty_member_modifiers: member_modifier .
+ 140 switch_case_list: ':' case_list "endswitch (T_ENDSWITCH)" ';' .
- $default reduce using rule 218 (non_empty_member_modifiers)
+ $default reduce using rule 140 (switch_case_list)
state 754
- 187 class_statement: class_constant_declaration . ';'
- 230 class_constant_declaration: class_constant_declaration . ',' "identifier (T_STRING)" '=' static_scalar
-
- ',' shift, and go to state 806
- ';' shift, and go to state 807
+ 144 case_list: case_list "case (T_CASE)" expr . case_separator $@35 inner_statement_list
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 251
+ "xor (T_LOGICAL_XOR)" shift, and go to state 252
+ "and (T_LOGICAL_AND)" shift, and go to state 253
+ '?' shift, and go to state 254
+ ':' shift, and go to state 755
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
+ ';' shift, and go to state 756
+
+ case_separator go to state 824
state 755
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' . '{' inner_statement_list '}'
+ 147 case_separator: ':' .
- '{' shift, and go to state 808
+ $default reduce using rule 147 (case_separator)
state 756
- 338 lexical_vars: "use (T_USE)" . '(' lexical_var_list ')'
+ 148 case_separator: ';' .
- '(' shift, and go to state 809
+ $default reduce using rule 148 (case_separator)
state 757
- 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars . '{' inner_statement_list '}'
+ 146 case_list: case_list "default (T_DEFAULT)" case_separator . $@36 inner_statement_list
+
+ $default reduce using rule 145 ($@36)
- '{' shift, and go to state 810
+ $@36 go to state 825
state 758
- 158 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type . "variable (T_VARIABLE)"
- 159 | non_empty_parameter_list ',' optional_class_type . '&' "variable (T_VARIABLE)"
- 160 | non_empty_parameter_list ',' optional_class_type . '&' "variable (T_VARIABLE)" '=' static_scalar
- 161 | non_empty_parameter_list ',' optional_class_type . "variable (T_VARIABLE)" '=' static_scalar
+ 139 switch_case_list: '{' ';' case_list '}' .
- '&' shift, and go to state 811
- "variable (T_VARIABLE)" shift, and go to state 812
+ $default reduce using rule 139 (switch_case_list)
state 759
- 155 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" .
- 156 | optional_class_type '&' "variable (T_VARIABLE)" . '=' static_scalar
+ 441 non_empty_static_array_pair_list: static_scalar "=> (T_DOUBLE_ARROW)" static_scalar .
- '=' shift, and go to state 813
-
- $default reduce using rule 155 (non_empty_parameter_list)
+ $default reduce using rule 441 (non_empty_static_array_pair_list)
state 760
- 157 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 814
- static_class_constant go to state 471
+ 439 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar . "=> (T_DOUBLE_ARROW)" static_scalar
+ 440 | non_empty_static_array_pair_list ',' static_scalar .
+
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 826
+
+ $default reduce using rule 440 (non_empty_static_array_pair_list)
state 761
- 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')' .
+ 421 static_scalar: "array (T_ARRAY)" '(' static_array_pair_list ')' .
- $default reduce using rule 352 (function_call)
+ $default reduce using rule 421 (static_scalar)
state 762
- 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')' .
+ 87 catch_statement: "catch (T_CATCH)" '(' . $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
+
+ $default reduce using rule 83 ($@24)
- $default reduce using rule 350 (function_call)
+ $@24 go to state 827
state 763
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 313 | expr '?' @49 expr ':' @50 expr .
- 315 | expr . '?' ':' @51 expr
-
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' inner_statement_list '}' catch_statement $@23 . finally_statement
- $default reduce using rule 313 (expr_without_variable)
+ "finally (T_FINALLY)" shift, and go to state 828
+
+ $default reduce using rule 88 (finally_statement)
+
+ finally_statement go to state 829
state 764
- 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments .
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list ')' . lexical_vars '{' inner_statement_list '}'
+
+ "use (T_USE)" shift, and go to state 795
+
+ $default reduce using rule 357 (lexical_vars)
- $default reduce using rule 257 (expr_without_variable)
+ lexical_vars go to state 830
state 765
- 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')' .
+ 496 assignment_list: assignment_list . ',' assignment_list_element
+ 500 assignment_list_element: "list (T_LIST)" '(' $@74 assignment_list . ')'
- $default reduce using rule 356 (function_call)
+ ',' shift, and go to state 620
+ ')' shift, and go to state 831
state 766
- 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')' .
+ 263 expr_without_variable: "list (T_LIST)" '(' $@45 assignment_list ')' '=' expr .
+ 285 | expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 325 | expr . '?' ':' $@54 expr
+
+ '?' shift, and go to state 254
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- $default reduce using rule 354 (function_call)
+ $default reduce using rule 263 (expr_without_variable)
state 767
- 439 method: '(' @68 . function_call_parameter_list ')'
+ 521 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' '}' .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '&' shift, and go to state 508
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 167 (function_call_parameter_list)
-
- namespace_name go to state 83
- function_call_parameter_list go to state 815
- non_empty_function_call_parameter_list go to state 510
- new_expr go to state 94
- expr_without_variable go to state 511
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 182
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 512
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 521 (encaps_var)
state 768
- 436 array_method_dereference: array_method_dereference '[' . dim_offset ']'
+ 252 chaining_dereference: '[' dim_offset . ']'
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 816
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ ']' shift, and go to state 832
state 769
- 437 array_method_dereference: method '[' . dim_offset ']'
+ 457 variable_property: "-> (T_OBJECT_OPERATOR)" object_property . $@70 method_or_not
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 462 (dim_offset)
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 429
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- dim_offset go to state 817
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 456 ($@70)
+ $@70 go to state 833
-state 770
-
- 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not variable_properties .
- 432 variable_properties: variable_properties . variable_property
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+state 770
- $default reduce using rule 430 (variable)
+ 249 chaining_method_or_property: chaining_method_or_property variable_property .
- variable_property go to state 818
+ $default reduce using rule 249 (chaining_method_or_property)
state 771
- 467 object_dim_list: object_dim_list '[' dim_offset ']' .
+ 251 chaining_dereference: chaining_dereference '[' . dim_offset ']'
- $default reduce using rule 467 (object_dim_list)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 834
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 772
- 468 object_dim_list: object_dim_list '{' expr '}' .
+ 254 chaining_instance_call: chaining_dereference $@42 . chaining_method_or_property
- $default reduce using rule 468 (object_dim_list)
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 709
+ chaining_method_or_property go to state 835
+ variable_property go to state 713
-state 773
- 374 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" . object_property
+state 773
- "identifier (T_STRING)" shift, and go to state 436
- "variable (T_VARIABLE)" shift, and go to state 34
- '{' shift, and go to state 380
- '$' shift, and go to state 80
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';' .
- variable_without_objects go to state 540
- reference_variable go to state 382
- compound_variable go to state 112
- object_property go to state 819
- object_dim_list go to state 542
- variable_name go to state 543
- simple_indirect_reference go to state 384
+ $default reduce using rule 32 (inner_statement)
state 774
- 372 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property .
+ 183 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' w_variable .
- $default reduce using rule 372 (dynamic_class_name_variable_properties)
+ $default reduce using rule 183 (non_empty_function_call_parameter_list)
state 775
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 . new_elseif_list new_else_single "endif (T_ENDIF)" ';'
-
- $default reduce using rule 145 (new_elseif_list)
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from $@32 implements_list '{' class_statement_list . '}'
+ 193 class_statement_list: class_statement_list . class_statement
- new_elseif_list go to state 820
+ "const (T_CONST)" shift, and go to state 777
+ "use (T_USE)" shift, and go to state 778
+ "public (T_PUBLIC)" shift, and go to state 779
+ "protected (T_PROTECTED)" shift, and go to state 780
+ "private (T_PRIVATE)" shift, and go to state 781
+ "final (T_FINAL)" shift, and go to state 782
+ "abstract (T_ABSTRACT)" shift, and go to state 783
+ "static (T_STATIC)" shift, and go to state 784
+ "var (T_VAR)" shift, and go to state 785
+ '}' shift, and go to state 836
+ $default reduce using rule 226 (method_modifiers)
-state 776
+ class_statement go to state 787
+ trait_use_statement go to state 788
+ variable_modifiers go to state 789
+ method_modifiers go to state 790
+ non_empty_member_modifiers go to state 791
+ member_modifier go to state 792
+ class_constant_declaration go to state 793
- 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 elseif_list . else_single
- 144 elseif_list: elseif_list . "elseif (T_ELSEIF)" '(' expr ')' @34 statement
- "elseif (T_ELSEIF)" shift, and go to state 821
- "else (T_ELSE)" shift, and go to state 822
+state 776
- "elseif (T_ELSEIF)" [reduce using rule 148 (else_single)]
- "else (T_ELSE)" [reduce using rule 148 (else_single)]
- $default reduce using rule 148 (else_single)
+ 123 interface_list: interface_list ',' fully_qualified_class_name .
- else_single go to state 823
+ $default reduce using rule 123 (interface_list)
state 777
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr ')' . ';'
+ 241 class_constant_declaration: "const (T_CONST)" . "identifier (T_STRING)" '=' static_scalar
- ';' shift, and go to state 824
+ "identifier (T_STRING)" shift, and go to state 837
state 778
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 141 while_statement: ':' inner_statement_list . "endwhile (T_ENDWHILE)" ';'
+ 201 trait_use_statement: "use (T_USE)" . trait_list trait_adaptations
- "endwhile (T_ENDWHILE)" shift, and go to state 825
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
- $default reduce using rule 26 (@4)
-
- @4 go to state 366
+ namespace_name go to state 549
+ trait_list go to state 838
+ fully_qualified_class_name go to state 839
state 779
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 . for_expr ')' @15 for_statement
+ 230 member_modifier: "public (T_PUBLIC)" .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- $default reduce using rule 234 (for_expr)
-
- namespace_name go to state 83
- for_expr go to state 826
- non_empty_for_expr go to state 312
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 313
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 230 (member_modifier)
state 780
- 118 foreach_optional_arg: "=> (T_DOUBLE_ARROW)" foreach_variable .
+ 231 member_modifier: "protected (T_PROTECTED)" .
- $default reduce using rule 118 (foreach_optional_arg)
+ $default reduce using rule 231 (member_modifier)
state 781
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' . @20 foreach_statement
-
- $default reduce using rule 71 (@20)
+ 232 member_modifier: "private (T_PRIVATE)" .
- @20 go to state 827
+ $default reduce using rule 232 (member_modifier)
state 782
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' . @18 foreach_statement
+ 235 member_modifier: "final (T_FINAL)" .
- $default reduce using rule 68 (@18)
-
- @18 go to state 828
+ $default reduce using rule 235 (member_modifier)
state 783
- 128 declare_list: declare_list ',' "identifier (T_STRING)" '=' static_scalar .
+ 234 member_modifier: "abstract (T_ABSTRACT)" .
- $default reduce using rule 128 (declare_list)
+ $default reduce using rule 234 (member_modifier)
state 784
- 126 declare_statement: ':' inner_statement_list "enddeclare (T_ENDDECLARE)" . ';'
+ 233 member_modifier: "static (T_STATIC)" .
- ';' shift, and go to state 829
+ $default reduce using rule 233 (member_modifier)
state 785
- 132 switch_case_list: ':' ';' case_list . "endswitch (T_ENDSWITCH)" ';'
- 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
- 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
+ 225 variable_modifiers: "var (T_VAR)" .
- "endswitch (T_ENDSWITCH)" shift, and go to state 830
- "case (T_CASE)" shift, and go to state 787
- "default (T_DEFAULT)" shift, and go to state 788
+ $default reduce using rule 225 (variable_modifiers)
state 786
- 131 switch_case_list: ':' case_list "endswitch (T_ENDSWITCH)" . ';'
+ 110 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" $@33 interface_extends_list '{' class_statement_list '}' .
- ';' shift, and go to state 831
+ $default reduce using rule 110 (unticked_class_declaration_statement)
state 787
- 135 case_list: case_list "case (T_CASE)" . expr case_separator @32 inner_statement_list
+ 193 class_statement_list: class_statement_list class_statement .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 832
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 193 (class_statement_list)
state 788
- 137 case_list: case_list "default (T_DEFAULT)" . case_separator @33 inner_statement_list
+ 198 class_statement: trait_use_statement .
- ':' shift, and go to state 833
- ';' shift, and go to state 834
-
- case_separator go to state 835
+ $default reduce using rule 198 (class_statement)
state 789
- 130 switch_case_list: '{' ';' case_list . '}'
- 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
- 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
+ 196 class_statement: variable_modifiers . $@39 class_variable_declaration ';'
+
+ $default reduce using rule 195 ($@39)
- "case (T_CASE)" shift, and go to state 787
- "default (T_DEFAULT)" shift, and go to state 788
- '}' shift, and go to state 836
+ $@39 go to state 840
state 790
- 129 switch_case_list: '{' case_list '}' .
+ 200 class_statement: method_modifiers . function is_reference "identifier (T_STRING)" $@40 '(' parameter_list ')' method_body
- $default reduce using rule 129 (switch_case_list)
+ "function (T_FUNCTION)" shift, and go to state 48
+
+ function go to state 841
state 791
- 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 837
- static_class_constant go to state 471
+ 224 variable_modifiers: non_empty_member_modifiers .
+ 227 method_modifiers: non_empty_member_modifiers .
+ 229 non_empty_member_modifiers: non_empty_member_modifiers . member_modifier
+ "public (T_PUBLIC)" shift, and go to state 779
+ "protected (T_PROTECTED)" shift, and go to state 780
+ "private (T_PRIVATE)" shift, and go to state 781
+ "final (T_FINAL)" shift, and go to state 782
+ "abstract (T_ABSTRACT)" shift, and go to state 783
+ "static (T_STATIC)" shift, and go to state 784
+
+ "function (T_FUNCTION)" reduce using rule 227 (method_modifiers)
+ $default reduce using rule 224 (variable_modifiers)
+
+ member_modifier go to state 842
-state 792
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 . fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+state 792
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ 228 non_empty_member_modifiers: member_modifier .
- namespace_name go to state 516
- fully_qualified_class_name go to state 838
+ $default reduce using rule 228 (non_empty_member_modifiers)
state 793
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars . '{' inner_statement_list '}'
+ 197 class_statement: class_constant_declaration . ';'
+ 240 class_constant_declaration: class_constant_declaration . ',' "identifier (T_STRING)" '=' static_scalar
- '{' shift, and go to state 839
+ ',' shift, and go to state 843
+ ';' shift, and go to state 844
state 794
- 478 assignment_list_element: "list (T_LIST)" '(' @71 assignment_list ')' .
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' parameter_list ')' . '{' inner_statement_list '}'
- $default reduce using rule 478 (assignment_list_element)
+ '{' shift, and go to state 845
state 795
- 242 chaining_dereference: '[' dim_offset ']' .
+ 358 lexical_vars: "use (T_USE)" . '(' lexical_var_list ')'
- $default reduce using rule 242 (chaining_dereference)
+ '(' shift, and go to state 846
state 796
- 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property @67 . method_or_not
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list ')' lexical_vars . '{' inner_statement_list '}'
- '(' shift, and go to state 695
-
- $default reduce using rule 442 (method_or_not)
-
- array_method_dereference go to state 696
- method go to state 697
- method_or_not go to state 840
+ '{' shift, and go to state 847
state 797
- 241 chaining_dereference: chaining_dereference '[' dim_offset . ']'
+ 167 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type . "variable (T_VARIABLE)"
+ 168 | non_empty_parameter_list ',' optional_class_type . '&' "variable (T_VARIABLE)"
+ 169 | non_empty_parameter_list ',' optional_class_type . '&' "variable (T_VARIABLE)" '=' static_scalar
+ 170 | non_empty_parameter_list ',' optional_class_type . "variable (T_VARIABLE)" '=' static_scalar
- ']' shift, and go to state 841
+ '&' shift, and go to state 848
+ "variable (T_VARIABLE)" shift, and go to state 849
state 798
- 239 chaining_method_or_property: chaining_method_or_property . variable_property
- 244 chaining_instance_call: chaining_dereference @39 chaining_method_or_property .
-
- "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+ 164 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" .
+ 165 | optional_class_type '&' "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 244 (chaining_instance_call)
+ '=' shift, and go to state 850
- variable_property go to state 731
+ $default reduce using rule 164 (non_empty_parameter_list)
state 799
- 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list '}' .
-
- $default reduce using rule 101 (unticked_class_declaration_statement)
+ 166 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 851
+ static_class_constant go to state 502
state 800
- 231 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" . '=' static_scalar
+ 285 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" $@47 expr
+ 287 | expr . "&& (T_BOOLEAN_AND)" $@48 expr
+ 289 | expr . "or (T_LOGICAL_OR)" $@49 expr
+ 291 | expr . "and (T_LOGICAL_AND)" $@50 expr
+ 292 | expr . "xor (T_LOGICAL_XOR)" expr
+ 293 | expr . '|' expr
+ 294 | expr . '&' expr
+ 295 | expr . '^' expr
+ 296 | expr . '.' expr
+ 297 | expr . '+' expr
+ 298 | expr . '-' expr
+ 299 | expr . '*' expr
+ 300 | expr . '/' expr
+ 301 | expr . '%' expr
+ 302 | expr . "<< (T_SL)" expr
+ 303 | expr . ">> (T_SR)" expr
+ 308 | expr . "=== (T_IS_IDENTICAL)" expr
+ 309 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 310 | expr . "== (T_IS_EQUAL)" expr
+ 311 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 312 | expr . '<' expr
+ 313 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 314 | expr . '>' expr
+ 315 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 316 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 323 | expr . '?' $@52 expr ':' $@53 expr
+ 323 | expr '?' $@52 expr ':' $@53 expr .
+ 325 | expr . '?' ':' $@54 expr
+
+ "|| (T_BOOLEAN_OR)" shift, and go to state 255
+ "&& (T_BOOLEAN_AND)" shift, and go to state 256
+ '|' shift, and go to state 257
+ '^' shift, and go to state 258
+ '&' shift, and go to state 259
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 260
+ "=== (T_IS_IDENTICAL)" shift, and go to state 261
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 262
+ "== (T_IS_EQUAL)" shift, and go to state 263
+ '<' shift, and go to state 264
+ '>' shift, and go to state 265
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 266
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 267
+ ">> (T_SR)" shift, and go to state 268
+ "<< (T_SL)" shift, and go to state 269
+ '+' shift, and go to state 270
+ '-' shift, and go to state 271
+ '.' shift, and go to state 272
+ '*' shift, and go to state 273
+ '/' shift, and go to state 274
+ '%' shift, and go to state 275
+ "instanceof (T_INSTANCEOF)" shift, and go to state 276
- '=' shift, and go to state 842
+ $default reduce using rule 323 (expr_without_variable)
state 801
- 191 trait_use_statement: "use (T_USE)" trait_list . trait_adaptations
- 193 trait_list: trait_list . ',' fully_qualified_class_name
-
- ',' shift, and go to state 843
- ';' shift, and go to state 844
- '{' shift, and go to state 845
+ 267 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference $@46 ctor_arguments .
- trait_adaptations go to state 846
+ $default reduce using rule 267 (expr_without_variable)
state 802
- 192 trait_list: fully_qualified_class_name .
+ 458 array_method_dereference: array_method_dereference '[' . dim_offset ']'
- $default reduce using rule 192 (trait_list)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 852
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 803
- 186 class_statement: variable_modifiers @36 . class_variable_declaration ';'
-
- "variable (T_VARIABLE)" shift, and go to state 847
+ 459 array_method_dereference: method '[' . dim_offset ']'
- class_variable_declaration go to state 848
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 484 (dim_offset)
+
+ namespace_name go to state 84
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 324
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ dim_offset go to state 853
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 804
- 190 class_statement: method_modifiers function . is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
+ 461 method: @71 function_call_parameter_list .
- '&' shift, and go to state 231
+ $default reduce using rule 461 (method)
- $default reduce using rule 96 (is_reference)
- is_reference go to state 849
+state 805
+ 452 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" $@68 object_property $@69 method_or_not variable_properties .
+ 454 variable_properties: variable_properties . variable_property
-state 805
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 709
- 219 non_empty_member_modifiers: non_empty_member_modifiers member_modifier .
+ $default reduce using rule 452 (variable)
- $default reduce using rule 219 (non_empty_member_modifiers)
+ variable_property go to state 854
state 806
- 230 class_constant_declaration: class_constant_declaration ',' . "identifier (T_STRING)" '=' static_scalar
+ 489 object_dim_list: object_dim_list '[' dim_offset ']' .
- "identifier (T_STRING)" shift, and go to state 850
+ $default reduce using rule 489 (object_dim_list)
state 807
- 187 class_statement: class_constant_declaration ';' .
+ 490 object_dim_list: object_dim_list '{' expr '}' .
- $default reduce using rule 187 (class_statement)
+ $default reduce using rule 490 (object_dim_list)
state 808
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' . inner_statement_list '}'
+ 394 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" . object_property
- $default reduce using rule 28 (inner_statement_list)
+ "identifier (T_STRING)" shift, and go to state 463
+ "variable (T_VARIABLE)" shift, and go to state 35
+ '{' shift, and go to state 406
+ '$' shift, and go to state 81
- inner_statement_list go to state 851
+ variable_without_objects go to state 574
+ reference_variable go to state 408
+ compound_variable go to state 117
+ object_property go to state 855
+ object_dim_list go to state 576
+ variable_name go to state 577
+ simple_indirect_reference go to state 410
state 809
- 338 lexical_vars: "use (T_USE)" '(' . lexical_var_list ')'
+ 392 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property .
- '&' shift, and go to state 852
- "variable (T_VARIABLE)" shift, and go to state 853
-
- lexical_var_list go to state 854
+ $default reduce using rule 392 (dynamic_class_name_variable_properties)
state 810
- 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' . inner_statement_list '}'
+ 156 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" . parenthesis_expr ':' $@38 inner_statement_list
- $default reduce using rule 28 (inner_statement_list)
+ '(' shift, and go to state 174
- inner_statement_list go to state 855
+ parenthesis_expr go to state 856
state 811
- 159 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' . "variable (T_VARIABLE)"
- 160 | non_empty_parameter_list ',' optional_class_type '&' . "variable (T_VARIABLE)" '=' static_scalar
+ 160 new_else_single: "else (T_ELSE)" . ':' inner_statement_list
- "variable (T_VARIABLE)" shift, and go to state 856
+ ':' shift, and go to state 857
state 812
- 158 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" .
- 161 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" . '=' static_scalar
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single . "endif (T_ENDIF)" ';'
- '=' shift, and go to state 857
-
- $default reduce using rule 158 (non_empty_parameter_list)
+ "endif (T_ENDIF)" shift, and go to state 858
state 813
- 156 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 858
- static_class_constant go to state 471
+ 153 elseif_list: elseif_list "elseif (T_ELSEIF)" parenthesis_expr . $@37 statement
+
+ $default reduce using rule 152 ($@37)
+
+ $@37 go to state 859
state 814
- 157 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" '=' static_scalar .
+ 158 else_single: "else (T_ELSE)" statement .
- $default reduce using rule 157 (non_empty_parameter_list)
+ $default reduce using rule 158 (else_single)
state 815
- 439 method: '(' @68 function_call_parameter_list . ')'
+ 150 while_statement: ':' inner_statement_list "endwhile (T_ENDWHILE)" ';' .
- ')' shift, and go to state 859
+ $default reduce using rule 150 (while_statement)
state 816
- 436 array_method_dereference: array_method_dereference '[' dim_offset . ']'
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' $@14 . for_expr ')' $@15 for_statement
- ']' shift, and go to state 860
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 121
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "function (T_FUNCTION)" shift, and go to state 48
+ "static (T_STATIC)" shift, and go to state 123
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ $default reduce using rule 244 (for_expr)
+
+ namespace_name go to state 84
+ for_expr go to state 860
+ non_empty_for_expr go to state 331
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 332
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 817
- 437 array_method_dereference: method '[' dim_offset . ']'
-
- ']' shift, and go to state 861
+ 129 foreach_variable: "list (T_LIST)" '(' $@34 . assignment_list ')'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "variable (T_VARIABLE)" shift, and go to state 35
+ "static (T_STATIC)" shift, and go to state 147
+ "list (T_LIST)" shift, and go to state 519
+ "namespace (T_NAMESPACE)" shift, and go to state 148
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 149
+ '$' shift, and go to state 81
+
+ $default reduce using rule 501 (assignment_list_element)
+
+ namespace_name go to state 150
+ function_call go to state 101
+ class_name go to state 151
+ variable go to state 520
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 154
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ assignment_list go to state 861
+ assignment_list_element go to state 522
state 818
- 432 variable_properties: variable_properties variable_property .
+ 125 foreach_optional_arg: "=> (T_DOUBLE_ARROW)" foreach_variable .
- $default reduce using rule 432 (variable_properties)
+ $default reduce using rule 125 (foreach_optional_arg)
state 819
- 374 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" object_property .
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' . $@20 foreach_statement
- $default reduce using rule 374 (dynamic_class_name_variable_property)
+ $default reduce using rule 72 ($@20)
+ $@20 go to state 862
-state 820
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list . new_else_single "endif (T_ENDIF)" ';'
- 147 new_elseif_list: new_elseif_list . "elseif (T_ELSEIF)" '(' expr ')' ':' @35 inner_statement_list
+state 820
- "elseif (T_ELSEIF)" shift, and go to state 862
- "else (T_ELSE)" shift, and go to state 863
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' . $@18 foreach_statement
- $default reduce using rule 150 (new_else_single)
+ $default reduce using rule 69 ($@18)
- new_else_single go to state 864
+ $@18 go to state 863
state 821
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" . '(' expr ')' @34 statement
+ 137 declare_list: declare_list ',' "identifier (T_STRING)" '=' static_scalar .
- '(' shift, and go to state 865
+ $default reduce using rule 137 (declare_list)
state 822
- 149 else_single: "else (T_ELSE)" . statement
+ 135 declare_statement: ':' inner_statement_list "enddeclare (T_ENDDECLARE)" . ';'
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 866
- unticked_statement go to state 87
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ ';' shift, and go to state 864
state 823
- 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 elseif_list else_single .
+ 141 switch_case_list: ':' ';' case_list "endswitch (T_ENDSWITCH)" ';' .
- $default reduce using rule 38 (unticked_statement)
+ $default reduce using rule 141 (switch_case_list)
state 824
- 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr ')' ';' .
+ 144 case_list: case_list "case (T_CASE)" expr case_separator . $@35 inner_statement_list
- $default reduce using rule 47 (unticked_statement)
+ $default reduce using rule 143 ($@35)
+
+ $@35 go to state 865
state 825
- 141 while_statement: ':' inner_statement_list "endwhile (T_ENDWHILE)" . ';'
+ 146 case_list: case_list "default (T_DEFAULT)" case_separator $@36 . inner_statement_list
- ';' shift, and go to state 867
+ $default reduce using rule 28 (inner_statement_list)
+ inner_statement_list go to state 866
-state 826
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr . ')' @15 for_statement
+state 826
- ')' shift, and go to state 868
+ 439 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 867
+ static_class_constant go to state 502
state 827
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 . foreach_statement
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 . fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- ':' shift, and go to state 869
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 870
- unticked_statement go to state 87
- foreach_statement go to state 871
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ namespace_name go to state 549
+ fully_qualified_class_name go to state 868
state 828
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 . foreach_statement
+ 90 finally_statement: "finally (T_FINALLY)" . $@28 '{' inner_statement_list '}'
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- ':' shift, and go to state 869
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 870
- unticked_statement go to state 87
- foreach_statement go to state 872
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 89 ($@28)
+
+ $@28 go to state 869
state 829
- 126 declare_statement: ':' inner_statement_list "enddeclare (T_ENDDECLARE)" ';' .
+ 79 unticked_statement: "try (T_TRY)" $@22 '{' inner_statement_list '}' catch_statement $@23 finally_statement .
- $default reduce using rule 126 (declare_statement)
+ $default reduce using rule 79 (unticked_statement)
state 830
- 132 switch_case_list: ':' ';' case_list "endswitch (T_ENDSWITCH)" . ';'
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list ')' lexical_vars . '{' inner_statement_list '}'
- ';' shift, and go to state 873
+ '{' shift, and go to state 870
state 831
- 131 switch_case_list: ':' case_list "endswitch (T_ENDSWITCH)" ';' .
+ 500 assignment_list_element: "list (T_LIST)" '(' $@74 assignment_list ')' .
- $default reduce using rule 131 (switch_case_list)
+ $default reduce using rule 500 (assignment_list_element)
state 832
- 135 case_list: case_list "case (T_CASE)" expr . case_separator @32 inner_statement_list
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- ':' shift, and go to state 833
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ';' shift, and go to state 834
-
- case_separator go to state 874
+ 252 chaining_dereference: '[' dim_offset ']' .
+
+ $default reduce using rule 252 (chaining_dereference)
state 833
- 138 case_separator: ':' .
+ 457 variable_property: "-> (T_OBJECT_OPERATOR)" object_property $@70 . method_or_not
- $default reduce using rule 138 (case_separator)
+ '(' reduce using rule 460 (@71)
+ $default reduce using rule 464 (method_or_not)
+
+ array_method_dereference go to state 730
+ method go to state 731
+ @71 go to state 732
+ method_or_not go to state 871
state 834
- 139 case_separator: ';' .
+ 251 chaining_dereference: chaining_dereference '[' dim_offset . ']'
- $default reduce using rule 139 (case_separator)
+ ']' shift, and go to state 872
state 835
- 137 case_list: case_list "default (T_DEFAULT)" case_separator . @33 inner_statement_list
+ 249 chaining_method_or_property: chaining_method_or_property . variable_property
+ 254 chaining_instance_call: chaining_dereference $@42 chaining_method_or_property .
+
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 709
- $default reduce using rule 136 (@33)
+ $default reduce using rule 254 (chaining_instance_call)
- @33 go to state 875
+ variable_property go to state 770
state 836
- 130 switch_case_list: '{' ';' case_list '}' .
+ 108 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from $@32 implements_list '{' class_statement_list '}' .
- $default reduce using rule 130 (switch_case_list)
+ $default reduce using rule 108 (unticked_class_declaration_statement)
state 837
- 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar .
+ 241 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" . '=' static_scalar
- $default reduce using rule 419 (non_empty_static_array_pair_list)
+ '=' shift, and go to state 873
state 838
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name . @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 201 trait_use_statement: "use (T_USE)" trait_list . trait_adaptations
+ 203 trait_list: trait_list . ',' fully_qualified_class_name
- $default reduce using rule 78 (@24)
+ ',' shift, and go to state 874
+ ';' shift, and go to state 875
+ '{' shift, and go to state 876
- @24 go to state 876
+ trait_adaptations go to state 877
state 839
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' . inner_statement_list '}'
+ 202 trait_list: fully_qualified_class_name .
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 877
+ $default reduce using rule 202 (trait_list)
state 840
- 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property @67 method_or_not .
+ 196 class_statement: variable_modifiers $@39 . class_variable_declaration ';'
+
+ "variable (T_VARIABLE)" shift, and go to state 878
- $default reduce using rule 435 (variable_property)
+ class_variable_declaration go to state 879
state 841
- 241 chaining_dereference: chaining_dereference '[' dim_offset ']' .
+ 200 class_statement: method_modifiers function . is_reference "identifier (T_STRING)" $@40 '(' parameter_list ')' method_body
- $default reduce using rule 241 (chaining_dereference)
+ '&' shift, and go to state 247
+
+ $default reduce using rule 103 (is_reference)
+
+ is_reference go to state 880
state 842
- 231 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 878
- static_class_constant go to state 471
+ 229 non_empty_member_modifiers: non_empty_member_modifiers member_modifier .
+ $default reduce using rule 229 (non_empty_member_modifiers)
-state 843
- 193 trait_list: trait_list ',' . fully_qualified_class_name
+state 843
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ 240 class_constant_declaration: class_constant_declaration ',' . "identifier (T_STRING)" '=' static_scalar
- namespace_name go to state 516
- fully_qualified_class_name go to state 879
+ "identifier (T_STRING)" shift, and go to state 881
state 844
- 194 trait_adaptations: ';' .
+ 197 class_statement: class_constant_declaration ';' .
- $default reduce using rule 194 (trait_adaptations)
+ $default reduce using rule 197 (class_statement)
state 845
- 195 trait_adaptations: '{' . trait_adaptation_list '}'
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' parameter_list ')' '{' . inner_statement_list '}'
- "identifier (T_STRING)" shift, and go to state 880
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
-
- $default reduce using rule 196 (trait_adaptation_list)
+ $default reduce using rule 28 (inner_statement_list)
- namespace_name go to state 516
- trait_adaptation_list go to state 881
- non_empty_trait_adaptation_list go to state 882
- trait_adaptation_statement go to state 883
- trait_precedence go to state 884
- trait_method_reference go to state 885
- trait_method_reference_fully_qualified go to state 886
- trait_alias go to state 887
- fully_qualified_class_name go to state 888
+ inner_statement_list go to state 882
state 846
- 191 trait_use_statement: "use (T_USE)" trait_list trait_adaptations .
+ 358 lexical_vars: "use (T_USE)" '(' . lexical_var_list ')'
- $default reduce using rule 191 (trait_use_statement)
+ '&' shift, and go to state 883
+ "variable (T_VARIABLE)" shift, and go to state 884
+
+ lexical_var_list go to state 885
state 847
- 228 class_variable_declaration: "variable (T_VARIABLE)" .
- 229 | "variable (T_VARIABLE)" . '=' static_scalar
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list ')' lexical_vars '{' . inner_statement_list '}'
- '=' shift, and go to state 889
+ $default reduce using rule 28 (inner_statement_list)
- $default reduce using rule 228 (class_variable_declaration)
+ inner_statement_list go to state 886
state 848
- 186 class_statement: variable_modifiers @36 class_variable_declaration . ';'
- 226 class_variable_declaration: class_variable_declaration . ',' "variable (T_VARIABLE)"
- 227 | class_variable_declaration . ',' "variable (T_VARIABLE)" '=' static_scalar
+ 168 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' . "variable (T_VARIABLE)"
+ 169 | non_empty_parameter_list ',' optional_class_type '&' . "variable (T_VARIABLE)" '=' static_scalar
- ',' shift, and go to state 890
- ';' shift, and go to state 891
+ "variable (T_VARIABLE)" shift, and go to state 887
state 849
- 190 class_statement: method_modifiers function is_reference . "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
+ 167 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" .
+ 170 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" . '=' static_scalar
- "identifier (T_STRING)" shift, and go to state 892
+ '=' shift, and go to state 888
+ $default reduce using rule 167 (non_empty_parameter_list)
-state 850
- 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" . '=' static_scalar
+state 850
- '=' shift, and go to state 893
+ 165 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 889
+ static_class_constant go to state 502
state 851
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list . '}'
-
- '}' shift, and go to state 894
-
- $default reduce using rule 26 (@4)
+ 166 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" '=' static_scalar .
- @4 go to state 366
+ $default reduce using rule 166 (non_empty_parameter_list)
state 852
- 342 lexical_var_list: '&' . "variable (T_VARIABLE)"
+ 458 array_method_dereference: array_method_dereference '[' dim_offset . ']'
- "variable (T_VARIABLE)" shift, and go to state 895
+ ']' shift, and go to state 890
state 853
- 341 lexical_var_list: "variable (T_VARIABLE)" .
+ 459 array_method_dereference: method '[' dim_offset . ']'
- $default reduce using rule 341 (lexical_var_list)
+ ']' shift, and go to state 891
state 854
- 338 lexical_vars: "use (T_USE)" '(' lexical_var_list . ')'
- 339 lexical_var_list: lexical_var_list . ',' "variable (T_VARIABLE)"
- 340 | lexical_var_list . ',' '&' "variable (T_VARIABLE)"
+ 454 variable_properties: variable_properties variable_property .
- ',' shift, and go to state 896
- ')' shift, and go to state 897
+ $default reduce using rule 454 (variable_properties)
state 855
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list . '}'
-
- '}' shift, and go to state 898
-
- $default reduce using rule 26 (@4)
+ 394 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" object_property .
- @4 go to state 366
+ $default reduce using rule 394 (dynamic_class_name_variable_property)
state 856
- 159 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" .
- 160 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" . '=' static_scalar
+ 156 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" parenthesis_expr . ':' $@38 inner_statement_list
- '=' shift, and go to state 899
-
- $default reduce using rule 159 (non_empty_parameter_list)
+ ':' shift, and go to state 892
state 857
- 161 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 900
- static_class_constant go to state 471
+ 160 new_else_single: "else (T_ELSE)" ':' . inner_statement_list
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 893
state 858
- 156 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar .
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" . ';'
- $default reduce using rule 156 (non_empty_parameter_list)
+ ';' shift, and go to state 894
state 859
- 439 method: '(' @68 function_call_parameter_list ')' .
+ 153 elseif_list: elseif_list "elseif (T_ELSEIF)" parenthesis_expr $@37 . statement
- $default reduce using rule 439 (method)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 895
+ unticked_statement go to state 88
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 860
- 436 array_method_dereference: array_method_dereference '[' dim_offset ']' .
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' $@14 for_expr . ')' $@15 for_statement
- $default reduce using rule 436 (array_method_dereference)
+ ')' shift, and go to state 896
state 861
- 437 array_method_dereference: method '[' dim_offset ']' .
+ 129 foreach_variable: "list (T_LIST)" '(' $@34 assignment_list . ')'
+ 496 assignment_list: assignment_list . ',' assignment_list_element
- $default reduce using rule 437 (array_method_dereference)
+ ',' shift, and go to state 620
+ ')' shift, and go to state 897
state 862
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" . '(' expr ')' ':' @35 inner_statement_list
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' $@20 . foreach_statement
- '(' shift, and go to state 901
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ ':' shift, and go to state 898
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 899
+ unticked_statement go to state 88
+ foreach_statement go to state 900
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 863
- 151 new_else_single: "else (T_ELSE)" . ':' inner_statement_list
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' $@18 . foreach_statement
- ':' shift, and go to state 902
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ ':' shift, and go to state 898
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 899
+ unticked_statement go to state 88
+ foreach_statement go to state 901
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 864
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single . "endif (T_ENDIF)" ';'
+ 135 declare_statement: ':' inner_statement_list "enddeclare (T_ENDDECLARE)" ';' .
- "endif (T_ENDIF)" shift, and go to state 903
+ $default reduce using rule 135 (declare_statement)
state 865
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' . expr ')' @34 statement
+ 144 case_list: case_list "case (T_CASE)" expr case_separator $@35 . inner_statement_list
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 904
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 902
state 866
- 149 else_single: "else (T_ELSE)" statement .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 146 case_list: case_list "default (T_DEFAULT)" case_separator $@36 inner_statement_list .
+
+ "endswitch (T_ENDSWITCH)" reduce using rule 146 (case_list)
+ "case (T_CASE)" reduce using rule 146 (case_list)
+ "default (T_DEFAULT)" reduce using rule 146 (case_list)
+ '}' reduce using rule 146 (case_list)
+ $default reduce using rule 26 ($@4)
- $default reduce using rule 149 (else_single)
+ $@4 go to state 389
state 867
- 141 while_statement: ':' inner_statement_list "endwhile (T_ENDWHILE)" ';' .
+ 439 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar .
- $default reduce using rule 141 (while_statement)
+ $default reduce using rule 439 (non_empty_static_array_pair_list)
state 868
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' . @15 for_statement
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name . $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
- $default reduce using rule 50 (@15)
+ $default reduce using rule 84 ($@25)
- @15 go to state 905
+ $@25 go to state 903
state 869
- 124 foreach_statement: ':' . inner_statement_list "endforeach (T_ENDFOREACH)" ';'
+ 90 finally_statement: "finally (T_FINALLY)" $@28 . '{' inner_statement_list '}'
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 906
+ '{' shift, and go to state 904
state 870
- 123 foreach_statement: statement .
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list ')' lexical_vars '{' . inner_statement_list '}'
- $default reduce using rule 123 (foreach_statement)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 905
state 871
- 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement .
+ 457 variable_property: "-> (T_OBJECT_OPERATOR)" object_property $@70 method_or_not .
- $default reduce using rule 72 (unticked_statement)
+ $default reduce using rule 457 (variable_property)
state 872
- 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement .
+ 251 chaining_dereference: chaining_dereference '[' dim_offset ']' .
- $default reduce using rule 69 (unticked_statement)
+ $default reduce using rule 251 (chaining_dereference)
state 873
- 132 switch_case_list: ':' ';' case_list "endswitch (T_ENDSWITCH)" ';' .
-
- $default reduce using rule 132 (switch_case_list)
+ 241 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 906
+ static_class_constant go to state 502
state 874
- 135 case_list: case_list "case (T_CASE)" expr case_separator . @32 inner_statement_list
+ 203 trait_list: trait_list ',' . fully_qualified_class_name
- $default reduce using rule 134 (@32)
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
- @32 go to state 907
+ namespace_name go to state 549
+ fully_qualified_class_name go to state 907
state 875
- 137 case_list: case_list "default (T_DEFAULT)" case_separator @33 . inner_statement_list
-
- $default reduce using rule 28 (inner_statement_list)
+ 204 trait_adaptations: ';' .
- inner_statement_list go to state 908
+ $default reduce using rule 204 (trait_adaptations)
state 876
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 . "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 205 trait_adaptations: '{' . trait_adaptation_list '}'
- "variable (T_VARIABLE)" shift, and go to state 909
+ "identifier (T_STRING)" shift, and go to state 908
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+ $default reduce using rule 206 (trait_adaptation_list)
-state 877
+ namespace_name go to state 549
+ trait_adaptation_list go to state 909
+ non_empty_trait_adaptation_list go to state 910
+ trait_adaptation_statement go to state 911
+ trait_precedence go to state 912
+ trait_method_reference go to state 913
+ trait_method_reference_fully_qualified go to state 914
+ trait_alias go to state 915
+ fully_qualified_class_name go to state 916
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list . '}'
- '}' shift, and go to state 910
+state 877
- $default reduce using rule 26 (@4)
+ 201 trait_use_statement: "use (T_USE)" trait_list trait_adaptations .
- @4 go to state 366
+ $default reduce using rule 201 (trait_use_statement)
state 878
- 231 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar .
+ 238 class_variable_declaration: "variable (T_VARIABLE)" .
+ 239 | "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 231 (class_constant_declaration)
+ '=' shift, and go to state 917
+
+ $default reduce using rule 238 (class_variable_declaration)
state 879
- 193 trait_list: trait_list ',' fully_qualified_class_name .
+ 196 class_statement: variable_modifiers $@39 class_variable_declaration . ';'
+ 236 class_variable_declaration: class_variable_declaration . ',' "variable (T_VARIABLE)"
+ 237 | class_variable_declaration . ',' "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 193 (trait_list)
+ ',' shift, and go to state 918
+ ';' shift, and go to state 919
state 880
- 5 namespace_name: "identifier (T_STRING)" .
- 205 trait_method_reference: "identifier (T_STRING)" .
+ 200 class_statement: method_modifiers function is_reference . "identifier (T_STRING)" $@40 '(' parameter_list ')' method_body
- "as (T_AS)" reduce using rule 205 (trait_method_reference)
- $default reduce using rule 5 (namespace_name)
+ "identifier (T_STRING)" shift, and go to state 920
state 881
- 195 trait_adaptations: '{' trait_adaptation_list . '}'
+ 240 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" . '=' static_scalar
- '}' shift, and go to state 911
+ '=' shift, and go to state 921
state 882
- 197 trait_adaptation_list: non_empty_trait_adaptation_list .
- 199 non_empty_trait_adaptation_list: non_empty_trait_adaptation_list . trait_adaptation_statement
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' parameter_list ')' '{' inner_statement_list . '}'
- "identifier (T_STRING)" shift, and go to state 880
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ '}' shift, and go to state 922
- $default reduce using rule 197 (trait_adaptation_list)
+ $default reduce using rule 26 ($@4)
- namespace_name go to state 516
- trait_adaptation_statement go to state 912
- trait_precedence go to state 884
- trait_method_reference go to state 885
- trait_method_reference_fully_qualified go to state 886
- trait_alias go to state 887
- fully_qualified_class_name go to state 888
+ $@4 go to state 389
state 883
- 198 non_empty_trait_adaptation_list: trait_adaptation_statement .
+ 362 lexical_var_list: '&' . "variable (T_VARIABLE)"
- $default reduce using rule 198 (non_empty_trait_adaptation_list)
+ "variable (T_VARIABLE)" shift, and go to state 923
state 884
- 200 trait_adaptation_statement: trait_precedence . ';'
+ 361 lexical_var_list: "variable (T_VARIABLE)" .
- ';' shift, and go to state 913
+ $default reduce using rule 361 (lexical_var_list)
state 885
- 208 trait_alias: trait_method_reference . "as (T_AS)" trait_modifiers "identifier (T_STRING)"
- 209 | trait_method_reference . "as (T_AS)" member_modifier
+ 358 lexical_vars: "use (T_USE)" '(' lexical_var_list . ')'
+ 359 lexical_var_list: lexical_var_list . ',' "variable (T_VARIABLE)"
+ 360 | lexical_var_list . ',' '&' "variable (T_VARIABLE)"
- "as (T_AS)" shift, and go to state 914
+ ',' shift, and go to state 924
+ ')' shift, and go to state 925
state 886
- 202 trait_precedence: trait_method_reference_fully_qualified . "insteadof (T_INSTEADOF)" trait_reference_list
- 206 trait_method_reference: trait_method_reference_fully_qualified .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list . '}'
- "insteadof (T_INSTEADOF)" shift, and go to state 915
+ '}' shift, and go to state 926
- $default reduce using rule 206 (trait_method_reference)
+ $default reduce using rule 26 ($@4)
+
+ $@4 go to state 389
state 887
- 201 trait_adaptation_statement: trait_alias . ';'
+ 168 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" .
+ 169 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" . '=' static_scalar
- ';' shift, and go to state 916
+ '=' shift, and go to state 927
+ $default reduce using rule 168 (non_empty_parameter_list)
-state 888
- 207 trait_method_reference_fully_qualified: fully_qualified_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+state 888
- ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 917
+ 170 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 928
+ static_class_constant go to state 502
state 889
- 229 class_variable_declaration: "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 918
- static_class_constant go to state 471
+ 165 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar .
+
+ $default reduce using rule 165 (non_empty_parameter_list)
state 890
- 226 class_variable_declaration: class_variable_declaration ',' . "variable (T_VARIABLE)"
- 227 | class_variable_declaration ',' . "variable (T_VARIABLE)" '=' static_scalar
+ 458 array_method_dereference: array_method_dereference '[' dim_offset ']' .
- "variable (T_VARIABLE)" shift, and go to state 919
+ $default reduce using rule 458 (array_method_dereference)
state 891
- 186 class_statement: variable_modifiers @36 class_variable_declaration ';' .
+ 459 array_method_dereference: method '[' dim_offset ']' .
- $default reduce using rule 186 (class_statement)
+ $default reduce using rule 459 (array_method_dereference)
state 892
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" . @37 '(' parameter_list ')' method_body
+ 156 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" parenthesis_expr ':' . $@38 inner_statement_list
- $default reduce using rule 189 (@37)
+ $default reduce using rule 155 ($@38)
- @37 go to state 920
+ $@38 go to state 929
state 893
- 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 921
- static_class_constant go to state 471
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 160 new_else_single: "else (T_ELSE)" ':' inner_statement_list .
+
+ "endif (T_ENDIF)" reduce using rule 160 (new_else_single)
+ $default reduce using rule 26 ($@4)
+
+ $@4 go to state 389
state 894
- 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}' .
+ 41 unticked_statement: "if (T_IF)" parenthesis_expr ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single "endif (T_ENDIF)" ';' .
- $default reduce using rule 99 (unticked_function_declaration_statement)
+ $default reduce using rule 41 (unticked_statement)
state 895
- 342 lexical_var_list: '&' "variable (T_VARIABLE)" .
+ 153 elseif_list: elseif_list "elseif (T_ELSEIF)" parenthesis_expr $@37 statement .
- $default reduce using rule 342 (lexical_var_list)
+ $default reduce using rule 153 (elseif_list)
state 896
- 339 lexical_var_list: lexical_var_list ',' . "variable (T_VARIABLE)"
- 340 | lexical_var_list ',' . '&' "variable (T_VARIABLE)"
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' . $@15 for_statement
- '&' shift, and go to state 922
- "variable (T_VARIABLE)" shift, and go to state 923
+ $default reduce using rule 50 ($@15)
+
+ $@15 go to state 930
state 897
- 338 lexical_vars: "use (T_USE)" '(' lexical_var_list ')' .
+ 129 foreach_variable: "list (T_LIST)" '(' $@34 assignment_list ')' .
- $default reduce using rule 338 (lexical_vars)
+ $default reduce using rule 129 (foreach_variable)
state 898
- 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}' .
+ 133 foreach_statement: ':' . inner_statement_list "endforeach (T_ENDFOREACH)" ';'
- $default reduce using rule 333 (expr_without_variable)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 931
state 899
- 160 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 924
- static_class_constant go to state 471
+ 132 foreach_statement: statement .
+
+ $default reduce using rule 132 (foreach_statement)
state 900
- 161 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar .
+ 73 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" $@19 foreach_variable foreach_optional_arg ')' $@20 foreach_statement .
- $default reduce using rule 161 (non_empty_parameter_list)
+ $default reduce using rule 73 (unticked_statement)
state 901
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' . expr ')' ':' @35 inner_statement_list
+ 70 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement .
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "function (T_FUNCTION)" shift, and go to state 47
- "static (T_STATIC)" shift, and go to state 117
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 925
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ $default reduce using rule 70 (unticked_statement)
state 902
- 151 new_else_single: "else (T_ELSE)" ':' . inner_statement_list
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 144 case_list: case_list "case (T_CASE)" expr case_separator $@35 inner_statement_list .
- $default reduce using rule 28 (inner_statement_list)
+ "endswitch (T_ENDSWITCH)" reduce using rule 144 (case_list)
+ "case (T_CASE)" reduce using rule 144 (case_list)
+ "default (T_DEFAULT)" reduce using rule 144 (case_list)
+ '}' reduce using rule 144 (case_list)
+ $default reduce using rule 26 ($@4)
- inner_statement_list go to state 926
+ $@4 go to state 389
state 903
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" . ';'
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 . "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
- ';' shift, and go to state 927
+ "variable (T_VARIABLE)" shift, and go to state 932
state 904
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr . ')' @34 statement
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 928
+ 90 finally_statement: "finally (T_FINALLY)" $@28 '{' . inner_statement_list '}'
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 933
state 905
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 . for_statement
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list . '}'
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- ':' shift, and go to state 929
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 930
- unticked_statement go to state 87
- for_statement go to state 931
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ '}' shift, and go to state 934
+ $default reduce using rule 26 ($@4)
-state 906
+ $@4 go to state 389
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 124 foreach_statement: ':' inner_statement_list . "endforeach (T_ENDFOREACH)" ';'
- "endforeach (T_ENDFOREACH)" shift, and go to state 932
+state 906
- $default reduce using rule 26 (@4)
+ 241 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar .
- @4 go to state 366
+ $default reduce using rule 241 (class_constant_declaration)
state 907
- 135 case_list: case_list "case (T_CASE)" expr case_separator @32 . inner_statement_list
+ 203 trait_list: trait_list ',' fully_qualified_class_name .
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 933
+ $default reduce using rule 203 (trait_list)
state 908
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 137 case_list: case_list "default (T_DEFAULT)" case_separator @33 inner_statement_list .
-
- "endswitch (T_ENDSWITCH)" reduce using rule 137 (case_list)
- "case (T_CASE)" reduce using rule 137 (case_list)
- "default (T_DEFAULT)" reduce using rule 137 (case_list)
- '}' reduce using rule 137 (case_list)
- $default reduce using rule 26 (@4)
+ 5 namespace_name: "identifier (T_STRING)" .
+ 215 trait_method_reference: "identifier (T_STRING)" .
- @4 go to state 366
+ "as (T_AS)" reduce using rule 215 (trait_method_reference)
+ $default reduce using rule 5 (namespace_name)
state 909
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" . ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 205 trait_adaptations: '{' trait_adaptation_list . '}'
- ')' shift, and go to state 934
+ '}' shift, and go to state 935
state 910
- 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}' .
+ 207 trait_adaptation_list: non_empty_trait_adaptation_list .
+ 209 non_empty_trait_adaptation_list: non_empty_trait_adaptation_list . trait_adaptation_statement
+
+ "identifier (T_STRING)" shift, and go to state 908
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ $default reduce using rule 207 (trait_adaptation_list)
- $default reduce using rule 335 (expr_without_variable)
+ namespace_name go to state 549
+ trait_adaptation_statement go to state 936
+ trait_precedence go to state 912
+ trait_method_reference go to state 913
+ trait_method_reference_fully_qualified go to state 914
+ trait_alias go to state 915
+ fully_qualified_class_name go to state 916
state 911
- 195 trait_adaptations: '{' trait_adaptation_list '}' .
+ 208 non_empty_trait_adaptation_list: trait_adaptation_statement .
- $default reduce using rule 195 (trait_adaptations)
+ $default reduce using rule 208 (non_empty_trait_adaptation_list)
state 912
- 199 non_empty_trait_adaptation_list: non_empty_trait_adaptation_list trait_adaptation_statement .
+ 210 trait_adaptation_statement: trait_precedence . ';'
- $default reduce using rule 199 (non_empty_trait_adaptation_list)
+ ';' shift, and go to state 937
state 913
- 200 trait_adaptation_statement: trait_precedence ';' .
+ 218 trait_alias: trait_method_reference . "as (T_AS)" trait_modifiers "identifier (T_STRING)"
+ 219 | trait_method_reference . "as (T_AS)" member_modifier
- $default reduce using rule 200 (trait_adaptation_statement)
+ "as (T_AS)" shift, and go to state 938
state 914
- 208 trait_alias: trait_method_reference "as (T_AS)" . trait_modifiers "identifier (T_STRING)"
- 209 | trait_method_reference "as (T_AS)" . member_modifier
+ 212 trait_precedence: trait_method_reference_fully_qualified . "insteadof (T_INSTEADOF)" trait_reference_list
+ 216 trait_method_reference: trait_method_reference_fully_qualified .
- "public (T_PUBLIC)" shift, and go to state 740
- "protected (T_PROTECTED)" shift, and go to state 741
- "private (T_PRIVATE)" shift, and go to state 742
- "final (T_FINAL)" shift, and go to state 743
- "abstract (T_ABSTRACT)" shift, and go to state 744
- "static (T_STATIC)" shift, and go to state 745
+ "insteadof (T_INSTEADOF)" shift, and go to state 939
- $default reduce using rule 210 (trait_modifiers)
-
- trait_modifiers go to state 935
- member_modifier go to state 936
+ $default reduce using rule 216 (trait_method_reference)
state 915
- 202 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" . trait_reference_list
-
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ 211 trait_adaptation_statement: trait_alias . ';'
- namespace_name go to state 516
- trait_reference_list go to state 937
- fully_qualified_class_name go to state 938
+ ';' shift, and go to state 940
state 916
- 201 trait_adaptation_statement: trait_alias ';' .
+ 217 trait_method_reference_fully_qualified: fully_qualified_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 201 (trait_adaptation_statement)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 941
state 917
- 207 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
-
- "identifier (T_STRING)" shift, and go to state 939
+ 239 class_variable_declaration: "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 942
+ static_class_constant go to state 502
state 918
- 229 class_variable_declaration: "variable (T_VARIABLE)" '=' static_scalar .
+ 236 class_variable_declaration: class_variable_declaration ',' . "variable (T_VARIABLE)"
+ 237 | class_variable_declaration ',' . "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 229 (class_variable_declaration)
+ "variable (T_VARIABLE)" shift, and go to state 943
state 919
- 226 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" .
- 227 | class_variable_declaration ',' "variable (T_VARIABLE)" . '=' static_scalar
-
- '=' shift, and go to state 940
+ 196 class_statement: variable_modifiers $@39 class_variable_declaration ';' .
- $default reduce using rule 226 (class_variable_declaration)
+ $default reduce using rule 196 (class_statement)
state 920
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 . '(' parameter_list ')' method_body
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" . $@40 '(' parameter_list ')' method_body
- '(' shift, and go to state 941
+ $default reduce using rule 199 ($@40)
+ $@40 go to state 944
-state 921
- 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' static_scalar .
+state 921
- $default reduce using rule 230 (class_constant_declaration)
+ 240 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 945
+ static_class_constant go to state 502
state 922
- 340 lexical_var_list: lexical_var_list ',' '&' . "variable (T_VARIABLE)"
+ 106 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" $@31 '(' parameter_list ')' '{' inner_statement_list '}' .
- "variable (T_VARIABLE)" shift, and go to state 942
+ $default reduce using rule 106 (unticked_function_declaration_statement)
state 923
- 339 lexical_var_list: lexical_var_list ',' "variable (T_VARIABLE)" .
+ 362 lexical_var_list: '&' "variable (T_VARIABLE)" .
- $default reduce using rule 339 (lexical_var_list)
+ $default reduce using rule 362 (lexical_var_list)
state 924
- 160 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar .
+ 359 lexical_var_list: lexical_var_list ',' . "variable (T_VARIABLE)"
+ 360 | lexical_var_list ',' . '&' "variable (T_VARIABLE)"
- $default reduce using rule 160 (non_empty_parameter_list)
+ '&' shift, and go to state 946
+ "variable (T_VARIABLE)" shift, and go to state 947
state 925
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr . ')' ':' @35 inner_statement_list
- 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
- 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
- 279 | expr . "or (T_LOGICAL_OR)" @46 expr
- 281 | expr . "and (T_LOGICAL_AND)" @47 expr
- 282 | expr . "xor (T_LOGICAL_XOR)" expr
- 283 | expr . '|' expr
- 284 | expr . '&' expr
- 285 | expr . '^' expr
- 286 | expr . '.' expr
- 287 | expr . '+' expr
- 288 | expr . '-' expr
- 289 | expr . '*' expr
- 290 | expr . '/' expr
- 291 | expr . '%' expr
- 292 | expr . "<< (T_SL)" expr
- 293 | expr . ">> (T_SR)" expr
- 298 | expr . "=== (T_IS_IDENTICAL)" expr
- 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
- 300 | expr . "== (T_IS_EQUAL)" expr
- 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
- 302 | expr . '<' expr
- 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
- 304 | expr . '>' expr
- 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
- 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
- 313 | expr . '?' @49 expr ':' @50 expr
- 315 | expr . '?' ':' @51 expr
-
- "or (T_LOGICAL_OR)" shift, and go to state 235
- "xor (T_LOGICAL_XOR)" shift, and go to state 236
- "and (T_LOGICAL_AND)" shift, and go to state 237
- '?' shift, and go to state 238
- "|| (T_BOOLEAN_OR)" shift, and go to state 239
- "&& (T_BOOLEAN_AND)" shift, and go to state 240
- '|' shift, and go to state 241
- '^' shift, and go to state 242
- '&' shift, and go to state 243
- "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
- "=== (T_IS_IDENTICAL)" shift, and go to state 245
- "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
- "== (T_IS_EQUAL)" shift, and go to state 247
- '<' shift, and go to state 248
- '>' shift, and go to state 249
- ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
- "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
- ">> (T_SR)" shift, and go to state 252
- "<< (T_SL)" shift, and go to state 253
- '+' shift, and go to state 254
- '-' shift, and go to state 255
- '.' shift, and go to state 256
- '*' shift, and go to state 257
- '/' shift, and go to state 258
- '%' shift, and go to state 259
- "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ')' shift, and go to state 943
+ 358 lexical_vars: "use (T_USE)" '(' lexical_var_list ')' .
+ $default reduce using rule 358 (lexical_vars)
-state 926
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 151 new_else_single: "else (T_ELSE)" ':' inner_statement_list .
+state 926
- "endif (T_ENDIF)" reduce using rule 151 (new_else_single)
- $default reduce using rule 26 (@4)
+ 344 expr_without_variable: function is_reference @56 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}' .
- @4 go to state 366
+ $default reduce using rule 344 (expr_without_variable)
state 927
- 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';' .
-
- $default reduce using rule 41 (unticked_statement)
+ 169 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 948
+ static_class_constant go to state 502
state 928
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' . @34 statement
+ 170 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar .
- $default reduce using rule 143 (@34)
-
- @34 go to state 944
+ $default reduce using rule 170 (non_empty_parameter_list)
state 929
- 122 for_statement: ':' . inner_statement_list "endfor (T_ENDFOR)" ';'
+ 156 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" parenthesis_expr ':' $@38 . inner_statement_list
$default reduce using rule 28 (inner_statement_list)
- inner_statement_list go to state 945
+ inner_statement_list go to state 949
state 930
- 121 for_statement: statement .
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 . for_statement
- $default reduce using rule 121 (for_statement)
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ "yield (T_YIELD)" shift, and go to state 11
+ ':' shift, and go to state 950
+ '+' shift, and go to state 12
+ '-' shift, and go to state 13
+ '!' shift, and go to state 14
+ '~' shift, and go to state 15
+ '@' shift, and go to state 16
+ "(unset) (T_UNSET_CAST)" shift, and go to state 17
+ "(bool) (T_BOOL_CAST)" shift, and go to state 18
+ "(object) (T_OBJECT_CAST)" shift, and go to state 19
+ "(array) (T_ARRAY_CAST)" shift, and go to state 20
+ "(string) (T_STRING_CAST)" shift, and go to state 21
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 22
+ "(int) (T_INT_CAST)" shift, and go to state 23
+ "-- (T_DEC)" shift, and go to state 24
+ "++ (T_INC)" shift, and go to state 25
+ '[' shift, and go to state 26
+ "clone (T_CLONE)" shift, and go to state 27
+ "new (T_NEW)" shift, and go to state 28
+ "exit (T_EXIT)" shift, and go to state 29
+ "if (T_IF)" shift, and go to state 30
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 33
+ "variable name (T_STRING_VARNAME)" shift, and go to state 34
+ "variable (T_VARIABLE)" shift, and go to state 35
+ T_INLINE_HTML shift, and go to state 36
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 37
+ "echo (T_ECHO)" shift, and go to state 38
+ "do (T_DO)" shift, and go to state 39
+ "while (T_WHILE)" shift, and go to state 40
+ "for (T_FOR)" shift, and go to state 41
+ "foreach (T_FOREACH)" shift, and go to state 42
+ "declare (T_DECLARE)" shift, and go to state 43
+ "switch (T_SWITCH)" shift, and go to state 44
+ "break (T_BREAK)" shift, and go to state 45
+ "continue (T_CONTINUE)" shift, and go to state 46
+ "goto (T_GOTO)" shift, and go to state 47
+ "function (T_FUNCTION)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 50
+ "try (T_TRY)" shift, and go to state 51
+ "throw (T_THROW)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 54
+ "static (T_STATIC)" shift, and go to state 57
+ "unset (T_UNSET)" shift, and go to state 58
+ "isset (T_ISSET)" shift, and go to state 59
+ "empty (T_EMPTY)" shift, and go to state 60
+ "list (T_LIST)" shift, and go to state 65
+ "array (T_ARRAY)" shift, and go to state 66
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 67
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 73
+ "namespace (T_NAMESPACE)" shift, and go to state 124
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 77
+ '(' shift, and go to state 78
+ ';' shift, and go to state 79
+ '{' shift, and go to state 80
+ '$' shift, and go to state 81
+ '`' shift, and go to state 82
+ '"' shift, and go to state 83
+
+ namespace_name go to state 84
+ statement go to state 951
+ unticked_statement go to state 88
+ for_statement go to state 952
+ new_expr go to state 95
+ expr_without_variable go to state 96
+ yield_expr go to state 97
+ combined_scalar_offset go to state 98
+ combined_scalar go to state 99
+ function go to state 125
+ function_call go to state 101
+ class_name go to state 102
+ common_scalar go to state 103
+ scalar go to state 104
+ expr go to state 105
+ parenthesis_expr go to state 106
+ r_variable go to state 107
+ rw_variable go to state 108
+ variable go to state 109
+ variable_without_objects go to state 110
+ static_member go to state 111
+ variable_class_name go to state 112
+ array_function_dereference go to state 113
+ base_variable_with_function_calls go to state 114
+ base_variable go to state 115
+ reference_variable go to state 116
+ compound_variable go to state 117
+ simple_indirect_reference go to state 118
+ internal_functions_in_yacc go to state 119
+ class_constant go to state 120
state 931
- 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 133 foreach_statement: ':' inner_statement_list . "endforeach (T_ENDFOREACH)" ';'
- $default reduce using rule 51 (unticked_statement)
+ "endforeach (T_ENDFOREACH)" shift, and go to state 953
+
+ $default reduce using rule 26 ($@4)
+
+ $@4 go to state 389
state 932
- 124 foreach_statement: ':' inner_statement_list "endforeach (T_ENDFOREACH)" . ';'
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" . ')' $@26 '{' inner_statement_list '}' $@27 additional_catches
- ';' shift, and go to state 946
+ ')' shift, and go to state 954
state 933
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 135 case_list: case_list "case (T_CASE)" expr case_separator @32 inner_statement_list .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 90 finally_statement: "finally (T_FINALLY)" $@28 '{' inner_statement_list . '}'
- "endswitch (T_ENDSWITCH)" reduce using rule 135 (case_list)
- "case (T_CASE)" reduce using rule 135 (case_list)
- "default (T_DEFAULT)" reduce using rule 135 (case_list)
- '}' reduce using rule 135 (case_list)
- $default reduce using rule 26 (@4)
+ '}' shift, and go to state 955
- @4 go to state 366
+ $default reduce using rule 26 ($@4)
+ $@4 go to state 389
-state 934
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' . @25 '{' inner_statement_list '}' @26 additional_catches
+state 934
- $default reduce using rule 79 (@25)
+ 346 expr_without_variable: "static (T_STATIC)" function is_reference @57 '(' parameter_list ')' lexical_vars '{' inner_statement_list '}' .
- @25 go to state 947
+ $default reduce using rule 346 (expr_without_variable)
state 935
- 208 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers . "identifier (T_STRING)"
+ 205 trait_adaptations: '{' trait_adaptation_list '}' .
- "identifier (T_STRING)" shift, and go to state 948
+ $default reduce using rule 205 (trait_adaptations)
state 936
- 209 trait_alias: trait_method_reference "as (T_AS)" member_modifier .
- 211 trait_modifiers: member_modifier .
+ 209 non_empty_trait_adaptation_list: non_empty_trait_adaptation_list trait_adaptation_statement .
- "identifier (T_STRING)" reduce using rule 211 (trait_modifiers)
- $default reduce using rule 209 (trait_alias)
+ $default reduce using rule 209 (non_empty_trait_adaptation_list)
state 937
- 202 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" trait_reference_list .
- 204 trait_reference_list: trait_reference_list . ',' fully_qualified_class_name
-
- ',' shift, and go to state 949
+ 210 trait_adaptation_statement: trait_precedence ';' .
- $default reduce using rule 202 (trait_precedence)
+ $default reduce using rule 210 (trait_adaptation_statement)
state 938
- 203 trait_reference_list: fully_qualified_class_name .
+ 218 trait_alias: trait_method_reference "as (T_AS)" . trait_modifiers "identifier (T_STRING)"
+ 219 | trait_method_reference "as (T_AS)" . member_modifier
+
+ "public (T_PUBLIC)" shift, and go to state 779
+ "protected (T_PROTECTED)" shift, and go to state 780
+ "private (T_PRIVATE)" shift, and go to state 781
+ "final (T_FINAL)" shift, and go to state 782
+ "abstract (T_ABSTRACT)" shift, and go to state 783
+ "static (T_STATIC)" shift, and go to state 784
+
+ $default reduce using rule 220 (trait_modifiers)
- $default reduce using rule 203 (trait_reference_list)
+ trait_modifiers go to state 956
+ member_modifier go to state 957
state 939
- 207 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
+ 212 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" . trait_reference_list
- $default reduce using rule 207 (trait_method_reference_fully_qualified)
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+ namespace_name go to state 549
+ trait_reference_list go to state 958
+ fully_qualified_class_name go to state 959
-state 940
- 227 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" '=' . static_scalar
-
- '+' shift, and go to state 459
- '-' shift, and go to state 460
- '[' shift, and go to state 461
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 116
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "static (T_STATIC)" shift, and go to state 138
- "array (T_ARRAY)" shift, and go to state 462
- "__CLASS__ (T_CLASS_C)" shift, and go to state 463
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 464
- "namespace (T_NAMESPACE)" shift, and go to state 465
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 466
-
- namespace_name go to state 467
- class_name go to state 468
- common_scalar go to state 469
- static_scalar go to state 950
- static_class_constant go to state 471
+state 940
+ 211 trait_adaptation_statement: trait_alias ';' .
-state 941
+ $default reduce using rule 211 (trait_adaptation_statement)
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' . parameter_list ')' method_body
- "identifier (T_STRING)" shift, and go to state 116
- "array (T_ARRAY)" shift, and go to state 608
- "callable (T_CALLABLE)" shift, and go to state 609
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+state 941
- ')' reduce using rule 153 (parameter_list)
- $default reduce using rule 162 (optional_class_type)
+ 217 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
- namespace_name go to state 516
- parameter_list go to state 951
- non_empty_parameter_list go to state 611
- optional_class_type go to state 612
- fully_qualified_class_name go to state 613
+ "identifier (T_STRING)" shift, and go to state 960
state 942
- 340 lexical_var_list: lexical_var_list ',' '&' "variable (T_VARIABLE)" .
+ 239 class_variable_declaration: "variable (T_VARIABLE)" '=' static_scalar .
- $default reduce using rule 340 (lexical_var_list)
+ $default reduce using rule 239 (class_variable_declaration)
state 943
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' . ':' @35 inner_statement_list
+ 236 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" .
+ 237 | class_variable_declaration ',' "variable (T_VARIABLE)" . '=' static_scalar
- ':' shift, and go to state 952
+ '=' shift, and go to state 961
+
+ $default reduce using rule 236 (class_variable_declaration)
state 944
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' @34 . statement
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" $@40 . '(' parameter_list ')' method_body
- "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
- "require (T_REQUIRE)" shift, and go to state 6
- "eval (T_EVAL)" shift, and go to state 7
- "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
- "include (T_INCLUDE)" shift, and go to state 9
- "print (T_PRINT)" shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- "(unset) (T_UNSET_CAST)" shift, and go to state 16
- "(bool) (T_BOOL_CAST)" shift, and go to state 17
- "(object) (T_OBJECT_CAST)" shift, and go to state 18
- "(array) (T_ARRAY_CAST)" shift, and go to state 19
- "(string) (T_STRING_CAST)" shift, and go to state 20
- "(double) (T_DOUBLE_CAST)" shift, and go to state 21
- "(int) (T_INT_CAST)" shift, and go to state 22
- "-- (T_DEC)" shift, and go to state 23
- "++ (T_INC)" shift, and go to state 24
- '[' shift, and go to state 25
- "clone (T_CLONE)" shift, and go to state 26
- "new (T_NEW)" shift, and go to state 27
- "exit (T_EXIT)" shift, and go to state 28
- "if (T_IF)" shift, and go to state 29
- "integer number (T_LNUMBER)" shift, and go to state 30
- "floating-point number (T_DNUMBER)" shift, and go to state 31
- "identifier (T_STRING)" shift, and go to state 32
- "variable name (T_STRING_VARNAME)" shift, and go to state 33
- "variable (T_VARIABLE)" shift, and go to state 34
- T_INLINE_HTML shift, and go to state 35
- "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
- "echo (T_ECHO)" shift, and go to state 37
- "do (T_DO)" shift, and go to state 38
- "while (T_WHILE)" shift, and go to state 39
- "for (T_FOR)" shift, and go to state 40
- "foreach (T_FOREACH)" shift, and go to state 41
- "declare (T_DECLARE)" shift, and go to state 42
- "switch (T_SWITCH)" shift, and go to state 43
- "break (T_BREAK)" shift, and go to state 44
- "continue (T_CONTINUE)" shift, and go to state 45
- "goto (T_GOTO)" shift, and go to state 46
- "function (T_FUNCTION)" shift, and go to state 47
- "return (T_RETURN)" shift, and go to state 49
- "try (T_TRY)" shift, and go to state 50
- "throw (T_THROW)" shift, and go to state 51
- "global (T_GLOBAL)" shift, and go to state 53
- "static (T_STATIC)" shift, and go to state 56
- "unset (T_UNSET)" shift, and go to state 57
- "isset (T_ISSET)" shift, and go to state 58
- "empty (T_EMPTY)" shift, and go to state 59
- "list (T_LIST)" shift, and go to state 64
- "array (T_ARRAY)" shift, and go to state 65
- "__CLASS__ (T_CLASS_C)" shift, and go to state 66
- "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
- "__METHOD__ (T_METHOD_C)" shift, and go to state 68
- "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
- "__LINE__ (T_LINE)" shift, and go to state 70
- "__FILE__ (T_FILE)" shift, and go to state 71
- "heredoc start (T_START_HEREDOC)" shift, and go to state 72
- "namespace (T_NAMESPACE)" shift, and go to state 118
- "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
- "__DIR__ (T_DIR)" shift, and go to state 75
- "\\ (T_NS_SEPARATOR)" shift, and go to state 76
- '(' shift, and go to state 77
- ';' shift, and go to state 78
- '{' shift, and go to state 79
- '$' shift, and go to state 80
- '`' shift, and go to state 81
- '"' shift, and go to state 82
-
- namespace_name go to state 83
- statement go to state 953
- unticked_statement go to state 87
- new_expr go to state 94
- expr_without_variable go to state 95
- function go to state 119
- function_call go to state 97
- class_name go to state 98
- common_scalar go to state 99
- scalar go to state 100
- expr go to state 101
- r_variable go to state 102
- rw_variable go to state 103
- variable go to state 104
- variable_without_objects go to state 105
- static_member go to state 106
- variable_class_name go to state 107
- array_function_dereference go to state 108
- base_variable_with_function_calls go to state 109
- base_variable go to state 110
- reference_variable go to state 111
- compound_variable go to state 112
- simple_indirect_reference go to state 113
- internal_functions_in_yacc go to state 114
- class_constant go to state 115
+ '(' shift, and go to state 962
state 945
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 122 for_statement: ':' inner_statement_list . "endfor (T_ENDFOR)" ';'
-
- "endfor (T_ENDFOR)" shift, and go to state 954
-
- $default reduce using rule 26 (@4)
+ 240 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' static_scalar .
- @4 go to state 366
+ $default reduce using rule 240 (class_constant_declaration)
state 946
- 124 foreach_statement: ':' inner_statement_list "endforeach (T_ENDFOREACH)" ';' .
+ 360 lexical_var_list: lexical_var_list ',' '&' . "variable (T_VARIABLE)"
- $default reduce using rule 124 (foreach_statement)
+ "variable (T_VARIABLE)" shift, and go to state 963
state 947
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 . '{' inner_statement_list '}' @26 additional_catches
+ 359 lexical_var_list: lexical_var_list ',' "variable (T_VARIABLE)" .
- '{' shift, and go to state 955
+ $default reduce using rule 359 (lexical_var_list)
state 948
- 208 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers "identifier (T_STRING)" .
+ 169 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar .
- $default reduce using rule 208 (trait_alias)
+ $default reduce using rule 169 (non_empty_parameter_list)
state 949
- 204 trait_reference_list: trait_reference_list ',' . fully_qualified_class_name
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 156 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" parenthesis_expr ':' $@38 inner_statement_list .
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ "elseif (T_ELSEIF)" reduce using rule 156 (new_elseif_list)
+ "else (T_ELSE)" reduce using rule 156 (new_elseif_list)
+ "endif (T_ENDIF)" reduce using rule 156 (new_elseif_list)
+ $default reduce using rule 26 ($@4)
- namespace_name go to state 516
- fully_qualified_class_name go to state 956
+ $@4 go to state 389
state 950
- 227 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" '=' static_scalar .
+ 131 for_statement: ':' . inner_statement_list "endfor (T_ENDFOR)" ';'
- $default reduce using rule 227 (class_variable_declaration)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 964
state 951
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list . ')' method_body
+ 130 for_statement: statement .
- ')' shift, and go to state 957
+ $default reduce using rule 130 (for_statement)
state 952
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' . @35 inner_statement_list
-
- $default reduce using rule 146 (@35)
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement .
- @35 go to state 958
+ $default reduce using rule 51 (unticked_statement)
state 953
- 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' @34 statement .
+ 133 foreach_statement: ':' inner_statement_list "endforeach (T_ENDFOREACH)" . ';'
- $default reduce using rule 144 (elseif_list)
+ ';' shift, and go to state 965
state 954
- 122 for_statement: ':' inner_statement_list "endfor (T_ENDFOR)" . ';'
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' . $@26 '{' inner_statement_list '}' $@27 additional_catches
- ';' shift, and go to state 959
+ $default reduce using rule 85 ($@26)
+ $@26 go to state 966
-state 955
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' . inner_statement_list '}' @26 additional_catches
+state 955
- $default reduce using rule 28 (inner_statement_list)
+ 90 finally_statement: "finally (T_FINALLY)" $@28 '{' inner_statement_list '}' .
- inner_statement_list go to state 960
+ $default reduce using rule 90 (finally_statement)
state 956
- 204 trait_reference_list: trait_reference_list ',' fully_qualified_class_name .
+ 218 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers . "identifier (T_STRING)"
- $default reduce using rule 204 (trait_reference_list)
+ "identifier (T_STRING)" shift, and go to state 967
state 957
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' . method_body
+ 219 trait_alias: trait_method_reference "as (T_AS)" member_modifier .
+ 221 trait_modifiers: member_modifier .
- ';' shift, and go to state 961
- '{' shift, and go to state 962
-
- method_body go to state 963
+ "identifier (T_STRING)" reduce using rule 221 (trait_modifiers)
+ $default reduce using rule 219 (trait_alias)
state 958
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' @35 . inner_statement_list
+ 212 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" trait_reference_list .
+ 214 trait_reference_list: trait_reference_list . ',' fully_qualified_class_name
- $default reduce using rule 28 (inner_statement_list)
+ ',' shift, and go to state 968
- inner_statement_list go to state 964
+ $default reduce using rule 212 (trait_precedence)
state 959
- 122 for_statement: ':' inner_statement_list "endfor (T_ENDFOR)" ';' .
+ 213 trait_reference_list: fully_qualified_class_name .
- $default reduce using rule 122 (for_statement)
+ $default reduce using rule 213 (trait_reference_list)
state 960
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list . '}' @26 additional_catches
-
- '}' shift, and go to state 965
-
- $default reduce using rule 26 (@4)
+ 217 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- @4 go to state 366
+ $default reduce using rule 217 (trait_method_reference_fully_qualified)
state 961
- 212 method_body: ';' .
-
- $default reduce using rule 212 (method_body)
+ 237 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 489
+ '-' shift, and go to state 490
+ '[' shift, and go to state 491
+ "integer number (T_LNUMBER)" shift, and go to state 31
+ "floating-point number (T_DNUMBER)" shift, and go to state 32
+ "identifier (T_STRING)" shift, and go to state 122
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 492
+ "static (T_STATIC)" shift, and go to state 147
+ "array (T_ARRAY)" shift, and go to state 493
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 494
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 68
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 69
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 70
+ "__LINE__ (T_LINE)" shift, and go to state 71
+ "__FILE__ (T_FILE)" shift, and go to state 72
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 495
+ "namespace (T_NAMESPACE)" shift, and go to state 496
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 75
+ "__DIR__ (T_DIR)" shift, and go to state 76
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 497
+
+ namespace_name go to state 498
+ class_name go to state 499
+ common_scalar go to state 500
+ static_scalar go to state 969
+ static_class_constant go to state 502
state 962
- 213 method_body: '{' . inner_statement_list '}'
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" $@40 '(' . parameter_list ')' method_body
- $default reduce using rule 28 (inner_statement_list)
+ "identifier (T_STRING)" shift, and go to state 122
+ "array (T_ARRAY)" shift, and go to state 646
+ "callable (T_CALLABLE)" shift, and go to state 647
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
- inner_statement_list go to state 966
+ ')' reduce using rule 162 (parameter_list)
+ $default reduce using rule 171 (optional_class_type)
+
+ namespace_name go to state 549
+ parameter_list go to state 970
+ non_empty_parameter_list go to state 649
+ optional_class_type go to state 650
+ fully_qualified_class_name go to state 651
state 963
- 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body .
+ 360 lexical_var_list: lexical_var_list ',' '&' "variable (T_VARIABLE)" .
- $default reduce using rule 190 (class_statement)
+ $default reduce using rule 360 (lexical_var_list)
state 964
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' @35 inner_statement_list .
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 131 for_statement: ':' inner_statement_list . "endfor (T_ENDFOR)" ';'
- "elseif (T_ELSEIF)" reduce using rule 147 (new_elseif_list)
- "else (T_ELSE)" reduce using rule 147 (new_elseif_list)
- "endif (T_ENDIF)" reduce using rule 147 (new_elseif_list)
- $default reduce using rule 26 (@4)
+ "endfor (T_ENDFOR)" shift, and go to state 971
- @4 go to state 366
+ $default reduce using rule 26 ($@4)
+ $@4 go to state 389
-state 965
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' . @26 additional_catches
+state 965
- $default reduce using rule 80 (@26)
+ 133 foreach_statement: ':' inner_statement_list "endforeach (T_ENDFOREACH)" ';' .
- @26 go to state 967
+ $default reduce using rule 133 (foreach_statement)
state 966
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 213 method_body: '{' inner_statement_list . '}'
-
- '}' shift, and go to state 968
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 . '{' inner_statement_list '}' $@27 additional_catches
- $default reduce using rule 26 (@4)
-
- @4 go to state 366
+ '{' shift, and go to state 972
state 967
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 . additional_catches
-
- "catch (T_CATCH)" shift, and go to state 969
+ 218 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers "identifier (T_STRING)" .
- $default reduce using rule 85 (additional_catches)
-
- additional_catches go to state 970
- non_empty_additional_catches go to state 971
- additional_catch go to state 972
+ $default reduce using rule 218 (trait_alias)
state 968
- 213 method_body: '{' inner_statement_list '}' .
+ 214 trait_reference_list: trait_reference_list ',' . fully_qualified_class_name
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
- $default reduce using rule 213 (method_body)
+ namespace_name go to state 549
+ fully_qualified_class_name go to state 973
state 969
- 90 additional_catch: "catch (T_CATCH)" . '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
+ 237 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" '=' static_scalar .
- '(' shift, and go to state 973
+ $default reduce using rule 237 (class_variable_declaration)
state 970
- 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches .
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" $@40 '(' parameter_list . ')' method_body
- $default reduce using rule 81 (unticked_statement)
+ ')' shift, and go to state 974
state 971
- 84 additional_catches: non_empty_additional_catches .
- 87 non_empty_additional_catches: non_empty_additional_catches . additional_catch
-
- "catch (T_CATCH)" shift, and go to state 969
+ 131 for_statement: ':' inner_statement_list "endfor (T_ENDFOR)" . ';'
- $default reduce using rule 84 (additional_catches)
-
- additional_catch go to state 974
+ ';' shift, and go to state 975
state 972
- 86 non_empty_additional_catches: additional_catch .
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' . inner_statement_list '}' $@27 additional_catches
+
+ $default reduce using rule 28 (inner_statement_list)
- $default reduce using rule 86 (non_empty_additional_catches)
+ inner_statement_list go to state 976
state 973
- 90 additional_catch: "catch (T_CATCH)" '(' . fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
-
- "identifier (T_STRING)" shift, and go to state 116
- "namespace (T_NAMESPACE)" shift, and go to state 514
- "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ 214 trait_reference_list: trait_reference_list ',' fully_qualified_class_name .
- namespace_name go to state 516
- fully_qualified_class_name go to state 975
+ $default reduce using rule 214 (trait_reference_list)
state 974
- 87 non_empty_additional_catches: non_empty_additional_catches additional_catch .
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" $@40 '(' parameter_list ')' . method_body
- $default reduce using rule 87 (non_empty_additional_catches)
+ ';' shift, and go to state 977
+ '{' shift, and go to state 978
+ method_body go to state 979
-state 975
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name . @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
+state 975
- $default reduce using rule 88 (@27)
+ 131 for_statement: ':' inner_statement_list "endfor (T_ENDFOR)" ';' .
- @27 go to state 976
+ $default reduce using rule 131 (for_statement)
state 976
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 . "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list . '}' $@27 additional_catches
+
+ '}' shift, and go to state 980
+
+ $default reduce using rule 26 ($@4)
- "variable (T_VARIABLE)" shift, and go to state 977
+ $@4 go to state 389
state 977
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" . ')' @28 '{' inner_statement_list '}'
+ 222 method_body: ';' .
- ')' shift, and go to state 978
+ $default reduce using rule 222 (method_body)
state 978
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' . @28 '{' inner_statement_list '}'
+ 223 method_body: '{' . inner_statement_list '}'
- $default reduce using rule 89 (@28)
+ $default reduce using rule 28 (inner_statement_list)
- @28 go to state 979
+ inner_statement_list go to state 981
state 979
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 . '{' inner_statement_list '}'
+ 200 class_statement: method_modifiers function is_reference "identifier (T_STRING)" $@40 '(' parameter_list ')' method_body .
- '{' shift, and go to state 980
+ $default reduce using rule 200 (class_statement)
state 980
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' . inner_statement_list '}'
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' . $@27 additional_catches
- $default reduce using rule 28 (inner_statement_list)
+ $default reduce using rule 86 ($@27)
- inner_statement_list go to state 981
+ $@27 go to state 982
state 981
- 27 inner_statement_list: inner_statement_list . @4 inner_statement
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list . '}'
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 223 method_body: '{' inner_statement_list . '}'
- '}' shift, and go to state 982
+ '}' shift, and go to state 983
- $default reduce using rule 26 (@4)
+ $default reduce using rule 26 ($@4)
- @4 go to state 366
+ $@4 go to state 389
state 982
- 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}' .
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 . additional_catches
+
+ "catch (T_CATCH)" shift, and go to state 984
+
+ $default reduce using rule 92 (additional_catches)
+
+ additional_catches go to state 985
+ non_empty_additional_catches go to state 986
+ additional_catch go to state 987
+
+
+state 983
+
+ 223 method_body: '{' inner_statement_list '}' .
+
+ $default reduce using rule 223 (method_body)
+
+
+state 984
+
+ 97 additional_catch: "catch (T_CATCH)" . '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list '}'
+
+ '(' shift, and go to state 988
+
+
+state 985
+
+ 87 catch_statement: "catch (T_CATCH)" '(' $@24 fully_qualified_class_name $@25 "variable (T_VARIABLE)" ')' $@26 '{' inner_statement_list '}' $@27 additional_catches .
+
+ $default reduce using rule 87 (catch_statement)
+
+
+state 986
+
+ 91 additional_catches: non_empty_additional_catches .
+ 94 non_empty_additional_catches: non_empty_additional_catches . additional_catch
+
+ "catch (T_CATCH)" shift, and go to state 984
+
+ $default reduce using rule 91 (additional_catches)
+
+ additional_catch go to state 989
+
+
+state 987
+
+ 93 non_empty_additional_catches: additional_catch .
+
+ $default reduce using rule 93 (non_empty_additional_catches)
+
+
+state 988
+
+ 97 additional_catch: "catch (T_CATCH)" '(' . fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list '}'
+
+ "identifier (T_STRING)" shift, and go to state 122
+ "namespace (T_NAMESPACE)" shift, and go to state 547
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 548
+
+ namespace_name go to state 549
+ fully_qualified_class_name go to state 990
+
+
+state 989
+
+ 94 non_empty_additional_catches: non_empty_additional_catches additional_catch .
+
+ $default reduce using rule 94 (non_empty_additional_catches)
+
+
+state 990
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name . @29 "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list '}'
+
+ $default reduce using rule 95 (@29)
+
+ @29 go to state 991
+
+
+state 991
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 . "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list '}'
+
+ "variable (T_VARIABLE)" shift, and go to state 992
+
+
+state 992
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" . ')' $@30 '{' inner_statement_list '}'
+
+ ')' shift, and go to state 993
+
+
+state 993
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' . $@30 '{' inner_statement_list '}'
+
+ $default reduce using rule 96 ($@30)
+
+ $@30 go to state 994
+
+
+state 994
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 . '{' inner_statement_list '}'
+
+ '{' shift, and go to state 995
+
+
+state 995
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 '{' . inner_statement_list '}'
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 996
+
+
+state 996
+
+ 27 inner_statement_list: inner_statement_list . $@4 inner_statement
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list . '}'
+
+ '}' shift, and go to state 997
+
+ $default reduce using rule 26 ($@4)
+
+ $@4 go to state 389
+
+
+state 997
+
+ 97 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @29 "variable (T_VARIABLE)" ')' $@30 '{' inner_statement_list '}' .
- $default reduce using rule 90 (additional_catch)
+ $default reduce using rule 97 (additional_catch)
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 9a0b3209e..c1514c5d7 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -68,6 +68,8 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%token T_LOGICAL_AND "and (T_LOGICAL_AND)"
%right T_PRINT
%token T_PRINT "print (T_PRINT)"
+%right T_YIELD
+%token T_YIELD "yield (T_YIELD)"
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
%token T_PLUS_EQUAL "+= (T_PLUS_EQUAL)"
%token T_MINUS_EQUAL "-= (T_MINUS_EQUAL)"
@@ -160,6 +162,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%token T_RETURN "return (T_RETURN)"
%token T_TRY "try (T_TRY)"
%token T_CATCH "catch (T_CATCH)"
+%token T_FINALLY "finally (T_FINALLY)"
%token T_THROW "throw (T_THROW)"
%token T_USE "use (T_USE)"
%token T_INSTEADOF "insteadof (T_INSTEADOF)"
@@ -276,10 +279,10 @@ statement:
unticked_statement:
'{' inner_statement_list '}'
- | T_IF '(' expr ')' { zend_do_if_cond(&$3, &$4 TSRMLS_CC); } statement { zend_do_if_after_statement(&$4, 1 TSRMLS_CC); } elseif_list else_single { zend_do_if_end(TSRMLS_C); }
- | T_IF '(' expr ')' ':' { zend_do_if_cond(&$3, &$4 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$4, 1 TSRMLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(TSRMLS_C); }
- | T_WHILE '(' { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 TSRMLS_CC); } while_statement { zend_do_while_end(&$1, &$5 TSRMLS_CC); }
- | T_DO { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } statement T_WHILE '(' { $5.u.op.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { zend_do_do_while_end(&$1, &$5, &$7 TSRMLS_CC); }
+ | T_IF parenthesis_expr { zend_do_if_cond(&$2, &$1 TSRMLS_CC); } statement { zend_do_if_after_statement(&$1, 1 TSRMLS_CC); } elseif_list else_single { zend_do_if_end(TSRMLS_C); }
+ | T_IF parenthesis_expr ':' { zend_do_if_cond(&$2, &$1 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$1, 1 TSRMLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(TSRMLS_C); }
+ | T_WHILE { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); } parenthesis_expr { zend_do_while_cond(&$3, &$$ TSRMLS_CC); } while_statement { zend_do_while_end(&$1, &$4 TSRMLS_CC); }
+ | T_DO { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } statement T_WHILE { $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); } parenthesis_expr ';' { zend_do_do_while_end(&$1, &$4, &$6 TSRMLS_CC); }
| T_FOR
'('
for_expr
@@ -289,7 +292,7 @@ unticked_statement:
for_expr
')' { zend_do_free(&$9 TSRMLS_CC); zend_do_for_before_statement(&$4, &$7 TSRMLS_CC); }
for_statement { zend_do_for_end(&$7 TSRMLS_CC); }
- | T_SWITCH '(' expr ')' { zend_do_switch_cond(&$3 TSRMLS_CC); } switch_case_list { zend_do_switch_end(&$6 TSRMLS_CC); }
+ | T_SWITCH parenthesis_expr { zend_do_switch_cond(&$2 TSRMLS_CC); } switch_case_list { zend_do_switch_end(&$4 TSRMLS_CC); }
| T_BREAK ';' { zend_do_brk_cont(ZEND_BRK, NULL TSRMLS_CC); }
| T_BREAK expr ';' { zend_do_brk_cont(ZEND_BRK, &$2 TSRMLS_CC); }
| T_CONTINUE ';' { zend_do_brk_cont(ZEND_CONT, NULL TSRMLS_CC); }
@@ -297,6 +300,7 @@ unticked_statement:
| T_RETURN ';' { zend_do_return(NULL, 0 TSRMLS_CC); }
| T_RETURN expr_without_variable ';' { zend_do_return(&$2, 0 TSRMLS_CC); }
| T_RETURN variable ';' { zend_do_return(&$2, 1 TSRMLS_CC); }
+ | yield_expr ';' { $$ = $1; }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
@@ -309,20 +313,29 @@ unticked_statement:
foreach_statement { zend_do_foreach_end(&$1, &$4 TSRMLS_CC); }
| T_FOREACH '(' expr_without_variable T_AS
{ zend_do_foreach_begin(&$1, &$2, &$3, &$4, 0 TSRMLS_CC); }
- variable foreach_optional_arg ')' { zend_check_writable_variable(&$6); zend_do_foreach_cont(&$1, &$2, &$4, &$6, &$7 TSRMLS_CC); }
+ foreach_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$1, &$2, &$4, &$6, &$7 TSRMLS_CC); }
foreach_statement { zend_do_foreach_end(&$1, &$4 TSRMLS_CC); }
| T_DECLARE { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
| ';' /* empty statement */
| T_TRY { zend_do_try(&$1 TSRMLS_CC); } '{' inner_statement_list '}'
- T_CATCH '(' { zend_initialize_try_catch_element(&$1 TSRMLS_CC); }
- fully_qualified_class_name { zend_do_first_catch(&$7 TSRMLS_CC); }
- T_VARIABLE ')' { zend_do_begin_catch(&$1, &$9, &$11, &$7 TSRMLS_CC); }
- '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
- additional_catches { zend_do_mark_last_catch(&$7, &$18 TSRMLS_CC); }
+ catch_statement { zend_do_bind_catch(&$1, &$6 TSRMLS_CC); }
+ finally_statement { zend_do_end_finally(&$1, &$6, &$8 TSRMLS_CC); }
| T_THROW expr ';' { zend_do_throw(&$2 TSRMLS_CC); }
| T_GOTO T_STRING ';' { zend_do_goto(&$2 TSRMLS_CC); }
;
+catch_statement:
+ /* empty */ { $$.op_type = IS_UNUSED; }
+ | T_CATCH '(' { zend_initialize_try_catch_element(&$1 TSRMLS_CC); }
+ fully_qualified_class_name { zend_do_first_catch(&$2 TSRMLS_CC); }
+ T_VARIABLE ')' { zend_do_begin_catch(&$1, &$4, &$6, &$2 TSRMLS_CC); }
+ '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
+ additional_catches { zend_do_mark_last_catch(&$2, &$13 TSRMLS_CC); $$ = $1;}
+
+finally_statement:
+ /* empty */ { $$.op_type = IS_UNUSED; }
+ | T_FINALLY { zend_do_finally(&$1 TSRMLS_CC); } '{' inner_statement_list '}' { $$ = $1; }
+;
additional_catches:
non_empty_additional_catches { $$ = $1; }
@@ -334,12 +347,10 @@ non_empty_additional_catches:
| non_empty_additional_catches additional_catch { $$ = $2; }
;
-
additional_catch:
T_CATCH '(' fully_qualified_class_name { $$.u.op.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$5, NULL TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
;
-
unset_variables:
unset_variable
| unset_variables ',' unset_variable
@@ -357,7 +368,6 @@ class_declaration_statement:
unticked_class_declaration_statement { DO_TICKS(); }
;
-
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
@@ -366,7 +376,8 @@ is_reference:
unticked_function_declaration_statement:
function is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$3, 0, $2.op_type, NULL TSRMLS_CC); }
- '(' parameter_list ')' '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); }
+ '(' parameter_list ')'
+ '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); }
;
unticked_class_declaration_statement:
@@ -421,10 +432,10 @@ foreach_optional_arg:
| T_DOUBLE_ARROW foreach_variable { $$ = $2; }
;
-
foreach_variable:
variable { zend_check_writable_variable(&$1); $$ = $1; }
| '&' variable { zend_check_writable_variable(&$2); $$ = $2; $$.EA |= ZEND_PARSED_REFERENCE_VARIABLE; }
+ | T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' { $$ = $1; $$.EA = ZEND_PARSED_LIST_EXPR; }
;
for_statement:
@@ -481,13 +492,13 @@ while_statement:
elseif_list:
/* empty */
- | elseif_list T_ELSEIF '(' expr ')' { zend_do_if_cond(&$4, &$5 TSRMLS_CC); } statement { zend_do_if_after_statement(&$5, 0 TSRMLS_CC); }
+ | elseif_list T_ELSEIF parenthesis_expr { zend_do_if_cond(&$3, &$2 TSRMLS_CC); } statement { zend_do_if_after_statement(&$2, 0 TSRMLS_CC); }
;
new_elseif_list:
/* empty */
- | new_elseif_list T_ELSEIF '(' expr ')' ':' { zend_do_if_cond(&$4, &$5 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$5, 0 TSRMLS_CC); }
+ | new_elseif_list T_ELSEIF parenthesis_expr ':' { zend_do_if_cond(&$3, &$2 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$2, 0 TSRMLS_CC); }
;
@@ -530,8 +541,9 @@ optional_class_type:
function_call_parameter_list:
- non_empty_function_call_parameter_list { $$ = $1; }
- | /* empty */ { Z_LVAL($$.u.constant) = 0; }
+ '(' ')' { Z_LVAL($$.u.constant) = 0; }
+ | '(' non_empty_function_call_parameter_list ')' { $$ = $2; }
+ | '(' yield_expr ')' { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$2, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); }
;
@@ -576,8 +588,9 @@ class_statement:
variable_modifiers { CG(access_type) = Z_LVAL($1.u.constant); } class_variable_declaration ';'
| class_constant_declaration ';'
| trait_use_statement
- | method_modifiers function is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$4, 1, $3.op_type, &$1 TSRMLS_CC); } '('
- parameter_list ')' method_body { zend_do_abstract_method(&$4, &$1, &$9 TSRMLS_CC); zend_do_end_function_declaration(&$2 TSRMLS_CC); }
+ | method_modifiers function is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$4, 1, $3.op_type, &$1 TSRMLS_CC); }
+ '(' parameter_list ')'
+ method_body { zend_do_abstract_method(&$4, &$1, &$9 TSRMLS_CC); zend_do_end_function_declaration(&$2 TSRMLS_CC); }
;
trait_use_statement:
@@ -770,7 +783,7 @@ expr_without_variable:
| expr '>' expr { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 TSRMLS_CC); }
| expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 TSRMLS_CC); }
| expr T_INSTANCEOF class_name_reference { zend_do_instanceof(&$$, &$1, &$3, 0 TSRMLS_CC); }
- | '(' expr ')' { $$ = $2; }
+ | parenthesis_expr { $$ = $1; }
| new_expr { $$ = $1; }
| '(' new_expr ')' { $$ = $2; } instance_call { $$ = $5; }
| expr '?' { zend_do_begin_qm_op(&$1, &$2 TSRMLS_CC); }
@@ -789,16 +802,35 @@ expr_without_variable:
| T_EXIT exit_expr { zend_do_exit(&$$, &$2 TSRMLS_CC); }
| '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } expr { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; }
| scalar { $$ = $1; }
- | T_ARRAY '(' array_pair_list ')' { $$ = $3; }
- | '[' array_pair_list ']' { $$ = $2; }
+ | combined_scalar_offset { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); }
+ | combined_scalar { $$ = $1; }
| '`' backticks_expr '`' { zend_do_shell_exec(&$$, &$2 TSRMLS_CC); }
| T_PRINT expr { zend_do_print(&$$, &$2 TSRMLS_CC); }
- | function is_reference '(' { zend_do_begin_lambda_function_declaration(&$$, &$1, $2.op_type, 0 TSRMLS_CC); }
- parameter_list ')' lexical_vars '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); $$ = $4; }
- | T_STATIC function is_reference '(' { zend_do_begin_lambda_function_declaration(&$$, &$2, $3.op_type, 1 TSRMLS_CC); }
- parameter_list ')' lexical_vars '{' inner_statement_list '}' { zend_do_end_function_declaration(&$2 TSRMLS_CC); $$ = $5; }
+ | T_YIELD { zend_do_yield(&$$, NULL, NULL, 0 TSRMLS_CC); }
+ | function is_reference { zend_do_begin_lambda_function_declaration(&$$, &$1, $2.op_type, 0 TSRMLS_CC); }
+ '(' parameter_list ')' lexical_vars
+ '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); $$ = $3; }
+ | T_STATIC function is_reference { zend_do_begin_lambda_function_declaration(&$$, &$2, $3.op_type, 1 TSRMLS_CC); }
+ '(' parameter_list ')' lexical_vars
+ '{' inner_statement_list '}' { zend_do_end_function_declaration(&$2 TSRMLS_CC); $$ = $4; }
;
+yield_expr:
+ T_YIELD expr_without_variable { zend_do_yield(&$$, &$2, NULL, 0 TSRMLS_CC); }
+ | T_YIELD variable { zend_do_yield(&$$, &$2, NULL, 1 TSRMLS_CC); }
+ | T_YIELD expr T_DOUBLE_ARROW expr_without_variable { zend_do_yield(&$$, &$4, &$2, 0 TSRMLS_CC); }
+ | T_YIELD expr T_DOUBLE_ARROW variable { zend_do_yield(&$$, &$4, &$2, 1 TSRMLS_CC); }
+;
+
+combined_scalar_offset:
+ combined_scalar '[' dim_offset ']' { zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+ | combined_scalar_offset '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+ | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $1.EA = 0; zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+
+combined_scalar:
+ T_ARRAY '(' array_pair_list ')' { $$ = $3; }
+ | '[' array_pair_list ']' { $$ = $2; }
+
function:
T_FUNCTION { $$.u.op.opline_num = CG(zend_lineno); }
;
@@ -816,30 +848,22 @@ lexical_var_list:
;
function_call:
- namespace_name '(' { $2.u.op.opline_num = zend_do_begin_function_call(&$1, 1 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
- | T_NAMESPACE T_NS_SEPARATOR namespace_name '(' { $1.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$1.u.constant); zend_do_build_namespace_name(&$1, &$1, &$3 TSRMLS_CC); $4.u.op.opline_num = zend_do_begin_function_call(&$1, 0 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call(&$1, &$$, &$6, 0, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
- | T_NS_SEPARATOR namespace_name '(' { $3.u.op.opline_num = zend_do_begin_function_call(&$2, 0 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call(&$2, &$$, &$5, 0, $3.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
- | class_name T_PAAMAYIM_NEKUDOTAYIM variable_name '(' { $4.u.op.opline_num = zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call($4.u.op.opline_num?NULL:&$3, &$$, &$6, $4.u.op.opline_num, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
- | class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call(NULL, &$$, &$6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
- | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_name '(' { zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call(NULL, &$$, &$6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
- | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
- function_call_parameter_list
- ')' { zend_do_end_function_call(NULL, &$$, &$6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
- | variable_without_objects '(' { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&$1, 0 TSRMLS_CC); }
- function_call_parameter_list ')'
- { zend_do_end_function_call(&$1, &$$, &$4, 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ namespace_name { $$.u.op.opline_num = zend_do_begin_function_call(&$1, 1 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(&$1, &$$, &$3, 0, $2.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ | T_NAMESPACE T_NS_SEPARATOR namespace_name { $1.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$1.u.constant); zend_do_build_namespace_name(&$1, &$1, &$3 TSRMLS_CC); $$.u.op.opline_num = zend_do_begin_function_call(&$1, 0 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(&$1, &$$, &$5, 0, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ | T_NS_SEPARATOR namespace_name { $$.u.op.opline_num = zend_do_begin_function_call(&$2, 0 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(&$2, &$$, &$4, 0, $3.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ | class_name T_PAAMAYIM_NEKUDOTAYIM variable_name { $$.u.op.opline_num = zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call($4.u.op.opline_num?NULL:&$3, &$$, &$5, $4.u.op.opline_num, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ | class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(NULL, &$$, &$5, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_name { zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(NULL, &$$, &$5, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(NULL, &$$, &$5, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ | variable_without_objects { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&$1, 0 TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(&$1, &$$, &$3, 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
;
class_name:
@@ -884,7 +908,7 @@ dynamic_class_name_variable_property:
exit_expr:
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
- | '(' expr ')' { $$ = $2; }
+ | parenthesis_expr { $$ = $1; }
;
backticks_expr:
@@ -895,8 +919,8 @@ backticks_expr:
ctor_arguments:
- /* empty */ { Z_LVAL($$.u.constant)=0; }
- | '(' function_call_parameter_list ')' { $$ = $2; }
+ /* empty */ { Z_LVAL($$.u.constant) = 0; }
+ | function_call_parameter_list { $$ = $1; }
;
@@ -911,8 +935,8 @@ common_scalar:
| T_METHOD_C { $$ = $1; }
| T_FUNC_C { $$ = $1; }
| T_NS_C { $$ = $1; }
- | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
- | T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
+ | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; }
+ | T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; }
;
@@ -941,7 +965,7 @@ scalar:
| T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); zend_do_fetch_constant(&$$, NULL, &$2, ZEND_RT, 0 TSRMLS_CC); }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
- | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
+ | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; }
| T_CLASS_C { if (Z_TYPE($1.u.constant) == IS_CONSTANT) {zend_do_fetch_constant(&$$, NULL, &$1, ZEND_RT, 1 TSRMLS_CC);} else {$$ = $1;} }
;
@@ -968,6 +992,11 @@ expr:
| expr_without_variable { $$ = $1; }
;
+parenthesis_expr:
+ '(' expr ')' { $$ = $2; }
+ | '(' yield_expr ')' { $$ = $2; }
+;
+
r_variable:
variable { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); $$ = $1; }
@@ -1007,9 +1036,8 @@ array_method_dereference:
;
method:
- '(' { zend_do_pop_object(&$1 TSRMLS_CC); zend_do_begin_method_call(&$1 TSRMLS_CC); }
- function_call_parameter_list ')'
- { zend_do_end_function_call(&$1, &$$, &$3, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_pop_object(&$$ TSRMLS_CC); zend_do_begin_method_call(&$$ TSRMLS_CC); }
+ function_call_parameter_list { zend_do_end_function_call(&$1, &$$, &$2, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
;
method_or_not:
@@ -1149,6 +1177,7 @@ encaps_var_offset:
internal_functions_in_yacc:
T_ISSET '(' isset_variables ')' { $$ = $3; }
| T_EMPTY '(' variable ')' { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 TSRMLS_CC); }
+ | T_EMPTY '(' expr_without_variable ')' { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$3 TSRMLS_CC); }
| T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 TSRMLS_CC); }
| T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 TSRMLS_CC); }
| T_EVAL '(' expr ')' { zend_do_include_or_eval(ZEND_EVAL, &$$, &$3 TSRMLS_CC); }
@@ -1157,8 +1186,13 @@ internal_functions_in_yacc:
;
isset_variables:
- variable { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$1 TSRMLS_CC); }
- | isset_variables ',' { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } variable { znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &$4 TSRMLS_CC); zend_do_boolean_and_end(&$$, &$1, &tmp, &$2 TSRMLS_CC); }
+ isset_variable { $$ = $1; }
+ | isset_variables ',' { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } isset_variable { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
+;
+
+isset_variable:
+ variable { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$1 TSRMLS_CC); }
+ | expr_without_variable { zend_error(E_COMPILE_ERROR, "Cannot use isset() on the result of an expression (you can use \"null !== expression\" instead)"); }
;
class_constant:
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index e3d3de283..07ccb5d75 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
+/* Generated by re2c 0.13.5 on Mon Aug 20 13:34:50 2012 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -180,22 +180,23 @@ static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
void startup_scanner(TSRMLS_D)
{
CG(parse_error) = 0;
- CG(heredoc) = NULL;
- CG(heredoc_len) = 0;
CG(doc_comment) = NULL;
CG(doc_comment_len) = 0;
zend_stack_init(&SCNG(state_stack));
+ zend_ptr_stack_init(&SCNG(heredoc_label_stack));
+}
+
+static void heredoc_label_dtor(zend_heredoc_label *heredoc_label) {
+ efree(heredoc_label->label);
}
void shutdown_scanner(TSRMLS_D)
{
- if (CG(heredoc)) {
- efree(CG(heredoc));
- CG(heredoc_len)=0;
- }
CG(parse_error) = 0;
- zend_stack_destroy(&SCNG(state_stack));
RESET_DOC_COMMENT();
+ zend_stack_destroy(&SCNG(state_stack));
+ zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1);
+ zend_ptr_stack_destroy(&SCNG(heredoc_label_stack));
}
ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
@@ -210,6 +211,9 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
lex_state->state_stack = SCNG(state_stack);
zend_stack_init(&SCNG(state_stack));
+ lex_state->heredoc_label_stack = SCNG(heredoc_label_stack);
+ zend_ptr_stack_init(&SCNG(heredoc_label_stack));
+
lex_state->in = SCNG(yy_in);
lex_state->yy_state = YYSTATE;
lex_state->filename = zend_get_compiled_filename(TSRMLS_C);
@@ -236,6 +240,10 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
zend_stack_destroy(&SCNG(state_stack));
SCNG(state_stack) = lex_state->state_stack;
+ zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1);
+ zend_ptr_stack_destroy(&SCNG(heredoc_label_stack));
+ SCNG(heredoc_label_stack) = lex_state->heredoc_label_stack;
+
SCNG(yy_in) = lex_state->in;
YYSETCONDITION(lex_state->yy_state);
CG(zend_lineno) = lex_state->lineno;
@@ -252,12 +260,6 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
SCNG(input_filter) = lex_state->input_filter;
SCNG(output_filter) = lex_state->output_filter;
SCNG(script_encoding) = lex_state->script_encoding;
-
- if (CG(heredoc)) {
- efree(CG(heredoc));
- CG(heredoc) = NULL;
- CG(heredoc_len) = 0;
- }
}
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
@@ -998,7 +1000,7 @@ restart:
yymore_restart:
-#line 1002 "Zend/zend_language_scanner.c"
+#line 1004 "Zend/zend_language_scanner.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -1097,7 +1099,7 @@ yyc_INITIAL:
yy3:
YYDEBUG(3, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1790 "Zend/zend_language_scanner.l"
+#line 1801 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1157,7 +1159,7 @@ inline_html:
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
}
-#line 1161 "Zend/zend_language_scanner.c"
+#line 1163 "Zend/zend_language_scanner.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1175,7 +1177,7 @@ yy5:
yy6:
YYDEBUG(6, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1778 "Zend/zend_language_scanner.l"
+#line 1789 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1187,14 +1189,14 @@ yy6:
goto inline_char_handler;
}
}
-#line 1191 "Zend/zend_language_scanner.c"
+#line 1193 "Zend/zend_language_scanner.c"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy43;
YYDEBUG(8, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1755 "Zend/zend_language_scanner.l"
+#line 1766 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1206,7 +1208,7 @@ yy7:
goto inline_char_handler;
}
}
-#line 1210 "Zend/zend_language_scanner.c"
+#line 1212 "Zend/zend_language_scanner.c"
yy9:
YYDEBUG(9, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1392,7 +1394,7 @@ yy35:
++YYCURSOR;
YYDEBUG(38, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1715 "Zend/zend_language_scanner.l"
+#line 1726 "Zend/zend_language_scanner.l"
{
YYCTYPE *bracket = (YYCTYPE*)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
@@ -1409,7 +1411,7 @@ yy35:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1413 "Zend/zend_language_scanner.c"
+#line 1415 "Zend/zend_language_scanner.c"
yy39:
YYDEBUG(39, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1436,7 +1438,7 @@ yy43:
++YYCURSOR;
YYDEBUG(44, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1733 "Zend/zend_language_scanner.l"
+#line 1744 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1448,13 +1450,13 @@ yy43:
goto inline_char_handler;
}
}
-#line 1452 "Zend/zend_language_scanner.c"
+#line 1454 "Zend/zend_language_scanner.c"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
YYDEBUG(46, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1746 "Zend/zend_language_scanner.l"
+#line 1757 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -1462,7 +1464,7 @@ yy45:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG_WITH_ECHO;
}
-#line 1466 "Zend/zend_language_scanner.c"
+#line 1468 "Zend/zend_language_scanner.c"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1489,7 +1491,7 @@ yy50:
yy51:
YYDEBUG(51, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1768 "Zend/zend_language_scanner.l"
+#line 1779 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -1498,7 +1500,7 @@ yy51:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1502 "Zend/zend_language_scanner.c"
+#line 1504 "Zend/zend_language_scanner.c"
yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
@@ -1569,7 +1571,7 @@ yyc_ST_BACKQUOTE:
yy56:
YYDEBUG(56, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2241 "Zend/zend_language_scanner.l"
+#line 2252 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1610,7 +1612,7 @@ yy56:
zend_scan_escape_string(zendlval, yytext, yyleng, '`' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1614 "Zend/zend_language_scanner.c"
+#line 1616 "Zend/zend_language_scanner.c"
yy57:
YYDEBUG(57, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1621,12 +1623,12 @@ yy58:
++YYCURSOR;
YYDEBUG(59, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2185 "Zend/zend_language_scanner.l"
+#line 2196 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '`';
}
-#line 1630 "Zend/zend_language_scanner.c"
+#line 1632 "Zend/zend_language_scanner.c"
yy60:
YYDEBUG(60, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1636,14 +1638,14 @@ yy61:
++YYCURSOR;
YYDEBUG(62, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2172 "Zend/zend_language_scanner.l"
+#line 2183 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1647 "Zend/zend_language_scanner.c"
+#line 1649 "Zend/zend_language_scanner.c"
yy63:
YYDEBUG(63, *YYCURSOR);
yyaccept = 0;
@@ -1659,24 +1661,24 @@ yy63:
yy65:
YYDEBUG(65, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1883 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1669 "Zend/zend_language_scanner.c"
+#line 1671 "Zend/zend_language_scanner.c"
yy66:
YYDEBUG(66, *YYCURSOR);
++YYCURSOR;
YYDEBUG(67, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1449 "Zend/zend_language_scanner.l"
+#line 1459 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1680 "Zend/zend_language_scanner.c"
+#line 1682 "Zend/zend_language_scanner.c"
yy68:
YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1690,7 +1692,7 @@ yy70:
++YYCURSOR;
YYDEBUG(71, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1864 "Zend/zend_language_scanner.l"
+#line 1875 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1698,7 +1700,7 @@ yy70:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1702 "Zend/zend_language_scanner.c"
+#line 1704 "Zend/zend_language_scanner.c"
yy72:
YYDEBUG(72, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1716,7 +1718,7 @@ yy73:
++YYCURSOR;
YYDEBUG(74, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1854 "Zend/zend_language_scanner.l"
+#line 1865 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1724,7 +1726,7 @@ yy73:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1728 "Zend/zend_language_scanner.c"
+#line 1730 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
@@ -1792,7 +1794,7 @@ yy77:
yy78:
YYDEBUG(78, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2191 "Zend/zend_language_scanner.l"
+#line 2202 "Zend/zend_language_scanner.l"
{
if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) {
YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1;
@@ -1841,7 +1843,7 @@ double_quotes_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng, '"' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1845 "Zend/zend_language_scanner.c"
+#line 1847 "Zend/zend_language_scanner.c"
yy79:
YYDEBUG(79, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1852,12 +1854,12 @@ yy80:
++YYCURSOR;
YYDEBUG(81, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2180 "Zend/zend_language_scanner.l"
+#line 2191 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '"';
}
-#line 1861 "Zend/zend_language_scanner.c"
+#line 1863 "Zend/zend_language_scanner.c"
yy82:
YYDEBUG(82, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1867,14 +1869,14 @@ yy83:
++YYCURSOR;
YYDEBUG(84, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2172 "Zend/zend_language_scanner.l"
+#line 2183 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1878 "Zend/zend_language_scanner.c"
+#line 1880 "Zend/zend_language_scanner.c"
yy85:
YYDEBUG(85, *YYCURSOR);
yyaccept = 0;
@@ -1890,24 +1892,24 @@ yy85:
yy87:
YYDEBUG(87, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1883 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1900 "Zend/zend_language_scanner.c"
+#line 1902 "Zend/zend_language_scanner.c"
yy88:
YYDEBUG(88, *YYCURSOR);
++YYCURSOR;
YYDEBUG(89, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1449 "Zend/zend_language_scanner.l"
+#line 1459 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1911 "Zend/zend_language_scanner.c"
+#line 1913 "Zend/zend_language_scanner.c"
yy90:
YYDEBUG(90, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1921,7 +1923,7 @@ yy92:
++YYCURSOR;
YYDEBUG(93, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1864 "Zend/zend_language_scanner.l"
+#line 1875 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1929,7 +1931,7 @@ yy92:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1933 "Zend/zend_language_scanner.c"
+#line 1935 "Zend/zend_language_scanner.c"
yy94:
YYDEBUG(94, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1947,7 +1949,7 @@ yy95:
++YYCURSOR;
YYDEBUG(96, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1854 "Zend/zend_language_scanner.l"
+#line 1865 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1955,7 +1957,7 @@ yy95:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1959 "Zend/zend_language_scanner.c"
+#line 1961 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_END_HEREDOC:
@@ -1966,19 +1968,20 @@ yyc_ST_END_HEREDOC:
++YYCURSOR;
YYDEBUG(100, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2159 "Zend/zend_language_scanner.l"
+#line 2169 "Zend/zend_language_scanner.l"
{
- YYCURSOR += CG(heredoc_len) - 1;
- yyleng = CG(heredoc_len);
+ zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack));
+
+ YYCURSOR += heredoc_label->length - 1;
+ yyleng = heredoc_label->length;
+
+ heredoc_label_dtor(heredoc_label);
+ efree(heredoc_label);
- Z_STRVAL_P(zendlval) = CG(heredoc);
- Z_STRLEN_P(zendlval) = CG(heredoc_len);
- CG(heredoc) = NULL;
- CG(heredoc_len) = 0;
BEGIN(ST_IN_SCRIPTING);
return T_END_HEREDOC;
}
-#line 1982 "Zend/zend_language_scanner.c"
+#line 1985 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_HEREDOC:
{
@@ -2040,10 +2043,12 @@ yy103:
yy104:
YYDEBUG(104, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2283 "Zend/zend_language_scanner.l"
+#line 2294 "Zend/zend_language_scanner.l"
{
int newline = 0;
+ zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
+
if (YYCURSOR > YYLIMIT) {
return 0;
}
@@ -2059,8 +2064,8 @@ yy104:
/* fall through */
case '\n':
/* Check for ending label on the next line */
- if (IS_LABEL_START(*YYCURSOR) && CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, CG(heredoc), CG(heredoc_len))) {
- YYCTYPE *end = YYCURSOR + CG(heredoc_len);
+ if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
+ YYCTYPE *end = YYCURSOR + heredoc_label->length;
if (*end == ';') {
end++;
@@ -2111,7 +2116,7 @@ heredoc_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0 TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 2115 "Zend/zend_language_scanner.c"
+#line 2120 "Zend/zend_language_scanner.c"
yy105:
YYDEBUG(105, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2126,14 +2131,14 @@ yy107:
++YYCURSOR;
YYDEBUG(108, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2172 "Zend/zend_language_scanner.l"
+#line 2183 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 2137 "Zend/zend_language_scanner.c"
+#line 2142 "Zend/zend_language_scanner.c"
yy109:
YYDEBUG(109, *YYCURSOR);
yyaccept = 0;
@@ -2149,24 +2154,24 @@ yy109:
yy111:
YYDEBUG(111, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1883 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2159 "Zend/zend_language_scanner.c"
+#line 2164 "Zend/zend_language_scanner.c"
yy112:
YYDEBUG(112, *YYCURSOR);
++YYCURSOR;
YYDEBUG(113, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1449 "Zend/zend_language_scanner.l"
+#line 1459 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 2170 "Zend/zend_language_scanner.c"
+#line 2175 "Zend/zend_language_scanner.c"
yy114:
YYDEBUG(114, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2180,7 +2185,7 @@ yy116:
++YYCURSOR;
YYDEBUG(117, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1864 "Zend/zend_language_scanner.l"
+#line 1875 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -2188,7 +2193,7 @@ yy116:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2192 "Zend/zend_language_scanner.c"
+#line 2197 "Zend/zend_language_scanner.c"
yy118:
YYDEBUG(118, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2206,7 +2211,7 @@ yy119:
++YYCURSOR;
YYDEBUG(120, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1854 "Zend/zend_language_scanner.l"
+#line 1865 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -2214,7 +2219,7 @@ yy119:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2218 "Zend/zend_language_scanner.c"
+#line 2223 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_IN_SCRIPTING:
@@ -2286,32 +2291,32 @@ yyc_ST_IN_SCRIPTING:
case 0x1C:
case 0x1D:
case 0x1E:
- case 0x1F: goto yy183;
+ case 0x1F: goto yy184;
case '\t':
case '\n':
case '\r':
- case ' ': goto yy139;
- case '!': goto yy152;
- case '"': goto yy179;
- case '#': goto yy175;
- case '$': goto yy164;
- case '%': goto yy158;
- case '&': goto yy159;
- case '\'': goto yy177;
- case '(': goto yy146;
+ case ' ': goto yy140;
+ case '!': goto yy153;
+ case '"': goto yy180;
+ case '#': goto yy176;
+ case '$': goto yy165;
+ case '%': goto yy159;
+ case '&': goto yy160;
+ case '\'': goto yy178;
+ case '(': goto yy147;
case ')':
case ',':
case ';':
case '@':
case '[':
case ']':
- case '~': goto yy165;
- case '*': goto yy155;
- case '+': goto yy151;
- case '-': goto yy137;
- case '.': goto yy157;
- case '/': goto yy156;
- case '0': goto yy171;
+ case '~': goto yy166;
+ case '*': goto yy156;
+ case '+': goto yy152;
+ case '-': goto yy138;
+ case '.': goto yy158;
+ case '/': goto yy157;
+ case '0': goto yy172;
case '1':
case '2':
case '3':
@@ -2320,16 +2325,16 @@ yyc_ST_IN_SCRIPTING:
case '6':
case '7':
case '8':
- case '9': goto yy173;
- case ':': goto yy141;
- case '<': goto yy153;
- case '=': goto yy149;
- case '>': goto yy154;
- case '?': goto yy166;
+ case '9': goto yy174;
+ case ':': goto yy142;
+ case '<': goto yy154;
+ case '=': goto yy150;
+ case '>': goto yy155;
+ case '?': goto yy167;
case 'A':
- case 'a': goto yy132;
+ case 'a': goto yy133;
case 'B':
- case 'b': goto yy134;
+ case 'b': goto yy135;
case 'C':
case 'c': goto yy127;
case 'D':
@@ -2339,39 +2344,41 @@ yyc_ST_IN_SCRIPTING:
case 'F':
case 'f': goto yy126;
case 'G':
- case 'g': goto yy135;
+ case 'g': goto yy136;
case 'I':
- case 'i': goto yy130;
+ case 'i': goto yy131;
case 'L':
- case 'l': goto yy150;
+ case 'l': goto yy151;
case 'N':
- case 'n': goto yy144;
+ case 'n': goto yy145;
case 'O':
- case 'o': goto yy162;
+ case 'o': goto yy163;
case 'P':
- case 'p': goto yy136;
+ case 'p': goto yy137;
case 'R':
case 'r': goto yy128;
case 'S':
- case 's': goto yy133;
+ case 's': goto yy134;
case 'T':
- case 't': goto yy129;
+ case 't': goto yy130;
case 'U':
- case 'u': goto yy147;
+ case 'u': goto yy148;
case 'V':
- case 'v': goto yy145;
+ case 'v': goto yy146;
case 'W':
- case 'w': goto yy131;
+ case 'w': goto yy132;
case 'X':
- case 'x': goto yy163;
- case '\\': goto yy142;
- case '^': goto yy161;
- case '_': goto yy148;
- case '`': goto yy181;
- case '{': goto yy167;
- case '|': goto yy160;
- case '}': goto yy169;
- default: goto yy174;
+ case 'x': goto yy164;
+ case 'Y':
+ case 'y': goto yy129;
+ case '\\': goto yy143;
+ case '^': goto yy162;
+ case '_': goto yy149;
+ case '`': goto yy182;
+ case '{': goto yy168;
+ case '|': goto yy161;
+ case '}': goto yy170;
+ default: goto yy175;
}
yy123:
YYDEBUG(123, *YYCURSOR);
@@ -2379,49 +2386,49 @@ yy123:
YYDEBUG(-1, yych);
switch ((yych = *YYCURSOR)) {
case 'C':
- case 'c': goto yy726;
+ case 'c': goto yy735;
case 'L':
- case 'l': goto yy727;
+ case 'l': goto yy736;
case 'M':
- case 'm': goto yy728;
+ case 'm': goto yy737;
case 'N':
- case 'n': goto yy729;
+ case 'n': goto yy738;
case 'V':
- case 'v': goto yy730;
+ case 'v': goto yy739;
case 'X':
- case 'x': goto yy731;
- default: goto yy186;
+ case 'x': goto yy740;
+ default: goto yy187;
}
yy124:
YYDEBUG(124, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1895 "Zend/zend_language_scanner.l"
+#line 1906 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 2405 "Zend/zend_language_scanner.c"
+#line 2412 "Zend/zend_language_scanner.c"
yy125:
YYDEBUG(125, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
if (yych <= 'H') {
- if (yych == 'E') goto yy708;
- goto yy186;
+ if (yych == 'E') goto yy717;
+ goto yy187;
} else {
- if (yych <= 'I') goto yy709;
- if (yych <= 'N') goto yy186;
- goto yy710;
+ if (yych <= 'I') goto yy718;
+ if (yych <= 'N') goto yy187;
+ goto yy719;
}
} else {
if (yych <= 'h') {
- if (yych == 'e') goto yy708;
- goto yy186;
+ if (yych == 'e') goto yy717;
+ goto yy187;
} else {
- if (yych <= 'i') goto yy709;
- if (yych == 'o') goto yy710;
- goto yy186;
+ if (yych <= 'i') goto yy718;
+ if (yych == 'o') goto yy719;
+ goto yy187;
}
}
yy126:
@@ -2429,21 +2436,21 @@ yy126:
yych = *++YYCURSOR;
if (yych <= 'U') {
if (yych <= 'N') {
- if (yych == 'I') goto yy687;
- goto yy186;
+ if (yych == 'I') goto yy693;
+ goto yy187;
} else {
- if (yych <= 'O') goto yy688;
- if (yych <= 'T') goto yy186;
- goto yy689;
+ if (yych <= 'O') goto yy694;
+ if (yych <= 'T') goto yy187;
+ goto yy695;
}
} else {
if (yych <= 'n') {
- if (yych == 'i') goto yy687;
- goto yy186;
+ if (yych == 'i') goto yy693;
+ goto yy187;
} else {
- if (yych <= 'o') goto yy688;
- if (yych == 'u') goto yy689;
- goto yy186;
+ if (yych <= 'o') goto yy694;
+ if (yych == 'u') goto yy695;
+ goto yy187;
}
}
yy127:
@@ -2451,196 +2458,202 @@ yy127:
yych = *++YYCURSOR;
if (yych <= 'O') {
if (yych <= 'K') {
- if (yych == 'A') goto yy652;
- goto yy186;
+ if (yych == 'A') goto yy658;
+ goto yy187;
} else {
- if (yych <= 'L') goto yy653;
- if (yych <= 'N') goto yy186;
- goto yy654;
+ if (yych <= 'L') goto yy659;
+ if (yych <= 'N') goto yy187;
+ goto yy660;
}
} else {
if (yych <= 'k') {
- if (yych == 'a') goto yy652;
- goto yy186;
+ if (yych == 'a') goto yy658;
+ goto yy187;
} else {
- if (yych <= 'l') goto yy653;
- if (yych == 'o') goto yy654;
- goto yy186;
+ if (yych <= 'l') goto yy659;
+ if (yych == 'o') goto yy660;
+ goto yy187;
}
}
yy128:
YYDEBUG(128, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy634;
- if (yych == 'e') goto yy634;
- goto yy186;
+ if (yych == 'E') goto yy640;
+ if (yych == 'e') goto yy640;
+ goto yy187;
yy129:
YYDEBUG(129, *YYCURSOR);
yych = *++YYCURSOR;
+ if (yych == 'I') goto yy635;
+ if (yych == 'i') goto yy635;
+ goto yy187;
+yy130:
+ YYDEBUG(130, *YYCURSOR);
+ yych = *++YYCURSOR;
if (yych <= 'R') {
- if (yych == 'H') goto yy622;
- if (yych <= 'Q') goto yy186;
- goto yy623;
+ if (yych == 'H') goto yy623;
+ if (yych <= 'Q') goto yy187;
+ goto yy624;
} else {
if (yych <= 'h') {
- if (yych <= 'g') goto yy186;
- goto yy622;
+ if (yych <= 'g') goto yy187;
+ goto yy623;
} else {
- if (yych == 'r') goto yy623;
- goto yy186;
+ if (yych == 'r') goto yy624;
+ goto yy187;
}
}
-yy130:
- YYDEBUG(130, *YYCURSOR);
+yy131:
+ YYDEBUG(131, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'S') {
if (yych <= 'L') {
- if (yych == 'F') goto yy569;
- goto yy186;
+ if (yych == 'F') goto yy570;
+ goto yy187;
} else {
- if (yych <= 'M') goto yy571;
- if (yych <= 'N') goto yy572;
- if (yych <= 'R') goto yy186;
- goto yy573;
+ if (yych <= 'M') goto yy572;
+ if (yych <= 'N') goto yy573;
+ if (yych <= 'R') goto yy187;
+ goto yy574;
}
} else {
if (yych <= 'm') {
- if (yych == 'f') goto yy569;
- if (yych <= 'l') goto yy186;
- goto yy571;
+ if (yych == 'f') goto yy570;
+ if (yych <= 'l') goto yy187;
+ goto yy572;
} else {
- if (yych <= 'n') goto yy572;
- if (yych == 's') goto yy573;
- goto yy186;
+ if (yych <= 'n') goto yy573;
+ if (yych == 's') goto yy574;
+ goto yy187;
}
}
-yy131:
- YYDEBUG(131, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'H') goto yy564;
- if (yych == 'h') goto yy564;
- goto yy186;
yy132:
YYDEBUG(132, *YYCURSOR);
yych = *++YYCURSOR;
+ if (yych == 'H') goto yy565;
+ if (yych == 'h') goto yy565;
+ goto yy187;
+yy133:
+ YYDEBUG(133, *YYCURSOR);
+ yych = *++YYCURSOR;
if (yych <= 'S') {
if (yych <= 'M') {
- if (yych == 'B') goto yy546;
- goto yy186;
+ if (yych == 'B') goto yy547;
+ goto yy187;
} else {
- if (yych <= 'N') goto yy547;
- if (yych <= 'Q') goto yy186;
- if (yych <= 'R') goto yy548;
- goto yy549;
+ if (yych <= 'N') goto yy548;
+ if (yych <= 'Q') goto yy187;
+ if (yych <= 'R') goto yy549;
+ goto yy550;
}
} else {
if (yych <= 'n') {
- if (yych == 'b') goto yy546;
- if (yych <= 'm') goto yy186;
- goto yy547;
+ if (yych == 'b') goto yy547;
+ if (yych <= 'm') goto yy187;
+ goto yy548;
} else {
- if (yych <= 'q') goto yy186;
- if (yych <= 'r') goto yy548;
- if (yych <= 's') goto yy549;
- goto yy186;
+ if (yych <= 'q') goto yy187;
+ if (yych <= 'r') goto yy549;
+ if (yych <= 's') goto yy550;
+ goto yy187;
}
}
-yy133:
- YYDEBUG(133, *YYCURSOR);
+yy134:
+ YYDEBUG(134, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'W') {
- if (yych == 'T') goto yy534;
- if (yych <= 'V') goto yy186;
- goto yy535;
+ if (yych == 'T') goto yy535;
+ if (yych <= 'V') goto yy187;
+ goto yy536;
} else {
if (yych <= 't') {
- if (yych <= 's') goto yy186;
- goto yy534;
+ if (yych <= 's') goto yy187;
+ goto yy535;
} else {
- if (yych == 'w') goto yy535;
- goto yy186;
+ if (yych == 'w') goto yy536;
+ goto yy187;
}
}
-yy134:
- YYDEBUG(134, *YYCURSOR);
+yy135:
+ YYDEBUG(135, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ';') {
if (yych <= '"') {
- if (yych <= '!') goto yy186;
- goto yy526;
+ if (yych <= '!') goto yy187;
+ goto yy527;
} else {
- if (yych == '\'') goto yy527;
- goto yy186;
+ if (yych == '\'') goto yy528;
+ goto yy187;
}
} else {
if (yych <= 'R') {
- if (yych <= '<') goto yy525;
- if (yych <= 'Q') goto yy186;
- goto yy528;
+ if (yych <= '<') goto yy526;
+ if (yych <= 'Q') goto yy187;
+ goto yy529;
} else {
- if (yych == 'r') goto yy528;
- goto yy186;
+ if (yych == 'r') goto yy529;
+ goto yy187;
}
}
-yy135:
- YYDEBUG(135, *YYCURSOR);
+yy136:
+ YYDEBUG(136, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'L') goto yy515;
- if (yych <= 'N') goto yy186;
- goto yy516;
+ if (yych == 'L') goto yy516;
+ if (yych <= 'N') goto yy187;
+ goto yy517;
} else {
if (yych <= 'l') {
- if (yych <= 'k') goto yy186;
- goto yy515;
+ if (yych <= 'k') goto yy187;
+ goto yy516;
} else {
- if (yych == 'o') goto yy516;
- goto yy186;
+ if (yych == 'o') goto yy517;
+ goto yy187;
}
}
-yy136:
- YYDEBUG(136, *YYCURSOR);
+yy137:
+ YYDEBUG(137, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'U') {
- if (yych == 'R') goto yy491;
- if (yych <= 'T') goto yy186;
- goto yy492;
+ if (yych == 'R') goto yy492;
+ if (yych <= 'T') goto yy187;
+ goto yy493;
} else {
if (yych <= 'r') {
- if (yych <= 'q') goto yy186;
- goto yy491;
+ if (yych <= 'q') goto yy187;
+ goto yy492;
} else {
- if (yych == 'u') goto yy492;
- goto yy186;
+ if (yych == 'u') goto yy493;
+ goto yy187;
}
}
-yy137:
- YYDEBUG(137, *YYCURSOR);
+yy138:
+ YYDEBUG(138, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '<') {
- if (yych == '-') goto yy487;
+ if (yych == '-') goto yy488;
} else {
- if (yych <= '=') goto yy485;
- if (yych <= '>') goto yy489;
+ if (yych <= '=') goto yy486;
+ if (yych <= '>') goto yy490;
}
-yy138:
- YYDEBUG(138, *YYCURSOR);
+yy139:
+ YYDEBUG(139, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1438 "Zend/zend_language_scanner.l"
+#line 1448 "Zend/zend_language_scanner.l"
{
return yytext[0];
}
-#line 2635 "Zend/zend_language_scanner.c"
-yy139:
- YYDEBUG(139, *YYCURSOR);
- ++YYCURSOR;
- yych = *YYCURSOR;
- goto yy484;
+#line 2648 "Zend/zend_language_scanner.c"
yy140:
YYDEBUG(140, *YYCURSOR);
+ ++YYCURSOR;
+ yych = *YYCURSOR;
+ goto yy485;
+yy141:
+ YYDEBUG(141, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1169 "Zend/zend_language_scanner.l"
+#line 1179 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -2648,261 +2661,261 @@ yy140:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 2652 "Zend/zend_language_scanner.c"
-yy141:
- YYDEBUG(141, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == ':') goto yy481;
- goto yy138;
+#line 2665 "Zend/zend_language_scanner.c"
yy142:
YYDEBUG(142, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy482;
+ goto yy139;
+yy143:
YYDEBUG(143, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(144, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1198 "Zend/zend_language_scanner.l"
+#line 1208 "Zend/zend_language_scanner.l"
{
return T_NS_SEPARATOR;
}
-#line 2667 "Zend/zend_language_scanner.c"
-yy144:
- YYDEBUG(144, *YYCURSOR);
+#line 2680 "Zend/zend_language_scanner.c"
+yy145:
+ YYDEBUG(145, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'E') {
- if (yych == 'A') goto yy469;
- if (yych <= 'D') goto yy186;
- goto yy470;
+ if (yych == 'A') goto yy470;
+ if (yych <= 'D') goto yy187;
+ goto yy471;
} else {
if (yych <= 'a') {
- if (yych <= '`') goto yy186;
- goto yy469;
+ if (yych <= '`') goto yy187;
+ goto yy470;
} else {
- if (yych == 'e') goto yy470;
- goto yy186;
+ if (yych == 'e') goto yy471;
+ goto yy187;
}
}
-yy145:
- YYDEBUG(145, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy466;
- if (yych == 'a') goto yy466;
- goto yy186;
yy146:
YYDEBUG(146, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy467;
+ if (yych == 'a') goto yy467;
+ goto yy187;
+yy147:
+ YYDEBUG(147, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'S') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == '\t') goto yy391;
- if (yych <= 0x1F) goto yy138;
- goto yy391;
+ if (yych == '\t') goto yy392;
+ if (yych <= 0x1F) goto yy139;
+ goto yy392;
} else {
- if (yych <= '@') goto yy138;
- if (yych == 'C') goto yy138;
- goto yy391;
+ if (yych <= '@') goto yy139;
+ if (yych == 'C') goto yy139;
+ goto yy392;
}
} else {
if (yych <= 'I') {
- if (yych == 'F') goto yy391;
- if (yych <= 'H') goto yy138;
- goto yy391;
+ if (yych == 'F') goto yy392;
+ if (yych <= 'H') goto yy139;
+ goto yy392;
} else {
- if (yych == 'O') goto yy391;
- if (yych <= 'Q') goto yy138;
- goto yy391;
+ if (yych == 'O') goto yy392;
+ if (yych <= 'Q') goto yy139;
+ goto yy392;
}
}
} else {
if (yych <= 'f') {
if (yych <= 'b') {
- if (yych == 'U') goto yy391;
- if (yych <= '`') goto yy138;
- goto yy391;
+ if (yych == 'U') goto yy392;
+ if (yych <= '`') goto yy139;
+ goto yy392;
} else {
- if (yych == 'd') goto yy391;
- if (yych <= 'e') goto yy138;
- goto yy391;
+ if (yych == 'd') goto yy392;
+ if (yych <= 'e') goto yy139;
+ goto yy392;
}
} else {
if (yych <= 'o') {
- if (yych == 'i') goto yy391;
- if (yych <= 'n') goto yy138;
- goto yy391;
+ if (yych == 'i') goto yy392;
+ if (yych <= 'n') goto yy139;
+ goto yy392;
} else {
if (yych <= 's') {
- if (yych <= 'q') goto yy138;
- goto yy391;
+ if (yych <= 'q') goto yy139;
+ goto yy392;
} else {
- if (yych == 'u') goto yy391;
- goto yy138;
+ if (yych == 'u') goto yy392;
+ goto yy139;
}
}
}
}
-yy147:
- YYDEBUG(147, *YYCURSOR);
+yy148:
+ YYDEBUG(148, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'S') {
- if (yych == 'N') goto yy382;
- if (yych <= 'R') goto yy186;
- goto yy383;
+ if (yych == 'N') goto yy383;
+ if (yych <= 'R') goto yy187;
+ goto yy384;
} else {
if (yych <= 'n') {
- if (yych <= 'm') goto yy186;
- goto yy382;
+ if (yych <= 'm') goto yy187;
+ goto yy383;
} else {
- if (yych == 's') goto yy383;
- goto yy186;
+ if (yych == 's') goto yy384;
+ goto yy187;
}
}
-yy148:
- YYDEBUG(148, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '_') goto yy300;
- goto yy186;
yy149:
YYDEBUG(149, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= '<') goto yy138;
- if (yych <= '=') goto yy294;
- if (yych <= '>') goto yy296;
- goto yy138;
+ if (yych == '_') goto yy301;
+ goto yy187;
yy150:
YYDEBUG(150, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy290;
- if (yych == 'i') goto yy290;
- goto yy186;
+ if (yych <= '<') goto yy139;
+ if (yych <= '=') goto yy295;
+ if (yych <= '>') goto yy297;
+ goto yy139;
yy151:
YYDEBUG(151, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '+') goto yy288;
- if (yych == '=') goto yy286;
- goto yy138;
+ if (yych == 'I') goto yy291;
+ if (yych == 'i') goto yy291;
+ goto yy187;
yy152:
YYDEBUG(152, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy283;
- goto yy138;
+ if (yych == '+') goto yy289;
+ if (yych == '=') goto yy287;
+ goto yy139;
yy153:
YYDEBUG(153, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '=') goto yy284;
+ goto yy139;
+yy154:
+ YYDEBUG(154, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ';') {
- if (yych == '/') goto yy255;
- goto yy138;
+ if (yych == '/') goto yy256;
+ goto yy139;
} else {
- if (yych <= '<') goto yy253;
- if (yych <= '=') goto yy256;
- if (yych <= '>') goto yy258;
- goto yy138;
+ if (yych <= '<') goto yy254;
+ if (yych <= '=') goto yy257;
+ if (yych <= '>') goto yy259;
+ goto yy139;
}
-yy154:
- YYDEBUG(154, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= '<') goto yy138;
- if (yych <= '=') goto yy249;
- if (yych <= '>') goto yy247;
- goto yy138;
yy155:
YYDEBUG(155, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy245;
- goto yy138;
+ if (yych <= '<') goto yy139;
+ if (yych <= '=') goto yy250;
+ if (yych <= '>') goto yy248;
+ goto yy139;
yy156:
YYDEBUG(156, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= '.') {
- if (yych == '*') goto yy237;
- goto yy138;
- } else {
- if (yych <= '/') goto yy239;
- if (yych == '=') goto yy240;
- goto yy138;
- }
+ if (yych == '=') goto yy246;
+ goto yy139;
yy157:
YYDEBUG(157, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= '/') goto yy138;
- if (yych <= '9') goto yy233;
- if (yych == '=') goto yy235;
- goto yy138;
+ if (yych <= '.') {
+ if (yych == '*') goto yy238;
+ goto yy139;
+ } else {
+ if (yych <= '/') goto yy240;
+ if (yych == '=') goto yy241;
+ goto yy139;
+ }
yy158:
YYDEBUG(158, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= '<') goto yy138;
- if (yych <= '=') goto yy229;
- if (yych <= '>') goto yy227;
- goto yy138;
+ if (yych <= '/') goto yy139;
+ if (yych <= '9') goto yy234;
+ if (yych == '=') goto yy236;
+ goto yy139;
yy159:
YYDEBUG(159, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '&') goto yy223;
- if (yych == '=') goto yy225;
- goto yy138;
+ if (yych <= '<') goto yy139;
+ if (yych <= '=') goto yy230;
+ if (yych <= '>') goto yy228;
+ goto yy139;
yy160:
YYDEBUG(160, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy221;
- if (yych == '|') goto yy219;
- goto yy138;
+ if (yych == '&') goto yy224;
+ if (yych == '=') goto yy226;
+ goto yy139;
yy161:
YYDEBUG(161, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy217;
- goto yy138;
+ if (yych == '=') goto yy222;
+ if (yych == '|') goto yy220;
+ goto yy139;
yy162:
YYDEBUG(162, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy215;
- if (yych == 'r') goto yy215;
- goto yy186;
+ if (yych == '=') goto yy218;
+ goto yy139;
yy163:
YYDEBUG(163, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy212;
- if (yych == 'o') goto yy212;
- goto yy186;
+ if (yych == 'R') goto yy216;
+ if (yych == 'r') goto yy216;
+ goto yy187;
yy164:
YYDEBUG(164, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= '_') {
- if (yych <= '@') goto yy138;
- if (yych <= 'Z') goto yy209;
- if (yych <= '^') goto yy138;
- goto yy209;
- } else {
- if (yych <= '`') goto yy138;
- if (yych <= 'z') goto yy209;
- if (yych <= '~') goto yy138;
- goto yy209;
- }
+ if (yych == 'O') goto yy213;
+ if (yych == 'o') goto yy213;
+ goto yy187;
yy165:
YYDEBUG(165, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy138;
+ if (yych <= '_') {
+ if (yych <= '@') goto yy139;
+ if (yych <= 'Z') goto yy210;
+ if (yych <= '^') goto yy139;
+ goto yy210;
+ } else {
+ if (yych <= '`') goto yy139;
+ if (yych <= 'z') goto yy210;
+ if (yych <= '~') goto yy139;
+ goto yy210;
+ }
yy166:
YYDEBUG(166, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '>') goto yy205;
- goto yy138;
+ goto yy139;
yy167:
YYDEBUG(167, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ if (yych == '>') goto yy206;
+ goto yy139;
+yy168:
YYDEBUG(168, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(169, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1443 "Zend/zend_language_scanner.l"
+#line 1453 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return '{';
}
-#line 2900 "Zend/zend_language_scanner.c"
-yy169:
- YYDEBUG(169, *YYCURSOR);
- ++YYCURSOR;
+#line 2913 "Zend/zend_language_scanner.c"
+yy170:
YYDEBUG(170, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(171, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1455 "Zend/zend_language_scanner.l"
+#line 1465 "Zend/zend_language_scanner.l"
{
RESET_DOC_COMMENT();
if (!zend_stack_is_empty(&SCNG(state_stack))) {
@@ -2910,35 +2923,35 @@ yy169:
}
return '}';
}
-#line 2914 "Zend/zend_language_scanner.c"
-yy171:
- YYDEBUG(171, *YYCURSOR);
+#line 2927 "Zend/zend_language_scanner.c"
+yy172:
+ YYDEBUG(172, *YYCURSOR);
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'E') {
if (yych <= '9') {
- if (yych == '.') goto yy187;
- if (yych >= '0') goto yy190;
+ if (yych == '.') goto yy188;
+ if (yych >= '0') goto yy191;
} else {
- if (yych == 'B') goto yy198;
- if (yych >= 'E') goto yy192;
+ if (yych == 'B') goto yy199;
+ if (yych >= 'E') goto yy193;
}
} else {
if (yych <= 'b') {
- if (yych == 'X') goto yy197;
- if (yych >= 'b') goto yy198;
+ if (yych == 'X') goto yy198;
+ if (yych >= 'b') goto yy199;
} else {
if (yych <= 'e') {
- if (yych >= 'e') goto yy192;
+ if (yych >= 'e') goto yy193;
} else {
- if (yych == 'x') goto yy197;
+ if (yych == 'x') goto yy198;
}
}
}
-yy172:
- YYDEBUG(172, *YYCURSOR);
+yy173:
+ YYDEBUG(173, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1505 "Zend/zend_language_scanner.l"
+#line 1516 "Zend/zend_language_scanner.l"
{
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
zendlval->value.lval = strtol(yytext, NULL, 0);
@@ -2959,35 +2972,35 @@ yy172:
zendlval->type = IS_LONG;
return T_LNUMBER;
}
-#line 2963 "Zend/zend_language_scanner.c"
-yy173:
- YYDEBUG(173, *YYCURSOR);
+#line 2976 "Zend/zend_language_scanner.c"
+yy174:
+ YYDEBUG(174, *YYCURSOR);
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
- if (yych == '.') goto yy187;
- if (yych <= '/') goto yy172;
- goto yy190;
+ if (yych == '.') goto yy188;
+ if (yych <= '/') goto yy173;
+ goto yy191;
} else {
if (yych <= 'E') {
- if (yych <= 'D') goto yy172;
- goto yy192;
+ if (yych <= 'D') goto yy173;
+ goto yy193;
} else {
- if (yych == 'e') goto yy192;
- goto yy172;
+ if (yych == 'e') goto yy193;
+ goto yy173;
}
}
-yy174:
- YYDEBUG(174, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy186;
yy175:
YYDEBUG(175, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ goto yy187;
yy176:
YYDEBUG(176, *YYCURSOR);
+ ++YYCURSOR;
+yy177:
+ YYDEBUG(177, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1902 "Zend/zend_language_scanner.l"
+#line 1913 "Zend/zend_language_scanner.l"
{
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
@@ -3021,14 +3034,14 @@ yy176:
return T_COMMENT;
}
-#line 3025 "Zend/zend_language_scanner.c"
-yy177:
- YYDEBUG(177, *YYCURSOR);
- ++YYCURSOR;
+#line 3038 "Zend/zend_language_scanner.c"
yy178:
YYDEBUG(178, *YYCURSOR);
+ ++YYCURSOR;
+yy179:
+ YYDEBUG(179, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1993 "Zend/zend_language_scanner.l"
+#line 2004 "Zend/zend_language_scanner.l"
{
register char *s, *t;
char *end;
@@ -3096,14 +3109,14 @@ yy178:
}
return T_CONSTANT_ENCAPSED_STRING;
}
-#line 3100 "Zend/zend_language_scanner.c"
-yy179:
- YYDEBUG(179, *YYCURSOR);
- ++YYCURSOR;
+#line 3113 "Zend/zend_language_scanner.c"
yy180:
YYDEBUG(180, *YYCURSOR);
+ ++YYCURSOR;
+yy181:
+ YYDEBUG(181, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2062 "Zend/zend_language_scanner.l"
+#line 2073 "Zend/zend_language_scanner.l"
{
int bprefix = (yytext[0] != '"') ? 1 : 0;
@@ -3144,24 +3157,24 @@ yy180:
BEGIN(ST_DOUBLE_QUOTES);
return '"';
}
-#line 3148 "Zend/zend_language_scanner.c"
-yy181:
- YYDEBUG(181, *YYCURSOR);
- ++YYCURSOR;
+#line 3161 "Zend/zend_language_scanner.c"
+yy182:
YYDEBUG(182, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(183, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2153 "Zend/zend_language_scanner.l"
+#line 2163 "Zend/zend_language_scanner.l"
{
BEGIN(ST_BACKQUOTE);
return '`';
}
-#line 3159 "Zend/zend_language_scanner.c"
-yy183:
- YYDEBUG(183, *YYCURSOR);
- ++YYCURSOR;
+#line 3172 "Zend/zend_language_scanner.c"
+yy184:
YYDEBUG(184, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(185, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2411 "Zend/zend_language_scanner.l"
+#line 2426 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -3170,132 +3183,132 @@ yy183:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 3174 "Zend/zend_language_scanner.c"
-yy185:
- YYDEBUG(185, *YYCURSOR);
+#line 3187 "Zend/zend_language_scanner.c"
+yy186:
+ YYDEBUG(186, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy186:
- YYDEBUG(186, *YYCURSOR);
+yy187:
+ YYDEBUG(187, *YYCURSOR);
if (yybm[0+yych] & 4) {
- goto yy185;
+ goto yy186;
}
goto yy124;
-yy187:
- YYDEBUG(187, *YYCURSOR);
+yy188:
+ YYDEBUG(188, *YYCURSOR);
yyaccept = 3;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(188, *YYCURSOR);
+ YYDEBUG(189, *YYCURSOR);
if (yybm[0+yych] & 8) {
- goto yy187;
+ goto yy188;
}
- if (yych == 'E') goto yy192;
- if (yych == 'e') goto yy192;
-yy189:
- YYDEBUG(189, *YYCURSOR);
+ if (yych == 'E') goto yy193;
+ if (yych == 'e') goto yy193;
+yy190:
+ YYDEBUG(190, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1570 "Zend/zend_language_scanner.l"
+#line 1581 "Zend/zend_language_scanner.l"
{
zendlval->value.dval = zend_strtod(yytext, NULL);
zendlval->type = IS_DOUBLE;
return T_DNUMBER;
}
-#line 3207 "Zend/zend_language_scanner.c"
-yy190:
- YYDEBUG(190, *YYCURSOR);
+#line 3220 "Zend/zend_language_scanner.c"
+yy191:
+ YYDEBUG(191, *YYCURSOR);
yyaccept = 2;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(191, *YYCURSOR);
+ YYDEBUG(192, *YYCURSOR);
if (yych <= '9') {
- if (yych == '.') goto yy187;
- if (yych <= '/') goto yy172;
- goto yy190;
+ if (yych == '.') goto yy188;
+ if (yych <= '/') goto yy173;
+ goto yy191;
} else {
if (yych <= 'E') {
- if (yych <= 'D') goto yy172;
+ if (yych <= 'D') goto yy173;
} else {
- if (yych != 'e') goto yy172;
+ if (yych != 'e') goto yy173;
}
}
-yy192:
- YYDEBUG(192, *YYCURSOR);
+yy193:
+ YYDEBUG(193, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= ',') {
- if (yych == '+') goto yy194;
+ if (yych == '+') goto yy195;
} else {
- if (yych <= '-') goto yy194;
- if (yych <= '/') goto yy193;
- if (yych <= '9') goto yy195;
+ if (yych <= '-') goto yy195;
+ if (yych <= '/') goto yy194;
+ if (yych <= '9') goto yy196;
}
-yy193:
- YYDEBUG(193, *YYCURSOR);
+yy194:
+ YYDEBUG(194, *YYCURSOR);
YYCURSOR = YYMARKER;
if (yyaccept <= 2) {
if (yyaccept <= 1) {
if (yyaccept <= 0) {
goto yy124;
} else {
- goto yy138;
+ goto yy139;
}
} else {
- goto yy172;
+ goto yy173;
}
} else {
if (yyaccept <= 4) {
if (yyaccept <= 3) {
- goto yy189;
+ goto yy190;
} else {
- goto yy238;
+ goto yy239;
}
} else {
- goto yy254;
+ goto yy255;
}
}
-yy194:
- YYDEBUG(194, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy193;
- if (yych >= ':') goto yy193;
yy195:
YYDEBUG(195, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy194;
+ if (yych >= ':') goto yy194;
+yy196:
+ YYDEBUG(196, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(196, *YYCURSOR);
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy195;
- goto yy189;
-yy197:
YYDEBUG(197, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy202;
- }
- goto yy193;
+ if (yych <= '/') goto yy190;
+ if (yych <= '9') goto yy196;
+ goto yy190;
yy198:
YYDEBUG(198, *YYCURSOR);
yych = *++YYCURSOR;
- if (yybm[0+yych] & 16) {
- goto yy199;
+ if (yybm[0+yych] & 32) {
+ goto yy203;
}
- goto yy193;
+ goto yy194;
yy199:
YYDEBUG(199, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yybm[0+yych] & 16) {
+ goto yy200;
+ }
+ goto yy194;
+yy200:
+ YYDEBUG(200, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(200, *YYCURSOR);
+ YYDEBUG(201, *YYCURSOR);
if (yybm[0+yych] & 16) {
- goto yy199;
+ goto yy200;
}
- YYDEBUG(201, *YYCURSOR);
+ YYDEBUG(202, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1480 "Zend/zend_language_scanner.l"
+#line 1491 "Zend/zend_language_scanner.l"
{
char *bin = yytext + 2; /* Skip "0b" */
int len = yyleng - 2;
@@ -3320,19 +3333,19 @@ yy199:
return T_DNUMBER;
}
}
-#line 3324 "Zend/zend_language_scanner.c"
-yy202:
- YYDEBUG(202, *YYCURSOR);
+#line 3337 "Zend/zend_language_scanner.c"
+yy203:
+ YYDEBUG(203, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(203, *YYCURSOR);
+ YYDEBUG(204, *YYCURSOR);
if (yybm[0+yych] & 32) {
- goto yy202;
+ goto yy203;
}
- YYDEBUG(204, *YYCURSOR);
+ YYDEBUG(205, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1526 "Zend/zend_language_scanner.l"
+#line 1537 "Zend/zend_language_scanner.l"
{
char *hex = yytext + 2; /* Skip "0x" */
int len = yyleng - 2;
@@ -3357,16 +3370,16 @@ yy202:
return T_DNUMBER;
}
}
-#line 3361 "Zend/zend_language_scanner.c"
-yy205:
- YYDEBUG(205, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy207;
- if (yych == '\r') goto yy208;
+#line 3374 "Zend/zend_language_scanner.c"
yy206:
YYDEBUG(206, *YYCURSOR);
+ ++YYCURSOR;
+ if ((yych = *YYCURSOR) == '\n') goto yy208;
+ if (yych == '\r') goto yy209;
+yy207:
+ YYDEBUG(207, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1970 "Zend/zend_language_scanner.l"
+#line 1981 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -3374,137 +3387,137 @@ yy206:
BEGIN(INITIAL);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
}
-#line 3378 "Zend/zend_language_scanner.c"
-yy207:
- YYDEBUG(207, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy206;
+#line 3391 "Zend/zend_language_scanner.c"
yy208:
YYDEBUG(208, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '\n') goto yy207;
- goto yy206;
+ goto yy207;
yy209:
YYDEBUG(209, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy208;
+ goto yy207;
+yy210:
+ YYDEBUG(210, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(210, *YYCURSOR);
+ YYDEBUG(211, *YYCURSOR);
if (yych <= '^') {
if (yych <= '9') {
- if (yych >= '0') goto yy209;
+ if (yych >= '0') goto yy210;
} else {
- if (yych <= '@') goto yy211;
- if (yych <= 'Z') goto yy209;
+ if (yych <= '@') goto yy212;
+ if (yych <= 'Z') goto yy210;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy209;
+ if (yych <= '_') goto yy210;
} else {
- if (yych <= 'z') goto yy209;
- if (yych >= 0x7F) goto yy209;
+ if (yych <= 'z') goto yy210;
+ if (yych >= 0x7F) goto yy210;
}
}
-yy211:
- YYDEBUG(211, *YYCURSOR);
+yy212:
+ YYDEBUG(212, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1883 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 3418 "Zend/zend_language_scanner.c"
-yy212:
- YYDEBUG(212, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy213;
- if (yych != 'r') goto yy186;
+#line 3431 "Zend/zend_language_scanner.c"
yy213:
YYDEBUG(213, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'R') goto yy214;
+ if (yych != 'r') goto yy187;
+yy214:
+ YYDEBUG(214, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(214, *YYCURSOR);
+ YYDEBUG(215, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1426 "Zend/zend_language_scanner.l"
+#line 1436 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_XOR;
}
-#line 3436 "Zend/zend_language_scanner.c"
-yy215:
- YYDEBUG(215, *YYCURSOR);
+#line 3449 "Zend/zend_language_scanner.c"
+yy216:
+ YYDEBUG(216, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(216, *YYCURSOR);
+ YYDEBUG(217, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1418 "Zend/zend_language_scanner.l"
+#line 1428 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_OR;
}
-#line 3449 "Zend/zend_language_scanner.c"
-yy217:
- YYDEBUG(217, *YYCURSOR);
- ++YYCURSOR;
+#line 3462 "Zend/zend_language_scanner.c"
+yy218:
YYDEBUG(218, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(219, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1406 "Zend/zend_language_scanner.l"
+#line 1416 "Zend/zend_language_scanner.l"
{
return T_XOR_EQUAL;
}
-#line 3459 "Zend/zend_language_scanner.c"
-yy219:
- YYDEBUG(219, *YYCURSOR);
- ++YYCURSOR;
+#line 3472 "Zend/zend_language_scanner.c"
+yy220:
YYDEBUG(220, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(221, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1410 "Zend/zend_language_scanner.l"
+#line 1420 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_OR;
}
-#line 3469 "Zend/zend_language_scanner.c"
-yy221:
- YYDEBUG(221, *YYCURSOR);
- ++YYCURSOR;
+#line 3482 "Zend/zend_language_scanner.c"
+yy222:
YYDEBUG(222, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(223, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1402 "Zend/zend_language_scanner.l"
+#line 1412 "Zend/zend_language_scanner.l"
{
return T_OR_EQUAL;
}
-#line 3479 "Zend/zend_language_scanner.c"
-yy223:
- YYDEBUG(223, *YYCURSOR);
- ++YYCURSOR;
+#line 3492 "Zend/zend_language_scanner.c"
+yy224:
YYDEBUG(224, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(225, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1414 "Zend/zend_language_scanner.l"
+#line 1424 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_AND;
}
-#line 3489 "Zend/zend_language_scanner.c"
-yy225:
- YYDEBUG(225, *YYCURSOR);
- ++YYCURSOR;
+#line 3502 "Zend/zend_language_scanner.c"
+yy226:
YYDEBUG(226, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(227, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1398 "Zend/zend_language_scanner.l"
+#line 1408 "Zend/zend_language_scanner.l"
{
return T_AND_EQUAL;
}
-#line 3499 "Zend/zend_language_scanner.c"
-yy227:
- YYDEBUG(227, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy231;
- if (yych == '\r') goto yy232;
+#line 3512 "Zend/zend_language_scanner.c"
yy228:
YYDEBUG(228, *YYCURSOR);
+ ++YYCURSOR;
+ if ((yych = *YYCURSOR) == '\n') goto yy232;
+ if (yych == '\r') goto yy233;
+yy229:
+ YYDEBUG(229, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1979 "Zend/zend_language_scanner.l"
+#line 1990 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
BEGIN(INITIAL);
@@ -3517,61 +3530,61 @@ yy228:
return yytext[0];
}
}
-#line 3521 "Zend/zend_language_scanner.c"
-yy229:
- YYDEBUG(229, *YYCURSOR);
- ++YYCURSOR;
+#line 3534 "Zend/zend_language_scanner.c"
+yy230:
YYDEBUG(230, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(231, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1386 "Zend/zend_language_scanner.l"
+#line 1396 "Zend/zend_language_scanner.l"
{
return T_MOD_EQUAL;
}
-#line 3531 "Zend/zend_language_scanner.c"
-yy231:
- YYDEBUG(231, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy228;
+#line 3544 "Zend/zend_language_scanner.c"
yy232:
YYDEBUG(232, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '\n') goto yy231;
- goto yy228;
+ goto yy229;
yy233:
YYDEBUG(233, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy232;
+ goto yy229;
+yy234:
+ YYDEBUG(234, *YYCURSOR);
yyaccept = 3;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(234, *YYCURSOR);
+ YYDEBUG(235, *YYCURSOR);
if (yych <= 'D') {
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy233;
- goto yy189;
+ if (yych <= '/') goto yy190;
+ if (yych <= '9') goto yy234;
+ goto yy190;
} else {
- if (yych <= 'E') goto yy192;
- if (yych == 'e') goto yy192;
- goto yy189;
+ if (yych <= 'E') goto yy193;
+ if (yych == 'e') goto yy193;
+ goto yy190;
}
-yy235:
- YYDEBUG(235, *YYCURSOR);
- ++YYCURSOR;
+yy236:
YYDEBUG(236, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(237, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1382 "Zend/zend_language_scanner.l"
+#line 1392 "Zend/zend_language_scanner.l"
{
return T_CONCAT_EQUAL;
}
-#line 3566 "Zend/zend_language_scanner.c"
-yy237:
- YYDEBUG(237, *YYCURSOR);
- yyaccept = 4;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '*') goto yy242;
+#line 3579 "Zend/zend_language_scanner.c"
yy238:
YYDEBUG(238, *YYCURSOR);
+ yyaccept = 4;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '*') goto yy243;
+yy239:
+ YYDEBUG(239, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1936 "Zend/zend_language_scanner.l"
+#line 1947 "Zend/zend_language_scanner.l"
{
int doc_com;
@@ -3605,316 +3618,313 @@ yy238:
return T_COMMENT;
}
-#line 3609 "Zend/zend_language_scanner.c"
-yy239:
- YYDEBUG(239, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy176;
+#line 3622 "Zend/zend_language_scanner.c"
yy240:
YYDEBUG(240, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ goto yy177;
+yy241:
YYDEBUG(241, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(242, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1378 "Zend/zend_language_scanner.l"
+#line 1388 "Zend/zend_language_scanner.l"
{
return T_DIV_EQUAL;
}
-#line 3623 "Zend/zend_language_scanner.c"
-yy242:
- YYDEBUG(242, *YYCURSOR);
+#line 3636 "Zend/zend_language_scanner.c"
+yy243:
+ YYDEBUG(243, *YYCURSOR);
yych = *++YYCURSOR;
if (yybm[0+yych] & 64) {
- goto yy243;
+ goto yy244;
}
- goto yy193;
-yy243:
- YYDEBUG(243, *YYCURSOR);
+ goto yy194;
+yy244:
+ YYDEBUG(244, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(244, *YYCURSOR);
+ YYDEBUG(245, *YYCURSOR);
if (yybm[0+yych] & 64) {
- goto yy243;
+ goto yy244;
}
- goto yy238;
-yy245:
- YYDEBUG(245, *YYCURSOR);
- ++YYCURSOR;
+ goto yy239;
+yy246:
YYDEBUG(246, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(247, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1374 "Zend/zend_language_scanner.l"
+#line 1384 "Zend/zend_language_scanner.l"
{
return T_MUL_EQUAL;
}
-#line 3650 "Zend/zend_language_scanner.c"
-yy247:
- YYDEBUG(247, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) == '=') goto yy251;
+#line 3663 "Zend/zend_language_scanner.c"
+yy248:
YYDEBUG(248, *YYCURSOR);
+ ++YYCURSOR;
+ if ((yych = *YYCURSOR) == '=') goto yy252;
+ YYDEBUG(249, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1434 "Zend/zend_language_scanner.l"
+#line 1444 "Zend/zend_language_scanner.l"
{
return T_SR;
}
-#line 3661 "Zend/zend_language_scanner.c"
-yy249:
- YYDEBUG(249, *YYCURSOR);
- ++YYCURSOR;
+#line 3674 "Zend/zend_language_scanner.c"
+yy250:
YYDEBUG(250, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(251, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1362 "Zend/zend_language_scanner.l"
+#line 1372 "Zend/zend_language_scanner.l"
{
return T_IS_GREATER_OR_EQUAL;
}
-#line 3671 "Zend/zend_language_scanner.c"
-yy251:
- YYDEBUG(251, *YYCURSOR);
- ++YYCURSOR;
+#line 3684 "Zend/zend_language_scanner.c"
+yy252:
YYDEBUG(252, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(253, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1394 "Zend/zend_language_scanner.l"
+#line 1404 "Zend/zend_language_scanner.l"
{
return T_SR_EQUAL;
}
-#line 3681 "Zend/zend_language_scanner.c"
-yy253:
- YYDEBUG(253, *YYCURSOR);
- yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ';') goto yy254;
- if (yych <= '<') goto yy269;
- if (yych <= '=') goto yy267;
+#line 3694 "Zend/zend_language_scanner.c"
yy254:
YYDEBUG(254, *YYCURSOR);
+ yyaccept = 5;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ';') goto yy255;
+ if (yych <= '<') goto yy270;
+ if (yych <= '=') goto yy268;
+yy255:
+ YYDEBUG(255, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1430 "Zend/zend_language_scanner.l"
+#line 1440 "Zend/zend_language_scanner.l"
{
return T_SL;
}
-#line 3696 "Zend/zend_language_scanner.c"
-yy255:
- YYDEBUG(255, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy260;
- if (yych == 's') goto yy260;
- goto yy193;
+#line 3709 "Zend/zend_language_scanner.c"
yy256:
YYDEBUG(256, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy261;
+ if (yych == 's') goto yy261;
+ goto yy194;
+yy257:
YYDEBUG(257, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(258, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1358 "Zend/zend_language_scanner.l"
+#line 1368 "Zend/zend_language_scanner.l"
{
return T_IS_SMALLER_OR_EQUAL;
}
-#line 3712 "Zend/zend_language_scanner.c"
-yy258:
- YYDEBUG(258, *YYCURSOR);
- ++YYCURSOR;
+#line 3725 "Zend/zend_language_scanner.c"
yy259:
YYDEBUG(259, *YYCURSOR);
+ ++YYCURSOR;
+yy260:
+ YYDEBUG(260, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1354 "Zend/zend_language_scanner.l"
+#line 1364 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_EQUAL;
}
-#line 3723 "Zend/zend_language_scanner.c"
-yy260:
- YYDEBUG(260, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'C') goto yy261;
- if (yych != 'c') goto yy193;
+#line 3736 "Zend/zend_language_scanner.c"
yy261:
YYDEBUG(261, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy262;
- if (yych != 'r') goto yy193;
+ if (yych == 'C') goto yy262;
+ if (yych != 'c') goto yy194;
yy262:
YYDEBUG(262, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy263;
- if (yych != 'i') goto yy193;
+ if (yych == 'R') goto yy263;
+ if (yych != 'r') goto yy194;
yy263:
YYDEBUG(263, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy264;
- if (yych != 'p') goto yy193;
+ if (yych == 'I') goto yy264;
+ if (yych != 'i') goto yy194;
yy264:
YYDEBUG(264, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy265;
- if (yych != 't') goto yy193;
+ if (yych == 'P') goto yy265;
+ if (yych != 'p') goto yy194;
yy265:
YYDEBUG(265, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy266;
+ if (yych != 't') goto yy194;
+yy266:
+ YYDEBUG(266, *YYCURSOR);
++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(266, *YYCURSOR);
+ YYDEBUG(267, *YYCURSOR);
if (yych <= '\r') {
- if (yych <= 0x08) goto yy193;
- if (yych <= '\n') goto yy265;
- if (yych <= '\f') goto yy193;
- goto yy265;
+ if (yych <= 0x08) goto yy194;
+ if (yych <= '\n') goto yy266;
+ if (yych <= '\f') goto yy194;
+ goto yy266;
} else {
if (yych <= ' ') {
- if (yych <= 0x1F) goto yy193;
- goto yy265;
+ if (yych <= 0x1F) goto yy194;
+ goto yy266;
} else {
- if (yych == '>') goto yy205;
- goto yy193;
+ if (yych == '>') goto yy206;
+ goto yy194;
}
}
-yy267:
- YYDEBUG(267, *YYCURSOR);
- ++YYCURSOR;
+yy268:
YYDEBUG(268, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(269, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1390 "Zend/zend_language_scanner.l"
+#line 1400 "Zend/zend_language_scanner.l"
{
return T_SL_EQUAL;
}
-#line 3778 "Zend/zend_language_scanner.c"
-yy269:
- YYDEBUG(269, *YYCURSOR);
+#line 3791 "Zend/zend_language_scanner.c"
+yy270:
+ YYDEBUG(270, *YYCURSOR);
++YYCURSOR;
YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(270, *YYCURSOR);
+ YYDEBUG(271, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy269;
+ goto yy270;
}
if (yych <= 'Z') {
if (yych <= '&') {
- if (yych == '"') goto yy274;
- goto yy193;
+ if (yych == '"') goto yy275;
+ goto yy194;
} else {
- if (yych <= '\'') goto yy273;
- if (yych <= '@') goto yy193;
+ if (yych <= '\'') goto yy274;
+ if (yych <= '@') goto yy194;
}
} else {
if (yych <= '`') {
- if (yych != '_') goto yy193;
+ if (yych != '_') goto yy194;
} else {
- if (yych <= 'z') goto yy271;
- if (yych <= '~') goto yy193;
+ if (yych <= 'z') goto yy272;
+ if (yych <= '~') goto yy194;
}
}
-yy271:
- YYDEBUG(271, *YYCURSOR);
+yy272:
+ YYDEBUG(272, *YYCURSOR);
++YYCURSOR;
YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(272, *YYCURSOR);
+ YYDEBUG(273, *YYCURSOR);
if (yych <= '@') {
if (yych <= '\f') {
- if (yych == '\n') goto yy278;
- goto yy193;
+ if (yych == '\n') goto yy279;
+ goto yy194;
} else {
- if (yych <= '\r') goto yy280;
- if (yych <= '/') goto yy193;
- if (yych <= '9') goto yy271;
- goto yy193;
+ if (yych <= '\r') goto yy281;
+ if (yych <= '/') goto yy194;
+ if (yych <= '9') goto yy272;
+ goto yy194;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy271;
- if (yych <= '^') goto yy193;
- goto yy271;
+ if (yych <= 'Z') goto yy272;
+ if (yych <= '^') goto yy194;
+ goto yy272;
} else {
- if (yych <= '`') goto yy193;
- if (yych <= 'z') goto yy271;
- if (yych <= '~') goto yy193;
- goto yy271;
+ if (yych <= '`') goto yy194;
+ if (yych <= 'z') goto yy272;
+ if (yych <= '~') goto yy194;
+ goto yy272;
}
}
-yy273:
- YYDEBUG(273, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '\'') goto yy193;
- if (yych <= '/') goto yy282;
- if (yych <= '9') goto yy193;
- goto yy282;
yy274:
YYDEBUG(274, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '"') goto yy193;
- if (yych <= '/') goto yy276;
- if (yych <= '9') goto yy193;
- goto yy276;
+ if (yych == '\'') goto yy194;
+ if (yych <= '/') goto yy283;
+ if (yych <= '9') goto yy194;
+ goto yy283;
yy275:
YYDEBUG(275, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy194;
+ if (yych <= '/') goto yy277;
+ if (yych <= '9') goto yy194;
+ goto yy277;
+yy276:
+ YYDEBUG(276, *YYCURSOR);
++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
-yy276:
- YYDEBUG(276, *YYCURSOR);
+yy277:
+ YYDEBUG(277, *YYCURSOR);
if (yych <= 'Z') {
if (yych <= '/') {
- if (yych != '"') goto yy193;
+ if (yych != '"') goto yy194;
} else {
- if (yych <= '9') goto yy275;
- if (yych <= '@') goto yy193;
- goto yy275;
+ if (yych <= '9') goto yy276;
+ if (yych <= '@') goto yy194;
+ goto yy276;
}
} else {
if (yych <= '`') {
- if (yych == '_') goto yy275;
- goto yy193;
+ if (yych == '_') goto yy276;
+ goto yy194;
} else {
- if (yych <= 'z') goto yy275;
- if (yych <= '~') goto yy193;
- goto yy275;
+ if (yych <= 'z') goto yy276;
+ if (yych <= '~') goto yy194;
+ goto yy276;
}
}
-yy277:
- YYDEBUG(277, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '\n') goto yy278;
- if (yych == '\r') goto yy280;
- goto yy193;
yy278:
YYDEBUG(278, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy279;
+ if (yych == '\r') goto yy281;
+ goto yy194;
yy279:
YYDEBUG(279, *YYCURSOR);
+ ++YYCURSOR;
+yy280:
+ YYDEBUG(280, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2104 "Zend/zend_language_scanner.l"
+#line 2115 "Zend/zend_language_scanner.l"
{
char *s;
int bprefix = (yytext[0] != '<') ? 1 : 0;
-
- /* save old heredoc label */
- Z_STRVAL_P(zendlval) = CG(heredoc);
- Z_STRLEN_P(zendlval) = CG(heredoc_len);
+ zend_heredoc_label *heredoc_label = emalloc(sizeof(zend_heredoc_label));
CG(zend_lineno)++;
- CG(heredoc_len) = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0);
+ heredoc_label->length = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0);
s = yytext+bprefix+3;
while ((*s == ' ') || (*s == '\t')) {
s++;
- CG(heredoc_len)--;
+ heredoc_label->length--;
}
if (*s == '\'') {
s++;
- CG(heredoc_len) -= 2;
+ heredoc_label->length -= 2;
BEGIN(ST_NOWDOC);
} else {
if (*s == '"') {
s++;
- CG(heredoc_len) -= 2;
+ heredoc_label->length -= 2;
}
BEGIN(ST_HEREDOC);
}
- CG(heredoc) = estrndup(s, CG(heredoc_len));
+ heredoc_label->label = estrndup(s, heredoc_label->length);
/* Check for ending label on the next line */
- if (CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, CG(heredoc_len))) {
- YYCTYPE *end = YYCURSOR + CG(heredoc_len);
+ if (heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, heredoc_label->length)) {
+ YYCTYPE *end = YYCURSOR + heredoc_label->length;
if (*end == ';') {
end++;
@@ -3925,257 +3935,259 @@ yy279:
}
}
+ zend_ptr_stack_push(&SCNG(heredoc_label_stack), (void *) heredoc_label);
+
return T_START_HEREDOC;
}
-#line 3931 "Zend/zend_language_scanner.c"
-yy280:
- YYDEBUG(280, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '\n') goto yy278;
- goto yy279;
+#line 3943 "Zend/zend_language_scanner.c"
yy281:
YYDEBUG(281, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy279;
+ goto yy280;
+yy282:
+ YYDEBUG(282, *YYCURSOR);
++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
-yy282:
- YYDEBUG(282, *YYCURSOR);
+yy283:
+ YYDEBUG(283, *YYCURSOR);
if (yych <= 'Z') {
if (yych <= '/') {
- if (yych == '\'') goto yy277;
- goto yy193;
+ if (yych == '\'') goto yy278;
+ goto yy194;
} else {
- if (yych <= '9') goto yy281;
- if (yych <= '@') goto yy193;
- goto yy281;
+ if (yych <= '9') goto yy282;
+ if (yych <= '@') goto yy194;
+ goto yy282;
}
} else {
if (yych <= '`') {
- if (yych == '_') goto yy281;
- goto yy193;
+ if (yych == '_') goto yy282;
+ goto yy194;
} else {
- if (yych <= 'z') goto yy281;
- if (yych <= '~') goto yy193;
- goto yy281;
+ if (yych <= 'z') goto yy282;
+ if (yych <= '~') goto yy194;
+ goto yy282;
}
}
-yy283:
- YYDEBUG(283, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych != '=') goto yy259;
+yy284:
YYDEBUG(284, *YYCURSOR);
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ if (yych != '=') goto yy260;
YYDEBUG(285, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(286, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1346 "Zend/zend_language_scanner.l"
+#line 1356 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_IDENTICAL;
}
-#line 3975 "Zend/zend_language_scanner.c"
-yy286:
- YYDEBUG(286, *YYCURSOR);
- ++YYCURSOR;
+#line 3987 "Zend/zend_language_scanner.c"
+yy287:
YYDEBUG(287, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(288, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1366 "Zend/zend_language_scanner.l"
+#line 1376 "Zend/zend_language_scanner.l"
{
return T_PLUS_EQUAL;
}
-#line 3985 "Zend/zend_language_scanner.c"
-yy288:
- YYDEBUG(288, *YYCURSOR);
- ++YYCURSOR;
+#line 3997 "Zend/zend_language_scanner.c"
+yy289:
YYDEBUG(289, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(290, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1334 "Zend/zend_language_scanner.l"
+#line 1344 "Zend/zend_language_scanner.l"
{
return T_INC;
}
-#line 3995 "Zend/zend_language_scanner.c"
-yy290:
- YYDEBUG(290, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy291;
- if (yych != 's') goto yy186;
+#line 4007 "Zend/zend_language_scanner.c"
yy291:
YYDEBUG(291, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy292;
- if (yych != 't') goto yy186;
+ if (yych == 'S') goto yy292;
+ if (yych != 's') goto yy187;
yy292:
YYDEBUG(292, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy293;
+ if (yych != 't') goto yy187;
+yy293:
+ YYDEBUG(293, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(293, *YYCURSOR);
+ YYDEBUG(294, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1322 "Zend/zend_language_scanner.l"
+#line 1332 "Zend/zend_language_scanner.l"
{
return T_LIST;
}
-#line 4018 "Zend/zend_language_scanner.c"
-yy294:
- YYDEBUG(294, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) == '=') goto yy298;
+#line 4030 "Zend/zend_language_scanner.c"
+yy295:
YYDEBUG(295, *YYCURSOR);
+ ++YYCURSOR;
+ if ((yych = *YYCURSOR) == '=') goto yy299;
+ YYDEBUG(296, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1350 "Zend/zend_language_scanner.l"
+#line 1360 "Zend/zend_language_scanner.l"
{
return T_IS_EQUAL;
}
-#line 4029 "Zend/zend_language_scanner.c"
-yy296:
- YYDEBUG(296, *YYCURSOR);
- ++YYCURSOR;
+#line 4041 "Zend/zend_language_scanner.c"
+yy297:
YYDEBUG(297, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(298, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1318 "Zend/zend_language_scanner.l"
+#line 1328 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_ARROW;
}
-#line 4039 "Zend/zend_language_scanner.c"
-yy298:
- YYDEBUG(298, *YYCURSOR);
- ++YYCURSOR;
+#line 4051 "Zend/zend_language_scanner.c"
+yy299:
YYDEBUG(299, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(300, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1342 "Zend/zend_language_scanner.l"
+#line 1352 "Zend/zend_language_scanner.l"
{
return T_IS_IDENTICAL;
}
-#line 4049 "Zend/zend_language_scanner.c"
-yy300:
- YYDEBUG(300, *YYCURSOR);
+#line 4061 "Zend/zend_language_scanner.c"
+yy301:
+ YYDEBUG(301, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(-1, yych);
switch (yych) {
case 'C':
- case 'c': goto yy302;
+ case 'c': goto yy303;
case 'D':
- case 'd': goto yy307;
+ case 'd': goto yy308;
case 'F':
- case 'f': goto yy304;
+ case 'f': goto yy305;
case 'H':
- case 'h': goto yy301;
+ case 'h': goto yy302;
case 'L':
- case 'l': goto yy306;
+ case 'l': goto yy307;
case 'M':
- case 'm': goto yy305;
+ case 'm': goto yy306;
case 'N':
- case 'n': goto yy308;
+ case 'n': goto yy309;
case 'T':
- case 't': goto yy303;
- default: goto yy186;
+ case 't': goto yy304;
+ default: goto yy187;
}
-yy301:
- YYDEBUG(301, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy369;
- if (yych == 'a') goto yy369;
- goto yy186;
yy302:
YYDEBUG(302, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy362;
- if (yych == 'l') goto yy362;
- goto yy186;
+ if (yych == 'A') goto yy370;
+ if (yych == 'a') goto yy370;
+ goto yy187;
yy303:
YYDEBUG(303, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy355;
- if (yych == 'r') goto yy355;
- goto yy186;
+ if (yych == 'L') goto yy363;
+ if (yych == 'l') goto yy363;
+ goto yy187;
yy304:
YYDEBUG(304, *YYCURSOR);
yych = *++YYCURSOR;
+ if (yych == 'R') goto yy356;
+ if (yych == 'r') goto yy356;
+ goto yy187;
+yy305:
+ YYDEBUG(305, *YYCURSOR);
+ yych = *++YYCURSOR;
if (yych <= 'U') {
- if (yych == 'I') goto yy339;
- if (yych <= 'T') goto yy186;
- goto yy340;
+ if (yych == 'I') goto yy340;
+ if (yych <= 'T') goto yy187;
+ goto yy341;
} else {
if (yych <= 'i') {
- if (yych <= 'h') goto yy186;
- goto yy339;
+ if (yych <= 'h') goto yy187;
+ goto yy340;
} else {
- if (yych == 'u') goto yy340;
- goto yy186;
+ if (yych == 'u') goto yy341;
+ goto yy187;
}
}
-yy305:
- YYDEBUG(305, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy331;
- if (yych == 'e') goto yy331;
- goto yy186;
yy306:
YYDEBUG(306, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy325;
- if (yych == 'i') goto yy325;
- goto yy186;
+ if (yych == 'E') goto yy332;
+ if (yych == 'e') goto yy332;
+ goto yy187;
yy307:
YYDEBUG(307, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy320;
- if (yych == 'i') goto yy320;
- goto yy186;
+ if (yych == 'I') goto yy326;
+ if (yych == 'i') goto yy326;
+ goto yy187;
yy308:
YYDEBUG(308, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy309;
- if (yych != 'a') goto yy186;
+ if (yych == 'I') goto yy321;
+ if (yych == 'i') goto yy321;
+ goto yy187;
yy309:
YYDEBUG(309, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy310;
- if (yych != 'm') goto yy186;
+ if (yych == 'A') goto yy310;
+ if (yych != 'a') goto yy187;
yy310:
YYDEBUG(310, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy311;
- if (yych != 'e') goto yy186;
+ if (yych == 'M') goto yy311;
+ if (yych != 'm') goto yy187;
yy311:
YYDEBUG(311, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy312;
- if (yych != 's') goto yy186;
+ if (yych == 'E') goto yy312;
+ if (yych != 'e') goto yy187;
yy312:
YYDEBUG(312, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy313;
- if (yych != 'p') goto yy186;
+ if (yych == 'S') goto yy313;
+ if (yych != 's') goto yy187;
yy313:
YYDEBUG(313, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy314;
- if (yych != 'a') goto yy186;
+ if (yych == 'P') goto yy314;
+ if (yych != 'p') goto yy187;
yy314:
YYDEBUG(314, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy315;
- if (yych != 'c') goto yy186;
+ if (yych == 'A') goto yy315;
+ if (yych != 'a') goto yy187;
yy315:
YYDEBUG(315, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy316;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy316;
+ if (yych != 'c') goto yy187;
yy316:
YYDEBUG(316, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'E') goto yy317;
+ if (yych != 'e') goto yy187;
+yy317:
YYDEBUG(317, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(318, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(319, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(319, *YYCURSOR);
+ YYDEBUG(320, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1705 "Zend/zend_language_scanner.l"
+#line 1716 "Zend/zend_language_scanner.l"
{
if (CG(current_namespace)) {
*zendlval = *CG(current_namespace);
@@ -4185,27 +4197,27 @@ yy316:
}
return T_NS_C;
}
-#line 4189 "Zend/zend_language_scanner.c"
-yy320:
- YYDEBUG(320, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy321;
- if (yych != 'r') goto yy186;
+#line 4201 "Zend/zend_language_scanner.c"
yy321:
YYDEBUG(321, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'R') goto yy322;
+ if (yych != 'r') goto yy187;
+yy322:
YYDEBUG(322, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(323, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(324, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(324, *YYCURSOR);
+ YYDEBUG(325, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1678 "Zend/zend_language_scanner.l"
+#line 1689 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
const size_t filename_len = strlen(filename);
@@ -4232,73 +4244,73 @@ yy321:
zendlval->type = IS_STRING;
return T_DIR;
}
-#line 4236 "Zend/zend_language_scanner.c"
-yy325:
- YYDEBUG(325, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy326;
- if (yych != 'n') goto yy186;
+#line 4248 "Zend/zend_language_scanner.c"
yy326:
YYDEBUG(326, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy327;
- if (yych != 'e') goto yy186;
+ if (yych == 'N') goto yy327;
+ if (yych != 'n') goto yy187;
yy327:
YYDEBUG(327, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'E') goto yy328;
+ if (yych != 'e') goto yy187;
+yy328:
YYDEBUG(328, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(329, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(330, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(330, *YYCURSOR);
+ YYDEBUG(331, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1660 "Zend/zend_language_scanner.l"
+#line 1671 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = CG(zend_lineno);
zendlval->type = IS_LONG;
return T_LINE;
}
-#line 4267 "Zend/zend_language_scanner.c"
-yy331:
- YYDEBUG(331, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy332;
- if (yych != 't') goto yy186;
+#line 4279 "Zend/zend_language_scanner.c"
yy332:
YYDEBUG(332, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy333;
- if (yych != 'h') goto yy186;
+ if (yych == 'T') goto yy333;
+ if (yych != 't') goto yy187;
yy333:
YYDEBUG(333, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy334;
- if (yych != 'o') goto yy186;
+ if (yych == 'H') goto yy334;
+ if (yych != 'h') goto yy187;
yy334:
YYDEBUG(334, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy335;
- if (yych != 'd') goto yy186;
+ if (yych == 'O') goto yy335;
+ if (yych != 'o') goto yy187;
yy335:
YYDEBUG(335, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'D') goto yy336;
+ if (yych != 'd') goto yy187;
+yy336:
YYDEBUG(336, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(337, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(338, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(338, *YYCURSOR);
+ YYDEBUG(339, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1639 "Zend/zend_language_scanner.l"
+#line 1650 "Zend/zend_language_scanner.l"
{
const char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
const char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
@@ -4319,58 +4331,58 @@ yy335:
zendlval->type = IS_STRING;
return T_METHOD_C;
}
-#line 4323 "Zend/zend_language_scanner.c"
-yy339:
- YYDEBUG(339, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy350;
- if (yych == 'l') goto yy350;
- goto yy186;
+#line 4335 "Zend/zend_language_scanner.c"
yy340:
YYDEBUG(340, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy341;
- if (yych != 'n') goto yy186;
+ if (yych == 'L') goto yy351;
+ if (yych == 'l') goto yy351;
+ goto yy187;
yy341:
YYDEBUG(341, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy342;
- if (yych != 'c') goto yy186;
+ if (yych == 'N') goto yy342;
+ if (yych != 'n') goto yy187;
yy342:
YYDEBUG(342, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy343;
- if (yych != 't') goto yy186;
+ if (yych == 'C') goto yy343;
+ if (yych != 'c') goto yy187;
yy343:
YYDEBUG(343, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy344;
- if (yych != 'i') goto yy186;
+ if (yych == 'T') goto yy344;
+ if (yych != 't') goto yy187;
yy344:
YYDEBUG(344, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy345;
- if (yych != 'o') goto yy186;
+ if (yych == 'I') goto yy345;
+ if (yych != 'i') goto yy187;
yy345:
YYDEBUG(345, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy346;
- if (yych != 'n') goto yy186;
+ if (yych == 'O') goto yy346;
+ if (yych != 'o') goto yy187;
yy346:
YYDEBUG(346, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'N') goto yy347;
+ if (yych != 'n') goto yy187;
+yy347:
YYDEBUG(347, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(348, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(349, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(349, *YYCURSOR);
+ YYDEBUG(350, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1623 "Zend/zend_language_scanner.l"
+#line 1634 "Zend/zend_language_scanner.l"
{
const char *func_name = NULL;
@@ -4386,27 +4398,27 @@ yy346:
zendlval->type = IS_STRING;
return T_FUNC_C;
}
-#line 4390 "Zend/zend_language_scanner.c"
-yy350:
- YYDEBUG(350, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy351;
- if (yych != 'e') goto yy186;
+#line 4402 "Zend/zend_language_scanner.c"
yy351:
YYDEBUG(351, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'E') goto yy352;
+ if (yych != 'e') goto yy187;
+yy352:
YYDEBUG(352, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(353, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(354, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(354, *YYCURSOR);
+ YYDEBUG(355, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1666 "Zend/zend_language_scanner.l"
+#line 1677 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
@@ -4418,37 +4430,37 @@ yy351:
zendlval->type = IS_STRING;
return T_FILE;
}
-#line 4422 "Zend/zend_language_scanner.c"
-yy355:
- YYDEBUG(355, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy356;
- if (yych != 'a') goto yy186;
+#line 4434 "Zend/zend_language_scanner.c"
yy356:
YYDEBUG(356, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy357;
- if (yych != 'i') goto yy186;
+ if (yych == 'A') goto yy357;
+ if (yych != 'a') goto yy187;
yy357:
YYDEBUG(357, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy358;
- if (yych != 't') goto yy186;
+ if (yych == 'I') goto yy358;
+ if (yych != 'i') goto yy187;
yy358:
YYDEBUG(358, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'T') goto yy359;
+ if (yych != 't') goto yy187;
+yy359:
YYDEBUG(359, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(360, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(361, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(361, *YYCURSOR);
+ YYDEBUG(362, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1603 "Zend/zend_language_scanner.l"
+#line 1614 "Zend/zend_language_scanner.l"
{
const char *trait_name = NULL;
@@ -4468,37 +4480,37 @@ yy358:
return T_TRAIT_C;
}
-#line 4472 "Zend/zend_language_scanner.c"
-yy362:
- YYDEBUG(362, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy363;
- if (yych != 'a') goto yy186;
+#line 4484 "Zend/zend_language_scanner.c"
yy363:
YYDEBUG(363, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy364;
- if (yych != 's') goto yy186;
+ if (yych == 'A') goto yy364;
+ if (yych != 'a') goto yy187;
yy364:
YYDEBUG(364, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 'S') goto yy365;
- if (yych != 's') goto yy186;
+ if (yych != 's') goto yy187;
yy365:
YYDEBUG(365, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'S') goto yy366;
+ if (yych != 's') goto yy187;
+yy366:
YYDEBUG(366, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych != '_') goto yy187;
YYDEBUG(367, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy187;
+ YYDEBUG(368, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(368, *YYCURSOR);
+ YYDEBUG(369, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1576 "Zend/zend_language_scanner.l"
+#line 1587 "Zend/zend_language_scanner.l"
{
const char *class_name = NULL;
@@ -4525,2648 +4537,2709 @@ yy365:
}
return T_CLASS_C;
}
-#line 4529 "Zend/zend_language_scanner.c"
-yy369:
- YYDEBUG(369, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy370;
- if (yych != 'l') goto yy186;
+#line 4541 "Zend/zend_language_scanner.c"
yy370:
YYDEBUG(370, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy371;
- if (yych != 't') goto yy186;
+ if (yych == 'L') goto yy371;
+ if (yych != 'l') goto yy187;
yy371:
YYDEBUG(371, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'T') goto yy372;
+ if (yych != 't') goto yy187;
+yy372:
YYDEBUG(372, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy373;
- if (yych != 'c') goto yy186;
-yy373:
+ if (yych != '_') goto yy187;
YYDEBUG(373, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy374;
- if (yych != 'o') goto yy186;
+ if (yych == 'C') goto yy374;
+ if (yych != 'c') goto yy187;
yy374:
YYDEBUG(374, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy375;
- if (yych != 'm') goto yy186;
+ if (yych == 'O') goto yy375;
+ if (yych != 'o') goto yy187;
yy375:
YYDEBUG(375, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy376;
- if (yych != 'p') goto yy186;
+ if (yych == 'M') goto yy376;
+ if (yych != 'm') goto yy187;
yy376:
YYDEBUG(376, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy377;
- if (yych != 'i') goto yy186;
+ if (yych == 'P') goto yy377;
+ if (yych != 'p') goto yy187;
yy377:
YYDEBUG(377, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy378;
- if (yych != 'l') goto yy186;
+ if (yych == 'I') goto yy378;
+ if (yych != 'i') goto yy187;
yy378:
YYDEBUG(378, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy379;
- if (yych != 'e') goto yy186;
+ if (yych == 'L') goto yy379;
+ if (yych != 'l') goto yy187;
yy379:
YYDEBUG(379, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy380;
- if (yych != 'r') goto yy186;
+ if (yych == 'E') goto yy380;
+ if (yych != 'e') goto yy187;
yy380:
YYDEBUG(380, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'R') goto yy381;
+ if (yych != 'r') goto yy187;
+yy381:
+ YYDEBUG(381, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(381, *YYCURSOR);
+ YYDEBUG(382, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1286 "Zend/zend_language_scanner.l"
+#line 1296 "Zend/zend_language_scanner.l"
{
return T_HALT_COMPILER;
}
-#line 4595 "Zend/zend_language_scanner.c"
-yy382:
- YYDEBUG(382, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy386;
- if (yych == 's') goto yy386;
- goto yy186;
+#line 4607 "Zend/zend_language_scanner.c"
yy383:
YYDEBUG(383, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy384;
- if (yych != 'e') goto yy186;
+ if (yych == 'S') goto yy387;
+ if (yych == 's') goto yy387;
+ goto yy187;
yy384:
YYDEBUG(384, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy385;
+ if (yych != 'e') goto yy187;
+yy385:
+ YYDEBUG(385, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(385, *YYCURSOR);
+ YYDEBUG(386, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1266 "Zend/zend_language_scanner.l"
+#line 1276 "Zend/zend_language_scanner.l"
{
return T_USE;
}
-#line 4619 "Zend/zend_language_scanner.c"
-yy386:
- YYDEBUG(386, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy387;
- if (yych != 'e') goto yy186;
+#line 4631 "Zend/zend_language_scanner.c"
yy387:
YYDEBUG(387, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy388;
- if (yych != 't') goto yy186;
+ if (yych == 'E') goto yy388;
+ if (yych != 'e') goto yy187;
yy388:
YYDEBUG(388, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy389;
+ if (yych != 't') goto yy187;
+yy389:
+ YYDEBUG(389, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(389, *YYCURSOR);
+ YYDEBUG(390, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1314 "Zend/zend_language_scanner.l"
+#line 1324 "Zend/zend_language_scanner.l"
{
return T_UNSET;
}
-#line 4642 "Zend/zend_language_scanner.c"
-yy390:
- YYDEBUG(390, *YYCURSOR);
+#line 4654 "Zend/zend_language_scanner.c"
+yy391:
+ YYDEBUG(391, *YYCURSOR);
++YYCURSOR;
YYFILL(7);
yych = *YYCURSOR;
-yy391:
- YYDEBUG(391, *YYCURSOR);
+yy392:
+ YYDEBUG(392, *YYCURSOR);
if (yych <= 'S') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == '\t') goto yy390;
- if (yych <= 0x1F) goto yy193;
- goto yy390;
+ if (yych == '\t') goto yy391;
+ if (yych <= 0x1F) goto yy194;
+ goto yy391;
} else {
if (yych <= 'A') {
- if (yych <= '@') goto yy193;
- goto yy395;
+ if (yych <= '@') goto yy194;
+ goto yy396;
} else {
- if (yych <= 'B') goto yy393;
- if (yych <= 'C') goto yy193;
- goto yy398;
+ if (yych <= 'B') goto yy394;
+ if (yych <= 'C') goto yy194;
+ goto yy399;
}
}
} else {
if (yych <= 'I') {
- if (yych == 'F') goto yy399;
- if (yych <= 'H') goto yy193;
- goto yy400;
+ if (yych == 'F') goto yy400;
+ if (yych <= 'H') goto yy194;
+ goto yy401;
} else {
if (yych <= 'O') {
- if (yych <= 'N') goto yy193;
- goto yy394;
+ if (yych <= 'N') goto yy194;
+ goto yy395;
} else {
- if (yych <= 'Q') goto yy193;
- if (yych <= 'R') goto yy397;
- goto yy396;
+ if (yych <= 'Q') goto yy194;
+ if (yych <= 'R') goto yy398;
+ goto yy397;
}
}
}
} else {
if (yych <= 'f') {
if (yych <= 'a') {
- if (yych == 'U') goto yy392;
- if (yych <= '`') goto yy193;
- goto yy395;
+ if (yych == 'U') goto yy393;
+ if (yych <= '`') goto yy194;
+ goto yy396;
} else {
if (yych <= 'c') {
- if (yych <= 'b') goto yy393;
- goto yy193;
+ if (yych <= 'b') goto yy394;
+ goto yy194;
} else {
- if (yych <= 'd') goto yy398;
- if (yych <= 'e') goto yy193;
- goto yy399;
+ if (yych <= 'd') goto yy399;
+ if (yych <= 'e') goto yy194;
+ goto yy400;
}
}
} else {
if (yych <= 'q') {
if (yych <= 'i') {
- if (yych <= 'h') goto yy193;
- goto yy400;
+ if (yych <= 'h') goto yy194;
+ goto yy401;
} else {
- if (yych == 'o') goto yy394;
- goto yy193;
+ if (yych == 'o') goto yy395;
+ goto yy194;
}
} else {
if (yych <= 's') {
- if (yych <= 'r') goto yy397;
- goto yy396;
+ if (yych <= 'r') goto yy398;
+ goto yy397;
} else {
- if (yych != 'u') goto yy193;
+ if (yych != 'u') goto yy194;
}
}
}
}
-yy392:
- YYDEBUG(392, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy459;
- if (yych == 'n') goto yy459;
- goto yy193;
yy393:
YYDEBUG(393, *YYCURSOR);
yych = *++YYCURSOR;
+ if (yych == 'N') goto yy460;
+ if (yych == 'n') goto yy460;
+ goto yy194;
+yy394:
+ YYDEBUG(394, *YYCURSOR);
+ yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'I') goto yy446;
- if (yych <= 'N') goto yy193;
- goto yy447;
+ if (yych == 'I') goto yy447;
+ if (yych <= 'N') goto yy194;
+ goto yy448;
} else {
if (yych <= 'i') {
- if (yych <= 'h') goto yy193;
- goto yy446;
+ if (yych <= 'h') goto yy194;
+ goto yy447;
} else {
- if (yych == 'o') goto yy447;
- goto yy193;
+ if (yych == 'o') goto yy448;
+ goto yy194;
}
}
-yy394:
- YYDEBUG(394, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'B') goto yy438;
- if (yych == 'b') goto yy438;
- goto yy193;
yy395:
YYDEBUG(395, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy431;
- if (yych == 'r') goto yy431;
- goto yy193;
+ if (yych == 'B') goto yy439;
+ if (yych == 'b') goto yy439;
+ goto yy194;
yy396:
YYDEBUG(396, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy423;
- if (yych == 't') goto yy423;
- goto yy193;
+ if (yych == 'R') goto yy432;
+ if (yych == 'r') goto yy432;
+ goto yy194;
yy397:
YYDEBUG(397, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy421;
- if (yych == 'e') goto yy421;
- goto yy193;
+ if (yych == 'T') goto yy424;
+ if (yych == 't') goto yy424;
+ goto yy194;
yy398:
YYDEBUG(398, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy417;
- if (yych == 'o') goto yy417;
- goto yy193;
+ if (yych == 'E') goto yy422;
+ if (yych == 'e') goto yy422;
+ goto yy194;
yy399:
YYDEBUG(399, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy410;
- if (yych == 'l') goto yy410;
- goto yy193;
+ if (yych == 'O') goto yy418;
+ if (yych == 'o') goto yy418;
+ goto yy194;
yy400:
YYDEBUG(400, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy401;
- if (yych != 'n') goto yy193;
+ if (yych == 'L') goto yy411;
+ if (yych == 'l') goto yy411;
+ goto yy194;
yy401:
YYDEBUG(401, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy402;
- if (yych != 't') goto yy193;
+ if (yych == 'N') goto yy402;
+ if (yych != 'n') goto yy194;
yy402:
YYDEBUG(402, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy403;
- if (yych != 'e') goto yy405;
+ if (yych == 'T') goto yy403;
+ if (yych != 't') goto yy194;
yy403:
YYDEBUG(403, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'G') goto yy408;
- if (yych == 'g') goto yy408;
- goto yy193;
+ if (yych == 'E') goto yy404;
+ if (yych != 'e') goto yy406;
yy404:
YYDEBUG(404, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'G') goto yy409;
+ if (yych == 'g') goto yy409;
+ goto yy194;
+yy405:
+ YYDEBUG(405, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy405:
- YYDEBUG(405, *YYCURSOR);
+yy406:
+ YYDEBUG(406, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy404;
- goto yy193;
+ if (yych == '\t') goto yy405;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy404;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy405;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(406, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(407, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(408, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1214 "Zend/zend_language_scanner.l"
+#line 1224 "Zend/zend_language_scanner.l"
{
return T_INT_CAST;
}
-#line 4818 "Zend/zend_language_scanner.c"
-yy408:
- YYDEBUG(408, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy409;
- if (yych != 'e') goto yy193;
+#line 4830 "Zend/zend_language_scanner.c"
yy409:
YYDEBUG(409, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy404;
- if (yych == 'r') goto yy404;
- goto yy193;
+ if (yych == 'E') goto yy410;
+ if (yych != 'e') goto yy194;
yy410:
YYDEBUG(410, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy411;
- if (yych != 'o') goto yy193;
+ if (yych == 'R') goto yy405;
+ if (yych == 'r') goto yy405;
+ goto yy194;
yy411:
YYDEBUG(411, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy412;
- if (yych != 'a') goto yy193;
+ if (yych == 'O') goto yy412;
+ if (yych != 'o') goto yy194;
yy412:
YYDEBUG(412, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy413;
- if (yych != 't') goto yy193;
+ if (yych == 'A') goto yy413;
+ if (yych != 'a') goto yy194;
yy413:
YYDEBUG(413, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy414;
+ if (yych != 't') goto yy194;
+yy414:
+ YYDEBUG(414, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(414, *YYCURSOR);
+ YYDEBUG(415, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy413;
- goto yy193;
+ if (yych == '\t') goto yy414;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy413;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy414;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(415, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(416, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(417, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1218 "Zend/zend_language_scanner.l"
+#line 1228 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_CAST;
}
-#line 4866 "Zend/zend_language_scanner.c"
-yy417:
- YYDEBUG(417, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'U') goto yy418;
- if (yych != 'u') goto yy193;
+#line 4878 "Zend/zend_language_scanner.c"
yy418:
YYDEBUG(418, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'B') goto yy419;
- if (yych != 'b') goto yy193;
+ if (yych == 'U') goto yy419;
+ if (yych != 'u') goto yy194;
yy419:
YYDEBUG(419, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy420;
- if (yych != 'l') goto yy193;
+ if (yych == 'B') goto yy420;
+ if (yych != 'b') goto yy194;
yy420:
YYDEBUG(420, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy413;
- if (yych == 'e') goto yy413;
- goto yy193;
+ if (yych == 'L') goto yy421;
+ if (yych != 'l') goto yy194;
yy421:
YYDEBUG(421, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy422;
- if (yych != 'a') goto yy193;
+ if (yych == 'E') goto yy414;
+ if (yych == 'e') goto yy414;
+ goto yy194;
yy422:
YYDEBUG(422, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy413;
- if (yych == 'l') goto yy413;
- goto yy193;
+ if (yych == 'A') goto yy423;
+ if (yych != 'a') goto yy194;
yy423:
YYDEBUG(423, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy424;
- if (yych != 'r') goto yy193;
+ if (yych == 'L') goto yy414;
+ if (yych == 'l') goto yy414;
+ goto yy194;
yy424:
YYDEBUG(424, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy425;
- if (yych != 'i') goto yy193;
+ if (yych == 'R') goto yy425;
+ if (yych != 'r') goto yy194;
yy425:
YYDEBUG(425, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy426;
- if (yych != 'n') goto yy193;
+ if (yych == 'I') goto yy426;
+ if (yych != 'i') goto yy194;
yy426:
YYDEBUG(426, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'G') goto yy427;
- if (yych != 'g') goto yy193;
+ if (yych == 'N') goto yy427;
+ if (yych != 'n') goto yy194;
yy427:
YYDEBUG(427, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'G') goto yy428;
+ if (yych != 'g') goto yy194;
+yy428:
+ YYDEBUG(428, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(428, *YYCURSOR);
+ YYDEBUG(429, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy427;
- goto yy193;
+ if (yych == '\t') goto yy428;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy427;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy428;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(429, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(430, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(431, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1222 "Zend/zend_language_scanner.l"
+#line 1232 "Zend/zend_language_scanner.l"
{
return T_STRING_CAST;
}
-#line 4940 "Zend/zend_language_scanner.c"
-yy431:
- YYDEBUG(431, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy432;
- if (yych != 'r') goto yy193;
+#line 4952 "Zend/zend_language_scanner.c"
yy432:
YYDEBUG(432, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy433;
- if (yych != 'a') goto yy193;
+ if (yych == 'R') goto yy433;
+ if (yych != 'r') goto yy194;
yy433:
YYDEBUG(433, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy434;
- if (yych != 'y') goto yy193;
+ if (yych == 'A') goto yy434;
+ if (yych != 'a') goto yy194;
yy434:
YYDEBUG(434, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'Y') goto yy435;
+ if (yych != 'y') goto yy194;
+yy435:
+ YYDEBUG(435, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(435, *YYCURSOR);
+ YYDEBUG(436, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy434;
- goto yy193;
+ if (yych == '\t') goto yy435;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy434;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy435;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(436, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(437, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(438, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1226 "Zend/zend_language_scanner.l"
+#line 1236 "Zend/zend_language_scanner.l"
{
return T_ARRAY_CAST;
}
-#line 4977 "Zend/zend_language_scanner.c"
-yy438:
- YYDEBUG(438, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'J') goto yy439;
- if (yych != 'j') goto yy193;
+#line 4989 "Zend/zend_language_scanner.c"
yy439:
YYDEBUG(439, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy440;
- if (yych != 'e') goto yy193;
+ if (yych == 'J') goto yy440;
+ if (yych != 'j') goto yy194;
yy440:
YYDEBUG(440, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy441;
- if (yych != 'c') goto yy193;
+ if (yych == 'E') goto yy441;
+ if (yych != 'e') goto yy194;
yy441:
YYDEBUG(441, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy442;
- if (yych != 't') goto yy193;
+ if (yych == 'C') goto yy442;
+ if (yych != 'c') goto yy194;
yy442:
YYDEBUG(442, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy443;
+ if (yych != 't') goto yy194;
+yy443:
+ YYDEBUG(443, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(443, *YYCURSOR);
+ YYDEBUG(444, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy442;
- goto yy193;
+ if (yych == '\t') goto yy443;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy442;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy443;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(444, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(445, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(446, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1230 "Zend/zend_language_scanner.l"
+#line 1240 "Zend/zend_language_scanner.l"
{
return T_OBJECT_CAST;
}
-#line 5019 "Zend/zend_language_scanner.c"
-yy446:
- YYDEBUG(446, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy456;
- if (yych == 'n') goto yy456;
- goto yy193;
+#line 5031 "Zend/zend_language_scanner.c"
yy447:
YYDEBUG(447, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy448;
- if (yych != 'o') goto yy193;
+ if (yych == 'N') goto yy457;
+ if (yych == 'n') goto yy457;
+ goto yy194;
yy448:
YYDEBUG(448, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy449;
- if (yych != 'l') goto yy193;
+ if (yych == 'O') goto yy449;
+ if (yych != 'o') goto yy194;
yy449:
YYDEBUG(449, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy454;
- if (yych == 'e') goto yy454;
- goto yy451;
+ if (yych == 'L') goto yy450;
+ if (yych != 'l') goto yy194;
yy450:
YYDEBUG(450, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy455;
+ if (yych == 'e') goto yy455;
+ goto yy452;
+yy451:
+ YYDEBUG(451, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy451:
- YYDEBUG(451, *YYCURSOR);
+yy452:
+ YYDEBUG(452, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy450;
- goto yy193;
+ if (yych == '\t') goto yy451;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy450;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy451;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(452, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(453, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(454, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1234 "Zend/zend_language_scanner.l"
+#line 1244 "Zend/zend_language_scanner.l"
{
return T_BOOL_CAST;
}
-#line 5064 "Zend/zend_language_scanner.c"
-yy454:
- YYDEBUG(454, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy455;
- if (yych != 'a') goto yy193;
+#line 5076 "Zend/zend_language_scanner.c"
yy455:
YYDEBUG(455, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy450;
- if (yych == 'n') goto yy450;
- goto yy193;
+ if (yych == 'A') goto yy456;
+ if (yych != 'a') goto yy194;
yy456:
YYDEBUG(456, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy457;
- if (yych != 'a') goto yy193;
+ if (yych == 'N') goto yy451;
+ if (yych == 'n') goto yy451;
+ goto yy194;
yy457:
YYDEBUG(457, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy458;
- if (yych != 'r') goto yy193;
+ if (yych == 'A') goto yy458;
+ if (yych != 'a') goto yy194;
yy458:
YYDEBUG(458, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy427;
- if (yych == 'y') goto yy427;
- goto yy193;
+ if (yych == 'R') goto yy459;
+ if (yych != 'r') goto yy194;
yy459:
YYDEBUG(459, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy460;
- if (yych != 's') goto yy193;
+ if (yych == 'Y') goto yy428;
+ if (yych == 'y') goto yy428;
+ goto yy194;
yy460:
YYDEBUG(460, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy461;
- if (yych != 'e') goto yy193;
+ if (yych == 'S') goto yy461;
+ if (yych != 's') goto yy194;
yy461:
YYDEBUG(461, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy462;
- if (yych != 't') goto yy193;
+ if (yych == 'E') goto yy462;
+ if (yych != 'e') goto yy194;
yy462:
YYDEBUG(462, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy463;
+ if (yych != 't') goto yy194;
+yy463:
+ YYDEBUG(463, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(463, *YYCURSOR);
+ YYDEBUG(464, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy462;
- goto yy193;
+ if (yych == '\t') goto yy463;
+ goto yy194;
} else {
- if (yych <= ' ') goto yy462;
- if (yych != ')') goto yy193;
+ if (yych <= ' ') goto yy463;
+ if (yych != ')') goto yy194;
}
- YYDEBUG(464, *YYCURSOR);
- ++YYCURSOR;
YYDEBUG(465, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(466, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1238 "Zend/zend_language_scanner.l"
+#line 1248 "Zend/zend_language_scanner.l"
{
return T_UNSET_CAST;
}
-#line 5128 "Zend/zend_language_scanner.c"
-yy466:
- YYDEBUG(466, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy467;
- if (yych != 'r') goto yy186;
+#line 5140 "Zend/zend_language_scanner.c"
yy467:
YYDEBUG(467, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'R') goto yy468;
+ if (yych != 'r') goto yy187;
+yy468:
+ YYDEBUG(468, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(468, *YYCURSOR);
+ YYDEBUG(469, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1210 "Zend/zend_language_scanner.l"
+#line 1220 "Zend/zend_language_scanner.l"
{
return T_VAR;
}
-#line 5146 "Zend/zend_language_scanner.c"
-yy469:
- YYDEBUG(469, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'M') goto yy473;
- if (yych == 'm') goto yy473;
- goto yy186;
+#line 5158 "Zend/zend_language_scanner.c"
yy470:
YYDEBUG(470, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'W') goto yy471;
- if (yych != 'w') goto yy186;
+ if (yych == 'M') goto yy474;
+ if (yych == 'm') goto yy474;
+ goto yy187;
yy471:
YYDEBUG(471, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'W') goto yy472;
+ if (yych != 'w') goto yy187;
+yy472:
+ YYDEBUG(472, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(472, *YYCURSOR);
+ YYDEBUG(473, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1202 "Zend/zend_language_scanner.l"
+#line 1212 "Zend/zend_language_scanner.l"
{
return T_NEW;
}
-#line 5170 "Zend/zend_language_scanner.c"
-yy473:
- YYDEBUG(473, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy474;
- if (yych != 'e') goto yy186;
+#line 5182 "Zend/zend_language_scanner.c"
yy474:
YYDEBUG(474, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy475;
- if (yych != 's') goto yy186;
+ if (yych == 'E') goto yy475;
+ if (yych != 'e') goto yy187;
yy475:
YYDEBUG(475, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy476;
- if (yych != 'p') goto yy186;
+ if (yych == 'S') goto yy476;
+ if (yych != 's') goto yy187;
yy476:
YYDEBUG(476, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy477;
- if (yych != 'a') goto yy186;
+ if (yych == 'P') goto yy477;
+ if (yych != 'p') goto yy187;
yy477:
YYDEBUG(477, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy478;
- if (yych != 'c') goto yy186;
+ if (yych == 'A') goto yy478;
+ if (yych != 'a') goto yy187;
yy478:
YYDEBUG(478, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy479;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy479;
+ if (yych != 'c') goto yy187;
yy479:
YYDEBUG(479, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy480;
+ if (yych != 'e') goto yy187;
+yy480:
+ YYDEBUG(480, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(480, *YYCURSOR);
+ YYDEBUG(481, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1262 "Zend/zend_language_scanner.l"
+#line 1272 "Zend/zend_language_scanner.l"
{
return T_NAMESPACE;
}
-#line 5213 "Zend/zend_language_scanner.c"
-yy481:
- YYDEBUG(481, *YYCURSOR);
- ++YYCURSOR;
+#line 5225 "Zend/zend_language_scanner.c"
+yy482:
YYDEBUG(482, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(483, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1194 "Zend/zend_language_scanner.l"
+#line 1204 "Zend/zend_language_scanner.l"
{
return T_PAAMAYIM_NEKUDOTAYIM;
}
-#line 5223 "Zend/zend_language_scanner.c"
-yy483:
- YYDEBUG(483, *YYCURSOR);
+#line 5235 "Zend/zend_language_scanner.c"
+yy484:
+ YYDEBUG(484, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy484:
- YYDEBUG(484, *YYCURSOR);
+yy485:
+ YYDEBUG(485, *YYCURSOR);
if (yych <= '\f') {
- if (yych <= 0x08) goto yy140;
- if (yych <= '\n') goto yy483;
- goto yy140;
+ if (yych <= 0x08) goto yy141;
+ if (yych <= '\n') goto yy484;
+ goto yy141;
} else {
- if (yych <= '\r') goto yy483;
- if (yych == ' ') goto yy483;
- goto yy140;
+ if (yych <= '\r') goto yy484;
+ if (yych == ' ') goto yy484;
+ goto yy141;
}
-yy485:
- YYDEBUG(485, *YYCURSOR);
- ++YYCURSOR;
+yy486:
YYDEBUG(486, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(487, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1370 "Zend/zend_language_scanner.l"
+#line 1380 "Zend/zend_language_scanner.l"
{
return T_MINUS_EQUAL;
}
-#line 5249 "Zend/zend_language_scanner.c"
-yy487:
- YYDEBUG(487, *YYCURSOR);
- ++YYCURSOR;
+#line 5261 "Zend/zend_language_scanner.c"
+yy488:
YYDEBUG(488, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(489, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1338 "Zend/zend_language_scanner.l"
+#line 1348 "Zend/zend_language_scanner.l"
{
return T_DEC;
}
-#line 5259 "Zend/zend_language_scanner.c"
-yy489:
- YYDEBUG(489, *YYCURSOR);
- ++YYCURSOR;
+#line 5271 "Zend/zend_language_scanner.c"
+yy490:
YYDEBUG(490, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(491, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1164 "Zend/zend_language_scanner.l"
+#line 1174 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
return T_OBJECT_OPERATOR;
}
-#line 5270 "Zend/zend_language_scanner.c"
-yy491:
- YYDEBUG(491, *YYCURSOR);
+#line 5282 "Zend/zend_language_scanner.c"
+yy492:
+ YYDEBUG(492, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'I') goto yy498;
- if (yych <= 'N') goto yy186;
- goto yy499;
+ if (yych == 'I') goto yy499;
+ if (yych <= 'N') goto yy187;
+ goto yy500;
} else {
if (yych <= 'i') {
- if (yych <= 'h') goto yy186;
- goto yy498;
+ if (yych <= 'h') goto yy187;
+ goto yy499;
} else {
- if (yych == 'o') goto yy499;
- goto yy186;
+ if (yych == 'o') goto yy500;
+ goto yy187;
}
}
-yy492:
- YYDEBUG(492, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'B') goto yy493;
- if (yych != 'b') goto yy186;
yy493:
YYDEBUG(493, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy494;
- if (yych != 'l') goto yy186;
+ if (yych == 'B') goto yy494;
+ if (yych != 'b') goto yy187;
yy494:
YYDEBUG(494, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy495;
- if (yych != 'i') goto yy186;
+ if (yych == 'L') goto yy495;
+ if (yych != 'l') goto yy187;
yy495:
YYDEBUG(495, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy496;
- if (yych != 'c') goto yy186;
+ if (yych == 'I') goto yy496;
+ if (yych != 'i') goto yy187;
yy496:
YYDEBUG(496, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy497;
+ if (yych != 'c') goto yy187;
+yy497:
+ YYDEBUG(497, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(497, *YYCURSOR);
+ YYDEBUG(498, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1310 "Zend/zend_language_scanner.l"
+#line 1320 "Zend/zend_language_scanner.l"
{
return T_PUBLIC;
}
-#line 5319 "Zend/zend_language_scanner.c"
-yy498:
- YYDEBUG(498, *YYCURSOR);
+#line 5331 "Zend/zend_language_scanner.c"
+yy499:
+ YYDEBUG(499, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'V') {
- if (yych == 'N') goto yy507;
- if (yych <= 'U') goto yy186;
- goto yy508;
+ if (yych == 'N') goto yy508;
+ if (yych <= 'U') goto yy187;
+ goto yy509;
} else {
if (yych <= 'n') {
- if (yych <= 'm') goto yy186;
- goto yy507;
+ if (yych <= 'm') goto yy187;
+ goto yy508;
} else {
- if (yych == 'v') goto yy508;
- goto yy186;
+ if (yych == 'v') goto yy509;
+ goto yy187;
}
}
-yy499:
- YYDEBUG(499, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy500;
- if (yych != 't') goto yy186;
yy500:
YYDEBUG(500, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy501;
- if (yych != 'e') goto yy186;
+ if (yych == 'T') goto yy501;
+ if (yych != 't') goto yy187;
yy501:
YYDEBUG(501, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy502;
- if (yych != 'c') goto yy186;
+ if (yych == 'E') goto yy502;
+ if (yych != 'e') goto yy187;
yy502:
YYDEBUG(502, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy503;
- if (yych != 't') goto yy186;
+ if (yych == 'C') goto yy503;
+ if (yych != 'c') goto yy187;
yy503:
YYDEBUG(503, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy504;
- if (yych != 'e') goto yy186;
+ if (yych == 'T') goto yy504;
+ if (yych != 't') goto yy187;
yy504:
YYDEBUG(504, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy505;
- if (yych != 'd') goto yy186;
+ if (yych == 'E') goto yy505;
+ if (yych != 'e') goto yy187;
yy505:
YYDEBUG(505, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'D') goto yy506;
+ if (yych != 'd') goto yy187;
+yy506:
+ YYDEBUG(506, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(506, *YYCURSOR);
+ YYDEBUG(507, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1306 "Zend/zend_language_scanner.l"
+#line 1316 "Zend/zend_language_scanner.l"
{
return T_PROTECTED;
}
-#line 5378 "Zend/zend_language_scanner.c"
-yy507:
- YYDEBUG(507, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy513;
- if (yych == 't') goto yy513;
- goto yy186;
+#line 5390 "Zend/zend_language_scanner.c"
yy508:
YYDEBUG(508, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy509;
- if (yych != 'a') goto yy186;
+ if (yych == 'T') goto yy514;
+ if (yych == 't') goto yy514;
+ goto yy187;
yy509:
YYDEBUG(509, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy510;
- if (yych != 't') goto yy186;
+ if (yych == 'A') goto yy510;
+ if (yych != 'a') goto yy187;
yy510:
YYDEBUG(510, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy511;
- if (yych != 'e') goto yy186;
+ if (yych == 'T') goto yy511;
+ if (yych != 't') goto yy187;
yy511:
YYDEBUG(511, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy512;
+ if (yych != 'e') goto yy187;
+yy512:
+ YYDEBUG(512, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(512, *YYCURSOR);
+ YYDEBUG(513, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1302 "Zend/zend_language_scanner.l"
+#line 1312 "Zend/zend_language_scanner.l"
{
return T_PRIVATE;
}
-#line 5412 "Zend/zend_language_scanner.c"
-yy513:
- YYDEBUG(513, *YYCURSOR);
+#line 5424 "Zend/zend_language_scanner.c"
+yy514:
+ YYDEBUG(514, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(514, *YYCURSOR);
+ YYDEBUG(515, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1140 "Zend/zend_language_scanner.l"
+#line 1150 "Zend/zend_language_scanner.l"
{
return T_PRINT;
}
-#line 5425 "Zend/zend_language_scanner.c"
-yy515:
- YYDEBUG(515, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'O') goto yy520;
- if (yych == 'o') goto yy520;
- goto yy186;
+#line 5437 "Zend/zend_language_scanner.c"
yy516:
YYDEBUG(516, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy517;
- if (yych != 't') goto yy186;
+ if (yych == 'O') goto yy521;
+ if (yych == 'o') goto yy521;
+ goto yy187;
yy517:
YYDEBUG(517, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy518;
- if (yych != 'o') goto yy186;
+ if (yych == 'T') goto yy518;
+ if (yych != 't') goto yy187;
yy518:
YYDEBUG(518, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'O') goto yy519;
+ if (yych != 'o') goto yy187;
+yy519:
+ YYDEBUG(519, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(519, *YYCURSOR);
+ YYDEBUG(520, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1132 "Zend/zend_language_scanner.l"
+#line 1142 "Zend/zend_language_scanner.l"
{
return T_GOTO;
}
-#line 5454 "Zend/zend_language_scanner.c"
-yy520:
- YYDEBUG(520, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'B') goto yy521;
- if (yych != 'b') goto yy186;
+#line 5466 "Zend/zend_language_scanner.c"
yy521:
YYDEBUG(521, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy522;
- if (yych != 'a') goto yy186;
+ if (yych == 'B') goto yy522;
+ if (yych != 'b') goto yy187;
yy522:
YYDEBUG(522, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy523;
- if (yych != 'l') goto yy186;
+ if (yych == 'A') goto yy523;
+ if (yych != 'a') goto yy187;
yy523:
YYDEBUG(523, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'L') goto yy524;
+ if (yych != 'l') goto yy187;
+yy524:
+ YYDEBUG(524, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(524, *YYCURSOR);
+ YYDEBUG(525, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1274 "Zend/zend_language_scanner.l"
+#line 1284 "Zend/zend_language_scanner.l"
{
return T_GLOBAL;
}
-#line 5482 "Zend/zend_language_scanner.c"
-yy525:
- YYDEBUG(525, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '<') goto yy533;
- goto yy193;
+#line 5494 "Zend/zend_language_scanner.c"
yy526:
YYDEBUG(526, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy180;
+ if (yych == '<') goto yy534;
+ goto yy194;
yy527:
YYDEBUG(527, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy178;
+ goto yy181;
yy528:
YYDEBUG(528, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy529;
- if (yych != 'e') goto yy186;
+ goto yy179;
yy529:
YYDEBUG(529, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy530;
- if (yych != 'a') goto yy186;
+ if (yych == 'E') goto yy530;
+ if (yych != 'e') goto yy187;
yy530:
YYDEBUG(530, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'K') goto yy531;
- if (yych != 'k') goto yy186;
+ if (yych == 'A') goto yy531;
+ if (yych != 'a') goto yy187;
yy531:
YYDEBUG(531, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'K') goto yy532;
+ if (yych != 'k') goto yy187;
+yy532:
+ YYDEBUG(532, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(532, *YYCURSOR);
+ YYDEBUG(533, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1124 "Zend/zend_language_scanner.l"
+#line 1134 "Zend/zend_language_scanner.l"
{
return T_BREAK;
}
-#line 5523 "Zend/zend_language_scanner.c"
-yy533:
- YYDEBUG(533, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '<') goto yy269;
- goto yy193;
+#line 5535 "Zend/zend_language_scanner.c"
yy534:
YYDEBUG(534, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy541;
- if (yych == 'a') goto yy541;
- goto yy186;
+ if (yych == '<') goto yy270;
+ goto yy194;
yy535:
YYDEBUG(535, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy536;
- if (yych != 'i') goto yy186;
+ if (yych == 'A') goto yy542;
+ if (yych == 'a') goto yy542;
+ goto yy187;
yy536:
YYDEBUG(536, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy537;
- if (yych != 't') goto yy186;
+ if (yych == 'I') goto yy537;
+ if (yych != 'i') goto yy187;
yy537:
YYDEBUG(537, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy538;
- if (yych != 'c') goto yy186;
+ if (yych == 'T') goto yy538;
+ if (yych != 't') goto yy187;
yy538:
YYDEBUG(538, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy539;
- if (yych != 'h') goto yy186;
+ if (yych == 'C') goto yy539;
+ if (yych != 'c') goto yy187;
yy539:
YYDEBUG(539, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'H') goto yy540;
+ if (yych != 'h') goto yy187;
+yy540:
+ YYDEBUG(540, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(540, *YYCURSOR);
+ YYDEBUG(541, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1108 "Zend/zend_language_scanner.l"
+#line 1118 "Zend/zend_language_scanner.l"
{
return T_SWITCH;
}
-#line 5567 "Zend/zend_language_scanner.c"
-yy541:
- YYDEBUG(541, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy542;
- if (yych != 't') goto yy186;
+#line 5579 "Zend/zend_language_scanner.c"
yy542:
YYDEBUG(542, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy543;
- if (yych != 'i') goto yy186;
+ if (yych == 'T') goto yy543;
+ if (yych != 't') goto yy187;
yy543:
YYDEBUG(543, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy544;
- if (yych != 'c') goto yy186;
+ if (yych == 'I') goto yy544;
+ if (yych != 'i') goto yy187;
yy544:
YYDEBUG(544, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy545;
+ if (yych != 'c') goto yy187;
+yy545:
+ YYDEBUG(545, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(545, *YYCURSOR);
+ YYDEBUG(546, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1290 "Zend/zend_language_scanner.l"
+#line 1300 "Zend/zend_language_scanner.l"
{
return T_STATIC;
}
-#line 5595 "Zend/zend_language_scanner.c"
-yy546:
- YYDEBUG(546, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy557;
- if (yych == 's') goto yy557;
- goto yy186;
+#line 5607 "Zend/zend_language_scanner.c"
yy547:
YYDEBUG(547, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy555;
- if (yych == 'd') goto yy555;
- goto yy186;
+ if (yych == 'S') goto yy558;
+ if (yych == 's') goto yy558;
+ goto yy187;
yy548:
YYDEBUG(548, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy551;
- if (yych == 'r') goto yy551;
- goto yy186;
+ if (yych == 'D') goto yy556;
+ if (yych == 'd') goto yy556;
+ goto yy187;
yy549:
YYDEBUG(549, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'R') goto yy552;
+ if (yych == 'r') goto yy552;
+ goto yy187;
+yy550:
+ YYDEBUG(550, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(550, *YYCURSOR);
+ YYDEBUG(551, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1104 "Zend/zend_language_scanner.l"
+#line 1114 "Zend/zend_language_scanner.l"
{
return T_AS;
}
-#line 5626 "Zend/zend_language_scanner.c"
-yy551:
- YYDEBUG(551, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy552;
- if (yych != 'a') goto yy186;
+#line 5638 "Zend/zend_language_scanner.c"
yy552:
YYDEBUG(552, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy553;
- if (yych != 'y') goto yy186;
+ if (yych == 'A') goto yy553;
+ if (yych != 'a') goto yy187;
yy553:
YYDEBUG(553, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'Y') goto yy554;
+ if (yych != 'y') goto yy187;
+yy554:
+ YYDEBUG(554, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(554, *YYCURSOR);
+ YYDEBUG(555, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1326 "Zend/zend_language_scanner.l"
+#line 1336 "Zend/zend_language_scanner.l"
{
return T_ARRAY;
}
-#line 5649 "Zend/zend_language_scanner.c"
-yy555:
- YYDEBUG(555, *YYCURSOR);
+#line 5661 "Zend/zend_language_scanner.c"
+yy556:
+ YYDEBUG(556, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(556, *YYCURSOR);
+ YYDEBUG(557, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1422 "Zend/zend_language_scanner.l"
+#line 1432 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_AND;
}
-#line 5662 "Zend/zend_language_scanner.c"
-yy557:
- YYDEBUG(557, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy558;
- if (yych != 't') goto yy186;
+#line 5674 "Zend/zend_language_scanner.c"
yy558:
YYDEBUG(558, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy559;
- if (yych != 'r') goto yy186;
+ if (yych == 'T') goto yy559;
+ if (yych != 't') goto yy187;
yy559:
YYDEBUG(559, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy560;
- if (yych != 'a') goto yy186;
+ if (yych == 'R') goto yy560;
+ if (yych != 'r') goto yy187;
yy560:
YYDEBUG(560, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy561;
- if (yych != 'c') goto yy186;
+ if (yych == 'A') goto yy561;
+ if (yych != 'a') goto yy187;
yy561:
YYDEBUG(561, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy562;
- if (yych != 't') goto yy186;
+ if (yych == 'C') goto yy562;
+ if (yych != 'c') goto yy187;
yy562:
YYDEBUG(562, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy563;
+ if (yych != 't') goto yy187;
+yy563:
+ YYDEBUG(563, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(563, *YYCURSOR);
+ YYDEBUG(564, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1294 "Zend/zend_language_scanner.l"
+#line 1304 "Zend/zend_language_scanner.l"
{
return T_ABSTRACT;
}
-#line 5700 "Zend/zend_language_scanner.c"
-yy564:
- YYDEBUG(564, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'I') goto yy565;
- if (yych != 'i') goto yy186;
+#line 5712 "Zend/zend_language_scanner.c"
yy565:
YYDEBUG(565, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy566;
- if (yych != 'l') goto yy186;
+ if (yych == 'I') goto yy566;
+ if (yych != 'i') goto yy187;
yy566:
YYDEBUG(566, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy567;
- if (yych != 'e') goto yy186;
+ if (yych == 'L') goto yy567;
+ if (yych != 'l') goto yy187;
yy567:
YYDEBUG(567, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy568;
+ if (yych != 'e') goto yy187;
+yy568:
+ YYDEBUG(568, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(568, *YYCURSOR);
+ YYDEBUG(569, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1064 "Zend/zend_language_scanner.l"
+#line 1074 "Zend/zend_language_scanner.l"
{
return T_WHILE;
}
-#line 5728 "Zend/zend_language_scanner.c"
-yy569:
- YYDEBUG(569, *YYCURSOR);
+#line 5740 "Zend/zend_language_scanner.c"
+yy570:
+ YYDEBUG(570, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(570, *YYCURSOR);
+ YYDEBUG(571, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1048 "Zend/zend_language_scanner.l"
+#line 1058 "Zend/zend_language_scanner.l"
{
return T_IF;
}
-#line 5741 "Zend/zend_language_scanner.c"
-yy571:
- YYDEBUG(571, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'P') goto yy613;
- if (yych == 'p') goto yy613;
- goto yy186;
+#line 5753 "Zend/zend_language_scanner.c"
yy572:
YYDEBUG(572, *YYCURSOR);
yych = *++YYCURSOR;
+ if (yych == 'P') goto yy614;
+ if (yych == 'p') goto yy614;
+ goto yy187;
+yy573:
+ YYDEBUG(573, *YYCURSOR);
+ yych = *++YYCURSOR;
if (yych <= 'T') {
if (yych <= 'C') {
- if (yych <= 'B') goto yy186;
- goto yy580;
+ if (yych <= 'B') goto yy187;
+ goto yy581;
} else {
- if (yych <= 'R') goto yy186;
- if (yych <= 'S') goto yy578;
- goto yy579;
+ if (yych <= 'R') goto yy187;
+ if (yych <= 'S') goto yy579;
+ goto yy580;
}
} else {
if (yych <= 'r') {
- if (yych == 'c') goto yy580;
- goto yy186;
+ if (yych == 'c') goto yy581;
+ goto yy187;
} else {
- if (yych <= 's') goto yy578;
- if (yych <= 't') goto yy579;
- goto yy186;
+ if (yych <= 's') goto yy579;
+ if (yych <= 't') goto yy580;
+ goto yy187;
}
}
-yy573:
- YYDEBUG(573, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy574;
- if (yych != 's') goto yy186;
yy574:
YYDEBUG(574, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy575;
- if (yych != 'e') goto yy186;
+ if (yych == 'S') goto yy575;
+ if (yych != 's') goto yy187;
yy575:
YYDEBUG(575, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy576;
- if (yych != 't') goto yy186;
+ if (yych == 'E') goto yy576;
+ if (yych != 'e') goto yy187;
yy576:
YYDEBUG(576, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy577;
+ if (yych != 't') goto yy187;
+yy577:
+ YYDEBUG(577, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(577, *YYCURSOR);
+ YYDEBUG(578, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1278 "Zend/zend_language_scanner.l"
+#line 1288 "Zend/zend_language_scanner.l"
{
return T_ISSET;
}
-#line 5797 "Zend/zend_language_scanner.c"
-yy578:
- YYDEBUG(578, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy599;
- if (yych == 't') goto yy599;
- goto yy186;
+#line 5809 "Zend/zend_language_scanner.c"
yy579:
YYDEBUG(579, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy592;
- if (yych == 'e') goto yy592;
- goto yy186;
+ if (yych == 'T') goto yy600;
+ if (yych == 't') goto yy600;
+ goto yy187;
yy580:
YYDEBUG(580, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy581;
- if (yych != 'l') goto yy186;
+ if (yych == 'E') goto yy593;
+ if (yych == 'e') goto yy593;
+ goto yy187;
yy581:
YYDEBUG(581, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy582;
- if (yych != 'u') goto yy186;
+ if (yych == 'L') goto yy582;
+ if (yych != 'l') goto yy187;
yy582:
YYDEBUG(582, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy583;
- if (yych != 'd') goto yy186;
+ if (yych == 'U') goto yy583;
+ if (yych != 'u') goto yy187;
yy583:
YYDEBUG(583, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy584;
- if (yych != 'e') goto yy186;
+ if (yych == 'D') goto yy584;
+ if (yych != 'd') goto yy187;
yy584:
YYDEBUG(584, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy585;
+ if (yych != 'e') goto yy187;
+yy585:
+ YYDEBUG(585, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '9') {
- if (yych >= '0') goto yy185;
+ if (yych >= '0') goto yy186;
} else {
- if (yych <= '@') goto yy585;
- if (yych <= 'Z') goto yy185;
+ if (yych <= '@') goto yy586;
+ if (yych <= 'Z') goto yy186;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy586;
+ if (yych <= '_') goto yy587;
} else {
- if (yych <= 'z') goto yy185;
- if (yych >= 0x7F) goto yy185;
+ if (yych <= 'z') goto yy186;
+ if (yych >= 0x7F) goto yy186;
}
}
-yy585:
- YYDEBUG(585, *YYCURSOR);
+yy586:
+ YYDEBUG(586, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1246 "Zend/zend_language_scanner.l"
+#line 1256 "Zend/zend_language_scanner.l"
{
return T_INCLUDE;
}
-#line 5855 "Zend/zend_language_scanner.c"
-yy586:
- YYDEBUG(586, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'O') goto yy587;
- if (yych != 'o') goto yy186;
+#line 5867 "Zend/zend_language_scanner.c"
yy587:
YYDEBUG(587, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy588;
- if (yych != 'n') goto yy186;
+ if (yych == 'O') goto yy588;
+ if (yych != 'o') goto yy187;
yy588:
YYDEBUG(588, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy589;
- if (yych != 'c') goto yy186;
+ if (yych == 'N') goto yy589;
+ if (yych != 'n') goto yy187;
yy589:
YYDEBUG(589, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy590;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy590;
+ if (yych != 'c') goto yy187;
yy590:
YYDEBUG(590, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy591;
+ if (yych != 'e') goto yy187;
+yy591:
+ YYDEBUG(591, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(591, *YYCURSOR);
+ YYDEBUG(592, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1250 "Zend/zend_language_scanner.l"
+#line 1260 "Zend/zend_language_scanner.l"
{
return T_INCLUDE_ONCE;
}
-#line 5888 "Zend/zend_language_scanner.c"
-yy592:
- YYDEBUG(592, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy593;
- if (yych != 'r') goto yy186;
+#line 5900 "Zend/zend_language_scanner.c"
yy593:
YYDEBUG(593, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy594;
- if (yych != 'f') goto yy186;
+ if (yych == 'R') goto yy594;
+ if (yych != 'r') goto yy187;
yy594:
YYDEBUG(594, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy595;
- if (yych != 'a') goto yy186;
+ if (yych == 'F') goto yy595;
+ if (yych != 'f') goto yy187;
yy595:
YYDEBUG(595, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy596;
- if (yych != 'c') goto yy186;
+ if (yych == 'A') goto yy596;
+ if (yych != 'a') goto yy187;
yy596:
YYDEBUG(596, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy597;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy597;
+ if (yych != 'c') goto yy187;
yy597:
YYDEBUG(597, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy598;
+ if (yych != 'e') goto yy187;
+yy598:
+ YYDEBUG(598, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(598, *YYCURSOR);
+ YYDEBUG(599, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1148 "Zend/zend_language_scanner.l"
+#line 1158 "Zend/zend_language_scanner.l"
{
return T_INTERFACE;
}
-#line 5926 "Zend/zend_language_scanner.c"
-yy599:
- YYDEBUG(599, *YYCURSOR);
+#line 5938 "Zend/zend_language_scanner.c"
+yy600:
+ YYDEBUG(600, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'E') {
- if (yych == 'A') goto yy600;
- if (yych <= 'D') goto yy186;
- goto yy601;
+ if (yych == 'A') goto yy601;
+ if (yych <= 'D') goto yy187;
+ goto yy602;
} else {
if (yych <= 'a') {
- if (yych <= '`') goto yy186;
+ if (yych <= '`') goto yy187;
} else {
- if (yych == 'e') goto yy601;
- goto yy186;
+ if (yych == 'e') goto yy602;
+ goto yy187;
}
}
-yy600:
- YYDEBUG(600, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy607;
- if (yych == 'n') goto yy607;
- goto yy186;
yy601:
YYDEBUG(601, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy602;
- if (yych != 'a') goto yy186;
+ if (yych == 'N') goto yy608;
+ if (yych == 'n') goto yy608;
+ goto yy187;
yy602:
YYDEBUG(602, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy603;
- if (yych != 'd') goto yy186;
+ if (yych == 'A') goto yy603;
+ if (yych != 'a') goto yy187;
yy603:
YYDEBUG(603, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy604;
- if (yych != 'o') goto yy186;
+ if (yych == 'D') goto yy604;
+ if (yych != 'd') goto yy187;
yy604:
YYDEBUG(604, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy605;
- if (yych != 'f') goto yy186;
+ if (yych == 'O') goto yy605;
+ if (yych != 'o') goto yy187;
yy605:
YYDEBUG(605, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'F') goto yy606;
+ if (yych != 'f') goto yy187;
+yy606:
+ YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(606, *YYCURSOR);
+ YYDEBUG(607, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1270 "Zend/zend_language_scanner.l"
+#line 1280 "Zend/zend_language_scanner.l"
{
return T_INSTEADOF;
}
-#line 5980 "Zend/zend_language_scanner.c"
-yy607:
- YYDEBUG(607, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'C') goto yy608;
- if (yych != 'c') goto yy186;
+#line 5992 "Zend/zend_language_scanner.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy609;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy609;
+ if (yych != 'c') goto yy187;
yy609:
YYDEBUG(609, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy610;
- if (yych != 'o') goto yy186;
+ if (yych == 'E') goto yy610;
+ if (yych != 'e') goto yy187;
yy610:
YYDEBUG(610, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy611;
- if (yych != 'f') goto yy186;
+ if (yych == 'O') goto yy611;
+ if (yych != 'o') goto yy187;
yy611:
YYDEBUG(611, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'F') goto yy612;
+ if (yych != 'f') goto yy187;
+yy612:
+ YYDEBUG(612, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(612, *YYCURSOR);
+ YYDEBUG(613, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1100 "Zend/zend_language_scanner.l"
+#line 1110 "Zend/zend_language_scanner.l"
{
return T_INSTANCEOF;
}
-#line 6013 "Zend/zend_language_scanner.c"
-yy613:
- YYDEBUG(613, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy614;
- if (yych != 'l') goto yy186;
+#line 6025 "Zend/zend_language_scanner.c"
yy614:
YYDEBUG(614, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy615;
- if (yych != 'e') goto yy186;
+ if (yych == 'L') goto yy615;
+ if (yych != 'l') goto yy187;
yy615:
YYDEBUG(615, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy616;
- if (yych != 'm') goto yy186;
+ if (yych == 'E') goto yy616;
+ if (yych != 'e') goto yy187;
yy616:
YYDEBUG(616, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy617;
- if (yych != 'e') goto yy186;
+ if (yych == 'M') goto yy617;
+ if (yych != 'm') goto yy187;
yy617:
YYDEBUG(617, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy618;
- if (yych != 'n') goto yy186;
+ if (yych == 'E') goto yy618;
+ if (yych != 'e') goto yy187;
yy618:
YYDEBUG(618, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy619;
- if (yych != 't') goto yy186;
+ if (yych == 'N') goto yy619;
+ if (yych != 'n') goto yy187;
yy619:
YYDEBUG(619, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy620;
- if (yych != 's') goto yy186;
+ if (yych == 'T') goto yy620;
+ if (yych != 't') goto yy187;
yy620:
YYDEBUG(620, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy621;
+ if (yych != 's') goto yy187;
+yy621:
+ YYDEBUG(621, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(621, *YYCURSOR);
+ YYDEBUG(622, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1160 "Zend/zend_language_scanner.l"
+#line 1170 "Zend/zend_language_scanner.l"
{
return T_IMPLEMENTS;
}
-#line 6061 "Zend/zend_language_scanner.c"
-yy622:
- YYDEBUG(622, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy630;
- if (yych == 'r') goto yy630;
- goto yy186;
+#line 6073 "Zend/zend_language_scanner.c"
yy623:
YYDEBUG(623, *YYCURSOR);
yych = *++YYCURSOR;
+ if (yych == 'R') goto yy631;
+ if (yych == 'r') goto yy631;
+ goto yy187;
+yy624:
+ YYDEBUG(624, *YYCURSOR);
+ yych = *++YYCURSOR;
if (yych <= 'Y') {
- if (yych == 'A') goto yy626;
- if (yych <= 'X') goto yy186;
+ if (yych == 'A') goto yy627;
+ if (yych <= 'X') goto yy187;
} else {
if (yych <= 'a') {
- if (yych <= '`') goto yy186;
- goto yy626;
+ if (yych <= '`') goto yy187;
+ goto yy627;
} else {
- if (yych != 'y') goto yy186;
+ if (yych != 'y') goto yy187;
}
}
- YYDEBUG(624, *YYCURSOR);
+ YYDEBUG(625, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(625, *YYCURSOR);
+ YYDEBUG(626, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1036 "Zend/zend_language_scanner.l"
+#line 1042 "Zend/zend_language_scanner.l"
{
return T_TRY;
}
-#line 6093 "Zend/zend_language_scanner.c"
-yy626:
- YYDEBUG(626, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'I') goto yy627;
- if (yych != 'i') goto yy186;
+#line 6105 "Zend/zend_language_scanner.c"
yy627:
YYDEBUG(627, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy628;
- if (yych != 't') goto yy186;
+ if (yych == 'I') goto yy628;
+ if (yych != 'i') goto yy187;
yy628:
YYDEBUG(628, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy629;
+ if (yych != 't') goto yy187;
+yy629:
+ YYDEBUG(629, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(629, *YYCURSOR);
+ YYDEBUG(630, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1152 "Zend/zend_language_scanner.l"
+#line 1162 "Zend/zend_language_scanner.l"
{
return T_TRAIT;
}
-#line 6116 "Zend/zend_language_scanner.c"
-yy630:
- YYDEBUG(630, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'O') goto yy631;
- if (yych != 'o') goto yy186;
+#line 6128 "Zend/zend_language_scanner.c"
yy631:
YYDEBUG(631, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'W') goto yy632;
- if (yych != 'w') goto yy186;
+ if (yych == 'O') goto yy632;
+ if (yych != 'o') goto yy187;
yy632:
YYDEBUG(632, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'W') goto yy633;
+ if (yych != 'w') goto yy187;
+yy633:
+ YYDEBUG(633, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(633, *YYCURSOR);
+ YYDEBUG(634, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1044 "Zend/zend_language_scanner.l"
+#line 1054 "Zend/zend_language_scanner.l"
{
return T_THROW;
}
-#line 6139 "Zend/zend_language_scanner.c"
-yy634:
- YYDEBUG(634, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= 'T') {
- if (yych == 'Q') goto yy636;
- if (yych <= 'S') goto yy186;
- } else {
- if (yych <= 'q') {
- if (yych <= 'p') goto yy186;
- goto yy636;
- } else {
- if (yych != 't') goto yy186;
- }
- }
+#line 6151 "Zend/zend_language_scanner.c"
+yy635:
YYDEBUG(635, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy648;
- if (yych == 'u') goto yy648;
- goto yy186;
+ if (yych == 'E') goto yy636;
+ if (yych != 'e') goto yy187;
yy636:
YYDEBUG(636, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy637;
- if (yych != 'u') goto yy186;
+ if (yych == 'L') goto yy637;
+ if (yych != 'l') goto yy187;
yy637:
YYDEBUG(637, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy638;
- if (yych != 'i') goto yy186;
+ if (yych == 'D') goto yy638;
+ if (yych != 'd') goto yy187;
yy638:
YYDEBUG(638, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy639;
- if (yych != 'r') goto yy186;
-yy639:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(639, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy640;
- if (yych != 'e') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1038 "Zend/zend_language_scanner.l"
+ {
+ return T_YIELD;
+}
+#line 6179 "Zend/zend_language_scanner.c"
yy640:
YYDEBUG(640, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) <= '^') {
- if (yych <= '9') {
- if (yych >= '0') goto yy185;
- } else {
- if (yych <= '@') goto yy641;
- if (yych <= 'Z') goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych <= 'T') {
+ if (yych == 'Q') goto yy642;
+ if (yych <= 'S') goto yy187;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy642;
+ if (yych <= 'q') {
+ if (yych <= 'p') goto yy187;
+ goto yy642;
} else {
- if (yych <= 'z') goto yy185;
- if (yych >= 0x7F) goto yy185;
+ if (yych != 't') goto yy187;
}
}
-yy641:
YYDEBUG(641, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1254 "Zend/zend_language_scanner.l"
- {
- return T_REQUIRE;
-}
-#line 6204 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'U') goto yy654;
+ if (yych == 'u') goto yy654;
+ goto yy187;
yy642:
YYDEBUG(642, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy643;
- if (yych != 'o') goto yy186;
+ if (yych == 'U') goto yy643;
+ if (yych != 'u') goto yy187;
yy643:
YYDEBUG(643, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy644;
- if (yych != 'n') goto yy186;
+ if (yych == 'I') goto yy644;
+ if (yych != 'i') goto yy187;
yy644:
YYDEBUG(644, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy645;
- if (yych != 'c') goto yy186;
+ if (yych == 'R') goto yy645;
+ if (yych != 'r') goto yy187;
yy645:
YYDEBUG(645, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 'E') goto yy646;
- if (yych != 'e') goto yy186;
+ if (yych != 'e') goto yy187;
yy646:
YYDEBUG(646, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ if ((yych = *YYCURSOR) <= '^') {
+ if (yych <= '9') {
+ if (yych >= '0') goto yy186;
+ } else {
+ if (yych <= '@') goto yy647;
+ if (yych <= 'Z') goto yy186;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy648;
+ } else {
+ if (yych <= 'z') goto yy186;
+ if (yych >= 0x7F) goto yy186;
+ }
}
+yy647:
YYDEBUG(647, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1258 "Zend/zend_language_scanner.l"
+#line 1264 "Zend/zend_language_scanner.l"
{
- return T_REQUIRE_ONCE;
+ return T_REQUIRE;
}
-#line 6237 "Zend/zend_language_scanner.c"
+#line 6244 "Zend/zend_language_scanner.c"
yy648:
YYDEBUG(648, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy649;
- if (yych != 'r') goto yy186;
+ if (yych == 'O') goto yy649;
+ if (yych != 'o') goto yy187;
yy649:
YYDEBUG(649, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 'N') goto yy650;
- if (yych != 'n') goto yy186;
+ if (yych != 'n') goto yy187;
yy650:
YYDEBUG(650, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy651;
+ if (yych != 'c') goto yy187;
+yy651:
+ YYDEBUG(651, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy652;
+ if (yych != 'e') goto yy187;
+yy652:
+ YYDEBUG(652, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(651, *YYCURSOR);
+ YYDEBUG(653, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1268 "Zend/zend_language_scanner.l"
+ {
+ return T_REQUIRE_ONCE;
+}
+#line 6277 "Zend/zend_language_scanner.c"
+yy654:
+ YYDEBUG(654, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'R') goto yy655;
+ if (yych != 'r') goto yy187;
+yy655:
+ YYDEBUG(655, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'N') goto yy656;
+ if (yych != 'n') goto yy187;
+yy656:
+ YYDEBUG(656, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
+ YYDEBUG(657, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1032 "Zend/zend_language_scanner.l"
+#line 1034 "Zend/zend_language_scanner.l"
{
return T_RETURN;
}
-#line 6260 "Zend/zend_language_scanner.c"
-yy652:
- YYDEBUG(652, *YYCURSOR);
+#line 6300 "Zend/zend_language_scanner.c"
+yy658:
+ YYDEBUG(658, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'T') {
if (yych <= 'L') {
- if (yych <= 'K') goto yy186;
- goto yy675;
+ if (yych <= 'K') goto yy187;
+ goto yy681;
} else {
- if (yych <= 'R') goto yy186;
- if (yych <= 'S') goto yy674;
- goto yy673;
+ if (yych <= 'R') goto yy187;
+ if (yych <= 'S') goto yy680;
+ goto yy679;
}
} else {
if (yych <= 'r') {
- if (yych == 'l') goto yy675;
- goto yy186;
+ if (yych == 'l') goto yy681;
+ goto yy187;
} else {
- if (yych <= 's') goto yy674;
- if (yych <= 't') goto yy673;
- goto yy186;
+ if (yych <= 's') goto yy680;
+ if (yych <= 't') goto yy679;
+ goto yy187;
}
}
-yy653:
- YYDEBUG(653, *YYCURSOR);
+yy659:
+ YYDEBUG(659, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'A') goto yy665;
- if (yych <= 'N') goto yy186;
- goto yy666;
+ if (yych == 'A') goto yy671;
+ if (yych <= 'N') goto yy187;
+ goto yy672;
} else {
if (yych <= 'a') {
- if (yych <= '`') goto yy186;
- goto yy665;
+ if (yych <= '`') goto yy187;
+ goto yy671;
} else {
- if (yych == 'o') goto yy666;
- goto yy186;
+ if (yych == 'o') goto yy672;
+ goto yy187;
}
}
-yy654:
- YYDEBUG(654, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy655;
- if (yych != 'n') goto yy186;
-yy655:
- YYDEBUG(655, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= 'T') {
- if (yych <= 'R') goto yy186;
- if (yych >= 'T') goto yy657;
- } else {
- if (yych <= 'r') goto yy186;
- if (yych <= 's') goto yy656;
- if (yych <= 't') goto yy657;
- goto yy186;
- }
-yy656:
- YYDEBUG(656, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy663;
- if (yych == 't') goto yy663;
- goto yy186;
-yy657:
- YYDEBUG(657, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'I') goto yy658;
- if (yych != 'i') goto yy186;
-yy658:
- YYDEBUG(658, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy659;
- if (yych != 'n') goto yy186;
-yy659:
- YYDEBUG(659, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'U') goto yy660;
- if (yych != 'u') goto yy186;
yy660:
YYDEBUG(660, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy661;
- if (yych != 'e') goto yy186;
+ if (yych == 'N') goto yy661;
+ if (yych != 'n') goto yy187;
yy661:
YYDEBUG(661, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ yych = *++YYCURSOR;
+ if (yych <= 'T') {
+ if (yych <= 'R') goto yy187;
+ if (yych >= 'T') goto yy663;
+ } else {
+ if (yych <= 'r') goto yy187;
+ if (yych <= 's') goto yy662;
+ if (yych <= 't') goto yy663;
+ goto yy187;
}
+yy662:
YYDEBUG(662, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1128 "Zend/zend_language_scanner.l"
- {
- return T_CONTINUE;
-}
-#line 6354 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy669;
+ if (yych == 't') goto yy669;
+ goto yy187;
yy663:
YYDEBUG(663, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'I') goto yy664;
+ if (yych != 'i') goto yy187;
+yy664:
YYDEBUG(664, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1028 "Zend/zend_language_scanner.l"
- {
- return T_CONST;
-}
-#line 6367 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'N') goto yy665;
+ if (yych != 'n') goto yy187;
yy665:
YYDEBUG(665, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy670;
- if (yych == 's') goto yy670;
- goto yy186;
+ if (yych == 'U') goto yy666;
+ if (yych != 'u') goto yy187;
yy666:
YYDEBUG(666, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy667;
- if (yych != 'n') goto yy186;
+ if (yych == 'E') goto yy667;
+ if (yych != 'e') goto yy187;
yy667:
YYDEBUG(667, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy668;
- if (yych != 'e') goto yy186;
-yy668:
- YYDEBUG(668, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(669, *YYCURSOR);
+ YYDEBUG(668, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1206 "Zend/zend_language_scanner.l"
+#line 1138 "Zend/zend_language_scanner.l"
{
- return T_CLONE;
+ return T_CONTINUE;
}
-#line 6396 "Zend/zend_language_scanner.c"
-yy670:
- YYDEBUG(670, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy671;
- if (yych != 's') goto yy186;
-yy671:
- YYDEBUG(671, *YYCURSOR);
+#line 6394 "Zend/zend_language_scanner.c"
+yy669:
+ YYDEBUG(669, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(672, *YYCURSOR);
+ YYDEBUG(670, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1144 "Zend/zend_language_scanner.l"
+#line 1030 "Zend/zend_language_scanner.l"
{
- return T_CLASS;
+ return T_CONST;
}
-#line 6414 "Zend/zend_language_scanner.c"
+#line 6407 "Zend/zend_language_scanner.c"
+yy671:
+ YYDEBUG(671, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy676;
+ if (yych == 's') goto yy676;
+ goto yy187;
+yy672:
+ YYDEBUG(672, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'N') goto yy673;
+ if (yych != 'n') goto yy187;
yy673:
YYDEBUG(673, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy684;
- if (yych == 'c') goto yy684;
- goto yy186;
+ if (yych == 'E') goto yy674;
+ if (yych != 'e') goto yy187;
yy674:
YYDEBUG(674, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy682;
- if (yych == 'e') goto yy682;
- goto yy186;
-yy675:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(675, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy676;
- if (yych != 'l') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1216 "Zend/zend_language_scanner.l"
+ {
+ return T_CLONE;
+}
+#line 6436 "Zend/zend_language_scanner.c"
yy676:
YYDEBUG(676, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy677;
- if (yych != 'a') goto yy186;
+ if (yych == 'S') goto yy677;
+ if (yych != 's') goto yy187;
yy677:
YYDEBUG(677, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'B') goto yy678;
- if (yych != 'b') goto yy186;
-yy678:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(678, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy679;
- if (yych != 'l') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1154 "Zend/zend_language_scanner.l"
+ {
+ return T_CLASS;
+}
+#line 6454 "Zend/zend_language_scanner.c"
yy679:
YYDEBUG(679, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy680;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy690;
+ if (yych == 'c') goto yy690;
+ goto yy187;
yy680:
YYDEBUG(680, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy688;
+ if (yych == 'e') goto yy688;
+ goto yy187;
+yy681:
YYDEBUG(681, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1330 "Zend/zend_language_scanner.l"
- {
- return T_CALLABLE;
-}
-#line 6464 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'L') goto yy682;
+ if (yych != 'l') goto yy187;
yy682:
YYDEBUG(682, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy683;
+ if (yych != 'a') goto yy187;
+yy683:
YYDEBUG(683, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1116 "Zend/zend_language_scanner.l"
- {
- return T_CASE;
-}
-#line 6477 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy684;
+ if (yych != 'b') goto yy187;
yy684:
YYDEBUG(684, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy685;
- if (yych != 'h') goto yy186;
+ if (yych == 'L') goto yy685;
+ if (yych != 'l') goto yy187;
yy685:
YYDEBUG(685, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy686;
+ if (yych != 'e') goto yy187;
+yy686:
+ YYDEBUG(686, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(686, *YYCURSOR);
+ YYDEBUG(687, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1040 "Zend/zend_language_scanner.l"
+#line 1340 "Zend/zend_language_scanner.l"
{
- return T_CATCH;
+ return T_CALLABLE;
}
-#line 6495 "Zend/zend_language_scanner.c"
-yy687:
- YYDEBUG(687, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy704;
- if (yych == 'n') goto yy704;
- goto yy186;
+#line 6504 "Zend/zend_language_scanner.c"
yy688:
YYDEBUG(688, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy697;
- if (yych == 'r') goto yy697;
- goto yy186;
-yy689:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(689, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy690;
- if (yych != 'n') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1126 "Zend/zend_language_scanner.l"
+ {
+ return T_CASE;
+}
+#line 6517 "Zend/zend_language_scanner.c"
yy690:
YYDEBUG(690, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy691;
- if (yych != 'c') goto yy186;
+ if (yych == 'H') goto yy691;
+ if (yych != 'h') goto yy187;
yy691:
YYDEBUG(691, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy692;
- if (yych != 't') goto yy186;
-yy692:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(692, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'I') goto yy693;
- if (yych != 'i') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1046 "Zend/zend_language_scanner.l"
+ {
+ return T_CATCH;
+}
+#line 6535 "Zend/zend_language_scanner.c"
yy693:
YYDEBUG(693, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy694;
- if (yych != 'o') goto yy186;
+ if (yych == 'N') goto yy710;
+ if (yych == 'n') goto yy710;
+ goto yy187;
yy694:
YYDEBUG(694, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy695;
- if (yych != 'n') goto yy186;
+ if (yych == 'R') goto yy703;
+ if (yych == 'r') goto yy703;
+ goto yy187;
yy695:
YYDEBUG(695, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'N') goto yy696;
+ if (yych != 'n') goto yy187;
+yy696:
YYDEBUG(696, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1024 "Zend/zend_language_scanner.l"
- {
- return T_FUNCTION;
-}
-#line 6550 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy697;
+ if (yych != 'c') goto yy187;
yy697:
YYDEBUG(697, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) <= '^') {
- if (yych <= '@') {
- if (yych <= '/') goto yy698;
- if (yych <= '9') goto yy185;
- } else {
- if (yych == 'E') goto yy699;
- if (yych <= 'Z') goto yy185;
- }
- } else {
- if (yych <= 'd') {
- if (yych != '`') goto yy185;
- } else {
- if (yych <= 'e') goto yy699;
- if (yych <= 'z') goto yy185;
- if (yych >= 0x7F) goto yy185;
- }
- }
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy698;
+ if (yych != 't') goto yy187;
yy698:
YYDEBUG(698, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1076 "Zend/zend_language_scanner.l"
- {
- return T_FOR;
-}
-#line 6578 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'I') goto yy699;
+ if (yych != 'i') goto yy187;
yy699:
YYDEBUG(699, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy700;
- if (yych != 'a') goto yy186;
+ if (yych == 'O') goto yy700;
+ if (yych != 'o') goto yy187;
yy700:
YYDEBUG(700, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy701;
- if (yych != 'c') goto yy186;
+ if (yych == 'N') goto yy701;
+ if (yych != 'n') goto yy187;
yy701:
YYDEBUG(701, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'H') goto yy702;
- if (yych != 'h') goto yy186;
-yy702:
- YYDEBUG(702, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(703, *YYCURSOR);
+ YYDEBUG(702, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1084 "Zend/zend_language_scanner.l"
+#line 1026 "Zend/zend_language_scanner.l"
{
- return T_FOREACH;
+ return T_FUNCTION;
}
-#line 6606 "Zend/zend_language_scanner.c"
+#line 6590 "Zend/zend_language_scanner.c"
+yy703:
+ YYDEBUG(703, *YYCURSOR);
+ ++YYCURSOR;
+ if ((yych = *YYCURSOR) <= '^') {
+ if (yych <= '@') {
+ if (yych <= '/') goto yy704;
+ if (yych <= '9') goto yy186;
+ } else {
+ if (yych == 'E') goto yy705;
+ if (yych <= 'Z') goto yy186;
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych != '`') goto yy186;
+ } else {
+ if (yych <= 'e') goto yy705;
+ if (yych <= 'z') goto yy186;
+ if (yych >= 0x7F) goto yy186;
+ }
+ }
yy704:
YYDEBUG(704, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy705;
- if (yych != 'a') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1086 "Zend/zend_language_scanner.l"
+ {
+ return T_FOR;
+}
+#line 6618 "Zend/zend_language_scanner.c"
yy705:
YYDEBUG(705, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy706;
- if (yych != 'l') goto yy186;
+ if (yych == 'A') goto yy706;
+ if (yych != 'a') goto yy187;
yy706:
YYDEBUG(706, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy707;
+ if (yych != 'c') goto yy187;
+yy707:
YYDEBUG(707, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1298 "Zend/zend_language_scanner.l"
- {
- return T_FINAL;
-}
-#line 6629 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'H') goto yy708;
+ if (yych != 'h') goto yy187;
yy708:
YYDEBUG(708, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= 'F') {
- if (yych == 'C') goto yy714;
- if (yych <= 'E') goto yy186;
- goto yy715;
- } else {
- if (yych <= 'c') {
- if (yych <= 'b') goto yy186;
- goto yy714;
- } else {
- if (yych == 'f') goto yy715;
- goto yy186;
- }
- }
-yy709:
- YYDEBUG(709, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy712;
- if (yych == 'e') goto yy712;
- goto yy186;
-yy710:
- YYDEBUG(710, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(711, *YYCURSOR);
+ YYDEBUG(709, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1072 "Zend/zend_language_scanner.l"
+#line 1094 "Zend/zend_language_scanner.l"
{
- return T_DO;
+ return T_FOREACH;
}
-#line 6664 "Zend/zend_language_scanner.c"
+#line 6646 "Zend/zend_language_scanner.c"
+yy710:
+ YYDEBUG(710, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy711;
+ if (yych != 'a') goto yy187;
+yy711:
+ YYDEBUG(711, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'L') goto yy712;
+ if (yych != 'l') goto yy187;
yy712:
YYDEBUG(712, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ if ((yych = *YYCURSOR) <= '^') {
+ if (yych <= '@') {
+ if (yych <= '/') goto yy713;
+ if (yych <= '9') goto yy186;
+ } else {
+ if (yych == 'L') goto yy714;
+ if (yych <= 'Z') goto yy186;
+ }
+ } else {
+ if (yych <= 'k') {
+ if (yych != '`') goto yy186;
+ } else {
+ if (yych <= 'l') goto yy714;
+ if (yych <= 'z') goto yy186;
+ if (yych >= 0x7F) goto yy186;
+ }
}
+yy713:
YYDEBUG(713, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1020 "Zend/zend_language_scanner.l"
+#line 1308 "Zend/zend_language_scanner.l"
{
- return T_EXIT;
+ return T_FINAL;
}
-#line 6677 "Zend/zend_language_scanner.c"
+#line 6684 "Zend/zend_language_scanner.c"
yy714:
YYDEBUG(714, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy721;
- if (yych == 'l') goto yy721;
- goto yy186;
+ if (yych == 'Y') goto yy715;
+ if (yych != 'y') goto yy187;
yy715:
YYDEBUG(715, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy716;
- if (yych != 'a') goto yy186;
-yy716:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(716, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'U') goto yy717;
- if (yych != 'u') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1050 "Zend/zend_language_scanner.l"
+ {
+ return T_FINALLY;
+}
+#line 6702 "Zend/zend_language_scanner.c"
yy717:
YYDEBUG(717, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy718;
- if (yych != 'l') goto yy186;
+ if (yych <= 'F') {
+ if (yych == 'C') goto yy723;
+ if (yych <= 'E') goto yy187;
+ goto yy724;
+ } else {
+ if (yych <= 'c') {
+ if (yych <= 'b') goto yy187;
+ goto yy723;
+ } else {
+ if (yych == 'f') goto yy724;
+ goto yy187;
+ }
+ }
yy718:
YYDEBUG(718, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy719;
- if (yych != 't') goto yy186;
+ if (yych == 'E') goto yy721;
+ if (yych == 'e') goto yy721;
+ goto yy187;
yy719:
YYDEBUG(719, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
YYDEBUG(720, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1120 "Zend/zend_language_scanner.l"
+#line 1082 "Zend/zend_language_scanner.l"
{
- return T_DEFAULT;
+ return T_DO;
}
-#line 6716 "Zend/zend_language_scanner.c"
+#line 6737 "Zend/zend_language_scanner.c"
yy721:
YYDEBUG(721, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy722;
- if (yych != 'a') goto yy186;
-yy722:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(722, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy723;
- if (yych != 'r') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1022 "Zend/zend_language_scanner.l"
+ {
+ return T_EXIT;
+}
+#line 6750 "Zend/zend_language_scanner.c"
yy723:
YYDEBUG(723, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy724;
- if (yych != 'e') goto yy186;
+ if (yych == 'L') goto yy730;
+ if (yych == 'l') goto yy730;
+ goto yy187;
yy724:
YYDEBUG(724, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy725;
+ if (yych != 'a') goto yy187;
+yy725:
YYDEBUG(725, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1092 "Zend/zend_language_scanner.l"
- {
- return T_DECLARE;
-}
-#line 6744 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'U') goto yy726;
+ if (yych != 'u') goto yy187;
yy726:
YYDEBUG(726, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy788;
- if (yych == 'h') goto yy788;
- goto yy186;
+ if (yych == 'L') goto yy727;
+ if (yych != 'l') goto yy187;
yy727:
YYDEBUG(727, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy782;
- if (yych == 's') goto yy782;
- goto yy186;
+ if (yych == 'T') goto yy728;
+ if (yych != 't') goto yy187;
yy728:
YYDEBUG(728, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'P') goto yy778;
- if (yych == 'p') goto yy778;
- goto yy186;
-yy729:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(729, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'D') goto yy744;
- if (yych == 'd') goto yy744;
- goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1130 "Zend/zend_language_scanner.l"
+ {
+ return T_DEFAULT;
+}
+#line 6789 "Zend/zend_language_scanner.c"
yy730:
YYDEBUG(730, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy741;
- if (yych == 'a') goto yy741;
- goto yy186;
+ if (yych == 'A') goto yy731;
+ if (yych != 'a') goto yy187;
yy731:
YYDEBUG(731, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 'T') {
- if (yych == 'I') goto yy732;
- if (yych <= 'S') goto yy186;
- goto yy733;
- } else {
- if (yych <= 'i') {
- if (yych <= 'h') goto yy186;
- } else {
- if (yych == 't') goto yy733;
- goto yy186;
- }
- }
+ if (yych == 'R') goto yy732;
+ if (yych != 'r') goto yy187;
yy732:
YYDEBUG(732, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy739;
- if (yych == 't') goto yy739;
- goto yy186;
+ if (yych == 'E') goto yy733;
+ if (yych != 'e') goto yy187;
yy733:
YYDEBUG(733, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy734;
- if (yych != 'e') goto yy186;
-yy734:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy186;
+ }
YYDEBUG(734, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy735;
- if (yych != 'n') goto yy186;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1102 "Zend/zend_language_scanner.l"
+ {
+ return T_DECLARE;
+}
+#line 6817 "Zend/zend_language_scanner.c"
yy735:
YYDEBUG(735, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy736;
- if (yych != 'd') goto yy186;
+ if (yych == 'H') goto yy797;
+ if (yych == 'h') goto yy797;
+ goto yy187;
yy736:
YYDEBUG(736, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy737;
- if (yych != 's') goto yy186;
+ if (yych == 'S') goto yy791;
+ if (yych == 's') goto yy791;
+ goto yy187;
yy737:
YYDEBUG(737, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'P') goto yy787;
+ if (yych == 'p') goto yy787;
+ goto yy187;
+yy738:
+ YYDEBUG(738, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'D') goto yy753;
+ if (yych == 'd') goto yy753;
+ goto yy187;
+yy739:
+ YYDEBUG(739, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy750;
+ if (yych == 'a') goto yy750;
+ goto yy187;
+yy740:
+ YYDEBUG(740, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych <= 'T') {
+ if (yych == 'I') goto yy741;
+ if (yych <= 'S') goto yy187;
+ goto yy742;
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'h') goto yy187;
+ } else {
+ if (yych == 't') goto yy742;
+ goto yy187;
+ }
+ }
+yy741:
+ YYDEBUG(741, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy748;
+ if (yych == 't') goto yy748;
+ goto yy187;
+yy742:
+ YYDEBUG(742, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy743;
+ if (yych != 'e') goto yy187;
+yy743:
+ YYDEBUG(743, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'N') goto yy744;
+ if (yych != 'n') goto yy187;
+yy744:
+ YYDEBUG(744, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'D') goto yy745;
+ if (yych != 'd') goto yy187;
+yy745:
+ YYDEBUG(745, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy746;
+ if (yych != 's') goto yy187;
+yy746:
+ YYDEBUG(746, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(738, *YYCURSOR);
+ YYDEBUG(747, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1156 "Zend/zend_language_scanner.l"
+#line 1166 "Zend/zend_language_scanner.l"
{
return T_EXTENDS;
}
-#line 6828 "Zend/zend_language_scanner.c"
-yy739:
- YYDEBUG(739, *YYCURSOR);
+#line 6901 "Zend/zend_language_scanner.c"
+yy748:
+ YYDEBUG(748, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(740, *YYCURSOR);
+ YYDEBUG(749, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1016 "Zend/zend_language_scanner.l"
+#line 1018 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6841 "Zend/zend_language_scanner.c"
-yy741:
- YYDEBUG(741, *YYCURSOR);
+#line 6914 "Zend/zend_language_scanner.c"
+yy750:
+ YYDEBUG(750, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy742;
- if (yych != 'l') goto yy186;
-yy742:
- YYDEBUG(742, *YYCURSOR);
+ if (yych == 'L') goto yy751;
+ if (yych != 'l') goto yy187;
+yy751:
+ YYDEBUG(751, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(743, *YYCURSOR);
+ YYDEBUG(752, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1242 "Zend/zend_language_scanner.l"
+#line 1252 "Zend/zend_language_scanner.l"
{
return T_EVAL;
}
-#line 6859 "Zend/zend_language_scanner.c"
-yy744:
- YYDEBUG(744, *YYCURSOR);
+#line 6932 "Zend/zend_language_scanner.c"
+yy753:
+ YYDEBUG(753, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(-1, yych);
switch (yych) {
case 'D':
- case 'd': goto yy745;
+ case 'd': goto yy754;
case 'F':
- case 'f': goto yy746;
+ case 'f': goto yy755;
case 'I':
- case 'i': goto yy747;
+ case 'i': goto yy756;
case 'S':
- case 's': goto yy748;
+ case 's': goto yy757;
case 'W':
- case 'w': goto yy749;
- default: goto yy186;
+ case 'w': goto yy758;
+ default: goto yy187;
}
-yy745:
- YYDEBUG(745, *YYCURSOR);
+yy754:
+ YYDEBUG(754, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy771;
- if (yych == 'e') goto yy771;
- goto yy186;
-yy746:
- YYDEBUG(746, *YYCURSOR);
+ if (yych == 'E') goto yy780;
+ if (yych == 'e') goto yy780;
+ goto yy187;
+yy755:
+ YYDEBUG(755, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy763;
- if (yych == 'o') goto yy763;
- goto yy186;
-yy747:
- YYDEBUG(747, *YYCURSOR);
+ if (yych == 'O') goto yy772;
+ if (yych == 'o') goto yy772;
+ goto yy187;
+yy756:
+ YYDEBUG(756, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy761;
- if (yych == 'f') goto yy761;
- goto yy186;
-yy748:
- YYDEBUG(748, *YYCURSOR);
+ if (yych == 'F') goto yy770;
+ if (yych == 'f') goto yy770;
+ goto yy187;
+yy757:
+ YYDEBUG(757, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'W') goto yy755;
- if (yych == 'w') goto yy755;
- goto yy186;
-yy749:
- YYDEBUG(749, *YYCURSOR);
+ if (yych == 'W') goto yy764;
+ if (yych == 'w') goto yy764;
+ goto yy187;
+yy758:
+ YYDEBUG(758, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy750;
- if (yych != 'h') goto yy186;
-yy750:
- YYDEBUG(750, *YYCURSOR);
+ if (yych == 'H') goto yy759;
+ if (yych != 'h') goto yy187;
+yy759:
+ YYDEBUG(759, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy751;
- if (yych != 'i') goto yy186;
-yy751:
- YYDEBUG(751, *YYCURSOR);
+ if (yych == 'I') goto yy760;
+ if (yych != 'i') goto yy187;
+yy760:
+ YYDEBUG(760, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy752;
- if (yych != 'l') goto yy186;
-yy752:
- YYDEBUG(752, *YYCURSOR);
+ if (yych == 'L') goto yy761;
+ if (yych != 'l') goto yy187;
+yy761:
+ YYDEBUG(761, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy753;
- if (yych != 'e') goto yy186;
-yy753:
- YYDEBUG(753, *YYCURSOR);
+ if (yych == 'E') goto yy762;
+ if (yych != 'e') goto yy187;
+yy762:
+ YYDEBUG(762, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(754, *YYCURSOR);
+ YYDEBUG(763, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1068 "Zend/zend_language_scanner.l"
+#line 1078 "Zend/zend_language_scanner.l"
{
return T_ENDWHILE;
}
-#line 6933 "Zend/zend_language_scanner.c"
-yy755:
- YYDEBUG(755, *YYCURSOR);
+#line 7006 "Zend/zend_language_scanner.c"
+yy764:
+ YYDEBUG(764, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy756;
- if (yych != 'i') goto yy186;
-yy756:
- YYDEBUG(756, *YYCURSOR);
+ if (yych == 'I') goto yy765;
+ if (yych != 'i') goto yy187;
+yy765:
+ YYDEBUG(765, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy757;
- if (yych != 't') goto yy186;
-yy757:
- YYDEBUG(757, *YYCURSOR);
+ if (yych == 'T') goto yy766;
+ if (yych != 't') goto yy187;
+yy766:
+ YYDEBUG(766, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy758;
- if (yych != 'c') goto yy186;
-yy758:
- YYDEBUG(758, *YYCURSOR);
+ if (yych == 'C') goto yy767;
+ if (yych != 'c') goto yy187;
+yy767:
+ YYDEBUG(767, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy759;
- if (yych != 'h') goto yy186;
-yy759:
- YYDEBUG(759, *YYCURSOR);
+ if (yych == 'H') goto yy768;
+ if (yych != 'h') goto yy187;
+yy768:
+ YYDEBUG(768, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(760, *YYCURSOR);
+ YYDEBUG(769, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1112 "Zend/zend_language_scanner.l"
+#line 1122 "Zend/zend_language_scanner.l"
{
return T_ENDSWITCH;
}
-#line 6966 "Zend/zend_language_scanner.c"
-yy761:
- YYDEBUG(761, *YYCURSOR);
+#line 7039 "Zend/zend_language_scanner.c"
+yy770:
+ YYDEBUG(770, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(762, *YYCURSOR);
+ YYDEBUG(771, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1056 "Zend/zend_language_scanner.l"
+#line 1066 "Zend/zend_language_scanner.l"
{
return T_ENDIF;
}
-#line 6979 "Zend/zend_language_scanner.c"
-yy763:
- YYDEBUG(763, *YYCURSOR);
+#line 7052 "Zend/zend_language_scanner.c"
+yy772:
+ YYDEBUG(772, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy764;
- if (yych != 'r') goto yy186;
-yy764:
- YYDEBUG(764, *YYCURSOR);
+ if (yych == 'R') goto yy773;
+ if (yych != 'r') goto yy187;
+yy773:
+ YYDEBUG(773, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '@') {
- if (yych <= '/') goto yy765;
- if (yych <= '9') goto yy185;
+ if (yych <= '/') goto yy774;
+ if (yych <= '9') goto yy186;
} else {
- if (yych == 'E') goto yy766;
- if (yych <= 'Z') goto yy185;
+ if (yych == 'E') goto yy775;
+ if (yych <= 'Z') goto yy186;
}
} else {
if (yych <= 'd') {
- if (yych != '`') goto yy185;
+ if (yych != '`') goto yy186;
} else {
- if (yych <= 'e') goto yy766;
- if (yych <= 'z') goto yy185;
- if (yych >= 0x7F) goto yy185;
+ if (yych <= 'e') goto yy775;
+ if (yych <= 'z') goto yy186;
+ if (yych >= 0x7F) goto yy186;
}
}
-yy765:
- YYDEBUG(765, *YYCURSOR);
+yy774:
+ YYDEBUG(774, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1080 "Zend/zend_language_scanner.l"
+#line 1090 "Zend/zend_language_scanner.l"
{
return T_ENDFOR;
}
-#line 7012 "Zend/zend_language_scanner.c"
-yy766:
- YYDEBUG(766, *YYCURSOR);
+#line 7085 "Zend/zend_language_scanner.c"
+yy775:
+ YYDEBUG(775, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy767;
- if (yych != 'a') goto yy186;
-yy767:
- YYDEBUG(767, *YYCURSOR);
+ if (yych == 'A') goto yy776;
+ if (yych != 'a') goto yy187;
+yy776:
+ YYDEBUG(776, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy768;
- if (yych != 'c') goto yy186;
-yy768:
- YYDEBUG(768, *YYCURSOR);
+ if (yych == 'C') goto yy777;
+ if (yych != 'c') goto yy187;
+yy777:
+ YYDEBUG(777, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy769;
- if (yych != 'h') goto yy186;
-yy769:
- YYDEBUG(769, *YYCURSOR);
+ if (yych == 'H') goto yy778;
+ if (yych != 'h') goto yy187;
+yy778:
+ YYDEBUG(778, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(770, *YYCURSOR);
+ YYDEBUG(779, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1088 "Zend/zend_language_scanner.l"
+#line 1098 "Zend/zend_language_scanner.l"
{
return T_ENDFOREACH;
}
-#line 7040 "Zend/zend_language_scanner.c"
-yy771:
- YYDEBUG(771, *YYCURSOR);
+#line 7113 "Zend/zend_language_scanner.c"
+yy780:
+ YYDEBUG(780, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy772;
- if (yych != 'c') goto yy186;
-yy772:
- YYDEBUG(772, *YYCURSOR);
+ if (yych == 'C') goto yy781;
+ if (yych != 'c') goto yy187;
+yy781:
+ YYDEBUG(781, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy773;
- if (yych != 'l') goto yy186;
-yy773:
- YYDEBUG(773, *YYCURSOR);
+ if (yych == 'L') goto yy782;
+ if (yych != 'l') goto yy187;
+yy782:
+ YYDEBUG(782, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy774;
- if (yych != 'a') goto yy186;
-yy774:
- YYDEBUG(774, *YYCURSOR);
+ if (yych == 'A') goto yy783;
+ if (yych != 'a') goto yy187;
+yy783:
+ YYDEBUG(783, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy775;
- if (yych != 'r') goto yy186;
-yy775:
- YYDEBUG(775, *YYCURSOR);
+ if (yych == 'R') goto yy784;
+ if (yych != 'r') goto yy187;
+yy784:
+ YYDEBUG(784, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy776;
- if (yych != 'e') goto yy186;
-yy776:
- YYDEBUG(776, *YYCURSOR);
+ if (yych == 'E') goto yy785;
+ if (yych != 'e') goto yy187;
+yy785:
+ YYDEBUG(785, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(777, *YYCURSOR);
+ YYDEBUG(786, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1096 "Zend/zend_language_scanner.l"
+#line 1106 "Zend/zend_language_scanner.l"
{
return T_ENDDECLARE;
}
-#line 7078 "Zend/zend_language_scanner.c"
-yy778:
- YYDEBUG(778, *YYCURSOR);
+#line 7151 "Zend/zend_language_scanner.c"
+yy787:
+ YYDEBUG(787, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy779;
- if (yych != 't') goto yy186;
-yy779:
- YYDEBUG(779, *YYCURSOR);
+ if (yych == 'T') goto yy788;
+ if (yych != 't') goto yy187;
+yy788:
+ YYDEBUG(788, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy780;
- if (yych != 'y') goto yy186;
-yy780:
- YYDEBUG(780, *YYCURSOR);
+ if (yych == 'Y') goto yy789;
+ if (yych != 'y') goto yy187;
+yy789:
+ YYDEBUG(789, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(781, *YYCURSOR);
+ YYDEBUG(790, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1282 "Zend/zend_language_scanner.l"
+#line 1292 "Zend/zend_language_scanner.l"
{
return T_EMPTY;
}
-#line 7101 "Zend/zend_language_scanner.c"
-yy782:
- YYDEBUG(782, *YYCURSOR);
+#line 7174 "Zend/zend_language_scanner.c"
+yy791:
+ YYDEBUG(791, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy783;
- if (yych != 'e') goto yy186;
-yy783:
- YYDEBUG(783, *YYCURSOR);
+ if (yych == 'E') goto yy792;
+ if (yych != 'e') goto yy187;
+yy792:
+ YYDEBUG(792, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '@') {
- if (yych <= '/') goto yy784;
- if (yych <= '9') goto yy185;
+ if (yych <= '/') goto yy793;
+ if (yych <= '9') goto yy186;
} else {
- if (yych == 'I') goto yy785;
- if (yych <= 'Z') goto yy185;
+ if (yych == 'I') goto yy794;
+ if (yych <= 'Z') goto yy186;
}
} else {
if (yych <= 'h') {
- if (yych != '`') goto yy185;
+ if (yych != '`') goto yy186;
} else {
- if (yych <= 'i') goto yy785;
- if (yych <= 'z') goto yy185;
- if (yych >= 0x7F) goto yy185;
+ if (yych <= 'i') goto yy794;
+ if (yych <= 'z') goto yy186;
+ if (yych >= 0x7F) goto yy186;
}
}
-yy784:
- YYDEBUG(784, *YYCURSOR);
+yy793:
+ YYDEBUG(793, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1060 "Zend/zend_language_scanner.l"
+#line 1070 "Zend/zend_language_scanner.l"
{
return T_ELSE;
}
-#line 7134 "Zend/zend_language_scanner.c"
-yy785:
- YYDEBUG(785, *YYCURSOR);
+#line 7207 "Zend/zend_language_scanner.c"
+yy794:
+ YYDEBUG(794, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy786;
- if (yych != 'f') goto yy186;
-yy786:
- YYDEBUG(786, *YYCURSOR);
+ if (yych == 'F') goto yy795;
+ if (yych != 'f') goto yy187;
+yy795:
+ YYDEBUG(795, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(787, *YYCURSOR);
+ YYDEBUG(796, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1052 "Zend/zend_language_scanner.l"
+#line 1062 "Zend/zend_language_scanner.l"
{
return T_ELSEIF;
}
-#line 7152 "Zend/zend_language_scanner.c"
-yy788:
- YYDEBUG(788, *YYCURSOR);
+#line 7225 "Zend/zend_language_scanner.c"
+yy797:
+ YYDEBUG(797, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy789;
- if (yych != 'o') goto yy186;
-yy789:
- YYDEBUG(789, *YYCURSOR);
+ if (yych == 'O') goto yy798;
+ if (yych != 'o') goto yy187;
+yy798:
+ YYDEBUG(798, *YYCURSOR);
++YYCURSOR;
if (yybm[0+(yych = *YYCURSOR)] & 4) {
- goto yy185;
+ goto yy186;
}
- YYDEBUG(790, *YYCURSOR);
+ YYDEBUG(799, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1136 "Zend/zend_language_scanner.l"
+#line 1146 "Zend/zend_language_scanner.l"
{
return T_ECHO;
}
-#line 7170 "Zend/zend_language_scanner.c"
+#line 7243 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_PROPERTY:
@@ -7205,41 +7278,41 @@ yyc_ST_LOOKING_FOR_PROPERTY:
64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64,
};
- YYDEBUG(791, *YYCURSOR);
+ YYDEBUG(800, *YYCURSOR);
YYFILL(2);
yych = *YYCURSOR;
if (yych <= '-') {
if (yych <= '\r') {
- if (yych <= 0x08) goto yy799;
- if (yych <= '\n') goto yy793;
- if (yych <= '\f') goto yy799;
+ if (yych <= 0x08) goto yy808;
+ if (yych <= '\n') goto yy802;
+ if (yych <= '\f') goto yy808;
} else {
- if (yych == ' ') goto yy793;
- if (yych <= ',') goto yy799;
- goto yy795;
+ if (yych == ' ') goto yy802;
+ if (yych <= ',') goto yy808;
+ goto yy804;
}
} else {
if (yych <= '_') {
- if (yych <= '@') goto yy799;
- if (yych <= 'Z') goto yy797;
- if (yych <= '^') goto yy799;
- goto yy797;
+ if (yych <= '@') goto yy808;
+ if (yych <= 'Z') goto yy806;
+ if (yych <= '^') goto yy808;
+ goto yy806;
} else {
- if (yych <= '`') goto yy799;
- if (yych <= 'z') goto yy797;
- if (yych <= '~') goto yy799;
- goto yy797;
+ if (yych <= '`') goto yy808;
+ if (yych <= 'z') goto yy806;
+ if (yych <= '~') goto yy808;
+ goto yy806;
}
}
-yy793:
- YYDEBUG(793, *YYCURSOR);
+yy802:
+ YYDEBUG(802, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy805;
-yy794:
- YYDEBUG(794, *YYCURSOR);
+ goto yy814;
+yy803:
+ YYDEBUG(803, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1169 "Zend/zend_language_scanner.l"
+#line 1179 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -7247,73 +7320,73 @@ yy794:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 7251 "Zend/zend_language_scanner.c"
-yy795:
- YYDEBUG(795, *YYCURSOR);
+#line 7324 "Zend/zend_language_scanner.c"
+yy804:
+ YYDEBUG(804, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) == '>') goto yy802;
-yy796:
- YYDEBUG(796, *YYCURSOR);
+ if ((yych = *YYCURSOR) == '>') goto yy811;
+yy805:
+ YYDEBUG(805, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1188 "Zend/zend_language_scanner.l"
+#line 1198 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
goto restart;
}
-#line 7265 "Zend/zend_language_scanner.c"
-yy797:
- YYDEBUG(797, *YYCURSOR);
+#line 7338 "Zend/zend_language_scanner.c"
+yy806:
+ YYDEBUG(806, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy801;
-yy798:
- YYDEBUG(798, *YYCURSOR);
+ goto yy810;
+yy807:
+ YYDEBUG(807, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1181 "Zend/zend_language_scanner.l"
+#line 1191 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 7281 "Zend/zend_language_scanner.c"
-yy799:
- YYDEBUG(799, *YYCURSOR);
+#line 7354 "Zend/zend_language_scanner.c"
+yy808:
+ YYDEBUG(808, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy796;
-yy800:
- YYDEBUG(800, *YYCURSOR);
+ goto yy805;
+yy809:
+ YYDEBUG(809, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy801:
- YYDEBUG(801, *YYCURSOR);
+yy810:
+ YYDEBUG(810, *YYCURSOR);
if (yybm[0+yych] & 64) {
- goto yy800;
+ goto yy809;
}
- goto yy798;
-yy802:
- YYDEBUG(802, *YYCURSOR);
+ goto yy807;
+yy811:
+ YYDEBUG(811, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(803, *YYCURSOR);
+ YYDEBUG(812, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1177 "Zend/zend_language_scanner.l"
+#line 1187 "Zend/zend_language_scanner.l"
{
return T_OBJECT_OPERATOR;
}
-#line 7306 "Zend/zend_language_scanner.c"
-yy804:
- YYDEBUG(804, *YYCURSOR);
+#line 7379 "Zend/zend_language_scanner.c"
+yy813:
+ YYDEBUG(813, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy805:
- YYDEBUG(805, *YYCURSOR);
+yy814:
+ YYDEBUG(814, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy804;
+ goto yy813;
}
- goto yy794;
+ goto yy803;
}
/* *********************************** */
yyc_ST_LOOKING_FOR_VARNAME:
@@ -7352,73 +7425,99 @@ yyc_ST_LOOKING_FOR_VARNAME:
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
};
- YYDEBUG(806, *YYCURSOR);
+ YYDEBUG(815, *YYCURSOR);
YYFILL(2);
yych = *YYCURSOR;
if (yych <= '_') {
- if (yych <= '@') goto yy810;
- if (yych <= 'Z') goto yy808;
- if (yych <= '^') goto yy810;
+ if (yych <= '@') goto yy819;
+ if (yych <= 'Z') goto yy817;
+ if (yych <= '^') goto yy819;
} else {
- if (yych <= '`') goto yy810;
- if (yych <= 'z') goto yy808;
- if (yych <= '~') goto yy810;
+ if (yych <= '`') goto yy819;
+ if (yych <= 'z') goto yy817;
+ if (yych <= '~') goto yy819;
}
-yy808:
- YYDEBUG(808, *YYCURSOR);
- ++YYCURSOR;
- yych = *YYCURSOR;
- goto yy813;
-yy809:
- YYDEBUG(809, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1464 "Zend/zend_language_scanner.l"
- {
- zend_copy_value(zendlval, yytext, yyleng);
- zendlval->type = IS_STRING;
- yy_pop_state(TSRMLS_C);
- yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
- return T_STRING_VARNAME;
-}
-#line 7384 "Zend/zend_language_scanner.c"
-yy810:
- YYDEBUG(810, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(811, *YYCURSOR);
+yy817:
+ YYDEBUG(817, *YYCURSOR);
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '/') goto yy818;
+ if (yych <= '9') goto yy821;
+ } else {
+ if (yych <= '[') goto yy821;
+ if (yych >= '_') goto yy821;
+ }
+ } else {
+ if (yych <= '|') {
+ if (yych <= '`') goto yy818;
+ if (yych <= 'z') goto yy821;
+ } else {
+ if (yych != '~') goto yy821;
+ }
+ }
+yy818:
+ YYDEBUG(818, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1473 "Zend/zend_language_scanner.l"
+#line 1484 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
goto restart;
}
-#line 7397 "Zend/zend_language_scanner.c"
-yy812:
- YYDEBUG(812, *YYCURSOR);
+#line 7471 "Zend/zend_language_scanner.c"
+yy819:
+ YYDEBUG(819, *YYCURSOR);
+ yych = *++YYCURSOR;
+ goto yy818;
+yy820:
+ YYDEBUG(820, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy813:
- YYDEBUG(813, *YYCURSOR);
+yy821:
+ YYDEBUG(821, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy812;
+ goto yy820;
}
- goto yy809;
+ if (yych == '[') goto yy823;
+ if (yych == '}') goto yy823;
+ YYDEBUG(822, *YYCURSOR);
+ YYCURSOR = YYMARKER;
+ goto yy818;
+yy823:
+ YYDEBUG(823, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(824, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1474 "Zend/zend_language_scanner.l"
+ {
+ yyless(yyleng - 1);
+ zend_copy_value(zendlval, yytext, yyleng);
+ zendlval->type = IS_STRING;
+ yy_pop_state(TSRMLS_C);
+ yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
+ return T_STRING_VARNAME;
+}
+#line 7505 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_NOWDOC:
- YYDEBUG(814, *YYCURSOR);
+ YYDEBUG(825, *YYCURSOR);
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(816, *YYCURSOR);
+ YYDEBUG(827, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(817, *YYCURSOR);
+ YYDEBUG(828, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2355 "Zend/zend_language_scanner.l"
+#line 2368 "Zend/zend_language_scanner.l"
{
int newline = 0;
+ zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
+
if (YYCURSOR > YYLIMIT) {
return 0;
}
@@ -7434,8 +7533,8 @@ yyc_ST_NOWDOC:
/* fall through */
case '\n':
/* Check for ending label on the next line */
- if (IS_LABEL_START(*YYCURSOR) && CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, CG(heredoc), CG(heredoc_len))) {
- YYCTYPE *end = YYCURSOR + CG(heredoc_len);
+ if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
+ YYCTYPE *end = YYCURSOR + heredoc_label->length;
if (*end == ';') {
end++;
@@ -7470,7 +7569,7 @@ nowdoc_scan_done:
HANDLE_NEWLINES(yytext, yyleng - newline);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7474 "Zend/zend_language_scanner.c"
+#line 7573 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_VAR_OFFSET:
{
@@ -7508,76 +7607,76 @@ yyc_ST_VAR_OFFSET:
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
};
- YYDEBUG(818, *YYCURSOR);
+ YYDEBUG(829, *YYCURSOR);
YYFILL(3);
yych = *YYCURSOR;
if (yych <= '/') {
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych <= 0x08) goto yy832;
- if (yych <= '\n') goto yy828;
- goto yy832;
+ if (yych <= 0x08) goto yy843;
+ if (yych <= '\n') goto yy839;
+ goto yy843;
} else {
- if (yych <= '\r') goto yy828;
- if (yych <= 0x1F) goto yy832;
- goto yy828;
+ if (yych <= '\r') goto yy839;
+ if (yych <= 0x1F) goto yy843;
+ goto yy839;
}
} else {
if (yych <= '$') {
- if (yych <= '"') goto yy827;
- if (yych <= '#') goto yy828;
- goto yy823;
+ if (yych <= '"') goto yy838;
+ if (yych <= '#') goto yy839;
+ goto yy834;
} else {
- if (yych == '\'') goto yy828;
- goto yy827;
+ if (yych == '\'') goto yy839;
+ goto yy838;
}
}
} else {
if (yych <= '\\') {
if (yych <= '@') {
- if (yych <= '0') goto yy820;
- if (yych <= '9') goto yy822;
- goto yy827;
+ if (yych <= '0') goto yy831;
+ if (yych <= '9') goto yy833;
+ goto yy838;
} else {
- if (yych <= 'Z') goto yy830;
- if (yych <= '[') goto yy827;
- goto yy828;
+ if (yych <= 'Z') goto yy841;
+ if (yych <= '[') goto yy838;
+ goto yy839;
}
} else {
if (yych <= '_') {
- if (yych <= ']') goto yy825;
- if (yych <= '^') goto yy827;
- goto yy830;
+ if (yych <= ']') goto yy836;
+ if (yych <= '^') goto yy838;
+ goto yy841;
} else {
- if (yych <= '`') goto yy827;
- if (yych <= 'z') goto yy830;
- if (yych <= '~') goto yy827;
- goto yy830;
+ if (yych <= '`') goto yy838;
+ if (yych <= 'z') goto yy841;
+ if (yych <= '~') goto yy838;
+ goto yy841;
}
}
}
-yy820:
- YYDEBUG(820, *YYCURSOR);
+yy831:
+ YYDEBUG(831, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'W') {
if (yych <= '9') {
- if (yych >= '0') goto yy844;
+ if (yych >= '0') goto yy855;
} else {
- if (yych == 'B') goto yy841;
+ if (yych == 'B') goto yy852;
}
} else {
if (yych <= 'b') {
- if (yych <= 'X') goto yy843;
- if (yych >= 'b') goto yy841;
+ if (yych <= 'X') goto yy854;
+ if (yych >= 'b') goto yy852;
} else {
- if (yych == 'x') goto yy843;
+ if (yych == 'x') goto yy854;
}
}
-yy821:
- YYDEBUG(821, *YYCURSOR);
+yy832:
+ YYDEBUG(832, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1551 "Zend/zend_language_scanner.l"
+#line 1562 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
zendlval->value.lval = strtol(yytext, NULL, 10);
@@ -7589,81 +7688,81 @@ yy821:
}
return T_NUM_STRING;
}
-#line 7593 "Zend/zend_language_scanner.c"
-yy822:
- YYDEBUG(822, *YYCURSOR);
+#line 7692 "Zend/zend_language_scanner.c"
+yy833:
+ YYDEBUG(833, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy840;
-yy823:
- YYDEBUG(823, *YYCURSOR);
+ goto yy851;
+yy834:
+ YYDEBUG(834, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '_') {
- if (yych <= '@') goto yy824;
- if (yych <= 'Z') goto yy836;
- if (yych >= '_') goto yy836;
+ if (yych <= '@') goto yy835;
+ if (yych <= 'Z') goto yy847;
+ if (yych >= '_') goto yy847;
} else {
- if (yych <= '`') goto yy824;
- if (yych <= 'z') goto yy836;
- if (yych >= 0x7F) goto yy836;
+ if (yych <= '`') goto yy835;
+ if (yych <= 'z') goto yy847;
+ if (yych >= 0x7F) goto yy847;
}
-yy824:
- YYDEBUG(824, *YYCURSOR);
+yy835:
+ YYDEBUG(835, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1883 "Zend/zend_language_scanner.l"
+#line 1894 "Zend/zend_language_scanner.l"
{
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
return yytext[0];
}
-#line 7618 "Zend/zend_language_scanner.c"
-yy825:
- YYDEBUG(825, *YYCURSOR);
+#line 7717 "Zend/zend_language_scanner.c"
+yy836:
+ YYDEBUG(836, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(826, *YYCURSOR);
+ YYDEBUG(837, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1878 "Zend/zend_language_scanner.l"
+#line 1889 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
return ']';
}
-#line 7629 "Zend/zend_language_scanner.c"
-yy827:
- YYDEBUG(827, *YYCURSOR);
+#line 7728 "Zend/zend_language_scanner.c"
+yy838:
+ YYDEBUG(838, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy824;
-yy828:
- YYDEBUG(828, *YYCURSOR);
+ goto yy835;
+yy839:
+ YYDEBUG(839, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(829, *YYCURSOR);
+ YYDEBUG(840, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1888 "Zend/zend_language_scanner.l"
+#line 1899 "Zend/zend_language_scanner.l"
{
/* Invalid rule to return a more explicit parse error with proper line number */
yyless(0);
yy_pop_state(TSRMLS_C);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7646 "Zend/zend_language_scanner.c"
-yy830:
- YYDEBUG(830, *YYCURSOR);
+#line 7745 "Zend/zend_language_scanner.c"
+yy841:
+ YYDEBUG(841, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy835;
-yy831:
- YYDEBUG(831, *YYCURSOR);
+ goto yy846;
+yy842:
+ YYDEBUG(842, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1895 "Zend/zend_language_scanner.l"
+#line 1906 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 7661 "Zend/zend_language_scanner.c"
-yy832:
- YYDEBUG(832, *YYCURSOR);
+#line 7760 "Zend/zend_language_scanner.c"
+yy843:
+ YYDEBUG(843, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(833, *YYCURSOR);
+ YYDEBUG(844, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2411 "Zend/zend_language_scanner.l"
+#line 2426 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -7672,118 +7771,118 @@ yy832:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 7676 "Zend/zend_language_scanner.c"
-yy834:
- YYDEBUG(834, *YYCURSOR);
+#line 7775 "Zend/zend_language_scanner.c"
+yy845:
+ YYDEBUG(845, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy835:
- YYDEBUG(835, *YYCURSOR);
+yy846:
+ YYDEBUG(846, *YYCURSOR);
if (yybm[0+yych] & 16) {
- goto yy834;
+ goto yy845;
}
- goto yy831;
-yy836:
- YYDEBUG(836, *YYCURSOR);
+ goto yy842;
+yy847:
+ YYDEBUG(847, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(837, *YYCURSOR);
+ YYDEBUG(848, *YYCURSOR);
if (yych <= '^') {
if (yych <= '9') {
- if (yych >= '0') goto yy836;
+ if (yych >= '0') goto yy847;
} else {
- if (yych <= '@') goto yy838;
- if (yych <= 'Z') goto yy836;
+ if (yych <= '@') goto yy849;
+ if (yych <= 'Z') goto yy847;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy836;
+ if (yych <= '_') goto yy847;
} else {
- if (yych <= 'z') goto yy836;
- if (yych >= 0x7F) goto yy836;
+ if (yych <= 'z') goto yy847;
+ if (yych >= 0x7F) goto yy847;
}
}
-yy838:
- YYDEBUG(838, *YYCURSOR);
+yy849:
+ YYDEBUG(849, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1883 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 7718 "Zend/zend_language_scanner.c"
-yy839:
- YYDEBUG(839, *YYCURSOR);
+#line 7817 "Zend/zend_language_scanner.c"
+yy850:
+ YYDEBUG(850, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy840:
- YYDEBUG(840, *YYCURSOR);
+yy851:
+ YYDEBUG(851, *YYCURSOR);
if (yybm[0+yych] & 32) {
- goto yy839;
+ goto yy850;
}
- goto yy821;
-yy841:
- YYDEBUG(841, *YYCURSOR);
+ goto yy832;
+yy852:
+ YYDEBUG(852, *YYCURSOR);
yych = *++YYCURSOR;
if (yybm[0+yych] & 128) {
- goto yy849;
+ goto yy860;
}
-yy842:
- YYDEBUG(842, *YYCURSOR);
+yy853:
+ YYDEBUG(853, *YYCURSOR);
YYCURSOR = YYMARKER;
- goto yy821;
-yy843:
- YYDEBUG(843, *YYCURSOR);
+ goto yy832;
+yy854:
+ YYDEBUG(854, *YYCURSOR);
yych = *++YYCURSOR;
if (yybm[0+yych] & 64) {
- goto yy847;
+ goto yy858;
}
- goto yy842;
-yy844:
- YYDEBUG(844, *YYCURSOR);
+ goto yy853;
+yy855:
+ YYDEBUG(855, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(845, *YYCURSOR);
- if (yych <= '/') goto yy846;
- if (yych <= '9') goto yy844;
-yy846:
- YYDEBUG(846, *YYCURSOR);
+ YYDEBUG(856, *YYCURSOR);
+ if (yych <= '/') goto yy857;
+ if (yych <= '9') goto yy855;
+yy857:
+ YYDEBUG(857, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1563 "Zend/zend_language_scanner.l"
+#line 1574 "Zend/zend_language_scanner.l"
{ /* Offset must be treated as a string */
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_NUM_STRING;
}
-#line 7765 "Zend/zend_language_scanner.c"
-yy847:
- YYDEBUG(847, *YYCURSOR);
+#line 7864 "Zend/zend_language_scanner.c"
+yy858:
+ YYDEBUG(858, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(848, *YYCURSOR);
+ YYDEBUG(859, *YYCURSOR);
if (yybm[0+yych] & 64) {
- goto yy847;
+ goto yy858;
}
- goto yy846;
-yy849:
- YYDEBUG(849, *YYCURSOR);
+ goto yy857;
+yy860:
+ YYDEBUG(860, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(850, *YYCURSOR);
+ YYDEBUG(861, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy849;
+ goto yy860;
}
- goto yy846;
+ goto yy857;
}
}
-#line 2420 "Zend/zend_language_scanner.l"
+#line 2435 "Zend/zend_language_scanner.l"
}
diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h
index a1a84b3bc..c1a2313b2 100644
--- a/Zend/zend_language_scanner.h
+++ b/Zend/zend_language_scanner.h
@@ -31,6 +31,7 @@ typedef struct _zend_lex_state {
unsigned char *yy_limit;
int yy_state;
zend_stack state_stack;
+ zend_ptr_stack heredoc_label_stack;
zend_file_handle *in;
uint lineno;
@@ -50,6 +51,10 @@ typedef struct _zend_lex_state {
const zend_encoding *script_encoding;
} zend_lex_state;
+typedef struct _zend_heredoc_label {
+ char *label;
+ int length;
+} zend_heredoc_label;
BEGIN_EXTERN_C()
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 703ca968e..dbf43977f 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -178,22 +178,23 @@ static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
void startup_scanner(TSRMLS_D)
{
CG(parse_error) = 0;
- CG(heredoc) = NULL;
- CG(heredoc_len) = 0;
CG(doc_comment) = NULL;
CG(doc_comment_len) = 0;
zend_stack_init(&SCNG(state_stack));
+ zend_ptr_stack_init(&SCNG(heredoc_label_stack));
+}
+
+static void heredoc_label_dtor(zend_heredoc_label *heredoc_label) {
+ efree(heredoc_label->label);
}
void shutdown_scanner(TSRMLS_D)
{
- if (CG(heredoc)) {
- efree(CG(heredoc));
- CG(heredoc_len)=0;
- }
CG(parse_error) = 0;
- zend_stack_destroy(&SCNG(state_stack));
RESET_DOC_COMMENT();
+ zend_stack_destroy(&SCNG(state_stack));
+ zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1);
+ zend_ptr_stack_destroy(&SCNG(heredoc_label_stack));
}
ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
@@ -208,6 +209,9 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
lex_state->state_stack = SCNG(state_stack);
zend_stack_init(&SCNG(state_stack));
+ lex_state->heredoc_label_stack = SCNG(heredoc_label_stack);
+ zend_ptr_stack_init(&SCNG(heredoc_label_stack));
+
lex_state->in = SCNG(yy_in);
lex_state->yy_state = YYSTATE;
lex_state->filename = zend_get_compiled_filename(TSRMLS_C);
@@ -234,6 +238,10 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
zend_stack_destroy(&SCNG(state_stack));
SCNG(state_stack) = lex_state->state_stack;
+ zend_ptr_stack_clean(&SCNG(heredoc_label_stack), (void (*)(void *)) &heredoc_label_dtor, 1);
+ zend_ptr_stack_destroy(&SCNG(heredoc_label_stack));
+ SCNG(heredoc_label_stack) = lex_state->heredoc_label_stack;
+
SCNG(yy_in) = lex_state->in;
YYSETCONDITION(lex_state->yy_state);
CG(zend_lineno) = lex_state->lineno;
@@ -250,12 +258,6 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
SCNG(input_filter) = lex_state->input_filter;
SCNG(output_filter) = lex_state->output_filter;
SCNG(script_encoding) = lex_state->script_encoding;
-
- if (CG(heredoc)) {
- efree(CG(heredoc));
- CG(heredoc) = NULL;
- CG(heredoc_len) = 0;
- }
}
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
@@ -1033,6 +1035,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_RETURN;
}
+<ST_IN_SCRIPTING>"yield" {
+ return T_YIELD;
+}
+
<ST_IN_SCRIPTING>"try" {
return T_TRY;
}
@@ -1041,6 +1047,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_CATCH;
}
+<ST_IN_SCRIPTING>"finally" {
+ return T_FINALLY;
+}
+
<ST_IN_SCRIPTING>"throw" {
return T_THROW;
}
@@ -1461,7 +1471,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
-<ST_LOOKING_FOR_VARNAME>{LABEL} {
+<ST_LOOKING_FOR_VARNAME>{LABEL}[[}] {
+ yyless(yyleng - 1);
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
yy_pop_state(TSRMLS_C);
@@ -2104,38 +2115,35 @@ inline_html:
<ST_IN_SCRIPTING>b?"<<<"{TABS_AND_SPACES}({LABEL}|([']{LABEL}['])|(["]{LABEL}["])){NEWLINE} {
char *s;
int bprefix = (yytext[0] != '<') ? 1 : 0;
-
- /* save old heredoc label */
- Z_STRVAL_P(zendlval) = CG(heredoc);
- Z_STRLEN_P(zendlval) = CG(heredoc_len);
+ zend_heredoc_label *heredoc_label = emalloc(sizeof(zend_heredoc_label));
CG(zend_lineno)++;
- CG(heredoc_len) = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0);
+ heredoc_label->length = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0);
s = yytext+bprefix+3;
while ((*s == ' ') || (*s == '\t')) {
s++;
- CG(heredoc_len)--;
+ heredoc_label->length--;
}
if (*s == '\'') {
s++;
- CG(heredoc_len) -= 2;
+ heredoc_label->length -= 2;
BEGIN(ST_NOWDOC);
} else {
if (*s == '"') {
s++;
- CG(heredoc_len) -= 2;
+ heredoc_label->length -= 2;
}
BEGIN(ST_HEREDOC);
}
- CG(heredoc) = estrndup(s, CG(heredoc_len));
+ heredoc_label->label = estrndup(s, heredoc_label->length);
/* Check for ending label on the next line */
- if (CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, CG(heredoc_len))) {
- YYCTYPE *end = YYCURSOR + CG(heredoc_len);
+ if (heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, heredoc_label->length)) {
+ YYCTYPE *end = YYCURSOR + heredoc_label->length;
if (*end == ';') {
end++;
@@ -2146,6 +2154,8 @@ inline_html:
}
}
+ zend_ptr_stack_push(&SCNG(heredoc_label_stack), (void *) heredoc_label);
+
return T_START_HEREDOC;
}
@@ -2157,13 +2167,14 @@ inline_html:
<ST_END_HEREDOC>{ANY_CHAR} {
- YYCURSOR += CG(heredoc_len) - 1;
- yyleng = CG(heredoc_len);
+ zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack));
+
+ YYCURSOR += heredoc_label->length - 1;
+ yyleng = heredoc_label->length;
+
+ heredoc_label_dtor(heredoc_label);
+ efree(heredoc_label);
- Z_STRVAL_P(zendlval) = CG(heredoc);
- Z_STRLEN_P(zendlval) = CG(heredoc_len);
- CG(heredoc) = NULL;
- CG(heredoc_len) = 0;
BEGIN(ST_IN_SCRIPTING);
return T_END_HEREDOC;
}
@@ -2283,6 +2294,8 @@ double_quotes_scan_done:
<ST_HEREDOC>{ANY_CHAR} {
int newline = 0;
+ zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
+
if (YYCURSOR > YYLIMIT) {
return 0;
}
@@ -2298,8 +2311,8 @@ double_quotes_scan_done:
/* fall through */
case '\n':
/* Check for ending label on the next line */
- if (IS_LABEL_START(*YYCURSOR) && CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, CG(heredoc), CG(heredoc_len))) {
- YYCTYPE *end = YYCURSOR + CG(heredoc_len);
+ if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
+ YYCTYPE *end = YYCURSOR + heredoc_label->length;
if (*end == ';') {
end++;
@@ -2355,6 +2368,8 @@ heredoc_scan_done:
<ST_NOWDOC>{ANY_CHAR} {
int newline = 0;
+ zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
+
if (YYCURSOR > YYLIMIT) {
return 0;
}
@@ -2370,8 +2385,8 @@ heredoc_scan_done:
/* fall through */
case '\n':
/* Check for ending label on the next line */
- if (IS_LABEL_START(*YYCURSOR) && CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, CG(heredoc), CG(heredoc_len))) {
- YYCTYPE *end = YYCURSOR + CG(heredoc_len);
+ if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
+ YYCTYPE *end = YYCURSOR + heredoc_label->length;
if (*end == ';') {
end++;
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index dbf867404..47df7e92d 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
+/* Generated by re2c 0.13.5 on Mon Aug 20 13:34:50 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index ad15a9662..442535bc6 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -33,7 +33,7 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
-#define ZEND_MODULE_API_NO 20100525
+#define ZEND_MODULE_API_NO 20121113
#ifdef ZTS
#define USING_ZTS 1
#else
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 4c6a784a8..224c7a209 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -87,6 +87,7 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz
op_array->static_variables = NULL;
op_array->last_try_catch = 0;
+ op_array->has_finally_block = 0;
op_array->this_var = -1;
@@ -498,6 +499,24 @@ static void zend_extension_op_array_handler(zend_extension *extension, zend_op_a
}
}
+static void zend_check_finally_breakout(zend_op_array *op_array, zend_op *opline, zend_uint dst_num TSRMLS_DC) {
+ zend_uint i, op_num = opline - op_array->opcodes;
+ for (i=0; i < op_array->last_try_catch; i++) {
+ if (op_array->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if ((op_num >= op_array->try_catch_array[i].finally_op
+ && op_num < op_array->try_catch_array[i].finally_end)
+ && (dst_num >= op_array->try_catch_array[i].finally_end
+ || dst_num < op_array->try_catch_array[i].finally_op)) {
+ CG(in_compilation) = 1;
+ CG(active_op_array) = op_array;
+ CG(zend_lineno) = opline->lineno;
+ zend_error(E_COMPILE_ERROR, "jump out of a finally block is disallowed");
+ }
+ }
+}
+
ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC)
{
zend_op *opline, *end;
@@ -541,8 +560,30 @@ ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC)
}
/* break omitted intentionally */
case ZEND_JMP:
+ if (op_array->last_try_catch) {
+ zend_check_finally_breakout(op_array, opline, opline->op1.opline_num TSRMLS_CC);
+ }
opline->op1.jmp_addr = &op_array->opcodes[opline->op1.opline_num];
break;
+ case ZEND_BRK:
+ case ZEND_CONT:
+ if (op_array->last_try_catch) {
+ int nest_levels, array_offset;
+ zend_brk_cont_element *jmp_to;
+
+ nest_levels = Z_LVAL_P(opline->op2.zv);
+ array_offset = opline->op1.opline_num;
+ do {
+ jmp_to = &op_array->brk_cont_array[array_offset];
+ if (nest_levels > 1) {
+ array_offset = jmp_to->parent;
+ }
+ } while (--nest_levels > 0);
+ if (op_array->last_try_catch) {
+ zend_check_finally_breakout(op_array, opline, jmp_to->brk TSRMLS_CC);
+ }
+ }
+ break;
case ZEND_JMPZ:
case ZEND_JMPNZ:
case ZEND_JMPZ_EX:
@@ -551,6 +592,17 @@ ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC)
case ZEND_JMP_SET_VAR:
opline->op2.jmp_addr = &op_array->opcodes[opline->op2.opline_num];
break;
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
+ if (opline->op1_type != IS_CONST || Z_TYPE_P(opline->op1.zv) != IS_NULL) {
+ CG(zend_lineno) = opline->lineno;
+ zend_error(E_COMPILE_ERROR, "Generators cannot return values using \"return\"");
+ }
+
+ opline->opcode = ZEND_GENERATOR_RETURN;
+ }
+ break;
}
ZEND_VM_SET_OPCODE_HANDLER(opline);
opline++;
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 9b01e5fbc..cf3a908ad 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -42,6 +42,43 @@ static _locale_t current_locale = NULL;
#define TYPE_PAIR(t1,t2) (((t1) << 4) | (t2))
+static const unsigned char tolower_map[256] = {
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
+0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x5b,0x5c,0x5d,0x5e,0x5f,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,
+0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
+0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
+0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
+0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
+0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
+0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
+0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
+0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
+};
+
+#define zend_tolower_ascii(c) (tolower_map[(unsigned char)(c)])
+
+/**
+ * Functions using locale lowercase:
+ zend_binary_strncasecmp_l
+ zend_binary_strcasecmp_l
+ zend_binary_zval_strcasecmp
+ zend_binary_zval_strncasecmp
+ string_compare_function_ex
+ string_case_compare_function
+ * Functions using ascii lowercase:
+ zend_str_tolower_copy
+ zend_str_tolower_dup
+ zend_str_tolower
+ zend_binary_strcasecmp
+ zend_binary_strncasecmp
+ */
+
ZEND_API int zend_atoi(const char *str, int str_len) /* {{{ */
{
int retval;
@@ -1911,7 +1948,7 @@ ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned in
register unsigned char *end = str + length;
while (str < end) {
- *result++ = zend_tolower((int)*str++);
+ *result++ = zend_tolower_ascii(*str++);
}
*result = '\0';
@@ -1931,7 +1968,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length) /* {{{ */
register unsigned char *end = p + length;
while (p < end) {
- *p = zend_tolower((int)*p);
+ *p = zend_tolower_ascii(*p);
p++;
}
}
@@ -1980,6 +2017,49 @@ ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, u
len = MIN(len1, len2);
while (len--) {
+ c1 = zend_tolower_ascii(*(unsigned char *)s1++);
+ c2 = zend_tolower_ascii(*(unsigned char *)s2++);
+ if (c1 != c2) {
+ return c1 - c2;
+ }
+ }
+
+ return len1 - len2;
+}
+/* }}} */
+
+ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length) /* {{{ */
+{
+ int len;
+ int c1, c2;
+
+ if (s1 == s2) {
+ return 0;
+ }
+ len = MIN(length, MIN(len1, len2));
+ while (len--) {
+ c1 = zend_tolower_ascii(*(unsigned char *)s1++);
+ c2 = zend_tolower_ascii(*(unsigned char *)s2++);
+ if (c1 != c2) {
+ return c1 - c2;
+ }
+ }
+
+ return MIN(length, len1) - MIN(length, len2);
+}
+/* }}} */
+
+ZEND_API int zend_binary_strcasecmp_l(const char *s1, uint len1, const char *s2, uint len2) /* {{{ */
+{
+ int len;
+ int c1, c2;
+
+ if (s1 == s2) {
+ return 0;
+ }
+
+ len = MIN(len1, len2);
+ while (len--) {
c1 = zend_tolower((int)*(unsigned char *)s1++);
c2 = zend_tolower((int)*(unsigned char *)s2++);
if (c1 != c2) {
@@ -1991,7 +2071,7 @@ ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, u
}
/* }}} */
-ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length) /* {{{ */
+ZEND_API int zend_binary_strncasecmp_l(const char *s1, uint len1, const char *s2, uint len2, uint length) /* {{{ */
{
int len;
int c1, c2;
@@ -2026,13 +2106,13 @@ ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3) /* {{{ */
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2) /* {{{ */
{
- return zend_binary_strcasecmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
+ return zend_binary_strcasecmp_l(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
}
/* }}} */
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3) /* {{{ */
{
- return zend_binary_strncasecmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2), Z_LVAL_P(s3));
+ return zend_binary_strncasecmp_l(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2), Z_LVAL_P(s3));
}
/* }}} */
@@ -2067,7 +2147,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
} else if (ret2!=IS_DOUBLE) {
if (oflow1) {
ZVAL_LONG(result, oflow1);
- return;
+ return;
}
dval2 = (double) lval2;
} else if (dval1 == dval2 && !zend_finite(dval1)) {
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index d28140e9e..08a6b19bd 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -340,6 +340,7 @@ ZEND_API int zend_binary_strcmp(const char *s1, uint len1, const char *s2, uint
ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char *s2, uint len2, uint length);
ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, uint len2);
ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length);
+ZEND_API int zend_binary_strncasecmp_l(const char *s1, uint len1, const char *s2, uint len2, uint length);
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC);
diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c
index aefa91f73..d178cc018 100644
--- a/Zend/zend_ptr_stack.c
+++ b/Zend/zend_ptr_stack.c
@@ -111,6 +111,22 @@ ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
return stack->top;
}
+ZEND_API void zend_ptr_stack_push_from_memory(zend_ptr_stack *stack, int count, void **pointers)
+{
+ ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count);
+
+ memcpy(stack->top_element, pointers, count * sizeof(void *));
+ stack->top_element += count;
+ stack->top += count;
+}
+
+ZEND_API void zend_ptr_stack_pop_into_memory(zend_ptr_stack *stack, int count, void **pointers)
+{
+ memcpy(pointers, stack->top_element - count, count * sizeof(void *));
+ stack->top_element -= count;
+ stack->top -= count;
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h
index cc062de87..fe93e93b5 100644
--- a/Zend/zend_ptr_stack.h
+++ b/Zend/zend_ptr_stack.h
@@ -41,6 +41,8 @@ ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
+ZEND_API void zend_ptr_stack_push_from_memory(zend_ptr_stack *stack, int count, void **pointers);
+ZEND_API void zend_ptr_stack_pop_into_memory(zend_ptr_stack *stack, int count, void **pointers);
END_EXTERN_C()
#define ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) \
@@ -111,6 +113,11 @@ static zend_always_inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
return *(--stack->top_element);
}
+static inline void *zend_ptr_stack_top(zend_ptr_stack *stack)
+{
+ return stack->elements[stack->top - 1];
+}
+
#endif /* ZEND_PTR_STACK_H */
/*
diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c
index f61ae0b17..6105fb111 100644
--- a/Zend/zend_signal.c
+++ b/Zend/zend_signal.c
@@ -215,7 +215,7 @@ ZEND_API int zend_sigaction(int signo, const struct sigaction *act, struct sigac
sa.sa_mask = global_sigmask;
if (sigaction(signo, &sa, NULL) < 0) {
- zend_error(E_WARNING, "Error installing signal handler for %d", signo);
+ zend_error(E_ERROR, "Error installing signal handler for %d", signo);
}
/* unsure this signal is not blocked */
@@ -267,7 +267,7 @@ static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void
sa.sa_mask = global_sigmask;
if (sigaction(signo, &sa, NULL) < 0) {
- zend_error(E_WARNING, "Error installing signal handler for %d", signo);
+ zend_error(E_ERROR, "Error installing signal handler for %d", signo);
}
return SUCCESS;
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 70e61122a..25a66a197 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -40,6 +40,8 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
TSRMLS_FETCH();
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
+ /* break possible cycles */
+ Z_TYPE_P(zvalue) = IS_NULL;
zend_hash_destroy(zvalue->value.ht);
FREE_HASHTABLE(zvalue->value.ht);
}
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 9d475a688..b06c09f48 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -1174,7 +1174,7 @@ ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_IS);
}
-ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, VAR|CV, CONST|TMP|VAR|CV)
+ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -1187,10 +1187,19 @@ ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, VAR|CV, CONST|TMP|VAR|CV)
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
- FREE_OP2();
- FREE_OP1_VAR_PTR();
+
+ if (OP1_TYPE == IS_TMP_VAR || OP1_TYPE == IS_CONST) {
+ zval *container = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
+ FREE_OP2();
+ FREE_OP1();
+ } else {
+ container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
+ FREE_OP2();
+ FREE_OP1_VAR_PTR();
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -1831,6 +1840,386 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
ZEND_VM_NEXT_OPCODE();
}
+ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
+{
+ zend_bool nested;
+ zend_op_array *op_array = EX(op_array);
+
+ /* Generators go throw a different cleanup process */
+ if (EX(op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ /* Close the generator to free up resources */
+ zend_generator_close(generator, 1 TSRMLS_CC);
+
+ /* Pass execution back to handling code */
+ ZEND_VM_RETURN();
+ }
+
+ EG(current_execute_data) = EX(prev_execute_data);
+ EG(opline_ptr) = NULL;
+ if (!EG(active_symbol_table)) {
+ zend_free_compiled_variables(EX_CVs(), op_array->last_var);
+ }
+
+ if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
+ zval_ptr_dtor((zval**)&op_array->prototype);
+ }
+
+ nested = EX(nested);
+
+ zend_vm_stack_free(execute_data TSRMLS_CC);
+
+ if (nested) {
+ execute_data = EG(current_execute_data);
+ }
+ if (nested) {
+ USE_OPLINE
+
+ LOAD_REGS();
+ LOAD_OPLINE();
+ if (UNEXPECTED(opline->opcode == ZEND_INCLUDE_OR_EVAL)) {
+
+ EX(function_state).function = (zend_function *) EX(op_array);
+ EX(function_state).arguments = NULL;
+ EX(object) = EX(current_object);
+
+ EG(opline_ptr) = &EX(opline);
+ EG(active_op_array) = EX(op_array);
+ EG(return_value_ptr_ptr) = EX(original_return_value);
+ destroy_op_array(op_array TSRMLS_CC);
+ efree(op_array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL TSRMLS_CC);
+ HANDLE_EXCEPTION_LEAVE();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
+ }
+ }
+
+ ZEND_VM_INC_OPCODE();
+ ZEND_VM_LEAVE();
+ } else {
+ EG(opline_ptr) = &EX(opline);
+ EG(active_op_array) = EX(op_array);
+ EG(return_value_ptr_ptr) = EX(original_return_value);
+ if (EG(active_symbol_table)) {
+ zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
+ }
+ EG(active_symbol_table) = EX(symbol_table);
+
+ EX(function_state).function = (zend_function *) EX(op_array);
+ EX(function_state).arguments = NULL;
+
+ if (EG(This)) {
+ if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
+ if (IS_CTOR_USED(EX(called_scope))) {
+ Z_DELREF_P(EG(This));
+ }
+ if (Z_REFCOUNT_P(EG(This)) == 1) {
+ zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
+ }
+ }
+ zval_ptr_dtor(&EG(This));
+ }
+ EG(This) = EX(current_this);
+ EG(scope) = EX(current_scope);
+ EG(called_scope) = EX(current_called_scope);
+
+ EX(object) = EX(current_object);
+ EX(called_scope) = DECODE_CTOR(EX(called_scope));
+
+ zend_vm_stack_clear_multiple(TSRMLS_C);
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL TSRMLS_CC);
+ if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
+ }
+ HANDLE_EXCEPTION_LEAVE();
+ }
+
+ ZEND_VM_INC_OPCODE();
+ ZEND_VM_LEAVE();
+ }
+ }
+ ZEND_VM_RETURN();
+}
+
+ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
+{
+ USE_OPLINE
+ zend_bool should_change_scope = 0;
+ zend_function *fbc = EX(function_state).function;
+
+ SAVE_OPLINE();
+ if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
+ zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
+ }
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
+ zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
+ fbc->common.scope ? fbc->common.scope->name : "",
+ fbc->common.scope ? "::" : "",
+ fbc->common.function_name);
+ }
+ }
+ if (fbc->common.scope &&
+ !(fbc->common.fn_flags & ZEND_ACC_STATIC) &&
+ !EX(object)) {
+
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ /* FIXME: output identifiers properly */
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", fbc->common.scope->name, fbc->common.function_name);
+ } else {
+ /* FIXME: output identifiers properly */
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", fbc->common.scope->name, fbc->common.function_name);
+ }
+ }
+
+ if (fbc->type == ZEND_USER_FUNCTION || fbc->common.scope) {
+ should_change_scope = 1;
+ EX(current_this) = EG(This);
+ EX(current_scope) = EG(scope);
+ EX(current_called_scope) = EG(called_scope);
+ EG(This) = EX(object);
+ EG(scope) = (fbc->type == ZEND_USER_FUNCTION || !EX(object)) ? fbc->common.scope : NULL;
+ EG(called_scope) = EX(called_scope);
+ }
+
+ zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc));
+ EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
+ LOAD_OPLINE();
+
+ if (fbc->type == ZEND_INTERNAL_FUNCTION) {
+ temp_variable *ret = &EX_T(opline->result.var);
+
+ MAKE_STD_ZVAL(ret->var.ptr);
+ ZVAL_NULL(ret->var.ptr);
+ ret->var.ptr_ptr = &ret->var.ptr;
+ ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
+
+ if (fbc->common.arg_info) {
+ zend_uint i=0;
+ zval **p = (zval**)EX(function_state).arguments;
+ ulong arg_count = opline->extended_value;
+
+ while (arg_count>0) {
+ zend_verify_arg_type(fbc, ++i, *(p-arg_count), 0 TSRMLS_CC);
+ arg_count--;
+ }
+ }
+
+ if (!zend_execute_internal) {
+ /* saves one function call if zend_execute_internal is not used */
+ fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
+ } else {
+ zend_execute_internal(EXECUTE_DATA, NULL, RETURN_VALUE_USED(opline) TSRMLS_CC);
+ }
+
+ if (!RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(&ret->var.ptr);
+ }
+ } else if (fbc->type == ZEND_USER_FUNCTION) {
+ EX(original_return_value) = EG(return_value_ptr_ptr);
+ EG(active_symbol_table) = NULL;
+ EG(active_op_array) = &fbc->op_array;
+ EG(return_value_ptr_ptr) = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ temp_variable *ret = &EX_T(opline->result.var);
+
+ ret->var.ptr = NULL;
+ EG(return_value_ptr_ptr) = &ret->var.ptr;
+ ret->var.ptr_ptr = &ret->var.ptr;
+ ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
+ }
+
+ if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
+ }
+ } else if (EXPECTED(zend_execute == execute)) {
+ if (EXPECTED(EG(exception) == NULL)) {
+ ZEND_VM_ENTER();
+ }
+ } else {
+ zend_execute(EG(active_op_array) TSRMLS_CC);
+ }
+
+ EG(opline_ptr) = &EX(opline);
+ EG(active_op_array) = EX(op_array);
+ EG(return_value_ptr_ptr) = EX(original_return_value);
+ if (EG(active_symbol_table)) {
+ zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
+ }
+ EG(active_symbol_table) = EX(symbol_table);
+ } else { /* ZEND_OVERLOADED_FUNCTION */
+ MAKE_STD_ZVAL(EX_T(opline->result.var).var.ptr);
+ ZVAL_NULL(EX_T(opline->result.var).var.ptr);
+
+ /* Not sure what should be done here if it's a static method */
+ if (EXPECTED(EX(object) != NULL)) {
+ Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
+ } else {
+ zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
+ }
+
+ if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
+ efree((char*)fbc->common.function_name);
+ }
+ efree(fbc);
+
+ if (!RETURN_VALUE_USED(opline)) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
+ } else {
+ Z_UNSET_ISREF_P(EX_T(opline->result.var).var.ptr);
+ Z_SET_REFCOUNT_P(EX_T(opline->result.var).var.ptr, 1);
+ EX_T(opline->result.var).var.fcall_returned_reference = 0;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ }
+ }
+
+ EX(function_state).function = (zend_function *) EX(op_array);
+ EX(function_state).arguments = NULL;
+
+ if (should_change_scope) {
+ if (EG(This)) {
+ if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
+ if (IS_CTOR_USED(EX(called_scope))) {
+ Z_DELREF_P(EG(This));
+ }
+ if (Z_REFCOUNT_P(EG(This)) == 1) {
+ zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
+ }
+ }
+ zval_ptr_dtor(&EG(This));
+ }
+ EG(This) = EX(current_this);
+ EG(scope) = EX(current_scope);
+ EG(called_scope) = EX(current_called_scope);
+ }
+
+ EX(object) = EX(current_object);
+ EX(called_scope) = DECODE_CTOR(EX(called_scope));
+
+ zend_vm_stack_clear_multiple(TSRMLS_C);
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL TSRMLS_CC);
+ if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
+ }
+ HANDLE_EXCEPTION();
+ }
+
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HELPER_EX(zend_finally_handler_leaving, ANY, ANY, int type)
+{
+ USE_OPLINE
+ zend_uint i, op_num = opline - EX(op_array)->opcodes;
+ zend_uint catch_op_num = 0, finally_op_num = 0;
+
+ SAVE_OPLINE();
+
+ switch (type) {
+ case ZEND_THROW:
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ case ZEND_LEAVE:
+ {
+ if (EG(prev_exception) || (type == ZEND_LEAVE && EG(exception))) {
+ for (i=0; i<EX(op_array)->last_try_catch; i++) {
+ if (EX(op_array)->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if (op_num < EX(op_array)->try_catch_array[i].finally_op) {
+ finally_op_num = EX(op_array)->try_catch_array[i].finally_op;
+ }
+ if (op_num < EX(op_array)->try_catch_array[i].catch_op) {
+ catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
+ }
+ }
+ } else {
+ for (i=0; i<EX(op_array)->last_try_catch; i++) {
+ if (EX(op_array)->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if (op_num < EX(op_array)->try_catch_array[i].finally_op) {
+ finally_op_num = EX(op_array)->try_catch_array[i].finally_op;
+ }
+ }
+ }
+
+ if (catch_op_num && finally_op_num) {
+ /* EG(exception) || EG(prev_exception) */
+ if (catch_op_num > finally_op_num) {
+ zend_exception_save(TSRMLS_C);
+ EX(leaving) = ZEND_THROW;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ } else {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
+ }
+ } else if (catch_op_num) {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
+ } else if (finally_op_num) {
+ zend_exception_save(TSRMLS_C);
+ if (type != ZEND_LEAVE) {
+ EX(leaving) = type;
+ }
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ } else if (EX(leaving) && type != ZEND_LEAVE) {
+ /* leave it to ZEND_LEAVE */
+ EX(leaving) = type;
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ }
+ }
+ break;
+ case ZEND_JMP:
+ case ZEND_BRK:
+ case ZEND_CONT:
+ case ZEND_GOTO:
+ {
+ /* these can not occurred in exception context */
+ for (i=0; i<EG(active_op_array)->last_try_catch; i++) {
+ if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if (op_num < EG(active_op_array)->try_catch_array[i].finally_op
+ && (EX(leaving_dest) < EG(active_op_array)->try_catch_array[i].try_op
+ || EX(leaving_dest) >= EG(active_op_array)->try_catch_array[i].finally_end)) {
+ finally_op_num = EG(active_op_array)->try_catch_array[i].finally_op;
+ }
+ }
+
+ if (finally_op_num) {
+ EX(leaving) = type;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ } else {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[EX(leaving_dest)]);
+ }
+ }
+ break;
+ }
+ ZEND_VM_CONTINUE();
+}
+
ZEND_VM_HANDLER(42, ZEND_JMP, ANY, ANY)
{
USE_OPLINE
@@ -1838,8 +2227,12 @@ ZEND_VM_HANDLER(42, ZEND_JMP, ANY, ANY)
#if DEBUG_ZEND>=2
printf("Jumping to %d\n", opline->op1.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
+ ZEND_VM_CONTINUE(); /* CHECK_ME */
+ }
+ EX(leaving_dest) = opline->op1.jmp_addr - EX(op_array)->opcodes;
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_JMP);
}
ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMP|VAR|CV, ANY)
@@ -2124,7 +2517,9 @@ ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMP|VAR|UNUSED|CV)
USE_OPLINE
SAVE_OPLINE();
- EG(exception) = NULL;
+ if (EG(exception)) {
+ zend_exception_save(TSRMLS_C);
+ }
if (OP2_TYPE == IS_UNUSED) {
EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
CHECK_EXCEPTION();
@@ -2501,299 +2896,6 @@ ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
-{
- zend_bool nested;
- zend_op_array *op_array = EX(op_array);
-
- EG(current_execute_data) = EX(prev_execute_data);
- EG(opline_ptr) = NULL;
- if (!EG(active_symbol_table)) {
- zval ***cv = EX_CVs();
- zval ***end = cv + op_array->last_var;
- while (cv != end) {
- if (*cv) {
- zval_ptr_dtor(*cv);
- }
- cv++;
- }
- }
-
- if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
- zval_ptr_dtor((zval**)&op_array->prototype);
- }
-
- nested = EX(nested);
-
- zend_vm_stack_free(execute_data TSRMLS_CC);
-
- if (nested) {
- execute_data = EG(current_execute_data);
- }
- if (nested) {
- USE_OPLINE
-
- LOAD_REGS();
- LOAD_OPLINE();
- if (UNEXPECTED(opline->opcode == ZEND_INCLUDE_OR_EVAL)) {
-
- EX(function_state).function = (zend_function *) EX(op_array);
- EX(function_state).arguments = NULL;
- EX(object) = EX(current_object);
-
- EG(opline_ptr) = &EX(opline);
- EG(active_op_array) = EX(op_array);
- EG(return_value_ptr_ptr) = EX(original_return_value);
- destroy_op_array(op_array TSRMLS_CC);
- efree(op_array);
- if (UNEXPECTED(EG(exception) != NULL)) {
- zend_throw_exception_internal(NULL TSRMLS_CC);
- HANDLE_EXCEPTION_LEAVE();
- } else if (RETURN_VALUE_USED(opline)) {
- if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
- zval *retval;
-
- ALLOC_ZVAL(retval);
- ZVAL_BOOL(retval, 1);
- INIT_PZVAL(retval);
- EX_T(opline->result.var).var.ptr = retval;
- }
- }
-
- ZEND_VM_INC_OPCODE();
- ZEND_VM_LEAVE();
- } else {
-
- EG(opline_ptr) = &EX(opline);
- EG(active_op_array) = EX(op_array);
- EG(return_value_ptr_ptr) = EX(original_return_value);
- if (EG(active_symbol_table)) {
- if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
- zend_hash_destroy(EG(active_symbol_table));
- FREE_HASHTABLE(EG(active_symbol_table));
- } else {
- /* clean before putting into the cache, since clean
- could call dtors, which could use cached hash */
- zend_hash_clean(EG(active_symbol_table));
- *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
- }
- }
- EG(active_symbol_table) = EX(symbol_table);
-
- EX(function_state).function = (zend_function *) EX(op_array);
- EX(function_state).arguments = NULL;
-
- if (EG(This)) {
- if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
- if (IS_CTOR_USED(EX(called_scope))) {
- Z_DELREF_P(EG(This));
- }
- if (Z_REFCOUNT_P(EG(This)) == 1) {
- zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
- }
- }
- zval_ptr_dtor(&EG(This));
- }
- EG(This) = EX(current_this);
- EG(scope) = EX(current_scope);
- EG(called_scope) = EX(current_called_scope);
-
- EX(object) = EX(current_object);
- EX(called_scope) = DECODE_CTOR(EX(called_scope));
-
- zend_vm_stack_clear_multiple(TSRMLS_C);
-
- if (UNEXPECTED(EG(exception) != NULL)) {
- zend_throw_exception_internal(NULL TSRMLS_CC);
- if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
- zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
- }
- HANDLE_EXCEPTION_LEAVE();
- }
-
- ZEND_VM_INC_OPCODE();
- ZEND_VM_LEAVE();
- }
- }
- ZEND_VM_RETURN();
-}
-
-ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
-{
- USE_OPLINE
- zend_bool should_change_scope = 0;
- zend_function *fbc = EX(function_state).function;
-
- SAVE_OPLINE();
- if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
- zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE(); /* Never reached */
- }
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
- zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
- fbc->common.scope ? fbc->common.scope->name : "",
- fbc->common.scope ? "::" : "",
- fbc->common.function_name);
- }
- }
- if (fbc->common.scope &&
- !(fbc->common.fn_flags & ZEND_ACC_STATIC) &&
- !EX(object)) {
-
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- /* FIXME: output identifiers properly */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", fbc->common.scope->name, fbc->common.function_name);
- } else {
- /* FIXME: output identifiers properly */
- /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", fbc->common.scope->name, fbc->common.function_name);
- }
- }
-
- if (fbc->type == ZEND_USER_FUNCTION || fbc->common.scope) {
- should_change_scope = 1;
- EX(current_this) = EG(This);
- EX(current_scope) = EG(scope);
- EX(current_called_scope) = EG(called_scope);
- EG(This) = EX(object);
- EG(scope) = (fbc->type == ZEND_USER_FUNCTION || !EX(object)) ? fbc->common.scope : NULL;
- EG(called_scope) = EX(called_scope);
- }
-
- zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc));
- EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
- LOAD_OPLINE();
-
- if (fbc->type == ZEND_INTERNAL_FUNCTION) {
- temp_variable *ret = &EX_T(opline->result.var);
-
- MAKE_STD_ZVAL(ret->var.ptr);
- ZVAL_NULL(ret->var.ptr);
- ret->var.ptr_ptr = &ret->var.ptr;
- ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
-
- if (fbc->common.arg_info) {
- zend_uint i=0;
- zval **p = (zval**)EX(function_state).arguments;
- ulong arg_count = opline->extended_value;
-
- while (arg_count>0) {
- zend_verify_arg_type(fbc, ++i, *(p-arg_count), 0 TSRMLS_CC);
- arg_count--;
- }
- }
-
- if (!zend_execute_internal) {
- /* saves one function call if zend_execute_internal is not used */
- fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
- } else {
- zend_execute_internal(EXECUTE_DATA, RETURN_VALUE_USED(opline) TSRMLS_CC);
- }
-
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&ret->var.ptr);
- }
- } else if (fbc->type == ZEND_USER_FUNCTION) {
- EX(original_return_value) = EG(return_value_ptr_ptr);
- EG(active_symbol_table) = NULL;
- EG(active_op_array) = &fbc->op_array;
- EG(return_value_ptr_ptr) = NULL;
- if (RETURN_VALUE_USED(opline)) {
- temp_variable *ret = &EX_T(opline->result.var);
-
- ret->var.ptr = NULL;
- EG(return_value_ptr_ptr) = &ret->var.ptr;
- ret->var.ptr_ptr = &ret->var.ptr;
- ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
- }
-
- if (EXPECTED(zend_execute == execute)) {
- if (EXPECTED(EG(exception) == NULL)) {
- ZEND_VM_ENTER();
- }
- } else {
- zend_execute(EG(active_op_array) TSRMLS_CC);
- }
-
- EG(opline_ptr) = &EX(opline);
- EG(active_op_array) = EX(op_array);
- EG(return_value_ptr_ptr) = EX(original_return_value);
- if (EG(active_symbol_table)) {
- if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
- zend_hash_destroy(EG(active_symbol_table));
- FREE_HASHTABLE(EG(active_symbol_table));
- } else {
- /* clean before putting into the cache, since clean
- could call dtors, which could use cached hash */
- zend_hash_clean(EG(active_symbol_table));
- *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
- }
- }
- EG(active_symbol_table) = EX(symbol_table);
- } else { /* ZEND_OVERLOADED_FUNCTION */
- MAKE_STD_ZVAL(EX_T(opline->result.var).var.ptr);
- ZVAL_NULL(EX_T(opline->result.var).var.ptr);
-
- /* Not sure what should be done here if it's a static method */
- if (EXPECTED(EX(object) != NULL)) {
- Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
- } else {
- zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
- }
-
- if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- efree((char*)fbc->common.function_name);
- }
- efree(fbc);
-
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
- } else {
- Z_UNSET_ISREF_P(EX_T(opline->result.var).var.ptr);
- Z_SET_REFCOUNT_P(EX_T(opline->result.var).var.ptr, 1);
- EX_T(opline->result.var).var.fcall_returned_reference = 0;
- EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
- }
- }
-
- EX(function_state).function = (zend_function *) EX(op_array);
- EX(function_state).arguments = NULL;
-
- if (should_change_scope) {
- if (EG(This)) {
- if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
- if (IS_CTOR_USED(EX(called_scope))) {
- Z_DELREF_P(EG(This));
- }
- if (Z_REFCOUNT_P(EG(This)) == 1) {
- zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
- }
- }
- zval_ptr_dtor(&EG(This));
- }
- EG(This) = EX(current_this);
- EG(scope) = EX(current_scope);
- EG(called_scope) = EX(current_called_scope);
- }
-
- EX(object) = EX(current_object);
- EX(called_scope) = DECODE_CTOR(EX(called_scope));
-
- zend_vm_stack_clear_multiple(TSRMLS_C);
-
- if (UNEXPECTED(EG(exception) != NULL)) {
- zend_throw_exception_internal(NULL TSRMLS_CC);
- if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
- zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
- }
- HANDLE_EXCEPTION();
- }
-
- ZEND_VM_NEXT_OPCODE();
-}
-
ZEND_VM_HANDLER(61, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
{
EX(function_state).function = EX(fbc);
@@ -2837,6 +2939,9 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
FREE_OP1();
}
} else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
if (OP1_TYPE == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -2858,12 +2963,20 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
} else {
zval *ret;
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
FREE_OP1_IF_VAR();
- ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ }
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_RETURN);
}
ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
@@ -2876,6 +2989,10 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
do {
+ if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -2931,6 +3048,18 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
} while (0);
FREE_OP1_IF_VAR();
+
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ }
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_RETURN_BY_REF);
+}
+
+ZEND_VM_HANDLER(161, ZEND_GENERATOR_RETURN, ANY, ANY)
+{
+ if (EX(op_array)->has_finally_block) {
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_RETURN);
+ }
ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
}
@@ -3275,7 +3404,11 @@ ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST)
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
EX(op_array), EX_Ts() TSRMLS_CC);
FREE_OP2();
- ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
+ }
+ EX(leaving_dest) = el->brk;
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_BRK);
}
ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST)
@@ -3287,7 +3420,11 @@ ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST)
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
EX(op_array), EX_Ts() TSRMLS_CC);
FREE_OP2();
- ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
+ }
+ EX(leaving_dest) = el->cont;
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_CONT);
}
ZEND_VM_HANDLER(100, ZEND_GOTO, ANY, CONST)
@@ -3314,7 +3451,11 @@ ZEND_VM_HANDLER(100, ZEND_GOTO, ANY, CONST)
}
break;
}
- ZEND_VM_JMP(opline->op1.jmp_addr);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_JMP(opline->op1.jmp_addr);
+ }
+ EX(leaving_dest) = opline->op1.jmp_addr - EX(op_array)->opcodes;
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_GOTO);
}
ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
@@ -3712,7 +3853,7 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
zend_op_array *new_op_array=NULL;
zend_free_op free_op1;
zval *inc_filename;
- zval *tmp_inc_filename = NULL;
+ zval *tmp_inc_filename = NULL;
zend_bool failure_retval=0;
SAVE_OPLINE();
@@ -4992,13 +5133,28 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
{
zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
int i;
- zend_uint catch_op_num = 0;
- int catched = 0;
- zval restored_error_reporting;
-
- void **stack_frame = (void**)(((char*)EX_Ts()) +
- (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T));
+ zend_uint catch_op_num = 0, finally_op_num = 0;
+ int catched = 0, finally = 0;
+ void **stack_frame;
+
+ /* Figure out where the next stack frame (which maybe contains pushed
+ * arguments that have to be dtor'ed) starts */
+ if (EX(op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ /* For generators the next stack frame is conveniently stored in the
+ * generator object. */
+ stack_frame = generator->original_stack_top;
+ } else {
+ /* In all other cases the next stack frame starts after the temporary
+ * variables section of the current execution context */
+ stack_frame = (void **) ((char *) EX_Ts() +
+ ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T);
+ }
+ /* If the exception was thrown during a function call there might be
+ * arguments pushed to the stack that have to be dtor'ed. */
while (zend_vm_stack_top(TSRMLS_C) != stack_frame) {
zval *stack_zval_p = zend_vm_stack_pop(TSRMLS_C);
zval_ptr_dtor(&stack_zval_p);
@@ -5008,9 +5164,14 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
/* further blocks will not be relevant... */
break;
- } else if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
+ }
+ if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
- catched = 1;
+ catched = i + 1;
+ }
+ if (op_num < EG(active_op_array)->try_catch_array[i].finally_op) {
+ finally_op_num = EX(op_array)->try_catch_array[i].finally_op;
+ finally = i + 1;
}
}
@@ -5060,6 +5221,8 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
/* restore previous error_reporting value */
if (!EG(error_reporting) && EX(old_error_reporting) != NULL && Z_LVAL_P(EX(old_error_reporting)) != 0) {
+ zval restored_error_reporting;
+
Z_TYPE(restored_error_reporting) = IS_LONG;
Z_LVAL(restored_error_reporting) = Z_LVAL_P(EX(old_error_reporting));
convert_to_string(&restored_error_reporting);
@@ -5068,12 +5231,29 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
}
EX(old_error_reporting) = NULL;
- if (!catched) {
- ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
- } else {
+ if (catched && finally) {
+ if (finally_op_num > catch_op_num) {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
+ ZEND_VM_CONTINUE();
+ } else {
+ zend_exception_save(TSRMLS_C);
+ EX(leaving) = ZEND_THROW;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ ZEND_VM_CONTINUE();
+ }
+ } else if (catched) {
+ EX(leaving) = 0;
ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
- ZEND_VM_CONTINUE();
- }
+ ZEND_VM_CONTINUE();
+ } else if (finally) {
+ zend_exception_save(TSRMLS_C);
+ EX(leaving) = ZEND_THROW;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ ZEND_VM_CONTINUE();
+ } else {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ }
}
ZEND_VM_HANDLER(146, ZEND_VERIFY_ABSTRACT_CLASS, ANY, ANY)
@@ -5164,7 +5344,7 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
- zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -5178,8 +5358,8 @@ ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED)
SAVE_OPLINE();
var_ptr = EX_T(opline->op1.var).var.ptr;
if (Z_TYPE_P(var_ptr) != IS_OBJECT &&
- !PZVAL_IS_REF(var_ptr) &&
- Z_REFCOUNT_P(var_ptr) > 1) {
+ !PZVAL_IS_REF(var_ptr) &&
+ Z_REFCOUNT_P(var_ptr) > 1) {
Z_DELREF_P(var_ptr);
ALLOC_ZVAL(new_zv);
@@ -5191,4 +5371,185 @@ ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED)
ZEND_VM_NEXT_OPCODE();
}
+ZEND_VM_HANDLER(159, ZEND_LEAVE, ANY, ANY)
+{
+ zend_exception_restore(TSRMLS_C);
+ if (!EX(leaving)) {
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ zend_uint leaving = EX(leaving);
+ switch (leaving) {
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ case ZEND_THROW:
+ leaving = ZEND_LEAVE;
+ case ZEND_JMP:
+ case ZEND_BRK:
+ case ZEND_CONT:
+ case ZEND_GOTO:
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, leaving);
+ break;
+ }
+ }
+
+ ZEND_VM_CONTINUE();
+}
+
+ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSED)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (OP1_TYPE != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!IS_OP1_TMP_FREE()) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
+
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (OP1_TYPE == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ FREE_OP1_IF_VAR();
+ }
+ } else {
+ zval *value = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ /* Consts, temporary variables and references need copying */
+ if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!IS_OP1_TMP_FREE()) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ FREE_OP1_IF_VAR();
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (OP2_TYPE != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = GET_OP2_ZVAL_PTR(BP_VAR_R);
+
+ /* Consts, temporary variables and references need copying */
+ if (OP2_TYPE == IS_CONST || OP2_TYPE == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!IS_OP2_TMP_FREE()) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ FREE_OP2_IF_VAR();
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
ZEND_VM_EXPORT_HELPER(zend_do_fcall, zend_do_fcall_common_helper)
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 4abe6503c..7a2cfc88d 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -339,30 +339,43 @@ static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* o
#define EX_Ts() EX(Ts)
-ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
-{
- DCL_OPLINE
+zend_execute_data *zend_create_execute_data_from_op_array(zend_op_array *op_array, zend_bool nested TSRMLS_DC) {
zend_execute_data *execute_data;
- zend_bool nested = 0;
- zend_bool original_in_execution = EG(in_execution);
-
- if (EG(exception)) {
- return;
+ /*
+ * When allocating the execute_data, memory for compiled variables and
+ * temporary variables is also allocated after the actual zend_execute_data
+ * struct. op_array->last_var specifies the number of compiled variables and
+ * op_array->T is the number of temporary variables. If there is no symbol
+ * table, then twice as much memory is allocated for compiled variables.
+ * In that case the first half contains zval**s and the second half the
+ * actual zval*s (which would otherwise be in the symbol table).
+ */
+ size_t execute_data_size = ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data));
+ size_t CVs_size = ZEND_MM_ALIGNED_SIZE(sizeof(zval **) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2));
+ size_t Ts_size = ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T;
+ size_t total_size = execute_data_size + CVs_size + Ts_size;
+
+ /*
+ * Normally the execute_data is allocated on the VM stack (because it does
+ * not actually do any allocation and thus is faster). For generators
+ * though this behavior would be suboptimal, because the (rather large)
+ * structure would have to be copied back and forth every time execution is
+ * suspended or resumed. That's why for generators the execution context
+ * is allocated using emalloc, thus allowing to save and restore it simply
+ * by replacing a pointer.
+ */
+ if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
+ execute_data = emalloc(total_size);
+ } else {
+ execute_data = zend_vm_stack_alloc(total_size TSRMLS_CC);
}
- EG(in_execution) = 1;
+ EX(CVs) = (zval ***) ((char *) execute_data + execute_data_size);
+ memset(EX(CVs), 0, sizeof(zval **) * op_array->last_var);
-zend_vm_enter:
- /* Initialize execute_data */
- execute_data = (zend_execute_data *)zend_vm_stack_alloc(
- ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) +
- ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)) +
- ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T TSRMLS_CC);
+ EX(Ts) = (temp_variable *) ((char *) EX(CVs) + CVs_size);
- EX(CVs) = (zval***)((char*)execute_data + ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)));
- memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
- EX(Ts) = (temp_variable *)(((char*)EX(CVs)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)));
EX(fbc) = NULL;
EX(called_scope) = NULL;
EX(object) = NULL;
@@ -372,9 +385,7 @@ zend_vm_enter:
EX(prev_execute_data) = EG(current_execute_data);
EG(current_execute_data) = execute_data;
EX(nested) = nested;
- nested = 1;
-
- LOAD_REGS();
+ EX(leaving) = 0;
if (!op_array->run_time_cache && op_array->last_cache_slot) {
op_array->run_time_cache = ecalloc(op_array->last_cache_slot, sizeof(void*));
@@ -383,10 +394,10 @@ zend_vm_enter:
if (op_array->this_var != -1 && EG(This)) {
Z_ADDREF_P(EG(This)); /* For $this pointer */
if (!EG(active_symbol_table)) {
- EX_CV(op_array->this_var) = (zval**)EX_CVs() + (op_array->last_var + op_array->this_var);
- *EX_CV(op_array->this_var) = EG(This);
+ EX(CVs)[op_array->this_var] = (zval **) EX(CVs) + op_array->last_var + op_array->this_var;
+ *EX(CVs)[op_array->this_var] = EG(This);
} else {
- if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX_CV(op_array->this_var))==FAILURE) {
+ if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void **) &EX(CVs)[op_array->this_var])==FAILURE) {
Z_DELREF_P(EG(This));
}
}
@@ -394,11 +405,26 @@ zend_vm_enter:
EX(opline) = UNEXPECTED((op_array->fn_flags & ZEND_ACC_INTERACTIVE) != 0) && EG(start_op) ? EG(start_op) : op_array->opcodes;
EG(opline_ptr) = &EX(opline);
- LOAD_OPLINE();
EX(function_state).function = (zend_function *) op_array;
EX(function_state).arguments = NULL;
+ return execute_data;
+}
+
+ZEND_API void execute_ex(zend_execute_data *execute_data TSRMLS_DC)
+{
+ DCL_OPLINE
+ zend_bool original_in_execution;
+
+
+
+ original_in_execution = EG(in_execution);
+ EG(in_execution) = 1;
+
+ LOAD_REGS();
+ LOAD_OPLINE();
+
while (1) {
int ret;
#ifdef ZEND_WIN32
@@ -413,10 +439,11 @@ zend_vm_enter:
EG(in_execution) = original_in_execution;
return;
case 2:
- op_array = EG(active_op_array);
- goto zend_vm_enter;
+ execute_data = zend_create_execute_data_from_op_array(EG(active_op_array), 1 TSRMLS_CC);
+ break;
case 3:
execute_data = EG(current_execute_data);
+ break;
default:
break;
}
@@ -426,31 +453,12 @@ zend_vm_enter:
zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
}
-static int ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
-
-#if DEBUG_ZEND>=2
- printf("Jumping to %d\n", opline->op1.opline_num);
-#endif
- ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
-}
-
-static int ZEND_FASTCALL ZEND_INIT_STRING_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
{
- USE_OPLINE
- zval *tmp = &EX_T(opline->result.var).tmp_var;
-
- SAVE_OPLINE();
- tmp->value.str.val = emalloc(1);
- tmp->value.str.val[0] = 0;
- tmp->value.str.len = 0;
- Z_SET_REFCOUNT_P(tmp, 1);
- tmp->type = IS_STRING;
- Z_UNSET_ISREF_P(tmp);
- /*CHECK_EXCEPTION();*/
- ZEND_VM_NEXT_OPCODE();
+ if (EG(exception)) {
+ return;
+ }
+ execute_ex(zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC) TSRMLS_CC);
}
static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
@@ -458,17 +466,22 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
zend_bool nested;
zend_op_array *op_array = EX(op_array);
+ /* Generators go throw a different cleanup process */
+ if (EX(op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ /* Close the generator to free up resources */
+ zend_generator_close(generator, 1 TSRMLS_CC);
+
+ /* Pass execution back to handling code */
+ ZEND_VM_RETURN();
+ }
+
EG(current_execute_data) = EX(prev_execute_data);
EG(opline_ptr) = NULL;
if (!EG(active_symbol_table)) {
- zval ***cv = EX_CVs();
- zval ***end = cv + op_array->last_var;
- while (cv != end) {
- if (*cv) {
- zval_ptr_dtor(*cv);
- }
- cv++;
- }
+ zend_free_compiled_variables(EX_CVs(), op_array->last_var);
}
if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
@@ -515,20 +528,11 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
ZEND_VM_INC_OPCODE();
ZEND_VM_LEAVE();
} else {
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
if (EG(active_symbol_table)) {
- if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
- zend_hash_destroy(EG(active_symbol_table));
- FREE_HASHTABLE(EG(active_symbol_table));
- } else {
- /* clean before putting into the cache, since clean
- could call dtors, which could use cached hash */
- zend_hash_clean(EG(active_symbol_table));
- *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
- }
+ zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
}
EG(active_symbol_table) = EX(symbol_table);
@@ -641,7 +645,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
/* saves one function call if zend_execute_internal is not used */
fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
- zend_execute_internal(execute_data, RETURN_VALUE_USED(opline) TSRMLS_CC);
+ zend_execute_internal(execute_data, NULL, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (!RETURN_VALUE_USED(opline)) {
@@ -661,7 +665,11 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
}
- if (EXPECTED(zend_execute == execute)) {
+ if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
+ }
+ } else if (EXPECTED(zend_execute == execute)) {
if (EXPECTED(EG(exception) == NULL)) {
ZEND_VM_ENTER();
}
@@ -673,22 +681,14 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
if (EG(active_symbol_table)) {
- if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
- zend_hash_destroy(EG(active_symbol_table));
- FREE_HASHTABLE(EG(active_symbol_table));
- } else {
- /* clean before putting into the cache, since clean
- could call dtors, which could use cached hash */
- zend_hash_clean(EG(active_symbol_table));
- *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
- }
+ zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
}
EG(active_symbol_table) = EX(symbol_table);
} else { /* ZEND_OVERLOADED_FUNCTION */
MAKE_STD_ZVAL(EX_T(opline->result.var).var.ptr);
ZVAL_NULL(EX_T(opline->result.var).var.ptr);
- /* Not sure what should be done here if it's a static method */
+ /* Not sure what should be done here if it's a static method */
if (EXPECTED(EX(object) != NULL)) {
Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
@@ -746,12 +746,146 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL zend_finally_handler_leaving_SPEC(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_uint i, op_num = opline - EX(op_array)->opcodes;
+ zend_uint catch_op_num = 0, finally_op_num = 0;
+
+ SAVE_OPLINE();
+
+ switch (type) {
+ case ZEND_THROW:
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ case ZEND_LEAVE:
+ {
+ if (EG(prev_exception) || (type == ZEND_LEAVE && EG(exception))) {
+ for (i=0; i<EX(op_array)->last_try_catch; i++) {
+ if (EX(op_array)->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if (op_num < EX(op_array)->try_catch_array[i].finally_op) {
+ finally_op_num = EX(op_array)->try_catch_array[i].finally_op;
+ }
+ if (op_num < EX(op_array)->try_catch_array[i].catch_op) {
+ catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
+ }
+ }
+ } else {
+ for (i=0; i<EX(op_array)->last_try_catch; i++) {
+ if (EX(op_array)->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if (op_num < EX(op_array)->try_catch_array[i].finally_op) {
+ finally_op_num = EX(op_array)->try_catch_array[i].finally_op;
+ }
+ }
+ }
+
+ if (catch_op_num && finally_op_num) {
+ /* EG(exception) || EG(prev_exception) */
+ if (catch_op_num > finally_op_num) {
+ zend_exception_save(TSRMLS_C);
+ EX(leaving) = ZEND_THROW;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ } else {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
+ }
+ } else if (catch_op_num) {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
+ } else if (finally_op_num) {
+ zend_exception_save(TSRMLS_C);
+ if (type != ZEND_LEAVE) {
+ EX(leaving) = type;
+ }
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ } else if (EX(leaving) && type != ZEND_LEAVE) {
+ /* leave it to ZEND_LEAVE */
+ EX(leaving) = type;
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ }
+ break;
+ case ZEND_JMP:
+ case ZEND_BRK:
+ case ZEND_CONT:
+ case ZEND_GOTO:
+ {
+ /* these can not occurred in exception context */
+ for (i=0; i<EG(active_op_array)->last_try_catch; i++) {
+ if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
+ break;
+ }
+ if (op_num < EG(active_op_array)->try_catch_array[i].finally_op
+ && (EX(leaving_dest) < EG(active_op_array)->try_catch_array[i].try_op
+ || EX(leaving_dest) >= EG(active_op_array)->try_catch_array[i].finally_end)) {
+ finally_op_num = EG(active_op_array)->try_catch_array[i].finally_op;
+ }
+ }
+
+ if (finally_op_num) {
+ EX(leaving) = type;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ } else {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[EX(leaving_dest)]);
+ }
+ }
+ break;
+ }
+ ZEND_VM_CONTINUE();
+}
+
+static int ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+#if DEBUG_ZEND>=2
+ printf("Jumping to %d\n", opline->op1.opline_num);
+#endif
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
+ ZEND_VM_CONTINUE(); /* CHECK_ME */
+ }
+ EX(leaving_dest) = opline->op1.jmp_addr - EX(op_array)->opcodes;
+ return zend_finally_handler_leaving_SPEC(ZEND_JMP, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_INIT_STRING_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *tmp = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
+ tmp->value.str.val = emalloc(1);
+ tmp->value.str.val[0] = 0;
+ tmp->value.str.len = 0;
+ Z_SET_REFCOUNT_P(tmp, 1);
+ tmp->type = IS_STRING;
+ Z_UNSET_ISREF_P(tmp);
+ /*CHECK_EXCEPTION();*/
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
EX(function_state).function = EX(fbc);
return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ if (EX(op_array)->has_finally_block) {
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -1033,13 +1167,28 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
{
zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
int i;
- zend_uint catch_op_num = 0;
- int catched = 0;
- zval restored_error_reporting;
+ zend_uint catch_op_num = 0, finally_op_num = 0;
+ int catched = 0, finally = 0;
+ void **stack_frame;
- void **stack_frame = (void**)(((char*)EX_Ts()) +
- (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T));
+ /* Figure out where the next stack frame (which maybe contains pushed
+ * arguments that have to be dtor'ed) starts */
+ if (EX(op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+ /* For generators the next stack frame is conveniently stored in the
+ * generator object. */
+ stack_frame = generator->original_stack_top;
+ } else {
+ /* In all other cases the next stack frame starts after the temporary
+ * variables section of the current execution context */
+ stack_frame = (void **) ((char *) EX_Ts() +
+ ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T);
+ }
+
+ /* If the exception was thrown during a function call there might be
+ * arguments pushed to the stack that have to be dtor'ed. */
while (zend_vm_stack_top(TSRMLS_C) != stack_frame) {
zval *stack_zval_p = zend_vm_stack_pop(TSRMLS_C);
zval_ptr_dtor(&stack_zval_p);
@@ -1049,9 +1198,14 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
/* further blocks will not be relevant... */
break;
- } else if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
+ }
+ if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
- catched = 1;
+ catched = i + 1;
+ }
+ if (op_num < EG(active_op_array)->try_catch_array[i].finally_op) {
+ finally_op_num = EX(op_array)->try_catch_array[i].finally_op;
+ finally = i + 1;
}
}
@@ -1101,6 +1255,8 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
/* restore previous error_reporting value */
if (!EG(error_reporting) && EX(old_error_reporting) != NULL && Z_LVAL_P(EX(old_error_reporting)) != 0) {
+ zval restored_error_reporting;
+
Z_TYPE(restored_error_reporting) = IS_LONG;
Z_LVAL(restored_error_reporting) = Z_LVAL_P(EX(old_error_reporting));
convert_to_string(&restored_error_reporting);
@@ -1109,12 +1265,29 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
}
EX(old_error_reporting) = NULL;
- if (!catched) {
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
- } else {
+ if (catched && finally) {
+ if (finally_op_num > catch_op_num) {
+ EX(leaving) = 0;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
+ ZEND_VM_CONTINUE();
+ } else {
+ zend_exception_save(TSRMLS_C);
+ EX(leaving) = ZEND_THROW;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ ZEND_VM_CONTINUE();
+ }
+ } else if (catched) {
+ EX(leaving) = 0;
ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
- ZEND_VM_CONTINUE();
- }
+ ZEND_VM_CONTINUE();
+ } else if (finally) {
+ zend_exception_save(TSRMLS_C);
+ EX(leaving) = ZEND_THROW;
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[finally_op_num]);
+ ZEND_VM_CONTINUE();
+ } else {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
}
static int ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1152,12 +1325,38 @@ static int ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS
}
}
+static int ZEND_FASTCALL ZEND_LEAVE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ zend_exception_restore(TSRMLS_C);
+ if (!EX(leaving)) {
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ zend_uint leaving = EX(leaving);
+ switch (leaving) {
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ case ZEND_THROW:
+ leaving = ZEND_LEAVE;
+ case ZEND_JMP:
+ case ZEND_BRK:
+ case ZEND_CONT:
+ case ZEND_GOTO:
+ return zend_finally_handler_leaving_SPEC(leaving, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ break;
+ }
+ }
+
+ ZEND_VM_CONTINUE();
+}
+
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
SAVE_OPLINE();
- EG(exception) = NULL;
+ if (EG(exception)) {
+ zend_exception_save(TSRMLS_C);
+ }
if (IS_CONST == IS_UNUSED) {
EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
CHECK_EXCEPTION();
@@ -1388,7 +1587,11 @@ static int ZEND_FASTCALL ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
EX(op_array), EX_Ts() TSRMLS_CC);
- ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
+ }
+ EX(leaving_dest) = el->brk;
+ return zend_finally_handler_leaving_SPEC(ZEND_BRK, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1400,7 +1603,11 @@ static int ZEND_FASTCALL ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
EX(op_array), EX_Ts() TSRMLS_CC);
- ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
+ }
+ EX(leaving_dest) = el->cont;
+ return zend_finally_handler_leaving_SPEC(ZEND_CONT, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1427,7 +1634,11 @@ static int ZEND_FASTCALL ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
break;
}
- ZEND_VM_JMP(opline->op1.jmp_addr);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_JMP(opline->op1.jmp_addr);
+ }
+ EX(leaving_dest) = opline->op1.jmp_addr - EX(op_array)->opcodes;
+ return zend_finally_handler_leaving_SPEC(ZEND_GOTO, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1462,7 +1673,9 @@ static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_
USE_OPLINE
SAVE_OPLINE();
- EG(exception) = NULL;
+ if (EG(exception)) {
+ zend_exception_save(TSRMLS_C);
+ }
if (IS_TMP_VAR == IS_UNUSED) {
EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
CHECK_EXCEPTION();
@@ -1630,7 +1843,9 @@ static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_
USE_OPLINE
SAVE_OPLINE();
- EG(exception) = NULL;
+ if (EG(exception)) {
+ zend_exception_save(TSRMLS_C);
+ }
if (IS_VAR == IS_UNUSED) {
EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
CHECK_EXCEPTION();
@@ -1798,7 +2013,9 @@ static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDL
USE_OPLINE
SAVE_OPLINE();
- EG(exception) = NULL;
+ if (EG(exception)) {
+ zend_exception_save(TSRMLS_C);
+ }
if (IS_UNUSED == IS_UNUSED) {
EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
CHECK_EXCEPTION();
@@ -1832,7 +2049,9 @@ static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_A
USE_OPLINE
SAVE_OPLINE();
- EG(exception) = NULL;
+ if (EG(exception)) {
+ zend_exception_save(TSRMLS_C);
+ }
if (IS_CV == IS_UNUSED) {
EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
CHECK_EXCEPTION();
@@ -2249,6 +2468,9 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
}
} else if (!0) { /* Not a temp var */
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
if (IS_CONST == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -2270,12 +2492,19 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
} else {
zval *ret;
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2288,6 +2517,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HAND
SAVE_OPLINE();
do {
+ if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -2342,7 +2575,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HAND
}
} while (0);
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN_BY_REF, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2542,7 +2778,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
zend_op_array *new_op_array=NULL;
zval *inc_filename;
- zval *tmp_inc_filename = NULL;
+ zval *tmp_inc_filename = NULL;
zend_bool failure_retval=0;
SAVE_OPLINE();
@@ -3390,6 +3626,36 @@ static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HAN
return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_CONST != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_CONST == IS_TMP_VAR || IS_CONST == IS_CONST) {
+ zval *container = opline->op1.zv;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -3940,6 +4206,160 @@ static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCOD
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CONST != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = opline->op1.zv;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = opline->op1.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *key = opline->op2.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -4216,6 +4636,36 @@ static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDL
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_CONST != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_CONST == IS_TMP_VAR || IS_CONST == IS_CONST) {
+ zval *container = opline->op1.zv;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -4450,6 +4900,160 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HAN
}
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CONST != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = opline->op1.zv;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = opline->op1.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -4890,6 +5494,36 @@ static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDL
return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_CONST != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_CONST == IS_TMP_VAR || IS_CONST == IS_CONST) {
+ zval *container = opline->op1.zv;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -5285,6 +5919,161 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPC
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CONST != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = opline->op1.zv;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = opline->op1.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -5838,12 +6627,166 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
- zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CONST != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = opline->op1.zv;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = opline->op1.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *key = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -6120,6 +7063,36 @@ static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLE
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_CONST != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_CONST == IS_TMP_VAR || IS_CONST == IS_CONST) {
+ zval *container = opline->op1.zv;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -6413,6 +7386,160 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HAND
}
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CONST != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = opline->op1.zv;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = opline->op1.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CV != IS_UNUSED) {
+
+ zval *key = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -6662,6 +7789,9 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zval_dtor(free_op1.var);
}
} else if (!1) { /* Not a temp var */
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
if (IS_TMP_VAR == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -6683,12 +7813,19 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else {
zval *ret;
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6701,6 +7838,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLE
SAVE_OPLINE();
do {
+ if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -6755,7 +7896,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLE
}
} while (0);
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN_BY_REF, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6956,7 +8100,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
zend_op_array *new_op_array=NULL;
zend_free_op free_op1;
zval *inc_filename;
- zval *tmp_inc_filename = NULL;
+ zval *tmp_inc_filename = NULL;
zend_bool failure_retval=0;
SAVE_OPLINE();
@@ -7856,6 +9000,36 @@ static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDL
return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_TMP_VAR != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_TMP_VAR == IS_TMP_VAR || IS_TMP_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+ zval_dtor(free_op1.var);
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -8274,6 +9448,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPC
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *key = opline->op2.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -8550,6 +9878,36 @@ static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_TMP_VAR != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_TMP_VAR == IS_TMP_VAR || IS_TMP_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+ zval_dtor(free_op1.var);
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -8784,6 +10142,160 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDL
}
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -9224,6 +10736,36 @@ static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER
return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_TMP_VAR != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_TMP_VAR == IS_TMP_VAR || IS_TMP_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ zval_dtor(free_op1.var);
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -9619,6 +11161,161 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCOD
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -10044,6 +11741,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_UNUSED_HANDLER(ZEND_OP
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *key = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -10320,6 +12171,36 @@ static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval **container;
+
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
+ IS_TMP_VAR != IS_CV &&
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+
+ if (IS_TMP_VAR == IS_TMP_VAR || IS_TMP_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+ zval_dtor(free_op1.var);
+ } else {
+ container = NULL;
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -10551,6 +12432,160 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLE
}
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CV != IS_UNUSED) {
+
+ zval *key = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -10980,6 +13015,9 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
} else if (!0) { /* Not a temp var */
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
if (IS_VAR == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -11001,12 +13039,20 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else {
zval *ret;
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11019,6 +13065,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLE
SAVE_OPLINE();
do {
+ if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -11074,7 +13124,11 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLE
} while (0);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN_BY_REF, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11384,7 +13438,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
zend_op_array *new_op_array=NULL;
zend_free_op free_op1;
zval *inc_filename;
- zval *tmp_inc_filename = NULL;
+ zval *tmp_inc_filename = NULL;
zend_bool failure_retval=0;
SAVE_OPLINE();
@@ -12874,10 +14928,19 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HA
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ if (IS_VAR == IS_TMP_VAR || IS_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -14290,6 +16353,162 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_CONST_HANDLER(ZEN
return zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ zval *value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *key = opline->op2.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -15042,10 +17261,19 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAND
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
- zval_dtor(free_op2.var);
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+
+ if (IS_VAR == IS_TMP_VAR || IS_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -16208,6 +18436,162 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_
return zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ zval *value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -17124,10 +19508,19 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAND
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+
+ if (IS_VAR == IS_TMP_VAR || IS_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -18506,6 +20899,163 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_
return zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ zval *value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -19477,8 +22027,8 @@ static int ZEND_FASTCALL ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HAND
SAVE_OPLINE();
var_ptr = EX_T(opline->op1.var).var.ptr;
if (Z_TYPE_P(var_ptr) != IS_OBJECT &&
- !PZVAL_IS_REF(var_ptr) &&
- Z_REFCOUNT_P(var_ptr) > 1) {
+ !PZVAL_IS_REF(var_ptr) &&
+ Z_REFCOUNT_P(var_ptr) > 1) {
Z_DELREF_P(var_ptr);
ALLOC_ZVAL(new_zv);
@@ -19490,6 +22040,162 @@ static int ZEND_FASTCALL ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HAND
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ zval *value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *key = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -20241,10 +22947,19 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDL
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ if (IS_VAR == IS_TMP_VAR || IS_VAR == IS_CONST) {
+ zval *container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -21457,6 +24172,162 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_CV_HANDLER(ZEND_O
return zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op1;
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ zval *value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CV != IS_UNUSED) {
+
+ zval *key = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -22792,6 +25663,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CONST_HANDLER(
return zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CONST(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_UNUSED != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = NULL;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_UNUSED == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *key = opline->op2.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -23951,6 +26976,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMP_HANDLER(ZE
return zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_UNUSED != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = NULL;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_UNUSED == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -25110,6 +28289,161 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_VAR_HANDLER(ZE
return zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_UNUSED != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = NULL;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_UNUSED == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -25379,6 +28713,160 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE
}
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_UNUSED != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = NULL;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_UNUSED == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *key = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -26535,6 +30023,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CV_HANDLER(ZEN
return zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_UNUSED != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = NULL;
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = NULL;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_UNUSED == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CV != IS_UNUSED) {
+
+ zval *key = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -26945,6 +30587,9 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
} else if (!0) { /* Not a temp var */
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
if (IS_CV == IS_CONST ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -26966,12 +30611,19 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else {
zval *ret;
+ if (*EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
}
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26984,6 +30636,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER
SAVE_OPLINE();
do {
+ if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
+ zval_ptr_dtor(EG(return_value_ptr_ptr));
+ }
+
if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
@@ -27038,7 +30694,10 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER
}
} while (0);
- return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
+ return zend_finally_handler_leaving_SPEC(ZEND_RETURN_BY_REF, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27336,7 +30995,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
zend_op_array *new_op_array=NULL;
zval *inc_filename;
- zval *tmp_inc_filename = NULL;
+ zval *tmp_inc_filename = NULL;
zend_bool failure_retval=0;
SAVE_OPLINE();
@@ -28679,10 +32338,19 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAN
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR || IS_CV == IS_CONST) {
+ zval *container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+
+ } else {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -29875,6 +33543,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CONST_HANDLER(ZEND
return zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CV != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CV == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *key = opline->op2.zv;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -30626,9 +34448,18 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDL
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
- zval_dtor(free_op2.var);
+
+ if (IS_CV == IS_TMP_VAR || IS_CV == IS_CONST) {
+ zval *container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+
+ } else {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
+ zval_dtor(free_op2.var);
+
+ }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -31664,6 +35495,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMP_HANDLER(ZEND_O
return zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CV != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CV == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!1) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -32579,9 +36564,18 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDL
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+
+ if (IS_CV == IS_TMP_VAR || IS_CV == IS_CONST) {
+ zval *container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+
+ } else {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+
+ }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -33832,6 +37826,161 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_VAR_HANDLER(ZEND_O
return zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CV != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CV == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *key = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -34677,6 +38826,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPC
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CV != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CV == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *key = NULL;
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -35427,10 +39730,19 @@ static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLE
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR || IS_CV == IS_CONST) {
+ zval *container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+ } else {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+
+
+ }
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -36514,6 +40826,160 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CV_HANDLER(ZEND_OP
return zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(1, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ /* The generator object is stored in return_value_ptr_ptr */
+ zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
+
+ if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
+ zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
+ }
+
+ /* Destroy the previously yielded value */
+ if (generator->value) {
+ zval_ptr_dtor(&generator->value);
+ }
+
+ /* Destroy the previously yielded key */
+ if (generator->key) {
+ zval_ptr_dtor(&generator->key);
+ }
+
+ /* Set the new yielded value */
+ if (IS_CV != IS_UNUSED) {
+
+
+ if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ /* Constants and temporary variables aren't yieldable by reference,
+ * but we still allow them with a notice. */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ zval *value, *copy;
+
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ zval **value_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
+ }
+
+ /* If a function call result is yielded and the function did
+ * not return by reference we throw a notice. */
+ if (IS_CV == IS_VAR && !Z_ISREF_PP(value_ptr)
+ && !(opline->extended_value == ZEND_RETURNS_FUNCTION
+ && EX_T(opline->op1.var).var.fcall_returned_reference)
+ && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be yielded by reference");
+
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ } else {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
+ Z_ADDREF_PP(value_ptr);
+ generator->value = *value_ptr;
+ }
+
+ }
+ } else {
+ zval *value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, value);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->value = copy;
+ } else {
+ Z_ADDREF_P(value);
+ generator->value = value;
+ }
+
+ }
+ } else {
+ /* If no value was specified yield null */
+ Z_ADDREF(EG(uninitialized_zval));
+ generator->value = &EG(uninitialized_zval);
+ }
+
+ /* Set the new yielded key */
+ if (IS_CV != IS_UNUSED) {
+
+ zval *key = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ /* Consts, temporary variables and references need copying */
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
+ || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
+ ) {
+ zval *copy;
+
+ ALLOC_ZVAL(copy);
+ INIT_PZVAL_COPY(copy, key);
+
+ /* Temporary variables don't need ctor copying */
+ if (!0) {
+ zval_copy_ctor(copy);
+ }
+
+ generator->key = copy;
+ } else {
+ Z_ADDREF_P(key);
+ generator->key = key;
+ }
+
+ if (Z_TYPE_P(generator->key) == IS_LONG
+ && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
+ ) {
+ generator->largest_used_integer_key = Z_LVAL_P(generator->key);
+ }
+
+ } else {
+ /* If no key was specified we use auto-increment keys */
+ generator->largest_used_integer_key++;
+
+ ALLOC_INIT_ZVAL(generator->key);
+ ZVAL_LONG(generator->key, generator->largest_used_integer_key);
+ }
+
+ /* If a value is sent it should go into the result var */
+ generator->send_target = &EX_T(opline->result.var);
+
+ /* Initialize the sent value to NULL */
+ Z_ADDREF(EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ /* We increment to the next op, so we are at the correct position when the
+ * generator is resumed. */
+ ZEND_VM_INC_OPCODE();
+
+ /* The GOTO VM uses a local opline variable. We need to set the opline
+ * variable in execute_data so we don't resume at an old position. */
+ SAVE_OPLINE();
+
+ ZEND_VM_RETURN();
+}
+
static int ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);
@@ -38548,16 +43014,16 @@ void zend_init_opcodes_handlers(void)
ZEND_FETCH_R_SPEC_CV_VAR_HANDLER,
ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_TMP_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_VAR_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMP_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMP_TMP_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMP_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMP_CV_HANDLER,
ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER,
ZEND_FETCH_DIM_R_SPEC_VAR_TMP_HANDLER,
ZEND_FETCH_DIM_R_SPEC_VAR_VAR_HANDLER,
@@ -40498,6 +44964,81 @@ void zend_init_opcodes_handlers(void)
ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_LEAVE_SPEC_HANDLER,
+ ZEND_YIELD_SPEC_CONST_CONST_HANDLER,
+ ZEND_YIELD_SPEC_CONST_TMP_HANDLER,
+ ZEND_YIELD_SPEC_CONST_VAR_HANDLER,
+ ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_CONST_CV_HANDLER,
+ ZEND_YIELD_SPEC_TMP_CONST_HANDLER,
+ ZEND_YIELD_SPEC_TMP_TMP_HANDLER,
+ ZEND_YIELD_SPEC_TMP_VAR_HANDLER,
+ ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_TMP_CV_HANDLER,
+ ZEND_YIELD_SPEC_VAR_CONST_HANDLER,
+ ZEND_YIELD_SPEC_VAR_TMP_HANDLER,
+ ZEND_YIELD_SPEC_VAR_VAR_HANDLER,
+ ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_VAR_CV_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_CV_HANDLER,
+ ZEND_YIELD_SPEC_CV_CONST_HANDLER,
+ ZEND_YIELD_SPEC_CV_TMP_HANDLER,
+ ZEND_YIELD_SPEC_CV_VAR_HANDLER,
+ ZEND_YIELD_SPEC_CV_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_CV_CV_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_HANDLER,
ZEND_NULL_HANDLER
};
zend_opcode_handlers = (opcode_handler_t*)labels;
diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl
index 6d1b2e70e..2a6fd71ec 100644
--- a/Zend/zend_vm_execute.skl
+++ b/Zend/zend_vm_execute.skl
@@ -1,31 +1,42 @@
{%DEFINES%}
-ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
-{
- DCL_OPLINE
+zend_execute_data *zend_create_execute_data_from_op_array(zend_op_array *op_array, zend_bool nested TSRMLS_DC) {
zend_execute_data *execute_data;
- zend_bool nested = 0;
- {%HELPER_VARS%}
- {%EXECUTION_STATUS%}
- {%INTERNAL_LABELS%}
-
- if (EG(exception)) {
- return;
+ /*
+ * When allocating the execute_data, memory for compiled variables and
+ * temporary variables is also allocated after the actual zend_execute_data
+ * struct. op_array->last_var specifies the number of compiled variables and
+ * op_array->T is the number of temporary variables. If there is no symbol
+ * table, then twice as much memory is allocated for compiled variables.
+ * In that case the first half contains zval**s and the second half the
+ * actual zval*s (which would otherwise be in the symbol table).
+ */
+ size_t execute_data_size = ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data));
+ size_t CVs_size = ZEND_MM_ALIGNED_SIZE(sizeof(zval **) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2));
+ size_t Ts_size = ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T;
+ size_t total_size = execute_data_size + CVs_size + Ts_size;
+
+ /*
+ * Normally the execute_data is allocated on the VM stack (because it does
+ * not actually do any allocation and thus is faster). For generators
+ * though this behavior would be suboptimal, because the (rather large)
+ * structure would have to be copied back and forth every time execution is
+ * suspended or resumed. That's why for generators the execution context
+ * is allocated using emalloc, thus allowing to save and restore it simply
+ * by replacing a pointer.
+ */
+ if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
+ execute_data = emalloc(total_size);
+ } else {
+ execute_data = zend_vm_stack_alloc(total_size TSRMLS_CC);
}
- EG(in_execution) = 1;
+ EX(CVs) = (zval ***) ((char *) execute_data + execute_data_size);
+ memset(EX(CVs), 0, sizeof(zval **) * op_array->last_var);
-zend_vm_enter:
- /* Initialize execute_data */
- execute_data = (zend_execute_data *)zend_vm_stack_alloc(
- ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) +
- ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)) +
- ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T TSRMLS_CC);
+ EX(Ts) = (temp_variable *) ((char *) EX(CVs) + CVs_size);
- EX(CVs) = (zval***)((char*)execute_data + ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)));
- memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
- EX(Ts) = (temp_variable *)(((char*)EX(CVs)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)));
EX(fbc) = NULL;
EX(called_scope) = NULL;
EX(object) = NULL;
@@ -35,9 +46,7 @@ zend_vm_enter:
EX(prev_execute_data) = EG(current_execute_data);
EG(current_execute_data) = execute_data;
EX(nested) = nested;
- nested = 1;
-
- LOAD_REGS();
+ EX(leaving) = 0;
if (!op_array->run_time_cache && op_array->last_cache_slot) {
op_array->run_time_cache = ecalloc(op_array->last_cache_slot, sizeof(void*));
@@ -46,10 +55,10 @@ zend_vm_enter:
if (op_array->this_var != -1 && EG(This)) {
Z_ADDREF_P(EG(This)); /* For $this pointer */
if (!EG(active_symbol_table)) {
- EX_CV(op_array->this_var) = (zval**)EX_CVs() + (op_array->last_var + op_array->this_var);
- *EX_CV(op_array->this_var) = EG(This);
+ EX(CVs)[op_array->this_var] = (zval **) EX(CVs) + op_array->last_var + op_array->this_var;
+ *EX(CVs)[op_array->this_var] = EG(This);
} else {
- if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX_CV(op_array->this_var))==FAILURE) {
+ if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void **) &EX(CVs)[op_array->this_var])==FAILURE) {
Z_DELREF_P(EG(This));
}
}
@@ -57,11 +66,28 @@ zend_vm_enter:
EX(opline) = UNEXPECTED((op_array->fn_flags & ZEND_ACC_INTERACTIVE) != 0) && EG(start_op) ? EG(start_op) : op_array->opcodes;
EG(opline_ptr) = &EX(opline);
- LOAD_OPLINE();
EX(function_state).function = (zend_function *) op_array;
EX(function_state).arguments = NULL;
+ return execute_data;
+}
+
+ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *execute_data TSRMLS_DC)
+{
+ DCL_OPLINE
+ zend_bool original_in_execution;
+
+ {%HELPER_VARS%}
+
+ {%INTERNAL_LABELS%}
+
+ original_in_execution = EG(in_execution);
+ EG(in_execution) = 1;
+
+ LOAD_REGS();
+ LOAD_OPLINE();
+
while (1) {
{%ZEND_VM_CONTINUE_LABEL%}
#ifdef ZEND_WIN32
@@ -78,6 +104,14 @@ zend_vm_enter:
zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
}
+ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
+{
+ if (EG(exception)) {
+ return;
+ }
+ {%EXECUTOR_NAME%}_ex(zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC) TSRMLS_CC);
+}
+
{%EXTERNAL_EXECUTOR%}
void {%INITIALIZER_NAME%}(void)
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index fde1baf90..bd5f2dede 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -387,52 +387,67 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
// Updating code according to selected threading model
switch($kind) {
case ZEND_VM_KIND_CALL:
- $code = preg_replace(
+ $code = preg_replace_callback(
array(
"/EXECUTE_DATA/m",
"/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/me",
- "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*[A-Za-z_]*\s*,\s*(.*)\s*\);/me",
- ),
- array(
- "execute_data",
- "return \\1".($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)",
- "'return '.helper_name('\\1',$spec,'$op1','$op2').'(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)'",
- "'return '.helper_name('\\1',$spec,'$op1','$op2').'(\\2, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);'",
+ "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/m",
+ "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*[A-Za-z_]*\s*,\s*(.*)\s*\);/m",
),
+ function($matches) use ($spec, $prefix, $op1, $op2) {
+ if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
+ return "execute_data";
+ } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
+ return "return " . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)";
+ } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
+ return "return " . helper_name($matches[1], $spec, $op1, $op2) . "(" . $matches[2]. ", ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);";
+ } else {
+ return "return " . helper_name($matches[1], $spec, $op1, $op2) . "(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)";
+ }
+ },
$code);
break;
case ZEND_VM_KIND_SWITCH:
- $code = preg_replace(
+ $code = preg_replace_callback(
array(
"/EXECUTE_DATA/m",
"/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/me",
- "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*([A-Za-z_]*)\s*,\s*(.*)\s*\);/me",
+ "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/m",
+ "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*([A-Za-z_]*)\s*,\s*(.*)\s*\);/m",
),
- array(
- "execute_data",
- "goto \\1".($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_LABEL",
- "'goto '.helper_name('\\1',$spec,'$op1','$op2')",
- "'\\2 = \\3; goto '.helper_name('\\1',$spec,'$op1','$op2').';'",
- ),
- $code);
+ function($matches) use ($spec, $prefix, $op1, $op2) {
+ if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
+ return "execute_data";
+ } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
+ return "goto " . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_LABEL";
+ } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
+ return $matches[2] . " = " . $matches[3] . "; goto " . helper_name($matches[1], $spec, $op1, $op2) . ";";
+ } else {
+ return "goto " . helper_name($matches[1], $spec, $op1, $op2);
+ }
+ },
+ $code);
break;
case ZEND_VM_KIND_GOTO:
- $code = preg_replace(
+ $code = preg_replace_callback(
array(
"/EXECUTE_DATA/m",
"/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/me",
- "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*([A-Za-z_]*)\s*,\s*(.*)\s*\);/me",
+ "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/m",
+ "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*([A-Za-z_]*)\s*,\s*(.*)\s*\);/m",
),
- array(
- "execute_data",
- "goto \\1".($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER",
- "'goto '.helper_name('\\1',$spec,'$op1','$op2')",
- "'\\2 = \\3; goto '.helper_name('\\1',$spec,'$op1','$op2').';'",
- ),
- $code);
+ function($matches) use ($spec, $prefix, $op1, $op2) {
+ if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
+ return "execute_data";
+ } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
+ return "goto " . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_HANDLER";
+ } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
+ return $matches[2] . " = " . $matches[3] . "; goto " . helper_name($matches[1], $spec, $op1, $op2) . ";";
+ } else {
+ return "goto " . helper_name($matches[1], $spec, $op1, $op2);
+ }
+ },
+ $code);
break;
}
@@ -856,7 +871,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
out($f,"#define LOAD_REGS() do {Ts = EX(Ts); CVs = EX(CVs);} while (0)\n");
out($f,"#define ZEND_VM_CONTINUE() goto zend_vm_continue\n");
out($f,"#define ZEND_VM_RETURN() EG(in_execution) = original_in_execution; return\n");
- out($f,"#define ZEND_VM_ENTER() op_array = EG(active_op_array); goto zend_vm_enter\n");
+ out($f,"#define ZEND_VM_ENTER() execute_data = zend_create_execute_data_from_op_array(EG(active_op_array), 1 TSRMLS_CC); LOAD_REGS(); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_DISPATCH(opcode, opline) dispatch_handler = zend_vm_get_opcode_handler(opcode, opline); goto zend_vm_dispatch;\n\n");
out($f,"#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC\n");
@@ -892,7 +907,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
out($f,"#define LOAD_REGS() do {Ts = EX(Ts); CVs = EX(CVs);} while (0)\n");
out($f,"#define ZEND_VM_CONTINUE() goto *(void**)(OPLINE->handler)\n");
out($f,"#define ZEND_VM_RETURN() EG(in_execution) = original_in_execution; return\n");
- out($f,"#define ZEND_VM_ENTER() op_array = EG(active_op_array); goto zend_vm_enter\n");
+ out($f,"#define ZEND_VM_ENTER() execute_data = zend_create_execute_data_from_op_array(EG(active_op_array), 1 TSRMLS_CC); LOAD_REGS(); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_DISPATCH(opcode, opline) goto *(void**)(zend_vm_get_opcode_handler(opcode, opline));\n\n");
out($f,"#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC\n");
@@ -927,19 +942,12 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
skip_blanks($f, $m[1], $m[3]."\n");
}
break;
- case "EXECUTION_STATUS":
- if ($kind != ZEND_VM_KIND_GOTO) {
- out($f, $m[1] . "zend_bool original_in_execution = EG(in_execution);\n");
- } else {
- out($f, $m[1] . "zend_bool original_in_execution = op_array? EG(in_execution) : 0;\n");
- }
- break;
case "INTERNAL_LABELS":
if ($kind == ZEND_VM_KIND_GOTO) {
// Emit array of labels of opcode handlers and code for
// zend_opcode_handlers initialization
$prolog = $m[1];
- out($f,$prolog."if (op_array == NULL) {\n");
+ out($f,$prolog."if (execute_data == NULL) {\n");
out($f,$prolog."\tstatic const opcode_handler_t labels[] = {\n");
gen_labels($f, $spec, $kind, $prolog."\t\t");
out($f,$prolog."\t};\n");
@@ -983,10 +991,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
$m[1]."\t\tEG(in_execution) = original_in_execution;\n".
$m[1]."\t\treturn;\n".
$m[1]."\tcase 2:\n" .
- $m[1]."\t\top_array = EG(active_op_array);\n".
- $m[1]."\t\tgoto zend_vm_enter;\n".
+ $m[1]."\t\texecute_data = zend_create_execute_data_from_op_array(EG(active_op_array), 1 TSRMLS_CC);\n".
+ $m[1]."\t\tbreak;\n" .
$m[1]."\tcase 3:\n" .
$m[1]."\t\texecute_data = EG(current_execute_data);\n".
+ $m[1]."\t\tbreak;\n" .
$m[1]."\tdefault:\n".
$m[1]."\t\tbreak;\n".
$m[1]."}".$m[3]."\n");
@@ -1013,9 +1022,9 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
$prolog = $m[1];
if ($kind == ZEND_VM_KIND_GOTO) {
// Labels are defined in the executor itself, so we call it
- // with op_array NULL and it sets zend_opcode_handlers array
+ // with execute_data NULL and it sets zend_opcode_handlers array
out($f,$prolog."TSRMLS_FETCH();\n");
- out($f,$prolog."zend_execute(NULL TSRMLS_CC);\n");
+ out($f,$prolog.$executor_name."_ex(NULL TSRMLS_CC);\n");
} else {
if ($old) {
// Reserving space for user-defined opcodes
@@ -1189,7 +1198,7 @@ function gen_vm($def, $skel) {
// Generate opcode #defines (zend_vm_opcodes.h)
$code_len = strlen((string)$max_opcode);
- $f = fopen("zend_vm_opcodes.h", "w+") or die("ERROR: Cannot create zend_vm_opcodes.h\n");
+ $f = fopen(__DIR__ . "/zend_vm_opcodes.h", "w+") or die("ERROR: Cannot create zend_vm_opcodes.h\n");
// Insert header
out($f, $GLOBALS['header_text']);
@@ -1203,8 +1212,8 @@ function gen_vm($def, $skel) {
echo "zend_vm_opcodes.h generated successfully.\n";
// Generate zend_vm_execute.h
- $f = fopen("zend_vm_execute.h", "w+") or die("ERROR: Cannot create zend_vm_execute.h\n");
- $executor_file = realpath("zend_vm_execute.h");
+ $f = fopen(__DIR__ . "/zend_vm_execute.h", "w+") or die("ERROR: Cannot create zend_vm_execute.h\n");
+ $executor_file = realpath(__DIR__ . "/zend_vm_execute.h");
// Insert header
out($f, $GLOBALS['header_text']);
@@ -1447,6 +1456,6 @@ if (!defined("ZEND_VM_LINES")) {
define("ZEND_VM_LINES", 0);
}
-gen_vm("zend_vm_def.h", "zend_vm_execute.skl");
+gen_vm(__DIR__ . "/zend_vm_def.h", __DIR__ . "/zend_vm_execute.skl");
?>
diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h
index 680778c2a..7f9434995 100644
--- a/Zend/zend_vm_opcodes.h
+++ b/Zend/zend_vm_opcodes.h
@@ -159,3 +159,6 @@
#define ZEND_SEPARATE 156
#define ZEND_QM_ASSIGN_VAR 157
#define ZEND_JMP_SET_VAR 158
+#define ZEND_LEAVE 159
+#define ZEND_YIELD 160
+#define ZEND_GENERATOR_RETURN 161
diff --git a/acinclude.m4 b/acinclude.m4
index adb9599ce..ad4f7474b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2226,7 +2226,7 @@ AC_DEFUN([PHP_SETUP_ICU],[
AC_MSG_RESULT([$icu_install_prefix])
dnl Check ICU version
- AC_MSG_CHECKING([for ICU 3.4 or greater])
+ AC_MSG_CHECKING([for ICU 4.0 or greater])
icu_version_full=`$ICU_CONFIG --version`
ac_IFS=$IFS
IFS="."
@@ -2235,8 +2235,8 @@ AC_DEFUN([PHP_SETUP_ICU],[
icu_version=`expr [$]1 \* 1000 + [$]2`
AC_MSG_RESULT([found $icu_version_full])
- if test "$icu_version" -lt "3004"; then
- AC_MSG_ERROR([ICU version 3.4 or later is required])
+ if test "$icu_version" -lt "4000"; then
+ AC_MSG_ERROR([ICU version 4.0 or later is required])
fi
ICU_VERSION=$icu_version
diff --git a/aclocal.m4 b/aclocal.m4
index 001a14ba8..6b3222a8e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2226,7 +2226,7 @@ AC_DEFUN([PHP_SETUP_ICU],[
AC_MSG_RESULT([$icu_install_prefix])
dnl Check ICU version
- AC_MSG_CHECKING([for ICU 3.4 or greater])
+ AC_MSG_CHECKING([for ICU 4.0 or greater])
icu_version_full=`$ICU_CONFIG --version`
ac_IFS=$IFS
IFS="."
@@ -2235,8 +2235,8 @@ AC_DEFUN([PHP_SETUP_ICU],[
icu_version=`expr [$]1 \* 1000 + [$]2`
AC_MSG_RESULT([found $icu_version_full])
- if test "$icu_version" -lt "3004"; then
- AC_MSG_ERROR([ICU version 3.4 or later is required])
+ if test "$icu_version" -lt "4000"; then
+ AC_MSG_ERROR([ICU version 4.0 or later is required])
fi
ICU_VERSION=$icu_version
diff --git a/config.guess b/config.guess
index f32079abd..d407b8cde 100644
--- a/config.guess
+++ b/config.guess
@@ -532,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
diff --git a/configure b/configure
index efbfcb8d8..712cf4415 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65.
+# Generated by GNU Autoconf 2.68.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -89,6 +89,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -214,11 +215,18 @@ IFS=$as_save_IFS
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@@ -316,7 +324,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -356,19 +364,19 @@ else
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -682,7 +690,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -1153,8 +1161,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1199,7 +1208,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1225,7 +1234,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1429,7 +1438,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1445,7 +1454,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1475,8 +1484,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1484,7 +1493,7 @@ Try \`$0 --help' for more information."
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1494,7 +1503,7 @@ Try \`$0 --help' for more information."
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1502,13 +1511,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1531,7 +1540,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1545,8 +1554,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1561,9 +1570,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1602,11 +1611,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1646,7 +1655,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -2036,8 +2045,9 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
- YACC The `Yet Another C Compiler' implementation to use. Defaults to
- the first program found out of: `bison -y', `byacc', `yacc'.
+ YACC The `Yet Another Compiler Compiler' implementation to use.
+ Defaults to the first program found out of: `bison -y', `byacc',
+ `yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC.
This script will default YFLAGS to the empty string to avoid a
default value of `-d' given by some make applications.
@@ -2112,9 +2122,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.68
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -2158,7 +2168,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -2184,7 +2194,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2195,7 +2205,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -2208,10 +2218,10 @@ fi
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2247,7 +2257,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -2274,7 +2284,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2283,7 +2293,7 @@ eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
@@ -2324,7 +2334,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2338,7 +2348,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2356,7 +2366,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -2401,7 +2411,7 @@ fi
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -2414,7 +2424,7 @@ ac_fn_c_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2469,7 +2479,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -2482,7 +2492,7 @@ ac_fn_c_check_member ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
$as_echo_n "checking for $2.$3... " >&6; }
-if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$4+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2526,19 +2536,22 @@ fi
eval ac_res=\$$4
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2547,8 +2560,12 @@ $4
int
main ()
{
-#ifndef $2
- (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
#endif
;
@@ -2565,7 +2582,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
@@ -2742,7 +2759,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
rm -f conftest.val
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
@@ -2756,7 +2773,7 @@ ac_fn_c_check_type ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -2797,7 +2814,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -2834,7 +2851,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
@@ -2860,7 +2877,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2871,7 +2888,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_cpp
@@ -2880,7 +2897,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2990,11 +3007,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -3028,11 +3043,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -3045,11 +3058,9 @@ _ASBOX
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -3063,11 +3074,9 @@ _ASBOX
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -3122,7 +3131,12 @@ _ACEOF
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -3137,7 +3151,11 @@ do
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -3214,7 +3232,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -3233,7 +3251,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -3282,7 +3300,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -3296,7 +3314,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -3348,7 +3366,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -3363,7 +3381,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${lt_cv_path_SED+set}" = set; then :
+if ${lt_cv_path_SED+:} false; then :
$as_echo_n "(cached) " >&6
else
# Loop through the user's path and test for sed and gsed.
@@ -3489,16 +3507,22 @@ EOF
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -3512,27 +3536,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -3550,14 +3574,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -3565,7 +3589,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -3583,14 +3607,14 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
+if ${ac_cv_target+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$target_alias" = x; then
ac_cv_target=$ac_cv_host
else
ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
fi
fi
@@ -3598,7 +3622,7 @@ fi
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
@@ -3625,7 +3649,7 @@ test -n "$target_alias" &&
host_alias=$host
fi
if test -z "$host_alias"; then
- as_fn_error "host_alias is not set!" "$LINENO" 5
+ as_fn_error $? "host_alias is not set!" "$LINENO" 5
fi
@@ -3635,9 +3659,9 @@ ac_config_headers="$ac_config_headers main/php_config.h"
PHP_MAJOR_VERSION=5
-PHP_MINOR_VERSION=4
-PHP_RELEASE_VERSION=8
-PHP_EXTRA_VERSION=""
+PHP_MINOR_VERSION=5
+PHP_RELEASE_VERSION=0
+PHP_EXTRA_VERSION="alpha1"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr $PHP_MAJOR_VERSION \* 10000 + $PHP_MINOR_VERSION \* 100 + $PHP_RELEASE_VERSION`
@@ -3675,15 +3699,15 @@ fi
if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
- as_fn_error "--with-shared-apache is not supported. Please refer to the documentation for using APXS" "$LINENO" 5
+ as_fn_error $? "--with-shared-apache is not supported. Please refer to the documentation for using APXS" "$LINENO" 5
fi
if test -n "$with_apache" && test -n "$with_apxs"; then
- as_fn_error "--with-apache and --with-apxs cannot be used together" "$LINENO" 5
+ as_fn_error $? "--with-apache and --with-apxs cannot be used together" "$LINENO" 5
fi
if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then
- as_fn_error "--with-apxs2filter and --with-apxs2 cannot be used together" "$LINENO" 5
+ as_fn_error $? "--with-apxs2filter and --with-apxs2 cannot be used together" "$LINENO" 5
fi
@@ -3727,7 +3751,7 @@ if test -n "$ac_tool_prefix"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3771,7 +3795,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3823,8 +3847,8 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3938,9 +3962,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3982,8 +4005,8 @@ done
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4040,9 +4063,9 @@ $as_echo "$ac_try_echo"; } >&5
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
@@ -4053,7 +4076,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4093,8 +4116,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -4104,7 +4127,7 @@ OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4141,7 +4164,7 @@ ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4219,7 +4242,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -4327,7 +4350,7 @@ if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -4357,7 +4380,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4373,11 +4396,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4416,7 +4439,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4432,18 +4455,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -4510,7 +4533,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4624,7 +4647,7 @@ if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -4654,7 +4677,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4670,11 +4693,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4713,7 +4736,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4729,18 +4752,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -4751,7 +4774,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4868,8 +4891,7 @@ do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4881,7 +4903,7 @@ done
ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
MINIX=yes
else
MINIX=
@@ -4903,7 +4925,7 @@ $as_echo "#define _MINIX 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5003,7 +5025,7 @@ $as_echo "$ext_output" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -R" >&5
$as_echo_n "checking if compiler supports -R... " >&6; }
-if test "${php_cv_cc_dashr+set}" = set; then :
+if ${php_cv_cc_dashr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5037,7 +5059,7 @@ if test $php_cv_cc_dashr = "yes"; then
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wl,-rpath," >&5
$as_echo_n "checking if compiler supports -Wl,-rpath,... " >&6; }
- if test "${php_cv_cc_rpath+set}" = set; then :
+ if ${php_cv_cc_rpath+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5084,7 +5106,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -5130,7 +5152,7 @@ $as_echo "$as_me: WARNING: mawk is known to have problems on some systems. You s
*gawk)
;;
bork)
- as_fn_error "Could not find awk; Install GNU awk" "$LINENO" 5
+ as_fn_error $? "Could not find awk; Install GNU awk" "$LINENO" 5
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $AWK is broken" >&5
@@ -5138,7 +5160,7 @@ $as_echo_n "checking if $AWK is broken... " >&6; }
if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- as_fn_error "You should install GNU awk" "$LINENO" 5
+ as_fn_error $? "You should install GNU awk" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -5156,7 +5178,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then :
+if ${ac_cv_prog_YACC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$YACC"; then
@@ -5195,7 +5217,7 @@ test -n "$YACC" || YACC="yacc"
# we only support certain bison versions
- bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1"
+ bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
@@ -5204,7 +5226,7 @@ test -n "$YACC" || YACC="yacc"
if test "$YACC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison version" >&5
$as_echo_n "checking for bison version... " >&6; }
-if test "${php_cv_bison_version+set}" = set; then :
+if ${php_cv_bison_version+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5243,7 +5265,7 @@ $as_echo "$as_me: WARNING: $bison_msg" >&2;}
set dummy re2c; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RE2C+set}" = set; then :
+if ${ac_cv_prog_RE2C+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RE2C"; then
@@ -5279,7 +5301,7 @@ fi
if test -n "$RE2C"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for re2c version" >&5
$as_echo_n "checking for re2c version... " >&6; }
-if test "${php_cv_re2c_version+set}" = set; then :
+if ${php_cv_re2c_version+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5309,7 +5331,7 @@ $as_echo "$as_me: WARNING: You will need re2c 0.13.4 or later if you want to reg
case $php_cv_bison_version in
""|invalid)
if ! test -f "$abs_srcdir/Zend/zend_language_parser.h" || ! test -f "$abs_srcdir/Zend/zend_language_parser.c" ; then
- as_fn_error "bison is required to build PHP/Zend when building a GIT checkout!" "$LINENO" 5
+ as_fn_error $? "bison is required to build PHP/Zend when building a GIT checkout!" "$LINENO" 5
fi
;;
esac
@@ -5429,7 +5451,7 @@ case $host_alias in
gcc_arg_name=ac_cv_gcc_arg_no_cpp_precomp
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -no-cpp-precomp" >&5
$as_echo_n "checking whether $CC supports -no-cpp-precomp... " >&6; }
-if test "${ac_cv_gcc_arg_no_cpp_precomp+set}" = set; then :
+if ${ac_cv_gcc_arg_no_cpp_precomp+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5767,7 +5789,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthreads_cflags" >&5
$as_echo_n "checking for pthreads_cflags... " >&6; }
-if test "${ac_cv_pthreads_cflags+set}" = set; then :
+if ${ac_cv_pthreads_cflags+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -5833,7 +5855,7 @@ $as_echo "$ac_cv_pthreads_cflags" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthreads_lib" >&5
$as_echo_n "checking for pthreads_lib... " >&6; }
-if test "${ac_cv_pthreads_lib+set}" = set; then :
+if ${ac_cv_pthreads_lib+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -6004,15 +6026,15 @@ if test "$PHP_AOLSERVER" != "no"; then
PHP_AOLSERVER_SRC=$PHP_AOLSERVER
fi
if test -z "$PHP_AOLSERVER_SRC" || test ! -d $PHP_AOLSERVER_SRC/include; then
- as_fn_error "Please specify the path to the source distribution of AOLserver using --with-aolserver-src=DIR" "$LINENO" 5
+ as_fn_error $? "Please specify the path to the source distribution of AOLserver using --with-aolserver-src=DIR" "$LINENO" 5
fi
if test ! -d $PHP_AOLSERVER/bin ; then
- as_fn_error "Please specify the path to the root of AOLserver using --with-aolserver=DIR" "$LINENO" 5
+ as_fn_error $? "Please specify the path to the root of AOLserver using --with-aolserver=DIR" "$LINENO" 5
fi
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -6053,7 +6075,7 @@ $as_echo "#define HAVE_AOLSERVER 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES aolserver"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -6282,7 +6304,7 @@ $as_echo "3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: The output of $APXS follows" >&5
$as_echo "The output of $APXS follows" >&6; }
$APXS -q CFLAGS
- as_fn_error "Aborting" "$LINENO" 5
+ as_fn_error $? "Aborting" "$LINENO" 5
fi
APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@"
@@ -6303,7 +6325,7 @@ IFS="- /.
APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6`
if test "$APACHE_VERSION" -ge 2000000; then
- as_fn_error "You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2" "$LINENO" 5
+ as_fn_error $? "You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2" "$LINENO" 5
fi
for flag in $APXS_CFLAGS; do
@@ -6336,7 +6358,7 @@ IFS="- /.
if test "$build_type" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -6590,7 +6612,7 @@ $as_echo "#define HAVE_APACHE 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -6757,7 +6779,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
fi
# For Apache 2.0.x
elif test -f $PHP_APACHE/include/httpd.h && test -f $PHP_APACHE/srclib/apr/include/apr_general.h ; then
- as_fn_error "Use --with-apxs2 with Apache 2.x!" "$LINENO" 5
+ as_fn_error $? "Use --with-apxs2 with Apache 2.x!" "$LINENO" 5
# For Apache 1.3.x
elif test -f $PHP_APACHE/src/main/httpd.h; then
APACHE_HAS_REGEX=1
@@ -6770,7 +6792,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -6940,7 +6962,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
$as_echo "#define HAVE_AP_COMPAT_H 1" >>confdefs.h
if test ! -f $PHP_APACHE/src/include/ap_config_auto.h; then
- as_fn_error "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
+ as_fn_error $? "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
fi
elif test -f $PHP_APACHE/src/include/compat.h; then
@@ -6959,7 +6981,7 @@ $as_echo "#define HAVE_OLD_COMPAT_H 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -7129,7 +7151,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
$as_echo "#define HAVE_AP_COMPAT_H 1" >>confdefs.h
if test ! -f $PHP_APACHE/src/include/ap_config_auto.h; then
- as_fn_error "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
+ as_fn_error $? "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
fi
elif test -f $PHP_APACHE/src/include/compat.h; then
@@ -7144,7 +7166,7 @@ $as_echo "#define HAVE_OLD_COMPAT_H 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -7314,7 +7336,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
$as_echo "#define HAVE_AP_COMPAT_H 1" >>confdefs.h
if test ! -f $PHP_APACHE/src/include/ap_config_auto.h; then
- as_fn_error "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
+ as_fn_error $? "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
fi
elif test -f $PHP_APACHE/src/compat.h; then
@@ -7324,7 +7346,7 @@ $as_echo "#define HAVE_OLD_COMPAT_H 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "Invalid Apache directory - unable to find httpd.h under $PHP_APACHE" "$LINENO" 5
+ as_fn_error $? "Invalid Apache directory - unable to find httpd.h under $PHP_APACHE" "$LINENO" 5
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -7372,7 +7394,7 @@ if test "$APACHE_MODULE" = "yes"; then
gcc_arg_name=ac_cv_gcc_arg_rdynamic
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5
$as_echo_n "checking whether $CC supports -rdynamic... " >&6; }
-if test "${ac_cv_gcc_arg_rdynamic+set}" = set; then :
+if ${ac_cv_gcc_arg_rdynamic+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7415,7 +7437,7 @@ if test -n "$APACHE_INSTALL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for member fd in BUFF *" >&5
$as_echo_n "checking for member fd in BUFF *... " >&6; }
-if test "${ac_cv_php_fd_in_buff+set}" = set; then :
+if ${ac_cv_php_fd_in_buff+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7548,7 +7570,7 @@ $as_echo "" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: The output of $APXS follows:" >&5
$as_echo "The output of $APXS follows:" >&6; }
$APXS -q CFLAGS
- as_fn_error "Aborting" "$LINENO" 5
+ as_fn_error $? "Aborting" "$LINENO" 5
fi
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
@@ -7587,9 +7609,9 @@ IFS="- /.
APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6`
if test "$APACHE_VERSION" -le 2000000; then
- as_fn_error "You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)" "$LINENO" 5
+ as_fn_error $? "You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)" "$LINENO" 5
elif test "$APACHE_VERSION" -lt 2000040; then
- as_fn_error "Please note that Apache version >= 2.0.40 is required" "$LINENO" 5
+ as_fn_error $? "Please note that Apache version >= 2.0.40 is required" "$LINENO" 5
fi
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
@@ -7613,7 +7635,7 @@ IFS="- /.
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2filter"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -7785,7 +7807,7 @@ EOF
if test "bundle" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2filter"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -7951,7 +7973,7 @@ EOF
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2filter"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -8113,7 +8135,7 @@ EOF
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2filter"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -8278,7 +8300,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
fi
@@ -8288,7 +8310,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
fi
@@ -8372,7 +8394,7 @@ $as_echo "" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: The output of $APXS follows:" >&5
$as_echo "The output of $APXS follows:" >&6; }
$APXS -q CFLAGS
- as_fn_error "Aborting" "$LINENO" 5
+ as_fn_error $? "Aborting" "$LINENO" 5
fi
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
@@ -8411,9 +8433,9 @@ IFS="- /.
APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6`
if test "$APACHE_VERSION" -le 2000000; then
- as_fn_error "You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)" "$LINENO" 5
+ as_fn_error $? "You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)" "$LINENO" 5
elif test "$APACHE_VERSION" -lt 2000044; then
- as_fn_error "Please note that Apache version >= 2.0.44 is required" "$LINENO" 5
+ as_fn_error $? "Please note that Apache version >= 2.0.44 is required" "$LINENO" 5
fi
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
@@ -8437,7 +8459,7 @@ IFS="- /.
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2handler"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -8609,7 +8631,7 @@ EOF
if test "bundle" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2handler"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -8775,7 +8797,7 @@ EOF
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2handler"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -8937,7 +8959,7 @@ EOF
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache2handler"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -9102,7 +9124,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
fi
@@ -9112,7 +9134,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
fi
@@ -9195,7 +9217,7 @@ $as_echo "3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: The output of $APXS follows" >&5
$as_echo "The output of $APXS follows" >&6; }
$APXS -q CFLAGS
- as_fn_error "Aborting" "$LINENO" 5
+ as_fn_error $? "Aborting" "$LINENO" 5
fi
APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@"
@@ -9216,7 +9238,7 @@ IFS="- /.
APACHE_VERSION=`expr $4 \* 1000000 + $5 \* 1000 + $6`
if test "$APACHE_VERSION" -ge 2000000; then
- as_fn_error "You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2" "$LINENO" 5
+ as_fn_error $? "You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2" "$LINENO" 5
fi
for flag in $APXS_CFLAGS; do
@@ -9249,7 +9271,7 @@ IFS="- /.
if test "$build_type" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache_hooks"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -9503,7 +9525,7 @@ $as_echo "#define HAVE_APACHE 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache_hooks"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -9670,7 +9692,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
fi
# For Apache 2.0.x
elif test -f $PHP_APACHE_HOOKS_STATIC/include/httpd.h && test -f $PHP_APACHE_HOOKS_STATIC/srclib/apr/include/apr_general.h ; then
- as_fn_error "Use --with-apxs2 with Apache 2.x!" "$LINENO" 5
+ as_fn_error $? "Use --with-apxs2 with Apache 2.x!" "$LINENO" 5
# For Apache 1.3.x
elif test -f $PHP_APACHE_HOOKS_STATIC/src/main/httpd.h; then
APACHE_HAS_REGEX=1
@@ -9683,7 +9705,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache_hooks"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -9853,7 +9875,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
$as_echo "#define HAVE_AP_COMPAT_H 1" >>confdefs.h
if test ! -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config_auto.h; then
- as_fn_error "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
+ as_fn_error $? "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
fi
elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/compat.h; then
@@ -9872,7 +9894,7 @@ $as_echo "#define HAVE_OLD_COMPAT_H 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache_hooks"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -10042,7 +10064,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
$as_echo "#define HAVE_AP_COMPAT_H 1" >>confdefs.h
if test ! -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config_auto.h; then
- as_fn_error "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
+ as_fn_error $? "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
fi
elif test -f $PHP_APACHE_HOOKS_STATIC/src/include/compat.h; then
@@ -10057,7 +10079,7 @@ $as_echo "#define HAVE_OLD_COMPAT_H 1" >>confdefs.h
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES apache_hooks"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -10227,7 +10249,7 @@ $as_echo "#define HAVE_AP_CONFIG_H 1" >>confdefs.h
$as_echo "#define HAVE_AP_COMPAT_H 1" >>confdefs.h
if test ! -f $PHP_APACHE_HOOKS_STATIC/src/include/ap_config_auto.h; then
- as_fn_error "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
+ as_fn_error $? "Please run Apache\'s configure or src/Configure program once and try again" "$LINENO" 5
fi
elif test -f $PHP_APACHE_HOOKS_STATIC/src/compat.h; then
@@ -10237,7 +10259,7 @@ $as_echo "#define HAVE_OLD_COMPAT_H 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "Invalid Apache directory - unable to find httpd.h under $PHP_APACHE_HOOKS_STATIC" "$LINENO" 5
+ as_fn_error $? "Invalid Apache directory - unable to find httpd.h under $PHP_APACHE_HOOKS_STATIC" "$LINENO" 5
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -10285,7 +10307,7 @@ if test "$APACHE_HOOKS_MODULE" = "yes"; then
gcc_arg_name=ac_cv_gcc_arg_rdynamic
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5
$as_echo_n "checking whether $CC supports -rdynamic... " >&6; }
-if test "${ac_cv_gcc_arg_rdynamic+set}" = set; then :
+if ${ac_cv_gcc_arg_rdynamic+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -10328,7 +10350,7 @@ if test -n "$APACHE_HOOKS_INSTALL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for member fd in BUFF *" >&5
$as_echo_n "checking for member fd in BUFF *... " >&6; }
-if test "${ac_cv_php_fd_in_buff+set}" = set; then :
+if ${ac_cv_php_fd_in_buff+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -10434,13 +10456,13 @@ if test "$PHP_CAUDIUM" != "no"; then
elif test -f $PHP_CAUDIUM/bin/pike; then
PIKE=$PHP_CAUDIUM/bin/pike
else
- as_fn_error "Could not find a pike in $PHP_CAUDIUM/bin/" "$LINENO" 5
+ as_fn_error $? "Could not find a pike in $PHP_CAUDIUM/bin/" "$LINENO" 5
fi
if $PIKE -e 'float v; int rel;sscanf(version(), "Pike v%f release %d", v, rel);v += rel/10000.0; if(v < 7.0268) exit(1); exit(0);'; then
PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'`
PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,' `
if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then
- as_fn_error "Failed to figure out Pike module and include directories" "$LINENO" 5
+ as_fn_error $? "Failed to figure out Pike module and include directories" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -10555,7 +10577,7 @@ $as_echo "version mismatch" >&6; }
$as_echo "not found" >&6; }
fi
else
- as_fn_error "Caudium PHP5 requires Pike 7.0 or newer" "$LINENO" 5
+ as_fn_error $? "Caudium PHP5 requires Pike 7.0 or newer" "$LINENO" 5
fi
PIKE_VERSION=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`
@@ -10565,7 +10587,7 @@ $as_echo "#define HAVE_CAUDIUM 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES caudium"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -10727,7 +10749,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
fi
@@ -10773,7 +10795,7 @@ if test "$PHP_CLI" != "no"; then
if test "program" = "program"; then
PHP_BINARIES="$PHP_BINARIES cli"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -10949,7 +10971,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_CONTINUITY" != "no"; then
if test ! -d $PHP_CONTINUITY; then
- as_fn_error "Please specify the path to the root of your Continuity server using --with-continuity=DIR" "$LINENO" 5
+ as_fn_error $? "Please specify the path to the root of your Continuity server using --with-continuity=DIR" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Continuity include files" >&5
$as_echo_n "checking for Continuity include files... " >&6; }
@@ -10958,14 +10980,14 @@ $as_echo_n "checking for Continuity include files... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Continuity Binary Distribution" >&5
$as_echo "Continuity Binary Distribution" >&6; }
else
- as_fn_error "Cannot find your CAPI include files in either DIR/src or DIR/include" "$LINENO" 5
+ as_fn_error $? "Cannot find your CAPI include files in either DIR/src or DIR/include" "$LINENO" 5
fi
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES continuity"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -11154,7 +11176,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -11208,7 +11230,7 @@ if test "$PHP_EMBED" != "no"; then
if test "$PHP_EMBED_TYPE" = "program"; then
PHP_BINARIES="$PHP_BINARIES embed"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -11452,8 +11474,7 @@ $as_echo "$PHP_FPM" >&6; }
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -11464,7 +11485,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
$as_echo_n "checking for library containing socket... " >&6; }
-if test "${ac_cv_search_socket+set}" = set; then :
+if ${ac_cv_search_socket+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -11498,11 +11519,11 @@ for ac_lib in '' socket; do
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if test "${ac_cv_search_socket+set}" = set; then :
+ if ${ac_cv_search_socket+:} false; then :
break
fi
done
-if test "${ac_cv_search_socket+set}" = set; then :
+if ${ac_cv_search_socket+:} false; then :
else
ac_cv_search_socket=no
@@ -11520,7 +11541,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5
$as_echo_n "checking for library containing inet_addr... " >&6; }
-if test "${ac_cv_search_inet_addr+set}" = set; then :
+if ${ac_cv_search_inet_addr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -11554,11 +11575,11 @@ for ac_lib in '' nsl; do
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if test "${ac_cv_search_inet_addr+set}" = set; then :
+ if ${ac_cv_search_inet_addr+:} false; then :
break
fi
done
-if test "${ac_cv_search_inet_addr+set}" = set; then :
+if ${ac_cv_search_inet_addr+:} false; then :
else
ac_cv_search_inet_addr=no
@@ -11579,8 +11600,7 @@ fi
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -11593,8 +11613,7 @@ done
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -11607,8 +11626,7 @@ done
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -11620,7 +11638,7 @@ done
for ac_header in sysexits.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
-if test "x$ac_cv_header_sysexits_h" = x""yes; then :
+if test "x$ac_cv_header_sysexits_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYSEXITS_H 1
_ACEOF
@@ -11743,8 +11761,8 @@ $as_echo_n "checking for clock_get_time... " >&6; }
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12609,17 +12627,6 @@ _ACEOF
-cat >>confdefs.h <<_ACEOF
-#define PHP_FPM_USER "$php_fpm_user"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PHP_FPM_GROUP "$php_fpm_group"
-_ACEOF
-
-
-
BUILD_DIR="$BUILD_DIR sapi/fpm/fpm"
@@ -12641,7 +12648,6 @@ _ACEOF
SAPI_FPM_PATH=sapi/fpm/php-fpm
-
if test "$fpm_trace_type" && test -f "$abs_srcdir/sapi/fpm/fpm/fpm_trace_$fpm_trace_type.c"; then
PHP_FPM_TRACE_FILES="fpm/fpm_trace.c fpm/fpm_trace_$fpm_trace_type.c"
fi
@@ -12683,7 +12689,7 @@ _ACEOF
if test "program" = "program"; then
PHP_BINARIES="$PHP_BINARIES fpm"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -12830,11 +12836,11 @@ if test "$PHP_ISAPI" != "no"; then
else
ZEUSPATH=$PHP_ISAPI
fi
- test -f "$ZEUSPATH/web/include/httpext.h" || as_fn_error "Unable to find httpext.h in $ZEUSPATH/web/include" "$LINENO" 5
+ test -f "$ZEUSPATH/web/include/httpext.h" || as_fn_error $? "Unable to find httpext.h in $ZEUSPATH/web/include" "$LINENO" 5
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -12875,7 +12881,7 @@ $as_echo "#define WITH_ZEUS 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES isapi"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -13093,7 +13099,7 @@ if test "$PHP_LITESPEED" != "no"; then
if test "program" = "program"; then
PHP_BINARIES="$PHP_BINARIES litespeed"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -13241,7 +13247,7 @@ if test "$PHP_MILTER" != "no"; then
if test -f /usr/lib/libmilter/libmilter.a ; then
MILTERPATH=/usr/lib/libmilter
else
- as_fn_error "Unable to find libmilter.a" "$LINENO" 5
+ as_fn_error $? "Unable to find libmilter.a" "$LINENO" 5
fi
fi
else
@@ -13252,7 +13258,7 @@ if test "$PHP_MILTER" != "no"; then
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -13265,7 +13271,7 @@ if test "$PHP_MILTER" != "no"; then
if test "program" = "program"; then
PHP_BINARIES="$PHP_BINARIES milter"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -13441,7 +13447,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_NSAPI" != "no"; then
if test ! -d $PHP_NSAPI/bin ; then
- as_fn_error "Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR" "$LINENO" 5
+ as_fn_error $? "Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSAPI include files" >&5
$as_echo_n "checking for NSAPI include files... " >&6; }
@@ -13453,8 +13459,7 @@ $as_echo "Netscape 3.x / Sun 7.x style" >&6; }
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -13473,8 +13478,7 @@ $as_echo "iPlanet 4.x / Sun 6.x style" >&6; }
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -13486,7 +13490,7 @@ done
NSAPI_INCLUDE="$NSAPI_INCLUDE -I$NSAPI_INC_DIR"
fi
if test -z "$NSAPI_INCLUDE"; then
- as_fn_error "Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include" "$LINENO" 5
+ as_fn_error $? "Please check you have nsapi.h in either $PHP_NSAPI/include or $PHP_NSAPI/plugins/include" "$LINENO" 5
fi
@@ -13532,7 +13536,7 @@ done
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -13542,7 +13546,7 @@ $as_echo "#define HAVE_NSAPI 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES nsapi"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -13729,12 +13733,12 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PHTTPD" != "no"; then
if test ! -d $PHP_PHTTPD ; then
- as_fn_error "You did not specify a directory" "$LINENO" 5
+ as_fn_error $? "You did not specify a directory" "$LINENO" 5
fi
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -13775,7 +13779,7 @@ $as_echo "#define HAVE_PHTTPD 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES phttpd"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -13965,11 +13969,11 @@ if test "$PHP_PI3WEB" != "no"; then
else
PI3PATH=$PHP_PI3WEB
fi
- test -f "$PI3PATH/PiAPI/PiAPI.h" || as_fn_error "Unable to find PiAPI.h in $PI3PATH/PiAPI" "$LINENO" 5
+ test -f "$PI3PATH/PiAPI/PiAPI.h" || as_fn_error $? "Unable to find PiAPI.h in $PI3PATH/PiAPI" "$LINENO" 5
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -14103,7 +14107,7 @@ $as_echo "#define WITH_PI3WEB 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES pi3web"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -14313,24 +14317,24 @@ RESULT=
$as_echo_n "checking for Roxen/Pike support... " >&6; }
if test "$PHP_ROXEN" != "no"; then
if test ! -d $PHP_ROXEN ; then
- as_fn_error "You did not specify a directory" "$LINENO" 5
+ as_fn_error $? "You did not specify a directory" "$LINENO" 5
fi
if test -f $PHP_ROXEN/bin/roxen; then
PIKE=$PHP_ROXEN/bin/roxen
elif test -f $PHP_ROXEN/bin/pike; then
PIKE=$PHP_ROXEN/bin/pike
else
- as_fn_error "Could not find a pike in $PHP_ROXEN/bin/" "$LINENO" 5
+ as_fn_error $? "Could not find a pike in $PHP_ROXEN/bin/" "$LINENO" 5
fi
if $PIKE -e 'float v; catch(v = __VERSION__ + (__BUILD__/10000.0)); if(v < 0.7079) exit(1); exit(0);'; then
PIKE_MODULE_DIR=`$PIKE --show-paths 2>&1| grep '^Module' | sed -e 's/.*: //'`
PIKE_INCLUDE_DIR=`echo $PIKE_MODULE_DIR | sed -e 's,lib/pike/modules,include/pike,' -e 's,lib/modules,include/pike,'`
if test -z "$PIKE_INCLUDE_DIR" || test -z "$PIKE_MODULE_DIR"; then
- as_fn_error "Failed to figure out Pike module and include directories" "$LINENO" 5
+ as_fn_error $? "Failed to figure out Pike module and include directories" "$LINENO" 5
fi
else
- as_fn_error "Roxen/PHP requires Pike 0.7.79 or newer" "$LINENO" 5
+ as_fn_error $? "Roxen/PHP requires Pike 0.7.79 or newer" "$LINENO" 5
fi
@@ -14371,7 +14375,7 @@ $as_echo "#define HAVE_ROXEN 1" >>confdefs.h
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES roxen"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -14537,7 +14541,7 @@ EOF
enable_maintainer_zts=yes
if test "$pthreads_working" != "yes"; then
- as_fn_error "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
+ as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
fi
@@ -14600,7 +14604,7 @@ $as_echo "thttpd directory does not exist ($PHP_THTTPD)" >&6; }
elif grep Premium $PHP_THTTPD/version.h >/dev/null; then
patch=
else
- as_fn_error "This version only supports thttpd-2.21b and Premium thttpd" "$LINENO" 5
+ as_fn_error $? "This version only supports thttpd-2.21b and Premium thttpd" "$LINENO" 5
fi
if test -n "$GCC"; then
@@ -14608,7 +14612,7 @@ $as_echo "thttpd directory does not exist ($PHP_THTTPD)" >&6; }
gcc_arg_name=ac_cv_gcc_arg_rdynamic
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5
$as_echo_n "checking whether $CC supports -rdynamic... " >&6; }
-if test "${ac_cv_gcc_arg_rdynamic+set}" = set; then :
+if ${ac_cv_gcc_arg_rdynamic+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14681,7 +14685,7 @@ $as_echo "$ac_cv_gcc_arg_rdynamic" >&6; }
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES thttpd"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -14828,13 +14832,13 @@ if test "$PHP_TUX" != "no"; then
for ac_header in tuxmodule.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "tuxmodule.h" "ac_cv_header_tuxmodule_h" "$ac_includes_default"
-if test "x$ac_cv_header_tuxmodule_h" = x""yes; then :
+if test "x$ac_cv_header_tuxmodule_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_TUXMODULE_H 1
_ACEOF
:
else
- as_fn_error "Cannot find tuxmodule.h" "$LINENO" 5
+ as_fn_error $? "Cannot find tuxmodule.h" "$LINENO" 5
fi
done
@@ -14843,7 +14847,7 @@ done
if test "shared" = "program"; then
PHP_BINARIES="$PHP_BINARIES tux"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -15082,7 +15086,7 @@ if test "$PHP_WEBJAMES" != "no"; then
if test "static" = "program"; then
PHP_BINARIES="$PHP_BINARIES webjames"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -15349,7 +15353,7 @@ $as_echo "no" >&6; }
if test "program" = "program"; then
PHP_BINARIES="$PHP_BINARIES cgi"
elif test "$PHP_SAPI" != "none"; then
- as_fn_error "
+ as_fn_error $? "
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
@@ -15486,7 +15490,7 @@ $as_echo "none" >&6; }
fi
if test -z "$PHP_INSTALLED_SAPIS"; then
- as_fn_error "Nothing to build." "$LINENO" 5
+ as_fn_error $? "Nothing to build." "$LINENO" 5
fi
if test "$enable_maintainer_zts" = "yes"; then
@@ -15504,7 +15508,7 @@ fi
host_alias=$host
fi
if test -z "$host_alias"; then
- as_fn_error "host_alias is not set. Make sure to run config.guess" "$LINENO" 5
+ as_fn_error $? "host_alias is not set. Make sure to run config.guess" "$LINENO" 5
fi
case $host_alias in
*solaris*)
@@ -15543,7 +15547,7 @@ $as_echo "${T_MD}Running system checks${T_ME}" >&6; }
set dummy sendmail; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PROG_SENDMAIL+set}" = set; then :
+if ${ac_cv_path_PROG_SENDMAIL+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PROG_SENDMAIL in
@@ -15588,7 +15592,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system uses EBCDIC" >&5
$as_echo_n "checking whether system uses EBCDIC... " >&6; }
-if test "${ac_cv_ebcdic+set}" = set; then :
+if ${ac_cv_ebcdic+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15630,7 +15634,7 @@ $as_echo "#define CHARSET_EBCDIC 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian_php+set}" = set; then :
+if ${ac_cv_c_bigendian_php+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15677,7 +15681,7 @@ $as_echo "#define WORDS_BIGENDIAN /**/" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether writing to stdout works" >&5
$as_echo_n "checking whether writing to stdout works... " >&6; }
-if test "${ac_cv_write_stdout+set}" = set; then :
+if ${ac_cv_write_stdout+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15775,11 +15779,11 @@ test -d /usr/ucblib &&
unset found
ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
-if test "x$ac_cv_func_socket" = x""yes; then :
+if test "x$ac_cv_func_socket" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__socket" "ac_cv_func___socket"
-if test "x$ac_cv_func___socket" = x""yes; then :
+if test "x$ac_cv_func___socket" = xyes; then :
found=yes
else
found=no
@@ -15803,7 +15807,7 @@ $as_echo "#define HAVE_SOCKET 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
$as_echo_n "checking for socket in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_socket+set}" = set; then :
+if ${ac_cv_lib_socket_socket+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15837,13 +15841,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = x""yes; then :
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __socket in -lsocket" >&5
$as_echo_n "checking for __socket in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___socket+set}" = set; then :
+if ${ac_cv_lib_socket___socket+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15877,7 +15881,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___socket" >&5
$as_echo "$ac_cv_lib_socket___socket" >&6; }
-if test "x$ac_cv_lib_socket___socket" = x""yes; then :
+if test "x$ac_cv_lib_socket___socket" = xyes; then :
found=yes
else
found=no
@@ -15943,11 +15947,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
-if test "x$ac_cv_func_socketpair" = x""yes; then :
+if test "x$ac_cv_func_socketpair" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__socketpair" "ac_cv_func___socketpair"
-if test "x$ac_cv_func___socketpair" = x""yes; then :
+if test "x$ac_cv_func___socketpair" = xyes; then :
found=yes
else
found=no
@@ -15971,7 +15975,7 @@ $as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
$as_echo_n "checking for socketpair in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_socketpair+set}" = set; then :
+if ${ac_cv_lib_socket_socketpair+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16005,13 +16009,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socketpair" >&5
$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
-if test "x$ac_cv_lib_socket_socketpair" = x""yes; then :
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __socketpair in -lsocket" >&5
$as_echo_n "checking for __socketpair in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___socketpair+set}" = set; then :
+if ${ac_cv_lib_socket___socketpair+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16045,7 +16049,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___socketpair" >&5
$as_echo "$ac_cv_lib_socket___socketpair" >&6; }
-if test "x$ac_cv_lib_socket___socketpair" = x""yes; then :
+if test "x$ac_cv_lib_socket___socketpair" = xyes; then :
found=yes
else
found=no
@@ -16111,11 +16115,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "htonl" "ac_cv_func_htonl"
-if test "x$ac_cv_func_htonl" = x""yes; then :
+if test "x$ac_cv_func_htonl" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__htonl" "ac_cv_func___htonl"
-if test "x$ac_cv_func___htonl" = x""yes; then :
+if test "x$ac_cv_func___htonl" = xyes; then :
found=yes
else
found=no
@@ -16139,7 +16143,7 @@ $as_echo "#define HAVE_HTONL 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonl in -lsocket" >&5
$as_echo_n "checking for htonl in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_htonl+set}" = set; then :
+if ${ac_cv_lib_socket_htonl+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16173,13 +16177,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_htonl" >&5
$as_echo "$ac_cv_lib_socket_htonl" >&6; }
-if test "x$ac_cv_lib_socket_htonl" = x""yes; then :
+if test "x$ac_cv_lib_socket_htonl" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __htonl in -lsocket" >&5
$as_echo_n "checking for __htonl in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___htonl+set}" = set; then :
+if ${ac_cv_lib_socket___htonl+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16213,7 +16217,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___htonl" >&5
$as_echo "$ac_cv_lib_socket___htonl" >&6; }
-if test "x$ac_cv_lib_socket___htonl" = x""yes; then :
+if test "x$ac_cv_lib_socket___htonl" = xyes; then :
found=yes
else
found=no
@@ -16279,11 +16283,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
-if test "x$ac_cv_func_gethostname" = x""yes; then :
+if test "x$ac_cv_func_gethostname" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__gethostname" "ac_cv_func___gethostname"
-if test "x$ac_cv_func___gethostname" = x""yes; then :
+if test "x$ac_cv_func___gethostname" = xyes; then :
found=yes
else
found=no
@@ -16307,7 +16311,7 @@ $as_echo "#define HAVE_GETHOSTNAME 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in -lnsl" >&5
$as_echo_n "checking for gethostname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16341,13 +16345,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostname" >&5
$as_echo "$ac_cv_lib_nsl_gethostname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostname" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gethostname in -lnsl" >&5
$as_echo_n "checking for __gethostname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl___gethostname+set}" = set; then :
+if ${ac_cv_lib_nsl___gethostname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16381,7 +16385,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl___gethostname" >&5
$as_echo "$ac_cv_lib_nsl___gethostname" >&6; }
-if test "x$ac_cv_lib_nsl___gethostname" = x""yes; then :
+if test "x$ac_cv_lib_nsl___gethostname" = xyes; then :
found=yes
else
found=no
@@ -16447,11 +16451,11 @@ $as_echo "#define HAVE_LIBNSL 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "gethostbyaddr" "ac_cv_func_gethostbyaddr"
-if test "x$ac_cv_func_gethostbyaddr" = x""yes; then :
+if test "x$ac_cv_func_gethostbyaddr" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__gethostbyaddr" "ac_cv_func___gethostbyaddr"
-if test "x$ac_cv_func___gethostbyaddr" = x""yes; then :
+if test "x$ac_cv_func___gethostbyaddr" = xyes; then :
found=yes
else
found=no
@@ -16475,7 +16479,7 @@ $as_echo "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lnsl" >&5
$as_echo_n "checking for gethostbyaddr in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyaddr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16509,13 +16513,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyaddr" >&5
$as_echo "$ac_cv_lib_nsl_gethostbyaddr" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyaddr" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyaddr" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gethostbyaddr in -lnsl" >&5
$as_echo_n "checking for __gethostbyaddr in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl___gethostbyaddr+set}" = set; then :
+if ${ac_cv_lib_nsl___gethostbyaddr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16549,7 +16553,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl___gethostbyaddr" >&5
$as_echo "$ac_cv_lib_nsl___gethostbyaddr" >&6; }
-if test "x$ac_cv_lib_nsl___gethostbyaddr" = x""yes; then :
+if test "x$ac_cv_lib_nsl___gethostbyaddr" = xyes; then :
found=yes
else
found=no
@@ -16615,11 +16619,11 @@ $as_echo "#define HAVE_LIBNSL 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain"
-if test "x$ac_cv_func_yp_get_default_domain" = x""yes; then :
+if test "x$ac_cv_func_yp_get_default_domain" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__yp_get_default_domain" "ac_cv_func___yp_get_default_domain"
-if test "x$ac_cv_func___yp_get_default_domain" = x""yes; then :
+if test "x$ac_cv_func___yp_get_default_domain" = xyes; then :
found=yes
else
found=no
@@ -16643,7 +16647,7 @@ $as_echo "#define HAVE_YP_GET_DEFAULT_DOMAIN 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_get_default_domain in -lnsl" >&5
$as_echo_n "checking for yp_get_default_domain in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then :
+if ${ac_cv_lib_nsl_yp_get_default_domain+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16677,13 +16681,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
$as_echo "$ac_cv_lib_nsl_yp_get_default_domain" >&6; }
-if test "x$ac_cv_lib_nsl_yp_get_default_domain" = x""yes; then :
+if test "x$ac_cv_lib_nsl_yp_get_default_domain" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __yp_get_default_domain in -lnsl" >&5
$as_echo_n "checking for __yp_get_default_domain in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl___yp_get_default_domain+set}" = set; then :
+if ${ac_cv_lib_nsl___yp_get_default_domain+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16717,7 +16721,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl___yp_get_default_domain" >&5
$as_echo "$ac_cv_lib_nsl___yp_get_default_domain" >&6; }
-if test "x$ac_cv_lib_nsl___yp_get_default_domain" = x""yes; then :
+if test "x$ac_cv_lib_nsl___yp_get_default_domain" = xyes; then :
found=yes
else
found=no
@@ -16784,11 +16788,11 @@ $as_echo "#define HAVE_LIBNSL 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__dlopen" "ac_cv_func___dlopen"
-if test "x$ac_cv_func___dlopen" = x""yes; then :
+if test "x$ac_cv_func___dlopen" = xyes; then :
found=yes
else
found=no
@@ -16812,7 +16816,7 @@ $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16846,13 +16850,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dlopen in -ldl" >&5
$as_echo_n "checking for __dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl___dlopen+set}" = set; then :
+if ${ac_cv_lib_dl___dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16886,7 +16890,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl___dlopen" >&5
$as_echo "$ac_cv_lib_dl___dlopen" >&6; }
-if test "x$ac_cv_lib_dl___dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl___dlopen" = xyes; then :
found=yes
else
found=no
@@ -16953,7 +16957,7 @@ $as_echo "#define HAVE_LIBDL 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
$as_echo_n "checking for sin in -lm... " >&6; }
-if test "${ac_cv_lib_m_sin+set}" = set; then :
+if ${ac_cv_lib_m_sin+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16987,7 +16991,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
$as_echo "$ac_cv_lib_m_sin" >&6; }
-if test "x$ac_cv_lib_m_sin" = x""yes; then :
+if test "x$ac_cv_lib_m_sin" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBM 1
_ACEOF
@@ -17003,11 +17007,11 @@ fi
unset found
ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
-if test "x$ac_cv_func_inet_aton" = x""yes; then :
+if test "x$ac_cv_func_inet_aton" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__inet_aton" "ac_cv_func___inet_aton"
-if test "x$ac_cv_func___inet_aton" = x""yes; then :
+if test "x$ac_cv_func___inet_aton" = xyes; then :
found=yes
else
found=no
@@ -17031,7 +17035,7 @@ $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
+if ${ac_cv_lib_resolv_inet_aton+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17065,13 +17069,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
-if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
+if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __inet_aton in -lresolv" >&5
$as_echo_n "checking for __inet_aton in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___inet_aton+set}" = set; then :
+if ${ac_cv_lib_resolv___inet_aton+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17105,7 +17109,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___inet_aton" >&5
$as_echo "$ac_cv_lib_resolv___inet_aton" >&6; }
-if test "x$ac_cv_lib_resolv___inet_aton" = x""yes; then :
+if test "x$ac_cv_lib_resolv___inet_aton" = xyes; then :
found=yes
else
found=no
@@ -17163,7 +17167,7 @@ $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lbind" >&5
$as_echo_n "checking for inet_aton in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_inet_aton+set}" = set; then :
+if ${ac_cv_lib_bind_inet_aton+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17197,13 +17201,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_aton" >&5
$as_echo "$ac_cv_lib_bind_inet_aton" >&6; }
-if test "x$ac_cv_lib_bind_inet_aton" = x""yes; then :
+if test "x$ac_cv_lib_bind_inet_aton" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __inet_aton in -lbind" >&5
$as_echo_n "checking for __inet_aton in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___inet_aton+set}" = set; then :
+if ${ac_cv_lib_bind___inet_aton+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17237,7 +17241,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___inet_aton" >&5
$as_echo "$ac_cv_lib_bind___inet_aton" >&6; }
-if test "x$ac_cv_lib_bind___inet_aton" = x""yes; then :
+if test "x$ac_cv_lib_bind___inet_aton" = xyes; then :
found=yes
else
found=no
@@ -17304,7 +17308,7 @@ $as_echo "#define HAVE_LIBBIND 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17419,7 +17423,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Header+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17446,8 +17450,7 @@ fi
eval ac_res=\$$as_ac_Header
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
@@ -17460,7 +17463,7 @@ done
if test $ac_header_dirent = dirent.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -17494,11 +17497,11 @@ for ac_lib in '' dir; do
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if test "${ac_cv_search_opendir+set}" = set; then :
+ if ${ac_cv_search_opendir+:} false; then :
break
fi
done
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
else
ac_cv_search_opendir=no
@@ -17517,7 +17520,7 @@ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -17551,11 +17554,11 @@ for ac_lib in '' x; do
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if test "${ac_cv_search_opendir+set}" = set; then :
+ if ${ac_cv_search_opendir+:} false; then :
break
fi
done
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
else
ac_cv_search_opendir=no
@@ -17650,8 +17653,7 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
#endif
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -17663,7 +17665,7 @@ done
ac_fn_c_check_func "$LINENO" "fopencookie" "ac_cv_func_fopencookie"
-if test "x$ac_cv_func_fopencookie" = x""yes; then :
+if test "x$ac_cv_func_fopencookie" = xyes; then :
have_glibc_fopencookie=yes
fi
@@ -17805,7 +17807,7 @@ $as_echo "no" >&6; };;
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken libc stdio" >&5
$as_echo_n "checking for broken libc stdio... " >&6; }
- if test "${_cv_have_broken_glibc_fopen_append+set}" = set; then :
+ if ${_cv_have_broken_glibc_fopen_append+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -17890,7 +17892,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if test "${ac_cv_struct_tm+set}" = set; then :
+if ${ac_cv_struct_tm+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17927,7 +17929,7 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_
#include <$ac_cv_struct_tm>
"
-if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
+if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_TM_TM_ZONE 1
@@ -17943,7 +17945,7 @@ $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
else
ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
"
-if test "x$ac_cv_have_decl_tzname" = x""yes; then :
+if test "x$ac_cv_have_decl_tzname" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -17955,7 +17957,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
$as_echo_n "checking for tzname... " >&6; }
-if test "${ac_cv_var_tzname+set}" = set; then :
+if ${ac_cv_var_tzname+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18149,7 +18151,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5
$as_echo_n "checking for tm_gmtoff in struct tm... " >&6; }
-if test "${ac_cv_struct_tm_gmtoff+set}" = set; then :
+if ${ac_cv_struct_tm_gmtoff+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18183,7 +18185,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct flock" >&5
$as_echo_n "checking for struct flock... " >&6; }
-if test "${ac_cv_struct_flock+set}" = set; then :
+if ${ac_cv_struct_flock+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18223,7 +18225,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
$as_echo_n "checking for socklen_t... " >&6; }
-if test "${ac_cv_socklen_t+set}" = set; then :
+if ${ac_cv_socklen_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18268,7 +18270,7 @@ fi
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
$as_echo_n "checking size of size_t... " >&6; }
-if test "${ac_cv_sizeof_size_t+set}" = set; then :
+if ${ac_cv_sizeof_size_t+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
@@ -18277,9 +18279,8 @@ else
if test "$ac_cv_type_size_t" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (size_t)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_size_t=0
fi
@@ -18302,7 +18303,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
+if ${ac_cv_sizeof_long_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
@@ -18311,9 +18312,8 @@ else
if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_long=0
fi
@@ -18336,7 +18336,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
$as_echo_n "checking size of long long int... " >&6; }
-if test "${ac_cv_sizeof_long_long_int+set}" = set; then :
+if ${ac_cv_sizeof_long_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
@@ -18345,9 +18345,8 @@ else
if test "$ac_cv_type_long_long_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_long_int=0
fi
@@ -18370,7 +18369,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
@@ -18379,9 +18378,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long=0
fi
@@ -18404,7 +18402,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
@@ -18413,9 +18411,8 @@ else
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int=0
fi
@@ -18438,7 +18435,7 @@ _ACEOF
$as_echo_n "checking size of intmax_t... " >&6; }
php_cache_value=php_cv_sizeof_intmax_t
- if test "${php_cv_sizeof_intmax_t+set}" = set; then :
+ if ${php_cv_sizeof_intmax_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18517,7 +18514,7 @@ $as_echo "$php_cv_sizeof_intmax_t" >&6; }
$as_echo_n "checking size of ssize_t... " >&6; }
php_cache_value=php_cv_sizeof_ssize_t
- if test "${php_cv_sizeof_ssize_t+set}" = set; then :
+ if ${php_cv_sizeof_ssize_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18596,7 +18593,7 @@ $as_echo "$php_cv_sizeof_ssize_t" >&6; }
$as_echo_n "checking size of ptrdiff_t... " >&6; }
php_cache_value=php_cv_sizeof_ptrdiff_t
- if test "${php_cv_sizeof_ptrdiff_t+set}" = set; then :
+ if ${php_cv_sizeof_ptrdiff_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18672,7 +18669,7 @@ $as_echo "$php_cv_sizeof_ptrdiff_t" >&6; }
ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
@@ -18686,7 +18683,7 @@ fi
if test "`uname -s 2>/dev/null`" != "QNX"; then
ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
@@ -18711,7 +18708,7 @@ $as_echo "$as_me: WARNING: warnings level for cc set to 0" >&2;}
WARNING_LEVEL=0
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_RDEV 1
@@ -18725,7 +18722,7 @@ fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
else
@@ -18737,7 +18734,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if test "${ac_cv_type_uid_t+set}" = set; then :
+if ${ac_cv_type_uid_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18769,7 +18766,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
-if test "${ac_cv_sockaddr_storage+set}" = set; then :
+if ${ac_cv_sockaddr_storage+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18801,7 +18798,7 @@ $as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field sa_len in struct sockaddr" >&5
$as_echo_n "checking for field sa_len in struct sockaddr... " >&6; }
-if test "${ac_cv_sockaddr_sa_len+set}" = set; then :
+if ${ac_cv_sockaddr_sa_len+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18836,7 +18833,7 @@ $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5
$as_echo_n "checking for IPv6 support... " >&6; }
-if test "${ac_cv_ipv6_support+set}" = set; then :
+if ${ac_cv_ipv6_support+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18867,13 +18864,13 @@ $as_echo "$ac_cv_ipv6_support" >&6; }
for ac_func in vprintf
do :
ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = x""yes; then :
+if test "x$ac_cv_func_vprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VPRINTF 1
_ACEOF
ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = x""yes; then :
+if test "x$ac_cv_func__doprnt" = xyes; then :
$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
@@ -18969,8 +18966,7 @@ nanosleep \
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -18986,7 +18982,7 @@ done
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
$as_echo_n "checking for nanosleep in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_nanosleep+set}" = set; then :
+if ${ac_cv_lib_rt_nanosleep+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19020,13 +19016,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
$as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
-if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then :
+if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __nanosleep in -lrt" >&5
$as_echo_n "checking for __nanosleep in -lrt... " >&6; }
-if test "${ac_cv_lib_rt___nanosleep+set}" = set; then :
+if ${ac_cv_lib_rt___nanosleep+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19060,7 +19056,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt___nanosleep" >&5
$as_echo "$ac_cv_lib_rt___nanosleep" >&6; }
-if test "x$ac_cv_lib_rt___nanosleep" = x""yes; then :
+if test "x$ac_cv_lib_rt___nanosleep" = xyes; then :
found=yes
else
found=no
@@ -19120,7 +19116,7 @@ $as_echo "#define HAVE_LIBRT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
$as_echo_n "checking for getaddrinfo... " >&6; }
-if test "${ac_cv_func_getaddrinfo+set}" = set; then :
+if ${ac_cv_func_getaddrinfo+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19203,7 +19199,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_fetch_and_add" >&5
$as_echo_n "checking for __sync_fetch_and_add... " >&6; }
-if test "${ac_cv_func_sync_fetch_and_add+set}" = set; then :
+if ${ac_cv_func_sync_fetch_and_add+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19233,25 +19229,44 @@ $as_echo "#define HAVE_SYNC_FETCH_AND_ADD 1" >>confdefs.h
fi
-for ac_func in strlcat strlcpy getopt
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+if test "x$ac_cv_func_strlcat" = xyes; then :
+ $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
else
case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ *" strlcat.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes; then :
+ $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" strlcpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
+if test "x$ac_cv_func_getopt" = xyes; then :
+ $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" getopt.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
;;
esac
fi
-done
@@ -19262,8 +19277,7 @@ do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -19277,7 +19291,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utime accepts a null argument" >&5
$as_echo_n "checking whether utime accepts a null argument... " >&6; }
-if test "${ac_cv_func_utime_null+set}" = set; then :
+if ${ac_cv_func_utime_null+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest.data; >conftest.data
@@ -19328,7 +19342,7 @@ rm -f conftest.data
# for constant arguments. Useless!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
$as_echo_n "checking for working alloca.h... " >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then :
+if ${ac_cv_working_alloca_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19361,7 +19375,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
$as_echo_n "checking for alloca... " >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then :
+if ${ac_cv_func_alloca_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19380,7 +19394,7 @@ else
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+void *alloca (size_t);
# endif
# endif
# endif
@@ -19424,7 +19438,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test "${ac_cv_os_cray+set}" = set; then :
+if ${ac_cv_os_cray+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19451,8 +19465,7 @@ if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
@@ -19466,7 +19479,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
$as_echo_n "checking stack direction for C alloca... " >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then :
+if ${ac_cv_c_stack_direction+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -19517,7 +19530,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declared timezone" >&5
$as_echo_n "checking for declared timezone... " >&6; }
-if test "${ac_cv_declared_timezone+set}" = set; then :
+if ${ac_cv_declared_timezone+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19562,7 +19575,7 @@ $as_echo "#define HAVE_DECLARED_TIMEZONE 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of reentrant time-related functions" >&5
$as_echo_n "checking for type of reentrant time-related functions... " >&6; }
-if test "${ac_cv_time_r_type+set}" = set; then :
+if ${ac_cv_time_r_type+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19650,7 +19663,7 @@ $as_echo "#define PHP_IRIX_TIME_R 1" >>confdefs.h
ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r"
-if test "x$ac_cv_func_readdir_r" = x""yes; then :
+if test "x$ac_cv_func_readdir_r" = xyes; then :
ac_cv_func_readdir_r=yes
else
ac_cv_func_readdir=no
@@ -19659,7 +19672,7 @@ fi
if test "$ac_cv_func_readdir_r" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of readdir_r" >&5
$as_echo_n "checking for type of readdir_r... " >&6; }
-if test "${ac_cv_what_readdir_r+set}" = set; then :
+if ${ac_cv_what_readdir_r+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19717,7 +19730,7 @@ else
ac_cv_what_readdir_r=none
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -19743,7 +19756,7 @@ $as_echo "#define HAVE_OLD_READDIR_R 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_addr_t" >&5
$as_echo_n "checking for in_addr_t... " >&6; }
-if test "${ac_cv_type_in_addr_t+set}" = set; then :
+if ${ac_cv_type_in_addr_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19778,7 +19791,7 @@ fi
for ac_func in crypt_r
do :
ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
-if test "x$ac_cv_func_crypt_r" = x""yes; then :
+if test "x$ac_cv_func_crypt_r" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CRYPT_R 1
_ACEOF
@@ -19792,7 +19805,7 @@ if test "x$php_crypt_r" = "x1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which data struct is used by crypt_r" >&5
$as_echo_n "checking which data struct is used by crypt_r... " >&6; }
-if test "${php_cv_crypt_r_style+set}" = set; then :
+if ${php_cv_crypt_r_style+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19888,7 +19901,7 @@ $as_echo "#define CRYPT_R_GNU_SOURCE 1" >>confdefs.h
fi
if test "$php_cv_crypt_r_style" = "none"; then
- as_fn_error "Unable to detect data struct used by crypt_r" "$LINENO" 5
+ as_fn_error $? "Unable to detect data struct used by crypt_r" "$LINENO" 5
fi
fi
@@ -19934,7 +19947,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_GCOV" = "yes"; then
if test "$GCC" != "yes"; then
- as_fn_error "GCC is required for --enable-gcov" "$LINENO" 5
+ as_fn_error $? "GCC is required for --enable-gcov" "$LINENO" 5
fi
case `$php_shtool path $CC` in
@@ -19943,16 +19956,16 @@ if test "$PHP_GCOV" = "yes"; then
esac
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
- as_fn_error "ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1." "$LINENO" 5
+ as_fn_error $? "ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1." "$LINENO" 5
fi
- ltp_version_list="1.5 1.6 1.7"
+ ltp_version_list="1.5 1.6 1.7 1.9"
# Extract the first word of "lcov", so it can be a program name with args.
set dummy lcov; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LTP+set}" = set; then :
+if ${ac_cv_prog_LTP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$LTP"; then
@@ -19989,7 +20002,7 @@ fi
set dummy genhtml; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LTP_GENHTML+set}" = set; then :
+if ${ac_cv_prog_LTP_GENHTML+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$LTP_GENHTML"; then
@@ -20032,7 +20045,7 @@ fi
if test "$LTP"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ltp version" >&5
$as_echo_n "checking for ltp version... " >&6; }
-if test "${php_cv_ltp_version+set}" = set; then :
+if ${php_cv_ltp_version+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -20049,19 +20062,19 @@ fi
$as_echo "$php_cv_ltp_version" >&6; }
else
ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
- as_fn_error "$ltp_msg" "$LINENO" 5
+ as_fn_error $? "$ltp_msg" "$LINENO" 5
fi
case $php_cv_ltp_version in
""|invalid)
ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
- as_fn_error "$ltp_msg" "$LINENO" 5
+ as_fn_error $? "$ltp_msg" "$LINENO" 5
LTP="exit 0;"
;;
esac
if test -z "$LTP_GENHTML"; then
- as_fn_error "Could not find genhtml from the LTP package" "$LINENO" 5
+ as_fn_error $? "Could not find genhtml from the LTP package" "$LINENO" 5
fi
@@ -20293,7 +20306,7 @@ if test "$PHP_LIBGCC" = "yes"; then
if test -z "$libgcc_libpath"; then
- as_fn_error "Cannot locate libgcc. Make sure that gcc is in your path" "$LINENO" 5
+ as_fn_error $? "Cannot locate libgcc. Make sure that gcc is in your path" "$LINENO" 5
fi
if test "$libgcc_libpath" != "/usr/$PHP_LIBDIR" && test "$libgcc_libpath" != "/usr/lib"; then
@@ -20399,7 +20412,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_DMALLOC" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmalloc_error in -ldmalloc" >&5
$as_echo_n "checking for dmalloc_error in -ldmalloc... " >&6; }
-if test "${ac_cv_lib_dmalloc_dmalloc_error+set}" = set; then :
+if ${ac_cv_lib_dmalloc_dmalloc_error+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20433,7 +20446,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmalloc_dmalloc_error" >&5
$as_echo "$ac_cv_lib_dmalloc_dmalloc_error" >&6; }
-if test "x$ac_cv_lib_dmalloc_dmalloc_error" = x""yes; then :
+if test "x$ac_cv_lib_dmalloc_dmalloc_error" = xyes; then :
@@ -20452,7 +20465,7 @@ $as_echo "#define HAVE_DMALLOC 1" >>confdefs.h
else
- as_fn_error "Problem with enabling dmalloc. Please check config.log for details." "$LINENO" 5
+ as_fn_error $? "Problem with enabling dmalloc. Please check config.log for details." "$LINENO" 5
fi
@@ -20514,7 +20527,7 @@ if test "$PHP_DTRACE" = "yes"; then
for ac_header in sys/sdt.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sdt_h" = x""yes; then :
+if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_SDT_H 1
_ACEOF
@@ -20589,7 +20602,7 @@ $as_echo "#define HAVE_DTRACE 1" >>confdefs.h
else
- as_fn_error "Cannot find sys/sdt.h which is required for DTrace support" "$LINENO" 5
+ as_fn_error $? "Cannot find sys/sdt.h which is required for DTrace support" "$LINENO" 5
fi
@@ -20626,7 +20639,7 @@ if test "$PHP_FD_SETSIZE" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $PHP_FD_SETSIZE" >&5
$as_echo "using $PHP_FD_SETSIZE" >&6; }
else
- as_fn_error "Invalid value passed to --enable-fd-setsize!" "$LINENO" 5
+ as_fn_error $? "Invalid value passed to --enable-fd-setsize!" "$LINENO" 5
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using system default" >&5
@@ -20669,7 +20682,7 @@ fi
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
@@ -20678,9 +20691,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long=0
fi
@@ -20703,7 +20715,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
@@ -20712,9 +20724,8 @@ else
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int=0
fi
@@ -20734,7 +20745,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32_t" >&5
$as_echo_n "checking for int32_t... " >&6; }
-if test "${ac_cv_int_type_int32_t+set}" = set; then :
+if ${ac_cv_int_type_int32_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -20780,7 +20791,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5
$as_echo_n "checking for uint32_t... " >&6; }
-if test "${ac_cv_int_type_uint32_t+set}" = set; then :
+if ${ac_cv_int_type_uint32_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -20834,8 +20845,7 @@ stdlib.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -20849,8 +20859,7 @@ for ac_func in strtoll atoll strftime
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -21674,7 +21683,7 @@ $as_echo "#define REGEX 0" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether field re_magic exists in struct regex_t" >&5
$as_echo_n "checking whether field re_magic exists in struct regex_t... " >&6; }
-if test "${ac_cv_regex_t_re_magic+set}" = set; then :
+if ${ac_cv_regex_t_re_magic+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21784,7 +21793,7 @@ if test "$PHP_LIBXML" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21942,7 +21951,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21980,7 +21989,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -22315,10 +22324,10 @@ EOF
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
fi
@@ -22703,7 +22712,7 @@ EOF
set dummy krb5-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_KRB5_CONFIG+set}" = set; then :
+if ${ac_cv_path_KRB5_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $KRB5_CONFIG in
@@ -23069,7 +23078,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSA_get_default_method in -lssl" >&5
$as_echo_n "checking for DSA_get_default_method in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_DSA_get_default_method+set}" = set; then :
+if ${ac_cv_lib_ssl_DSA_get_default_method+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23103,7 +23112,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_DSA_get_default_method" >&5
$as_echo "$ac_cv_lib_ssl_DSA_get_default_method" >&6; }
-if test "x$ac_cv_lib_ssl_DSA_get_default_method" = x""yes; then :
+if test "x$ac_cv_lib_ssl_DSA_get_default_method" = xyes; then :
$as_echo "#define HAVE_DSA_DEFAULT_METHOD 1" >>confdefs.h
@@ -23111,7 +23120,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_free in -lcrypto" >&5
$as_echo_n "checking for X509_free in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_X509_free+set}" = set; then :
+if ${ac_cv_lib_crypto_X509_free+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23145,7 +23154,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_X509_free" >&5
$as_echo "$ac_cv_lib_crypto_X509_free" >&6; }
-if test "x$ac_cv_lib_crypto_X509_free" = x""yes; then :
+if test "x$ac_cv_lib_crypto_X509_free" = xyes; then :
$as_echo "#define HAVE_DSA_DEFAULT_METHOD 1" >>confdefs.h
@@ -23171,7 +23180,7 @@ fi
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
@@ -23217,7 +23226,7 @@ fi
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
else
- as_fn_error "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
fi
if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
@@ -23370,11 +23379,11 @@ fi
done
if test -z "$OPENSSL_INCDIR"; then
- as_fn_error "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
+ as_fn_error $? "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
fi
if test -z "$OPENSSL_LIBDIR"; then
- as_fn_error "Cannot find OpenSSL's libraries" "$LINENO" 5
+ as_fn_error $? "Cannot find OpenSSL's libraries" "$LINENO" 5
fi
old_CPPFLAGS=$CPPFLAGS
@@ -23398,7 +23407,7 @@ $as_echo ">= 0.9.6" >&6; }
else
- as_fn_error "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
fi
rm -f conftest*
@@ -23536,7 +23545,7 @@ rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5
$as_echo_n "checking for CRYPTO_free in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_free+set}" = set; then :
+if ${ac_cv_lib_crypto_CRYPTO_free+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23570,7 +23579,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_free" >&5
$as_echo "$ac_cv_lib_crypto_CRYPTO_free" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_free" = x""yes; then :
+if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -23606,7 +23615,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_crypto_CRYPTO_free
- as_fn_error "libcrypto not found!" "$LINENO" 5
+ as_fn_error $? "libcrypto not found!" "$LINENO" 5
fi
@@ -23713,7 +23722,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ssl_version in -lssl" >&5
$as_echo_n "checking for SSL_CTX_set_ssl_version in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+set}" = set; then :
+if ${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23747,7 +23756,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&5
$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = x""yes; then :
+if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -23761,7 +23770,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version
- as_fn_error "libssl not found!" "$LINENO" 5
+ as_fn_error $? "libssl not found!" "$LINENO" 5
fi
@@ -23864,7 +23873,7 @@ $as_echo "#define HAVE_OPENSSL_EXT 1" >>confdefs.h
else
- as_fn_error "OpenSSL check failed. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "OpenSSL check failed. Please check config.log for more information." "$LINENO" 5
fi
@@ -23902,7 +23911,7 @@ $as_echo_n "checking for PCRE headers location... " >&6; }
done
if test -z "$PCRE_INCDIR"; then
- as_fn_error "Could not find pcre.h in $PHP_PCRE_REGEX" "$LINENO" 5
+ as_fn_error $? "Could not find pcre.h in $PHP_PCRE_REGEX" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_INCDIR" >&5
$as_echo "$PCRE_INCDIR" >&6; }
@@ -23914,7 +23923,7 @@ $as_echo_n "checking for PCRE library location... " >&6; }
done
if test -z "$PCRE_LIBDIR" ; then
- as_fn_error "Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX" "$LINENO" 5
+ as_fn_error $? "Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_LIBDIR" >&5
$as_echo "$PCRE_LIBDIR" >&6; }
@@ -23929,7 +23938,7 @@ $as_echo "$PCRE_LIBDIR" >&6; }
fi
pcre_version=$pcre_major$pcre_minor
if test "$pcre_version" -lt 660; then
- as_fn_error "The PCRE extension requires PCRE library version >= 6.6" "$LINENO" 5
+ as_fn_error $? "The PCRE extension requires PCRE library version >= 6.6" "$LINENO" 5
fi
@@ -24337,9 +24346,9 @@ $as_echo "bundled" >&6; }
pcrelib_sources="pcrelib/pcre_chartables.c pcrelib/pcre_ucd.c \
pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c \
pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c \
- pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \
+ pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \
pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c \
- pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \
+ pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
ext_builddir=ext/pcre
@@ -24738,7 +24747,7 @@ $as_echo "found in $i" >&6; }
if test -z "$SQLITE3_DIR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Please reinstall the sqlite distribution from http://www.sqlite.org" "$LINENO" 5
+ as_fn_error $? "Please reinstall the sqlite distribution from http://www.sqlite.org" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLite 3.3.9+" >&5
@@ -24842,7 +24851,7 @@ $as_echo_n "checking for SQLite 3.3.9+... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_prepare_v2 in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_prepare_v2 in -lsqlite3... " >&6; }
-if test "${ac_cv_lib_sqlite3_sqlite3_prepare_v2+set}" = set; then :
+if ${ac_cv_lib_sqlite3_sqlite3_prepare_v2+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -24876,7 +24885,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&6; }
-if test "x$ac_cv_lib_sqlite3_sqlite3_prepare_v2" = x""yes; then :
+if test "x$ac_cv_lib_sqlite3_sqlite3_prepare_v2" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -25021,7 +25030,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Please install SQLite 3.3.9 first or check libsqlite3 is present" "$LINENO" 5
+ as_fn_error $? "Please install SQLite 3.3.9 first or check libsqlite3 is present" "$LINENO" 5
fi
@@ -25124,7 +25133,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_key in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_key in -lsqlite3... " >&6; }
-if test "${ac_cv_lib_sqlite3_sqlite3_key+set}" = set; then :
+if ${ac_cv_lib_sqlite3_sqlite3_key+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25158,7 +25167,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_key" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_key" >&6; }
-if test "x$ac_cv_lib_sqlite3_sqlite3_key" = x""yes; then :
+if test "x$ac_cv_lib_sqlite3_sqlite3_key" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -25275,7 +25284,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_load_extension in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_load_extension in -lsqlite3... " >&6; }
-if test "${ac_cv_lib_sqlite3_sqlite3_load_extension+set}" = set; then :
+if ${ac_cv_lib_sqlite3_sqlite3_load_extension+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25309,7 +25318,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; }
-if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = x""yes; then :
+if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -26071,7 +26080,7 @@ EOF
fi
if test -z "$ZLIB_DIR"; then
- as_fn_error "Cannot find libz" "$LINENO" 5
+ as_fn_error $? "Cannot find libz" "$LINENO" 5
fi
case $ZLIB_DIR in
@@ -26085,7 +26094,7 @@ $as_echo_n "checking for zlib version >= 1.2.0.4... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZLIB_VERSION" >&5
$as_echo "$ZLIB_VERSION" >&6; }
if test `echo $ZLIB_VERSION | $SED -e 's/[^0-9]/ /g' | $AWK '{print $1*1000000 + $2*10000 + $3*100 + $4}'` -lt 1020004; then
- as_fn_error "libz version greater or equal to 1.2.0.4 required" "$LINENO" 5
+ as_fn_error $? "libz version greater or equal to 1.2.0.4 required" "$LINENO" 5
fi
@@ -26187,7 +26196,7 @@ $as_echo "$ZLIB_VERSION" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzgets in -lz" >&5
$as_echo_n "checking for gzgets in -lz... " >&6; }
-if test "${ac_cv_lib_z_gzgets+set}" = set; then :
+if ${ac_cv_lib_z_gzgets+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26221,7 +26230,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzgets" >&5
$as_echo "$ac_cv_lib_z_gzgets" >&6; }
-if test "x$ac_cv_lib_z_gzgets" = x""yes; then :
+if test "x$ac_cv_lib_z_gzgets" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -26237,7 +26246,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_z_gzgets
- as_fn_error "ZLIB extension requires gzgets in zlib" "$LINENO" 5
+ as_fn_error $? "ZLIB extension requires gzgets in zlib" "$LINENO" 5
fi
@@ -26770,7 +26779,7 @@ $as_echo "found in $i" >&6; }
if test -z "$BZIP_DIR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Please reinstall the BZip2 distribution" "$LINENO" 5
+ as_fn_error $? "Please reinstall the BZip2 distribution" "$LINENO" 5
fi
@@ -26872,7 +26881,7 @@ $as_echo "not found" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzerror in -lbz2" >&5
$as_echo_n "checking for BZ2_bzerror in -lbz2... " >&6; }
-if test "${ac_cv_lib_bz2_BZ2_bzerror+set}" = set; then :
+if ${ac_cv_lib_bz2_BZ2_bzerror+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26906,7 +26915,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzerror" >&5
$as_echo "$ac_cv_lib_bz2_BZ2_bzerror" >&6; }
-if test "x$ac_cv_lib_bz2_BZ2_bzerror" = x""yes; then :
+if test "x$ac_cv_lib_bz2_BZ2_bzerror" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -27050,7 +27059,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_bz2_BZ2_bzerror
- as_fn_error "bz2 module requires libbz2 >= 1.0.0" "$LINENO" 5
+ as_fn_error $? "bz2 module requires libbz2 >= 1.0.0" "$LINENO" 5
fi
@@ -28131,7 +28140,7 @@ $as_echo "found in $i" >&6; }
if test -z "$CURL_DIR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Please reinstall the libcurl distribution -
+ as_fn_error $? "Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/" "$LINENO" 5
fi
@@ -28154,7 +28163,7 @@ $as_echo_n "checking for cURL 7.10.5 or greater... " >&6; }
$as_echo "$curl_version_full" >&6; }
CURL_LIBS=`$CURL_CONFIG --libs`
else
- as_fn_error "cURL version 7.10.5 or later is required to compile php with cURL support" "$LINENO" 5
+ as_fn_error $? "cURL version 7.10.5 or later is required to compile php with cURL support" "$LINENO" 5
fi
@@ -28400,7 +28409,7 @@ if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -28430,7 +28439,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -28446,11 +28455,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -28489,7 +28498,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -28505,18 +28514,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -28559,7 +28568,7 @@ $as_echo "yes" >&6; }
for ac_header in openssl/crypto.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
+if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_OPENSSL_CRYPTO_H 1
_ACEOF
@@ -28616,7 +28625,7 @@ if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "gcrypt.h" "ac_cv_header_gcrypt_h" "$ac_includes_default"
-if test "x$ac_cv_header_gcrypt_h" = x""yes; then :
+if test "x$ac_cv_header_gcrypt_h" = xyes; then :
$as_echo "#define HAVE_CURL_GNUTLS 1" >>confdefs.h
@@ -28742,7 +28751,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_perform in -lcurl" >&5
$as_echo_n "checking for curl_easy_perform in -lcurl... " >&6; }
-if test "${ac_cv_lib_curl_curl_easy_perform+set}" = set; then :
+if ${ac_cv_lib_curl_curl_easy_perform+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -28776,7 +28785,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_perform" >&5
$as_echo "$ac_cv_lib_curl_curl_easy_perform" >&6; }
-if test "x$ac_cv_lib_curl_curl_easy_perform" = x""yes; then :
+if test "x$ac_cv_lib_curl_curl_easy_perform" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -28792,160 +28801,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_curl_curl_easy_perform
- as_fn_error "There is something wrong. Please check config.log for more information." "$LINENO" 5
-
-
-fi
-
-
-
- save_old_LDFLAGS=$LDFLAGS
- ac_stuff="
- $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
- "
-
- save_ext_shared=$ext_shared
- ext_shared=yes
-
- for ac_i in $ac_stuff; do
- case $ac_i in
- -pthread)
- if test "$ext_shared" = "yes"; then
- LDFLAGS="$LDFLAGS -pthread"
- else
-
-
- unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
-
- cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
- if test -n "$unique" && test "`eval $cmd`" = "" ; then
- eval "EXTRA_LDFLAGS$unique=set"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
- fi
-
- fi
- ;;
- -l*)
- ac_ii=`echo $ac_i|cut -c 3-`
-
-
- case $ac_ii in
- c|c_r|pthread*) ;;
- *)
- if test "$ext_shared" = "yes"; then
- LDFLAGS="$LDFLAGS -l$ac_ii"
- else
-
-
- case $ac_ii in
- c|c_r|pthread*) ;;
- *)
- LIBS="$LIBS -l$ac_ii"
- ;;
- esac
-
-
- fi
- ;;
- esac
-
-
- ;;
- -L*)
- ac_ii=`echo $ac_i|cut -c 3-`
-
- if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
-
- if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
- ai_p=$ac_ii
- else
-
- ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
-
- ep_realdir="`(cd \"$ep_dir\" && pwd)`"
- ai_p="$ep_realdir/`basename \"$ac_ii\"`"
- fi
-
-
- if test "$ext_shared" = "yes"; then
- LDFLAGS="-L$ai_p $LDFLAGS"
- test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
- else
-
-
-
- unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
-
- cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
- if test -n "$unique" && test "`eval $cmd`" = "" ; then
- eval "LIBPATH$unique=set"
-
- test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
- LDFLAGS="$LDFLAGS -L$ai_p"
- PHP_RPATHS="$PHP_RPATHS $ai_p"
-
- fi
-
-
- fi
-
- fi
-
- ;;
- esac
- done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version_info in -lcurl" >&5
-$as_echo_n "checking for curl_version_info in -lcurl... " >&6; }
-if test "${ac_cv_lib_curl_curl_version_info+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcurl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char curl_version_info ();
-int
-main ()
-{
-return curl_version_info ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_curl_curl_version_info=yes
-else
- ac_cv_lib_curl_curl_version_info=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version_info" >&5
-$as_echo "$ac_cv_lib_curl_curl_version_info" >&6; }
-if test "x$ac_cv_lib_curl_curl_version_info" = x""yes; then :
-
- LDFLAGS=$save_old_LDFLAGS
- ext_shared=$save_ext_shared
-
-
-$as_echo "#define HAVE_CURL_VERSION_INFO 1" >>confdefs.h
-
-
-
-else
-
- LDFLAGS=$save_old_LDFLAGS
- ext_shared=$save_ext_shared
- unset ac_cv_lib_curl_curl_version_info
+ as_fn_error $? "There is something wrong. Please check config.log for more information." "$LINENO" 5
fi
@@ -29050,7 +28906,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_strerror in -lcurl" >&5
$as_echo_n "checking for curl_easy_strerror in -lcurl... " >&6; }
-if test "${ac_cv_lib_curl_curl_easy_strerror+set}" = set; then :
+if ${ac_cv_lib_curl_curl_easy_strerror+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -29084,7 +28940,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_strerror" >&5
$as_echo "$ac_cv_lib_curl_curl_easy_strerror" >&6; }
-if test "x$ac_cv_lib_curl_curl_easy_strerror" = x""yes; then :
+if test "x$ac_cv_lib_curl_curl_easy_strerror" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -29203,7 +29059,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_multi_strerror in -lcurl" >&5
$as_echo_n "checking for curl_multi_strerror in -lcurl... " >&6; }
-if test "${ac_cv_lib_curl_curl_multi_strerror+set}" = set; then :
+if ${ac_cv_lib_curl_curl_multi_strerror+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -29237,7 +29093,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_multi_strerror" >&5
$as_echo "$ac_cv_lib_curl_curl_multi_strerror" >&6; }
-if test "x$ac_cv_lib_curl_curl_multi_strerror" = x""yes; then :
+if test "x$ac_cv_lib_curl_curl_multi_strerror" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -29291,7 +29147,7 @@ $as_echo "#define PHP_CURL_URL_WRAPPERS 1" >>confdefs.h
old_IFS=$IFS
- for ac_src in interface.c multi.c streams.c; do
+ for ac_src in interface.c multi.c share.c streams.c; do
IFS=.
set $ac_src
@@ -29340,7 +29196,7 @@ EOF
old_IFS=$IFS
- for ac_src in interface.c multi.c streams.c; do
+ for ac_src in interface.c multi.c share.c streams.c; do
IFS=.
set $ac_src
@@ -29470,7 +29326,7 @@ _ACEOF
old_IFS=$IFS
- for ac_src in interface.c multi.c streams.c; do
+ for ac_src in interface.c multi.c share.c streams.c; do
IFS=.
set $ac_src
@@ -29516,7 +29372,7 @@ EOF
old_IFS=$IFS
- for ac_src in interface.c multi.c streams.c; do
+ for ac_src in interface.c multi.c share.c streams.c; do
IFS=.
set $ac_src
@@ -29931,7 +29787,7 @@ if test "$PHP_QDBM" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_$LIB''_dpopen" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dpopen in -l$LIB" >&5
$as_echo_n "checking for dpopen in -l$LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -29966,8 +29822,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -30006,10 +29861,10 @@ fi
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -30123,7 +29978,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -30153,7 +30008,7 @@ if test "$PHP_GDBM" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n "You cannot combine --with-gdbm with --with-qdbm"; then
- as_fn_error "You cannot combine --with-gdbm with --with-qdbm" "$LINENO" 5
+ as_fn_error $? "You cannot combine --with-gdbm with --with-qdbm" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -30273,7 +30128,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
-if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then :
+if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30307,7 +30162,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
-if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then :
+if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -30342,10 +30197,10 @@ fi
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -30459,7 +30314,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -30590,7 +30445,7 @@ if test "$PHP_NDBM" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_$LIB''_dbm_open" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -l$LIB" >&5
$as_echo_n "checking for dbm_open in -l$LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30625,8 +30480,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -30665,10 +30519,10 @@ fi
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -30782,7 +30636,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -30939,7 +30793,7 @@ if test "$PHP_TCADB" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_$LIB''_tcadbopen" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcadbopen in -l$LIB" >&5
$as_echo_n "checking for tcadbopen in -l$LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -30974,8 +30828,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -31014,10 +30867,10 @@ fi
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -31131,7 +30984,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -31207,7 +31060,7 @@ if test "$PHP_DB4" != "no"; then
done
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
for LIB in db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do
if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
@@ -31270,7 +31123,7 @@ rm -f core conftest.err conftest.$ac_objext \
if test -z "$THIS_LIBS"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB4 major version" >&5
$as_echo_n "checking for DB4 major version... " >&6; }
- as_fn_error "Header contains different version" "$LINENO" 5
+ as_fn_error $? "Header contains different version" "$LINENO" 5
fi
if test "4" = "4"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB4 minor version and patch level" >&5
@@ -31292,7 +31145,7 @@ $as_echo "ok" >&6; }
else
- as_fn_error "Version 4.1 requires patch level 25" "$LINENO" 5
+ as_fn_error $? "Version 4.1 requires patch level 25" "$LINENO" 5
fi
rm -f conftest*
@@ -31318,7 +31171,7 @@ $as_echo "yes" >&6; }
else
- as_fn_error "At least version 3.3 is required" "$LINENO" 5
+ as_fn_error $? "At least version 3.3 is required" "$LINENO" 5
fi
rm -f conftest*
@@ -31336,7 +31189,7 @@ _ACEOF
fi
else
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
THIS_RESULT=yes
DB4_LIBS=$THIS_LIBS
@@ -31459,7 +31312,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -31489,7 +31342,7 @@ if test "$PHP_DB3" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n "You cannot combine --with-db3 with --with-db4"; then
- as_fn_error "You cannot combine --with-db3 with --with-db4" "$LINENO" 5
+ as_fn_error $? "You cannot combine --with-db3 with --with-db4" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -31528,7 +31381,7 @@ $as_echo "no" >&6; }
done
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
for LIB in db-3.3 db-3.2 db-3.1 db-3.0 db-3 db3 db; do
if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
@@ -31591,7 +31444,7 @@ rm -f core conftest.err conftest.$ac_objext \
if test -z "$THIS_LIBS"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB3 major version" >&5
$as_echo_n "checking for DB3 major version... " >&6; }
- as_fn_error "Header contains different version" "$LINENO" 5
+ as_fn_error $? "Header contains different version" "$LINENO" 5
fi
if test "3" = "4"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB4 minor version and patch level" >&5
@@ -31613,7 +31466,7 @@ $as_echo "ok" >&6; }
else
- as_fn_error "Version 4.1 requires patch level 25" "$LINENO" 5
+ as_fn_error $? "Version 4.1 requires patch level 25" "$LINENO" 5
fi
rm -f conftest*
@@ -31639,7 +31492,7 @@ $as_echo "yes" >&6; }
else
- as_fn_error "At least version 3.3 is required" "$LINENO" 5
+ as_fn_error $? "At least version 3.3 is required" "$LINENO" 5
fi
rm -f conftest*
@@ -31657,7 +31510,7 @@ _ACEOF
fi
else
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
THIS_RESULT=yes
DB3_LIBS=$THIS_LIBS
@@ -31780,7 +31633,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -31810,7 +31663,7 @@ if test "$PHP_DB2" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then
- as_fn_error "You cannot combine --with-db2 with --with-db3 or --with-db4" "$LINENO" 5
+ as_fn_error $? "You cannot combine --with-db2 with --with-db3 or --with-db4" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -31849,7 +31702,7 @@ $as_echo "no" >&6; }
done
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
for LIB in db-2 db2 db; do
if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
@@ -31912,7 +31765,7 @@ rm -f core conftest.err conftest.$ac_objext \
if test -z "$THIS_LIBS"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB2 major version" >&5
$as_echo_n "checking for DB2 major version... " >&6; }
- as_fn_error "Header contains different version" "$LINENO" 5
+ as_fn_error $? "Header contains different version" "$LINENO" 5
fi
if test "2" = "4"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB4 minor version and patch level" >&5
@@ -31934,7 +31787,7 @@ $as_echo "ok" >&6; }
else
- as_fn_error "Version 4.1 requires patch level 25" "$LINENO" 5
+ as_fn_error $? "Version 4.1 requires patch level 25" "$LINENO" 5
fi
rm -f conftest*
@@ -31960,7 +31813,7 @@ $as_echo "yes" >&6; }
else
- as_fn_error "At least version 3.3 is required" "$LINENO" 5
+ as_fn_error $? "At least version 3.3 is required" "$LINENO" 5
fi
rm -f conftest*
@@ -31978,7 +31831,7 @@ _ACEOF
fi
else
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
THIS_RESULT=yes
DB2_LIBS=$THIS_LIBS
@@ -32101,7 +31954,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -32229,10 +32082,10 @@ rm -f core conftest.err conftest.$ac_objext \
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -32346,7 +32199,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -32376,7 +32229,7 @@ if test "$PHP_DBM" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n "You cannot combine --with-dbm with --with-qdbm"; then
- as_fn_error "You cannot combine --with-dbm with --with-qdbm" "$LINENO" 5
+ as_fn_error $? "You cannot combine --with-dbm with --with-qdbm" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -32502,7 +32355,7 @@ $as_echo "no" >&6; }
as_ac_Lib=`$as_echo "ac_cv_lib_$LIB''_dbminit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbminit in -l$LIB" >&5
$as_echo_n "checking for dbminit in -l$LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32537,8 +32390,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -32596,10 +32448,10 @@ fi
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -32713,7 +32565,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -32922,7 +32774,7 @@ elif test "$PHP_CDB" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_$LIB''_cdb_read" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdb_read in -l$LIB" >&5
$as_echo_n "checking for cdb_read in -l$LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -32957,8 +32809,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -32997,10 +32848,10 @@ fi
THIS_RESULT=yes
if test -z "$THIS_INCLUDE"; then
- as_fn_error "DBA: Could not find necessary header file(s)." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary header file(s)." "$LINENO" 5
fi
if test -z "$THIS_LIBS"; then
- as_fn_error "DBA: Could not find necessary library." "$LINENO" 5
+ as_fn_error $? "DBA: Could not find necessary library." "$LINENO" 5
fi
@@ -33114,7 +32965,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -33146,7 +32997,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -33178,7 +33029,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $THIS_FULL_NAME support" >&5
$as_echo_n "checking for $THIS_FULL_NAME support... " >&6; }
if test -n ""; then
- as_fn_error "" "$LINENO" 5
+ as_fn_error $? "" "$LINENO" 5
fi
if test "$THIS_RESULT" = "yes" || test "$THIS_RESULT" = "builtin"; then
HAVE_DBA=1
@@ -33595,13 +33446,13 @@ fi
if test "$PHP_DOM" != "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "DOM extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "DOM extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33759,7 +33610,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33797,7 +33648,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -34174,7 +34025,7 @@ EOF
is_it_shared=$PHP_LIBXML_SHARED
is_it_enabled=$PHP_LIBXML
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension dom to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build dom shared or build libxml statically for the
@@ -34182,7 +34033,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension dom, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
@@ -34190,10 +34041,10 @@ but you've either not enabled libxml, or have disabled it.
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
fi
@@ -34555,7 +34406,7 @@ EOF
done
if test -z "$ENCHANT_DIR"; then
- as_fn_error "Cannot find enchant" "$LINENO" 5
+ as_fn_error $? "Cannot find enchant" "$LINENO" 5
fi
ENCHANT_LIBDIR=$ENCHANT_DIR/lib
@@ -34791,7 +34642,7 @@ $as_echo "#define HAVE_ENCHANT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enchant_broker_set_param in -lenchant" >&5
$as_echo_n "checking for enchant_broker_set_param in -lenchant... " >&6; }
-if test "${ac_cv_lib_enchant_enchant_broker_set_param+set}" = set; then :
+if ${ac_cv_lib_enchant_enchant_broker_set_param+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -34825,7 +34676,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_enchant_enchant_broker_set_param" >&5
$as_echo "$ac_cv_lib_enchant_enchant_broker_set_param" >&6; }
-if test "x$ac_cv_lib_enchant_enchant_broker_set_param" = x""yes; then :
+if test "x$ac_cv_lib_enchant_enchant_broker_set_param" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -35551,8 +35402,7 @@ EOF
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -36009,7 +35859,7 @@ EOF
is_it_shared=$PHP_PCRE_SHARED
is_it_enabled=$PHP_PCRE
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension filter to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build filter shared or build pcre statically for the
@@ -36017,7 +35867,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension filter, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
@@ -36414,7 +36264,7 @@ EOF
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
@@ -36460,7 +36310,7 @@ fi
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
else
- as_fn_error "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
fi
if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
@@ -36613,11 +36463,11 @@ fi
done
if test -z "$OPENSSL_INCDIR"; then
- as_fn_error "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
+ as_fn_error $? "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
fi
if test -z "$OPENSSL_LIBDIR"; then
- as_fn_error "Cannot find OpenSSL's libraries" "$LINENO" 5
+ as_fn_error $? "Cannot find OpenSSL's libraries" "$LINENO" 5
fi
old_CPPFLAGS=$CPPFLAGS
@@ -36641,7 +36491,7 @@ $as_echo ">= 0.9.6" >&6; }
else
- as_fn_error "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
fi
rm -f conftest*
@@ -36779,7 +36629,7 @@ rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5
$as_echo_n "checking for CRYPTO_free in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_free+set}" = set; then :
+if ${ac_cv_lib_crypto_CRYPTO_free+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -36813,7 +36663,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_free" >&5
$as_echo "$ac_cv_lib_crypto_CRYPTO_free" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_free" = x""yes; then :
+if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -36849,7 +36699,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_crypto_CRYPTO_free
- as_fn_error "libcrypto not found!" "$LINENO" 5
+ as_fn_error $? "libcrypto not found!" "$LINENO" 5
fi
@@ -36956,7 +36806,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ssl_version in -lssl" >&5
$as_echo_n "checking for SSL_CTX_set_ssl_version in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+set}" = set; then :
+if ${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -36990,7 +36840,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&5
$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = x""yes; then :
+if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -37004,7 +36854,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version
- as_fn_error "libssl not found!" "$LINENO" 5
+ as_fn_error $? "libssl not found!" "$LINENO" 5
fi
@@ -37416,8 +37266,7 @@ if test "$PHP_GD" = "yes"; then
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -37437,7 +37286,7 @@ done
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
else
- as_fn_error "Can't find zlib headers under \"$PHP_ZLIB_DIR\"" "$LINENO" 5
+ as_fn_error $? "Can't find zlib headers under \"$PHP_ZLIB_DIR\"" "$LINENO" 5
fi
else
for i in /usr/local /usr; do
@@ -37471,7 +37320,7 @@ $as_echo "#define USE_GD_IMGSTRTTF 1" >>confdefs.h
done
if test -z "$GD_JPEG_DIR"; then
- as_fn_error "jpeglib.h not found." "$LINENO" 5
+ as_fn_error $? "jpeglib.h not found." "$LINENO" 5
fi
@@ -37573,7 +37422,7 @@ $as_echo "#define USE_GD_IMGSTRTTF 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then :
+if ${ac_cv_lib_jpeg_jpeg_read_header+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -37607,7 +37456,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_read_header" = x""yes; then :
+if test "x$ac_cv_lib_jpeg_jpeg_read_header" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -37748,7 +37597,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_jpeg_jpeg_read_header
- as_fn_error "Problem with libjpeg.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libjpeg.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -37766,7 +37615,7 @@ $as_echo "If configure fails try --with-jpeg-dir=<DIR>" >&6; }
done
if test -z "$GD_VPX_DIR"; then
- as_fn_error "vpx_codec.h not found." "$LINENO" 5
+ as_fn_error $? "vpx_codec.h not found." "$LINENO" 5
fi
@@ -37868,7 +37717,7 @@ $as_echo "If configure fails try --with-jpeg-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpx_codec_destroy in -lvpx" >&5
$as_echo_n "checking for vpx_codec_destroy in -lvpx... " >&6; }
-if test "${ac_cv_lib_vpx_vpx_codec_destroy+set}" = set; then :
+if ${ac_cv_lib_vpx_vpx_codec_destroy+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -37902,7 +37751,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vpx_vpx_codec_destroy" >&5
$as_echo "$ac_cv_lib_vpx_vpx_codec_destroy" >&6; }
-if test "x$ac_cv_lib_vpx_vpx_codec_destroy" = x""yes; then :
+if test "x$ac_cv_lib_vpx_vpx_codec_destroy" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -38053,7 +37902,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_vpx_vpx_codec_destroy
- as_fn_error "Problem with libvpx.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libvpx.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -38071,11 +37920,11 @@ $as_echo "If configure fails try --with-vpx-dir=<DIR>" >&6; }
done
if test -z "$GD_PNG_DIR"; then
- as_fn_error "png.h not found." "$LINENO" 5
+ as_fn_error $? "png.h not found." "$LINENO" 5
fi
if test "$PHP_ZLIB_DIR" = "no"; then
- as_fn_error "PNG support requires ZLIB. Use --with-zlib-dir=<DIR>" "$LINENO" 5
+ as_fn_error $? "PNG support requires ZLIB. Use --with-zlib-dir=<DIR>" "$LINENO" 5
fi
@@ -38177,7 +38026,7 @@ $as_echo "If configure fails try --with-vpx-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_write_image in -lpng" >&5
$as_echo_n "checking for png_write_image in -lpng... " >&6; }
-if test "${ac_cv_lib_png_png_write_image+set}" = set; then :
+if ${ac_cv_lib_png_png_write_image+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -38211,7 +38060,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_write_image" >&5
$as_echo "$ac_cv_lib_png_png_write_image" >&6; }
-if test "x$ac_cv_lib_png_png_write_image" = x""yes; then :
+if test "x$ac_cv_lib_png_png_write_image" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -38449,7 +38298,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_png_png_write_image
- as_fn_error "Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -38468,7 +38317,7 @@ $as_echo "If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR>"
done
if test -z "$GD_XPM_DIR"; then
- as_fn_error "libXpm.(a|so) not found." "$LINENO" 5
+ as_fn_error $? "libXpm.(a|so) not found." "$LINENO" 5
fi
for i in include include/X11; do
@@ -38476,7 +38325,7 @@ $as_echo "If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR>"
done
if test -z "$GD_XPM_INC"; then
- as_fn_error "xpm.h not found." "$LINENO" 5
+ as_fn_error $? "xpm.h not found." "$LINENO" 5
fi
@@ -38578,7 +38427,7 @@ $as_echo "If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR>"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmFreeXpmImage in -lXpm" >&5
$as_echo_n "checking for XpmFreeXpmImage in -lXpm... " >&6; }
-if test "${ac_cv_lib_Xpm_XpmFreeXpmImage+set}" = set; then :
+if ${ac_cv_lib_Xpm_XpmFreeXpmImage+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -38612,7 +38461,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmFreeXpmImage" >&5
$as_echo "$ac_cv_lib_Xpm_XpmFreeXpmImage" >&6; }
-if test "x$ac_cv_lib_Xpm_XpmFreeXpmImage" = x""yes; then :
+if test "x$ac_cv_lib_Xpm_XpmFreeXpmImage" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -38850,7 +38699,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_Xpm_XpmFreeXpmImage
- as_fn_error "Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -38872,7 +38721,7 @@ $as_echo "If configure fails try --with-xpm-dir=<DIR>" >&6; }
done
if test -z "$FREETYPE2_DIR"; then
- as_fn_error "freetype.h not found." "$LINENO" 5
+ as_fn_error $? "freetype.h not found." "$LINENO" 5
fi
@@ -38974,7 +38823,7 @@ $as_echo "If configure fails try --with-xpm-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_New_Face in -lfreetype" >&5
$as_echo_n "checking for FT_New_Face in -lfreetype... " >&6; }
-if test "${ac_cv_lib_freetype_FT_New_Face+set}" = set; then :
+if ${ac_cv_lib_freetype_FT_New_Face+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -39008,7 +38857,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_New_Face" >&5
$as_echo "$ac_cv_lib_freetype_FT_New_Face" >&6; }
-if test "x$ac_cv_lib_freetype_FT_New_Face" = x""yes; then :
+if test "x$ac_cv_lib_freetype_FT_New_Face" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -39189,7 +39038,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_freetype_FT_New_Face
- as_fn_error "Problem with freetype.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with freetype.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -39207,7 +39056,7 @@ $as_echo "If configure fails try --with-freetype-dir=<DIR>" >&6; }
done
if test -z "$GD_T1_DIR"; then
- as_fn_error "Your t1lib distribution is not installed correctly. Please reinstall it." "$LINENO" 5
+ as_fn_error $? "Your t1lib distribution is not installed correctly. Please reinstall it." "$LINENO" 5
fi
@@ -39309,7 +39158,7 @@ $as_echo "If configure fails try --with-freetype-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for T1_StrError in -lt1" >&5
$as_echo_n "checking for T1_StrError in -lt1... " >&6; }
-if test "${ac_cv_lib_t1_T1_StrError+set}" = set; then :
+if ${ac_cv_lib_t1_T1_StrError+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -39343,7 +39192,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_t1_T1_StrError" >&5
$as_echo "$ac_cv_lib_t1_T1_StrError" >&6; }
-if test "x$ac_cv_lib_t1_T1_StrError" = x""yes; then :
+if test "x$ac_cv_lib_t1_T1_StrError" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -39487,7 +39336,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_t1_T1_StrError
- as_fn_error "Problem with libt1.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libt1.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -39619,7 +39468,7 @@ else
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
else
- as_fn_error "Can't find zlib headers under \"$PHP_ZLIB_DIR\"" "$LINENO" 5
+ as_fn_error $? "Can't find zlib headers under \"$PHP_ZLIB_DIR\"" "$LINENO" 5
fi
else
for i in /usr/local /usr; do
@@ -39648,7 +39497,7 @@ $as_echo "#define USE_GD_IMGSTRTTF 1" >>confdefs.h
done
if test -z "$GD_VPX_DIR"; then
- as_fn_error "vpx_codec.h not found." "$LINENO" 5
+ as_fn_error $? "vpx_codec.h not found." "$LINENO" 5
fi
@@ -39750,7 +39599,7 @@ $as_echo "#define USE_GD_IMGSTRTTF 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpx_codec_destroy in -lvpx" >&5
$as_echo_n "checking for vpx_codec_destroy in -lvpx... " >&6; }
-if test "${ac_cv_lib_vpx_vpx_codec_destroy+set}" = set; then :
+if ${ac_cv_lib_vpx_vpx_codec_destroy+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -39784,7 +39633,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vpx_vpx_codec_destroy" >&5
$as_echo "$ac_cv_lib_vpx_vpx_codec_destroy" >&6; }
-if test "x$ac_cv_lib_vpx_vpx_codec_destroy" = x""yes; then :
+if test "x$ac_cv_lib_vpx_vpx_codec_destroy" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -39935,7 +39784,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_vpx_vpx_codec_destroy
- as_fn_error "Problem with libvpx.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libvpx.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -39953,7 +39802,7 @@ $as_echo "If configure fails try --with-vpx-dir=<DIR>" >&6; }
done
if test -z "$GD_JPEG_DIR"; then
- as_fn_error "jpeglib.h not found." "$LINENO" 5
+ as_fn_error $? "jpeglib.h not found." "$LINENO" 5
fi
@@ -40055,7 +39904,7 @@ $as_echo "If configure fails try --with-vpx-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then :
+if ${ac_cv_lib_jpeg_jpeg_read_header+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -40089,7 +39938,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_read_header" = x""yes; then :
+if test "x$ac_cv_lib_jpeg_jpeg_read_header" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -40230,7 +40079,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_jpeg_jpeg_read_header
- as_fn_error "Problem with libjpeg.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libjpeg.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -40248,11 +40097,11 @@ $as_echo "If configure fails try --with-jpeg-dir=<DIR>" >&6; }
done
if test -z "$GD_PNG_DIR"; then
- as_fn_error "png.h not found." "$LINENO" 5
+ as_fn_error $? "png.h not found." "$LINENO" 5
fi
if test "$PHP_ZLIB_DIR" = "no"; then
- as_fn_error "PNG support requires ZLIB. Use --with-zlib-dir=<DIR>" "$LINENO" 5
+ as_fn_error $? "PNG support requires ZLIB. Use --with-zlib-dir=<DIR>" "$LINENO" 5
fi
@@ -40354,7 +40203,7 @@ $as_echo "If configure fails try --with-jpeg-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_write_image in -lpng" >&5
$as_echo_n "checking for png_write_image in -lpng... " >&6; }
-if test "${ac_cv_lib_png_png_write_image+set}" = set; then :
+if ${ac_cv_lib_png_png_write_image+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -40388,7 +40237,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_write_image" >&5
$as_echo "$ac_cv_lib_png_png_write_image" >&6; }
-if test "x$ac_cv_lib_png_png_write_image" = x""yes; then :
+if test "x$ac_cv_lib_png_png_write_image" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -40626,7 +40475,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_png_png_write_image
- as_fn_error "Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -40645,7 +40494,7 @@ $as_echo "If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR>"
done
if test -z "$GD_XPM_DIR"; then
- as_fn_error "libXpm.(a|so) not found." "$LINENO" 5
+ as_fn_error $? "libXpm.(a|so) not found." "$LINENO" 5
fi
for i in include include/X11; do
@@ -40653,7 +40502,7 @@ $as_echo "If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR>"
done
if test -z "$GD_XPM_INC"; then
- as_fn_error "xpm.h not found." "$LINENO" 5
+ as_fn_error $? "xpm.h not found." "$LINENO" 5
fi
@@ -40755,7 +40604,7 @@ $as_echo "If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR>"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmFreeXpmImage in -lXpm" >&5
$as_echo_n "checking for XpmFreeXpmImage in -lXpm... " >&6; }
-if test "${ac_cv_lib_Xpm_XpmFreeXpmImage+set}" = set; then :
+if ${ac_cv_lib_Xpm_XpmFreeXpmImage+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -40789,7 +40638,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmFreeXpmImage" >&5
$as_echo "$ac_cv_lib_Xpm_XpmFreeXpmImage" >&6; }
-if test "x$ac_cv_lib_Xpm_XpmFreeXpmImage" = x""yes; then :
+if test "x$ac_cv_lib_Xpm_XpmFreeXpmImage" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -41027,7 +40876,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_Xpm_XpmFreeXpmImage
- as_fn_error "Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -41049,7 +40898,7 @@ $as_echo "If configure fails try --with-xpm-dir=<DIR>" >&6; }
done
if test -z "$FREETYPE2_DIR"; then
- as_fn_error "freetype.h not found." "$LINENO" 5
+ as_fn_error $? "freetype.h not found." "$LINENO" 5
fi
@@ -41151,7 +41000,7 @@ $as_echo "If configure fails try --with-xpm-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_New_Face in -lfreetype" >&5
$as_echo_n "checking for FT_New_Face in -lfreetype... " >&6; }
-if test "${ac_cv_lib_freetype_FT_New_Face+set}" = set; then :
+if ${ac_cv_lib_freetype_FT_New_Face+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -41185,7 +41034,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_New_Face" >&5
$as_echo "$ac_cv_lib_freetype_FT_New_Face" >&6; }
-if test "x$ac_cv_lib_freetype_FT_New_Face" = x""yes; then :
+if test "x$ac_cv_lib_freetype_FT_New_Face" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -41366,7 +41215,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_freetype_FT_New_Face
- as_fn_error "Problem with freetype.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with freetype.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -41384,7 +41233,7 @@ $as_echo "If configure fails try --with-freetype-dir=<DIR>" >&6; }
done
if test -z "$GD_T1_DIR"; then
- as_fn_error "Your t1lib distribution is not installed correctly. Please reinstall it." "$LINENO" 5
+ as_fn_error $? "Your t1lib distribution is not installed correctly. Please reinstall it." "$LINENO" 5
fi
@@ -41486,7 +41335,7 @@ $as_echo "If configure fails try --with-freetype-dir=<DIR>" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for T1_StrError in -lt1" >&5
$as_echo_n "checking for T1_StrError in -lt1... " >&6; }
-if test "${ac_cv_lib_t1_T1_StrError+set}" = set; then :
+if ${ac_cv_lib_t1_T1_StrError+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -41520,7 +41369,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_t1_T1_StrError" >&5
$as_echo "$ac_cv_lib_t1_T1_StrError" >&6; }
-if test "x$ac_cv_lib_t1_T1_StrError" = x""yes; then :
+if test "x$ac_cv_lib_t1_T1_StrError" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -41664,7 +41513,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_t1_T1_StrError
- as_fn_error "Problem with libt1.(a|so). Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libt1.(a|so). Please check config.log for more information." "$LINENO" 5
fi
@@ -41879,7 +41728,7 @@ $as_echo "#define HAVE_LIBGD 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageString16 in -lgd" >&5
$as_echo_n "checking for gdImageString16 in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageString16+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageString16+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -41913,7 +41762,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageString16" >&5
$as_echo "$ac_cv_lib_gd_gdImageString16" >&6; }
-if test "x$ac_cv_lib_gd_gdImageString16" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageString16" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42027,7 +41876,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImagePaletteCopy in -lgd" >&5
$as_echo_n "checking for gdImagePaletteCopy in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImagePaletteCopy+set}" = set; then :
+if ${ac_cv_lib_gd_gdImagePaletteCopy+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42061,7 +41910,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImagePaletteCopy" >&5
$as_echo "$ac_cv_lib_gd_gdImagePaletteCopy" >&6; }
-if test "x$ac_cv_lib_gd_gdImagePaletteCopy" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImagePaletteCopy" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42175,7 +42024,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateFromPng in -lgd" >&5
$as_echo_n "checking for gdImageCreateFromPng in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreateFromPng+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreateFromPng+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42209,7 +42058,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateFromPng" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreateFromPng" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreateFromPng" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreateFromPng" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42323,7 +42172,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateFromGif in -lgd" >&5
$as_echo_n "checking for gdImageCreateFromGif in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreateFromGif+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreateFromGif+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42357,7 +42206,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateFromGif" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreateFromGif" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreateFromGif" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreateFromGif" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42471,7 +42320,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGif in -lgd" >&5
$as_echo_n "checking for gdImageGif in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageGif+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageGif+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42505,7 +42354,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGif" >&5
$as_echo "$ac_cv_lib_gd_gdImageGif" >&6; }
-if test "x$ac_cv_lib_gd_gdImageGif" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageGif" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42619,7 +42468,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageWBMP in -lgd" >&5
$as_echo_n "checking for gdImageWBMP in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageWBMP+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageWBMP+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42653,7 +42502,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageWBMP" >&5
$as_echo "$ac_cv_lib_gd_gdImageWBMP" >&6; }
-if test "x$ac_cv_lib_gd_gdImageWBMP" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageWBMP" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42767,7 +42616,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateFromJpeg in -lgd" >&5
$as_echo_n "checking for gdImageCreateFromJpeg in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreateFromJpeg+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreateFromJpeg+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42801,7 +42650,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateFromJpeg" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreateFromJpeg" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreateFromJpeg" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreateFromJpeg" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -42915,7 +42764,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateFromXpm in -lgd" >&5
$as_echo_n "checking for gdImageCreateFromXpm in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreateFromXpm+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreateFromXpm+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -42949,7 +42798,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateFromXpm" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreateFromXpm" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreateFromXpm" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreateFromXpm" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43063,7 +42912,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateFromGd2 in -lgd" >&5
$as_echo_n "checking for gdImageCreateFromGd2 in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreateFromGd2+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreateFromGd2+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43097,7 +42946,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateFromGd2" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreateFromGd2" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreateFromGd2" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreateFromGd2" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43211,7 +43060,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreateTrueColor in -lgd" >&5
$as_echo_n "checking for gdImageCreateTrueColor in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreateTrueColor+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreateTrueColor+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43245,7 +43094,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreateTrueColor" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreateTrueColor" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreateTrueColor" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreateTrueColor" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43359,7 +43208,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageSetTile in -lgd" >&5
$as_echo_n "checking for gdImageSetTile in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageSetTile+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageSetTile+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43393,7 +43242,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageSetTile" >&5
$as_echo "$ac_cv_lib_gd_gdImageSetTile" >&6; }
-if test "x$ac_cv_lib_gd_gdImageSetTile" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageSetTile" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43507,7 +43356,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageEllipse in -lgd" >&5
$as_echo_n "checking for gdImageEllipse in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageEllipse+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageEllipse+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43541,7 +43390,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageEllipse" >&5
$as_echo "$ac_cv_lib_gd_gdImageEllipse" >&6; }
-if test "x$ac_cv_lib_gd_gdImageEllipse" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageEllipse" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43655,7 +43504,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageSetBrush in -lgd" >&5
$as_echo_n "checking for gdImageSetBrush in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageSetBrush+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageSetBrush+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43689,7 +43538,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageSetBrush" >&5
$as_echo "$ac_cv_lib_gd_gdImageSetBrush" >&6; }
-if test "x$ac_cv_lib_gd_gdImageSetBrush" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageSetBrush" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43803,7 +43652,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringTTF in -lgd" >&5
$as_echo_n "checking for gdImageStringTTF in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageStringTTF+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageStringTTF+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43837,7 +43686,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageStringTTF" >&5
$as_echo "$ac_cv_lib_gd_gdImageStringTTF" >&6; }
-if test "x$ac_cv_lib_gd_gdImageStringTTF" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageStringTTF" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -43951,7 +43800,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringFT in -lgd" >&5
$as_echo_n "checking for gdImageStringFT in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageStringFT+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageStringFT+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -43985,7 +43834,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageStringFT" >&5
$as_echo "$ac_cv_lib_gd_gdImageStringFT" >&6; }
-if test "x$ac_cv_lib_gd_gdImageStringFT" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageStringFT" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44099,7 +43948,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringFTEx in -lgd" >&5
$as_echo_n "checking for gdImageStringFTEx in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageStringFTEx+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageStringFTEx+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -44133,7 +43982,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageStringFTEx" >&5
$as_echo "$ac_cv_lib_gd_gdImageStringFTEx" >&6; }
-if test "x$ac_cv_lib_gd_gdImageStringFTEx" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageStringFTEx" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44247,7 +44096,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageColorClosestHWB in -lgd" >&5
$as_echo_n "checking for gdImageColorClosestHWB in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageColorClosestHWB+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageColorClosestHWB+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -44281,7 +44130,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageColorClosestHWB" >&5
$as_echo "$ac_cv_lib_gd_gdImageColorClosestHWB" >&6; }
-if test "x$ac_cv_lib_gd_gdImageColorClosestHWB" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageColorClosestHWB" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44395,7 +44244,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageColorResolve in -lgd" >&5
$as_echo_n "checking for gdImageColorResolve in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageColorResolve+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageColorResolve+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -44429,7 +44278,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageColorResolve" >&5
$as_echo "$ac_cv_lib_gd_gdImageColorResolve" >&6; }
-if test "x$ac_cv_lib_gd_gdImageColorResolve" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageColorResolve" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44543,7 +44392,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGifCtx in -lgd" >&5
$as_echo_n "checking for gdImageGifCtx in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageGifCtx+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageGifCtx+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -44577,7 +44426,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGifCtx" >&5
$as_echo "$ac_cv_lib_gd_gdImageGifCtx" >&6; }
-if test "x$ac_cv_lib_gd_gdImageGifCtx" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageGifCtx" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44691,7 +44540,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdCacheCreate in -lgd" >&5
$as_echo_n "checking for gdCacheCreate in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdCacheCreate+set}" = set; then :
+if ${ac_cv_lib_gd_gdCacheCreate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -44725,7 +44574,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdCacheCreate" >&5
$as_echo "$ac_cv_lib_gd_gdCacheCreate" >&6; }
-if test "x$ac_cv_lib_gd_gdCacheCreate" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdCacheCreate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44839,7 +44688,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdFontCacheShutdown in -lgd" >&5
$as_echo_n "checking for gdFontCacheShutdown in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdFontCacheShutdown+set}" = set; then :
+if ${ac_cv_lib_gd_gdFontCacheShutdown+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -44873,7 +44722,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdFontCacheShutdown" >&5
$as_echo "$ac_cv_lib_gd_gdFontCacheShutdown" >&6; }
-if test "x$ac_cv_lib_gd_gdFontCacheShutdown" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdFontCacheShutdown" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -44987,7 +44836,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdFreeFontCache in -lgd" >&5
$as_echo_n "checking for gdFreeFontCache in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdFreeFontCache+set}" = set; then :
+if ${ac_cv_lib_gd_gdFreeFontCache+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -45021,7 +44870,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdFreeFontCache" >&5
$as_echo "$ac_cv_lib_gd_gdFreeFontCache" >&6; }
-if test "x$ac_cv_lib_gd_gdFreeFontCache" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdFreeFontCache" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -45135,7 +44984,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdFontCacheMutexSetup in -lgd" >&5
$as_echo_n "checking for gdFontCacheMutexSetup in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdFontCacheMutexSetup+set}" = set; then :
+if ${ac_cv_lib_gd_gdFontCacheMutexSetup+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -45169,7 +45018,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdFontCacheMutexSetup" >&5
$as_echo "$ac_cv_lib_gd_gdFontCacheMutexSetup" >&6; }
-if test "x$ac_cv_lib_gd_gdFontCacheMutexSetup" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdFontCacheMutexSetup" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -45283,7 +45132,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdNewDynamicCtxEx in -lgd" >&5
$as_echo_n "checking for gdNewDynamicCtxEx in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdNewDynamicCtxEx+set}" = set; then :
+if ${ac_cv_lib_gd_gdNewDynamicCtxEx+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -45317,7 +45166,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdNewDynamicCtxEx" >&5
$as_echo "$ac_cv_lib_gd_gdNewDynamicCtxEx" >&6; }
-if test "x$ac_cv_lib_gd_gdNewDynamicCtxEx" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdNewDynamicCtxEx" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -45336,9 +45185,9 @@ fi
elif test -z "$GD_INCLUDE"; then
- as_fn_error "Unable to find gd.h anywhere under $PHP_GD" "$LINENO" 5
+ as_fn_error $? "Unable to find gd.h anywhere under $PHP_GD" "$LINENO" 5
else
- as_fn_error "Unable to find libgd.(a|so) anywhere under $PHP_GD" "$LINENO" 5
+ as_fn_error $? "Unable to find libgd.(a|so) anywhere under $PHP_GD" "$LINENO" 5
fi
@@ -45719,7 +45568,7 @@ else
LIBS=$old_LIBS
- as_fn_error "GD build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "GD build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -45859,7 +45708,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreate in -lgd" >&5
$as_echo_n "checking for gdImageCreate in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_gdImageCreate+set}" = set; then :
+if ${ac_cv_lib_gd_gdImageCreate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -45893,7 +45742,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreate" >&5
$as_echo "$ac_cv_lib_gd_gdImageCreate" >&6; }
-if test "x$ac_cv_lib_gd_gdImageCreate" = x""yes; then :
+if test "x$ac_cv_lib_gd_gdImageCreate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -45905,7 +45754,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_gd_gdImageCreate
- as_fn_error "GD build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "GD build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -45990,7 +45839,7 @@ if test "$PHP_GETTEXT" != "no"; then
done
if test -z "$GETTEXT_DIR"; then
- as_fn_error "Cannot locate header file libintl.h" "$LINENO" 5
+ as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5
fi
GETTEXT_LIBDIR=$GETTEXT_DIR/$PHP_LIBDIR
@@ -46000,7 +45849,7 @@ if test "$PHP_GETTEXT" != "no"; then
LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then :
+if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46034,7 +45883,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
-if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then :
+if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
GETTEXT_LIBS=intl
GETTEXT_CHECK_IN_LIB=intl
@@ -46042,7 +45891,7 @@ if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lc" >&5
$as_echo_n "checking for bindtextdomain in -lc... " >&6; }
-if test "${ac_cv_lib_c_bindtextdomain+set}" = set; then :
+if ${ac_cv_lib_c_bindtextdomain+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46076,14 +45925,14 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_bindtextdomain" >&5
$as_echo "$ac_cv_lib_c_bindtextdomain" >&6; }
-if test "x$ac_cv_lib_c_bindtextdomain" = x""yes; then :
+if test "x$ac_cv_lib_c_bindtextdomain" = xyes; then :
GETTEXT_LIBS=
GETTEXT_CHECK_IN_LIB=c
else
- as_fn_error "Unable to find required gettext library" "$LINENO" 5
+ as_fn_error $? "Unable to find required gettext library" "$LINENO" 5
fi
@@ -46527,7 +46376,7 @@ EOF
as_ac_Lib=`$as_echo "ac_cv_lib_$GETTEXT_CHECK_IN_LIB''_ngettext" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
$as_echo_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46562,8 +46411,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_NGETTEXT 1" >>confdefs.h
@@ -46572,7 +46420,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$GETTEXT_CHECK_IN_LIB''_dngettext" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
$as_echo_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46607,8 +46455,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_DNGETTEXT 1" >>confdefs.h
@@ -46617,7 +46464,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$GETTEXT_CHECK_IN_LIB''_dcngettext" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
$as_echo_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46652,8 +46499,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_DCNGETTEXT 1" >>confdefs.h
@@ -46662,7 +46508,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$GETTEXT_CHECK_IN_LIB''_bind_textdomain_codeset" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
$as_echo_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46697,8 +46543,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
@@ -46760,7 +46605,7 @@ if test "$PHP_GMP" != "no"; then
done
if test -z "$GMP_DIR"; then
- as_fn_error "Unable to locate gmp.h" "$LINENO" 5
+ as_fn_error $? "Unable to locate gmp.h" "$LINENO" 5
fi
@@ -46862,7 +46707,7 @@ if test "$PHP_GMP" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
$as_echo_n "checking for __gmp_randinit_lc_2exp_size in -lgmp... " >&6; }
-if test "${ac_cv_lib_gmp___gmp_randinit_lc_2exp_size+set}" = set; then :
+if ${ac_cv_lib_gmp___gmp_randinit_lc_2exp_size+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -46896,7 +46741,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmp_randinit_lc_2exp_size" >&5
$as_echo "$ac_cv_lib_gmp___gmp_randinit_lc_2exp_size" >&6; }
-if test "x$ac_cv_lib_gmp___gmp_randinit_lc_2exp_size" = x""yes; then :
+if test "x$ac_cv_lib_gmp___gmp_randinit_lc_2exp_size" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -47007,7 +46852,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
$as_echo_n "checking for gmp_randinit_lc_2exp_size in -lgmp... " >&6; }
-if test "${ac_cv_lib_gmp_gmp_randinit_lc_2exp_size+set}" = set; then :
+if ${ac_cv_lib_gmp_gmp_randinit_lc_2exp_size+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -47041,7 +46886,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_gmp_randinit_lc_2exp_size" >&5
$as_echo "$ac_cv_lib_gmp_gmp_randinit_lc_2exp_size" >&6; }
-if test "x$ac_cv_lib_gmp_gmp_randinit_lc_2exp_size" = x""yes; then :
+if test "x$ac_cv_lib_gmp_gmp_randinit_lc_2exp_size" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -47053,7 +46898,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_gmp_gmp_randinit_lc_2exp_size
- as_fn_error "GNU MP Library version 4.1.2 or greater required." "$LINENO" 5
+ as_fn_error $? "GNU MP Library version 4.1.2 or greater required." "$LINENO" 5
fi
@@ -47600,7 +47445,7 @@ $as_echo "#define HAVE_HASH_EXT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian_php+set}" = set; then :
+if ${ac_cv_c_bigendian_php+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -47650,7 +47495,7 @@ $as_echo "#define WORDS_BIGENDIAN /**/" >>confdefs.h
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
$as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then :
+if ${ac_cv_sizeof_short+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
@@ -47659,9 +47504,8 @@ else
if test "$ac_cv_type_short" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (short)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_short=0
fi
@@ -47684,7 +47528,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
@@ -47693,9 +47537,8 @@ else
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int=0
fi
@@ -47718,7 +47561,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
@@ -47727,9 +47570,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long=0
fi
@@ -47752,7 +47594,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
+if ${ac_cv_sizeof_long_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
@@ -47761,9 +47603,8 @@ else
if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_long=0
fi
@@ -48176,14 +48017,14 @@ if test "$PHP_ICONV" != "no"; then
LIBS_save="$LIBS"
LIBS=
ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
-if test "x$ac_cv_func_iconv" = x""yes; then :
+if test "x$ac_cv_func_iconv" = xyes; then :
found_iconv=yes
else
ac_fn_c_check_func "$LINENO" "libiconv" "ac_cv_func_libiconv"
-if test "x$ac_cv_func_libiconv" = x""yes; then :
+if test "x$ac_cv_func_libiconv" = xyes; then :
echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h
@@ -48219,7 +48060,7 @@ $as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
done
if test -z "$ICONV_DIR"; then
- as_fn_error "Please specify the install prefix of iconv with --with-iconv=<DIR>" "$LINENO" 5
+ as_fn_error $? "Please specify the install prefix of iconv with --with-iconv=<DIR>" "$LINENO" 5
fi
if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
@@ -48325,7 +48166,7 @@ $as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
as_ac_Lib=`$as_echo "ac_cv_lib_$iconv_lib_name''_libiconv" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv in -l$iconv_lib_name" >&5
$as_echo_n "checking for libiconv in -l$iconv_lib_name... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -48360,8 +48201,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -48487,7 +48327,7 @@ else
as_ac_Lib=`$as_echo "ac_cv_lib_$iconv_lib_name''_iconv" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -l$iconv_lib_name" >&5
$as_echo_n "checking for iconv in -l$iconv_lib_name... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -48522,8 +48362,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -49424,7 +49263,7 @@ EOF
else
- as_fn_error "Please reinstall the iconv library." "$LINENO" 5
+ as_fn_error $? "Please reinstall the iconv library." "$LINENO" 5
fi
fi
@@ -49931,7 +49770,7 @@ rm -f conftest*
CFLAGS="-I$IMAP_INC_DIR"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8_mime2text signature" >&5
$as_echo_n "checking for utf8_mime2text signature... " >&6; }
-if test "${ac_cv_utf8_mime2text+set}" = set; then :
+if ${ac_cv_utf8_mime2text+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -49976,7 +49815,7 @@ $as_echo "#define HAVE_NEW_MIME2TEXT 1" >>confdefs.h
CFLAGS="-I$IMAP_INC_DIR"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for U8T_DECOMPOSE" >&5
$as_echo_n "checking for U8T_DECOMPOSE... " >&6; }
-if test "${ac_cv_u8t_canonical+set}" = set; then :
+if ${ac_cv_u8t_canonical+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -50011,10 +49850,10 @@ $as_echo "$ac_cv_u8t_canonical" >&6; }
CFLAGS=$old_CFLAGS
if test "$ac_cv_u8t_decompose" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then
- as_fn_error "utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." "$LINENO" 5
+ as_fn_error $? "utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." "$LINENO" 5
fi
if test "$ac_cv_u8t_decompose" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then
- as_fn_error "utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." "$LINENO" 5
+ as_fn_error $? "utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." "$LINENO" 5
fi
old_CPPFLAGS=$CPPFLAGS
@@ -50137,7 +49976,7 @@ rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
$as_echo_n "checking for pam_start in -lpam... " >&6; }
-if test "${ac_cv_lib_pam_pam_start+set}" = set; then :
+if ${ac_cv_lib_pam_pam_start+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -50171,7 +50010,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
-if test "x$ac_cv_lib_pam_pam_start" = x""yes; then :
+if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -50311,7 +50150,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
$as_echo_n "checking for crypt in -lcrypt... " >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
+if ${ac_cv_lib_crypt_crypt+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -50345,7 +50184,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
-if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
+if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -50401,7 +50240,7 @@ fi
if test -z "$IMAP_DIR"; then
- as_fn_error "Cannot find rfc822.h. Please check your c-client installation." "$LINENO" 5
+ as_fn_error $? "Cannot find rfc822.h. Please check your c-client installation." "$LINENO" 5
fi
if test -r "$IMAP_DIR/c-client/c-client.a"; then
@@ -50427,7 +50266,7 @@ fi
done
if test -z "$IMAP_LIBDIR"; then
- as_fn_error "Cannot find imap library (libc-client.a). Please check your c-client installation." "$LINENO" 5
+ as_fn_error $? "Cannot find imap library (libc-client.a). Please check your c-client installation." "$LINENO" 5
fi
@@ -50534,7 +50373,7 @@ fi
set dummy krb5-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_KRB5_CONFIG+set}" = set; then :
+if ${ac_cv_path_KRB5_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $KRB5_CONFIG in
@@ -50898,7 +50737,7 @@ $as_echo "#define HAVE_IMAP_KRB 1" >>confdefs.h
else
- as_fn_error "Kerberos libraries not found.
+ as_fn_error $? "Kerberos libraries not found.
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
" "$LINENO" 5
@@ -50914,7 +50753,7 @@ _ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "auth_gss" >/dev/null 2>&1; then :
- as_fn_error "This c-client library is built with Kerberos support.
+ as_fn_error $? "This c-client library is built with Kerberos support.
Add --with-kerberos to your configure line. Check config.log for details.
" "$LINENO" 5
@@ -50948,7 +50787,7 @@ rm -f conftest*
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
@@ -50994,7 +50833,7 @@ fi
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
else
- as_fn_error "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
fi
if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
@@ -51147,11 +50986,11 @@ fi
done
if test -z "$OPENSSL_INCDIR"; then
- as_fn_error "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
+ as_fn_error $? "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
fi
if test -z "$OPENSSL_LIBDIR"; then
- as_fn_error "Cannot find OpenSSL's libraries" "$LINENO" 5
+ as_fn_error $? "Cannot find OpenSSL's libraries" "$LINENO" 5
fi
old_CPPFLAGS=$CPPFLAGS
@@ -51175,7 +51014,7 @@ $as_echo ">= 0.9.6" >&6; }
else
- as_fn_error "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
fi
rm -f conftest*
@@ -51313,7 +51152,7 @@ rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5
$as_echo_n "checking for CRYPTO_free in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_free+set}" = set; then :
+if ${ac_cv_lib_crypto_CRYPTO_free+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -51347,7 +51186,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_free" >&5
$as_echo "$ac_cv_lib_crypto_CRYPTO_free" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_free" = x""yes; then :
+if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -51383,7 +51222,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_crypto_CRYPTO_free
- as_fn_error "libcrypto not found!" "$LINENO" 5
+ as_fn_error $? "libcrypto not found!" "$LINENO" 5
fi
@@ -51490,7 +51329,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ssl_version in -lssl" >&5
$as_echo_n "checking for SSL_CTX_set_ssl_version in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+set}" = set; then :
+if ${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -51524,7 +51363,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&5
$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = x""yes; then :
+if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -51538,7 +51377,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version
- as_fn_error "libssl not found!" "$LINENO" 5
+ as_fn_error $? "libssl not found!" "$LINENO" 5
fi
@@ -51641,7 +51480,7 @@ $as_echo "#define HAVE_IMAP_SSL 1" >>confdefs.h
else
- as_fn_error "OpenSSL libraries not found.
+ as_fn_error $? "OpenSSL libraries not found.
Check the path given to --with-openssl-dir and output in config.log)
" "$LINENO" 5
@@ -51657,7 +51496,7 @@ _ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "ssl_onceonlyinit" >/dev/null 2>&1; then :
- as_fn_error "This c-client library is built with SSL support.
+ as_fn_error $? "This c-client library is built with SSL support.
Add --with-imap-ssl to your configure line. Check config.log for details.
" "$LINENO" 5
@@ -51930,7 +51769,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -52096,7 +51935,7 @@ if test "$PHP_INTERBASE" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isc_detach_database in -lfbclient" >&5
$as_echo_n "checking for isc_detach_database in -lfbclient... " >&6; }
-if test "${ac_cv_lib_fbclient_isc_detach_database+set}" = set; then :
+if ${ac_cv_lib_fbclient_isc_detach_database+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -52130,7 +51969,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fbclient_isc_detach_database" >&5
$as_echo "$ac_cv_lib_fbclient_isc_detach_database" >&6; }
-if test "x$ac_cv_lib_fbclient_isc_detach_database" = x""yes; then :
+if test "x$ac_cv_lib_fbclient_isc_detach_database" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -52243,7 +52082,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isc_detach_database in -lgds" >&5
$as_echo_n "checking for isc_detach_database in -lgds... " >&6; }
-if test "${ac_cv_lib_gds_isc_detach_database+set}" = set; then :
+if ${ac_cv_lib_gds_isc_detach_database+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -52277,7 +52116,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gds_isc_detach_database" >&5
$as_echo "$ac_cv_lib_gds_isc_detach_database" >&6; }
-if test "x$ac_cv_lib_gds_isc_detach_database" = x""yes; then :
+if test "x$ac_cv_lib_gds_isc_detach_database" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -52390,7 +52229,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isc_detach_database in -lib_util" >&5
$as_echo_n "checking for isc_detach_database in -lib_util... " >&6; }
-if test "${ac_cv_lib_ib_util_isc_detach_database+set}" = set; then :
+if ${ac_cv_lib_ib_util_isc_detach_database+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -52424,7 +52263,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ib_util_isc_detach_database" >&5
$as_echo "$ac_cv_lib_ib_util_isc_detach_database" >&6; }
-if test "x$ac_cv_lib_ib_util_isc_detach_database" = x""yes; then :
+if test "x$ac_cv_lib_ib_util_isc_detach_database" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -52438,7 +52277,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_ib_util_isc_detach_database
- as_fn_error "libgds, libib_util or libfbclient not found! Check config.log for more information." "$LINENO" 5
+ as_fn_error $? "libgds, libib_util or libfbclient not found! Check config.log for more information." "$LINENO" 5
fi
@@ -52959,7 +52798,7 @@ ext_output=$PHP_ICU_DIR
set dummy icu-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ICU_CONFIG+set}" = set; then :
+if ${ac_cv_path_ICU_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ICU_CONFIG in
@@ -53008,13 +52847,13 @@ $as_echo_n "checking for location of ICU headers and libraries... " >&6; }
if test "$?" != "0" || test -z "$icu_install_prefix"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works." "$LINENO" 5
+ as_fn_error $? "Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works." "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $icu_install_prefix" >&5
$as_echo "$icu_install_prefix" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU 3.4 or greater" >&5
-$as_echo_n "checking for ICU 3.4 or greater... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU 4.0 or greater" >&5
+$as_echo_n "checking for ICU 4.0 or greater... " >&6; }
icu_version_full=`$ICU_CONFIG --version`
ac_IFS=$IFS
IFS="."
@@ -53024,8 +52863,8 @@ $as_echo_n "checking for ICU 3.4 or greater... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found $icu_version_full" >&5
$as_echo "found $icu_version_full" >&6; }
- if test "$icu_version" -lt "3004"; then
- as_fn_error "ICU version 3.4 or later is required" "$LINENO" 5
+ if test "$icu_version" -lt "4000"; then
+ as_fn_error $? "ICU version 4.0 or later is required" "$LINENO" 5
fi
ICU_VERSION=$icu_version
@@ -53183,7 +53022,7 @@ if test -z "$CXX"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -53227,7 +53066,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -53305,7 +53144,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -53342,7 +53181,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -53432,7 +53271,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
@@ -53462,7 +53301,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -53478,11 +53317,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -53521,7 +53360,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -53537,18 +53376,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -53582,7 +53421,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ext_builddir=ext/intl
ext_srcdir=$abs_srcdir/ext/intl
- ac_extra=`echo "$ICU_INCS"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
+ ac_extra=`echo "$ICU_INCS -Wno-write-strings"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`
if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then
PHP_INTL_SHARED=no
@@ -53609,6 +53448,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
for ac_src in php_intl.c \
intl_error.c \
intl_convert.c \
+ intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -53620,6 +53460,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
+ common/common_enum.cpp \
+ common/common_date.cpp \
formatter/formatter.c \
formatter/formatter_main.c \
formatter/formatter_class.c \
@@ -53638,7 +53480,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
+ dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
@@ -53654,6 +53500,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ timezone/timezone_class.cpp \
+ timezone/timezone_methods.cpp \
+ calendar/calendar_class.cpp \
+ calendar/calendar_methods.cpp \
+ calendar/gregoriancalendar_methods.cpp \
+ breakiterator/breakiterator_class.cpp \
+ breakiterator/breakiterator_iterators.cpp \
+ breakiterator/breakiterator_methods.cpp \
+ breakiterator/rulebasedbreakiterator_methods.cpp \
+ breakiterator/codepointiterator_internal.cpp \
+ breakiterator/codepointiterator_methods.cpp \
idn/idn.c \
$icu_spoof_src; do
@@ -53707,6 +53564,7 @@ EOF
for ac_src in php_intl.c \
intl_error.c \
intl_convert.c \
+ intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -53718,6 +53576,8 @@ EOF
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
+ common/common_enum.cpp \
+ common/common_date.cpp \
formatter/formatter.c \
formatter/formatter_main.c \
formatter/formatter_class.c \
@@ -53736,7 +53596,11 @@ EOF
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
+ dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
@@ -53752,6 +53616,17 @@ EOF
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ timezone/timezone_class.cpp \
+ timezone/timezone_methods.cpp \
+ calendar/calendar_class.cpp \
+ calendar/calendar_methods.cpp \
+ calendar/gregoriancalendar_methods.cpp \
+ breakiterator/breakiterator_class.cpp \
+ breakiterator/breakiterator_iterators.cpp \
+ breakiterator/breakiterator_methods.cpp \
+ breakiterator/rulebasedbreakiterator_methods.cpp \
+ breakiterator/codepointiterator_internal.cpp \
+ breakiterator/codepointiterator_methods.cpp \
idn/idn.c \
$icu_spoof_src; do
@@ -53886,6 +53761,7 @@ _ACEOF
for ac_src in php_intl.c \
intl_error.c \
intl_convert.c \
+ intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -53897,6 +53773,8 @@ _ACEOF
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
+ common/common_enum.cpp \
+ common/common_date.cpp \
formatter/formatter.c \
formatter/formatter_main.c \
formatter/formatter_class.c \
@@ -53915,7 +53793,11 @@ _ACEOF
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
+ dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
@@ -53931,6 +53813,17 @@ _ACEOF
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ timezone/timezone_class.cpp \
+ timezone/timezone_methods.cpp \
+ calendar/calendar_class.cpp \
+ calendar/calendar_methods.cpp \
+ calendar/gregoriancalendar_methods.cpp \
+ breakiterator/breakiterator_class.cpp \
+ breakiterator/breakiterator_iterators.cpp \
+ breakiterator/breakiterator_methods.cpp \
+ breakiterator/rulebasedbreakiterator_methods.cpp \
+ breakiterator/codepointiterator_internal.cpp \
+ breakiterator/codepointiterator_methods.cpp \
idn/idn.c \
$icu_spoof_src; do
@@ -53981,6 +53874,7 @@ EOF
for ac_src in php_intl.c \
intl_error.c \
intl_convert.c \
+ intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -53992,6 +53886,8 @@ EOF
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
+ common/common_enum.cpp \
+ common/common_date.cpp \
formatter/formatter.c \
formatter/formatter_main.c \
formatter/formatter_class.c \
@@ -54010,7 +53906,11 @@ EOF
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
+ dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
@@ -54026,6 +53926,17 @@ EOF
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ timezone/timezone_class.cpp \
+ timezone/timezone_methods.cpp \
+ calendar/calendar_class.cpp \
+ calendar/calendar_methods.cpp \
+ calendar/gregoriancalendar_methods.cpp \
+ breakiterator/breakiterator_class.cpp \
+ breakiterator/breakiterator_iterators.cpp \
+ breakiterator/breakiterator_methods.cpp \
+ breakiterator/rulebasedbreakiterator_methods.cpp \
+ breakiterator/codepointiterator_internal.cpp \
+ breakiterator/codepointiterator_methods.cpp \
idn/idn.c \
$icu_spoof_src; do
@@ -54119,6 +54030,16 @@ EOF
+ BUILD_DIR="$BUILD_DIR $ext_builddir/timezone"
+
+
+
+
+ BUILD_DIR="$BUILD_DIR $ext_builddir/calendar"
+
+
+
+
BUILD_DIR="$BUILD_DIR $ext_builddir/idn"
@@ -54127,6 +54048,11 @@ EOF
BUILD_DIR="$BUILD_DIR $ext_builddir/spoofchecker"
+
+
+ BUILD_DIR="$BUILD_DIR $ext_builddir/breakiterator"
+
+
fi
@@ -54180,7 +54106,7 @@ $as_echo "#define HAVE_JSON 1 " >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -55016,7 +54942,7 @@ EOF
fi
if test -z "$LDAP_DIR"; then
- as_fn_error "Cannot find ldap.h" "$LINENO" 5
+ as_fn_error $? "Cannot find ldap.h" "$LINENO" 5
fi
@@ -56953,7 +56879,7 @@ $as_echo "#define HAVE_ORALDAP_10 1" >>confdefs.h
fi
else
- as_fn_error "Cannot find ldap libraries in $LDAP_LIBDIR." "$LINENO" 5
+ as_fn_error $? "Cannot find ldap libraries in $LDAP_LIBDIR." "$LINENO" 5
fi
@@ -57001,7 +56927,7 @@ $as_echo "#define HAVE_LDAP 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3 arg ldap_set_rebind_proc" >&5
$as_echo_n "checking for 3 arg ldap_set_rebind_proc... " >&6; }
-if test "${ac_cv_3arg_setrebindproc+set}" = set; then :
+if ${ac_cv_3arg_setrebindproc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -57034,8 +56960,7 @@ $as_echo "#define HAVE_3ARG_SETREBINDPROC 1" >>confdefs.h
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -57072,7 +56997,7 @@ $as_echo "#define HAVE_LDAP_SASL_H 1" >>confdefs.h
LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include
LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$PHP_LIBDIR
else
- as_fn_error "sasl.h not found!" "$LINENO" 5
+ as_fn_error $? "sasl.h not found!" "$LINENO" 5
fi
if test "$PHP_LDAP_SASL" = "yes"; then
@@ -57180,7 +57105,7 @@ $as_echo "#define HAVE_LDAP_SASL_H 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_version in -lsasl2" >&5
$as_echo_n "checking for sasl_version in -lsasl2... " >&6; }
-if test "${ac_cv_lib_sasl2_sasl_version+set}" = set; then :
+if ${ac_cv_lib_sasl2_sasl_version+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -57214,7 +57139,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_version" >&5
$as_echo "$ac_cv_lib_sasl2_sasl_version" >&6; }
-if test "x$ac_cv_lib_sasl2_sasl_version" = x""yes; then :
+if test "x$ac_cv_lib_sasl2_sasl_version" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -57358,7 +57283,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_sasl2_sasl_version
- as_fn_error "LDAP SASL check failed. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "LDAP SASL check failed. Please check config.log for more information." "$LINENO" 5
fi
@@ -57367,11 +57292,11 @@ fi
fi
ac_fn_c_check_func "$LINENO" "ldap_bind_s" "ac_cv_func_ldap_bind_s"
-if test "x$ac_cv_func_ldap_bind_s" = x""yes; then :
+if test "x$ac_cv_func_ldap_bind_s" = xyes; then :
else
- as_fn_error "LDAP build check failed. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "LDAP build check failed. Please check config.log for more information." "$LINENO" 5
fi
@@ -57561,7 +57486,7 @@ $as_echo "#define USE_COMBINATION_EXPLOSION_CHECK 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
-if test "${php_cv_mbstring_stdarg+set}" = set; then :
+if ${php_cv_mbstring_stdarg+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -57610,8 +57535,7 @@ $as_echo "$php_cv_mbstring_stdarg" >&6; }
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -57626,7 +57550,7 @@ done
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
@@ -57635,9 +57559,8 @@ else
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int=0
fi
@@ -57660,7 +57583,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
$as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then :
+if ${ac_cv_sizeof_short+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
@@ -57669,9 +57592,8 @@ else
if test "$ac_cv_type_short" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (short)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_short=0
fi
@@ -57694,7 +57616,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
@@ -57703,9 +57625,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long=0
fi
@@ -57724,7 +57645,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
+if ${ac_cv_c_const+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -57804,7 +57725,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+if ${ac_cv_header_time+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -57841,7 +57762,7 @@ fi
# for constant arguments. Useless!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
$as_echo_n "checking for working alloca.h... " >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then :
+if ${ac_cv_working_alloca_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -57874,7 +57795,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
$as_echo_n "checking for alloca... " >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then :
+if ${ac_cv_func_alloca_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -57893,7 +57814,7 @@ else
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+void *alloca (size_t);
# endif
# endif
# endif
@@ -57937,7 +57858,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test "${ac_cv_os_cray+set}" = set; then :
+if ${ac_cv_os_cray+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -57964,8 +57885,7 @@ if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
@@ -57979,7 +57899,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
$as_echo_n "checking stack direction for C alloca... " >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then :
+if ${ac_cv_c_stack_direction+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -58029,7 +57949,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
$as_echo_n "checking for working memcmp... " >&6; }
-if test "${ac_cv_func_memcmp_working+set}" = set; then :
+if ${ac_cv_func_memcmp_working+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -58090,7 +58010,7 @@ esac
ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdarg_h" = x""yes; then :
+if test "x$ac_cv_header_stdarg_h" = xyes; then :
$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
@@ -58169,7 +58089,7 @@ $as_echo "#define HAVE_ONIG 1" >>confdefs.h
else
if test ! -f "$PHP_ONIG/include/oniguruma.h"; then
- as_fn_error "oniguruma.h not found in $PHP_ONIG/include" "$LINENO" 5
+ as_fn_error $? "oniguruma.h not found in $PHP_ONIG/include" "$LINENO" 5
fi
if test "$PHP_ONIG/include" != "/usr/include"; then
@@ -58302,7 +58222,7 @@ $as_echo "#define HAVE_ONIG 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for onig_init in -lonig" >&5
$as_echo_n "checking for onig_init in -lonig... " >&6; }
-if test "${ac_cv_lib_onig_onig_init+set}" = set; then :
+if ${ac_cv_lib_onig_onig_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -58336,7 +58256,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_onig_onig_init" >&5
$as_echo "$ac_cv_lib_onig_onig_init" >&6; }
-if test "x$ac_cv_lib_onig_onig_init" = x""yes; then :
+if test "x$ac_cv_lib_onig_onig_init" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -58449,7 +58369,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_onig_onig_init
- as_fn_error "Problem with oniguruma. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with oniguruma. Please check config.log for more information." "$LINENO" 5
fi
@@ -58732,7 +58652,7 @@ $as_echo "#define HAVE_MBREGEX 1" >>confdefs.h
done
if test -z "$PHP_LIBMBFL_INCLUDE"; then
- as_fn_error "mbfilter.h not found. Please reinstall libmbfl library." "$LINENO" 5
+ as_fn_error $? "mbfilter.h not found. Please reinstall libmbfl library." "$LINENO" 5
else
if test "$PHP_LIBMBFL_INCLUDE" != "/usr/include"; then
@@ -58866,7 +58786,7 @@ $as_echo "#define HAVE_MBREGEX 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbfl_buffer_converter_new in -lmbfl" >&5
$as_echo_n "checking for mbfl_buffer_converter_new in -lmbfl... " >&6; }
-if test "${ac_cv_lib_mbfl_mbfl_buffer_converter_new+set}" = set; then :
+if ${ac_cv_lib_mbfl_mbfl_buffer_converter_new+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -58900,7 +58820,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mbfl_mbfl_buffer_converter_new" >&5
$as_echo "$ac_cv_lib_mbfl_mbfl_buffer_converter_new" >&6; }
-if test "x$ac_cv_lib_mbfl_mbfl_buffer_converter_new" = x""yes; then :
+if test "x$ac_cv_lib_mbfl_mbfl_buffer_converter_new" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -59010,7 +58930,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_mbfl_mbfl_buffer_converter_new
- as_fn_error "Problem with libmbfl. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Problem with libmbfl. Please check config.log for more information." "$LINENO" 5
fi
@@ -59570,7 +59490,7 @@ if test "$PHP_MCRYPT" != "no"; then
done
if test -z "$MCRYPT_DIR"; then
- as_fn_error "mcrypt.h not found. Please reinstall libmcrypt." "$LINENO" 5
+ as_fn_error $? "mcrypt.h not found. Please reinstall libmcrypt." "$LINENO" 5
fi
@@ -59595,7 +59515,7 @@ $as_echo ">= 2.5.6" >&6; }
else
- as_fn_error "libmcrypt version 2.5.6 or greater required." "$LINENO" 5
+ as_fn_error $? "libmcrypt version 2.5.6 or greater required." "$LINENO" 5
fi
rm -f conftest*
@@ -59702,7 +59622,7 @@ rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mcrypt_module_open in -lmcrypt" >&5
$as_echo_n "checking for mcrypt_module_open in -lmcrypt... " >&6; }
-if test "${ac_cv_lib_mcrypt_mcrypt_module_open+set}" = set; then :
+if ${ac_cv_lib_mcrypt_mcrypt_module_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -59736,7 +59656,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcrypt_mcrypt_module_open" >&5
$as_echo "$ac_cv_lib_mcrypt_mcrypt_module_open" >&6; }
-if test "x$ac_cv_lib_mcrypt_mcrypt_module_open" = x""yes; then :
+if test "x$ac_cv_lib_mcrypt_mcrypt_module_open" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -59874,7 +59794,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mcrypt_module_open in -lmcrypt" >&5
$as_echo_n "checking for mcrypt_module_open in -lmcrypt... " >&6; }
-if test "${ac_cv_lib_mcrypt_mcrypt_module_open+set}" = set; then :
+if ${ac_cv_lib_mcrypt_mcrypt_module_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -59908,7 +59828,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcrypt_mcrypt_module_open" >&5
$as_echo "$ac_cv_lib_mcrypt_mcrypt_module_open" >&6; }
-if test "x$ac_cv_lib_mcrypt_mcrypt_module_open" = x""yes; then :
+if test "x$ac_cv_lib_mcrypt_mcrypt_module_open" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -59924,7 +59844,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_mcrypt_mcrypt_module_open
- as_fn_error "Sorry, I was not able to diagnose which libmcrypt version you have installed." "$LINENO" 5
+ as_fn_error $? "Sorry, I was not able to diagnose which libmcrypt version you have installed." "$LINENO" 5
fi
@@ -60423,7 +60343,7 @@ if test "$PHP_MSSQL" != "no"; then
done
if test -z "$FREETDS_INSTALLATION_DIR"; then
- as_fn_error "Cannot find FreeTDS in known installation directories" "$LINENO" 5
+ as_fn_error $? "Cannot find FreeTDS in known installation directories" "$LINENO" 5
fi
elif test "$PHP_MSSQL" != "no"; then
@@ -60435,12 +60355,12 @@ if test "$PHP_MSSQL" != "no"; then
FREETDS_INSTALLATION_DIR=$PHP_MSSQL
FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds
else
- as_fn_error "Directory $PHP_MSSQL is not a FreeTDS installation directory" "$LINENO" 5
+ as_fn_error $? "Directory $PHP_MSSQL is not a FreeTDS installation directory" "$LINENO" 5
fi
fi
if test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so"; then
- as_fn_error "Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a|so" "$LINENO" 5
+ as_fn_error $? "Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a|so" "$LINENO" 5
fi
@@ -60867,7 +60787,7 @@ EOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_addr in -ldnet_stub" >&5
$as_echo_n "checking for dnet_addr in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_addr+set}" = set; then :
+if ${ac_cv_lib_dnet_stub_dnet_addr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -60901,7 +60821,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_addr" >&5
$as_echo "$ac_cv_lib_dnet_stub_dnet_addr" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_addr" = x""yes; then :
+if test "x$ac_cv_lib_dnet_stub_dnet_addr" = xyes; then :
if test "$ext_shared" = "yes"; then
@@ -61135,7 +61055,7 @@ elif test "$PHP_MYSQL" != "no"; then
fi
if test -z "$MYSQL_DIR"; then
- as_fn_error "Cannot find MySQL header files under $PHP_MYSQL.
+ as_fn_error $? "Cannot find MySQL header files under $PHP_MYSQL.
Note that the MySQL client library is not bundled anymore!" "$LINENO" 5
fi
@@ -61167,7 +61087,30 @@ Note that the MySQL client library is not bundled anymore!" "$LINENO" 5
done
if test -z "$MYSQL_LIB_DIR"; then
- as_fn_error "Cannot find lib$MYSQL_LIBNAME under $MYSQL_DIR.
+
+ str="$MYSQL_DIR/lib/x86_64-linux-gnu/lib$MYSQL_LIBNAME.*"
+ for j in `echo $str`; do
+ if test -r $j; then
+ MYSQL_LIB_DIR=$MYSQL_DIR/lib/x86_64-linux-gnu
+ break 2
+ fi
+ done
+
+ fi
+ if test -z "$MYSQL_LIB_DIR"; then
+
+ str="$MYSQL_DIR/lib/i386-linux-gnu/lib$MYSQL_LIBNAME.*"
+ for j in `echo $str`; do
+ if test -r $j; then
+ MYSQL_LIB_DIR=$MYSQL_DIR/lib/i386-linux-gnu
+ break 2
+ fi
+ done
+
+ fi
+
+ if test -z "$MYSQL_LIB_DIR"; then
+ as_fn_error $? "Cannot find lib$MYSQL_LIBNAME under $MYSQL_DIR.
Note that the MySQL client library is not bundled anymore!" "$LINENO" 5
fi
@@ -61271,7 +61214,7 @@ Note that the MySQL client library is not bundled anymore!" "$LINENO" 5
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIBNAME''_mysql_close" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
$as_echo_n "checking for mysql_close in -l$MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -61306,8 +61249,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -61517,7 +61459,7 @@ else
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIBNAME''_mysql_error" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
$as_echo_n "checking for mysql_error in -l$MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -61552,8 +61494,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -61565,7 +61506,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$MYSQL_LIBNAME_mysql_error
- as_fn_error "mysql configure failed. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "mysql configure failed. Please check config.log for more information." "$LINENO" 5
fi
@@ -61695,7 +61636,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIBNAME''_mysql_errno" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
$as_echo_n "checking for mysql_errno in -l$MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -61730,8 +61671,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -61743,7 +61683,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$MYSQL_LIBNAME_mysql_errno
- as_fn_error "Try adding --with-zlib-dir=<DIR>. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Try adding --with-zlib-dir=<DIR>. Please check config.log for more information." "$LINENO" 5
fi
@@ -62263,7 +62203,7 @@ EOF
is_it_shared=$PHP_MYSQLND_SHARED
is_it_enabled=$PHP_MYSQLND
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension mysql to build statically, but it
depends on extension mysqlnd, which you've configured to build shared.
You either need to build mysql shared or build mysqlnd statically for the
@@ -62271,7 +62211,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension mysql, which depends on extension mysqlnd,
but you've either not enabled mysqlnd, or have disabled it.
" "$LINENO" 5
@@ -62379,7 +62319,7 @@ $as_echo "#define HAVE_EMBEDDED_MYSQLI 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: mysql_config not found" >&5
$as_echo "mysql_config not found" >&6; }
- as_fn_error "Please reinstall the mysql distribution" "$LINENO" 5
+ as_fn_error $? "Please reinstall the mysql distribution" "$LINENO" 5
fi
@@ -62482,7 +62422,7 @@ $as_echo "mysql_config not found" >&6; }
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIB_NAME''_mysql_set_server_option" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
$as_echo_n "checking for mysql_set_server_option in -l$MYSQL_LIB_NAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -62517,8 +62457,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -62753,7 +62692,7 @@ $as_echo "#define HAVE_MYSQLILIB 1" >>confdefs.h
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIB_NAME''_mysql_set_character_set" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_set_character_set in -l$MYSQL_LIB_NAME" >&5
$as_echo_n "checking for mysql_set_character_set in -l$MYSQL_LIB_NAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -62788,8 +62727,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -62801,7 +62739,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$MYSQL_LIB_NAME_mysql_set_character_set
- as_fn_error "MySQLI doesn't support versions < 4.1.13 (for MySQL 4.1.x) and < 5.0.7 for (MySQL 5.0.x) anymore. Please update your libraries." "$LINENO" 5
+ as_fn_error $? "MySQLI doesn't support versions < 4.1.13 (for MySQL 4.1.x) and < 5.0.7 for (MySQL 5.0.x) anymore. Please update your libraries." "$LINENO" 5
fi
@@ -62814,7 +62752,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$MYSQL_LIB_NAME_mysql_set_server_option
- as_fn_error "wrong mysql library version or lib not found. Check config.log for more information." "$LINENO" 5
+ as_fn_error $? "wrong mysql library version or lib not found. Check config.log for more information." "$LINENO" 5
fi
@@ -62919,7 +62857,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIB_NAME''_mysql_stmt_next_result" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME" >&5
$as_echo_n "checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -62954,8 +62892,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -63302,7 +63239,7 @@ EOF
is_it_shared=$PHP_MYSQLND_SHARED
is_it_enabled=$PHP_MYSQLND
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension mysqli to build statically, but it
depends on extension mysqlnd, which you've configured to build shared.
You either need to build mysqli shared or build mysqlnd statically for the
@@ -63310,7 +63247,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension mysqli, which depends on extension mysqlnd,
but you've either not enabled mysqlnd, or have disabled it.
" "$LINENO" 5
@@ -63329,6 +63266,13 @@ else
PHP_OCI8_SED="$SED";
fi
+PHP_OCI8_TAIL1=`echo a | tail -n1 2>/dev/null`
+if test "$PHP_OCI8_TAIL1" = "a"; then
+ PHP_OCI8_TAIL1="tail -n1"
+else
+ PHP_OCI8_TAIL1="tail -1"
+fi
+
@@ -63386,7 +63330,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_OCI8" != "no"; then
if test -z "$PHP_OCI8"; then
- as_fn_error "Empty parameter value passed to --with-oci8" "$LINENO" 5
+ as_fn_error $? "Empty parameter value passed to --with-oci8" "$LINENO" 5
fi
@@ -63396,7 +63340,7 @@ $as_echo_n "checking PHP version... " >&6; }
tmp_version=$PHP_VERSION
if test -z "$tmp_version"; then
if test -z "$PHP_CONFIG"; then
- as_fn_error "php-config not found" "$LINENO" 5
+ as_fn_error $? "php-config not found" "$LINENO" 5
fi
php_version=`$PHP_CONFIG --version 2>/dev/null|head -n 1|$PHP_OCI8_SED -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'`
else
@@ -63404,7 +63348,7 @@ $as_echo_n "checking PHP version... " >&6; }
fi
if test -z "$php_version"; then
- as_fn_error "failed to detect PHP version, please report" "$LINENO" 5
+ as_fn_error $? "failed to detect PHP version, please report" "$LINENO" 5
fi
ac_IFS=$IFS
@@ -63414,9 +63358,9 @@ $as_echo_n "checking PHP version... " >&6; }
oci8_php_version=`expr $1 \* 1000000 + $2 \* 1000 + $3`
if test "$oci8_php_version" -lt "4003009"; then
- as_fn_error "You need at least PHP 4.3.9 to be able to use this version of OCI8. PHP $php_version found" "$LINENO" 5
+ as_fn_error $? "You need at least PHP 4.3.9 to be able to use this version of OCI8. PHP $php_version found" "$LINENO" 5
elif test "$oci8_php_version" -ge "6000000"; then
- as_fn_error "This version of OCI8 is not compatible with PHP 6 or higher" "$LINENO" 5
+ as_fn_error $? "This version of OCI8 is not compatible with PHP 6 or higher" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_version, ok" >&5
$as_echo "$php_version, ok" >&6; }
@@ -63429,7 +63373,7 @@ $as_echo "$php_version, ok" >&6; }
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
$as_echo_n "checking size of long int... " >&6; }
-if test "${ac_cv_sizeof_long_int+set}" = set; then :
+if ${ac_cv_sizeof_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
@@ -63438,9 +63382,8 @@ else
if test "$ac_cv_type_long_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_int=0
fi
@@ -63519,7 +63462,7 @@ $as_echo "$OCI8_DIR" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ORACLE_HOME library validity" >&5
$as_echo_n "checking ORACLE_HOME library validity... " >&6; }
if test ! -d "$OCI8_DIR"; then
- as_fn_error "${OCI8_DIR} is not a directory" "$LINENO" 5
+ as_fn_error $? "${OCI8_DIR} is not a directory" "$LINENO" 5
fi
if test -d "$OCI8_DIR/lib" && test ! -d "$OCI8_DIR/lib32"; then
OCI8_LIB_DIR=lib
@@ -63529,9 +63472,9 @@ $as_echo_n "checking ORACLE_HOME library validity... " >&6; }
OCI8_LIB_DIR=$PHP_OCI8_OH_LIBDIR
else
if test -f "$OCI8_DIR/libociei.$SHLIB_SUFFIX_NAME"; then
- as_fn_error "Expected an ORACLE_HOME top level directory but ${OCI8_DIR} appears to be an Instant Client directory. Try --with-oci8=instantclient,${OCI8_DIR}" "$LINENO" 5
+ as_fn_error $? "Expected an ORACLE_HOME top level directory but ${OCI8_DIR} appears to be an Instant Client directory. Try --with-oci8=instantclient,${OCI8_DIR}" "$LINENO" 5
else
- as_fn_error "Oracle library directory not found in ${OCI8_DIR}" "$LINENO" 5
+ as_fn_error $? "Oracle library directory not found in ${OCI8_DIR}" "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCI8_LIB_DIR" >&5
@@ -63861,7 +63804,7 @@ $as_echo "$OCI8_LIB_DIR" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Oracle library version compatibility" >&5
$as_echo_n "checking Oracle library version compatibility... " >&6; }
OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
+ OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3
@@ -63880,7 +63823,7 @@ $as_echo_n "checking Oracle library version compatibility... " >&6; }
OCI8_ORACLE_VERSION=8.1
fi
else
- as_fn_error "Oracle libclntsh.$SHLIB_SUFFIX_NAME client library not found" "$LINENO" 5
+ as_fn_error $? "Oracle libclntsh.$SHLIB_SUFFIX_NAME client library not found" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCI8_ORACLE_VERSION" >&5
$as_echo "$OCI8_ORACLE_VERSION" >&6; }
@@ -63888,7 +63831,7 @@ $as_echo "$OCI8_ORACLE_VERSION" >&6; }
case $OCI8_ORACLE_VERSION in
7.3|8.0|8.1)
- as_fn_error "Oracle client libraries < 9.2 are not supported" "$LINENO" 5
+ as_fn_error $? "Oracle client libraries < 9.2 are not supported" "$LINENO" 5
;;
9.0)
@@ -63991,7 +63934,7 @@ $as_echo "$OCI8_ORACLE_VERSION" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvNlsCreate in -lclntsh" >&5
$as_echo_n "checking for OCIEnvNlsCreate in -lclntsh... " >&6; }
-if test "${ac_cv_lib_clntsh_OCIEnvNlsCreate+set}" = set; then :
+if ${ac_cv_lib_clntsh_OCIEnvNlsCreate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -64025,7 +63968,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvNlsCreate" >&5
$as_echo "$ac_cv_lib_clntsh_OCIEnvNlsCreate" >&6; }
-if test "x$ac_cv_lib_clntsh_OCIEnvNlsCreate" = x""yes; then :
+if test "x$ac_cv_lib_clntsh_OCIEnvNlsCreate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -64039,7 +63982,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_clntsh_OCIEnvNlsCreate
- as_fn_error "Oracle client libraries < 9.2 are not supported" "$LINENO" 5
+ as_fn_error $? "Oracle client libraries < 9.2 are not supported" "$LINENO" 5
fi
@@ -64447,9 +64390,9 @@ _ACEOF
$as_echo_n "checking Oracle Instant Client directory... " >&6; }
if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
- PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -n1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | $PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
- as_fn_error "Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR" "$LINENO" 5
+ as_fn_error $? "Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR" "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP_OCI8_INSTANT_CLIENT" >&5
@@ -64572,7 +64515,7 @@ $as_echo "$OCISDKMANINC" >&6; }
OCI8INCDIR=$OCISDKMANINC
else
- as_fn_error "Oracle Instant Client SDK header files not found" "$LINENO" 5
+ as_fn_error $? "Oracle Instant Client SDK header files not found" "$LINENO" 5
fi
OCISYSLIBLIST=`echo "$OCI8INCDIR" | $PHP_OCI8_SED -e 's!\(.*\)/include$!\1/demo/sysliblist!'`
@@ -64672,15 +64615,15 @@ $as_echo "$OCISDKMANINC" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Oracle Instant Client library version compatibility" >&5
$as_echo_n "checking Oracle Instant Client library version compatibility... " >&6; }
OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
- OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail -n1`
+ OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc
+ OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | $PHP_OCI8_TAIL1`
if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then
if test ! -f "$OCI8_LCS_BASE"; then
- as_fn_error "Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found" "$LINENO" 5
+ as_fn_error $? "Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found" "$LINENO" 5
fi
OCI8_ORACLE_VERSION=`echo $OCI8_LCS | $PHP_OCI8_SED -e 's/.*\.\(.*\)\.1$/\1.1/'`
else
- as_fn_error "Oracle Instant Client libraries libnnz.$SHLIB_SUFFIX_NAME and libclntsh.$SHLIB_SUFFIX_NAME not found" "$LINENO" 5
+ as_fn_error $? "Oracle Instant Client libraries libnnz.$SHLIB_SUFFIX_NAME and libclntsh.$SHLIB_SUFFIX_NAME not found" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCI8_ORACLE_VERSION" >&5
$as_echo "$OCI8_ORACLE_VERSION" >&6; }
@@ -65276,7 +65219,7 @@ $as_echo_n "checking for Adabas support... " >&6; }
ODBC_INCDIR=$PHP_ADABAS/incl
if ! test -f "$ODBC_INCDIR/sqlext.h"; then
- as_fn_error "ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" "$LINENO" 5
+ as_fn_error $? "ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" "$LINENO" 5
fi
@@ -65620,7 +65563,7 @@ $as_echo_n "checking for IBM DB2 support... " >&6; }
if ! test -f "$ODBC_INCDIR/sqlcli1.h"; then
- as_fn_error "ODBC header file '$ODBC_INCDIR/sqlcli1.h' not found!" "$LINENO" 5
+ as_fn_error $? "ODBC header file '$ODBC_INCDIR/sqlcli1.h' not found!" "$LINENO" 5
fi
@@ -65667,7 +65610,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "
+ as_fn_error $? "
build test failed. Please check the config.log for details.
You need to source your DB2 environment before running PHP configure:
# . \$IBM_DB2/db2profile
@@ -66349,7 +66292,7 @@ $as_echo_n "checking for unixODBC support... " >&6; }
ODBC_TYPE=unixODBC
if ! test -f "$ODBC_INCDIR/sqlext.h"; then
- as_fn_error "ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" "$LINENO" 5
+ as_fn_error $? "ODBC header file '$ODBC_INCDIR/sqlext.h' not found!" "$LINENO" 5
fi
@@ -67012,7 +66955,7 @@ if test "$PHP_PCNTL" != "no"; then
for ac_func in fork
do :
ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
-if test "x$ac_cv_func_fork" = x""yes; then :
+if test "x$ac_cv_func_fork" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FORK 1
_ACEOF
@@ -67020,14 +66963,14 @@ _ACEOF
$as_echo "#define HAVE_FORK 1" >>confdefs.h
else
- as_fn_error "pcntl: fork() not supported by this platform" "$LINENO" 5
+ as_fn_error $? "pcntl: fork() not supported by this platform" "$LINENO" 5
fi
done
for ac_func in waitpid
do :
ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
-if test "x$ac_cv_func_waitpid" = x""yes; then :
+if test "x$ac_cv_func_waitpid" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_WAITPID 1
_ACEOF
@@ -67035,14 +66978,14 @@ _ACEOF
$as_echo "#define HAVE_WAITPID 1" >>confdefs.h
else
- as_fn_error "pcntl: waitpid() not supported by this platform" "$LINENO" 5
+ as_fn_error $? "pcntl: waitpid() not supported by this platform" "$LINENO" 5
fi
done
for ac_func in sigaction
do :
ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
-if test "x$ac_cv_func_sigaction" = x""yes; then :
+if test "x$ac_cv_func_sigaction" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SIGACTION 1
_ACEOF
@@ -67050,7 +66993,7 @@ _ACEOF
$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h
else
- as_fn_error "pcntl: sigaction() not supported by this platform" "$LINENO" 5
+ as_fn_error $? "pcntl: sigaction() not supported by this platform" "$LINENO" 5
fi
done
@@ -67058,8 +67001,7 @@ done
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -67425,7 +67367,7 @@ if test "$PHP_PDO" != "no"; then
# we're running in an environment that smells like pear,
# and the PHP_PEAR_VERSION env var is not set. That implies
# that we're running under a slightly broken pear installer
- as_fn_error "
+ as_fn_error $? "
PDO requires that you upgrade your PEAR installer tools. Please
do so now by running:
@@ -67441,7 +67383,7 @@ Once you've upgraded, please re-try your PDO install.
if test "$ext_shared" = "yes" ; then
case $host_alias in
*darwin*)
- as_fn_error "
+ as_fn_error $? "
Due to the way that loadable modules work on OSX/Darwin, you need to
compile the PDO package statically into the PHP core.
@@ -67751,7 +67693,7 @@ EOF
is_it_shared=$PHP_SPL_SHARED
is_it_enabled=$PHP_SPL
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build pdo shared or build spl statically for the
@@ -67759,7 +67701,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
@@ -67848,7 +67790,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PDO_DBLIB" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
if test "$PHP_PDO_DBLIB" = "yes"; then
@@ -67866,7 +67808,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
done
if test -z "$PDO_FREETDS_INSTALLATION_DIR"; then
- as_fn_error "Cannot find FreeTDS in known installation directories" "$LINENO" 5
+ as_fn_error $? "Cannot find FreeTDS in known installation directories" "$LINENO" 5
fi
elif test "$PHP_PDO_DBLIB" != "no"; then
@@ -67878,7 +67820,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds
else
- as_fn_error "Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory" "$LINENO" 5
+ as_fn_error $? "Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory" "$LINENO" 5
fi
fi
@@ -67887,7 +67829,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
fi
if test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so"; then
- as_fn_error "Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a|so" "$LINENO" 5
+ as_fn_error $? "Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a|so" "$LINENO" 5
fi
@@ -68023,7 +67965,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -68043,7 +67985,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -68344,7 +68286,7 @@ EOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_addr in -ldnet_stub" >&5
$as_echo_n "checking for dnet_addr in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_addr+set}" = set; then :
+if ${ac_cv_lib_dnet_stub_dnet_addr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -68378,7 +68320,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_addr" >&5
$as_echo "$ac_cv_lib_dnet_stub_dnet_addr" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_addr" = x""yes; then :
+if test "x$ac_cv_lib_dnet_stub_dnet_addr" = xyes; then :
if test "$ext_shared" = "yes"; then
@@ -68498,7 +68440,7 @@ $as_echo "#define HAVE_FREETDS 1" >>confdefs.h
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_dblib to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_dblib shared or build pdo statically for the
@@ -68506,7 +68448,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_dblib, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -68564,7 +68506,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PDO_FIREBIRD" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
if test "$PHP_PDO_FIREBIRD" = "yes"; then
@@ -68676,7 +68618,7 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isc_detach_database in -lfbclient" >&5
$as_echo_n "checking for isc_detach_database in -lfbclient... " >&6; }
-if test "${ac_cv_lib_fbclient_isc_detach_database+set}" = set; then :
+if ${ac_cv_lib_fbclient_isc_detach_database+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -68710,7 +68652,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fbclient_isc_detach_database" >&5
$as_echo "$ac_cv_lib_fbclient_isc_detach_database" >&6; }
-if test "x$ac_cv_lib_fbclient_isc_detach_database" = x""yes; then :
+if test "x$ac_cv_lib_fbclient_isc_detach_database" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -68823,7 +68765,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isc_detach_database in -lgds" >&5
$as_echo_n "checking for isc_detach_database in -lgds... " >&6; }
-if test "${ac_cv_lib_gds_isc_detach_database+set}" = set; then :
+if ${ac_cv_lib_gds_isc_detach_database+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -68857,7 +68799,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gds_isc_detach_database" >&5
$as_echo "$ac_cv_lib_gds_isc_detach_database" >&6; }
-if test "x$ac_cv_lib_gds_isc_detach_database" = x""yes; then :
+if test "x$ac_cv_lib_gds_isc_detach_database" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -68970,7 +68912,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isc_detach_database in -lib_util" >&5
$as_echo_n "checking for isc_detach_database in -lib_util... " >&6; }
-if test "${ac_cv_lib_ib_util_isc_detach_database+set}" = set; then :
+if ${ac_cv_lib_ib_util_isc_detach_database+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -69004,7 +68946,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ib_util_isc_detach_database" >&5
$as_echo "$ac_cv_lib_ib_util_isc_detach_database" >&6; }
-if test "x$ac_cv_lib_ib_util_isc_detach_database" = x""yes; then :
+if test "x$ac_cv_lib_ib_util_isc_detach_database" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -69018,7 +68960,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_ib_util_isc_detach_database
- as_fn_error "libfbclient, libgds or libib_util not found! Check config.log for more information." "$LINENO" 5
+ as_fn_error $? "libfbclient, libgds or libib_util not found! Check config.log for more information." "$LINENO" 5
fi
@@ -69035,7 +68977,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -69055,7 +68997,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -69491,7 +69433,7 @@ EOF
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_firebird to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_firebird shared or build pdo statically for the
@@ -69499,7 +69441,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_firebird, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -69582,7 +69524,7 @@ fi
if test "$PHP_PDO_MYSQL" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
@@ -69621,7 +69563,7 @@ $as_echo "$PDO_MYSQL_CONFIG" >&6; }
set dummy sed; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
$as_echo_n "(cached) " >&6
else
case $SED in
@@ -69688,7 +69630,7 @@ $as_echo "libs under $PDO_MYSQL_LIB_DIR; seems promising" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can not find it" >&5
$as_echo "can not find it" >&6; }
- as_fn_error "Unable to find your mysql installation" "$LINENO" 5
+ as_fn_error $? "Unable to find your mysql installation" "$LINENO" 5
fi
@@ -69726,7 +69668,7 @@ $as_echo "can not find it" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Unable to find your mysql installation" "$LINENO" 5
+ as_fn_error $? "Unable to find your mysql installation" "$LINENO" 5
fi
@@ -69829,7 +69771,7 @@ $as_echo "not found" >&6; }
as_ac_Lib=`$as_echo "ac_cv_lib_$PDO_MYSQL_LIBNAME''_mysql_commit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_commit in -l$PDO_MYSQL_LIBNAME" >&5
$as_echo_n "checking for mysql_commit in -l$PDO_MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -69864,8 +69806,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -70205,7 +70146,7 @@ else
as_ac_Lib=`$as_echo "ac_cv_lib_$PDO_MYSQL_LIBNAME''_mysql_commit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_commit in -l$PDO_MYSQL_LIBNAME" >&5
$as_echo_n "checking for mysql_commit in -l$PDO_MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -70240,8 +70181,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -70253,7 +70193,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$PDO_MYSQL_LIBNAME_mysql_commit
- as_fn_error "PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information." "$LINENO" 5
fi
@@ -70383,7 +70323,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$PDO_MYSQL_LIBNAME''_mysql_query" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
$as_echo_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -70418,8 +70358,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -70431,7 +70370,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$PDO_MYSQL_LIBNAME_mysql_query
- as_fn_error "Try adding --with-zlib-dir=<DIR>. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "Try adding --with-zlib-dir=<DIR>. Please check config.log for more information." "$LINENO" 5
fi
@@ -70578,7 +70517,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -70598,7 +70537,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -70911,7 +70850,7 @@ EOF
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_mysql to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_mysql shared or build pdo statically for the
@@ -70919,7 +70858,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_mysql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -70931,7 +70870,7 @@ but you've either not enabled pdo, or have disabled it.
is_it_shared=$PHP_MYSQLND_SHARED
is_it_enabled=$PHP_MYSQLND
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_mysql to build statically, but it
depends on extension mysqlnd, which you've configured to build shared.
You either need to build pdo_mysql shared or build mysqlnd statically for the
@@ -70939,7 +70878,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_mysql, which depends on extension mysqlnd,
but you've either not enabled mysqlnd, or have disabled it.
" "$LINENO" 5
@@ -71014,7 +70953,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PDO_OCI" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Oracle Install-Dir" >&5
@@ -71030,7 +70969,7 @@ $as_echo "$PHP_PDO_OCI" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if that is sane" >&5
$as_echo_n "checking if that is sane... " >&6; }
if test -z "$PDO_OCI_DIR"; then
- as_fn_error "
+ as_fn_error $? "
You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_HOME.
" "$LINENO" 5
else
@@ -71045,7 +70984,7 @@ $as_echo "yes" >&6; }
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
$as_echo_n "checking size of long int... " >&6; }
-if test "${ac_cv_sizeof_long_int+set}" = set; then :
+if ${ac_cv_sizeof_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
@@ -71054,9 +70993,8 @@ else
if test "$ac_cv_type_long_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_int=0
fi
@@ -71226,7 +71164,7 @@ $as_echo "$PDO_OCI_IC_PREFIX/sdk/include" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include" >&5
$as_echo "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include" >&6; }
else
- as_fn_error "I'm too dumb to figure out where the include dir is in your Instant Client install" "$LINENO" 5
+ as_fn_error $? "I'm too dumb to figure out where the include dir is in your Instant Client install" "$LINENO" 5
fi
if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then
PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib"
@@ -71235,7 +71173,7 @@ $as_echo "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include" >&6; }
elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ; then
PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX"
else
- as_fn_error "I'm too dumb to figure out where the libraries are in your Instant Client install" "$LINENO" 5
+ as_fn_error $? "I'm too dumb to figure out where the libraries are in your Instant Client install" "$LINENO" 5
fi
PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`"
else
@@ -71246,7 +71184,7 @@ $as_echo "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include" >&6; }
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
$as_echo_n "checking size of long int... " >&6; }
-if test "${ac_cv_sizeof_long_int+set}" = set; then :
+if ${ac_cv_sizeof_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
@@ -71255,9 +71193,8 @@ else
if test "$ac_cv_type_long_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_int=0
fi
@@ -71295,7 +71232,7 @@ $as_echo_n "checking OCI8 libraries dir... " >&6; }
elif test -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then
PDO_OCI_LIB_DIR=$TMP_PDO_OCI_LIB_DIR
else
- as_fn_error "Oracle required OCI8 libraries not found" "$LINENO" 5
+ as_fn_error $? "Oracle required OCI8 libraries not found" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDO_OCI_LIB_DIR" >&5
$as_echo "$PDO_OCI_LIB_DIR" >&6; }
@@ -71662,7 +71599,7 @@ $as_echo_n "checking Oracle version... " >&6; }
fi
done
if test -z "$PDO_OCI_VERSION"; then
- as_fn_error "Oracle required OCI8 libraries not found under $PDO_OCI_DIR" "$LINENO" 5
+ as_fn_error $? "Oracle required OCI8 libraries not found under $PDO_OCI_DIR" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDO_OCI_VERSION" >&5
$as_echo "$PDO_OCI_VERSION" >&6; }
@@ -71697,7 +71634,7 @@ $as_echo "$PDO_OCI_VERSION" >&6; }
;;
*)
- as_fn_error "Unsupported Oracle version $PDO_OCI_VERSION" "$LINENO" 5
+ as_fn_error $? "Unsupported Oracle version $PDO_OCI_VERSION" "$LINENO" 5
;;
esac
@@ -71839,7 +71776,7 @@ $as_echo "$PDO_OCI_VERSION" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
-if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
+if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -71873,7 +71810,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
-if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
+if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -71992,7 +71929,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvNlsCreate in -lclntsh" >&5
$as_echo_n "checking for OCIEnvNlsCreate in -lclntsh... " >&6; }
-if test "${ac_cv_lib_clntsh_OCIEnvNlsCreate+set}" = set; then :
+if ${ac_cv_lib_clntsh_OCIEnvNlsCreate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -72026,7 +71963,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvNlsCreate" >&5
$as_echo "$ac_cv_lib_clntsh_OCIEnvNlsCreate" >&6; }
-if test "x$ac_cv_lib_clntsh_OCIEnvNlsCreate" = x""yes; then :
+if test "x$ac_cv_lib_clntsh_OCIEnvNlsCreate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -72145,7 +72082,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCILobIsTemporary in -lclntsh" >&5
$as_echo_n "checking for OCILobIsTemporary in -lclntsh... " >&6; }
-if test "${ac_cv_lib_clntsh_OCILobIsTemporary+set}" = set; then :
+if ${ac_cv_lib_clntsh_OCILobIsTemporary+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -72179,7 +72116,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCILobIsTemporary" >&5
$as_echo "$ac_cv_lib_clntsh_OCILobIsTemporary" >&6; }
-if test "x$ac_cv_lib_clntsh_OCILobIsTemporary" = x""yes; then :
+if test "x$ac_cv_lib_clntsh_OCILobIsTemporary" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -72294,7 +72231,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCILobIsTemporary in -locijdbc8" >&5
$as_echo_n "checking for OCILobIsTemporary in -locijdbc8... " >&6; }
-if test "${ac_cv_lib_ocijdbc8_OCILobIsTemporary+set}" = set; then :
+if ${ac_cv_lib_ocijdbc8_OCILobIsTemporary+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -72328,7 +72265,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ocijdbc8_OCILobIsTemporary" >&5
$as_echo "$ac_cv_lib_ocijdbc8_OCILobIsTemporary" >&6; }
-if test "x$ac_cv_lib_ocijdbc8_OCILobIsTemporary" = x""yes; then :
+if test "x$ac_cv_lib_ocijdbc8_OCILobIsTemporary" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -72474,7 +72411,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCICollAssign in -lclntsh" >&5
$as_echo_n "checking for OCICollAssign in -lclntsh... " >&6; }
-if test "${ac_cv_lib_clntsh_OCICollAssign+set}" = set; then :
+if ${ac_cv_lib_clntsh_OCICollAssign+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -72508,7 +72445,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCICollAssign" >&5
$as_echo "$ac_cv_lib_clntsh_OCICollAssign" >&6; }
-if test "x$ac_cv_lib_clntsh_OCICollAssign" = x""yes; then :
+if test "x$ac_cv_lib_clntsh_OCICollAssign" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -72627,7 +72564,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIStmtFetch2 in -lclntsh" >&5
$as_echo_n "checking for OCIStmtFetch2 in -lclntsh... " >&6; }
-if test "${ac_cv_lib_clntsh_OCIStmtFetch2+set}" = set; then :
+if ${ac_cv_lib_clntsh_OCIStmtFetch2+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -72661,7 +72598,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIStmtFetch2" >&5
$as_echo "$ac_cv_lib_clntsh_OCIStmtFetch2" >&6; }
-if test "x$ac_cv_lib_clntsh_OCIStmtFetch2" = x""yes; then :
+if test "x$ac_cv_lib_clntsh_OCIStmtFetch2" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -72685,7 +72622,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -72705,7 +72642,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -73029,7 +72966,7 @@ EOF
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_oci to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_oci shared or build pdo statically for the
@@ -73037,7 +72974,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_oci, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -73107,14 +73044,14 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PDO_ODBC" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -73134,7 +73071,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -73182,7 +73119,7 @@ $as_echo_n "checking for selected PDO ODBC flavour... " >&6; }
;;
*)
- as_fn_error "Unknown ODBC flavour $pdo_odbc_flavour
+ as_fn_error $? "Unknown ODBC flavour $pdo_odbc_flavour
include and lib dirs are looked for under 'dir'.
'flavour' can be one of: ibm-db2, iODBC, unixODBC, generic
@@ -73493,7 +73430,7 @@ $as_echo "no" >&6; }
if test "$php_pdo_have_header" != "yes"; then
- as_fn_error "Cannot find header file(s) for pdo_odbc" "$LINENO" 5
+ as_fn_error $? "Cannot find header file(s) for pdo_odbc" "$LINENO" 5
fi
PDO_ODBC_INCLUDE="$pdo_odbc_def_cflags -I$PDO_ODBC_INCDIR -DPDO_ODBC_TYPE=\\\"$pdo_odbc_flavour\\\""
@@ -73687,7 +73624,7 @@ $as_echo "no" >&6; }
as_ac_Lib=`$as_echo "ac_cv_lib_$pdo_odbc_def_lib''_SQLBindCol" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
$as_echo_n "checking for SQLBindCol in -l$pdo_odbc_def_lib... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -73722,8 +73659,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -73826,7 +73762,7 @@ eval as_val=\$$as_ac_Lib
as_ac_Lib=`$as_echo "ac_cv_lib_$pdo_odbc_def_lib''_SQLAllocHandle" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
$as_echo_n "checking for SQLAllocHandle in -l$pdo_odbc_def_lib... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -73861,8 +73797,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -73874,7 +73809,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$pdo_odbc_def_lib_SQLAllocHandle
- as_fn_error "
+ as_fn_error $? "
Your ODBC library does not appear to be ODBC 3 compatible.
You should consider using iODBC or unixODBC instead, and loading your
libraries as a driver in that environment; it will emulate the
@@ -73891,7 +73826,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$pdo_odbc_def_lib_SQLBindCol
- as_fn_error "Your ODBC library does not exist or there was an error. Check config.log for more information" "$LINENO" 5
+ as_fn_error $? "Your ODBC library does not exist or there was an error. Check config.log for more information" "$LINENO" 5
fi
@@ -74199,7 +74134,7 @@ EOF
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_odbc to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_odbc shared or build pdo statically for the
@@ -74207,7 +74142,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_odbc, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -74265,7 +74200,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PDO_PGSQL" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
@@ -74328,15 +74263,15 @@ $as_echo "#define HAVE_PG_CONFIG_H 1" >>confdefs.h
fi
if test -z "$PGSQL_INCLUDE"; then
- as_fn_error "Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path" "$LINENO" 5
+ as_fn_error $? "Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path" "$LINENO" 5
fi
if test -z "$PGSQL_LIBDIR"; then
- as_fn_error "Cannot find libpq.so. Please specify correct PostgreSQL installation path" "$LINENO" 5
+ as_fn_error $? "Cannot find libpq.so. Please specify correct PostgreSQL installation path" "$LINENO" 5
fi
if test -z "$PGSQL_INCLUDE" -a -z "$PGSQL_LIBDIR" ; then
- as_fn_error "Unable to find libpq anywhere under $PGSQL_SEARCH_PATHS" "$LINENO" 5
+ as_fn_error $? "Unable to find libpq anywhere under $PGSQL_SEARCH_PATHS" "$LINENO" 5
fi
@@ -74353,7 +74288,7 @@ $as_echo "yes" >&6; }
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
@@ -74403,7 +74338,7 @@ $as_echo "no" >&6; }
LDFLAGS="-L$PGSQL_LIBDIR $LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQparameterStatus in -lpq" >&5
$as_echo_n "checking for PQparameterStatus in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQparameterStatus+set}" = set; then :
+if ${ac_cv_lib_pq_PQparameterStatus+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -74437,7 +74372,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQparameterStatus" >&5
$as_echo "$ac_cv_lib_pq_PQparameterStatus" >&6; }
-if test "x$ac_cv_lib_pq_PQparameterStatus" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQparameterStatus" = xyes; then :
$as_echo "#define HAVE_PQPARAMETERSTATUS 1" >>confdefs.h
@@ -74451,7 +74386,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQprepare in -lpq" >&5
$as_echo_n "checking for PQprepare in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQprepare+set}" = set; then :
+if ${ac_cv_lib_pq_PQprepare+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -74485,7 +74420,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQprepare" >&5
$as_echo "$ac_cv_lib_pq_PQprepare" >&6; }
-if test "x$ac_cv_lib_pq_PQprepare" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQprepare" = xyes; then :
$as_echo "#define HAVE_PQPREPARE 1" >>confdefs.h
@@ -74493,7 +74428,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeStringConn in -lpq" >&5
$as_echo_n "checking for PQescapeStringConn in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQescapeStringConn+set}" = set; then :
+if ${ac_cv_lib_pq_PQescapeStringConn+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -74527,7 +74462,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeStringConn" >&5
$as_echo "$ac_cv_lib_pq_PQescapeStringConn" >&6; }
-if test "x$ac_cv_lib_pq_PQescapeStringConn" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQescapeStringConn" = xyes; then :
$as_echo "#define HAVE_PQESCAPE_CONN 1" >>confdefs.h
@@ -74535,7 +74470,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeByteaConn in -lpq" >&5
$as_echo_n "checking for PQescapeByteaConn in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQescapeByteaConn+set}" = set; then :
+if ${ac_cv_lib_pq_PQescapeByteaConn+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -74569,7 +74504,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeByteaConn" >&5
$as_echo "$ac_cv_lib_pq_PQescapeByteaConn" >&6; }
-if test "x$ac_cv_lib_pq_PQescapeByteaConn" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQescapeByteaConn" = xyes; then :
$as_echo "#define HAVE_PQESCAPE_BYTEA_CONN 1" >>confdefs.h
@@ -74578,7 +74513,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pg_encoding_to_char in -lpq" >&5
$as_echo_n "checking for pg_encoding_to_char in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_pg_encoding_to_char+set}" = set; then :
+if ${ac_cv_lib_pq_pg_encoding_to_char+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -74612,7 +74547,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_pg_encoding_to_char" >&5
$as_echo "$ac_cv_lib_pq_pg_encoding_to_char" >&6; }
-if test "x$ac_cv_lib_pq_pg_encoding_to_char" = x""yes; then :
+if test "x$ac_cv_lib_pq_pg_encoding_to_char" = xyes; then :
$as_echo "#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1" >>confdefs.h
@@ -74760,7 +74695,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -74780,7 +74715,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -75084,7 +75019,7 @@ EOF
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_pgsql to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_pgsql shared or build pdo statically for the
@@ -75092,7 +75027,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_pgsql, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -75150,14 +75085,14 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_PDO_SQLITE" != "no"; then
if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
- as_fn_error "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
+ as_fn_error $? "PDO is not enabled! Add --enable-pdo to your configure line." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDO includes" >&5
$as_echo_n "checking for PDO includes... " >&6; }
-if test "${pdo_cv_inc_path+set}" = set; then :
+if ${pdo_cv_inc_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -75177,7 +75112,7 @@ $as_echo "$pdo_cv_inc_path" >&6; }
if test -n "$pdo_cv_inc_path"; then
:
else
-as_fn_error "Cannot find php_pdo_driver.h." "$LINENO" 5
+as_fn_error $? "Cannot find php_pdo_driver.h." "$LINENO" 5
fi
@@ -75203,7 +75138,7 @@ $as_echo "found in $i" >&6; }
if test -z "$PDO_SQLITE_DIR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Please reinstall the sqlite3 distribution" "$LINENO" 5
+ as_fn_error $? "Please reinstall the sqlite3 distribution" "$LINENO" 5
fi
@@ -75341,7 +75276,7 @@ $as_echo "not found" >&6; }
as_ac_Lib=`$as_echo "ac_cv_lib_$LIBNAME''_$LIBSYMBOL" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBSYMBOL in -l$LIBNAME" >&5
$as_echo_n "checking for $LIBSYMBOL in -l$LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -75376,8 +75311,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -75490,7 +75424,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$LIBNAME_$LIBSYMBOL
- as_fn_error "wrong sqlite lib version or lib not found" "$LINENO" 5
+ as_fn_error $? "wrong sqlite lib version or lib not found" "$LINENO" 5
fi
@@ -75592,7 +75526,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_key in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_key in -lsqlite3... " >&6; }
-if test "${ac_cv_lib_sqlite3_sqlite3_key+set}" = set; then :
+if ${ac_cv_lib_sqlite3_sqlite3_key+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -75626,7 +75560,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_key" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_key" >&6; }
-if test "x$ac_cv_lib_sqlite3_sqlite3_key" = x""yes; then :
+if test "x$ac_cv_lib_sqlite3_sqlite3_key" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -76304,7 +76238,7 @@ EOF
is_it_shared=$PHP_SQLITE3_SHARED
is_it_enabled=$PHP_SQLITE3
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_sqlite to build statically, but it
depends on extension sqlite3, which you've configured to build shared.
You either need to build pdo_sqlite shared or build sqlite3 statically for the
@@ -76312,7 +76246,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_sqlite, which depends on extension sqlite3,
but you've either not enabled sqlite3, or have disabled it.
" "$LINENO" 5
@@ -76354,8 +76288,7 @@ but you've either not enabled sqlite3, or have disabled it.
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -76366,7 +76299,7 @@ done
for ac_header in time.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
-if test "x$ac_cv_header_time_h" = x""yes; then :
+if test "x$ac_cv_header_time_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_TIME_H 1
_ACEOF
@@ -76474,7 +76407,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync in -lrt" >&5
$as_echo_n "checking for fdatasync in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_fdatasync+set}" = set; then :
+if ${ac_cv_lib_rt_fdatasync+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76508,7 +76441,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_fdatasync" >&5
$as_echo "$ac_cv_lib_rt_fdatasync" >&6; }
-if test "x$ac_cv_lib_rt_fdatasync" = x""yes; then :
+if test "x$ac_cv_lib_rt_fdatasync" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -76552,7 +76485,7 @@ fi
is_it_shared=$PHP_PDO_SHARED
is_it_enabled=$PHP_PDO
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_sqlite to build statically, but it
depends on extension pdo, which you've configured to build shared.
You either need to build pdo_sqlite shared or build pdo statically for the
@@ -76560,7 +76493,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension pdo_sqlite, which depends on extension pdo,
but you've either not enabled pdo, or have disabled it.
" "$LINENO" 5
@@ -76678,15 +76611,15 @@ $as_echo "#define HAVE_PG_CONFIG_H 1" >>confdefs.h
fi
if test -z "$PGSQL_INCLUDE"; then
- as_fn_error "Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path" "$LINENO" 5
+ as_fn_error $? "Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path" "$LINENO" 5
fi
if test -z "$PGSQL_LIBDIR"; then
- as_fn_error "Cannot find libpq.so. Please specify correct PostgreSQL installation path" "$LINENO" 5
+ as_fn_error $? "Cannot find libpq.so. Please specify correct PostgreSQL installation path" "$LINENO" 5
fi
if test -z "$PGSQL_INCLUDE" -a -z "$PGSQL_LIBDIR" ; then
- as_fn_error "Unable to find libpq anywhere under $PGSQL_SEARCH_PATHS" "$LINENO" 5
+ as_fn_error $? "Unable to find libpq anywhere under $PGSQL_SEARCH_PATHS" "$LINENO" 5
fi
@@ -76697,7 +76630,7 @@ $as_echo "#define HAVE_PGSQL 1" >>confdefs.h
LDFLAGS="-L$PGSQL_LIBDIR $LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeString in -lpq" >&5
$as_echo_n "checking for PQescapeString in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQescapeString+set}" = set; then :
+if ${ac_cv_lib_pq_PQescapeString+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76731,7 +76664,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeString" >&5
$as_echo "$ac_cv_lib_pq_PQescapeString" >&6; }
-if test "x$ac_cv_lib_pq_PQescapeString" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQescapeString" = xyes; then :
$as_echo "#define HAVE_PQESCAPE 1" >>confdefs.h
@@ -76739,7 +76672,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQunescapeBytea in -lpq" >&5
$as_echo_n "checking for PQunescapeBytea in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQunescapeBytea+set}" = set; then :
+if ${ac_cv_lib_pq_PQunescapeBytea+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76773,7 +76706,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQunescapeBytea" >&5
$as_echo "$ac_cv_lib_pq_PQunescapeBytea" >&6; }
-if test "x$ac_cv_lib_pq_PQunescapeBytea" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQunescapeBytea" = xyes; then :
$as_echo "#define HAVE_PQUNESCAPEBYTEA 1" >>confdefs.h
@@ -76781,7 +76714,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsetnonblocking in -lpq" >&5
$as_echo_n "checking for PQsetnonblocking in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQsetnonblocking+set}" = set; then :
+if ${ac_cv_lib_pq_PQsetnonblocking+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76815,7 +76748,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsetnonblocking" >&5
$as_echo "$ac_cv_lib_pq_PQsetnonblocking" >&6; }
-if test "x$ac_cv_lib_pq_PQsetnonblocking" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQsetnonblocking" = xyes; then :
$as_echo "#define HAVE_PQSETNONBLOCKING 1" >>confdefs.h
@@ -76823,7 +76756,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQcmdTuples in -lpq" >&5
$as_echo_n "checking for PQcmdTuples in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQcmdTuples+set}" = set; then :
+if ${ac_cv_lib_pq_PQcmdTuples+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76857,7 +76790,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQcmdTuples" >&5
$as_echo "$ac_cv_lib_pq_PQcmdTuples" >&6; }
-if test "x$ac_cv_lib_pq_PQcmdTuples" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQcmdTuples" = xyes; then :
$as_echo "#define HAVE_PQCMDTUPLES 1" >>confdefs.h
@@ -76865,7 +76798,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQoidValue in -lpq" >&5
$as_echo_n "checking for PQoidValue in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQoidValue+set}" = set; then :
+if ${ac_cv_lib_pq_PQoidValue+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76899,7 +76832,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQoidValue" >&5
$as_echo "$ac_cv_lib_pq_PQoidValue" >&6; }
-if test "x$ac_cv_lib_pq_PQoidValue" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQoidValue" = xyes; then :
$as_echo "#define HAVE_PQOIDVALUE 1" >>confdefs.h
@@ -76907,7 +76840,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQclientEncoding in -lpq" >&5
$as_echo_n "checking for PQclientEncoding in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQclientEncoding+set}" = set; then :
+if ${ac_cv_lib_pq_PQclientEncoding+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76941,7 +76874,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQclientEncoding" >&5
$as_echo "$ac_cv_lib_pq_PQclientEncoding" >&6; }
-if test "x$ac_cv_lib_pq_PQclientEncoding" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQclientEncoding" = xyes; then :
$as_echo "#define HAVE_PQCLIENTENCODING 1" >>confdefs.h
@@ -76949,7 +76882,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQparameterStatus in -lpq" >&5
$as_echo_n "checking for PQparameterStatus in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQparameterStatus+set}" = set; then :
+if ${ac_cv_lib_pq_PQparameterStatus+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -76983,7 +76916,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQparameterStatus" >&5
$as_echo "$ac_cv_lib_pq_PQparameterStatus" >&6; }
-if test "x$ac_cv_lib_pq_PQparameterStatus" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQparameterStatus" = xyes; then :
$as_echo "#define HAVE_PQPARAMETERSTATUS 1" >>confdefs.h
@@ -76991,7 +76924,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQprotocolVersion in -lpq" >&5
$as_echo_n "checking for PQprotocolVersion in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQprotocolVersion+set}" = set; then :
+if ${ac_cv_lib_pq_PQprotocolVersion+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77025,7 +76958,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQprotocolVersion" >&5
$as_echo "$ac_cv_lib_pq_PQprotocolVersion" >&6; }
-if test "x$ac_cv_lib_pq_PQprotocolVersion" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQprotocolVersion" = xyes; then :
$as_echo "#define HAVE_PQPROTOCOLVERSION 1" >>confdefs.h
@@ -77033,7 +76966,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQtransactionStatus in -lpq" >&5
$as_echo_n "checking for PQtransactionStatus in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQtransactionStatus+set}" = set; then :
+if ${ac_cv_lib_pq_PQtransactionStatus+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77067,7 +77000,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQtransactionStatus" >&5
$as_echo "$ac_cv_lib_pq_PQtransactionStatus" >&6; }
-if test "x$ac_cv_lib_pq_PQtransactionStatus" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQtransactionStatus" = xyes; then :
$as_echo "#define HAVE_PGTRANSACTIONSTATUS 1" >>confdefs.h
@@ -77075,7 +77008,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQexecParams in -lpq" >&5
$as_echo_n "checking for PQexecParams in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQexecParams+set}" = set; then :
+if ${ac_cv_lib_pq_PQexecParams+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77109,7 +77042,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQexecParams" >&5
$as_echo "$ac_cv_lib_pq_PQexecParams" >&6; }
-if test "x$ac_cv_lib_pq_PQexecParams" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQexecParams" = xyes; then :
$as_echo "#define HAVE_PQEXECPARAMS 1" >>confdefs.h
@@ -77117,7 +77050,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQprepare in -lpq" >&5
$as_echo_n "checking for PQprepare in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQprepare+set}" = set; then :
+if ${ac_cv_lib_pq_PQprepare+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77151,7 +77084,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQprepare" >&5
$as_echo "$ac_cv_lib_pq_PQprepare" >&6; }
-if test "x$ac_cv_lib_pq_PQprepare" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQprepare" = xyes; then :
$as_echo "#define HAVE_PQPREPARE 1" >>confdefs.h
@@ -77159,7 +77092,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQexecPrepared in -lpq" >&5
$as_echo_n "checking for PQexecPrepared in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQexecPrepared+set}" = set; then :
+if ${ac_cv_lib_pq_PQexecPrepared+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77193,7 +77126,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQexecPrepared" >&5
$as_echo "$ac_cv_lib_pq_PQexecPrepared" >&6; }
-if test "x$ac_cv_lib_pq_PQexecPrepared" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQexecPrepared" = xyes; then :
$as_echo "#define HAVE_PQEXECPREPARED 1" >>confdefs.h
@@ -77201,7 +77134,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQresultErrorField in -lpq" >&5
$as_echo_n "checking for PQresultErrorField in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQresultErrorField+set}" = set; then :
+if ${ac_cv_lib_pq_PQresultErrorField+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77235,7 +77168,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQresultErrorField" >&5
$as_echo "$ac_cv_lib_pq_PQresultErrorField" >&6; }
-if test "x$ac_cv_lib_pq_PQresultErrorField" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQresultErrorField" = xyes; then :
$as_echo "#define HAVE_PQRESULTERRORFIELD 1" >>confdefs.h
@@ -77243,7 +77176,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryParams in -lpq" >&5
$as_echo_n "checking for PQsendQueryParams in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQsendQueryParams+set}" = set; then :
+if ${ac_cv_lib_pq_PQsendQueryParams+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77277,7 +77210,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryParams" >&5
$as_echo "$ac_cv_lib_pq_PQsendQueryParams" >&6; }
-if test "x$ac_cv_lib_pq_PQsendQueryParams" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQsendQueryParams" = xyes; then :
$as_echo "#define HAVE_PQSENDQUERYPARAMS 1" >>confdefs.h
@@ -77285,7 +77218,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendPrepare in -lpq" >&5
$as_echo_n "checking for PQsendPrepare in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQsendPrepare+set}" = set; then :
+if ${ac_cv_lib_pq_PQsendPrepare+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77319,7 +77252,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendPrepare" >&5
$as_echo "$ac_cv_lib_pq_PQsendPrepare" >&6; }
-if test "x$ac_cv_lib_pq_PQsendPrepare" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQsendPrepare" = xyes; then :
$as_echo "#define HAVE_PQSENDPREPARE 1" >>confdefs.h
@@ -77327,7 +77260,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
+if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77361,7 +77294,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
-if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
$as_echo "#define HAVE_PQSENDQUERYPREPARED 1" >>confdefs.h
@@ -77369,7 +77302,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQputCopyData in -lpq" >&5
$as_echo_n "checking for PQputCopyData in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQputCopyData+set}" = set; then :
+if ${ac_cv_lib_pq_PQputCopyData+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77403,7 +77336,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQputCopyData" >&5
$as_echo "$ac_cv_lib_pq_PQputCopyData" >&6; }
-if test "x$ac_cv_lib_pq_PQputCopyData" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQputCopyData" = xyes; then :
$as_echo "#define HAVE_PQPUTCOPYDATA 1" >>confdefs.h
@@ -77411,7 +77344,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQputCopyEnd in -lpq" >&5
$as_echo_n "checking for PQputCopyEnd in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQputCopyEnd+set}" = set; then :
+if ${ac_cv_lib_pq_PQputCopyEnd+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77445,7 +77378,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQputCopyEnd" >&5
$as_echo "$ac_cv_lib_pq_PQputCopyEnd" >&6; }
-if test "x$ac_cv_lib_pq_PQputCopyEnd" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQputCopyEnd" = xyes; then :
$as_echo "#define HAVE_PQPUTCOPYEND 1" >>confdefs.h
@@ -77453,7 +77386,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQgetCopyData in -lpq" >&5
$as_echo_n "checking for PQgetCopyData in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQgetCopyData+set}" = set; then :
+if ${ac_cv_lib_pq_PQgetCopyData+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77487,7 +77420,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQgetCopyData" >&5
$as_echo "$ac_cv_lib_pq_PQgetCopyData" >&6; }
-if test "x$ac_cv_lib_pq_PQgetCopyData" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQgetCopyData" = xyes; then :
$as_echo "#define HAVE_PQGETCOPYDATA 1" >>confdefs.h
@@ -77495,7 +77428,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQfreemem in -lpq" >&5
$as_echo_n "checking for PQfreemem in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQfreemem+set}" = set; then :
+if ${ac_cv_lib_pq_PQfreemem+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77529,7 +77462,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQfreemem" >&5
$as_echo "$ac_cv_lib_pq_PQfreemem" >&6; }
-if test "x$ac_cv_lib_pq_PQfreemem" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQfreemem" = xyes; then :
$as_echo "#define HAVE_PQFREEMEM 1" >>confdefs.h
@@ -77537,7 +77470,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsetErrorVerbosity in -lpq" >&5
$as_echo_n "checking for PQsetErrorVerbosity in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQsetErrorVerbosity+set}" = set; then :
+if ${ac_cv_lib_pq_PQsetErrorVerbosity+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77571,7 +77504,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsetErrorVerbosity" >&5
$as_echo "$ac_cv_lib_pq_PQsetErrorVerbosity" >&6; }
-if test "x$ac_cv_lib_pq_PQsetErrorVerbosity" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQsetErrorVerbosity" = xyes; then :
$as_echo "#define HAVE_PQSETERRORVERBOSITY 1" >>confdefs.h
@@ -77579,7 +77512,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQftable in -lpq" >&5
$as_echo_n "checking for PQftable in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQftable+set}" = set; then :
+if ${ac_cv_lib_pq_PQftable+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77613,7 +77546,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQftable" >&5
$as_echo "$ac_cv_lib_pq_PQftable" >&6; }
-if test "x$ac_cv_lib_pq_PQftable" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQftable" = xyes; then :
$as_echo "#define HAVE_PQFTABLE 1" >>confdefs.h
@@ -77621,7 +77554,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeStringConn in -lpq" >&5
$as_echo_n "checking for PQescapeStringConn in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQescapeStringConn+set}" = set; then :
+if ${ac_cv_lib_pq_PQescapeStringConn+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77655,7 +77588,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeStringConn" >&5
$as_echo "$ac_cv_lib_pq_PQescapeStringConn" >&6; }
-if test "x$ac_cv_lib_pq_PQescapeStringConn" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQescapeStringConn" = xyes; then :
$as_echo "#define HAVE_PQESCAPE_CONN 1" >>confdefs.h
@@ -77663,7 +77596,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeByteaConn in -lpq" >&5
$as_echo_n "checking for PQescapeByteaConn in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQescapeByteaConn+set}" = set; then :
+if ${ac_cv_lib_pq_PQescapeByteaConn+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77697,7 +77630,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeByteaConn" >&5
$as_echo "$ac_cv_lib_pq_PQescapeByteaConn" >&6; }
-if test "x$ac_cv_lib_pq_PQescapeByteaConn" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQescapeByteaConn" = xyes; then :
$as_echo "#define HAVE_PQESCAPE_BYTEA_CONN 1" >>confdefs.h
@@ -77705,7 +77638,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pg_encoding_to_char in -lpq" >&5
$as_echo_n "checking for pg_encoding_to_char in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_pg_encoding_to_char+set}" = set; then :
+if ${ac_cv_lib_pq_pg_encoding_to_char+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77739,7 +77672,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_pg_encoding_to_char" >&5
$as_echo "$ac_cv_lib_pq_pg_encoding_to_char" >&6; }
-if test "x$ac_cv_lib_pq_pg_encoding_to_char" = x""yes; then :
+if test "x$ac_cv_lib_pq_pg_encoding_to_char" = xyes; then :
$as_echo "#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1" >>confdefs.h
@@ -77747,7 +77680,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lo_create in -lpq" >&5
$as_echo_n "checking for lo_create in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_lo_create+set}" = set; then :
+if ${ac_cv_lib_pq_lo_create+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77781,7 +77714,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_lo_create" >&5
$as_echo "$ac_cv_lib_pq_lo_create" >&6; }
-if test "x$ac_cv_lib_pq_lo_create" = x""yes; then :
+if test "x$ac_cv_lib_pq_lo_create" = xyes; then :
$as_echo "#define HAVE_PG_LO_CREATE 1" >>confdefs.h
@@ -77789,7 +77722,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lo_import_with_oid in -lpq" >&5
$as_echo_n "checking for lo_import_with_oid in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_lo_import_with_oid+set}" = set; then :
+if ${ac_cv_lib_pq_lo_import_with_oid+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77823,7 +77756,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_lo_import_with_oid" >&5
$as_echo "$ac_cv_lib_pq_lo_import_with_oid" >&6; }
-if test "x$ac_cv_lib_pq_lo_import_with_oid" = x""yes; then :
+if test "x$ac_cv_lib_pq_lo_import_with_oid" = xyes; then :
$as_echo "#define HAVE_PG_LO_IMPORT_WITH_OID 1" >>confdefs.h
@@ -77831,7 +77764,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeLiteral in -lpq" >&5
$as_echo_n "checking for PQescapeLiteral in -lpq... " >&6; }
-if test "${ac_cv_lib_pq_PQescapeLiteral+set}" = set; then :
+if ${ac_cv_lib_pq_PQescapeLiteral+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -77865,7 +77798,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeLiteral" >&5
$as_echo "$ac_cv_lib_pq_PQescapeLiteral" >&6; }
-if test "x$ac_cv_lib_pq_PQescapeLiteral" = x""yes; then :
+if test "x$ac_cv_lib_pq_PQescapeLiteral" = xyes; then :
$as_echo "#define HAVE_PQESCAPELITERAL 1" >>confdefs.h
@@ -78675,7 +78608,7 @@ $as_echo "no" >&6; }
is_it_shared=$PHP_HASH_SHARED
is_it_enabled=$PHP_HASH
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension phar to build statically, but it
depends on extension hash, which you've configured to build shared.
You either need to build phar shared or build hash statically for the
@@ -78683,7 +78616,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension phar, which depends on extension hash,
but you've either not enabled hash, or have disabled it.
" "$LINENO" 5
@@ -78694,7 +78627,7 @@ but you've either not enabled hash, or have disabled it.
is_it_shared=$PHP_SPL_SHARED
is_it_enabled=$PHP_SPL
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension phar to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build phar shared or build spl statically for the
@@ -78702,7 +78635,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension phar, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
@@ -79062,7 +78995,7 @@ EOF
for ac_header in sys/mkdev.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
+if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_MKDEV_H 1
_ACEOF
@@ -79076,8 +79009,7 @@ done
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -79128,7 +79060,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utsname.domainname" >&5
$as_echo_n "checking for utsname.domainname... " >&6; }
-if test "${ac_cv_have_utsname_domainname+set}" = set; then :
+if ${ac_cv_have_utsname_domainname+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -79525,7 +79457,7 @@ EOF
done
if test -z "$PSPELL_DIR"; then
- as_fn_error "Cannot find pspell" "$LINENO" 5
+ as_fn_error $? "Cannot find pspell" "$LINENO" 5
fi
PSPELL_LIBDIR=$PSPELL_DIR/$PHP_LIBDIR
@@ -79727,7 +79659,7 @@ EOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for new_aspell_config in -laspell" >&5
$as_echo_n "checking for new_aspell_config in -laspell... " >&6; }
-if test "${ac_cv_lib_aspell_new_aspell_config+set}" = set; then :
+if ${ac_cv_lib_aspell_new_aspell_config+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -79761,7 +79693,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aspell_new_aspell_config" >&5
$as_echo "$ac_cv_lib_aspell_new_aspell_config" >&6; }
-if test "x$ac_cv_lib_aspell_new_aspell_config" = x""yes; then :
+if test "x$ac_cv_lib_aspell_new_aspell_config" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -80015,7 +79947,7 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
done
if test -z "$READLINE_DIR"; then
- as_fn_error "Please reinstall readline - I cannot find readline.h" "$LINENO" 5
+ as_fn_error $? "Please reinstall readline - I cannot find readline.h" "$LINENO" 5
fi
@@ -80053,7 +79985,7 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
PHP_READLINE_LIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
$as_echo_n "checking for tgetent in -lncurses... " >&6; }
-if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then :
+if ${ac_cv_lib_ncurses_tgetent+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80087,7 +80019,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
-if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
@@ -80118,7 +80050,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
-if test "${ac_cv_lib_termcap_tgetent+set}" = set; then :
+if ${ac_cv_lib_termcap_tgetent+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80152,7 +80084,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
-if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
@@ -80284,7 +80216,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
$as_echo_n "checking for readline in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_readline+set}" = set; then :
+if ${ac_cv_lib_readline_readline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80318,7 +80250,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
$as_echo "$ac_cv_lib_readline_readline" >&6; }
-if test "x$ac_cv_lib_readline_readline" = x""yes; then :
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -80428,7 +80360,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_readline_readline
- as_fn_error "readline library not found" "$LINENO" 5
+ as_fn_error $? "readline library not found" "$LINENO" 5
fi
@@ -80533,7 +80465,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pending_input in -lreadline" >&5
$as_echo_n "checking for rl_pending_input in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_rl_pending_input+set}" = set; then :
+if ${ac_cv_lib_readline_rl_pending_input+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80567,7 +80499,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pending_input" >&5
$as_echo "$ac_cv_lib_readline_rl_pending_input" >&6; }
-if test "x$ac_cv_lib_readline_rl_pending_input" = x""yes; then :
+if test "x$ac_cv_lib_readline_rl_pending_input" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -80579,7 +80511,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_readline_rl_pending_input
- as_fn_error "invalid readline installation detected. Try --with-libedit instead." "$LINENO" 5
+ as_fn_error $? "invalid readline installation detected. Try --with-libedit instead." "$LINENO" 5
fi
@@ -80684,7 +80616,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_read_char in -lreadline" >&5
$as_echo_n "checking for rl_callback_read_char in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_rl_callback_read_char+set}" = set; then :
+if ${ac_cv_lib_readline_rl_callback_read_char+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80718,7 +80650,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_read_char" >&5
$as_echo "$ac_cv_lib_readline_rl_callback_read_char" >&6; }
-if test "x$ac_cv_lib_readline_rl_callback_read_char" = x""yes; then :
+if test "x$ac_cv_lib_readline_rl_callback_read_char" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -80837,7 +80769,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_on_new_line in -ledit" >&5
$as_echo_n "checking for rl_on_new_line in -ledit... " >&6; }
-if test "${ac_cv_lib_edit_rl_on_new_line+set}" = set; then :
+if ${ac_cv_lib_edit_rl_on_new_line+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80871,7 +80803,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_rl_on_new_line" >&5
$as_echo "$ac_cv_lib_edit_rl_on_new_line" >&6; }
-if test "x$ac_cv_lib_edit_rl_on_new_line" = x""yes; then :
+if test "x$ac_cv_lib_edit_rl_on_new_line" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -80902,7 +80834,7 @@ elif test "$PHP_LIBEDIT" != "no"; then
done
if test -z "$LIBEDIT_DIR"; then
- as_fn_error "Please reinstall libedit - I cannot find readline.h" "$LINENO" 5
+ as_fn_error $? "Please reinstall libedit - I cannot find readline.h" "$LINENO" 5
fi
@@ -80939,7 +80871,7 @@ elif test "$PHP_LIBEDIT" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
$as_echo_n "checking for tgetent in -lncurses... " >&6; }
-if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then :
+if ${ac_cv_lib_ncurses_tgetent+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -80973,7 +80905,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
-if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
@@ -81003,7 +80935,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
-if test "${ac_cv_lib_termcap_tgetent+set}" = set; then :
+if ${ac_cv_lib_termcap_tgetent+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -81037,7 +80969,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
-if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
@@ -81168,7 +81100,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5
$as_echo_n "checking for readline in -ledit... " >&6; }
-if test "${ac_cv_lib_edit_readline+set}" = set; then :
+if ${ac_cv_lib_edit_readline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -81202,7 +81134,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5
$as_echo "$ac_cv_lib_edit_readline" >&6; }
-if test "x$ac_cv_lib_edit_readline" = x""yes; then :
+if test "x$ac_cv_lib_edit_readline" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -81312,7 +81244,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_edit_readline
- as_fn_error "edit library required by readline not found" "$LINENO" 5
+ as_fn_error $? "edit library required by readline not found" "$LINENO" 5
fi
@@ -81417,7 +81349,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_read_char in -ledit" >&5
$as_echo_n "checking for rl_callback_read_char in -ledit... " >&6; }
-if test "${ac_cv_lib_edit_rl_callback_read_char+set}" = set; then :
+if ${ac_cv_lib_edit_rl_callback_read_char+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -81451,7 +81383,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_rl_callback_read_char" >&5
$as_echo "$ac_cv_lib_edit_rl_callback_read_char" >&6; }
-if test "x$ac_cv_lib_edit_rl_callback_read_char" = x""yes; then :
+if test "x$ac_cv_lib_edit_rl_callback_read_char" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -81570,7 +81502,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_on_new_line in -ledit" >&5
$as_echo_n "checking for rl_on_new_line in -ledit... " >&6; }
-if test "${ac_cv_lib_edit_rl_on_new_line+set}" = set; then :
+if ${ac_cv_lib_edit_rl_on_new_line+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -81604,7 +81536,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_rl_on_new_line" >&5
$as_echo "$ac_cv_lib_edit_rl_on_new_line" >&6; }
-if test "x$ac_cv_lib_edit_rl_on_new_line" = x""yes; then :
+if test "x$ac_cv_lib_edit_rl_on_new_line" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -81633,7 +81565,7 @@ if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
for ac_func in rl_completion_matches
do :
ac_fn_c_check_func "$LINENO" "rl_completion_matches" "ac_cv_func_rl_completion_matches"
-if test "x$ac_cv_func_rl_completion_matches" = x""yes; then :
+if test "x$ac_cv_func_rl_completion_matches" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_RL_COMPLETION_MATCHES 1
_ACEOF
@@ -82008,7 +81940,7 @@ if test "$PHP_RECODE" != "no"; then
done
if test -z "$RECODE_DIR"; then
- as_fn_error "Can not find recode.h anywhere under $RECODE_LIST." "$LINENO" 5
+ as_fn_error $? "Can not find recode.h anywhere under $RECODE_LIST." "$LINENO" 5
fi
@@ -82110,7 +82042,7 @@ if test "$PHP_RECODE" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recode_format_table in -lrecode" >&5
$as_echo_n "checking for recode_format_table in -lrecode... " >&6; }
-if test "${ac_cv_lib_recode_recode_format_table+set}" = set; then :
+if ${ac_cv_lib_recode_recode_format_table+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -82144,7 +82076,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_recode_recode_format_table" >&5
$as_echo "$ac_cv_lib_recode_recode_format_table" >&6; }
-if test "x$ac_cv_lib_recode_recode_format_table" = x""yes; then :
+if test "x$ac_cv_lib_recode_recode_format_table" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -82378,7 +82310,7 @@ $as_echo "#define HAVE_BROKEN_RECODE 1" >>confdefs.h
else
- as_fn_error "I cannot link librecode (-L$RECODE_DIR/$RECODE_LIB -lrecode). Is it installed?" "$LINENO" 5
+ as_fn_error $? "I cannot link librecode (-L$RECODE_DIR/$RECODE_LIB -lrecode). Is it installed?" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -82430,7 +82362,7 @@ $as_echo "#define HAVE_LIBRECODE 1" >>confdefs.h
for ac_header in stdbool.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdbool_h" = x""yes; then :
+if test "x$ac_cv_header_stdbool_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDBOOL_H 1
_ACEOF
@@ -83105,7 +83037,7 @@ if test "$PHP_SESSION" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pwrite works" >&5
$as_echo_n "checking whether pwrite works... " >&6; }
-if test "${ac_cv_pwrite+set}" = set; then :
+if ${ac_cv_pwrite+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -83215,7 +83147,7 @@ $as_echo "#define PHP_PWRITE_64 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pread works" >&5
$as_echo_n "checking whether pread works... " >&6; }
-if test "${ac_cv_pread+set}" = set; then :
+if ${ac_cv_pread+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -83622,7 +83554,7 @@ EOF
is_it_shared=$PHP_HASH_SHARED
is_it_enabled=$PHP_HASH
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension session to build statically, but it
depends on extension hash, which you've configured to build shared.
You either need to build session shared or build hash statically for the
@@ -83630,7 +83562,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension session, which depends on extension hash,
but you've either not enabled hash, or have disabled it.
" "$LINENO" 5
@@ -83641,7 +83573,7 @@ but you've either not enabled hash, or have disabled it.
is_it_shared=$PHP_SPL_SHARED
is_it_enabled=$PHP_SPL
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension session to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build session shared or build spl statically for the
@@ -83649,7 +83581,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension session, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
@@ -83689,7 +83621,7 @@ if test "$PHP_MM" != "no"; then
done
if test -z "$MM_DIR" ; then
- as_fn_error "cannot find mm library" "$LINENO" 5
+ as_fn_error $? "cannot find mm library" "$LINENO" 5
fi
@@ -84260,13 +84192,13 @@ fi
if test "$PHP_SIMPLEXML" != "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "SimpleXML extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "SimpleXML extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -84424,7 +84356,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -84462,7 +84394,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -84782,10 +84714,10 @@ EOF
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
fi
@@ -84794,7 +84726,7 @@ else
is_it_shared=$PHP_LIBXML_SHARED
is_it_enabled=$PHP_LIBXML
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension simplexml to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build simplexml shared or build libxml statically for the
@@ -84802,7 +84734,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension simplexml, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
@@ -84813,7 +84745,7 @@ but you've either not enabled libxml, or have disabled it.
is_it_shared=$PHP_SPL_SHARED
is_it_enabled=$PHP_SPL
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension simplexml to build statically, but it
depends on extension spl, which you've configured to build shared.
You either need to build simplexml shared or build spl statically for the
@@ -84821,7 +84753,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension simplexml, which depends on extension spl,
but you've either not enabled spl, or have disabled it.
" "$LINENO" 5
@@ -84906,7 +84838,7 @@ if test "$PHP_SNMP" != "no"; then
set dummy net-snmp-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then :
+if ${ac_cv_path_SNMP_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $SNMP_CONFIG in
@@ -85081,13 +85013,13 @@ fi
SNMP_LIBNAME=netsnmp
else
- as_fn_error "Could not find the required paths. Please check your net-snmp installation." "$LINENO" 5
+ as_fn_error $? "Could not find the required paths. Please check your net-snmp installation." "$LINENO" 5
fi
else
- as_fn_error "Net-SNMP version 5.3 or greater reqired (detected $snmp_full_version)." "$LINENO" 5
+ as_fn_error $? "Net-SNMP version 5.3 or greater reqired (detected $snmp_full_version)." "$LINENO" 5
fi
else
- as_fn_error "Could not find net-snmp-config binary. Please check your net-snmp installation." "$LINENO" 5
+ as_fn_error $? "Could not find net-snmp-config binary. Please check your net-snmp installation." "$LINENO" 5
fi
@@ -85190,7 +85122,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$SNMP_LIBNAME''_init_snmp" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for init_snmp in -l$SNMP_LIBNAME" >&5
$as_echo_n "checking for init_snmp in -l$SNMP_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -85225,8 +85157,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -85242,7 +85173,7 @@ else
ext_shared=$save_ext_shared
unset ac_cv_lib_$SNMP_LIBNAME_init_snmp
- as_fn_error "SNMP sanity check failed. Please check config.log for more information." "$LINENO" 5
+ as_fn_error $? "SNMP sanity check failed. Please check config.log for more information." "$LINENO" 5
fi
@@ -85348,7 +85279,7 @@ fi
as_ac_Lib=`$as_echo "ac_cv_lib_$SNMP_LIBNAME''_shutdown_snmp_logging" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shutdown_snmp_logging in -l$SNMP_LIBNAME" >&5
$as_echo_n "checking for shutdown_snmp_logging in -l$SNMP_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -85383,8 +85314,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -85406,7 +85336,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy snmp_snprint_value" >&5
$as_echo_n "checking for buggy snmp_snprint_value... " >&6; }
-if test "${ac_cv_buggy_snprint_value+set}" = set; then :
+if ${ac_cv_buggy_snprint_value+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -85861,13 +85791,13 @@ fi
if test "$PHP_SOAP" != "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "SOAP extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "SOAP extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -86025,7 +85955,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -86063,7 +85993,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -86383,10 +86313,10 @@ EOF
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
fi
@@ -86440,7 +86370,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_SOCKETS" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct cmsghdr" >&5
$as_echo_n "checking for struct cmsghdr... " >&6; }
-if test "${ac_cv_cmsghdr+set}" = set; then :
+if ${ac_cv_cmsghdr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -86478,8 +86408,7 @@ $as_echo "#define HAVE_CMSGHDR 1" >>confdefs.h
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -86491,8 +86420,7 @@ done
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -86530,7 +86458,7 @@ $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field ss_family in struct sockaddr_storage" >&5
$as_echo_n "checking for field ss_family in struct sockaddr_storage... " >&6; }
-if test "${ac_cv_ss_family+set}" = set; then :
+if ${ac_cv_ss_family+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87246,7 +87174,7 @@ EOF
is_it_shared=$PHP_PCRE_SHARED
is_it_enabled=$PHP_PCRE
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension spl to build statically, but it
depends on extension pcre, which you've configured to build shared.
You either need to build spl shared or build pcre statically for the
@@ -87254,7 +87182,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension spl, which depends on extension pcre,
but you've either not enabled pcre, or have disabled it.
" "$LINENO" 5
@@ -87264,7 +87192,7 @@ but you've either not enabled pcre, or have disabled it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flush should be called explicitly after a buffered io" >&5
$as_echo_n "checking whether flush should be called explicitly after a buffered io... " >&6; }
-if test "${ac_cv_flush_io+set}" = set; then :
+if ${ac_cv_flush_io+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87336,7 +87264,7 @@ fi
if test "$ac_cv_func_crypt" = "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
$as_echo_n "checking for crypt in -lcrypt... " >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
+if ${ac_cv_lib_crypt_crypt+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -87370,7 +87298,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
-if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
+if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
LIBS="-lcrypt $LIBS -lcrypt"
@@ -87383,7 +87311,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard DES crypt" >&5
$as_echo_n "checking for standard DES crypt... " >&6; }
-if test "${ac_cv_crypt_des+set}" = set; then :
+if ${ac_cv_crypt_des+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87430,7 +87358,7 @@ $as_echo "$ac_cv_crypt_des" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended DES crypt" >&5
$as_echo_n "checking for extended DES crypt... " >&6; }
-if test "${ac_cv_crypt_ext_des+set}" = set; then :
+if ${ac_cv_crypt_ext_des+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87477,7 +87405,7 @@ $as_echo "$ac_cv_crypt_ext_des" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5 crypt" >&5
$as_echo_n "checking for MD5 crypt... " >&6; }
-if test "${ac_cv_crypt_md5+set}" = set; then :
+if ${ac_cv_crypt_md5+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87533,7 +87461,7 @@ $as_echo "$ac_cv_crypt_md5" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Blowfish crypt" >&5
$as_echo_n "checking for Blowfish crypt... " >&6; }
-if test "${ac_cv_crypt_blowfish+set}" = set; then :
+if ${ac_cv_crypt_blowfish+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87586,7 +87514,7 @@ $as_echo "$ac_cv_crypt_blowfish" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA512 crypt" >&5
$as_echo_n "checking for SHA512 crypt... " >&6; }
-if test "${ac_cv_crypt_SHA512+set}" = set; then :
+if ${ac_cv_crypt_SHA512+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87638,7 +87566,7 @@ $as_echo "$ac_cv_crypt_SHA512" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA256 crypt" >&5
$as_echo_n "checking for SHA256 crypt... " >&6; }
-if test "${ac_cv_crypt_SHA256+set}" = set; then :
+if ${ac_cv_crypt_SHA256+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87693,7 +87621,7 @@ if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports __alignof__" >&5
$as_echo_n "checking whether the compiler supports __alignof__... " >&6; }
-if test "${ac_cv_alignof_exists+set}" = set; then :
+if ${ac_cv_alignof_exists+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87732,7 +87660,7 @@ $as_echo "#define HAVE_ALIGNOF 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports aligned attribute" >&5
$as_echo_n "checking whether the compiler supports aligned attribute... " >&6; }
-if test "${ac_cv_attribute_aligned+set}" = set; then :
+if ${ac_cv_attribute_aligned+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -87939,8 +87867,7 @@ for ac_func in getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpcl
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -87950,7 +87877,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working POSIX fnmatch" >&5
$as_echo_n "checking for working POSIX fnmatch... " >&6; }
-if test "${ac_cv_func_fnmatch_works+set}" = set; then :
+if ${ac_cv_func_fnmatch_works+:} false; then :
$as_echo_n "(cached) " >&6
else
# Some versions of Solaris, SCO, and the GNU C Library
@@ -88005,8 +87932,7 @@ for ac_func in fork CreateProcess
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -88046,11 +87972,11 @@ fi
unset found
ac_fn_c_check_func "$LINENO" "res_nsearch" "ac_cv_func_res_nsearch"
-if test "x$ac_cv_func_res_nsearch" = x""yes; then :
+if test "x$ac_cv_func_res_nsearch" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__res_nsearch" "ac_cv_func___res_nsearch"
-if test "x$ac_cv_func___res_nsearch" = x""yes; then :
+if test "x$ac_cv_func___res_nsearch" = xyes; then :
found=yes
else
found=no
@@ -88074,7 +88000,7 @@ $as_echo "#define HAVE_RES_NSEARCH 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_nsearch in -lresolv" >&5
$as_echo_n "checking for res_nsearch in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_nsearch+set}" = set; then :
+if ${ac_cv_lib_resolv_res_nsearch+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88108,13 +88034,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_nsearch" >&5
$as_echo "$ac_cv_lib_resolv_res_nsearch" >&6; }
-if test "x$ac_cv_lib_resolv_res_nsearch" = x""yes; then :
+if test "x$ac_cv_lib_resolv_res_nsearch" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_nsearch in -lresolv" >&5
$as_echo_n "checking for __res_nsearch in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_nsearch+set}" = set; then :
+if ${ac_cv_lib_resolv___res_nsearch+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88148,7 +88074,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_nsearch" >&5
$as_echo "$ac_cv_lib_resolv___res_nsearch" >&6; }
-if test "x$ac_cv_lib_resolv___res_nsearch" = x""yes; then :
+if test "x$ac_cv_lib_resolv___res_nsearch" = xyes; then :
found=yes
else
found=no
@@ -88206,7 +88132,7 @@ $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_nsearch in -lbind" >&5
$as_echo_n "checking for res_nsearch in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_res_nsearch+set}" = set; then :
+if ${ac_cv_lib_bind_res_nsearch+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88240,13 +88166,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_nsearch" >&5
$as_echo "$ac_cv_lib_bind_res_nsearch" >&6; }
-if test "x$ac_cv_lib_bind_res_nsearch" = x""yes; then :
+if test "x$ac_cv_lib_bind_res_nsearch" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_nsearch in -lbind" >&5
$as_echo_n "checking for __res_nsearch in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___res_nsearch+set}" = set; then :
+if ${ac_cv_lib_bind___res_nsearch+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88280,7 +88206,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___res_nsearch" >&5
$as_echo "$ac_cv_lib_bind___res_nsearch" >&6; }
-if test "x$ac_cv_lib_bind___res_nsearch" = x""yes; then :
+if test "x$ac_cv_lib_bind___res_nsearch" = xyes; then :
found=yes
else
found=no
@@ -88338,7 +88264,7 @@ $as_echo "#define HAVE_LIBBIND 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_nsearch in -lsocket" >&5
$as_echo_n "checking for res_nsearch in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_res_nsearch+set}" = set; then :
+if ${ac_cv_lib_socket_res_nsearch+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88372,13 +88298,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_res_nsearch" >&5
$as_echo "$ac_cv_lib_socket_res_nsearch" >&6; }
-if test "x$ac_cv_lib_socket_res_nsearch" = x""yes; then :
+if test "x$ac_cv_lib_socket_res_nsearch" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_nsearch in -lsocket" >&5
$as_echo_n "checking for __res_nsearch in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___res_nsearch+set}" = set; then :
+if ${ac_cv_lib_socket___res_nsearch+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88412,7 +88338,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___res_nsearch" >&5
$as_echo "$ac_cv_lib_socket___res_nsearch" >&6; }
-if test "x$ac_cv_lib_socket___res_nsearch" = x""yes; then :
+if test "x$ac_cv_lib_socket___res_nsearch" = xyes; then :
found=yes
else
found=no
@@ -88484,11 +88410,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "dns_search" "ac_cv_func_dns_search"
-if test "x$ac_cv_func_dns_search" = x""yes; then :
+if test "x$ac_cv_func_dns_search" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__dns_search" "ac_cv_func___dns_search"
-if test "x$ac_cv_func___dns_search" = x""yes; then :
+if test "x$ac_cv_func___dns_search" = xyes; then :
found=yes
else
found=no
@@ -88512,7 +88438,7 @@ $as_echo "#define HAVE_DNS_SEARCH 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_search in -lresolv" >&5
$as_echo_n "checking for dns_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_dns_search+set}" = set; then :
+if ${ac_cv_lib_resolv_dns_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88546,13 +88472,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dns_search" >&5
$as_echo "$ac_cv_lib_resolv_dns_search" >&6; }
-if test "x$ac_cv_lib_resolv_dns_search" = x""yes; then :
+if test "x$ac_cv_lib_resolv_dns_search" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dns_search in -lresolv" >&5
$as_echo_n "checking for __dns_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___dns_search+set}" = set; then :
+if ${ac_cv_lib_resolv___dns_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88586,7 +88512,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dns_search" >&5
$as_echo "$ac_cv_lib_resolv___dns_search" >&6; }
-if test "x$ac_cv_lib_resolv___dns_search" = x""yes; then :
+if test "x$ac_cv_lib_resolv___dns_search" = xyes; then :
found=yes
else
found=no
@@ -88644,7 +88570,7 @@ $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_search in -lbind" >&5
$as_echo_n "checking for dns_search in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_dns_search+set}" = set; then :
+if ${ac_cv_lib_bind_dns_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88678,13 +88604,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_dns_search" >&5
$as_echo "$ac_cv_lib_bind_dns_search" >&6; }
-if test "x$ac_cv_lib_bind_dns_search" = x""yes; then :
+if test "x$ac_cv_lib_bind_dns_search" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dns_search in -lbind" >&5
$as_echo_n "checking for __dns_search in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___dns_search+set}" = set; then :
+if ${ac_cv_lib_bind___dns_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88718,7 +88644,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___dns_search" >&5
$as_echo "$ac_cv_lib_bind___dns_search" >&6; }
-if test "x$ac_cv_lib_bind___dns_search" = x""yes; then :
+if test "x$ac_cv_lib_bind___dns_search" = xyes; then :
found=yes
else
found=no
@@ -88776,7 +88702,7 @@ $as_echo "#define HAVE_LIBBIND 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_search in -lsocket" >&5
$as_echo_n "checking for dns_search in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_dns_search+set}" = set; then :
+if ${ac_cv_lib_socket_dns_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88810,13 +88736,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_dns_search" >&5
$as_echo "$ac_cv_lib_socket_dns_search" >&6; }
-if test "x$ac_cv_lib_socket_dns_search" = x""yes; then :
+if test "x$ac_cv_lib_socket_dns_search" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dns_search in -lsocket" >&5
$as_echo_n "checking for __dns_search in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___dns_search+set}" = set; then :
+if ${ac_cv_lib_socket___dns_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88850,7 +88776,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___dns_search" >&5
$as_echo "$ac_cv_lib_socket___dns_search" >&6; }
-if test "x$ac_cv_lib_socket___dns_search" = x""yes; then :
+if test "x$ac_cv_lib_socket___dns_search" = xyes; then :
found=yes
else
found=no
@@ -88922,11 +88848,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "dn_expand" "ac_cv_func_dn_expand"
-if test "x$ac_cv_func_dn_expand" = x""yes; then :
+if test "x$ac_cv_func_dn_expand" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__dn_expand" "ac_cv_func___dn_expand"
-if test "x$ac_cv_func___dn_expand" = x""yes; then :
+if test "x$ac_cv_func___dn_expand" = xyes; then :
found=yes
else
found=no
@@ -88950,7 +88876,7 @@ $as_echo "#define HAVE_DN_EXPAND 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lresolv" >&5
$as_echo_n "checking for dn_expand in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then :
+if ${ac_cv_lib_resolv_dn_expand+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -88984,13 +88910,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dn_expand" >&5
$as_echo "$ac_cv_lib_resolv_dn_expand" >&6; }
-if test "x$ac_cv_lib_resolv_dn_expand" = x""yes; then :
+if test "x$ac_cv_lib_resolv_dn_expand" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lresolv" >&5
$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then :
+if ${ac_cv_lib_resolv___dn_expand+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89024,7 +88950,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
-if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
+if test "x$ac_cv_lib_resolv___dn_expand" = xyes; then :
found=yes
else
found=no
@@ -89082,7 +89008,7 @@ $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lbind" >&5
$as_echo_n "checking for dn_expand in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_dn_expand+set}" = set; then :
+if ${ac_cv_lib_bind_dn_expand+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89116,13 +89042,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_dn_expand" >&5
$as_echo "$ac_cv_lib_bind_dn_expand" >&6; }
-if test "x$ac_cv_lib_bind_dn_expand" = x""yes; then :
+if test "x$ac_cv_lib_bind_dn_expand" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lbind" >&5
$as_echo_n "checking for __dn_expand in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___dn_expand+set}" = set; then :
+if ${ac_cv_lib_bind___dn_expand+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89156,7 +89082,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___dn_expand" >&5
$as_echo "$ac_cv_lib_bind___dn_expand" >&6; }
-if test "x$ac_cv_lib_bind___dn_expand" = x""yes; then :
+if test "x$ac_cv_lib_bind___dn_expand" = xyes; then :
found=yes
else
found=no
@@ -89214,7 +89140,7 @@ $as_echo "#define HAVE_LIBBIND 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand in -lsocket" >&5
$as_echo_n "checking for dn_expand in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_dn_expand+set}" = set; then :
+if ${ac_cv_lib_socket_dn_expand+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89248,13 +89174,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_dn_expand" >&5
$as_echo "$ac_cv_lib_socket_dn_expand" >&6; }
-if test "x$ac_cv_lib_socket_dn_expand" = x""yes; then :
+if test "x$ac_cv_lib_socket_dn_expand" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_expand in -lsocket" >&5
$as_echo_n "checking for __dn_expand in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___dn_expand+set}" = set; then :
+if ${ac_cv_lib_socket___dn_expand+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89288,7 +89214,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___dn_expand" >&5
$as_echo "$ac_cv_lib_socket___dn_expand" >&6; }
-if test "x$ac_cv_lib_socket___dn_expand" = x""yes; then :
+if test "x$ac_cv_lib_socket___dn_expand" = xyes; then :
found=yes
else
found=no
@@ -89360,11 +89286,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "dn_skipname" "ac_cv_func_dn_skipname"
-if test "x$ac_cv_func_dn_skipname" = x""yes; then :
+if test "x$ac_cv_func_dn_skipname" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__dn_skipname" "ac_cv_func___dn_skipname"
-if test "x$ac_cv_func___dn_skipname" = x""yes; then :
+if test "x$ac_cv_func___dn_skipname" = xyes; then :
found=yes
else
found=no
@@ -89388,7 +89314,7 @@ $as_echo "#define HAVE_DN_SKIPNAME 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_skipname in -lresolv" >&5
$as_echo_n "checking for dn_skipname in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_dn_skipname+set}" = set; then :
+if ${ac_cv_lib_resolv_dn_skipname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89422,13 +89348,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_dn_skipname" >&5
$as_echo "$ac_cv_lib_resolv_dn_skipname" >&6; }
-if test "x$ac_cv_lib_resolv_dn_skipname" = x""yes; then :
+if test "x$ac_cv_lib_resolv_dn_skipname" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_skipname in -lresolv" >&5
$as_echo_n "checking for __dn_skipname in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___dn_skipname+set}" = set; then :
+if ${ac_cv_lib_resolv___dn_skipname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89462,7 +89388,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_skipname" >&5
$as_echo "$ac_cv_lib_resolv___dn_skipname" >&6; }
-if test "x$ac_cv_lib_resolv___dn_skipname" = x""yes; then :
+if test "x$ac_cv_lib_resolv___dn_skipname" = xyes; then :
found=yes
else
found=no
@@ -89520,7 +89446,7 @@ $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_skipname in -lbind" >&5
$as_echo_n "checking for dn_skipname in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_dn_skipname+set}" = set; then :
+if ${ac_cv_lib_bind_dn_skipname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89554,13 +89480,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_dn_skipname" >&5
$as_echo "$ac_cv_lib_bind_dn_skipname" >&6; }
-if test "x$ac_cv_lib_bind_dn_skipname" = x""yes; then :
+if test "x$ac_cv_lib_bind_dn_skipname" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_skipname in -lbind" >&5
$as_echo_n "checking for __dn_skipname in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___dn_skipname+set}" = set; then :
+if ${ac_cv_lib_bind___dn_skipname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89594,7 +89520,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___dn_skipname" >&5
$as_echo "$ac_cv_lib_bind___dn_skipname" >&6; }
-if test "x$ac_cv_lib_bind___dn_skipname" = x""yes; then :
+if test "x$ac_cv_lib_bind___dn_skipname" = xyes; then :
found=yes
else
found=no
@@ -89652,7 +89578,7 @@ $as_echo "#define HAVE_LIBBIND 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_skipname in -lsocket" >&5
$as_echo_n "checking for dn_skipname in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_dn_skipname+set}" = set; then :
+if ${ac_cv_lib_socket_dn_skipname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89686,13 +89612,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_dn_skipname" >&5
$as_echo "$ac_cv_lib_socket_dn_skipname" >&6; }
-if test "x$ac_cv_lib_socket_dn_skipname" = x""yes; then :
+if test "x$ac_cv_lib_socket_dn_skipname" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __dn_skipname in -lsocket" >&5
$as_echo_n "checking for __dn_skipname in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___dn_skipname+set}" = set; then :
+if ${ac_cv_lib_socket___dn_skipname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89726,7 +89652,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___dn_skipname" >&5
$as_echo "$ac_cv_lib_socket___dn_skipname" >&6; }
-if test "x$ac_cv_lib_socket___dn_skipname" = x""yes; then :
+if test "x$ac_cv_lib_socket___dn_skipname" = xyes; then :
found=yes
else
found=no
@@ -89800,11 +89726,11 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
unset found
ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
-if test "x$ac_cv_func_res_search" = x""yes; then :
+if test "x$ac_cv_func_res_search" = xyes; then :
found=yes
else
ac_fn_c_check_func "$LINENO" "__res_search" "ac_cv_func___res_search"
-if test "x$ac_cv_func___res_search" = x""yes; then :
+if test "x$ac_cv_func___res_search" = xyes; then :
found=yes
else
found=no
@@ -89828,7 +89754,7 @@ $as_echo "#define HAVE_RES_SEARCH 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
$as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then :
+if ${ac_cv_lib_resolv_res_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89862,13 +89788,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
$as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then :
+if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_search in -lresolv" >&5
$as_echo_n "checking for __res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_search+set}" = set; then :
+if ${ac_cv_lib_resolv___res_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89902,7 +89828,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_search" >&5
$as_echo "$ac_cv_lib_resolv___res_search" >&6; }
-if test "x$ac_cv_lib_resolv___res_search" = x""yes; then :
+if test "x$ac_cv_lib_resolv___res_search" = xyes; then :
found=yes
else
found=no
@@ -89960,7 +89886,7 @@ $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lbind" >&5
$as_echo_n "checking for res_search in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_res_search+set}" = set; then :
+if ${ac_cv_lib_bind_res_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -89994,13 +89920,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_search" >&5
$as_echo "$ac_cv_lib_bind_res_search" >&6; }
-if test "x$ac_cv_lib_bind_res_search" = x""yes; then :
+if test "x$ac_cv_lib_bind_res_search" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_search in -lbind" >&5
$as_echo_n "checking for __res_search in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___res_search+set}" = set; then :
+if ${ac_cv_lib_bind___res_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -90034,7 +89960,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___res_search" >&5
$as_echo "$ac_cv_lib_bind___res_search" >&6; }
-if test "x$ac_cv_lib_bind___res_search" = x""yes; then :
+if test "x$ac_cv_lib_bind___res_search" = xyes; then :
found=yes
else
found=no
@@ -90092,7 +90018,7 @@ $as_echo "#define HAVE_LIBBIND 1" >>confdefs.h
unset found
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lsocket" >&5
$as_echo_n "checking for res_search in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_res_search+set}" = set; then :
+if ${ac_cv_lib_socket_res_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -90126,13 +90052,13 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_res_search" >&5
$as_echo "$ac_cv_lib_socket_res_search" >&6; }
-if test "x$ac_cv_lib_socket_res_search" = x""yes; then :
+if test "x$ac_cv_lib_socket_res_search" = xyes; then :
found=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_search in -lsocket" >&5
$as_echo_n "checking for __res_search in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket___res_search+set}" = set; then :
+if ${ac_cv_lib_socket___res_search+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -90166,7 +90092,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket___res_search" >&5
$as_echo "$ac_cv_lib_socket___res_search" >&6; }
-if test "x$ac_cv_lib_socket___res_search" = x""yes; then :
+if test "x$ac_cv_lib_socket___res_search" = xyes; then :
found=yes
else
found=no
@@ -90235,7 +90161,7 @@ $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atof() accepts NAN" >&5
$as_echo_n "checking whether atof() accepts NAN... " >&6; }
-if test "${ac_cv_atof_accept_nan+set}" = set; then :
+if ${ac_cv_atof_accept_nan+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -90288,7 +90214,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atof() accepts INF" >&5
$as_echo_n "checking whether atof() accepts INF... " >&6; }
-if test "${ac_cv_atof_accept_inf+set}" = set; then :
+if ${ac_cv_atof_accept_inf+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -90344,7 +90270,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL == INF" >&5
$as_echo_n "checking whether HUGE_VAL == INF... " >&6; }
-if test "${ac_cv_huge_val_inf+set}" = set; then :
+if ${ac_cv_huge_val_inf+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -90400,7 +90326,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
$as_echo_n "checking whether HUGE_VAL + -HUGEVAL == NAN... " >&6; }
-if test "${ac_cv_huge_val_nan+set}" = set; then :
+if ${ac_cv_huge_val_nan+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -90458,7 +90384,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime() declaration fails" >&5
$as_echo_n "checking whether strptime() declaration fails... " >&6; }
-if test "${ac_cv_strptime_decl_fails+set}" = set; then :
+if ${ac_cv_strptime_decl_fails+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -90504,7 +90430,7 @@ fi
for ac_header in wchar.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
-if test "x$ac_cv_header_wchar_h" = x""yes; then :
+if test "x$ac_cv_header_wchar_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_WCHAR_H 1
_ACEOF
@@ -90516,7 +90442,7 @@ done
for ac_func in mblen
do :
ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
-if test "x$ac_cv_func_mblen" = x""yes; then :
+if test "x$ac_cv_func_mblen" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MBLEN 1
_ACEOF
@@ -90528,8 +90454,7 @@ for ac_func in mbrlen mbsinit
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -90539,7 +90464,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
$as_echo_n "checking for mbstate_t... " >&6; }
-if test "${ac_cv_type_mbstate_t+set}" = set; then :
+if ${ac_cv_type_mbstate_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -90582,7 +90507,7 @@ fi
for ac_header in atomic.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "atomic.h" "ac_cv_header_atomic_h" "$ac_includes_default"
-if test "x$ac_cv_header_atomic_h" = x""yes; then :
+if test "x$ac_cv_header_atomic_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ATOMIC_H 1
_ACEOF
@@ -90630,7 +90555,7 @@ done
incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
- filters.c proc_open.c streamsfuncs.c http.c; do
+ filters.c proc_open.c streamsfuncs.c http.c password.c; do
IFS=.
set $ac_src
@@ -90689,7 +90614,7 @@ EOF
incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
- filters.c proc_open.c streamsfuncs.c http.c; do
+ filters.c proc_open.c streamsfuncs.c http.c password.c; do
IFS=.
set $ac_src
@@ -90829,7 +90754,7 @@ _ACEOF
incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
- filters.c proc_open.c streamsfuncs.c http.c; do
+ filters.c proc_open.c streamsfuncs.c http.c password.c; do
IFS=.
set $ac_src
@@ -90885,7 +90810,7 @@ EOF
incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
- filters.c proc_open.c streamsfuncs.c http.c; do
+ filters.c proc_open.c streamsfuncs.c http.c password.c; do
IFS=.
set $ac_src
@@ -91000,7 +90925,7 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_SYBASE_CT" != "no"; then
if test "$PHP_SYBASE" && test "$PHP_SYBASE" != "no" && test "$ext_shared" = "no"; then
- as_fn_error "You can not use both --with-sybase and --with-sybase-ct in same build!" "$LINENO" 5
+ as_fn_error $? "You can not use both --with-sybase and --with-sybase-ct in same build!" "$LINENO" 5
fi
@@ -91317,7 +91242,7 @@ EOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
$as_echo_n "checking size of long int... " >&6; }
-if test "${ac_cv_sizeof_long_int+set}" = set; then :
+if ${ac_cv_sizeof_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
@@ -91326,9 +91251,8 @@ else
if test "$ac_cv_type_long_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_int=0
fi
@@ -91395,7 +91319,7 @@ $as_echo "found in $SYBASE_CT_INCDIR" >&6; }
fi
else
- as_fn_error "ctpublic.h missing!" "$LINENO" 5
+ as_fn_error $? "ctpublic.h missing!" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking Sybase libdir" >&5
@@ -91673,7 +91597,7 @@ $as_echo "Sybase64: $SYBASE_CT_LIBS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for netg_errstr in -lsybtcl64" >&5
$as_echo_n "checking for netg_errstr in -lsybtcl64... " >&6; }
-if test "${ac_cv_lib_sybtcl64_netg_errstr+set}" = set; then :
+if ${ac_cv_lib_sybtcl64_netg_errstr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -91707,7 +91631,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybtcl64_netg_errstr" >&5
$as_echo "$ac_cv_lib_sybtcl64_netg_errstr" >&6; }
-if test "x$ac_cv_lib_sybtcl64_netg_errstr" = x""yes; then :
+if test "x$ac_cv_lib_sybtcl64_netg_errstr" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -91868,7 +91792,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for insck__getVdate in -linsck64" >&5
$as_echo_n "checking for insck__getVdate in -linsck64... " >&6; }
-if test "${ac_cv_lib_insck64_insck__getVdate+set}" = set; then :
+if ${ac_cv_lib_insck64_insck__getVdate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -91902,7 +91826,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_insck64_insck__getVdate" >&5
$as_echo "$ac_cv_lib_insck64_insck__getVdate" >&6; }
-if test "x$ac_cv_lib_insck64_insck__getVdate" = x""yes; then :
+if test "x$ac_cv_lib_insck64_insck__getVdate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -92036,7 +91960,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bsd_tcp in -linsck64" >&5
$as_echo_n "checking for bsd_tcp in -linsck64... " >&6; }
-if test "${ac_cv_lib_insck64_bsd_tcp+set}" = set; then :
+if ${ac_cv_lib_insck64_bsd_tcp+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -92070,7 +91994,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_insck64_bsd_tcp" >&5
$as_echo "$ac_cv_lib_insck64_bsd_tcp" >&6; }
-if test "x$ac_cv_lib_insck64_bsd_tcp" = x""yes; then :
+if test "x$ac_cv_lib_insck64_bsd_tcp" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -92304,7 +92228,7 @@ $as_echo "Sybase32 syb-prefix: $SYBASE_CT_LIBS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for netg_errstr in -lsybtcl" >&5
$as_echo_n "checking for netg_errstr in -lsybtcl... " >&6; }
-if test "${ac_cv_lib_sybtcl_netg_errstr+set}" = set; then :
+if ${ac_cv_lib_sybtcl_netg_errstr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -92338,7 +92262,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybtcl_netg_errstr" >&5
$as_echo "$ac_cv_lib_sybtcl_netg_errstr" >&6; }
-if test "x$ac_cv_lib_sybtcl_netg_errstr" = x""yes; then :
+if test "x$ac_cv_lib_sybtcl_netg_errstr" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -92499,7 +92423,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for insck__getVdate in -linsck" >&5
$as_echo_n "checking for insck__getVdate in -linsck... " >&6; }
-if test "${ac_cv_lib_insck_insck__getVdate+set}" = set; then :
+if ${ac_cv_lib_insck_insck__getVdate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -92533,7 +92457,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_insck_insck__getVdate" >&5
$as_echo "$ac_cv_lib_insck_insck__getVdate" >&6; }
-if test "x$ac_cv_lib_insck_insck__getVdate" = x""yes; then :
+if test "x$ac_cv_lib_insck_insck__getVdate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -92667,7 +92591,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bsd_tcp in -linsck" >&5
$as_echo_n "checking for bsd_tcp in -linsck... " >&6; }
-if test "${ac_cv_lib_insck_bsd_tcp+set}" = set; then :
+if ${ac_cv_lib_insck_bsd_tcp+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -92701,7 +92625,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_insck_bsd_tcp" >&5
$as_echo "$ac_cv_lib_insck_bsd_tcp" >&6; }
-if test "x$ac_cv_lib_insck_bsd_tcp" = x""yes; then :
+if test "x$ac_cv_lib_insck_bsd_tcp" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -92935,7 +92859,7 @@ $as_echo "Sybase32 default: $SYBASE_CT_LIBS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for netg_errstr in -ltcl" >&5
$as_echo_n "checking for netg_errstr in -ltcl... " >&6; }
-if test "${ac_cv_lib_tcl_netg_errstr+set}" = set; then :
+if ${ac_cv_lib_tcl_netg_errstr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -92969,7 +92893,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl_netg_errstr" >&5
$as_echo "$ac_cv_lib_tcl_netg_errstr" >&6; }
-if test "x$ac_cv_lib_tcl_netg_errstr" = x""yes; then :
+if test "x$ac_cv_lib_tcl_netg_errstr" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -93130,7 +93054,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for insck__getVdate in -linsck" >&5
$as_echo_n "checking for insck__getVdate in -linsck... " >&6; }
-if test "${ac_cv_lib_insck_insck__getVdate+set}" = set; then :
+if ${ac_cv_lib_insck_insck__getVdate+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -93164,7 +93088,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_insck_insck__getVdate" >&5
$as_echo "$ac_cv_lib_insck_insck__getVdate" >&6; }
-if test "x$ac_cv_lib_insck_insck__getVdate" = x""yes; then :
+if test "x$ac_cv_lib_insck_insck__getVdate" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -93298,7 +93222,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bsd_tcp in -linsck" >&5
$as_echo_n "checking for bsd_tcp in -linsck... " >&6; }
-if test "${ac_cv_lib_insck_bsd_tcp+set}" = set; then :
+if ${ac_cv_lib_insck_bsd_tcp+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -93332,7 +93256,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_insck_bsd_tcp" >&5
$as_echo "$ac_cv_lib_insck_bsd_tcp" >&6; }
-if test "x$ac_cv_lib_insck_bsd_tcp" = x""yes; then :
+if test "x$ac_cv_lib_insck_bsd_tcp" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -93419,10 +93343,10 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_SYSVMSG" != "no"; then
ac_fn_c_check_header_mongrel "$LINENO" "sys/msg.h" "ac_cv_header_sys_msg_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_msg_h" = x""yes; then :
+if test "x$ac_cv_header_sys_msg_h" = xyes; then :
else
- as_fn_error "Cannot enable System V IPC support, sys/msg.h is missing" "$LINENO" 5
+ as_fn_error $? "Cannot enable System V IPC support, sys/msg.h is missing" "$LINENO" 5
fi
@@ -94070,7 +93994,7 @@ $as_echo "#define HAVE_SYSVSEM 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for union semun" >&5
$as_echo_n "checking for union semun... " >&6; }
-if test "${php_cv_semun+set}" = set; then :
+if ${php_cv_semun+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -94522,7 +94446,7 @@ if test "$PHP_TIDY" != "no"; then
done
if test -z "$TIDY_DIR"; then
- as_fn_error "Cannot find libtidy" "$LINENO" 5
+ as_fn_error $? "Cannot find libtidy" "$LINENO" 5
fi
TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR
@@ -94753,7 +94677,7 @@ if test "$PHP_TIDY" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tidyOptGetDoc in -ltidy" >&5
$as_echo_n "checking for tidyOptGetDoc in -ltidy... " >&6; }
-if test "${ac_cv_lib_tidy_tidyOptGetDoc+set}" = set; then :
+if ${ac_cv_lib_tidy_tidyOptGetDoc+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -94787,7 +94711,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tidy_tidyOptGetDoc" >&5
$as_echo "$ac_cv_lib_tidy_tidyOptGetDoc" >&6; }
-if test "x$ac_cv_lib_tidy_tidyOptGetDoc" = x""yes; then :
+if test "x$ac_cv_lib_tidy_tidyOptGetDoc" = xyes; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -95556,13 +95480,13 @@ if test "$PHP_WDDX" != "no"; then
if test "$PHP_LIBEXPAT_DIR" = "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "WDDX extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "WDDX extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -95720,7 +95644,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -95758,7 +95682,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -95829,10 +95753,10 @@ EOF
fi
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Use --with-libxml-dir=<DIR>" "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Use --with-libxml-dir=<DIR>" "$LINENO" 5
fi
@@ -95847,7 +95771,7 @@ else
done
if test -z "$EXPAT_DIR"; then
- as_fn_error "not found. Please reinstall the expat distribution." "$LINENO" 5
+ as_fn_error $? "not found. Please reinstall the expat distribution." "$LINENO" 5
fi
@@ -96284,7 +96208,7 @@ EOF
is_it_shared=$PHP_LIBXML_SHARED
is_it_enabled=$PHP_LIBXML
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension wddx to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build wddx shared or build libxml statically for the
@@ -96292,7 +96216,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension wddx, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
@@ -96403,13 +96327,13 @@ if test "$PHP_XML" != "no"; then
if test "$PHP_LIBEXPAT_DIR" = "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "XML extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "XML extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -96567,7 +96491,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -96605,7 +96529,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -96630,7 +96554,7 @@ $as_echo "#define HAVE_LIBXML 1" >>confdefs.h
is_it_shared=$PHP_LIBXML_SHARED
is_it_enabled=$PHP_LIBXML
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xml to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xml shared or build libxml statically for the
@@ -96638,7 +96562,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xml, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
@@ -96646,10 +96570,10 @@ but you've either not enabled libxml, or have disabled it.
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Use --with-libxml-dir=<DIR>" "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Use --with-libxml-dir=<DIR>" "$LINENO" 5
fi
@@ -96664,7 +96588,7 @@ else
done
if test -z "$EXPAT_DIR"; then
- as_fn_error "not found. Please reinstall the expat distribution." "$LINENO" 5
+ as_fn_error $? "not found. Please reinstall the expat distribution." "$LINENO" 5
fi
@@ -97193,13 +97117,13 @@ fi
if test "$PHP_XMLREADER" != "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "XMLReader extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "XMLReader extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -97357,7 +97281,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -97395,7 +97319,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -97715,7 +97639,7 @@ EOF
is_it_shared=$PHP_DOM_SHARED
is_it_enabled=$PHP_DOM
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xmlreader to build statically, but it
depends on extension dom, which you've configured to build shared.
You either need to build xmlreader shared or build dom statically for the
@@ -97723,7 +97647,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "xtrue" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xmlreader, which depends on extension dom,
but you've either not enabled dom, or have disabled it.
" "$LINENO" 5
@@ -97734,10 +97658,10 @@ but you've either not enabled dom, or have disabled it.
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
fi
@@ -97883,7 +97807,7 @@ if test "$PHP_XMLRPC" != "no"; then
is_it_shared=$PHP_LIBXML_SHARED
is_it_enabled=$PHP_LIBXML
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xmlrpc to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xmlrpc shared or build libxml statically for the
@@ -97891,7 +97815,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xmlrpc, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
@@ -97907,13 +97831,13 @@ $as_echo "#define HAVE_XMLRPC 1" >>confdefs.h
if test "$PHP_LIBEXPAT_DIR" = "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "XML-RPC extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "XML-RPC extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -98071,7 +97995,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -98109,7 +98033,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -98180,10 +98104,10 @@ EOF
fi
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Use --with-libxml-dir=<DIR>" "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Use --with-libxml-dir=<DIR>" "$LINENO" 5
fi
@@ -98328,7 +98252,7 @@ $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
done
if test "$testval" = "no"; then
- as_fn_error "XML-RPC support requires libexpat. Use --with-libexpat-dir=<DIR> (deprecated!)" "$LINENO" 5
+ as_fn_error $? "XML-RPC support requires libexpat. Use --with-libexpat-dir=<DIR> (deprecated!)" "$LINENO" 5
fi
fi
@@ -98364,14 +98288,14 @@ $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
LIBS_save="$LIBS"
LIBS=
ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
-if test "x$ac_cv_func_iconv" = x""yes; then :
+if test "x$ac_cv_func_iconv" = xyes; then :
found_iconv=yes
else
ac_fn_c_check_func "$LINENO" "libiconv" "ac_cv_func_libiconv"
-if test "x$ac_cv_func_libiconv" = x""yes; then :
+if test "x$ac_cv_func_libiconv" = xyes; then :
echo "#define HAVE_LIBICONV 1" > ext/iconv/php_have_libiconv.h
@@ -98407,7 +98331,7 @@ $as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
done
if test -z "$ICONV_DIR"; then
- as_fn_error "Please specify the install prefix of iconv with --with-iconv=<DIR>" "$LINENO" 5
+ as_fn_error $? "Please specify the install prefix of iconv with --with-iconv=<DIR>" "$LINENO" 5
fi
if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
@@ -98513,7 +98437,7 @@ $as_echo "#define HAVE_GICONV_H 1" >>confdefs.h
as_ac_Lib=`$as_echo "ac_cv_lib_$iconv_lib_name''_libiconv" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv in -l$iconv_lib_name" >&5
$as_echo_n "checking for libiconv in -l$iconv_lib_name... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -98548,8 +98472,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -98675,7 +98598,7 @@ else
as_ac_Lib=`$as_echo "ac_cv_lib_$iconv_lib_name''_iconv" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -l$iconv_lib_name" >&5
$as_echo_n "checking for iconv in -l$iconv_lib_name... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -98710,8 +98633,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -98874,7 +98796,7 @@ $as_echo "#define HAVE_ICONV 1" >>confdefs.h
fi
else
- as_fn_error "iconv not found, in order to build xmlrpc you need the iconv library" "$LINENO" 5
+ as_fn_error $? "iconv not found, in order to build xmlrpc you need the iconv library" "$LINENO" 5
fi
@@ -98887,7 +98809,7 @@ if test "$PHP_XMLRPC" = "yes"; then
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -98927,7 +98849,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -98976,7 +98898,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
@@ -99029,7 +98951,7 @@ $as_echo "#define UNDEF_THREADS_HACK /**/" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -99143,8 +99065,7 @@ for ac_header in xmlparse.h xmltok.h stdlib.h strings.h string.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -99164,7 +99085,7 @@ done
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
$as_echo_n "checking size of char... " >&6; }
-if test "${ac_cv_sizeof_char+set}" = set; then :
+if ${ac_cv_sizeof_char+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
@@ -99173,9 +99094,8 @@ else
if test "$ac_cv_type_char" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (char)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (char)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_char=0
fi
@@ -99199,7 +99119,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
@@ -99208,9 +99128,8 @@ else
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int=0
fi
@@ -99233,7 +99152,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
@@ -99242,9 +99161,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long=0
fi
@@ -99267,7 +99185,7 @@ _ACEOF
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
+if ${ac_cv_sizeof_long_long+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
@@ -99276,9 +99194,8 @@ else
if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_long=0
fi
@@ -99296,7 +99213,7 @@ _ACEOF
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
else
@@ -99308,7 +99225,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+if ${ac_cv_header_time+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -99343,7 +99260,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if test "${ac_cv_type_uid_t+set}" = set; then :
+if ${ac_cv_type_uid_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -99384,8 +99301,7 @@ for ac_func in \
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -99738,7 +99654,7 @@ $as_echo "found in $i" >&6; }
if test -z "$XMLRPC_DIR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
- as_fn_error "Please reinstall the XMLRPC-EPI distribution" "$LINENO" 5
+ as_fn_error $? "Please reinstall the XMLRPC-EPI distribution" "$LINENO" 5
fi
@@ -100239,13 +100155,13 @@ fi
if test "$PHP_XMLWRITER" != "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "XMLWriter extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "XMLWriter extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml2-config path" >&5
$as_echo_n "checking for xml2-config path... " >&6; }
-if test "${ac_cv_php_xml2_config_path+set}" = set; then :
+if ${ac_cv_php_xml2_config_path+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -100403,7 +100319,7 @@ $as_echo "$ac_cv_php_xml2_config_path" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libxml build works" >&5
$as_echo_n "checking whether libxml build works... " >&6; }
-if test "${php_cv_libxml_build_works+set}" = set; then :
+if ${php_cv_libxml_build_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -100441,7 +100357,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error "build test failed. Please check the config.log for details." "$LINENO" 5
+ as_fn_error $? "build test failed. Please check the config.log for details." "$LINENO" 5
fi
@@ -100761,10 +100677,10 @@ EOF
else
- as_fn_error "libxml2 version 2.6.11 or greater required." "$LINENO" 5
+ as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
fi
else
- as_fn_error "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
+ as_fn_error $? "xml2-config not found. Please check your libxml2 installation." "$LINENO" 5
fi
@@ -100819,11 +100735,11 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_XSL" != "no"; then
if test "$PHP_LIBXML" = "no"; then
- as_fn_error "XSL extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
+ as_fn_error $? "XSL extension requires LIBXML extension, add --enable-libxml" "$LINENO" 5
fi
if test "$PHP_DOM" = "no"; then
- as_fn_error "XSL extension requires DOM extension, add --enable-dom" "$LINENO" 5
+ as_fn_error $? "XSL extension requires DOM extension, add --enable-dom" "$LINENO" 5
fi
for i in $PHP_XSL /usr/local /usr; do
@@ -100834,7 +100750,7 @@ if test "$PHP_XSL" != "no"; then
done
if test -z "$XSLT_CONFIG"; then
- as_fn_error "xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution" "$LINENO" 5
+ as_fn_error $? "xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution" "$LINENO" 5
else
libxslt_full_version=`$XSLT_CONFIG --version`
ac_IFS=$IFS
@@ -101122,7 +101038,7 @@ $as_echo "#define HAVE_XSL_EXSLT 1" >>confdefs.h
fi
else
- as_fn_error "libxslt version 1.1.0 or greater required." "$LINENO" 5
+ as_fn_error $? "libxslt version 1.1.0 or greater required." "$LINENO" 5
fi
@@ -101432,7 +101348,7 @@ EOF
is_it_shared=$PHP_LIBXML_SHARED
is_it_enabled=$PHP_LIBXML
if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xsl to build statically, but it
depends on extension libxml, which you've configured to build shared.
You either need to build xsl shared or build libxml statically for the
@@ -101440,7 +101356,7 @@ build to be successful.
" "$LINENO" 5
fi
if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then
- as_fn_error "
+ as_fn_error $? "
You've configured extension xsl, which depends on extension libxml,
but you've either not enabled libxml, or have disabled it.
" "$LINENO" 5
@@ -101553,7 +101469,7 @@ if test "$PHP_ZIP" != "no"; then
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
else
- as_fn_error "Can not find zlib headers under \"$PHP_ZLIB_DIR\"" "$LINENO" 5
+ as_fn_error $? "Can not find zlib headers under \"$PHP_ZLIB_DIR\"" "$LINENO" 5
fi
else
for i in /usr/local /usr; do
@@ -101570,7 +101486,7 @@ if test "$PHP_ZIP" != "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the location of zlib" >&5
$as_echo_n "checking for the location of zlib... " >&6; }
if test "$PHP_ZLIB_DIR" = "no"; then
- as_fn_error "zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located" "$LINENO" 5
+ as_fn_error $? "zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP_ZLIB_DIR" >&5
$as_echo "$PHP_ZLIB_DIR" >&6; }
@@ -102198,9 +102114,812 @@ $as_echo "#define MYSQLND_COMPRESSION_WANTED 1" >>confdefs.h
fi
+
$as_echo "#define MYSQLND_SSL_SUPPORTED 1" >>confdefs.h
+ test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
+
+ if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSA_get_default_method in -lssl" >&5
+$as_echo_n "checking for DSA_get_default_method in -lssl... " >&6; }
+if ${ac_cv_lib_ssl_DSA_get_default_method+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char DSA_get_default_method ();
+int
+main ()
+{
+return DSA_get_default_method ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ssl_DSA_get_default_method=yes
+else
+ ac_cv_lib_ssl_DSA_get_default_method=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_DSA_get_default_method" >&5
+$as_echo "$ac_cv_lib_ssl_DSA_get_default_method" >&6; }
+if test "x$ac_cv_lib_ssl_DSA_get_default_method" = xyes; then :
+
+$as_echo "#define HAVE_DSA_DEFAULT_METHOD 1" >>confdefs.h
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_free in -lcrypto" >&5
+$as_echo_n "checking for X509_free in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_X509_free+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char X509_free ();
+int
+main ()
+{
+return X509_free ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_X509_free=yes
+else
+ ac_cv_lib_crypto_X509_free=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_X509_free" >&5
+$as_echo "$ac_cv_lib_crypto_X509_free" >&6; }
+if test "x$ac_cv_lib_crypto_X509_free" = xyes; then :
+
+$as_echo "#define HAVE_DSA_DEFAULT_METHOD 1" >>confdefs.h
+
+fi
+
+
+
+ found_openssl=no
+ unset OPENSSL_INCDIR
+ unset OPENSSL_LIBDIR
+
+ test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
+ test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
+
+ if test "$PHP_OPENSSL" != "no"; then
+ PHP_OPENSSL_DIR=$PHP_OPENSSL
+ elif test "$PHP_IMAP_SSL" != "no"; then
+ PHP_OPENSSL_DIR=$PHP_IMAP_SSL
+ fi
+
+ if test -z "$PKG_CONFIG"; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+
+ if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
+ if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
+ found_openssl=yes
+ OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
+ OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
+ OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
+ else
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+ fi
+
+ if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
+
+ for ac_i in $OPENSSL_LIBS; do
+ case $ac_i in
+ -pthread)
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="$MYSQLND_SHARED_LIBADD -pthread"
+ else
+
+
+ unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "EXTRA_LDFLAGS$unique=set"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+ fi
+
+ fi
+ ;;
+ -l*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+
+ case $ac_ii in
+ c|c_r|pthread*) ;;
+ *)
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="$MYSQLND_SHARED_LIBADD -l$ac_ii"
+ else
+
+
+ case $ac_ii in
+ c|c_r|pthread*) ;;
+ *)
+ LIBS="$LIBS -l$ac_ii"
+ ;;
+ esac
+
+
+ fi
+ ;;
+ esac
+
+
+ ;;
+ -L*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+ if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+
+ if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+ ai_p=$ac_ii
+ else
+
+ ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+ ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+ fi
+
+
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="-L$ai_p $MYSQLND_SHARED_LIBADD"
+ test -n "$ld_runpath_switch" && MYSQLND_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQLND_SHARED_LIBADD"
+ else
+
+
+
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "LIBPATH$unique=set"
+
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+ LDFLAGS="$LDFLAGS -L$ai_p"
+ PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+ fi
+
+
+ fi
+
+ fi
+
+ ;;
+ esac
+ done
+
+
+ for ac_i in $OPENSSL_INCS; do
+ case $ac_i in
+ -I*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+ if test "$ac_ii" != "/usr/include"; then
+
+ if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+ ai_p=$ac_ii
+ else
+
+ ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+ ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+ fi
+
+
+
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "INCLUDEPATH$unique=set"
+
+ if test ""; then
+ INCLUDES="-I$ai_p $INCLUDES"
+ else
+ INCLUDES="$INCLUDES -I$ai_p"
+ fi
+
+ fi
+
+ fi
+
+ ;;
+ esac
+ done
+
+ fi
+ fi
+
+ if test "$found_openssl" = "no"; then
+
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+ fi
+
+ for i in $PHP_OPENSSL_DIR; do
+ if test -r $i/include/openssl/evp.h; then
+ OPENSSL_INCDIR=$i/include
+ fi
+ if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
+ OPENSSL_LIBDIR=$i/$PHP_LIBDIR
+ fi
+ test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
+ done
+
+ if test -z "$OPENSSL_INCDIR"; then
+ as_fn_error $? "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
+ fi
+
+ if test -z "$OPENSSL_LIBDIR"; then
+ as_fn_error $? "Cannot find OpenSSL's libraries" "$LINENO" 5
+ fi
+
+ old_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS=-I$OPENSSL_INCDIR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version" >&5
+$as_echo_n "checking for OpenSSL version... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <openssl/opensslv.h>
+#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: >= 0.9.6" >&5
+$as_echo ">= 0.9.6" >&6; }
+
+else
+
+ as_fn_error $? "OpenSSL version 0.9.6 or greater required." "$LINENO" 5
+
+fi
+rm -f conftest*
+
+ CPPFLAGS=$old_CPPFLAGS
+
+
+ if test "$OPENSSL_INCDIR" != "/usr/include"; then
+
+ if test -z "$OPENSSL_INCDIR" || echo "$OPENSSL_INCDIR" | grep '^/' >/dev/null ; then
+ ai_p=$OPENSSL_INCDIR
+ else
+
+ ep_dir="`echo $OPENSSL_INCDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+ ai_p="$ep_realdir/`basename \"$OPENSSL_INCDIR\"`"
+ fi
+
+
+
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$INCLUDEPATH$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "INCLUDEPATH$unique=set"
+
+ if test ""; then
+ INCLUDES="-I$ai_p $INCLUDES"
+ else
+ INCLUDES="$INCLUDES -I$ai_p"
+ fi
+
+ fi
+
+ fi
+
+
+
+ save_old_LDFLAGS=$LDFLAGS
+ ac_stuff="
+ -L$OPENSSL_LIBDIR
+ "
+
+ save_ext_shared=$ext_shared
+ ext_shared=yes
+
+ for ac_i in $ac_stuff; do
+ case $ac_i in
+ -pthread)
+ if test "$ext_shared" = "yes"; then
+ LDFLAGS="$LDFLAGS -pthread"
+ else
+
+
+ unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "EXTRA_LDFLAGS$unique=set"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+ fi
+
+ fi
+ ;;
+ -l*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+
+ case $ac_ii in
+ c|c_r|pthread*) ;;
+ *)
+ if test "$ext_shared" = "yes"; then
+ LDFLAGS="$LDFLAGS -l$ac_ii"
+ else
+
+
+ case $ac_ii in
+ c|c_r|pthread*) ;;
+ *)
+ LIBS="$LIBS -l$ac_ii"
+ ;;
+ esac
+
+
+ fi
+ ;;
+ esac
+
+
+ ;;
+ -L*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+ if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+
+ if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+ ai_p=$ac_ii
+ else
+
+ ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+ ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+ fi
+
+
+ if test "$ext_shared" = "yes"; then
+ LDFLAGS="-L$ai_p $LDFLAGS"
+ test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+ else
+
+
+
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "LIBPATH$unique=set"
+
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+ LDFLAGS="$LDFLAGS -L$ai_p"
+ PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+ fi
+
+
+ fi
+
+ fi
+
+ ;;
+ esac
+ done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5
+$as_echo_n "checking for CRYPTO_free in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_CRYPTO_free+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char CRYPTO_free ();
+int
+main ()
+{
+return CRYPTO_free ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_CRYPTO_free=yes
+else
+ ac_cv_lib_crypto_CRYPTO_free=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_free" >&5
+$as_echo "$ac_cv_lib_crypto_CRYPTO_free" >&6; }
+if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes; then :
+
+ LDFLAGS=$save_old_LDFLAGS
+ ext_shared=$save_ext_shared
+
+
+
+ case crypto in
+ c|c_r|pthread*) ;;
+ *)
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="-lcrypto $MYSQLND_SHARED_LIBADD"
+ else
+
+
+ case crypto in
+ c|c_r|pthread*) ;;
+ *)
+ LIBS="-lcrypto $LIBS"
+ ;;
+ esac
+
+
+ fi
+ ;;
+ esac
+
+
+
+
+else
+
+ LDFLAGS=$save_old_LDFLAGS
+ ext_shared=$save_ext_shared
+ unset ac_cv_lib_crypto_CRYPTO_free
+
+ as_fn_error $? "libcrypto not found!" "$LINENO" 5
+
+
+fi
+
+
+ old_LIBS=$LIBS
+ LIBS="$LIBS -lcrypto"
+
+ save_old_LDFLAGS=$LDFLAGS
+ ac_stuff="
+ -L$OPENSSL_LIBDIR
+ "
+
+ save_ext_shared=$ext_shared
+ ext_shared=yes
+
+ for ac_i in $ac_stuff; do
+ case $ac_i in
+ -pthread)
+ if test "$ext_shared" = "yes"; then
+ LDFLAGS="$LDFLAGS -pthread"
+ else
+
+
+ unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "EXTRA_LDFLAGS$unique=set"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"
+ fi
+
+ fi
+ ;;
+ -l*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+
+ case $ac_ii in
+ c|c_r|pthread*) ;;
+ *)
+ if test "$ext_shared" = "yes"; then
+ LDFLAGS="$LDFLAGS -l$ac_ii"
+ else
+
+
+ case $ac_ii in
+ c|c_r|pthread*) ;;
+ *)
+ LIBS="$LIBS -l$ac_ii"
+ ;;
+ esac
+
+
+ fi
+ ;;
+ esac
+
+
+ ;;
+ -L*)
+ ac_ii=`echo $ac_i|cut -c 3-`
+
+ if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then
+
+ if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then
+ ai_p=$ac_ii
+ else
+
+ ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`"
+
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+ ai_p="$ep_realdir/`basename \"$ac_ii\"`"
+ fi
+
+
+ if test "$ext_shared" = "yes"; then
+ LDFLAGS="-L$ai_p $LDFLAGS"
+ test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS"
+ else
+
+
+
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "LIBPATH$unique=set"
+
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+ LDFLAGS="$LDFLAGS -L$ai_p"
+ PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+ fi
+
+
+ fi
+
+ fi
+
+ ;;
+ esac
+ done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_ssl_version in -lssl" >&5
+$as_echo_n "checking for SSL_CTX_set_ssl_version in -lssl... " >&6; }
+if ${ac_cv_lib_ssl_SSL_CTX_set_ssl_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_CTX_set_ssl_version ();
+int
+main ()
+{
+return SSL_CTX_set_ssl_version ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ssl_SSL_CTX_set_ssl_version=yes
+else
+ ac_cv_lib_ssl_SSL_CTX_set_ssl_version=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&5
+$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" >&6; }
+if test "x$ac_cv_lib_ssl_SSL_CTX_set_ssl_version" = xyes; then :
+
+ LDFLAGS=$save_old_LDFLAGS
+ ext_shared=$save_ext_shared
+
+ found_openssl=yes
+
+
+else
+
+ LDFLAGS=$save_old_LDFLAGS
+ ext_shared=$save_ext_shared
+ unset ac_cv_lib_ssl_SSL_CTX_set_ssl_version
+
+ as_fn_error $? "libssl not found!" "$LINENO" 5
+
+
+fi
+
+ LIBS=$old_LIBS
+
+
+ case ssl in
+ c|c_r|pthread*) ;;
+ *)
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="-lssl $MYSQLND_SHARED_LIBADD"
+ else
+
+
+ case ssl in
+ c|c_r|pthread*) ;;
+ *)
+ LIBS="-lssl $LIBS"
+ ;;
+ esac
+
+
+ fi
+ ;;
+ esac
+
+
+
+
+ case crypto in
+ c|c_r|pthread*) ;;
+ *)
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="-lcrypto $MYSQLND_SHARED_LIBADD"
+ else
+
+
+ case crypto in
+ c|c_r|pthread*) ;;
+ *)
+ LIBS="-lcrypto $LIBS"
+ ;;
+ esac
+
+
+ fi
+ ;;
+ esac
+
+
+
+
+ if test "$OPENSSL_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$OPENSSL_LIBDIR" != "/usr/lib"; then
+
+ if test -z "$OPENSSL_LIBDIR" || echo "$OPENSSL_LIBDIR" | grep '^/' >/dev/null ; then
+ ai_p=$OPENSSL_LIBDIR
+ else
+
+ ep_dir="`echo $OPENSSL_LIBDIR|$SED 's%/*[^/][^/]*/*$%%'`"
+
+ ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+ ai_p="$ep_realdir/`basename \"$OPENSSL_LIBDIR\"`"
+ fi
+
+
+ if test "$ext_shared" = "yes"; then
+ MYSQLND_SHARED_LIBADD="-L$ai_p $MYSQLND_SHARED_LIBADD"
+ test -n "$ld_runpath_switch" && MYSQLND_SHARED_LIBADD="$ld_runpath_switch$ai_p $MYSQLND_SHARED_LIBADD"
+ else
+
+
+
+ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'`
+
+ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+ if test -n "$unique" && test "`eval $cmd`" = "" ; then
+ eval "LIBPATH$unique=set"
+
+ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
+ LDFLAGS="$LDFLAGS -L$ai_p"
+ PHP_RPATHS="$PHP_RPATHS $ai_p"
+
+ fi
+
+
+ fi
+
+ fi
+
+ fi
+
+ if test "$found_openssl" = "yes"; then
+ OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
+
+
+
+$as_echo "#define MYSQLND_HAVE_SSL 1" >>confdefs.h
+
+
+ fi
+
+ fi
+
mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
ext_builddir=ext/mysqlnd
@@ -102533,7 +103252,7 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$
$as_echo_n "checking whether $php_typename exists... " >&6; }
php_cache_value=php_cv_sizeof_$php_typename
- if { as_var=php_cv_sizeof_$php_typename; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval \${php_cv_sizeof_$php_typename+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -102717,7 +103436,7 @@ if test "$PHP_RECODE" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_$MYSQL_LIBNAME''_hash_insert" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hash_insert in -l$MYSQL_LIBNAME" >&5
$as_echo_n "checking for hash_insert in -l$MYSQL_LIBNAME... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -102752,8 +103471,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
@@ -102773,7 +103491,7 @@ fi
fi
if test -n "$recode_conflict"; then
- as_fn_error "recode extension can not be configured together with:$recode_conflict" "$LINENO" 5
+ as_fn_error $? "recode extension can not be configured together with:$recode_conflict" "$LINENO" 5
fi
fi
@@ -102891,7 +103609,7 @@ if test "$PHP_PEAR" != "no"; then
if test "$pear_error_msg"; then
- as_fn_error "$pear_error_msg" "$LINENO" 5
+ as_fn_error $? "$pear_error_msg" "$LINENO" 5
fi
install_pear="install-pear"
@@ -102937,7 +103655,7 @@ $as_echo "${T_MD}Configuring Zend${T_ME}" >&6; }
# we only support certain bison versions
- bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1"
+ bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
@@ -102946,7 +103664,7 @@ $as_echo "${T_MD}Configuring Zend${T_ME}" >&6; }
if test "$YACC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison version" >&5
$as_echo_n "checking for bison version... " >&6; }
-if test "${php_cv_bison_version+set}" = set; then :
+if ${php_cv_bison_version+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -103002,8 +103720,7 @@ dlfcn.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -103014,7 +103731,7 @@ done
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
else
@@ -103026,7 +103743,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
+if ${ac_cv_type_signal+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -103063,7 +103780,7 @@ _ACEOF
ac_fn_c_check_type "$LINENO" "uint" "ac_cv_type_uint" "$ac_includes_default"
-if test "x$ac_cv_type_uint" = x""yes; then :
+if test "x$ac_cv_type_uint" = xyes; then :
else
@@ -103074,7 +103791,7 @@ _ACEOF
fi
ac_fn_c_check_type "$LINENO" "ulong" "ac_cv_type_ulong" "$ac_includes_default"
-if test "x$ac_cv_type_ulong" = x""yes; then :
+if test "x$ac_cv_type_ulong" = xyes; then :
else
@@ -103173,13 +103890,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
for ac_func in vprintf
do :
ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = x""yes; then :
+if test "x$ac_cv_func_vprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VPRINTF 1
_ACEOF
ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = x""yes; then :
+if test "x$ac_cv_func__doprnt" = xyes; then :
$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
@@ -103191,7 +103908,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
$as_echo_n "checking for working memcmp... " >&6; }
-if test "${ac_cv_func_memcmp_working+set}" = set; then :
+if ${ac_cv_func_memcmp_working+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -103255,7 +103972,7 @@ esac
# for constant arguments. Useless!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
$as_echo_n "checking for working alloca.h... " >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then :
+if ${ac_cv_working_alloca_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -103288,7 +104005,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
$as_echo_n "checking for alloca... " >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then :
+if ${ac_cv_func_alloca_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -103307,7 +104024,7 @@ else
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+void *alloca (size_t);
# endif
# endif
# endif
@@ -103351,7 +104068,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test "${ac_cv_os_cray+set}" = set; then :
+if ${ac_cv_os_cray+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -103378,8 +104095,7 @@ if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
@@ -103393,7 +104109,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
$as_echo_n "checking stack direction for C alloca... " >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then :
+if ${ac_cv_c_stack_direction+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -103445,8 +104161,7 @@ for ac_func in memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -103457,7 +104172,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sprintf is broken" >&5
$as_echo_n "checking whether sprintf is broken... " >&6; }
-if test "${ac_cv_broken_sprintf+set}" = set; then :
+if ${ac_cv_broken_sprintf+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -103503,8 +104218,7 @@ for ac_func in finite isfinite isinf isnan
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -103516,7 +104230,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fp_except is defined" >&5
$as_echo_n "checking whether fp_except is defined... " >&6; }
-if test "${ac_cv_type_fp_except+set}" = set; then :
+if ${ac_cv_type_fp_except+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -103833,7 +104547,7 @@ fi
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DLFCN_H 1
_ACEOF
@@ -103851,7 +104565,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 103854 "configure"
+#line 104568 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -104066,7 +104780,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
@@ -104331,7 +105045,7 @@ fi
for ac_func in mremap
do :
ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
-if test "x$ac_cv_func_mremap" = x""yes; then :
+if test "x$ac_cv_func_mremap" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MREMAP 1
_ACEOF
@@ -104354,7 +105068,7 @@ fi
ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
-if test "x$ac_cv_func_sigaction" = x""yes; then :
+if test "x$ac_cv_func_sigaction" = xyes; then :
$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h
@@ -104419,7 +105133,7 @@ $as_echo "${T_MD}Configuring TSRM${T_ME}" >&6; }
for ac_header in stdarg.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdarg_h" = x""yes; then :
+if test "x$ac_cv_header_stdarg_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDARG_H 1
_ACEOF
@@ -104432,7 +105146,7 @@ done
for ac_func in sigprocmask
do :
ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
-if test "x$ac_cv_func_sigprocmask" = x""yes; then :
+if test "x$ac_cv_func_sigprocmask" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SIGPROCMASK 1
_ACEOF
@@ -104521,14 +105235,14 @@ elif test "$TSRM_ST" != "no"; then
for ac_header in st.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "st.h" "ac_cv_header_st_h" "$ac_includes_default"
-if test "x$ac_cv_header_st_h" = x""yes; then :
+if test "x$ac_cv_header_st_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ST_H 1
_ACEOF
else
- as_fn_error "Sorry, I was unable to locate the State Threads header file. Please specify the prefix using --with-tsrm-st=/prefix" "$LINENO" 5
+ as_fn_error $? "Sorry, I was unable to locate the State Threads header file. Please specify the prefix using --with-tsrm-st=/prefix" "$LINENO" 5
fi
@@ -104610,7 +105324,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthreads_cflags" >&5
$as_echo_n "checking for pthreads_cflags... " >&6; }
-if test "${ac_cv_pthreads_cflags+set}" = set; then :
+if ${ac_cv_pthreads_cflags+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -104676,7 +105390,7 @@ $as_echo "$ac_cv_pthreads_cflags" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthreads_lib" >&5
$as_echo_n "checking for pthreads_lib... " >&6; }
-if test "${ac_cv_pthreads_lib+set}" = set; then :
+if ${ac_cv_pthreads_lib+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -104752,7 +105466,7 @@ $as_echo "#define BETHREADS 1" >>confdefs.h
else
if test "$pthreads_working" != "yes"; then
- as_fn_error "Your system seems to lack POSIX threads." "$LINENO" 5
+ as_fn_error $? "Your system seems to lack POSIX threads." "$LINENO" 5
fi
@@ -105395,7 +106109,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
$as_echo_n "checking for non-GNU ld... " >&6; }
fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
@@ -105432,10 +106146,10 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -105455,7 +106169,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_ld_reload_flag='-r'
@@ -105480,7 +106194,7 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
$as_echo_n "checking for BSD-compatible nm... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
+if ${lt_cv_path_NM+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
@@ -105533,7 +106247,7 @@ NM="$lt_cv_path_NM"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -105763,7 +106477,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 105766 "configure"' > conftest.$ac_ext
+ echo '#line 106480 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -105857,7 +106571,7 @@ s390*-*linux*|sparc*-*linux*)
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -105942,7 +106656,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
@@ -105972,7 +106686,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -105988,11 +106702,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -106031,7 +106745,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -106047,18 +106761,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
@@ -106074,7 +106788,7 @@ fi
# find the maximum length of command line arguments
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
@@ -106198,7 +106912,7 @@ fi
# Check for command to grab the raw symbol name followed by C symbol from nm.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -106410,7 +107124,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f .libs 2>/dev/null
@@ -106477,7 +107191,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
@@ -106517,7 +107231,7 @@ if test -z "$ac_cv_prog_AR"; then
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
@@ -106569,7 +107283,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -106609,7 +107323,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -106661,7 +107375,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -106701,7 +107415,7 @@ if test -z "$ac_cv_prog_STRIP"; then
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -106804,7 +107518,7 @@ file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
@@ -106866,7 +107580,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MAGIC_CMD in
@@ -106941,7 +107655,7 @@ esac
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$DSYMUTIL"; then
@@ -106981,7 +107695,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
set dummy dsymutil; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_DSYMUTIL"; then
@@ -107033,7 +107747,7 @@ fi
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_NMEDIT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NMEDIT"; then
@@ -107073,7 +107787,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then
set dummy nmedit; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_NMEDIT"; then
@@ -107123,7 +107837,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
@@ -107146,7 +107860,7 @@ fi
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_ld_exported_symbols_list=no
@@ -107155,7 +107869,7 @@ else
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cat > conftest.$ac_ext <<EOF
-#line 107158 "configure"
+#line 107872 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -107297,7 +108011,7 @@ if test "$GCC" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
@@ -107313,11 +108027,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:107316: $lt_compile\"" >&5)
+ (eval echo "\"configure:108030: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:107320: \$? = $ac_status" >&5
+ echo "configure:108034: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -107595,7 +108309,7 @@ if test -n "$lt_prog_compiler_pic"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works=no
@@ -107611,11 +108325,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:107614: $lt_compile\"" >&5)
+ (eval echo "\"configure:108328: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:107618: \$? = $ac_status" >&5
+ echo "configure:108332: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -107658,7 +108372,7 @@ esac
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
@@ -107696,7 +108410,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o=no
@@ -107715,11 +108429,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:107718: $lt_compile\"" >&5)
+ (eval echo "\"configure:108432: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "configure:107722: \$? = $ac_status" >&5
+ echo "configure:108436: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -108179,7 +108893,7 @@ _LT_EOF
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 108182 "configure"
+#line 108896 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -108221,7 +108935,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 108224 "configure"
+#line 108938 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -109372,14 +110086,14 @@ esac
$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then :
+if ${lt_cv_sys_lib_search_path_spec+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
fi
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then :
+if ${lt_cv_sys_lib_dlsearch_path_spec+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
@@ -109488,7 +110202,7 @@ else
# if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -109522,7 +110236,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
@@ -109536,12 +110250,12 @@ fi
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+if test "x$ac_cv_func_shl_load" = xyes; then :
lt_cv_dlopen="shl_load"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -109575,16 +110289,16 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
lt_cv_dlopen="dlopen"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -109618,12 +110332,12 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -109657,12 +110371,12 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -109696,7 +110410,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -109737,7 +110451,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -109746,7 +110460,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 109749 "configure"
+#line 110463 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -109837,7 +110551,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; }
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -109846,7 +110560,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 109849 "configure"
+#line 110563 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -110523,13 +111237,13 @@ $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
# Check whether tagname contains only valid characters
case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
"") ;;
- *) as_fn_error "invalid tag name: $tagname" "$LINENO" 5
+ *) as_fn_error $? "invalid tag name: $tagname" "$LINENO" 5
;;
esac
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
then
- as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
+ as_fn_error $? "tag name \"$tagname\" already exists" "$LINENO" 5
fi
# Update the list of available tags.
@@ -110708,7 +111422,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
$as_echo_n "checking for non-GNU ld... " >&6; }
fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
@@ -110745,10 +111459,10 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -110911,7 +111625,7 @@ case $host_os in
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 110914 "configure"
+#line 111628 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -110954,7 +111668,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
-#line 110957 "configure"
+#line 111671 "configure"
#include "confdefs.h"
int main() {
; return 0; }
@@ -112190,7 +112904,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_pic_works_CXX=no
@@ -112206,11 +112920,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:112209: $lt_compile\"" >&5)
+ (eval echo "\"configure:112923: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "configure:112213: \$? = $ac_status" >&5
+ echo "configure:112927: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -112253,7 +112967,7 @@ esac
wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_CXX=no
@@ -112291,7 +113005,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_c_o_CXX=no
@@ -112310,11 +113024,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"configure:112313: $lt_compile\"" >&5)
+ (eval echo "\"configure:113027: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "configure:112317: \$? = $ac_status" >&5
+ echo "configure:113031: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -113009,14 +113723,14 @@ esac
$as_echo "$dynamic_linker" >&6; }
test "$dynamic_linker" = no && can_build_shared=no
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then :
+if ${lt_cv_sys_lib_search_path_spec+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
fi
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then :
+if ${lt_cv_sys_lib_dlsearch_path_spec+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
@@ -113504,7 +114218,7 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
;;
*)
- as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
+ as_fn_error $? "Unsupported tag name: $tagname" "$LINENO" 5
;;
esac
@@ -113522,7 +114236,7 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
chmod +x "$ofile"
else
rm -f "${ofile}T"
- as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
+ as_fn_error $? "unable to update list of available tagged configurations." "$LINENO" 5
fi
fi
@@ -113691,7 +114405,7 @@ EOF
fopen_wrappers.c alloca.c php_scandir.c \
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
- network.c php_open_temporary_file.c php_logos.c \
+ network.c php_open_temporary_file.c \
output.c getopt.c; do
IFS=.
@@ -113894,7 +114608,7 @@ esac
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_gc.c \
- zend_closures.c zend_float.c zend_string.c zend_signal.c; do
+ zend_closures.c zend_float.c zend_string.c zend_signal.c zend_generators.c; do
IFS=.
set $ac_src
@@ -114197,10 +114911,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -114216,6 +114941,7 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -114231,7 +114957,7 @@ LTLIBOBJS=$ac_ltlibobjs
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -114332,6 +115058,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -114377,19 +115104,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -114585,7 +115312,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -114639,7 +115366,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -114705,10 +115432,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -114723,11 +115450,16 @@ ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -114749,6 +115481,7 @@ do
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -114761,7 +115494,7 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -114770,7 +115503,7 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -114882,9 +115615,9 @@ cat <<X
X
fi
- if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
- if test "$APACHE_VERSION" -ge 2004001; then
- if test -z "$APACHE_THREADED_MPM"; then
+ if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
+ if test "$APACHE_VERSION" -ge 2004001; then
+ if test -z "$APACHE_THREADED_MPM"; then
cat <<X
+--------------------------------------------------------------------+
| *** WARNING *** |
@@ -114893,9 +115626,9 @@ cat <<X
| If you change Apache to use a threaded MPM you must reconfigure |
| PHP with --enable-maintainer-zts |
X
+ fi
fi
fi
- fi
# Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
if test "$PHP_OCI8" != "no"; then
@@ -114966,7 +115699,7 @@ do
"$ALL_OUTPUT_FILES") CONFIG_FILES="$CONFIG_FILES $ALL_OUTPUT_FILES" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -114989,9 +115722,10 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -114999,12 +115733,13 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -115021,12 +115756,12 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -115035,18 +115770,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -115054,7 +115789,7 @@ done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -115102,7 +115837,7 @@ t delim
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -115134,21 +115869,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -115160,7 +115903,7 @@ fi # test -n "$CONFIG_FILES"
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -115172,11 +115915,11 @@ _ACEOF
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -115261,7 +116004,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -115274,7 +116017,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -115293,7 +116036,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -115302,7 +116045,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -115328,8 +116071,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -115454,23 +116197,24 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -115479,21 +116223,21 @@ which seems to be undefined. Please make sure it is defined." >&2;}
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
@@ -115510,7 +116254,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -115531,7 +116275,7 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.in b/configure.in
index d06909126..6506ef765 100644
--- a/configure.in
+++ b/configure.in
@@ -118,9 +118,9 @@ int zend_sprintf(char *buffer, const char *format, ...);
])
PHP_MAJOR_VERSION=5
-PHP_MINOR_VERSION=4
-PHP_RELEASE_VERSION=8
-PHP_EXTRA_VERSION=""
+PHP_MINOR_VERSION=5
+PHP_RELEASE_VERSION=0
+PHP_EXTRA_VERSION="alpha1"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
@@ -784,7 +784,7 @@ if test "$PHP_GCOV" = "yes"; then
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
fi
- ltp_version_list="1.5 1.6 1.7"
+ ltp_version_list="1.5 1.6 1.7 1.9"
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
@@ -1443,7 +1443,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
fopen_wrappers.c alloca.c php_scandir.c \
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
- network.c php_open_temporary_file.c php_logos.c \
+ network.c php_open_temporary_file.c \
output.c getopt.c)
PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \
@@ -1472,7 +1472,7 @@ PHP_ADD_SOURCES(Zend, \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_gc.c \
- zend_closures.c zend_float.c zend_string.c zend_signal.c)
+ zend_closures.c zend_float.c zend_string.c zend_signal.c zend_generators.c)
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_default_classes.c)
@@ -1587,9 +1587,9 @@ cat <<X
X
fi
- if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
- if test "$APACHE_VERSION" -ge 2004001; then
- if test -z "$APACHE_THREADED_MPM"; then
+ if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
+ if test "$APACHE_VERSION" -ge 2004001; then
+ if test -z "$APACHE_THREADED_MPM"; then
cat <<X
+--------------------------------------------------------------------+
| *** WARNING *** |
@@ -1598,9 +1598,9 @@ cat <<X
| If you change Apache to use a threaded MPM you must reconfigure |
| PHP with --enable-maintainer-zts |
X
+ fi
fi
fi
- fi
# Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
if test "$PHP_OCI8" != "no"; then
diff --git a/ext/bcmath/tests/bcdiv_error1.phpt b/ext/bcmath/tests/bcdiv_error1.phpt
index c69d36bb9..c69d36bb9 100755..100644
--- a/ext/bcmath/tests/bcdiv_error1.phpt
+++ b/ext/bcmath/tests/bcdiv_error1.phpt
diff --git a/ext/bcmath/tests/bcpowmod_error1.phpt b/ext/bcmath/tests/bcpowmod_error1.phpt
index 2dc292eb5..2dc292eb5 100755..100644
--- a/ext/bcmath/tests/bcpowmod_error1.phpt
+++ b/ext/bcmath/tests/bcpowmod_error1.phpt
diff --git a/ext/bcmath/tests/bcpowmod_error2.phpt b/ext/bcmath/tests/bcpowmod_error2.phpt
index e0a99637c..e0a99637c 100755..100644
--- a/ext/bcmath/tests/bcpowmod_error2.phpt
+++ b/ext/bcmath/tests/bcpowmod_error2.phpt
diff --git a/ext/bcmath/tests/bcsqrt_error1.phpt b/ext/bcmath/tests/bcsqrt_error1.phpt
index 1f213dbc8..1f213dbc8 100755..100644
--- a/ext/bcmath/tests/bcsqrt_error1.phpt
+++ b/ext/bcmath/tests/bcsqrt_error1.phpt
diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c
index 7926fad67..5947aabc9 100644
--- a/ext/calendar/calendar.c
+++ b/ext/calendar/calendar.c
@@ -140,7 +140,7 @@ const zend_function_entry calendar_functions[] = {
PHP_FE(frenchtojd, arginfo_frenchtojd)
PHP_FE(jddayofweek, arginfo_jddayofweek)
PHP_FE(jdmonthname, arginfo_jdmonthname)
- PHP_FE(easter_date, arginfo_easter_date)
+ PHP_FE(easter_date, arginfo_easter_date)
PHP_FE(easter_days, arginfo_easter_days)
PHP_FE(unixtojd, arginfo_unixtojd)
PHP_FE(jdtounix, arginfo_jdtounix)
@@ -199,11 +199,14 @@ static struct cal_entry_t cal_conversion_table[CAL_NUM_CALS] = {
{"Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31,
MonthNameShort, MonthNameLong},
{"Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30,
- JewishMonthName, JewishMonthName},
+ JewishMonthNameLeap, JewishMonthNameLeap},
{"French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30,
FrenchMonthName, FrenchMonthName}
};
+#define JEWISH_MONTH_NAME(year) ((monthsPerYear[((year)-1) % 19] == 13)?JewishMonthNameLeap:JewishMonthName)
+#define JEWISH_HEB_MONTH_NAME(year) ((monthsPerYear[((year)-1) % 19] == 13)?JewishMonthHebNameLeap:JewishMonthHebName)
+
/* For jddayofweek */
enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG };
@@ -288,7 +291,7 @@ static void _php_cal_info(int cal, zval **ret)
PHP_FUNCTION(cal_info)
{
long cal = -1;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &cal) == FAILURE) {
RETURN_FALSE;
@@ -418,8 +421,14 @@ PHP_FUNCTION(cal_from_jd)
add_assoc_string(return_value, "abbrevdayname", DayNameShort[dow], 1);
add_assoc_string(return_value, "dayname", DayNameLong[dow], 1);
/* month name */
- add_assoc_string(return_value, "abbrevmonth", calendar->month_name_short[month], 1);
- add_assoc_string(return_value, "monthname", calendar->month_name_long[month], 1);
+ if(cal == CAL_JEWISH) {
+ /* special case for Jewish calendar */
+ add_assoc_string(return_value, "abbrevmonth", JEWISH_MONTH_NAME(year)[month], 1);
+ add_assoc_string(return_value, "monthname", JEWISH_MONTH_NAME(year)[month], 1);
+ } else {
+ add_assoc_string(return_value, "abbrevmonth", calendar->month_name_short[month], 1);
+ add_assoc_string(return_value, "monthname", calendar->month_name_long[month], 1);
+ }
}
/* }}} */
@@ -608,7 +617,7 @@ PHP_FUNCTION(jdtojewish)
RETURN_FALSE;
}
- snprintf(hebdate, sizeof(hebdate), "%s %s %s", heb_number_to_chars(day, fl, &dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, &yearp));
+ snprintf(hebdate, sizeof(hebdate), "%s %s %s", heb_number_to_chars(day, fl, &dayp), JEWISH_HEB_MONTH_NAME(year)[month], heb_number_to_chars(year, fl, &yearp));
if (dayp) {
efree(dayp);
@@ -728,7 +737,7 @@ PHP_FUNCTION(jdmonthname)
break;
case CAL_MONTH_JEWISH: /* jewish month */
SdnToJewish(julday, &year, &month, &day);
- monthname = JewishMonthName[month];
+ monthname = JEWISH_MONTH_NAME(year)[month];
break;
case CAL_MONTH_FRENCH: /* french month */
SdnToFrench(julday, &year, &month, &day);
diff --git a/ext/calendar/jewish.c b/ext/calendar/jewish.c
index f4dc7c35a..9e5b0bece 100644
--- a/ext/calendar/jewish.c
+++ b/ext/calendar/jewish.c
@@ -85,8 +85,8 @@
* 3 Kislev 29 30 30 29 30 30 (variable)
* 4 Tevet 29 29 29 29 29 29
* 5 Shevat 30 30 30 30 30 30
- * 6 Adar I 29 29 29 30 30 30 (variable)
- * 7 Adar II -- -- -- 29 29 29 (optional)
+ * 6 Adar I -- -- -- 30 30 30 (optional)
+ * 7 Adar (II) 29 29 29 29 29 29
* 8 Nisan 30 30 30 30 30 30
* 9 Iyyar 29 29 29 29 29 29
* 10 Sivan 30 30 30 30 30 30
@@ -100,8 +100,8 @@
* have multiple possible spellings in the Roman character set. I have
* chosen to use the spellings found in the Encyclopedia Judaica.
*
- * Adar II, the month added for leap years, is sometimes referred to as
- * the 13th month, but I have chosen to assign it the number 7 to keep
+ * Adar I, the month added for leap years, is sometimes referred to as
+ * the 13th month, but I have chosen to assign it the number 6 to keep
* the months in chronological order. This may not be consistent with
* other numbering schemes.
*
@@ -286,7 +286,7 @@
#define AM3_11_20 ((9 * HALAKIM_PER_HOUR) + 204)
#define AM9_32_43 ((15 * HALAKIM_PER_HOUR) + 589)
-static int monthsPerYear[19] =
+int monthsPerYear[19] =
{
12, 12, 13, 12, 12, 13, 12, 13, 12, 12, 13, 12, 12, 13, 12, 12, 13, 12, 13
};
@@ -297,16 +297,36 @@ static int yearOffset[19] =
136, 148, 160, 173, 185, 197, 210, 222
};
+/* names for leap (13-month) year */
+char *JewishMonthNameLeap[14] =
+{
+ "",
+ "Tishri",
+ "Heshvan",
+ "Kislev",
+ "Tevet",
+ "Shevat",
+ "Adar I",
+ "Adar II",
+ "Nisan",
+ "Iyyar",
+ "Sivan",
+ "Tammuz",
+ "Av",
+ "Elul"
+};
+
+/* names for regular year */
char *JewishMonthName[14] =
{
- "",
+ "",
"Tishri",
"Heshvan",
"Kislev",
"Tevet",
"Shevat",
- "AdarI",
- "AdarII",
+ "",
+ "Adar",
"Nisan",
"Iyyar",
"Sivan",
@@ -315,16 +335,36 @@ char *JewishMonthName[14] =
"Elul"
};
+/* names for leap (13-month) year */
+char *JewishMonthHebNameLeap[14] =
+{
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ " '",
+ " '",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+};
+
+/* names for regular year */
char *JewishMonthHebName[14] =
{
- "",
+ "",
"",
"",
"",
"",
"",
+ "",
"",
- "' ",
"",
"",
"",
@@ -587,11 +627,11 @@ void SdnToJewish(
(*pMonth)--;
(*pDay) += 30;
} else {
- *pMonth = 6;
+ *pMonth = 7;
*pDay = inputDay - tishri1 + 207;
if (*pDay > 0)
return;
- (*pMonth)--;
+ (*pMonth) -= 2;
(*pDay) += 30;
}
if (*pDay > 0)
diff --git a/ext/calendar/sdncal.h b/ext/calendar/sdncal.h
index 81328d136..c0463c80d 100644
--- a/ext/calendar/sdncal.h
+++ b/ext/calendar/sdncal.h
@@ -79,7 +79,10 @@ long int JulianToSdn(int year, int month, int day);
void SdnToJewish(long int sdn, int *pYear, int *pMonth, int *pDay);
long int JewishToSdn(int year, int month, int day);
extern char *JewishMonthName[14];
+extern char *JewishMonthNameLeap[14];
extern char *JewishMonthHebName[14];
+extern char *JewishMonthHebNameLeap[14];
+extern int monthsPerYear[19];
/* French republic calendar conversions. */
void SdnToFrench(long int sdn, int *pYear, int *pMonth, int *pDay);
diff --git a/ext/calendar/tests/bug54254.phpt b/ext/calendar/tests/bug54254.phpt
new file mode 100644
index 000000000..df9362320
--- /dev/null
+++ b/ext/calendar/tests/bug54254.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Bug #54254 (cal_days_in_month incompatible with jdtojewish in non-leap-years)
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+var_dump(cal_days_in_month(CAL_JEWISH, 1, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 2, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 3, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 4, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 5, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 6, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 7, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 8, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 9, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 10, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 11, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 12, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 13, 5771));
+var_dump(cal_days_in_month(CAL_JEWISH, 1, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 2, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 3, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 4, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 5, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 6, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 7, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 8, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 9, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 10, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 11, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 12, 5772));
+var_dump(cal_days_in_month(CAL_JEWISH, 13, 5772));
+--EXPECT--
+int(30)
+int(30)
+int(30)
+int(29)
+int(30)
+int(30)
+int(29)
+int(30)
+int(29)
+int(30)
+int(29)
+int(30)
+int(29)
+int(30)
+int(29)
+int(30)
+int(29)
+int(30)
+int(0)
+int(29)
+int(30)
+int(29)
+int(30)
+int(29)
+int(30)
+int(29)
diff --git a/ext/calendar/tests/cal_info.phpt b/ext/calendar/tests/cal_info.phpt
index 2e3e61292..7edb4ce67 100644
--- a/ext/calendar/tests/cal_info.phpt
+++ b/ext/calendar/tests/cal_info.phpt
@@ -100,8 +100,8 @@ Array
[3] => Kislev
[4] => Tevet
[5] => Shevat
- [6] => AdarI
- [7] => AdarII
+ [6] => Adar I
+ [7] => Adar II
[8] => Nisan
[9] => Iyyar
[10] => Sivan
@@ -117,8 +117,8 @@ Array
[3] => Kislev
[4] => Tevet
[5] => Shevat
- [6] => AdarI
- [7] => AdarII
+ [6] => Adar I
+ [7] => Adar II
[8] => Nisan
[9] => Iyyar
[10] => Sivan
diff --git a/ext/calendar/tests/jdmonthname.phpt b/ext/calendar/tests/jdmonthname.phpt
index d05d3c595..07ed1161b 100644
--- a/ext/calendar/tests/jdmonthname.phpt
+++ b/ext/calendar/tests/jdmonthname.phpt
@@ -75,8 +75,8 @@ December
--- mode 4 ---
Tevet
Shevat
-AdarI
-AdarII
+Adar I
+Adar II
Nisan
Iyyar
Sivan
@@ -178,7 +178,7 @@ Heshvan
Kislev
Tevet
Shevat
-AdarI
+Adar
Nisan
Iyyar
Sivan
@@ -279,7 +279,7 @@ Heshvan
Kislev
Tevet
Shevat
-AdarI
+Adar
Nisan
Iyyar
Sivan
diff --git a/ext/calendar/tests/jdtojewish.phpt b/ext/calendar/tests/jdtojewish.phpt
index 484b95749..bc0ecbdd8 100644
--- a/ext/calendar/tests/jdtojewish.phpt
+++ b/ext/calendar/tests/jdtojewish.phpt
@@ -14,10 +14,11 @@ var_dump(jdtojewish(gregoriantojd(10,28,2002))."\r\n".
jdtojewish(gregoriantojd(10,8,2002),true, CAL_JEWISH_ADD_GERESHAYIM)."\r\n".
jdtojewish(gregoriantojd(10,8,2002),true, CAL_JEWISH_ADD_GERESHAYIM+CAL_JEWISH_ADD_ALAFIM_GERESH)."\r\n".
jdtojewish(gregoriantojd(10,8,2002),true, CAL_JEWISH_ADD_GERESHAYIM+CAL_JEWISH_ADD_ALAFIM)."\r\n".
- jdtojewish(gregoriantojd(10,8,2002),true, CAL_JEWISH_ADD_GERESHAYIM+CAL_JEWISH_ADD_ALAFIM+CAL_JEWISH_ADD_ALAFIM_GERESH)."\r\n");
+ jdtojewish(gregoriantojd(10,8,2002),true, CAL_JEWISH_ADD_GERESHAYIM+CAL_JEWISH_ADD_ALAFIM+CAL_JEWISH_ADD_ALAFIM_GERESH)."\r\n".
+ jdtojewish(gregoriantojd(3,10,2007))."\r\n");
?>
---EXPECT--
-string(184) "2/22/5763
+--EXPECTF--
+string(%d) "2/22/5763
'
@@ -27,4 +28,5 @@ string(184) "2/22/5763
' '"
' "
' ' "
+7/20/5767
"
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c
index 7c035f6c4..7c035f6c4 100755..100644
--- a/ext/com_dotnet/com_persist.c
+++ b/ext/com_dotnet/com_persist.c
diff --git a/ext/com_dotnet/tests/27974.phpt b/ext/com_dotnet/tests/27974.phpt
index 30c42b6cf..30c42b6cf 100755..100644
--- a/ext/com_dotnet/tests/27974.phpt
+++ b/ext/com_dotnet/tests/27974.phpt
diff --git a/ext/curl/config.m4 b/ext/curl/config.m4
index fbb4f5b4e..92559be7c 100644
--- a/ext/curl/config.m4
+++ b/ext/curl/config.m4
@@ -131,13 +131,6 @@ int main(int argc, char *argv[])
$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
])
- PHP_CHECK_LIBRARY(curl,curl_version_info,
- [
- AC_DEFINE(HAVE_CURL_VERSION_INFO,1,[ ])
- ],[],[
- $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
- ])
-
PHP_CHECK_LIBRARY(curl,curl_easy_strerror,
[
AC_DEFINE(HAVE_CURL_EASY_STRERROR,1,[ ])
@@ -156,6 +149,6 @@ int main(int argc, char *argv[])
AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
fi
- PHP_NEW_EXTENSION(curl, interface.c multi.c streams.c, $ext_shared)
+ PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c, $ext_shared)
PHP_SUBST(CURL_SHARED_LIBADD)
fi
diff --git a/ext/curl/config.w32 b/ext/curl/config.w32
index 930adcfd4..a05684557 100644
--- a/ext/curl/config.w32
+++ b/ext/curl/config.w32
@@ -13,12 +13,11 @@ if (PHP_CURL != "no") {
&& (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
) {
- EXTENSION("curl", "interface.c multi.c streams.c", true);
+ EXTENSION("curl", "interface.c multi.c share.c streams.c", true);
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL');
AC_DEFINE('HAVE_CURL_MULTI_STRERROR', 1, 'Have curl_multi_strerror in cURL');
- AC_DEFINE('HAVE_CURL_VERSION_INFO', 1, 'Have curl_version_info in cURL');
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
// TODO: check for curl_version_info
// AC_DEFINE('PHP_CURL_URL_WRAPPERS', 0, 'Use curl for URL wrappers [experimental]');
diff --git a/ext/curl/curl.dsp b/ext/curl/curl.dsp
index 81d823183..6524fceb8 100644
--- a/ext/curl/curl.dsp
+++ b/ext/curl/curl.dsp
@@ -166,6 +166,10 @@ SOURCE=.\multi.c
# End Source File
# Begin Source File
+SOURCE=.\share.c
+# End Source File
+
+# Begin Source File
SOURCE=.\streams.c
# End Source File
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index d75e5c058..eb7ed8d20 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -90,6 +90,7 @@
int le_curl;
int le_curl_multi_handle;
+int le_curl_share_handle;
#ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */
static MUTEX_T *php_curl_openssl_tsl = NULL;
@@ -261,7 +262,6 @@ int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC) /* {{{ */
ch->handlers->write->stream = NULL;
ch->handlers->write->method = PHP_CURL_STDOUT;
- ch->handlers->write->type = PHP_CURL_ASCII;
curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch);
}
}
@@ -314,6 +314,24 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_close, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
+#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
+ZEND_BEGIN_ARG_INFO(arginfo_curl_reset, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+#endif
+
+#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */
+ZEND_BEGIN_ARG_INFO(arginfo_curl_escape, 0)
+ ZEND_ARG_INFO(0, ch)
+ ZEND_ARG_INFO(0, str)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_curl_unescape, 0)
+ ZEND_ARG_INFO(0, ch)
+ ZEND_ARG_INFO(0, str)
+ZEND_END_ARG_INFO()
+#endif
+
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_init, 0)
ZEND_END_ARG_INFO()
@@ -349,6 +367,19 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
ZEND_ARG_INFO(0, mh)
ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_curl_share_init, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_curl_share_close, 0)
+ ZEND_ARG_INFO(0, sh)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0)
+ ZEND_ARG_INFO(0, sh)
+ ZEND_ARG_INFO(0, option)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
/* }}} */
/* {{{ curl_functions[]
@@ -364,6 +395,13 @@ const zend_function_entry curl_functions[] = {
PHP_FE(curl_error, arginfo_curl_error)
PHP_FE(curl_errno, arginfo_curl_errno)
PHP_FE(curl_close, arginfo_curl_close)
+#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
+ PHP_FE(curl_reset, arginfo_curl_reset)
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */
+ PHP_FE(curl_escape, arginfo_curl_escape)
+ PHP_FE(curl_unescape, arginfo_curl_unescape)
+#endif
PHP_FE(curl_multi_init, arginfo_curl_multi_init)
PHP_FE(curl_multi_add_handle, arginfo_curl_multi_add_handle)
PHP_FE(curl_multi_remove_handle, arginfo_curl_multi_remove_handle)
@@ -372,6 +410,9 @@ const zend_function_entry curl_functions[] = {
PHP_FE(curl_multi_getcontent, arginfo_curl_multi_getcontent)
PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read)
PHP_FE(curl_multi_close, arginfo_curl_multi_close)
+ PHP_FE(curl_share_init, arginfo_curl_share_init)
+ PHP_FE(curl_share_close, arginfo_curl_share_close)
+ PHP_FE(curl_share_setopt, arginfo_curl_share_setopt)
PHP_FE_END
};
/* }}} */
@@ -428,42 +469,40 @@ PHP_MINFO_FUNCTION(curl)
unsigned int i;
static const struct feat feats[] = {
-#if LIBCURL_VERSION_NUM > 0x070a06 /* 7.10.7 */
+#if LIBCURL_VERSION_NUM >= 0x070a07 /* 7.10.7 */
{"AsynchDNS", CURL_VERSION_ASYNCHDNS},
#endif
-#if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */
+#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */
+ {"CharConv", CURL_VERSION_CONV},
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070a06 /* 7.10.6 */
{"Debug", CURL_VERSION_DEBUG},
{"GSS-Negotiate", CURL_VERSION_GSSNEGOTIATE},
#endif
-#if LIBCURL_VERSION_NUM > 0x070b02 /* 7.12.0 */
+#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */
{"IDN", CURL_VERSION_IDN},
#endif
-#ifdef CURL_VERSION_IPV6
{"IPv6", CURL_VERSION_IPV6},
-#endif
-#if LIBCURL_VERSION_NUM > 0x070b00 /* 7.11.1 */
+ {"krb4", CURL_VERSION_KERBEROS4},
+#if LIBCURL_VERSION_NUM >= 0x070b01 /* 7.11.1 */
{"Largefile", CURL_VERSION_LARGEFILE},
#endif
-#if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */
+ {"libz", CURL_VERSION_LIBZ},
+#if LIBCURL_VERSION_NUM >= 0x070a06 /* 7.10.6 */
{"NTLM", CURL_VERSION_NTLM},
#endif
-#if LIBCURL_VERSION_NUM > 0x070a07 /* 7.10.8 */
+#if LIBCURL_VERSION_NUM >= 0x071600 /* 7.22.0 */
+ {"NTLMWB", CURL_VERSION_NTLM_WB},
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070a08 /* 7.10.8 */
{"SPNEGO", CURL_VERSION_SPNEGO},
#endif
-#ifdef CURL_VERSION_SSL
{"SSL", CURL_VERSION_SSL},
-#endif
-#if LIBCURL_VERSION_NUM > 0x070d01 /* 7.13.2 */
+#if LIBCURL_VERSION_NUM >= 0x070d02 /* 7.13.2 */
{"SSPI", CURL_VERSION_SSPI},
#endif
-#ifdef CURL_VERSION_KERBEROS4
- {"krb4", CURL_VERSION_KERBEROS4},
-#endif
-#ifdef CURL_VERSION_LIBZ
- {"libz", CURL_VERSION_LIBZ},
-#endif
-#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */
- {"CharConv", CURL_VERSION_CONV},
+#if LIBCURL_VERSION_NUM >= 0x071504 /* 7.21.4 */
+ {"TLS-SRP", CURL_VERSION_TLSAUTH_SRP},
#endif
{NULL, 0}
};
@@ -528,6 +567,7 @@ PHP_MINIT_FUNCTION(curl)
{
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number);
+ le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, "curl_share", module_number);
REGISTER_INI_ENTRIES();
@@ -536,356 +576,556 @@ PHP_MINIT_FUNCTION(curl)
of options and which version they were introduced */
/* Constants for curl_setopt() */
-#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */
- REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
- REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);
- REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4);
- REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
+ REGISTER_CURL_CONSTANT(CURLOPT_AUTOREFERER);
+ REGISTER_CURL_CONSTANT(CURLOPT_BINARYTRANSFER);
+ REGISTER_CURL_CONSTANT(CURLOPT_BUFFERSIZE);
+ REGISTER_CURL_CONSTANT(CURLOPT_CAINFO);
+ REGISTER_CURL_CONSTANT(CURLOPT_CAPATH);
+ REGISTER_CURL_CONSTANT(CURLOPT_CLOSEPOLICY);
+ REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT);
+ REGISTER_CURL_CONSTANT(CURLOPT_COOKIE);
+ REGISTER_CURL_CONSTANT(CURLOPT_COOKIEFILE);
+ REGISTER_CURL_CONSTANT(CURLOPT_COOKIEJAR);
+ REGISTER_CURL_CONSTANT(CURLOPT_COOKIESESSION);
+ REGISTER_CURL_CONSTANT(CURLOPT_CRLF);
+ REGISTER_CURL_CONSTANT(CURLOPT_CUSTOMREQUEST);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
- REGISTER_CURL_CONSTANT(CURLOPT_PORT);
+ REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
+ REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET);
+ REGISTER_CURL_CONSTANT(CURLOPT_ENCODING);
+ REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT(CURLOPT_FILE);
- REGISTER_CURL_CONSTANT(CURLOPT_READDATA);
- REGISTER_CURL_CONSTANT(CURLOPT_INFILE);
- REGISTER_CURL_CONSTANT(CURLOPT_INFILESIZE);
- REGISTER_CURL_CONSTANT(CURLOPT_URL);
- REGISTER_CURL_CONSTANT(CURLOPT_PROXY);
- REGISTER_CURL_CONSTANT(CURLOPT_VERBOSE);
+ REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
+ REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
+ REGISTER_CURL_CONSTANT(CURLOPT_FORBID_REUSE);
+ REGISTER_CURL_CONSTANT(CURLOPT_FRESH_CONNECT);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPLISTONLY);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPPORT);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPRT);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPSV);
REGISTER_CURL_CONSTANT(CURLOPT_HEADER);
+ REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTPGET);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER);
- REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS);
- REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION);
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTPPROXYTUNNEL);
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTP_VERSION);
+ REGISTER_CURL_CONSTANT(CURLOPT_INFILE);
+ REGISTER_CURL_CONSTANT(CURLOPT_INFILESIZE);
+ REGISTER_CURL_CONSTANT(CURLOPT_INTERFACE);
+ REGISTER_CURL_CONSTANT(CURLOPT_KRB4LEVEL);
+ REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_LIMIT);
+ REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_TIME);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS);
+ REGISTER_CURL_CONSTANT(CURLOPT_NETRC);
REGISTER_CURL_CONSTANT(CURLOPT_NOBODY);
- REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR);
- REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD);
+ REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS);
+ REGISTER_CURL_CONSTANT(CURLOPT_NOSIGNAL);
+ REGISTER_CURL_CONSTANT(CURLOPT_PORT);
REGISTER_CURL_CONSTANT(CURLOPT_POST);
- REGISTER_CURL_CONSTANT(CURLOPT_FTPLISTONLY);
- REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND);
- REGISTER_CURL_CONSTANT(CURLOPT_NETRC);
- REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
-#if CURLOPT_FTPASCII != 0
- REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_PUT);
-#if CURLOPT_MUTE != 0
- REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
+ REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS);
+ REGISTER_CURL_CONSTANT(CURLOPT_POSTQUOTE);
+ REGISTER_CURL_CONSTANT(CURLOPT_PREQUOTE);
+ REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXY);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXYPORT);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXYTYPE);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
+ REGISTER_CURL_CONSTANT(CURLOPT_PUT);
+ REGISTER_CURL_CONSTANT(CURLOPT_QUOTE);
+ REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE);
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
- REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT);
-#if LIBCURL_VERSION_NUM > 0x071002
- REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS);
+ REGISTER_CURL_CONSTANT(CURLOPT_READDATA);
+ REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_REFERER);
- REGISTER_CURL_CONSTANT(CURLOPT_USERAGENT);
- REGISTER_CURL_CONSTANT(CURLOPT_FTPPORT);
- REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPSV);
- REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_LIMIT);
- REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_TIME);
REGISTER_CURL_CONSTANT(CURLOPT_RESUME_FROM);
- REGISTER_CURL_CONSTANT(CURLOPT_COOKIE);
- REGISTER_CURL_CONSTANT(CURLOPT_COOKIESESSION);
- REGISTER_CURL_CONSTANT(CURLOPT_AUTOREFERER);
+ REGISTER_CURL_CONSTANT(CURLOPT_RETURNTRANSFER);
+ REGISTER_CURL_CONSTANT(CURLOPT_SHARE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLCERT);
REGISTER_CURL_CONSTANT(CURLOPT_SSLCERTPASSWD);
- REGISTER_CURL_CONSTANT(CURLOPT_WRITEHEADER);
- REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYHOST);
- REGISTER_CURL_CONSTANT(CURLOPT_COOKIEFILE);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSLCERTTYPE);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE_DEFAULT);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSLKEY);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSLKEYPASSWD);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSLKEYTYPE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLVERSION);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_CIPHER_LIST);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYHOST);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER);
+ REGISTER_CURL_CONSTANT(CURLOPT_STDERR);
REGISTER_CURL_CONSTANT(CURLOPT_TIMECONDITION);
+ REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEVALUE);
- REGISTER_CURL_CONSTANT(CURLOPT_CUSTOMREQUEST);
- REGISTER_CURL_CONSTANT(CURLOPT_STDERR);
REGISTER_CURL_CONSTANT(CURLOPT_TRANSFERTEXT);
- REGISTER_CURL_CONSTANT(CURLOPT_RETURNTRANSFER);
- REGISTER_CURL_CONSTANT(CURLOPT_QUOTE);
- REGISTER_CURL_CONSTANT(CURLOPT_POSTQUOTE);
- REGISTER_CURL_CONSTANT(CURLOPT_INTERFACE);
- REGISTER_CURL_CONSTANT(CURLOPT_KRB4LEVEL);
- REGISTER_CURL_CONSTANT(CURLOPT_HTTPPROXYTUNNEL);
- REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
- REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
- REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
-#if CURLOPT_PASSWDFUNCTION != 0
- REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
- REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS);
- REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS);
- REGISTER_CURL_CONSTANT(CURLOPT_CLOSEPOLICY);
- REGISTER_CURL_CONSTANT(CURLOPT_FRESH_CONNECT);
- REGISTER_CURL_CONSTANT(CURLOPT_FORBID_REUSE);
- REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE);
- REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET);
- REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT);
-#if LIBCURL_VERSION_NUM > 0x071002
- REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT_MS);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER);
- REGISTER_CURL_CONSTANT(CURLOPT_CAINFO);
- REGISTER_CURL_CONSTANT(CURLOPT_CAPATH);
- REGISTER_CURL_CONSTANT(CURLOPT_COOKIEJAR);
- REGISTER_CURL_CONSTANT(CURLOPT_SSL_CIPHER_LIST);
- REGISTER_CURL_CONSTANT(CURLOPT_BINARYTRANSFER);
- REGISTER_CURL_CONSTANT(CURLOPT_NOSIGNAL);
- REGISTER_CURL_CONSTANT(CURLOPT_PROXYTYPE);
- REGISTER_CURL_CONSTANT(CURLOPT_BUFFERSIZE);
- REGISTER_CURL_CONSTANT(CURLOPT_HTTPGET);
- REGISTER_CURL_CONSTANT(CURLOPT_HTTP_VERSION);
- REGISTER_CURL_CONSTANT(CURLOPT_SSLKEY);
- REGISTER_CURL_CONSTANT(CURLOPT_SSLKEYTYPE);
- REGISTER_CURL_CONSTANT(CURLOPT_SSLKEYPASSWD);
- REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE);
- REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE_DEFAULT);
- REGISTER_CURL_CONSTANT(CURLOPT_SSLCERTTYPE);
- REGISTER_CURL_CONSTANT(CURLOPT_CRLF);
- REGISTER_CURL_CONSTANT(CURLOPT_ENCODING);
- REGISTER_CURL_CONSTANT(CURLOPT_PROXYPORT);
REGISTER_CURL_CONSTANT(CURLOPT_UNRESTRICTED_AUTH);
- REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPRT);
-#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
- REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
-#endif
- REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
- REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
- REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
- REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
-
-#if LIBCURL_VERSION_NUM > 0x070f04 /* CURLOPT_MAX_RECV_SPEED_LARGE & CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.15.5 */
- REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE);
- REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE);
-#endif
-
-#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
- REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
- /* http authentication options */
- REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
- REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
- REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
- REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
- REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
- REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
-#endif
-
-#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH & CURLOPT_FTP_CREATE_MISSING_DIRS are available since curl 7.10.7 */
- REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH);
- REGISTER_CURL_CONSTANT(CURLOPT_FTP_CREATE_MISSING_DIRS);
-#endif
-
- REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE);
+ REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD);
+ REGISTER_CURL_CONSTANT(CURLOPT_URL);
+ REGISTER_CURL_CONSTANT(CURLOPT_USERAGENT);
+ REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
+ REGISTER_CURL_CONSTANT(CURLOPT_VERBOSE);
+ REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
+ REGISTER_CURL_CONSTANT(CURLOPT_WRITEHEADER);
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
+ REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_CALLBACK);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
- REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_SLOWEST);
- REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_CALLBACK);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_OLDEST);
+ REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_SLOWEST);
- /* Info constants */
- REGISTER_CURL_CONSTANT(CURLINFO_EFFECTIVE_URL);
- REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE);
- REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE);
- REGISTER_CURL_CONSTANT(CURLINFO_REQUEST_SIZE);
- REGISTER_CURL_CONSTANT(CURLINFO_TOTAL_TIME);
- REGISTER_CURL_CONSTANT(CURLINFO_NAMELOOKUP_TIME);
- REGISTER_CURL_CONSTANT(CURLINFO_CONNECT_TIME);
- REGISTER_CURL_CONSTANT(CURLINFO_PRETRANSFER_TIME);
- REGISTER_CURL_CONSTANT(CURLINFO_SIZE_UPLOAD);
- REGISTER_CURL_CONSTANT(CURLINFO_SIZE_DOWNLOAD);
- REGISTER_CURL_CONSTANT(CURLINFO_SPEED_DOWNLOAD);
- REGISTER_CURL_CONSTANT(CURLINFO_SPEED_UPLOAD);
- REGISTER_CURL_CONSTANT(CURLINFO_FILETIME);
- REGISTER_CURL_CONSTANT(CURLINFO_SSL_VERIFYRESULT);
- REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_DOWNLOAD);
- REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_UPLOAD);
- REGISTER_CURL_CONSTANT(CURLINFO_STARTTRANSFER_TIME);
- REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_TYPE);
- REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_TIME);
- REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_COUNT);
- REGISTER_CURL_CONSTANT(CURLINFO_HEADER_OUT);
- REGISTER_CURL_CONSTANT(CURLINFO_PRIVATE);
-#if LIBCURL_VERSION_NUM > 0x071301
- REGISTER_CURL_CONSTANT(CURLINFO_CERTINFO);
-#endif
-#if LIBCURL_VERSION_NUM >= 0x071202
- REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL);
-#endif
-#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */
- REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP);
-#endif
-#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */
- REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT);
- REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP);
- REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT);
-#endif
-
-
- /* cURL protocol constants (curl_version) */
- REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
- REGISTER_CURL_CONSTANT(CURL_VERSION_KERBEROS4);
- REGISTER_CURL_CONSTANT(CURL_VERSION_SSL);
- REGISTER_CURL_CONSTANT(CURL_VERSION_LIBZ);
-
- /* version constants */
- REGISTER_CURL_CONSTANT(CURLVERSION_NOW);
-
- /* Error Constants */
- REGISTER_CURL_CONSTANT(CURLE_OK);
- REGISTER_CURL_CONSTANT(CURLE_UNSUPPORTED_PROTOCOL);
- REGISTER_CURL_CONSTANT(CURLE_FAILED_INIT);
- REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT);
- REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT_USER);
- REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_PROXY);
- REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_HOST);
+ /* */
+ REGISTER_CURL_CONSTANT(CURLE_ABORTED_BY_CALLBACK);
+ REGISTER_CURL_CONSTANT(CURLE_BAD_CALLING_ORDER);
+ REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
+ REGISTER_CURL_CONSTANT(CURLE_BAD_DOWNLOAD_RESUME);
+ REGISTER_CURL_CONSTANT(CURLE_BAD_FUNCTION_ARGUMENT);
+ REGISTER_CURL_CONSTANT(CURLE_BAD_PASSWORD_ENTERED);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_CONNECT);
- REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_SERVER_REPLY);
+ REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_HOST);
+ REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_PROXY);
+ REGISTER_CURL_CONSTANT(CURLE_FAILED_INIT);
+ REGISTER_CURL_CONSTANT(CURLE_FILE_COULDNT_READ_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_ACCESS_DENIED);
- REGISTER_CURL_CONSTANT(CURLE_FTP_USER_PASSWORD_INCORRECT);
- REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASS_REPLY);
- REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_USER_REPLY);
- REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASV_REPLY);
- REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_227_FORMAT);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_BAD_DOWNLOAD_RESUME);
REGISTER_CURL_CONSTANT(CURLE_FTP_CANT_GET_HOST);
REGISTER_CURL_CONSTANT(CURLE_FTP_CANT_RECONNECT);
- REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_BINARY);
- REGISTER_CURL_CONSTANT(CURLE_PARTIAL_FILE);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_GET_SIZE);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_RETR_FILE);
- REGISTER_CURL_CONSTANT(CURLE_FTP_WRITE_ERROR);
- REGISTER_CURL_CONSTANT(CURLE_FTP_QUOTE_ERROR);
- REGISTER_CURL_CONSTANT(CURLE_HTTP_NOT_FOUND);
- REGISTER_CURL_CONSTANT(CURLE_WRITE_ERROR);
- REGISTER_CURL_CONSTANT(CURLE_MALFORMAT_USER);
- REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_STOR_FILE);
- REGISTER_CURL_CONSTANT(CURLE_READ_ERROR);
- REGISTER_CURL_CONSTANT(CURLE_OUT_OF_MEMORY);
- REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEOUTED);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_ASCII);
- REGISTER_CURL_CONSTANT(CURLE_FTP_PORT_FAILED);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_BINARY);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_STOR_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_USE_REST);
- REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_GET_SIZE);
- REGISTER_CURL_CONSTANT(CURLE_HTTP_RANGE_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_PORT_FAILED);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_QUOTE_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_USER_PASSWORD_INCORRECT);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_227_FORMAT);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASS_REPLY);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASV_REPLY);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_SERVER_REPLY);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_USER_REPLY);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_WRITE_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_FUNCTION_NOT_FOUND);
+ REGISTER_CURL_CONSTANT(CURLE_GOT_NOTHING);
+ REGISTER_CURL_CONSTANT(CURLE_HTTP_NOT_FOUND);
+ REGISTER_CURL_CONSTANT(CURLE_HTTP_PORT_FAILED);
REGISTER_CURL_CONSTANT(CURLE_HTTP_POST_ERROR);
- REGISTER_CURL_CONSTANT(CURLE_SSL_CONNECT_ERROR);
- REGISTER_CURL_CONSTANT(CURLE_FTP_BAD_DOWNLOAD_RESUME);
- REGISTER_CURL_CONSTANT(CURLE_FILE_COULDNT_READ_FILE);
+ REGISTER_CURL_CONSTANT(CURLE_HTTP_RANGE_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_HTTP_RETURNED_ERROR);
REGISTER_CURL_CONSTANT(CURLE_LDAP_CANNOT_BIND);
REGISTER_CURL_CONSTANT(CURLE_LDAP_SEARCH_FAILED);
REGISTER_CURL_CONSTANT(CURLE_LIBRARY_NOT_FOUND);
- REGISTER_CURL_CONSTANT(CURLE_FUNCTION_NOT_FOUND);
- REGISTER_CURL_CONSTANT(CURLE_ABORTED_BY_CALLBACK);
- REGISTER_CURL_CONSTANT(CURLE_BAD_FUNCTION_ARGUMENT);
- REGISTER_CURL_CONSTANT(CURLE_BAD_CALLING_ORDER);
- REGISTER_CURL_CONSTANT(CURLE_HTTP_PORT_FAILED);
- REGISTER_CURL_CONSTANT(CURLE_BAD_PASSWORD_ENTERED);
- REGISTER_CURL_CONSTANT(CURLE_TOO_MANY_REDIRECTS);
- REGISTER_CURL_CONSTANT(CURLE_UNKNOWN_TELNET_OPTION);
- REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
+ REGISTER_CURL_CONSTANT(CURLE_MALFORMAT_USER);
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
- REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
- REGISTER_CURL_CONSTANT(CURLE_GOT_NOTHING);
- REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
- REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
- REGISTER_CURL_CONSTANT(CURLE_SEND_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_OK);
+ REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEDOUT);
+ REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEOUTED);
+ REGISTER_CURL_CONSTANT(CURLE_OUT_OF_MEMORY);
+ REGISTER_CURL_CONSTANT(CURLE_PARTIAL_FILE);
+ REGISTER_CURL_CONSTANT(CURLE_READ_ERROR);
REGISTER_CURL_CONSTANT(CURLE_RECV_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_SEND_ERROR);
REGISTER_CURL_CONSTANT(CURLE_SHARE_IN_USE);
+ REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
REGISTER_CURL_CONSTANT(CURLE_SSL_CERTPROBLEM);
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
- REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
- REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
-#if LIBCURL_VERSION_NUM >= 0x070a08
- REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
- REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
-#endif
-#if LIBCURL_VERSION_NUM >= 0x070b00
- REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
-#endif
+ REGISTER_CURL_CONSTANT(CURLE_SSL_CONNECT_ERROR);
+ REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
+ REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
+ REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
+ REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
+ REGISTER_CURL_CONSTANT(CURLE_TOO_MANY_REDIRECTS);
+ REGISTER_CURL_CONSTANT(CURLE_UNKNOWN_TELNET_OPTION);
+ REGISTER_CURL_CONSTANT(CURLE_UNSUPPORTED_PROTOCOL);
+ REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT);
+ REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT_USER);
+ REGISTER_CURL_CONSTANT(CURLE_WRITE_ERROR);
+
+ /* cURL info constants */
+ REGISTER_CURL_CONSTANT(CURLINFO_CONNECT_TIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_DOWNLOAD);
+ REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_UPLOAD);
+ REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_TYPE);
+ REGISTER_CURL_CONSTANT(CURLINFO_EFFECTIVE_URL);
+ REGISTER_CURL_CONSTANT(CURLINFO_FILETIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_HEADER_OUT);
+ REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE);
+ REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE);
+ REGISTER_CURL_CONSTANT(CURLINFO_LASTONE);
+ REGISTER_CURL_CONSTANT(CURLINFO_NAMELOOKUP_TIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_PRETRANSFER_TIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_PRIVATE);
+ REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_COUNT);
+ REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_TIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_REQUEST_SIZE);
+ REGISTER_CURL_CONSTANT(CURLINFO_SIZE_DOWNLOAD);
+ REGISTER_CURL_CONSTANT(CURLINFO_SIZE_UPLOAD);
+ REGISTER_CURL_CONSTANT(CURLINFO_SPEED_DOWNLOAD);
+ REGISTER_CURL_CONSTANT(CURLINFO_SPEED_UPLOAD);
+ REGISTER_CURL_CONSTANT(CURLINFO_SSL_VERIFYRESULT);
+ REGISTER_CURL_CONSTANT(CURLINFO_STARTTRANSFER_TIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_TOTAL_TIME);
+
+ /* Other */
+ REGISTER_CURL_CONSTANT(CURLMSG_DONE);
+ REGISTER_CURL_CONSTANT(CURLVERSION_NOW);
+
+ /* Curl Multi Constants */
+ REGISTER_CURL_CONSTANT(CURLM_BAD_EASY_HANDLE);
+ REGISTER_CURL_CONSTANT(CURLM_BAD_HANDLE);
+ REGISTER_CURL_CONSTANT(CURLM_CALL_MULTI_PERFORM);
+ REGISTER_CURL_CONSTANT(CURLM_INTERNAL_ERROR);
+ REGISTER_CURL_CONSTANT(CURLM_OK);
+ REGISTER_CURL_CONSTANT(CURLM_OUT_OF_MEMORY);
+
+ /* Curl proxy constants */
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
- REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
- REGISTER_CURL_CONSTANT(CURL_NETRC_IGNORED);
- REGISTER_CURL_CONSTANT(CURL_NETRC_REQUIRED);
+ /* Curl Share constants */
+ REGISTER_CURL_CONSTANT(CURLSHOPT_NONE);
+ REGISTER_CURL_CONSTANT(CURLSHOPT_SHARE);
+ REGISTER_CURL_CONSTANT(CURLSHOPT_UNSHARE);
- REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_NONE);
+ /* Curl Http Version constants (CURLOPT_HTTP_VERSION) */
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_0);
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_1);
+ REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_NONE);
- REGISTER_CURL_CONSTANT(CURLM_CALL_MULTI_PERFORM);
- REGISTER_CURL_CONSTANT(CURLM_OK);
- REGISTER_CURL_CONSTANT(CURLM_BAD_HANDLE);
- REGISTER_CURL_CONSTANT(CURLM_BAD_EASY_HANDLE);
- REGISTER_CURL_CONSTANT(CURLM_OUT_OF_MEMORY);
- REGISTER_CURL_CONSTANT(CURLM_INTERNAL_ERROR);
+ /* Curl Lock constants */
+ REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_COOKIE);
+ REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_DNS);
+ REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_SSL_SESSION);
- REGISTER_CURL_CONSTANT(CURLMSG_DONE);
+ /* Curl NETRC constants (CURLOPT_NETRC) */
+ REGISTER_CURL_CONSTANT(CURL_NETRC_IGNORED);
+ REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
+ REGISTER_CURL_CONSTANT(CURL_NETRC_REQUIRED);
-#if LIBCURL_VERSION_NUM >= 0x070c02
- REGISTER_CURL_CONSTANT(CURLOPT_FTPSSLAUTH);
+ /* Curl SSL Version constants (CURLOPT_SSLVERSION) */
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_DEFAULT);
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv2);
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv3);
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1);
+
+ /* Curl TIMECOND constants (CURLOPT_TIMECONDITION) */
+ REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
+ REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
+ REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
+ REGISTER_CURL_CONSTANT(CURL_TIMECOND_NONE);
+
+ /* Curl version constants */
+ REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
+ REGISTER_CURL_CONSTANT(CURL_VERSION_KERBEROS4);
+ REGISTER_CURL_CONSTANT(CURL_VERSION_LIBZ);
+ REGISTER_CURL_CONSTANT(CURL_VERSION_SSL);
+
+#if LIBCURL_VERSION_NUM >= 0x070a06 /* Available since 7.10.6 */
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
+ /* http authentication options */
+ REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
+ REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
+ REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
+ REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
+ REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
+ REGISTER_CURL_CONSTANT(CURLAUTH_NONE);
+ REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */
+ REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CONNECTCODE);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_CREATE_MISSING_DIRS);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070a08 /* Available since 7.10.8 */
+ REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
+ REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
+ REGISTER_CURL_CONSTANT(CURLINFO_HTTPAUTH_AVAIL);
+ REGISTER_CURL_CONSTANT(CURLINFO_RESPONSE_CODE);
+ REGISTER_CURL_CONSTANT(CURLINFO_PROXYAUTH_AVAIL);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_RESPONSE_TIMEOUT);
+ REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAXFILESIZE);
+ REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4);
+ REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6);
+ REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070b00 /* Available since 7.11.0 */
+ REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_NONE);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_TRY);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_SSL);
+ REGISTER_CURL_CONSTANT(CURLOPT_NETRC_FILE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070c02 /* Available since 7.12.2 */
REGISTER_CURL_CONSTANT(CURLFTPAUTH_DEFAULT);
REGISTER_CURL_CONSTANT(CURLFTPAUTH_SSL);
REGISTER_CURL_CONSTANT(CURLFTPAUTH_TLS);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPSSLAUTH);
#endif
-#if LIBCURL_VERSION_NUM > 0x070b00
- REGISTER_CURL_CONSTANT(CURLOPT_FTP_SSL);
- REGISTER_CURL_CONSTANT(CURLFTPSSL_NONE);
- REGISTER_CURL_CONSTANT(CURLFTPSSL_TRY);
- REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL);
- REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
+#if LIBCURL_VERSION_NUM >= 0x070d00 /* Available since 7.13.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_ACCOUNT);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070b02 /* Available since 7.11.2 */
+ REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
#endif
-#if LIBCURL_VERSION_NUM > 0x071301
- REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO);
- REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
+#if LIBCURL_VERSION_NUM >= 0x070c02 /* Available since 7.12.2 */
+ REGISTER_CURL_CONSTANT(CURLINFO_OS_ERRNO);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070c03 /* Available since 7.12.3 */
+ REGISTER_CURL_CONSTANT(CURLINFO_NUM_CONNECTS);
+ REGISTER_CURL_CONSTANT(CURLINFO_SSL_ENGINES);
#endif
-/* SSH support works in 7.19.0+ using libssh2 */
-#if LIBCURL_VERSION_NUM >= 0x071300
- REGISTER_CURL_CONSTANT(CURLSSH_AUTH_NONE);
- REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PUBLICKEY);
- REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PASSWORD);
- REGISTER_CURL_CONSTANT(CURLSSH_AUTH_HOST);
- REGISTER_CURL_CONSTANT(CURLSSH_AUTH_KEYBOARD);
- REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT);
+#if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */
+ REGISTER_CURL_CONSTANT(CURLINFO_COOKIELIST);
+ REGISTER_CURL_CONSTANT(CURLOPT_COOKIELIST);
+ REGISTER_CURL_CONSTANT(CURLOPT_IGNORE_CONTENT_LENGTH);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070f00 /* Available since 7.15.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_SKIP_PASV_IP);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070f01 /* Available since 7.15.1 */
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_FILEMETHOD);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070f02 /* Available since 7.15.2 */
+ REGISTER_CURL_CONSTANT(CURLOPT_CONNECT_ONLY);
+ REGISTER_CURL_CONSTANT(CURLOPT_LOCALPORT);
+ REGISTER_CURL_CONSTANT(CURLOPT_LOCALPORTRANGE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070f03 /* Available since 7.15.3 */
+ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_MULTICWD);
+ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_NOCWD);
+ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
+#endif
+
+#if LIBCURL_VERSION_NUM >- 0x070f04 /* Available since 7.15.4 */
+ REGISTER_CURL_CONSTANT(CURLINFO_FTP_ENTRY_PATH);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_ALTERNATIVE_TO_USER);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071000 /* Available since 7.16.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_SESSIONID_CACHE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */
+ REGISTER_CURL_CONSTANT(CURLE_SSH);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_SSL_CCC);
REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES);
- REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD);
- REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE);
REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_CCC_ACTIVE);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_CCC_NONE);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_CCC_PASSIVE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071002 /* Available since 7.16.2 */
+ REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT_MS);
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTP_CONTENT_DECODING);
+ REGISTER_CURL_CONSTANT(CURLOPT_HTTP_TRANSFER_DECODING);
+ REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */
+ REGISTER_CURL_CONSTANT(CURLOPT_KRBLEVEL);
+ REGISTER_CURL_CONSTANT(CURLOPT_NEW_DIRECTORY_PERMS);
+ REGISTER_CURL_CONSTANT(CURLOPT_NEW_FILE_PERMS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_APPEND);
+ REGISTER_CURL_CONSTANT(CURLOPT_DIRLISTONLY);
+ REGISTER_CURL_CONSTANT(CURLOPT_USE_SSL);
+ /* Curl SSL Constants */
+ REGISTER_CURL_CONSTANT(CURLUSESSL_ALL);
+ REGISTER_CURL_CONSTANT(CURLUSESSL_CONTROL);
+ REGISTER_CURL_CONSTANT(CURLUSESSL_NONE);
+ REGISTER_CURL_CONSTANT(CURLUSESSL_TRY);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071101 /* Available since 7.17.1 */
REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
- REGISTER_CURL_CONSTANT(CURLE_SSH);
#endif
-#if LIBCURL_VERSION_NUM >= 0x071304
- REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
+#if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXY_TRANSFER_MODE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */
+ REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */
+ REGISTER_CURL_CONSTANT(CURLINFO_APPCONNECT_TIME);
+ REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP);
+
+ REGISTER_CURL_CONSTANT(CURLOPT_ADDRESS_SCOPE);
+ REGISTER_CURL_CONSTANT(CURLOPT_CRLFILE);
+ REGISTER_CURL_CONSTANT(CURLOPT_ISSUERCERT);
+ REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD);
+
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_ANY);
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT);
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_HOST);
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_KEYBOARD);
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_NONE);
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PASSWORD);
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_PUBLICKEY);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
+ REGISTER_CURL_CONSTANT(CURLINFO_CERTINFO);
+ REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO);
+ REGISTER_CURL_CONSTANT(CURLOPT_PASSWORD);
+ REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXYPASSWORD);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERNAME);
+ REGISTER_CURL_CONSTANT(CURLOPT_USERNAME);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071303 /* Available since 7.19.3 */
+ REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST_IE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
+ REGISTER_CURL_CONSTANT(CURLINFO_CONDITION_UNMET);
+
+ REGISTER_CURL_CONSTANT(CURLOPT_NOPROXY);
REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
- REGISTER_CURL_CONSTANT(CURLPROTO_HTTP);
- REGISTER_CURL_CONSTANT(CURLPROTO_HTTPS);
+ REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
+ REGISTER_CURL_CONSTANT(CURLOPT_SOCKS5_GSSAPI_NEC);
+ REGISTER_CURL_CONSTANT(CURLOPT_SOCKS5_GSSAPI_SERVICE);
+ REGISTER_CURL_CONSTANT(CURLOPT_TFTP_BLKSIZE);
+
+ REGISTER_CURL_CONSTANT(CURLPROTO_ALL);
+ REGISTER_CURL_CONSTANT(CURLPROTO_DICT);
+ REGISTER_CURL_CONSTANT(CURLPROTO_FILE);
REGISTER_CURL_CONSTANT(CURLPROTO_FTP);
REGISTER_CURL_CONSTANT(CURLPROTO_FTPS);
+ REGISTER_CURL_CONSTANT(CURLPROTO_HTTP);
+ REGISTER_CURL_CONSTANT(CURLPROTO_HTTPS);
+ REGISTER_CURL_CONSTANT(CURLPROTO_LDAP);
+ REGISTER_CURL_CONSTANT(CURLPROTO_LDAPS);
REGISTER_CURL_CONSTANT(CURLPROTO_SCP);
REGISTER_CURL_CONSTANT(CURLPROTO_SFTP);
REGISTER_CURL_CONSTANT(CURLPROTO_TELNET);
- REGISTER_CURL_CONSTANT(CURLPROTO_LDAP);
- REGISTER_CURL_CONSTANT(CURLPROTO_LDAPS);
- REGISTER_CURL_CONSTANT(CURLPROTO_DICT);
- REGISTER_CURL_CONSTANT(CURLPROTO_FILE);
REGISTER_CURL_CONSTANT(CURLPROTO_TFTP);
- REGISTER_CURL_CONSTANT(CURLPROTO_ALL);
#endif
-#if LIBCURL_VERSION_NUM >= 0x070f01
- REGISTER_CURL_CONSTANT(CURLOPT_FTP_FILEMETHOD);
- REGISTER_CURL_CONSTANT(CURLOPT_FTP_SKIP_PASV_IP);
+#if LIBCURL_VERSION_NUM >= 0x071306 /* Available since 7.19.6 */
+ REGISTER_CURL_CONSTANT(CURLOPT_SSH_KNOWNHOSTS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
+ REGISTER_CURL_CONSTANT(CURLINFO_RTSP_CLIENT_CSEQ);
+ REGISTER_CURL_CONSTANT(CURLINFO_RTSP_CSEQ_RECV);
+ REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SERVER_CSEQ);
+ REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SESSION_ID);
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_PRET);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAIL_FROM);
+ REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT);
+ REGISTER_CURL_CONSTANT(CURLOPT_RTSP_CLIENT_CSEQ);
+ REGISTER_CURL_CONSTANT(CURLOPT_RTSP_REQUEST);
+ REGISTER_CURL_CONSTANT(CURLOPT_RTSP_SERVER_CSEQ);
+ REGISTER_CURL_CONSTANT(CURLOPT_RTSP_SESSION_ID);
+ REGISTER_CURL_CONSTANT(CURLOPT_RTSP_STREAM_URI);
+ REGISTER_CURL_CONSTANT(CURLOPT_RTSP_TRANSPORT);
+ REGISTER_CURL_CONSTANT(CURLPROTO_IMAP);
+ REGISTER_CURL_CONSTANT(CURLPROTO_IMAPS);
+ REGISTER_CURL_CONSTANT(CURLPROTO_POP3);
+ REGISTER_CURL_CONSTANT(CURLPROTO_POP3S);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTSP);
+ REGISTER_CURL_CONSTANT(CURLPROTO_SMTP);
+ REGISTER_CURL_CONSTANT(CURLPROTO_SMTPS);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_ANNOUNCE);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_DESCRIBE);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_GET_PARAMETER);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_OPTIONS);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_PAUSE);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_PLAY);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECEIVE);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECORD);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_SETUP);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_SET_PARAMETER);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_TEARDOWN);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP);
+ REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT);
+ REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT);
+ REGISTER_CURL_CONSTANT(CURLOPT_FNMATCH_FUNCTION);
+ REGISTER_CURL_CONSTANT(CURLOPT_WILDCARDMATCH);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTMP);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTMPE);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTMPS);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTMPT);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTE);
+ REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTS);
+ REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_FAIL);
+ REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_MATCH);
+ REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_NOMATCH);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071502 /* Available since 7.21.2 */
+ REGISTER_CURL_CONSTANT(CURLPROTO_GOPHER);
#endif
-#if LIBCURL_VERSION_NUM >= 0x071001
- REGISTER_CURL_CONSTANT(CURLFTPMETHOD_MULTICWD);
- REGISTER_CURL_CONSTANT(CURLFTPMETHOD_NOCWD);
- REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
+#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */
+ REGISTER_CURL_CONSTANT(CURLAUTH_ONLY);
+ REGISTER_CURL_CONSTANT(CURLOPT_RESOLVE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071504 /* Available since 7.21.4 */
+ REGISTER_CURL_CONSTANT(CURLOPT_TLSAUTH_PASSWORD);
+ REGISTER_CURL_CONSTANT(CURLOPT_TLSAUTH_TYPE);
+ REGISTER_CURL_CONSTANT(CURLOPT_TLSAUTH_USERNAME);
+ REGISTER_CURL_CONSTANT(CURL_TLSAUTH_SRP);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */
+ REGISTER_CURL_CONSTANT(CURLOPT_ACCEPT_ENCODING);
+ REGISTER_CURL_CONSTANT(CURLOPT_TRANSFER_ENCODING);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_DNS_SERVERS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH);
+#endif
+
+#if CURLOPT_FTPASCII != 0
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
+#endif
+#if CURLOPT_MUTE != 0
+ REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
+#endif
+#if CURLOPT_PASSWDFUNCTION != 0
+ REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
#endif
#ifdef PHP_CURL_NEED_OPENSSL_TSL
@@ -914,7 +1154,6 @@ PHP_MINIT_FUNCTION(curl)
}
#ifdef PHP_CURL_URL_WRAPPERS
-# if HAVE_CURL_VERSION_INFO
{
curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
char **p = (char **)info->protocols;
@@ -928,18 +1167,6 @@ PHP_MINIT_FUNCTION(curl)
(void) *p++;
}
}
-# else
- php_unregister_url_stream_wrapper("http");
- php_register_url_stream_wrapper("http", &php_curl_wrapper TSRMLS_CC);
- php_unregister_url_stream_wrapper("https");
- php_register_url_stream_wrapper("https", &php_curl_wrapper TSRMLS_CC);
- php_unregister_url_stream_wrapper("ftp");
- php_register_url_stream_wrapper("ftp", &php_curl_wrapper TSRMLS_CC);
- php_unregister_url_stream_wrapper("ftps");
- php_register_url_stream_wrapper("ftps", &php_curl_wrapper TSRMLS_CC);
- php_unregister_url_stream_wrapper("ldap");
- php_register_url_stream_wrapper("ldap", &php_curl_wrapper TSRMLS_CC);
-# endif
#endif
return SUCCESS;
@@ -951,10 +1178,18 @@ PHP_MINIT_FUNCTION(curl)
PHP_MSHUTDOWN_FUNCTION(curl)
{
#ifdef PHP_CURL_URL_WRAPPERS
- php_unregister_url_stream_wrapper("http" TSRMLS_CC);
- php_unregister_url_stream_wrapper("https" TSRMLS_CC);
- php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
- php_unregister_url_stream_wrapper("ldap" TSRMLS_CC);
+ {
+ curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
+ char **p = (char **)info->protocols;
+
+ while (*p != NULL) {
+ /* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
+ if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
+ php_unregister_url_stream_wrapper(*p TSRMLS_CC);
+ }
+ (void) *p++;
+ }
+ }
#endif
curl_global_cleanup();
#ifdef PHP_CURL_NEED_OPENSSL_TSL
@@ -1053,13 +1288,77 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
}
/* }}} */
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+/* {{{ curl_fnmatch
+ */
+static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
+{
+ php_curl *ch = (php_curl *) ctx;
+ php_curl_fnmatch *t = ch->handlers->fnmatch;
+ int rval = CURL_FNMATCHFUNC_FAIL;
+ switch (t->method) {
+ case PHP_CURL_USER: {
+ zval **argv[3];
+ zval *zhandle = NULL;
+ zval *zpattern = NULL;
+ zval *zstring = NULL;
+ zval *retval_ptr;
+ int error;
+ zend_fcall_info fci;
+ TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
+
+ MAKE_STD_ZVAL(zhandle);
+ MAKE_STD_ZVAL(zpattern);
+ MAKE_STD_ZVAL(zstring);
+
+ ZVAL_RESOURCE(zhandle, ch->id);
+ zend_list_addref(ch->id);
+ ZVAL_STRING(zpattern, pattern, 1);
+ ZVAL_STRING(zstring, string, 1);
+
+ argv[0] = &zhandle;
+ argv[1] = &zpattern;
+ argv[2] = &zstring;
+
+ fci.size = sizeof(fci);
+ fci.function_table = EG(function_table);
+ fci.function_name = t->func_name;
+ fci.object_ptr = NULL;
+ fci.retval_ptr_ptr = &retval_ptr;
+ fci.param_count = 3;
+ fci.params = argv;
+ fci.no_separation = 0;
+ fci.symbol_table = NULL;
+
+ ch->in_callback = 1;
+ error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
+ ch->in_callback = 0;
+ if (error == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_FNMATCH_FUNCTION");
+ } else if (retval_ptr) {
+ if (Z_TYPE_P(retval_ptr) != IS_LONG) {
+ convert_to_long_ex(&retval_ptr);
+ }
+ rval = Z_LVAL_P(retval_ptr);
+ zval_ptr_dtor(&retval_ptr);
+ }
+ zval_ptr_dtor(argv[0]);
+ zval_ptr_dtor(argv[1]);
+ zval_ptr_dtor(argv[2]);
+ break;
+ }
+ }
+ return rval;
+}
+/* }}} */
+#endif
+
/* {{{ curl_progress
*/
static size_t curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
{
php_curl *ch = (php_curl *) clientp;
php_curl_progress *t = ch->handlers->progress;
- int length = -1;
size_t rval = 0;
#if PHP_CURL_DEBUG
@@ -1069,7 +1368,8 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
switch (t->method) {
case PHP_CURL_USER: {
- zval **argv[4];
+ zval **argv[5];
+ zval *handle = NULL;
zval *zdltotal = NULL;
zval *zdlnow = NULL;
zval *zultotal = NULL;
@@ -1079,27 +1379,31 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
zend_fcall_info fci;
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
+ MAKE_STD_ZVAL(handle);
MAKE_STD_ZVAL(zdltotal);
MAKE_STD_ZVAL(zdlnow);
MAKE_STD_ZVAL(zultotal);
MAKE_STD_ZVAL(zulnow);
+ ZVAL_RESOURCE(handle, ch->id);
+ zend_list_addref(ch->id);
ZVAL_LONG(zdltotal, (long) dltotal);
ZVAL_LONG(zdlnow, (long) dlnow);
ZVAL_LONG(zultotal, (long) ultotal);
ZVAL_LONG(zulnow, (long) ulnow);
- argv[0] = &zdltotal;
- argv[1] = &zdlnow;
- argv[2] = &zultotal;
- argv[3] = &zulnow;
+ argv[0] = &handle;
+ argv[1] = &zdltotal;
+ argv[2] = &zdlnow;
+ argv[3] = &zultotal;
+ argv[4] = &zulnow;
fci.size = sizeof(fci);
fci.function_table = EG(function_table);
fci.function_name = t->func_name;
fci.object_ptr = NULL;
fci.retval_ptr_ptr = &retval_ptr;
- fci.param_count = 4;
+ fci.param_count = 5;
fci.params = argv;
fci.no_separation = 0;
fci.symbol_table = NULL;
@@ -1109,7 +1413,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
ch->in_callback = 0;
if (error == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_PROGRESSFUNCTION");
- length = -1;
} else if (retval_ptr) {
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
convert_to_long_ex(&retval_ptr);
@@ -1123,6 +1426,7 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
zval_ptr_dtor(argv[1]);
zval_ptr_dtor(argv[2]);
zval_ptr_dtor(argv[3]);
+ zval_ptr_dtor(argv[4]);
break;
}
}
@@ -1423,7 +1727,10 @@ static void alloc_curl_handle(php_curl **ch)
(*ch)->handlers->write = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
- (*ch)->handlers->progress = ecalloc(1, sizeof(php_curl_progress));
+ (*ch)->handlers->progress = NULL;
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ (*ch)->handlers->fnmatch = NULL;
+#endif
(*ch)->in_callback = 0;
(*ch)->header.str_len = 0;
@@ -1439,7 +1746,7 @@ static void alloc_curl_handle(php_curl **ch)
}
/* }}} */
-#if LIBCURL_VERSION_NUM > 0x071301
+#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
/* {{{ split_certinfo
*/
static void split_certinfo(char *string, zval *hash)
@@ -1449,14 +1756,14 @@ static void split_certinfo(char *string, zval *hash)
char *split;
if(org) {
- do {
+ do {
char *key;
char *val;
char *tmp;
- split = strstr(s, "; ");
- if(split)
- *split = '\0';
+ split = strstr(s, "; ");
+ if(split)
+ *split = '\0';
key = s;
tmp = memchr(key, '=', 64);
@@ -1517,6 +1824,36 @@ static void create_certinfo(struct curl_certinfo *ci, zval *listcode TSRMLS_DC)
/* }}} */
#endif
+/* {{{ _php_curl_set_default_options()
+ Set default options for a handle */
+static void _php_curl_set_default_options(php_curl *ch)
+{
+ char *cainfo;
+
+ curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1);
+ curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
+ curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str);
+ curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write);
+ curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch);
+ curl_easy_setopt(ch->cp, CURLOPT_READFUNCTION, curl_read);
+ curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch);
+ curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_header);
+ curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch);
+ curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
+ curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
+ curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
+
+ cainfo = INI_STR("curl.cainfo");
+ if (cainfo && strlen(cainfo) > 0) {
+ curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo);
+ }
+
+#if defined(ZTS)
+ curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
+#endif
+}
+/* }}} */
+
/* {{{ proto resource curl_init([string url])
Initialize a cURL session */
PHP_FUNCTION(curl_init)
@@ -1526,7 +1863,6 @@ PHP_FUNCTION(curl_init)
zval *clone;
char *url = NULL;
int url_len = 0;
- char *cainfo;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &url, &url_len) == FAILURE) {
return;
@@ -1544,7 +1880,6 @@ PHP_FUNCTION(curl_init)
ch->cp = cp;
ch->handlers->write->method = PHP_CURL_STDOUT;
- ch->handlers->write->type = PHP_CURL_ASCII;
ch->handlers->read->method = PHP_CURL_DIRECT;
ch->handlers->write_header->method = PHP_CURL_IGNORE;
@@ -1553,27 +1888,7 @@ PHP_FUNCTION(curl_init)
MAKE_STD_ZVAL(clone);
ch->clone = clone;
- curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1);
- curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
- curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str);
- curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write);
- curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch);
- curl_easy_setopt(ch->cp, CURLOPT_READFUNCTION, curl_read);
- curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch);
- curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_header);
- curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch);
- curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
- curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
- curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
-
- cainfo = INI_STR("curl.cainfo");
- if (cainfo && strlen(cainfo) > 0) {
- curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo);
- }
-
-#if defined(ZTS)
- curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
-#endif
+ _php_curl_set_default_options(ch);
if (url) {
if (!php_curl_option_url(ch, url, url_len TSRMLS_CC)) {
@@ -1618,7 +1933,6 @@ PHP_FUNCTION(curl_copy_handle)
}
dupch->handlers->write->stream = ch->handlers->write->stream;
dupch->handlers->write->method = ch->handlers->write->method;
- dupch->handlers->write->type = ch->handlers->write->type;
if (ch->handlers->read->stream) {
Z_ADDREF_P(ch->handlers->read->stream);
}
@@ -1653,18 +1967,34 @@ PHP_FUNCTION(curl_copy_handle)
zval_add_ref(&ch->handlers->write_header->func_name);
dupch->handlers->write_header->func_name = ch->handlers->write_header->func_name;
}
-
- if (ch->handlers->progress->func_name) {
- zval_add_ref(&ch->handlers->progress->func_name);
- dupch->handlers->progress->func_name = ch->handlers->progress->func_name;
- }
- dupch->handlers->progress->method = ch->handlers->progress->method;
curl_easy_setopt(dupch->cp, CURLOPT_ERRORBUFFER, dupch->err.str);
curl_easy_setopt(dupch->cp, CURLOPT_FILE, (void *) dupch);
curl_easy_setopt(dupch->cp, CURLOPT_INFILE, (void *) dupch);
curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch);
- curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch);
+
+ if (ch->handlers->progress) {
+ dupch->handlers->progress = ecalloc(1, sizeof(php_curl_progress));
+ if (ch->handlers->progress->func_name) {
+ zval_add_ref(&ch->handlers->progress->func_name);
+ dupch->handlers->progress->func_name = ch->handlers->progress->func_name;
+ }
+ dupch->handlers->progress->method = ch->handlers->progress->method;
+ curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch);
+ }
+
+/* Available since 7.21.0 */
+#if LIBCURL_VERSION_NUM >= 0x071500
+ if (ch->handlers->fnmatch) {
+ dupch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch));
+ if (ch->handlers->fnmatch->func_name) {
+ zval_add_ref(&ch->handlers->fnmatch->func_name);
+ dupch->handlers->fnmatch->func_name = ch->handlers->fnmatch->func_name;
+ }
+ dupch->handlers->fnmatch->method = ch->handlers->fnmatch->method;
+ curl_easy_setopt(dupch->cp, CURLOPT_FNMATCH_DATA, (void *) dupch);
+ }
+#endif
efree(dupch->to_free);
dupch->to_free = ch->to_free;
@@ -1683,90 +2013,144 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
CURLcode error=CURLE_OK;
switch (option) {
- case CURLOPT_INFILESIZE:
- case CURLOPT_VERBOSE:
- case CURLOPT_HEADER:
- case CURLOPT_NOPROGRESS:
- case CURLOPT_NOBODY:
+ /* Long options */
+ case CURLOPT_SSL_VERIFYHOST:
+ if(Z_TYPE_PP(zvalue)==IS_BOOL && Z_BVAL_PP(zvalue)) {
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST set to true which disables common name validation (setting CURLOPT_SSL_VERIFYHOST to 2 enables common name validation)");
+ }
+ case CURLOPT_AUTOREFERER:
+ case CURLOPT_BUFFERSIZE:
+ case CURLOPT_CLOSEPOLICY:
+ case CURLOPT_CONNECTTIMEOUT:
+ case CURLOPT_COOKIESESSION:
+ case CURLOPT_CRLF:
+ case CURLOPT_DNS_CACHE_TIMEOUT:
+ case CURLOPT_DNS_USE_GLOBAL_CACHE:
case CURLOPT_FAILONERROR:
- case CURLOPT_UPLOAD:
- case CURLOPT_POST:
- case CURLOPT_FTPLISTONLY:
- case CURLOPT_FTPAPPEND:
- case CURLOPT_NETRC:
- case CURLOPT_PUT:
-#if CURLOPT_MUTE != 0
- case CURLOPT_MUTE:
-#endif
- case CURLOPT_TIMEOUT:
-#if LIBCURL_VERSION_NUM > 0x071002
- case CURLOPT_TIMEOUT_MS:
-#endif
+ case CURLOPT_FILETIME:
+ case CURLOPT_FORBID_REUSE:
+ case CURLOPT_FRESH_CONNECT:
+ case CURLOPT_FTP_USE_EPRT:
case CURLOPT_FTP_USE_EPSV:
+ case CURLOPT_HEADER:
+ case CURLOPT_HTTPGET:
+ case CURLOPT_HTTPPROXYTUNNEL:
+ case CURLOPT_HTTP_VERSION:
+ case CURLOPT_INFILESIZE:
case CURLOPT_LOW_SPEED_LIMIT:
- case CURLOPT_SSLVERSION:
case CURLOPT_LOW_SPEED_TIME:
- case CURLOPT_RESUME_FROM:
- case CURLOPT_TIMEVALUE:
- case CURLOPT_TIMECONDITION:
- case CURLOPT_TRANSFERTEXT:
- case CURLOPT_HTTPPROXYTUNNEL:
- case CURLOPT_FILETIME:
- case CURLOPT_MAXREDIRS:
case CURLOPT_MAXCONNECTS:
- case CURLOPT_CLOSEPOLICY:
- case CURLOPT_FRESH_CONNECT:
- case CURLOPT_FORBID_REUSE:
- case CURLOPT_CONNECTTIMEOUT:
-#if LIBCURL_VERSION_NUM > 0x071002
- case CURLOPT_CONNECTTIMEOUT_MS:
-#endif
- case CURLOPT_SSL_VERIFYHOST:
- case CURLOPT_SSL_VERIFYPEER:
- case CURLOPT_DNS_USE_GLOBAL_CACHE:
+ case CURLOPT_MAXREDIRS:
+ case CURLOPT_NETRC:
+ case CURLOPT_NOBODY:
+ case CURLOPT_NOPROGRESS:
case CURLOPT_NOSIGNAL:
- case CURLOPT_PROXYTYPE:
- case CURLOPT_BUFFERSIZE:
- case CURLOPT_HTTPGET:
- case CURLOPT_HTTP_VERSION:
- case CURLOPT_CRLF:
- case CURLOPT_DNS_CACHE_TIMEOUT:
+ case CURLOPT_PORT:
+ case CURLOPT_POST:
case CURLOPT_PROXYPORT:
- case CURLOPT_FTP_USE_EPRT:
-#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
+ case CURLOPT_PROXYTYPE:
+ case CURLOPT_PUT:
+ case CURLOPT_RESUME_FROM:
+ case CURLOPT_SSLVERSION:
+ case CURLOPT_SSL_VERIFYPEER:
+ case CURLOPT_TIMECONDITION:
+ case CURLOPT_TIMEOUT:
+ case CURLOPT_TIMEVALUE:
+ case CURLOPT_TRANSFERTEXT:
+ case CURLOPT_UNRESTRICTED_AUTH:
+ case CURLOPT_UPLOAD:
+ case CURLOPT_VERBOSE:
+#if LIBCURL_VERSION_NUM >= 0x070a06 /* Available since 7.10.6 */
case CURLOPT_HTTPAUTH:
#endif
-#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH & CURLOPT_FTP_CREATE_MISSING_DIRS are available since curl 7.10.7 */
- case CURLOPT_PROXYAUTH:
+#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */
case CURLOPT_FTP_CREATE_MISSING_DIRS:
+ case CURLOPT_PROXYAUTH:
#endif
-
-#if LIBCURL_VERSION_NUM >= 0x070c02
+#if LIBCURL_VERSION_NUM >= 0x070a08 /* Available since 7.10.8 */
+ case CURLOPT_FTP_RESPONSE_TIMEOUT:
+ case CURLOPT_IPRESOLVE:
+ case CURLOPT_MAXFILESIZE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070b02 /* Available since 7.11.2 */
+ case CURLOPT_TCP_NODELAY:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070c02 /* Available since 7.12.2 */
case CURLOPT_FTPSSLAUTH:
#endif
-#if LIBCURL_VERSION_NUM > 0x070b00
+#if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */
+ case CURLOPT_IGNORE_CONTENT_LENGTH:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070f00 /* Available since 7.15.0 */
+ case CURLOPT_FTP_SKIP_PASV_IP:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070f01 /* Available since 7.15.1 */
+ case CURLOPT_FTP_FILEMETHOD:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070f02 /* Available since 7.15.2 */
+ case CURLOPT_CONNECT_ONLY:
+ case CURLOPT_LOCALPORT:
+ case CURLOPT_LOCALPORTRANGE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071000 /* Available since 7.16.0 */
+ case CURLOPT_SSL_SESSIONID_CACHE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */
+ case CURLOPT_FTP_SSL_CCC:
+ case CURLOPT_SSH_AUTH_TYPES:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071002 /* Available since 7.16.2 */
+ case CURLOPT_CONNECTTIMEOUT_MS:
+ case CURLOPT_HTTP_CONTENT_DECODING:
+ case CURLOPT_HTTP_TRANSFER_DECODING:
+ case CURLOPT_TIMEOUT_MS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */
+ case CURLOPT_NEW_DIRECTORY_PERMS:
+ case CURLOPT_NEW_FILE_PERMS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */
+ case CURLOPT_USE_SSL:
+#elif LIBCURL_VERSION_NUM >= 0x070b00 /* Available since 7.11.0 */
case CURLOPT_FTP_SSL:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */
+ case CURLOPT_APPEND:
+ case CURLOPT_DIRLISTONLY:
+#else
+ case CURLOPT_FTPAPPEND:
+ case CURLOPT_FTPLISTONLY:
#endif
- case CURLOPT_UNRESTRICTED_AUTH:
- case CURLOPT_PORT:
- case CURLOPT_AUTOREFERER:
- case CURLOPT_COOKIESESSION:
-#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
- case CURLOPT_TCP_NODELAY:
+#if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */
+ case CURLOPT_PROXY_TRANSFER_MODE:
#endif
-#if LIBCURL_VERSION_NUM >= 0x71304
- case CURLOPT_REDIR_PROTOCOLS:
+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */
+ case CURLOPT_ADDRESS_SCOPE:
+#endif
+#if LIBCURL_VERSION_NUM > 0x071301 /* Available since 7.19.1 */
+ case CURLOPT_CERTINFO:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
+ case CURLOPT_NOPROXY:
case CURLOPT_PROTOCOLS:
+ case CURLOPT_REDIR_PROTOCOLS:
+ case CURLOPT_SOCKS5_GSSAPI_NEC:
+ case CURLOPT_TFTP_BLKSIZE:
#endif
-#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */
- case CURLOPT_IPRESOLVE:
+#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
+ case CURLOPT_FTP_USE_PRET:
+ case CURLOPT_RTSP_CLIENT_CSEQ:
+ case CURLOPT_RTSP_REQUEST:
+ case CURLOPT_RTSP_SERVER_CSEQ:
#endif
-#if LIBCURL_VERSION_NUM >= 0x070f01
- case CURLOPT_FTP_FILEMETHOD:
- case CURLOPT_FTP_SKIP_PASV_IP:
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ case CURLOPT_WILDCARDMATCH:
#endif
-#if LIBCURL_VERSION_NUM > 0x071301
- case CURLOPT_CERTINFO:
+#if LIBCURL_VERSION_NUM >= 0x071504 /* Available since 7.21.4 */
+ case CURLOPT_TLSAUTH_TYPE:
+#endif
+#if CURLOPT_MUTE != 0
+ case CURLOPT_MUTE:
#endif
convert_to_long_ex(zvalue);
#if LIBCURL_VERSION_NUM >= 0x71304
@@ -1779,57 +2163,77 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
#endif
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
break;
-#if LIBCURL_VERSION_NUM > 0x070f04
- case CURLOPT_MAX_RECV_SPEED_LARGE:
- case CURLOPT_MAX_SEND_SPEED_LARGE:
- convert_to_long_ex(zvalue);
- error = curl_easy_setopt(ch->cp, option, (curl_off_t)Z_LVAL_PP(zvalue));
- break;
-#endif
- case CURLOPT_FOLLOWLOCATION:
- convert_to_long_ex(zvalue);
- if (PG(open_basedir) && *PG(open_basedir)) {
- if (Z_LVAL_PP(zvalue) != 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set");
- RETVAL_FALSE;
- return 1;
- }
- }
- error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
- break;
-#if LIBCURL_VERSION_NUM > 0x071301
- case CURLOPT_POSTREDIR:
- convert_to_long_ex(zvalue);
- error = curl_easy_setopt(ch->cp, CURLOPT_POSTREDIR, Z_LVAL_PP(zvalue) & CURL_REDIR_POST_ALL);
- break;
-#endif
+
+ /* String options */
+ case CURLOPT_CAINFO:
+ case CURLOPT_CAPATH:
+ case CURLOPT_COOKIE:
+ case CURLOPT_CUSTOMREQUEST:
+ case CURLOPT_EGDSOCKET:
+ case CURLOPT_FTPPORT:
+ case CURLOPT_INTERFACE:
case CURLOPT_PRIVATE:
- case CURLOPT_URL:
case CURLOPT_PROXY:
- case CURLOPT_USERPWD:
case CURLOPT_PROXYUSERPWD:
case CURLOPT_RANGE:
- case CURLOPT_CUSTOMREQUEST:
- case CURLOPT_USERAGENT:
- case CURLOPT_FTPPORT:
- case CURLOPT_COOKIE:
case CURLOPT_REFERER:
- case CURLOPT_INTERFACE:
- case CURLOPT_KRB4LEVEL:
- case CURLOPT_EGDSOCKET:
- case CURLOPT_CAINFO:
- case CURLOPT_CAPATH:
- case CURLOPT_SSL_CIPHER_LIST:
- case CURLOPT_SSLKEY:
- case CURLOPT_SSLKEYTYPE:
- case CURLOPT_SSLKEYPASSWD:
+ case CURLOPT_SSLCERTTYPE:
case CURLOPT_SSLENGINE:
case CURLOPT_SSLENGINE_DEFAULT:
- case CURLOPT_SSLCERTTYPE:
+ case CURLOPT_SSLKEY:
+ case CURLOPT_SSLKEYPASSWD:
+ case CURLOPT_SSLKEYTYPE:
+ case CURLOPT_SSL_CIPHER_LIST:
+ case CURLOPT_URL:
+ case CURLOPT_USERAGENT:
+ case CURLOPT_USERPWD:
+#if LIBCURL_VERSION_NUM >= 0x070d00 /* Available since 7.13.0 */
+ case CURLOPT_FTP_ACCOUNT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */
+ case CURLOPT_COOKIELIST:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */
+ case CURLOPT_FTP_ALTERNATIVE_TO_USER:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */
+ case CURLOPT_KRBLEVEL:
+#else
+ case CURLOPT_KRB4LEVEL:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071101 /* Available since 7.17.1 */
+ case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
+ case CURLOPT_PASSWORD:
+ case CURLOPT_PROXYPASSWORD:
+ case CURLOPT_PROXYUSERNAME:
+ case CURLOPT_USERNAME:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
+ case CURLOPT_SOCKS5_GSSAPI_SERVICE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
+ case CURLOPT_MAIL_FROM:
+ case CURLOPT_RTSP_SESSION_ID:
+ case CURLOPT_RTSP_STREAM_URI:
+ case CURLOPT_RTSP_TRANSPORT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071504 /* Available since 7.21.4 */
+ case CURLOPT_TLSAUTH_PASSWORD:
+ case CURLOPT_TLSAUTH_USERNAME:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */
+ case CURLOPT_ACCEPT_ENCODING:
+ case CURLOPT_TRANSFER_ENCODING:
+#else
case CURLOPT_ENCODING:
-#if LIBCURL_VERSION_NUM >= 0x071300
- case CURLOPT_SSH_PUBLIC_KEYFILE:
- case CURLOPT_SSH_PRIVATE_KEYFILE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */
+ case CURLOPT_DNS_SERVERS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */
+ case CURLOPT_MAIL_AUTH:
#endif
{
#if LIBCURL_VERSION_NUM < 0x071100
@@ -1837,17 +2241,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
#endif
convert_to_string_ex(zvalue);
-#if LIBCURL_VERSION_NUM >= 0x071300
- if (
- option == CURLOPT_SSH_PUBLIC_KEYFILE || option == CURLOPT_SSH_PRIVATE_KEYFILE
-
- ) {
- if (php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
- RETVAL_FALSE;
- return 1;
- }
- }
-#endif
if (option == CURLOPT_URL) {
if (!php_curl_option_url(ch, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue) TSRMLS_CC)) {
RETVAL_FALSE;
@@ -1873,10 +2266,12 @@ string_copy:
}
break;
}
+
+ /* Curl file handle options */
case CURLOPT_FILE:
case CURLOPT_INFILE:
- case CURLOPT_WRITEHEADER:
- case CURLOPT_STDERR: {
+ case CURLOPT_STDERR:
+ case CURLOPT_WRITEHEADER: {
FILE *fp = NULL;
int type;
void * what;
@@ -1955,56 +2350,98 @@ string_copy:
error = curl_easy_setopt(ch->cp, option, fp);
break;
}
-
break;
}
- case CURLOPT_RETURNTRANSFER:
- convert_to_long_ex(zvalue);
- if (Z_LVAL_PP(zvalue)) {
- ch->handlers->write->method = PHP_CURL_RETURN;
- } else {
- ch->handlers->write->method = PHP_CURL_STDOUT;
- }
- break;
- case CURLOPT_BINARYTRANSFER:
- convert_to_long_ex(zvalue);
+ /* Curl linked list options */
+ case CURLOPT_HTTP200ALIASES:
+ case CURLOPT_HTTPHEADER:
+ case CURLOPT_POSTQUOTE:
+ case CURLOPT_PREQUOTE:
+ case CURLOPT_QUOTE:
+#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
+ case CURLOPT_MAIL_RCPT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */
+ case CURLOPT_RESOLVE:
+#endif
+ {
+ zval **current;
+ HashTable *ph;
+ struct curl_slist *slist = NULL;
- if (Z_LVAL_PP(zvalue)) {
- ch->handlers->write->type = PHP_CURL_BINARY;
- } else {
- ch->handlers->write->type = PHP_CURL_ASCII;
+ ph = HASH_OF(*zvalue);
+ if (!ph) {
+ char *name;
+ switch (option) {
+ case CURLOPT_HTTPHEADER:
+ name = "CURLOPT_HTTPHEADER";
+ break;
+ case CURLOPT_QUOTE:
+ name = "CURLOPT_QUOTE";
+ break;
+ case CURLOPT_HTTP200ALIASES:
+ name = "CURLOPT_HTTP200ALIASES";
+ break;
+ case CURLOPT_POSTQUOTE:
+ name = "CURLOPT_POSTQUOTE";
+ break;
+ case CURLOPT_PREQUOTE:
+ name = "CURLOPT_PREQUOTE";
+ break;
+#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
+ case CURLOPT_MAIL_RCPT:
+ name = "CURLOPT_MAIL_RCPT";
+ break;
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */
+ case CURLOPT_RESOLVE:
+ name = "CURLOPT_RESOLVE";
+ break;
+#endif
+ }
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must pass either an object or an array with the %s argument", name);
+ RETVAL_FALSE;
+ return 1;
}
- break;
- case CURLOPT_WRITEFUNCTION:
- if (ch->handlers->write->func_name) {
- zval_ptr_dtor(&ch->handlers->write->func_name);
- ch->handlers->write->fci_cache = empty_fcall_info_cache;
+
+ for (zend_hash_internal_pointer_reset(ph);
+ zend_hash_get_current_data(ph, (void **) &current) == SUCCESS;
+ zend_hash_move_forward(ph)
+ ) {
+ SEPARATE_ZVAL(current);
+ convert_to_string_ex(current);
+
+ slist = curl_slist_append(slist, Z_STRVAL_PP(current));
+ if (!slist) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
+ RETVAL_FALSE;
+ return 1;
+ }
}
- zval_add_ref(zvalue);
- ch->handlers->write->func_name = *zvalue;
- ch->handlers->write->method = PHP_CURL_USER;
+ zend_llist_add_element(&ch->to_free->slist, &slist);
+
+ error = curl_easy_setopt(ch->cp, option, slist);
+
break;
- case CURLOPT_READFUNCTION:
- if (ch->handlers->read->func_name) {
- zval_ptr_dtor(&ch->handlers->read->func_name);
- ch->handlers->read->fci_cache = empty_fcall_info_cache;
- }
- zval_add_ref(zvalue);
- ch->handlers->read->func_name = *zvalue;
- ch->handlers->read->method = PHP_CURL_USER;
+ }
+
+ case CURLOPT_BINARYTRANSFER:
+ /* Do nothing, just backward compatibility */
break;
- case CURLOPT_PROGRESSFUNCTION:
- curl_easy_setopt(ch->cp, CURLOPT_PROGRESSFUNCTION, curl_progress);
- curl_easy_setopt(ch->cp, CURLOPT_PROGRESSDATA, ch);
- if (ch->handlers->progress->func_name) {
- zval_ptr_dtor(&ch->handlers->progress->func_name);
- ch->handlers->progress->fci_cache = empty_fcall_info_cache;
+
+ case CURLOPT_FOLLOWLOCATION:
+ convert_to_long_ex(zvalue);
+ if (PG(open_basedir) && *PG(open_basedir)) {
+ if (Z_LVAL_PP(zvalue) != 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set");
+ RETVAL_FALSE;
+ return 1;
+ }
}
- zval_add_ref(zvalue);
- ch->handlers->progress->func_name = *zvalue;
- ch->handlers->progress->method = PHP_CURL_USER;
+ error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
break;
+
case CURLOPT_HEADERFUNCTION:
if (ch->handlers->write_header->func_name) {
zval_ptr_dtor(&ch->handlers->write_header->func_name);
@@ -2014,17 +2451,7 @@ string_copy:
ch->handlers->write_header->func_name = *zvalue;
ch->handlers->write_header->method = PHP_CURL_USER;
break;
-#if CURLOPT_PASSWDFUNCTION != 0
- case CURLOPT_PASSWDFUNCTION:
- if (ch->handlers->passwd) {
- zval_ptr_dtor(&ch->handlers->passwd);
- }
- zval_add_ref(zvalue);
- ch->handlers->passwd = *zvalue;
- error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
- error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch);
- break;
-#endif
+
case CURLOPT_POSTFIELDS:
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
zval **current;
@@ -2043,11 +2470,11 @@ string_copy:
zend_hash_get_current_data(postfields, (void **) &current) == SUCCESS;
zend_hash_move_forward(postfields)
) {
- char *postval;
- char *string_key = NULL;
- uint string_key_len;
- ulong num_key;
- int numeric_key;
+ char *postval;
+ char *string_key = NULL;
+ uint string_key_len;
+ ulong num_key;
+ int numeric_key;
SEPARATE_ZVAL(current);
convert_to_string_ex(current);
@@ -2137,48 +2564,99 @@ string_copy:
#endif
}
break;
- case CURLOPT_HTTPHEADER:
- case CURLOPT_QUOTE:
- case CURLOPT_HTTP200ALIASES:
- case CURLOPT_POSTQUOTE: {
- zval **current;
- HashTable *ph;
- struct curl_slist *slist = NULL;
- ph = HASH_OF(*zvalue);
- if (!ph) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must pass either an object or an array with the CURLOPT_HTTPHEADER, CURLOPT_QUOTE, CURLOPT_HTTP200ALIASES and CURLOPT_POSTQUOTE arguments");
- RETVAL_FALSE;
- return 1;
+ case CURLOPT_PROGRESSFUNCTION:
+ curl_easy_setopt(ch->cp, CURLOPT_PROGRESSFUNCTION, curl_progress);
+ curl_easy_setopt(ch->cp, CURLOPT_PROGRESSDATA, ch);
+ if (ch->handlers->progress == NULL) {
+ ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress));
+ } else if (ch->handlers->progress->func_name) {
+ zval_ptr_dtor(&ch->handlers->progress->func_name);
+ ch->handlers->progress->fci_cache = empty_fcall_info_cache;
}
+ zval_add_ref(zvalue);
+ ch->handlers->progress->func_name = *zvalue;
+ ch->handlers->progress->method = PHP_CURL_USER;
+ break;
- for (zend_hash_internal_pointer_reset(ph);
- zend_hash_get_current_data(ph, (void **) &current) == SUCCESS;
- zend_hash_move_forward(ph)
- ) {
- SEPARATE_ZVAL(current);
- convert_to_string_ex(current);
+ case CURLOPT_READFUNCTION:
+ if (ch->handlers->read->func_name) {
+ zval_ptr_dtor(&ch->handlers->read->func_name);
+ ch->handlers->read->fci_cache = empty_fcall_info_cache;
+ }
+ zval_add_ref(zvalue);
+ ch->handlers->read->func_name = *zvalue;
+ ch->handlers->read->method = PHP_CURL_USER;
+ break;
- slist = curl_slist_append(slist, Z_STRVAL_PP(current));
- if (!slist) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
- RETVAL_FALSE;
- return 1;
- }
+ case CURLOPT_RETURNTRANSFER:
+ convert_to_long_ex(zvalue);
+ if (Z_LVAL_PP(zvalue)) {
+ ch->handlers->write->method = PHP_CURL_RETURN;
+ } else {
+ ch->handlers->write->method = PHP_CURL_STDOUT;
}
- zend_llist_add_element(&ch->to_free->slist, &slist);
+ break;
- error = curl_easy_setopt(ch->cp, option, slist);
+ case CURLOPT_WRITEFUNCTION:
+ if (ch->handlers->write->func_name) {
+ zval_ptr_dtor(&ch->handlers->write->func_name);
+ ch->handlers->write->fci_cache = empty_fcall_info_cache;
+ }
+ zval_add_ref(zvalue);
+ ch->handlers->write->func_name = *zvalue;
+ ch->handlers->write->method = PHP_CURL_USER;
+ break;
+
+#if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */
+ case CURLOPT_MAX_RECV_SPEED_LARGE:
+ case CURLOPT_MAX_SEND_SPEED_LARGE:
+ convert_to_long_ex(zvalue);
+ error = curl_easy_setopt(ch->cp, option, (curl_off_t)Z_LVAL_PP(zvalue));
+ break;
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
+ case CURLOPT_POSTREDIR:
+ convert_to_long_ex(zvalue);
+ error = curl_easy_setopt(ch->cp, CURLOPT_POSTREDIR, Z_LVAL_PP(zvalue) & CURL_REDIR_POST_ALL);
break;
- }
+#endif
+
+#if CURLOPT_PASSWDFUNCTION != 0
+ case CURLOPT_PASSWDFUNCTION:
+ if (ch->handlers->passwd) {
+ zval_ptr_dtor(&ch->handlers->passwd);
+ }
+ zval_add_ref(zvalue);
+ ch->handlers->passwd = *zvalue;
+ error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
+ error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch);
+ break;
+#endif
+
/* the following options deal with files, therefore the open_basedir check
* is required.
*/
+ case CURLOPT_COOKIEFILE:
case CURLOPT_COOKIEJAR:
- case CURLOPT_SSLCERT:
case CURLOPT_RANDOM_FILE:
- case CURLOPT_COOKIEFILE: {
+ case CURLOPT_SSLCERT:
+#if LIBCURL_VERSION_NUM >= 0x070b00 /* Available since 7.11.0 */
+ case CURLOPT_NETRC_FILE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */
+ case CURLOPT_SSH_PRIVATE_KEYFILE:
+ case CURLOPT_SSH_PUBLIC_KEYFILE:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */
+ case CURLOPT_CRLFILE:
+ case CURLOPT_ISSUERCERT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071306 /* Available since 7.19.6 */
+ case CURLOPT_SSH_KNOWNHOSTS:
+#endif
+ {
#if LIBCURL_VERSION_NUM < 0x071100
char *copystr = NULL;
#endif
@@ -2200,6 +2678,7 @@ string_copy:
#endif
break;
}
+
case CURLINFO_HEADER_OUT:
convert_to_long_ex(zvalue);
if (Z_LVAL_PP(zvalue) == 1) {
@@ -2212,6 +2691,32 @@ string_copy:
curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
}
break;
+
+ case CURLOPT_SHARE:
+ {
+ php_curlsh *sh = NULL;
+ ZEND_FETCH_RESOURCE_NO_RETURN(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle);
+ if (sh) {
+ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share);
+ }
+ }
+
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ case CURLOPT_FNMATCH_FUNCTION:
+ curl_easy_setopt(ch->cp, CURLOPT_FNMATCH_FUNCTION, curl_fnmatch);
+ curl_easy_setopt(ch->cp, CURLOPT_FNMATCH_DATA, ch);
+ if (ch->handlers->fnmatch == NULL) {
+ ch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch));
+ } else if (ch->handlers->fnmatch->func_name) {
+ zval_ptr_dtor(&ch->handlers->fnmatch->func_name);
+ ch->handlers->fnmatch->fci_cache = empty_fcall_info_cache;
+ }
+ zval_add_ref(zvalue);
+ ch->handlers->fnmatch->func_name = *zvalue;
+ ch->handlers->fnmatch->method = PHP_CURL_USER;
+ break;
+#endif
+
}
SAVE_CURL_ERROR(ch, error);
@@ -2448,7 +2953,17 @@ PHP_FUNCTION(curl_getinfo)
if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_TIME, &d_code) == CURLE_OK) {
CAAD("redirect_time", d_code);
}
-#if LIBCURL_VERSION_NUM > 0x071301
+#if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */
+ if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_URL, &s_code) == CURLE_OK) {
+ CAAS("redirect_url", s_code);
+ }
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */
+ if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_IP, &s_code) == CURLE_OK) {
+ CAAS("primary_ip", s_code);
+ }
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
if (curl_easy_getinfo(ch->cp, CURLINFO_CERTINFO, &ci) == CURLE_OK) {
MAKE_STD_ZVAL(listcode);
array_init(listcode);
@@ -2456,12 +2971,7 @@ PHP_FUNCTION(curl_getinfo)
CAAZ("certinfo", listcode);
}
#endif
-#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */
- if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_IP, &s_code) == CURLE_OK) {
- CAAS("primary_ip", s_code);
- }
-#endif
-#if LIBCURL_VERSION_NUM > 0x071500
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_PORT, &l_code) == CURLE_OK) {
CAAL("primary_port", l_code);
}
@@ -2472,88 +2982,18 @@ PHP_FUNCTION(curl_getinfo)
CAAL("local_port", l_code);
}
#endif
-#if LIBCURL_VERSION_NUM >= 0x071202
- if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_URL, &s_code) == CURLE_OK) {
- CAAS("redirect_url", s_code);
- }
-#endif
if (ch->header.str_len > 0) {
CAAS("request_header", ch->header.str);
}
} else {
switch (option) {
- /* string variable types */
-#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */
- case CURLINFO_PRIMARY_IP:
-#endif
-#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */
- case CURLINFO_LOCAL_IP:
-#endif
- case CURLINFO_PRIVATE:
- case CURLINFO_EFFECTIVE_URL:
- case CURLINFO_CONTENT_TYPE:
-#if LIBCURL_VERSION_NUM >= 0x071202
- case CURLINFO_REDIRECT_URL:
-#endif
- {
- char *s_code = NULL;
-
- if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
- RETURN_STRING(s_code, 1);
- } else {
- RETURN_FALSE;
- }
- break;
- }
- /* Long variable types */
-#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */
- case CURLINFO_PRIMARY_PORT:
- case CURLINFO_LOCAL_PORT:
-#endif
- case CURLINFO_HTTP_CODE:
- case CURLINFO_HEADER_SIZE:
- case CURLINFO_REQUEST_SIZE:
- case CURLINFO_FILETIME:
- case CURLINFO_SSL_VERIFYRESULT:
- case CURLINFO_REDIRECT_COUNT: {
- long code = 0;
-
- if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
- RETURN_LONG(code);
- } else {
- RETURN_FALSE;
- }
- break;
- }
- /* Double variable types */
- case CURLINFO_TOTAL_TIME:
- case CURLINFO_NAMELOOKUP_TIME:
- case CURLINFO_CONNECT_TIME:
- case CURLINFO_PRETRANSFER_TIME:
- case CURLINFO_SIZE_UPLOAD:
- case CURLINFO_SIZE_DOWNLOAD:
- case CURLINFO_SPEED_DOWNLOAD:
- case CURLINFO_SPEED_UPLOAD:
- case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
- case CURLINFO_CONTENT_LENGTH_UPLOAD:
- case CURLINFO_STARTTRANSFER_TIME:
- case CURLINFO_REDIRECT_TIME: {
- double code = 0.0;
-
- if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
- RETURN_DOUBLE(code);
- } else {
- RETURN_FALSE;
- }
- break;
- }
case CURLINFO_HEADER_OUT:
if (ch->header.str_len > 0) {
RETURN_STRINGL(ch->header.str, ch->header.str_len, 1);
} else {
RETURN_FALSE;
}
-#if LIBCURL_VERSION_NUM > 0x071301
+#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
case CURLINFO_CERTINFO: {
struct curl_certinfo *ci = NULL;
@@ -2567,6 +3007,61 @@ PHP_FUNCTION(curl_getinfo)
break;
}
#endif
+ default: {
+ int type = CURLINFO_TYPEMASK & option;
+ switch (type) {
+ case CURLINFO_STRING:
+ {
+ char *s_code = NULL;
+
+ if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
+ RETURN_STRING(s_code, 1);
+ } else {
+ RETURN_FALSE;
+ }
+ break;
+ }
+ case CURLINFO_LONG:
+ {
+ long code = 0;
+
+ if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
+ RETURN_LONG(code);
+ } else {
+ RETURN_FALSE;
+ }
+ break;
+ }
+ case CURLINFO_DOUBLE:
+ {
+ double code = 0.0;
+
+ if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
+ RETURN_DOUBLE(code);
+ } else {
+ RETURN_FALSE;
+ }
+ break;
+ }
+ case CURLINFO_SLIST:
+ {
+ struct curl_slist *slist;
+ array_init(return_value);
+ if (curl_easy_getinfo(ch->cp, option, &slist) == CURLE_OK) {
+ while (slist) {
+ add_next_index_string(return_value, slist->data, 1);
+ slist = slist->next;
+ }
+ curl_slist_free_all(slist);
+ } else {
+ RETURN_FALSE;
+ }
+ break;
+ }
+ default:
+ RETURN_FALSE;
+ }
+ }
}
}
}
@@ -2667,9 +3162,6 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
if (ch->handlers->write_header->func_name) {
zval_ptr_dtor(&ch->handlers->write_header->func_name);
}
- if (ch->handlers->progress->func_name) {
- zval_ptr_dtor(&ch->handlers->progress->func_name);
- }
if (ch->handlers->passwd) {
zval_ptr_dtor(&ch->handlers->passwd);
}
@@ -2693,7 +3185,23 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
efree(ch->handlers->write);
efree(ch->handlers->write_header);
efree(ch->handlers->read);
- efree(ch->handlers->progress);
+
+ if (ch->handlers->progress) {
+ if (ch->handlers->progress->func_name) {
+ zval_ptr_dtor(&ch->handlers->progress->func_name);
+ }
+ efree(ch->handlers->progress);
+ }
+
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ if (ch->handlers->fnmatch) {
+ if (ch->handlers->fnmatch->func_name) {
+ zval_ptr_dtor(&ch->handlers->fnmatch->func_name);
+ }
+ efree(ch->handlers->fnmatch);
+ }
+#endif
+
efree(ch->handlers);
efree(ch);
}
@@ -2708,6 +3216,133 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
}
/* }}} */
+#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
+/* {{{ _php_curl_reset_handlers()
+ Reset all handlers of a given php_curl */
+static void _php_curl_reset_handlers(php_curl *ch)
+{
+ if (ch->handlers->write->stream) {
+ Z_DELREF_P(ch->handlers->write->stream);
+ ch->handlers->write->stream = NULL;
+ }
+ ch->handlers->write->fp = NULL;
+ ch->handlers->write->method = PHP_CURL_STDOUT;
+
+ if (ch->handlers->write_header->stream) {
+ Z_DELREF_P(ch->handlers->write_header->stream);
+ ch->handlers->write_header->stream = NULL;
+ }
+ ch->handlers->write_header->fp = NULL;
+ ch->handlers->write_header->method = PHP_CURL_IGNORE;
+
+ if (ch->handlers->read->stream) {
+ Z_DELREF_P(ch->handlers->read->stream);
+ ch->handlers->read->stream = NULL;
+ }
+ ch->handlers->read->fp = NULL;
+ ch->handlers->read->fd = NULL;
+ ch->handlers->read->method = PHP_CURL_DIRECT;
+
+ if (ch->handlers->std_err) {
+ zval_ptr_dtor(&ch->handlers->std_err);
+ ch->handlers->std_err = NULL;
+ }
+
+ if (ch->handlers->progress) {
+ if (ch->handlers->progress->func_name) {
+ zval_ptr_dtor(&ch->handlers->progress->func_name);
+ }
+ efree(ch->handlers->progress);
+ ch->handlers->progress = NULL;
+ }
+
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ if (ch->handlers->fnmatch) {
+ if (ch->handlers->fnmatch->func_name) {
+ zval_ptr_dtor(&ch->handlers->fnmatch->func_name);
+ }
+ efree(ch->handlers->fnmatch);
+ ch->handlers->fnmatch = NULL;
+ }
+#endif
+
+}
+/* }}} */
+
+/* {{{ proto void curl_reset(resource ch)
+ Reset all options of a libcurl session handle */
+PHP_FUNCTION(curl_reset)
+{
+ zval *zid;
+ php_curl *ch;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zid) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
+
+ if (ch->in_callback) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to reset cURL handle from a callback");
+ return;
+ }
+
+ curl_easy_reset(ch->cp);
+ _php_curl_reset_handlers(ch);
+ _php_curl_set_default_options(ch);
+}
+/* }}} */
+#endif
+
+#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */
+/* {{{ proto void curl_escape(resource ch, string str)
+ URL encodes the given string */
+PHP_FUNCTION(curl_escape)
+{
+ char *str = NULL, *res = NULL;
+ int str_len = 0;
+ zval *zid;
+ php_curl *ch;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &zid, &str, &str_len) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
+
+ if ((res = curl_easy_escape(ch->cp, str, str_len))) {
+ RETVAL_STRING(res, 1);
+ free(res);
+ } else {
+ RETURN_FALSE;
+ }
+}
+/* }}} */
+
+/* {{{ proto void curl_unescape(resource ch, string str)
+ URL decodes the given string */
+PHP_FUNCTION(curl_unescape)
+{
+ char *str = NULL, *out = NULL;
+ int str_len = 0, out_len;
+ zval *zid;
+ php_curl *ch;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &zid, &str, &str_len) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
+
+ if ((out = curl_easy_unescape(ch->cp, str, str_len, &out_len))) {
+ RETVAL_STRINGL(out, out_len, 1);
+ free(out);
+ } else {
+ RETURN_FALSE;
+ }
+}
+#endif
+/* }}} */
#endif /* HAVE_CURL */
/*
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 53e97b80f..eedcb6abc 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -125,8 +125,8 @@ void _php_curl_multi_cleanup_list(void *data) /* {{{ */
static int curl_compare_resources( zval *z1, zval **z2 ) /* {{{ */
{
return (Z_TYPE_P( z1 ) == Z_TYPE_PP( z2 ) &&
- Z_TYPE_P( z1 ) == IS_RESOURCE &&
- Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) );
+ Z_TYPE_P( z1 ) == IS_RESOURCE &&
+ Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) );
}
/* }}} */
diff --git a/ext/curl/package.xml b/ext/curl/package.xml
index 85cb634c6..c14321738 100644
--- a/ext/curl/package.xml
+++ b/ext/curl/package.xml
@@ -39,6 +39,7 @@ package.xml added to support installation using pear installer
<file role="src" name="curl.dsp"/>
<file role="src" name="interface.c"/>
<file role="src" name="multi.c"/>
+ <file role="src" name="share.c"/>
<file role="src" name="streams.c"/>
<file role="src" name="php_curl.h"/>
</filelist>
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index 05275455e..a9e0f869c 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -41,20 +41,20 @@ extern zend_module_entry curl_module_entry;
#define curl_module_ptr &curl_module_entry
#define CURLOPT_RETURNTRANSFER 19913
-#define CURLOPT_BINARYTRANSFER 19914
+#define CURLOPT_BINARYTRANSFER 19914 /* For Backward compatibility */
#define PHP_CURL_STDOUT 0
#define PHP_CURL_FILE 1
#define PHP_CURL_USER 2
#define PHP_CURL_DIRECT 3
#define PHP_CURL_RETURN 4
-#define PHP_CURL_ASCII 5
-#define PHP_CURL_BINARY 6
#define PHP_CURL_IGNORE 7
extern int le_curl;
#define le_curl_name "cURL handle"
extern int le_curl_multi_handle;
#define le_curl_multi_handle_name "cURL Multi Handle"
+extern int le_curl_share_handle;
+#define le_curl_share_handle_name "cURL Share Handle"
PHP_MINIT_FUNCTION(curl);
PHP_MSHUTDOWN_FUNCTION(curl);
@@ -69,6 +69,15 @@ PHP_FUNCTION(curl_getinfo);
PHP_FUNCTION(curl_error);
PHP_FUNCTION(curl_errno);
PHP_FUNCTION(curl_close);
+
+#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
+PHP_FUNCTION(curl_reset);
+#endif
+#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */
+PHP_FUNCTION(curl_escape);
+PHP_FUNCTION(curl_unescape);
+#endif
+
PHP_FUNCTION(curl_multi_init);
PHP_FUNCTION(curl_multi_add_handle);
PHP_FUNCTION(curl_multi_remove_handle);
@@ -77,7 +86,21 @@ PHP_FUNCTION(curl_multi_exec);
PHP_FUNCTION(curl_multi_getcontent);
PHP_FUNCTION(curl_multi_info_read);
PHP_FUNCTION(curl_multi_close);
+PHP_FUNCTION(curl_share_init);
+PHP_FUNCTION(curl_share_close);
+PHP_FUNCTION(curl_share_setopt);
+
+#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
+PHP_FUNCTION(curl_reset);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */
+PHP_FUNCTION(curl_escape);
+PHP_FUNCTION(curl_unescape);
+#endif
+
void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC);
+void _php_curl_share_close(zend_rsrc_list_entry * TSRMLS_DC);
typedef struct {
zval *func_name;
@@ -85,7 +108,6 @@ typedef struct {
FILE *fp;
smart_str buf;
int method;
- int type;
zval *stream;
} php_curl_write;
@@ -102,7 +124,7 @@ typedef struct {
zval *func_name;
zend_fcall_info_cache fci_cache;
int method;
-} php_curl_progress;
+} php_curl_progress, php_curl_fnmatch;
typedef struct {
php_curl_write *write;
@@ -111,6 +133,9 @@ typedef struct {
zval *passwd;
zval *std_err;
php_curl_progress *progress;
+#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
+ php_curl_fnmatch *fnmatch;
+#endif
} php_curl_handlers;
struct _php_curl_error {
@@ -148,6 +173,10 @@ typedef struct {
zend_llist easyh;
} php_curlm;
+typedef struct {
+ CURLSH *share;
+} php_curlsh;
+
void _php_curl_cleanup_handle(php_curl *);
void _php_curl_multi_cleanup_list(void *data);
int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC);
diff --git a/ext/curl/share.c b/ext/curl/share.c
new file mode 100644
index 000000000..d7cec23dd
--- /dev/null
+++ b/ext/curl/share.c
@@ -0,0 +1,136 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2012 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Pierrick Charron <pierrick@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "php.h"
+
+#if HAVE_CURL
+
+#include "php_curl.h"
+
+#include <curl/curl.h>
+
+/* {{{ proto void curl_share_init()
+ Initialize a share curl handle */
+PHP_FUNCTION(curl_share_init)
+{
+ php_curlsh *sh;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ sh = ecalloc(1, sizeof(php_curlsh));
+
+ sh->share = curl_share_init();
+
+ ZEND_REGISTER_RESOURCE(return_value, sh, le_curl_share_handle);
+}
+/* }}} */
+
+/* {{{ proto void curl_share_close(resource sh)
+ Close a set of cURL handles */
+PHP_FUNCTION(curl_share_close)
+{
+ zval *z_sh;
+ php_curlsh *sh;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_sh) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(sh, php_curlsh *, &z_sh, -1, le_curl_share_handle_name, le_curl_share_handle);
+ zend_list_delete(Z_LVAL_P(z_sh));
+}
+/* }}} */
+
+static int _php_curl_share_setopt(php_curlsh *sh, long option, zval **zvalue, zval *return_value TSRMLS_DC) /* {{{ */
+{
+ CURLSHcode error = CURLSHE_OK;
+
+ switch (option) {
+ case CURLSHOPT_SHARE:
+ case CURLSHOPT_UNSHARE:
+ convert_to_long_ex(zvalue);
+ error = curl_share_setopt(sh->share, option, Z_LVAL_PP(zvalue));
+ break;
+ }
+
+ if (error != CURLE_OK) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+/* }}} */
+
+/* {{{ proto bool curl_share_setopt(resource sh, int option, mixed value)
+ Set an option for a cURL transfer */
+PHP_FUNCTION(curl_share_setopt)
+{
+ zval *zid, **zvalue;
+ long options;
+ php_curlsh *sh;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlZ", &zid, &options, &zvalue) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(sh, php_curlsh *, &zid, -1, le_curl_share_handle_name, le_curl_share_handle);
+
+ if (options <= 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid curl share configuration option");
+ RETURN_FALSE;
+ }
+
+ if (!_php_curl_share_setopt(sh, options, zvalue, return_value TSRMLS_CC)) {
+ RETURN_TRUE;
+ } else {
+ RETURN_FALSE;
+ }
+}
+/* }}} */
+
+void _php_curl_share_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
+{
+ php_curlsh *sh = (php_curlsh *) rsrc->ptr;
+ if (sh) {
+ curl_share_cleanup(sh->share);
+ efree(sh);
+ rsrc->ptr = NULL;
+ }
+}
+/* }}} */
+
+#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/curl/tests/bug54995.phpt b/ext/curl/tests/bug54995.phpt
new file mode 100644
index 000000000..0f3f50f34
--- /dev/null
+++ b/ext/curl/tests/bug54995.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if ($curl_version['version_number'] > 0x070a08) {
+ exit("skip: tests works a versions of curl >= 7.10.8");
+}
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
+?>
+--FILE--
+<?php
+
+$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
+$ch = curl_init();
+curl_setopt($ch, CURLOPT_URL, "{$host}/get.php");
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+
+var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE) == curl_getinfo($ch, CURLINFO_RESPONSE_CODE));
+
+curl_exec($ch);
+curl_close($ch);
+
+?>
+--EXPECTF--
+bool(true)
diff --git a/ext/curl/tests/bug63363.phpt b/ext/curl/tests/bug63363.phpt
new file mode 100644
index 000000000..43deaa234
--- /dev/null
+++ b/ext/curl/tests/bug63363.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #63363 (CURL silently accepts boolean value for SSL_VERIFYHOST)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+
+?>
+--FILE--
+<?php
+$ch = curl_init();
+var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false));
+/* Case that should throw an error */
+var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true));
+var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0));
+var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1));
+var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2));
+
+curl_close($ch);
+?>
+--EXPECTF--
+bool(true)
+
+Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST set to true which disables common name validation (setting CURLOPT_SSL_VERIFYHOST to 2 enables common name validation) in %s on line %d
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/curl/tests/curl_basic_006.phpt b/ext/curl/tests/curl_basic_006.phpt
index 5f1a4f483..5f1a4f483 100755..100644
--- a/ext/curl/tests/curl_basic_006.phpt
+++ b/ext/curl/tests/curl_basic_006.phpt
diff --git a/ext/curl/tests/curl_basic_007.phpt b/ext/curl/tests/curl_basic_007.phpt
index b7eba4bc2..b7eba4bc2 100755..100644
--- a/ext/curl/tests/curl_basic_007.phpt
+++ b/ext/curl/tests/curl_basic_007.phpt
diff --git a/ext/curl/tests/curl_basic_008.phpt b/ext/curl/tests/curl_basic_008.phpt
index 29e334370..29e334370 100755..100644
--- a/ext/curl/tests/curl_basic_008.phpt
+++ b/ext/curl/tests/curl_basic_008.phpt
diff --git a/ext/curl/tests/curl_basic_022.phpt b/ext/curl/tests/curl_basic_022.phpt
new file mode 100644
index 000000000..d4277a3f8
--- /dev/null
+++ b/ext/curl/tests/curl_basic_022.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test curl_getinfo() function with CURLINFO_COOKIELIST parameter
+--SKIPIF--
+<?php if (!extension_loaded("curl")) print "skip";
+$curl_version = curl_version();
+if ($curl_version['version_number'] < 0x070e01) {
+ exit("skip: test works only with curl >= 7.14.1");
+}
+?>
+--FILE--
+<?php
+
+$ch = curl_init();
+curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
+curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
+var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(38) ".php.net TRUE / FALSE 2145916799 C1 v1"
+ [1]=>
+ string(38) ".php.net TRUE / FALSE 2145916799 C2 v2"
+}
diff --git a/ext/curl/tests/curl_escape.phpt b/ext/curl/tests/curl_escape.phpt
new file mode 100644
index 000000000..e759144c8
--- /dev/null
+++ b/ext/curl/tests/curl_escape.phpt
Binary files differ
diff --git a/ext/curl/tests/curl_reset.phpt b/ext/curl/tests/curl_reset.phpt
new file mode 100644
index 000000000..c78a8e095
--- /dev/null
+++ b/ext/curl/tests/curl_reset.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Test curl_reset
+--SKIPIF--
+<?php if (!extension_loaded("curl")) print "skip";
+if (!function_exists("curl_reset")) exit("skip curl_reset doesn't exists (require libcurl >= 7.12.1)");
+?>
+--FILE--
+<?php
+
+$test_file = tempnam(sys_get_temp_dir(), 'php-curl-test');
+$log_file = tempnam(sys_get_temp_dir(), 'php-curl-test');
+
+$fp = fopen($log_file, 'w+');
+fwrite($fp, "test");
+fclose($fp);
+
+$testfile_fp = fopen($test_file, 'w+');
+
+$ch = curl_init();
+curl_setopt($ch, CURLOPT_FILE, $testfile_fp);
+curl_setopt($ch, CURLOPT_URL, 'file://' . $log_file);
+curl_exec($ch);
+
+curl_reset($ch);
+curl_setopt($ch, CURLOPT_URL, 'file://' . $log_file);
+curl_exec($ch);
+
+curl_close($ch);
+
+fclose($testfile_fp);
+
+echo file_get_contents($test_file);
+
+// cleanup
+unlink($test_file);
+unlink($log_file);
+
+?>
+--EXPECT--
+testtest
diff --git a/ext/curl/tests/curl_setopt_basic003.phpt b/ext/curl/tests/curl_setopt_basic003.phpt
index 784914076..aa225c6e3 100644
--- a/ext/curl/tests/curl_setopt_basic003.phpt
+++ b/ext/curl/tests/curl_setopt_basic003.phpt
@@ -38,6 +38,6 @@ var_dump( $curl_content );
--EXPECTF--
*** curl_setopt() call with CURLOPT_HTTPHEADER
-Warning: curl_setopt(): You must pass either an object or an array with the CURLOPT_HTTPHEADER, CURLOPT_QUOTE, CURLOPT_HTTP200ALIASES and CURLOPT_POSTQUOTE arguments in %s on line %d
+Warning: curl_setopt(): You must pass either an object or an array with the CURLOPT_HTTPHEADER argument in %s on line %d
bool(false)
bool(true)
diff --git a/ext/date/TODO b/ext/date/TODO
index 4b1237c4a..a585b0551 100644
--- a/ext/date/TODO
+++ b/ext/date/TODO
@@ -1,6 +1,5 @@
- Port over my 200 test cases to .phpt format.
- Write an error handler for unexpected characters while parsing dates.
- Cache lookups for timezone information.
-- Optimize parsing @ with a negative timestamp.
- Make sure that date_default_timezone_set() validates the passed timezone
identifier.
diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c
index d52c24d38..6be5bf18f 100644
--- a/ext/date/lib/parse_iso_intervals.c
+++ b/ext/date/lib/parse_iso_intervals.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Dec 5 22:02:27 2011 */
+/* Generated by re2c 0.13.5 on Mon Dec 5 22:02:35 2011 */
#line 1 "ext/date/lib/parse_iso_intervals.re"
/*
+----------------------------------------------------------------------+
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index 221181191..9cb5a9c69 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -14,570 +14,570 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[576] = {
{ "Africa/Bujumbura" , 0x000571 },
{ "Africa/Cairo" , 0x0005B5 },
{ "Africa/Casablanca" , 0x000878 },
- { "Africa/Ceuta" , 0x000A6C },
- { "Africa/Conakry" , 0x000D73 },
- { "Africa/Dakar" , 0x000DDE },
- { "Africa/Dar_es_Salaam" , 0x000E44 },
- { "Africa/Djibouti" , 0x000EB1 },
- { "Africa/Douala" , 0x000F06 },
- { "Africa/El_Aaiun" , 0x000F5B },
- { "Africa/Freetown" , 0x000FC1 },
- { "Africa/Gaborone" , 0x0010D0 },
- { "Africa/Harare" , 0x00112B },
- { "Africa/Johannesburg" , 0x001180 },
- { "Africa/Juba" , 0x0011EE },
- { "Africa/Kampala" , 0x001301 },
- { "Africa/Khartoum" , 0x001380 },
- { "Africa/Kigali" , 0x001493 },
- { "Africa/Kinshasa" , 0x0014E8 },
- { "Africa/Lagos" , 0x001543 },
- { "Africa/Libreville" , 0x001598 },
- { "Africa/Lome" , 0x0015ED },
- { "Africa/Luanda" , 0x001631 },
- { "Africa/Lubumbashi" , 0x001686 },
- { "Africa/Lusaka" , 0x0016E1 },
- { "Africa/Malabo" , 0x001736 },
- { "Africa/Maputo" , 0x00179C },
- { "Africa/Maseru" , 0x0017F1 },
- { "Africa/Mbabane" , 0x001859 },
- { "Africa/Mogadishu" , 0x0018AF },
- { "Africa/Monrovia" , 0x00190A },
- { "Africa/Nairobi" , 0x001970 },
- { "Africa/Ndjamena" , 0x0019EF },
- { "Africa/Niamey" , 0x001A5B },
- { "Africa/Nouakchott" , 0x001ACE },
- { "Africa/Ouagadougou" , 0x001B39 },
- { "Africa/Porto-Novo" , 0x001B8E },
- { "Africa/Sao_Tome" , 0x001BF4 },
- { "Africa/Timbuktu" , 0x001C49 },
- { "Africa/Tripoli" , 0x001CB4 },
- { "Africa/Tunis" , 0x001DAE },
- { "Africa/Windhoek" , 0x001EC0 },
- { "America/Adak" , 0x002107 },
- { "America/Anchorage" , 0x00247D },
- { "America/Anguilla" , 0x0027F1 },
- { "America/Antigua" , 0x002846 },
- { "America/Araguaina" , 0x0028AC },
- { "America/Argentina/Buenos_Aires" , 0x002A07 },
- { "America/Argentina/Catamarca" , 0x002BB5 },
- { "America/Argentina/ComodRivadavia" , 0x002D76 },
- { "America/Argentina/Cordoba" , 0x002F1C },
- { "America/Argentina/Jujuy" , 0x0030F1 },
- { "America/Argentina/La_Rioja" , 0x0032A5 },
- { "America/Argentina/Mendoza" , 0x00345D },
- { "America/Argentina/Rio_Gallegos" , 0x00361D },
- { "America/Argentina/Salta" , 0x0037D2 },
- { "America/Argentina/San_Juan" , 0x00397E },
- { "America/Argentina/San_Luis" , 0x003B36 },
- { "America/Argentina/Tucuman" , 0x003CFC },
- { "America/Argentina/Ushuaia" , 0x003EB8 },
- { "America/Aruba" , 0x004073 },
- { "America/Asuncion" , 0x0040D9 },
- { "America/Atikokan" , 0x0043BE },
- { "America/Atka" , 0x004494 },
- { "America/Bahia" , 0x0047FA },
- { "America/Bahia_Banderas" , 0x004A8C },
- { "America/Barbados" , 0x004D05 },
- { "America/Belem" , 0x004D9F },
- { "America/Belize" , 0x004E9A },
- { "America/Blanc-Sablon" , 0x005016 },
- { "America/Boa_Vista" , 0x0050CA },
- { "America/Bogota" , 0x0051D3 },
- { "America/Boise" , 0x00523F },
- { "America/Buenos_Aires" , 0x0055D6 },
- { "America/Cambridge_Bay" , 0x00576F },
- { "America/Campo_Grande" , 0x005A97 },
- { "America/Cancun" , 0x005D86 },
- { "America/Caracas" , 0x005FC8 },
- { "America/Catamarca" , 0x00602F },
- { "America/Cayenne" , 0x0061D5 },
- { "America/Cayman" , 0x006237 },
- { "America/Chicago" , 0x00628C },
- { "America/Chihuahua" , 0x0067A3 },
- { "America/Coral_Harbour" , 0x006A0E },
- { "America/Cordoba" , 0x006AA0 },
- { "America/Costa_Rica" , 0x006C46 },
- { "America/Creston" , 0x006CD0 },
- { "America/Cuiaba" , 0x006D5C },
- { "America/Curacao" , 0x00703A },
- { "America/Danmarkshavn" , 0x0070A0 },
- { "America/Dawson" , 0x0071E4 },
- { "America/Dawson_Creek" , 0x007501 },
- { "America/Denver" , 0x0076DB },
- { "America/Detroit" , 0x007A61 },
- { "America/Dominica" , 0x007DC0 },
- { "America/Edmonton" , 0x007E15 },
- { "America/Eirunepe" , 0x0081CD },
- { "America/El_Salvador" , 0x0082E0 },
- { "America/Ensenada" , 0x008355 },
- { "America/Fort_Wayne" , 0x0087FC },
- { "America/Fortaleza" , 0x0086BE },
- { "America/Glace_Bay" , 0x008A66 },
- { "America/Godthab" , 0x008DDD },
- { "America/Goose_Bay" , 0x0090A1 },
- { "America/Grand_Turk" , 0x00955E },
- { "America/Grenada" , 0x00980D },
- { "America/Guadeloupe" , 0x009862 },
- { "America/Guatemala" , 0x0098B7 },
- { "America/Guayaquil" , 0x009940 },
- { "America/Guyana" , 0x00999D },
- { "America/Halifax" , 0x009A1E },
- { "America/Havana" , 0x009F34 },
- { "America/Hermosillo" , 0x00A2A7 },
- { "America/Indiana/Indianapolis" , 0x00A385 },
- { "America/Indiana/Knox" , 0x00A616 },
- { "America/Indiana/Marengo" , 0x00A9AD },
- { "America/Indiana/Petersburg" , 0x00AC53 },
- { "America/Indiana/Tell_City" , 0x00B1A0 },
- { "America/Indiana/Vevay" , 0x00B439 },
- { "America/Indiana/Vincennes" , 0x00B674 },
- { "America/Indiana/Winamac" , 0x00B928 },
- { "America/Indianapolis" , 0x00AF36 },
- { "America/Inuvik" , 0x00BBE1 },
- { "America/Iqaluit" , 0x00BED8 },
- { "America/Jamaica" , 0x00C1FA },
- { "America/Jujuy" , 0x00C2BF },
- { "America/Juneau" , 0x00C469 },
- { "America/Kentucky/Louisville" , 0x00C7E7 },
- { "America/Kentucky/Monticello" , 0x00CC05 },
- { "America/Knox_IN" , 0x00CF8A },
- { "America/Kralendijk" , 0x00D2FB },
- { "America/La_Paz" , 0x00D361 },
- { "America/Lima" , 0x00D3C8 },
- { "America/Los_Angeles" , 0x00D470 },
- { "America/Louisville" , 0x00D881 },
- { "America/Lower_Princes" , 0x00DC76 },
- { "America/Maceio" , 0x00DCDC },
- { "America/Managua" , 0x00DE16 },
- { "America/Manaus" , 0x00DEC9 },
- { "America/Marigot" , 0x00DFCB },
- { "America/Martinique" , 0x00E020 },
- { "America/Matamoros" , 0x00E08C },
- { "America/Mazatlan" , 0x00E2E5 },
- { "America/Mendoza" , 0x00E552 },
- { "America/Menominee" , 0x00E706 },
- { "America/Merida" , 0x00EA87 },
- { "America/Metlakatla" , 0x00ECC2 },
- { "America/Mexico_City" , 0x00EDFC },
- { "America/Miquelon" , 0x00F077 },
- { "America/Moncton" , 0x00F2E9 },
- { "America/Monterrey" , 0x00F780 },
- { "America/Montevideo" , 0x00F9E3 },
- { "America/Montreal" , 0x00FCF5 },
- { "America/Montserrat" , 0x01020B },
- { "America/Nassau" , 0x010260 },
- { "America/New_York" , 0x0105A5 },
- { "America/Nipigon" , 0x010AB0 },
- { "America/Nome" , 0x010E01 },
- { "America/Noronha" , 0x01117F },
- { "America/North_Dakota/Beulah" , 0x0112AF },
- { "America/North_Dakota/Center" , 0x011643 },
- { "America/North_Dakota/New_Salem" , 0x0119D7 },
- { "America/Ojinaga" , 0x011D80 },
- { "America/Panama" , 0x011FE1 },
- { "America/Pangnirtung" , 0x012036 },
- { "America/Paramaribo" , 0x01236C },
- { "America/Phoenix" , 0x0123FE },
- { "America/Port-au-Prince" , 0x0124AC },
- { "America/Port_of_Spain" , 0x0126D1 },
- { "America/Porto_Acre" , 0x0125D2 },
- { "America/Porto_Velho" , 0x012726 },
- { "America/Puerto_Rico" , 0x01281C },
- { "America/Rainy_River" , 0x012887 },
- { "America/Rankin_Inlet" , 0x012BBF },
- { "America/Recife" , 0x012EA5 },
- { "America/Regina" , 0x012FCF },
- { "America/Resolute" , 0x01318D },
- { "America/Rio_Branco" , 0x01347E },
- { "America/Rosario" , 0x013581 },
- { "America/Santa_Isabel" , 0x013727 },
- { "America/Santarem" , 0x013ACA },
- { "America/Santiago" , 0x013BCF },
- { "America/Santo_Domingo" , 0x013F78 },
- { "America/Sao_Paulo" , 0x01403E },
- { "America/Scoresbysund" , 0x01434D },
- { "America/Shiprock" , 0x01463B },
- { "America/Sitka" , 0x0149CA },
- { "America/St_Barthelemy" , 0x014D52 },
- { "America/St_Johns" , 0x014DA7 },
- { "America/St_Kitts" , 0x0152FA },
- { "America/St_Lucia" , 0x01534F },
- { "America/St_Thomas" , 0x0153A4 },
- { "America/St_Vincent" , 0x0153F9 },
- { "America/Swift_Current" , 0x01544E },
- { "America/Tegucigalpa" , 0x01556F },
- { "America/Thule" , 0x0155EE },
- { "America/Thunder_Bay" , 0x015835 },
- { "America/Tijuana" , 0x015B7E },
- { "America/Toronto" , 0x015F17 },
- { "America/Tortola" , 0x01642E },
- { "America/Vancouver" , 0x016483 },
- { "America/Virgin" , 0x0168C0 },
- { "America/Whitehorse" , 0x016915 },
- { "America/Winnipeg" , 0x016C32 },
- { "America/Yakutat" , 0x017072 },
- { "America/Yellowknife" , 0x0173DD },
- { "Antarctica/Casey" , 0x0176ED },
- { "Antarctica/Davis" , 0x01778A },
- { "Antarctica/DumontDUrville" , 0x01782B },
- { "Antarctica/Macquarie" , 0x0178BD },
- { "Antarctica/Mawson" , 0x017B37 },
- { "Antarctica/McMurdo" , 0x017BB3 },
- { "Antarctica/Palmer" , 0x017EB5 },
- { "Antarctica/Rothera" , 0x0181D1 },
- { "Antarctica/South_Pole" , 0x018247 },
- { "Antarctica/Syowa" , 0x01854F },
- { "Antarctica/Vostok" , 0x0185BD },
- { "Arctic/Longyearbyen" , 0x01862E },
- { "Asia/Aden" , 0x018960 },
- { "Asia/Almaty" , 0x0189B5 },
- { "Asia/Amman" , 0x018B34 },
- { "Asia/Anadyr" , 0x018DF4 },
- { "Asia/Aqtau" , 0x018FD9 },
- { "Asia/Aqtobe" , 0x0191D8 },
- { "Asia/Ashgabat" , 0x019390 },
- { "Asia/Ashkhabad" , 0x0194AD },
- { "Asia/Baghdad" , 0x0195CA },
- { "Asia/Bahrain" , 0x01973F },
- { "Asia/Baku" , 0x0197A5 },
- { "Asia/Bangkok" , 0x019A8D },
- { "Asia/Beirut" , 0x019AE2 },
- { "Asia/Bishkek" , 0x019DEF },
- { "Asia/Brunei" , 0x019F9B },
- { "Asia/Calcutta" , 0x019FFD },
- { "Asia/Choibalsan" , 0x01A076 },
- { "Asia/Chongqing" , 0x01A1EF },
- { "Asia/Chungking" , 0x01A2DE },
- { "Asia/Colombo" , 0x01A38D },
- { "Asia/Dacca" , 0x01A429 },
- { "Asia/Damascus" , 0x01A4CF },
- { "Asia/Dhaka" , 0x01A81F },
- { "Asia/Dili" , 0x01A8C5 },
- { "Asia/Dubai" , 0x01A94E },
- { "Asia/Dushanbe" , 0x01A9A3 },
- { "Asia/Gaza" , 0x01AAA6 },
- { "Asia/Harbin" , 0x01ACFF },
- { "Asia/Hebron" , 0x01ADE6 },
- { "Asia/Ho_Chi_Minh" , 0x01B048 },
- { "Asia/Hong_Kong" , 0x01B0C0 },
- { "Asia/Hovd" , 0x01B282 },
- { "Asia/Irkutsk" , 0x01B3FA },
- { "Asia/Istanbul" , 0x01B5E0 },
- { "Asia/Jakarta" , 0x01B9CD },
- { "Asia/Jayapura" , 0x01BA77 },
- { "Asia/Jerusalem" , 0x01BB13 },
- { "Asia/Kabul" , 0x01BE42 },
- { "Asia/Kamchatka" , 0x01BE93 },
- { "Asia/Karachi" , 0x01C06F },
- { "Asia/Kashgar" , 0x01C124 },
- { "Asia/Kathmandu" , 0x01C1F5 },
- { "Asia/Katmandu" , 0x01C25B },
- { "Asia/Kolkata" , 0x01C2C1 },
- { "Asia/Krasnoyarsk" , 0x01C33A },
- { "Asia/Kuala_Lumpur" , 0x01C522 },
- { "Asia/Kuching" , 0x01C5DF },
- { "Asia/Kuwait" , 0x01C6CD },
- { "Asia/Macao" , 0x01C722 },
- { "Asia/Macau" , 0x01C85D },
- { "Asia/Magadan" , 0x01C998 },
- { "Asia/Makassar" , 0x01CB7A },
- { "Asia/Manila" , 0x01CC3E },
- { "Asia/Muscat" , 0x01CCC3 },
- { "Asia/Nicosia" , 0x01CD18 },
- { "Asia/Novokuznetsk" , 0x01D000 },
- { "Asia/Novosibirsk" , 0x01D202 },
- { "Asia/Omsk" , 0x01D3ED },
- { "Asia/Oral" , 0x01D5D4 },
- { "Asia/Phnom_Penh" , 0x01D7A4 },
- { "Asia/Pontianak" , 0x01D81C },
- { "Asia/Pyongyang" , 0x01D8DD },
- { "Asia/Qatar" , 0x01D94A },
- { "Asia/Qyzylorda" , 0x01D9B0 },
- { "Asia/Rangoon" , 0x01DB86 },
- { "Asia/Riyadh" , 0x01DBFE },
- { "Asia/Saigon" , 0x01DC53 },
- { "Asia/Sakhalin" , 0x01DCCB },
- { "Asia/Samarkand" , 0x01DEC2 },
- { "Asia/Seoul" , 0x01DFF8 },
- { "Asia/Shanghai" , 0x01E09C },
- { "Asia/Singapore" , 0x01E17C },
- { "Asia/Taipei" , 0x01E233 },
- { "Asia/Tashkent" , 0x01E34B },
- { "Asia/Tbilisi" , 0x01E47C },
- { "Asia/Tehran" , 0x01E636 },
- { "Asia/Tel_Aviv" , 0x01E8A4 },
- { "Asia/Thimbu" , 0x01EBD3 },
- { "Asia/Thimphu" , 0x01EC39 },
- { "Asia/Tokyo" , 0x01EC9F },
- { "Asia/Ujung_Pandang" , 0x01ED28 },
- { "Asia/Ulaanbaatar" , 0x01EDA4 },
- { "Asia/Ulan_Bator" , 0x01EEFF },
- { "Asia/Urumqi" , 0x01F04C },
- { "Asia/Vientiane" , 0x01F113 },
- { "Asia/Vladivostok" , 0x01F18B },
- { "Asia/Yakutsk" , 0x01F377 },
- { "Asia/Yekaterinburg" , 0x01F55C },
- { "Asia/Yerevan" , 0x01F767 },
- { "Atlantic/Azores" , 0x01F967 },
- { "Atlantic/Bermuda" , 0x01FE6A },
- { "Atlantic/Canary" , 0x02014B },
- { "Atlantic/Cape_Verde" , 0x020421 },
- { "Atlantic/Faeroe" , 0x02049A },
- { "Atlantic/Faroe" , 0x02073E },
- { "Atlantic/Jan_Mayen" , 0x0209E2 },
- { "Atlantic/Madeira" , 0x020D14 },
- { "Atlantic/Reykjavik" , 0x02121D },
- { "Atlantic/South_Georgia" , 0x0213D6 },
- { "Atlantic/St_Helena" , 0x0215E8 },
- { "Atlantic/Stanley" , 0x02141A },
- { "Australia/ACT" , 0x02163D },
- { "Australia/Adelaide" , 0x02195A },
- { "Australia/Brisbane" , 0x021C86 },
- { "Australia/Broken_Hill" , 0x021D4D },
- { "Australia/Canberra" , 0x02208B },
- { "Australia/Currie" , 0x0223A8 },
- { "Australia/Darwin" , 0x0226DB },
- { "Australia/Eucla" , 0x022761 },
- { "Australia/Hobart" , 0x022836 },
- { "Australia/LHI" , 0x022B94 },
- { "Australia/Lindeman" , 0x022E2F },
- { "Australia/Lord_Howe" , 0x022F10 },
- { "Australia/Melbourne" , 0x0231BB },
- { "Australia/North" , 0x0234E0 },
- { "Australia/NSW" , 0x023554 },
- { "Australia/Perth" , 0x023871 },
- { "Australia/Queensland" , 0x023949 },
- { "Australia/South" , 0x0239F5 },
- { "Australia/Sydney" , 0x023D12 },
- { "Australia/Tasmania" , 0x02404F },
- { "Australia/Victoria" , 0x024394 },
- { "Australia/West" , 0x0246B1 },
- { "Australia/Yancowinna" , 0x024767 },
- { "Brazil/Acre" , 0x024A89 },
- { "Brazil/DeNoronha" , 0x024B88 },
- { "Brazil/East" , 0x024CA8 },
- { "Brazil/West" , 0x024F85 },
- { "Canada/Atlantic" , 0x02507D },
- { "Canada/Central" , 0x025565 },
- { "Canada/East-Saskatchewan" , 0x025E6F },
- { "Canada/Eastern" , 0x02597F },
- { "Canada/Mountain" , 0x025FF8 },
- { "Canada/Newfoundland" , 0x02636E },
- { "Canada/Pacific" , 0x026899 },
- { "Canada/Saskatchewan" , 0x026CB2 },
- { "Canada/Yukon" , 0x026E3B },
- { "CET" , 0x02713E },
- { "Chile/Continental" , 0x027447 },
- { "Chile/EasterIsland" , 0x0277E2 },
- { "CST6CDT" , 0x027B24 },
- { "Cuba" , 0x027E75 },
- { "EET" , 0x0281E8 },
- { "Egypt" , 0x02849B },
- { "Eire" , 0x02875E },
- { "EST" , 0x028C6F },
- { "EST5EDT" , 0x028CB3 },
- { "Etc/GMT" , 0x029004 },
- { "Etc/GMT+0" , 0x0290D0 },
- { "Etc/GMT+1" , 0x02915A },
- { "Etc/GMT+10" , 0x0291E7 },
- { "Etc/GMT+11" , 0x029275 },
- { "Etc/GMT+12" , 0x029303 },
- { "Etc/GMT+2" , 0x02941E },
- { "Etc/GMT+3" , 0x0294AA },
- { "Etc/GMT+4" , 0x029536 },
- { "Etc/GMT+5" , 0x0295C2 },
- { "Etc/GMT+6" , 0x02964E },
- { "Etc/GMT+7" , 0x0296DA },
- { "Etc/GMT+8" , 0x029766 },
- { "Etc/GMT+9" , 0x0297F2 },
- { "Etc/GMT-0" , 0x02908C },
- { "Etc/GMT-1" , 0x029114 },
- { "Etc/GMT-10" , 0x0291A0 },
- { "Etc/GMT-11" , 0x02922E },
- { "Etc/GMT-12" , 0x0292BC },
- { "Etc/GMT-13" , 0x02934A },
- { "Etc/GMT-14" , 0x029391 },
- { "Etc/GMT-2" , 0x0293D8 },
- { "Etc/GMT-3" , 0x029464 },
- { "Etc/GMT-4" , 0x0294F0 },
- { "Etc/GMT-5" , 0x02957C },
- { "Etc/GMT-6" , 0x029608 },
- { "Etc/GMT-7" , 0x029694 },
- { "Etc/GMT-8" , 0x029720 },
- { "Etc/GMT-9" , 0x0297AC },
- { "Etc/GMT0" , 0x029048 },
- { "Etc/Greenwich" , 0x029838 },
- { "Etc/UCT" , 0x02987C },
- { "Etc/Universal" , 0x0298C0 },
- { "Etc/UTC" , 0x029904 },
- { "Etc/Zulu" , 0x029948 },
- { "Europe/Amsterdam" , 0x02998C },
- { "Europe/Andorra" , 0x029DCA },
- { "Europe/Athens" , 0x02A046 },
- { "Europe/Belfast" , 0x02A389 },
- { "Europe/Belgrade" , 0x02A8C0 },
- { "Europe/Berlin" , 0x02AB89 },
- { "Europe/Bratislava" , 0x02AEDF },
- { "Europe/Brussels" , 0x02B211 },
- { "Europe/Bucharest" , 0x02B648 },
- { "Europe/Budapest" , 0x02B972 },
- { "Europe/Chisinau" , 0x02BCE5 },
- { "Europe/Copenhagen" , 0x02C073 },
- { "Europe/Dublin" , 0x02C37D },
- { "Europe/Gibraltar" , 0x02C88E },
- { "Europe/Guernsey" , 0x02CCE5 },
- { "Europe/Helsinki" , 0x02D21C },
- { "Europe/Isle_of_Man" , 0x02D4D2 },
- { "Europe/Istanbul" , 0x02DA09 },
- { "Europe/Jersey" , 0x02DDF6 },
- { "Europe/Kaliningrad" , 0x02E32D },
- { "Europe/Kiev" , 0x02E593 },
- { "Europe/Lisbon" , 0x02E8AA },
- { "Europe/Ljubljana" , 0x02EDAE },
- { "Europe/London" , 0x02F077 },
- { "Europe/Luxembourg" , 0x02F5AE },
- { "Europe/Madrid" , 0x02FA04 },
- { "Europe/Malta" , 0x02FDCA },
- { "Europe/Mariehamn" , 0x030183 },
- { "Europe/Minsk" , 0x030439 },
- { "Europe/Monaco" , 0x030647 },
- { "Europe/Moscow" , 0x030A82 },
- { "Europe/Nicosia" , 0x030CD3 },
- { "Europe/Oslo" , 0x030FBB },
- { "Europe/Paris" , 0x0312ED },
- { "Europe/Podgorica" , 0x031733 },
- { "Europe/Prague" , 0x0319FC },
- { "Europe/Riga" , 0x031D2E },
- { "Europe/Rome" , 0x032073 },
- { "Europe/Samara" , 0x032436 },
- { "Europe/San_Marino" , 0x032669 },
- { "Europe/Sarajevo" , 0x032A2C },
- { "Europe/Simferopol" , 0x032CF5 },
- { "Europe/Skopje" , 0x033020 },
- { "Europe/Sofia" , 0x0332E9 },
- { "Europe/Stockholm" , 0x0335F1 },
- { "Europe/Tallinn" , 0x0338A0 },
- { "Europe/Tirane" , 0x033BDA },
- { "Europe/Tiraspol" , 0x033EE0 },
- { "Europe/Uzhgorod" , 0x03426E },
- { "Europe/Vaduz" , 0x034585 },
- { "Europe/Vatican" , 0x034818 },
- { "Europe/Vienna" , 0x034BDB },
- { "Europe/Vilnius" , 0x034F08 },
- { "Europe/Volgograd" , 0x035247 },
- { "Europe/Warsaw" , 0x035447 },
- { "Europe/Zagreb" , 0x035828 },
- { "Europe/Zaporozhye" , 0x035AF1 },
- { "Europe/Zurich" , 0x035E32 },
- { "Factory" , 0x0360E1 },
- { "GB" , 0x036152 },
- { "GB-Eire" , 0x036689 },
- { "GMT" , 0x036BC0 },
- { "GMT+0" , 0x036C8C },
- { "GMT-0" , 0x036C48 },
- { "GMT0" , 0x036C04 },
- { "Greenwich" , 0x036CD0 },
- { "Hongkong" , 0x036D14 },
- { "HST" , 0x036ED6 },
- { "Iceland" , 0x036F1A },
- { "Indian/Antananarivo" , 0x0370D3 },
- { "Indian/Chagos" , 0x037147 },
- { "Indian/Christmas" , 0x0371A9 },
- { "Indian/Cocos" , 0x0371ED },
- { "Indian/Comoro" , 0x037231 },
- { "Indian/Kerguelen" , 0x037286 },
- { "Indian/Mahe" , 0x0372DB },
- { "Indian/Maldives" , 0x037330 },
- { "Indian/Mauritius" , 0x037385 },
- { "Indian/Mayotte" , 0x0373FB },
- { "Indian/Reunion" , 0x037450 },
- { "Iran" , 0x0374A5 },
- { "Israel" , 0x037713 },
- { "Jamaica" , 0x037A42 },
- { "Japan" , 0x037B07 },
- { "Kwajalein" , 0x037B90 },
- { "Libya" , 0x037BF3 },
- { "MET" , 0x037CED },
- { "Mexico/BajaNorte" , 0x037FF6 },
- { "Mexico/BajaSur" , 0x03835F },
- { "Mexico/General" , 0x0385A4 },
- { "MST" , 0x038802 },
- { "MST7MDT" , 0x038846 },
- { "Navajo" , 0x038B97 },
- { "NZ" , 0x038F10 },
- { "NZ-CHAT" , 0x03928E },
- { "Pacific/Apia" , 0x039576 },
- { "Pacific/Auckland" , 0x039613 },
- { "Pacific/Chatham" , 0x03999F },
- { "Pacific/Chuuk" , 0x039C96 },
- { "Pacific/Easter" , 0x039CEF },
- { "Pacific/Efate" , 0x03A04D },
- { "Pacific/Enderbury" , 0x03A113 },
- { "Pacific/Fakaofo" , 0x03A181 },
- { "Pacific/Fiji" , 0x03A1D2 },
- { "Pacific/Funafuti" , 0x03A266 },
- { "Pacific/Galapagos" , 0x03A2AA },
- { "Pacific/Gambier" , 0x03A322 },
- { "Pacific/Guadalcanal" , 0x03A387 },
- { "Pacific/Guam" , 0x03A3DC },
- { "Pacific/Honolulu" , 0x03A432 },
- { "Pacific/Johnston" , 0x03A4A9 },
- { "Pacific/Kiritimati" , 0x03A4FB },
- { "Pacific/Kosrae" , 0x03A566 },
- { "Pacific/Kwajalein" , 0x03A5C3 },
- { "Pacific/Majuro" , 0x03A62F },
- { "Pacific/Marquesas" , 0x03A68E },
- { "Pacific/Midway" , 0x03A6F5 },
- { "Pacific/Nauru" , 0x03A77F },
- { "Pacific/Niue" , 0x03A7F7 },
- { "Pacific/Norfolk" , 0x03A855 },
- { "Pacific/Noumea" , 0x03A8AA },
- { "Pacific/Pago_Pago" , 0x03A93A },
- { "Pacific/Palau" , 0x03A9C3 },
- { "Pacific/Pitcairn" , 0x03AA07 },
- { "Pacific/Pohnpei" , 0x03AA5C },
- { "Pacific/Ponape" , 0x03AAB1 },
- { "Pacific/Port_Moresby" , 0x03AAF6 },
- { "Pacific/Rarotonga" , 0x03AB3A },
- { "Pacific/Saipan" , 0x03AC16 },
- { "Pacific/Samoa" , 0x03AC79 },
- { "Pacific/Tahiti" , 0x03AD02 },
- { "Pacific/Tarawa" , 0x03AD67 },
- { "Pacific/Tongatapu" , 0x03ADBB },
- { "Pacific/Truk" , 0x03AE47 },
- { "Pacific/Wake" , 0x03AE8C },
- { "Pacific/Wallis" , 0x03AEDC },
- { "Pacific/Yap" , 0x03AF20 },
- { "Poland" , 0x03AF65 },
- { "Portugal" , 0x03B346 },
- { "PRC" , 0x03B842 },
- { "PST8PDT" , 0x03B8F3 },
- { "ROC" , 0x03BC44 },
- { "ROK" , 0x03BD5C },
- { "Singapore" , 0x03BE00 },
- { "Turkey" , 0x03BEB7 },
- { "UCT" , 0x03C2A4 },
- { "Universal" , 0x03C2E8 },
- { "US/Alaska" , 0x03C32C },
- { "US/Aleutian" , 0x03C695 },
- { "US/Arizona" , 0x03C9FB },
- { "US/Central" , 0x03CA89 },
- { "US/East-Indiana" , 0x03D493 },
- { "US/Eastern" , 0x03CF94 },
- { "US/Hawaii" , 0x03D6FD },
- { "US/Indiana-Starke" , 0x03D76E },
- { "US/Michigan" , 0x03DADF },
- { "US/Mountain" , 0x03DE16 },
- { "US/Pacific" , 0x03E18F },
- { "US/Pacific-New" , 0x03E594 },
- { "US/Samoa" , 0x03E999 },
- { "UTC" , 0x03EA22 },
- { "W-SU" , 0x03ED19 },
- { "WET" , 0x03EA66 },
- { "Zulu" , 0x03EF53 },
+ { "Africa/Ceuta" , 0x000A76 },
+ { "Africa/Conakry" , 0x000D7D },
+ { "Africa/Dakar" , 0x000DE8 },
+ { "Africa/Dar_es_Salaam" , 0x000E4E },
+ { "Africa/Djibouti" , 0x000EBB },
+ { "Africa/Douala" , 0x000F10 },
+ { "Africa/El_Aaiun" , 0x000F65 },
+ { "Africa/Freetown" , 0x000FCB },
+ { "Africa/Gaborone" , 0x0010DA },
+ { "Africa/Harare" , 0x001135 },
+ { "Africa/Johannesburg" , 0x00118A },
+ { "Africa/Juba" , 0x0011F8 },
+ { "Africa/Kampala" , 0x00130B },
+ { "Africa/Khartoum" , 0x00138A },
+ { "Africa/Kigali" , 0x00149D },
+ { "Africa/Kinshasa" , 0x0014F2 },
+ { "Africa/Lagos" , 0x00154D },
+ { "Africa/Libreville" , 0x0015A2 },
+ { "Africa/Lome" , 0x0015F7 },
+ { "Africa/Luanda" , 0x00163B },
+ { "Africa/Lubumbashi" , 0x001690 },
+ { "Africa/Lusaka" , 0x0016EB },
+ { "Africa/Malabo" , 0x001740 },
+ { "Africa/Maputo" , 0x0017A6 },
+ { "Africa/Maseru" , 0x0017FB },
+ { "Africa/Mbabane" , 0x001863 },
+ { "Africa/Mogadishu" , 0x0018B9 },
+ { "Africa/Monrovia" , 0x001914 },
+ { "Africa/Nairobi" , 0x00197A },
+ { "Africa/Ndjamena" , 0x0019F9 },
+ { "Africa/Niamey" , 0x001A65 },
+ { "Africa/Nouakchott" , 0x001AD8 },
+ { "Africa/Ouagadougou" , 0x001B43 },
+ { "Africa/Porto-Novo" , 0x001B98 },
+ { "Africa/Sao_Tome" , 0x001BFE },
+ { "Africa/Timbuktu" , 0x001C53 },
+ { "Africa/Tripoli" , 0x001CBE },
+ { "Africa/Tunis" , 0x001EB7 },
+ { "Africa/Windhoek" , 0x001FC9 },
+ { "America/Adak" , 0x002210 },
+ { "America/Anchorage" , 0x002586 },
+ { "America/Anguilla" , 0x0028FA },
+ { "America/Antigua" , 0x00294F },
+ { "America/Araguaina" , 0x0029B5 },
+ { "America/Argentina/Buenos_Aires" , 0x002C0F },
+ { "America/Argentina/Catamarca" , 0x002DBD },
+ { "America/Argentina/ComodRivadavia" , 0x002F7E },
+ { "America/Argentina/Cordoba" , 0x003124 },
+ { "America/Argentina/Jujuy" , 0x0032F9 },
+ { "America/Argentina/La_Rioja" , 0x0034AD },
+ { "America/Argentina/Mendoza" , 0x003665 },
+ { "America/Argentina/Rio_Gallegos" , 0x003825 },
+ { "America/Argentina/Salta" , 0x0039DA },
+ { "America/Argentina/San_Juan" , 0x003B86 },
+ { "America/Argentina/San_Luis" , 0x003D3E },
+ { "America/Argentina/Tucuman" , 0x003F04 },
+ { "America/Argentina/Ushuaia" , 0x0040C0 },
+ { "America/Aruba" , 0x00427B },
+ { "America/Asuncion" , 0x0042E1 },
+ { "America/Atikokan" , 0x0045C6 },
+ { "America/Atka" , 0x00469C },
+ { "America/Bahia" , 0x004A02 },
+ { "America/Bahia_Banderas" , 0x004B95 },
+ { "America/Barbados" , 0x004E0E },
+ { "America/Belem" , 0x004EA8 },
+ { "America/Belize" , 0x004FA3 },
+ { "America/Blanc-Sablon" , 0x00511F },
+ { "America/Boa_Vista" , 0x0051D3 },
+ { "America/Bogota" , 0x0052DC },
+ { "America/Boise" , 0x005348 },
+ { "America/Buenos_Aires" , 0x0056DF },
+ { "America/Cambridge_Bay" , 0x005878 },
+ { "America/Campo_Grande" , 0x005BA0 },
+ { "America/Cancun" , 0x005E8F },
+ { "America/Caracas" , 0x0060D1 },
+ { "America/Catamarca" , 0x006138 },
+ { "America/Cayenne" , 0x0062DE },
+ { "America/Cayman" , 0x006340 },
+ { "America/Chicago" , 0x006395 },
+ { "America/Chihuahua" , 0x0068AC },
+ { "America/Coral_Harbour" , 0x006B17 },
+ { "America/Cordoba" , 0x006BA9 },
+ { "America/Costa_Rica" , 0x006D4F },
+ { "America/Creston" , 0x006DD9 },
+ { "America/Cuiaba" , 0x006E65 },
+ { "America/Curacao" , 0x007143 },
+ { "America/Danmarkshavn" , 0x0071A9 },
+ { "America/Dawson" , 0x0072ED },
+ { "America/Dawson_Creek" , 0x00760A },
+ { "America/Denver" , 0x0077E4 },
+ { "America/Detroit" , 0x007B6A },
+ { "America/Dominica" , 0x007EC9 },
+ { "America/Edmonton" , 0x007F1E },
+ { "America/Eirunepe" , 0x0082D6 },
+ { "America/El_Salvador" , 0x0083E9 },
+ { "America/Ensenada" , 0x00845E },
+ { "America/Fort_Wayne" , 0x008905 },
+ { "America/Fortaleza" , 0x0087C7 },
+ { "America/Glace_Bay" , 0x008B6F },
+ { "America/Godthab" , 0x008EE6 },
+ { "America/Goose_Bay" , 0x0091AA },
+ { "America/Grand_Turk" , 0x009667 },
+ { "America/Grenada" , 0x009916 },
+ { "America/Guadeloupe" , 0x00996B },
+ { "America/Guatemala" , 0x0099C0 },
+ { "America/Guayaquil" , 0x009A49 },
+ { "America/Guyana" , 0x009AA6 },
+ { "America/Halifax" , 0x009B27 },
+ { "America/Havana" , 0x00A03D },
+ { "America/Hermosillo" , 0x00A3B0 },
+ { "America/Indiana/Indianapolis" , 0x00A48E },
+ { "America/Indiana/Knox" , 0x00A71F },
+ { "America/Indiana/Marengo" , 0x00AAB6 },
+ { "America/Indiana/Petersburg" , 0x00AD5C },
+ { "America/Indiana/Tell_City" , 0x00B2A9 },
+ { "America/Indiana/Vevay" , 0x00B542 },
+ { "America/Indiana/Vincennes" , 0x00B77D },
+ { "America/Indiana/Winamac" , 0x00BA31 },
+ { "America/Indianapolis" , 0x00B03F },
+ { "America/Inuvik" , 0x00BCEA },
+ { "America/Iqaluit" , 0x00BFE1 },
+ { "America/Jamaica" , 0x00C303 },
+ { "America/Jujuy" , 0x00C3C8 },
+ { "America/Juneau" , 0x00C572 },
+ { "America/Kentucky/Louisville" , 0x00C8F0 },
+ { "America/Kentucky/Monticello" , 0x00CD0E },
+ { "America/Knox_IN" , 0x00D093 },
+ { "America/Kralendijk" , 0x00D404 },
+ { "America/La_Paz" , 0x00D46A },
+ { "America/Lima" , 0x00D4D1 },
+ { "America/Los_Angeles" , 0x00D579 },
+ { "America/Louisville" , 0x00D98A },
+ { "America/Lower_Princes" , 0x00DD7F },
+ { "America/Maceio" , 0x00DDE5 },
+ { "America/Managua" , 0x00DF1F },
+ { "America/Manaus" , 0x00DFD2 },
+ { "America/Marigot" , 0x00E0D4 },
+ { "America/Martinique" , 0x00E129 },
+ { "America/Matamoros" , 0x00E195 },
+ { "America/Mazatlan" , 0x00E3EE },
+ { "America/Mendoza" , 0x00E65B },
+ { "America/Menominee" , 0x00E80F },
+ { "America/Merida" , 0x00EB90 },
+ { "America/Metlakatla" , 0x00EDCB },
+ { "America/Mexico_City" , 0x00EF05 },
+ { "America/Miquelon" , 0x00F180 },
+ { "America/Moncton" , 0x00F3F2 },
+ { "America/Monterrey" , 0x00F889 },
+ { "America/Montevideo" , 0x00FAEC },
+ { "America/Montreal" , 0x00FDFE },
+ { "America/Montserrat" , 0x010314 },
+ { "America/Nassau" , 0x010369 },
+ { "America/New_York" , 0x0106AE },
+ { "America/Nipigon" , 0x010BB9 },
+ { "America/Nome" , 0x010F0A },
+ { "America/Noronha" , 0x011288 },
+ { "America/North_Dakota/Beulah" , 0x0113B8 },
+ { "America/North_Dakota/Center" , 0x01174C },
+ { "America/North_Dakota/New_Salem" , 0x011AE0 },
+ { "America/Ojinaga" , 0x011E89 },
+ { "America/Panama" , 0x0120EA },
+ { "America/Pangnirtung" , 0x01213F },
+ { "America/Paramaribo" , 0x012475 },
+ { "America/Phoenix" , 0x012507 },
+ { "America/Port-au-Prince" , 0x0125B5 },
+ { "America/Port_of_Spain" , 0x0127DA },
+ { "America/Porto_Acre" , 0x0126DB },
+ { "America/Porto_Velho" , 0x01282F },
+ { "America/Puerto_Rico" , 0x012925 },
+ { "America/Rainy_River" , 0x012990 },
+ { "America/Rankin_Inlet" , 0x012CC8 },
+ { "America/Recife" , 0x012FAE },
+ { "America/Regina" , 0x0130D8 },
+ { "America/Resolute" , 0x013296 },
+ { "America/Rio_Branco" , 0x013587 },
+ { "America/Rosario" , 0x01368A },
+ { "America/Santa_Isabel" , 0x013830 },
+ { "America/Santarem" , 0x013BD3 },
+ { "America/Santiago" , 0x013CD8 },
+ { "America/Santo_Domingo" , 0x014081 },
+ { "America/Sao_Paulo" , 0x014147 },
+ { "America/Scoresbysund" , 0x014456 },
+ { "America/Shiprock" , 0x014744 },
+ { "America/Sitka" , 0x014AD3 },
+ { "America/St_Barthelemy" , 0x014E5B },
+ { "America/St_Johns" , 0x014EB0 },
+ { "America/St_Kitts" , 0x015403 },
+ { "America/St_Lucia" , 0x015458 },
+ { "America/St_Thomas" , 0x0154AD },
+ { "America/St_Vincent" , 0x015502 },
+ { "America/Swift_Current" , 0x015557 },
+ { "America/Tegucigalpa" , 0x015678 },
+ { "America/Thule" , 0x0156F7 },
+ { "America/Thunder_Bay" , 0x01593E },
+ { "America/Tijuana" , 0x015C87 },
+ { "America/Toronto" , 0x016020 },
+ { "America/Tortola" , 0x016537 },
+ { "America/Vancouver" , 0x01658C },
+ { "America/Virgin" , 0x0169C9 },
+ { "America/Whitehorse" , 0x016A1E },
+ { "America/Winnipeg" , 0x016D3B },
+ { "America/Yakutat" , 0x01717B },
+ { "America/Yellowknife" , 0x0174E6 },
+ { "Antarctica/Casey" , 0x0177F6 },
+ { "Antarctica/Davis" , 0x017893 },
+ { "Antarctica/DumontDUrville" , 0x017934 },
+ { "Antarctica/Macquarie" , 0x0179C6 },
+ { "Antarctica/Mawson" , 0x017C40 },
+ { "Antarctica/McMurdo" , 0x017CBC },
+ { "Antarctica/Palmer" , 0x017FBE },
+ { "Antarctica/Rothera" , 0x0182DA },
+ { "Antarctica/South_Pole" , 0x018350 },
+ { "Antarctica/Syowa" , 0x018658 },
+ { "Antarctica/Vostok" , 0x0186C6 },
+ { "Arctic/Longyearbyen" , 0x018737 },
+ { "Asia/Aden" , 0x018A69 },
+ { "Asia/Almaty" , 0x018ABE },
+ { "Asia/Amman" , 0x018C3D },
+ { "Asia/Anadyr" , 0x018EF3 },
+ { "Asia/Aqtau" , 0x0190D8 },
+ { "Asia/Aqtobe" , 0x0192D7 },
+ { "Asia/Ashgabat" , 0x01948F },
+ { "Asia/Ashkhabad" , 0x0195AC },
+ { "Asia/Baghdad" , 0x0196C9 },
+ { "Asia/Bahrain" , 0x01983E },
+ { "Asia/Baku" , 0x0198A4 },
+ { "Asia/Bangkok" , 0x019B8C },
+ { "Asia/Beirut" , 0x019BE1 },
+ { "Asia/Bishkek" , 0x019EEE },
+ { "Asia/Brunei" , 0x01A09A },
+ { "Asia/Calcutta" , 0x01A0FC },
+ { "Asia/Choibalsan" , 0x01A175 },
+ { "Asia/Chongqing" , 0x01A2EE },
+ { "Asia/Chungking" , 0x01A3DD },
+ { "Asia/Colombo" , 0x01A48C },
+ { "Asia/Dacca" , 0x01A528 },
+ { "Asia/Damascus" , 0x01A5CE },
+ { "Asia/Dhaka" , 0x01A91E },
+ { "Asia/Dili" , 0x01A9C4 },
+ { "Asia/Dubai" , 0x01AA4D },
+ { "Asia/Dushanbe" , 0x01AAA2 },
+ { "Asia/Gaza" , 0x01ABA5 },
+ { "Asia/Harbin" , 0x01ADFE },
+ { "Asia/Hebron" , 0x01AEE5 },
+ { "Asia/Ho_Chi_Minh" , 0x01B147 },
+ { "Asia/Hong_Kong" , 0x01B1BF },
+ { "Asia/Hovd" , 0x01B381 },
+ { "Asia/Irkutsk" , 0x01B4F9 },
+ { "Asia/Istanbul" , 0x01B6DF },
+ { "Asia/Jakarta" , 0x01BACC },
+ { "Asia/Jayapura" , 0x01BB76 },
+ { "Asia/Jerusalem" , 0x01BC12 },
+ { "Asia/Kabul" , 0x01BF41 },
+ { "Asia/Kamchatka" , 0x01BF92 },
+ { "Asia/Karachi" , 0x01C16E },
+ { "Asia/Kashgar" , 0x01C223 },
+ { "Asia/Kathmandu" , 0x01C2F4 },
+ { "Asia/Katmandu" , 0x01C35A },
+ { "Asia/Kolkata" , 0x01C3C0 },
+ { "Asia/Krasnoyarsk" , 0x01C439 },
+ { "Asia/Kuala_Lumpur" , 0x01C621 },
+ { "Asia/Kuching" , 0x01C6DE },
+ { "Asia/Kuwait" , 0x01C7CC },
+ { "Asia/Macao" , 0x01C821 },
+ { "Asia/Macau" , 0x01C95C },
+ { "Asia/Magadan" , 0x01CA97 },
+ { "Asia/Makassar" , 0x01CC79 },
+ { "Asia/Manila" , 0x01CD3D },
+ { "Asia/Muscat" , 0x01CDC2 },
+ { "Asia/Nicosia" , 0x01CE17 },
+ { "Asia/Novokuznetsk" , 0x01D0FF },
+ { "Asia/Novosibirsk" , 0x01D301 },
+ { "Asia/Omsk" , 0x01D4EC },
+ { "Asia/Oral" , 0x01D6D3 },
+ { "Asia/Phnom_Penh" , 0x01D8A3 },
+ { "Asia/Pontianak" , 0x01D91B },
+ { "Asia/Pyongyang" , 0x01D9DC },
+ { "Asia/Qatar" , 0x01DA49 },
+ { "Asia/Qyzylorda" , 0x01DAAF },
+ { "Asia/Rangoon" , 0x01DC85 },
+ { "Asia/Riyadh" , 0x01DCFD },
+ { "Asia/Saigon" , 0x01DD52 },
+ { "Asia/Sakhalin" , 0x01DDCA },
+ { "Asia/Samarkand" , 0x01DFC1 },
+ { "Asia/Seoul" , 0x01E0F7 },
+ { "Asia/Shanghai" , 0x01E19B },
+ { "Asia/Singapore" , 0x01E27B },
+ { "Asia/Taipei" , 0x01E332 },
+ { "Asia/Tashkent" , 0x01E44A },
+ { "Asia/Tbilisi" , 0x01E57B },
+ { "Asia/Tehran" , 0x01E735 },
+ { "Asia/Tel_Aviv" , 0x01E9A3 },
+ { "Asia/Thimbu" , 0x01ECD2 },
+ { "Asia/Thimphu" , 0x01ED38 },
+ { "Asia/Tokyo" , 0x01ED9E },
+ { "Asia/Ujung_Pandang" , 0x01EE27 },
+ { "Asia/Ulaanbaatar" , 0x01EEA3 },
+ { "Asia/Ulan_Bator" , 0x01EFFE },
+ { "Asia/Urumqi" , 0x01F14B },
+ { "Asia/Vientiane" , 0x01F212 },
+ { "Asia/Vladivostok" , 0x01F28A },
+ { "Asia/Yakutsk" , 0x01F476 },
+ { "Asia/Yekaterinburg" , 0x01F65B },
+ { "Asia/Yerevan" , 0x01F866 },
+ { "Atlantic/Azores" , 0x01FA66 },
+ { "Atlantic/Bermuda" , 0x01FF69 },
+ { "Atlantic/Canary" , 0x02024A },
+ { "Atlantic/Cape_Verde" , 0x020520 },
+ { "Atlantic/Faeroe" , 0x020599 },
+ { "Atlantic/Faroe" , 0x02083D },
+ { "Atlantic/Jan_Mayen" , 0x020AE1 },
+ { "Atlantic/Madeira" , 0x020E13 },
+ { "Atlantic/Reykjavik" , 0x02131C },
+ { "Atlantic/South_Georgia" , 0x0214D5 },
+ { "Atlantic/St_Helena" , 0x0216E7 },
+ { "Atlantic/Stanley" , 0x021519 },
+ { "Australia/ACT" , 0x02173C },
+ { "Australia/Adelaide" , 0x021A59 },
+ { "Australia/Brisbane" , 0x021D85 },
+ { "Australia/Broken_Hill" , 0x021E4C },
+ { "Australia/Canberra" , 0x02218A },
+ { "Australia/Currie" , 0x0224A7 },
+ { "Australia/Darwin" , 0x0227DA },
+ { "Australia/Eucla" , 0x022860 },
+ { "Australia/Hobart" , 0x022935 },
+ { "Australia/LHI" , 0x022C93 },
+ { "Australia/Lindeman" , 0x022F2E },
+ { "Australia/Lord_Howe" , 0x02300F },
+ { "Australia/Melbourne" , 0x0232BA },
+ { "Australia/North" , 0x0235DF },
+ { "Australia/NSW" , 0x023653 },
+ { "Australia/Perth" , 0x023970 },
+ { "Australia/Queensland" , 0x023A48 },
+ { "Australia/South" , 0x023AF4 },
+ { "Australia/Sydney" , 0x023E11 },
+ { "Australia/Tasmania" , 0x02414E },
+ { "Australia/Victoria" , 0x024493 },
+ { "Australia/West" , 0x0247B0 },
+ { "Australia/Yancowinna" , 0x024866 },
+ { "Brazil/Acre" , 0x024B88 },
+ { "Brazil/DeNoronha" , 0x024C87 },
+ { "Brazil/East" , 0x024DA7 },
+ { "Brazil/West" , 0x025084 },
+ { "Canada/Atlantic" , 0x02517C },
+ { "Canada/Central" , 0x025664 },
+ { "Canada/East-Saskatchewan" , 0x025F6E },
+ { "Canada/Eastern" , 0x025A7E },
+ { "Canada/Mountain" , 0x0260F7 },
+ { "Canada/Newfoundland" , 0x02646D },
+ { "Canada/Pacific" , 0x026998 },
+ { "Canada/Saskatchewan" , 0x026DB1 },
+ { "Canada/Yukon" , 0x026F3A },
+ { "CET" , 0x02723D },
+ { "Chile/Continental" , 0x027546 },
+ { "Chile/EasterIsland" , 0x0278E1 },
+ { "CST6CDT" , 0x027C23 },
+ { "Cuba" , 0x027F74 },
+ { "EET" , 0x0282E7 },
+ { "Egypt" , 0x02859A },
+ { "Eire" , 0x02885D },
+ { "EST" , 0x028D6E },
+ { "EST5EDT" , 0x028DB2 },
+ { "Etc/GMT" , 0x029103 },
+ { "Etc/GMT+0" , 0x0291CF },
+ { "Etc/GMT+1" , 0x029259 },
+ { "Etc/GMT+10" , 0x0292E6 },
+ { "Etc/GMT+11" , 0x029374 },
+ { "Etc/GMT+12" , 0x029402 },
+ { "Etc/GMT+2" , 0x02951D },
+ { "Etc/GMT+3" , 0x0295A9 },
+ { "Etc/GMT+4" , 0x029635 },
+ { "Etc/GMT+5" , 0x0296C1 },
+ { "Etc/GMT+6" , 0x02974D },
+ { "Etc/GMT+7" , 0x0297D9 },
+ { "Etc/GMT+8" , 0x029865 },
+ { "Etc/GMT+9" , 0x0298F1 },
+ { "Etc/GMT-0" , 0x02918B },
+ { "Etc/GMT-1" , 0x029213 },
+ { "Etc/GMT-10" , 0x02929F },
+ { "Etc/GMT-11" , 0x02932D },
+ { "Etc/GMT-12" , 0x0293BB },
+ { "Etc/GMT-13" , 0x029449 },
+ { "Etc/GMT-14" , 0x029490 },
+ { "Etc/GMT-2" , 0x0294D7 },
+ { "Etc/GMT-3" , 0x029563 },
+ { "Etc/GMT-4" , 0x0295EF },
+ { "Etc/GMT-5" , 0x02967B },
+ { "Etc/GMT-6" , 0x029707 },
+ { "Etc/GMT-7" , 0x029793 },
+ { "Etc/GMT-8" , 0x02981F },
+ { "Etc/GMT-9" , 0x0298AB },
+ { "Etc/GMT0" , 0x029147 },
+ { "Etc/Greenwich" , 0x029937 },
+ { "Etc/UCT" , 0x02997B },
+ { "Etc/Universal" , 0x0299BF },
+ { "Etc/UTC" , 0x029A03 },
+ { "Etc/Zulu" , 0x029A47 },
+ { "Europe/Amsterdam" , 0x029A8B },
+ { "Europe/Andorra" , 0x029EC9 },
+ { "Europe/Athens" , 0x02A145 },
+ { "Europe/Belfast" , 0x02A488 },
+ { "Europe/Belgrade" , 0x02A9BF },
+ { "Europe/Berlin" , 0x02AC88 },
+ { "Europe/Bratislava" , 0x02AFDE },
+ { "Europe/Brussels" , 0x02B310 },
+ { "Europe/Bucharest" , 0x02B747 },
+ { "Europe/Budapest" , 0x02BA71 },
+ { "Europe/Chisinau" , 0x02BDE4 },
+ { "Europe/Copenhagen" , 0x02C172 },
+ { "Europe/Dublin" , 0x02C47C },
+ { "Europe/Gibraltar" , 0x02C98D },
+ { "Europe/Guernsey" , 0x02CDE4 },
+ { "Europe/Helsinki" , 0x02D31B },
+ { "Europe/Isle_of_Man" , 0x02D5D1 },
+ { "Europe/Istanbul" , 0x02DB08 },
+ { "Europe/Jersey" , 0x02DEF5 },
+ { "Europe/Kaliningrad" , 0x02E42C },
+ { "Europe/Kiev" , 0x02E692 },
+ { "Europe/Lisbon" , 0x02E9A9 },
+ { "Europe/Ljubljana" , 0x02EEAD },
+ { "Europe/London" , 0x02F176 },
+ { "Europe/Luxembourg" , 0x02F6AD },
+ { "Europe/Madrid" , 0x02FB03 },
+ { "Europe/Malta" , 0x02FEC9 },
+ { "Europe/Mariehamn" , 0x030282 },
+ { "Europe/Minsk" , 0x030538 },
+ { "Europe/Monaco" , 0x030746 },
+ { "Europe/Moscow" , 0x030B81 },
+ { "Europe/Nicosia" , 0x030DD2 },
+ { "Europe/Oslo" , 0x0310BA },
+ { "Europe/Paris" , 0x0313EC },
+ { "Europe/Podgorica" , 0x031832 },
+ { "Europe/Prague" , 0x031AFB },
+ { "Europe/Riga" , 0x031E2D },
+ { "Europe/Rome" , 0x032172 },
+ { "Europe/Samara" , 0x032535 },
+ { "Europe/San_Marino" , 0x032768 },
+ { "Europe/Sarajevo" , 0x032B2B },
+ { "Europe/Simferopol" , 0x032DF4 },
+ { "Europe/Skopje" , 0x03311F },
+ { "Europe/Sofia" , 0x0333E8 },
+ { "Europe/Stockholm" , 0x0336F0 },
+ { "Europe/Tallinn" , 0x03399F },
+ { "Europe/Tirane" , 0x033CD9 },
+ { "Europe/Tiraspol" , 0x033FDF },
+ { "Europe/Uzhgorod" , 0x03436D },
+ { "Europe/Vaduz" , 0x034684 },
+ { "Europe/Vatican" , 0x034917 },
+ { "Europe/Vienna" , 0x034CDA },
+ { "Europe/Vilnius" , 0x035007 },
+ { "Europe/Volgograd" , 0x035346 },
+ { "Europe/Warsaw" , 0x035546 },
+ { "Europe/Zagreb" , 0x035927 },
+ { "Europe/Zaporozhye" , 0x035BF0 },
+ { "Europe/Zurich" , 0x035F31 },
+ { "Factory" , 0x0361E0 },
+ { "GB" , 0x036251 },
+ { "GB-Eire" , 0x036788 },
+ { "GMT" , 0x036CBF },
+ { "GMT+0" , 0x036D8B },
+ { "GMT-0" , 0x036D47 },
+ { "GMT0" , 0x036D03 },
+ { "Greenwich" , 0x036DCF },
+ { "Hongkong" , 0x036E13 },
+ { "HST" , 0x036FD5 },
+ { "Iceland" , 0x037019 },
+ { "Indian/Antananarivo" , 0x0371D2 },
+ { "Indian/Chagos" , 0x037246 },
+ { "Indian/Christmas" , 0x0372A8 },
+ { "Indian/Cocos" , 0x0372EC },
+ { "Indian/Comoro" , 0x037330 },
+ { "Indian/Kerguelen" , 0x037385 },
+ { "Indian/Mahe" , 0x0373DA },
+ { "Indian/Maldives" , 0x03742F },
+ { "Indian/Mauritius" , 0x037484 },
+ { "Indian/Mayotte" , 0x0374FA },
+ { "Indian/Reunion" , 0x03754F },
+ { "Iran" , 0x0375A4 },
+ { "Israel" , 0x037812 },
+ { "Jamaica" , 0x037B41 },
+ { "Japan" , 0x037C06 },
+ { "Kwajalein" , 0x037C8F },
+ { "Libya" , 0x037CF2 },
+ { "MET" , 0x037EEB },
+ { "Mexico/BajaNorte" , 0x0381F4 },
+ { "Mexico/BajaSur" , 0x03855D },
+ { "Mexico/General" , 0x0387A2 },
+ { "MST" , 0x038A00 },
+ { "MST7MDT" , 0x038A44 },
+ { "Navajo" , 0x038D95 },
+ { "NZ" , 0x03910E },
+ { "NZ-CHAT" , 0x03948C },
+ { "Pacific/Apia" , 0x039774 },
+ { "Pacific/Auckland" , 0x039910 },
+ { "Pacific/Chatham" , 0x039C9C },
+ { "Pacific/Chuuk" , 0x039F93 },
+ { "Pacific/Easter" , 0x039FEC },
+ { "Pacific/Efate" , 0x03A34A },
+ { "Pacific/Enderbury" , 0x03A410 },
+ { "Pacific/Fakaofo" , 0x03A47E },
+ { "Pacific/Fiji" , 0x03A4CF },
+ { "Pacific/Funafuti" , 0x03A662 },
+ { "Pacific/Galapagos" , 0x03A6A6 },
+ { "Pacific/Gambier" , 0x03A71E },
+ { "Pacific/Guadalcanal" , 0x03A783 },
+ { "Pacific/Guam" , 0x03A7D8 },
+ { "Pacific/Honolulu" , 0x03A82E },
+ { "Pacific/Johnston" , 0x03A8A5 },
+ { "Pacific/Kiritimati" , 0x03A8F7 },
+ { "Pacific/Kosrae" , 0x03A962 },
+ { "Pacific/Kwajalein" , 0x03A9BF },
+ { "Pacific/Majuro" , 0x03AA2B },
+ { "Pacific/Marquesas" , 0x03AA8A },
+ { "Pacific/Midway" , 0x03AAF1 },
+ { "Pacific/Nauru" , 0x03AB7B },
+ { "Pacific/Niue" , 0x03ABF3 },
+ { "Pacific/Norfolk" , 0x03AC51 },
+ { "Pacific/Noumea" , 0x03ACA6 },
+ { "Pacific/Pago_Pago" , 0x03AD36 },
+ { "Pacific/Palau" , 0x03ADBF },
+ { "Pacific/Pitcairn" , 0x03AE03 },
+ { "Pacific/Pohnpei" , 0x03AE58 },
+ { "Pacific/Ponape" , 0x03AEAD },
+ { "Pacific/Port_Moresby" , 0x03AEF2 },
+ { "Pacific/Rarotonga" , 0x03AF36 },
+ { "Pacific/Saipan" , 0x03B012 },
+ { "Pacific/Samoa" , 0x03B075 },
+ { "Pacific/Tahiti" , 0x03B0FE },
+ { "Pacific/Tarawa" , 0x03B163 },
+ { "Pacific/Tongatapu" , 0x03B1B7 },
+ { "Pacific/Truk" , 0x03B243 },
+ { "Pacific/Wake" , 0x03B288 },
+ { "Pacific/Wallis" , 0x03B2D8 },
+ { "Pacific/Yap" , 0x03B31C },
+ { "Poland" , 0x03B361 },
+ { "Portugal" , 0x03B742 },
+ { "PRC" , 0x03BC3E },
+ { "PST8PDT" , 0x03BCEF },
+ { "ROC" , 0x03C040 },
+ { "ROK" , 0x03C158 },
+ { "Singapore" , 0x03C1FC },
+ { "Turkey" , 0x03C2B3 },
+ { "UCT" , 0x03C6A0 },
+ { "Universal" , 0x03C6E4 },
+ { "US/Alaska" , 0x03C728 },
+ { "US/Aleutian" , 0x03CA91 },
+ { "US/Arizona" , 0x03CDF7 },
+ { "US/Central" , 0x03CE85 },
+ { "US/East-Indiana" , 0x03D88F },
+ { "US/Eastern" , 0x03D390 },
+ { "US/Hawaii" , 0x03DAF9 },
+ { "US/Indiana-Starke" , 0x03DB6A },
+ { "US/Michigan" , 0x03DEDB },
+ { "US/Mountain" , 0x03E212 },
+ { "US/Pacific" , 0x03E58B },
+ { "US/Pacific-New" , 0x03E990 },
+ { "US/Samoa" , 0x03ED95 },
+ { "UTC" , 0x03EE1E },
+ { "W-SU" , 0x03F115 },
+ { "WET" , 0x03EE62 },
+ { "Zulu" , 0x03F34F },
};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[257943] = {
+const unsigned char timelib_timezone_db_data_builtin[258963] = {
/* Africa/Abidjan */
@@ -755,36 +755,36 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Africa/Casablanca */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x96, 0x51, 0xF9, 0x9C,
+0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x96, 0x51, 0xF9, 0x9C,
0xC6, 0xFF, 0x14, 0x80, 0xC7, 0x58, 0xAC, 0x70, 0xC7, 0xD9, 0xED, 0x80, 0xD2, 0xA1, 0x32, 0xF0,
0xDB, 0x35, 0xA4, 0x00, 0xDB, 0xEE, 0x27, 0xF0, 0xFB, 0x25, 0x72, 0x40, 0xFB, 0xC2, 0xEF, 0x70,
0x08, 0x6B, 0x84, 0x80, 0x08, 0xC6, 0x6D, 0xF0, 0x0B, 0xE8, 0x0C, 0x00, 0x0C, 0x61, 0x47, 0xF0,
0x0D, 0xC9, 0x3F, 0x80, 0x0E, 0x8E, 0xF2, 0x70, 0x0F, 0xD3, 0x51, 0x80, 0x10, 0x27, 0xA3, 0x70,
0x1A, 0xB7, 0xA6, 0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x48, 0x41, 0xE6, 0x80, 0x48, 0xBB, 0x22, 0x70,
0x4A, 0x23, 0x1A, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x4B, 0xDC, 0xC0, 0x80, 0x4C, 0x5D, 0xE5, 0x70,
-0x4D, 0x97, 0xB8, 0x80, 0x4E, 0x34, 0x8C, 0xF0, 0x4F, 0x9C, 0xA0, 0xA0, 0x50, 0x67, 0xA7, 0xA0,
-0x51, 0x7C, 0x82, 0xA0, 0x52, 0x47, 0x89, 0xA0, 0x53, 0x5C, 0x64, 0xA0, 0x54, 0x27, 0x6B, 0xA0,
-0x55, 0x3C, 0x46, 0xA0, 0x56, 0x07, 0x4D, 0xA0, 0x57, 0x1C, 0x28, 0xA0, 0x57, 0xE7, 0x2F, 0xA0,
-0x59, 0x05, 0x45, 0x20, 0x59, 0xC7, 0x11, 0xA0, 0x5A, 0xE5, 0x27, 0x20, 0x5B, 0xB0, 0x2E, 0x20,
-0x5C, 0xC5, 0x09, 0x20, 0x5D, 0x90, 0x10, 0x20, 0x5E, 0xA4, 0xEB, 0x20, 0x5F, 0x6F, 0xF2, 0x20,
-0x60, 0x84, 0xCD, 0x20, 0x61, 0x4F, 0xD4, 0x20, 0x62, 0x64, 0xAF, 0x20, 0x63, 0x2F, 0xB6, 0x20,
-0x64, 0x4D, 0xCB, 0xA0, 0x65, 0x0F, 0x98, 0x20, 0x66, 0x2D, 0xAD, 0xA0, 0x66, 0xF8, 0xB4, 0xA0,
-0x68, 0x0D, 0x8F, 0xA0, 0x68, 0xD8, 0x96, 0xA0, 0x69, 0xED, 0x71, 0xA0, 0x6A, 0xB8, 0x78, 0xA0,
-0x6B, 0xCD, 0x53, 0xA0, 0x6C, 0x98, 0x5A, 0xA0, 0x6D, 0xB6, 0x70, 0x20, 0x6E, 0x78, 0x3C, 0xA0,
-0x6F, 0x96, 0x52, 0x20, 0x70, 0x61, 0x59, 0x20, 0x71, 0x76, 0x34, 0x20, 0x72, 0x41, 0x3B, 0x20,
-0x73, 0x56, 0x16, 0x20, 0x74, 0x21, 0x1D, 0x20, 0x75, 0x35, 0xF8, 0x20, 0x76, 0x00, 0xFF, 0x20,
-0x77, 0x15, 0xDA, 0x20, 0x77, 0xE0, 0xE1, 0x20, 0x78, 0xFE, 0xF6, 0xA0, 0x79, 0xC0, 0xC3, 0x20,
-0x7A, 0xDE, 0xD8, 0xA0, 0x7B, 0xA9, 0xDF, 0xA0, 0x7C, 0xBE, 0xBA, 0xA0, 0x7D, 0x89, 0xC1, 0xA0,
-0x7E, 0x9E, 0x9C, 0xA0, 0x7F, 0x69, 0xA3, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4D, 0x97, 0xB8, 0x80, 0x4E, 0x34, 0x8C, 0xF0, 0x4F, 0x9C, 0xA0, 0xA0, 0x50, 0x08, 0xBB, 0xA0,
+0x50, 0x31, 0x9A, 0x20, 0x50, 0x67, 0xA7, 0xA0, 0x51, 0x7C, 0x82, 0xA0, 0x52, 0x47, 0x89, 0xA0,
+0x53, 0x5C, 0x64, 0xA0, 0x54, 0x27, 0x6B, 0xA0, 0x55, 0x3C, 0x46, 0xA0, 0x56, 0x07, 0x4D, 0xA0,
+0x57, 0x1C, 0x28, 0xA0, 0x57, 0xE7, 0x2F, 0xA0, 0x59, 0x05, 0x45, 0x20, 0x59, 0xC7, 0x11, 0xA0,
+0x5A, 0xE5, 0x27, 0x20, 0x5B, 0xB0, 0x2E, 0x20, 0x5C, 0xC5, 0x09, 0x20, 0x5D, 0x90, 0x10, 0x20,
+0x5E, 0xA4, 0xEB, 0x20, 0x5F, 0x6F, 0xF2, 0x20, 0x60, 0x84, 0xCD, 0x20, 0x61, 0x4F, 0xD4, 0x20,
+0x62, 0x64, 0xAF, 0x20, 0x63, 0x2F, 0xB6, 0x20, 0x64, 0x4D, 0xCB, 0xA0, 0x65, 0x0F, 0x98, 0x20,
+0x66, 0x2D, 0xAD, 0xA0, 0x66, 0xF8, 0xB4, 0xA0, 0x68, 0x0D, 0x8F, 0xA0, 0x68, 0xD8, 0x96, 0xA0,
+0x69, 0xED, 0x71, 0xA0, 0x6A, 0xB8, 0x78, 0xA0, 0x6B, 0xCD, 0x53, 0xA0, 0x6C, 0x98, 0x5A, 0xA0,
+0x6D, 0xB6, 0x70, 0x20, 0x6E, 0x78, 0x3C, 0xA0, 0x6F, 0x96, 0x52, 0x20, 0x70, 0x61, 0x59, 0x20,
+0x71, 0x76, 0x34, 0x20, 0x72, 0x41, 0x3B, 0x20, 0x73, 0x56, 0x16, 0x20, 0x74, 0x21, 0x1D, 0x20,
+0x75, 0x35, 0xF8, 0x20, 0x76, 0x00, 0xFF, 0x20, 0x77, 0x15, 0xDA, 0x20, 0x77, 0xE0, 0xE1, 0x20,
+0x78, 0xFE, 0xF6, 0xA0, 0x79, 0xC0, 0xC3, 0x20, 0x7A, 0xDE, 0xD8, 0xA0, 0x7B, 0xA9, 0xDF, 0xA0,
+0x7C, 0xBE, 0xBA, 0xA0, 0x7D, 0x89, 0xC1, 0xA0, 0x7E, 0x9E, 0x9C, 0xA0, 0x7F, 0x69, 0xA3, 0xA0,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16, 0x42,
-0x00, 0x00, 0x00, 0x00,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53,
+0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Africa/Ceuta */
0x50, 0x48, 0x50, 0x31, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1172,7 +1172,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Africa/Tripoli */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4C, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xA1, 0xF2, 0xC1, 0x24,
+0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xA1, 0xF2, 0xC1, 0x24,
0xDD, 0xBB, 0xB1, 0x10, 0xDE, 0x23, 0xAD, 0x60, 0xE1, 0x78, 0xD2, 0x10, 0xE1, 0xE7, 0x65, 0xE0,
0xE5, 0x2F, 0x3F, 0x70, 0xE5, 0xA9, 0xCC, 0xE0, 0xEB, 0x4E, 0xC6, 0xF0, 0x16, 0x92, 0x42, 0x60,
0x17, 0x08, 0xF7, 0x70, 0x17, 0xFA, 0x2B, 0xE0, 0x18, 0xEA, 0x2A, 0xF0, 0x19, 0xDB, 0x5F, 0x60,
@@ -1180,12 +1180,28 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x1E, 0x93, 0x0B, 0x70, 0x1F, 0x82, 0xEE, 0x60, 0x20, 0x70, 0x4A, 0x70, 0x21, 0x61, 0x7E, 0xE0,
0x22, 0x52, 0xCF, 0x70, 0x23, 0x44, 0x03, 0xE0, 0x24, 0x34, 0x02, 0xF0, 0x25, 0x25, 0x37, 0x60,
0x26, 0x40, 0xB7, 0xF0, 0x32, 0x4E, 0xF1, 0x60, 0x33, 0x44, 0x36, 0x70, 0x34, 0x35, 0x6A, 0xE0,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x0C,
-0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
-0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB,
-0x87, 0xD0, 0x01, 0x26, 0xC6, 0x3D, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x9D, 0x99, 0x00, 0x51, 0x54, 0xD9, 0x80, 0x52, 0x69, 0xB4, 0x80, 0x53, 0x34, 0xBB, 0x80,
+0x54, 0x52, 0xD1, 0x00, 0x55, 0x14, 0x9D, 0x80, 0x56, 0x32, 0xB3, 0x00, 0x56, 0xF4, 0x7F, 0x80,
+0x58, 0x12, 0x95, 0x00, 0x58, 0xDD, 0x9C, 0x00, 0x59, 0xF2, 0x77, 0x00, 0x5A, 0xBD, 0x7E, 0x00,
+0x5B, 0xD2, 0x59, 0x00, 0x5C, 0x9D, 0x60, 0x00, 0x5D, 0xB2, 0x3B, 0x00, 0x5E, 0x7D, 0x42, 0x00,
+0x5F, 0x9B, 0x57, 0x80, 0x60, 0x5D, 0x24, 0x00, 0x61, 0x7B, 0x39, 0x80, 0x62, 0x3D, 0x06, 0x00,
+0x63, 0x5B, 0x1B, 0x80, 0x64, 0x26, 0x22, 0x80, 0x65, 0x3A, 0xFD, 0x80, 0x66, 0x06, 0x04, 0x80,
+0x67, 0x1A, 0xDF, 0x80, 0x67, 0xE5, 0xE6, 0x80, 0x69, 0x03, 0xFC, 0x00, 0x69, 0xC5, 0xC8, 0x80,
+0x6A, 0xE3, 0xDE, 0x00, 0x6B, 0xA5, 0xAA, 0x80, 0x6C, 0xC3, 0xC0, 0x00, 0x6D, 0x8E, 0xC7, 0x00,
+0x6E, 0xA3, 0xA2, 0x00, 0x6F, 0x6E, 0xA9, 0x00, 0x70, 0x83, 0x84, 0x00, 0x71, 0x4E, 0x8B, 0x00,
+0x72, 0x63, 0x66, 0x00, 0x73, 0x2E, 0x6D, 0x00, 0x74, 0x4C, 0x82, 0x80, 0x75, 0x0E, 0x4F, 0x00,
+0x76, 0x2C, 0x64, 0x80, 0x76, 0xEE, 0x31, 0x00, 0x78, 0x0C, 0x46, 0x80, 0x78, 0xD7, 0x4D, 0x80,
+0x79, 0xEC, 0x28, 0x80, 0x7A, 0xB7, 0x2F, 0x80, 0x7B, 0xCC, 0x0A, 0x80, 0x7C, 0x97, 0x11, 0x80,
+0x7D, 0xB5, 0x27, 0x00, 0x7E, 0x76, 0xF3, 0x80, 0x7F, 0x95, 0x09, 0x00, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x0C, 0x5C,
+0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
+0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0x87,
+0xD0, 0x01, 0x26, 0xC6, 0x3D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Tunis */
0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1382,7 +1398,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* America/Araguaina */
0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x74, 0x30,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x74, 0x30,
0xB8, 0x0F, 0x49, 0xE0, 0xB8, 0xFD, 0x40, 0xA0, 0xB9, 0xF1, 0x34, 0x30, 0xBA, 0xDE, 0x74, 0x20,
0xDA, 0x38, 0xAE, 0x30, 0xDA, 0xEB, 0xFA, 0x30, 0xDC, 0x19, 0xE1, 0xB0, 0xDC, 0xB9, 0x59, 0x20,
0xDD, 0xFB, 0x15, 0x30, 0xDE, 0x9B, 0xDE, 0x20, 0xDF, 0xDD, 0x9A, 0x30, 0xE0, 0x54, 0x33, 0x20,
@@ -1395,13 +1411,29 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x34, 0x38, 0x54, 0x30, 0x34, 0xF8, 0xC1, 0x20, 0x36, 0x20, 0x1F, 0x30, 0x36, 0xCF, 0x68, 0xA0,
0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xB8, 0x85, 0x20, 0x39, 0xDF, 0xE3, 0x30, 0x3A, 0x8F, 0x2C, 0xA0,
0x3B, 0xC8, 0xFF, 0xB0, 0x3C, 0x6F, 0x0E, 0xA0, 0x3D, 0xC4, 0x91, 0x30, 0x3E, 0x4E, 0xF0, 0xA0,
+0x50, 0x83, 0x65, 0x30, 0x51, 0x20, 0x39, 0xA0, 0x52, 0x63, 0x47, 0x30, 0x53, 0x00, 0x1B, 0xA0,
+0x54, 0x43, 0x29, 0x30, 0x54, 0xE9, 0x38, 0x20, 0x56, 0x23, 0x0B, 0x30, 0x56, 0xC9, 0x1A, 0x20,
+0x58, 0x02, 0xED, 0x30, 0x58, 0xA8, 0xFC, 0x20, 0x59, 0xE2, 0xCF, 0x30, 0x5A, 0x88, 0xDE, 0x20,
+0x5B, 0xCB, 0xEB, 0xB0, 0x5C, 0x68, 0xC0, 0x20, 0x5D, 0xAB, 0xCD, 0xB0, 0x5E, 0x48, 0xA2, 0x20,
+0x5F, 0x8B, 0xAF, 0xB0, 0x60, 0x31, 0xBE, 0xA0, 0x61, 0x6B, 0x91, 0xB0, 0x62, 0x11, 0xA0, 0xA0,
+0x63, 0x4B, 0x73, 0xB0, 0x63, 0xFA, 0xBD, 0x20, 0x65, 0x2B, 0x55, 0xB0, 0x65, 0xD1, 0x64, 0xA0,
+0x67, 0x14, 0x72, 0x30, 0x67, 0xB1, 0x46, 0xA0, 0x68, 0xF4, 0x54, 0x30, 0x69, 0x9A, 0x63, 0x20,
+0x6A, 0xD4, 0x36, 0x30, 0x6B, 0x7A, 0x45, 0x20, 0x6C, 0xB4, 0x18, 0x30, 0x6D, 0x5A, 0x27, 0x20,
+0x6E, 0x93, 0xFA, 0x30, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0x7D, 0x16, 0xB0, 0x71, 0x19, 0xEB, 0x20,
+0x72, 0x5C, 0xF8, 0xB0, 0x72, 0xF9, 0xCD, 0x20, 0x74, 0x3C, 0xDA, 0xB0, 0x74, 0xD9, 0xAF, 0x20,
+0x76, 0x1C, 0xBC, 0xB0, 0x76, 0xC2, 0xCB, 0xA0, 0x77, 0xFC, 0x9E, 0xB0, 0x78, 0xAB, 0xE8, 0x20,
+0x79, 0xDC, 0x80, 0xB0, 0x7A, 0x82, 0x8F, 0xA0, 0x7B, 0xC5, 0x9D, 0x30, 0x7C, 0x62, 0x71, 0xA0,
+0x7D, 0xA5, 0x7F, 0x30, 0x7E, 0x4B, 0x8E, 0x20, 0x7F, 0x85, 0x61, 0x30, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0xD2, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x57, 0xC0, 0x00, 0xC9, 0x1C, 0x60, 0x00, 0x00,
-0x00, 0x09, 0x54, 0x6F, 0x63, 0x61, 0x6E, 0x74, 0x69, 0x6E, 0x73,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0xFF, 0xFF, 0xD2, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0,
+0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x57, 0xC0, 0x00, 0xC9, 0x1C, 0x60, 0x00, 0x00, 0x00,
+0x09, 0x54, 0x6F, 0x63, 0x61, 0x6E, 0x74, 0x69, 0x6E, 0x73,
/* America/Argentina/Buenos_Aires */
0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1929,7 +1961,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* America/Bahia */
0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x6B, 0x1C,
+0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x6B, 0x1C,
0xB8, 0x0F, 0x49, 0xE0, 0xB8, 0xFD, 0x40, 0xA0, 0xB9, 0xF1, 0x34, 0x30, 0xBA, 0xDE, 0x74, 0x20,
0xDA, 0x38, 0xAE, 0x30, 0xDA, 0xEB, 0xFA, 0x30, 0xDC, 0x19, 0xE1, 0xB0, 0xDC, 0xB9, 0x59, 0x20,
0xDD, 0xFB, 0x15, 0x30, 0xDE, 0x9B, 0xDE, 0x20, 0xDF, 0xDD, 0x9A, 0x30, 0xE0, 0x54, 0x33, 0x20,
@@ -1945,30 +1977,14 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x36, 0x20, 0x1F, 0x30, 0x36, 0xCF, 0x68, 0xA0, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xB8, 0x85, 0x20,
0x39, 0xDF, 0xE3, 0x30, 0x3A, 0x8F, 0x2C, 0xA0, 0x3B, 0xC8, 0xFF, 0xB0, 0x3C, 0x6F, 0x0E, 0xA0,
0x3D, 0xC4, 0x91, 0x30, 0x3E, 0x4E, 0xF0, 0xA0, 0x4E, 0x9A, 0x48, 0xB0, 0x4F, 0x49, 0x92, 0x20,
-0x50, 0x83, 0x65, 0x30, 0x51, 0x20, 0x39, 0xA0, 0x52, 0x63, 0x47, 0x30, 0x53, 0x00, 0x1B, 0xA0,
-0x54, 0x43, 0x29, 0x30, 0x54, 0xE9, 0x38, 0x20, 0x56, 0x23, 0x0B, 0x30, 0x56, 0xC9, 0x1A, 0x20,
-0x58, 0x02, 0xED, 0x30, 0x58, 0xA8, 0xFC, 0x20, 0x59, 0xE2, 0xCF, 0x30, 0x5A, 0x88, 0xDE, 0x20,
-0x5B, 0xCB, 0xEB, 0xB0, 0x5C, 0x68, 0xC0, 0x20, 0x5D, 0xAB, 0xCD, 0xB0, 0x5E, 0x48, 0xA2, 0x20,
-0x5F, 0x8B, 0xAF, 0xB0, 0x60, 0x31, 0xBE, 0xA0, 0x61, 0x6B, 0x91, 0xB0, 0x62, 0x11, 0xA0, 0xA0,
-0x63, 0x4B, 0x73, 0xB0, 0x63, 0xFA, 0xBD, 0x20, 0x65, 0x2B, 0x55, 0xB0, 0x65, 0xD1, 0x64, 0xA0,
-0x67, 0x14, 0x72, 0x30, 0x67, 0xB1, 0x46, 0xA0, 0x68, 0xF4, 0x54, 0x30, 0x69, 0x9A, 0x63, 0x20,
-0x6A, 0xD4, 0x36, 0x30, 0x6B, 0x7A, 0x45, 0x20, 0x6C, 0xB4, 0x18, 0x30, 0x6D, 0x5A, 0x27, 0x20,
-0x6E, 0x93, 0xFA, 0x30, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0x7D, 0x16, 0xB0, 0x71, 0x19, 0xEB, 0x20,
-0x72, 0x5C, 0xF8, 0xB0, 0x72, 0xF9, 0xCD, 0x20, 0x74, 0x3C, 0xDA, 0xB0, 0x74, 0xD9, 0xAF, 0x20,
-0x76, 0x1C, 0xBC, 0xB0, 0x76, 0xC2, 0xCB, 0xA0, 0x77, 0xFC, 0x9E, 0xB0, 0x78, 0xAB, 0xE8, 0x20,
-0x79, 0xDC, 0x80, 0xB0, 0x7A, 0x82, 0x8F, 0xA0, 0x7B, 0xC5, 0x9D, 0x30, 0x7C, 0x62, 0x71, 0xA0,
-0x7D, 0xA5, 0x7F, 0x30, 0x7E, 0x4B, 0x8E, 0x20, 0x7F, 0x85, 0x61, 0x30, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xDB, 0xE4,
-0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D,
-0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x84, 0xA2, 0x00, 0xD7, 0xE2, 0xED, 0x00, 0x00, 0x00, 0x05, 0x42, 0x61, 0x68,
-0x69, 0x61,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB,
+0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C,
+0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x75, 0x84, 0xA2, 0x00, 0xD7, 0xE2, 0xED, 0x00, 0x00, 0x00, 0x05, 0x42, 0x61,
+0x68, 0x69, 0x61,
/* America/Bahia_Banderas */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3468,20 +3484,20 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50,
0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xDC, 0xA9, 0x50, 0x49, 0x03, 0xF9, 0x50,
0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0x9C, 0x6D, 0x50, 0x4C, 0xCC, 0xF7, 0xD0,
-0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xBF, 0x4E, 0xD0, 0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x8C, 0xBB, 0xD0,
-0x51, 0x3C, 0x13, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x4C, 0x7F, 0xD0,
-0x54, 0xFB, 0xD7, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x15, 0x7E, 0x50,
-0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xD5, 0x42, 0x50,
-0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x64, 0x7B, 0xD0, 0x5F, 0x95, 0x06, 0x50,
-0x60, 0x4D, 0x98, 0x50, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x2D, 0x7A, 0x50, 0x63, 0x5E, 0x04, 0xD0,
-0x64, 0x0D, 0x5C, 0x50, 0x65, 0x3D, 0xE6, 0xD0, 0x65, 0xED, 0x3E, 0x50, 0x67, 0x1D, 0xC8, 0xD0,
-0x67, 0xCD, 0x20, 0x50, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xAD, 0x02, 0x50, 0x6A, 0xDD, 0x8C, 0xD0,
-0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x76, 0x00, 0xD0, 0x6E, 0xA6, 0x8B, 0x50,
-0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x35, 0xC4, 0xD0, 0x72, 0x66, 0x4F, 0x50,
-0x73, 0x15, 0xA6, 0xD0, 0x74, 0x46, 0x31, 0x50, 0x74, 0xFE, 0xC3, 0x50, 0x76, 0x2F, 0x4D, 0xD0,
-0x76, 0xDE, 0xA5, 0x50, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xBE, 0x87, 0x50, 0x79, 0xEF, 0x11, 0xD0,
-0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0x7E, 0x4B, 0x50, 0x7D, 0xAE, 0xD5, 0xD0,
-0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xBF, 0x4E, 0xD0, 0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x95, 0xF6, 0x50,
+0x51, 0x3C, 0x13, 0x50, 0x52, 0x75, 0xD8, 0x50, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x55, 0xBA, 0x50,
+0x54, 0xFB, 0xD7, 0x50, 0x56, 0x35, 0x9C, 0x50, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x1E, 0xB8, 0xD0,
+0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xFE, 0x9A, 0xD0, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xDE, 0x7C, 0xD0,
+0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xBE, 0x5E, 0xD0, 0x5E, 0x64, 0x7B, 0xD0, 0x5F, 0x9E, 0x40, 0xD0,
+0x60, 0x4D, 0x98, 0x50, 0x61, 0x87, 0x5D, 0x50, 0x62, 0x2D, 0x7A, 0x50, 0x63, 0x67, 0x3F, 0x50,
+0x64, 0x0D, 0x5C, 0x50, 0x65, 0x47, 0x21, 0x50, 0x65, 0xED, 0x3E, 0x50, 0x67, 0x27, 0x03, 0x50,
+0x67, 0xCD, 0x20, 0x50, 0x69, 0x06, 0xE5, 0x50, 0x69, 0xAD, 0x02, 0x50, 0x6A, 0xE6, 0xC7, 0x50,
+0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xCF, 0xE3, 0xD0, 0x6D, 0x76, 0x00, 0xD0, 0x6E, 0xAF, 0xC5, 0xD0,
+0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x8F, 0xA7, 0xD0, 0x71, 0x35, 0xC4, 0xD0, 0x72, 0x6F, 0x89, 0xD0,
+0x73, 0x15, 0xA6, 0xD0, 0x74, 0x4F, 0x6B, 0xD0, 0x74, 0xFE, 0xC3, 0x50, 0x76, 0x38, 0x88, 0x50,
+0x76, 0xDE, 0xA5, 0x50, 0x78, 0x18, 0x6A, 0x50, 0x78, 0xBE, 0x87, 0x50, 0x79, 0xF8, 0x4C, 0x50,
+0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xD8, 0x2E, 0x50, 0x7C, 0x7E, 0x4B, 0x50, 0x7D, 0xB8, 0x10, 0x50,
+0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x97, 0xF2, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -7498,7 +7514,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Asia/Amman */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xB6, 0xA3, 0xD6, 0xD0,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xB6, 0xA3, 0xD6, 0xD0,
0x06, 0x72, 0x79, 0xE0, 0x07, 0x0C, 0xAB, 0x50, 0x08, 0x24, 0x37, 0x60, 0x08, 0xED, 0xDE, 0xD0,
0x0A, 0x05, 0x6A, 0xE0, 0x0A, 0xCF, 0x12, 0x50, 0x0B, 0xE7, 0xEF, 0xE0, 0x0C, 0xDA, 0x75, 0xD0,
0x0D, 0xC9, 0x23, 0x60, 0x0E, 0x92, 0xCA, 0xD0, 0x0F, 0xA9, 0x05, 0x60, 0x10, 0x72, 0xAC, 0xD0,
@@ -7515,32 +7531,31 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x42, 0x4C, 0x72, 0xE0, 0x43, 0x3C, 0x63, 0xE0, 0x44, 0x2C, 0x54, 0xE0, 0x45, 0x41, 0x2F, 0xE0,
0x46, 0x0C, 0x36, 0xE0, 0x47, 0x21, 0x11, 0xE0, 0x47, 0xEC, 0x18, 0xE0, 0x49, 0x0A, 0x2E, 0x60,
0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xEA, 0x10, 0x60, 0x4B, 0xAB, 0xDC, 0xE0, 0x4C, 0xC9, 0xF2, 0x60,
-0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xD4, 0x60, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x89, 0xB6, 0x60,
-0x51, 0x54, 0xBD, 0x60, 0x52, 0x69, 0x98, 0x60, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x52, 0xB4, 0xE0,
-0x55, 0x14, 0x81, 0x60, 0x56, 0x32, 0x96, 0xE0, 0x56, 0xFD, 0x9D, 0xE0, 0x58, 0x12, 0x78, 0xE0,
-0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xF2, 0x5A, 0xE0, 0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xD2, 0x3C, 0xE0,
-0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB2, 0x1E, 0xE0, 0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x9B, 0x3B, 0x60,
-0x60, 0x5D, 0x07, 0xE0, 0x61, 0x7B, 0x1D, 0x60, 0x62, 0x46, 0x24, 0x60, 0x63, 0x5A, 0xFF, 0x60,
-0x64, 0x26, 0x06, 0x60, 0x65, 0x3A, 0xE1, 0x60, 0x66, 0x05, 0xE8, 0x60, 0x67, 0x1A, 0xC3, 0x60,
-0x67, 0xE5, 0xCA, 0x60, 0x69, 0x03, 0xDF, 0xE0, 0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xE3, 0xC1, 0xE0,
-0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0xC3, 0xA3, 0xE0, 0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0xA3, 0x85, 0xE0,
-0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x83, 0x67, 0xE0, 0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x63, 0x49, 0xE0,
-0x73, 0x2E, 0x50, 0xE0, 0x74, 0x4C, 0x66, 0x60, 0x75, 0x0E, 0x32, 0xE0, 0x76, 0x2C, 0x48, 0x60,
-0x76, 0xF7, 0x4F, 0x60, 0x78, 0x0C, 0x2A, 0x60, 0x78, 0xD7, 0x31, 0x60, 0x79, 0xEC, 0x0C, 0x60,
-0x7A, 0xB7, 0x13, 0x60, 0x7B, 0xCB, 0xEE, 0x60, 0x7C, 0x96, 0xF5, 0x60, 0x7D, 0xB5, 0x0A, 0xE0,
-0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x94, 0xEC, 0xE0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xD4, 0x60, 0x4F, 0x74, 0xDB, 0x60, 0x52, 0x69, 0x98, 0x60,
+0x53, 0x34, 0x9F, 0x60, 0x54, 0x52, 0xB4, 0xE0, 0x55, 0x14, 0x81, 0x60, 0x56, 0x32, 0x96, 0xE0,
+0x56, 0xFD, 0x9D, 0xE0, 0x58, 0x12, 0x78, 0xE0, 0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xF2, 0x5A, 0xE0,
+0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xD2, 0x3C, 0xE0, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB2, 0x1E, 0xE0,
+0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x9B, 0x3B, 0x60, 0x60, 0x5D, 0x07, 0xE0, 0x61, 0x7B, 0x1D, 0x60,
+0x62, 0x46, 0x24, 0x60, 0x63, 0x5A, 0xFF, 0x60, 0x64, 0x26, 0x06, 0x60, 0x65, 0x3A, 0xE1, 0x60,
+0x66, 0x05, 0xE8, 0x60, 0x67, 0x1A, 0xC3, 0x60, 0x67, 0xE5, 0xCA, 0x60, 0x69, 0x03, 0xDF, 0xE0,
+0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xE3, 0xC1, 0xE0, 0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0xC3, 0xA3, 0xE0,
+0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0xA3, 0x85, 0xE0, 0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x83, 0x67, 0xE0,
+0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x63, 0x49, 0xE0, 0x73, 0x2E, 0x50, 0xE0, 0x74, 0x4C, 0x66, 0x60,
+0x75, 0x0E, 0x32, 0xE0, 0x76, 0x2C, 0x48, 0x60, 0x76, 0xF7, 0x4F, 0x60, 0x78, 0x0C, 0x2A, 0x60,
+0x78, 0xD7, 0x31, 0x60, 0x79, 0xEC, 0x0C, 0x60, 0x7A, 0xB7, 0x13, 0x60, 0x7B, 0xCB, 0xEE, 0x60,
+0x7C, 0x96, 0xF5, 0x60, 0x7D, 0xB5, 0x0A, 0xE0, 0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x94, 0xEC, 0xE0,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x00,
-0x00, 0x21, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x14, 0xB8, 0x01, 0x49, 0x7C, 0xF5, 0x00, 0x00, 0x00, 0x00,
-
+0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
+0x03, 0x01, 0x03, 0x01, 0x03, 0x00, 0x00, 0x21, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A,
+0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x14, 0xB8, 0x01, 0x49,
+0x7C, 0xF5, 0x00, 0x00, 0x00, 0x00,
/* Asia/Anadyr */
0x50, 0x48, 0x50, 0x31, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8085,7 +8100,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0,
0x48, 0xB7, 0x11, 0xD0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C,
0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x96, 0xF3, 0xDC, 0x4E, 0x35, 0xC2, 0x50, 0x4F, 0x74, 0xDB, 0x60,
-0x50, 0x64, 0xBE, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01,
+0x50, 0x5B, 0x91, 0xE0, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02,
@@ -8142,7 +8157,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0,
0x48, 0xBB, 0x06, 0x50, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C,
0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x95, 0xA2, 0x5C, 0x4E, 0x35, 0xC2, 0x50, 0x4E, 0x5C, 0x0B, 0xE0,
-0x4E, 0x85, 0x06, 0x80, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x64, 0xE8, 0x80, 0x00, 0x01, 0x00, 0x01,
+0x4E, 0x85, 0x06, 0x80, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x5B, 0x91, 0xE0, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -8373,19 +8388,19 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x46, 0xEC, 0x63, 0xF0, 0x47, 0xEC, 0x35, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x49, 0xCC, 0x17, 0x00,
0x4A, 0xBE, 0x9C, 0xF0, 0x4B, 0xAB, 0xF9, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x4D, 0x95, 0x15, 0x80,
0x4E, 0x87, 0x9B, 0x70, 0x4F, 0x74, 0xF7, 0x80, 0x50, 0x5E, 0x42, 0xF0, 0x51, 0x54, 0xD9, 0x80,
-0x52, 0x2B, 0xAF, 0xF0, 0x53, 0x34, 0xBB, 0x80, 0x54, 0x27, 0x41, 0x70, 0x55, 0x14, 0x9D, 0x80,
-0x55, 0xFD, 0xE8, 0xF0, 0x56, 0xFD, 0xBA, 0x00, 0x57, 0xF9, 0x7A, 0x70, 0x58, 0xDD, 0x9C, 0x00,
-0x59, 0xC6, 0xE7, 0x70, 0x5A, 0xBD, 0x7E, 0x00, 0x5B, 0x9D, 0x8E, 0xF0, 0x5C, 0x9D, 0x60, 0x00,
-0x5D, 0x99, 0x20, 0x70, 0x5E, 0x7D, 0x42, 0x00, 0x5F, 0x6F, 0xC7, 0xF0, 0x60, 0x5D, 0x24, 0x00,
-0x61, 0x3D, 0x34, 0xF0, 0x62, 0x46, 0x40, 0x80, 0x63, 0x38, 0xC6, 0x70, 0x64, 0x26, 0x22, 0x80,
-0x65, 0x0F, 0x6D, 0xF0, 0x66, 0x06, 0x04, 0x80, 0x67, 0x01, 0xC4, 0xF0, 0x67, 0xE5, 0xE6, 0x80,
-0x68, 0xD8, 0x6C, 0x70, 0x69, 0xC5, 0xC8, 0x80, 0x6A, 0xAF, 0x13, 0xF0, 0x6B, 0xA5, 0xAA, 0x80,
-0x6C, 0xAA, 0xA5, 0x70, 0x6D, 0x8E, 0xC7, 0x00, 0x6E, 0x78, 0x12, 0x70, 0x6F, 0x6E, 0xA9, 0x00,
-0x70, 0x4E, 0xB9, 0xF0, 0x71, 0x4E, 0x8B, 0x00, 0x72, 0x4A, 0x4B, 0x70, 0x73, 0x2E, 0x6D, 0x00,
-0x74, 0x17, 0xB8, 0x70, 0x75, 0x0E, 0x4F, 0x00, 0x75, 0xEE, 0x5F, 0xF0, 0x76, 0xF7, 0x6B, 0x80,
-0x77, 0xE9, 0xF1, 0x70, 0x78, 0xD7, 0x4D, 0x80, 0x79, 0xB7, 0x5E, 0x70, 0x7A, 0xB7, 0x2F, 0x80,
-0x7B, 0xB2, 0xEF, 0xF0, 0x7C, 0x97, 0x11, 0x80, 0x7D, 0x89, 0x97, 0x70, 0x7E, 0x76, 0xF3, 0x80,
-0x7F, 0x57, 0x04, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
+0x52, 0x50, 0x99, 0xF0, 0x53, 0x34, 0xBB, 0x80, 0x54, 0x30, 0x7B, 0xF0, 0x55, 0x14, 0x9D, 0x80,
+0x56, 0x10, 0x5D, 0xF0, 0x56, 0xF4, 0x7F, 0x80, 0x57, 0xF0, 0x3F, 0xF0, 0x58, 0xD4, 0x61, 0x80,
+0x59, 0xD9, 0x5C, 0x70, 0x5A, 0xB4, 0x43, 0x80, 0x5B, 0xB9, 0x3E, 0x70, 0x5C, 0x9D, 0x60, 0x00,
+0x5D, 0x99, 0x20, 0x70, 0x5E, 0x7D, 0x42, 0x00, 0x5F, 0x79, 0x02, 0x70, 0x60, 0x5D, 0x24, 0x00,
+0x61, 0x58, 0xE4, 0x70, 0x62, 0x3D, 0x06, 0x00, 0x63, 0x38, 0xC6, 0x70, 0x64, 0x1C, 0xE8, 0x00,
+0x65, 0x21, 0xE2, 0xF0, 0x66, 0x06, 0x04, 0x80, 0x67, 0x01, 0xC4, 0xF0, 0x67, 0xE5, 0xE6, 0x80,
+0x68, 0xE1, 0xA6, 0xF0, 0x69, 0xC5, 0xC8, 0x80, 0x6A, 0xC1, 0x88, 0xF0, 0x6B, 0xA5, 0xAA, 0x80,
+0x6C, 0xA2, 0xBC, 0x70, 0x6D, 0x85, 0x8C, 0x80, 0x6E, 0x8A, 0x87, 0x70, 0x6F, 0x65, 0x6E, 0x80,
+0x70, 0x6A, 0x69, 0x70, 0x71, 0x4E, 0x8B, 0x00, 0x72, 0x4A, 0x4B, 0x70, 0x73, 0x2E, 0x6D, 0x00,
+0x74, 0x2A, 0x2D, 0x70, 0x75, 0x0E, 0x4F, 0x00, 0x76, 0x0A, 0x0F, 0x70, 0x76, 0xEE, 0x31, 0x00,
+0x77, 0xE9, 0xF1, 0x70, 0x78, 0xCE, 0x13, 0x00, 0x79, 0xD3, 0x0D, 0xF0, 0x7A, 0xAD, 0xF5, 0x00,
+0x7B, 0xB2, 0xEF, 0xF0, 0x7C, 0x97, 0x11, 0x80, 0x7D, 0x92, 0xD1, 0xF0, 0x7E, 0x76, 0xF3, 0x80,
+0x7F, 0x72, 0xB3, 0xF0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
@@ -9205,19 +9220,19 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x46, 0xEC, 0x63, 0xF0, 0x47, 0xEC, 0x35, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x49, 0xCC, 0x17, 0x00,
0x4A, 0xBE, 0x9C, 0xF0, 0x4B, 0xAB, 0xF9, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x4D, 0x95, 0x15, 0x80,
0x4E, 0x87, 0x9B, 0x70, 0x4F, 0x74, 0xF7, 0x80, 0x50, 0x5E, 0x42, 0xF0, 0x51, 0x54, 0xD9, 0x80,
-0x52, 0x2B, 0xAF, 0xF0, 0x53, 0x34, 0xBB, 0x80, 0x54, 0x27, 0x41, 0x70, 0x55, 0x14, 0x9D, 0x80,
-0x55, 0xFD, 0xE8, 0xF0, 0x56, 0xFD, 0xBA, 0x00, 0x57, 0xF9, 0x7A, 0x70, 0x58, 0xDD, 0x9C, 0x00,
-0x59, 0xC6, 0xE7, 0x70, 0x5A, 0xBD, 0x7E, 0x00, 0x5B, 0x9D, 0x8E, 0xF0, 0x5C, 0x9D, 0x60, 0x00,
-0x5D, 0x99, 0x20, 0x70, 0x5E, 0x7D, 0x42, 0x00, 0x5F, 0x6F, 0xC7, 0xF0, 0x60, 0x5D, 0x24, 0x00,
-0x61, 0x3D, 0x34, 0xF0, 0x62, 0x46, 0x40, 0x80, 0x63, 0x38, 0xC6, 0x70, 0x64, 0x26, 0x22, 0x80,
-0x65, 0x0F, 0x6D, 0xF0, 0x66, 0x06, 0x04, 0x80, 0x67, 0x01, 0xC4, 0xF0, 0x67, 0xE5, 0xE6, 0x80,
-0x68, 0xD8, 0x6C, 0x70, 0x69, 0xC5, 0xC8, 0x80, 0x6A, 0xAF, 0x13, 0xF0, 0x6B, 0xA5, 0xAA, 0x80,
-0x6C, 0xAA, 0xA5, 0x70, 0x6D, 0x8E, 0xC7, 0x00, 0x6E, 0x78, 0x12, 0x70, 0x6F, 0x6E, 0xA9, 0x00,
-0x70, 0x4E, 0xB9, 0xF0, 0x71, 0x4E, 0x8B, 0x00, 0x72, 0x4A, 0x4B, 0x70, 0x73, 0x2E, 0x6D, 0x00,
-0x74, 0x17, 0xB8, 0x70, 0x75, 0x0E, 0x4F, 0x00, 0x75, 0xEE, 0x5F, 0xF0, 0x76, 0xF7, 0x6B, 0x80,
-0x77, 0xE9, 0xF1, 0x70, 0x78, 0xD7, 0x4D, 0x80, 0x79, 0xB7, 0x5E, 0x70, 0x7A, 0xB7, 0x2F, 0x80,
-0x7B, 0xB2, 0xEF, 0xF0, 0x7C, 0x97, 0x11, 0x80, 0x7D, 0x89, 0x97, 0x70, 0x7E, 0x76, 0xF3, 0x80,
-0x7F, 0x57, 0x04, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
+0x52, 0x50, 0x99, 0xF0, 0x53, 0x34, 0xBB, 0x80, 0x54, 0x30, 0x7B, 0xF0, 0x55, 0x14, 0x9D, 0x80,
+0x56, 0x10, 0x5D, 0xF0, 0x56, 0xF4, 0x7F, 0x80, 0x57, 0xF0, 0x3F, 0xF0, 0x58, 0xD4, 0x61, 0x80,
+0x59, 0xD9, 0x5C, 0x70, 0x5A, 0xB4, 0x43, 0x80, 0x5B, 0xB9, 0x3E, 0x70, 0x5C, 0x9D, 0x60, 0x00,
+0x5D, 0x99, 0x20, 0x70, 0x5E, 0x7D, 0x42, 0x00, 0x5F, 0x79, 0x02, 0x70, 0x60, 0x5D, 0x24, 0x00,
+0x61, 0x58, 0xE4, 0x70, 0x62, 0x3D, 0x06, 0x00, 0x63, 0x38, 0xC6, 0x70, 0x64, 0x1C, 0xE8, 0x00,
+0x65, 0x21, 0xE2, 0xF0, 0x66, 0x06, 0x04, 0x80, 0x67, 0x01, 0xC4, 0xF0, 0x67, 0xE5, 0xE6, 0x80,
+0x68, 0xE1, 0xA6, 0xF0, 0x69, 0xC5, 0xC8, 0x80, 0x6A, 0xC1, 0x88, 0xF0, 0x6B, 0xA5, 0xAA, 0x80,
+0x6C, 0xA2, 0xBC, 0x70, 0x6D, 0x85, 0x8C, 0x80, 0x6E, 0x8A, 0x87, 0x70, 0x6F, 0x65, 0x6E, 0x80,
+0x70, 0x6A, 0x69, 0x70, 0x71, 0x4E, 0x8B, 0x00, 0x72, 0x4A, 0x4B, 0x70, 0x73, 0x2E, 0x6D, 0x00,
+0x74, 0x2A, 0x2D, 0x70, 0x75, 0x0E, 0x4F, 0x00, 0x76, 0x0A, 0x0F, 0x70, 0x76, 0xEE, 0x31, 0x00,
+0x77, 0xE9, 0xF1, 0x70, 0x78, 0xCE, 0x13, 0x00, 0x79, 0xD3, 0x0D, 0xF0, 0x7A, 0xAD, 0xF5, 0x00,
+0x7B, 0xB2, 0xEF, 0xF0, 0x7C, 0x97, 0x11, 0x80, 0x7D, 0x92, 0xD1, 0xF0, 0x7E, 0x76, 0xF3, 0x80,
+0x7F, 0x72, 0xB3, 0xF0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
@@ -11767,20 +11782,20 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50,
0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xDC, 0xA9, 0x50, 0x49, 0x03, 0xF9, 0x50,
0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0x9C, 0x6D, 0x50, 0x4C, 0xCC, 0xF7, 0xD0,
-0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xBF, 0x4E, 0xD0, 0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x8C, 0xBB, 0xD0,
-0x51, 0x3C, 0x13, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x4C, 0x7F, 0xD0,
-0x54, 0xFB, 0xD7, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x15, 0x7E, 0x50,
-0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xD5, 0x42, 0x50,
-0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x64, 0x7B, 0xD0, 0x5F, 0x95, 0x06, 0x50,
-0x60, 0x4D, 0x98, 0x50, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x2D, 0x7A, 0x50, 0x63, 0x5E, 0x04, 0xD0,
-0x64, 0x0D, 0x5C, 0x50, 0x65, 0x3D, 0xE6, 0xD0, 0x65, 0xED, 0x3E, 0x50, 0x67, 0x1D, 0xC8, 0xD0,
-0x67, 0xCD, 0x20, 0x50, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xAD, 0x02, 0x50, 0x6A, 0xDD, 0x8C, 0xD0,
-0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x76, 0x00, 0xD0, 0x6E, 0xA6, 0x8B, 0x50,
-0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x35, 0xC4, 0xD0, 0x72, 0x66, 0x4F, 0x50,
-0x73, 0x15, 0xA6, 0xD0, 0x74, 0x46, 0x31, 0x50, 0x74, 0xFE, 0xC3, 0x50, 0x76, 0x2F, 0x4D, 0xD0,
-0x76, 0xDE, 0xA5, 0x50, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xBE, 0x87, 0x50, 0x79, 0xEF, 0x11, 0xD0,
-0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0x7E, 0x4B, 0x50, 0x7D, 0xAE, 0xD5, 0xD0,
-0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xBF, 0x4E, 0xD0, 0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x95, 0xF6, 0x50,
+0x51, 0x3C, 0x13, 0x50, 0x52, 0x75, 0xD8, 0x50, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x55, 0xBA, 0x50,
+0x54, 0xFB, 0xD7, 0x50, 0x56, 0x35, 0x9C, 0x50, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x1E, 0xB8, 0xD0,
+0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xFE, 0x9A, 0xD0, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xDE, 0x7C, 0xD0,
+0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xBE, 0x5E, 0xD0, 0x5E, 0x64, 0x7B, 0xD0, 0x5F, 0x9E, 0x40, 0xD0,
+0x60, 0x4D, 0x98, 0x50, 0x61, 0x87, 0x5D, 0x50, 0x62, 0x2D, 0x7A, 0x50, 0x63, 0x67, 0x3F, 0x50,
+0x64, 0x0D, 0x5C, 0x50, 0x65, 0x47, 0x21, 0x50, 0x65, 0xED, 0x3E, 0x50, 0x67, 0x27, 0x03, 0x50,
+0x67, 0xCD, 0x20, 0x50, 0x69, 0x06, 0xE5, 0x50, 0x69, 0xAD, 0x02, 0x50, 0x6A, 0xE6, 0xC7, 0x50,
+0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xCF, 0xE3, 0xD0, 0x6D, 0x76, 0x00, 0xD0, 0x6E, 0xAF, 0xC5, 0xD0,
+0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x8F, 0xA7, 0xD0, 0x71, 0x35, 0xC4, 0xD0, 0x72, 0x6F, 0x89, 0xD0,
+0x73, 0x15, 0xA6, 0xD0, 0x74, 0x4F, 0x6B, 0xD0, 0x74, 0xFE, 0xC3, 0x50, 0x76, 0x38, 0x88, 0x50,
+0x76, 0xDE, 0xA5, 0x50, 0x78, 0x18, 0x6A, 0x50, 0x78, 0xBE, 0x87, 0x50, 0x79, 0xF8, 0x4C, 0x50,
+0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xD8, 0x2E, 0x50, 0x7C, 0x7E, 0x4B, 0x50, 0x7D, 0xB8, 0x10, 0x50,
+0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x97, 0xF2, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -16062,19 +16077,19 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x46, 0xEC, 0x63, 0xF0, 0x47, 0xEC, 0x35, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x49, 0xCC, 0x17, 0x00,
0x4A, 0xBE, 0x9C, 0xF0, 0x4B, 0xAB, 0xF9, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x4D, 0x95, 0x15, 0x80,
0x4E, 0x87, 0x9B, 0x70, 0x4F, 0x74, 0xF7, 0x80, 0x50, 0x5E, 0x42, 0xF0, 0x51, 0x54, 0xD9, 0x80,
-0x52, 0x2B, 0xAF, 0xF0, 0x53, 0x34, 0xBB, 0x80, 0x54, 0x27, 0x41, 0x70, 0x55, 0x14, 0x9D, 0x80,
-0x55, 0xFD, 0xE8, 0xF0, 0x56, 0xFD, 0xBA, 0x00, 0x57, 0xF9, 0x7A, 0x70, 0x58, 0xDD, 0x9C, 0x00,
-0x59, 0xC6, 0xE7, 0x70, 0x5A, 0xBD, 0x7E, 0x00, 0x5B, 0x9D, 0x8E, 0xF0, 0x5C, 0x9D, 0x60, 0x00,
-0x5D, 0x99, 0x20, 0x70, 0x5E, 0x7D, 0x42, 0x00, 0x5F, 0x6F, 0xC7, 0xF0, 0x60, 0x5D, 0x24, 0x00,
-0x61, 0x3D, 0x34, 0xF0, 0x62, 0x46, 0x40, 0x80, 0x63, 0x38, 0xC6, 0x70, 0x64, 0x26, 0x22, 0x80,
-0x65, 0x0F, 0x6D, 0xF0, 0x66, 0x06, 0x04, 0x80, 0x67, 0x01, 0xC4, 0xF0, 0x67, 0xE5, 0xE6, 0x80,
-0x68, 0xD8, 0x6C, 0x70, 0x69, 0xC5, 0xC8, 0x80, 0x6A, 0xAF, 0x13, 0xF0, 0x6B, 0xA5, 0xAA, 0x80,
-0x6C, 0xAA, 0xA5, 0x70, 0x6D, 0x8E, 0xC7, 0x00, 0x6E, 0x78, 0x12, 0x70, 0x6F, 0x6E, 0xA9, 0x00,
-0x70, 0x4E, 0xB9, 0xF0, 0x71, 0x4E, 0x8B, 0x00, 0x72, 0x4A, 0x4B, 0x70, 0x73, 0x2E, 0x6D, 0x00,
-0x74, 0x17, 0xB8, 0x70, 0x75, 0x0E, 0x4F, 0x00, 0x75, 0xEE, 0x5F, 0xF0, 0x76, 0xF7, 0x6B, 0x80,
-0x77, 0xE9, 0xF1, 0x70, 0x78, 0xD7, 0x4D, 0x80, 0x79, 0xB7, 0x5E, 0x70, 0x7A, 0xB7, 0x2F, 0x80,
-0x7B, 0xB2, 0xEF, 0xF0, 0x7C, 0x97, 0x11, 0x80, 0x7D, 0x89, 0x97, 0x70, 0x7E, 0x76, 0xF3, 0x80,
-0x7F, 0x57, 0x04, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
+0x52, 0x50, 0x99, 0xF0, 0x53, 0x34, 0xBB, 0x80, 0x54, 0x30, 0x7B, 0xF0, 0x55, 0x14, 0x9D, 0x80,
+0x56, 0x10, 0x5D, 0xF0, 0x56, 0xF4, 0x7F, 0x80, 0x57, 0xF0, 0x3F, 0xF0, 0x58, 0xD4, 0x61, 0x80,
+0x59, 0xD9, 0x5C, 0x70, 0x5A, 0xB4, 0x43, 0x80, 0x5B, 0xB9, 0x3E, 0x70, 0x5C, 0x9D, 0x60, 0x00,
+0x5D, 0x99, 0x20, 0x70, 0x5E, 0x7D, 0x42, 0x00, 0x5F, 0x79, 0x02, 0x70, 0x60, 0x5D, 0x24, 0x00,
+0x61, 0x58, 0xE4, 0x70, 0x62, 0x3D, 0x06, 0x00, 0x63, 0x38, 0xC6, 0x70, 0x64, 0x1C, 0xE8, 0x00,
+0x65, 0x21, 0xE2, 0xF0, 0x66, 0x06, 0x04, 0x80, 0x67, 0x01, 0xC4, 0xF0, 0x67, 0xE5, 0xE6, 0x80,
+0x68, 0xE1, 0xA6, 0xF0, 0x69, 0xC5, 0xC8, 0x80, 0x6A, 0xC1, 0x88, 0xF0, 0x6B, 0xA5, 0xAA, 0x80,
+0x6C, 0xA2, 0xBC, 0x70, 0x6D, 0x85, 0x8C, 0x80, 0x6E, 0x8A, 0x87, 0x70, 0x6F, 0x65, 0x6E, 0x80,
+0x70, 0x6A, 0x69, 0x70, 0x71, 0x4E, 0x8B, 0x00, 0x72, 0x4A, 0x4B, 0x70, 0x73, 0x2E, 0x6D, 0x00,
+0x74, 0x2A, 0x2D, 0x70, 0x75, 0x0E, 0x4F, 0x00, 0x76, 0x0A, 0x0F, 0x70, 0x76, 0xEE, 0x31, 0x00,
+0x77, 0xE9, 0xF1, 0x70, 0x78, 0xCE, 0x13, 0x00, 0x79, 0xD3, 0x0D, 0xF0, 0x7A, 0xAD, 0xF5, 0x00,
+0x7B, 0xB2, 0xEF, 0xF0, 0x7C, 0x97, 0x11, 0x80, 0x7D, 0x92, 0xD1, 0xF0, 0x7E, 0x76, 0xF3, 0x80,
+0x7F, 0x72, 0xB3, 0xF0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
@@ -16126,7 +16141,7 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Libya */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xA1, 0xF2, 0xC1, 0x24,
+0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xA1, 0xF2, 0xC1, 0x24,
0xDD, 0xBB, 0xB1, 0x10, 0xDE, 0x23, 0xAD, 0x60, 0xE1, 0x78, 0xD2, 0x10, 0xE1, 0xE7, 0x65, 0xE0,
0xE5, 0x2F, 0x3F, 0x70, 0xE5, 0xA9, 0xCC, 0xE0, 0xEB, 0x4E, 0xC6, 0xF0, 0x16, 0x92, 0x42, 0x60,
0x17, 0x08, 0xF7, 0x70, 0x17, 0xFA, 0x2B, 0xE0, 0x18, 0xEA, 0x2A, 0xF0, 0x19, 0xDB, 0x5F, 0x60,
@@ -16134,12 +16149,28 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x1E, 0x93, 0x0B, 0x70, 0x1F, 0x82, 0xEE, 0x60, 0x20, 0x70, 0x4A, 0x70, 0x21, 0x61, 0x7E, 0xE0,
0x22, 0x52, 0xCF, 0x70, 0x23, 0x44, 0x03, 0xE0, 0x24, 0x34, 0x02, 0xF0, 0x25, 0x25, 0x37, 0x60,
0x26, 0x40, 0xB7, 0xF0, 0x32, 0x4E, 0xF1, 0x60, 0x33, 0x44, 0x36, 0x70, 0x34, 0x35, 0x6A, 0xE0,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x0C,
-0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
-0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x9D, 0x99, 0x00, 0x51, 0x54, 0xD9, 0x80, 0x52, 0x69, 0xB4, 0x80, 0x53, 0x34, 0xBB, 0x80,
+0x54, 0x52, 0xD1, 0x00, 0x55, 0x14, 0x9D, 0x80, 0x56, 0x32, 0xB3, 0x00, 0x56, 0xF4, 0x7F, 0x80,
+0x58, 0x12, 0x95, 0x00, 0x58, 0xDD, 0x9C, 0x00, 0x59, 0xF2, 0x77, 0x00, 0x5A, 0xBD, 0x7E, 0x00,
+0x5B, 0xD2, 0x59, 0x00, 0x5C, 0x9D, 0x60, 0x00, 0x5D, 0xB2, 0x3B, 0x00, 0x5E, 0x7D, 0x42, 0x00,
+0x5F, 0x9B, 0x57, 0x80, 0x60, 0x5D, 0x24, 0x00, 0x61, 0x7B, 0x39, 0x80, 0x62, 0x3D, 0x06, 0x00,
+0x63, 0x5B, 0x1B, 0x80, 0x64, 0x26, 0x22, 0x80, 0x65, 0x3A, 0xFD, 0x80, 0x66, 0x06, 0x04, 0x80,
+0x67, 0x1A, 0xDF, 0x80, 0x67, 0xE5, 0xE6, 0x80, 0x69, 0x03, 0xFC, 0x00, 0x69, 0xC5, 0xC8, 0x80,
+0x6A, 0xE3, 0xDE, 0x00, 0x6B, 0xA5, 0xAA, 0x80, 0x6C, 0xC3, 0xC0, 0x00, 0x6D, 0x8E, 0xC7, 0x00,
+0x6E, 0xA3, 0xA2, 0x00, 0x6F, 0x6E, 0xA9, 0x00, 0x70, 0x83, 0x84, 0x00, 0x71, 0x4E, 0x8B, 0x00,
+0x72, 0x63, 0x66, 0x00, 0x73, 0x2E, 0x6D, 0x00, 0x74, 0x4C, 0x82, 0x80, 0x75, 0x0E, 0x4F, 0x00,
+0x76, 0x2C, 0x64, 0x80, 0x76, 0xEE, 0x31, 0x00, 0x78, 0x0C, 0x46, 0x80, 0x78, 0xD7, 0x4D, 0x80,
+0x79, 0xEC, 0x28, 0x80, 0x7A, 0xB7, 0x2F, 0x80, 0x7B, 0xCC, 0x0A, 0x80, 0x7C, 0x97, 0x11, 0x80,
+0x7D, 0xB5, 0x27, 0x00, 0x7E, 0x76, 0xF3, 0x80, 0x7F, 0x95, 0x09, 0x00, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x0C, 0x5C,
+0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
+0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54,
+0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* MET */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16559,14 +16590,30 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Pacific/Apia */
0x50, 0x48, 0x50, 0x31, 0x01, 0x57, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0x91, 0x05, 0xFC, 0x00,
+0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0x91, 0x05, 0xFC, 0x00,
0xDA, 0x62, 0x04, 0x38, 0x4C, 0x9F, 0x27, 0xB0, 0x4D, 0x97, 0x2B, 0xE0, 0x4E, 0x7D, 0xE2, 0x60,
-0x4E, 0xFD, 0x8B, 0xA0, 0x4F, 0x77, 0x0D, 0xE0, 0x01, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0xFF,
-0xFF, 0x5F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00,
-0x09, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0D, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x0D, 0x00, 0x00, 0xB6,
-0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x57, 0x53, 0x54, 0x00,
-0x57, 0x53, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x38, 0x9A, 0x00, 0x0C, 0x9D, 0x2A, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xFD, 0x8B, 0xA0, 0x4F, 0x77, 0x0D, 0xE0, 0x50, 0x66, 0xFE, 0xE0, 0x51, 0x60, 0x2A, 0x60,
+0x52, 0x46, 0xE0, 0xE0, 0x53, 0x40, 0x0C, 0x60, 0x54, 0x26, 0xC2, 0xE0, 0x55, 0x1F, 0xEE, 0x60,
+0x56, 0x06, 0xA4, 0xE0, 0x56, 0xFF, 0xD0, 0x60, 0x57, 0xE6, 0x86, 0xE0, 0x58, 0xDF, 0xB2, 0x60,
+0x59, 0xC6, 0x68, 0xE0, 0x5A, 0xBF, 0x94, 0x60, 0x5B, 0xAF, 0x85, 0x60, 0x5C, 0xA8, 0xB0, 0xE0,
+0x5D, 0x8F, 0x67, 0x60, 0x5E, 0x88, 0x92, 0xE0, 0x5F, 0x6F, 0x49, 0x60, 0x60, 0x68, 0x74, 0xE0,
+0x61, 0x4F, 0x2B, 0x60, 0x62, 0x48, 0x56, 0xE0, 0x63, 0x2F, 0x0D, 0x60, 0x64, 0x28, 0x38, 0xE0,
+0x65, 0x0E, 0xEF, 0x60, 0x66, 0x11, 0x55, 0x60, 0x66, 0xF8, 0x0B, 0xE0, 0x67, 0xF1, 0x37, 0x60,
+0x68, 0xD7, 0xED, 0xE0, 0x69, 0xD1, 0x19, 0x60, 0x6A, 0xB7, 0xCF, 0xE0, 0x6B, 0xB0, 0xFB, 0x60,
+0x6C, 0x97, 0xB1, 0xE0, 0x6D, 0x90, 0xDD, 0x60, 0x6E, 0x77, 0x93, 0xE0, 0x6F, 0x70, 0xBF, 0x60,
+0x70, 0x60, 0xB0, 0x60, 0x71, 0x59, 0xDB, 0xE0, 0x72, 0x40, 0x92, 0x60, 0x73, 0x39, 0xBD, 0xE0,
+0x74, 0x20, 0x74, 0x60, 0x75, 0x19, 0x9F, 0xE0, 0x76, 0x00, 0x56, 0x60, 0x76, 0xF9, 0x81, 0xE0,
+0x77, 0xE0, 0x38, 0x60, 0x78, 0xD9, 0x63, 0xE0, 0x79, 0xC0, 0x1A, 0x60, 0x7A, 0xB9, 0x45, 0xE0,
+0x7B, 0xA9, 0x36, 0xE0, 0x7C, 0xA2, 0x62, 0x60, 0x7D, 0x89, 0x18, 0xE0, 0x7E, 0x82, 0x44, 0x60,
+0x7F, 0x68, 0xFA, 0xE0, 0x01, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF,
+0x5F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x09,
+0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0D, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x0D, 0x00, 0x00, 0xB6, 0xD0,
+0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x57, 0x53, 0x54, 0x00, 0x57,
+0x53, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x74, 0x38, 0x9A, 0x00, 0x0C, 0x9D, 0x2A, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Auckland */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4E, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16768,22 +16815,38 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
/* Pacific/Fakaofo */
0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x4E, 0xFD, 0x8B, 0xA0,
-0x01, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xE0, 0x00, 0x00, 0x54, 0x4B, 0x54,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x4E, 0xFD, 0x99, 0xB0,
+0x01, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x00, 0x54, 0x4B, 0x54,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x09, 0x65, 0x00, 0x0D, 0x60, 0x7A, 0x00, 0x00, 0x00,
0x00,
/* Pacific/Fiji */
0x50, 0x48, 0x50, 0x31, 0x01, 0x46, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x9A, 0x13, 0xB2, 0x3C,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x9A, 0x13, 0xB2, 0x3C,
0x36, 0x3B, 0x17, 0xE0, 0x36, 0xD7, 0xFA, 0x60, 0x38, 0x24, 0x34, 0x60, 0x38, 0xB7, 0xDC, 0x60,
0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60, 0x4D, 0x72, 0x41, 0xE0,
-0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x00, 0x00, 0xA7, 0x44, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00,
-0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82,
-0x00, 0x00, 0x00, 0x00,
+0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x50, 0x82, 0xAE, 0x60, 0x50, 0xFA, 0xA6, 0xE0,
+0x52, 0x62, 0x90, 0x60, 0x52, 0xDA, 0x88, 0xE0, 0x54, 0x42, 0x72, 0x60, 0x54, 0xBA, 0x6A, 0xE0,
+0x56, 0x22, 0x54, 0x60, 0x56, 0xA3, 0x87, 0x60, 0x58, 0x0B, 0x70, 0xE0, 0x58, 0x83, 0x69, 0x60,
+0x59, 0xEB, 0x52, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xCB, 0x34, 0xE0, 0x5C, 0x43, 0x2D, 0x60,
+0x5D, 0xAB, 0x16, 0xE0, 0x5E, 0x23, 0x0F, 0x60, 0x5F, 0x8A, 0xF8, 0xE0, 0x60, 0x0C, 0x2B, 0xE0,
+0x61, 0x74, 0x15, 0x60, 0x61, 0xEC, 0x0D, 0xE0, 0x63, 0x53, 0xF7, 0x60, 0x63, 0xCB, 0xEF, 0xE0,
+0x65, 0x33, 0xD9, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x13, 0xBB, 0x60, 0x67, 0x8B, 0xB3, 0xE0,
+0x68, 0xF3, 0x9D, 0x60, 0x69, 0x6B, 0x95, 0xE0, 0x6A, 0xD3, 0x7F, 0x60, 0x6B, 0x54, 0xB2, 0x60,
+0x6C, 0xBC, 0x9B, 0xE0, 0x6D, 0x34, 0x94, 0x60, 0x6E, 0x9C, 0x7D, 0xE0, 0x6F, 0x14, 0x76, 0x60,
+0x70, 0x7C, 0x5F, 0xE0, 0x70, 0xF4, 0x58, 0x60, 0x72, 0x5C, 0x41, 0xE0, 0x72, 0xD4, 0x3A, 0x60,
+0x74, 0x3C, 0x23, 0xE0, 0x74, 0xB4, 0x1C, 0x60, 0x76, 0x25, 0x40, 0x60, 0x76, 0x9D, 0x38, 0xE0,
+0x78, 0x05, 0x22, 0x60, 0x78, 0x7D, 0x1A, 0xE0, 0x79, 0xE5, 0x04, 0x60, 0x7A, 0x5C, 0xFC, 0xE0,
+0x7B, 0xC4, 0xE6, 0x60, 0x7C, 0x3C, 0xDE, 0xE0, 0x7D, 0xA4, 0xC8, 0x60, 0x7E, 0x1C, 0xC0, 0xE0,
+0x7F, 0x84, 0xAA, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x00, 0x00, 0xA7, 0x44, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00, 0x00,
+0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82, 0x00,
+0x00, 0x00, 0x00,
/* Pacific/Funafuti */
0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18175,4 +18238,4 @@ const unsigned char timelib_timezone_db_data_builtin[257943] = {
0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
0x00, 0x00, 0x00, 0x00, };
-const timelib_tzdb timezonedb_builtin = { "2012.3", 576, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2012.10", 576, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c
index 6085bb14d..37b4f4332 100644
--- a/ext/date/lib/tm2unixtime.c
+++ b/ext/date/lib/tm2unixtime.c
@@ -220,55 +220,52 @@ static void do_adjust_relative(timelib_time* time)
static void do_adjust_special_weekday(timelib_time* time)
{
- timelib_sll current_dow, count;
+ timelib_sll count, dow, rem;
count = time->relative.special.amount;
+ dow = timelib_day_of_week(time->y, time->m, time->d);
- current_dow = timelib_day_of_week(time->y, time->m, time->d);
- if (count == 0) {
- /* skip over saturday and sunday */
- if (current_dow == 6) {
- time->d += 2;
- }
- /* skip over sunday */
- if (current_dow == 0) {
- time->d += 1;
- }
- } else if (count > 0) {
- /* skip over saturday and sunday */
- if (current_dow == 5) {
- time->d += 2;
- }
- /* skip over sunday */
- if (current_dow == 6) {
+ /* Add increments of 5 weekdays as a week, leaving the DOW unchanged. */
+ time->d += (count / 5) * 7;
+
+ /* Deal with the remainder. */
+ rem = (count % 5);
+
+ if (count > 0) {
+ if (rem == 0) {
+ /* Head back to Friday if we stop on the weekend. */
+ if (dow == 0) {
+ time->d -= 2;
+ } else if (dow == 6) {
+ time->d -= 1;
+ }
+ } else if (dow == 6) {
+ /* We ended up on Saturday, but there's still work to do, so move
+ * to Sunday and continue from there. */
time->d += 1;
- }
- /* add increments of 5 weekdays as a week */
- time->d += (count / 5) * 7;
- /* if current DOW plus the remainder > 5, add two days */
- current_dow = timelib_day_of_week(time->y, time->m, time->d);
- time->d += (count % 5);
- if ((count % 5) + current_dow > 5) {
+ } else if (dow + rem > 5) {
+ /* We're on a weekday, but we're going past Friday, so skip right
+ * over the weekend. */
time->d += 2;
}
- } else if (count < 0) {
- /* skip over sunday and saturday */
- if (current_dow == 1) {
- time->d -= 2;
- }
- /* skip over satruday */
- if (current_dow == 0 ) {
+ } else {
+ /* Completely mirror the forward direction. This also covers the 0
+ * case, since if we start on the weekend, we want to move forward as
+ * if we stopped there while going backwards. */
+ if (rem == 0) {
+ if (dow == 6) {
+ time->d += 2;
+ } else if (dow == 0) {
+ time->d += 1;
+ }
+ } else if (dow == 0) {
time->d -= 1;
- }
- /* subtract increments of 5 weekdays as a week */
- time->d += (count / 5) * 7;
- /* if current DOW minus the remainder < 0, subtract two days */
- current_dow = timelib_day_of_week(time->y, time->m, time->d);
- time->d += (count % 5);
- if ((count % 5) + current_dow < 1) {
+ } else if (dow + rem < 1) {
time->d -= 2;
}
}
+
+ time->d += rem;
}
static void do_adjust_special(timelib_time* time)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 13e7b753d..1b36894da 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -738,7 +738,6 @@ PHP_RSHUTDOWN_FUNCTION(date)
#define SUNFUNCS_RET_STRING 1
#define SUNFUNCS_RET_DOUBLE 2
-
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(date)
{
@@ -860,11 +859,17 @@ static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC)
timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) {
return Z_STRVAL(ztz);
}
- } else if (*DATEG(default_timezone) && timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
- return DATEG(default_timezone);
+ } else if (*DATEG(default_timezone)) {
+ if (timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
+ return DATEG(default_timezone);
+ }
+ /* Invalid date.timezone value */
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid date.timezone value '%s', we selected the timezone 'UTC' for now.", DATEG(default_timezone));
+ } else {
+ /* No date.timezone value */
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.");
}
/* Fallback to UTC */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.");
return "UTC";
}
@@ -882,7 +887,6 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D)
}
/* }}} */
-
/* {{{ date() and gmdate() data */
#include "ext/standard/php_smart_str.h"
@@ -1318,7 +1322,6 @@ PHPAPI signed long php_parse_date(char *string, signed long *now)
}
/* }}} */
-
/* {{{ proto int strtotime(string time [, int now ])
Convert string representation of date and time to a timestamp */
PHP_FUNCTION(strtotime)
@@ -1379,7 +1382,6 @@ PHP_FUNCTION(strtotime)
}
/* }}} */
-
/* {{{ php_mktime - (gm)mktime helper */
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
{
@@ -1488,7 +1490,6 @@ PHP_FUNCTION(gmmktime)
}
/* }}} */
-
/* {{{ proto bool checkdate(int month, int day, int year)
Returns true(1) if it is a valid date in gregorian calendar */
PHP_FUNCTION(checkdate)
diff --git a/ext/date/tests/bug55253.phpt b/ext/date/tests/bug55253.phpt
index 5751cc112..5751cc112 100755..100644
--- a/ext/date/tests/bug55253.phpt
+++ b/ext/date/tests/bug55253.phpt
diff --git a/ext/date/tests/bug61642.phpt b/ext/date/tests/bug61642.phpt
new file mode 100644
index 000000000..d03a814d8
--- /dev/null
+++ b/ext/date/tests/bug61642.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Bug #61642 (modify("+5 weekdays") returns Sunday)
+--INI--
+date.timezone=UTC
+--FILE--
+<?php
+// ±5 and ±10 (and any non-zero multiple of 5) is broken, but everything else
+// should already work correctly.
+$weekdays = range(-11, 11);
+$dates = array('2012-03-29', '2012-03-30', '2012-03-31', '2012-04-01', '2012-04-02', '2012-04-03', '2012-04-04', '2012-04-05');
+
+$header = array();
+
+foreach ($dates as $startdate) {
+ $date = new DateTime($startdate);
+
+ $header[] = $date->format('Y-m-d D');
+}
+
+echo '### ', implode(' ', $header), "\n\n";
+
+foreach ($weekdays as $days) {
+ $line = array();
+
+ printf('%+3d ', $days);
+
+ foreach ($dates as $startdate) {
+ $date = new DateTime($startdate);
+ $date->modify("{$days} weekdays");
+
+ $line[] = $date->format('Y-m-d D');
+ }
+
+ echo implode(' ', $line), "\n";
+}
+?>
+--EXPECTF--
+### 2012-03-29 Thu 2012-03-30 Fri 2012-03-31 Sat 2012-04-01 Sun 2012-04-02 Mon 2012-04-03 Tue 2012-04-04 Wed 2012-04-05 Thu
+
+-11 2012-03-14 Wed 2012-03-15 Thu 2012-03-16 Fri 2012-03-16 Fri 2012-03-16 Fri 2012-03-19 Mon 2012-03-20 Tue 2012-03-21 Wed
+-10 2012-03-15 Thu 2012-03-16 Fri 2012-03-19 Mon 2012-03-19 Mon 2012-03-19 Mon 2012-03-20 Tue 2012-03-21 Wed 2012-03-22 Thu
+ -9 2012-03-16 Fri 2012-03-19 Mon 2012-03-20 Tue 2012-03-20 Tue 2012-03-20 Tue 2012-03-21 Wed 2012-03-22 Thu 2012-03-23 Fri
+ -8 2012-03-19 Mon 2012-03-20 Tue 2012-03-21 Wed 2012-03-21 Wed 2012-03-21 Wed 2012-03-22 Thu 2012-03-23 Fri 2012-03-26 Mon
+ -7 2012-03-20 Tue 2012-03-21 Wed 2012-03-22 Thu 2012-03-22 Thu 2012-03-22 Thu 2012-03-23 Fri 2012-03-26 Mon 2012-03-27 Tue
+ -6 2012-03-21 Wed 2012-03-22 Thu 2012-03-23 Fri 2012-03-23 Fri 2012-03-23 Fri 2012-03-26 Mon 2012-03-27 Tue 2012-03-28 Wed
+ -5 2012-03-22 Thu 2012-03-23 Fri 2012-03-26 Mon 2012-03-26 Mon 2012-03-26 Mon 2012-03-27 Tue 2012-03-28 Wed 2012-03-29 Thu
+ -4 2012-03-23 Fri 2012-03-26 Mon 2012-03-27 Tue 2012-03-27 Tue 2012-03-27 Tue 2012-03-28 Wed 2012-03-29 Thu 2012-03-30 Fri
+ -3 2012-03-26 Mon 2012-03-27 Tue 2012-03-28 Wed 2012-03-28 Wed 2012-03-28 Wed 2012-03-29 Thu 2012-03-30 Fri 2012-04-02 Mon
+ -2 2012-03-27 Tue 2012-03-28 Wed 2012-03-29 Thu 2012-03-29 Thu 2012-03-29 Thu 2012-03-30 Fri 2012-04-02 Mon 2012-04-03 Tue
+ -1 2012-03-28 Wed 2012-03-29 Thu 2012-03-30 Fri 2012-03-30 Fri 2012-03-30 Fri 2012-04-02 Mon 2012-04-03 Tue 2012-04-04 Wed
+ +0 2012-03-29 Thu 2012-03-30 Fri 2012-04-02 Mon 2012-04-02 Mon 2012-04-02 Mon 2012-04-03 Tue 2012-04-04 Wed 2012-04-05 Thu
+ +1 2012-03-30 Fri 2012-04-02 Mon 2012-04-02 Mon 2012-04-02 Mon 2012-04-03 Tue 2012-04-04 Wed 2012-04-05 Thu 2012-04-06 Fri
+ +2 2012-04-02 Mon 2012-04-03 Tue 2012-04-03 Tue 2012-04-03 Tue 2012-04-04 Wed 2012-04-05 Thu 2012-04-06 Fri 2012-04-09 Mon
+ +3 2012-04-03 Tue 2012-04-04 Wed 2012-04-04 Wed 2012-04-04 Wed 2012-04-05 Thu 2012-04-06 Fri 2012-04-09 Mon 2012-04-10 Tue
+ +4 2012-04-04 Wed 2012-04-05 Thu 2012-04-05 Thu 2012-04-05 Thu 2012-04-06 Fri 2012-04-09 Mon 2012-04-10 Tue 2012-04-11 Wed
+ +5 2012-04-05 Thu 2012-04-06 Fri 2012-04-06 Fri 2012-04-06 Fri 2012-04-09 Mon 2012-04-10 Tue 2012-04-11 Wed 2012-04-12 Thu
+ +6 2012-04-06 Fri 2012-04-09 Mon 2012-04-09 Mon 2012-04-09 Mon 2012-04-10 Tue 2012-04-11 Wed 2012-04-12 Thu 2012-04-13 Fri
+ +7 2012-04-09 Mon 2012-04-10 Tue 2012-04-10 Tue 2012-04-10 Tue 2012-04-11 Wed 2012-04-12 Thu 2012-04-13 Fri 2012-04-16 Mon
+ +8 2012-04-10 Tue 2012-04-11 Wed 2012-04-11 Wed 2012-04-11 Wed 2012-04-12 Thu 2012-04-13 Fri 2012-04-16 Mon 2012-04-17 Tue
+ +9 2012-04-11 Wed 2012-04-12 Thu 2012-04-12 Thu 2012-04-12 Thu 2012-04-13 Fri 2012-04-16 Mon 2012-04-17 Tue 2012-04-18 Wed
++10 2012-04-12 Thu 2012-04-13 Fri 2012-04-13 Fri 2012-04-13 Fri 2012-04-16 Mon 2012-04-17 Tue 2012-04-18 Wed 2012-04-19 Thu
++11 2012-04-13 Fri 2012-04-16 Mon 2012-04-16 Mon 2012-04-16 Mon 2012-04-17 Tue 2012-04-18 Wed 2012-04-19 Thu 2012-04-20 Fri
diff --git a/ext/date/tests/bug62896.phpt b/ext/date/tests/bug62896.phpt
index 7584546b5..ccdcfb029 100644
--- a/ext/date/tests/bug62896.phpt
+++ b/ext/date/tests/bug62896.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #62896 Unixtimestamp may take on local times DST flag (this test will only be valid during CEST)
+--INI--
+date.timezone=Europe/Berlin
--FILE--
<?php
$tz = new DateTimeZone('Europe/Berlin');
diff --git a/ext/date/tests/date_default_timezone_get-4.phpt b/ext/date/tests/date_default_timezone_get-4.phpt
new file mode 100644
index 000000000..6d1982bc1
--- /dev/null
+++ b/ext/date/tests/date_default_timezone_get-4.phpt
@@ -0,0 +1,11 @@
+--TEST--
+date_default_timezone_get() function [4]
+--INI--
+date.timezone=Incorrect/Zone
+--FILE--
+<?php
+ echo date_default_timezone_get(), "\n";
+?>
+--EXPECTF--
+Warning: date_default_timezone_get(): Invalid date.timezone value 'Incorrect/Zone', we selected the timezone 'UTC' for now. in %sdate_default_timezone_get-4.php on line %d
+UTC
diff --git a/ext/date/tests/strtotime-mysql.phpt b/ext/date/tests/strtotime-mysql.phpt
index e5935bb16..e5935bb16 100755..100644
--- a/ext/date/tests/strtotime-mysql.phpt
+++ b/ext/date/tests/strtotime-mysql.phpt
diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c
index 08af43952..08af43952 100755..100644
--- a/ext/dba/dba_db1.c
+++ b/ext/dba/dba_db1.c
diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c
index d72f6b9cb..d72f6b9cb 100755..100644
--- a/ext/dba/dba_qdbm.c
+++ b/ext/dba/dba_qdbm.c
diff --git a/ext/dba/php_db1.h b/ext/dba/php_db1.h
index c0bb5f08b..c0bb5f08b 100755..100644
--- a/ext/dba/php_db1.h
+++ b/ext/dba/php_db1.h
diff --git a/ext/dba/tests/bug36436.phpt b/ext/dba/tests/bug36436.phpt
index 19254df3c..19254df3c 100755..100644
--- a/ext/dba/tests/bug36436.phpt
+++ b/ext/dba/tests/bug36436.phpt
diff --git a/ext/dba/tests/bug38698.phpt b/ext/dba/tests/bug38698.phpt
index 56dde8526..56dde8526 100755..100644
--- a/ext/dba/tests/bug38698.phpt
+++ b/ext/dba/tests/bug38698.phpt
diff --git a/ext/dba/tests/dba009.phpt b/ext/dba/tests/dba009.phpt
index 698657b2a..698657b2a 100755..100644
--- a/ext/dba/tests/dba009.phpt
+++ b/ext/dba/tests/dba009.phpt
diff --git a/ext/dba/tests/dba_db1.phpt b/ext/dba/tests/dba_db1.phpt
index a24600350..a24600350 100755..100644
--- a/ext/dba/tests/dba_db1.phpt
+++ b/ext/dba/tests/dba_db1.phpt
diff --git a/ext/dba/tests/dba_qdbm.phpt b/ext/dba/tests/dba_qdbm.phpt
index ef216d925..ef216d925 100755..100644
--- a/ext/dba/tests/dba_qdbm.phpt
+++ b/ext/dba/tests/dba_qdbm.phpt
diff --git a/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt b/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt
index a7766541d..a7766541d 100755..100644
--- a/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt
+++ b/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt
diff --git a/ext/dom/tests/DOMAttr_value_basic_001.phpt b/ext/dom/tests/DOMAttr_value_basic_001.phpt
index 51c4ac954..51c4ac954 100755..100644
--- a/ext/dom/tests/DOMAttr_value_basic_001.phpt
+++ b/ext/dom/tests/DOMAttr_value_basic_001.phpt
diff --git a/ext/dom/tests/DOMCharacterData_data_error_002.phpt b/ext/dom/tests/DOMCharacterData_data_error_002.phpt
index 401e0f2f8..401e0f2f8 100755..100644
--- a/ext/dom/tests/DOMCharacterData_data_error_002.phpt
+++ b/ext/dom/tests/DOMCharacterData_data_error_002.phpt
diff --git a/ext/dom/tests/DOMCharacterData_length_error_001.phpt b/ext/dom/tests/DOMCharacterData_length_error_001.phpt
index e8bf16ab9..e8bf16ab9 100755..100644
--- a/ext/dom/tests/DOMCharacterData_length_error_001.phpt
+++ b/ext/dom/tests/DOMCharacterData_length_error_001.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
index 38bc3fa3c..38bc3fa3c 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
index 51eb82e32..51eb82e32 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
index 41a833b5a..41a833b5a 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
index 93dd79260..93dd79260 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt
index 65c8d8678..65c8d8678 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
index eec790de6..eec790de6 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
index 594c3c429..594c3c429 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
index 5ffd53365..5ffd53365 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
index 275204f92..275204f92 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt
index d4817deca..d4817deca 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
index d3f0658c1..d3f0658c1 100755..100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 357f3cb03..357f3cb03 100755..100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
diff --git a/ext/ereg/regex.patch b/ext/ereg/regex.patch
new file mode 100644
index 000000000..864e6bb6d
--- /dev/null
+++ b/ext/ereg/regex.patch
@@ -0,0 +1,72 @@
+diff -u regex.orig/regerror.c regex/regerror.c
+--- regex.orig/regerror.c 2011-08-09 19:49:30.000000000 +0800
++++ regex/regerror.c 2011-08-12 10:45:57.000000000 +0800
+@@ -8,6 +8,7 @@
+ #include "regex.h"
+ #include "utils.h"
+ #include "regerror.ih"
++#include "php.h"
+
+ /*
+ = #define REG_OKAY 0
+@@ -74,17 +75,19 @@
+ char convbuf[50];
+
+ if (errcode == REG_ATOI)
+- s = regatoi(preg, convbuf);
++ s = regatoi(preg, convbuf, sizeof(convbuf));
+ else {
+ for (r = rerrs; r->code >= 0; r++)
+ if (r->code == target)
+ break;
+
+ if (errcode&REG_ITOA) {
+- if (r->code >= 0)
+- (void) strcpy(convbuf, r->name);
+- else
+- sprintf(convbuf, "REG_0x%x", target);
++ if (r->code >= 0) {
++ (void) strncpy(convbuf, r->name, sizeof(convbuf) - 1);
++ convbuf[sizeof(convbuf) - 1] = '\0';
++ } else {
++ snprintf(convbuf, sizeof(convbuf), "REG_0x%x", target);
++ }
+ assert(strlen(convbuf) < sizeof(convbuf));
+ s = convbuf;
+ } else
+@@ -106,12 +109,13 @@
+
+ /*
+ - regatoi - internal routine to implement REG_ATOI
+- == static char *regatoi(const regex_t *preg, char *localbuf);
++ == static char *regatoi(const regex_t *preg, char *localbuf, int bufsize);
+ */
+ static char *
+-regatoi(preg, localbuf)
++regatoi(preg, localbuf, bufsize)
+ const regex_t *preg;
+ char *localbuf;
++int bufsize;
+ {
+ register const struct rerr *r;
+
+@@ -121,6 +125,6 @@
+ if (r->code < 0)
+ return("0");
+
+- sprintf(localbuf, "%d", r->code);
++ snprintf(localbuf, bufsize, "%d", r->code);
+ return(localbuf);
+ }
+diff -u regex.orig/regerror.ih regex/regerror.ih
+--- regex.orig/regerror.ih 2011-08-09 19:49:00.000000000 +0800
++++ regex/regerror.ih 2011-08-09 19:41:07.000000000 +0800
+@@ -4,7 +4,7 @@
+ #endif
+
+ /* === regerror.c === */
+-static char *regatoi(const regex_t *preg, char *localbuf);
++static char *regatoi(const regex_t *preg, char *localbuf, int bufsize);
+
+ #ifdef __cplusplus
+ }
diff --git a/ext/exif/tests/bug34704.phpt b/ext/exif/tests/bug34704.phpt
index 7688ce861..7688ce861 100755..100644
--- a/ext/exif/tests/bug34704.phpt
+++ b/ext/exif/tests/bug34704.phpt
diff --git a/ext/exif/tests/bug60150.phpt b/ext/exif/tests/bug60150.phpt
index be01998fd..be01998fd 100755..100644
--- a/ext/exif/tests/bug60150.phpt
+++ b/ext/exif/tests/bug60150.phpt
diff --git a/ext/fileinfo/config.w32 b/ext/fileinfo/config.w32
index 46b87b56d..873a12c2f 100644
--- a/ext/fileinfo/config.w32
+++ b/ext/fileinfo/config.w32
@@ -4,22 +4,16 @@
ARG_ENABLE("fileinfo", "fileinfo support", "no");
if (PHP_FILEINFO != 'no') {
- if (CHECK_HEADER_ADD_INCLUDE("dirent.h", "CFLAGS_FILEINFO") &&
- CHECK_LIB("dirent_a.lib", "fileinfo", PHP_FILEINFO)) {
- LIBMAGIC_SOURCES=" apprentice.c apptype.c ascmagic.c \
- cdf.c cdf_time.c compress.c \
- encoding.c fsmagic.c funcs.c \
- is_tar.c magic.c print.c \
- readcdf.c readelf.c softmagic.c";
+ LIBMAGIC_SOURCES=" apprentice.c apptype.c ascmagic.c \
+ cdf.c cdf_time.c compress.c \
+ encoding.c fsmagic.c funcs.c \
+ is_tar.c magic.c print.c \
+ readcdf.c readelf.c softmagic.c";
- if (VCVERS < 1500) {
- ADD_FLAG('CFLAGS', '/Zm1000');
- }
+ if (VCVERS < 1500) {
+ ADD_FLAG('CFLAGS', '/Zm1000');
+ }
- EXTENSION('fileinfo', 'fileinfo.c', true, "/I" + configure_module_dirname + "/libmagic /I" + configure_module_dirname);
- ADD_SOURCES(configure_module_dirname + '\\libmagic', LIBMAGIC_SOURCES, "fileinfo");
- } else {
- WARNING("fileinfo not enabled; libraries and headers not found");
- PHP_FILEINFO = "no";
- }
+ EXTENSION('fileinfo', 'fileinfo.c', true, "/I" + configure_module_dirname + "/libmagic /I" + configure_module_dirname);
+ ADD_SOURCES(configure_module_dirname + '\\libmagic', LIBMAGIC_SOURCES, "fileinfo");
}
diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch
index 15f6a6dad..ecb178ffa 100644
--- a/ext/fileinfo/libmagic.patch
+++ b/ext/fileinfo/libmagic.patch
@@ -1,6 +1,6 @@
diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
---- libmagic.origin/apprentice.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/apprentice.c 2012-09-11 11:36:51.000000000 +0800
+--- libmagic.origin/apprentice.c Sat Dec 17 18:17:18 2011
++++ libmagic/apprentice.c Tue Oct 16 10:21:49 2012
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
@@ -10,7 +10,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
#include "file.h"
#ifndef lint
-@@ -36,18 +38,34 @@
+@@ -36,18 +38,31 @@
#endif /* lint */
#include "magic.h"
@@ -43,13 +43,11 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
-#ifdef QUICK
-#include <sys/mman.h>
-#endif
-+#ifndef PHP_WIN32
- #include <dirent.h>
-+#endif
+-#include <dirent.h>
#define EATAB {while (isascii((unsigned char) *l) && \
isspace((unsigned char) *l)) ++l;}
-@@ -112,12 +130,10 @@
+@@ -112,12 +127,10 @@
private int parse_strength(struct magic_set *, struct magic_entry *, const char *);
private int parse_apple(struct magic_set *, struct magic_entry *, const char *);
@@ -62,7 +60,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
private struct {
const char *name;
size_t len;
-@@ -131,38 +147,7 @@
+@@ -131,38 +144,7 @@
{ NULL, 0, NULL }
};
@@ -102,7 +100,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
static const struct type_tbl_s {
const char name[16];
-@@ -218,6 +203,10 @@
+@@ -218,6 +200,10 @@
# undef XX_NULL
};
@@ -113,7 +111,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
private int
get_type(const char *l, const char **t)
{
-@@ -275,15 +264,17 @@
+@@ -275,15 +261,17 @@
if (rv != 0)
return -1;
rv = apprentice_compile(ms, &magic, &nmagic, fn);
@@ -136,7 +134,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
if (rv != 0)
return -1;
}
-@@ -295,11 +286,7 @@
+@@ -295,11 +283,7 @@
return -1;
}
@@ -149,7 +147,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
ml->magic = magic;
ml->nmagic = nmagic;
-@@ -318,7 +305,6 @@
+@@ -318,7 +302,6 @@
}
return 0;
@@ -157,7 +155,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
}
protected void
-@@ -327,22 +313,18 @@
+@@ -327,22 +310,18 @@
if (p == NULL)
return;
switch (type) {
@@ -186,7 +184,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
default:
abort();
}
-@@ -355,23 +337,27 @@
+@@ -355,23 +334,27 @@
char *p, *mfn;
int file_err, errs = -1;
struct mlist *mlist;
@@ -223,7 +221,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
mlist->next = mlist->prev = mlist;
while (fn) {
-@@ -385,13 +371,13 @@
+@@ -385,13 +368,13 @@
fn = p;
}
if (errs == -1) {
@@ -240,7 +238,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
return mlist;
}
-@@ -524,6 +510,7 @@
+@@ -524,6 +507,7 @@
abort();
}
@@ -248,7 +246,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
/*
* Magic entries with no description get a bonus because they depend
* on subsequent magic entries to print something.
-@@ -539,8 +526,8 @@
+@@ -539,8 +523,8 @@
private int
apprentice_sort(const void *a, const void *b)
{
@@ -259,7 +257,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
size_t sa = apprentice_magic_strength(ma->mp);
size_t sb = apprentice_magic_strength(mb->mp);
if (sa == sb)
-@@ -671,12 +658,22 @@
+@@ -671,12 +655,22 @@
load_1(struct magic_set *ms, int action, const char *fn, int *errs,
struct magic_entry **marray, uint32_t *marraycount)
{
@@ -286,7 +284,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
if (errno != ENOENT)
file_error(ms, errno, "cannot read magic file `%s'",
fn);
-@@ -684,9 +681,12 @@
+@@ -684,9 +678,12 @@
return;
}
@@ -302,7 +300,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
if (len == 0) /* null line, garbage, etc */
continue;
if (line[len - 1] == '\n') {
-@@ -736,8 +736,7 @@
+@@ -736,8 +733,7 @@
break;
}
}
@@ -312,7 +310,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
}
/*
-@@ -754,23 +753,19 @@
+@@ -754,23 +750,21 @@
apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
const char *fn, int action)
{
@@ -325,8 +323,12 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
+ size_t files = 0, maxfiles = 0;
+ char **filearr = NULL;
struct stat st;
- DIR *dir;
- struct dirent *d;
+- DIR *dir;
+- struct dirent *d;
++ php_stream *dir;
++ php_stream_dirent d;
++
++ TSRMLS_FETCH();
ms->flags |= MAGIC_CHECK; /* Enable checks for parsed files */
@@ -341,28 +343,33 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
marraycount = 0;
/* print silly verbose header for USG compat. */
-@@ -778,14 +773,18 @@
+@@ -778,22 +772,26 @@
(void)fprintf(stderr, "%s\n", usg_hdr);
/* load directory or file */
- if (stat(fn, &st) == 0 && S_ISDIR(st.st_mode)) {
+- dir = opendir(fn);
+ /* FIXME: Read file names and sort them to prevent
+ non-determinism. See Debian bug #488562. */
+ if (php_sys_stat(fn, &st) == 0 && S_ISDIR(st.st_mode)) {
-+ int mflen;
-+ char mfn[MAXPATHLEN];
- dir = opendir(fn);
++ int mflen;
++ char mfn[MAXPATHLEN];
++
++ dir = php_stream_opendir(fn, REPORT_ERRORS, NULL);
if (!dir) {
errs++;
goto out;
}
- while ((d = readdir(dir)) != NULL) {
+- while ((d = readdir(dir)) != NULL) {
- if (asprintf(&mfn, "%s/%s", fn, d->d_name) < 0) {
-+ if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name)) < 0) {
++ while (php_stream_readdir(dir, &d)) {
++ if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d.d_name)) < 0) {
file_oomem(ms,
- strlen(fn) + strlen(d->d_name) + 2);
+- strlen(fn) + strlen(d->d_name) + 2);
++ strlen(fn) + strlen(d.d_name) + 2);
errs++;
-@@ -793,7 +792,6 @@
+- closedir(dir);
++ php_stream_closedir(dir);
goto out;
}
if (stat(mfn, &st) == -1 || !S_ISREG(st.st_mode)) {
@@ -375,7 +382,8 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
realloc(filearr, mlen))) == NULL) {
file_oomem(ms, mlen);
- free(mfn);
- closedir(dir);
+- closedir(dir);
++ php_stream_closedir(dir);
errs++;
goto out;
}
@@ -383,7 +391,8 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
- filearr[files++] = mfn;
+ filearr[files++] = estrndup(mfn, (mflen > sizeof(mfn) - 1)? sizeof(mfn) - 1: mflen);
}
- closedir(dir);
+- closedir(dir);
++ php_stream_closedir(dir);
qsort(filearr, files, sizeof(*filearr), cmpstrp);
for (i = 0; i < files; i++) {
load_1(ms, action, filearr[i], &errs, &marray,
@@ -512,7 +521,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
m->mimetype[0] = '\0'; /* initialise MIME type to none */
if (m->cont_level == 0)
++(*nmentryp); /* make room for next */
-@@ -2195,56 +2180,69 @@
+@@ -2195,56 +2180,79 @@
/*
* handle a compiled file.
@@ -543,6 +552,16 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
+ ret = 3;
+ goto internal_loaded;
+ }
++
++#ifdef PHP_WIN32
++ /* Don't bother on windows with php_stream_open_wrapper,
++ return to give apprentice_load() a chance. */
++ if (php_stream_stat_path_ex(fn, 0, &st, NULL) == SUCCESS) {
++ if (st.sb.st_mode & S_IFDIR) {
++ goto error2;
++ }
++ }
++#endif
dbname = mkdbname(ms, fn, 0);
if (dbname == NULL)
@@ -605,7 +624,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
ptr = (uint32_t *)(void *)*magicp;
if (*ptr != MAGICNO) {
if (swap4(*ptr) != MAGICNO) {
-@@ -2259,35 +2257,55 @@
+@@ -2259,35 +2267,55 @@
else
version = ptr[1];
if (version != VERSIONNO) {
@@ -677,7 +696,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
return -1;
}
-@@ -2301,42 +2319,49 @@
+@@ -2301,42 +2329,49 @@
apprentice_compile(struct magic_set *ms, struct magic **magicp,
uint32_t *nmagicp, const char *fn)
{
@@ -738,7 +757,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
return rv;
}
-@@ -2349,6 +2374,7 @@
+@@ -2349,6 +2384,7 @@
{
const char *p, *q;
char *buf;
@@ -746,7 +765,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
if (strip) {
if ((p = strrchr(fn, '/')) != NULL)
-@@ -2370,14 +2396,14 @@
+@@ -2370,14 +2406,14 @@
q++;
/* Compatibility with old code that looked in .mime */
if (ms->flags & MAGIC_MIME) {
@@ -765,7 +784,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
/* Compatibility with old code that looked in .mime */
if (strstr(p, ".mime") != NULL)
-@@ -2467,7 +2493,7 @@
+@@ -2467,7 +2503,7 @@
m->offset = swap4((uint32_t)m->offset);
m->in_offset = swap4((uint32_t)m->in_offset);
m->lineno = swap4((uint32_t)m->lineno);
@@ -775,8 +794,8 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.origin/ascmagic.c libmagic/ascmagic.c
---- libmagic.origin/ascmagic.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/ascmagic.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/ascmagic.c Sat Dec 17 18:17:18 2011
++++ libmagic/ascmagic.c Tue Apr 10 09:46:33 2012
@@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
@@ -801,8 +820,8 @@ diff -u libmagic.origin/ascmagic.c libmagic/ascmagic.c
return rv;
}
diff -u libmagic.origin/cdf.c libmagic/cdf.c
---- libmagic.origin/cdf.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/cdf.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/cdf.c Mon Feb 20 23:35:29 2012
++++ libmagic/cdf.c Tue Apr 10 09:46:33 2012
@@ -43,7 +43,17 @@
#include <err.h>
#endif
@@ -865,8 +884,8 @@ diff -u libmagic.origin/cdf.c libmagic/cdf.c
(void)fprintf(stderr, "timestamp %s\n", buf);
} else {
diff -u libmagic.origin/cdf.h libmagic/cdf.h
---- libmagic.origin/cdf.h 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/cdf.h 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/cdf.h Fri Feb 17 06:28:31 2012
++++ libmagic/cdf.h Tue Apr 10 09:46:34 2012
@@ -35,7 +35,7 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -903,8 +922,8 @@ diff -u libmagic.origin/cdf.h libmagic/cdf.h
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.origin/cdf_time.c libmagic/cdf_time.c
---- libmagic.origin/cdf_time.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/cdf_time.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/cdf_time.c Tue Dec 13 14:48:41 2011
++++ libmagic/cdf_time.c Tue Apr 10 09:46:34 2012
@@ -96,7 +96,7 @@
}
@@ -962,8 +981,8 @@ diff -u libmagic.origin/cdf_time.c libmagic/cdf_time.c
static const char *ref = "Sat Apr 23 01:30:00 1977";
char *p, *q;
diff -u libmagic.origin/compress.c libmagic/compress.c
---- libmagic.origin/compress.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/compress.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/compress.c Sat Dec 17 18:17:18 2011
++++ libmagic/compress.c Tue Apr 10 09:46:34 2012
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
@@ -1124,10 +1143,9 @@ diff -u libmagic.origin/compress.c libmagic/compress.c
}
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
-Only in libmagic: diff
diff -u libmagic.origin/file.h libmagic/file.h
---- libmagic.origin/file.h 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/file.h 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/file.h Tue Sep 20 17:30:14 2011
++++ libmagic/file.h Mon Apr 23 17:58:54 2012
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
@@ -1285,22 +1303,24 @@ diff -u libmagic.origin/file.h libmagic/file.h
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_GETLINE
-@@ -500,4 +487,12 @@
- #define FILE_RCSID(id)
+@@ -498,6 +485,14 @@
#endif
-
+ #else
+ #define FILE_RCSID(id)
++#endif
++
+#ifdef PHP_WIN32
+#define FINFO_LSEEK_FUNC _lseek
+#define FINFO_READ_FUNC _read
+#else
+#define FINFO_LSEEK_FUNC lseek
+#define FINFO_READ_FUNC read
-+#endif
-+
+ #endif
+
#endif /* __file_h__ */
diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
---- libmagic.origin/fsmagic.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/fsmagic.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/fsmagic.c Tue Aug 23 10:57:10 2011
++++ libmagic/fsmagic.c Tue Apr 10 09:46:34 2012
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
@@ -1511,10 +1531,10 @@ diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
-#else
- if (file_printf(ms, "block special") == -1)
- return -1;
--#endif
+ #endif
- }
- return 1;
- #endif
+-#endif
- /* TODO add code to handle V7 MUX and Blit MUX files */
+
#ifdef S_IFIFO
@@ -1624,8 +1644,8 @@ diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
/*
diff -u libmagic.origin/funcs.c libmagic/funcs.c
---- libmagic.origin/funcs.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/funcs.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/funcs.c Sat Dec 17 18:17:18 2011
++++ libmagic/funcs.c Mon Apr 23 17:58:54 2012
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
@@ -1920,8 +1940,8 @@ diff -u libmagic.origin/funcs.c libmagic/funcs.c
}
+
diff -u libmagic.origin/magic.c libmagic/magic.c
---- libmagic.origin/magic.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/magic.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/magic.c Thu May 26 03:27:59 2011
++++ libmagic/magic.c Tue Apr 10 09:46:34 2012
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
@@ -2298,8 +2318,8 @@ diff -u libmagic.origin/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.origin/magic.h libmagic/magic.h
---- libmagic.origin/magic.h 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/magic.h 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/magic.h Sun Dec 18 15:54:43 2011
++++ libmagic/magic.h Tue Apr 10 09:46:34 2012
@@ -85,6 +85,7 @@
const char *magic_getpath(const char *, int);
@@ -2317,9 +2337,9 @@ diff -u libmagic.origin/magic.h libmagic/magic.h
int magic_errno(magic_t);
diff -u libmagic.origin/print.c libmagic/print.c
---- libmagic.origin/print.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/print.c 2012-09-11 11:33:55.000000000 +0800
-@@ -29,6 +29,9 @@
+--- libmagic.origin/print.c Tue Sep 20 17:28:09 2011
++++ libmagic/print.c Tue Oct 16 10:13:39 2012
+@@ -29,12 +29,16 @@
* print.c - debugging printout routines
*/
@@ -2329,7 +2349,14 @@ diff -u libmagic.origin/print.c libmagic/print.c
#include "file.h"
#ifndef lint
-@@ -46,174 +49,21 @@
+ FILE_RCSID("@(#)$File: print.c,v 1.71 2011/09/20 15:28:09 christos Exp $")
+ #endif /* lint */
+
++#include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+@@ -45,174 +49,21 @@
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
@@ -2512,8 +2539,8 @@ diff -u libmagic.origin/print.c libmagic/print.c
protected const char *
diff -u libmagic.origin/readcdf.c libmagic/readcdf.c
---- libmagic.origin/readcdf.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/readcdf.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/readcdf.c Mon Feb 20 21:04:58 2012
++++ libmagic/readcdf.c Tue Apr 10 09:46:34 2012
@@ -30,7 +30,11 @@
#endif
@@ -2560,8 +2587,8 @@ diff -u libmagic.origin/readcdf.c libmagic/readcdf.c
if ((ec = strchr(c, '\n')) != NULL)
*ec = '\0';
diff -u libmagic.origin/readelf.c libmagic/readelf.c
---- libmagic.origin/readelf.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/readelf.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/readelf.c Tue Aug 23 10:57:10 2011
++++ libmagic/readelf.c Tue Apr 10 09:46:34 2012
@@ -49,7 +49,7 @@
off_t, int *, int);
private int doshn(struct magic_set *, int, int, int, off_t, int, size_t,
@@ -2717,8 +2744,8 @@ diff -u libmagic.origin/readelf.c libmagic/readelf.c
if (fstat(fd, &st) == -1) {
diff -u libmagic.origin/softmagic.c libmagic/softmagic.c
---- libmagic.origin/softmagic.c 2012-09-11 11:09:26.000000000 +0800
-+++ libmagic/softmagic.c 2012-09-11 11:33:55.000000000 +0800
+--- libmagic.origin/softmagic.c Sat Dec 17 18:17:18 2011
++++ libmagic/softmagic.c Fri May 25 09:59:25 2012
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c
index d11bd159a..787eb7936 100644
--- a/ext/fileinfo/libmagic/apprentice.c
+++ b/ext/fileinfo/libmagic/apprentice.c
@@ -63,9 +63,6 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.173 2011/12/08 12:38:24 rrt Exp $")
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
-#ifndef PHP_WIN32
-#include <dirent.h>
-#endif
#define EATAB {while (isascii((unsigned char) *l) && \
isspace((unsigned char) *l)) ++l;}
@@ -759,8 +756,10 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
size_t files = 0, maxfiles = 0;
char **filearr = NULL;
struct stat st;
- DIR *dir;
- struct dirent *d;
+ php_stream *dir;
+ php_stream_dirent d;
+
+ TSRMLS_FETCH();
ms->flags |= MAGIC_CHECK; /* Enable checks for parsed files */
@@ -776,19 +775,20 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
/* FIXME: Read file names and sort them to prevent
non-determinism. See Debian bug #488562. */
if (php_sys_stat(fn, &st) == 0 && S_ISDIR(st.st_mode)) {
- int mflen;
- char mfn[MAXPATHLEN];
- dir = opendir(fn);
+ int mflen;
+ char mfn[MAXPATHLEN];
+
+ dir = php_stream_opendir(fn, REPORT_ERRORS, NULL);
if (!dir) {
errs++;
goto out;
}
- while ((d = readdir(dir)) != NULL) {
- if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name)) < 0) {
+ while (php_stream_readdir(dir, &d)) {
+ if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d.d_name)) < 0) {
file_oomem(ms,
- strlen(fn) + strlen(d->d_name) + 2);
+ strlen(fn) + strlen(d.d_name) + 2);
errs++;
- closedir(dir);
+ php_stream_closedir(dir);
goto out;
}
if (stat(mfn, &st) == -1 || !S_ISREG(st.st_mode)) {
@@ -801,14 +801,14 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
if ((filearr = CAST(char **,
realloc(filearr, mlen))) == NULL) {
file_oomem(ms, mlen);
- closedir(dir);
+ php_stream_closedir(dir);
errs++;
goto out;
}
}
filearr[files++] = estrndup(mfn, (mflen > sizeof(mfn) - 1)? sizeof(mfn) - 1: mflen);
}
- closedir(dir);
+ php_stream_closedir(dir);
qsort(filearr, files, sizeof(*filearr), cmpstrp);
for (i = 0; i < files; i++) {
load_1(ms, action, filearr[i], &errs, &marray,
@@ -2206,6 +2206,16 @@ apprentice_map(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
goto internal_loaded;
}
+#ifdef PHP_WIN32
+ /* Don't bother on windows with php_stream_open_wrapper,
+ return to give apprentice_load() a chance. */
+ if (php_stream_stat_path_ex(fn, 0, &st, NULL) == SUCCESS) {
+ if (st.sb.st_mode & S_IFDIR) {
+ goto error2;
+ }
+ }
+#endif
+
dbname = mkdbname(ms, fn, 0);
if (dbname == NULL)
goto error2;
diff --git a/ext/fileinfo/libmagic/print.c b/ext/fileinfo/libmagic/print.c
index 8370f50c2..89c51b04c 100644
--- a/ext/fileinfo/libmagic/print.c
+++ b/ext/fileinfo/libmagic/print.c
@@ -28,7 +28,6 @@
/*
* print.c - debugging printout routines
*/
-
#define _GNU_SOURCE
#include "php.h"
diff --git a/ext/fileinfo/php_fileinfo.h b/ext/fileinfo/php_fileinfo.h
index 330bad89c..3f0326bfd 100644
--- a/ext/fileinfo/php_fileinfo.h
+++ b/ext/fileinfo/php_fileinfo.h
@@ -24,7 +24,7 @@
extern zend_module_entry fileinfo_module_entry;
#define phpext_fileinfo_ptr &fileinfo_module_entry
-#define PHP_FILEINFO_VERSION "1.0.5"
+#define PHP_FILEINFO_VERSION "1.0.5-dev"
#ifdef PHP_WIN32
#define PHP_FILEINFO_API __declspec(dllexport)
diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h
index 2ec2f62fa..0f76d7a03 100644
--- a/ext/filter/filter_private.h
+++ b/ext/filter/filter_private.h
@@ -109,8 +109,10 @@
if (len < 1 && return_if_empty) { \
RETURN_VALIDATION_FAILED \
} \
- while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || p[len-1] == '\v' || p[len-1] == '\n') { \
- len--; \
+ if (len > 0) { \
+ while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || p[len-1] == '\v' || p[len-1] == '\n') { \
+ len--; \
+ } \
} \
}
diff --git a/ext/filter/tests/045.phpt b/ext/filter/tests/045.phpt
index ad8f47ec9..ad8f47ec9 100755..100644
--- a/ext/filter/tests/045.phpt
+++ b/ext/filter/tests/045.phpt
diff --git a/ext/filter/tests/046.phpt b/ext/filter/tests/046.phpt
index bc454420a..bc454420a 100755..100644
--- a/ext/filter/tests/046.phpt
+++ b/ext/filter/tests/046.phpt
diff --git a/ext/filter/tests/047.phpt b/ext/filter/tests/047.phpt
index cc41eabd3..cc41eabd3 100755..100644
--- a/ext/filter/tests/047.phpt
+++ b/ext/filter/tests/047.phpt
diff --git a/ext/filter/tests/048.phpt b/ext/filter/tests/048.phpt
index 92ab6908c..92ab6908c 100755..100644
--- a/ext/filter/tests/048.phpt
+++ b/ext/filter/tests/048.phpt
diff --git a/ext/filter/tests/049.phpt b/ext/filter/tests/049.phpt
index 5a9977b8f..5a9977b8f 100755..100644
--- a/ext/filter/tests/049.phpt
+++ b/ext/filter/tests/049.phpt
diff --git a/ext/filter/tests/050.phpt b/ext/filter/tests/050.phpt
index 69a269f11..69a269f11 100755..100644
--- a/ext/filter/tests/050.phpt
+++ b/ext/filter/tests/050.phpt
diff --git a/ext/filter/tests/051.phpt b/ext/filter/tests/051.phpt
index e34289d43..e34289d43 100755..100644
--- a/ext/filter/tests/051.phpt
+++ b/ext/filter/tests/051.phpt
diff --git a/ext/filter/tests/callback_closure.phpt b/ext/filter/tests/callback_closure.phpt
index e27a31b37..e27a31b37 100755..100644
--- a/ext/filter/tests/callback_closure.phpt
+++ b/ext/filter/tests/callback_closure.phpt
diff --git a/ext/ftp/tests/ftp_alloc_basic1.phpt b/ext/ftp/tests/ftp_alloc_basic1.phpt
index b2bdf7440..b2bdf7440 100755..100644
--- a/ext/ftp/tests/ftp_alloc_basic1.phpt
+++ b/ext/ftp/tests/ftp_alloc_basic1.phpt
diff --git a/ext/ftp/tests/ftp_alloc_basic2.phpt b/ext/ftp/tests/ftp_alloc_basic2.phpt
index b9e4253fe..b9e4253fe 100755..100644
--- a/ext/ftp/tests/ftp_alloc_basic2.phpt
+++ b/ext/ftp/tests/ftp_alloc_basic2.phpt
diff --git a/ext/ftp/tests/ftp_chmod_basic.phpt b/ext/ftp/tests/ftp_chmod_basic.phpt
index baaa25a98..baaa25a98 100755..100644
--- a/ext/ftp/tests/ftp_chmod_basic.phpt
+++ b/ext/ftp/tests/ftp_chmod_basic.phpt
diff --git a/ext/ftp/tests/ftp_exec_basic.phpt b/ext/ftp/tests/ftp_exec_basic.phpt
index 4a1f63e38..4a1f63e38 100755..100644
--- a/ext/ftp/tests/ftp_exec_basic.phpt
+++ b/ext/ftp/tests/ftp_exec_basic.phpt
diff --git a/ext/ftp/tests/ftp_rmdir_basic.phpt b/ext/ftp/tests/ftp_rmdir_basic.phpt
index 6626cb4be..6626cb4be 100755..100644
--- a/ext/ftp/tests/ftp_rmdir_basic.phpt
+++ b/ext/ftp/tests/ftp_rmdir_basic.phpt
diff --git a/ext/gd/config.w32 b/ext/gd/config.w32
index 38292d52f..8c932a037 100644
--- a/ext/gd/config.w32
+++ b/ext/gd/config.w32
@@ -15,7 +15,9 @@ if (PHP_GD != "no") {
(CHECK_LIB("libiconv_a.lib;libiconv.lib", "gd", PHP_GD) || CHECK_LIB("iconv_a.lib;iconv.lib", "gd", PHP_GD)) &&
CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_GD", PHP_GD) &&
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "gd", PHP_GD) )) ||
- (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "gd", PHP_GD)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
+ (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "gd", PHP_GD)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
+ CHECK_LIB("libXpm_a.lib", "gd", PHP_GD) &&
+ CHECK_HEADER_ADD_INCLUDE("xpm.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\X11")
) {
if (PHP_T1LIB != "no") {
if (CHECK_LIB("T1_StaticMD.lib", "gd", PHP_GD) &&
@@ -56,6 +58,7 @@ if (PHP_GD != "no") {
/D HAVE_GD_STRINGTTF=1 \
/D HAVE_GD_WBMP \
/D HAVE_GD_XBM \
+/D HAVE_GD_XPM \
/D HAVE_GD_WEBP \
/D HAVE_LIBFREETYPE=1 \
/D HAVE_LIBGD13=1 \
@@ -65,6 +68,7 @@ if (PHP_GD != "no") {
/D HAVE_LIBJPEG \
/D HAVE_LIBVPX \
/D HAVE_LIBPNG \
+/D HAVE_XPM \
/D HAVE_COLORCLOSESTHWB \
/D USE_GD_IMGSTRTTF \
/D USE_GD_IOCTX \
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 8fa0adec9..cfcc3e876 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1328,6 +1328,11 @@ PHP_MINFO_FUNCTION(gd)
#endif
#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
php_info_print_table_row(2, "XPM Support", "enabled");
+ {
+ char tmp[12];
+ snprintf(tmp, sizeof(tmp), "%d", XpmLibraryVersion());
+ php_info_print_table_row(2, "libXpm Version", tmp);
+ }
#endif
#ifdef HAVE_GD_XBM
php_info_print_table_row(2, "XBM Support", "enabled");
diff --git a/ext/gd/libgd/gd_png.c b/ext/gd/libgd/gd_png.c
index 49f7cb077..bdbb7ee7d 100644
--- a/ext/gd/libgd/gd_png.c
+++ b/ext/gd/libgd/gd_png.c
@@ -127,8 +127,8 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile)
png_color_16p trans_gray_rgb;
png_color_16p trans_color_rgb;
png_bytep trans;
- png_bytep image_data = NULL;
- png_bytepp row_pointers = NULL;
+ volatile png_bytep image_data = NULL;
+ volatile png_bytepp row_pointers = NULL;
gdImagePtr im = NULL;
int i, j, *open = NULL;
volatile int transparent = -1;
diff --git a/ext/gd/tests/bug43073.phpt b/ext/gd/tests/bug43073.phpt
index df4ffe37e..4f448f2b4 100644
--- a/ext/gd/tests/bug43073.phpt
+++ b/ext/gd/tests/bug43073.phpt
@@ -1,9 +1,12 @@
--TEST--
-Bug #43073 (TrueType bounding box is wrong for angle<>0)
+Bug #43073 (TrueType bounding box is wrong for angle<>0) freetype < 2.4.10
--SKIPIF--
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
if(!function_exists('imagettftext')) die('skip imagettftext() not available');
+
+ include dirname(__FILE__) . '/func.inc';
+ if(version_compare(get_freetype_version(), '2.4.10') >= 0) die('skip for freetype < 2.4.10');
?>
--FILE--
<?php
diff --git a/ext/gd/tests/bug43073_1.phpt b/ext/gd/tests/bug43073_1.phpt
new file mode 100644
index 000000000..b69067d31
--- /dev/null
+++ b/ext/gd/tests/bug43073_1.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Bug #43073 (TrueType bounding box is wrong for angle<>0) freetype >= 2.4.10
+--SKIPIF--
+<?php
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagettftext')) die('skip imagettftext() not available');
+
+ include dirname(__FILE__) . '/func.inc';
+ if(version_compare(get_freetype_version(), '2.4.10') == -1) die('skip for freetype >= 2.4.10');
+?>
+--FILE--
+<?php
+$cwd = dirname(__FILE__);
+$font = "$cwd/Tuffy.ttf";
+$delta_t = 360.0 / 16; # Make 16 steps around
+$g = imagecreate(800, 800);
+$bgnd = imagecolorallocate($g, 255, 255, 255);
+$black = imagecolorallocate($g, 0, 0, 0);
+$x = 100;
+$y = 0;
+$cos_t = cos(deg2rad($delta_t));
+$sin_t = sin(deg2rad($delta_t));
+for ($angle = 0.0; $angle < 360.0; $angle += $delta_t) {
+ $bbox = imagettftext($g, 24, $angle, 400+$x, 400+$y, $black, $font, 'ABCDEF');
+ $s = vsprintf("(%d, %d), (%d, %d), (%d, %d), (%d, %d)\n", $bbox);
+ echo $s;
+ $temp = $cos_t * $x + $sin_t * $y;
+ $y = $cos_t * $y - $sin_t * $x;
+ $x = $temp;
+}
+imagepng($g, "$cwd/bug43073.png");
+?>
+--CLEAN--
+<?php @unlink(dirname(__FILE__) . '/bug43073.png'); ?>
+--EXPECTF--
+(500, 400), (610, 400), (610, 376), (500, 376)
+(492, 363), (591, 322), (580, 295), (480, 336)
+(470, 331), (548, 254), (527, 233), (449, 310)
+(439, 309), (483, 202), (461, 193), (416, 299)
+(400, 300), (400, 183), (380, 183), (380, 300)
+(362, 307), (316, 195), (291, 205), (337, 318)
+(330, 329), (246, 244), (224, 265), (308, 350)
+(308, 360), (202, 316), (190, 344), (296, 388)
+(300, 400), (187, 400), (187, 425), (300, 425)
+(306, 437), (195, 483), (206, 510), (318, 464)
+(328, 469), (240, 557), (260, 578), (349, 491)
+(359, 491), (312, 607), (334, 616), (382, 501)
+(400, 500), (400, 618), (419, 618), (419, 500)
+(436, 493), (483, 607), (507, 597), (461, 482)
+(468, 471), (555, 558), (577, 538), (490, 450)
+(490, 440), (600, 485), (611, 457), (502, 412)
diff --git a/ext/gd/tests/bug48801.phpt b/ext/gd/tests/bug48801.phpt
index a6a9874ab..fd25541a5 100644
--- a/ext/gd/tests/bug48801.phpt
+++ b/ext/gd/tests/bug48801.phpt
@@ -1,9 +1,12 @@
--TEST--
-Bug #48801 (Problem with imagettfbbox)
+Bug #48801 (Problem with imagettfbbox) freetype < 2.4.10
--SKIPIF--
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+
+ include dirname(__FILE__) . '/func.inc';
+ if(version_compare(get_freetype_version(), '2.4.10') >= 0) die('skip for freetype < 2.4.10');
?>
--FILE--
<?php
diff --git a/ext/gd/tests/bug48801_1.phpt b/ext/gd/tests/bug48801_1.phpt
new file mode 100644
index 000000000..11af80cd4
--- /dev/null
+++ b/ext/gd/tests/bug48801_1.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #48801 (Problem with imagettfbbox) freetype >= 2.4.10
+--SKIPIF--
+<?php
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+
+ include dirname(__FILE__) . '/func.inc';
+ if(version_compare(get_freetype_version(), '2.4.10') == -1) die('skip for freetype >= 2.4.10');
+?>
+--FILE--
+<?php
+$cwd = dirname(__FILE__);
+$font = "$cwd/Tuffy.ttf";
+$bbox = imageftbbox(50, 0, $font, "image");
+echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n";
+echo '(' . $bbox[2] . ', ' . $bbox[3] . ")\n";
+echo '(' . $bbox[4] . ', ' . $bbox[5] . ")\n";
+echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
+?>
+--EXPECTF--
+(-1, 15)
+(156, 15)
+(156, -48)
+(-1, -48)
diff --git a/ext/gd/tests/func.inc b/ext/gd/tests/func.inc
new file mode 100644
index 000000000..f17227ecc
--- /dev/null
+++ b/ext/gd/tests/func.inc
@@ -0,0 +1,61 @@
+<?php
+
+function get_gd_version()
+{
+ return GD_VERSION;
+}
+
+function get_php_info()
+{
+ ob_start();
+ phpinfo();
+ $info = ob_get_contents();
+ ob_end_clean();
+
+ return $info;
+}
+
+function get_freetype_version()
+{
+ $version = 0;
+
+ if (preg_match(',FreeType Version => (\d+\.\d+\.\d+),s', get_php_info(), $match)) {
+ $version = $match[1];
+ }
+
+ return $version;
+}
+
+function get_libjpeg_version()
+{
+ $version = 0;
+
+ if (preg_match(',libJPEG Version => ([a-z0-9]+),s', get_php_info(), $match)) {
+ $version = $match[1];
+ }
+
+ return $version;
+}
+
+function get_libpng_version()
+{
+ $version = 0;
+
+ if (preg_match(',libPNG Version => (\d+\.\d+\.\d+),s', get_php_info(), $match)) {
+ $version = $match[1];
+ }
+
+ return $version;
+}
+
+function get_libxpm_version()
+{
+ $version = 0;
+
+ if (preg_match(',libXpm Version => (\d+),s', get_php_info(), $match)) {
+ $version = $match[1];
+ }
+
+ return $version;
+}
+
diff --git a/ext/gd/tests/imageantialias_error1.phpt b/ext/gd/tests/imageantialias_error1.phpt
index e9475e957..e9475e957 100755..100644
--- a/ext/gd/tests/imageantialias_error1.phpt
+++ b/ext/gd/tests/imageantialias_error1.phpt
diff --git a/ext/gd/tests/imageantialias_error2.phpt b/ext/gd/tests/imageantialias_error2.phpt
index 64b0a60eb..64b0a60eb 100755..100644
--- a/ext/gd/tests/imageantialias_error2.phpt
+++ b/ext/gd/tests/imageantialias_error2.phpt
diff --git a/ext/gd/tests/imagearc_basic.phpt b/ext/gd/tests/imagearc_basic.phpt
index 4647dd1e3..4647dd1e3 100755..100644
--- a/ext/gd/tests/imagearc_basic.phpt
+++ b/ext/gd/tests/imagearc_basic.phpt
diff --git a/ext/gd/tests/imagearc_error1.phpt b/ext/gd/tests/imagearc_error1.phpt
index 423f0356a..423f0356a 100755..100644
--- a/ext/gd/tests/imagearc_error1.phpt
+++ b/ext/gd/tests/imagearc_error1.phpt
diff --git a/ext/gd/tests/imagearc_variation1.phpt b/ext/gd/tests/imagearc_variation1.phpt
index 568d3a6d4..568d3a6d4 100755..100644
--- a/ext/gd/tests/imagearc_variation1.phpt
+++ b/ext/gd/tests/imagearc_variation1.phpt
diff --git a/ext/gd/tests/imagearc_variation2.phpt b/ext/gd/tests/imagearc_variation2.phpt
index 045c68e61..045c68e61 100755..100644
--- a/ext/gd/tests/imagearc_variation2.phpt
+++ b/ext/gd/tests/imagearc_variation2.phpt
diff --git a/ext/gd/tests/imagecolormatch_basic.phpt b/ext/gd/tests/imagecolormatch_basic.phpt
index 1d188121b..1d188121b 100755..100644
--- a/ext/gd/tests/imagecolormatch_basic.phpt
+++ b/ext/gd/tests/imagecolormatch_basic.phpt
diff --git a/ext/gd/tests/imagecolormatch_error1.phpt b/ext/gd/tests/imagecolormatch_error1.phpt
index 9750a8b24..9750a8b24 100755..100644
--- a/ext/gd/tests/imagecolormatch_error1.phpt
+++ b/ext/gd/tests/imagecolormatch_error1.phpt
diff --git a/ext/gd/tests/imagecolormatch_error2.phpt b/ext/gd/tests/imagecolormatch_error2.phpt
index bdb3c2460..bdb3c2460 100755..100644
--- a/ext/gd/tests/imagecolormatch_error2.phpt
+++ b/ext/gd/tests/imagecolormatch_error2.phpt
diff --git a/ext/gd/tests/imagecolormatch_error3.phpt b/ext/gd/tests/imagecolormatch_error3.phpt
index 8793e1522..8793e1522 100755..100644
--- a/ext/gd/tests/imagecolormatch_error3.phpt
+++ b/ext/gd/tests/imagecolormatch_error3.phpt
diff --git a/ext/gd/tests/imagecolormatch_error4.phpt b/ext/gd/tests/imagecolormatch_error4.phpt
index 0bfe767c2..0bfe767c2 100755..100644
--- a/ext/gd/tests/imagecolormatch_error4.phpt
+++ b/ext/gd/tests/imagecolormatch_error4.phpt
diff --git a/ext/gd/tests/imagecolorset_basic.phpt b/ext/gd/tests/imagecolorset_basic.phpt
index a1776ff50..a1776ff50 100755..100644
--- a/ext/gd/tests/imagecolorset_basic.phpt
+++ b/ext/gd/tests/imagecolorset_basic.phpt
diff --git a/ext/gd/tests/imageconvolution_basic.phpt b/ext/gd/tests/imageconvolution_basic.phpt
index 5a9aa8f95..5a9aa8f95 100755..100644
--- a/ext/gd/tests/imageconvolution_basic.phpt
+++ b/ext/gd/tests/imageconvolution_basic.phpt
diff --git a/ext/gd/tests/imageconvolution_error1.phpt b/ext/gd/tests/imageconvolution_error1.phpt
index 5dc250a85..5dc250a85 100755..100644
--- a/ext/gd/tests/imageconvolution_error1.phpt
+++ b/ext/gd/tests/imageconvolution_error1.phpt
diff --git a/ext/gd/tests/imageconvolution_error2.phpt b/ext/gd/tests/imageconvolution_error2.phpt
index 5161c198c..5161c198c 100755..100644
--- a/ext/gd/tests/imageconvolution_error2.phpt
+++ b/ext/gd/tests/imageconvolution_error2.phpt
diff --git a/ext/gd/tests/imageconvolution_error3.phpt b/ext/gd/tests/imageconvolution_error3.phpt
index df6b148bd..df6b148bd 100755..100644
--- a/ext/gd/tests/imageconvolution_error3.phpt
+++ b/ext/gd/tests/imageconvolution_error3.phpt
diff --git a/ext/gd/tests/imagecopymerge_basic.phpt b/ext/gd/tests/imagecopymerge_basic.phpt
index 85f116262..85f116262 100755..100644
--- a/ext/gd/tests/imagecopymerge_basic.phpt
+++ b/ext/gd/tests/imagecopymerge_basic.phpt
diff --git a/ext/gd/tests/imagecopymerge_error.phpt b/ext/gd/tests/imagecopymerge_error.phpt
index e43bf6945..e43bf6945 100755..100644
--- a/ext/gd/tests/imagecopymerge_error.phpt
+++ b/ext/gd/tests/imagecopymerge_error.phpt
diff --git a/ext/gd/tests/imageellipse_basic.phpt b/ext/gd/tests/imageellipse_basic.phpt
index bfd0b79f5..bfd0b79f5 100755..100644
--- a/ext/gd/tests/imageellipse_basic.phpt
+++ b/ext/gd/tests/imageellipse_basic.phpt
diff --git a/ext/gd/tests/imageellipse_error1.phpt b/ext/gd/tests/imageellipse_error1.phpt
index aa8ad789d..aa8ad789d 100755..100644
--- a/ext/gd/tests/imageellipse_error1.phpt
+++ b/ext/gd/tests/imageellipse_error1.phpt
diff --git a/ext/gd/tests/imageellipse_error2.phpt b/ext/gd/tests/imageellipse_error2.phpt
index 5b65bf8a5..5b65bf8a5 100755..100644
--- a/ext/gd/tests/imageellipse_error2.phpt
+++ b/ext/gd/tests/imageellipse_error2.phpt
diff --git a/ext/gd/tests/imageellipse_error3.phpt b/ext/gd/tests/imageellipse_error3.phpt
index cbac2f0e7..cbac2f0e7 100755..100644
--- a/ext/gd/tests/imageellipse_error3.phpt
+++ b/ext/gd/tests/imageellipse_error3.phpt
diff --git a/ext/gd/tests/imageellipse_error4.phpt b/ext/gd/tests/imageellipse_error4.phpt
index dec2e0fbd..dec2e0fbd 100755..100644
--- a/ext/gd/tests/imageellipse_error4.phpt
+++ b/ext/gd/tests/imageellipse_error4.phpt
diff --git a/ext/gd/tests/imageellipse_error5.phpt b/ext/gd/tests/imageellipse_error5.phpt
index 4272470c6..4272470c6 100755..100644
--- a/ext/gd/tests/imageellipse_error5.phpt
+++ b/ext/gd/tests/imageellipse_error5.phpt
diff --git a/ext/gd/tests/imageellipse_error6.phpt b/ext/gd/tests/imageellipse_error6.phpt
index 8628525b6..8628525b6 100755..100644
--- a/ext/gd/tests/imageellipse_error6.phpt
+++ b/ext/gd/tests/imageellipse_error6.phpt
diff --git a/ext/gd/tests/imageellipse_error7.phpt b/ext/gd/tests/imageellipse_error7.phpt
index 23f1eeeab..23f1eeeab 100755..100644
--- a/ext/gd/tests/imageellipse_error7.phpt
+++ b/ext/gd/tests/imageellipse_error7.phpt
diff --git a/ext/gd/tests/imageellipse_error8.phpt b/ext/gd/tests/imageellipse_error8.phpt
index 3fefb56bd..3fefb56bd 100755..100644
--- a/ext/gd/tests/imageellipse_error8.phpt
+++ b/ext/gd/tests/imageellipse_error8.phpt
diff --git a/ext/gd/tests/imagefilledarc_basic.phpt b/ext/gd/tests/imagefilledarc_basic.phpt
index 9ff9bd371..9ff9bd371 100755..100644
--- a/ext/gd/tests/imagefilledarc_basic.phpt
+++ b/ext/gd/tests/imagefilledarc_basic.phpt
diff --git a/ext/gd/tests/imagefilledarc_error1.phpt b/ext/gd/tests/imagefilledarc_error1.phpt
index b2bc4172d..b2bc4172d 100755..100644
--- a/ext/gd/tests/imagefilledarc_error1.phpt
+++ b/ext/gd/tests/imagefilledarc_error1.phpt
diff --git a/ext/gd/tests/imagefilledarc_variation1.phpt b/ext/gd/tests/imagefilledarc_variation1.phpt
index 2dec1ead2..2dec1ead2 100755..100644
--- a/ext/gd/tests/imagefilledarc_variation1.phpt
+++ b/ext/gd/tests/imagefilledarc_variation1.phpt
diff --git a/ext/gd/tests/imagefilledarc_variation2.phpt b/ext/gd/tests/imagefilledarc_variation2.phpt
index 5c8ffba00..5c8ffba00 100755..100644
--- a/ext/gd/tests/imagefilledarc_variation2.phpt
+++ b/ext/gd/tests/imagefilledarc_variation2.phpt
diff --git a/ext/gd/tests/imagefilltoborder_basic.phpt b/ext/gd/tests/imagefilltoborder_basic.phpt
index 80b84d2c6..80b84d2c6 100755..100644
--- a/ext/gd/tests/imagefilltoborder_basic.phpt
+++ b/ext/gd/tests/imagefilltoborder_basic.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error1.phpt b/ext/gd/tests/imagefilltoborder_error1.phpt
index 9412da739..9412da739 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error1.phpt
+++ b/ext/gd/tests/imagefilltoborder_error1.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error2.phpt b/ext/gd/tests/imagefilltoborder_error2.phpt
index dcbf90470..dcbf90470 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error2.phpt
+++ b/ext/gd/tests/imagefilltoborder_error2.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error3.phpt b/ext/gd/tests/imagefilltoborder_error3.phpt
index 73f6cf7b8..73f6cf7b8 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error3.phpt
+++ b/ext/gd/tests/imagefilltoborder_error3.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error4.phpt b/ext/gd/tests/imagefilltoborder_error4.phpt
index a5073d80b..a5073d80b 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error4.phpt
+++ b/ext/gd/tests/imagefilltoborder_error4.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error5.phpt b/ext/gd/tests/imagefilltoborder_error5.phpt
index eff344a78..eff344a78 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error5.phpt
+++ b/ext/gd/tests/imagefilltoborder_error5.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error6.phpt b/ext/gd/tests/imagefilltoborder_error6.phpt
index b5ce53b0d..b5ce53b0d 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error6.phpt
+++ b/ext/gd/tests/imagefilltoborder_error6.phpt
diff --git a/ext/gd/tests/imagefilltoborder_error7.phpt b/ext/gd/tests/imagefilltoborder_error7.phpt
index aeb7d8262..aeb7d8262 100755..100644
--- a/ext/gd/tests/imagefilltoborder_error7.phpt
+++ b/ext/gd/tests/imagefilltoborder_error7.phpt
diff --git a/ext/gd/tests/imagefilter_error1.phpt b/ext/gd/tests/imagefilter_error1.phpt
index fb96ae32b..fb96ae32b 100755..100644
--- a/ext/gd/tests/imagefilter_error1.phpt
+++ b/ext/gd/tests/imagefilter_error1.phpt
diff --git a/ext/gd/tests/imagefilter_error10.phpt b/ext/gd/tests/imagefilter_error10.phpt
index 8b4121162..8b4121162 100755..100644
--- a/ext/gd/tests/imagefilter_error10.phpt
+++ b/ext/gd/tests/imagefilter_error10.phpt
diff --git a/ext/gd/tests/imagefilter_error11.phpt b/ext/gd/tests/imagefilter_error11.phpt
index 9b1cf4d92..9b1cf4d92 100755..100644
--- a/ext/gd/tests/imagefilter_error11.phpt
+++ b/ext/gd/tests/imagefilter_error11.phpt
diff --git a/ext/gd/tests/imagefilter_error12.phpt b/ext/gd/tests/imagefilter_error12.phpt
index 33fee28e6..33fee28e6 100755..100644
--- a/ext/gd/tests/imagefilter_error12.phpt
+++ b/ext/gd/tests/imagefilter_error12.phpt
diff --git a/ext/gd/tests/imagefilter_error13.phpt b/ext/gd/tests/imagefilter_error13.phpt
index 687d148be..687d148be 100755..100644
--- a/ext/gd/tests/imagefilter_error13.phpt
+++ b/ext/gd/tests/imagefilter_error13.phpt
diff --git a/ext/gd/tests/imagefilter_error14.phpt b/ext/gd/tests/imagefilter_error14.phpt
index 64103954d..64103954d 100755..100644
--- a/ext/gd/tests/imagefilter_error14.phpt
+++ b/ext/gd/tests/imagefilter_error14.phpt
diff --git a/ext/gd/tests/imagefilter_error15.phpt b/ext/gd/tests/imagefilter_error15.phpt
index 87a412e4c..87a412e4c 100755..100644
--- a/ext/gd/tests/imagefilter_error15.phpt
+++ b/ext/gd/tests/imagefilter_error15.phpt
diff --git a/ext/gd/tests/imagefilter_error16.phpt b/ext/gd/tests/imagefilter_error16.phpt
index 2a84c2f78..2a84c2f78 100755..100644
--- a/ext/gd/tests/imagefilter_error16.phpt
+++ b/ext/gd/tests/imagefilter_error16.phpt
diff --git a/ext/gd/tests/imagefilter_error17.phpt b/ext/gd/tests/imagefilter_error17.phpt
index adafc3e5e..adafc3e5e 100755..100644
--- a/ext/gd/tests/imagefilter_error17.phpt
+++ b/ext/gd/tests/imagefilter_error17.phpt
diff --git a/ext/gd/tests/imagefilter_error18.phpt b/ext/gd/tests/imagefilter_error18.phpt
index b636bfc07..b636bfc07 100755..100644
--- a/ext/gd/tests/imagefilter_error18.phpt
+++ b/ext/gd/tests/imagefilter_error18.phpt
diff --git a/ext/gd/tests/imagefilter_error19.phpt b/ext/gd/tests/imagefilter_error19.phpt
index e36b817aa..e36b817aa 100755..100644
--- a/ext/gd/tests/imagefilter_error19.phpt
+++ b/ext/gd/tests/imagefilter_error19.phpt
diff --git a/ext/gd/tests/imagefilter_error2.phpt b/ext/gd/tests/imagefilter_error2.phpt
index 62ac6620c..62ac6620c 100755..100644
--- a/ext/gd/tests/imagefilter_error2.phpt
+++ b/ext/gd/tests/imagefilter_error2.phpt
diff --git a/ext/gd/tests/imagefilter_error20.phpt b/ext/gd/tests/imagefilter_error20.phpt
index f3db724ac..f3db724ac 100755..100644
--- a/ext/gd/tests/imagefilter_error20.phpt
+++ b/ext/gd/tests/imagefilter_error20.phpt
diff --git a/ext/gd/tests/imagefilter_error3.phpt b/ext/gd/tests/imagefilter_error3.phpt
index 67f6c199f..67f6c199f 100755..100644
--- a/ext/gd/tests/imagefilter_error3.phpt
+++ b/ext/gd/tests/imagefilter_error3.phpt
diff --git a/ext/gd/tests/imagefilter_error4.phpt b/ext/gd/tests/imagefilter_error4.phpt
index babb37e0a..babb37e0a 100755..100644
--- a/ext/gd/tests/imagefilter_error4.phpt
+++ b/ext/gd/tests/imagefilter_error4.phpt
diff --git a/ext/gd/tests/imagefilter_error5.phpt b/ext/gd/tests/imagefilter_error5.phpt
index a7d944342..a7d944342 100755..100644
--- a/ext/gd/tests/imagefilter_error5.phpt
+++ b/ext/gd/tests/imagefilter_error5.phpt
diff --git a/ext/gd/tests/imagefilter_error6.phpt b/ext/gd/tests/imagefilter_error6.phpt
index 05dd187a2..05dd187a2 100755..100644
--- a/ext/gd/tests/imagefilter_error6.phpt
+++ b/ext/gd/tests/imagefilter_error6.phpt
diff --git a/ext/gd/tests/imagefilter_error7.phpt b/ext/gd/tests/imagefilter_error7.phpt
index 6c08e5acf..6c08e5acf 100755..100644
--- a/ext/gd/tests/imagefilter_error7.phpt
+++ b/ext/gd/tests/imagefilter_error7.phpt
diff --git a/ext/gd/tests/imagefilter_error8.phpt b/ext/gd/tests/imagefilter_error8.phpt
index 57c3168f7..57c3168f7 100755..100644
--- a/ext/gd/tests/imagefilter_error8.phpt
+++ b/ext/gd/tests/imagefilter_error8.phpt
diff --git a/ext/gd/tests/imagefilter_error9.phpt b/ext/gd/tests/imagefilter_error9.phpt
index a74ea643c..a74ea643c 100755..100644
--- a/ext/gd/tests/imagefilter_error9.phpt
+++ b/ext/gd/tests/imagefilter_error9.phpt
diff --git a/ext/gd/tests/imageinterlace_basic.phpt b/ext/gd/tests/imageinterlace_basic.phpt
index 657b256d6..657b256d6 100755..100644
--- a/ext/gd/tests/imageinterlace_basic.phpt
+++ b/ext/gd/tests/imageinterlace_basic.phpt
diff --git a/ext/gd/tests/imageinterlace_error1.phpt b/ext/gd/tests/imageinterlace_error1.phpt
index 5c871e7bb..5c871e7bb 100755..100644
--- a/ext/gd/tests/imageinterlace_error1.phpt
+++ b/ext/gd/tests/imageinterlace_error1.phpt
diff --git a/ext/gd/tests/imageinterlace_error2.phpt b/ext/gd/tests/imageinterlace_error2.phpt
index 808c88a31..808c88a31 100755..100644
--- a/ext/gd/tests/imageinterlace_error2.phpt
+++ b/ext/gd/tests/imageinterlace_error2.phpt
diff --git a/ext/gd/tests/imageinterlace_variation1.phpt b/ext/gd/tests/imageinterlace_variation1.phpt
index 2c224ef41..2c224ef41 100755..100644
--- a/ext/gd/tests/imageinterlace_variation1.phpt
+++ b/ext/gd/tests/imageinterlace_variation1.phpt
diff --git a/ext/gd/tests/imageinterlace_variation2.phpt b/ext/gd/tests/imageinterlace_variation2.phpt
index b4735dcfb..b4735dcfb 100755..100644
--- a/ext/gd/tests/imageinterlace_variation2.phpt
+++ b/ext/gd/tests/imageinterlace_variation2.phpt
diff --git a/ext/gd/tests/imagerectangle_basic.phpt b/ext/gd/tests/imagerectangle_basic.phpt
index f706ee7ab..f706ee7ab 100755..100644
--- a/ext/gd/tests/imagerectangle_basic.phpt
+++ b/ext/gd/tests/imagerectangle_basic.phpt
diff --git a/ext/gd/tests/imagerectangle_error1.phpt b/ext/gd/tests/imagerectangle_error1.phpt
index 2b4235e85..2b4235e85 100755..100644
--- a/ext/gd/tests/imagerectangle_error1.phpt
+++ b/ext/gd/tests/imagerectangle_error1.phpt
diff --git a/ext/gd/tests/imagerectangle_error2.phpt b/ext/gd/tests/imagerectangle_error2.phpt
index 5fc1914ad..5fc1914ad 100755..100644
--- a/ext/gd/tests/imagerectangle_error2.phpt
+++ b/ext/gd/tests/imagerectangle_error2.phpt
diff --git a/ext/gd/tests/imagerectangle_error3.phpt b/ext/gd/tests/imagerectangle_error3.phpt
index d5dd4c1d8..d5dd4c1d8 100755..100644
--- a/ext/gd/tests/imagerectangle_error3.phpt
+++ b/ext/gd/tests/imagerectangle_error3.phpt
diff --git a/ext/gd/tests/imagerectangle_error4.phpt b/ext/gd/tests/imagerectangle_error4.phpt
index 7ecc4167a..7ecc4167a 100755..100644
--- a/ext/gd/tests/imagerectangle_error4.phpt
+++ b/ext/gd/tests/imagerectangle_error4.phpt
diff --git a/ext/gd/tests/imagerectangle_error5.phpt b/ext/gd/tests/imagerectangle_error5.phpt
index b4288d270..b4288d270 100755..100644
--- a/ext/gd/tests/imagerectangle_error5.phpt
+++ b/ext/gd/tests/imagerectangle_error5.phpt
diff --git a/ext/gd/tests/imagerectangle_error6.phpt b/ext/gd/tests/imagerectangle_error6.phpt
index aab378e55..aab378e55 100755..100644
--- a/ext/gd/tests/imagerectangle_error6.phpt
+++ b/ext/gd/tests/imagerectangle_error6.phpt
diff --git a/ext/gd/tests/imagerectangle_error7.phpt b/ext/gd/tests/imagerectangle_error7.phpt
index f6ed778db..f6ed778db 100755..100644
--- a/ext/gd/tests/imagerectangle_error7.phpt
+++ b/ext/gd/tests/imagerectangle_error7.phpt
diff --git a/ext/gd/tests/imagerectangle_error8.phpt b/ext/gd/tests/imagerectangle_error8.phpt
index 361de69cd..361de69cd 100755..100644
--- a/ext/gd/tests/imagerectangle_error8.phpt
+++ b/ext/gd/tests/imagerectangle_error8.phpt
diff --git a/ext/gd/tests/imagesetbrush_basic.phpt b/ext/gd/tests/imagesetbrush_basic.phpt
index 790184ddc..790184ddc 100755..100644
--- a/ext/gd/tests/imagesetbrush_basic.phpt
+++ b/ext/gd/tests/imagesetbrush_basic.phpt
diff --git a/ext/gd/tests/jpeg2wbmp_error1.phpt b/ext/gd/tests/jpeg2wbmp_error1.phpt
index d0496cc82..d0496cc82 100755..100644
--- a/ext/gd/tests/jpeg2wbmp_error1.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error1.phpt
diff --git a/ext/gd/tests/jpeg2wbmp_error2.phpt b/ext/gd/tests/jpeg2wbmp_error2.phpt
index 692dcb842..692dcb842 100755..100644
--- a/ext/gd/tests/jpeg2wbmp_error2.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error2.phpt
diff --git a/ext/gd/tests/jpeg2wbmp_error3.phpt b/ext/gd/tests/jpeg2wbmp_error3.phpt
index df436c8cc..df436c8cc 100755..100644
--- a/ext/gd/tests/jpeg2wbmp_error3.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error3.phpt
diff --git a/ext/gd/tests/png2wbmp_error1.phpt b/ext/gd/tests/png2wbmp_error1.phpt
index 1e9d717d9..1e9d717d9 100755..100644
--- a/ext/gd/tests/png2wbmp_error1.phpt
+++ b/ext/gd/tests/png2wbmp_error1.phpt
diff --git a/ext/gd/tests/png2wbmp_error2.phpt b/ext/gd/tests/png2wbmp_error2.phpt
index ba8e43e7f..ba8e43e7f 100755..100644
--- a/ext/gd/tests/png2wbmp_error2.phpt
+++ b/ext/gd/tests/png2wbmp_error2.phpt
diff --git a/ext/gd/tests/png2wbmp_error3.phpt b/ext/gd/tests/png2wbmp_error3.phpt
index 1e33f59b1..1e33f59b1 100755..100644
--- a/ext/gd/tests/png2wbmp_error3.phpt
+++ b/ext/gd/tests/png2wbmp_error3.phpt
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 895d64da3..957575d47 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -23,6 +23,7 @@
#include "config.h"
#endif
+#include <math.h>
#include "php_hash.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
@@ -202,10 +203,45 @@ PHP_FUNCTION(hash_file)
}
/* }}} */
+static inline void php_hash_string_xor_char(unsigned char *out, const unsigned char *in, const unsigned char xor_with, const int length) {
+ int i;
+ for (i=0; i < length; i++) {
+ out[i] = in[i] ^ xor_with;
+ }
+}
+
+static inline void php_hash_string_xor(unsigned char *out, const unsigned char *in, const unsigned char *xor_with, const int length) {
+ int i;
+ for (i=0; i < length; i++) {
+ out[i] = in[i] ^ xor_with[i];
+ }
+}
+
+static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context, const unsigned char *key, const int key_len) {
+ memset(K, 0, ops->block_size);
+ if (key_len > ops->block_size) {
+ /* Reduce the key first */
+ ops->hash_init(context);
+ ops->hash_update(context, key, key_len);
+ ops->hash_final(K, context);
+ } else {
+ memcpy(K, key, key_len);
+ }
+ /* XOR the key with 0x36 to get the ipad) */
+ php_hash_string_xor_char(K, K, 0x36, ops->block_size);
+}
+
+static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops *ops, void *context, const unsigned char *key, const unsigned char *data, const long data_size) {
+ ops->hash_init(context);
+ ops->hash_update(context, key, ops->block_size);
+ ops->hash_update(context, data, data_size);
+ ops->hash_final(final, context);
+}
+
static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_bool raw_output_default) /* {{{ */
{
char *algo, *data, *digest, *key, *K;
- int algo_len, data_len, key_len, i;
+ int algo_len, data_len, key_len;
zend_bool raw_output = raw_output_default;
const php_hash_ops *ops;
void *context;
@@ -230,52 +266,29 @@ static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename,
}
context = emalloc(ops->context_size);
- ops->hash_init(context);
K = emalloc(ops->block_size);
- memset(K, 0, ops->block_size);
+ digest = emalloc(ops->digest_size + 1);
- if (key_len > ops->block_size) {
- /* Reduce the key first */
- ops->hash_update(context, (unsigned char *) key, key_len);
- ops->hash_final((unsigned char *) K, context);
- /* Make the context ready to start over */
- ops->hash_init(context);
- } else {
- memcpy(K, key, key_len);
- }
-
- /* XOR ipad */
- for(i=0; i < ops->block_size; i++) {
- K[i] ^= 0x36;
- }
- ops->hash_update(context, (unsigned char *) K, ops->block_size);
+ php_hash_hmac_prep_key((unsigned char *) K, ops, context, (unsigned char *) key, key_len);
if (isfilename) {
char buf[1024];
int n;
-
+ ops->hash_init(context);
+ ops->hash_update(context, (unsigned char *) K, ops->block_size);
while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) {
ops->hash_update(context, (unsigned char *) buf, n);
}
php_stream_close(stream);
+ ops->hash_final((unsigned char *) digest, context);
} else {
- ops->hash_update(context, (unsigned char *) data, data_len);
+ php_hash_hmac_round((unsigned char *) digest, ops, context, (unsigned char *) K, (unsigned char *) data, data_len);
}
- digest = emalloc(ops->digest_size + 1);
- ops->hash_final((unsigned char *) digest, context);
-
- /* Convert K to opad -- 0x6A = 0x36 ^ 0x5C */
- for(i=0; i < ops->block_size; i++) {
- K[i] ^= 0x6A;
- }
+ php_hash_string_xor_char((unsigned char *) K, (unsigned char *) K, 0x6A, ops->block_size);
- /* Feed this result into the outter hash */
- ops->hash_init(context);
- ops->hash_update(context, (unsigned char *) K, ops->block_size);
- ops->hash_update(context, (unsigned char *) digest, ops->digest_size);
- ops->hash_final((unsigned char *) digest, context);
+ php_hash_hmac_round((unsigned char *) digest, ops, context, (unsigned char *) K, (unsigned char *) digest, ops->digest_size);
/* Zero the key */
memset(K, 0, ops->block_size);
@@ -591,6 +604,128 @@ PHP_FUNCTION(hash_algos)
}
/* }}} */
+/* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int length = 0, bool raw_output = false])
+Generate a PBKDF2 hash of the given password and salt
+Returns lowercase hexits by default */
+PHP_FUNCTION(hash_pbkdf2)
+{
+ char *returnval, *algo, *salt, *pass = NULL;
+ unsigned char *computed_salt, *digest, *temp, *result, *K1, *K2 = NULL;
+ long loops, i, j, algo_len, pass_len, iterations, length, digest_length = 0;
+ int argc, salt_len = 0;
+ zend_bool raw_output = 0;
+ const php_hash_ops *ops;
+ void *context;
+
+ argc = ZEND_NUM_ARGS();
+ if (zend_parse_parameters(argc TSRMLS_CC, "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output) == FAILURE) {
+ return;
+ }
+
+ ops = php_hash_fetch_ops(algo, algo_len);
+ if (!ops) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown hashing algorithm: %s", algo);
+ RETURN_FALSE;
+ }
+
+ if (iterations <= 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Iterations must be a positive integer: %ld", iterations);
+ RETURN_FALSE;
+ }
+
+ if (length < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length must be greater than or equal to 0: %ld", length);
+ RETURN_FALSE;
+ }
+
+ if (salt_len > INT_MAX - 4) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long, max of INT_MAX - 4 bytes: %d supplied", salt_len);
+ RETURN_FALSE;
+ }
+
+ context = emalloc(ops->context_size);
+ ops->hash_init(context);
+
+ K1 = emalloc(ops->block_size);
+ K2 = emalloc(ops->block_size);
+ digest = emalloc(ops->digest_size);
+ temp = emalloc(ops->digest_size);
+
+ /* Setup Keys that will be used for all hmac rounds */
+ php_hash_hmac_prep_key(K1, ops, context, (unsigned char *) pass, pass_len);
+ /* Convert K1 to opad -- 0x6A = 0x36 ^ 0x5C */
+ php_hash_string_xor_char(K2, K1, 0x6A, ops->block_size);
+
+ /* Setup Main Loop to build a long enough result */
+ if (length == 0) {
+ length = ops->digest_size;
+ }
+ digest_length = length;
+ if (!raw_output) {
+ digest_length = (long) ceil((float) length / 2.0);
+ }
+
+ loops = (long) ceil((float) digest_length / (float) ops->digest_size);
+
+ result = safe_emalloc(loops, ops->digest_size, 0);
+
+ computed_salt = safe_emalloc(salt_len, 1, 4);
+ memcpy(computed_salt, (unsigned char *) salt, salt_len);
+
+ for (i = 1; i <= loops; i++) {
+ /* digest = hash_hmac(salt + pack('N', i), password) { */
+
+ /* pack("N", i) */
+ computed_salt[salt_len] = (unsigned char) (i >> 24);
+ computed_salt[salt_len + 1] = (unsigned char) ((i & 0xFF0000) >> 16);
+ computed_salt[salt_len + 2] = (unsigned char) ((i & 0xFF00) >> 8);
+ computed_salt[salt_len + 3] = (unsigned char) (i & 0xFF);
+
+ php_hash_hmac_round(digest, ops, context, K1, computed_salt, (long) salt_len + 4);
+ php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size);
+ /* } */
+
+ /* temp = digest */
+ memcpy(temp, digest, ops->digest_size);
+
+ /*
+ * Note that the loop starting at 1 is intentional, since we've already done
+ * the first round of the algorithm.
+ */
+ for (j = 1; j < iterations; j++) {
+ /* digest = hash_hmac(digest, password) { */
+ php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size);
+ php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size);
+ /* } */
+ /* temp ^= digest */
+ php_hash_string_xor(temp, temp, digest, ops->digest_size);
+ }
+ /* result += temp */
+ memcpy(result + ((i - 1) * ops->digest_size), temp, ops->digest_size);
+ }
+ /* Zero potentially sensitive variables */
+ memset(K1, 0, ops->block_size);
+ memset(K2, 0, ops->block_size);
+ memset(computed_salt, 0, salt_len + 4);
+ efree(K1);
+ efree(K2);
+ efree(computed_salt);
+ efree(context);
+ efree(digest);
+ efree(temp);
+
+ returnval = safe_emalloc(length, 1, 1);
+ if (raw_output) {
+ memcpy(returnval, result, length);
+ } else {
+ php_hash_bin2hex(returnval, result, digest_length);
+ }
+ returnval[length] = 0;
+ efree(result);
+ RETURN_STRINGL(returnval, length, 0);
+}
+/* }}} */
+
/* Module Housekeeping */
static void php_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
@@ -1003,6 +1138,15 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_hash_algos, 0)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_pbkdf2, 0, 0, 4)
+ ZEND_ARG_INFO(0, algo)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, salt)
+ ZEND_ARG_INFO(0, iterations)
+ ZEND_ARG_INFO(0, length)
+ ZEND_ARG_INFO(0, raw_output)
+ZEND_END_ARG_INFO()
+
/* BC Land */
#ifdef PHP_MHASH_BC
ZEND_BEGIN_ARG_INFO(arginfo_mhash_get_block_size, 0)
@@ -1049,6 +1193,7 @@ const zend_function_entry hash_functions[] = {
PHP_FE(hash_copy, arginfo_hash_copy)
PHP_FE(hash_algos, arginfo_hash_algos)
+ PHP_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
/* BC Land */
#ifdef PHP_HASH_MD5_NOT_IN_CORE
@@ -1105,3 +1250,4 @@ ZEND_GET_MODULE(hash)
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+
diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h
index 87050cb8e..7bc72a2bc 100644
--- a/ext/hash/php_hash.h
+++ b/ext/hash/php_hash.h
@@ -127,6 +127,7 @@ PHP_FUNCTION(hash_update_stream);
PHP_FUNCTION(hash_update_file);
PHP_FUNCTION(hash_final);
PHP_FUNCTION(hash_algos);
+PHP_FUNCTION(hash_pbkdf2);
PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, int algo_len);
PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *ops);
diff --git a/ext/hash/tests/hash_pbkdf2_basic.phpt b/ext/hash/tests/hash_pbkdf2_basic.phpt
new file mode 100644
index 000000000..fdccc4b6e
--- /dev/null
+++ b/ext/hash/tests/hash_pbkdf2_basic.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test hash_pbkdf2() function : basic functionality
+--SKIPIF--
+<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
+--FILE--
+<?php
+
+/* Prototype : string hash_hmac ( string $algo , string $data , string $key [, bool $raw_output ] )
+ * Description: Generate a keyed hash value using the HMAC method
+ * Source code: ext/hash/hash.c
+ * Alias to functions:
+*/
+
+echo "*** Testing hash_pbkdf2() : basic functionality ***\n";
+
+echo "sha1: " . hash_pbkdf2('sha1', 'password', 'salt', 1, 20)."\n";
+echo "sha1(raw): " . bin2hex(hash_pbkdf2('sha1', 'password', 'salt', 1, 20, TRUE))."\n";
+echo "sha1(rounds): " . hash_pbkdf2('sha1', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 25)."\n";
+echo "sha1(rounds)(raw): " . bin2hex(hash_pbkdf2('sha1', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 25, TRUE))."\n";
+echo "sha256: " . hash_pbkdf2('sha256', 'password', 'salt', 1, 20)."\n";
+echo "sha256(raw): " . bin2hex(hash_pbkdf2('sha256', 'password', 'salt', 1, 20, TRUE))."\n";
+echo "sha256(rounds): " . hash_pbkdf2('sha256', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 40)."\n";
+echo "sha256(rounds)(raw): " . bin2hex(hash_pbkdf2('sha256', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 40, TRUE))."\n";
+
+?>
+===Done===
+--EXPECT--
+*** Testing hash_pbkdf2() : basic functionality ***
+sha1: 0c60c80f961f0e71f3a9
+sha1(raw): 0c60c80f961f0e71f3a9b524af6012062fe037a6
+sha1(rounds): 3d2eec4fe41c849b80c8d8366
+sha1(rounds)(raw): 3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038
+sha256: 120fb6cffcf8b32c43e7
+sha256(raw): 120fb6cffcf8b32c43e7225256c4f837a86548c9
+sha256(rounds): 348c89dbcbd32b2f32d814b8116e84cf2b17347e
+sha256(rounds)(raw): 348c89dbcbd32b2f32d814b8116e84cf2b17347ebc1800181c4e2a1fb8dd53e1c635518c7dac47e9
+===Done===
diff --git a/ext/hash/tests/hash_pbkdf2_error.phpt b/ext/hash/tests/hash_pbkdf2_error.phpt
new file mode 100644
index 000000000..fd70cca58
--- /dev/null
+++ b/ext/hash/tests/hash_pbkdf2_error.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Test hash_pbkdf2() function : error functionality
+--SKIPIF--
+<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
+--FILE--
+<?php
+
+/* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int length = 0, bool raw_output = false])
+Generate a PBKDF2 hash of the given password and salt
+Returns lowercase hexbits by default */
+
+echo "*** Testing hash_pbkdf2() : error conditions ***\n";
+
+$password = 'password';
+$salt = 'salt';
+
+echo "\n-- Testing hash_pbkdf2() function with less than expected no. of arguments --\n";
+var_dump(@hash_pbkdf2());
+echo $php_errormsg . "\n";
+var_dump(@hash_pbkdf2('crc32'));
+echo $php_errormsg . "\n";
+var_dump(@hash_pbkdf2('crc32', $password));
+echo $php_errormsg . "\n";
+var_dump(@hash_pbkdf2('crc32', $password, $salt));
+echo $php_errormsg . "\n";
+
+echo "\n-- Testing hash_pbkdf2() function with more than expected no. of arguments --\n";
+var_dump(@hash_pbkdf2('crc32', $password, $salt, 10, 10, true, 'extra arg'));
+echo $php_errormsg . "\n";
+
+echo "\n-- Testing hash_pbkdf2() function with invalid hash algorithm --\n";
+var_dump(@hash_pbkdf2('foo', $password, $salt, 1));
+echo $php_errormsg . "\n";
+
+echo "\n-- Testing hash_pbkdf2() function with invalid iterations --\n";
+var_dump(@hash_pbkdf2('md5', $password, $salt, 0));
+echo $php_errormsg . "\n";
+var_dump(@hash_pbkdf2('md5', $password, $salt, -1));
+echo $php_errormsg . "\n";
+
+echo "\n-- Testing hash_pbkdf2() function with invalid length --\n";
+var_dump(@hash_pbkdf2('md5', $password, $salt, 1, -1));
+echo $php_errormsg . "\n\n";
+
+?>
+===Done===
+--EXPECT--
+*** Testing hash_pbkdf2() : error conditions ***
+
+-- Testing hash_pbkdf2() function with less than expected no. of arguments --
+NULL
+hash_pbkdf2() expects at least 4 parameters, 0 given
+NULL
+hash_pbkdf2() expects at least 4 parameters, 1 given
+NULL
+hash_pbkdf2() expects at least 4 parameters, 2 given
+NULL
+hash_pbkdf2() expects at least 4 parameters, 3 given
+
+-- Testing hash_pbkdf2() function with more than expected no. of arguments --
+NULL
+hash_pbkdf2() expects at most 6 parameters, 7 given
+
+-- Testing hash_pbkdf2() function with invalid hash algorithm --
+bool(false)
+hash_pbkdf2(): Unknown hashing algorithm: foo
+
+-- Testing hash_pbkdf2() function with invalid iterations --
+bool(false)
+hash_pbkdf2(): Iterations must be a positive integer: 0
+bool(false)
+hash_pbkdf2(): Iterations must be a positive integer: -1
+
+-- Testing hash_pbkdf2() function with invalid length --
+bool(false)
+hash_pbkdf2(): Length must be greater than or equal to 0: -1
+
+===Done===
diff --git a/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt
index 03b3574d6..03b3574d6 100755..100644
--- a/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt
index d4ed01d95..d4ed01d95 100755..100644
--- a/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt
index 48d664d60..48d664d60 100755..100644
--- a/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt
index e6abca5df..e6abca5df 100755..100644
--- a/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt
index 348cfb126..348cfb126 100755..100644
--- a/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt
index 4cb858f0d..4cb858f0d 100755..100644
--- a/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt
index 948cc67c7..948cc67c7 100755..100644
--- a/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt
diff --git a/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt b/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt
index c27e60d1d..c27e60d1d 100755..100644
--- a/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt
+++ b/ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt
diff --git a/ext/iconv/tests/ob_iconv_handler-charset-length-cve-2007-4840.phpt b/ext/iconv/tests/ob_iconv_handler-charset-length-cve-2007-4840.phpt
index fd01d83ca..fd01d83ca 100755..100644
--- a/ext/iconv/tests/ob_iconv_handler-charset-length-cve-2007-4840.phpt
+++ b/ext/iconv/tests/ob_iconv_handler-charset-length-cve-2007-4840.phpt
diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h
index 09f4243a0..09f4243a0 100755..100644
--- a/ext/interbase/php_ibase_includes.h
+++ b/ext/interbase/php_ibase_includes.h
diff --git a/ext/interbase/tests/008.phpt b/ext/interbase/tests/008.phpt
index 8292fc38c..8292fc38c 100755..100644
--- a/ext/interbase/tests/008.phpt
+++ b/ext/interbase/tests/008.phpt
diff --git a/ext/interbase/tests/interbase.inc b/ext/interbase/tests/interbase.inc
index 42eb6e591..42eb6e591 100755..100644
--- a/ext/interbase/tests/interbase.inc
+++ b/ext/interbase/tests/interbase.inc
diff --git a/ext/interbase/tests/skipif.inc b/ext/interbase/tests/skipif.inc
index 79813f69e..8f903a5ea 100755..100644
--- a/ext/interbase/tests/skipif.inc
+++ b/ext/interbase/tests/skipif.inc
@@ -1,9 +1,8 @@
<?php /* $Id$ */
-if (!extension_loaded("interbase")) print "skip interbase extension not available";
+if (!extension_loaded("interbase")) print "skip interbase extension not available";
require("interbase.inc");
if(!@ibase_connect($test_base)){
die("skip cannot connnect");
}
-
?>
diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp
new file mode 100644
index 000000000..de4bfbb7b
--- /dev/null
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -0,0 +1,397 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <unicode/brkiter.h>
+#include <unicode/rbbi.h>
+#include "codepointiterator_internal.h"
+
+#include "breakiterator_iterators.h"
+
+#include <typeinfo>
+
+extern "C" {
+#define USE_BREAKITERATOR_POINTER 1
+#include "breakiterator_class.h"
+#include "breakiterator_methods.h"
+#include "rulebasedbreakiterator_methods.h"
+#include "codepointiterator_methods.h"
+#include <zend_exceptions.h>
+#include <zend_interfaces.h>
+#include <assert.h>
+}
+
+using PHP::CodePointBreakIterator;
+
+/* {{{ Global variables */
+zend_class_entry *BreakIterator_ce_ptr;
+zend_class_entry *RuleBasedBreakIterator_ce_ptr;
+zend_class_entry *CodePointBreakIterator_ce_ptr;
+zend_object_handlers BreakIterator_handlers;
+/* }}} */
+
+U_CFUNC void breakiterator_object_create(zval *object,
+ BreakIterator *biter TSRMLS_DC)
+{
+ UClassID classId = biter->getDynamicClassID();
+ zend_class_entry *ce;
+
+ if (classId == RuleBasedBreakIterator::getStaticClassID()) {
+ ce = RuleBasedBreakIterator_ce_ptr;
+ } else if (classId == CodePointBreakIterator::getStaticClassID()) {
+ ce = CodePointBreakIterator_ce_ptr;
+ } else {
+ ce = BreakIterator_ce_ptr;
+ }
+
+ object_init_ex(object, ce);
+ breakiterator_object_construct(object, biter TSRMLS_CC);
+}
+
+U_CFUNC void breakiterator_object_construct(zval *object,
+ BreakIterator *biter TSRMLS_DC)
+{
+ BreakIterator_object *bio;
+
+ BREAKITER_METHOD_FETCH_OBJECT_NO_CHECK; //populate to from object
+ assert(bio->biter == NULL);
+ bio->biter = biter;
+}
+
+/* {{{ compare handler for BreakIterator */
+static int BreakIterator_compare_objects(zval *object1,
+ zval *object2 TSRMLS_DC)
+{
+ BreakIterator_object *bio1,
+ *bio2;
+
+ bio1 = (BreakIterator_object*)zend_object_store_get_object(object1 TSRMLS_CC);
+ bio2 = (BreakIterator_object*)zend_object_store_get_object(object2 TSRMLS_CC);
+
+ if (bio1->biter == NULL || bio2->biter == NULL) {
+ return bio1->biter == bio2->biter ? 0 : 1;
+ }
+
+ return *bio1->biter == *bio2->biter ? 0 : 1;
+}
+/* }}} */
+
+/* {{{ clone handler for BreakIterator */
+static zend_object_value BreakIterator_clone_obj(zval *object TSRMLS_DC)
+{
+ BreakIterator_object *bio_orig,
+ *bio_new;
+ zend_object_value ret_val;
+
+ bio_orig = (BreakIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+ intl_errors_reset(INTL_DATA_ERROR_P(bio_orig) TSRMLS_CC);
+
+ ret_val = BreakIterator_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
+ bio_new = (BreakIterator_object*)zend_object_store_get_object_by_handle(
+ ret_val.handle TSRMLS_CC);
+
+ zend_objects_clone_members(&bio_new->zo, ret_val,
+ &bio_orig->zo, Z_OBJ_HANDLE_P(object) TSRMLS_CC);
+
+ if (bio_orig->biter != NULL) {
+ BreakIterator *new_biter;
+
+ new_biter = bio_orig->biter->clone();
+ if (!new_biter) {
+ char *err_msg;
+ intl_errors_set_code(BREAKITER_ERROR_P(bio_orig),
+ U_MEMORY_ALLOCATION_ERROR TSRMLS_CC);
+ intl_errors_set_custom_msg(BREAKITER_ERROR_P(bio_orig),
+ "Could not clone BreakIterator", 0 TSRMLS_CC);
+ err_msg = intl_error_get_message(BREAKITER_ERROR_P(bio_orig) TSRMLS_CC);
+ zend_throw_exception(NULL, err_msg, 0 TSRMLS_CC);
+ efree(err_msg);
+ } else {
+ bio_new->biter = new_biter;
+ bio_new->text = bio_orig->text;
+ if (bio_new->text) {
+ zval_add_ref(&bio_new->text);
+ }
+ }
+ } else {
+ zend_throw_exception(NULL, "Cannot clone unconstructed BreakIterator", 0 TSRMLS_CC);
+ }
+
+ return ret_val;
+}
+/* }}} */
+
+/* {{{ get_debug_info handler for BreakIterator */
+static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp TSRMLS_DC)
+{
+ zval zv = zval_used_for_init;
+ BreakIterator_object *bio;
+ const BreakIterator *biter;
+
+ *is_temp = 1;
+
+ array_init_size(&zv, 8);
+
+ bio = (BreakIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+ biter = bio->biter;
+
+ if (biter == NULL) {
+ add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 0);
+ return Z_ARRVAL(zv);
+ }
+ add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 1);
+
+ if (bio->text == NULL) {
+ add_assoc_null_ex(&zv, "text", sizeof("text"));
+ } else {
+ zval_add_ref(&bio->text);
+ add_assoc_zval_ex(&zv, "text", sizeof("text"), bio->text);
+ }
+
+ add_assoc_string_ex(&zv, "type", sizeof("type"),
+ const_cast<char*>(typeid(*biter).name()), 1);
+
+ return Z_ARRVAL(zv);
+}
+/* }}} */
+
+/* {{{ void breakiterator_object_init(BreakIterator_object* to)
+ * Initialize internals of BreakIterator_object not specific to zend standard objects.
+ */
+static void breakiterator_object_init(BreakIterator_object *bio TSRMLS_DC)
+{
+ intl_error_init(BREAKITER_ERROR_P(bio) TSRMLS_CC);
+ bio->biter = NULL;
+ bio->text = NULL;
+}
+/* }}} */
+
+/* {{{ BreakIterator_objects_dtor */
+static void BreakIterator_objects_dtor(void *object,
+ zend_object_handle handle TSRMLS_DC)
+{
+ zend_objects_destroy_object((zend_object*)object, handle TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ BreakIterator_objects_free */
+static void BreakIterator_objects_free(zend_object *object TSRMLS_DC)
+{
+ BreakIterator_object* bio = (BreakIterator_object*) object;
+
+ if (bio->text) {
+ zval_ptr_dtor(&bio->text);
+ }
+ if (bio->biter) {
+ delete bio->biter;
+ bio->biter = NULL;
+ }
+ intl_error_reset(BREAKITER_ERROR_P(bio) TSRMLS_CC);
+
+ zend_object_std_dtor(&bio->zo TSRMLS_CC);
+
+ efree(bio);
+}
+/* }}} */
+
+/* {{{ BreakIterator_object_create */
+static zend_object_value BreakIterator_object_create(zend_class_entry *ce TSRMLS_DC)
+{
+ zend_object_value retval;
+ BreakIterator_object* intern;
+
+ intern = (BreakIterator_object*)ecalloc(1, sizeof(BreakIterator_object));
+
+ zend_object_std_init(&intern->zo, ce TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->zo.properties, &(ce->default_properties),
+ (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*));
+#else
+ object_properties_init((zend_object*) intern, ce);
+#endif
+ breakiterator_object_init(intern TSRMLS_CC);
+
+ retval.handle = zend_objects_store_put(
+ intern,
+ BreakIterator_objects_dtor,
+ (zend_objects_free_object_storage_t) BreakIterator_objects_free,
+ NULL TSRMLS_CC);
+
+ retval.handlers = &BreakIterator_handlers;
+
+ return retval;
+}
+/* }}} */
+
+/* {{{ BreakIterator/RuleBasedBreakIterator methods arguments info */
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_void, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_locale, 0, 0, 0)
+ ZEND_ARG_INFO(0, "locale")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_setText, 0, 0, 1)
+ ZEND_ARG_INFO(0, "text")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_next, 0, 0, 0)
+ ZEND_ARG_INFO(0, "offset")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_offset, 0, 0, 1)
+ ZEND_ARG_INFO(0, "offset")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_get_locale, 0, 0, 1)
+ ZEND_ARG_INFO(0, "locale_type")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_biter_getPartsIterator, 0, 0, 0)
+ ZEND_ARG_INFO(0, "key_type")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_rbbi___construct, 0, 0, 1)
+ ZEND_ARG_INFO(0, "rules")
+ ZEND_ARG_INFO(0, "areCompiled")
+ZEND_END_ARG_INFO()
+
+/* }}} */
+
+/* {{{ BreakIterator_class_functions
+ * Every 'BreakIterator' class method has an entry in this table
+ */
+static const zend_function_entry BreakIterator_class_functions[] = {
+ PHP_ME(BreakIterator, __construct, ainfo_biter_void, ZEND_ACC_PRIVATE)
+ PHP_ME_MAPPING(createWordInstance, breakiter_create_word_instance, ainfo_biter_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(createLineInstance, breakiter_create_line_instance, ainfo_biter_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(createCharacterInstance, breakiter_create_character_instance, ainfo_biter_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(createSentenceInstance, breakiter_create_sentence_instance, ainfo_biter_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(createTitleInstance, breakiter_create_title_instance, ainfo_biter_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(createCodePointInstance, breakiter_create_code_point_instance, ainfo_biter_void, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getText, breakiter_get_text, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setText, breakiter_set_text, ainfo_biter_setText, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(first, breakiter_first, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(last, breakiter_last, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(previous, breakiter_previous, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(next, breakiter_next, ainfo_biter_next, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(current, breakiter_current, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(following, breakiter_following, ainfo_biter_offset, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(preceding, breakiter_preceding, ainfo_biter_offset, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(isBoundary, breakiter_is_boundary, ainfo_biter_offset, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getLocale, breakiter_get_locale, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getPartsIterator, breakiter_get_parts_iterator, ainfo_biter_getPartsIterator, ZEND_ACC_PUBLIC)
+
+ PHP_ME_MAPPING(getErrorCode, breakiter_get_error_code, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getErrorMessage, breakiter_get_error_message, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+/* }}} */
+
+/* {{{ RuleBasedBreakIterator_class_functions
+ */
+static const zend_function_entry RuleBasedBreakIterator_class_functions[] = {
+ PHP_ME(IntlRuleBasedBreakIterator, __construct, ainfo_rbbi___construct, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getRules, rbbi_get_rules, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getRuleStatus, rbbi_get_rule_status, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getRuleStatusVec, rbbi_get_rule_status_vec, ainfo_biter_void, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ PHP_ME_MAPPING(getBinaryRules, rbbi_get_binary_rules, ainfo_biter_void, ZEND_ACC_PUBLIC)
+#endif
+ PHP_FE_END
+};
+/* }}} */
+
+/* {{{ CodePointBreakIterator_class_functions
+ */
+static const zend_function_entry CodePointBreakIterator_class_functions[] = {
+ PHP_ME_MAPPING(getLastCodePoint, cpbi_get_last_code_point, ainfo_biter_void, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+/* }}} */
+
+
+/* {{{ breakiterator_register_BreakIterator_class
+ * Initialize 'BreakIterator' class
+ */
+U_CFUNC void breakiterator_register_BreakIterator_class(TSRMLS_D)
+{
+ zend_class_entry ce;
+
+ /* Create and register 'BreakIterator' class. */
+ INIT_CLASS_ENTRY(ce, "IntlBreakIterator", BreakIterator_class_functions);
+ ce.create_object = BreakIterator_object_create;
+ ce.get_iterator = _breakiterator_get_iterator;
+ BreakIterator_ce_ptr = zend_register_internal_class(&ce TSRMLS_CC);
+
+ memcpy(&BreakIterator_handlers, zend_get_std_object_handlers(),
+ sizeof BreakIterator_handlers);
+ BreakIterator_handlers.compare_objects = BreakIterator_compare_objects;
+ BreakIterator_handlers.clone_obj = BreakIterator_clone_obj;
+ BreakIterator_handlers.get_debug_info = BreakIterator_get_debug_info;
+
+ zend_class_implements(BreakIterator_ce_ptr TSRMLS_CC, 1,
+ zend_ce_traversable);
+
+ zend_declare_class_constant_long(BreakIterator_ce_ptr,
+ "DONE", sizeof("DONE") - 1, BreakIterator::DONE TSRMLS_CC );
+
+ /* Declare constants that are defined in the C header */
+#define BREAKITER_DECL_LONG_CONST(name) \
+ zend_declare_class_constant_long(BreakIterator_ce_ptr, #name, \
+ sizeof(#name) - 1, UBRK_ ## name TSRMLS_CC)
+
+ BREAKITER_DECL_LONG_CONST(WORD_NONE);
+ BREAKITER_DECL_LONG_CONST(WORD_NONE_LIMIT);
+ BREAKITER_DECL_LONG_CONST(WORD_NUMBER);
+ BREAKITER_DECL_LONG_CONST(WORD_NUMBER_LIMIT);
+ BREAKITER_DECL_LONG_CONST(WORD_LETTER);
+ BREAKITER_DECL_LONG_CONST(WORD_LETTER_LIMIT);
+ BREAKITER_DECL_LONG_CONST(WORD_KANA);
+ BREAKITER_DECL_LONG_CONST(WORD_KANA_LIMIT);
+ BREAKITER_DECL_LONG_CONST(WORD_IDEO);
+ BREAKITER_DECL_LONG_CONST(WORD_IDEO_LIMIT);
+
+ BREAKITER_DECL_LONG_CONST(LINE_SOFT);
+ BREAKITER_DECL_LONG_CONST(LINE_SOFT_LIMIT);
+ BREAKITER_DECL_LONG_CONST(LINE_HARD);
+ BREAKITER_DECL_LONG_CONST(LINE_HARD_LIMIT);
+
+ BREAKITER_DECL_LONG_CONST(SENTENCE_TERM);
+ BREAKITER_DECL_LONG_CONST(SENTENCE_TERM_LIMIT);
+ BREAKITER_DECL_LONG_CONST(SENTENCE_SEP);
+ BREAKITER_DECL_LONG_CONST(SENTENCE_SEP_LIMIT);
+
+#undef BREAKITER_DECL_LONG_CONST
+
+
+ /* Create and register 'RuleBasedBreakIterator' class. */
+ INIT_CLASS_ENTRY(ce, "IntlRuleBasedBreakIterator",
+ RuleBasedBreakIterator_class_functions);
+ RuleBasedBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce,
+ BreakIterator_ce_ptr, NULL TSRMLS_CC);
+
+ /* Create and register 'CodePointBreakIterator' class. */
+ INIT_CLASS_ENTRY(ce, "IntlCodePointBreakIterator",
+ CodePointBreakIterator_class_functions);
+ CodePointBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce,
+ BreakIterator_ce_ptr, NULL TSRMLS_CC);
+}
+/* }}} */
diff --git a/ext/intl/breakiterator/breakiterator_class.h b/ext/intl/breakiterator/breakiterator_class.h
new file mode 100644
index 000000000..cc5d51256
--- /dev/null
+++ b/ext/intl/breakiterator/breakiterator_class.h
@@ -0,0 +1,71 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef BREAKITERATOR_CLASS_H
+#define BREAKITERATOR_CLASS_H
+
+//redefinition of inline in PHP headers causes problems, so include this before
+#include <math.h>
+
+#include <php.h>
+#include "../intl_error.h"
+#include "../intl_data.h"
+
+#ifndef USE_BREAKITERATOR_POINTER
+typedef void BreakIterator;
+#endif
+
+typedef struct {
+ zend_object zo;
+
+ // error handling
+ intl_error err;
+
+ // ICU break iterator
+ BreakIterator* biter;
+
+ // current text
+ zval *text;
+} BreakIterator_object;
+
+#define BREAKITER_ERROR(bio) (bio)->err
+#define BREAKITER_ERROR_P(bio) &(BREAKITER_ERROR(bio))
+
+#define BREAKITER_ERROR_CODE(bio) INTL_ERROR_CODE(BREAKITER_ERROR(bio))
+#define BREAKITER_ERROR_CODE_P(bio) &(INTL_ERROR_CODE(BREAKITER_ERROR(bio)))
+
+#define BREAKITER_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(BreakIterator, bio)
+#define BREAKITER_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(BreakIterator, bio)
+#define BREAKITER_METHOD_FETCH_OBJECT \
+ BREAKITER_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (bio->biter == NULL) \
+ { \
+ intl_errors_set(&bio->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed BreakIterator", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
+void breakiterator_object_create(zval *object, BreakIterator *break_iter TSRMLS_DC);
+
+void breakiterator_object_construct(zval *object, BreakIterator *break_iter TSRMLS_DC);
+
+void breakiterator_register_BreakIterator_class(TSRMLS_D);
+
+extern zend_class_entry *BreakIterator_ce_ptr,
+ *RuleBasedBreakIterator_ce_ptr;
+
+extern zend_object_handlers BreakIterator_handlers;
+
+#endif /* #ifndef BREAKITERATOR_CLASS_H */
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp
new file mode 100644
index 000000000..d88ad8a71
--- /dev/null
+++ b/ext/intl/breakiterator/breakiterator_iterators.cpp
@@ -0,0 +1,346 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <unicode/brkiter.h>
+
+#include "breakiterator_iterators.h"
+#include "../common/common_enum.h"
+
+extern "C" {
+#define USE_BREAKITERATOR_POINTER
+#include "breakiterator_class.h"
+#include "../intl_convert.h"
+#include "../locale/locale.h"
+#include <zend_exceptions.h>
+}
+
+static zend_class_entry *IntlPartsIterator_ce_ptr;
+static zend_object_handlers IntlPartsIterator_handlers;
+
+/* BreakIterator's iterator */
+
+inline BreakIterator *_breakiter_prolog(zend_object_iterator *iter TSRMLS_DC)
+{
+ BreakIterator_object *bio;
+ bio = (BreakIterator_object*)zend_object_store_get_object(
+ (const zval*)iter->data TSRMLS_CC);
+ intl_errors_reset(BREAKITER_ERROR_P(bio) TSRMLS_CC);
+ if (bio->biter == NULL) {
+ intl_errors_set(BREAKITER_ERROR_P(bio), U_INVALID_STATE_ERROR,
+ "The BreakIterator object backing the PHP iterator is not "
+ "properly constructed", 0 TSRMLS_CC);
+ }
+ return bio->biter;
+}
+
+static void _breakiterator_destroy_it(zend_object_iterator *iter TSRMLS_DC)
+{
+ zval_ptr_dtor((zval**)&iter->data);
+}
+
+static void _breakiterator_move_forward(zend_object_iterator *iter TSRMLS_DC)
+{
+ BreakIterator *biter = _breakiter_prolog(iter TSRMLS_CC);
+ zoi_with_current *zoi_iter = (zoi_with_current*)iter;
+
+ iter->funcs->invalidate_current(iter TSRMLS_CC);
+
+ if (biter == NULL) {
+ return;
+ }
+
+ int32_t pos = biter->next();
+ if (pos != BreakIterator::DONE) {
+ MAKE_STD_ZVAL(zoi_iter->current);
+ ZVAL_LONG(zoi_iter->current, (long)pos);
+ } //else we've reached the end of the enum, nothing more is required
+}
+
+static void _breakiterator_rewind(zend_object_iterator *iter TSRMLS_DC)
+{
+ BreakIterator *biter = _breakiter_prolog(iter TSRMLS_CC);
+ zoi_with_current *zoi_iter = (zoi_with_current*)iter;
+
+ int32_t pos = biter->first();
+ MAKE_STD_ZVAL(zoi_iter->current);
+ ZVAL_LONG(zoi_iter->current, (long)pos);
+}
+
+static zend_object_iterator_funcs breakiterator_iterator_funcs = {
+ zoi_with_current_dtor,
+ zoi_with_current_valid,
+ zoi_with_current_get_current_data,
+ NULL,
+ _breakiterator_move_forward,
+ _breakiterator_rewind,
+ zoi_with_current_invalidate_current
+};
+
+U_CFUNC zend_object_iterator *_breakiterator_get_iterator(
+ zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
+{
+ BreakIterator_object *bio;
+ if (by_ref) {
+ zend_throw_exception(NULL,
+ "Iteration by reference is not supported", 0 TSRMLS_CC);
+ return NULL;
+ }
+
+ bio = (BreakIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+ BreakIterator *biter = bio->biter;
+
+ if (biter == NULL) {
+ zend_throw_exception(NULL,
+ "The BreakIterator is not properly constructed", 0 TSRMLS_CC);
+ return NULL;
+ }
+
+ zoi_with_current *zoi_iter =
+ static_cast<zoi_with_current*>(emalloc(sizeof *zoi_iter));
+ zoi_iter->zoi.data = static_cast<void*>(object);
+ zoi_iter->zoi.funcs = &breakiterator_iterator_funcs;
+ zoi_iter->zoi.index = 0;
+ zoi_iter->destroy_it = _breakiterator_destroy_it;
+ zoi_iter->wrapping_obj = NULL; /* not used; object is in zoi.data */
+ zoi_iter->current = NULL;
+
+ zval_add_ref(&object);
+
+ return reinterpret_cast<zend_object_iterator *>(zoi_iter);
+}
+
+/* BreakIterator parts iterator */
+
+typedef struct zoi_break_iter_parts {
+ zoi_with_current zoi_cur;
+ parts_iter_key_type key_type;
+ BreakIterator_object *bio; /* so we don't have to fetch it all the time */
+} zoi_break_iter_parts;
+
+static void _breakiterator_parts_destroy_it(zend_object_iterator *iter TSRMLS_DC)
+{
+ zval_ptr_dtor(reinterpret_cast<zval**>(&iter->data));
+}
+
+static int _breakiterator_parts_get_current_key(zend_object_iterator *iter,
+ char **str_key,
+ uint *str_key_len,
+ ulong *int_key TSRMLS_DC)
+{
+ /* the actual work is done in move_forward and rewind */
+ *int_key = iter->index;
+ return HASH_KEY_IS_LONG;
+}
+
+static void _breakiterator_parts_move_forward(zend_object_iterator *iter TSRMLS_DC)
+{
+ zoi_break_iter_parts *zoi_bit = (zoi_break_iter_parts*)iter;
+ BreakIterator_object *bio = zoi_bit->bio;
+
+ iter->funcs->invalidate_current(iter TSRMLS_CC);
+
+ int32_t cur,
+ next;
+
+ cur = bio->biter->current();
+ if (cur == BreakIterator::DONE) {
+ return;
+ }
+ next = bio->biter->next();
+ if (next == BreakIterator::DONE) {
+ return;
+ }
+
+ if (zoi_bit->key_type == PARTS_ITERATOR_KEY_LEFT) {
+ iter->index = cur;
+ } else if (zoi_bit->key_type == PARTS_ITERATOR_KEY_RIGHT) {
+ iter->index = next;
+ }
+ /* else zoi_bit->key_type == PARTS_ITERATOR_KEY_SEQUENTIAL
+ * No need to do anything, the engine increments ->index */
+
+ const char *s = Z_STRVAL_P(bio->text);
+ int32_t slen = Z_STRLEN_P(bio->text),
+ len;
+ char *res;
+
+ if (next == BreakIterator::DONE) {
+ next = slen;
+ }
+ assert(next <= slen && next >= cur);
+ len = next - cur;
+ res = static_cast<char*>(emalloc(len + 1));
+
+ memcpy(res, &s[cur], len);
+ res[len] = '\0';
+
+ MAKE_STD_ZVAL(zoi_bit->zoi_cur.current);
+ ZVAL_STRINGL(zoi_bit->zoi_cur.current, res, len, 0);
+}
+
+static void _breakiterator_parts_rewind(zend_object_iterator *iter TSRMLS_DC)
+{
+ zoi_break_iter_parts *zoi_bit = (zoi_break_iter_parts*)iter;
+ BreakIterator_object *bio = zoi_bit->bio;
+
+ if (zoi_bit->zoi_cur.current) {
+ iter->funcs->invalidate_current(iter TSRMLS_CC);
+ }
+
+ bio->biter->first();
+
+ iter->funcs->move_forward(iter TSRMLS_CC);
+}
+
+static zend_object_iterator_funcs breakiterator_parts_it_funcs = {
+ zoi_with_current_dtor,
+ zoi_with_current_valid,
+ zoi_with_current_get_current_data,
+ _breakiterator_parts_get_current_key,
+ _breakiterator_parts_move_forward,
+ _breakiterator_parts_rewind,
+ zoi_with_current_invalidate_current
+};
+
+void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv,
+ zval *object,
+ parts_iter_key_type key_type TSRMLS_DC)
+{
+ IntlIterator_object *ii;
+
+ zval_add_ref(&break_iter_zv);
+
+ object_init_ex(object, IntlPartsIterator_ce_ptr);
+ ii = (IntlIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+
+ ii->iterator = (zend_object_iterator*)emalloc(sizeof(zoi_break_iter_parts));
+ ii->iterator->data = break_iter_zv;
+ ii->iterator->funcs = &breakiterator_parts_it_funcs;
+ ii->iterator->index = 0;
+ ((zoi_with_current*)ii->iterator)->destroy_it = _breakiterator_parts_destroy_it;
+ ((zoi_with_current*)ii->iterator)->wrapping_obj = object;
+ ((zoi_with_current*)ii->iterator)->current = NULL;
+
+ ((zoi_break_iter_parts*)ii->iterator)->bio = (BreakIterator_object*)
+ zend_object_store_get_object(break_iter_zv TSRMLS_CC);
+ assert(((zoi_break_iter_parts*)ii->iterator)->bio->biter != NULL);
+ ((zoi_break_iter_parts*)ii->iterator)->key_type = key_type;
+}
+
+U_CFUNC zend_object_value IntlPartsIterator_object_create(zend_class_entry *ce TSRMLS_DC)
+{
+ zend_object_value retval;
+
+ retval = IntlIterator_ce_ptr->create_object(ce TSRMLS_CC);
+ retval.handlers = &IntlPartsIterator_handlers;
+
+ return retval;
+}
+
+U_CFUNC zend_function *IntlPartsIterator_get_method(zval **object_ptr,
+ char *method, int method_len, const zend_literal *key TSRMLS_DC)
+{
+ zend_literal local_literal = {0};
+ zend_function *ret;
+ ALLOCA_FLAG(use_heap)
+
+ if (key == NULL) {
+ Z_STRVAL(local_literal.constant) = static_cast<char*>(
+ do_alloca(method_len + 1, use_heap));
+ zend_str_tolower_copy(Z_STRVAL(local_literal.constant),
+ method, method_len);
+ local_literal.hash_value = zend_hash_func(
+ Z_STRVAL(local_literal.constant), method_len + 1);
+ key = &local_literal;
+ }
+
+ if ((key->hash_value & 0xFFFFFFFF) == 0xA2B486A1 /* hash of getrulestatus\0 */
+ && method_len == sizeof("getrulestatus") - 1
+ && memcmp("getrulestatus", Z_STRVAL(key->constant), method_len) == 0) {
+ IntlIterator_object *obj = (IntlIterator_object*)
+ zend_object_store_get_object(*object_ptr TSRMLS_CC);
+ if (obj->iterator && obj->iterator->data) {
+ zval *break_iter_zv = static_cast<zval*>(obj->iterator->data);
+ *object_ptr = break_iter_zv;
+ ret = Z_OBJ_HANDLER_P(break_iter_zv, get_method)(object_ptr,
+ method, method_len, key TSRMLS_CC);
+ goto end;
+ }
+ }
+
+ ret = std_object_handlers.get_method(object_ptr,
+ method, method_len, key TSRMLS_CC);
+
+end:
+ if (key == &local_literal) {
+ free_alloca(Z_STRVAL(local_literal.constant), use_heap);
+ }
+
+ return ret;
+}
+
+U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator)
+{
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "IntlPartsIterator::getBreakIterator: bad arguments", 0 TSRMLS_CC);
+ return;
+ }
+
+ INTLITERATOR_METHOD_FETCH_OBJECT;
+
+ zval *biter_zval = static_cast<zval*>(ii->iterator->data);
+ RETURN_ZVAL(biter_zval, 1, 0);
+}
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_parts_it_void, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+static const zend_function_entry IntlPartsIterator_class_functions[] = {
+ PHP_ME(IntlPartsIterator, getBreakIterator, ainfo_parts_it_void, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+
+U_CFUNC void breakiterator_register_IntlPartsIterator_class(TSRMLS_D)
+{
+ zend_class_entry ce;
+
+ /* Create and register 'BreakIterator' class. */
+ INIT_CLASS_ENTRY(ce, "IntlPartsIterator", IntlPartsIterator_class_functions);
+ IntlPartsIterator_ce_ptr = zend_register_internal_class_ex(&ce,
+ IntlIterator_ce_ptr, NULL TSRMLS_CC);
+ IntlPartsIterator_ce_ptr->create_object = IntlPartsIterator_object_create;
+
+ memcpy(&IntlPartsIterator_handlers, &IntlIterator_handlers,
+ sizeof IntlPartsIterator_handlers);
+ IntlPartsIterator_handlers.get_method = IntlPartsIterator_get_method;
+
+#define PARTSITER_DECL_LONG_CONST(name) \
+ zend_declare_class_constant_long(IntlPartsIterator_ce_ptr, #name, \
+ sizeof(#name) - 1, PARTS_ITERATOR_ ## name TSRMLS_CC)
+
+ PARTSITER_DECL_LONG_CONST(KEY_SEQUENTIAL);
+ PARTSITER_DECL_LONG_CONST(KEY_LEFT);
+ PARTSITER_DECL_LONG_CONST(KEY_RIGHT);
+
+#undef PARTSITER_DECL_LONG_CONST
+} \ No newline at end of file
diff --git a/ext/intl/breakiterator/breakiterator_iterators.h b/ext/intl/breakiterator/breakiterator_iterators.h
new file mode 100644
index 000000000..716207241
--- /dev/null
+++ b/ext/intl/breakiterator/breakiterator_iterators.h
@@ -0,0 +1,42 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+#ifndef INTL_BREAKITERATOR_ITERATORS_H
+#define INTL_BREAKITERATOR_ITERATORS_H
+
+#include <unicode/umachine.h>
+
+U_CDECL_BEGIN
+#include <math.h>
+#include <php.h>
+U_CDECL_END
+
+typedef enum {
+ PARTS_ITERATOR_KEY_SEQUENTIAL,
+ PARTS_ITERATOR_KEY_LEFT,
+ PARTS_ITERATOR_KEY_RIGHT,
+} parts_iter_key_type;
+
+#ifdef __cplusplus
+void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv,
+ zval *object,
+ parts_iter_key_type key_type TSRMLS_DC);
+#endif
+
+U_CFUNC zend_object_iterator *_breakiterator_get_iterator(
+ zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
+U_CFUNC void breakiterator_register_IntlPartsIterator_class(TSRMLS_D);
+
+#endif \ No newline at end of file
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp
new file mode 100644
index 000000000..6a61f8cb9
--- /dev/null
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -0,0 +1,452 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <unicode/brkiter.h>
+#include "codepointiterator_internal.h"
+
+#include "breakiterator_iterators.h"
+
+extern "C" {
+#include "../php_intl.h"
+#define USE_BREAKITERATOR_POINTER 1
+#include "breakiterator_class.h"
+#include "../locale/locale.h"
+#include <zend_exceptions.h>
+}
+
+using PHP::CodePointBreakIterator;
+
+U_CFUNC PHP_METHOD(BreakIterator, __construct)
+{
+ zend_throw_exception( NULL,
+ "An object of this type cannot be created with the new operator",
+ 0 TSRMLS_CC );
+}
+
+static void _breakiter_factory(const char *func_name,
+ BreakIterator *(*func)(const Locale&, UErrorCode&),
+ INTERNAL_FUNCTION_PARAMETERS)
+{
+ BreakIterator *biter;
+ const char *locale_str = NULL;
+ int dummy;
+ char *msg;
+ UErrorCode status = UErrorCode();
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!",
+ &locale_str, &dummy) == FAILURE) {
+ spprintf(&msg, NULL, "%s: bad arguments", func_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ RETURN_NULL();
+ }
+
+ if (locale_str == NULL) {
+ locale_str = intl_locale_get_default(TSRMLS_C);
+ }
+
+ biter = func(Locale::createFromName(locale_str), status);
+ intl_error_set_code(NULL, status TSRMLS_CC);
+ if (U_FAILURE(status)) {
+ spprintf(&msg, NULL, "%s: error creating BreakIterator",
+ func_name);
+ intl_error_set_custom_msg(NULL, msg, 1 TSRMLS_CC);
+ efree(msg);
+ RETURN_NULL();
+ }
+
+ breakiterator_object_create(return_value, biter TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_create_word_instance)
+{
+ _breakiter_factory("breakiter_create_word_instance",
+ &BreakIterator::createWordInstance,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_create_line_instance)
+{
+ _breakiter_factory("breakiter_create_line_instance",
+ &BreakIterator::createLineInstance,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_create_character_instance)
+{
+ _breakiter_factory("breakiter_create_character_instance",
+ &BreakIterator::createCharacterInstance,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_create_sentence_instance)
+{
+ _breakiter_factory("breakiter_create_sentence_instance",
+ &BreakIterator::createSentenceInstance,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_create_title_instance)
+{
+ _breakiter_factory("breakiter_create_title_instance",
+ &BreakIterator::createTitleInstance,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_create_code_point_instance)
+{
+ UErrorCode status = UErrorCode();
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_create_code_point_instance: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ CodePointBreakIterator *cpbi = new CodePointBreakIterator();
+ breakiterator_object_create(return_value, cpbi TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_get_text)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_text: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ if (bio->text == NULL) {
+ RETURN_NULL();
+ } else {
+ RETURN_ZVAL(bio->text, 1, 0);
+ }
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_set_text)
+{
+ char *text;
+ int text_len;
+ UText *ut = NULL;
+ zval **textzv;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ &text, &text_len) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_set_text: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ int res = zend_get_parameters_ex(1, &textzv);
+ assert(res == SUCCESS);
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ /* assert it's safe to use text and text_len because zpp changes the
+ * arguments in the stack */
+ assert(text == Z_STRVAL_PP(textzv));
+
+ ut = utext_openUTF8(ut, text, text_len, BREAKITER_ERROR_CODE_P(bio));
+ INTL_CTOR_CHECK_STATUS(bio, "breakiter_set_text: error opening UText");
+
+ bio->biter->setText(ut, BREAKITER_ERROR_CODE(bio));
+ utext_close(ut); /* ICU shallow clones the UText */
+ INTL_CTOR_CHECK_STATUS(bio, "breakiter_set_text: error calling "
+ "BreakIterator::setText()");
+
+ /* When ICU clones the UText, it does not copy the buffer, so we have to
+ * keep the string buffer around by holding a reference to its zval. This
+ * also allows a faste implementation of getText() */
+ if (bio->text != NULL) {
+ zval_ptr_dtor(&bio->text);
+ }
+ bio->text = *textzv;
+ zval_add_ref(&bio->text);
+
+ RETURN_TRUE;
+}
+
+static void _breakiter_no_args_ret_int32(
+ const char *func_name,
+ int32_t (BreakIterator::*func)(),
+ INTERNAL_FUNCTION_PARAMETERS)
+{
+ char *msg;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ spprintf(&msg, NULL, "%s: bad arguments", func_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ int32_t res = (bio->biter->*func)();
+
+ RETURN_LONG((long)res);
+}
+
+static void _breakiter_int32_ret_int32(
+ const char *func_name,
+ int32_t (BreakIterator::*func)(int32_t),
+ INTERNAL_FUNCTION_PARAMETERS)
+{
+ char *msg;
+ long arg;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg) == FAILURE) {
+ spprintf(&msg, NULL, "%s: bad arguments", func_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ if (arg < INT32_MIN || arg > INT32_MAX) {
+ spprintf(&msg, NULL, "%s: offset argument is outside bounds of "
+ "a 32-bit wide integer", func_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ RETURN_FALSE;
+ }
+
+ int32_t res = (bio->biter->*func)((int32_t)arg);
+
+ RETURN_LONG((long)res);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_first)
+{
+ _breakiter_no_args_ret_int32("breakiter_first",
+ &BreakIterator::first,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_last)
+{
+ _breakiter_no_args_ret_int32("breakiter_last",
+ &BreakIterator::last,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_previous)
+{
+ _breakiter_no_args_ret_int32("breakiter_previous",
+ &BreakIterator::previous,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_next)
+{
+ bool no_arg_version = false;
+
+ if (ZEND_NUM_ARGS() == 0) {
+ no_arg_version = true;
+ } else if (ZEND_NUM_ARGS() == 1) {
+ zval **arg;
+ int res = zend_get_parameters_ex(1, &arg);
+ assert(res == SUCCESS);
+ if (Z_TYPE_PP(arg) == IS_NULL) {
+ no_arg_version = true;
+ ht = 0; /* pretend we don't have any argument */
+ } else {
+ no_arg_version = false;
+ }
+ }
+
+ if (no_arg_version) {
+ _breakiter_no_args_ret_int32("breakiter_next",
+ &BreakIterator::next,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ } else {
+ _breakiter_int32_ret_int32("breakiter_next",
+ &BreakIterator::next,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ }
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_current)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_current: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ int32_t res = bio->biter->current();
+
+ RETURN_LONG((long)res);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_following)
+{
+ _breakiter_int32_ret_int32("breakiter_following",
+ &BreakIterator::following,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_preceding)
+{
+ _breakiter_int32_ret_int32("breakiter_preceding",
+ &BreakIterator::preceding,
+ INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
+{
+ long offset;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
+ &offset) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_is_boundary: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (offset < INT32_MIN || offset > INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_is_boundary: offset argument is outside bounds of "
+ "a 32-bit wide integer", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ UBool res = bio->biter->isBoundary((int32_t)offset);
+
+ RETURN_BOOL((long)res);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_get_locale)
+{
+ long locale_type;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &locale_type) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_locale: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (locale_type != ULOC_ACTUAL_LOCALE && locale_type != ULOC_VALID_LOCALE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_locale: invalid locale type", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ Locale locale = bio->biter->getLocale((ULocDataLocaleType)locale_type,
+ BREAKITER_ERROR_CODE(bio));
+ INTL_METHOD_CHECK_STATUS(bio,
+ "breakiter_get_locale: Call to ICU method has failed");
+
+ RETURN_STRING(locale.getName(), 1);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
+{
+ long key_type = 0;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &key_type) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_parts_iterator: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (key_type != PARTS_ITERATOR_KEY_SEQUENTIAL
+ && key_type != PARTS_ITERATOR_KEY_LEFT
+ && key_type != PARTS_ITERATOR_KEY_RIGHT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_parts_iterator: bad key type", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ IntlIterator_from_BreakIterator_parts(
+ object, return_value, (parts_iter_key_type)key_type TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_get_error_code)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_error_code: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ /* Fetch the object (without resetting its last error code ). */
+ bio = (BreakIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+ if (bio == NULL)
+ RETURN_FALSE;
+
+ RETURN_LONG((long)BREAKITER_ERROR_CODE(bio));
+}
+
+U_CFUNC PHP_FUNCTION(breakiter_get_error_message)
+{
+ const char* message = NULL;
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "breakiter_get_error_message: bad arguments", 0 TSRMLS_CC );
+ RETURN_FALSE;
+ }
+
+
+ /* Fetch the object (without resetting its last error code ). */
+ bio = (BreakIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+ if (bio == NULL)
+ RETURN_FALSE;
+
+ /* Return last error message. */
+ message = intl_error_get_message(BREAKITER_ERROR_P(bio) TSRMLS_CC);
+ RETURN_STRING(message, 0);
+}
diff --git a/ext/intl/breakiterator/breakiterator_methods.h b/ext/intl/breakiterator/breakiterator_methods.h
new file mode 100644
index 000000000..a479ac92e
--- /dev/null
+++ b/ext/intl/breakiterator/breakiterator_methods.h
@@ -0,0 +1,64 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef BREAKITERATOR_METHODS_H
+#define BREAKITERATOR_METHODS_H
+
+#include <php.h>
+
+PHP_METHOD(BreakIterator, __construct);
+
+PHP_FUNCTION(breakiter_create_word_instance);
+
+PHP_FUNCTION(breakiter_create_line_instance);
+
+PHP_FUNCTION(breakiter_create_character_instance);
+
+PHP_FUNCTION(breakiter_create_sentence_instance);
+
+PHP_FUNCTION(breakiter_create_title_instance);
+
+PHP_FUNCTION(breakiter_create_code_point_instance);
+
+PHP_FUNCTION(breakiter_get_text);
+
+PHP_FUNCTION(breakiter_set_text);
+
+PHP_FUNCTION(breakiter_first);
+
+PHP_FUNCTION(breakiter_last);
+
+PHP_FUNCTION(breakiter_previous);
+
+PHP_FUNCTION(breakiter_next);
+
+PHP_FUNCTION(breakiter_current);
+
+PHP_FUNCTION(breakiter_following);
+
+PHP_FUNCTION(breakiter_preceding);
+
+PHP_FUNCTION(breakiter_is_boundary);
+
+PHP_FUNCTION(breakiter_get_locale);
+
+PHP_FUNCTION(breakiter_get_parts_iterator);
+
+PHP_FUNCTION(breakiter_get_error_code);
+
+PHP_FUNCTION(breakiter_get_error_message);
+
+#endif \ No newline at end of file
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
new file mode 100644
index 000000000..bf9239d53
--- /dev/null
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -0,0 +1,291 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#include "codepointiterator_internal.h"
+#include <unicode/uchriter.h>
+#include <typeinfo>
+
+//copied from cmemory.h, which is not public
+typedef union {
+ long t1;
+ double t2;
+ void *t3;
+} UAlignedMemory;
+
+#define U_POINTER_MASK_LSB(ptr, mask) (((ptrdiff_t)(char *)(ptr)) & (mask))
+#define U_ALIGNMENT_OFFSET(ptr) U_POINTER_MASK_LSB(ptr, sizeof(UAlignedMemory) - 1)
+#define U_ALIGNMENT_OFFSET_UP(ptr) (sizeof(UAlignedMemory) - U_ALIGNMENT_OFFSET(ptr))
+
+using namespace PHP;
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
+
+CodePointBreakIterator::CodePointBreakIterator()
+: BreakIterator(), fCharIter(NULL), lastCodePoint(U_SENTINEL)
+{
+ UErrorCode uec = UErrorCode();
+ this->fText = utext_openUChars(NULL, NULL, 0, &uec);
+}
+
+CodePointBreakIterator::CodePointBreakIterator(const PHP::CodePointBreakIterator &other)
+: BreakIterator(other), fText(NULL), fCharIter(NULL), lastCodePoint(U_SENTINEL)
+{
+ *this = other;
+}
+
+CodePointBreakIterator& CodePointBreakIterator::operator=(const CodePointBreakIterator& that)
+{
+ UErrorCode uec = UErrorCode();
+ UText *ut_clone = NULL;
+
+ if (this == &that) {
+ return *this;
+ }
+
+ this->fText = utext_clone(this->fText, that.fText, FALSE, TRUE, &uec);
+
+ //don't bother copying the character iterator, getText() is deprecated
+ clearCurrentCharIter();
+
+ this->lastCodePoint = that.lastCodePoint;
+ return *this;
+}
+
+CodePointBreakIterator::~CodePointBreakIterator()
+{
+ if (this->fText) {
+ utext_close(this->fText);
+ }
+ clearCurrentCharIter();
+}
+
+UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
+{
+ if (typeid(*this) != typeid(that)) {
+ return FALSE;
+ }
+
+ const CodePointBreakIterator& that2 =
+ static_cast<const CodePointBreakIterator&>(that);
+
+ if (!utext_equals(this->fText, that2.fText)) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+CodePointBreakIterator* CodePointBreakIterator::clone(void) const
+{
+ return new CodePointBreakIterator(*this);
+}
+
+CharacterIterator& CodePointBreakIterator::getText(void) const
+{
+ if (this->fCharIter == NULL) {
+ //this method is deprecated anyway; setup bogus iterator
+ static const UChar c = 0;
+ this->fCharIter = new UCharCharacterIterator(&c, 0);
+ }
+
+ return *this->fCharIter;
+}
+
+UText *CodePointBreakIterator::getUText(UText *fillIn, UErrorCode &status) const
+{
+ return utext_clone(fillIn, this->fText, FALSE, TRUE, &status);
+}
+
+void CodePointBreakIterator::setText(const UnicodeString &text)
+{
+ UErrorCode uec = UErrorCode();
+
+ //this closes the previous utext, if any
+ this->fText = utext_openConstUnicodeString(this->fText, &text, &uec);
+
+ clearCurrentCharIter();
+}
+
+void CodePointBreakIterator::setText(UText *text, UErrorCode &status)
+{
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ this->fText = utext_clone(this->fText, text, FALSE, TRUE, &status);
+
+ clearCurrentCharIter();
+}
+
+void CodePointBreakIterator::adoptText(CharacterIterator* it)
+{
+ UErrorCode uec = UErrorCode();
+ clearCurrentCharIter();
+
+ this->fCharIter = it;
+ this->fText = utext_openCharacterIterator(this->fText, it, &uec);
+}
+
+int32_t CodePointBreakIterator::first(void)
+{
+ UTEXT_SETNATIVEINDEX(this->fText, 0);
+ this->lastCodePoint = U_SENTINEL;
+
+ return 0;
+}
+
+int32_t CodePointBreakIterator::last(void)
+{
+ int32_t pos = (int32_t)utext_nativeLength(this->fText);
+ UTEXT_SETNATIVEINDEX(this->fText, pos);
+ this->lastCodePoint = U_SENTINEL;
+
+ return pos;
+}
+
+int32_t CodePointBreakIterator::previous(void)
+{
+ this->lastCodePoint = UTEXT_PREVIOUS32(this->fText);
+ if (this->lastCodePoint == U_SENTINEL) {
+ return BreakIterator::DONE;
+ }
+
+ return (int32_t)UTEXT_GETNATIVEINDEX(this->fText);
+}
+
+int32_t CodePointBreakIterator::next(void)
+{
+ this->lastCodePoint = UTEXT_NEXT32(this->fText);
+ if (this->lastCodePoint == U_SENTINEL) {
+ return BreakIterator::DONE;
+ }
+
+ return (int32_t)UTEXT_GETNATIVEINDEX(this->fText);
+}
+
+int32_t CodePointBreakIterator::current(void) const
+{
+ return (int32_t)UTEXT_GETNATIVEINDEX(this->fText);
+}
+
+int32_t CodePointBreakIterator::following(int32_t offset)
+{
+ this->lastCodePoint = utext_next32From(this->fText, offset);
+ if (this->lastCodePoint == U_SENTINEL) {
+ return BreakIterator::DONE;
+ }
+
+ return (int32_t)UTEXT_GETNATIVEINDEX(this->fText);
+}
+
+int32_t CodePointBreakIterator::preceding(int32_t offset)
+{
+ this->lastCodePoint = utext_previous32From(this->fText, offset);
+ if (this->lastCodePoint == U_SENTINEL) {
+ return BreakIterator::DONE;
+ }
+
+ return (int32_t)UTEXT_GETNATIVEINDEX(this->fText);
+}
+
+UBool CodePointBreakIterator::isBoundary(int32_t offset)
+{
+ //this function has side effects, and it's supposed to
+ utext_setNativeIndex(this->fText, offset);
+ return (offset == utext_getNativeIndex(this->fText));
+}
+
+int32_t CodePointBreakIterator::next(int32_t n)
+{
+ UBool res = utext_moveIndex32(this->fText, n);
+
+#ifndef UTEXT_CURRENT32
+#define UTEXT_CURRENT32 utext_current32
+#endif
+
+ if (res) {
+ this->lastCodePoint = UTEXT_CURRENT32(this->fText);
+ return (int32_t)UTEXT_GETNATIVEINDEX(this->fText);
+ } else {
+ this->lastCodePoint = U_SENTINEL;
+ return BreakIterator::DONE;
+ }
+}
+
+CodePointBreakIterator *CodePointBreakIterator::createBufferClone(
+ void *stackBuffer, int32_t &bufferSize, UErrorCode &status)
+{
+ //see implementation of RuleBasedBreakIterator::createBufferClone()
+ if (U_FAILURE(status)) {
+ return NULL;
+ }
+
+ if (bufferSize <= 0) {
+ bufferSize = sizeof(CodePointBreakIterator) + U_ALIGNMENT_OFFSET_UP(0);
+ return NULL;
+ }
+
+ char *buf = (char*)stackBuffer;
+ uint32_t s = bufferSize;
+
+ if (stackBuffer == NULL) {
+ s = 0;
+ }
+
+ if (U_ALIGNMENT_OFFSET(stackBuffer) != 0) {
+ uint32_t offsetUp = (uint32_t)U_ALIGNMENT_OFFSET_UP(buf);
+ s -= offsetUp;
+ buf += offsetUp;
+ }
+
+ if (s < sizeof(CodePointBreakIterator)) {
+ CodePointBreakIterator *clonedBI = new CodePointBreakIterator(*this);
+ if (clonedBI == NULL) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ } else {
+ status = U_SAFECLONE_ALLOCATED_WARNING;
+ }
+
+ return clonedBI;
+ }
+
+ return new(buf) CodePointBreakIterator(*this);
+}
+
+CodePointBreakIterator &CodePointBreakIterator::refreshInputText(UText *input, UErrorCode &status)
+{
+ //see implementation of RuleBasedBreakIterator::createBufferClone()
+ if (U_FAILURE(status)) {
+ return *this;
+ }
+ if (input == NULL) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return *this;
+ }
+
+ int64_t pos = utext_getNativeIndex(this->fText);
+ this->fText = utext_clone(this->fText, input, FALSE, TRUE, &status);
+ if (U_FAILURE(status)) {
+ return *this;
+ }
+
+ utext_setNativeIndex(this->fText, pos);
+ if (utext_getNativeIndex(fText) != pos) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+
+ return *this;
+}
diff --git a/ext/intl/breakiterator/codepointiterator_internal.h b/ext/intl/breakiterator/codepointiterator_internal.h
new file mode 100644
index 000000000..988b91c20
--- /dev/null
+++ b/ext/intl/breakiterator/codepointiterator_internal.h
@@ -0,0 +1,98 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef CODEPOINTITERATOR_INTERNAL_H
+#define CODEPOINTITERATOR_INTERNAL_H
+
+#include <unicode/brkiter.h>
+
+using U_ICU_NAMESPACE::BreakIterator;
+
+namespace PHP {
+
+ class CodePointBreakIterator : public BreakIterator {
+
+ public:
+ static UClassID getStaticClassID();
+
+ CodePointBreakIterator();
+
+ CodePointBreakIterator(const CodePointBreakIterator &other);
+
+ CodePointBreakIterator& operator=(const CodePointBreakIterator& that);
+
+ virtual ~CodePointBreakIterator();
+
+ virtual UBool operator==(const BreakIterator& that) const;
+
+ virtual CodePointBreakIterator* clone(void) const;
+
+ virtual UClassID getDynamicClassID(void) const;
+
+ virtual CharacterIterator& getText(void) const;
+
+ virtual UText *getUText(UText *fillIn, UErrorCode &status) const;
+
+ virtual void setText(const UnicodeString &text);
+
+ virtual void setText(UText *text, UErrorCode &status);
+
+ virtual void adoptText(CharacterIterator* it);
+
+ virtual int32_t first(void);
+
+ virtual int32_t last(void);
+
+ virtual int32_t previous(void);
+
+ virtual int32_t next(void);
+
+ virtual int32_t current(void) const;
+
+ virtual int32_t following(int32_t offset);
+
+ virtual int32_t preceding(int32_t offset);
+
+ virtual UBool isBoundary(int32_t offset);
+
+ virtual int32_t next(int32_t n);
+
+ virtual CodePointBreakIterator *createBufferClone(void *stackBuffer,
+ int32_t &BufferSize,
+ UErrorCode &status);
+
+ virtual CodePointBreakIterator &refreshInputText(UText *input, UErrorCode &status);
+
+ inline UChar32 getLastCodePoint()
+ {
+ return this->lastCodePoint;
+ }
+
+ private:
+ UText *fText;
+ UChar32 lastCodePoint;
+ mutable CharacterIterator *fCharIter;
+
+ inline void clearCurrentCharIter()
+ {
+ delete this->fCharIter;
+ this->fCharIter = NULL;
+ this->lastCodePoint = U_SENTINEL;
+ }
+ };
+}
+
+#endif \ No newline at end of file
diff --git a/ext/intl/breakiterator/codepointiterator_methods.cpp b/ext/intl/breakiterator/codepointiterator_methods.cpp
new file mode 100644
index 000000000..ae7e526ea
--- /dev/null
+++ b/ext/intl/breakiterator/codepointiterator_methods.cpp
@@ -0,0 +1,44 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#include "codepointiterator_internal.h"
+
+extern "C" {
+#define USE_BREAKITERATOR_POINTER 1
+#include "breakiterator_class.h"
+}
+
+using PHP::CodePointBreakIterator;
+
+static inline CodePointBreakIterator *fetch_cpbi(BreakIterator_object *bio) {
+ return (CodePointBreakIterator*)bio->biter;
+}
+
+U_CFUNC PHP_FUNCTION(cpbi_get_last_code_point)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "cpbi_get_last_code_point: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ RETURN_LONG(fetch_cpbi(bio)->getLastCodePoint());
+} \ No newline at end of file
diff --git a/ext/intl/breakiterator/codepointiterator_methods.h b/ext/intl/breakiterator/codepointiterator_methods.h
new file mode 100644
index 000000000..d34e5b61e
--- /dev/null
+++ b/ext/intl/breakiterator/codepointiterator_methods.h
@@ -0,0 +1,24 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef CODEPOINTITERATOR_METHODS_H
+#define CODEPOINTITERATOR_METHODS_H
+
+#include <php.h>
+
+PHP_FUNCTION(cpbi_get_last_code_point);
+
+#endif \ No newline at end of file
diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
new file mode 100644
index 000000000..454e5249f
--- /dev/null
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -0,0 +1,221 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#include <unicode/rbbi.h>
+
+extern "C" {
+#define USE_BREAKITERATOR_POINTER 1
+#include "breakiterator_class.h"
+#include <zend_exceptions.h>
+#include <limits.h>
+}
+
+#include "../intl_convertcpp.h"
+
+static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
+ return (RuleBasedBreakIterator*)bio->biter;
+}
+
+static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
+{
+ zval *object = getThis();
+ char *rules;
+ int rules_len;
+ zend_bool compiled = 0;
+ UErrorCode status = U_ZERO_ERROR;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b",
+ &rules, &rules_len, &compiled) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "rbbi_create_instance: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ // instantiation of ICU object
+ RuleBasedBreakIterator *rbbi;
+
+ if (!compiled) {
+ UnicodeString rulesStr;
+ UParseError parseError = UParseError();
+ if (intl_stringFromChar(rulesStr, rules, rules_len, &status)
+ == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "rbbi_create_instance: rules were not a valid UTF-8 string",
+ 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ rbbi = new RuleBasedBreakIterator(rulesStr, parseError, status);
+ intl_error_set_code(NULL, status TSRMLS_CC);
+ if (U_FAILURE(status)) {
+ char *msg;
+ smart_str parse_error_str;
+ parse_error_str = intl_parse_error_to_string(&parseError);
+ spprintf(&msg, 0, "rbbi_create_instance: unable to create "
+ "RuleBasedBreakIterator from rules (%s)", parse_error_str.c);
+ smart_str_free(&parse_error_str);
+ intl_error_set_custom_msg(NULL, msg, 1 TSRMLS_CC);
+ efree(msg);
+ delete rbbi;
+ RETURN_NULL();
+ }
+ } else { // compiled
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ rbbi = new RuleBasedBreakIterator((uint8_t*)rules, rules_len, status);
+ if (U_FAILURE(status)) {
+ intl_error_set(NULL, status, "rbbi_create_instance: unable to "
+ "create instance from compiled rules", 0 TSRMLS_CC);
+ delete rbbi;
+ RETURN_NULL();
+ }
+#else
+ intl_error_set(NULL, U_UNSUPPORTED_ERROR, "rbbi_create_instance: "
+ "compiled rules require ICU >= 4.8", 0 TSRMLS_CC);
+ RETURN_NULL();
+#endif
+ }
+
+ breakiterator_object_create(return_value, rbbi TSRMLS_CC);
+}
+
+U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct)
+{
+ zval orig_this = *getThis();
+
+ return_value = getThis();
+ //changes this to IS_NULL (without first destroying) if there's an error
+ _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+
+ if (Z_TYPE_P(return_value) == IS_NULL) {
+ zend_object_store_ctor_failed(&orig_this TSRMLS_CC);
+ zval_dtor(&orig_this);
+ }
+}
+
+U_CFUNC PHP_FUNCTION(rbbi_get_rules)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "rbbi_get_rules: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ const UnicodeString rules = fetch_rbbi(bio)->getRules();
+
+ Z_TYPE_P(return_value) = IS_STRING;
+ if (intl_charFromString(rules, &Z_STRVAL_P(return_value),
+ &Z_STRLEN_P(return_value), BREAKITER_ERROR_CODE_P(bio)) == FAILURE)
+ {
+ intl_errors_set(BREAKITER_ERROR_P(bio), BREAKITER_ERROR_CODE(bio),
+ "rbbi_hash_code: Error converting result to UTF-8 string",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+}
+
+U_CFUNC PHP_FUNCTION(rbbi_get_rule_status)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "rbbi_get_rule_status: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ RETURN_LONG(fetch_rbbi(bio)->getRuleStatus());
+}
+
+U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "rbbi_get_rule_status_vec: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ int32_t num_rules = fetch_rbbi(bio)->getRuleStatusVec(NULL, 0,
+ BREAKITER_ERROR_CODE(bio));
+ if (BREAKITER_ERROR_CODE(bio) == U_BUFFER_OVERFLOW_ERROR) {
+ BREAKITER_ERROR_CODE(bio) = U_ZERO_ERROR;
+ } else {
+ // should not happen
+ INTL_METHOD_CHECK_STATUS(bio, "rbbi_get_rule_status_vec: failed "
+ " determining the number of status values");
+ }
+ int32_t *rules = new int32_t[num_rules];
+ num_rules = fetch_rbbi(bio)->getRuleStatusVec(rules, num_rules,
+ BREAKITER_ERROR_CODE(bio));
+ if (U_FAILURE(BREAKITER_ERROR_CODE(bio))) {
+ delete[] rules;
+ intl_errors_set(BREAKITER_ERROR_P(bio), BREAKITER_ERROR_CODE(bio),
+ "rbbi_get_rule_status_vec: failed obtaining the status values",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ array_init_size(return_value, num_rules);
+ for (int32_t i = 0; i < num_rules; i++) {
+ add_next_index_long(return_value, rules[i]);
+ }
+ delete[] rules;
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+U_CFUNC PHP_FUNCTION(rbbi_get_binary_rules)
+{
+ BREAKITER_METHOD_INIT_VARS;
+ object = getThis();
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "rbbi_get_binary_rules: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ BREAKITER_METHOD_FETCH_OBJECT;
+
+ uint32_t rules_len;
+ const uint8_t *rules = fetch_rbbi(bio)->getBinaryRules(rules_len);
+
+ if (rules_len > INT_MAX - 1) {
+ intl_errors_set(BREAKITER_ERROR_P(bio), BREAKITER_ERROR_CODE(bio),
+ "rbbi_get_binary_rules: the rules are too large",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ char *ret_rules = static_cast<char*>(emalloc(rules_len + 1));
+ memcpy(ret_rules, rules, rules_len);
+ ret_rules[rules_len] = '\0';
+
+ RETURN_STRINGL(ret_rules, rules_len, 0);
+}
+#endif
diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.h b/ext/intl/breakiterator/rulebasedbreakiterator_methods.h
new file mode 100644
index 000000000..edea4ea2a
--- /dev/null
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.h
@@ -0,0 +1,32 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef RULEBASEDBREAKITERATOR_METHODS_H
+#define RULEBASEDBREAKITERATOR_METHODS_H
+
+#include <php.h>
+
+PHP_METHOD(IntlRuleBasedBreakIterator, __construct);
+
+PHP_FUNCTION(rbbi_get_rules);
+
+PHP_FUNCTION(rbbi_get_rule_status);
+
+PHP_FUNCTION(rbbi_get_rule_status_vec);
+
+PHP_FUNCTION(rbbi_get_binary_rules);
+
+#endif \ No newline at end of file
diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp
new file mode 100644
index 000000000..beb65f718
--- /dev/null
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -0,0 +1,550 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../intl_cppshims.h"
+
+#include <unicode/calendar.h>
+#include <unicode/gregocal.h>
+
+extern "C" {
+#define USE_TIMEZONE_POINTER 1
+#include "../timezone/timezone_class.h"
+#define USE_CALENDAR_POINTER 1
+#include "calendar_class.h"
+#include "calendar_methods.h"
+#include "gregoriancalendar_methods.h"
+#include <zend_exceptions.h>
+#include <assert.h>
+}
+
+/* {{{ Global variables */
+zend_class_entry *Calendar_ce_ptr;
+zend_class_entry *GregorianCalendar_ce_ptr;
+zend_object_handlers Calendar_handlers;
+/* }}} */
+
+U_CFUNC void calendar_object_create(zval *object,
+ Calendar *calendar TSRMLS_DC)
+{
+ UClassID classId = calendar->getDynamicClassID();
+ zend_class_entry *ce;
+
+ //if (dynamic_cast<GregorianCalendar*>(calendar) != NULL) {
+ if (classId == GregorianCalendar::getStaticClassID()) {
+ ce = GregorianCalendar_ce_ptr;
+ } else {
+ ce = Calendar_ce_ptr;
+ }
+
+ object_init_ex(object, ce);
+ calendar_object_construct(object, calendar TSRMLS_CC);
+}
+
+U_CFUNC Calendar *calendar_fetch_native_calendar(zval *object TSRMLS_DC)
+{
+ Calendar_object *co = (Calendar_object*)
+ zend_object_store_get_object(object TSRMLS_CC);
+
+ return co->ucal;
+}
+
+U_CFUNC void calendar_object_construct(zval *object,
+ Calendar *calendar TSRMLS_DC)
+{
+ Calendar_object *co;
+
+ CALENDAR_METHOD_FETCH_OBJECT_NO_CHECK; //populate to from object
+ assert(co->ucal == NULL);
+ co->ucal = (Calendar*)calendar;
+}
+
+/* {{{ clone handler for Calendar */
+static zend_object_value Calendar_clone_obj(zval *object TSRMLS_DC)
+{
+ Calendar_object *co_orig,
+ *co_new;
+ zend_object_value ret_val;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ co_orig = (Calendar_object*)zend_object_store_get_object(object TSRMLS_CC);
+ intl_error_reset(INTL_DATA_ERROR_P(co_orig) TSRMLS_CC);
+
+ ret_val = Calendar_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
+ co_new = (Calendar_object*)zend_object_store_get_object_by_handle(ret_val.handle TSRMLS_CC);
+
+ zend_objects_clone_members(&co_new->zo, ret_val,
+ &co_orig->zo, Z_OBJ_HANDLE_P(object) TSRMLS_CC);
+
+ if (co_orig->ucal != NULL) {
+ Calendar *newCalendar;
+
+ newCalendar = co_orig->ucal->clone();
+ if (!newCalendar) {
+ char *err_msg;
+ intl_errors_set_code(CALENDAR_ERROR_P(co_orig),
+ U_MEMORY_ALLOCATION_ERROR TSRMLS_CC);
+ intl_errors_set_custom_msg(CALENDAR_ERROR_P(co_orig),
+ "Could not clone IntlCalendar", 0 TSRMLS_CC);
+ err_msg = intl_error_get_message(CALENDAR_ERROR_P(co_orig) TSRMLS_CC);
+ zend_throw_exception(NULL, err_msg, 0 TSRMLS_CC);
+ efree(err_msg);
+ } else {
+ co_new->ucal = newCalendar;
+ }
+ } else {
+ zend_throw_exception(NULL, "Cannot clone unconstructed IntlCalendar", 0 TSRMLS_CC);
+ }
+
+ return ret_val;
+}
+/* }}} */
+
+static const struct {
+ UCalendarDateFields field;
+ const char *name;
+} debug_info_fields[] = {
+ {UCAL_ERA, "era"},
+ {UCAL_YEAR, "year"},
+ {UCAL_MONTH, "month"},
+ {UCAL_WEEK_OF_YEAR, "week of year"},
+ {UCAL_WEEK_OF_MONTH, "week of month"},
+ {UCAL_DAY_OF_YEAR, "day of year"},
+ {UCAL_DAY_OF_MONTH, "day of month"},
+ {UCAL_DAY_OF_WEEK, "day of week"},
+ {UCAL_DAY_OF_WEEK_IN_MONTH, "day of week in month"},
+ {UCAL_AM_PM, "AM/PM"},
+ {UCAL_HOUR, "hour"},
+ {UCAL_HOUR_OF_DAY, "hour of day"},
+ {UCAL_MINUTE, "minute"},
+ {UCAL_SECOND, "second"},
+ {UCAL_MILLISECOND, "millisecond"},
+ {UCAL_ZONE_OFFSET, "zone offset"},
+ {UCAL_DST_OFFSET, "DST offset"},
+ {UCAL_YEAR_WOY, "year for week of year"},
+ {UCAL_DOW_LOCAL, "localized day of week"},
+ {UCAL_EXTENDED_YEAR, "extended year"},
+ {UCAL_JULIAN_DAY, "julian day"},
+ {UCAL_MILLISECONDS_IN_DAY, "milliseconds in day"},
+ {UCAL_IS_LEAP_MONTH, "is leap month"},
+};
+
+/* {{{ get_debug_info handler for Calendar */
+static HashTable *Calendar_get_debug_info(zval *object, int *is_temp TSRMLS_DC)
+{
+ zval zv = zval_used_for_init,
+ *zfields;
+ Calendar_object *co;
+ const Calendar *cal;
+
+ *is_temp = 1;
+
+ array_init_size(&zv, 8);
+
+ co = (Calendar_object*)zend_object_store_get_object(object TSRMLS_CC);
+ cal = co->ucal;
+
+ if (cal == NULL) {
+ add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 0);
+ return Z_ARRVAL(zv);
+ }
+
+ add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 1);
+
+ add_assoc_string_ex(&zv, "type", sizeof("type"),
+ const_cast<char*>(cal->getType()), 1);
+
+ {
+ zval ztz = zval_used_for_init,
+ *ztz_debug;
+ int is_tmp;
+ HashTable *debug_info;
+
+ timezone_object_construct(&cal->getTimeZone(), &ztz , 0 TSRMLS_CC);
+ debug_info = Z_OBJ_HANDLER(ztz, get_debug_info)(&ztz, &is_tmp TSRMLS_CC);
+ assert(is_tmp == 1);
+
+ ALLOC_INIT_ZVAL(ztz_debug);
+ Z_TYPE_P(ztz_debug) = IS_ARRAY;
+ Z_ARRVAL_P(ztz_debug) = debug_info;
+ add_assoc_zval_ex(&zv, "timeZone", sizeof("timeZone"), ztz_debug);
+ }
+
+ {
+ UErrorCode uec = U_ZERO_ERROR;
+ Locale locale = cal->getLocale(ULOC_VALID_LOCALE, uec);
+ if (U_SUCCESS(uec)) {
+ add_assoc_string_ex(&zv, "locale", sizeof("locale"),
+ const_cast<char*>(locale.getName()), 1);
+ } else {
+ add_assoc_string_ex(&zv, "locale", sizeof("locale"),
+ const_cast<char*>(u_errorName(uec)), 1);
+ }
+ }
+
+ ALLOC_INIT_ZVAL(zfields);
+ array_init_size(zfields, UCAL_FIELD_COUNT);
+
+ for (int i = 0;
+ i < sizeof(debug_info_fields) / sizeof(*debug_info_fields);
+ i++) {
+ UErrorCode uec = U_ZERO_ERROR;
+ const char *name = debug_info_fields[i].name;
+ int32_t res = cal->get(debug_info_fields[i].field, uec);
+ if (U_SUCCESS(uec)) {
+ add_assoc_long(zfields, name, (long)res);
+ } else {
+ add_assoc_string(zfields, name, const_cast<char*>(u_errorName(uec)), 1);
+ }
+ }
+
+ add_assoc_zval_ex(&zv, "fields", sizeof("fields"), zfields);
+
+ return Z_ARRVAL(zv);
+}
+/* }}} */
+
+/* {{{ void calendar_object_init(Calendar_object* to)
+ * Initialize internals of Calendar_object not specific to zend standard objects.
+ */
+static void calendar_object_init(Calendar_object *co TSRMLS_DC)
+{
+ intl_error_init(CALENDAR_ERROR_P(co) TSRMLS_CC);
+ co->ucal = NULL;
+}
+/* }}} */
+
+/* {{{ Calendar_objects_dtor */
+static void Calendar_objects_dtor(void *object,
+ zend_object_handle handle TSRMLS_DC)
+{
+ zend_objects_destroy_object((zend_object*)object, handle TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ Calendar_objects_free */
+static void Calendar_objects_free(zend_object *object TSRMLS_DC)
+{
+ Calendar_object* co = (Calendar_object*) object;
+
+ if (co->ucal) {
+ delete co->ucal;
+ co->ucal = NULL;
+ }
+ intl_error_reset(CALENDAR_ERROR_P(co) TSRMLS_CC);
+
+ zend_object_std_dtor(&co->zo TSRMLS_CC);
+
+ efree(co);
+}
+/* }}} */
+
+/* {{{ Calendar_object_create */
+static zend_object_value Calendar_object_create(zend_class_entry *ce TSRMLS_DC)
+{
+ zend_object_value retval;
+ Calendar_object* intern;
+
+ intern = (Calendar_object*)ecalloc(1, sizeof(Calendar_object));
+
+ zend_object_std_init(&intern->zo, ce TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->zo.properties, &(ce->default_properties),
+ (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*));
+#else
+ object_properties_init((zend_object*) intern, ce);
+#endif
+ calendar_object_init(intern TSRMLS_CC);
+
+ retval.handle = zend_objects_store_put(
+ intern,
+ Calendar_objects_dtor,
+ (zend_objects_free_object_storage_t) Calendar_objects_free,
+ NULL TSRMLS_CC);
+
+ retval.handlers = &Calendar_handlers;
+
+ return retval;
+}
+/* }}} */
+
+/* {{{ Calendar methods arguments info */
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_void, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_field, 0, 0, 1)
+ ZEND_ARG_INFO(0, field)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_dow, 0, 0, 1)
+ ZEND_ARG_INFO(0, dayOfWeek)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_other_cal, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_date, 0, 0, 1)
+ ZEND_ARG_INFO(0, date)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_date_optional, 0, 0, 0)
+ ZEND_ARG_INFO(0, date)
+ZEND_END_ARG_INFO()
+
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_createInstance, 0, 0, 0)
+ ZEND_ARG_INFO(0, timeZone)
+ ZEND_ARG_INFO(0, locale)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_get_keyword_values_for_locale, 0, 0, 3)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, locale)
+ ZEND_ARG_INFO(0, commonlyUsed)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_add, 0, 0, 2)
+ ZEND_ARG_INFO(0, field)
+ ZEND_ARG_INFO(0, amount)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_setTimeZone, 0, 0, 1)
+ ZEND_ARG_INFO(0, timeZone)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_set, 0, 0, 2)
+ ZEND_ARG_INFO(0, fieldOrYear)
+ ZEND_ARG_INFO(0, valueOrMonth)
+ ZEND_ARG_INFO(0, dayOfMonth)
+ ZEND_ARG_INFO(0, hour)
+ ZEND_ARG_INFO(0, minute)
+ ZEND_ARG_INFO(0, second)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_roll, 0, 0, 2)
+ ZEND_ARG_INFO(0, field)
+ ZEND_ARG_INFO(0, amountOrUpOrDown)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_clear, 0, 0, 0)
+ ZEND_ARG_INFO(0, field)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_field_difference, 0, 0, 2)
+ ZEND_ARG_INFO(0, when)
+ ZEND_ARG_INFO(0, field)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_get_locale, 0, 0, 1)
+ ZEND_ARG_INFO(0, localeType)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_setLenient, 0, 0, 1)
+ ZEND_ARG_INFO(0, isLenient)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_from_date_time, 0, 0, 1)
+ ZEND_ARG_INFO(0, dateTime)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_wall_time_option, 0, 0, 1)
+ ZEND_ARG_INFO(0, wallTimeOption)
+ZEND_END_ARG_INFO()
+
+/* Gregorian Calendar */
+ZEND_BEGIN_ARG_INFO_EX(ainfo_gregcal___construct, 0, 0, 0)
+ ZEND_ARG_INFO(0, timeZoneOrYear)
+ ZEND_ARG_INFO(0, localeOrMonth)
+ ZEND_ARG_INFO(0, dayOfMonth)
+ ZEND_ARG_INFO(0, hour)
+ ZEND_ARG_INFO(0, minute)
+ ZEND_ARG_INFO(0, second)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_gregcal_isLeapYear, 0, 0, 1)
+ ZEND_ARG_INFO(0, year)
+ZEND_END_ARG_INFO()
+
+/* }}} */
+
+/* {{{ Calendar_class_functions
+ * Every 'IntlCalendar' class method has an entry in this table
+ */
+static const zend_function_entry Calendar_class_functions[] = {
+ PHP_ME(IntlCalendar, __construct, ainfo_cal_void, ZEND_ACC_PRIVATE)
+ PHP_ME_MAPPING(createInstance, intlcal_create_instance, ainfo_cal_createInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
+ PHP_ME_MAPPING(getKeywordValuesForLocale, intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+#endif
+ PHP_ME_MAPPING(getNow, intlcal_get_now, ainfo_cal_void, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getAvailableLocales, intlcal_get_available_locales, ainfo_cal_void, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(get, intlcal_get, ainfo_cal_field, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getTime, intlcal_get_time, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setTime, intlcal_set_time, ainfo_cal_date, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(add, intlcal_add, ainfo_cal_add, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setTimeZone, intlcal_set_time_zone, ainfo_cal_setTimeZone, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(after, intlcal_after, ainfo_cal_other_cal, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(before, intlcal_before, ainfo_cal_other_cal, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(set, intlcal_set, ainfo_cal_set, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(roll, intlcal_roll, ainfo_cal_roll, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(clear, intlcal_clear, ainfo_cal_clear, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(fieldDifference, intlcal_field_difference, ainfo_cal_field_difference, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getActualMaximum, intlcal_get_actual_maximum, ainfo_cal_field, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getActualMinimum, intlcal_get_actual_minimum, ainfo_cal_field, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ PHP_ME_MAPPING(getDayOfWeekType, intlcal_get_day_of_week_type, ainfo_cal_dow, ZEND_ACC_PUBLIC)
+#endif
+ PHP_ME_MAPPING(getFirstDayOfWeek, intlcal_get_first_day_of_week, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getGreatestMinimum, intlcal_get_greatest_minimum, ainfo_cal_field, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getLeastMaximum, intlcal_get_least_maximum, ainfo_cal_field, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getLocale, intlcal_get_locale, ainfo_cal_get_locale, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getMaximum, intlcal_get_maximum, ainfo_cal_field, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getMinimalDaysInFirstWeek, intlcal_get_minimal_days_in_first_week, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getMinimum, intlcal_get_minimum, ainfo_cal_field, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getTimeZone, intlcal_get_time_zone, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getType, intlcal_get_type, ainfo_cal_void, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ PHP_ME_MAPPING(getWeekendTransition,intlcal_get_weekend_transition, ainfo_cal_dow, ZEND_ACC_PUBLIC)
+#endif
+ PHP_ME_MAPPING(inDaylightTime, intlcal_in_daylight_time, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(isEquivalentTo, intlcal_is_equivalent_to, ainfo_cal_other_cal, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(isLenient, intlcal_is_lenient, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(isSet, intlcal_is_set, ainfo_cal_field, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ PHP_ME_MAPPING(isWeekend, intlcal_is_weekend, ainfo_cal_date_optional, ZEND_ACC_PUBLIC)
+#endif
+ PHP_ME_MAPPING(setFirstDayOfWeek, intlcal_set_first_day_of_week, ainfo_cal_dow, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setLenient, intlcal_set_lenient, ainfo_cal_setLenient, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(equals, intlcal_equals, ainfo_cal_other_cal, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ PHP_ME_MAPPING(getRepeatedWallTimeOption,intlcal_get_repeated_wall_time_option,ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getSkippedWallTimeOption,intlcal_get_skipped_wall_time_option,ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setRepeatedWallTimeOption,intlcal_set_repeated_wall_time_option,ainfo_cal_wall_time_option,ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setSkippedWallTimeOption,intlcal_set_skipped_wall_time_option,ainfo_cal_wall_time_option,ZEND_ACC_PUBLIC)
+#endif
+ PHP_ME_MAPPING(fromDateTime, intlcal_from_date_time, ainfo_cal_from_date_time, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(toDateTime, intlcal_to_date_time, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getErrorCode, intlcal_get_error_code, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getErrorMessage, intlcal_get_error_message, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+/* }}} */
+
+/* {{{ GregorianCalendar_class_functions
+ */
+static const zend_function_entry GregorianCalendar_class_functions[] = {
+ PHP_ME(IntlGregorianCalendar, __construct, ainfo_gregcal___construct, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(setGregorianChange, intlgregcal_set_gregorian_change, ainfo_cal_date, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getGregorianChange, intlgregcal_get_gregorian_change, ainfo_cal_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(isLeapYear, intlgregcal_is_leap_year, ainfo_gregcal_isLeapYear, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+/* }}} */
+
+
+/* {{{ calendar_register_IntlCalendar_class
+ * Initialize 'IntlCalendar' class
+ */
+void calendar_register_IntlCalendar_class(TSRMLS_D)
+{
+ zend_class_entry ce;
+
+ /* Create and register 'IntlCalendar' class. */
+ INIT_CLASS_ENTRY(ce, "IntlCalendar", Calendar_class_functions);
+ ce.create_object = Calendar_object_create;
+ Calendar_ce_ptr = zend_register_internal_class(&ce TSRMLS_CC);
+ if (!Calendar_ce_ptr) {
+ //can't happen now without bigger problems before
+ php_error_docref0(NULL TSRMLS_CC, E_ERROR,
+ "IntlCalendar: class registration has failed.");
+ return;
+ }
+ memcpy( &Calendar_handlers, zend_get_std_object_handlers(),
+ sizeof Calendar_handlers);
+ Calendar_handlers.clone_obj = Calendar_clone_obj;
+ Calendar_handlers.get_debug_info = Calendar_get_debug_info;
+
+ /* Create and register 'IntlGregorianCalendar' class. */
+ INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
+ GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
+ Calendar_ce_ptr, NULL TSRMLS_CC);
+ if (!GregorianCalendar_ce_ptr) {
+ //can't happen know without bigger problems before
+ php_error_docref0(NULL TSRMLS_CC, E_ERROR,
+ "IntlGregorianCalendar: class registration has failed.");
+ return;
+ }
+
+ /* Declare 'IntlCalendar' class constants */
+#define CALENDAR_DECL_LONG_CONST(name, val) \
+ zend_declare_class_constant_long(Calendar_ce_ptr, name, sizeof(name) - 1, \
+ val TSRMLS_CC)
+
+ CALENDAR_DECL_LONG_CONST("FIELD_ERA", UCAL_ERA);
+ CALENDAR_DECL_LONG_CONST("FIELD_YEAR", UCAL_YEAR);
+ CALENDAR_DECL_LONG_CONST("FIELD_MONTH", UCAL_MONTH);
+ CALENDAR_DECL_LONG_CONST("FIELD_WEEK_OF_YEAR", UCAL_WEEK_OF_YEAR);
+ CALENDAR_DECL_LONG_CONST("FIELD_WEEK_OF_MONTH", UCAL_WEEK_OF_MONTH);
+ CALENDAR_DECL_LONG_CONST("FIELD_DATE", UCAL_DATE);
+ CALENDAR_DECL_LONG_CONST("FIELD_DAY_OF_YEAR", UCAL_DAY_OF_YEAR);
+ CALENDAR_DECL_LONG_CONST("FIELD_DAY_OF_WEEK", UCAL_DAY_OF_WEEK);
+ CALENDAR_DECL_LONG_CONST("FIELD_DAY_OF_WEEK_IN_MONTH", UCAL_DAY_OF_WEEK_IN_MONTH);
+ CALENDAR_DECL_LONG_CONST("FIELD_AM_PM", UCAL_AM_PM);
+ CALENDAR_DECL_LONG_CONST("FIELD_HOUR", UCAL_HOUR);
+ CALENDAR_DECL_LONG_CONST("FIELD_HOUR_OF_DAY", UCAL_HOUR_OF_DAY);
+ CALENDAR_DECL_LONG_CONST("FIELD_HOUR", UCAL_HOUR);
+ CALENDAR_DECL_LONG_CONST("FIELD_HOUR_OF_DAY", UCAL_HOUR_OF_DAY);
+ CALENDAR_DECL_LONG_CONST("FIELD_MINUTE", UCAL_MINUTE);
+ CALENDAR_DECL_LONG_CONST("FIELD_SECOND", UCAL_SECOND);
+ CALENDAR_DECL_LONG_CONST("FIELD_MILLISECOND", UCAL_MILLISECOND);
+ CALENDAR_DECL_LONG_CONST("FIELD_ZONE_OFFSET", UCAL_ZONE_OFFSET);
+ CALENDAR_DECL_LONG_CONST("FIELD_DST_OFFSET", UCAL_DST_OFFSET);
+ CALENDAR_DECL_LONG_CONST("FIELD_YEAR_WOY", UCAL_YEAR_WOY);
+ CALENDAR_DECL_LONG_CONST("FIELD_DOW_LOCAL", UCAL_DOW_LOCAL);
+ CALENDAR_DECL_LONG_CONST("FIELD_EXTENDED_YEAR", UCAL_EXTENDED_YEAR);
+ CALENDAR_DECL_LONG_CONST("FIELD_JULIAN_DAY", UCAL_JULIAN_DAY);
+ CALENDAR_DECL_LONG_CONST("FIELD_MILLISECONDS_IN_DAY", UCAL_MILLISECONDS_IN_DAY);
+ CALENDAR_DECL_LONG_CONST("FIELD_IS_LEAP_MONTH", UCAL_IS_LEAP_MONTH);
+ CALENDAR_DECL_LONG_CONST("FIELD_FIELD_COUNT ", UCAL_FIELD_COUNT);
+ CALENDAR_DECL_LONG_CONST("FIELD_DAY_OF_MONTH", UCAL_DAY_OF_MONTH);
+
+ CALENDAR_DECL_LONG_CONST("DOW_SUNDAY", UCAL_SUNDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_MONDAY", UCAL_MONDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_TUESDAY", UCAL_TUESDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_WEDNESDAY", UCAL_WEDNESDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_THURSDAY", UCAL_THURSDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_FRIDAY", UCAL_FRIDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_SATURDAY", UCAL_SATURDAY);
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKDAY", UCAL_WEEKDAY);
+ CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKEND", UCAL_WEEKEND);
+ CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKEND_OFFSET", UCAL_WEEKEND_ONSET);
+ CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKEND_CEASE", UCAL_WEEKEND_CEASE);
+#endif
+
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ CALENDAR_DECL_LONG_CONST("WALLTIME_FIRST", UCAL_WALLTIME_FIRST);
+ CALENDAR_DECL_LONG_CONST("WALLTIME_LAST", UCAL_WALLTIME_LAST);
+ CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID);
+#endif
+}
+/* }}} */
diff --git a/ext/intl/calendar/calendar_class.h b/ext/intl/calendar/calendar_class.h
new file mode 100644
index 000000000..140389b63
--- /dev/null
+++ b/ext/intl/calendar/calendar_class.h
@@ -0,0 +1,70 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef CALENDAR_CLASS_H
+#define CALENDAR_CLASS_H
+
+//redefinition of inline in PHP headers causes problems, so include this before
+#include <math.h>
+
+#include <php.h>
+#include "intl_error.h"
+#include "intl_data.h"
+
+#ifndef USE_CALENDAR_POINTER
+typedef void Calendar;
+#endif
+
+typedef struct {
+ zend_object zo;
+
+ // error handling
+ intl_error err;
+
+ // ICU calendar
+ Calendar* ucal;
+} Calendar_object;
+
+#define CALENDAR_ERROR(co) (co)->err
+#define CALENDAR_ERROR_P(co) &(CALENDAR_ERROR(co))
+
+#define CALENDAR_ERROR_CODE(co) INTL_ERROR_CODE(CALENDAR_ERROR(co))
+#define CALENDAR_ERROR_CODE_P(co) &(INTL_ERROR_CODE(CALENDAR_ERROR(co)))
+
+#define CALENDAR_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(Calendar, co)
+#define CALENDAR_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(Calendar, co)
+#define CALENDAR_METHOD_FETCH_OBJECT \
+ CALENDAR_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (co->ucal == NULL) \
+ { \
+ intl_errors_set(&co->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlCalendar", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
+void calendar_object_create(zval *object, Calendar *calendar TSRMLS_DC);
+
+Calendar *calendar_fetch_native_calendar(zval *object TSRMLS_DC);
+
+void calendar_object_construct(zval *object, Calendar *calendar TSRMLS_DC);
+
+void calendar_register_IntlCalendar_class(TSRMLS_D);
+
+extern zend_class_entry *Calendar_ce_ptr,
+ *GregorianCalendar_ce_ptr;
+
+extern zend_object_handlers Calendar_handlers;
+
+#endif /* #ifndef CALENDAR_CLASS_H */
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
new file mode 100644
index 000000000..f2758fdcc
--- /dev/null
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -0,0 +1,1328 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../intl_cppshims.h"
+
+#include <unicode/locid.h>
+#include <unicode/calendar.h>
+#include <unicode/ustring.h>
+
+#include "../intl_convertcpp.h"
+#include "../common/common_date.h"
+
+extern "C" {
+#include "../php_intl.h"
+#define USE_TIMEZONE_POINTER 1
+#include "../timezone/timezone_class.h"
+#define USE_CALENDAR_POINTER 1
+#include "calendar_class.h"
+#include "../intl_convert.h"
+#include <zend_exceptions.h>
+#include <zend_interfaces.h>
+#include <ext/date/php_date.h>
+}
+#include "../common/common_enum.h"
+
+U_CFUNC PHP_METHOD(IntlCalendar, __construct)
+{
+ zend_throw_exception( NULL,
+ "An object of this type cannot be created with the new operator",
+ 0 TSRMLS_CC );
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_create_instance)
+{
+ zval **zv_timezone = NULL;
+ const char *locale_str = NULL;
+ int dummy;
+ TimeZone *timeZone;
+ UErrorCode status = U_ZERO_ERROR;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|Zs!",
+ &zv_timezone, &locale_str, &dummy) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_create_calendar: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ timeZone = timezone_process_timezone_argument(zv_timezone, NULL,
+ "intlcal_create_instance" TSRMLS_CC);
+ if (timeZone == NULL) {
+ RETURN_NULL();
+ }
+
+ if (!locale_str) {
+ locale_str = intl_locale_get_default(TSRMLS_C);
+ }
+
+ Calendar *cal = Calendar::createInstance(timeZone,
+ Locale::createFromName(locale_str), status);
+ if (cal == NULL) {
+ delete timeZone;
+ intl_error_set(NULL, status, "Error creating ICU Calendar object", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ calendar_object_create(return_value, cal TSRMLS_CC);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
+class BugStringCharEnumeration : public StringEnumeration
+{
+public:
+ BugStringCharEnumeration(UEnumeration* _uenum) : uenum(_uenum) {}
+
+ ~BugStringCharEnumeration()
+ {
+ uenum_close(uenum);
+ }
+
+ int32_t count(UErrorCode& status) const {
+ return uenum_count(uenum, &status);
+ }
+
+ virtual const UnicodeString* snext(UErrorCode& status)
+ {
+ int32_t length;
+ const UChar* str = uenum_unext(uenum, &length, &status);
+ if (str == 0 || U_FAILURE(status)) {
+ return 0;
+ }
+ return &unistr.setTo(str, length);
+ }
+
+ virtual const char* next(int32_t *resultLength, UErrorCode &status)
+ {
+ int32_t length = -1;
+ const char* str = uenum_next(uenum, &length, &status);
+ if (str == 0 || U_FAILURE(status)) {
+ return 0;
+ }
+ if (resultLength) {
+ //the bug is that uenum_next doesn't set the length
+ *resultLength = (length == -1) ? strlen(str) : length;
+ }
+
+ return str;
+ }
+
+ void reset(UErrorCode& status)
+ {
+ uenum_reset(uenum, &status);
+ }
+
+ virtual UClassID getDynamicClassID() const;
+
+ static UClassID U_EXPORT2 getStaticClassID();
+
+private:
+ UEnumeration *uenum;
+};
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(BugStringCharEnumeration)
+
+U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ char *key,
+ *locale;
+ int key_len,
+ locale_len;
+ zend_bool commonly_used;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssb",
+ &key, &key_len, &locale, &locale_len, &commonly_used) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_keyword_values_for_locale: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ //does not work; see ICU bug 9194
+#if 0
+ StringEnumeration *se = Calendar::getKeywordValuesForLocale(key,
+ Locale::createFromName(locale), (UBool)commonly_used,
+ status);
+ if (se == NULL) {
+ intl_error_set(NULL, status, "intlcal_get_keyword_values_for_locale: "
+ "error calling underlying method", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+#else
+ UEnumeration *uenum = ucal_getKeywordValuesForLocale(
+ key, locale, !!commonly_used, &status);
+ if (U_FAILURE(status)) {
+ uenum_close(uenum);
+ intl_error_set(NULL, status, "intlcal_get_keyword_values_for_locale: "
+ "error calling underlying method", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ StringEnumeration *se = new BugStringCharEnumeration(uenum);
+#endif
+
+ IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
+}
+#endif //ICU 4.2 only
+
+U_CFUNC PHP_FUNCTION(intlcal_get_now)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_now: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ RETURN_DOUBLE((double)Calendar::getNow());
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_available_locales)
+{
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_available_locales: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ int32_t count;
+ const Locale *availLocales = Calendar::getAvailableLocales(count);
+ array_init(return_value);
+ for (int i = 0; i < count; i++) {
+ Locale locale = availLocales[i];
+ add_next_index_string(return_value, locale.getName(), 1);
+ }
+}
+
+static void _php_intlcal_field_uec_ret_in32t_method(
+ int32_t (Calendar::*func)(UCalendarDateFields, UErrorCode&) const,
+ const char *method_name,
+ INTERNAL_FUNCTION_PARAMETERS)
+{
+ long field;
+ char *message;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
+ spprintf(&message, 0, "%s: bad arguments", method_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ RETURN_FALSE;
+ }
+
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ spprintf(&message, 0, "%s: invalid field", method_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ int32_t result = (co->ucal->*func)(
+ (UCalendarDateFields)field, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "Call to ICU method has failed");
+
+ RETURN_LONG((long)result);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get)
+{
+ _php_intlcal_field_uec_ret_in32t_method(&Calendar::get,
+ "intlcal_get", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_time)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_time: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ UDate result = co->ucal->getTime(CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co,
+ "intlcal_get_time: error calling ICU Calendar::getTime");
+
+ RETURN_DOUBLE((double)result);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_set_time)
+{
+ double time_arg;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od",
+ &object, Calendar_ce_ptr, &time_arg) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_time: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ co->ucal->setTime((UDate)time_arg, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "Call to underlying method failed");
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_add)
+{
+ long field,
+ amount;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Oll", &object, Calendar_ce_ptr, &field, &amount) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_add: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_add: invalid field", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ if (amount < INT32_MIN || amount > INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_add: amount out of bounds", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ co->ucal->add((UCalendarDateFields)field, (int32_t)amount, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_add: Call to underlying method failed");
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_set_time_zone)
+{
+ zval *zv_timezone;
+ TimeZone *timeZone;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Oz!", &object, Calendar_ce_ptr, &zv_timezone) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_time_zone: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ if (zv_timezone == NULL) {
+ RETURN_TRUE; /* the method does nothing if passed null */
+ }
+
+ timeZone = timezone_process_timezone_argument(&zv_timezone,
+ CALENDAR_ERROR_P(co), "intlcal_set_time_zone" TSRMLS_CC);
+ if (timeZone == NULL) {
+ RETURN_FALSE;
+ }
+
+ co->ucal->adoptTimeZone(timeZone);
+
+ RETURN_TRUE;
+}
+
+
+static void _php_intlcal_before_after(
+ UBool (Calendar::*func)(const Calendar&, UErrorCode&) const,
+ INTERNAL_FUNCTION_PARAMETERS)
+{
+ zval *when_object;
+ Calendar_object *when_co;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "OO", &object, Calendar_ce_ptr, &when_object, Calendar_ce_ptr)
+ == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_before/after: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ when_co = static_cast<Calendar_object*>(
+ zend_object_store_get_object(when_object TSRMLS_CC));
+ if (when_co->ucal == NULL) {
+ intl_errors_set(&co->err, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_before/after: Other IntlCalendar was unconstructed", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UBool res = (co->ucal->*func)(*when_co->ucal, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_before/after: Error calling ICU method");
+
+ RETURN_BOOL((int)res);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_after)
+{
+ _php_intlcal_before_after(&Calendar::after, INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_before)
+{
+ _php_intlcal_before_after(&Calendar::before, INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_set)
+{
+ long arg1, arg2, arg3, arg4, arg5, arg6;
+ zval **args_a[7] = {0},
+ ***args = &args_a[0];
+ int i;
+ int variant; /* number of args of the set() overload */
+ CALENDAR_METHOD_INIT_VARS;
+
+ /* must come before zpp because zpp would convert the args in the stack to 0 */
+ if (ZEND_NUM_ARGS() > (getThis() ? 6 : 7) ||
+ zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set: too many arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ if (!getThis()) {
+ args++;
+ }
+ variant = ZEND_NUM_ARGS() - (getThis() ? 0 : 1);
+ while (variant > 2 && Z_TYPE_PP(args[variant - 1]) == IS_NULL) {
+ variant--;
+ }
+
+ if (variant == 4 ||
+ zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Oll|llll", &object, Calendar_ce_ptr, &arg1, &arg2, &arg3, &arg4,
+ &arg5, &arg6) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ for (i = 0; i < variant; i++) {
+ if (Z_LVAL_PP(args[i]) < INT32_MIN || Z_LVAL_PP(args[i]) > INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set: at least one of the arguments has an absolute "
+ "value that is too large", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ }
+
+ if (variant == 2 && (arg1 < 0 || arg1 >= UCAL_FIELD_COUNT)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set: invalid field", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ if (variant == 2) {
+ co->ucal->set((UCalendarDateFields)arg1, (int32_t)arg2);
+ } else if (variant == 3) {
+ co->ucal->set((int32_t)arg1, (int32_t)arg2, (int32_t)arg3);
+ } else if (variant == 5) {
+ co->ucal->set((int32_t)arg1, (int32_t)arg2, (int32_t)arg3, (int32_t)arg4, (int32_t)arg5);
+ } else if (variant == 6) {
+ co->ucal->set((int32_t)arg1, (int32_t)arg2, (int32_t)arg3, (int32_t)arg4, (int32_t)arg5, (int32_t)arg6);
+ }
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_roll)
+{
+ long field,
+ value;
+ zval **args_a[3] = {0},
+ ***args = &args_a[0];
+ zend_bool bool_variant_val = (zend_bool)-1;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (ZEND_NUM_ARGS() > (getThis() ? 2 :3) ||
+ zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set: too many arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ if (!getThis()) {
+ args++;
+ }
+ if (args[1] != NULL && Z_TYPE_PP(args[1]) == IS_BOOL) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Olb", &object, Calendar_ce_ptr, &field, &bool_variant_val)
+ == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_roll: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ bool_variant_val = Z_BVAL_PP(args[1]);
+ } else if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Oll", &object, Calendar_ce_ptr, &field, &value) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_roll: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_roll: invalid field", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ if (bool_variant_val == (zend_bool)-1 &&
+ (value < INT32_MIN || value > INT32_MAX)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_roll: value out of bounds", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ if (bool_variant_val != (zend_bool)-1) {
+ co->ucal->roll((UCalendarDateFields)field, (UBool)bool_variant_val,
+ CALENDAR_ERROR_CODE(co));
+ } else {
+ co->ucal->roll((UCalendarDateFields)field, (int32_t)value,
+ CALENDAR_ERROR_CODE(co));
+ }
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_roll: Error calling ICU Calendar::roll");
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_clear)
+{
+ zval **args_a[2] = {0},
+ ***args = &args_a[0];
+ long field;
+ int variant;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (ZEND_NUM_ARGS() > (getThis() ? 1 : 2) ||
+ zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_clear: too many arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ if (!getThis()) {
+ args++;
+ }
+ if (args[0] == NULL || Z_TYPE_PP(args[0]) == IS_NULL) {
+ zval *dummy; /* we know it's null */
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+ getThis(), "O|z", &object, Calendar_ce_ptr, &dummy) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_clear: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ variant = 0;
+ } else if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+ getThis(), "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_clear: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ } else if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_clear: invalid field", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ } else {
+ variant = 1;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ if (variant == 0) {
+ co->ucal->clear();
+ } else {
+ co->ucal->clear((UCalendarDateFields)field);
+ }
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_field_difference)
+{
+ long field;
+ double when;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Odl", &object, Calendar_ce_ptr, &when, &field) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_field_difference: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_field_difference: invalid field", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ int32_t result = co->ucal->fieldDifference((UDate)when,
+ (UCalendarDateFields)field, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co,
+ "intlcal_field_difference: Call to ICU method has failed");
+
+ RETURN_LONG((long)result);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_actual_maximum)
+{
+ _php_intlcal_field_uec_ret_in32t_method(&Calendar::getActualMaximum,
+ "intlcal_get_actual_maximum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_actual_minimum)
+{
+ _php_intlcal_field_uec_ret_in32t_method(&Calendar::getActualMinimum,
+ "intlcal_get_actual_minimum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
+{
+ long dow;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_day_of_week_type: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_day_of_week_type: invalid day of week", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ int32_t result = co->ucal->getDayOfWeekType(
+ (UCalendarDaysOfWeek)dow, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co,
+ "intlcal_get_day_of_week_type: Call to ICU method has failed");
+
+ RETURN_LONG((long)result);
+}
+#endif
+
+U_CFUNC PHP_FUNCTION(intlcal_get_first_day_of_week)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_first_day_of_week: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ int32_t result = co->ucal->getFirstDayOfWeek(CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co,
+ "intlcal_get_first_day_of_week: Call to ICU method has failed");
+
+ RETURN_LONG((long)result);
+}
+
+static void _php_intlcal_field_ret_in32t_method(
+ int32_t (Calendar::*func)(UCalendarDateFields) const,
+ const char *method_name,
+ INTERNAL_FUNCTION_PARAMETERS)
+{
+ long field;
+ char *message;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
+ spprintf(&message, 0, "%s: bad arguments", method_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ RETURN_FALSE;
+ }
+
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ spprintf(&message, 0, "%s: invalid field", method_name);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ int32_t result = (co->ucal->*func)((UCalendarDateFields)field);
+ INTL_METHOD_CHECK_STATUS(co, "Call to ICU method has failed");
+
+ RETURN_LONG((long)result);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_greatest_minimum)
+{
+ _php_intlcal_field_ret_in32t_method(&Calendar::getGreatestMinimum,
+ "intlcal_get_greatest_minimum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_least_maximum)
+{
+ _php_intlcal_field_ret_in32t_method(&Calendar::getLeastMaximum,
+ "intlcal_get_least_maximum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_locale)
+{
+ long locale_type;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &locale_type) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_locale: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (locale_type != ULOC_ACTUAL_LOCALE && locale_type != ULOC_VALID_LOCALE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_locale: invalid locale type", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ Locale locale = co->ucal->getLocale((ULocDataLocaleType)locale_type,
+ CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co,
+ "intlcal_get_locale: Call to ICU method has failed");
+
+ RETURN_STRING(locale.getName(), 1);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_maximum)
+{
+ _php_intlcal_field_ret_in32t_method(&Calendar::getMaximum,
+ "intlcal_get_maximum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_minimal_days_in_first_week)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_minimal_days_in_first_week: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ uint8_t result = co->ucal->getMinimalDaysInFirstWeek();
+ INTL_METHOD_CHECK_STATUS(co,
+ "intlcal_get_first_day_of_week: Call to ICU method has failed");
+
+ RETURN_LONG((long)result);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_minimum)
+{
+ _php_intlcal_field_ret_in32t_method(&Calendar::getMinimum,
+ "intlcal_get_minimum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_time_zone)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_time_zone: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ TimeZone *tz = co->ucal->getTimeZone().clone();
+ if (tz == NULL) {
+ intl_error_set(NULL, U_MEMORY_ALLOCATION_ERROR,
+ "intlcal_get_time_zone: could not clone TimeZone", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_type)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_type: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_STRING(co->ucal->getType(), 1);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition)
+{
+ long dow;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_weekend_transition: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_weekend_transition: invalid day of week", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ int32_t res = co->ucal->getWeekendTransition((UCalendarDaysOfWeek)dow,
+ CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_get_weekend_transition: "
+ "Error calling ICU method");
+
+ RETURN_LONG((long)res);
+}
+#endif
+
+U_CFUNC PHP_FUNCTION(intlcal_in_daylight_time)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_in_daylight_time: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ UBool ret = co->ucal->inDaylightTime(CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_in_daylight_time: "
+ "Error calling ICU method");
+
+ RETURN_BOOL((int)ret);
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_is_equivalent_to)
+{
+ zval *other_object;
+ Calendar_object *other_co;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "OO", &object, Calendar_ce_ptr, &other_object, Calendar_ce_ptr)
+ == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_is_equivalent_to: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ other_co = (Calendar_object*)zend_object_store_get_object(other_object TSRMLS_CC);
+ if (other_co->ucal == NULL) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intlcal_is_equivalent_to:"
+ " Other IntlCalendar is unconstructed", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_BOOL((int)co->ucal->isEquivalentTo(*other_co->ucal));
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_is_lenient)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_is_lenient: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_BOOL((int)co->ucal->isLenient());
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_is_set)
+{
+ long field;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_is_set: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_is_set: invalid field", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_BOOL((int)co->ucal->isSet((UCalendarDateFields)field));
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
+{
+ double date;
+ zval *rawDate = NULL;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
+ ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O|z!", &object, Calendar_ce_ptr, &rawDate) == FAILURE
+ || (rawDate != NULL &&
+ zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O|d", &object, Calendar_ce_ptr, &date) == FAILURE)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_is_weekend: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ if (rawDate == NULL) {
+ RETURN_BOOL((int)co->ucal->isWeekend());
+ } else {
+ UBool ret = co->ucal->isWeekend((UDate)date, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_is_weekend: "
+ "Error calling ICU method");
+ RETURN_BOOL((int)ret);
+ }
+}
+#endif
+
+
+U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week)
+{
+ long dow;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_first_day_of_week: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_first_day_of_week: invalid day of week", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ co->ucal->setFirstDayOfWeek((UCalendarDaysOfWeek)dow);
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_set_lenient)
+{
+ zend_bool is_lenient;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ob", &object, Calendar_ce_ptr, &is_lenient) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_lenient: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ co->ucal->setLenient((UBool) is_lenient);
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_equals)
+{
+ zval *other_object;
+ Calendar_object *other_co;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "OO", &object, Calendar_ce_ptr, &other_object, Calendar_ce_ptr)
+ == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_equals: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+ other_co = (Calendar_object *) zend_object_store_get_object(other_object TSRMLS_CC);
+ if (other_co->ucal == NULL) {
+ intl_errors_set(&co->err, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_equals: The second IntlCalendar is unconstructed", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UBool result = co->ucal->equals(*other_co->ucal, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlcal_equals: error calling ICU Calendar::equals");
+
+ RETURN_BOOL((int)result);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+
+U_CFUNC PHP_FUNCTION(intlcal_get_repeated_wall_time_option)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_repeated_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_LONG(co->ucal->getRepeatedWallTimeOption());
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_skipped_wall_time_option)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_skipped_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_LONG(co->ucal->getSkippedWallTimeOption());
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_set_repeated_wall_time_option)
+{
+ long option;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &option) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_repeated_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (option != UCAL_WALLTIME_FIRST && option != UCAL_WALLTIME_LAST) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_repeated_wall_time_option: invalid option", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ co->ucal->setRepeatedWallTimeOption((UCalendarWallTimeOption)option);
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_set_skipped_wall_time_option)
+{
+ long option;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, Calendar_ce_ptr, &option) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_skipped_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (option != UCAL_WALLTIME_FIRST && option != UCAL_WALLTIME_LAST
+ && option != UCAL_WALLTIME_NEXT_VALID) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_set_skipped_wall_time_option: invalid option", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ co->ucal->setSkippedWallTimeOption((UCalendarWallTimeOption)option);
+
+ RETURN_TRUE;
+}
+
+#endif
+
+U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
+{
+ zval **zv_arg,
+ *zv_datetime = NULL,
+ *zv_timestamp = NULL;
+ php_date_obj *datetime;
+ char *locale_str = NULL;
+ int locale_str_len;
+ TimeZone *timeZone;
+ UErrorCode status = U_ZERO_ERROR;
+ Calendar *cal;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|s!",
+ &zv_arg, &locale_str, &locale_str_len) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_from_date_time: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ if (!(Z_TYPE_PP(zv_arg) == IS_OBJECT && instanceof_function(
+ Z_OBJCE_PP(zv_arg), php_date_get_date_ce() TSRMLS_CC))) {
+ ALLOC_INIT_ZVAL(zv_datetime);
+ object_init_ex(zv_datetime, php_date_get_date_ce());
+ zend_call_method_with_1_params(&zv_datetime, NULL, NULL, "__construct",
+ NULL, *zv_arg);
+ if (EG(exception)) {
+ zend_object_store_ctor_failed(zv_datetime TSRMLS_CC);
+ goto error;
+ }
+ } else {
+ zv_datetime = *zv_arg;
+ }
+
+ datetime = (php_date_obj*)zend_object_store_get_object(zv_datetime TSRMLS_CC);
+ if (!datetime->time) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_from_date_time: DateTime object is unconstructed",
+ 0 TSRMLS_CC);
+ goto error;
+ }
+
+ zend_call_method_with_0_params(&zv_datetime, php_date_get_date_ce(),
+ NULL, "gettimestamp", &zv_timestamp);
+ if (!zv_timestamp || Z_TYPE_P(zv_timestamp) != IS_LONG) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_from_date_time: bad DateTime; call to "
+ "DateTime::getTimestamp() failed", 0 TSRMLS_CC);
+ goto error;
+ }
+
+ if (!datetime->time->is_localtime) {
+ timeZone = TimeZone::getGMT()->clone();
+ } else {
+ timeZone = timezone_convert_datetimezone(datetime->time->zone_type,
+ datetime, 1, NULL, "intlcal_from_date_time" TSRMLS_CC);
+ if (timeZone == NULL) {
+ goto error;
+ }
+ }
+
+ if (!locale_str) {
+ locale_str = const_cast<char*>(intl_locale_get_default(TSRMLS_C));
+ }
+
+ cal = Calendar::createInstance(timeZone,
+ Locale::createFromName(locale_str), status);
+ if (cal == NULL) {
+ delete timeZone;
+ intl_error_set(NULL, status, "intlcal_from_date_time: "
+ "error creating ICU Calendar object", 0 TSRMLS_CC);
+ goto error;
+ }
+ cal->setTime(((UDate)Z_LVAL_P(zv_timestamp)) * 1000., status);
+ if (U_FAILURE(status)) {
+ /* time zone was adopted by cal; should not be deleted here */
+ delete cal;
+ intl_error_set(NULL, status, "intlcal_from_date_time: "
+ "error creating ICU Calendar::setTime()", 0 TSRMLS_CC);
+ goto error;
+ }
+
+ calendar_object_create(return_value, cal TSRMLS_CC);
+
+error:
+ if (zv_datetime != *zv_arg) {
+ zval_ptr_dtor(&zv_datetime);
+ }
+ if (zv_timestamp) {
+ zval_ptr_dtor(&zv_timestamp);
+ }
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
+{
+ zval *retval = NULL;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_to_date_time: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ /* There are no exported functions in ext/date to this
+ * in a more native fashion */
+ double date = co->ucal->getTime(CALENDAR_ERROR_CODE(co)) / 1000.;
+ int64_t ts;
+ char ts_str[sizeof("@-9223372036854775808")];
+ int ts_str_len;
+ zval ts_zval = zval_used_for_init;
+
+ INTL_METHOD_CHECK_STATUS(co, "Call to ICU method has failed");
+
+ if (date > (double)U_INT64_MAX || date < (double)U_INT64_MIN) {
+ intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_to_date_time: The calendar date is out of the "
+ "range for a 64-bit integer", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ ts = (int64_t)date;
+
+ ts_str_len = slprintf(ts_str, sizeof(ts_str), "@%I64d", ts);
+ ZVAL_STRINGL(&ts_zval, ts_str, ts_str_len, 0);
+
+ /* Now get the time zone */
+ const TimeZone& tz = co->ucal->getTimeZone();
+ zval *timezone_zval = timezone_convert_to_datetimezone(
+ &tz, CALENDAR_ERROR_P(co), "intlcal_to_date_time" TSRMLS_CC);
+ if (timezone_zval == NULL) {
+ RETURN_FALSE;
+ }
+
+ /* resources allocated from now on */
+
+ /* Finally, instantiate object and call constructor */
+ object_init_ex(return_value, php_date_get_date_ce());
+ zend_call_method_with_2_params(&return_value, NULL, NULL, "__construct",
+ NULL, &ts_zval, timezone_zval);
+ if (EG(exception)) {
+ intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_to_date_time: DateTime constructor has thrown exception",
+ 1 TSRMLS_CC);
+ zend_object_store_ctor_failed(return_value TSRMLS_CC);
+ zval_ptr_dtor(&return_value);
+
+ RETVAL_FALSE;
+ goto error;
+ }
+
+ /* due to bug #40743, we have to set the time zone again */
+ zend_call_method_with_1_params(&return_value, NULL, NULL, "settimezone",
+ &retval, timezone_zval);
+ if (retval == NULL || Z_TYPE_P(retval) == IS_BOOL) {
+ intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_to_date_time: call to DateTime::setTimeZone has failed",
+ 1 TSRMLS_CC);
+ zval_ptr_dtor(&return_value);
+ RETVAL_FALSE;
+ goto error;
+ }
+
+error:
+ zval_ptr_dtor(&timezone_zval);
+ if (retval != NULL) {
+ zval_ptr_dtor(&retval);
+ }
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_error_code)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_error_code: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ /* Fetch the object (without resetting its last error code ). */
+ co = (Calendar_object*)zend_object_store_get_object(object TSRMLS_CC);
+ if (co == NULL)
+ RETURN_FALSE;
+
+ RETURN_LONG((long)CALENDAR_ERROR_CODE(co));
+}
+
+U_CFUNC PHP_FUNCTION(intlcal_get_error_message)
+{
+ const char* message = NULL;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, Calendar_ce_ptr) == FAILURE) {
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_get_error_message: bad arguments", 0 TSRMLS_CC );
+ RETURN_FALSE;
+ }
+
+
+ /* Fetch the object (without resetting its last error code ). */
+ co = (Calendar_object*)zend_object_store_get_object(object TSRMLS_CC);
+ if (co == NULL)
+ RETURN_FALSE;
+
+ /* Return last error message. */
+ message = intl_error_get_message(CALENDAR_ERROR_P(co) TSRMLS_CC);
+ RETURN_STRING(message, 0);
+}
diff --git a/ext/intl/calendar/calendar_methods.h b/ext/intl/calendar/calendar_methods.h
new file mode 100644
index 000000000..2be13e492
--- /dev/null
+++ b/ext/intl/calendar/calendar_methods.h
@@ -0,0 +1,112 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@netcabo.pt> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef CALENDAR_METHODS_H
+#define CALENDAR_METHODS_H
+
+#include <php.h>
+
+PHP_METHOD(IntlCalendar, __construct);
+
+PHP_FUNCTION(intlcal_create_instance);
+
+PHP_FUNCTION(intlcal_get_keyword_values_for_locale);
+
+PHP_FUNCTION(intlcal_get_now);
+
+PHP_FUNCTION(intlcal_get_available_locales);
+
+PHP_FUNCTION(intlcal_get);
+
+PHP_FUNCTION(intlcal_get_time);
+
+PHP_FUNCTION(intlcal_set_time);
+
+PHP_FUNCTION(intlcal_add);
+
+PHP_FUNCTION(intlcal_set_time_zone);
+
+PHP_FUNCTION(intlcal_after);
+
+PHP_FUNCTION(intlcal_before);
+
+PHP_FUNCTION(intlcal_set);
+
+PHP_FUNCTION(intlcal_roll);
+
+PHP_FUNCTION(intlcal_clear);
+
+PHP_FUNCTION(intlcal_field_difference);
+
+PHP_FUNCTION(intlcal_get_actual_maximum);
+
+PHP_FUNCTION(intlcal_get_actual_minimum);
+
+PHP_FUNCTION(intlcal_get_day_of_week_type);
+
+PHP_FUNCTION(intlcal_get_first_day_of_week);
+
+PHP_FUNCTION(intlcal_get_greatest_minimum);
+
+PHP_FUNCTION(intlcal_get_least_maximum);
+
+PHP_FUNCTION(intlcal_get_locale);
+
+PHP_FUNCTION(intlcal_get_maximum);
+
+PHP_FUNCTION(intlcal_get_minimal_days_in_first_week);
+
+PHP_FUNCTION(intlcal_get_minimum);
+
+PHP_FUNCTION(intlcal_get_time_zone);
+
+PHP_FUNCTION(intlcal_get_type);
+
+PHP_FUNCTION(intlcal_get_weekend_transition);
+
+PHP_FUNCTION(intlcal_in_daylight_time);
+
+PHP_FUNCTION(intlcal_is_equivalent_to);
+
+PHP_FUNCTION(intlcal_is_lenient);
+
+PHP_FUNCTION(intlcal_is_set);
+
+PHP_FUNCTION(intlcal_is_weekend);
+
+PHP_FUNCTION(intlcal_set_first_day_of_week);
+
+PHP_FUNCTION(intlcal_set_lenient);
+
+PHP_FUNCTION(intlcal_equals);
+
+PHP_FUNCTION(intlcal_get_repeated_wall_time_option);
+
+PHP_FUNCTION(intlcal_get_skipped_wall_time_option);
+
+PHP_FUNCTION(intlcal_set_repeated_wall_time_option);
+
+PHP_FUNCTION(intlcal_set_skipped_wall_time_option);
+
+PHP_FUNCTION(intlcal_from_date_time);
+
+PHP_FUNCTION(intlcal_to_date_time);
+
+PHP_FUNCTION(intlcal_get_error_code);
+
+PHP_FUNCTION(intlcal_get_error_message);
+
+#endif /* #ifndef CALENDAR_METHODS_H */
diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp
new file mode 100644
index 000000000..3c05253de
--- /dev/null
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -0,0 +1,256 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../intl_cppshims.h"
+
+#include <unicode/locid.h>
+#include <unicode/calendar.h>
+#include <unicode/gregocal.h>
+extern "C" {
+#include "../php_intl.h"
+#define USE_TIMEZONE_POINTER 1
+#include "../timezone/timezone_class.h"
+#define USE_CALENDAR_POINTER 1
+#include "calendar_class.h"
+#include <ext/date/php_date.h>
+}
+
+static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
+ return (GregorianCalendar*)co->ucal;
+}
+
+static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
+{
+ zval *object = getThis();
+ zval **tz_object = NULL;
+ zval **args_a[6] = {0},
+ ***args = &args_a[0];
+ char *locale = NULL;
+ int locale_len;
+ long largs[6];
+ UErrorCode status = U_ZERO_ERROR;
+ int variant;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ // parameter number validation / variant determination
+ if (ZEND_NUM_ARGS() > 6 ||
+ zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_create_instance: too many arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+ for (variant = ZEND_NUM_ARGS();
+ variant > 0 && Z_TYPE_PP(args[variant - 1]) == IS_NULL;
+ variant--) {}
+ if (variant == 4) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_create_instance: no variant with 4 arguments "
+ "(excluding trailing NULLs)", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ // argument parsing
+ if (variant <= 2) {
+ if (zend_parse_parameters(MIN(ZEND_NUM_ARGS(), 2) TSRMLS_CC,
+ "|Z!s!", &tz_object, &locale, &locale_len) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_create_instance: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+ }
+ if (variant > 2 && zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+ "lll|lll", &largs[0], &largs[1], &largs[2], &largs[3], &largs[4],
+ &largs[5]) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_create_instance: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ // instantion of ICU object
+ GregorianCalendar *gcal;
+
+ if (variant <= 2) {
+ // From timezone and locale (0 to 2 arguments)
+ TimeZone *tz = timezone_process_timezone_argument(tz_object, NULL,
+ "intlgregcal_create_instance" TSRMLS_CC);
+ if (tz == NULL) {
+ RETURN_NULL();
+ }
+ if (!locale) {
+ locale = const_cast<char*>(intl_locale_get_default(TSRMLS_C));
+ }
+
+ gcal = new GregorianCalendar(tz, Locale::createFromName(locale),
+ status);
+ if (U_FAILURE(status)) {
+ intl_error_set(NULL, status, "intlgregcal_create_instance: error "
+ "creating ICU GregorianCalendar from time zone and locale", 0 TSRMLS_CC);
+ if (gcal) {
+ delete gcal;
+ }
+ delete tz;
+ RETURN_NULL();
+ }
+ } else {
+ // From date/time (3, 5 or 6 arguments)
+ for (int i = 0; i < variant; i++) {
+ if (largs[i] < INT32_MIN || largs[i] > INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_create_instance: at least one of the arguments"
+ " has an absolute value that is too large", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+ }
+
+ if (variant == 3) {
+ gcal = new GregorianCalendar((int32_t)largs[0], (int32_t)largs[1],
+ (int32_t)largs[2], status);
+ } else if (variant == 5) {
+ gcal = new GregorianCalendar((int32_t)largs[0], (int32_t)largs[1],
+ (int32_t)largs[2], (int32_t)largs[3], (int32_t)largs[4], status);
+ } else if (variant == 6) {
+ gcal = new GregorianCalendar((int32_t)largs[0], (int32_t)largs[1],
+ (int32_t)largs[2], (int32_t)largs[3], (int32_t)largs[4], (int32_t)largs[5],
+ status);
+ }
+ if (U_FAILURE(status)) {
+ intl_error_set(NULL, status, "intlgregcal_create_instance: error "
+ "creating ICU GregorianCalendar from date", 0 TSRMLS_CC);
+ if (gcal) {
+ delete gcal;
+ }
+ RETURN_NULL();
+ }
+
+ timelib_tzinfo *tzinfo = get_timezone_info(TSRMLS_C);
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
+ UnicodeString tzstr = UnicodeString::fromUTF8(StringPiece(tzinfo->name));
+#else
+ UnicodeString tzstr = UnicodeString(tzinfo->name,
+ strlen(tzinfo->name), US_INV);
+#endif
+ if (tzstr.isBogus()) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_create_instance: could not create UTF-8 string "
+ "from PHP's default timezone name (see date_default_timezone_get())",
+ 0 TSRMLS_CC);
+ delete gcal;
+ RETURN_NULL();
+ }
+
+ TimeZone *tz = TimeZone::createTimeZone(tzstr);
+ gcal->adoptTimeZone(tz);
+ }
+
+ Calendar_object *co = (Calendar_object*)zend_object_store_get_object(
+ return_value TSRMLS_CC);
+ co->ucal = gcal;
+}
+
+U_CFUNC PHP_FUNCTION(intlgregcal_create_instance)
+{
+ zval orig;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ object_init_ex(return_value, GregorianCalendar_ce_ptr);
+ orig = *return_value;
+
+ _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+
+ if (Z_TYPE_P(return_value) == IS_NULL) {
+ zend_object_store_ctor_failed(&orig TSRMLS_CC);
+ zval_dtor(&orig);
+ }
+}
+
+U_CFUNC PHP_METHOD(IntlGregorianCalendar, __construct)
+{
+ zval orig_this = *getThis();
+ intl_error_reset(NULL TSRMLS_CC);
+
+ return_value = getThis();
+ //changes this to IS_NULL (without first destroying) if there's an error
+ _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+
+ if (Z_TYPE_P(return_value) == IS_NULL) {
+ zend_object_store_ctor_failed(&orig_this TSRMLS_CC);
+ zval_dtor(&orig_this);
+ }
+}
+
+U_CFUNC PHP_FUNCTION(intlgregcal_set_gregorian_change)
+{
+ double date;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Od", &object, GregorianCalendar_ce_ptr, &date) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_set_gregorian_change: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ fetch_greg(co)->setGregorianChange(date, CALENDAR_ERROR_CODE(co));
+ INTL_METHOD_CHECK_STATUS(co, "intlgregcal_set_gregorian_change: error "
+ "calling ICU method");
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intlgregcal_get_gregorian_change)
+{
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, GregorianCalendar_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_get_gregorian_change: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_DOUBLE((double)fetch_greg(co)->getGregorianChange());
+}
+
+U_CFUNC PHP_FUNCTION(intlgregcal_is_leap_year)
+{
+ long year;
+ CALENDAR_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Ol", &object, GregorianCalendar_ce_ptr, &year) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_is_leap_year: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (year < INT32_MIN || year > INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlgregcal_is_leap_year: year out of bounds", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ CALENDAR_METHOD_FETCH_OBJECT;
+
+ RETURN_BOOL((int)fetch_greg(co)->isLeapYear((int32_t)year));
+}
diff --git a/ext/intl/calendar/gregoriancalendar_methods.h b/ext/intl/calendar/gregoriancalendar_methods.h
new file mode 100644
index 000000000..f911752cc
--- /dev/null
+++ b/ext/intl/calendar/gregoriancalendar_methods.h
@@ -0,0 +1,32 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef GREORIANCALENDAR_METHODS_H
+#define GREORIANCALENDAR_METHODS_H
+
+#include <php.h>
+
+PHP_FUNCTION(intlgregcal_create_instance);
+
+PHP_METHOD(IntlGregorianCalendar, __construct);
+
+PHP_FUNCTION(intlgregcal_set_gregorian_change);
+
+PHP_FUNCTION(intlgregcal_get_gregorian_change);
+
+PHP_FUNCTION(intlgregcal_is_leap_year);
+
+#endif
diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c
index b2a9968af..b2a8c7f6b 100644
--- a/ext/intl/collator/collator_create.c
+++ b/ext/intl/collator/collator_create.c
@@ -48,7 +48,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS)
COLLATOR_METHOD_FETCH_OBJECT;
if(locale_len == 0) {
- locale = INTL_G(default_locale);
+ locale = intl_locale_get_default(TSRMLS_C);
}
/* Open ICU collator. */
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index 0785111c9..04a24f013 100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
@@ -78,6 +78,7 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2
intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ),
"Object not initialized", 0 TSRMLS_CC );
php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized");
+
}
/* Compare the strings using ICU. */
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp
new file mode 100644
index 000000000..ee998818d
--- /dev/null
+++ b/ext/intl/common/common_date.cpp
@@ -0,0 +1,250 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "../intl_cppshims.h"
+
+#include <unicode/calendar.h>
+
+extern "C" {
+#include "../php_intl.h"
+#define USE_CALENDAR_POINTER 1
+#include "../calendar/calendar_class.h"
+#include <ext/date/php_date.h>
+}
+
+#ifndef INFINITY
+#define INFINITY (DBL_MAX+DBL_MAX)
+#endif
+
+#ifndef NAN
+#define NAN (INFINITY-INFINITY)
+#endif
+
+/* {{{ timezone_convert_datetimezone
+ * The timezone in DateTime and DateTimeZone is not unified. */
+U_CFUNC TimeZone *timezone_convert_datetimezone(int type,
+ void *object,
+ int is_datetime,
+ intl_error *outside_error,
+ const char *func TSRMLS_DC)
+{
+ char *id = NULL,
+ offset_id[] = "GMT+00:00";
+ int id_len = 0;
+ char *message;
+ TimeZone *timeZone;
+
+ switch (type) {
+ case TIMELIB_ZONETYPE_ID:
+ id = is_datetime
+ ? ((php_date_obj*)object)->time->tz_info->name
+ : ((php_timezone_obj*)object)->tzi.tz->name;
+ id_len = strlen(id);
+ break;
+ case TIMELIB_ZONETYPE_OFFSET: {
+ int offset_mins = is_datetime
+ ? -((php_date_obj*)object)->time->z
+ : -(int)((php_timezone_obj*)object)->tzi.utc_offset,
+ hours = offset_mins / 60,
+ minutes = offset_mins - hours * 60;
+ minutes *= minutes > 0 ? 1 : -1;
+
+ if (offset_mins <= -24 * 60 || offset_mins >= 24 * 60) {
+ spprintf(&message, 0, "%s: object has an time zone offset "
+ "that's too large", func);
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ return NULL;
+ }
+
+ id = offset_id;
+ id_len = slprintf(id, sizeof(offset_id), "GMT%+03d:%02d",
+ hours, minutes);
+ break;
+ }
+ case TIMELIB_ZONETYPE_ABBR:
+ id = is_datetime
+ ? ((php_date_obj*)object)->time->tz_abbr
+ : ((php_timezone_obj*)object)->tzi.z.abbr;
+ id_len = strlen(id);
+ break;
+ }
+
+ UnicodeString s = UnicodeString(id, id_len, US_INV);
+ timeZone = TimeZone::createTimeZone(s);
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ if (*timeZone == TimeZone::getUnknown()) {
+#else
+ UnicodeString resultingId;
+ timeZone->getID(resultingId);
+ if (resultingId == UnicodeString("Etc/Unknown", -1, US_INV)
+ || resultingId == UnicodeString("GMT", -1, US_INV)) {
+#endif
+ spprintf(&message, 0, "%s: time zone id '%s' "
+ "extracted from ext/date DateTimeZone not recognized", func, id);
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ delete timeZone;
+ return NULL;
+ }
+ return timeZone;
+}
+/* }}} */
+
+U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
+ intl_error *err, const char *func TSRMLS_DC)
+{
+ zval retval;
+ zval *zfuncname;
+ char *message;
+
+ if (err && U_FAILURE(err->code)) {
+ return FAILURE;
+ }
+
+ if (millis) {
+ *millis = NAN;
+ }
+ if (tz) {
+ *tz = NULL;
+ }
+
+ if (millis) {
+ INIT_ZVAL(retval);
+ MAKE_STD_ZVAL(zfuncname);
+ ZVAL_STRING(zfuncname, "getTimestamp", 1);
+ if (call_user_function(NULL, &(z), zfuncname, &retval, 0, NULL TSRMLS_CC)
+ != SUCCESS || Z_TYPE(retval) != IS_LONG) {
+ spprintf(&message, 0, "%s: error calling ::getTimeStamp() on the "
+ "object", func);
+ intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ zval_ptr_dtor(&zfuncname);
+ return FAILURE;
+ }
+
+ *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval);
+ zval_ptr_dtor(&zfuncname);
+ }
+
+ if (tz) {
+ php_date_obj *datetime;
+ datetime = (php_date_obj*)zend_object_store_get_object(z TSRMLS_CC);
+ if (!datetime->time) {
+ spprintf(&message, 0, "%s: the DateTime object is not properly "
+ "initialized", func);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ return FAILURE;
+ }
+ if (!datetime->time->is_localtime) {
+ *tz = TimeZone::getGMT()->clone();
+ } else {
+ *tz = timezone_convert_datetimezone(datetime->time->zone_type,
+ datetime, 1, NULL, func TSRMLS_CC);
+ if (*tz == NULL) {
+ spprintf(&message, 0, "%s: could not convert DateTime's "
+ "time zone", func);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ return FAILURE;
+ }
+ }
+ }
+
+ return SUCCESS;
+}
+
+U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TSRMLS_DC)
+{
+ double rv = NAN;
+ long lv;
+ int type;
+ char *message;
+
+ if (err && U_FAILURE(err->code)) {
+ return NAN;
+ }
+
+ switch (Z_TYPE_P(z)) {
+ case IS_STRING:
+ type = is_numeric_string(Z_STRVAL_P(z), Z_STRLEN_P(z), &lv, &rv, 0);
+ if (type == IS_DOUBLE) {
+ rv *= U_MILLIS_PER_SECOND;
+ } else if (type == IS_LONG) {
+ rv = U_MILLIS_PER_SECOND * (double)lv;
+ } else {
+ spprintf(&message, 0, "%s: string '%s' is not numeric, "
+ "which would be required for it to be a valid date", func,
+ Z_STRVAL_P(z));
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ break;
+ case IS_LONG:
+ rv = U_MILLIS_PER_SECOND * (double)Z_LVAL_P(z);
+ break;
+ case IS_DOUBLE:
+ rv = U_MILLIS_PER_SECOND * Z_DVAL_P(z);
+ break;
+ case IS_OBJECT:
+ if (instanceof_function(Z_OBJCE_P(z), php_date_get_date_ce() TSRMLS_CC)) {
+ intl_datetime_decompose(z, &rv, NULL, err, func TSRMLS_CC);
+ } else if (instanceof_function(Z_OBJCE_P(z), Calendar_ce_ptr TSRMLS_CC)) {
+ Calendar_object *co = (Calendar_object *)
+ zend_object_store_get_object(z TSRMLS_CC );
+ if (co->ucal == NULL) {
+ spprintf(&message, 0, "%s: IntlCalendar object is not properly "
+ "constructed", func);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ } else {
+ UErrorCode status = UErrorCode();
+ rv = (double)co->ucal->getTime(status);
+ if (U_FAILURE(status)) {
+ spprintf(&message, 0, "%s: call to internal "
+ "Calendar::getTime() has failed", func);
+ intl_errors_set(err, status, message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ }
+ } else {
+ /* TODO: try with cast(), get() to obtain a number */
+ spprintf(&message, 0, "%s: invalid object type for date/time "
+ "(only IntlCalendar and DateTime permitted)", func);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ break;
+ default:
+ spprintf(&message, 0, "%s: invalid PHP type for date", func);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ efree(message);
+ break;
+ }
+
+ return rv;
+}
+
diff --git a/ext/intl/common/common_date.h b/ext/intl/common/common_date.h
new file mode 100644
index 000000000..d2396cbf5
--- /dev/null
+++ b/ext/intl/common/common_date.h
@@ -0,0 +1,40 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef COMMON_DATE_H
+#define COMMON_DATE_H
+
+#include <unicode/umachine.h>
+
+U_CDECL_BEGIN
+#include <php.h>
+#include "../intl_error.h"
+U_CDECL_END
+
+#ifdef __cplusplus
+
+#include <unicode/timezone.h>
+
+U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func TSRMLS_DC);
+U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
+ intl_error *err, const char *func TSRMLS_DC);
+
+#endif
+
+U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TSRMLS_DC);
+
+#endif /* COMMON_DATE_H */
+
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
new file mode 100644
index 000000000..da47a437a
--- /dev/null
+++ b/ext/intl/common/common_enum.cpp
@@ -0,0 +1,354 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../intl_cppshims.h"
+
+// Fix build on Windows/old versions of ICU
+#include <stdio.h>
+
+#include "common_enum.h"
+
+extern "C" {
+#include <zend_interfaces.h>
+#include <zend_exceptions.h>
+}
+
+zend_class_entry *IntlIterator_ce_ptr;
+zend_object_handlers IntlIterator_handlers;
+
+void zoi_with_current_dtor(zend_object_iterator *iter TSRMLS_DC)
+{
+ zoi_with_current *zoiwc = (zoi_with_current*)iter;
+
+ if (zoiwc->wrapping_obj) {
+ /* we have to copy the pointer because zoiwc->wrapping_obj may be
+ * changed midway the execution of zval_ptr_dtor() */
+ zval *zwo = zoiwc->wrapping_obj;
+
+ /* object is still here, we can rely on it to call this again and
+ * destroy this object */
+ zval_ptr_dtor(&zwo);
+ } else {
+ /* Object not here anymore (we've been called by the object free handler)
+ * Note that the iterator wrapper objects (that also depend on this
+ * structure) call this function earlier, in the destruction phase, which
+ * precedes the object free phase. Therefore there's no risk on this
+ * function being called by the iterator wrapper destructor function and
+ * not finding the memory of this iterator allocated anymore. */
+ iter->funcs->invalidate_current(iter TSRMLS_CC);
+ zoiwc->destroy_it(iter TSRMLS_CC);
+ efree(iter);
+ }
+}
+
+U_CFUNC int zoi_with_current_valid(zend_object_iterator *iter TSRMLS_DC)
+{
+ return ((zoi_with_current*)iter)->current != NULL ? SUCCESS : FAILURE;
+}
+
+U_CFUNC void zoi_with_current_get_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC)
+{
+ *data = &((zoi_with_current*)iter)->current;
+}
+
+U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter TSRMLS_DC)
+{
+ zoi_with_current *zoi_iter = (zoi_with_current*)iter;
+ if (zoi_iter->current) {
+ zval_ptr_dtor(&zoi_iter->current);
+ zoi_iter->current = NULL; //valid would return FAILURE now
+ }
+}
+
+static void string_enum_current_move_forward(zend_object_iterator *iter TSRMLS_DC)
+{
+ zoi_with_current *zoi_iter = (zoi_with_current*)iter;
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ iter->funcs->invalidate_current(iter TSRMLS_CC);
+
+ object = zoi_iter->wrapping_obj;
+ INTLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK;
+
+ int32_t result_length;
+ const char *result = ((StringEnumeration*)iter->data)->next(
+ &result_length, INTLITERATOR_ERROR_CODE(ii));
+
+ intl_error_set_code(NULL, INTLITERATOR_ERROR_CODE(ii) TSRMLS_CC);
+ if (U_FAILURE(INTLITERATOR_ERROR_CODE(ii))) {
+ intl_errors_set_custom_msg(INTL_DATA_ERROR_P(ii),
+ "Error fetching next iteration element", 0 TSRMLS_CC);
+ } else if (result) {
+ MAKE_STD_ZVAL(zoi_iter->current);
+ ZVAL_STRINGL(zoi_iter->current, result, result_length, 1);
+ } //else we've reached the end of the enum, nothing more is required
+}
+
+static void string_enum_rewind(zend_object_iterator *iter TSRMLS_DC)
+{
+ zoi_with_current *zoi_iter = (zoi_with_current*)iter;
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zoi_iter->current) {
+ iter->funcs->invalidate_current(iter TSRMLS_CC);
+ }
+
+ object = zoi_iter->wrapping_obj;
+ INTLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK;
+
+ ((StringEnumeration*)iter->data)->reset(INTLITERATOR_ERROR_CODE(ii));
+
+ intl_error_set_code(NULL, INTLITERATOR_ERROR_CODE(ii) TSRMLS_CC);
+ if (U_FAILURE(INTLITERATOR_ERROR_CODE(ii))) {
+ intl_errors_set_custom_msg(INTL_DATA_ERROR_P(ii),
+ "Error resetting enumeration", 0 TSRMLS_CC);
+ } else {
+ iter->funcs->move_forward(iter TSRMLS_CC);
+ }
+}
+
+static void string_enum_destroy_it(zend_object_iterator *iter TSRMLS_DC)
+{
+ delete (StringEnumeration*)iter->data;
+}
+
+static zend_object_iterator_funcs string_enum_object_iterator_funcs = {
+ zoi_with_current_dtor,
+ zoi_with_current_valid,
+ zoi_with_current_get_current_data,
+ NULL,
+ string_enum_current_move_forward,
+ string_enum_rewind,
+ zoi_with_current_invalidate_current
+};
+
+U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object TSRMLS_DC)
+{
+ IntlIterator_object *ii;
+ object_init_ex(object, IntlIterator_ce_ptr);
+ ii = (IntlIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
+ ii->iterator = (zend_object_iterator*)emalloc(sizeof(zoi_with_current));
+ ii->iterator->data = (void*)se;
+ ii->iterator->funcs = &string_enum_object_iterator_funcs;
+ ii->iterator->index = 0;
+ ((zoi_with_current*)ii->iterator)->destroy_it = string_enum_destroy_it;
+ ((zoi_with_current*)ii->iterator)->wrapping_obj = object;
+ ((zoi_with_current*)ii->iterator)->current = NULL;
+}
+
+static void IntlIterator_objects_free(zend_object *object TSRMLS_DC)
+{
+ IntlIterator_object *ii = (IntlIterator_object*) object;
+
+ if (ii->iterator) {
+ zval **wrapping_objp = &((zoi_with_current*)ii->iterator)->wrapping_obj;
+ *wrapping_objp = NULL;
+ ii->iterator->funcs->dtor(ii->iterator TSRMLS_CC);
+ }
+ intl_error_reset(INTLITERATOR_ERROR_P(ii) TSRMLS_CC);
+
+ zend_object_std_dtor(&ii->zo TSRMLS_CC);
+
+ efree(ii);
+}
+
+static zend_object_iterator *IntlIterator_get_iterator(
+ zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
+{
+ if (by_ref) {
+ zend_throw_exception(NULL,
+ "Iteration by reference is not supported", 0 TSRMLS_CC);
+ return NULL;
+ }
+
+ IntlIterator_object *ii = (IntlIterator_object*)
+ zend_object_store_get_object(object TSRMLS_CC);
+
+ if (ii->iterator == NULL) {
+ zend_throw_exception(NULL,
+ "The IntlIterator is not properly constructed", 0 TSRMLS_CC);
+ return NULL;
+ }
+
+ zval_add_ref(&object);
+
+ return ii->iterator;
+}
+
+static zend_object_value IntlIterator_object_create(zend_class_entry *ce TSRMLS_DC)
+{
+ zend_object_value retval;
+ IntlIterator_object *intern;
+
+ intern = (IntlIterator_object*)ecalloc(1, sizeof(IntlIterator_object));
+
+ zend_object_std_init(&intern->zo, ce TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->zo.properties, &(ce->default_properties),
+ (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*));
+#else
+ object_properties_init((zend_object*) intern, ce);
+#endif
+ intl_error_init(INTLITERATOR_ERROR_P(intern) TSRMLS_CC);
+ intern->iterator = NULL;
+
+ retval.handle = zend_objects_store_put(
+ intern,
+ (zend_objects_store_dtor_t)zend_objects_destroy_object,
+ (zend_objects_free_object_storage_t)IntlIterator_objects_free,
+ NULL TSRMLS_CC);
+
+ retval.handlers = &IntlIterator_handlers;
+
+ return retval;
+}
+
+static PHP_METHOD(IntlIterator, current)
+{
+ zval **data;
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "IntlIterator::current: bad arguments", 0 TSRMLS_CC);
+ return;
+ }
+
+ INTLITERATOR_METHOD_FETCH_OBJECT;
+ ii->iterator->funcs->get_current_data(ii->iterator, &data TSRMLS_CC);
+ if (data && *data) {
+ RETURN_ZVAL(*data, 1, 0);
+ }
+}
+
+static PHP_METHOD(IntlIterator, key)
+{
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "IntlIterator::key: bad arguments", 0 TSRMLS_CC);
+ return;
+ }
+
+ INTLITERATOR_METHOD_FETCH_OBJECT;
+
+ if (ii->iterator->funcs->get_current_key) {
+ char *str_key;
+ uint str_key_len;
+ ulong int_key;
+
+ switch (ii->iterator->funcs->get_current_key(
+ ii->iterator, &str_key, &str_key_len, &int_key TSRMLS_CC)) {
+ case HASH_KEY_IS_LONG:
+ RETURN_LONG(int_key);
+ break;
+ case HASH_KEY_IS_STRING:
+ RETURN_STRINGL(str_key, str_key_len-1, 0);
+ break;
+ }
+ } else {
+ RETURN_LONG(ii->iterator->index);
+ }
+}
+
+static PHP_METHOD(IntlIterator, next)
+{
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "IntlIterator::next: bad arguments", 0 TSRMLS_CC);
+ return;
+ }
+
+ INTLITERATOR_METHOD_FETCH_OBJECT;
+ ii->iterator->funcs->move_forward(ii->iterator TSRMLS_CC);
+ /* foreach also advances the index after the last iteration,
+ * so I see no problem in incrementing the index here unconditionally */
+ ii->iterator->index++;
+}
+
+static PHP_METHOD(IntlIterator, rewind)
+{
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "IntlIterator::rewind: bad arguments", 0 TSRMLS_CC);
+ return;
+ }
+
+ INTLITERATOR_METHOD_FETCH_OBJECT;
+ if (ii->iterator->funcs->rewind) {
+ ii->iterator->funcs->rewind(ii->iterator TSRMLS_CC);
+ } else {
+ intl_errors_set(INTLITERATOR_ERROR_P(ii), U_UNSUPPORTED_ERROR,
+ "IntlIterator::rewind: rewind not supported", 0 TSRMLS_CC);
+ }
+}
+
+static PHP_METHOD(IntlIterator, valid)
+{
+ INTLITERATOR_METHOD_INIT_VARS;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "IntlIterator::valid: bad arguments", 0 TSRMLS_CC);
+ return;
+ }
+
+ INTLITERATOR_METHOD_FETCH_OBJECT;
+ RETURN_BOOL(ii->iterator->funcs->valid(ii->iterator TSRMLS_CC) == SUCCESS);
+}
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_se_void, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+static zend_function_entry IntlIterator_class_functions[] = {
+ PHP_ME(IntlIterator, current, ainfo_se_void, ZEND_ACC_PUBLIC)
+ PHP_ME(IntlIterator, key, ainfo_se_void, ZEND_ACC_PUBLIC)
+ PHP_ME(IntlIterator, next, ainfo_se_void, ZEND_ACC_PUBLIC)
+ PHP_ME(IntlIterator, rewind, ainfo_se_void, ZEND_ACC_PUBLIC)
+ PHP_ME(IntlIterator, valid, ainfo_se_void, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+
+
+/* {{{ intl_register_IntlIterator_class
+ * Initialize 'IntlIterator' class
+ */
+U_CFUNC void intl_register_IntlIterator_class(TSRMLS_D)
+{
+ zend_class_entry ce;
+
+ /* Create and register 'IntlIterator' class. */
+ INIT_CLASS_ENTRY(ce, "IntlIterator", IntlIterator_class_functions);
+ ce.create_object = IntlIterator_object_create;
+ IntlIterator_ce_ptr = zend_register_internal_class(&ce TSRMLS_CC);
+ IntlIterator_ce_ptr->get_iterator = IntlIterator_get_iterator;
+ zend_class_implements(IntlIterator_ce_ptr TSRMLS_CC, 1,
+ zend_ce_iterator);
+
+ memcpy(&IntlIterator_handlers, zend_get_std_object_handlers(),
+ sizeof IntlIterator_handlers);
+ IntlIterator_handlers.clone_obj = NULL;
+
+}
diff --git a/ext/intl/common/common_enum.h b/ext/intl/common/common_enum.h
new file mode 100644
index 000000000..4c6abdb8f
--- /dev/null
+++ b/ext/intl/common/common_enum.h
@@ -0,0 +1,77 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Vadim Savchuk <vsavchuk@productengine.com> |
+ | Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef INTL_COMMON_ENUM_H
+#define INTL_COMMON_ENUM_H
+
+#include <unicode/umachine.h>
+#ifdef __cplusplus
+#include <unicode/strenum.h>
+extern "C" {
+#include <math.h>
+#endif
+#include <php.h>
+#include "../intl_error.h"
+#include "../intl_data.h"
+#ifdef __cplusplus
+}
+#endif
+
+#define INTLITERATOR_ERROR(ii) (ii)->err
+#define INTLITERATOR_ERROR_P(ii) &(INTLITERATOR_ERROR(ii))
+
+#define INTLITERATOR_ERROR_CODE(ii) INTL_ERROR_CODE(INTLITERATOR_ERROR(ii))
+#define INTLITERATOR_ERROR_CODE_P(ii) &(INTL_ERROR_CODE(INTLITERATOR_ERROR(ii)))
+
+#define INTLITERATOR_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlIterator, ii)
+#define INTLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(IntlIterator, ii)
+#define INTLITERATOR_METHOD_FETCH_OBJECT\
+ object = getThis(); \
+ INTLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (ii->iterator == NULL) { \
+ intl_errors_set(&ii->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlIterator", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
+typedef struct {
+ zend_object zo;
+ intl_error err;
+ zend_object_iterator *iterator;
+} IntlIterator_object;
+
+typedef struct {
+ zend_object_iterator zoi;
+ zval *current;
+ zval *wrapping_obj;
+ void (*destroy_it)(zend_object_iterator *iterator TSRMLS_DC);
+} zoi_with_current;
+
+extern zend_class_entry *IntlIterator_ce_ptr;
+extern zend_object_handlers IntlIterator_handlers;
+
+U_CFUNC void zoi_with_current_dtor(zend_object_iterator *iter TSRMLS_DC);
+U_CFUNC int zoi_with_current_valid(zend_object_iterator *iter TSRMLS_DC);
+U_CFUNC void zoi_with_current_get_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC);
+U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter TSRMLS_DC);
+
+#ifdef __cplusplus
+U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object TSRMLS_DC);
+#endif
+
+U_CFUNC void intl_register_IntlIterator_class(TSRMLS_D);
+
+#endif // INTL_COMMON_ENUM_H
diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c
index 282172224..a0ee7c145 100644
--- a/ext/intl/common/common_error.c
+++ b/ext/intl/common/common_error.c
@@ -240,9 +240,7 @@ void intl_expose_icu_error_codes( INIT_FUNC_ARGS )
INTL_EXPOSE_CONST( U_IDNA_ACE_PREFIX_ERROR );
INTL_EXPOSE_CONST( U_IDNA_VERIFICATION_ERROR );
INTL_EXPOSE_CONST( U_IDNA_LABEL_TOO_LONG_ERROR );
-#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM >= 6
INTL_EXPOSE_CONST( U_IDNA_ZERO_LENGTH_LABEL_ERROR );
-#endif
#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM >= 8
INTL_EXPOSE_CONST( U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR );
#endif
diff --git a/ext/intl/config.m4 b/ext/intl/config.m4
index 0477c7f59..7c95c130f 100644
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -20,6 +20,7 @@ if test "$PHP_INTL" != "no"; then
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
+ intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -31,6 +32,8 @@ if test "$PHP_INTL" != "no"; then
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
+ common/common_enum.cpp \
+ common/common_date.cpp \
formatter/formatter.c \
formatter/formatter_main.c \
formatter/formatter_class.c \
@@ -49,7 +52,11 @@ if test "$PHP_INTL" != "no"; then
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
+ dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
+ dateformat/dateformat_create.cpp \
+ dateformat/dateformat_attrcpp.cpp \
+ dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
@@ -65,8 +72,19 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
+ timezone/timezone_class.cpp \
+ timezone/timezone_methods.cpp \
+ calendar/calendar_class.cpp \
+ calendar/calendar_methods.cpp \
+ calendar/gregoriancalendar_methods.cpp \
+ breakiterator/breakiterator_class.cpp \
+ breakiterator/breakiterator_iterators.cpp \
+ breakiterator/breakiterator_methods.cpp \
+ breakiterator/rulebasedbreakiterator_methods.cpp \
+ breakiterator/codepointiterator_internal.cpp \
+ breakiterator/codepointiterator_methods.cpp \
idn/idn.c \
- $icu_spoof_src, $ext_shared,,$ICU_INCS)
+ $icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings)
PHP_ADD_BUILD_DIR($ext_builddir/collator)
PHP_ADD_BUILD_DIR($ext_builddir/common)
PHP_ADD_BUILD_DIR($ext_builddir/formatter)
@@ -77,6 +95,9 @@ if test "$PHP_INTL" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/grapheme)
PHP_ADD_BUILD_DIR($ext_builddir/resourcebundle)
PHP_ADD_BUILD_DIR($ext_builddir/transliterator)
+ PHP_ADD_BUILD_DIR($ext_builddir/timezone)
+ PHP_ADD_BUILD_DIR($ext_builddir/calendar)
PHP_ADD_BUILD_DIR($ext_builddir/idn)
PHP_ADD_BUILD_DIR($ext_builddir/spoofchecker)
+ PHP_ADD_BUILD_DIR($ext_builddir/breakiterator)
fi
diff --git a/ext/intl/config.w32 b/ext/intl/config.w32
index 437fedb7d..a49918794 100644
--- a/ext/intl/config.w32
+++ b/ext/intl/config.w32
@@ -7,7 +7,7 @@ if (PHP_INTL != "no") {
if (CHECK_LIB("icuuc.lib", "intl", PHP_INTL) &&
CHECK_HEADER_ADD_INCLUDE("unicode/utf.h", "CFLAGS_INTL")) {
// always build as shared - zend_strtod.c/ICU type conflict
- EXTENSION("intl", "php_intl.c intl_convert.c intl_error.c ", true,
+ EXTENSION("intl", "php_intl.c intl_convert.c intl_convertcpp.cpp intl_error.c ", true,
"/I \"" + configure_module_dirname + "\"");
ADD_SOURCES(configure_module_dirname + "/collator", "\
collator.c \
@@ -23,6 +23,8 @@ if (PHP_INTL != "no") {
", "intl");
ADD_SOURCES(configure_module_dirname + "/common", "\
common_error.c \
+ common_enum.cpp \
+ common_date.cpp \
", "intl");
ADD_SOURCES(configure_module_dirname + "/formatter", "\
formatter.c \
@@ -60,8 +62,12 @@ if (PHP_INTL != "no") {
dateformat_class.c \
dateformat_attr.c \
dateformat_format.c \
+ dateformat_format_object.cpp \
dateformat_parse.c \
dateformat_data.c \
+ dateformat_attrcpp.cpp \
+ dateformat_helpers.cpp \
+ dateformat_create.cpp \
", "intl");
ADD_SOURCES(configure_module_dirname + "/idn", "\
idn.c",
@@ -87,6 +93,27 @@ if (PHP_INTL != "no") {
transliterator_class.c \
transliterator_methods.c",
"intl");
+
+ ADD_SOURCES(configure_module_dirname + "/timezone", "\
+ timezone_class.cpp \
+ timezone_methods.cpp",
+ "intl");
+
+ ADD_SOURCES(configure_module_dirname + "/calendar", "\
+ calendar_methods.cpp \
+ gregoriancalendar_methods.cpp \
+ calendar_class.cpp",
+ "intl");
+
+ ADD_SOURCES(configure_module_dirname + "/breakiterator", "\
+ breakiterator_class.cpp \
+ breakiterator_methods.cpp \
+ breakiterator_iterators.cpp \
+ rulebasedbreakiterator_methods.cpp \
+ codepointiterator_internal.cpp \
+ codepointiterator_methods.cpp ",
+ "intl");
+
ADD_FLAG("LIBS_INTL", "icudt.lib icuin.lib icuio.lib icule.lib iculx.lib");
AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
} else {
diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c
index 8aded18bd..fb83eeef0 100644
--- a/ext/intl/dateformat/dateformat.c
+++ b/ext/intl/dateformat/dateformat.c
@@ -17,12 +17,9 @@
#include "config.h"
#endif
-#include <unicode/ustring.h>
#include <unicode/udat.h>
-#include <unicode/ucal.h>
#include "php_intl.h"
-#include "intl_convert.h"
#include "dateformat_class.h"
#include "dateformat.h"
@@ -67,157 +64,6 @@ void dateformat_register_constants( INIT_FUNC_ARGS )
}
/* }}} */
-/* {{{ */
-static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
-{
- char* locale;
- int locale_len = 0;
- zval* object;
- long date_type = 0;
- long time_type = 0;
- long calendar = UCAL_GREGORIAN;
- char* timezone_str = NULL;
- int timezone_str_len = 0;
- char* pattern_str = NULL;
- int pattern_str_len = 0;
- UChar* svalue = NULL; /* UTF-16 pattern_str */
- int slength = 0;
- UChar* timezone_utf16 = NULL; /* UTF-16 timezone_str */
- int timezone_utf16_len = 0;
- UCalendar ucal_obj = NULL;
- IntlDateFormatter_object* dfo;
-
- intl_error_reset( NULL TSRMLS_CC );
- object = return_value;
- /* Parse parameters. */
- if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "sll|sls",
- &locale, &locale_len, &date_type, &time_type, &timezone_str, &timezone_str_len, &calendar,&pattern_str, &pattern_str_len ) == FAILURE )
- {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: unable to parse input parameters", 0 TSRMLS_CC );
- zval_dtor(return_value);
- RETURN_NULL();
- }
-
- INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
-
- if (calendar != UCAL_TRADITIONAL && calendar != UCAL_GREGORIAN) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "
- "invalid value for calendar type; it must be one of "
- "IntlDateFormatter::TRADITIONAL (locale's default calendar) "
- "or IntlDateFormatter::GREGORIAN", 0 TSRMLS_CC);
- goto error;
- }
-
- DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
-
- if (DATE_FORMAT_OBJECT(dfo) != NULL) {
- intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_create: cannot call constructor twice", 0 TSRMLS_CC);
- return;
- }
-
- /* Convert pattern (if specified) to UTF-16. */
- if( pattern_str && pattern_str_len>0 ){
- intl_convert_utf8_to_utf16(&svalue, &slength,
- pattern_str, pattern_str_len, &INTL_DATA_ERROR_CODE(dfo));
- if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
- /* object construction -> only set global error */
- intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: "
- "error converting pattern to UTF-16", 0 TSRMLS_CC);
- goto error;
- }
- }
-
- /* resources allocated from now on */
-
- /* Convert pattern (if specified) to UTF-16. */
- if( timezone_str && timezone_str_len >0 ){
- intl_convert_utf8_to_utf16(&timezone_utf16, &timezone_utf16_len,
- timezone_str, timezone_str_len, &INTL_DATA_ERROR_CODE(dfo));
- if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
- intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: "
- "error converting timezone_str to UTF-16", 0 TSRMLS_CC);
- goto error;
- }
- }
-
- if(locale_len == 0) {
- locale = INTL_G(default_locale);
- }
-
- if( pattern_str && pattern_str_len>0 ){
- DATE_FORMAT_OBJECT(dfo) = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, timezone_utf16, timezone_utf16_len, svalue, slength, &INTL_DATA_ERROR_CODE(dfo));
- } else {
- DATE_FORMAT_OBJECT(dfo) = udat_open(time_type, date_type, locale, timezone_utf16, timezone_utf16_len, svalue, slength, &INTL_DATA_ERROR_CODE(dfo));
- }
-
- if (!U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
- if (calendar != UCAL_TRADITIONAL) {
- ucal_obj = ucal_open(timezone_utf16, timezone_utf16_len, locale,
- calendar, &INTL_DATA_ERROR_CODE(dfo));
- if (!U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
- udat_setCalendar(DATE_FORMAT_OBJECT(dfo), ucal_obj);
- ucal_close(ucal_obj);
- } else {
- intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create"
- ": error opening calendar", 0 TSRMLS_CC);
- goto error;
- }
- }
- } else {
- intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: date "
- "formatter creation failed", 0 TSRMLS_CC);
- goto error;
- }
-
- /* Set the class variables */
- dfo->date_type = date_type;
- dfo->time_type = time_type;
- dfo->calendar = calendar;
- if( timezone_str && timezone_str_len > 0){
- dfo->timezone_id = estrndup( timezone_str, timezone_str_len);
- }
-
-error:
- if (svalue) {
- efree(svalue);
- }
- if (timezone_utf16) {
- efree(timezone_utf16);
- }
- if (U_FAILURE(intl_error_get_code(NULL TSRMLS_CC))) {
- /* free_object handles partially constructed instances fine */
- zval_dtor(return_value);
- RETVAL_NULL();
- }
-}
-/* }}} */
-
-/* {{{ proto IntlDateFormatter IntlDateFormatter::create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )
- * Create formatter. }}} */
-/* {{{ proto IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )
-
- * Create formatter.
- */
-PHP_FUNCTION( datefmt_create )
-{
- object_init_ex( return_value, IntlDateFormatter_ce_ptr );
- datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU);
-}
-/* }}} */
-
-/* {{{ proto void IntlDateFormatter::__construct(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern])
- * IntlDateFormatter object constructor.
- */
-PHP_METHOD( IntlDateFormatter, __construct )
-{
- /* return_value param is being changed, therefore we will always return
- * NULL here */
- return_value = getThis();
- datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU);
-}
-/* }}} */
-
/* {{{ proto int IntlDateFormatter::getErrorCode()
* Get formatter's last error code. }}} */
/* {{{ proto int datefmt_get_error_code( IntlDateFormatter $nf )
diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c
index b8c5f25e3..bf6b54466 100644
--- a/ext/intl/dateformat/dateformat_attr.c
+++ b/ext/intl/dateformat/dateformat_attr.c
@@ -25,39 +25,6 @@
#include <unicode/ustring.h>
#include <unicode/udat.h>
-#include <unicode/ucal.h>
-
-static void internal_set_calendar(IntlDateFormatter_object *dfo, char* timezone_id, int timezone_id_len, int calendar, zval* return_value TSRMLS_DC){
- int timezone_utf16_len = 0;
- UChar* timezone_utf16 = NULL; /* timezone_id in UTF-16 */
- char* locale = NULL;
-
- UCalendar* ucal_obj = NULL;
-
- /* check for the validity of value of calendar passed */
- intl_error_reset( NULL TSRMLS_CC );
- if( calendar > 1){
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_calendar: calendar value specified is out of valid range", 0 TSRMLS_CC);
- RETURN_FALSE;
- }
-
- /* Convert timezone to UTF-16. */
- intl_convert_utf8_to_utf16(&timezone_utf16, &timezone_utf16_len, timezone_id, timezone_id_len, &INTL_DATA_ERROR_CODE(dfo));
- INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" );
-
- /* Get the locale for the dateformatter */
- locale = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), ULOC_ACTUAL_LOCALE, &INTL_DATA_ERROR_CODE(dfo));
-
- /* Set the calendar if passed */
- ucal_obj = ucal_open(timezone_utf16, timezone_utf16_len, locale, calendar, &INTL_DATA_ERROR_CODE(dfo) );
- udat_setCalendar( DATE_FORMAT_OBJECT(dfo), ucal_obj );
- INTL_METHOD_CHECK_STATUS(dfo, "Error setting the calendar.");
-
- if( timezone_utf16){
- efree(timezone_utf16);
- }
-}
/* {{{ proto unicode IntlDateFormatter::getDateType( )
* Get formatter datetype. }}} */
@@ -111,97 +78,6 @@ PHP_FUNCTION( datefmt_get_timetype )
}
/* }}} */
-
-/* {{{ proto unicode IntlDateFormatter::getCalendar( )
- * Get formatter calendar. }}} */
-/* {{{ proto string datefmt_get_calendar( IntlDateFormatter $mf )
- * Get formatter calendar.
- */
-PHP_FUNCTION( datefmt_get_calendar )
-{
- DATE_FORMAT_METHOD_INIT_VARS;
-
- /* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
- {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_calendar: unable to parse input params", 0 TSRMLS_CC );
- RETURN_FALSE;
- }
-
- /* Fetch the object. */
- DATE_FORMAT_METHOD_FETCH_OBJECT;
-
- INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter calendar." );
-
- RETURN_LONG(dfo->calendar);
-}
-/* }}} */
-
-/* {{{ proto unicode IntlDateFormatter::getTimeZoneId( )
- * Get formatter timezone_id. }}} */
-/* {{{ proto string datefmt_get_timezone_id( IntlDateFormatter $mf )
- * Get formatter timezone_id.
- */
-PHP_FUNCTION( datefmt_get_timezone_id )
-{
- DATE_FORMAT_METHOD_INIT_VARS;
-
- /* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
- {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_timezone_id: unable to parse input params", 0 TSRMLS_CC );
- RETURN_FALSE;
- }
-
- /* Fetch the object. */
- DATE_FORMAT_METHOD_FETCH_OBJECT;
-
- INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter timezone_id." );
-
- if( dfo->timezone_id ){
- RETURN_STRING((char*)dfo->timezone_id, TRUE );
- }else{
- RETURN_NULL();
- }
-}
-
-/* {{{ proto boolean IntlDateFormatter::setTimeZoneId( $timezone_id)
- * Set formatter timezone_id. }}} */
-/* {{{ proto boolean datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)
- * Set formatter timezone_id.
- */
-PHP_FUNCTION( datefmt_set_timezone_id )
-{
- char* timezone_id = NULL;
- int timezone_id_len = 0;
-
- DATE_FORMAT_METHOD_INIT_VARS;
-
- /* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, IntlDateFormatter_ce_ptr,&timezone_id, &timezone_id_len) == FAILURE )
- {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_timezone_id: unable to parse input params", 0 TSRMLS_CC );
- RETURN_FALSE;
- }
-
- /* Fetch the object. */
- DATE_FORMAT_METHOD_FETCH_OBJECT;
-
- /* set the timezone for the calendar */
- internal_set_calendar( dfo, timezone_id, timezone_id_len, dfo->calendar, return_value TSRMLS_CC );
-
- /* Set the IntlDateFormatter variable */
- if( dfo->timezone_id ){
- efree(dfo->timezone_id);
- }
- dfo->timezone_id = estrndup(timezone_id, timezone_id_len);
-
- RETURN_TRUE;
-}
-
/* {{{ proto string IntlDateFormatter::getPattern( )
* Get formatter pattern. }}} */
/* {{{ proto string datefmt_get_pattern( IntlDateFormatter $mf )
@@ -370,43 +246,3 @@ PHP_FUNCTION( datefmt_set_lenient )
udat_setLenient(DATE_FORMAT_OBJECT(dfo), (UBool)isLenient );
}
/* }}} */
-
-/* {{{ proto bool IntlDateFormatter::setPattern( int $calendar )
- * Set formatter calendar. }}} */
-/* {{{ proto bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )
- * Set formatter calendar.
- */
-PHP_FUNCTION( datefmt_set_calendar )
-{
- long calendar = 0;
-
- DATE_FORMAT_METHOD_INIT_VARS;
-
- /* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol",
- &object, IntlDateFormatter_ce_ptr, &calendar ) == FAILURE ) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_calendar: unable to parse input params", 0 TSRMLS_CC);
- RETURN_FALSE;
- }
-
- /* check for the validity of value of calendar passed */
- intl_error_reset( NULL TSRMLS_CC );
- if (calendar > 1) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_calendar: calendar value specified is out of valid range", 0 TSRMLS_CC);
- RETURN_FALSE;
- }
-
- DATE_FORMAT_METHOD_FETCH_OBJECT;
-
- internal_set_calendar( dfo, dfo->timezone_id, strlen(dfo->timezone_id), calendar, return_value TSRMLS_CC );
-
- /* Set the calendar value in the IntlDateFormatter object */
- dfo->calendar = calendar;
-
- RETURN_TRUE;
-}
-/* }}} */
-
-
diff --git a/ext/intl/dateformat/dateformat_attr.h b/ext/intl/dateformat/dateformat_attr.h
index bf28824d6..6fe82a6e0 100644
--- a/ext/intl/dateformat/dateformat_attr.h
+++ b/ext/intl/dateformat/dateformat_attr.h
@@ -21,11 +21,7 @@
//PHP_FUNCTION( datefmt_get_timezone );
PHP_FUNCTION( datefmt_get_datetype );
PHP_FUNCTION( datefmt_get_timetype );
-PHP_FUNCTION( datefmt_get_calendar );
-PHP_FUNCTION( datefmt_set_calendar );
PHP_FUNCTION( datefmt_get_locale );
-PHP_FUNCTION( datefmt_get_timezone_id );
-PHP_FUNCTION( datefmt_set_timezone_id );
PHP_FUNCTION( datefmt_get_pattern );
PHP_FUNCTION( datefmt_set_pattern );
PHP_FUNCTION( datefmt_is_lenient );
diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp
new file mode 100644
index 000000000..b68abec65
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_attrcpp.cpp
@@ -0,0 +1,261 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "../intl_cppshims.h"
+
+#include <unicode/timezone.h>
+#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
+
+extern "C" {
+#include "../php_intl.h"
+#include "dateformat_class.h"
+#include "dateformat_attrcpp.h"
+#define USE_TIMEZONE_POINTER 1
+#include "../timezone/timezone_class.h"
+#define USE_CALENDAR_POINTER 1
+#include "../calendar/calendar_class.h"
+}
+
+#include "../intl_convertcpp.h"
+#include "dateformat_helpers.h"
+
+static inline DateFormat *fetch_datefmt(IntlDateFormatter_object *dfo) {
+ return (DateFormat *)dfo->datef_data.udatf;
+}
+
+/* {{{ proto string IntlDateFormatter::getTimeZoneId()
+ * Get formatter timezone_id. }}} */
+/* {{{ proto string datefmt_get_timezone_id(IntlDateFormatter $mf)
+ * Get formatter timezone_id.
+ */
+U_CFUNC PHP_FUNCTION(datefmt_get_timezone_id)
+{
+ DATE_FORMAT_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, IntlDateFormatter_ce_ptr ) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timezone_"
+ "id: unable to parse input params", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT;
+
+ UnicodeString res = UnicodeString();
+ fetch_datefmt(dfo)->getTimeZone().getID(res);
+ intl_charFromString(res, &Z_STRVAL_P(return_value),
+ &Z_STRLEN_P(return_value), &INTL_DATA_ERROR_CODE(dfo));
+ INTL_METHOD_CHECK_STATUS(dfo, "Could not convert time zone id to UTF-8");
+
+ Z_TYPE_P(return_value) = IS_STRING;
+}
+
+/* {{{ proto IntlTimeZone IntlDateFormatter::getTimeZone()
+ * Get formatter timezone. }}} */
+/* {{{ proto IntlTimeZone datefmt_get_timezone(IntlDateFormatter $mf)
+ * Get formatter timezone.
+ */
+U_CFUNC PHP_FUNCTION(datefmt_get_timezone)
+{
+ DATE_FORMAT_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, IntlDateFormatter_ce_ptr ) == FAILURE) {
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_get_timezone: unable to parse input params", 0 TSRMLS_CC );
+ RETURN_FALSE;
+ }
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT;
+
+ const TimeZone& tz = fetch_datefmt(dfo)->getTimeZone();
+ TimeZone *tz_clone = tz.clone();
+ if (tz_clone == NULL) {
+ intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
+ "datefmt_get_timezone: Out of memory when cloning time zone",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ object_init_ex(return_value, TimeZone_ce_ptr);
+ timezone_object_construct(tz_clone, return_value, 1 TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(datefmt_set_timezone_id)
+{
+ php_error_docref0(NULL TSRMLS_CC, E_DEPRECATED,
+ "Use datefmt_set_timezone() instead, which also accepts a plain "
+ "time zone identifier and for which this function is now an "
+ "alias");
+ PHP_FN(datefmt_set_timezone)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+
+/* {{{ proto boolean IntlDateFormatter::setTimeZone(mixed $timezone)
+ * Set formatter's timezone. }}} */
+/* {{{ proto boolean datefmt_set_timezone_id(IntlDateFormatter $mf, $timezone_id)
+ * Set formatter timezone_id.
+ */
+U_CFUNC PHP_FUNCTION(datefmt_set_timezone)
+{
+ zval **timezone_zv;
+ TimeZone *timezone;
+
+ DATE_FORMAT_METHOD_INIT_VARS;
+
+ if ( zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "OZ", &object, IntlDateFormatter_ce_ptr, &timezone_zv) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_timezone: "
+ "unable to parse input params", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT;
+
+ timezone = timezone_process_timezone_argument(timezone_zv,
+ INTL_DATA_ERROR_P(dfo), "datefmt_set_timezone" TSRMLS_CC);
+ if (timezone == NULL) {
+ RETURN_FALSE;
+ }
+
+ fetch_datefmt(dfo)->adoptTimeZone(timezone);
+}
+
+/* {{{ proto int IntlDateFormatter::getCalendar( )
+ * Get formatter calendar type. }}} */
+/* {{{ proto int datefmt_get_calendar(IntlDateFormatter $mf)
+ * Get formatter calendar type.
+ */
+U_CFUNC PHP_FUNCTION(datefmt_get_calendar)
+{
+ DATE_FORMAT_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, IntlDateFormatter_ce_ptr ) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_get_calendar: unable to parse input params", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT;
+
+ if (dfo->calendar == -1) {
+ /* an IntlCalendar was provided to the constructor */
+ RETURN_FALSE;
+ }
+
+ RETURN_LONG(dfo->calendar);
+}
+/* }}} */
+
+/* {{{ proto IntlCalendar IntlDateFormatter::getCalendarObject()
+ * Get formatter calendar. }}} */
+/* {{{ proto IntlCalendar datefmt_get_calendar_object(IntlDateFormatter $mf)
+ * Get formatter calendar.
+ */
+U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object)
+{
+ DATE_FORMAT_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, IntlDateFormatter_ce_ptr ) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_get_calendar_object: unable to parse input params",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT;
+
+ const Calendar *cal = fetch_datefmt(dfo)->getCalendar();
+ if (cal == NULL) {
+ RETURN_NULL();
+ }
+
+ Calendar *cal_clone = cal->clone();
+ if (cal_clone == NULL) {
+ intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
+ "datefmt_get_calendar_object: Out of memory when cloning "
+ "calendar", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ calendar_object_create(return_value, cal_clone TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ proto bool IntlDateFormatter::setCalendar(mixed $calendar)
+ * Set formatter's calendar. }}} */
+/* {{{ proto bool datefmt_set_calendar(IntlDateFormatter $mf, mixed $calendar)
+ * Set formatter's calendar.
+ */
+U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
+{
+ zval *calendar_zv;
+ DATE_FORMAT_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz",
+ &object, IntlDateFormatter_ce_ptr, &calendar_zv) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_set_calendar: unable to parse input params", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT;
+
+ Calendar *cal;
+ long cal_type;
+ bool cal_owned;
+ Locale locale = Locale::createFromName(dfo->requested_locale);
+ // getting the actual locale from the DateFormat is not enough
+ // because we would have lost modifiers such as @calendar. We
+ // must store the requested locale on object creation
+
+ if (datefmt_process_calendar_arg(calendar_zv, locale,
+ "datefmt_set_calendar", INTL_DATA_ERROR_P(dfo), cal, cal_type,
+ cal_owned TSRMLS_CC) == FAILURE) {
+ RETURN_FALSE;
+ }
+
+ if (cal_owned) {
+ /* a non IntlCalendar was specified, we want to keep the timezone */
+ TimeZone *old_timezone = fetch_datefmt(dfo)->getTimeZone().clone();
+ if (old_timezone == NULL) {
+ intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
+ "datefmt_set_calendar: Out of memory when cloning calendar",
+ 0 TSRMLS_CC);
+ delete cal;
+ RETURN_FALSE;
+ }
+ cal->adoptTimeZone(old_timezone);
+ } else {
+ cal = cal->clone();
+ if (cal == NULL) {
+ intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
+ "datefmt_set_calendar: Out of memory when cloning calendar",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ }
+
+ fetch_datefmt(dfo)->adoptCalendar(cal);
+
+ dfo->calendar = cal_type;
+
+ RETURN_TRUE;
+}
+/* }}} */
+
diff --git a/ext/intl/dateformat/dateformat_attrcpp.h b/ext/intl/dateformat/dateformat_attrcpp.h
new file mode 100644
index 000000000..408232f94
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_attrcpp.h
@@ -0,0 +1,35 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef DATEFORMAT_ATTRCPP_H
+#define DATEFORMAT_ATTRCPP_H
+
+PHP_FUNCTION(datefmt_get_timezone_id);
+
+PHP_FUNCTION(datefmt_set_timezone_id);
+
+PHP_FUNCTION(datefmt_get_timezone);
+
+PHP_FUNCTION(datefmt_set_timezone);
+
+PHP_FUNCTION(datefmt_get_calendar);
+
+PHP_FUNCTION(datefmt_set_calendar);
+
+PHP_FUNCTION(datefmt_get_calendar_object);
+
+#endif /* DATEFORMAT_ATTRCPP_H */
+
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index 49f316f78..211c87f59 100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -19,9 +19,11 @@
#include "php_intl.h"
#include "dateformat_data.h"
#include "dateformat_format.h"
+#include "dateformat_format_object.h"
#include "dateformat_parse.h"
#include "dateformat.h"
#include "dateformat_attr.h"
+#include "dateformat_attrcpp.h"
#include <zend_exceptions.h>
@@ -46,12 +48,12 @@ void IntlDateFormatter_object_free( zend_object *object TSRMLS_DC )
zend_object_std_dtor( &dfo->zo TSRMLS_CC );
- dateformat_data_free( &dfo->datef_data TSRMLS_CC );
-
- if( dfo->timezone_id ){
- efree(dfo->timezone_id);
+ if (dfo->requested_locale) {
+ efree( dfo->requested_locale );
}
+ dateformat_data_free( &dfo->datef_data TSRMLS_CC );
+
efree( dfo );
}
/* }}} */
@@ -66,10 +68,10 @@ zend_object_value IntlDateFormatter_object_create(zend_class_entry *ce TSRMLS_DC
dateformat_data_init( &intern->datef_data TSRMLS_CC );
zend_object_std_init( &intern->zo, ce TSRMLS_CC );
object_properties_init(&intern->zo, ce);
- intern->date_type = 0;
- intern->time_type = 0;
- intern->calendar = 1; /* Gregorian calendar */
- intern->timezone_id = NULL;
+ intern->date_type = 0;
+ intern->time_type = 0;
+ intern->calendar = -1;
+ intern->requested_locale = NULL;
retval.handle = zend_objects_store_put(
intern,
@@ -127,6 +129,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_format, 0, 0, 0)
ZEND_ARG_INFO(0, array)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_format_object, 0, 0, 1)
+ ZEND_ARG_INFO(0, object)
+ ZEND_ARG_INFO(0, format)
+ ZEND_ARG_INFO(0, locale)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO(arginfo_intldateformatter_getdatetype, 0)
ZEND_END_ARG_INFO()
@@ -165,15 +173,19 @@ static zend_function_entry IntlDateFormatter_class_functions[] = {
PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( getCalendar, ZEND_FN( datefmt_get_calendar ), arginfo_intldateformatter_getdatetype )
+ PHP_NAMED_FE( getCalendarObject, ZEND_FN( datefmt_get_calendar_object ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( setCalendar, ZEND_FN( datefmt_set_calendar ), arginfo_intldateformatter_setcalendar )
PHP_NAMED_FE( getTimeZoneId, ZEND_FN( datefmt_get_timezone_id ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( setTimeZoneId, ZEND_FN( datefmt_set_timezone_id ), arginfo_intldateformatter_settimezoneid )
+ PHP_NAMED_FE( getTimeZone, ZEND_FN( datefmt_get_timezone ), arginfo_intldateformatter_getdatetype )
+ PHP_NAMED_FE( setTimeZone, ZEND_FN( datefmt_set_timezone ), arginfo_intldateformatter_settimezoneid )
PHP_NAMED_FE( setPattern, ZEND_FN( datefmt_set_pattern ), arginfo_intldateformatter_setpattern )
PHP_NAMED_FE( getPattern, ZEND_FN( datefmt_get_pattern ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( getLocale, ZEND_FN( datefmt_get_locale ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( setLenient, ZEND_FN( datefmt_set_lenient ), arginfo_intldateformatter_setlenient )
PHP_NAMED_FE( isLenient, ZEND_FN( datefmt_is_lenient ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( format, ZEND_FN( datefmt_format ), arginfo_intldateformatter_format )
+ PHP_ME_MAPPING( formatObject, datefmt_format_object, arginfo_intldateformatter_format_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), datefmt_parse_args )
PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), datefmt_parse_args )
PHP_NAMED_FE( getErrorCode, ZEND_FN( datefmt_get_error_code ), arginfo_intldateformatter_getdatetype )
diff --git a/ext/intl/dateformat/dateformat_class.h b/ext/intl/dateformat/dateformat_class.h
index d58abe42f..b4304660e 100644
--- a/ext/intl/dateformat/dateformat_class.h
+++ b/ext/intl/dateformat/dateformat_class.h
@@ -24,12 +24,12 @@
#include "dateformat_data.h"
typedef struct {
- zend_object zo;
- dateformat_data datef_data;
- int date_type ;
- int time_type ;
- int calendar ;
- char* timezone_id;
+ zend_object zo;
+ dateformat_data datef_data;
+ int date_type;
+ int time_type;
+ int calendar;
+ char *requested_locale;
} IntlDateFormatter_object;
void dateformat_register_IntlDateFormatter_class( TSRMLS_D );
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
new file mode 100644
index 000000000..a2899f797
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -0,0 +1,193 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Kirti Velankar <kirtig@yahoo-inc.com> |
+ | Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "../intl_cppshims.h"
+
+#include <unicode/timezone.h>
+#include <unicode/calendar.h>
+#include <unicode/datefmt.h>
+
+extern "C" {
+#include <unicode/ustring.h>
+#include <unicode/udat.h>
+
+#include "php_intl.h"
+#include "dateformat_create.h"
+#include "dateformat_class.h"
+#define USE_TIMEZONE_POINTER 1
+#include "../timezone/timezone_class.h"
+#include "../intl_convert.h"
+}
+
+#include "dateformat_helpers.h"
+
+/* {{{ */
+static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
+{
+ zval *object;
+
+ const char *locale_str;
+ int locale_len = 0;
+ Locale locale;
+ long date_type = 0;
+ long time_type = 0;
+ zval *calendar_zv = NULL;
+ Calendar *calendar = NULL;
+ long calendar_type;
+ bool calendar_owned;
+ zval **timezone_zv = NULL;
+ TimeZone *timezone = NULL;
+ bool explicit_tz;
+ char* pattern_str = NULL;
+ int pattern_str_len = 0;
+ UChar* svalue = NULL; /* UTF-16 pattern_str */
+ int slength = 0;
+ IntlDateFormatter_object* dfo;
+
+ intl_error_reset(NULL TSRMLS_CC);
+ object = return_value;
+ /* Parse parameters. */
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|Zzs",
+ &locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
+ &calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "
+ "unable to parse input parameters", 0 TSRMLS_CC);
+ zval_dtor(return_value);
+ RETURN_NULL();
+ }
+
+ INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
+ if (locale_len == 0) {
+ locale_str = intl_locale_get_default(TSRMLS_C);
+ }
+ locale = Locale::createFromName(locale_str);
+
+ DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
+
+ if (DATE_FORMAT_OBJECT(dfo) != NULL) {
+ intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_create: cannot call constructor twice", 0 TSRMLS_CC);
+ return;
+ }
+
+ /* process calendar */
+ if (datefmt_process_calendar_arg(calendar_zv, locale, "datefmt_create",
+ INTL_DATA_ERROR_P(dfo), calendar, calendar_type,
+ calendar_owned TSRMLS_CC)
+ == FAILURE) {
+ goto error;
+ }
+
+ /* process timezone */
+ explicit_tz = timezone_zv != NULL && Z_TYPE_PP(timezone_zv) != IS_NULL;
+
+ if (explicit_tz || calendar_owned ) {
+ //we have an explicit time zone or a non-object calendar
+ timezone = timezone_process_timezone_argument(timezone_zv,
+ INTL_DATA_ERROR_P(dfo), "datefmt_create" TSRMLS_CC);
+ if (timezone == NULL) {
+ goto error;
+ }
+ }
+
+ /* Convert pattern (if specified) to UTF-16. */
+ if (pattern_str && pattern_str_len > 0) {
+ intl_convert_utf8_to_utf16(&svalue, &slength,
+ pattern_str, pattern_str_len, &INTL_DATA_ERROR_CODE(dfo));
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
+ /* object construction -> only set global error */
+ intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: "
+ "error converting pattern to UTF-16", 0 TSRMLS_CC);
+ goto error;
+ }
+ }
+
+ if (pattern_str && pattern_str_len > 0) {
+ DATE_FORMAT_OBJECT(dfo) = udat_open(UDAT_IGNORE, UDAT_IGNORE,
+ locale_str, NULL, 0, svalue, slength,
+ &INTL_DATA_ERROR_CODE(dfo));
+ } else {
+ DATE_FORMAT_OBJECT(dfo) = udat_open((UDateFormatStyle)time_type,
+ (UDateFormatStyle)date_type, locale_str, NULL, 0, svalue,
+ slength, &INTL_DATA_ERROR_CODE(dfo));
+ }
+
+ if (!U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
+ DateFormat *df = (DateFormat*)DATE_FORMAT_OBJECT(dfo);
+ if (calendar_owned) {
+ df->adoptCalendar(calendar);
+ calendar_owned = false;
+ } else {
+ df->setCalendar(*calendar);
+ }
+
+ if (timezone != NULL) {
+ df->adoptTimeZone(timezone);
+ }
+ } else {
+ intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: date "
+ "formatter creation failed", 0 TSRMLS_CC);
+ goto error;
+ }
+
+ /* Set the class variables */
+ dfo->date_type = date_type;
+ dfo->time_type = time_type;
+ dfo->calendar = calendar_type;
+ dfo->requested_locale = estrdup(locale_str);
+
+error:
+ if (svalue) {
+ efree(svalue);
+ }
+ if (timezone != NULL && DATE_FORMAT_OBJECT(dfo) == NULL) {
+ delete timezone;
+ }
+ if (calendar != NULL && calendar_owned) {
+ delete calendar;
+ }
+ if (U_FAILURE(intl_error_get_code(NULL TSRMLS_CC))) {
+ /* free_object handles partially constructed instances fine */
+ zval_dtor(return_value);
+ RETVAL_NULL();
+ }
+}
+/* }}} */
+
+/* {{{ proto IntlDateFormatter IntlDateFormatter::create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )
+ * Create formatter. }}} */
+/* {{{ proto IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern)
+ * Create formatter.
+ */
+U_CFUNC PHP_FUNCTION( datefmt_create )
+{
+ object_init_ex( return_value, IntlDateFormatter_ce_ptr );
+ datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+/* }}} */
+
+/* {{{ proto void IntlDateFormatter::__construct(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern])
+ * IntlDateFormatter object constructor.
+ */
+U_CFUNC PHP_METHOD( IntlDateFormatter, __construct )
+{
+ /* return_value param is being changed, therefore we will always return
+ * NULL here */
+ return_value = getThis();
+ datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+/* }}} */
diff --git a/ext/intl/dateformat/dateformat_create.h b/ext/intl/dateformat/dateformat_create.h
new file mode 100644
index 000000000..47e67c2f4
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_create.h
@@ -0,0 +1,25 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+#ifndef DATE_FORMATTER_H
+#define DATE_FORMATTER_H
+
+#include <php.h>
+
+PHP_FUNCTION( datefmt_create );
+PHP_METHOD( IntlDateFormatter, __construct );
+void dateformat_register_constants( INIT_FUNC_ARGS );
+
+#endif // DATE_FORMATTER_H
diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c
index 4d03d924c..ffae15518 100644
--- a/ext/intl/dateformat/dateformat_format.c
+++ b/ext/intl/dateformat/dateformat_format.c
@@ -21,13 +21,13 @@
#include <unicode/ustring.h>
#include <unicode/ucal.h>
-#include "php_intl.h"
-#include "intl_convert.h"
+#include "../php_intl.h"
+#include "../intl_convert.h"
+#include "../common/common_date.h"
#include "dateformat.h"
#include "dateformat_class.h"
#include "dateformat_format.h"
#include "dateformat_data.h"
-#include "ext/date/php_date.h"
/* {{{
* Internal function which calls the udat_format
@@ -59,20 +59,38 @@ static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval
/* {{{
* Internal function which fetches an element from the passed array for the key_name passed
*/
-static double internal_get_arr_ele(IntlDateFormatter_object *dfo, HashTable* hash_arr, char* key_name TSRMLS_DC)
+static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
+ HashTable* hash_arr, char* key_name, intl_error *err TSRMLS_DC)
{
- zval** ele_value = NULL;
- UDate result = -1;
-
- if( zend_hash_find( hash_arr, key_name, strlen(key_name) + 1, (void **)&ele_value ) == SUCCESS ){
- if( Z_TYPE_PP(ele_value)!= IS_LONG ){
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_format: parameter array does not contain a long element.", 0 TSRMLS_CC );
- }else{
- result = Z_LVAL_PP(ele_value);
+ zval **ele_value = NULL;
+ int32_t result = 0;
+ char *message;
+
+ if (U_FAILURE(err->code)) {
+ return result;
+ }
+
+ if (zend_hash_find(hash_arr, key_name, strlen(key_name) + 1,
+ (void **)&ele_value) == SUCCESS) {
+ if(Z_TYPE_PP(ele_value) != IS_LONG) {
+ spprintf(&message, 0, "datefmt_format: parameter array contains "
+ "a non-integer element for key '%s'", key_name);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ } else {
+ if (Z_LVAL_PP(ele_value) > INT32_MAX ||
+ Z_LVAL_PP(ele_value) < INT32_MIN) {
+ spprintf(&message, 0, "datefmt_format: value %ld is out of "
+ "bounds for a 32-bit integer in key '%s'",
+ Z_LVAL_PP(ele_value), key_name);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ } else {
+ result = Z_LVAL_PP(ele_value);
+ }
}
}
- /* printf("\n Inside internal_get_arr_ele key_name= %s, result = %g \n", key_name, result); */
+
return result;
}
/* }}} */
@@ -80,41 +98,51 @@ static double internal_get_arr_ele(IntlDateFormatter_object *dfo, HashTable* has
/* {{{
* Internal function which sets UCalendar from the passed array and retrieves timestamp
*/
-static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, HashTable* hash_arr TSRMLS_DC)
+static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
+ HashTable *hash_arr TSRMLS_DC)
{
- long year =0;
- long month =0;
- long hour =0;
- long minute =0;
- long second =0;
- long wday =0;
- long yday =0;
- long mday =0;
- UBool isInDST = FALSE;
- UCalendar *pcal;
+ int32_t year,
+ month,
+ hour,
+ minute,
+ second,
+ mday;
+ UCalendar *pcal;
+ UDate result;
+ intl_error *err = &dfo->datef_data.error;
+
+#define INTL_GET_ELEM(elem) \
+ internal_get_arr_ele(dfo, hash_arr, (elem), err TSRMLS_CC)
/* Fetch values from the incoming array */
- year = internal_get_arr_ele( dfo, hash_arr, CALENDAR_YEAR TSRMLS_CC) + 1900; /* tm_year is years since 1900 */
+ year = INTL_GET_ELEM(CALENDAR_YEAR) + 1900; /* tm_year is years since 1900 */
/* Month in ICU and PHP starts from January =0 */
- month = internal_get_arr_ele( dfo, hash_arr, CALENDAR_MON TSRMLS_CC);
- hour = internal_get_arr_ele( dfo, hash_arr, CALENDAR_HOUR TSRMLS_CC);
- minute = internal_get_arr_ele( dfo, hash_arr, CALENDAR_MIN TSRMLS_CC);
- second = internal_get_arr_ele( dfo, hash_arr, CALENDAR_SEC TSRMLS_CC);
- wday = internal_get_arr_ele( dfo, hash_arr, CALENDAR_WDAY TSRMLS_CC);
- yday = internal_get_arr_ele( dfo, hash_arr, CALENDAR_YDAY TSRMLS_CC);
- isInDST = internal_get_arr_ele( dfo, hash_arr, CALENDAR_ISDST TSRMLS_CC);
+ month = INTL_GET_ELEM(CALENDAR_MON);
+ hour = INTL_GET_ELEM(CALENDAR_HOUR);
+ minute = INTL_GET_ELEM(CALENDAR_MIN);
+ second = INTL_GET_ELEM(CALENDAR_SEC);
/* For the ucal_setDateTime() function, this is the 'date' value */
- mday = internal_get_arr_ele( dfo, hash_arr, CALENDAR_MDAY TSRMLS_CC);
+ mday = INTL_GET_ELEM(CALENDAR_MDAY);
- pcal = udat_getCalendar(DATE_FORMAT_OBJECT(dfo));
- /* set the incoming values for the calendar */
- ucal_setDateTime( pcal, year, month, mday, hour, minute, second, &INTL_DATA_ERROR_CODE(dfo));
- if( INTL_DATA_ERROR_CODE(dfo) != U_ZERO_ERROR){
+#undef INTL_GET_ELEM
+
+ pcal = ucal_clone(udat_getCalendar(DATE_FORMAT_OBJECT(dfo)),
+ &INTL_DATA_ERROR_CODE(dfo));
+
+ if (INTL_DATA_ERROR_CODE(dfo) != U_ZERO_ERROR) {
+ intl_errors_set(err, INTL_DATA_ERROR_CODE(dfo), "datefmt_format: "
+ "error cloning calendar", 0 TSRMLS_CC);
return 0;
}
-
+
+ /* set the incoming values for the calendar */
+ ucal_setDateTime(pcal, year, month, mday, hour, minute, second, &INTL_DATA_ERROR_CODE(dfo));
+ /* actually, ucal_setDateTime cannot fail */
+
/* Fetch the timestamp from the UCalendar */
- return ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo) );
+ result = ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo));
+ ucal_close(pcal);
+ return result;
}
@@ -124,70 +152,39 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, HashTable* ha
* Format the time value as a string. }}}*/
PHP_FUNCTION(datefmt_format)
{
- UDate timestamp =0;
- UDate p_timestamp =0;
- HashTable* hash_arr = NULL;
- zval* zarg = NULL;
+ UDate timestamp = 0;
+ HashTable *hash_arr = NULL;
+ zval *zarg = NULL;
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &object, IntlDateFormatter_ce_ptr,&zarg ) == FAILURE )
- {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: unable to parse input params", 0 TSRMLS_CC );
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz",
+ &object, IntlDateFormatter_ce_ptr, &zarg) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: unable "
+ "to parse input params", 0 TSRMLS_CC );
RETURN_FALSE;
}
- /* Fetch the object. */
DATE_FORMAT_METHOD_FETCH_OBJECT;
- switch(Z_TYPE_P(zarg) ){
- case IS_LONG:
- p_timestamp = Z_LVAL_P(zarg) ;
- timestamp = p_timestamp * 1000;
- break;
- case IS_DOUBLE:
- /* timestamp*1000 since ICU expects it in milliseconds */
- p_timestamp = Z_DVAL_P(zarg) ;
- timestamp = p_timestamp * 1000;
- break;
- case IS_ARRAY:
- hash_arr = Z_ARRVAL_P(zarg);
- if( !hash_arr || zend_hash_num_elements( hash_arr ) == 0 )
- RETURN_FALSE;
-
- timestamp = internal_get_timestamp(dfo, hash_arr TSRMLS_CC);
- INTL_METHOD_CHECK_STATUS( dfo, "datefmt_format: Date formatting failed" )
- break;
- case IS_OBJECT: {
- zend_class_entry *date_ce = php_date_get_date_ce();
- zval retval;
- zval *zfuncname;
- if(!instanceof_function(Z_OBJCE_P(zarg), date_ce TSRMLS_CC)) {
- intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: object must be an instance of DateTime", 0 TSRMLS_CC );
- RETURN_FALSE;
- }
- INIT_ZVAL(retval);
- MAKE_STD_ZVAL(zfuncname);
- ZVAL_STRING(zfuncname, "getTimestamp", 1);
- if(call_user_function(NULL, &zarg, zfuncname, &retval, 0, NULL TSRMLS_CC) != SUCCESS || Z_TYPE(retval) != IS_LONG) {
- intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: cannot get timestamp", 0 TSRMLS_CC );
- zval_ptr_dtor(&zfuncname);
- RETURN_FALSE;
- }
- zval_ptr_dtor(&zfuncname);
- p_timestamp = Z_LVAL(retval);
- timestamp = p_timestamp*1000;
+ if (Z_TYPE_P(zarg) == IS_ARRAY) {
+ hash_arr = Z_ARRVAL_P(zarg);
+ if (!hash_arr || zend_hash_num_elements(hash_arr) == 0) {
+ RETURN_FALSE;
}
- break;
- default:
- intl_errors_set( INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_format: takes either an array or an integer timestamp value or a DateTime object", 0 TSRMLS_CC );
+
+ timestamp = internal_get_timestamp(dfo, hash_arr TSRMLS_CC);
+ INTL_METHOD_CHECK_STATUS(dfo, "datefmt_format: date formatting failed")
+ } else {
+ timestamp = intl_zval_to_millis(zarg, INTL_DATA_ERROR_P(dfo),
+ "datefmt_format" TSRMLS_CC);
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
RETURN_FALSE;
+ }
}
-
- internal_format( dfo, timestamp, return_value TSRMLS_CC);
+ internal_format( dfo, timestamp, return_value TSRMLS_CC);
}
/* }}} */
diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp
new file mode 100644
index 000000000..e8981faa2
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -0,0 +1,230 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "../intl_cppshims.h"
+
+#include <unicode/calendar.h>
+#include <unicode/gregocal.h>
+#include <unicode/datefmt.h>
+#include <unicode/smpdtfmt.h>
+#include <unicode/locid.h>
+
+#include "../intl_convertcpp.h"
+
+extern "C" {
+#include "../php_intl.h"
+#include "../locale/locale.h"
+#define USE_CALENDAR_POINTER 1
+#include "../calendar/calendar_class.h"
+#include <ext/date/php_date.h>
+#include "../common/common_date.h"
+}
+
+static const DateFormat::EStyle valid_styles[] = {
+ DateFormat::kNone,
+ DateFormat::kFull,
+ DateFormat::kLong,
+ DateFormat::kMedium,
+ DateFormat::kShort,
+ DateFormat::kFullRelative,
+ DateFormat::kLongRelative,
+ DateFormat::kMediumRelative,
+ DateFormat::kShortRelative,
+};
+
+static bool valid_format(zval **z) {
+ if (Z_TYPE_PP(z) == IS_LONG) {
+ long lval = Z_LVAL_PP(z);
+ for (int i = 0; i < sizeof(valid_styles) / sizeof(*valid_styles); i++) {
+ if ((long)valid_styles[i] == lval) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+U_CFUNC PHP_FUNCTION(datefmt_format_object)
+{
+ zval *object,
+ **format = NULL;
+ const char *locale_str = NULL;
+ int locale_len;
+ bool pattern = false;
+ UDate date;
+ TimeZone *timeZone = NULL;
+ UErrorCode status = U_ZERO_ERROR;
+ DateFormat *df = NULL;
+ Calendar *cal = NULL;
+ DateFormat::EStyle dateStyle = DateFormat::kDefault,
+ timeStyle = DateFormat::kDefault;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|Zs!",
+ &object, &format, &locale_str, &locale_len) == FAILURE) {
+ RETURN_FALSE;
+ }
+
+ if (!locale_str) {
+ locale_str = intl_locale_get_default(TSRMLS_C);
+ }
+
+ if (format == NULL || Z_TYPE_PP(format) == IS_NULL) {
+ //nothing
+ } else if (Z_TYPE_PP(format) == IS_ARRAY) {
+ HashTable *ht = Z_ARRVAL_PP(format);
+ HashPosition pos = {0};
+ zval **z;
+ if (zend_hash_num_elements(ht) != 2) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_format_object: bad format; if array, it must have "
+ "two elements", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ zend_hash_internal_pointer_reset_ex(ht, &pos);
+ zend_hash_get_current_data_ex(ht, (void**)&z, &pos);
+ if (!valid_format(z)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_format_object: bad format; the date format (first "
+ "element of the array) is not valid", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ dateStyle = (DateFormat::EStyle)Z_LVAL_PP(z);
+
+ zend_hash_move_forward_ex(ht, &pos);
+ zend_hash_get_current_data_ex(ht, (void**)&z, &pos);
+ if (!valid_format(z)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_format_object: bad format; the time format ("
+ "second element of the array) is not valid", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ timeStyle = (DateFormat::EStyle)Z_LVAL_PP(z);
+ } else if (Z_TYPE_PP(format) == IS_LONG) {
+ if (!valid_format(format)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_format_object: the date/time format type is invalid",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ dateStyle = timeStyle = (DateFormat::EStyle)Z_LVAL_PP(format);
+ } else {
+ convert_to_string_ex(format);
+ if (Z_STRLEN_PP(format) == 0) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_format_object: the format is empty", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ pattern = true;
+ }
+
+ //there's no support for relative time in ICU yet
+ timeStyle = (DateFormat::EStyle)(timeStyle & ~DateFormat::kRelative);
+
+ zend_class_entry *instance_ce = Z_OBJCE_P(object);
+ if (instanceof_function(instance_ce, Calendar_ce_ptr TSRMLS_CC)) {
+ Calendar *obj_cal = calendar_fetch_native_calendar(object TSRMLS_CC);
+ if (obj_cal == NULL) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "datefmt_format_object: bad IntlCalendar instance: "
+ "not initialized properly", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ timeZone = obj_cal->getTimeZone().clone();
+ date = obj_cal->getTime(status);
+ if (U_FAILURE(status)) {
+ intl_error_set(NULL, status,
+ "datefmt_format_object: error obtaining instant from "
+ "IntlCalendar", 0 TSRMLS_CC);
+ RETVAL_FALSE;
+ goto cleanup;
+ }
+ cal = obj_cal->clone();
+ } else if (instanceof_function(instance_ce, php_date_get_date_ce() TSRMLS_CC)) {
+ if (intl_datetime_decompose(object, &date, &timeZone, NULL,
+ "datefmt_format_object" TSRMLS_CC) == FAILURE) {
+ RETURN_FALSE;
+ }
+ cal = new GregorianCalendar(Locale::createFromName(locale_str), status);
+ if (U_FAILURE(status)) {
+ intl_error_set(NULL, status,
+ "datefmt_format_object: could not create GregorianCalendar",
+ 0 TSRMLS_CC);
+ RETVAL_FALSE;
+ goto cleanup;
+ }
+ } else {
+ intl_error_set(NULL, status, "datefmt_format_object: the passed object "
+ "must be an instance of either IntlCalendar or DateTime",
+ 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (pattern) {
+ df = new SimpleDateFormat(
+ UnicodeString(Z_STRVAL_PP(format), Z_STRLEN_PP(format),
+ UnicodeString::kInvariant),
+ Locale::createFromName(locale_str),
+ status);
+
+ if (U_FAILURE(status)) {
+ intl_error_set(NULL, status,
+ "datefmt_format_object: could not create SimpleDateFormat",
+ 0 TSRMLS_CC);
+ RETVAL_FALSE;
+ goto cleanup;
+ }
+ } else {
+ df = DateFormat::createDateTimeInstance(dateStyle, timeStyle,
+ Locale::createFromName(locale_str));
+
+ if (df == NULL) { /* according to ICU sources, this should never happen */
+ intl_error_set(NULL, status,
+ "datefmt_format_object: could not create DateFormat",
+ 0 TSRMLS_CC);
+ RETVAL_FALSE;
+ goto cleanup;
+ }
+ }
+
+ //must be in this order (or have the cal adopt the tz)
+ df->adoptCalendar(cal);
+ cal = NULL;
+ df->adoptTimeZone(timeZone);
+ timeZone = NULL;
+
+ {
+ UnicodeString result = UnicodeString();
+ df->format(date, result);
+
+ Z_TYPE_P(return_value) = IS_STRING;
+ if (intl_charFromString(result, &Z_STRVAL_P(return_value),
+ &Z_STRLEN_P(return_value), &status) == FAILURE) {
+ intl_error_set(NULL, status,
+ "datefmt_format_object: error converting result to UTF-8",
+ 0 TSRMLS_CC);
+ RETVAL_FALSE;
+ goto cleanup;
+ }
+ }
+
+
+cleanup:
+ delete df;
+ delete timeZone;
+ delete cal;
+}
diff --git a/ext/intl/dateformat/dateformat_format_object.h b/ext/intl/dateformat/dateformat_format_object.h
new file mode 100644
index 000000000..d80ea87e0
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_format_object.h
@@ -0,0 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#include <php.h>
+
+PHP_FUNCTION(datefmt_format_object);
diff --git a/ext/intl/dateformat/dateformat_helpers.cpp b/ext/intl/dateformat/dateformat_helpers.cpp
new file mode 100644
index 000000000..74758bbec
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -0,0 +1,106 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "../intl_cppshims.h"
+
+#include <unicode/calendar.h>
+#include <unicode/gregocal.h>
+
+#include "dateformat_helpers.h"
+
+extern "C" {
+#include "../php_intl.h"
+#include <Zend/zend_operators.h>
+#define USE_CALENDAR_POINTER 1
+#include "../calendar/calendar_class.h"
+}
+
+int datefmt_process_calendar_arg(zval* calendar_zv,
+ Locale const& locale,
+ const char *func_name,
+ intl_error *err,
+ Calendar*& cal,
+ long& cal_int_type,
+ bool& calendar_owned TSRMLS_DC)
+{
+ char *msg;
+ UErrorCode status = UErrorCode();
+
+ if (calendar_zv == NULL || Z_TYPE_P(calendar_zv) == IS_NULL) {
+
+ // default requested
+ cal = new GregorianCalendar(locale, status);
+ calendar_owned = true;
+
+ cal_int_type = UCAL_GREGORIAN;
+
+ } else if (Z_TYPE_P(calendar_zv) == IS_LONG) {
+
+ long v = Z_LVAL_P(calendar_zv);
+ if (v != (long)UCAL_TRADITIONAL && v != (long)UCAL_GREGORIAN) {
+ spprintf(&msg, 0, "%s: invalid value for calendar type; it must be "
+ "one of IntlDateFormatter::TRADITIONAL (locale's default "
+ "calendar) or IntlDateFormatter::GREGORIAN. "
+ "Alternatively, it can be an IntlCalendar object",
+ func_name);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ return FAILURE;
+ } else if (v == (long)UCAL_TRADITIONAL) {
+ cal = Calendar::createInstance(locale, status);
+ } else { //UCAL_GREGORIAN
+ cal = new GregorianCalendar(locale, status);
+ }
+ calendar_owned = true;
+
+ cal_int_type = Z_LVAL_P(calendar_zv);
+
+ } else if (Z_TYPE_P(calendar_zv) == IS_OBJECT &&
+ instanceof_function_ex(Z_OBJCE_P(calendar_zv),
+ Calendar_ce_ptr, 0 TSRMLS_CC)) {
+
+ cal = calendar_fetch_native_calendar(calendar_zv TSRMLS_CC);
+ if (cal == NULL) {
+ spprintf(&msg, 0, "%s: Found unconstructed IntlCalendar object",
+ func_name);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ return FAILURE;
+ }
+ calendar_owned = false;
+
+ cal_int_type = -1;
+
+ } else {
+ spprintf(&msg, 0, "%s: Invalid calendar argument; should be an integer "
+ "or an IntlCalendar instance", func_name);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ return FAILURE;
+ }
+
+ if (cal == NULL && !U_FAILURE(status)) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ }
+ if (U_FAILURE(status)) {
+ spprintf(&msg, 0, "%s: Failure instantiating calendar", func_name);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ efree(msg);
+ return FAILURE;
+ }
+
+ return SUCCESS;
+}
diff --git a/ext/intl/dateformat/dateformat_helpers.h b/ext/intl/dateformat/dateformat_helpers.h
new file mode 100644
index 000000000..bded0b7d7
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -0,0 +1,39 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef DATEFORMAT_HELPERS_H
+#define DATEFORMAT_HELPERS_H
+
+#ifndef __cplusplus
+#error For C++ only
+#endif
+
+#include <unicode/calendar.h>
+
+extern "C" {
+#include "../php_intl.h"
+}
+
+int datefmt_process_calendar_arg(zval* calendar_zv,
+ Locale const& locale,
+ const char *func_name,
+ intl_error *err,
+ Calendar*& cal,
+ long& cal_int_type,
+ bool& calendar_owned TSRMLS_DC);
+
+#endif /* DATEFORMAT_HELPERS_H */
+
diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c
index 5cb648332..d0671a88b 100644
--- a/ext/intl/formatter/formatter_main.c
+++ b/ext/intl/formatter/formatter_main.c
@@ -56,7 +56,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
if(locale_len == 0) {
- locale = INTL_G(default_locale);
+ locale = intl_locale_get_default(TSRMLS_C);
}
/* Create an ICU number formatter. */
diff --git a/ext/intl/grapheme/grapheme.h b/ext/intl/grapheme/grapheme.h
index c0e697ac1..756ce9173 100644
--- a/ext/intl/grapheme/grapheme.h
+++ b/ext/intl/grapheme/grapheme.h
@@ -19,7 +19,6 @@
#include <php.h>
#include <unicode/utypes.h>
-#include <unicode/ubrk.h>
PHP_FUNCTION(grapheme_strlen);
PHP_FUNCTION(grapheme_strpos);
diff --git a/ext/intl/intl_convertcpp.cpp b/ext/intl/intl_convertcpp.cpp
new file mode 100644
index 000000000..f699a3c61
--- /dev/null
+++ b/ext/intl/intl_convertcpp.cpp
@@ -0,0 +1,89 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#include "intl_cppshims.h"
+
+#include "intl_convertcpp.h"
+#include <unicode/ustring.h>
+extern "C" {
+#include <php.h>
+}
+
+/* {{{ intl_stringFromChar */
+int intl_stringFromChar(UnicodeString &ret, char *str, int32_t str_len, UErrorCode *status)
+{
+ //the number of UTF-16 code units is not larger than that of UTF-8 code
+ //units, + 1 for the terminator
+ int32_t capacity = str_len + 1;
+
+ //no check necessary -- if NULL will fail ahead
+ UChar *utf16 = ret.getBuffer(capacity);
+ int32_t utf16_len = 0;
+ *status = U_ZERO_ERROR;
+ u_strFromUTF8WithSub(utf16, ret.getCapacity(), &utf16_len,
+ str, str_len, U_SENTINEL /* no substitution */, NULL,
+ status);
+ ret.releaseBuffer(utf16_len);
+ if (U_FAILURE(*status)) {
+ ret.setToBogus();
+ return FAILURE;
+ }
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ intl_charFromString
+ * faster than doing intl_convert_utf16_to_utf8(&res, &res_len,
+ * from.getBuffer(), from.length(), &status),
+ * but consumes more memory */
+int intl_charFromString(const UnicodeString &from, char **res, int *res_len, UErrorCode *status)
+{
+ if (from.isBogus()) {
+ return FAILURE;
+ }
+
+ //the number of UTF-8 code units is not larger than that of UTF-16 code
+ //units * 3 + 1 for the terminator
+ int32_t capacity = from.length() * 3 + 1;
+
+ if (from.isEmpty()) {
+ *res = (char*)emalloc(1);
+ **res = '\0';
+ *res_len = 0;
+ return SUCCESS;
+ }
+
+ *res = (char*)emalloc(capacity);
+ *res_len = 0; //tbd
+
+ const UChar *utf16buf = from.getBuffer();
+ int32_t actual_len;
+ u_strToUTF8WithSub(*res, capacity - 1, &actual_len, utf16buf, from.length(),
+ U_SENTINEL, NULL, status);
+
+ if (U_FAILURE(*status)) {
+ efree(*res);
+ *res = NULL;
+ return FAILURE;
+ }
+ (*res)[actual_len] = '\0';
+ *res_len = (int)actual_len;
+
+ return SUCCESS;
+}
+/* }}} */
diff --git a/ext/intl/intl_convertcpp.h b/ext/intl/intl_convertcpp.h
new file mode 100644
index 000000000..89d4209dd
--- /dev/null
+++ b/ext/intl/intl_convertcpp.h
@@ -0,0 +1,32 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#ifndef INTL_CONVERTCPP_H
+#define INTL_CONVERTCPP_H
+
+#ifndef __cplusplus
+#error Should be included only in C++ Files
+#endif
+
+#include <unicode/unistr.h>
+
+int intl_stringFromChar(UnicodeString &ret, char *str, int32_t str_len, UErrorCode *status);
+
+int intl_charFromString(const UnicodeString &from, char **res, int *res_len, UErrorCode *status);
+
+#endif /* INTL_CONVERTCPP_H */
diff --git a/ext/intl/intl_cppshims.h b/ext/intl/intl_cppshims.h
new file mode 100644
index 000000000..2fb70edfd
--- /dev/null
+++ b/ext/intl/intl_cppshims.h
@@ -0,0 +1,34 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef INTL_CPPSHIMS_H
+#define INTL_CPPSHIMS_H
+
+#ifndef __cplusplus
+#error For inclusion form C++ files only
+#endif
+
+#ifdef _MSC_VER
+//This is only required for old versions of ICU only
+#include <stdio.h>
+
+#include <math.h>
+
+/* avoid redefinition of int8_t, also defined in unicode/pwin32.h */
+#define _MSC_STDINT_H_ 1
+#endif
+
+#endif \ No newline at end of file
diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c
index 9c2e13dfd..99b1c6001 100644
--- a/ext/intl/intl_error.c
+++ b/ext/intl/intl_error.c
@@ -21,12 +21,16 @@
#endif
#include <php.h>
+#include <zend_exceptions.h>
#include "php_intl.h"
#include "intl_error.h"
+#include "intl_convert.h"
ZEND_EXTERN_MODULE_GLOBALS( intl )
+static zend_class_entry *IntlException_ce_ptr;
+
/* {{{ intl_error* intl_g_error_get()
* Return global error structure.
*/
@@ -102,8 +106,11 @@ void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_D
if( !msg )
return;
- if(!err && INTL_G(error_level)) {
- php_error_docref(NULL TSRMLS_CC, INTL_G(error_level), "%s", msg);
+ if( !err ) {
+ if( INTL_G( error_level ) )
+ php_error_docref( NULL TSRMLS_CC, INTL_G( error_level ), "%s", msg );
+ if( INTL_G( use_exceptions ) )
+ zend_throw_exception_ex( IntlException_ce_ptr, 0 TSRMLS_CC, "%s", msg );
}
if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) )
return;
@@ -223,6 +230,96 @@ void intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC )
}
/* }}} */
+void intl_register_IntlException_class( TSRMLS_D )
+{
+ zend_class_entry ce,
+ *default_exception_ce;
+
+ default_exception_ce = zend_exception_get_default( TSRMLS_C );
+
+ /* Create and register 'IntlException' class. */
+ INIT_CLASS_ENTRY_EX( ce, "IntlException", sizeof( "IntlException" ) - 1, NULL );
+ IntlException_ce_ptr = zend_register_internal_class_ex( &ce,
+ default_exception_ce, NULL TSRMLS_CC );
+ IntlException_ce_ptr->create_object = default_exception_ce->create_object;
+}
+
+smart_str intl_parse_error_to_string( UParseError* pe )
+{
+ smart_str ret = {0};
+ char *buf;
+ int u8len;
+ UErrorCode status;
+ int any = 0;
+
+ assert( pe != NULL );
+
+ smart_str_appends( &ret, "parse error " );
+ if( pe->line > 0 )
+ {
+ smart_str_appends( &ret, "on line " );
+ smart_str_append_long( &ret, (long ) pe->line );
+ any = 1;
+ }
+ if( pe->offset >= 0 ) {
+ if( any )
+ smart_str_appends( &ret, ", " );
+ else
+ smart_str_appends( &ret, "at " );
+
+ smart_str_appends( &ret, "offset " );
+ smart_str_append_long( &ret, (long ) pe->offset );
+ any = 1;
+ }
+
+ if (pe->preContext[0] != 0 ) {
+ if( any )
+ smart_str_appends( &ret, ", " );
+
+ smart_str_appends( &ret, "after \"" );
+ intl_convert_utf16_to_utf8( &buf, &u8len, pe->preContext, -1, &status );
+ if( U_FAILURE( status ) )
+ {
+ smart_str_appends( &ret, "(could not convert parser error pre-context to UTF-8)" );
+ }
+ else {
+ smart_str_appendl( &ret, buf, u8len );
+ efree( buf );
+ }
+ smart_str_appends( &ret, "\"" );
+ any = 1;
+ }
+
+ if( pe->postContext[0] != 0 )
+ {
+ if( any )
+ smart_str_appends( &ret, ", " );
+
+ smart_str_appends( &ret, "before or at \"" );
+ intl_convert_utf16_to_utf8( &buf, &u8len, pe->postContext, -1, &status );
+ if( U_FAILURE( status ) )
+ {
+ smart_str_appends( &ret, "(could not convert parser error post-context to UTF-8)" );
+ }
+ else
+ {
+ smart_str_appendl( &ret, buf, u8len );
+ efree( buf );
+ }
+ smart_str_appends( &ret, "\"" );
+ any = 1;
+ }
+
+ if( !any )
+ {
+ smart_str_free( &ret );
+ smart_str_appends( &ret, "no parse error" );
+ }
+
+ smart_str_0( &ret );
+ return ret;
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/intl/intl_error.h b/ext/intl/intl_error.h
index 3adae8547..4d8eb7932 100644
--- a/ext/intl/intl_error.h
+++ b/ext/intl/intl_error.h
@@ -20,6 +20,8 @@
#define INTL_ERROR_H
#include <unicode/utypes.h>
+#include <unicode/parseerr.h>
+#include <ext/standard/php_smart_str.h>
#define INTL_ERROR_CODE(e) (e).code
@@ -44,4 +46,10 @@ void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg
void intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC );
void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC );
+// Other error helpers
+smart_str intl_parse_error_to_string( UParseError* pe );
+
+// exported to be called on extension MINIT
+void intl_register_IntlException_class( TSRMLS_D );
+
#endif // INTL_ERROR_H
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 1707c69f9..d1a86d8ee 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -208,10 +208,7 @@ static int getSingletonPos(char* str)
Get default locale */
PHP_NAMED_FUNCTION(zif_locale_get_default)
{
- if( INTL_G(default_locale) == NULL ) {
- INTL_G(default_locale) = pestrdup( uloc_getDefault(), 1);
- }
- RETURN_STRING( INTL_G(default_locale), TRUE );
+ RETURN_STRING( intl_locale_get_default( TSRMLS_C ), TRUE );
}
/* }}} */
@@ -393,7 +390,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
/* Call ICU get */
@@ -499,7 +496,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
if( strcmp(tag_name, DISP_NAME) != 0 ){
@@ -521,7 +518,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
/* Check if disp_loc_name passed , if not use default locale */
if( !disp_loc_name){
- disp_loc_name = estrdup(INTL_G(default_locale));
+ disp_loc_name = estrdup(intl_locale_get_default(TSRMLS_C));
free_loc_name = 1;
}
@@ -693,7 +690,7 @@ PHP_FUNCTION( locale_get_keywords )
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
/* Get the keywords */
@@ -1100,7 +1097,7 @@ PHP_FUNCTION(locale_parse)
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
array_init( return_value );
@@ -1148,7 +1145,7 @@ PHP_FUNCTION(locale_get_all_variants)
}
if(loc_name_len == 0) {
- loc_name = INTL_G(default_locale);
+ loc_name = intl_locale_get_default(TSRMLS_C);
}
@@ -1254,7 +1251,7 @@ PHP_FUNCTION(locale_filter_matches)
}
if(loc_range_len == 0) {
- loc_range = INTL_G(default_locale);
+ loc_range = intl_locale_get_default(TSRMLS_C);
}
if( strcmp(loc_range,"*")==0){
@@ -1540,7 +1537,7 @@ PHP_FUNCTION(locale_lookup)
}
if(loc_range_len == 0) {
- loc_range = INTL_G(default_locale);
+ loc_range = intl_locale_get_default(TSRMLS_C);
}
hash_arr = HASH_OF(arr);
diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c
index e3fb9425a..6a9f04f32 100644
--- a/ext/intl/msgformat/msgformat.c
+++ b/ext/intl/msgformat/msgformat.c
@@ -61,7 +61,7 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
if(locale_len == 0) {
- locale = INTL_G(default_locale);
+ locale = intl_locale_get_default(TSRMLS_C);
}
#ifdef MSG_FORMAT_QUOTE_APOS
diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c
index ed2dae27d..c333a24ee 100644
--- a/ext/intl/msgformat/msgformat_attr.c
+++ b/ext/intl/msgformat/msgformat_attr.c
@@ -102,6 +102,12 @@ PHP_FUNCTION( msgfmt_set_pattern )
}
mfo->mf_data.orig_format = estrndup(value, value_len);
mfo->mf_data.orig_format_len = value_len;
+ /* invalidate cached format types */
+ if (mfo->mf_data.arg_types) {
+ zend_hash_destroy(mfo->mf_data.arg_types);
+ efree(mfo->mf_data.arg_types);
+ mfo->mf_data.arg_types = NULL;
+ }
RETURN_TRUE;
}
diff --git a/ext/intl/msgformat/msgformat_data.c b/ext/intl/msgformat/msgformat_data.c
index 527c1d4d1..5d4905447 100644
--- a/ext/intl/msgformat/msgformat_data.c
+++ b/ext/intl/msgformat/msgformat_data.c
@@ -31,8 +31,10 @@ void msgformat_data_init( msgformat_data* mf_data TSRMLS_DC )
if( !mf_data )
return;
- mf_data->umsgf = NULL;
- mf_data->orig_format = NULL;
+ mf_data->umsgf = NULL;
+ mf_data->orig_format = NULL;
+ mf_data->arg_types = NULL;
+ mf_data->tz_set = 0;
intl_error_reset( &mf_data->error TSRMLS_CC );
}
/* }}} */
@@ -40,21 +42,27 @@ void msgformat_data_init( msgformat_data* mf_data TSRMLS_DC )
/* {{{ void msgformat_data_free( msgformat_data* mf_data )
* Clean up memory allocated for msgformat_data
*/
-void msgformat_data_free( msgformat_data* mf_data TSRMLS_DC )
+void msgformat_data_free(msgformat_data* mf_data TSRMLS_DC)
{
- if( !mf_data )
+ if (!mf_data)
return;
- if( mf_data->umsgf )
- umsg_close( mf_data->umsgf );
+ if (mf_data->umsgf)
+ umsg_close(mf_data->umsgf);
- if(mf_data->orig_format) {
+ if (mf_data->orig_format) {
efree(mf_data->orig_format);
mf_data->orig_format = NULL;
}
+ if (mf_data->arg_types) {
+ zend_hash_destroy(mf_data->arg_types);
+ efree(mf_data->arg_types);
+ mf_data->arg_types = NULL;
+ }
+
mf_data->umsgf = NULL;
- intl_error_reset( &mf_data->error TSRMLS_CC );
+ intl_error_reset(&mf_data->error TSRMLS_CC);
}
/* }}} */
diff --git a/ext/intl/msgformat/msgformat_data.h b/ext/intl/msgformat/msgformat_data.h
index 6479888f8..51d7687a3 100644
--- a/ext/intl/msgformat/msgformat_data.h
+++ b/ext/intl/msgformat/msgformat_data.h
@@ -31,6 +31,8 @@ typedef struct {
UMessageFormat* umsgf;
char* orig_format;
ulong orig_format_len;
+ HashTable* arg_types;
+ int tz_set; /* if we've already the time zone in sub-formats */
} msgformat_data;
msgformat_data* msgformat_data_create( TSRMLS_D );
diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c
index 9a18ac0a7..4b81cfe2b 100644
--- a/ext/intl/msgformat/msgformat_format.c
+++ b/ext/intl/msgformat/msgformat_format.c
@@ -32,51 +32,34 @@
#endif
/* {{{ */
-static void msgfmt_do_format(MessageFormatter_object *mfo, zval *args, zval *return_value TSRMLS_DC)
+static void msgfmt_do_format(MessageFormatter_object *mfo, zval *args, zval *return_value TSRMLS_DC)
{
- zval **fargs;
int count;
UChar* formatted = NULL;
int formatted_len = 0;
- HashPosition pos;
- int i;
+ HashTable *args_copy;
count = zend_hash_num_elements(Z_ARRVAL_P(args));
- if(count < umsg_format_arg_count(MSG_FORMAT_OBJECT(mfo))) {
- /* Not enough aguments for format! */
- intl_error_set( INTL_DATA_ERROR_P(mfo), U_ILLEGAL_ARGUMENT_ERROR,
- "msgfmt_format: not enough parameters", 0 TSRMLS_CC );
- RETVAL_FALSE;
- return;
- }
-
- fargs = safe_emalloc(count, sizeof(zval *), 0);
+ ALLOC_HASHTABLE(args_copy);
+ zend_hash_init(args_copy, count, NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_copy(args_copy, Z_ARRVAL_P(args), (copy_ctor_func_t)zval_add_ref,
+ NULL, sizeof(zval*));
- zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(args), &pos);
- for(i=0;i<count;i++) {
- zval **val;
- zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void **)&val, &pos);
- fargs[i] = *val;
- Z_ADDREF_P(fargs[i]);
- /* TODO: needs refcount increase here? */
- zend_hash_move_forward_ex(Z_ARRVAL_P(args), &pos);
- }
+ umsg_format_helper(mfo, args_copy, &formatted, &formatted_len TSRMLS_CC);
- umsg_format_helper(MSG_FORMAT_OBJECT(mfo), count, fargs, &formatted, &formatted_len, &INTL_DATA_ERROR_CODE(mfo) TSRMLS_CC);
-
- for(i=0;i<count;i++) {
- zval_ptr_dtor(&fargs[i]);
- }
+ zend_hash_destroy(args_copy);
+ efree(args_copy);
- efree(fargs);
-
- if (formatted && U_FAILURE( INTL_DATA_ERROR_CODE(mfo) ) ) {
+ if (formatted && U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) {
efree(formatted);
}
- INTL_METHOD_CHECK_STATUS( mfo, "Number formatting failed" );
- INTL_METHOD_RETVAL_UTF8( mfo, formatted, formatted_len, 1 );
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) {
+ RETURN_FALSE;
+ } else {
+ INTL_METHOD_RETVAL_UTF8(mfo, formatted, formatted_len, 1);
+ }
}
/* }}} */
@@ -151,7 +134,7 @@ PHP_FUNCTION( msgfmt_format_message )
}
if(slocale_len == 0) {
- slocale = INTL_G(default_locale);
+ slocale = intl_locale_get_default(TSRMLS_C);
}
#ifdef MSG_FORMAT_QUOTE_APOS
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp
index 1895de2c8..9ee1cdcfb 100644
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -18,9 +18,20 @@
#include "config.h"
#endif
-#include <math.h>
+#include "../intl_cppshims.h"
+
+#include <limits.h>
#include <unicode/msgfmt.h>
#include <unicode/chariter.h>
+#include <unicode/ustdio.h>
+#include <unicode/timezone.h>
+#include <unicode/datefmt.h>
+#include <unicode/calendar.h>
+
+#include <vector>
+
+#include "../intl_convertcpp.h"
+#include "../common/common_date.h"
extern "C" {
#include "php_intl.h"
@@ -28,8 +39,14 @@ extern "C" {
#include "msgformat_format.h"
#include "msgformat_helpers.h"
#include "intl_convert.h"
+#define USE_TIMEZONE_POINTER
+#include "../timezone/timezone_class.h"
}
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+#define HAS_MESSAGE_PATTERN 1
+#endif
+
U_NAMESPACE_BEGIN
/**
* This class isolates our access to private internal methods of
@@ -40,96 +57,578 @@ class MessageFormatAdapter {
public:
static const Formattable::Type* getArgTypeList(const MessageFormat& m,
int32_t& count);
+#ifdef HAS_MESSAGE_PATTERN
+ static const MessagePattern getMessagePattern(MessageFormat* m);
+#endif
};
+
const Formattable::Type*
MessageFormatAdapter::getArgTypeList(const MessageFormat& m,
int32_t& count) {
return m.getArgTypeList(count);
}
+
+#ifdef HAS_MESSAGE_PATTERN
+const MessagePattern
+MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
+ return m->msgPattern;
+}
+#endif
U_NAMESPACE_END
-U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
+U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
{
int32_t fmt_count = 0;
MessageFormatAdapter::getArgTypeList(*(const MessageFormat*)fmt, fmt_count);
return fmt_count;
}
-U_CFUNC void umsg_format_helper(UMessageFormat *fmt, int arg_count, zval **args, UChar **formatted, int *formatted_len, UErrorCode *status TSRMLS_DC)
+static HashTable *umsg_get_numeric_types(MessageFormatter_object *mfo,
+ intl_error& err TSRMLS_DC)
{
- int fmt_count = 0;
- const Formattable::Type* argTypes =
- MessageFormatAdapter::getArgTypeList(*(const MessageFormat*)fmt, fmt_count);
- Formattable* fargs = new Formattable[fmt_count ? fmt_count : 1];
+ HashTable *ret;
+ int32_t parts_count;
- for(int32_t i = 0; i < fmt_count; ++i) {
- UChar *stringVal = NULL;
- int stringLen = 0;
- int64_t tInt64 = 0;
+ if (U_FAILURE(err.code)) {
+ return NULL;
+ }
- switch(argTypes[i]) {
- case Formattable::kDate:
- convert_to_long_ex(&args[i]);
- fargs[i].setDate(U_MILLIS_PER_SECOND * (double)Z_LVAL_P(args[i]));
- break;
+ if (mfo->mf_data.arg_types) {
+ /* already cached */
+ return mfo->mf_data.arg_types;
+ }
- case Formattable::kDouble:
- convert_to_double_ex(&args[i]);
- fargs[i].setDouble(Z_DVAL_P(args[i]));
- break;
-
- case Formattable::kLong:
- convert_to_long_ex(&args[i]);
- fargs[i].setLong(Z_LVAL_P(args[i]));
- break;
+ const Formattable::Type *types = MessageFormatAdapter::getArgTypeList(
+ *(MessageFormat*)mfo->mf_data.umsgf, parts_count);
+
+ /* Hash table will store Formattable::Type objects directly,
+ * so no need for destructor */
+ ALLOC_HASHTABLE(ret);
+ zend_hash_init(ret, parts_count, NULL, NULL, 0);
+
+ for (int i = 0; i < parts_count; i++) {
+ const Formattable::Type t = types[i];
+ if (zend_hash_index_update(ret, (ulong)i, (void*)&t, sizeof(t), NULL)
+ == FAILURE) {
+ intl_errors_set(&err, U_MEMORY_ALLOCATION_ERROR,
+ "Write to argument types hash table failed", 0 TSRMLS_CC);
+ break;
+ }
+ }
+
+ if (U_FAILURE(err.code)) {
+ zend_hash_destroy(ret);
+ efree(ret);
+
+ return NULL;
+ }
+
+ mfo->mf_data.arg_types = ret;
- case Formattable::kInt64:
- if(Z_TYPE_P(args[i]) == IS_DOUBLE) {
- tInt64 = (int64_t)Z_DVAL_P(args[i]);
- } else if(Z_TYPE_P(args[i]) == IS_LONG) {
- tInt64 = (int64_t)Z_LVAL_P(args[i]);
+ return ret;
+}
+
+#ifdef HAS_MESSAGE_PATTERN
+static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
+ const MessagePattern& mp,
+ intl_error& err TSRMLS_DC)
+{
+ HashTable *ret;
+ int32_t parts_count;
+
+ if (U_FAILURE(err.code)) {
+ return NULL;
+ }
+
+ if (!((MessageFormat *)mfo->mf_data.umsgf)->usesNamedArguments()) {
+ return umsg_get_numeric_types(mfo, err TSRMLS_CC);
+ }
+
+ if (mfo->mf_data.arg_types) {
+ /* already cached */
+ return mfo->mf_data.arg_types;
+ }
+
+ /* Hash table will store Formattable::Type objects directly,
+ * so no need for destructor */
+ ALLOC_HASHTABLE(ret);
+ zend_hash_init(ret, 32, NULL, NULL, 0);
+
+ parts_count = mp.countParts();
+
+ // See MessageFormat::cacheExplicitFormats()
+ /*
+ * Looking through the pattern, go to each arg_start part type.
+ * The arg-typeof that tells us the argument type (simple, complicated)
+ * then the next part is either the arg_name or arg number
+ * and then if it's simple after that there could be a part-type=arg-type
+ * while substring will tell us number, spellout, etc.
+ * If the next thing isn't an arg-type then assume string.
+ */
+ /* The last two "parts" can at most be ARG_LIMIT and MSG_LIMIT
+ * which we need not examine. */
+ for (int32_t i = 0; i < parts_count - 2 && U_SUCCESS(err.code); i++) {
+ MessagePattern::Part p = mp.getPart(i);
+
+ if (p.getType() != UMSGPAT_PART_TYPE_ARG_START) {
+ continue;
+ }
+
+ MessagePattern::Part name_part = mp.getPart(++i); /* Getting name, advancing i */
+ Formattable::Type type,
+ *storedType;
+
+ if (name_part.getType() == UMSGPAT_PART_TYPE_ARG_NAME) {
+ UnicodeString argName = mp.getSubstring(name_part);
+ if (zend_hash_find(ret, (char*)argName.getBuffer(), argName.length(),
+ (void**)&storedType) == FAILURE) {
+ /* not found already; create new entry in HT */
+ Formattable::Type bogusType = Formattable::kObject;
+ if (zend_hash_update(ret, (char*)argName.getBuffer(), argName.length(),
+ (void*)&bogusType, sizeof(bogusType), (void**)&storedType) == FAILURE) {
+ intl_errors_set(&err, U_MEMORY_ALLOCATION_ERROR,
+ "Write to argument types hash table failed", 0 TSRMLS_CC);
+ continue;
+ }
+ }
+ } else if (name_part.getType() == UMSGPAT_PART_TYPE_ARG_NUMBER) {
+ int32_t argNumber = name_part.getValue();
+ if (argNumber < 0) {
+ intl_errors_set(&err, U_INVALID_FORMAT_ERROR,
+ "Found part with negative number", 0 TSRMLS_CC);
+ continue;
+ }
+ if (zend_hash_index_find(ret, (ulong)argNumber, (void**)&storedType)
+ == FAILURE) {
+ /* not found already; create new entry in HT */
+ Formattable::Type bogusType = Formattable::kObject;
+ if (zend_hash_index_update(ret, (ulong)argNumber, (void*)&bogusType,
+ sizeof(bogusType), (void**)&storedType) == FAILURE) {
+ intl_errors_set(&err, U_MEMORY_ALLOCATION_ERROR,
+ "Write to argument types hash table failed", 0 TSRMLS_CC);
+ continue;
+ }
+ }
+ }
+
+ UMessagePatternArgType argType = p.getArgType();
+ /* No type specified, treat it as a string */
+ if (argType == UMSGPAT_ARG_TYPE_NONE) {
+ type = Formattable::kString;
+ } else { /* Some type was specified, might be simple or complicated */
+ if (argType == UMSGPAT_ARG_TYPE_SIMPLE) {
+ /* For a SIMPLE arg, after the name part, there should be
+ * an ARG_TYPE part whose string value tells us what to do */
+ MessagePattern::Part type_part = mp.getPart(++i); /* Getting type, advancing i */
+ if (type_part.getType() == UMSGPAT_PART_TYPE_ARG_TYPE) {
+ UnicodeString typeString = mp.getSubstring(type_part);
+ /* This is all based on the rules in the docs for MessageFormat
+ * @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */
+ if (typeString == "number") {
+ MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */
+ if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) {
+ UnicodeString styleString = mp.getSubstring(style_part);
+ if (styleString == "integer") {
+ type = Formattable::kInt64;
+ } else if (styleString == "currency") {
+ type = Formattable::kDouble;
+ } else if (styleString == "percent") {
+ type = Formattable::kDouble;
+ } else { /* some style invalid/unknown to us */
+ type = Formattable::kDouble;
+ }
+ } else { // if missing style, part, make it a double
+ type = Formattable::kDouble;
+ }
+ } else if ((typeString == "date") || (typeString == "time")) {
+ type = Formattable::kDate;
+ } else if ((typeString == "spellout") || (typeString == "ordinal")
+ || (typeString == "duration")) {
+ type = Formattable::kDouble;
+ }
} else {
- SEPARATE_ZVAL_IF_NOT_REF(&args[i]);
- convert_scalar_to_number( args[i] TSRMLS_CC );
- tInt64 = (Z_TYPE_P(args[i]) == IS_DOUBLE)?(int64_t)Z_DVAL_P(args[i]):Z_LVAL_P(args[i]);
+ /* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a
+ * UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern
+ * is broken. */
+ intl_errors_set(&err, U_PARSE_ERROR,
+ "Expected UMSGPAT_PART_TYPE_ARG_TYPE part following "
+ "UMSGPAT_ARG_TYPE_SIMPLE part", 0 TSRMLS_CC);
+ continue;
+ }
+ } else if (argType == UMSGPAT_ARG_TYPE_PLURAL) {
+ type = Formattable::kDouble;
+ } else if (argType == UMSGPAT_ARG_TYPE_CHOICE) {
+ type = Formattable::kDouble;
+ } else if (argType == UMSGPAT_ARG_TYPE_SELECT) {
+ type = Formattable::kString;
+ } else {
+ type = Formattable::kString;
+ }
+ } /* was type specified? */
+
+ /* We found a different type for the same arg! */
+ if (*storedType != Formattable::kObject && *storedType != type) {
+ intl_errors_set(&err, U_ARGUMENT_TYPE_MISMATCH,
+ "Inconsistent types declared for an argument", 0 TSRMLS_CC);
+ continue;
+ }
+
+ *storedType = type;
+ } /* visiting each part */
+
+ if (U_FAILURE(err.code)) {
+ zend_hash_destroy(ret);
+ efree(ret);
+
+ return NULL;
+ }
+
+ mfo->mf_data.arg_types = ret;
+
+ return ret;
+}
+#endif
+
+static HashTable *umsg_get_types(MessageFormatter_object *mfo,
+ intl_error& err TSRMLS_DC)
+{
+ MessageFormat *mf = (MessageFormat *)mfo->mf_data.umsgf;
+
+#ifdef HAS_MESSAGE_PATTERN
+ const MessagePattern mp = MessageFormatAdapter::getMessagePattern(mf);
+
+ return umsg_parse_format(mfo, mp, err TSRMLS_CC);
+#else
+ if (mf->usesNamedArguments()) {
+ intl_errors_set(&err, U_UNSUPPORTED_ERROR,
+ "This extension supports named arguments only on ICU 4.8+",
+ 0 TSRMLS_CC);
+ return NULL;
+ }
+ return umsg_get_numeric_types(mfo, err TSRMLS_CC);
+#endif
+}
+
+static void umsg_set_timezone(MessageFormatter_object *mfo,
+ intl_error& err TSRMLS_DC)
+{
+ MessageFormat *mf = (MessageFormat *)mfo->mf_data.umsgf;
+ TimeZone *used_tz = NULL;
+ const Format **formats;
+ int32_t count;
+
+ /* Unfortanely, this cannot change the time zone for arguments that
+ * appear inside complex formats because ::getFormats() returns NULL
+ * for all uncached formats, which is the case for complex formats
+ * unless they were set via one of the ::setFormat() methods */
+
+ if (mfo->mf_data.tz_set) {
+ return; /* already done */
+ }
+
+ formats = mf->getFormats(count);
+
+ if (formats == NULL) {
+ intl_errors_set(&err, U_MEMORY_ALLOCATION_ERROR,
+ "Out of memory retrieving subformats", 0 TSRMLS_CC);
+ }
+
+ for (int i = 0; U_SUCCESS(err.code) && i < count; i++) {
+ DateFormat* df = dynamic_cast<DateFormat*>(
+ const_cast<Format *>(formats[i]));
+ if (df == NULL) {
+ continue;
+ }
+
+ if (used_tz == NULL) {
+ zval nullzv = zval_used_for_init,
+ *zvptr = &nullzv;
+ used_tz = timezone_process_timezone_argument(&zvptr, &err,
+ "msgfmt_format" TSRMLS_CC);
+ if (used_tz == NULL) {
+ continue;
+ }
+ }
+
+ df->setTimeZone(*used_tz);
+ }
+
+ if (U_SUCCESS(err.code)) {
+ mfo->mf_data.tz_set = 1;
+ }
+}
+
+U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
+ HashTable *args,
+ UChar **formatted,
+ int *formatted_len TSRMLS_DC)
+{
+ int arg_count = zend_hash_num_elements(args);
+ std::vector<Formattable> fargs;
+ std::vector<UnicodeString> farg_names;
+ MessageFormat *mf = (MessageFormat *)mfo->mf_data.umsgf;
+ HashTable *types;
+ intl_error& err = INTL_DATA_ERROR(mfo);
+
+ if (U_FAILURE(err.code)) {
+ return;
+ }
+
+ types = umsg_get_types(mfo, err TSRMLS_CC);
+
+ umsg_set_timezone(mfo, err TSRMLS_CC);
+
+ fargs.resize(arg_count);
+ farg_names.resize(arg_count);
+
+ int argNum = 0;
+ HashPosition pos;
+ zval **elem;
+
+ // Key related variables
+ int key_type;
+ char *str_index;
+ uint str_len;
+ ulong num_index;
+
+ for (zend_hash_internal_pointer_reset_ex(args, &pos);
+ U_SUCCESS(err.code) &&
+ (key_type = zend_hash_get_current_key_ex(
+ args, &str_index, &str_len, &num_index, 0, &pos),
+ zend_hash_get_current_data_ex(args, (void **)&elem, &pos)
+ ) == SUCCESS;
+ zend_hash_move_forward_ex(args, &pos), argNum++)
+ {
+ Formattable& formattable = fargs[argNum];
+ UnicodeString& key = farg_names[argNum];
+ Formattable::Type argType = Formattable::kObject, //unknown
+ *storedArgType = NULL;
+
+ /* Process key and retrieve type */
+ if (key_type == HASH_KEY_IS_LONG) {
+ /* includes case where index < 0 because it's exposed as unsigned */
+ if (num_index > (ulong)INT32_MAX) {
+ intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR,
+ "Found negative or too large array key", 0 TSRMLS_CC);
+ continue;
+ }
+
+ UChar temp[16];
+ int32_t len = u_sprintf(temp, "%u", (uint32_t)num_index);
+ key.append(temp, len);
+
+ zend_hash_index_find(types, (ulong)num_index, (void**)&storedArgType);
+ } else { //string; assumed to be in UTF-8
+ intl_stringFromChar(key, str_index, str_len-1, &err.code);
+
+ if (U_FAILURE(err.code)) {
+ char *message;
+ spprintf(&message, 0,
+ "Invalid UTF-8 data in argument key: '%s'", str_index);
+ intl_errors_set(&err, err.code, message, 1 TSRMLS_CC);
+ efree(message);
+ continue;
+ }
+
+ zend_hash_find(types, (char*)key.getBuffer(), key.length(),
+ (void**)&storedArgType);
+ }
+
+ if (storedArgType != NULL) {
+ argType = *storedArgType;
+ }
+
+ /* Convert zval to formattable according to message format type
+ * or (as a fallback) the zval type */
+ if (argType != Formattable::kObject) {
+ switch (argType) {
+ case Formattable::kString:
+ {
+ string_arg:
+ /* This implicitly converts objects
+ * Note that our vectors will leak if object conversion fails
+ * and PHP ends up with a fatal error and calls longjmp
+ * as a result of that.
+ */
+ convert_to_string_ex(elem);
+
+ UnicodeString *text = new UnicodeString();
+ intl_stringFromChar(*text,
+ Z_STRVAL_PP(elem), Z_STRLEN_PP(elem), &err.code);
+
+ if (U_FAILURE(err.code)) {
+ char *message;
+ spprintf(&message, 0, "Invalid UTF-8 data in string argument: "
+ "'%s'", Z_STRVAL_PP(elem));
+ intl_errors_set(&err, err.code, message, 1 TSRMLS_CC);
+ efree(message);
+ delete text;
+ continue;
+ }
+ formattable.adoptString(text);
+ break;
}
- fargs[i].setInt64(tInt64);
+ case Formattable::kDouble:
+ {
+ double d;
+ if (Z_TYPE_PP(elem) == IS_DOUBLE) {
+ d = Z_DVAL_PP(elem);
+ } else if (Z_TYPE_PP(elem) == IS_LONG) {
+ d = (double)Z_LVAL_PP(elem);
+ } else {
+ SEPARATE_ZVAL_IF_NOT_REF(elem);
+ convert_scalar_to_number(*elem TSRMLS_CC);
+ d = (Z_TYPE_PP(elem) == IS_DOUBLE)
+ ? Z_DVAL_PP(elem)
+ : (double)Z_LVAL_PP(elem);
+ }
+ formattable.setDouble(d);
+ break;
+ }
+ case Formattable::kLong:
+ {
+ int32_t tInt32;
+retry_klong:
+ if (Z_TYPE_PP(elem) == IS_DOUBLE) {
+ if (Z_DVAL_PP(elem) > (double)INT32_MAX ||
+ Z_DVAL_PP(elem) < (double)INT32_MIN) {
+ intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR,
+ "Found PHP float with absolute value too large for "
+ "32 bit integer argument", 0 TSRMLS_CC);
+ } else {
+ tInt32 = (int32_t)Z_DVAL_PP(elem);
+ }
+ } else if (Z_TYPE_PP(elem) == IS_LONG) {
+ if (Z_LVAL_PP(elem) > INT32_MAX ||
+ Z_LVAL_PP(elem) < INT32_MIN) {
+ intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR,
+ "Found PHP integer with absolute value too large "
+ "for 32 bit integer argument", 0 TSRMLS_CC);
+ } else {
+ tInt32 = (int32_t)Z_LVAL_PP(elem);
+ }
+ } else {
+ SEPARATE_ZVAL_IF_NOT_REF(elem);
+ convert_scalar_to_number(*elem TSRMLS_CC);
+ goto retry_klong;
+ }
+ formattable.setLong(tInt32);
+ break;
+ }
+ case Formattable::kInt64:
+ {
+ int64_t tInt64;
+retry_kint64:
+ if (Z_TYPE_PP(elem) == IS_DOUBLE) {
+ if (Z_DVAL_PP(elem) > (double)U_INT64_MAX ||
+ Z_DVAL_PP(elem) < (double)U_INT64_MIN) {
+ intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR,
+ "Found PHP float with absolute value too large for "
+ "64 bit integer argument", 0 TSRMLS_CC);
+ } else {
+ tInt64 = (int64_t)Z_DVAL_PP(elem);
+ }
+ } else if (Z_TYPE_PP(elem) == IS_LONG) {
+ /* assume long is not wider than 64 bits */
+ tInt64 = (int64_t)Z_LVAL_PP(elem);
+ } else {
+ SEPARATE_ZVAL_IF_NOT_REF(elem);
+ convert_scalar_to_number(*elem TSRMLS_CC);
+ goto retry_kint64;
+ }
+ formattable.setInt64(tInt64);
+ break;
+ }
+ case Formattable::kDate:
+ {
+ double dd = intl_zval_to_millis(*elem, &err, "msgfmt_format" TSRMLS_CC);
+ if (U_FAILURE(err.code)) {
+ char *message, *key_char;
+ int key_len;
+ UErrorCode status = UErrorCode();
+ if (intl_charFromString(key, &key_char, &key_len,
+ &status) == SUCCESS) {
+ spprintf(&message, 0, "The argument for key '%s' "
+ "cannot be used as a date or time", key_char);
+ intl_errors_set(&err, err.code, message, 1 TSRMLS_CC);
+ efree(key_char);
+ efree(message);
+ }
+ continue;
+ }
+ formattable.setDate(dd);
+ break;
+ }
+ default:
+ intl_errors_set(&err, U_ILLEGAL_ARGUMENT_ERROR,
+ "Found unsupported argument type", 0 TSRMLS_CC);
+ break;
+ }
+ } else {
+ /* We couldn't find any information about the argument in the pattern, this
+ * means it's an extra argument. So convert it to a number if it's a number or
+ * bool or null and to a string if it's anything else except arrays . */
+ switch (Z_TYPE_PP(elem)) {
+ case IS_DOUBLE:
+ formattable.setDouble(Z_DVAL_PP(elem));
break;
-
- case Formattable::kString:
- convert_to_string_ex(&args[i]);
- intl_convert_utf8_to_utf16(&stringVal, &stringLen, Z_STRVAL_P(args[i]), Z_STRLEN_P(args[i]), status);
- if(U_FAILURE(*status)){
- delete[] fargs;
- return;
+ case IS_BOOL:
+ convert_to_long_ex(elem);
+ /* Intentional fallthrough */
+ case IS_LONG:
+ formattable.setInt64((int64_t)Z_LVAL_PP(elem));
+ break;
+ case IS_NULL:
+ formattable.setInt64((int64_t)0);
+ break;
+ case IS_STRING:
+ case IS_OBJECT:
+ goto string_arg;
+ default:
+ {
+ char *message, *key_char;
+ int key_len;
+ UErrorCode status = UErrorCode();
+ if (intl_charFromString(key, &key_char, &key_len,
+ &status) == SUCCESS) {
+ spprintf(&message, 0, "No strategy to convert the "
+ "value given for the argument with key '%s' "
+ "is available", key_char);
+ intl_errors_set(&err,
+ U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(key_char);
+ efree(message);
+ }
}
- fargs[i].setString(stringVal);
- efree(stringVal);
- break;
-
- case Formattable::kArray:
- case Formattable::kObject:
- *status = U_UNSUPPORTED_ERROR;
- delete[] fargs;
- return;
- }
+ }
+ }
+ } // visiting each argument
+
+ if (U_FAILURE(err.code)) {
+ return;
}
- UnicodeString resultStr;
- FieldPosition fieldPosition(0);
-
- /* format the message */
- ((const MessageFormat*)fmt)->format(fargs, fmt_count, resultStr, fieldPosition, *status);
+ UnicodeString resultStr;
+ FieldPosition fieldPosition(0);
- delete[] fargs;
+ /* format the message */
+ mf->format(farg_names.empty() ? NULL : &farg_names[0],
+ fargs.empty() ? NULL : &fargs[0], arg_count, resultStr, err.code);
- if(U_FAILURE(*status)){
- return;
- }
+ if (U_FAILURE(err.code)) {
+ intl_errors_set(&err, err.code,
+ "Call to ICU MessageFormat::format() has failed", 0 TSRMLS_CC);
+ return;
+ }
*formatted_len = resultStr.length();
*formatted = eumalloc(*formatted_len+1);
- resultStr.extract(*formatted, *formatted_len+1, *status);
+ resultStr.extract(*formatted, *formatted_len+1, err.code);
+ if (U_FAILURE(err.code)) {
+ intl_errors_set(&err, err.code,
+ "Error copying format() result", 0 TSRMLS_CC);
+ return;
+ }
}
#define cleanup_zvals() for(int j=i;j>=0;j--) { zval_ptr_dtor((*args)+i); }
@@ -154,15 +653,11 @@ U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval ***args, UC
int stmp_len;
ALLOC_INIT_ZVAL((*args)[i]);
-
+
switch(fargs[i].getType()) {
case Formattable::kDate:
aDate = ((double)fargs[i].getDate())/U_MILLIS_PER_SECOND;
- if(aDate > LONG_MAX || aDate < -LONG_MAX) {
- ZVAL_DOUBLE((*args)[i], aDate<0?ceil(aDate):floor(aDate));
- } else {
- ZVAL_LONG((*args)[i], (long)aDate);
- }
+ ZVAL_DOUBLE((*args)[i], aDate);
break;
case Formattable::kDouble:
diff --git a/ext/intl/msgformat/msgformat_helpers.h b/ext/intl/msgformat/msgformat_helpers.h
index 30c7e3930..e6eda087d 100644
--- a/ext/intl/msgformat/msgformat_helpers.h
+++ b/ext/intl/msgformat/msgformat_helpers.h
@@ -17,9 +17,9 @@
#ifndef MSG_FORMAT_HELPERS_H
#define MSG_FORMAT_HELPERS_H
-int32_t umsg_format_arg_count(UMessageFormat *fmt);
-void umsg_format_helper(UMessageFormat *fmt, int arg_count, zval **args,
- UChar **formatted, int *formatted_len, UErrorCode *status TSRMLS_DC);
+int32_t umsg_format_arg_count(UMessageFormat *fmt);
+void umsg_format_helper(MessageFormatter_object *mfo, HashTable *args,
+ UChar **formatted, int *formatted_len TSRMLS_DC);
void umsg_parse_helper(UMessageFormat *fmt, int *count, zval ***args,
UChar *source, int source_len, UErrorCode *status);
#endif // MSG_FORMAT_HELPERS_H
diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c
index f540b1d0c..413d3b1f1 100644
--- a/ext/intl/msgformat/msgformat_parse.c
+++ b/ext/intl/msgformat/msgformat_parse.c
@@ -126,7 +126,7 @@ PHP_FUNCTION( msgfmt_parse_message )
}
if(slocale_len == 0) {
- slocale = INTL_G(default_locale);
+ slocale = intl_locale_get_default(TSRMLS_C);
}
#ifdef MSG_FORMAT_QUOTE_APOS
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index 90e3573c1..d3d477c97 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -41,6 +41,8 @@
#include "formatter/formatter_main.h"
#include "formatter/formatter_parse.h"
+#include "grapheme/grapheme.h"
+
#include "msgformat/msgformat.h"
#include "msgformat/msgformat_class.h"
#include "msgformat/msgformat_attr.h"
@@ -58,7 +60,9 @@
#include "dateformat/dateformat.h"
#include "dateformat/dateformat_class.h"
#include "dateformat/dateformat_attr.h"
+#include "dateformat/dateformat_attrcpp.h"
#include "dateformat/dateformat_format.h"
+#include "dateformat/dateformat_format_object.h"
#include "dateformat/dateformat_parse.h"
#include "dateformat/dateformat_data.h"
@@ -68,6 +72,16 @@
#include "transliterator/transliterator_class.h"
#include "transliterator/transliterator_methods.h"
+#include "timezone/timezone_class.h"
+#include "timezone/timezone_methods.h"
+
+#include "calendar/calendar_class.h"
+#include "calendar/calendar_methods.h"
+#include "calendar/gregoriancalendar_methods.h"
+
+#include "breakiterator/breakiterator_class.h"
+#include "breakiterator/breakiterator_iterators.h"
+
#include "idn/idn.h"
#if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
@@ -79,8 +93,10 @@
#include "msgformat/msgformat.h"
#include "common/common_error.h"
+#include "common/common_enum.h"
#include <unicode/uloc.h>
+#include <unicode/uclean.h>
#include <ext/standard/info.h>
#include "php_ini.h"
@@ -98,6 +114,14 @@
ZEND_DECLARE_MODULE_GLOBALS( intl )
+const char *intl_locale_get_default( TSRMLS_D )
+{
+ if( INTL_G(default_locale) == NULL ) {
+ return uloc_getDefault();
+ }
+ return INTL_G(default_locale);
+}
+
/* {{{ Arguments info */
ZEND_BEGIN_ARG_INFO_EX(collator_static_0_args, 0, 0, 0)
ZEND_END_ARG_INFO()
@@ -313,6 +337,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_pattern, 0, 0, 2)
ZEND_ARG_INFO(0, pattern)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_timezone, 0, 0, 2)
+ ZEND_ARG_INFO(0, mf)
+ ZEND_ARG_INFO(0, timezone)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_calendar, 0, 0, 2)
ZEND_ARG_INFO(0, mf)
ZEND_ARG_INFO(0, calendar)
@@ -323,6 +352,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format, 0, 0, 0)
ZEND_ARG_INFO(0, array)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format_object, 0, 0, 1)
+ ZEND_ARG_INFO(0, object)
+ ZEND_ARG_INFO(0, format)
+ ZEND_ARG_INFO(0, locale)
+ZEND_END_ARG_INFO()
+
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_create, 0, 0, 3)
ZEND_ARG_INFO(0, locale)
ZEND_ARG_INFO(0, date_type)
@@ -402,6 +438,189 @@ ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_error, 0, 0, 1 )
ZEND_ARG_OBJ_INFO( 0, trans, Transliterator, 0 )
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_idarg_static, 0, 0, 1 )
+ ZEND_ARG_INFO( 0, zoneId )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_from_date_time_zone, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, dateTimeZone, IntlDateTimeZone, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_create_enumeration, 0, 0, 0 )
+ ZEND_ARG_INFO( 0, countryOrRawOffset )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_count_equivalent_ids, 0, 0, 1 )
+ ZEND_ARG_INFO( 0, zoneId )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_create_time_zone_id_enumeration, 0, 0, 1 )
+ ZEND_ARG_INFO( 0, zoneType )
+ ZEND_ARG_INFO( 0, region )
+ ZEND_ARG_INFO( 0, rawOffset )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_canonical_id, 0, 0, 1 )
+ ZEND_ARG_INFO( 0, zoneId )
+ ZEND_ARG_INFO( 1, isSystemID )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_equivalent_id, 0, 0, 2 )
+ ZEND_ARG_INFO( 0, zoneId )
+ ZEND_ARG_INFO( 0, index )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_offset, 0, 0, 5 )
+ ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
+ ZEND_ARG_INFO( 0, date )
+ ZEND_ARG_INFO( 0, local )
+ ZEND_ARG_INFO( 1, rawOffset )
+ ZEND_ARG_INFO( 1, dstOffset )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_has_same_rules, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
+ ZEND_ARG_OBJ_INFO( 0, otherTimeZone, IntlTimeZone, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_get_display_name, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
+ ZEND_ARG_INFO( 0, isDaylight )
+ ZEND_ARG_INFO( 0, style )
+ ZEND_ARG_INFO( 0, locale )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_only_tz, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, timeZone, IntlTimeZone, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_void, 0, 0, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_create_instance, 0, 0, 0 )
+ ZEND_ARG_INFO( 0, timeZone )
+ ZEND_ARG_INFO( 0, locale )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_only_cal, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_void, 0, 0, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_field, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, field )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_dow, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, dayOfWeek )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_other_cal, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_OBJ_INFO( 0, otherCalendar, IntlCalendar, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_date, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, date )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_date_optional, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, date )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_get_keyword_values_for_locale, 0, 0, 3)
+ ZEND_ARG_INFO( 0, key )
+ ZEND_ARG_INFO( 0, locale )
+ ZEND_ARG_INFO( 0, commonlyUsed )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_add, 0, 0, 3 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, field )
+ ZEND_ARG_INFO( 0, amount )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_time_zone, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, timeZone )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set, 0, 0, 3 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, fieldOrYear )
+ ZEND_ARG_INFO( 0, valueOrMonth )
+ ZEND_ARG_INFO( 0, dayOfMonth )
+ ZEND_ARG_INFO( 0, hour )
+ ZEND_ARG_INFO( 0, minute )
+ ZEND_ARG_INFO( 0, second )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_roll, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, field )
+ ZEND_ARG_INFO( 0, amountOrUpOrDown )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_clear, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, field )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_field_difference, 0, 0, 3 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, when )
+ ZEND_ARG_INFO( 0, field )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_get_locale, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, localeType )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_lenient, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, isLenient )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_from_date_time, 0, 0, 1)
+ ZEND_ARG_INFO(0, dateTime)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_wall_time_option, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 )
+ ZEND_ARG_INFO( 0, wallTimeOption )
+ZEND_END_ARG_INFO()
+
+/* Gregorian Calendar */
+ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_create_instance, 0, 0, 0 )
+ ZEND_ARG_INFO(0, timeZoneOrYear)
+ ZEND_ARG_INFO(0, localeOrMonth)
+ ZEND_ARG_INFO(0, dayOfMonth)
+ ZEND_ARG_INFO(0, hour)
+ ZEND_ARG_INFO(0, minute)
+ ZEND_ARG_INFO(0, second)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_is_leap_year, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 )
+ ZEND_ARG_INFO( 0, year )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_only_gregcal, 0, 0, 1 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 )
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_set_gregorian_change, 0, 0, 2 )
+ ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 )
+ ZEND_ARG_INFO( 0, date )
+ZEND_END_ARG_INFO()
+
/* }}} */
/* {{{ intl_functions
@@ -484,15 +703,19 @@ zend_function_entry intl_functions[] = {
PHP_FE( datefmt_get_datetype, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_get_timetype, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_get_calendar, arginfo_msgfmt_get_locale )
+ PHP_FE( datefmt_get_calendar_object, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_set_calendar, arginfo_datefmt_set_calendar )
PHP_FE( datefmt_get_locale, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_get_timezone_id, arginfo_msgfmt_get_locale )
- PHP_FE( datefmt_set_timezone_id, arginfo_msgfmt_get_locale )
+ PHP_FE( datefmt_set_timezone_id, arginfo_datefmt_set_timezone )
+ PHP_FE( datefmt_get_timezone, arginfo_msgfmt_get_locale )
+ PHP_FE( datefmt_set_timezone, arginfo_datefmt_set_timezone )
PHP_FE( datefmt_get_pattern, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_set_pattern, arginfo_datefmt_set_pattern )
PHP_FE( datefmt_is_lenient, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_set_lenient, arginfo_msgfmt_get_locale )
PHP_FE( datefmt_format, arginfo_datefmt_format )
+ PHP_FE( datefmt_format_object, arginfo_datefmt_format_object )
PHP_FE( datefmt_parse, datefmt_parse_args )
PHP_FE( datefmt_localtime , datefmt_parse_args )
PHP_FE( datefmt_get_error_code, arginfo_msgfmt_get_error_code )
@@ -530,6 +753,96 @@ zend_function_entry intl_functions[] = {
PHP_FE( transliterator_get_error_code, arginfo_transliterator_error )
PHP_FE( transliterator_get_error_message, arginfo_transliterator_error )
+ /* TimeZone functions */
+ PHP_FE( intltz_create_time_zone, arginfo_tz_idarg_static )
+ PHP_FE( intltz_from_date_time_zone, arginfo_tz_from_date_time_zone )
+ PHP_FE( intltz_create_default, arginfo_tz_void )
+ PHP_FE( intltz_get_id, arginfo_tz_only_tz )
+ PHP_FE( intltz_get_gmt, arginfo_tz_void )
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ PHP_FE( intltz_get_unknown, arginfo_tz_void )
+#endif
+ PHP_FE( intltz_create_enumeration, arginfo_tz_create_enumeration )
+ PHP_FE( intltz_count_equivalent_ids, arginfo_tz_idarg_static )
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ PHP_FE( intltz_create_time_zone_id_enumeration, arginfo_tz_create_time_zone_id_enumeration )
+#endif
+ PHP_FE( intltz_get_canonical_id, arginfo_tz_get_canonical_id )
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ PHP_FE( intltz_get_region, arginfo_tz_idarg_static )
+#endif
+ PHP_FE( intltz_get_tz_data_version, arginfo_tz_void )
+ PHP_FE( intltz_get_equivalent_id, arginfo_tz_get_equivalent_id )
+ PHP_FE( intltz_use_daylight_time, arginfo_tz_only_tz )
+ PHP_FE( intltz_get_offset, arginfo_tz_get_offset )
+ PHP_FE( intltz_get_raw_offset, arginfo_tz_only_tz )
+ PHP_FE( intltz_has_same_rules, arginfo_tz_has_same_rules )
+ PHP_FE( intltz_get_display_name, arginfo_tz_get_display_name )
+ PHP_FE( intltz_get_dst_savings, arginfo_tz_only_tz )
+ PHP_FE( intltz_to_date_time_zone, arginfo_tz_only_tz )
+ PHP_FE( intltz_get_error_code, arginfo_tz_only_tz )
+ PHP_FE( intltz_get_error_message, arginfo_tz_only_tz )
+
+ PHP_FE( intlcal_create_instance, ainfo_cal_create_instance )
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
+ PHP_FE( intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale )
+#endif
+ PHP_FE( intlcal_get_now, ainfo_cal_void )
+ PHP_FE( intlcal_get_available_locales, ainfo_cal_void )
+ PHP_FE( intlcal_get, ainfo_cal_field )
+ PHP_FE( intlcal_get_time, ainfo_cal_only_cal )
+ PHP_FE( intlcal_set_time, ainfo_cal_date )
+ PHP_FE( intlcal_add, ainfo_cal_add )
+ PHP_FE( intlcal_set_time_zone, ainfo_cal_set_time_zone )
+ PHP_FE( intlcal_after, ainfo_cal_other_cal )
+ PHP_FE( intlcal_before, ainfo_cal_other_cal )
+ PHP_FE( intlcal_set, ainfo_cal_set )
+ PHP_FE( intlcal_roll, ainfo_cal_roll )
+ PHP_FE( intlcal_clear, ainfo_cal_clear )
+ PHP_FE( intlcal_field_difference, ainfo_cal_field_difference )
+ PHP_FE( intlcal_get_actual_maximum, ainfo_cal_field )
+ PHP_FE( intlcal_get_actual_minimum, ainfo_cal_field )
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ PHP_FE( intlcal_get_day_of_week_type, ainfo_cal_dow )
+#endif
+ PHP_FE( intlcal_get_first_day_of_week, ainfo_cal_only_cal )
+ PHP_FE( intlcal_get_greatest_minimum, ainfo_cal_field )
+ PHP_FE( intlcal_get_least_maximum, ainfo_cal_field )
+ PHP_FE( intlcal_get_locale, ainfo_cal_get_locale )
+ PHP_FE( intlcal_get_maximum, ainfo_cal_field )
+ PHP_FE( intlcal_get_minimal_days_in_first_week, ainfo_cal_only_cal )
+ PHP_FE( intlcal_get_minimum, ainfo_cal_field )
+ PHP_FE( intlcal_get_time_zone, ainfo_cal_only_cal )
+ PHP_FE( intlcal_get_type, ainfo_cal_only_cal )
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ PHP_FE( intlcal_get_weekend_transition, ainfo_cal_dow )
+#endif
+ PHP_FE( intlcal_in_daylight_time, ainfo_cal_only_cal )
+ PHP_FE( intlcal_is_equivalent_to, ainfo_cal_other_cal )
+ PHP_FE( intlcal_is_lenient, ainfo_cal_only_cal )
+ PHP_FE( intlcal_is_set, ainfo_cal_field )
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ PHP_FE( intlcal_is_weekend, ainfo_cal_date_optional )
+#endif
+ PHP_FE( intlcal_set_first_day_of_week, ainfo_cal_dow )
+ PHP_FE( intlcal_set_lenient, ainfo_cal_set_lenient )
+ PHP_FE( intlcal_equals, ainfo_cal_other_cal )
+ PHP_FE( intlcal_from_date_time, ainfo_cal_from_date_time )
+ PHP_FE( intlcal_to_date_time, ainfo_cal_only_cal )
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ PHP_FE( intlcal_get_repeated_wall_time_option, ainfo_cal_only_cal )
+ PHP_FE( intlcal_get_skipped_wall_time_option, ainfo_cal_only_cal )
+ PHP_FE( intlcal_set_repeated_wall_time_option, ainfo_cal_wall_time_option )
+ PHP_FE( intlcal_set_skipped_wall_time_option, ainfo_cal_wall_time_option )
+#endif
+ PHP_FE( intlcal_get_error_code, ainfo_cal_only_cal )
+ PHP_FE( intlcal_get_error_message, ainfo_cal_only_cal )
+
+ PHP_FE( intlgregcal_create_instance, ainfo_gregcal_create_instance )
+ PHP_FE( intlgregcal_set_gregorian_change, ainfo_gregcal_set_gregorian_change )
+ PHP_FE( intlgregcal_get_gregorian_change, ainfo_gregcal_only_gregcal )
+ PHP_FE( intlgregcal_is_leap_year, ainfo_gregcal_is_leap_year )
+
/* common functions */
PHP_FE( intl_get_error_code, intl_0_args )
PHP_FE( intl_get_error_message, intl_0_args )
@@ -540,16 +853,14 @@ zend_function_entry intl_functions[] = {
};
/* }}} */
-
/* {{{ INI Settings */
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals)
STD_PHP_INI_ENTRY("intl.error_level", "0", PHP_INI_ALL, OnUpdateLong, error_level, zend_intl_globals, intl_globals)
-
+ STD_PHP_INI_ENTRY("intl.use_exceptions", "0", PHP_INI_ALL, OnUpdateBool, use_exceptions, zend_intl_globals, intl_globals)
PHP_INI_END()
/* }}} */
-
static PHP_GINIT_FUNCTION(intl);
/* {{{ intl_module_entry */
@@ -640,6 +951,12 @@ PHP_MINIT_FUNCTION( intl )
/* Register Transliterator constants */
transliterator_register_constants( INIT_FUNC_ARGS_PASSTHRU );
+ /* Register 'IntlTimeZone' PHP class */
+ timezone_register_IntlTimeZone_class( TSRMLS_C );
+
+ /* Register 'IntlCalendar' PHP class */
+ calendar_register_IntlCalendar_class( TSRMLS_C );
+
/* Expose ICU error codes to PHP scripts. */
intl_expose_icu_error_codes( INIT_FUNC_ARGS_PASSTHRU );
@@ -653,25 +970,41 @@ PHP_MINIT_FUNCTION( intl )
/* Expose Spoofchecker constants to PHP scripts */
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
#endif
+
+ /* Register 'IntlException' PHP class */
+ intl_register_IntlException_class( TSRMLS_C );
+
+ /* Register 'IntlIterator' PHP class */
+ intl_register_IntlIterator_class( TSRMLS_C );
+
+ /* Register 'BreakIterator' class */
+ breakiterator_register_BreakIterator_class( TSRMLS_C );
+
+ /* Register 'IntlPartsIterator' class */
+ breakiterator_register_IntlPartsIterator_class( TSRMLS_C );
+
/* Global error handling. */
intl_error_init( NULL TSRMLS_CC );
- /* Set the default_locale value */
- if( INTL_G(default_locale) == NULL ) {
- INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
- }
-
return SUCCESS;
}
/* }}} */
+#define EXPLICIT_CLEANUP_ENV_VAR "INTL_EXPLICIT_CLEANUP"
+
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
PHP_MSHUTDOWN_FUNCTION( intl )
{
+ const char *cleanup;
/* For the default locale php.ini setting */
UNREGISTER_INI_ENTRIES();
+ cleanup = getenv(EXPLICIT_CLEANUP_ENV_VAR);
+ if (cleanup != NULL && !(cleanup[0] == '0' && cleanup[1] == '\0')) {
+ u_cleanup();
+ }
+
return SUCCESS;
}
/* }}} */
@@ -680,10 +1013,6 @@ PHP_MSHUTDOWN_FUNCTION( intl )
*/
PHP_RINIT_FUNCTION( intl )
{
- /* Set the default_locale value */
- if( INTL_G(default_locale) == NULL ) {
- INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
- }
return SUCCESS;
}
/* }}} */
diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h
index 4ede069e2..7a7112317 100644
--- a/ext/intl/php_intl.h
+++ b/ext/intl/php_intl.h
@@ -22,8 +22,13 @@
#include <php.h>
+/* Even if we're included from C++, don't introduce C++ definitions
+ * because we were included with extern "C". The effect would be that
+ * when the headers defined any method, they would do so with C linkage */
+#undef U_SHOW_CPLUSPLUS_API
+#define U_SHOW_CPLUSPLUS_API 0
#include "collator/collator_sort.h"
-#include "grapheme/grapheme.h"
+#include <unicode/ubrk.h>
#include "intl_error.h"
extern zend_module_entry intl_module_entry;
@@ -46,6 +51,7 @@ ZEND_BEGIN_MODULE_GLOBALS(intl)
UBreakIterator* grapheme_iterator;
intl_error g_error;
long error_level;
+ zend_bool use_exceptions;
ZEND_END_MODULE_GLOBALS(intl)
/* Macro to access request-wide global variables. */
@@ -63,6 +69,8 @@ PHP_RINIT_FUNCTION(intl);
PHP_RSHUTDOWN_FUNCTION(intl);
PHP_MINFO_FUNCTION(intl);
+const char *intl_locale_get_default( TSRMLS_D );
+
#define PHP_INTL_VERSION "1.1.0"
#endif /* PHP_INTL_H */
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c
index a6a73f5f0..db46bf5b1 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.c
+++ b/ext/intl/resourcebundle/resourcebundle_class.c
@@ -79,13 +79,11 @@ static zend_object_value ResourceBundle_object_create( zend_class_entry *ce TSRM
/* {{{ ResourceBundle_ctor */
static void resourcebundle_ctor(INTERNAL_FUNCTION_PARAMETERS)
{
- char * bundlename;
- int bundlename_len = 0;
- char * locale;
- int locale_len = 0;
- zend_bool fallback = 1;
-
- char * pbuf;
+ const char *bundlename;
+ int bundlename_len = 0;
+ const char *locale;
+ int locale_len = 0;
+ zend_bool fallback = 1;
zval *object = return_value;
ResourceBundle_object *rb = (ResourceBundle_object *) zend_object_store_get_object( object TSRMLS_CC);
@@ -104,7 +102,7 @@ static void resourcebundle_ctor(INTERNAL_FUNCTION_PARAMETERS)
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
if (locale == NULL) {
- locale = INTL_G(default_locale);
+ locale = intl_locale_get_default(TSRMLS_C);
}
if (fallback) {
@@ -117,6 +115,7 @@ static void resourcebundle_ctor(INTERNAL_FUNCTION_PARAMETERS)
if (!fallback && (INTL_DATA_ERROR_CODE(rb) == U_USING_FALLBACK_WARNING ||
INTL_DATA_ERROR_CODE(rb) == U_USING_DEFAULT_WARNING)) {
+ char *pbuf;
intl_errors_set_code(NULL, INTL_DATA_ERROR_CODE(rb) TSRMLS_CC);
spprintf(&pbuf, 0, "resourcebundle_ctor: Cannot load libICU resource "
"'%s' without fallback from %s to %s",
diff --git a/ext/intl/tests/badargs.phpt b/ext/intl/tests/badargs.phpt
index 9232bbf0c..b8f48b371 100644
--- a/ext/intl/tests/badargs.phpt
+++ b/ext/intl/tests/badargs.phpt
@@ -13,7 +13,10 @@ foreach($funcs as $func) {
if($rfunc->getNumberOfRequiredParameters() == 0) {
continue;
}
- $res = $func($arg);
+
+ try {
+ $res = $func($arg);
+ } catch (Exception $e) { continue; }
if($res != false) {
echo "$func: ";
var_dump($res);
diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt
new file mode 100644
index 000000000..a818075a3
--- /dev/null
+++ b/ext/intl/tests/breakiter___construct.phpt
@@ -0,0 +1,14 @@
+--TEST--
+IntlBreakIterator::__construct() should not be callable
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+new IntlBreakIterator();
+--EXPECTF--
+
+Fatal error: Call to private IntlBreakIterator::__construct() from invalid context in %s on line %d
diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt
new file mode 100644
index 000000000..770f1403c
--- /dev/null
+++ b/ext/intl/tests/breakiter___construct_error.phpt
@@ -0,0 +1,38 @@
+--TEST--
+IntlRuleBasedBreakIterator::__construct(): arg errors
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+//missing ; at the end:
+var_dump(new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+'));
+var_dump(new IntlRuleBasedBreakIterator());
+var_dump(new IntlRuleBasedBreakIterator(1,2,3));
+var_dump(new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;', array()));
+var_dump(new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;', true));
+
+--EXPECTF--
+
+Warning: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: unable to create RuleBasedBreakIterator from rules (parse error on line 1, offset 31) in %s on line %d
+NULL
+
+Warning: IntlRuleBasedBreakIterator::__construct() expects at least 1 parameter, 0 given in %s on line %d
+
+Warning: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlRuleBasedBreakIterator::__construct() expects at most 2 parameters, 3 given in %s on line %d
+
+Warning: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlRuleBasedBreakIterator::__construct() expects parameter 2 to be boolean, array given in %s on line %d
+
+Warning: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: unable to create instance from compiled rules in %s on line %d
+NULL
diff --git a/ext/intl/tests/breakiter_clone_basic.phpt b/ext/intl/tests/breakiter_clone_basic.phpt
new file mode 100644
index 000000000..d838f8121
--- /dev/null
+++ b/ext/intl/tests/breakiter_clone_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+IntlBreakIterator: clone handler
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
+$bi_clone = clone $bi;
+var_dump(get_class($bi), get_class($bi_clone));
+var_dump($bi == $bi_clone);
+
+$bi->setText('foobar');
+$bi_clone = clone $bi;
+var_dump(get_class($bi), get_class($bi_clone));
+var_dump($bi == $bi_clone);
+
+--EXPECT--
+string(26) "IntlRuleBasedBreakIterator"
+string(26) "IntlRuleBasedBreakIterator"
+bool(true)
+string(26) "IntlRuleBasedBreakIterator"
+string(26) "IntlRuleBasedBreakIterator"
+bool(true)
diff --git a/ext/intl/tests/breakiter_createCodePointInstance_basic.phpt b/ext/intl/tests/breakiter_createCodePointInstance_basic.phpt
new file mode 100644
index 000000000..a43e82760
--- /dev/null
+++ b/ext/intl/tests/breakiter_createCodePointInstance_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlBreakIterator::createCodePointInstance(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$text = 'ตัวอย่างข้อความ';
+
+$codepoint_it = IntlBreakIterator::createCodePointInstance();
+var_dump(get_class($codepoint_it));
+$codepoint_it->setText($text);
+
+print_r(iterator_to_array($codepoint_it));
+
+?>
+==DONE==
+--EXPECT--
+string(26) "IntlCodePointBreakIterator"
+Array
+(
+ [0] => 0
+ [1] => 3
+ [2] => 6
+ [3] => 9
+ [4] => 12
+ [5] => 15
+ [6] => 18
+ [7] => 21
+ [8] => 24
+ [9] => 27
+ [10] => 30
+ [11] => 33
+ [12] => 36
+ [13] => 39
+ [14] => 42
+ [15] => 45
+)
+==DONE==
diff --git a/ext/intl/tests/breakiter_createCodePointInstance_error.phpt b/ext/intl/tests/breakiter_createCodePointInstance_error.phpt
new file mode 100644
index 000000000..90228e128
--- /dev/null
+++ b/ext/intl/tests/breakiter_createCodePointInstance_error.phpt
@@ -0,0 +1,18 @@
+--TEST--
+IntlBreakIterator::createCodePointInstance(): bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlBreakIterator::createCodePointInstance(array()));
+--EXPECTF--
+
+Warning: IntlBreakIterator::createCodePointInstance() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlBreakIterator::createCodePointInstance(): breakiter_create_code_point_instance: bad arguments in %s on line %d
+NULL
+
diff --git a/ext/intl/tests/breakiter_current_basic.phpt b/ext/intl/tests/breakiter_current_basic.phpt
new file mode 100644
index 000000000..2ce6da769
--- /dev/null
+++ b/ext/intl/tests/breakiter_current_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlBreakIterator::current(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+var_dump($bi->current());
+$bi->setText('foo bar trans zoo bee');
+
+var_dump($bi->first());
+var_dump($bi->current());
+var_dump($bi->next());
+var_dump($bi->current());
+?>
+==DONE==
+--EXPECT--
+int(0)
+int(0)
+int(0)
+int(3)
+int(3)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_factories_basic.phpt b/ext/intl/tests/breakiter_factories_basic.phpt
new file mode 100644
index 000000000..dcfcedef0
--- /dev/null
+++ b/ext/intl/tests/breakiter_factories_basic.phpt
@@ -0,0 +1,46 @@
+--TEST--
+IntlBreakIterator factories: basic tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "ja");
+
+$m = array('createWordInstance', 'createLineInstance', 'createCharacterInstance',
+ 'createSentenceInstance', 'createTitleInstance');
+
+$t = 'Frase 1... Frase 2'.
+
+$o1 = $o2 = null;
+foreach ($m as $method) {
+ echo "===== $method =====\n";
+ $o1 = call_user_func(array('IntlBreakIterator', $method), 'ja');
+ var_dump($o1 == $o2);
+ $o2 = call_user_func(array('IntlBreakIterator', $method), NULL);
+ var_dump($o1 == $o2);
+ echo "\n";
+}
+--EXPECT--
+===== createWordInstance =====
+bool(false)
+bool(true)
+
+===== createLineInstance =====
+bool(false)
+bool(true)
+
+===== createCharacterInstance =====
+bool(false)
+bool(true)
+
+===== createSentenceInstance =====
+bool(false)
+bool(true)
+
+===== createTitleInstance =====
+bool(false)
+bool(true)
+
diff --git a/ext/intl/tests/breakiter_factories_error.phpt b/ext/intl/tests/breakiter_factories_error.phpt
new file mode 100644
index 000000000..c35339f7a
--- /dev/null
+++ b/ext/intl/tests/breakiter_factories_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlBreakIterator factory methods: argument errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlBreakIterator::createWordInstance(array()));
+var_dump(IntlBreakIterator::createSentenceInstance(NULL, 2));
+var_dump(IntlBreakIterator::createCharacterInstance(NULL, 2));
+var_dump(IntlBreakIterator::createTitleInstance(NULL, 2));
+var_dump(IntlBreakIterator::createLineInstance(NULL, 2));
+
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::createWordInstance() expects parameter 1 to be string, array given in %s on line %d
+
+Warning: IntlBreakIterator::createWordInstance(): breakiter_create_word_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlBreakIterator::createSentenceInstance() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::createSentenceInstance(): breakiter_create_sentence_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlBreakIterator::createCharacterInstance() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::createCharacterInstance(): breakiter_create_character_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlBreakIterator::createTitleInstance() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::createTitleInstance(): breakiter_create_title_instance: bad arguments in %s on line %d
+NULL
+
+Warning: IntlBreakIterator::createLineInstance() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::createLineInstance(): breakiter_create_line_instance: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/breakiter_first_basic.phpt b/ext/intl/tests/breakiter_first_basic.phpt
new file mode 100644
index 000000000..364d5f2fa
--- /dev/null
+++ b/ext/intl/tests/breakiter_first_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlBreakIterator::first(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans');
+
+var_dump($bi->current());
+var_dump($bi->next());
+var_dump($bi->first());
+var_dump($bi->current());
+--EXPECT--
+int(0)
+int(3)
+int(0)
+int(0)
diff --git a/ext/intl/tests/breakiter_first_last_previous_current_error.phpt b/ext/intl/tests/breakiter_first_last_previous_current_error.phpt
new file mode 100644
index 000000000..2ab681228
--- /dev/null
+++ b/ext/intl/tests/breakiter_first_last_previous_current_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+IntlBreakIterator::first()/last()/previous()/current(): arg errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
+$bi->setText("\x80sdfé\x90d888 dfsa9");
+
+var_dump($bi->first(1));
+var_dump($bi->last(1));
+var_dump($bi->previous(1));
+var_dump($bi->current(1));
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::first() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlBreakIterator::first(): breakiter_first: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::last() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlBreakIterator::last(): breakiter_last: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::previous() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlBreakIterator::previous(): breakiter_previous: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::current() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlBreakIterator::current(): breakiter_current: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/breakiter_following_basic.phpt b/ext/intl/tests/breakiter_following_basic.phpt
new file mode 100644
index 000000000..30798d99a
--- /dev/null
+++ b/ext/intl/tests/breakiter_following_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlBreakIterator::following(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans zoo bee');
+
+var_dump($bi->following(5));
+var_dump($bi->following(50));
+var_dump($bi->following(-1));
+?>
+==DONE==
+--EXPECT--
+int(7)
+int(-1)
+int(0)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt b/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
new file mode 100644
index 000000000..5550ccf0a
--- /dev/null
+++ b/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
@@ -0,0 +1,51 @@
+--TEST--
+IntlBreakIterator::following()/preceding()/isBoundary(): arg errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
+$bi->setText("\x80sdfé\x90d888 dfsa9");
+
+var_dump($bi->following(1, 2));
+var_dump($bi->following(array()));
+var_dump($bi->preceding(1, 2));
+var_dump($bi->preceding(array()));
+var_dump($bi->isBoundary(1, 2));
+var_dump($bi->isBoundary(array()));
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::following() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::following(): breakiter_following: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::following() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlBreakIterator::following(): breakiter_following: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::preceding() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::preceding() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlBreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::isBoundary() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::isBoundary() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlBreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/breakiter_getLocale_basic.phpt b/ext/intl/tests/breakiter_getLocale_basic.phpt
new file mode 100644
index 000000000..b0112cc84
--- /dev/null
+++ b/ext/intl/tests/breakiter_getLocale_basic.phpt
@@ -0,0 +1,21 @@
+--TEST--
+IntlBreakIterator::getLocale(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createSentenceInstance('pt');
+
+var_dump($bi->getLocale(0));
+var_dump($bi->getLocale(1));
+?>
+==DONE==
+--EXPECT--
+string(4) "root"
+string(4) "root"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_getLocale_error.phpt b/ext/intl/tests/breakiter_getLocale_error.phpt
new file mode 100644
index 000000000..9acd08ab6
--- /dev/null
+++ b/ext/intl/tests/breakiter_getLocale_error.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlBreakIterator::getLocale(): arg errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
+$bi->setText("\x80sdfé\x90d888 dfsa9");
+
+var_dump($bi->getLocale(1, 2));
+var_dump($bi->getLocale(array()));
+var_dump($bi->getLocale());
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::getLocale() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/breakiter_getPartsIterator_basic.phpt b/ext/intl/tests/breakiter_getPartsIterator_basic.phpt
new file mode 100644
index 000000000..36ad80d5f
--- /dev/null
+++ b/ext/intl/tests/breakiter_getPartsIterator_basic.phpt
@@ -0,0 +1,37 @@
+--TEST--
+IntlBreakIterator::getPartsIterator(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$pi = $bi->getPartsIterator();
+var_dump(get_class($pi));
+print_r(iterator_to_array($pi));
+
+$bi->setText("foo bar");
+$pi = $bi->getPartsIterator();
+var_dump(get_class($pi->getBreakIterator()));
+print_r(iterator_to_array($pi));
+var_dump($pi->getRuleStatus());
+?>
+==DONE==
+--EXPECT--
+string(17) "IntlPartsIterator"
+Array
+(
+)
+string(26) "IntlRuleBasedBreakIterator"
+Array
+(
+ [0] => foo
+ [1] =>
+ [2] => bar
+)
+int(0)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_getPartsIterator_error.phpt b/ext/intl/tests/breakiter_getPartsIterator_error.phpt
new file mode 100644
index 000000000..973761803
--- /dev/null
+++ b/ext/intl/tests/breakiter_getPartsIterator_error.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlBreakIterator::getPartsIterator(): bad args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$it = IntlBreakIterator::createWordInstance(NULL);
+var_dump($it->getPartsIterator(array()));
+var_dump($it->getPartsIterator(1, 2));
+var_dump($it->getPartsIterator(-1));
+
+?>
+==DONE==
+--EXPECTF--
+
+Warning: IntlBreakIterator::getPartsIterator() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::getPartsIterator() expects at most 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad key type in %s on line %d
+bool(false)
+==DONE==
diff --git a/ext/intl/tests/breakiter_getPartsIterator_var1.phpt b/ext/intl/tests/breakiter_getPartsIterator_var1.phpt
new file mode 100644
index 000000000..7bbd27ea4
--- /dev/null
+++ b/ext/intl/tests/breakiter_getPartsIterator_var1.phpt
@@ -0,0 +1,60 @@
+--TEST--
+IntlBreakIterator::getPartsIterator(): argument variations
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$text = 'foo bar tao';
+
+$it = IntlBreakIterator::createWordInstance(NULL);
+$it->setText($text);
+
+var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_SEQUENTIAL)));
+var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_LEFT)));
+var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_RIGHT)));
+
+?>
+==DONE==
+--EXPECT--
+array(5) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(1) " "
+ [2]=>
+ string(3) "bar"
+ [3]=>
+ string(1) " "
+ [4]=>
+ string(3) "tao"
+}
+array(5) {
+ [0]=>
+ string(3) "foo"
+ [4]=>
+ string(1) " "
+ [5]=>
+ string(3) "bar"
+ [8]=>
+ string(1) " "
+ [9]=>
+ string(3) "tao"
+}
+array(5) {
+ [3]=>
+ string(3) "foo"
+ [5]=>
+ string(1) " "
+ [8]=>
+ string(3) "bar"
+ [9]=>
+ string(1) " "
+ [12]=>
+ string(3) "tao"
+}
+==DONE==
diff --git a/ext/intl/tests/breakiter_getText_basic.phpt b/ext/intl/tests/breakiter_getText_basic.phpt
new file mode 100644
index 000000000..0e5a26c16
--- /dev/null
+++ b/ext/intl/tests/breakiter_getText_basic.phpt
@@ -0,0 +1,17 @@
+--TEST--
+IntlBreakIterator::getText(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+var_dump($bi->getText());
+$bi->setText('foo bar');
+var_dump($bi->getText());
+--EXPECTF--
+NULL
+string(7) "foo bar"
diff --git a/ext/intl/tests/breakiter_getText_error.phpt b/ext/intl/tests/breakiter_getText_error.phpt
new file mode 100644
index 000000000..91e9919c1
--- /dev/null
+++ b/ext/intl/tests/breakiter_getText_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlBreakIterator::getText(): arg errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}]+;');
+var_dump($bi->getText(array()));
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::getText() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlBreakIterator::getText(): breakiter_get_text: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/breakiter_isBoundary_basic.phpt b/ext/intl/tests/breakiter_isBoundary_basic.phpt
new file mode 100644
index 000000000..1f416630a
--- /dev/null
+++ b/ext/intl/tests/breakiter_isBoundary_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlBreakIterator::isBoundary(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans zoo bee');
+
+var_dump($bi->isBoundary(0));
+var_dump($bi->isBoundary(7));
+var_dump($bi->isBoundary(-1));
+var_dump($bi->isBoundary(1));
+var_dump($bi->isBoundary(50));
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_last_basic.phpt b/ext/intl/tests/breakiter_last_basic.phpt
new file mode 100644
index 000000000..cf816c367
--- /dev/null
+++ b/ext/intl/tests/breakiter_last_basic.phpt
@@ -0,0 +1,20 @@
+--TEST--
+IntlBreakIterator::last(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans');
+
+var_dump($bi->current());
+var_dump($bi->last());
+var_dump($bi->current());
+--EXPECTF--
+int(0)
+int(13)
+int(13)
diff --git a/ext/intl/tests/breakiter_next_basic.phpt b/ext/intl/tests/breakiter_next_basic.phpt
new file mode 100644
index 000000000..4deb4144e
--- /dev/null
+++ b/ext/intl/tests/breakiter_next_basic.phpt
@@ -0,0 +1,30 @@
+--TEST--
+IntlBreakIterator::next(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans zoo bee');
+
+var_dump($bi->first());
+var_dump($bi->next());
+var_dump($bi->next(2));
+var_dump($bi->next(-1));
+var_dump($bi->next(0));
+var_dump($bi->next(NULL));
+?>
+==DONE==
+--EXPECT--
+int(0)
+int(3)
+int(7)
+int(4)
+int(4)
+int(7)
+==DONE==
diff --git a/ext/intl/tests/breakiter_next_error.phpt b/ext/intl/tests/breakiter_next_error.phpt
new file mode 100644
index 000000000..ed718bc2a
--- /dev/null
+++ b/ext/intl/tests/breakiter_next_error.phpt
@@ -0,0 +1,27 @@
+--TEST--
+IntlBreakIterator::next(): arg errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
+$bi->setText("\x80sdfé\x90d888 dfsa9");
+
+var_dump($bi->next(1, 2));
+var_dump($bi->next(array()));
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::next() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::next(): breakiter_next: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::next() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlBreakIterator::next(): breakiter_next: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/breakiter_preceding_basic.phpt b/ext/intl/tests/breakiter_preceding_basic.phpt
new file mode 100644
index 000000000..6fa8dd7fa
--- /dev/null
+++ b/ext/intl/tests/breakiter_preceding_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlBreakIterator::preceding(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans zoo bee');
+
+var_dump($bi->preceding(5));
+var_dump($bi->preceding(50));
+var_dump($bi->preceding(-1));
+?>
+==DONE==
+--EXPECT--
+int(4)
+int(21)
+int(0)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_previous_basic.phpt b/ext/intl/tests/breakiter_previous_basic.phpt
new file mode 100644
index 000000000..c3343af57
--- /dev/null
+++ b/ext/intl/tests/breakiter_previous_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlBreakIterator::previous(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+$bi->setText('foo bar trans');
+
+var_dump($bi->last());
+var_dump($bi->previous());
+?>
+==DONE==
+--EXPECT--
+int(13)
+int(8)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/breakiter_setText_basic.phpt b/ext/intl/tests/breakiter_setText_basic.phpt
new file mode 100644
index 000000000..a5e4f86b6
--- /dev/null
+++ b/ext/intl/tests/breakiter_setText_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+IntlBreakIterator::setText(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+class A {
+function __tostring() { return 'aaa'; }
+}
+
+$bi = IntlBreakIterator::createWordInstance('pt');
+var_dump($bi->setText('foo bar'));
+var_dump($bi->getText());
+var_dump($bi->setText(1));
+var_dump($bi->getText());
+var_dump($bi->setText(new A));
+var_dump($bi->getText());
+
+/* setText resets the pointer */
+var_dump($bi->next());
+var_dump($bi->setText('foo bar'));
+var_dump($bi->current());
+--EXPECT--
+bool(true)
+string(7) "foo bar"
+bool(true)
+string(1) "1"
+bool(true)
+string(3) "aaa"
+int(3)
+bool(true)
+int(0)
diff --git a/ext/intl/tests/breakiter_setText_error.phpt b/ext/intl/tests/breakiter_setText_error.phpt
new file mode 100644
index 000000000..a7a73a08d
--- /dev/null
+++ b/ext/intl/tests/breakiter_setText_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+IntlBreakIterator::setText(): arg errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$bi = new IntlRuleBasedBreakIterator('[\p{Letter}]+;');
+var_dump($bi->setText());
+var_dump($bi->setText(array()));
+var_dump($bi->setText(1,2));
+
+class A {
+function __destruct() { var_dump('destructed'); throw new Exception('e'); }
+function __tostring() { return 'foo'; }
+}
+
+try {
+var_dump($bi->setText(new A));
+} catch (Exception $e) {
+var_dump($e->getMessage());
+}
+
+--EXPECTF--
+
+Warning: IntlBreakIterator::setText() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::setText() expects parameter 1 to be string, array given in %s on line %d
+
+Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlBreakIterator::setText() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
+bool(false)
+string(10) "destructed"
+string(1) "e"
diff --git a/ext/intl/tests/bug50590.phpt b/ext/intl/tests/bug50590.phpt
index c39c333b2..4784d3787 100644
--- a/ext/intl/tests/bug50590.phpt
+++ b/ext/intl/tests/bug50590.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #50590 (IntlDateFormatter::parse result is limited to the integer range)
+--INI--
+date.timezone=Atlantic/Azores
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
diff --git a/ext/intl/tests/bug58756_MessageFormatter.phpt b/ext/intl/tests/bug58756_MessageFormatter.phpt
new file mode 100644
index 000000000..bbe96b704
--- /dev/null
+++ b/ext/intl/tests/bug58756_MessageFormatter.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #58756: w.r.t MessageFormatter
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+
+$time = 1247013673;
+
+ini_set('date.timezone', 'America/New_York');
+
+$msgf = new MessageFormatter('en_US', '{0,date,full} {0,time,h:m:s a V}');
+
+echo "date: " . date('l, F j, Y g:i:s A T', $time) . "\n";
+echo "msgf: " . $msgf->format(array($time)) . "\n";
+
+//NOT FIXED:
+/*$msgf = new MessageFormatter('en_US',
+'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
+
+echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
+ $msgf->format(array($time, 'time')), "\n";
+*/
+
+?>
+==DONE==
+--EXPECT--
+date: Tuesday, July 7, 2009 8:41:13 PM EDT
+msgf: Tuesday, July 7, 2009 8:41:13 PM EDT
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/bug62017.phpt b/ext/intl/tests/bug62017.phpt
index 13c4fe5df..50aeae480 100644
--- a/ext/intl/tests/bug62017.phpt
+++ b/ext/intl/tests/bug62017.phpt
@@ -14,7 +14,7 @@ var_dump(
new IntlDateFormatter('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "Europe/Lisbon",
IntlDateFormatter::GREGORIAN, "\x80"));
--EXPECTF--
-Warning: datefmt_create(): datefmt_create: error converting timezone_str to UTF-16 in %s on line %d
+Warning: datefmt_create(): datefmt_create: Time zone identifier given is not a valid UTF-8 string in %s on line %d
NULL
Warning: IntlDateFormatter::__construct(): datefmt_create: error converting pattern to UTF-16 in %s on line %d
diff --git a/ext/intl/tests/bug62081.phpt b/ext/intl/tests/bug62081.phpt
index 7d9e2cec4..44ad4beec 100644
--- a/ext/intl/tests/bug62081.phpt
+++ b/ext/intl/tests/bug62081.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #62081: IntlDateFormatter leaks memory if called twice
+--INI--
+date.timezone=Atlantic/Azores
--SKIPIF--
<?php
if (!extension_loaded('intl'))
@@ -7,8 +9,8 @@ if (!extension_loaded('intl'))
--FILE--
<?php
ini_set('intl.error_level', E_WARNING);
-$x = new IntlDateFormatter(1,1,1,1,1);
-var_dump($x->__construct(1,1,1,1,1));
+$x = new IntlDateFormatter('en', 1, 1);
+var_dump($x->__construct('en', 1, 1));
--EXPECTF--
Warning: IntlDateFormatter::__construct(): datefmt_create: cannot call constructor twice in %s on line %d
NULL
diff --git a/ext/intl/tests/bug62915.phpt b/ext/intl/tests/bug62915.phpt
new file mode 100644
index 000000000..e541d72d6
--- /dev/null
+++ b/ext/intl/tests/bug62915.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #62915: incomplete cloning of IntlTimeZone objects
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+
+class foo extends IntlTimeZone {
+ public $foo = 'test';
+
+ public function __construct() { }
+}
+
+$x = new foo;
+
+try {
+ $z = clone $x;
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+--EXPECT--
+string(39) "Cannot clone unconstructed IntlTimeZone"
diff --git a/ext/intl/tests/calendar_add_basic.phpt b/ext/intl/tests/calendar_add_basic.phpt
new file mode 100644
index 000000000..b0e44d589
--- /dev/null
+++ b/ext/intl/tests/calendar_add_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlCalendar::add() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$time = strtotime('2012-02-29 00:00:00 +0000');
+$time2 = strtotime('2012-03-01 05:06:07 +0000');
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime($time * 1000);
+$intlcal->add(IntlCalendar::FIELD_DAY_OF_MONTH, 1);
+$intlcal->add(IntlCalendar::FIELD_HOUR, 5);
+$intlcal->add(IntlCalendar::FIELD_MINUTE, 6);
+intlcal_add($intlcal, IntlCalendar::FIELD_SECOND, 7);
+
+var_dump(
+ (float)$time2*1000,
+ $intlcal->getTime());
+
+?>
+==DONE==
+--EXPECT--
+float(1330578367000)
+float(1330578367000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt
new file mode 100644
index 000000000..2e5fadb4e
--- /dev/null
+++ b/ext/intl/tests/calendar_add_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlCalendar::add(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->add(1, 2, 3));
+var_dump($c->add(-1, 2));
+var_dump($c->add(1));
+
+var_dump(intlcal_add($c, 1, 2, 3));
+var_dump(intlcal_add(1, 2, 3));
+--EXPECTF--
+
+Warning: IntlCalendar::add() expects exactly 2 parameters, 3 given in %s on line %d
+
+Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::add(): intlcal_add: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::add() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d
+
+Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt
new file mode 100644
index 000000000..10011ef85
--- /dev/null
+++ b/ext/intl/tests/calendar_before_after_error.phpt
@@ -0,0 +1,57 @@
+--TEST--
+IntlCalendar::before()/after(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+function eh($errno, $errstr) {
+echo "error: $errno, $errstr\n";
+}
+set_error_handler('eh');
+
+var_dump($c->after());
+var_dump($c->before());
+
+var_dump($c->after(1));
+var_dump($c->before(1));
+
+var_dump($c->after($c, 1));
+var_dump($c->before($c, 1));
+
+var_dump(intlcal_after($c));
+var_dump(intlcal_before($c));
+--EXPECT--
+error: 2, IntlCalendar::after() expects exactly 1 parameter, 0 given
+error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
+bool(false)
+error: 2, IntlCalendar::before() expects exactly 1 parameter, 0 given
+error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to IntlCalendar::after() must be an instance of IntlCalendar, integer given
+error: 2, IntlCalendar::after() expects parameter 1 to be IntlCalendar, integer given
+error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to IntlCalendar::before() must be an instance of IntlCalendar, integer given
+error: 2, IntlCalendar::before() expects parameter 1 to be IntlCalendar, integer given
+error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
+bool(false)
+error: 2, IntlCalendar::after() expects exactly 1 parameter, 2 given
+error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
+bool(false)
+error: 2, IntlCalendar::before() expects exactly 1 parameter, 2 given
+error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
+bool(false)
+error: 2, intlcal_after() expects exactly 2 parameters, 1 given
+error: 2, intlcal_after(): intlcal_before/after: bad arguments
+bool(false)
+error: 2, intlcal_before() expects exactly 2 parameters, 1 given
+error: 2, intlcal_before(): intlcal_before/after: bad arguments
+bool(false)
diff --git a/ext/intl/tests/calendar_clear_basic.phpt b/ext/intl/tests/calendar_clear_basic.phpt
new file mode 100644
index 000000000..f7e4371d9
--- /dev/null
+++ b/ext/intl/tests/calendar_clear_basic.phpt
@@ -0,0 +1,40 @@
+--TEST--
+IntlCalendar::clear() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump($intlcal->clear());
+var_dump(
+ $intlcal->get(IntlCalendar::FIELD_YEAR),
+ $intlcal->get(IntlCalendar::FIELD_MONTH),
+ $intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH),
+ $intlcal->get(IntlCalendar::FIELD_HOUR),
+ $intlcal->get(IntlCalendar::FIELD_MINUTE),
+ $intlcal->get(IntlCalendar::FIELD_SECOND),
+ $intlcal->get(IntlCalendar::FIELD_MILLISECOND)
+);
+
+$intlcal2 = IntlCalendar::createInstance('Europe/Amsterdam');
+intlcal_clear($intlcal2, null);
+var_dump($intlcal2->getTime());
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+int(1970)
+int(0)
+int(1)
+int(0)
+int(0)
+int(0)
+int(0)
+float(-3600000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt
new file mode 100644
index 000000000..9bde7e2c8
--- /dev/null
+++ b/ext/intl/tests/calendar_clear_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+IntlCalendar::clear(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->clear(1, 2));
+var_dump($c->clear(-1));
+
+var_dump(intlcal_clear($c, -1));
+var_dump(intlcal_clear(1, 2));
+--EXPECTF--
+
+Warning: IntlCalendar::clear(): intlcal_clear: too many arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_clear_variation1.phpt b/ext/intl/tests/calendar_clear_variation1.phpt
new file mode 100644
index 000000000..6adbcaa35
--- /dev/null
+++ b/ext/intl/tests/calendar_clear_variation1.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlCalendar::clear() 1 arg variation
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000);
+//print_R($intlcal);
+var_dump($intlcal->isSet(IntlCalendar::FIELD_MONTH));
+var_dump($intlcal->clear(IntlCalendar::FIELD_MONTH));
+var_dump($intlcal->isSet(IntlCalendar::FIELD_MONTH));
+//print_R($intlcal);
+var_dump(
+ $intlcal->getTime(),
+ strtotime('2012-01-29 05:06:07 +0000') * 1000.
+);
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+bool(false)
+float(1327813567000)
+float(1327813567000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_createInstance_basic.phpt b/ext/intl/tests/calendar_createInstance_basic.phpt
new file mode 100644
index 000000000..e062030fe
--- /dev/null
+++ b/ext/intl/tests/calendar_createInstance_basic.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlCalendar::createInstance() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+$cal = IntlCalendar::createInstance();
+print_R($cal->getTimeZone());
+print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
+echo "\n";
+print_R($cal->getType());
+echo "\n";
+
+$timeMillis = $cal->getTime();
+$time = time();
+
+var_dump(abs($timeMillis - $time * 1000) < 1000);
+
+?>
+==DONE==
+
+--EXPECTF--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Amsterdam
+ [rawOffset] => 3600000
+ [currentOffset] => %d
+)
+nl
+gregorian
+bool(true)
+==DONE==
diff --git a/ext/intl/tests/calendar_createInstance_error.phpt b/ext/intl/tests/calendar_createInstance_error.phpt
new file mode 100644
index 000000000..bf655bee7
--- /dev/null
+++ b/ext/intl/tests/calendar_createInstance_error.phpt
@@ -0,0 +1,38 @@
+--TEST--
+IntlCalendar::createInstance: bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+class X extends IntlTimeZone {
+function __construct() {}
+}
+
+var_dump(IntlCalendar::createInstance(1, 2, 3));
+var_dump(intlcal_create_instance(1, 2, 3));
+var_dump(intlcal_create_instance(new X, NULL));
+var_dump(intlcal_create_instance(NULL, array()));
+
+--EXPECTF--
+
+Warning: IntlCalendar::createInstance() expects at most 2 parameters, 3 given in %s on line %d
+
+Warning: IntlCalendar::createInstance(): intlcal_create_calendar: bad arguments in %s on line %d
+NULL
+
+Warning: intlcal_create_instance() expects at most 2 parameters, 3 given in %s on line %d
+
+Warning: intlcal_create_instance(): intlcal_create_calendar: bad arguments in %s on line %d
+NULL
+
+Warning: intlcal_create_instance(): intlcal_create_instance: passed IntlTimeZone is not properly constructed in %s on line %d
+NULL
+
+Warning: intlcal_create_instance() expects parameter 2 to be string, array given in %s on line %d
+
+Warning: intlcal_create_instance(): intlcal_create_calendar: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/calendar_createInstance_variation1.phpt b/ext/intl/tests/calendar_createInstance_variation1.phpt
new file mode 100644
index 000000000..138f2a2af
--- /dev/null
+++ b/ext/intl/tests/calendar_createInstance_variation1.phpt
@@ -0,0 +1,84 @@
+--TEST--
+IntlCalendar::createInstance() argument variations
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+$cal = intlcal_create_instance('Europe/Amsterdam');
+print_R($cal->getTimeZone());
+print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
+echo "\n";
+
+$cal = intlcal_create_instance('Europe/Lisbon', null);
+print_R($cal->getTimeZone());
+print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
+echo "\n";
+
+$cal = intlcal_create_instance(IntlTimeZone::createTimeZone('Europe/Lisbon'));
+print_R($cal->getTimeZone());
+print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
+echo "\n";
+
+$cal = intlcal_create_instance(null, "pt");
+print_R($cal->getTimeZone());
+print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
+echo "\n";
+
+$cal = intlcal_create_instance("Europe/Lisbon", "pt");
+print_R($cal->getTimeZone());
+print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
+echo "\n";
+
+?>
+==DONE==
+--EXPECTF--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Amsterdam
+ [rawOffset] => 3600000
+ [currentOffset] => %d
+)
+nl
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Lisbon
+ [rawOffset] => 0
+ [currentOffset] => %d
+)
+nl
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Lisbon
+ [rawOffset] => 0
+ [currentOffset] => %d
+)
+nl
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Amsterdam
+ [rawOffset] => 3600000
+ [currentOffset] => %d
+)
+pt
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Lisbon
+ [rawOffset] => 0
+ [currentOffset] => %d
+)
+pt
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_equals_before_after_basic.phpt b/ext/intl/tests/calendar_equals_before_after_basic.phpt
new file mode 100644
index 000000000..50543ad0b
--- /dev/null
+++ b/ext/intl/tests/calendar_equals_before_after_basic.phpt
@@ -0,0 +1,59 @@
+--TEST--
+IntlCalendar::equals(), ::before() and ::after() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal1 = new IntlGregorianCalendar(2012, 1, 29, 16, 59, 59);
+$intlcal2 = IntlCalendar::createInstance(null, '@calendar=japanese');
+$intlcal3 = new IntlGregorianCalendar(2012, 1, 29, 17, 00, 00);
+$intlcal2->setTime($intlcal1->getTime());
+
+var_dump($intlcal2->getType());
+
+var_dump("1 eq 1", $intlcal1->equals($intlcal1));
+
+var_dump("1 eq 2", $intlcal1->equals($intlcal2));
+var_dump("1 before 2", $intlcal1->before($intlcal2));
+var_dump("1 after 2", $intlcal1->after($intlcal2));
+
+var_dump("1 eq 3", $intlcal1->equals($intlcal3));
+var_dump("1 before 3", $intlcal1->before($intlcal3));
+var_dump("1 after 3", $intlcal1->after($intlcal3));
+
+var_dump("3 eq 2", intlcal_equals($intlcal3, $intlcal2));
+var_dump("3 before 2", intlcal_before($intlcal3, $intlcal2));
+var_dump("3 after 2", intlcal_after($intlcal3, $intlcal2));
+
+?>
+==DONE==
+--EXPECT--
+string(8) "japanese"
+string(6) "1 eq 1"
+bool(true)
+string(6) "1 eq 2"
+bool(true)
+string(10) "1 before 2"
+bool(false)
+string(9) "1 after 2"
+bool(false)
+string(6) "1 eq 3"
+bool(false)
+string(10) "1 before 3"
+bool(true)
+string(9) "1 after 3"
+bool(false)
+string(6) "3 eq 2"
+bool(false)
+string(10) "3 before 2"
+bool(false)
+string(9) "3 after 2"
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt
new file mode 100644
index 000000000..a947b42bf
--- /dev/null
+++ b/ext/intl/tests/calendar_equals_error.phpt
@@ -0,0 +1,46 @@
+--TEST--
+IntlCalendar::equals(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+function eh($errno, $errstr) {
+echo "error: $errno, $errstr\n";
+}
+set_error_handler('eh');
+
+var_dump($c->equals());
+var_dump($c->equals(new stdclass));
+var_dump($c->equals(1, 2));
+
+var_dump(intlcal_equals($c, array()));
+var_dump(intlcal_equals(1, $c));
+
+--EXPECT--
+error: 2, IntlCalendar::equals() expects exactly 1 parameter, 0 given
+error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given
+error: 2, IntlCalendar::equals() expects parameter 1 to be IntlCalendar, object given
+error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, integer given
+error: 2, IntlCalendar::equals() expects exactly 1 parameter, 2 given
+error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
+bool(false)
+error: 4096, Argument 2 passed to intlcal_equals() must be an instance of IntlCalendar, array given
+error: 2, intlcal_equals() expects parameter 2 to be IntlCalendar, array given
+error: 2, intlcal_equals(): intlcal_equals: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_equals() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_equals() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_equals(): intlcal_equals: bad arguments
+bool(false)
diff --git a/ext/intl/tests/calendar_fieldDifference_basic.phpt b/ext/intl/tests/calendar_fieldDifference_basic.phpt
new file mode 100644
index 000000000..3432420df
--- /dev/null
+++ b/ext/intl/tests/calendar_fieldDifference_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+IntlCalendar::fieldDifference() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000);
+var_dump(
+ $intlcal->fieldDifference(
+ strtotime('2012-02-29 06:06:08 +0000') * 1000,
+ IntlCalendar::FIELD_SECOND),
+ $intlcal->get(IntlCalendar::FIELD_HOUR_OF_DAY));
+
+
+$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000);
+var_dump(
+ intlcal_field_difference(
+ $intlcal,
+ strtotime('2012-02-29 06:07:08 +0000') * 1000,
+ IntlCalendar::FIELD_MINUTE));
+?>
+==DONE==
+--EXPECT--
+int(3601)
+int(6)
+int(61)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt
new file mode 100644
index 000000000..ef7e4fc8d
--- /dev/null
+++ b/ext/intl/tests/calendar_fieldDifference_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlCalendar::fieldDifference(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->fieldDifference($c, 2, 3));
+var_dump($c->fieldDifference(INF, 2));
+var_dump($c->fieldDifference(1));
+
+var_dump(intlcal_field_difference($c, 0, 1, 2));
+var_dump(intlcal_field_difference(1, 0, 1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::fieldDifference() expects exactly 2 parameters, 3 given in %s on line %d
+
+Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::fieldDifference() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_field_difference() expects exactly 3 parameters, 4 given in %s on line %d
+
+Warning: intlcal_field_difference(): intlcal_field_difference: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_fromDateTime_basic.phpt b/ext/intl/tests/calendar_fromDateTime_basic.phpt
new file mode 100644
index 000000000..1863b7815
--- /dev/null
+++ b/ext/intl/tests/calendar_fromDateTime_basic.phpt
@@ -0,0 +1,52 @@
+--TEST--
+IntlCalendar::fromDateTime(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl_NL");
+date_default_timezone_set('Europe/Lisbon');
+
+$cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00 Europe/Rome');
+var_dump(
+ $cal->getTime(),
+ strtotime('2012-01-01 00:00:00 Europe/Rome') * 1000.,
+ $cal->getTimeZone()->getID(),
+ $cal->getLocale(1)
+);
+echo "\n";
+
+$cal = IntlCalendar::fromDateTime(new DateTime('2012-01-01 00:00:00 PST'), "pt_PT");
+var_dump(
+ $cal->getTime(),
+ strtotime('2012-01-01 00:00:00 PST') * 1000.,
+ $cal->getTimeZone()->getID(),
+ $cal->getLocale(1)
+);
+
+echo "\n";
+
+$cal = intlcal_from_date_time(new DateTime('2012-01-01 00:00:00 +03:40'));
+var_dump(
+ $cal->getTime(),
+ strtotime('2012-01-01 00:00:00 +03:40') * 1000.,
+ $cal->getTimeZone()->getID()
+);
+
+--EXPECTF--
+float(1325372400000)
+float(1325372400000)
+string(11) "Europe/Rome"
+string(5) "nl_NL"
+
+float(1325404800000)
+float(1325404800000)
+string(3) "PST"
+string(5) "pt_PT"
+
+float(1325362800000)
+float(1325362800000)
+string(%d) "GMT+03%S40"
diff --git a/ext/intl/tests/calendar_fromDateTime_error.phpt b/ext/intl/tests/calendar_fromDateTime_error.phpt
new file mode 100644
index 000000000..2fbf7196f
--- /dev/null
+++ b/ext/intl/tests/calendar_fromDateTime_error.phpt
@@ -0,0 +1,59 @@
+--TEST--
+IntlCalendar::fromDateTime(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+date_default_timezone_set('Europe/Lisbon');
+
+var_dump(IntlCalendar::fromDateTime());
+var_dump(IntlCalendar::fromDateTime(0,1,2));
+
+try {
+IntlCalendar::fromDateTime("foobar");
+} catch (Exception $e) {
+ echo "threw exception, OK";
+}
+class A extends DateTime {
+function __construct() {}
+}
+
+var_dump(IntlCalendar::fromDateTime(new A));
+
+$date = new DateTime('2012-01-01 00:00:00 +24:00');
+var_dump(IntlCalendar::fromDateTime($date));
+
+$date = new DateTime('2012-01-01 00:00:00 WEST');
+var_dump(IntlCalendar::fromDateTime($date));
+
+var_dump(intlcal_from_date_time());
+
+--EXPECTF--
+
+Warning: IntlCalendar::fromDateTime() expects at least 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: bad arguments in %s on line %d
+NULL
+
+Warning: IntlCalendar::fromDateTime() expects at most 2 parameters, 3 given in %s on line %d
+
+Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: bad arguments in %s on line %d
+NULL
+threw exception, OK
+Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: DateTime object is unconstructed in %s on line %d
+NULL
+
+Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: object has an time zone offset that's too large in %s on line %d
+NULL
+
+Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
+NULL
+
+Warning: intlcal_from_date_time() expects at least 1 parameter, 0 given in %s on line %d
+
+Warning: intlcal_from_date_time(): intlcal_from_date_time: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/calendar_getAvailableLocales_basic.phpt b/ext/intl/tests/calendar_getAvailableLocales_basic.phpt
new file mode 100644
index 000000000..5d5b79c02
--- /dev/null
+++ b/ext/intl/tests/calendar_getAvailableLocales_basic.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlCalendar::getAvailableLocales() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$locales = IntlCalendar::getAvailableLocales();
+var_dump(count($locales) > 100);
+
+$locales = intlcal_get_available_locales();
+var_dump(in_array('pt', $locales));
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getAvailableLocales_error.phpt b/ext/intl/tests/calendar_getAvailableLocales_error.phpt
new file mode 100644
index 000000000..e9edc468e
--- /dev/null
+++ b/ext/intl/tests/calendar_getAvailableLocales_error.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlCalendar::getAvailableLocales(): bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(intlcal_get_available_locales(1));
+var_dump(IntlCalendar::getAvailableLocales(2));
+
+--EXPECTF--
+
+Warning: intlcal_get_available_locales() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: intlcal_get_available_locales(): intlcal_get_available_locales: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getAvailableLocales() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getAvailableLocales(): intlcal_get_available_locales: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt b/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt
new file mode 100644
index 000000000..d5319f147
--- /dev/null
+++ b/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlCalendar::getDayOfWeekType() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
+ die('skip for ICU 4.4+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime(strtotime('2012-02-29 00:00:00 +0000') * 1000);
+var_dump(
+ intlcal_get_day_of_week_type($intlcal, IntlCalendar::DOW_SUNDAY),
+ $intlcal->getDayOfWeekType(IntlCalendar::DOW_MONDAY),
+ $intlcal->getDayOfWeekType(IntlCalendar::DOW_TUESDAY),
+ $intlcal->getDayOfWeekType(IntlCalendar::DOW_FRIDAY),
+ $intlcal->getDayOfWeekType(IntlCalendar::DOW_SATURDAY)
+);
+
+?>
+==DONE==
+--EXPECT--
+int(3)
+int(0)
+int(0)
+int(0)
+int(1)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
new file mode 100644
index 000000000..392665561
--- /dev/null
+++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+IntlCalendar::getDayOfWeekOfType(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
+ die('skip for ICU 4.4+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getDayOfWeekType(1, 2));
+var_dump($c->getDayOfWeekType(0));
+var_dump($c->getDayOfWeekType());
+
+var_dump(intlcal_get_day_of_week_type($c, "foo"));
+var_dump(intlcal_get_day_of_week_type(1, 1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getDayOfWeekType() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: invalid day of week in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getDayOfWeekType() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_day_of_week_type() expects parameter 2 to be long, string given in %s on line %d
+
+Warning: intlcal_get_day_of_week_type(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt
new file mode 100644
index 000000000..13aab8192
--- /dev/null
+++ b/ext/intl/tests/calendar_getErrorCode_error.phpt
@@ -0,0 +1,26 @@
+--TEST--
+IntlCalendar::getErrorCode(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getErrorCode(array()));
+
+var_dump(intlcal_get_error_code(null));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s on line %d
diff --git a/ext/intl/tests/calendar_getErrorCode_getErrorMessage_basic.phpt b/ext/intl/tests/calendar_getErrorCode_getErrorMessage_basic.phpt
new file mode 100644
index 000000000..71c053492
--- /dev/null
+++ b/ext/intl/tests/calendar_getErrorCode_getErrorMessage_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlCalendar::getErrorCode(), ::getErrorMessage() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = new IntlGregorianCalendar(2012, 1, 29);
+var_dump(
+ $intlcal->getErrorCode(),
+ intlcal_get_error_code($intlcal),
+ $intlcal->getErrorMessage(),
+ intlcal_get_error_message($intlcal)
+);
+$intlcal->add(IntlCalendar::FIELD_SECOND, 2147483647);
+$intlcal->fieldDifference(-PHP_INT_MAX, IntlCalendar::FIELD_SECOND);
+
+var_dump(
+ $intlcal->getErrorCode(),
+ intlcal_get_error_code($intlcal),
+ $intlcal->getErrorMessage(),
+ intlcal_get_error_message($intlcal)
+);
+?>
+==DONE==
+--EXPECTF--
+int(0)
+int(0)
+string(12) "U_ZERO_ERROR"
+string(12) "U_ZERO_ERROR"
+
+Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in %s on line %d
+int(1)
+int(1)
+string(81) "intlcal_field_difference: Call to ICU method has failed: U_ILLEGAL_ARGUMENT_ERROR"
+string(81) "intlcal_field_difference: Call to ICU method has failed: U_ILLEGAL_ARGUMENT_ERROR"
+==DONE==
diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt
new file mode 100644
index 000000000..608183390
--- /dev/null
+++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt
@@ -0,0 +1,26 @@
+--TEST--
+IntlCalendar::getErrorMessage(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getErrorMessage(array()));
+
+var_dump(intlcal_get_error_message(null));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s on line %d
diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_basic.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_basic.phpt
new file mode 100644
index 000000000..82a0bc85c
--- /dev/null
+++ b/ext/intl/tests/calendar_getFirstDayOfWeek_basic.phpt
@@ -0,0 +1,20 @@
+--TEST--
+IntlCalendar::getFirstDayOfWeek() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump($intlcal->getFirstDayOfWeek());
+var_dump(intlcal_get_first_day_of_week($intlcal));
+?>
+==DONE==
+--EXPECT--
+int(2)
+int(2)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
new file mode 100644
index 000000000..e13b5138a
--- /dev/null
+++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::getFirstDayOfWeek(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getFirstDayOfWeek(1));
+
+var_dump(intlcal_get_first_day_of_week($c, 1));
+var_dump(intlcal_get_first_day_of_week(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getFirstDayOfWeek() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getFirstDayOfWeek(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_first_day_of_week() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_first_day_of_week(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt b/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt
new file mode 100644
index 000000000..dedfcea8f
--- /dev/null
+++ b/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+IntlCalendar::getKeywordValuesForLocale() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.2') < 0)
+ die('skip for ICU 4.2+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+print_r(
+iterator_to_array(
+IntlCalendar::getKeywordValuesForLocale('calendar', 'pt', true)
+));
+echo "\n";
+
+$var = iterator_to_array(
+intlcal_get_keyword_values_for_locale('calendar', 'pt', false)
+);
+var_dump(count($var) > 8);
+var_dump(in_array('japanese', $var));
+
+?>
+==DONE==
+--EXPECT--
+Array
+(
+ [0] => gregorian
+)
+
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt b/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
new file mode 100644
index 000000000..2aa8002bd
--- /dev/null
+++ b/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
@@ -0,0 +1,26 @@
+--TEST--
+IntlCalendar::getKeywordValuesForLocale(): bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.2') < 0)
+ die('skip for ICU 4.2+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(intlcal_get_keyword_values_for_locale(1, 2));
+var_dump(IntlCalendar::getKeywordValuesForLocale(1, 2, array()));
+
+--EXPECTF--
+
+Warning: intlcal_get_keyword_values_for_locale() expects exactly 3 parameters, 2 given in %s on line %d
+
+Warning: intlcal_get_keyword_values_for_locale(): intlcal_get_keyword_values_for_locale: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getKeywordValuesForLocale() expects parameter 3 to be boolean, array given in %s on line %d
+
+Warning: IntlCalendar::getKeywordValuesForLocale(): intlcal_get_keyword_values_for_locale: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/calendar_getLocale_basic.phpt b/ext/intl/tests/calendar_getLocale_basic.phpt
new file mode 100644
index 000000000..63f846f9a
--- /dev/null
+++ b/ext/intl/tests/calendar_getLocale_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlCalendar::getLocale() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump($intlcal->getLocale(Locale::ACTUAL_LOCALE));
+var_dump(intlcal_get_locale($intlcal, Locale::VALID_LOCALE));
+?>
+==DONE==
+--EXPECT--
+string(2) "nl"
+string(5) "nl_NL"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt
new file mode 100644
index 000000000..42970a9e7
--- /dev/null
+++ b/ext/intl/tests/calendar_getLocale_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlCalendar::getLocale(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getLocale());
+var_dump($c->getLocale(2));
+var_dump($c->getLocale(2, 3));
+
+var_dump(intlcal_get_locale($c));
+var_dump(intlcal_get_locale(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getLocale(): intlcal_get_locale: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getLocale(): intlcal_get_locale: invalid locale type in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::getLocale(): intlcal_get_locale: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlcal_get_locale(): intlcal_get_locale: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt
new file mode 100644
index 000000000..eeaa3104a
--- /dev/null
+++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlCalendar::getMinimalDaysInFirstWeek() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump($intlcal->getMinimalDaysInFirstWeek());
+var_dump(intlcal_get_minimal_days_in_first_week($intlcal));
+?>
+==DONE==
+--EXPECT--
+int(4)
+int(4)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
new file mode 100644
index 000000000..8e1971dc2
--- /dev/null
+++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::getMinimalDaysInFirstWeek(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getMinimalDaysInFirstWeek(1));
+
+var_dump(intlcal_get_minimal_days_in_first_week($c, 1));
+var_dump(intlcal_get_minimal_days_in_first_week(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getMinimalDaysInFirstWeek() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getMinimalDaysInFirstWeek(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_minimal_days_in_first_week() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_minimal_days_in_first_week(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getNow_basic.phpt b/ext/intl/tests/calendar_getNow_basic.phpt
new file mode 100644
index 000000000..18325dfa6
--- /dev/null
+++ b/ext/intl/tests/calendar_getNow_basic.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlCalendar::getNow() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$now = IntlCalendar::getNow();
+$proc_now = intlcal_get_now();
+$time = time();
+var_dump(abs($now - $proc_now) < 500);
+var_dump(abs($time * 1000 - $proc_now) < 1000);
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getNow_error.phpt b/ext/intl/tests/calendar_getNow_error.phpt
new file mode 100644
index 000000000..31991bb59
--- /dev/null
+++ b/ext/intl/tests/calendar_getNow_error.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlCalendar::getNow(): bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(intlcal_get_now(1));
+var_dump(IntlCalendar::getNow(2));
+
+--EXPECTF--
+
+Warning: intlcal_get_now() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: intlcal_get_now(): intlcal_get_now: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getNow() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getNow(): intlcal_get_now: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
new file mode 100644
index 000000000..e07135586
--- /dev/null
+++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
@@ -0,0 +1,47 @@
+--TEST--
+IntlCalendar::getSkipped/RepeatedWallTimeOption(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getSkippedWallTimeOption(1));
+var_dump($c->getRepeatedWallTimeOption(1));
+
+var_dump(intlcal_get_skipped_wall_time_option($c, 1));
+var_dump(intlcal_get_repeated_wall_time_option($c, 1));
+
+var_dump(intlcal_get_skipped_wall_time_option(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getSkippedWallTimeOption() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getSkippedWallTimeOption(): intlcal_get_skipped_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getRepeatedWallTimeOption() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getRepeatedWallTimeOption(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_skipped_wall_time_option() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_skipped_wall_time_option(): intlcal_get_skipped_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_repeated_wall_time_option() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_repeated_wall_time_option(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getTimeZone_basic.phpt b/ext/intl/tests/calendar_getTimeZone_basic.phpt
new file mode 100644
index 000000000..fd9aff1f9
--- /dev/null
+++ b/ext/intl/tests/calendar_getTimeZone_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlCalendar::getTimeZone() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('GMT+00:01');
+print_r($intlcal->getTimeZone());
+print_r(intlcal_get_time_zone($intlcal));
+?>
+==DONE==
+--EXPECT--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT+00:01
+ [rawOffset] => 60000
+ [currentOffset] => 60000
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT+00:01
+ [rawOffset] => 60000
+ [currentOffset] => 60000
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt
new file mode 100644
index 000000000..470701cd9
--- /dev/null
+++ b/ext/intl/tests/calendar_getTimeZone_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::getTimeZone(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getTimeZone(1));
+
+var_dump(intlcal_get_time_zone($c, 1));
+var_dump(intlcal_get_time_zone(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getTimeZone(): intlcal_get_time_zone: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_time_zone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_time_zone(): intlcal_get_time_zone: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getTime_basic.phpt b/ext/intl/tests/calendar_getTime_basic.phpt
new file mode 100644
index 000000000..659c71c96
--- /dev/null
+++ b/ext/intl/tests/calendar_getTime_basic.phpt
@@ -0,0 +1,29 @@
+--TEST--
+IntlCalendar::getTime() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->clear();
+$intlcal->set(IntlCalendar::FIELD_YEAR, 2012);
+$intlcal->set(IntlCalendar::FIELD_MONTH, 1 /* Feb */);
+$intlcal->set(IntlCalendar::FIELD_DAY_OF_MONTH, 29);
+
+$time = strtotime('2012-02-29 00:00:00 +0000');
+
+var_dump((float)$time*1000, $intlcal->getTime());
+
+?>
+==DONE==
+--EXPECT--
+float(1330473600000)
+float(1330473600000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt
new file mode 100644
index 000000000..5d27e2110
--- /dev/null
+++ b/ext/intl/tests/calendar_getTime_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+IntlCalendar::getTime(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getTime(1));
+
+var_dump(intlcal_get_time($c, 1));
+var_dump(intlcal_get_time(1));
+--EXPECTF--
+
+Warning: IntlCalendar::getTime() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getTime(): intlcal_get_time: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_time() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_time(): intlcal_get_time: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getType_basic.phpt b/ext/intl/tests/calendar_getType_basic.phpt
new file mode 100644
index 000000000..ba32dd052
--- /dev/null
+++ b/ext/intl/tests/calendar_getType_basic.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlCalendar::getType() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance();
+VAR_DUMP($intlcal->getType());
+$intlcal = IntlCalendar::createInstance(null, "nl_NL@calendar=hebrew");
+VAR_DUMP(intlcal_get_type($intlcal));
+?>
+==DONE==
+--EXPECT--
+string(9) "gregorian"
+string(6) "hebrew"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt
new file mode 100644
index 000000000..668ebeafb
--- /dev/null
+++ b/ext/intl/tests/calendar_getType_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::getType(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getType(1));
+
+var_dump(intlcal_get_type($c, 1));
+var_dump(intlcal_get_type(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getType() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::getType(): intlcal_get_type: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_get_type() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_get_type(): intlcal_get_type: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getWeekendTransition_basic.phpt b/ext/intl/tests/calendar_getWeekendTransition_basic.phpt
new file mode 100644
index 000000000..e72574300
--- /dev/null
+++ b/ext/intl/tests/calendar_getWeekendTransition_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlCalendar::getWeekendTransition() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
+ die('skip for ICU 4.4+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance();
+var_dump($intlcal->getWeekendTransition(IntlCalendar::DOW_SUNDAY));
+var_dump(intlcal_get_weekend_transition($intlcal, IntlCalendar::DOW_SUNDAY));
+?>
+==DONE==
+--EXPECT--
+int(86400000)
+int(86400000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
new file mode 100644
index 000000000..f7c9cc7ed
--- /dev/null
+++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+IntlCalendar::getWeekendTransition(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
+ die('skip for ICU 4.4+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getWeekendTransition());
+var_dump($c->getWeekendTransition(1, 2));
+var_dump($c->getWeekendTransition(0));
+
+var_dump(intlcal_get_weekend_transition($c));
+var_dump(intlcal_get_weekend_transition(1, 1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d
+bool(false)
+
+Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_getXMaximum_basic.phpt b/ext/intl/tests/calendar_getXMaximum_basic.phpt
new file mode 100644
index 000000000..9b840212d
--- /dev/null
+++ b/ext/intl/tests/calendar_getXMaximum_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlCalendar::getMaximum(), ::getActualMaximum(), ::getLeastMaximum() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000);
+var_dump(
+ $intlcal->getLeastMaximum(IntlCalendar::FIELD_DAY_OF_MONTH),
+ intlcal_get_least_maximum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH),
+ $intlcal->getActualMaximum(IntlCalendar::FIELD_DAY_OF_MONTH),
+ intlcal_get_actual_maximum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH),
+ $intlcal->getMaximum(IntlCalendar::FIELD_DAY_OF_MONTH),
+ intlcal_get_maximum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH)
+);
+
+?>
+==DONE==
+--EXPECT--
+int(28)
+int(28)
+int(29)
+int(29)
+int(31)
+int(31)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_getXMinimum_basic.phpt b/ext/intl/tests/calendar_getXMinimum_basic.phpt
new file mode 100644
index 000000000..83fd16380
--- /dev/null
+++ b/ext/intl/tests/calendar_getXMinimum_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlCalendar::getMinimum(), ::getActualMinimum(), ::getGreatestMinimum() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000);
+var_dump(
+ $intlcal->getGreatestMinimum(IntlCalendar::FIELD_DAY_OF_MONTH),
+ intlcal_get_greatest_minimum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH),
+ $intlcal->getActualMinimum(IntlCalendar::FIELD_DAY_OF_MONTH),
+ intlcal_get_actual_minimum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH),
+ $intlcal->getMinimum(IntlCalendar::FIELD_DAY_OF_MONTH),
+ intlcal_get_minimum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH)
+);
+
+?>
+==DONE==
+--EXPECT--
+int(1)
+int(1)
+int(1)
+int(1)
+int(1)
+int(1)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
new file mode 100644
index 000000000..acd9b58c1
--- /dev/null
+++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
@@ -0,0 +1,100 @@
+--TEST--
+IntlCalendar::get/Least/Greatest/Minimum/Maximum(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->getLeastMaximum());
+var_dump($c->getMaximum());
+var_dump($c->getGreatestMinimum());
+var_dump($c->getMinimum());
+
+var_dump($c->getLeastMaximum(-1));
+var_dump($c->getMaximum(-1));
+var_dump($c->getGreatestMinimum(-1));
+var_dump($c->getMinimum(-1));
+
+var_dump(intlcal_get_least_maximum($c, -1));
+var_dump(intlcal_get_maximum($c, -1));
+var_dump(intlcal_get_greatest_minimum($c, -1));
+var_dump(intlcal_get_minimum($c, -1));
+
+function eh($errno, $errstr) {
+echo "error: $errno, $errstr\n";
+}
+set_error_handler('eh');
+
+var_dump(intlcal_get_least_maximum(1, 1));
+var_dump(intlcal_get_maximum(1, 1));
+var_dump(intlcal_get_greatest_minimum(1, -1));
+var_dump(intlcal_get_minimum(1, -1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::getLeastMaximum() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getLeastMaximum(): intlcal_get_least_maximum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getMaximum() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getMaximum(): intlcal_get_maximum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getGreatestMinimum() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getGreatestMinimum(): intlcal_get_greatest_minimum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getMinimum() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getMinimum(): intlcal_get_minimum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getLeastMaximum(): intlcal_get_least_maximum: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getMaximum(): intlcal_get_maximum: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getGreatestMinimum(): intlcal_get_greatest_minimum: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getMinimum(): intlcal_get_minimum: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_get_least_maximum(): intlcal_get_least_maximum: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_get_maximum(): intlcal_get_maximum: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_get_greatest_minimum(): intlcal_get_greatest_minimum: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_get_minimum(): intlcal_get_minimum: invalid field in %s on line %d
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get_least_maximum() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get_least_maximum() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_get_least_maximum(): intlcal_get_least_maximum: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get_maximum() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get_maximum() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_get_maximum(): intlcal_get_maximum: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get_greatest_minimum() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get_greatest_minimum() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_get_greatest_minimum(): intlcal_get_greatest_minimum: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get_minimum() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get_minimum() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_get_minimum(): intlcal_get_minimum: bad arguments
+bool(false)
diff --git a/ext/intl/tests/calendar_get_basic.phpt b/ext/intl/tests/calendar_get_basic.phpt
new file mode 100644
index 000000000..c61763961
--- /dev/null
+++ b/ext/intl/tests/calendar_get_basic.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlCalendar::get() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->set(IntlCalendar::FIELD_DAY_OF_MONTH, 4);
+
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH));
+var_dump(intlcal_get($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH));
+
+?>
+==DONE==
+--EXPECT--
+int(4)
+int(4)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
new file mode 100644
index 000000000..f6ccb128e
--- /dev/null
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
@@ -0,0 +1,84 @@
+--TEST--
+IntlCalendar::get/getActualMaximum/getActualMinimum(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->get());
+var_dump($c->getActualMaximum());
+var_dump($c->getActualMinimum());
+
+var_dump($c->get(-1));
+var_dump($c->getActualMaximum(-1));
+var_dump($c->getActualMinimum(-1));
+
+var_dump($c->get("s"));
+var_dump($c->getActualMaximum("s"));
+var_dump($c->getActualMinimum("s"));
+
+var_dump($c->get(1, 2));
+var_dump($c->getActualMaximum(1, 2));
+var_dump($c->getActualMinimum(1, 2));
+--EXPECTF--
+
+Warning: IntlCalendar::get() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMaximum() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMinimum() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::get(): intlcal_get: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::get() expects parameter 1 to be long, string given in %s on line %d
+
+Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMaximum() expects parameter 1 to be long, string given in %s on line %d
+
+Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMinimum() expects parameter 1 to be long, string given in %s on line %d
+
+Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::get() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMaximum() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::getActualMinimum() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
new file mode 100644
index 000000000..a8d1a4aa2
--- /dev/null
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
@@ -0,0 +1,71 @@
+--TEST--
+IntlCalendar::get/getActualMaximum/getActualMinimum(): bad arguments (procedural)
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+function eh($errno, $errstr) {
+echo "error: $errno, $errstr\n";
+}
+set_error_handler('eh');
+
+var_dump(intlcal_get($c));
+var_dump(intlcal_get_actual_maximum($c));
+var_dump(intlcal_get_actual_minimum($c));
+
+var_dump(intlcal_get($c, -1));
+var_dump(intlcal_get_actual_maximum($c, -1));
+var_dump(intlcal_get_actual_minimum($c, -1));
+
+var_dump(intlcal_get($c, "s"));
+var_dump(intlcal_get_actual_maximum($c, "s"));
+var_dump(intlcal_get_actual_minimum($c, "s"));
+
+var_dump(intlcal_get(1));
+var_dump(intlcal_get_actual_maximum(1));
+var_dump(intlcal_get_actual_minimum(1));
+--EXPECT--
+error: 2, intlcal_get() expects exactly 2 parameters, 1 given
+error: 2, intlcal_get(): intlcal_get: bad arguments
+bool(false)
+error: 2, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given
+error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
+bool(false)
+error: 2, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given
+error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
+bool(false)
+error: 2, intlcal_get(): intlcal_get: invalid field
+bool(false)
+error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: invalid field
+bool(false)
+error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: invalid field
+bool(false)
+error: 2, intlcal_get() expects parameter 2 to be long, string given
+error: 2, intlcal_get(): intlcal_get: bad arguments
+bool(false)
+error: 2, intlcal_get_actual_maximum() expects parameter 2 to be long, string given
+error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
+bool(false)
+error: 2, intlcal_get_actual_minimum() expects parameter 2 to be long, string given
+error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get() expects exactly 2 parameters, 1 given
+error: 2, intlcal_get(): intlcal_get: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get_actual_maximum() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given
+error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_get_actual_minimum() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given
+error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
+bool(false)
diff --git a/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt b/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt
new file mode 100644
index 000000000..52765433f
--- /dev/null
+++ b/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt
@@ -0,0 +1,49 @@
+--TEST--
+IntlCalendar::get/setRepeatedWallTimeOption(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+//28 October 2012, transition from DST
+$intlcal = new IntlGregorianCalendar(2012, 9, 28, 0, 0, 0);
+var_dump($intlcal->setRepeatedWallTimeOption(IntlCalendar::WALLTIME_LAST));
+var_dump($intlcal->getRepeatedWallTimeOption());
+$intlcal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 2);
+$intlcal->set(IntlCalendar::FIELD_MINUTE, 30);
+var_dump(
+ strtotime('2012-10-28 02:30:00 +0100'),
+ (int)($intlcal->getTime() /1000)
+);
+
+var_dump(intlcal_set_repeated_wall_time_option($intlcal, IntlCalendar::WALLTIME_FIRST));
+var_dump(intlcal_get_repeated_wall_time_option($intlcal));
+$intlcal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 2);
+$intlcal->set(IntlCalendar::FIELD_MINUTE, 30);
+var_dump(
+ strtotime('2012-10-28 02:30:00 +0200'),
+ (int)($intlcal->getTime() /1000)
+);
+
+?>
+==DONE==
+--EXPECT--
+
+bool(true)
+int(0)
+int(1351387800)
+int(1351387800)
+bool(true)
+int(1)
+int(1351384200)
+int(1351384200)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt b/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt
new file mode 100644
index 000000000..bbbf031c8
--- /dev/null
+++ b/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt
@@ -0,0 +1,67 @@
+--TEST--
+IntlCalendar::get/setSkippedWallTimeOption(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+//25 March 2012, transition to DST
+$intlcal = new IntlGregorianCalendar(2012, 2, 25, 0, 0, 0);
+var_dump($intlcal->getSkippedWallTimeOption());
+$intlcal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 2);
+$intlcal->set(IntlCalendar::FIELD_MINUTE, 30);
+echo "Should be 3h30\n";
+var_dump(
+ $intlcal->get(IntlCalendar::FIELD_HOUR_OF_DAY),
+ $intlcal->get(IntlCalendar::FIELD_MINUTE)
+);
+
+var_dump($intlcal->setSkippedWallTimeOption(IntlCalendar::WALLTIME_FIRST));
+var_dump(intlcal_get_skipped_wall_time_option($intlcal));
+$intlcal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 2);
+$intlcal->set(IntlCalendar::FIELD_MINUTE, 30);
+echo "Should be 1h30\n";
+var_dump(
+ $intlcal->get(IntlCalendar::FIELD_HOUR_OF_DAY),
+ $intlcal->get(IntlCalendar::FIELD_MINUTE)
+);
+
+var_dump(intlcal_set_skipped_wall_time_option($intlcal, IntlCalendar::WALLTIME_NEXT_VALID));
+var_dump($intlcal->getSkippedWallTimeOption());
+$intlcal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 2);
+$intlcal->set(IntlCalendar::FIELD_MINUTE, 30);
+echo "Should be 3h00\n";
+var_dump(
+ $intlcal->get(IntlCalendar::FIELD_HOUR_OF_DAY),
+ $intlcal->get(IntlCalendar::FIELD_MINUTE)
+);
+
+
+?>
+==DONE==
+--EXPECT--
+
+int(0)
+Should be 3h30
+int(3)
+int(30)
+bool(true)
+int(1)
+Should be 1h30
+int(1)
+int(30)
+bool(true)
+int(2)
+Should be 3h00
+int(3)
+int(0)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_inDaylightTime_basic.phpt b/ext/intl/tests/calendar_inDaylightTime_basic.phpt
new file mode 100644
index 000000000..dff8ef50d
--- /dev/null
+++ b/ext/intl/tests/calendar_inDaylightTime_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlCalendar::inDaylightTime() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('Europe/Amsterdam');
+$intlcal->setTime(strtotime('2012-01-01') * 1000);
+var_dump($intlcal->inDaylightTime());
+$intlcal->setTime(strtotime('2012-04-01') * 1000);
+var_dump(intlcal_in_daylight_time($intlcal));
+?>
+==DONE==
+--EXPECT--
+bool(false)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt
new file mode 100644
index 000000000..9af9aa504
--- /dev/null
+++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::inDaylightTime(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->inDaylightTime(1));
+
+var_dump(intlcal_in_daylight_time($c, 1));
+var_dump(intlcal_in_daylight_time(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::inDaylightTime() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::inDaylightTime(): intlcal_in_daylight_time: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_in_daylight_time() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_in_daylight_time(): intlcal_in_daylight_time: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_isEquivalentTo_basic.phpt b/ext/intl/tests/calendar_isEquivalentTo_basic.phpt
new file mode 100644
index 000000000..f71fd8ad5
--- /dev/null
+++ b/ext/intl/tests/calendar_isEquivalentTo_basic.phpt
@@ -0,0 +1,40 @@
+--TEST--
+IntlCalendar::isEquivalentTo() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal1 = IntlCalendar::createInstance('Europe/Amsterdam');
+$intlcal2 = IntlCalendar::createInstance('Europe/Lisbon');
+$intlcal3 = IntlCalendar::createInstance('Europe/Amsterdam', "nl_NL@calendar=islamic");
+$intlcal4 = IntlCalendar::createInstance('Europe/Amsterdam');
+$intlcal4->roll(IntlCalendar::FIELD_MONTH, true);
+
+var_dump(
+ "1 - 1",
+ $intlcal1->isEquivalentTo($intlcal1),
+ "1 - 2",
+ $intlcal1->isEquivalentTo($intlcal2),
+ "1 - 3",
+ $intlcal1->isEquivalentTo($intlcal3),
+ "1 - 4",
+ $intlcal1->isEquivalentTo($intlcal4)
+);
+
+?>
+==DONE==
+--EXPECT--
+string(5) "1 - 1"
+bool(true)
+string(5) "1 - 2"
+bool(false)
+string(5) "1 - 3"
+bool(false)
+string(5) "1 - 4"
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
new file mode 100644
index 000000000..4fa7da5eb
--- /dev/null
+++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
@@ -0,0 +1,50 @@
+--TEST--
+IntlCalendar::isEquivalentTo(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+function eh($errno, $errstr) {
+echo "error: $errno, $errstr\n";
+}
+set_error_handler('eh');
+
+var_dump($c->isEquivalentTo(0));
+var_dump($c->isEquivalentTo($c, 1));
+var_dump($c->isEquivalentTo(1));
+
+var_dump(intlcal_is_equivalent_to($c));
+var_dump(intlcal_is_equivalent_to($c, 1));
+var_dump(intlcal_is_equivalent_to(1, $c));
+
+--EXPECT--
+error: 4096, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, integer given
+error: 2, IntlCalendar::isEquivalentTo() expects parameter 1 to be IntlCalendar, integer given
+error: 2, IntlCalendar::isEquivalentTo(): intlcal_is_equivalent_to: bad arguments
+bool(false)
+error: 2, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given
+error: 2, IntlCalendar::isEquivalentTo(): intlcal_is_equivalent_to: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, integer given
+error: 2, IntlCalendar::isEquivalentTo() expects parameter 1 to be IntlCalendar, integer given
+error: 2, IntlCalendar::isEquivalentTo(): intlcal_is_equivalent_to: bad arguments
+bool(false)
+error: 2, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given
+error: 2, intlcal_is_equivalent_to(): intlcal_is_equivalent_to: bad arguments
+bool(false)
+error: 4096, Argument 2 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_is_equivalent_to() expects parameter 2 to be IntlCalendar, integer given
+error: 2, intlcal_is_equivalent_to(): intlcal_is_equivalent_to: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_is_equivalent_to() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_is_equivalent_to(): intlcal_is_equivalent_to: bad arguments
+bool(false)
diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt
new file mode 100644
index 000000000..7ddde1ae0
--- /dev/null
+++ b/ext/intl/tests/calendar_isLenient_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::isLenient(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->isLenient(1));
+
+var_dump(intlcal_is_lenient($c, 1));
+var_dump(intlcal_is_lenient(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::isLenient() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::isLenient(): intlcal_is_lenient: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_is_lenient() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_is_lenient(): intlcal_is_lenient: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_isSet_basic.phpt b/ext/intl/tests/calendar_isSet_basic.phpt
new file mode 100644
index 000000000..8ef01448d
--- /dev/null
+++ b/ext/intl/tests/calendar_isSet_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlCalendar::isSet() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump($intlcal->isSet(IntlCalendar::FIELD_MINUTE));
+$intlcal->clear(IntlCalendar::FIELD_MINUTE);
+var_dump($intlcal->isSet(IntlCalendar::FIELD_MINUTE));
+$intlcal->set(IntlCalendar::FIELD_MINUTE, 0);
+var_dump(intlcal_is_set($intlcal, IntlCalendar::FIELD_MINUTE));
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt
new file mode 100644
index 000000000..f238d776b
--- /dev/null
+++ b/ext/intl/tests/calendar_isSet_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlCalendar::isSet(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->isSet());
+var_dump($c->isSet(1, 2));
+var_dump($c->isSet(-1));
+
+var_dump(intlcal_is_set($c));
+var_dump(intlcal_is_set(1, 2));
+
+--EXPECTF--
+
+Warning: IntlCalendar::isSet() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::isSet(): intlcal_is_set: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::isSet() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::isSet(): intlcal_is_set: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::isSet(): intlcal_is_set: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_is_set() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlcal_is_set(): intlcal_is_set: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_isWeekend_basic.phpt b/ext/intl/tests/calendar_isWeekend_basic.phpt
new file mode 100644
index 000000000..d6452c71f
--- /dev/null
+++ b/ext/intl/tests/calendar_isWeekend_basic.phpt
@@ -0,0 +1,26 @@
+--TEST--
+IntlCalendar::isWeekend basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
+ die('skip for ICU 4.4+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump($intlcal->isWeekend(strtotime('2012-02-29 12:00:00 +0000') * 1000));
+var_dump(intlcal_is_weekend($intlcal, strtotime('2012-02-29 12:00:00 +0000') * 1000));
+var_dump($intlcal->isWeekend(strtotime('2012-03-11 12:00:00 +0000') * 1000));
+?>
+==DONE==
+--EXPECT--
+bool(false)
+bool(false)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
new file mode 100644
index 000000000..7939a66a1
--- /dev/null
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -0,0 +1,38 @@
+--TEST--
+IntlCalendar::isWeekend(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
+ die('skip for ICU 4.4+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->isWeekend(1, 2));
+var_dump($c->isWeekend("jhhk"));
+
+var_dump(intlcal_is_weekend($c, "jj"));
+var_dump(intlcal_is_weekend(1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::isWeekend() expects parameter 1 to be double, string given in %s on line %d
+
+Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_is_weekend() expects parameter 2 to be double, string given in %s on line %d
+
+Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_is_set_lenient_basic.phpt b/ext/intl/tests/calendar_is_set_lenient_basic.phpt
new file mode 100644
index 000000000..64f537f9b
--- /dev/null
+++ b/ext/intl/tests/calendar_is_set_lenient_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlCalendar::isLenient(), ::setLenient() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal1 = IntlCalendar::createInstance('UTC');
+var_dump($intlcal1->isLenient());
+var_dump(intlcal_is_lenient($intlcal1));
+var_dump($intlcal1->setLenient(false));
+var_dump($intlcal1->isLenient());
+var_dump(intlcal_set_lenient($intlcal1, true));
+var_dump($intlcal1->isLenient());
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_roll_basic.phpt b/ext/intl/tests/calendar_roll_basic.phpt
new file mode 100644
index 000000000..971c36217
--- /dev/null
+++ b/ext/intl/tests/calendar_roll_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlCalendar::roll() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = new IntlGregorianCalendar(2012, 1, 28);
+var_dump($intlcal->roll(IntlCalendar::FIELD_DAY_OF_MONTH, 2));
+var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //1
+
+$intlcal = new IntlGregorianCalendar(2012, 1, 28);
+var_dump(intlcal_roll($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH, 2));
+var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //1
+
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+int(1)
+int(1)
+bool(true)
+int(1)
+int(1)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt
new file mode 100644
index 000000000..a56739469
--- /dev/null
+++ b/ext/intl/tests/calendar_roll_error.phpt
@@ -0,0 +1,37 @@
+--TEST--
+IntlCalendar::roll(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->roll(1, 2, 3));
+var_dump($c->roll(-1, 2));
+var_dump($c->roll(1));
+
+var_dump(intlcal_roll($c, 1, 2, 3));
+var_dump(intlcal_roll(1, 2, 3));
+--EXPECTF--
+
+Warning: IntlCalendar::roll(): intlcal_set: too many arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::roll(): intlcal_roll: invalid field in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::roll() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::roll(): intlcal_roll: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_roll(): intlcal_set: too many arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_roll_variation1.phpt b/ext/intl/tests/calendar_roll_variation1.phpt
new file mode 100644
index 000000000..9fb8d75e5
--- /dev/null
+++ b/ext/intl/tests/calendar_roll_variation1.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlCalendar::roll() bool argument variation
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = new IntlGregorianCalendar(2012, 1, 28);
+var_dump($intlcal->roll(IntlCalendar::FIELD_DAY_OF_MONTH, true));
+var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //29
+
+var_dump(intlcal_roll($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH, false));
+var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //28
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+int(1)
+int(29)
+bool(true)
+int(1)
+int(28)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_basic.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_basic.phpt
new file mode 100644
index 000000000..79b38104e
--- /dev/null
+++ b/ext/intl/tests/calendar_setFirstDayOfWeek_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlCalendar::setFirstDayOfWeek() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+var_dump(
+ IntlCalendar::DOW_TUESDAY,
+ $intlcal->setFirstDayOfWeek(IntlCalendar::DOW_TUESDAY),
+ $intlcal->getFirstDayOfWeek(),
+ intlcal_set_first_day_of_week($intlcal, IntlCalendar::DOW_WEDNESDAY),
+ $intlcal->getFirstDayOfWeek()
+);
+?>
+==DONE==
+--EXPECT--
+int(3)
+bool(true)
+int(3)
+bool(true)
+int(4)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
new file mode 100644
index 000000000..98237e56f
--- /dev/null
+++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
@@ -0,0 +1,40 @@
+--TEST--
+IntlCalendar::setFirstDayOfWeek(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->setFirstDayOfWeek());
+var_dump($c->setFirstDayOfWeek(1, 2));
+var_dump($c->setFirstDayOfWeek(0));
+
+var_dump(intlcal_set_first_day_of_week($c, 0));
+var_dump(intlcal_set_first_day_of_week(1, 2));
+
+--EXPECTF--
+
+Warning: IntlCalendar::setFirstDayOfWeek() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setFirstDayOfWeek() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d
+bool(false)
+
+Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt
new file mode 100644
index 000000000..2b1d7b016
--- /dev/null
+++ b/ext/intl/tests/calendar_setLenient_error.phpt
@@ -0,0 +1,44 @@
+--TEST--
+IntlCalendar::setLenient(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->setLenient());
+var_dump($c->setLenient(array()));
+var_dump($c->setLenient(1, 2));
+
+var_dump(intlcal_set_lenient($c, array()));
+var_dump(intlcal_set_lenient(1, false));
+
+--EXPECTF--
+
+Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setLenient() expects parameter 1 to be boolean, array given in %s on line %d
+
+Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_set_lenient() expects parameter 2 to be boolean, array given in %s on line %d
+
+Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
new file mode 100644
index 000000000..dab55d2b2
--- /dev/null
+++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
@@ -0,0 +1,82 @@
+--TEST--
+IntlCalendar::setSkipped/RepeatedWallTimeOption(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->setSkippedWallTimeOption());
+var_dump($c->setRepeatedWallTimeOption());
+
+var_dump($c->setSkippedWallTimeOption(1, 2));
+var_dump($c->setRepeatedWallTimeOption(1, 2));
+
+var_dump($c->setSkippedWallTimeOption(array()));
+var_dump($c->setRepeatedWallTimeOption(array()));
+
+var_dump($c->setSkippedWallTimeOption(3));
+var_dump($c->setRepeatedWallTimeOption(2));
+
+var_dump(intlcal_set_skipped_wall_time_option($c));
+var_dump(intlcal_set_repeated_wall_time_option($c));
+
+var_dump(intlcal_set_repeated_wall_time_option(1, 1));
+
+--EXPECTF--
+
+Warning: IntlCalendar::setSkippedWallTimeOption() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setRepeatedWallTimeOption() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setSkippedWallTimeOption() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setRepeatedWallTimeOption() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setSkippedWallTimeOption() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setRepeatedWallTimeOption() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: invalid option in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: invalid option in %s on line %d
+bool(false)
+
+Warning: intlcal_set_skipped_wall_time_option() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlcal_set_skipped_wall_time_option(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_set_repeated_wall_time_option() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlcal_set_repeated_wall_time_option(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_setTimeZone_basic.phpt b/ext/intl/tests/calendar_setTimeZone_basic.phpt
new file mode 100644
index 000000000..525840ddd
--- /dev/null
+++ b/ext/intl/tests/calendar_setTimeZone_basic.phpt
@@ -0,0 +1,39 @@
+--TEST--
+IntlCalendar::setTimeZone() basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('Europe/Amsterdam');
+print_r($intlcal->getTimeZone()->getID());
+echo "\n";
+var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
+
+$intlcal->setTimeZone(IntlTimeZone::getGMT());
+print_r($intlcal->getTimeZone()->getID());
+echo "\n";
+var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
+
+intlcal_set_time_zone($intlcal,
+ IntlTimeZone::createTimeZone('GMT+05:30'));
+print_r($intlcal->getTimeZone()->getID());
+echo "\n";
+var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
+
+?>
+==DONE==
+--EXPECT--
+Europe/Amsterdam
+int(3600000)
+GMT
+int(0)
+GMT+05:30
+int(19800000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt
new file mode 100644
index 000000000..ebe4d119e
--- /dev/null
+++ b/ext/intl/tests/calendar_setTimeZone_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlCalendar::setTimeZone(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+$gmt = IntlTimeZone::getGMT();
+
+function eh($errno, $errstr) {
+echo "error: $errno, $errstr\n";
+}
+set_error_handler('eh');
+
+var_dump($c->setTimeZone($gmt, 2));
+var_dump($c->setTimeZone());
+
+var_dump(intlcal_set_time_zone($c, 1, 2));
+var_dump(intlcal_set_time_zone(1, $gmt));
+
+--EXPECT--
+error: 2, IntlCalendar::setTimeZone() expects exactly 1 parameter, 2 given
+error: 2, IntlCalendar::setTimeZone(): intlcal_set_time_zone: bad arguments
+bool(false)
+error: 2, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given
+error: 2, IntlCalendar::setTimeZone(): intlcal_set_time_zone: bad arguments
+bool(false)
+error: 2, intlcal_set_time_zone() expects exactly 2 parameters, 3 given
+error: 2, intlcal_set_time_zone(): intlcal_set_time_zone: bad arguments
+bool(false)
+error: 4096, Argument 1 passed to intlcal_set_time_zone() must be an instance of IntlCalendar, integer given
+error: 2, intlcal_set_time_zone() expects parameter 1 to be IntlCalendar, integer given
+error: 2, intlcal_set_time_zone(): intlcal_set_time_zone: bad arguments
+bool(false)
diff --git a/ext/intl/tests/calendar_setTimeZone_error2.phpt b/ext/intl/tests/calendar_setTimeZone_error2.phpt
new file mode 100644
index 000000000..aa1eaba20
--- /dev/null
+++ b/ext/intl/tests/calendar_setTimeZone_error2.phpt
@@ -0,0 +1,29 @@
+--TEST--
+IntlCalendar::setTimeZone(): valid time zones for DateTime but not ICU
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+date_default_timezone_set('Europe/Amsterdam');
+
+$intlcal = new IntlGregorianCalendar();
+
+$pstdate = new DateTime('2012-01-01 00:00:00 WEST');
+$intlcal->setTimeZone($pstdate->getTimeZone());
+var_dump($intlcal->getTimeZone()->getID());
+
+$pstdate = new DateTime('2012-01-01 00:00:00 +24:00');
+$intlcal->setTimeZone($pstdate->getTimeZone());
+var_dump($intlcal->getTimeZone()->getID());
+
+--EXPECTF--
+
+Warning: IntlCalendar::setTimeZone(): intlcal_set_time_zone: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
+string(16) "Europe/Amsterdam"
+
+Warning: IntlCalendar::setTimeZone(): intlcal_set_time_zone: object has an time zone offset that's too large in %s on line %d
+string(16) "Europe/Amsterdam"
diff --git a/ext/intl/tests/calendar_setTimeZone_variation1.phpt b/ext/intl/tests/calendar_setTimeZone_variation1.phpt
new file mode 100644
index 000000000..b1cbb74ed
--- /dev/null
+++ b/ext/intl/tests/calendar_setTimeZone_variation1.phpt
@@ -0,0 +1,30 @@
+--TEST--
+IntlCalendar::setTimeZone() variation with NULL arg
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('Europe/Amsterdam');
+print_r($intlcal->getTimeZone()->getID());
+echo "\n";
+var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
+
+/* passing NULL has no effect */
+$intlcal->setTimeZone(null);
+print_r($intlcal->getTimeZone()->getID());
+echo "\n";
+var_dump($intlcal->get(IntlCalendar::FIELD_ZONE_OFFSET));
+
+?>
+==DONE==
+--EXPECT--
+Europe/Amsterdam
+int(3600000)
+Europe/Amsterdam
+int(3600000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_setTimeZone_variation2.phpt b/ext/intl/tests/calendar_setTimeZone_variation2.phpt
new file mode 100644
index 000000000..7f4a7ffa3
--- /dev/null
+++ b/ext/intl/tests/calendar_setTimeZone_variation2.phpt
@@ -0,0 +1,30 @@
+--TEST--
+IntlCalendar::setTimeZone(): different ways to specify time zone
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+date_default_timezone_set('Europe/Amsterdam');
+
+$intlcal = new IntlGregorianCalendar();
+$intlcal->setTimeZone('Europe/Paris');
+var_dump($intlcal->getTimeZone()->getID());
+$intlcal->setTimeZone(new DateTimeZone('Europe/Madrid'));
+var_dump($intlcal->getTimeZone()->getID());
+
+$pstdate = new DateTime('2012-01-01 00:00:00 PST');
+$intlcal->setTimeZone($pstdate->getTimeZone());
+var_dump($intlcal->getTimeZone()->getID());
+
+$offsetdate = new DateTime('2012-01-01 00:00:00 -02:30');
+$intlcal->setTimeZone($offsetdate->getTimeZone());
+var_dump($intlcal->getTimeZone()->getID());
+--EXPECTF--
+string(12) "Europe/Paris"
+string(13) "Europe/Madrid"
+string(3) "PST"
+string(%d) "GMT-02%S30"
diff --git a/ext/intl/tests/calendar_setTime_basic.phpt b/ext/intl/tests/calendar_setTime_basic.phpt
new file mode 100644
index 000000000..f7f213c0d
--- /dev/null
+++ b/ext/intl/tests/calendar_setTime_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlCalendar::setTime() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$time = strtotime('2012-02-29 00:00:00 +0000');
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->setTime($time * 1000);
+
+var_dump(
+ (float)$time*1000,
+ $intlcal->getTime());
+
+$intlcal = IntlCalendar::createInstance('UTC');
+intlcal_set_time($intlcal,$time * 1000);
+var_dump(intlcal_get_time($intlcal));
+
+?>
+==DONE==
+--EXPECT--
+float(1330473600000)
+float(1330473600000)
+float(1330473600000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt
new file mode 100644
index 000000000..71c5b0a1b
--- /dev/null
+++ b/ext/intl/tests/calendar_setTime_error.phpt
@@ -0,0 +1,37 @@
+--TEST--
+IntlCalendar::setTime(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->setTime(1, 2));
+var_dump($c->setTime("jjj"));
+
+var_dump(intlcal_set_time($c, 1, 2));
+var_dump(intlcal_set_time(1));
+--EXPECTF--
+
+Warning: IntlCalendar::setTime() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::setTime() expects parameter 1 to be double, string given in %s on line %d
+
+Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line %d
+
+Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_set_basic.phpt b/ext/intl/tests/calendar_set_basic.phpt
new file mode 100644
index 000000000..8eccb32da
--- /dev/null
+++ b/ext/intl/tests/calendar_set_basic.phpt
@@ -0,0 +1,27 @@
+--TEST--
+IntlCalendar::set() basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance();
+var_dump($intlcal->set(IntlCalendar::FIELD_DAY_OF_MONTH, 2));
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH));
+var_dump(intlcal_set($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH, 3));
+var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH));
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+int(2)
+bool(true)
+int(3)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt
new file mode 100644
index 000000000..669b1888e
--- /dev/null
+++ b/ext/intl/tests/calendar_set_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlCalendar::set(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+var_dump($c->set(1));
+var_dump($c->set(1, 2, 3, 4));
+var_dump($c->set(1, 2, 3, 4, 5, 6, 7));
+var_dump($c->set(-1, 2));
+
+var_dump(intlcal_set($c, -1, 2));
+var_dump(intlcal_set(1, 2, 3));
+--EXPECTF--
+
+Warning: IntlCalendar::set() expects at least 2 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::set(): intlcal_set: too many arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::set(): intlcal_set: invalid field in %s on line %d
+bool(false)
+
+Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/calendar_set_variation1.phpt b/ext/intl/tests/calendar_set_variation1.phpt
new file mode 100644
index 000000000..8ea016ed6
--- /dev/null
+++ b/ext/intl/tests/calendar_set_variation1.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlCalendar::set() argument variations
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$intlcal = IntlCalendar::createInstance('UTC');
+$intlcal->clear();
+var_dump($intlcal->set(2012, 1, 29));
+var_dump($intlcal->getTime(),
+ strtotime('2012-02-29 00:00:00 +0000') * 1000.);
+
+//two minutes to midnight!
+var_dump($intlcal->set(2012, 1, 29, 23, 58));
+var_dump($intlcal->getTime(),
+ strtotime('2012-02-29 23:58:00 +0000') * 1000.);
+
+var_dump($intlcal->set(2012, 1, 29, 23, 58, 31));
+var_dump($intlcal->getTime(),
+ strtotime('2012-02-29 23:58:31 +0000') * 1000.);
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+float(1330473600000)
+float(1330473600000)
+bool(true)
+float(1330559880000)
+float(1330559880000)
+bool(true)
+float(1330559911000)
+float(1330559911000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_toDateTime_basic.phpt b/ext/intl/tests/calendar_toDateTime_basic.phpt
new file mode 100644
index 000000000..d38487dab
--- /dev/null
+++ b/ext/intl/tests/calendar_toDateTime_basic.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlCalendar::toDateTime(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+ini_set('date.timezone', 'Europe/Lisbon');
+
+$cal = new IntlGregorianCalendar(2012,04,17,17,35,36);
+
+$dt = $cal->toDateTime();
+
+var_dump($dt->format("c"), $dt->getTimeZone()->getName());
+?>
+==DONE==
+--EXPECT--
+string(25) "2012-05-17T17:35:36+01:00"
+string(13) "Europe/Lisbon"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt
new file mode 100644
index 000000000..961a9c86a
--- /dev/null
+++ b/ext/intl/tests/calendar_toDateTime_error.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlCalendar::toDateTime(): bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set('date.timezone', 'Europe/Lisbon');
+
+$cal = new IntlGregorianCalendar();
+var_dump($cal->toDateTime(3));
+
+var_dump(intlcal_to_date_time($cal, 3));
+
+$cal = new IntlGregorianCalendar("Etc/Unknown");
+try {
+var_dump($cal->toDateTime());
+} catch (Exception $e) {
+var_dump("exception: {$e->getMessage()}");
+}
+
+var_dump(intlcal_to_date_time(3));
+
+--EXPECTF--
+
+Warning: IntlCalendar::toDateTime() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlcal_to_date_time() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlcal_to_date_time(): intlcal_to_date_time: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d
+string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
+
+Catchable fatal error: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/cpbi_clone_equality.phpt b/ext/intl/tests/cpbi_clone_equality.phpt
new file mode 100644
index 000000000..c62b45274
--- /dev/null
+++ b/ext/intl/tests/cpbi_clone_equality.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlCodePointBreakIterator: clone and equality
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$text = 'ตัวอย่างข้อความ';
+$text2 = 'foo';
+
+$it = IntlBreakIterator::createCodePointInstance();
+$it->setText($text);
+
+$it_clone = clone $it;
+var_dump($it == $it_clone);
+
+$it->setText($text2 );
+var_dump($it == $it_clone);
+
+$it_clone->setText($text2);
+var_dump($it == $it_clone);
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+==DONE==
diff --git a/ext/intl/tests/cpbi_getLastCodePoint_basic.phpt b/ext/intl/tests/cpbi_getLastCodePoint_basic.phpt
new file mode 100644
index 000000000..74a07a629
--- /dev/null
+++ b/ext/intl/tests/cpbi_getLastCodePoint_basic.phpt
@@ -0,0 +1,82 @@
+--TEST--
+IntlCodepointBreakIterator::getLastCodePoint(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$text = 'ตัวอย่างข้อความ';
+
+$codepoint_it = IntlBreakIterator::createCodePointInstance();
+$codepoint_it->setText($text);
+
+var_dump($codepoint_it->getLastCodePoint());
+//first() and last() don't read codepoint and set the last code point var to -1
+//The pointer is after the last read codepoint if moving forward and
+//before the last read codepoint is moving backwards
+$p = $codepoint_it->first();
+while ($p != IntlBreakIterator::DONE) {
+ $c = $codepoint_it->getLastCodePoint();
+ if ($c > 0)
+ var_dump(sprintf('U+%04X', $codepoint_it->getLastCodePoint()));
+ else
+ var_dump($c);
+ //it's a post-increment operation as to the codepoint, i.e., it gives the codepoint
+ //starting at the initial position and only then moves the pointer forward
+ $p = $codepoint_it->next();
+}
+
+echo "Now backwards\n";
+$p = $codepoint_it->last();
+while ($p != IntlBreakIterator::DONE) {
+ $c = $codepoint_it->getLastCodePoint();
+ if ($c > 0)
+ var_dump(sprintf('U+%04X', $codepoint_it->getLastCodePoint()));
+ else
+ var_dump($c);
+ $p = $codepoint_it->previous();
+}
+
+
+?>
+==DONE==
+--EXPECT--
+int(-1)
+int(-1)
+string(6) "U+0E15"
+string(6) "U+0E31"
+string(6) "U+0E27"
+string(6) "U+0E2D"
+string(6) "U+0E22"
+string(6) "U+0E48"
+string(6) "U+0E32"
+string(6) "U+0E07"
+string(6) "U+0E02"
+string(6) "U+0E49"
+string(6) "U+0E2D"
+string(6) "U+0E04"
+string(6) "U+0E27"
+string(6) "U+0E32"
+string(6) "U+0E21"
+Now backwards
+int(-1)
+string(6) "U+0E21"
+string(6) "U+0E32"
+string(6) "U+0E27"
+string(6) "U+0E04"
+string(6) "U+0E2D"
+string(6) "U+0E49"
+string(6) "U+0E02"
+string(6) "U+0E07"
+string(6) "U+0E32"
+string(6) "U+0E48"
+string(6) "U+0E22"
+string(6) "U+0E2D"
+string(6) "U+0E27"
+string(6) "U+0E31"
+string(6) "U+0E15"
+==DONE==
diff --git a/ext/intl/tests/cpbi_getLastCodePoint_error.phpt b/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
new file mode 100644
index 000000000..78bd21662
--- /dev/null
+++ b/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlBreakIterator::getLastCodePoint(): bad args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$it = IntlBreakIterator::createCodePointInstance();
+var_dump($it->getLastCodePoint(array()));
+--EXPECTF--
+
+Warning: IntlCodePointBreakIterator::getLastCodePoint() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlCodePointBreakIterator::getLastCodePoint(): cpbi_get_last_code_point: bad arguments in %s on line %d
+bool(false)
+
diff --git a/ext/intl/tests/cpbi_parts_iterator.phpt b/ext/intl/tests/cpbi_parts_iterator.phpt
new file mode 100644
index 000000000..4754c1237
--- /dev/null
+++ b/ext/intl/tests/cpbi_parts_iterator.phpt
@@ -0,0 +1,40 @@
+--TEST--
+IntlCodepointBreakIterator's part iterator
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$text = 'ตัวอย่างข้อความ';
+
+$it = IntlBreakIterator::createCodePointInstance()->getPartsIterator();
+$it->getBreakIterator()->setText($text);
+
+foreach ($it as $k => $v) {
+ echo "$k. $v (" . sprintf("U+%04X", $it->getBreakIterator()->getLastCodePoint()) .
+ ") at {$it->getBreakIterator()->current()}\r\n";
+}
+
+?>
+==DONE==
+--EXPECT--
+0. ต (U+0E15) at 3
+1. ั (U+0E31) at 6
+2. ว (U+0E27) at 9
+3. อ (U+0E2D) at 12
+4. ย (U+0E22) at 15
+5. ่ (U+0E48) at 18
+6. า (U+0E32) at 21
+7. ง (U+0E07) at 24
+8. ข (U+0E02) at 27
+9. ้ (U+0E49) at 30
+10. อ (U+0E2D) at 33
+11. ค (U+0E04) at 36
+12. ว (U+0E27) at 39
+13. า (U+0E32) at 42
+14. ม (U+0E21) at 45
+==DONE==
diff --git a/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt b/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt
new file mode 100644
index 000000000..cfd933871
--- /dev/null
+++ b/ext/intl/tests/dateformat___construct_bad_tz_cal.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlDateFormatter::__construct(): bad timezone or calendar
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+var_dump(new IntlDateFormatter(NULL, 0, 0, 'bad timezone'));
+
+var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, 3));
+
+var_dump(new IntlDateFormatter(NULL, 0, 0, NULL, new stdclass));
+
+
+?>
+==DONE==
+--EXPECTF--
+
+Warning: IntlDateFormatter::__construct(): datefmt_create: no such time zone: 'bad timezone' in %s on line %d
+NULL
+
+Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %s on line %d
+NULL
+
+Warning: IntlDateFormatter::__construct(): datefmt_create: Invalid calendar argument; should be an integer or an IntlCalendar instance in %s on line %d
+NULL
+==DONE==
diff --git a/ext/intl/tests/dateformat_calendars.phpt b/ext/intl/tests/dateformat_calendars.phpt
index 27f380c71..6af02e51c 100644
--- a/ext/intl/tests/dateformat_calendars.phpt
+++ b/ext/intl/tests/dateformat_calendars.phpt
@@ -41,5 +41,5 @@ string(44) "Sunday, January 1, 2012 5:12:00 AM GMT+05:12"
string(44) "Sunday, January 1, 2012 5:12:00 AM GMT+05:12"
string(42) "Sunday, Tevet 6, 5772 5:12:00 AM GMT+05:12"
-Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN in %s on line %d
+Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %s on line %d
==DONE==
diff --git a/ext/intl/tests/dateformat_create_cal_arg.phpt b/ext/intl/tests/dateformat_create_cal_arg.phpt
new file mode 100644
index 000000000..53fb084af
--- /dev/null
+++ b/ext/intl/tests/dateformat_create_cal_arg.phpt
@@ -0,0 +1,53 @@
+--TEST--
+IntlDateFormatter: several forms of the calendar arg
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+$cal = new IntlGregorianCalendar('UTC', NULL);
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal);
+echo $df->format($ts), "\n";
+
+$cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic');
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal);
+echo $df->format($ts), "\n";
+
+//override calendar's timezone
+$cal = new IntlGregorianCalendar('UTC', NULL);
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
+echo $df->format($ts), "\n";
+
+//default calendar is gregorian
+$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0);
+echo $df->format($ts), "\n";
+
+//try now with traditional
+$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0, NULL, IntlDateFormatter::TRADITIONAL);
+echo $df->format($ts), "\n";
+
+//the timezone can be overridden when not specifying a calendar
+$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0, 'UTC', IntlDateFormatter::TRADITIONAL);
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, 'UTC', 0);
+echo $df->format($ts), "\n";
+
+?>
+==DONE==
+--EXPECTF--
+domingo%S 1 de enero de 2012 00:00:00 GMT
+domingo%S 8 de Safar de 1433 00:00:00 GMT
+domingo%S 1 de enero de 2012 01:00:00 Hora estándar de Europa Central
+sábado%S 31 de diciembre de 2011 d.C. 23:00:00 Hora %Sde las Azores
+sábado%S 7 de Safar de 1433 AH 23:00:00 Hora %Sde las Azores
+domingo%S 8 de Safar de 1433 AH 00:00:00 GMT
+domingo%S 1 de enero de 2012 00:00:00 GMT
+==DONE==
diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt
index e5548196d..8664eea31 100644
--- a/ext/intl/tests/dateformat_format.phpt
+++ b/ext/intl/tests/dateformat_format.phpt
@@ -5,6 +5,8 @@ datefmt_format_code()
--FILE--
<?php
+//ini_set("intl.error_level", E_WARNING);
+
/*
* Test for the datefmt_format function
*/
@@ -12,7 +14,7 @@ datefmt_format_code()
function ut_main()
{
- $timezone = 'GMT-10';
+ $timezone = 'GMT-10:00';
$locale_arr = array (
'en_US'
@@ -397,24 +399,24 @@ Formatted DateTime is : 20001230 05:04 PM
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
diff --git a/ext/intl/tests/dateformat_formatObject_calendar.phpt b/ext/intl/tests/dateformat_formatObject_calendar.phpt
new file mode 100644
index 000000000..0c61e4f2d
--- /dev/null
+++ b/ext/intl/tests/dateformat_formatObject_calendar.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlDateFormatter::formatObject(): IntlCalendar tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", "Europe/Lisbon");
+
+$cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon
+echo IntlDateFormatter::formatObject($cal), "\n";
+echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n";
+echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n";
+echo IntlDateFormatter::formatObject($cal, array(IntlDateFormatter::SHORT, IntlDateFormatter::FULL), "en-US"), "\n";
+echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n";
+
+$cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00');
+echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n";
+
+$cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil');
+$cal->setTime(strtotime('2012-01-01 00:00:00')*1000.);
+echo IntlDateFormatter::formatObject($cal), "\n";
+echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL, "en-US"), "\n";
+
+?>
+==DONE==
+
+--EXPECTF--
+01/01/2012 00:00:00
+Domingo, 1 de Janeiro de 2012 0:00:00 Hora %Sda Europa Ocidental
+Jan 1, 2012 12:00:00 AM
+1/1/12 12:00:00 AM Western European %STime
+Sun 2012-01-1 00,00,00.000 Portugal Time (Lisbon)
+Domingo, 1 de Janeiro de 2012 5:00:00 GMT+03:00
+06/02/1433 00:00:00
+Sunday, Safar 6, 1433 12:00:00 AM Western European %STime
+==DONE==
+
diff --git a/ext/intl/tests/dateformat_formatObject_datetime.phpt b/ext/intl/tests/dateformat_formatObject_datetime.phpt
new file mode 100644
index 000000000..6427ad5a9
--- /dev/null
+++ b/ext/intl/tests/dateformat_formatObject_datetime.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlDateFormatter::formatObject(): DateTime tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", "Europe/Lisbon");
+
+$dt = new DateTime('2012-01-01 00:00:00'); //Europe/Lisbon
+echo IntlDateFormatter::formatObject($dt), "\n";
+echo IntlDateFormatter::formatObject($dt, IntlDateFormatter::FULL), "\n";
+echo IntlDateFormatter::formatObject($dt, null, "en-US"), "\n";
+echo IntlDateFormatter::formatObject($dt, array(IntlDateFormatter::SHORT, IntlDateFormatter::FULL), "en-US"), "\n";
+echo IntlDateFormatter::formatObject($dt, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n";
+
+$dt = new DateTime('2012-01-01 05:00:00+03:00');
+echo IntlDateFormatter::formatObject($dt, IntlDateFormatter::FULL), "\n";
+
+?>
+==DONE==
+
+--EXPECTF--
+01/01/2012 00:00:00
+Domingo, 1 de Janeiro de 2012 0:00:00 Hora %Sda Europa Ocidental
+Jan 1, 2012 12:00:00 AM
+1/1/12 12:00:00 AM Western European %STime
+Sun 2012-01-1 00,00,00.000 Portugal Time (Lisbon)
+Domingo, 1 de Janeiro de 2012 5:00:00 GMT+03:00
+==DONE==
+
diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt
new file mode 100644
index 000000000..7aaf69e54
--- /dev/null
+++ b/ext/intl/tests/dateformat_formatObject_error.phpt
@@ -0,0 +1,74 @@
+--TEST--
+IntlDateFormatter::formatObject(): error conditions
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", "Europe/Lisbon");
+
+var_dump(IntlDateFormatter::formatObject());
+var_dump(IntlDateFormatter::formatObject(1));
+var_dump(IntlDateFormatter::formatObject(new stdclass));
+
+class A extends IntlCalendar {function __construct(){}}
+var_dump(IntlDateFormatter::formatObject(new A));
+class B extends DateTime {function __construct(){}}
+var_dump(IntlDateFormatter::formatObject(new B));
+
+$cal = IntlCalendar::createInstance();
+var_dump(IntlDateFormatter::formatObject($cal, -2));
+var_dump(IntlDateFormatter::formatObject($cal, array()));
+var_dump(IntlDateFormatter::formatObject($cal, array(1,2,3)));
+var_dump(IntlDateFormatter::formatObject($cal, array(array(), 1)));
+var_dump(IntlDateFormatter::formatObject($cal, array(1, -2)));
+var_dump(IntlDateFormatter::formatObject($cal, ""));
+var_dump(IntlDateFormatter::formatObject($cal, "YYYY", array()));
+
+?>
+==DONE==
+
+--EXPECTF--
+
+Warning: IntlDateFormatter::formatObject() expects at least 1 parameter, 0 given in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject() expects parameter 1 to be object, integer given in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTime in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad IntlCalendar instance: not initialized properly in %s on line %d
+bool(false)
+
+Warning: DateTime::getTimestamp(): The DateTime object has not been correctly initialized by its constructor in %s on line %d
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: error calling ::getTimeStamp() on the object in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the date/time format type is invalid in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad format; if array, it must have two elements in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad format; if array, it must have two elements in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad format; the date format (first element of the array) is not valid in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad format; the time format (second element of the array) is not valid in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the format is empty in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::formatObject() expects parameter 3 to be string, array given in %s on line %d
+bool(false)
+==DONE==
+
diff --git a/ext/intl/tests/dateformat_format_parse.phpt b/ext/intl/tests/dateformat_format_parse.phpt
index bd41d715b..6bd3d8a8f 100644
--- a/ext/intl/tests/dateformat_format_parse.phpt
+++ b/ext/intl/tests/dateformat_format_parse.phpt
@@ -12,7 +12,7 @@ datefmt_format_code() and datefmt_parse_code()
function ut_main()
{
- $timezone = 'GMT+5';
+ $timezone = 'GMT+05:00';
$locale_arr = array (
'en_US'
diff --git a/ext/intl/tests/dateformat_getCalendarObject_error.phpt b/ext/intl/tests/dateformat_getCalendarObject_error.phpt
new file mode 100644
index 000000000..d2ad66c82
--- /dev/null
+++ b/ext/intl/tests/dateformat_getCalendarObject_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlDateFormatter::getCalendarObject(): bad args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$df = new IntlDateFormatter(NULL, 0, 0);
+
+var_dump($df->getCalendarObject(9));
+var_dump(datefmt_get_calendar_object($df, 9));
+var_dump(datefmt_get_calendar_object($df, 9));
+var_dump(datefmt_get_calendar_object(new stdclass));
+
+?>
+==DONE==
+--EXPECTF--
+
+Warning: IntlDateFormatter::getCalendarObject() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlDateFormatter::getCalendarObject(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_calendar_object() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
+
+Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
+bool(false)
+==DONE==
diff --git a/ext/intl/tests/dateformat_getTimeZone_error.phpt b/ext/intl/tests/dateformat_getTimeZone_error.phpt
new file mode 100644
index 000000000..4ac5555d8
--- /dev/null
+++ b/ext/intl/tests/dateformat_getTimeZone_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlDateFormatter::getTimeZone(): bad args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$df = new IntlDateFormatter(NULL, 0, 0);
+
+var_dump($df->getTimeZone(9));
+var_dump(datefmt_get_timezone($df, 9));
+var_dump(datefmt_get_timezone($df, 9));
+var_dump(datefmt_get_timezone(new stdclass));
+
+?>
+==DONE==
+--EXPECTF--
+
+Warning: IntlDateFormatter::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlDateFormatter::getTimeZone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
+
+Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+==DONE==
diff --git a/ext/intl/tests/dateformat_get_set_calendar.phpt b/ext/intl/tests/dateformat_get_set_calendar.phpt
index bfd4e578e..dbb3e6cd2 100644
--- a/ext/intl/tests/dateformat_get_set_calendar.phpt
+++ b/ext/intl/tests/dateformat_get_set_calendar.phpt
@@ -1,60 +1,55 @@
--TEST--
-datefmt_get_calendar_code() datefmt_set_calendar_code()
+IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject()
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
--FILE--
<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+function d(IntlDateFormatter $df) {
+global $ts;
+echo $df->format($ts), "\n";
+var_dump($df->getCalendar(),
+$df->getCalendarObject()->getType(),
+$df->getCalendarObject()->getTimeZone()->getId());
+echo "\n";
+}
-/*
- * Test for the datefmt_get_calendar and datefmt_set_calendar functions
- */
-
-
-function ut_main()
-{
- $calendar_arr = array (
- IntlDateFormatter::GREGORIAN,
- IntlDateFormatter::TRADITIONAL,
- 3
- );
-
- $res_str = '';
-
- $start_calendar = IntlDateFormatter::GREGORIAN;
- $res_str .= "\nCreating IntlDateFormatter with calendar = $start_calendar";
- $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT ,'America/Los_Angeles', IntlDateFormatter::GREGORIAN);
- $calendar = ut_datefmt_get_calendar( $fmt);
- $res_str .= "\nAfter call to get_calendar : calendar= $calendar";
- $res_str .= "\n-------------------";
-
- foreach( $calendar_arr as $calendar_entry )
- {
- $res_str .= "\nSetting IntlDateFormatter with calendar = $calendar_entry";
- ut_datefmt_set_calendar( $fmt, $calendar_entry);
- $calendar = ut_datefmt_get_calendar( $fmt);
- $res_str .= "\nAfter call to get_calendar : calendar= $calendar";
- $res_str .= "\n-------------------";
- }
-
- return $res_str;
+$df = new IntlDateFormatter('fr@calendar=islamic', 0, 0, 'Europe/Minsk');
+d($df);
-}
-include_once( 'ut_common.inc' );
+//changing the calendar with a cal type should not change tz
+$df->setCalendar(IntlDateFormatter::TRADITIONAL);
+d($df);
+
+//but changing with an actual calendar should
+$cal = IntlCalendar::createInstance("UTC");
+$df->setCalendar($cal);
+d($df);
-// Run the test
-ut_run();
?>
+==DONE==
--EXPECT--
-Creating IntlDateFormatter with calendar = 1
-After call to get_calendar : calendar= 1
--------------------
-Setting IntlDateFormatter with calendar = 1
-After call to get_calendar : calendar= 1
--------------------
-Setting IntlDateFormatter with calendar = 0
-After call to get_calendar : calendar= 0
--------------------
-Setting IntlDateFormatter with calendar = 3
-After call to get_calendar : calendar= 0
-------------------- \ No newline at end of file
+dimanche 1 janvier 2012 ap. J.-C. 03:00:00 UTC+03:00
+int(1)
+string(9) "gregorian"
+string(12) "Europe/Minsk"
+
+dimanche 8 Safar 1433 AH 03:00:00 UTC+03:00
+int(0)
+string(7) "islamic"
+string(12) "Europe/Minsk"
+
+dimanche 1 janvier 2012 ap. J.-C. 00:00:00 UTC
+bool(false)
+string(9) "gregorian"
+string(3) "UTC"
+
+==DONE==
diff --git a/ext/intl/tests/dateformat_get_set_timezone.phpt b/ext/intl/tests/dateformat_get_set_timezone.phpt
new file mode 100644
index 000000000..41aa35b9c
--- /dev/null
+++ b/ext/intl/tests/dateformat_get_set_timezone.phpt
@@ -0,0 +1,62 @@
+--TEST--
+IntlDateFormatter: get/setTimeZone()
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+function d(IntlDateFormatter $df) {
+global $ts;
+echo $df->format($ts), "\n";
+var_dump(
+$df->getTimeZoneID(),
+$df->getTimeZone()->getID());
+echo "\n";
+}
+
+$df = new IntlDateFormatter('pt_PT', 0, 0, 'Europe/Minsk');
+d($df);
+
+$df->setTimeZone(NULL);
+d($df);
+
+$df->setTimeZone('Europe/Madrid');
+d($df);
+
+$df->setTimeZone(IntlTimeZone::createTimeZone('Europe/Paris'));
+d($df);
+
+$df->setTimeZone(new DateTimeZone('Europe/Amsterdam'));
+d($df);
+
+?>
+==DONE==
+--EXPECTF--
+Domingo, 1 de Janeiro de 2012 3:00:00 GMT+03:00
+string(12) "Europe/Minsk"
+string(12) "Europe/Minsk"
+
+Sábado, 31 de Dezembro de 2011 23:00:00 Hor%s %Sdos Açores
+string(15) "Atlantic/Azores"
+string(15) "Atlantic/Azores"
+
+Domingo, 1 de Janeiro de 2012 1:00:00 Hor%s %Sda Europa Central
+string(13) "Europe/Madrid"
+string(13) "Europe/Madrid"
+
+Domingo, 1 de Janeiro de 2012 1:00:00 Hor%s %Sda Europa Central
+string(12) "Europe/Paris"
+string(12) "Europe/Paris"
+
+Domingo, 1 de Janeiro de 2012 1:00:00 Hor%s %Sda Europa Central
+string(16) "Europe/Amsterdam"
+string(16) "Europe/Amsterdam"
+
+==DONE==
diff --git a/ext/intl/tests/dateformat_get_timezone_id.phpt b/ext/intl/tests/dateformat_get_timezone_id.phpt
index 80cbdbbf0..a9701c386 100644
--- a/ext/intl/tests/dateformat_get_timezone_id.phpt
+++ b/ext/intl/tests/dateformat_get_timezone_id.phpt
@@ -1,5 +1,8 @@
--TEST--
datefmt_get_timezone_id_code()
+--INI--
+date.timezone=Atlantic/Azores
+intl.error_level=E_WARNING
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
@@ -14,8 +17,8 @@ function ut_main()
{
$timezone_id_arr = array (
'America/New_York',
- 'America/Los_Angeles',
- 'America/Dallas'
+ 'US/Pacific',
+ 'US/Central'
);
$res_str = '';
@@ -42,8 +45,8 @@ ut_run();
Creating IntlDateFormatter with timezone_id = America/New_York
After call to get_timezone_id : timezone_id= America/New_York
-Creating IntlDateFormatter with timezone_id = America/Los_Angeles
-After call to get_timezone_id : timezone_id= America/Los_Angeles
+Creating IntlDateFormatter with timezone_id = US/Pacific
+After call to get_timezone_id : timezone_id= US/Pacific
-Creating IntlDateFormatter with timezone_id = America/Dallas
-After call to get_timezone_id : timezone_id= America/Dallas
+Creating IntlDateFormatter with timezone_id = US/Central
+After call to get_timezone_id : timezone_id= US/Central
diff --git a/ext/intl/tests/dateformat_setTimeZoneID_deprecation.phpt b/ext/intl/tests/dateformat_setTimeZoneID_deprecation.phpt
new file mode 100644
index 000000000..5ee5b94d2
--- /dev/null
+++ b/ext/intl/tests/dateformat_setTimeZoneID_deprecation.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlDateFormatter: setTimeZoneID() deprecation
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$df = new IntlDateFormatter('pt_PT', 0, 0, 'Europe/Minsk');
+
+$df->setTimeZoneId('Europe/Madrid');
+
+?>
+==DONE==
+--EXPECTF--
+
+Deprecated: IntlDateFormatter::setTimeZoneId(): Use datefmt_set_timezone() instead, which also accepts a plain time zone identifier and for which this function is now an alias in %s on line %d
+==DONE==
diff --git a/ext/intl/tests/dateformat_setTimeZone_error.phpt b/ext/intl/tests/dateformat_setTimeZone_error.phpt
new file mode 100644
index 000000000..bd3703132
--- /dev/null
+++ b/ext/intl/tests/dateformat_setTimeZone_error.phpt
@@ -0,0 +1,53 @@
+--TEST--
+IntlDateFormatter::setTimeZone() bad args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$df = new IntlDateFormatter(NULL, 0, 0);
+
+var_dump($df->setTimeZone());
+var_dump(datefmt_set_timezone());
+var_dump($df->setTimeZone(array()));
+var_dump($df->setTimeZone(1, 2));
+var_dump($df->setTimeZone('non existing timezone'));
+var_dump(datefmt_set_timezone(new stdclass, 'UTC'));
+
+?>
+==DONE==
+--EXPECTF--
+
+Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_set_timezone() expects exactly 2 parameters, 0 given in %s on line %d
+
+Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Notice: Array to string conversion in %s on line %d
+
+Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'Array' in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'non existing timezone' in %s on line %d
+bool(false)
+
+Warning: datefmt_set_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
+
+Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
+bool(false)
+==DONE==
diff --git a/ext/intl/tests/dateformat_set_timezone_id2.phpt b/ext/intl/tests/dateformat_set_timezone_id2.phpt
index 23aacda90..ce9b89d1f 100644
--- a/ext/intl/tests/dateformat_set_timezone_id2.phpt
+++ b/ext/intl/tests/dateformat_set_timezone_id2.phpt
@@ -1,11 +1,16 @@
--TEST--
datefmt_set_timezone_id_code() icu >= 4.8
+--INI--
+date.timezone=Atlantic/Azores
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
--FILE--
<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("error_reporting", ~E_DEPRECATED);
+
/*
* Test for the datefmt_set_timezone_id function
*/
@@ -23,7 +28,7 @@ function ut_main()
$res_str = '';
- $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/San_Francisco' , IntlDateFormatter::GREGORIAN );
+ $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'US/Pacific' , IntlDateFormatter::GREGORIAN );
$timezone_id = ut_datefmt_get_timezone_id( $fmt );
$res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n";
@@ -52,8 +57,13 @@ include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
---EXPECT--
-After creation of the dateformatter : timezone_id= America/San_Francisco
+--EXPECTF--
+
+Warning: IntlDateFormatter::setTimeZoneId(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d
+
+Warning: datefmt_set_timezone_id(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d
+
+After creation of the dateformatter : timezone_id= US/Pacific
-----------
Trying to set timezone_id= America/New_York
After call to set_timezone_id : timezone_id= America/New_York
@@ -71,6 +81,6 @@ Formatting timestamp=0 resulted in Wednesday, December 31, 1969 6:00:00 PM Cent
Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 7:00:00 PM Central Standard Time
-----------
Trying to set timezone_id= CN
-After call to set_timezone_id : timezone_id= CN
-Formatting timestamp=0 resulted in Thursday, January 1, 1970 12:00:00 AM GMT
-Formatting timestamp=3600 resulted in Thursday, January 1, 1970 1:00:00 AM GMT
+After call to set_timezone_id : timezone_id= America/Chicago
+Formatting timestamp=0 resulted in Wednesday, December 31, 1969 6:00:00 PM Central Standard Time
+Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 7:00:00 PM Central Standard Time
diff --git a/ext/intl/tests/dateformat_timezone_arg_variations.phpt b/ext/intl/tests/dateformat_timezone_arg_variations.phpt
new file mode 100644
index 000000000..ccfb5e196
--- /dev/null
+++ b/ext/intl/tests/dateformat_timezone_arg_variations.phpt
@@ -0,0 +1,45 @@
+--TEST--
+IntlDateFormatter: several forms of the timezone arg
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$ts = strtotime('2012-01-01 00:00:00 UTC');
+
+//should use Atlantic/Azores
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL);
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam');
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, new DateTimeZone('Europe/Lisbon'));
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, IntlTimeZone::createTimeZone('America/New_York'));
+echo $df->format($ts), "\n";
+
+//time zone has priority
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam', new IntlGregorianCalendar('Europe/Lisbon'));
+echo $df->format($ts), "\n";
+
+//calendar has priority
+$df = new IntlDateFormatter('es_ES', 0, 0, NULL, new IntlGregorianCalendar('Europe/Lisbon'));
+echo $df->format($ts), "\n";
+
+$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam', 0);
+echo $df->format($ts), "\n";
+
+--EXPECTF--
+sábado%S 31 de diciembre de 2011 23:00:00 Hora%S de las Azores
+domingo%S 1 de enero de 2012 01:00:00 Hora estándar de Europa Central
+domingo%S 1 de enero de 2012 00:00:00 Hora%S de Europa Occidental
+sábado%S 31 de diciembre de 2011 19:00:00 Hora estándar oriental
+domingo%S 1 de enero de 2012 01:00:00 Hora estándar de Europa Central
+domingo%S 1 de enero de 2012 00:00:00 Hora%S de Europa Occidental
+domingo%S 1 de enero de 2012 01:00:00 Hora estándar de Europa Central
diff --git a/ext/intl/tests/gregoriancalendar___construct_basic.phpt b/ext/intl/tests/gregoriancalendar___construct_basic.phpt
new file mode 100644
index 000000000..bdbef6725
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar___construct_basic.phpt
@@ -0,0 +1,51 @@
+--TEST--
+IntlGregorianCalendar::__construct(): basic
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+$intlcal = intlgregcal_create_instance();
+var_dump($intlcal->getTimeZone()->getId());
+var_dump($intlcal->getLocale(1));
+
+$intlcal = new IntlGregorianCalendar('Europe/Lisbon', NULL);
+var_dump($intlcal->getTimeZone()->getId());
+var_dump($intlcal->getLocale(1));
+
+$intlcal = new IntlGregorianCalendar(NULL, 'pt_PT');
+var_dump($intlcal->getTimeZone()->getId());
+var_dump($intlcal->getLocale(1));
+
+$intlcal = new IntlGregorianCalendar('Europe/Lisbon', 'pt_PT');
+var_dump($intlcal->getTimeZone()->getId());
+var_dump($intlcal->getLocale(1));
+
+$intlcal = new IntlGregorianCalendar('Europe/Paris', 'fr_CA', NULL, NULL, NULL, NULL);
+var_dump($intlcal->getTimeZone()->getId());
+var_dump($intlcal->getLocale(1));
+
+var_dump($intlcal->getType());
+?>
+==DONE==
+--EXPECT--
+string(16) "Europe/Amsterdam"
+string(5) "nl_NL"
+string(13) "Europe/Lisbon"
+string(5) "nl_NL"
+string(16) "Europe/Amsterdam"
+string(5) "pt_PT"
+string(13) "Europe/Lisbon"
+string(5) "pt_PT"
+string(12) "Europe/Paris"
+string(5) "fr_CA"
+string(9) "gregorian"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt
new file mode 100644
index 000000000..0e85394a4
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt
@@ -0,0 +1,35 @@
+--TEST--
+IntlGregorianCalendar::__construct(): bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7));
+var_dump(intlgregcal_create_instance(1,2,3,4,5,6,7,8));
+var_dump(intlgregcal_create_instance(1,2,3,4));
+var_dump(new IntlGregorianCalendar(1,2,NULL,4));
+var_dump(new IntlGregorianCalendar(1,2,3,4,NULL,array()));
+
+
+--EXPECTF--
+
+Warning: intlgregcal_create_instance(): intlgregcal_create_instance: too many arguments in %s on line %d
+NULL
+
+Warning: intlgregcal_create_instance(): intlgregcal_create_instance: too many arguments in %s on line %d
+NULL
+
+Warning: intlgregcal_create_instance(): intlgregcal_create_instance: no variant with 4 arguments (excluding trailing NULLs) in %s on line %d
+NULL
+
+Warning: IntlGregorianCalendar::__construct(): intlgregcal_create_instance: no variant with 4 arguments (excluding trailing NULLs) in %s on line %d
+NULL
+
+Warning: IntlGregorianCalendar::__construct() expects parameter 6 to be long, array given in %s on line %d
+
+Warning: IntlGregorianCalendar::__construct(): intlgregcal_create_instance: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/gregoriancalendar___construct_variant1.phpt b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt
new file mode 100644
index 000000000..63266b792
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt
@@ -0,0 +1,30 @@
+--TEST--
+IntlGregorianCalendar::__construct(): argument variants
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+date_default_timezone_set('Europe/Amsterdam');
+
+$intlcal = intlgregcal_create_instance(2012, 1, 29, 16, 0, NULL);
+var_dump($intlcal->getTimeZone()->getId());
+var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:00:00') * 1000);
+
+$intlcal = new IntlGregorianCalendar(2012, 1, 29, 16, 7, 8);
+var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:07:08') * 1000);
+
+var_dump($intlcal->getType());
+?>
+==DONE==
+--EXPECT--
+string(16) "Europe/Amsterdam"
+float(1330527600000)
+float(1330527600000)
+float(1330528028000)
+float(1330528028000)
+string(9) "gregorian"
+==DONE==
diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
new file mode 100644
index 000000000..58d566223
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
@@ -0,0 +1,30 @@
+--TEST--
+IntlGregorianCalendar::getGregorianChange(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+var_dump($c->getGregorianChange(1));
+
+var_dump(intlgregcal_get_gregorian_change($c, 1));
+var_dump(intlgregcal_get_gregorian_change(1));
+--EXPECTF--
+
+Warning: IntlGregorianCalendar::getGregorianChange() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlGregorianCalendar::getGregorianChange(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlgregcal_get_gregorian_change() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: intlgregcal_get_gregorian_change(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/gregoriancalendar_get_setGregorianChange_basic.phpt b/ext/intl/tests/gregoriancalendar_get_setGregorianChange_basic.phpt
new file mode 100644
index 000000000..b08ad7981
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar_get_setGregorianChange_basic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlGregorianCalendar::get/setGregorianChange(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+$intlcal = new IntlGregorianCalendar();
+
+var_dump($intlcal->getGregorianChange());
+
+var_dump($intlcal->setGregorianChange(0));
+var_dump(intlgregcal_get_gregorian_change($intlcal));
+
+var_dump(intlgregcal_set_gregorian_change($intlcal, 1));
+var_dump($intlcal->getGregorianChange());
+
+?>
+==DONE==
+--EXPECT--
+float(-12219292800000)
+bool(true)
+float(0)
+bool(true)
+float(1)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_basic.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_basic.phpt
new file mode 100644
index 000000000..b37452fcb
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar_isLeapYear_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlGregorianCalendar::isLeapYear(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+date_default_timezone_set('Europe/Amsterdam');
+
+$intlcal = new IntlGregorianCalendar();
+
+var_dump($intlcal->isLeapYear(2012));
+var_dump($intlcal->isLeapYear(1900));
+
+var_dump(intlgregcal_is_leap_year($intlcal, 2012));
+var_dump(intlgregcal_is_leap_year($intlcal, 1900));
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
new file mode 100644
index 000000000..40a6c8539
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
@@ -0,0 +1,48 @@
+--TEST--
+IntlGregorianCalendar::isLeapYear(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+var_dump($c->isLeapYear(2000, 2011));
+var_dump($c->isLeapYear());
+var_dump($c->isLeapYear("fgdf"));
+
+var_dump(intlgregcal_is_leap_year($c, 1, 2));
+var_dump(intlgregcal_is_leap_year($c));
+var_dump(intlgregcal_is_leap_year(1, 2));
+--EXPECTF--
+
+Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlGregorianCalendar::isLeapYear() expects parameter 1 to be long, string given in %s on line %d
+
+Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 3 given in %s on line %d
+
+Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
new file mode 100644
index 000000000..eac8deb61
--- /dev/null
+++ b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlGregorianCalendar::setGregorianChange(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar();
+var_dump($c->setGregorianChange());
+var_dump($c->setGregorianChange(1, 2));
+var_dump($c->setGregorianChange("sdfds"));
+
+var_dump(intlgregcal_set_gregorian_change($c));
+var_dump(intlgregcal_set_gregorian_change(1, 4.));
+--EXPECTF--
+
+Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlGregorianCalendar::setGregorianChange() expects parameter 1 to be double, string given in %s on line %d
+
+Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
+bool(false)
+
+Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s on line %d
diff --git a/ext/intl/tests/ini_use_exceptions_basic.phpt b/ext/intl/tests/ini_use_exceptions_basic.phpt
new file mode 100644
index 000000000..36ccbcb8a
--- /dev/null
+++ b/ext/intl/tests/ini_use_exceptions_basic.phpt
@@ -0,0 +1,21 @@
+--TEST--
+intl.use_exceptions INI setting
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+ini_set("intl.use_exceptions", true);
+$t = transliterator_create('any-hex');
+try {
+ var_dump($t->transliterate('a', 3));
+} catch (IntlException $intlE) {
+ var_dump($intlE->getMessage());
+}
+ini_set("intl.use_exceptions", false);
+ini_set("intl.error_level", E_NOTICE);
+var_dump($t->transliterate('a', 3));
+--EXPECTF--
+string(130) "transliterator_transliterate: Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 1)"
+
+Notice: Transliterator::transliterate(): transliterator_transliterate: Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 1) in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/msgfmt_format_datetime.phpt b/ext/intl/tests/msgfmt_format_datetime.phpt
new file mode 100644
index 000000000..07e7d68f1
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_datetime.phpt
@@ -0,0 +1,28 @@
+--TEST--
+MessageFormatter::format(): DateTime accepted to format dates and times
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+
+$fmt = <<<EOD
+{0,date} {0,time}
+EOD;
+
+$dt = new DateTime("2012-05-06 18:00:42", new DateTimeZone("Europe/Lisbon"));
+
+$mf = new MessageFormatter('en_US', $fmt);
+
+var_dump($mf->format(array($dt)));
+
+?>
+==DONE==
+--EXPECTF--
+string(%s) "May %d, 2012 %d:%d:42 %s"
+==DONE==
diff --git a/ext/intl/tests/msgfmt_format_error1.phpt b/ext/intl/tests/msgfmt_format_error1.phpt
new file mode 100644
index 000000000..684b05970
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_error1.phpt
@@ -0,0 +1,19 @@
+--TEST--
+MessageFormatter::format() insufficient numeric arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt = <<<EOD
+{0} {1}
+EOD;
+
+$mf = new MessageFormatter('en_US', $fmt);
+var_dump($mf->format(array(7)));
+
+--EXPECTF--
+string(5) "7 {1}"
diff --git a/ext/intl/tests/msgfmt_format_error2.phpt b/ext/intl/tests/msgfmt_format_error2.phpt
new file mode 100644
index 000000000..85d1b1c83
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_error2.phpt
@@ -0,0 +1,23 @@
+--TEST--
+MessageFormatter::format() inconsistent types in named argument
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt = <<<EOD
+{foo,number} {foo}
+EOD;
+
+$mf = new MessageFormatter('en_US', $fmt);
+var_dump($mf->format(array(7)));
+
+--EXPECTF--
+
+Warning: MessageFormatter::format(): Inconsistent types declared for an argument in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/msgfmt_format_error3.phpt b/ext/intl/tests/msgfmt_format_error3.phpt
new file mode 100644
index 000000000..6dfbee3c9
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_error3.phpt
@@ -0,0 +1,23 @@
+--TEST--
+MessageFormatter::format() given negative arg key
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt = <<<EOD
+{foo,number,percent}
+EOD;
+
+$mf = new MessageFormatter('en_US', $fmt);
+var_dump($mf->format(array("foo" => 7, -1 => "bar")));
+
+--EXPECTF--
+
+Warning: MessageFormatter::format(): Found negative or too large array key in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/msgfmt_format_error4.phpt b/ext/intl/tests/msgfmt_format_error4.phpt
new file mode 100644
index 000000000..3b92b48b8
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_error4.phpt
@@ -0,0 +1,28 @@
+--TEST--
+MessageFormatter::format() invalid UTF-8 for arg key or value
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt = <<<EOD
+{foo}
+EOD;
+
+$mf = new MessageFormatter('en_US', $fmt);
+var_dump($mf->format(array("foo" => 7, "\x80" => "bar")));
+
+var_dump($mf->format(array("foo" => "\x80")));
+
+--EXPECTF--
+
+Warning: MessageFormatter::format(): Invalid UTF-8 data in argument key: '' in %s on line %d
+bool(false)
+
+Warning: MessageFormatter::format(): Invalid UTF-8 data in string argument: '' in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/msgfmt_format_error5.phpt b/ext/intl/tests/msgfmt_format_error5.phpt
new file mode 100644
index 000000000..ebbd4550e
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_error5.phpt
@@ -0,0 +1,26 @@
+--TEST--
+MessageFormatter::format() invalid date/time argument
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt = <<<EOD
+{foo,date}
+EOD;
+
+$mf = new MessageFormatter('en_US', $fmt);
+var_dump($mf->format(array("foo" => new stdclass())));
+
+--EXPECTF--
+Warning: MessageFormatter::format(): msgfmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted) in %s on line %d
+
+Warning: MessageFormatter::format(): The argument for key 'foo' cannot be used as a date or time in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/msgfmt_format_error6.phpt b/ext/intl/tests/msgfmt_format_error6.phpt
new file mode 100644
index 000000000..b07d2ab77
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_error6.phpt
@@ -0,0 +1,23 @@
+--TEST--
+MessageFormatter::format() invalid type for key not in pattern
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$fmt = <<<EOD
+{foo}
+EOD;
+
+$mf = new MessageFormatter('en_US', $fmt);
+var_dump($mf->format(array("foo" => 'bar', 7 => fopen('php://memory', 'r+'))));
+
+--EXPECTF--
+
+Warning: MessageFormatter::format(): No strategy to convert the value given for the argument with key '7' is available in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/msgfmt_format_intlcalendar.phpt b/ext/intl/tests/msgfmt_format_intlcalendar.phpt
new file mode 100644
index 000000000..6ae78a914
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_intlcalendar.phpt
@@ -0,0 +1,30 @@
+--TEST--
+MessageFormat accepts IntlCalendar args
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+ini_set('date.timezone', 'Europe/Lisbon');
+
+$cal = new IntlGregorianCalendar(2012,04,17,17,35,36);
+
+$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}');
+echo $msgf->format(array($cal)), "\n";
+
+//NOT FIXED:
+/*$msgf = new MessageFormatter('en_US',
+'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
+
+echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
+ $msgf->format(array($time, 'time')), "\n";
+*/
+
+?>
+==DONE==
+--EXPECT--
+Quinta-feira, 17 de Maio de 2012 5:35:36 p.m. WEST
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/msgfmt_format_mixed_params.phpt b/ext/intl/tests/msgfmt_format_mixed_params.phpt
new file mode 100644
index 000000000..93412f49e
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_mixed_params.phpt
@@ -0,0 +1,25 @@
+--TEST--
+MessageFormatter::format(): mixed named and numeric parameters
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+
+$mf = new MessageFormatter('en_US',
+ "{0,number} -- {foo,ordinal}");
+
+var_dump($mf->format(array(2.3, "foo" => 1.3)));
+var_dump($mf->format(array("foo" => 1.3, 0 => 2.3)));
+
+?>
+==DONE==
+--EXPECT--
+string(10) "2.3 -- 1st"
+string(10) "2.3 -- 1st"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt
new file mode 100644
index 000000000..299ae483a
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt
@@ -0,0 +1,58 @@
+--TEST--
+MessageFormatter::format(): simple types handling with numeric strings
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+
+$mf = new MessageFormatter('en_US',"
+ none {a}
+ number {b,number}
+ number integer {c,number,integer}
+ number currency {d,number,currency}
+ number percent {e,number,percent}
+ date {f,date}
+ time {g,time}
+ spellout {h,spellout}
+ ordinal {i,ordinal}
+ duration {j,duration}
+ ");
+
+$ex = "1336317965.5 str";
+var_dump($mf->format(array(
+'a' => $ex,
+'b' => $ex,
+'c' => $ex,
+'d' => $ex,
+'e' => $ex,
+'f' => " 1336317965.5",
+'g' => " 1336317965.5",
+'h' => $ex,
+'i' => $ex,
+'j' => $ex,
+)));
+
+?>
+==DONE==
+--EXPECTF--
+string(%d) "
+ none 1336317965.5 str
+ number 1,336,317,965.5
+ number integer 1,336,317,965
+ number currency $1,336,317,965.50
+ number percent 133,631,796,550%
+ date May %d, 2012
+ time %d:%d:05 PM
+ spellout one billion three hundred thirty-six million three hundred seventeen thousand nine hundred sixty-five point five
+ ordinal 1,336,317,966th
+ duration 371,199:26:06
+ "
+==DONE==
diff --git a/ext/intl/tests/msgfmt_format_subpatterns.phpt b/ext/intl/tests/msgfmt_format_subpatterns.phpt
new file mode 100644
index 000000000..9f11e3e25
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_subpatterns.phpt
@@ -0,0 +1,75 @@
+--TEST--
+msgfmt_format() with subpatterns
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+
+/*
+ * Format a number using misc locales/patterns.
+ */
+
+
+function ut_main()
+{
+
+$pattern=<<<_MSG_
+{0, select,
+ female {{1, plural, offset:1
+ =0 {{2} does not give a party.}
+ =1 {{2} invites {3} to her party.}
+ =2 {{2} invites {3} and one other person to her party.}
+ other {{2} invites {3} as one of the # people invited to her party.}}}
+ male {{1, plural, offset:1
+ =0 {{2} does not give a party.}
+ =1 {{2} invites {3} to his party.}
+ =2 {{2} invites {3} and one other person to his party.}
+ other {{2} invites {3} as one of the # other people invited to his party.}}}
+ other {{1, plural, offset:1
+ =0 {{2} does not give a party.}
+ =1 {{2} invites {3} to their party.}
+ =2 {{2} invites {3} and one other person to their party.}
+ other {{2} invites {3} as one of the # other people invited to their party.}}}}
+_MSG_;
+
+
+$args = array(
+ array('female', 0, 'Alice', 'Bob'),
+ array('male', 1, 'Alice', 'Bob'),
+ array('none', 2, 'Alice', 'Bob'),
+ array('female', 27, 'Alice', 'Bob'),
+);
+
+$str_res = '';
+
+ $fmt = ut_msgfmt_create( 'en_US', $pattern );
+ if(!$fmt) {
+ $str_res .= dump(intl_get_error_message())."\n";
+ return $str_res;
+ }
+ foreach ($args as $arg) {
+ $str_res .= dump( ut_msgfmt_format($fmt, $arg) ). "\n";
+ $str_res .= dump( ut_msgfmt_format_message('en_US', $pattern, $arg) ) . "\n";
+ }
+ return $str_res;
+}
+
+include_once( 'ut_common.inc' );
+
+// Run the test
+ut_run();
+
+?>
+--EXPECT--
+'Alice does not give a party.'
+'Alice does not give a party.'
+'Alice invites Bob to his party.'
+'Alice invites Bob to his party.'
+'Alice invites Bob and one other person to their party.'
+'Alice invites Bob and one other person to their party.'
+'Alice invites Bob as one of the 26 people invited to her party.'
+'Alice invites Bob as one of the 26 people invited to her party.'
diff --git a/ext/intl/tests/msgfmt_format_subpatterns_named.phpt b/ext/intl/tests/msgfmt_format_subpatterns_named.phpt
new file mode 100644
index 000000000..f6af02561
--- /dev/null
+++ b/ext/intl/tests/msgfmt_format_subpatterns_named.phpt
@@ -0,0 +1,75 @@
+--TEST--
+msgfmt_format() with named subpatterns
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+
+/*
+ * Format a number using misc locales/patterns.
+ */
+
+
+function ut_main()
+{
+
+$pattern=<<<_MSG_
+{gender_of_host, select,
+ female {{num_guests, plural, offset:1
+ =0 {{host} does not give a party.}
+ =1 {{host} invites {guest} to her party.}
+ =2 {{host} invites {guest} and one other person to her party.}
+ other {{host} invites {guest} as one of the # people invited to her party.}}}
+ male {{num_guests, plural, offset:1
+ =0 {{host} does not give a party.}
+ =1 {{host} invites {guest} to his party.}
+ =2 {{host} invites {guest} and one other person to his party.}
+ other {{host} invites {guest} as one of the # people invited to his party.}}}
+ other {{num_guests, plural, offset:1
+ =0 {{host} does not give a party.}
+ =1 {{host} invites {guest} to their party.}
+ =2 {{host} invites {guest} and one other person to their party.}
+ other {{host} invites {guest} as one of the # people invited to their party.}}}}
+_MSG_;
+
+
+$args = array(
+ array('gender_of_host' => 'female', 'num_guests' => 0, 'host' => 'Alice', 'guest' => 'Bob'),
+ array('gender_of_host' => 'male', 'num_guests' => 1, 'host' => 'Alice', 'guest' => 'Bob'),
+ array('gender_of_host' => 'none', 'num_guests' => 2, 'host' => 'Alice', 'guest' => 'Bob'),
+ array('gender_of_host' => 'female', 'num_guests' => 27, 'host' => 'Alice', 'guest' => 'Bob'),
+);
+
+$str_res = '';
+
+ $fmt = ut_msgfmt_create( 'en_US', $pattern );
+ if(!$fmt) {
+ $str_res .= dump(intl_get_error_message())."\n";
+ return $str_res;
+ }
+ foreach ($args as $arg) {
+ $str_res .= dump( ut_msgfmt_format($fmt, $arg) ). "\n";
+ $str_res .= dump( ut_msgfmt_format_message('en_US', $pattern, $arg) ) . "\n";
+ }
+ return $str_res;
+}
+
+include_once( 'ut_common.inc' );
+
+// Run the test
+ut_run();
+
+?>
+--EXPECT--
+'Alice does not give a party.'
+'Alice does not give a party.'
+'Alice invites Bob to his party.'
+'Alice invites Bob to his party.'
+'Alice invites Bob and one other person to their party.'
+'Alice invites Bob and one other person to their party.'
+'Alice invites Bob as one of the 26 people invited to her party.'
+'Alice invites Bob as one of the 26 people invited to her party.'
diff --git a/ext/intl/tests/msgfmt_get_error.phpt b/ext/intl/tests/msgfmt_get_error.phpt
deleted file mode 100644
index 015c50d46..000000000
--- a/ext/intl/tests/msgfmt_get_error.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-msgmfmt_get_error_message/code()
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Error handling.
- */
-
-
-function ut_main()
-{
- $fmt = ut_msgfmt_create( "en_US", "{0, number} monkeys on {1, number} trees" );
- $num = ut_msgfmt_format( $fmt, array());
- if( $num === false )
- return $fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n";
- else
- return "Ooops, an error should have occured.";
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECT--
-msgfmt_format: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)
diff --git a/ext/intl/tests/msgfmt_millisecond_dates.phpt b/ext/intl/tests/msgfmt_millisecond_dates.phpt
new file mode 100644
index 000000000..7dd051426
--- /dev/null
+++ b/ext/intl/tests/msgfmt_millisecond_dates.phpt
@@ -0,0 +1,29 @@
+--TEST--
+MessageFrormatter parses and formats dates with millisecond precision
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+date_default_timezone_set('Europe/Lisbon'); //ignored for now, see bug #58756
+
+$d = 1336308097.123;
+$mf = new MessageFormatter('en_US',
+ "On {0,time,yyyy-MM-dd G 'at' HH:mm:ss.SSS zzz} something odd happened");
+
+var_dump($mf->format(array(1336310569.123)));
+
+$p = 'On 2012-05-06 AD at 15:22:49.123 GMT+02:00 something odd happened';
+var_dump($mf->parse($p));
+
+?>
+==DONE==
+--EXPECTF--
+string(%d) "On 2012-05-0%d AD at %d:%d:49.123 %s something odd happened"
+array(1) {
+ [0]=>
+ float(1336310569.123)
+}
+==DONE==
diff --git a/ext/intl/tests/msgfmt_setPattern_cache.phpt b/ext/intl/tests/msgfmt_setPattern_cache.phpt
new file mode 100644
index 000000000..35ec463c2
--- /dev/null
+++ b/ext/intl/tests/msgfmt_setPattern_cache.phpt
@@ -0,0 +1,26 @@
+--TEST--
+MessageFormatter::setPattern() invalidates arg types cache
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+//ini_set("intl.default_locale", "nl");
+
+$mf = new MessageFormatter('en_US',
+ "{0,number} -- {1,ordinal}");
+
+var_dump($mf->format(array(1.3, 1.3)));
+var_dump($mf->format(array(1.3, 1.3)));
+$mf->setPattern("{0,ordinal} -- {1,number}");
+var_dump($mf->format(array(1.3, 1.3)));
+
+?>
+==DONE==
+--EXPECT--
+string(10) "1.3 -- 1st"
+string(10) "1.3 -- 1st"
+string(10) "1st -- 1.3"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/rbbiter___construct_basic.phpt b/ext/intl/tests/rbbiter___construct_basic.phpt
new file mode 100644
index 000000000..6fb584fde
--- /dev/null
+++ b/ext/intl/tests/rbbiter___construct_basic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+IntlRuleBasedBreakIterator::__construct: basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$rules = <<<RULES
+\$LN = [[:letter:] [:number:]];
+\$S = [.;,:];
+
+!!forward;
+\$LN+ {1};
+\$S+ {42};
+!!reverse;
+\$LN+ {1};
+\$S+ {42};
+!!safe_forward;
+!!safe_reverse;
+RULES;
+$rbbi = new IntlRuleBasedBreakIterator($rules);
+var_dump(get_class($rbbi));
+?>
+==DONE==
+--EXPECT--
+string(26) "IntlRuleBasedBreakIterator"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt b/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt
new file mode 100644
index 000000000..dce0714d4
--- /dev/null
+++ b/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt
@@ -0,0 +1,39 @@
+--TEST--
+IntlRuleBasedBreakIterator::getBinaryRules(): basic test
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$rules = <<<RULES
+\$LN = [[:letter:] [:number:]];
+\$S = [.;,:];
+
+!!forward;
+\$LN+ {1};
+\$S+ {42};
+!!reverse;
+\$LN+ {1};
+\$S+ {42};
+!!safe_forward;
+!!safe_reverse;
+RULES;
+$rbbi = new IntlRuleBasedBreakIterator($rules);
+$rbbi->setText('sdfkjsdf88á.... ,;');;
+
+$br = $rbbi->getBinaryRules();
+
+$rbbi2 = new IntlRuleBasedBreakIterator($br, true);
+
+var_dump($rbbi->getRules(), $rbbi2->getRules());
+var_dump($rbbi->getRules() == $rbbi2->getRules());
+?>
+==DONE==
+--EXPECT--
+string(128) "$LN = [[:letter:] [:number:]];$S = [.;,:];!!forward;$LN+ {1};$S+ {42};!!reverse;$LN+ {1};$S+ {42};!!safe_forward;!!safe_reverse;"
+string(128) "$LN = [[:letter:] [:number:]];$S = [.;,:];!!forward;$LN+ {1};$S+ {42};!!reverse;$LN+ {1};$S+ {42};!!safe_forward;!!safe_reverse;"
+bool(true)
+==DONE==
diff --git a/ext/intl/tests/rbbiter_getRuleStatusVec_basic.phpt b/ext/intl/tests/rbbiter_getRuleStatusVec_basic.phpt
new file mode 100644
index 000000000..a56f6bc48
--- /dev/null
+++ b/ext/intl/tests/rbbiter_getRuleStatusVec_basic.phpt
@@ -0,0 +1,59 @@
+--TEST--
+IntlRuleBasedBreakIterator::getRuleStatusVec(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$rules = <<<RULES
+\$LN = [[:letter:] [:number:]];
+\$S = [.;,:];
+
+!!forward;
+\$LN+ {1};
+[^.]+ {4};
+\$S+ {42};
+!!reverse;
+\$LN+ {1};
+[^.]+ {4};
+\$S+ {42};
+!!safe_forward;
+!!safe_reverse;
+RULES;
+$rbbi = new IntlRuleBasedBreakIterator($rules);
+$rbbi->setText('sdfkjsdf88á.... ,;');;
+
+do {
+ var_dump($rbbi->current(), $rbbi->getRuleStatusVec());
+} while ($rbbi->next() != IntlBreakIterator::DONE);
+
+?>
+==DONE==
+--EXPECT--
+int(0)
+array(1) {
+ [0]=>
+ int(0)
+}
+int(12)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+}
+int(16)
+array(1) {
+ [0]=>
+ int(42)
+}
+int(19)
+array(1) {
+ [0]=>
+ int(4)
+}
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/rbbiter_getRuleStatus_basic.phpt b/ext/intl/tests/rbbiter_getRuleStatus_basic.phpt
new file mode 100644
index 000000000..80eedbfba
--- /dev/null
+++ b/ext/intl/tests/rbbiter_getRuleStatus_basic.phpt
@@ -0,0 +1,46 @@
+--TEST--
+IntlRuleBasedBreakIterator::getRuleStatus(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$rules = <<<RULES
+\$LN = [[:letter:] [:number:]];
+\$S = [.;,:];
+
+!!forward;
+\$LN+ {1};
+\$S+ {42};
+!!reverse;
+\$LN+ {1};
+\$S+ {42};
+!!safe_forward;
+!!safe_reverse;
+RULES;
+$rbbi = new IntlRuleBasedBreakIterator($rules);
+$rbbi->setText('sdfkjsdf88á.... ,;');
+
+do {
+ echo "pos : {$rbbi->current()}\n",
+ "rule status: {$rbbi->getRuleStatus()}\n";
+} while ($rbbi->next() != IntlBreakIterator::DONE);
+
+?>
+==DONE==
+--EXPECT--
+pos : 0
+rule status: 0
+pos : 12
+rule status: 1
+pos : 16
+rule status: 42
+pos : 17
+rule status: 0
+pos : 19
+rule status: 42
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/rbbiter_getRules_basic.phpt b/ext/intl/tests/rbbiter_getRules_basic.phpt
new file mode 100644
index 000000000..2f7a40eb7
--- /dev/null
+++ b/ext/intl/tests/rbbiter_getRules_basic.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlRuleBasedBreakIterator::getRules(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+
+$rules = <<<RULES
+\$LN = [[:letter:] [:number:]];
+\$S = [.;,:];
+
+!!forward;
+\$LN+ {1};
+\$S+ {42};
+!!reverse;
+\$LN+ {1};
+\$S+ {42};
+!!safe_forward;
+!!safe_reverse;
+RULES;
+$rbbi = new IntlRuleBasedBreakIterator($rules);
+var_dump($rbbi->getRules());
+
+?>
+==DONE==
+--EXPECT--
+string(128) "$LN = [[:letter:] [:number:]];$S = [.;,:];!!forward;$LN+ {1};$S+ {42};!!reverse;$LN+ {1};$S+ {42};!!safe_forward;!!safe_reverse;"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_clone_basic.phpt b/ext/intl/tests/timezone_clone_basic.phpt
new file mode 100644
index 000000000..a8ef83f86
--- /dev/null
+++ b/ext/intl/tests/timezone_clone_basic.phpt
@@ -0,0 +1,51 @@
+--TEST--
+IntlTimeZone clone handler: basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz1 = IntlTimeZone::createTimeZone('Europe/Amsterdam');
+print_r($tz1);
+print_r(clone $tz1);
+
+//clone non-owned object
+$gmt = IntlTimeZone::getGMT();
+print_r($gmt);
+print_r(clone $gmt);
+
+?>
+==DONE==
+--EXPECTF--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Amsterdam
+ [rawOffset] => 3600000
+ [currentOffset] => %d
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Europe/Amsterdam
+ [rawOffset] => 3600000
+ [currentOffset] => %d
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT
+ [rawOffset] => 0
+ [currentOffset] => 0
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT
+ [rawOffset] => 0
+ [currentOffset] => 0
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_clone_error.phpt b/ext/intl/tests/timezone_clone_error.phpt
new file mode 100644
index 000000000..df501be3b
--- /dev/null
+++ b/ext/intl/tests/timezone_clone_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlTimeZone clone handler: error test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+class A extends IntlTimeZone {
+function __construct() {}
+}
+
+$tz = new A();
+var_dump($tz);
+try {
+var_dump(clone $tz);
+} catch (Exception $e) {
+ var_dump(get_class($e), $e->getMessage());
+}
+
+?>
+==DONE==
+--EXPECT--
+object(A)#1 (1) {
+ ["valid"]=>
+ bool(false)
+}
+string(9) "Exception"
+string(39) "Cannot clone unconstructed IntlTimeZone"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_countEquivalentIDs_basic.phpt b/ext/intl/tests/timezone_countEquivalentIDs_basic.phpt
new file mode 100644
index 000000000..ec3e4050a
--- /dev/null
+++ b/ext/intl/tests/timezone_countEquivalentIDs_basic.phpt
@@ -0,0 +1,20 @@
+--TEST--
+IntlTimeZone::countEquivalentIDs(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$count = IntlTimeZone::countEquivalentIDs('Europe/Lisbon');
+var_dump($count >= 2);
+
+$count2 = intltz_count_equivalent_ids('Europe/Lisbon');
+var_dump($count2 == $count);
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_countEquivalentIDs_error.phpt b/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
new file mode 100644
index 000000000..4d8f4bc3e
--- /dev/null
+++ b/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
@@ -0,0 +1,35 @@
+--TEST--
+IntlTimeZone::countEquivalentIDs(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::countEquivalentIDs());
+var_dump(IntlTimeZone::countEquivalentIDs(array()));
+var_dump(IntlTimeZone::countEquivalentIDs("foo\x80"));
+var_dump(IntlTimeZone::countEquivalentIDs("foo bar", 7));
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::countEquivalentIDs() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::countEquivalentIDs() expects parameter 1 to be string, array given in %s on line %d
+
+Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: could not convert time zone id to UTF-16 in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::countEquivalentIDs() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/timezone_createDefault_basic.phpt b/ext/intl/tests/timezone_createDefault_basic.phpt
new file mode 100644
index 000000000..a18899fc4
--- /dev/null
+++ b/ext/intl/tests/timezone_createDefault_basic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+IntlTimeZone::createDefault(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$tz = IntlTimeZone::createDefault();
+print_r($tz);
+$tz = intltz_create_default();
+print_r($tz);
+?>
+==DONE==
+--EXPECTF--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => %s
+ [rawOffset] => %d
+ [currentOffset] => %d
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => %s
+ [rawOffset] => %d
+ [currentOffset] => %d
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createDefault_error.phpt b/ext/intl/tests/timezone_createDefault_error.phpt
new file mode 100644
index 000000000..072489821
--- /dev/null
+++ b/ext/intl/tests/timezone_createDefault_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlTimeZone::createDefault(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::createDefault(4));
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::createDefault() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::createDefault(): intltz_create_default: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/timezone_createEnumeration_basic.phpt b/ext/intl/tests/timezone_createEnumeration_basic.phpt
new file mode 100644
index 000000000..2df32562b
--- /dev/null
+++ b/ext/intl/tests/timezone_createEnumeration_basic.phpt
@@ -0,0 +1,26 @@
+--TEST--
+IntlTimeZone::createEnumeration(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$tz = IntlTimeZone::createEnumeration();
+var_dump(get_class($tz));
+$count = count(iterator_to_array($tz));
+var_dump($count > 300);
+
+$tz = intltz_create_enumeration();
+var_dump(get_class($tz));
+$count2 = count(iterator_to_array($tz));
+var_dump($count == $count2);
+?>
+==DONE==
+--EXPECT--
+string(12) "IntlIterator"
+bool(true)
+string(12) "IntlIterator"
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createEnumeration_error.phpt b/ext/intl/tests/timezone_createEnumeration_error.phpt
new file mode 100644
index 000000000..e1e7cb933
--- /dev/null
+++ b/ext/intl/tests/timezone_createEnumeration_error.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlTimeZone::createEnumeration(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::createEnumeration(array()));
+var_dump(IntlTimeZone::createEnumeration(1, 2));
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::createEnumeration(): intltz_create_enumeration: invalid argument type in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::createEnumeration() expects at most 1 parameter, 2 given in %s on line %d
+
+Warning: IntlTimeZone::createEnumeration(): intltz_create_enumeration: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/timezone_createEnumeration_variation1.phpt b/ext/intl/tests/timezone_createEnumeration_variation1.phpt
new file mode 100644
index 000000000..30fc43660
--- /dev/null
+++ b/ext/intl/tests/timezone_createEnumeration_variation1.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlTimeZone::createEnumeration(): variant with offset
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$tz = IntlTimeZone::createEnumeration(3600000);
+var_dump(get_class($tz));
+$count = count(iterator_to_array($tz));
+var_dump($count > 20);
+
+$tz->rewind();
+var_dump(in_array('Europe/Amsterdam', iterator_to_array($tz)));
+
+?>
+==DONE==
+--EXPECT--
+string(12) "IntlIterator"
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createEnumeration_variation2.phpt b/ext/intl/tests/timezone_createEnumeration_variation2.phpt
new file mode 100644
index 000000000..ddf1a6ece
--- /dev/null
+++ b/ext/intl/tests/timezone_createEnumeration_variation2.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlTimeZone::createEnumeration(): variant with country
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$tz = IntlTimeZone::createEnumeration('NL');
+var_dump(get_class($tz));
+$count = count(iterator_to_array($tz));
+var_dump($count >= 1);
+
+$tz->rewind();
+var_dump(in_array('Europe/Amsterdam', iterator_to_array($tz)));
+
+?>
+==DONE==
+--EXPECT--
+string(12) "IntlIterator"
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt
new file mode 100644
index 000000000..9ceffc528
--- /dev/null
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlTimeZone::createTimeZoneIDEnumeration(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_ANY,
+ 'PT',
+ -3600000);
+print_r(iterator_to_array($enum));
+
+$enum = intltz_create_time_zone_id_enumeration(
+ IntlTimeZone::TYPE_ANY,
+ 'PT',
+ -3600000);
+print_r(iterator_to_array($enum));
+?>
+==DONE==
+--EXPECT--
+Array
+(
+ [0] => Atlantic/Azores
+)
+Array
+(
+ [0] => Atlantic/Azores
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
new file mode 100644
index 000000000..2cc2ac48e
--- /dev/null
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlTimeZone::createTimeZoneIDEnumeration(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::createTimeZoneIDEnumeration());
+var_dump(IntlTimeZone::createTimeZoneIDEnumeration(array()));
+var_dump(IntlTimeZone::createTimeZoneIDEnumeration(-1));
+var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, array()));
+var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, "PT", "a80"));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects at least 1 parameter, 0 given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 1 to be long, array given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad zone type in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 2 to be string, array given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 3 to be long, string given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt
new file mode 100644
index 000000000..d57dfbf42
--- /dev/null
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlTimeZone::createTimeZoneIDEnumeration(): variant without offset
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_ANY,
+ 'PT');
+$values = iterator_to_array($enum);
+var_dump(in_array('Europe/Lisbon', $values));
+var_dump(in_array('Atlantic/Azores', $values));
+
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_ANY,
+ 'PT',
+ null);
+$values2 = iterator_to_array($enum);
+var_dump($values2 == $values);
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt
new file mode 100644
index 000000000..2afe171c5
--- /dev/null
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt
@@ -0,0 +1,52 @@
+--TEST--
+IntlTimeZone::createTimeZoneIDEnumeration(): variant without region
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_ANY);
+$countAny = count(iterator_to_array($enum));
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_CANONICAL);
+$countCanonical = count(iterator_to_array($enum));
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_CANONICAL_LOCATION);
+$countCanonicalLocation = count(iterator_to_array($enum));
+
+var_dump($countAny > $countCanonical);
+var_dump($countCanonical > $countCanonicalLocation);
+
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_ANY, null, null);
+$countAny2 = count(iterator_to_array($enum));
+var_dump($countAny == $countAny2);
+
+$enum = IntlTimeZone::createTimeZoneIDEnumeration(
+ IntlTimeZone::TYPE_ANY, null, -3600000);
+$values = iterator_to_array($enum);
+
+print_r(
+array_values(
+array_intersect($values,
+array('Etc/GMT+1', 'Atlantic/Azores'))
+));
+
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+Array
+(
+ [0] => Atlantic/Azores
+ [1] => Etc/GMT+1
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createTimeZone_basic.phpt b/ext/intl/tests/timezone_createTimeZone_basic.phpt
new file mode 100644
index 000000000..e79f5b58e
--- /dev/null
+++ b/ext/intl/tests/timezone_createTimeZone_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlTimeZone::createTimeZone(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$tz = IntlTimeZone::createTimeZone('GMT+01:00');
+print_r($tz);
+$tz = intltz_create_time_zone('GMT+01:00');
+print_r($tz);
+?>
+==DONE==
+--EXPECT--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT+01:00
+ [rawOffset] => 3600000
+ [currentOffset] => 3600000
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT+01:00
+ [rawOffset] => 3600000
+ [currentOffset] => 3600000
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_createTimeZone_error.phpt b/ext/intl/tests/timezone_createTimeZone_error.phpt
new file mode 100644
index 000000000..2be821a67
--- /dev/null
+++ b/ext/intl/tests/timezone_createTimeZone_error.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlTimeZone::createTimeZone(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::createTimeZone());
+var_dump(IntlTimeZone::createTimeZone(new stdClass));
+var_dump(IntlTimeZone::createTimeZone("foo bar", 4));
+var_dump(IntlTimeZone::createTimeZone("foo\x80"));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::createTimeZone() expects parameter 1 to be string, object given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: could not convert time zone id to UTF-16 in %s on line %d
+NULL
diff --git a/ext/intl/tests/timezone_equals_basic.phpt b/ext/intl/tests/timezone_equals_basic.phpt
new file mode 100644
index 000000000..105ae8582
--- /dev/null
+++ b/ext/intl/tests/timezone_equals_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlTimeZone equals handler: basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz1 = intltz_create_time_zone('Europe/Lisbon');
+$tz2 = intltz_create_time_zone('Europe/Lisbon');
+echo "Comparison to self:\n";
+var_dump($tz1 == $tz1);
+echo "Comparison to equal instance:\n";
+var_dump($tz1 == $tz2);
+echo "Comparison to equivalent instance:\n";
+var_dump($tz1 == intltz_create_time_zone('Portugal'));
+echo "Comparison to GMT:\n";
+var_dump($tz1 == intltz_get_gmt());
+
+?>
+==DONE==
+--EXPECT--
+Comparison to self:
+bool(true)
+Comparison to equal instance:
+bool(true)
+Comparison to equivalent instance:
+bool(false)
+Comparison to GMT:
+bool(false)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_equals_error.phpt b/ext/intl/tests/timezone_equals_error.phpt
new file mode 100644
index 000000000..d8d027a76
--- /dev/null
+++ b/ext/intl/tests/timezone_equals_error.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlTimeZone equals handler: error test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+class A extends IntlTimeZone {
+function __construct() {}
+}
+
+$tz = new A();
+$tz2 = intltz_get_gmt();
+var_dump($tz, $tz2);
+try {
+var_dump($tz == $tz2);
+} catch (Exception $e) {
+ var_dump(get_class($e), $e->getMessage());
+}
+
+?>
+==DONE==
+--EXPECT--
+object(A)#1 (1) {
+ ["valid"]=>
+ bool(false)
+}
+object(IntlTimeZone)#2 (4) {
+ ["valid"]=>
+ bool(true)
+ ["id"]=>
+ string(3) "GMT"
+ ["rawOffset"]=>
+ int(0)
+ ["currentOffset"]=>
+ int(0)
+}
+string(9) "Exception"
+string(63) "Comparison with at least one unconstructed IntlTimeZone operand"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt b/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt
new file mode 100644
index 000000000..10e2621ae
--- /dev/null
+++ b/ext/intl/tests/timezone_fromDateTimeZone_basic.phpt
@@ -0,0 +1,41 @@
+--TEST--
+IntlTimeZone::fromDateTimeZone(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+date_default_timezone_set('Europe/Lisbon');
+
+$tz = IntlTimeZone::fromDateTimeZone(new DateTimeZone('Europe/Amsterdam'));
+var_dump($tz->getID(), $tz->getRawOffset());
+
+
+$dt = new DateTime('2012-01-01 00:00:00 CET');
+$dtz = $dt->getTimeZone();
+/* this is different from new DateTimeZone('CET'),
+ * which gives a Europe/Berlin timezone */
+var_dump($dtz->getName());
+$tz = IntlTimeZone::fromDateTimeZone($dtz);
+var_dump($tz->getID(), $tz->getRawOffset());
+
+
+$dt = new DateTime('2012-01-01 00:00:00 +0340');
+$dtz = $dt->getTimeZone();
+/* I don't think this timezone can be generated without a DateTime object */
+var_dump($dtz->getName());
+$tz = IntlTimeZone::fromDateTimeZone($dtz);
+var_dump($tz->getID(), $tz->getRawOffset() /* (3*60+40)*60000 */);
+
+--EXPECTF--
+string(16) "Europe/Amsterdam"
+int(3600000)
+string(3) "CET"
+string(3) "CET"
+int(3600000)
+string(6) "+03:40"
+string(%d) "GMT+03%s0"
+int(13200000)
diff --git a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
new file mode 100644
index 000000000..031882277
--- /dev/null
+++ b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
@@ -0,0 +1,50 @@
+--TEST--
+IntlTimeZone::fromDateTimeZone(): argument errors
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::fromDateTimeZone());
+var_dump(IntlTimeZone::fromDateTimeZone(1,2));
+var_dump(IntlTimeZone::fromDateTimeZone('sdfds'));
+var_dump(IntlTimeZone::fromDateTimeZone(new stdclass));
+$dt = new DateTime('2012-08-01 00:00:00 WEST');
+var_dump(IntlTimeZone::fromDateTimeZone($dt->getTimeZone()));
+
+var_dump(intltz_from_date_time_zone());
+
+--EXPECTF--
+
+Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
+
+Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, object given in %s on line %d
+
+Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
+NULL
+
+Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
+NULL
+
+Warning: intltz_from_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: intltz_from_date_time_zone(): intltz_from_date_time_zone: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/timezone_getCanonicalID_basic.phpt b/ext/intl/tests/timezone_getCanonicalID_basic.phpt
new file mode 100644
index 000000000..897e9a9ed
--- /dev/null
+++ b/ext/intl/tests/timezone_getCanonicalID_basic.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlTimeZone::getCanonicalID: basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+print_R(IntlTimeZone::getCanonicalID('Portugal'));
+echo "\n";
+print_R(intltz_get_canonical_id('Portugal'));
+echo "\n";
+?>
+==DONE==
+--EXPECT--
+Europe/Lisbon
+Europe/Lisbon
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt
new file mode 100644
index 000000000..c7ffb45b7
--- /dev/null
+++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt
@@ -0,0 +1,32 @@
+--TEST--
+IntlTimeZone::getCanonicalID(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::getCanonicalID());
+var_dump(IntlTimeZone::getCanonicalID(array()));
+var_dump(IntlTimeZone::getCanonicalID("foo\x81"));
+var_dump(IntlTimeZone::getCanonicalID('foobar', null));
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getCanonicalID() expects at least 1 parameter, 0 given in %s on line %d
+
+Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getCanonicalID() expects parameter 1 to be string, array given in %s on line %d
+
+Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
+bool(false)
+
+Fatal error: Cannot pass parameter 2 by reference in %s on line %d
diff --git a/ext/intl/tests/timezone_getCanonicalID_variant1.phpt b/ext/intl/tests/timezone_getCanonicalID_variant1.phpt
new file mode 100644
index 000000000..92a7f0737
--- /dev/null
+++ b/ext/intl/tests/timezone_getCanonicalID_variant1.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlTimeZone::getCanonicalID(): second argument
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::getCanonicalID('Portugal', $isSystemId));
+var_dump($isSystemId);
+
+var_dump(IntlTimeZone::getCanonicalID('GMT +01:25', $isSystemId));
+var_dump($isSystemId);
+
+?>
+==DONE==
+--EXPECT--
+string(13) "Europe/Lisbon"
+bool(true)
+string(0) ""
+bool(false)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDSTSavings_basic.phpt b/ext/intl/tests/timezone_getDSTSavings_basic.phpt
new file mode 100644
index 000000000..8dee5b8e9
--- /dev/null
+++ b/ext/intl/tests/timezone_getDSTSavings_basic.phpt
@@ -0,0 +1,21 @@
+--TEST--
+IntlTimeZone::getDSTSavings(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($lsb->getDSTSavings());
+
+var_dump(intltz_get_dst_savings($lsb));
+
+?>
+==DONE==
+--EXPECT--
+int(3600000)
+int(3600000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt
new file mode 100644
index 000000000..e1469f4ac
--- /dev/null
+++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlTimeZone::getDSTSavings(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getDSTSavings(array()));
+
+var_dump(intltz_get_dst_savings(null));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getDSTSavings() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getDSTSavings(): intltz_get_dst_savings: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getDisplayName_basic.phpt b/ext/intl/tests/timezone_getDisplayName_basic.phpt
new file mode 100644
index 000000000..e4fc2f37c
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlTimeZone::getDisplayName(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+ini_set('intl.default_locale', 'en_US');
+var_dump($lsb->getDisplayName());
+
+ini_set('intl.default_locale', 'pt_PT');
+var_dump($lsb->getDisplayName());
+
+?>
+==DONE==
+--EXPECTF--
+string(%d) "Western European%sTime"
+string(%d) "Hora%sda Europa Ocidental"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt
new file mode 100644
index 000000000..a12f85c85
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_error.phpt
@@ -0,0 +1,45 @@
+--TEST--
+IntlTimeZone::getDisplayName(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getDisplayName(array()));
+var_dump($tz->getDisplayName(false, array()));
+var_dump($tz->getDisplayName(false, -1));
+var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, array()));
+var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, NULL, NULL));
+
+var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_PT'));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getDisplayName() expects parameter 1 to be boolean, array given in %s on line %d
+
+Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getDisplayName() expects parameter 2 to be long, array given in %s on line %d
+
+Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getDisplayName() expects parameter 3 to be string, array given in %s on line %d
+
+Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in %s on line %d
+
+Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getDisplayName_variant1.phpt b/ext/intl/tests/timezone_getDisplayName_variant1.phpt
new file mode 100644
index 000000000..83922dd17
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_variant1.phpt
@@ -0,0 +1,26 @@
+--TEST--
+IntlTimeZone::getDisplayName(): daylight parameter effect
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("error_reporting", -1);
+ini_set("display_errors", 1);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+ini_set('intl.default_locale', 'en_US');
+var_dump($lsb->getDisplayName());
+var_dump($lsb->getDisplayName(false));
+var_dump($lsb->getDisplayName(true));
+
+?>
+==DONE==
+--EXPECTF--
+string(%d) "Western European%sTime"
+string(%d) "Western European%sTime"
+string(28) "Western European Summer Time"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
new file mode 100644
index 000000000..4ee30aee1
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
@@ -0,0 +1,38 @@
+--TEST--
+IntlTimeZone::getDisplayName(): type parameter (ICU >= 49)
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("error_reporting", -1);
+ini_set("display_errors", 1);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+ini_set('intl.default_locale', 'en_US');
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GENERIC));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GENERIC));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GMT));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GMT));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_GENERIC_LOCATION));
+
+?>
+==DONE==
+--EXPECT--
+string(3) "GMT"
+string(30) "Western European Standard Time"
+string(22) "Portugal Time (Lisbon)"
+string(21) "Western European Time"
+string(5) "+0000"
+string(3) "GMT"
+string(3) "GMT"
+string(22) "Portugal Time (Lisbon)"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDisplayName_variant2.phpt b/ext/intl/tests/timezone_getDisplayName_variant2.phpt
new file mode 100644
index 000000000..1ccf68767
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_variant2.phpt
@@ -0,0 +1,40 @@
+--TEST--
+IntlTimeZone::getDisplayName(): type parameter (ICU < 49)
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') >= 0)
+ die('skip for ICU < 49');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("error_reporting", -1);
+ini_set("display_errors", 1);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+ini_set('intl.default_locale', 'en_US');
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GENERIC));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GENERIC));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GMT));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GMT));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_GENERIC_LOCATION));
+
+?>
+==DONE==
+--EXPECT--
+string(3) "WET"
+string(21) "Western European Time"
+string(22) "Portugal Time (Lisbon)"
+string(22) "Portugal Time (Lisbon)"
+string(5) "+0000"
+string(3) "GMT"
+string(3) "GMT"
+string(22) "Portugal Time (Lisbon)"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt b/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt
new file mode 100644
index 000000000..e90cc4748
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlTimeZone::getDisplayName(): locale parameter
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("error_reporting", -1);
+ini_set("display_errors", 1);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+ini_set('intl.default_locale', 'en_US');
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, NULL));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, 'pt_PT'));
+
+?>
+==DONE==
+--EXPECT--
+string(30) "Western European Standard Time"
+string(30) "Western European Standard Time"
+string(32) "Hora Padrão da Europa Ocidental"
+==DONE==
diff --git a/ext/intl/tests/timezone_getDisplayName_variant3.phpt b/ext/intl/tests/timezone_getDisplayName_variant3.phpt
new file mode 100644
index 000000000..c16077758
--- /dev/null
+++ b/ext/intl/tests/timezone_getDisplayName_variant3.phpt
@@ -0,0 +1,28 @@
+--TEST--
+IntlTimeZone::getDisplayName(): locale parameter
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') >= 0)
+ die('skip for ICU <= 4.8');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("error_reporting", -1);
+ini_set("display_errors", 1);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+ini_set('intl.default_locale', 'en_US');
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, NULL));
+var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, 'pt_PT'));
+
+?>
+==DONE==
+--EXPECT--
+string(21) "Western European Time"
+string(21) "Western European Time"
+string(24) "Hora da Europa Ocidental"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getEquivalentID_basic.phpt b/ext/intl/tests/timezone_getEquivalentID_basic.phpt
new file mode 100644
index 000000000..8af1e2089
--- /dev/null
+++ b/ext/intl/tests/timezone_getEquivalentID_basic.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlTimeZone::getEquivalentID(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+print_R(IntlTimeZone::getEquivalentID('Europe/Lisbon', "1"));
+echo "\n";
+print_R(intltz_get_equivalent_id('Europe/Lisbon', 1));
+echo "\n";
+?>
+==DONE==
+--EXPECT--
+Portugal
+Portugal
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getEquivalentID_error.phpt b/ext/intl/tests/timezone_getEquivalentID_error.phpt
new file mode 100644
index 000000000..b3f344b54
--- /dev/null
+++ b/ext/intl/tests/timezone_getEquivalentID_error.phpt
@@ -0,0 +1,34 @@
+--TEST--
+IntlTimeZone::getEquivalentID(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::getEquivalentID('foo'));
+var_dump(IntlTimeZone::getEquivalentID('foo', 'bar'));
+var_dump(IntlTimeZone::getEquivalentID('Europe/Lisbon', 0, 1));
+var_dump(IntlTimeZone::getEquivalentID("foo\x80", 0));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getEquivalentID() expects parameter 2 to be long, string given in %s on line %d
+
+Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 3 given in %s on line %d
+
+Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: could not convert time zone id to UTF-16 in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt b/ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt
new file mode 100644
index 000000000..d3a3dee47
--- /dev/null
+++ b/ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+IntlTimeZone::getErrorCode/Message(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+var_dump($lsb->getErrorCode());
+var_dump($lsb->getErrorMessage());
+
+var_dump($lsb->getOffset(INF, 1, $a, $b));
+
+var_dump($lsb->getErrorCode());
+var_dump($lsb->getErrorMessage());
+
+?>
+==DONE==
+--EXPECTF--
+int(0)
+string(12) "U_ZERO_ERROR"
+
+Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d
+bool(false)
+int(1)
+string(67) "intltz_get_offset: error obtaining offset: U_ILLEGAL_ARGUMENT_ERROR"
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt
new file mode 100644
index 000000000..b56d3b0a4
--- /dev/null
+++ b/ext/intl/tests/timezone_getErrorCode_error.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlTimeZone::getErrorCode(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getErrorCode(array()));
+
+var_dump(intltz_get_error_code(null));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getErrorCode(): intltz_get_error_code: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt
new file mode 100644
index 000000000..067dcdc13
--- /dev/null
+++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlTimeZone::getErrorMessage(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getErrorMessage(array()));
+
+var_dump(intltz_get_error_message(null));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getErrorMessage(): intltz_get_error_message: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getGMT_basic.phpt b/ext/intl/tests/timezone_getGMT_basic.phpt
new file mode 100644
index 000000000..99b3fa22c
--- /dev/null
+++ b/ext/intl/tests/timezone_getGMT_basic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+IntlTimeZone::getGMT(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$tz = IntlTimeZone::getGMT();
+print_r($tz);
+$tz = intltz_get_gmt();
+print_r($tz);
+?>
+==DONE==
+--EXPECT--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT
+ [rawOffset] => 0
+ [currentOffset] => 0
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => GMT
+ [rawOffset] => 0
+ [currentOffset] => 0
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getGMT_error.phpt b/ext/intl/tests/timezone_getGMT_error.phpt
new file mode 100644
index 000000000..15afb765e
--- /dev/null
+++ b/ext/intl/tests/timezone_getGMT_error.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlTimeZone::getGMT(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::getGMT(4));
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getGMT() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getGMT(): intltz_get_gmt: bad arguments in %s on line %d
+NULL
diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt
new file mode 100644
index 000000000..b239b3fac
--- /dev/null
+++ b/ext/intl/tests/timezone_getID_error.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlTimeZone::getID(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getID('foo'));
+intltz_get_id(null);
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getID() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getID(): intltz_get_id: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getOffset_basic.phpt b/ext/intl/tests/timezone_getOffset_basic.phpt
new file mode 100644
index 000000000..582d45cad
--- /dev/null
+++ b/ext/intl/tests/timezone_getOffset_basic.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlTimeZone::getOffset(): basic test
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$ams = IntlTimeZone::createTimeZone('Europe/Amsterdam');
+
+$date = strtotime("1 July 2012 +0000");
+
+var_dump($ams->getOffset($date *1000., true, $rawOffset, $dstOffset),
+ $rawOffset, $dstOffset);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+
+var_dump(intltz_get_offset($lsb, $date *1000., true, $rawOffset, $dstOffset),
+ $rawOffset, $dstOffset);
+
+?>
+==DONE==
+--EXPECT--
+bool(true)
+int(3600000)
+int(3600000)
+bool(true)
+int(0)
+int(3600000)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt
new file mode 100644
index 000000000..73555002c
--- /dev/null
+++ b/ext/intl/tests/timezone_getOffset_error.phpt
@@ -0,0 +1,33 @@
+--TEST--
+IntlTimeZone::getOffset(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getOffset(INF, true, $a, $a));
+var_dump($tz->getOffset(time()*1000, true, $a));
+var_dump($tz->getOffset(time()*1000, true, $a, $a, $a));
+
+intltz_get_offset(null, time()*1000, false, $a, $a);
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 3 given in %s on line %d
+
+Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s on line %d
+
+Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getRawOffset_basic.phpt b/ext/intl/tests/timezone_getRawOffset_basic.phpt
new file mode 100644
index 000000000..a2b4debf2
--- /dev/null
+++ b/ext/intl/tests/timezone_getRawOffset_basic.phpt
@@ -0,0 +1,21 @@
+--TEST--
+IntlTimeZone::getRawOffset(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$ams = IntlTimeZone::createTimeZone('Europe/Amsterdam');
+var_dump($ams->getRawOffset());
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump(intltz_get_raw_offset($lsb));
+
+?>
+==DONE==
+--EXPECT--
+int(3600000)
+int(0)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt
new file mode 100644
index 000000000..eb6aac02c
--- /dev/null
+++ b/ext/intl/tests/timezone_getRawOffset_error.phpt
@@ -0,0 +1,23 @@
+--TEST--
+IntlTimeZone::getRawOffset(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->getRawOffset('foo'));
+
+intltz_get_raw_offset(null);
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getRawOffset() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getRawOffset(): intltz_get_raw_offset: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/tests/timezone_getRegion_basic.phpt b/ext/intl/tests/timezone_getRegion_basic.phpt
new file mode 100644
index 000000000..1a41ae8d5
--- /dev/null
+++ b/ext/intl/tests/timezone_getRegion_basic.phpt
@@ -0,0 +1,21 @@
+--TEST--
+IntlTimeZone::getRegion(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+print_R(IntlTimeZone::getRegion('Europe/Amsterdam'));
+echo "\n";
+print_R(intltz_get_region('Europe/Amsterdam'));
+echo "\n";
+?>
+==DONE==
+--EXPECT--
+NL
+NL
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getRegion_error.phpt b/ext/intl/tests/timezone_getRegion_error.phpt
new file mode 100644
index 000000000..34911d9ab
--- /dev/null
+++ b/ext/intl/tests/timezone_getRegion_error.phpt
@@ -0,0 +1,42 @@
+--TEST--
+IntlTimeZone::getRegion(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
+ die('skip for ICU 4.8+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::getRegion());
+var_dump(IntlTimeZone::getRegion(array()));
+var_dump(IntlTimeZone::getRegion('Europe/Lisbon', 4));
+var_dump(IntlTimeZone::getRegion("foo\x81"));
+var_dump(IntlTimeZone::getRegion("foo"));
+
+
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getRegion() expects parameter 1 to be string, array given in %s on line %d
+
+Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getRegion(): intltz_get_region: could not convert time zone id to UTF-16 in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::getRegion(): intltz_get_region: Error obtaining region in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/timezone_getTZDataVersion_error.phpt b/ext/intl/tests/timezone_getTZDataVersion_error.phpt
new file mode 100644
index 000000000..258b8807b
--- /dev/null
+++ b/ext/intl/tests/timezone_getTZDataVersion_error.phpt
@@ -0,0 +1,18 @@
+--TEST--
+IntlTimeZone::getTZDataVersion(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+var_dump(IntlTimeZone::getTZDataVersion('foo'));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getTZDataVersion() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getTZDataVersion(): intltz_get_tz_data_version: bad arguments in %s on line %d
+bool(false)
diff --git a/ext/intl/tests/timezone_getTZData_basic.phpt b/ext/intl/tests/timezone_getTZData_basic.phpt
new file mode 100644
index 000000000..dea5b7c4b
--- /dev/null
+++ b/ext/intl/tests/timezone_getTZData_basic.phpt
@@ -0,0 +1,19 @@
+--TEST--
+IntlTimeZone::getTZDataVersion: basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+print_R(IntlTimeZone::getTZDataVersion());
+echo "\n";
+print_R(intltz_get_tz_data_version());
+echo "\n";
+?>
+==DONE==
+--EXPECTF--
+20%d%s
+20%d%s
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getUnknown_basic.phpt b/ext/intl/tests/timezone_getUnknown_basic.phpt
new file mode 100644
index 000000000..aef1a5456
--- /dev/null
+++ b/ext/intl/tests/timezone_getUnknown_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+IntlCalendar::getUnknown(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+
+$tz = IntlTimeZone::getUnknown();
+print_r($tz);
+$tz = intltz_get_unknown();
+print_r($tz);
+?>
+==DONE==
+--EXPECT--
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Etc/Unknown
+ [rawOffset] => 0
+ [currentOffset] => 0
+)
+IntlTimeZone Object
+(
+ [valid] => 1
+ [id] => Etc/Unknown
+ [rawOffset] => 0
+ [currentOffset] => 0
+)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getUnknown_error.phpt b/ext/intl/tests/timezone_getUnknown_error.phpt
new file mode 100644
index 000000000..704b1b096
--- /dev/null
+++ b/ext/intl/tests/timezone_getUnknown_error.phpt
@@ -0,0 +1,29 @@
+--TEST--
+IntlCalendar::getUnknown(): bad arguments
+--INI--
+date.timezone=Atlantic/Azores
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip for ICU 49+');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$c = new IntlGregorianCalendar(NULL, 'pt_PT');
+
+IntlTimeZone::getUnknown(1);
+
+intltz_get_unknown(1);
+
+--EXPECTF--
+
+Warning: IntlTimeZone::getUnknown() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::getUnknown(): intltz_get_unknown: bad arguments in %s on line %d
+
+Warning: intltz_get_unknown() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: intltz_get_unknown(): intltz_get_unknown: bad arguments in %s on line %d
diff --git a/ext/intl/tests/timezone_hasSameRules_basic.phpt b/ext/intl/tests/timezone_hasSameRules_basic.phpt
new file mode 100644
index 000000000..55faaf760
--- /dev/null
+++ b/ext/intl/tests/timezone_hasSameRules_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+IntlTimeZone::hasSameRules(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+$prt = IntlTimeZone::createTimeZone('Portugal');
+$azo = IntlTimeZone::createTimeZone('Atlantic/Azores');
+
+echo "Europe/Lisbon has same rules as itself:\n";
+var_dump($lsb->hasSameRules($lsb));
+
+echo "\nEurope/Lisbon has same rules as Portugal:\n";
+var_dump($lsb->hasSameRules($prt));
+
+echo "\nEurope/Lisbon has same rules as Atlantic/Azores:\n";
+var_dump(intltz_has_same_rules($lsb, $azo));
+
+?>
+==DONE==
+--EXPECT--
+Europe/Lisbon has same rules as itself:
+bool(true)
+
+Europe/Lisbon has same rules as Portugal:
+bool(true)
+
+Europe/Lisbon has same rules as Atlantic/Azores:
+bool(false)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt
new file mode 100644
index 000000000..35a29be5d
--- /dev/null
+++ b/ext/intl/tests/timezone_hasSameRules_error.phpt
@@ -0,0 +1,37 @@
+--TEST--
+IntlTimeZone::hasSameRules(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+function error_handler($errno, $errstr, $errfile, $errline)
+{
+ var_dump($errno, $errstr);
+ return true;
+}
+set_error_handler("error_handler");
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->hasSameRules('foo'));
+
+var_dump(intltz_has_same_rules(null, $tz));
+
+--EXPECT--
+int(4096)
+string(99) "Argument 1 passed to IntlTimeZone::hasSameRules() must be an instance of IntlTimeZone, string given"
+int(2)
+string(81) "IntlTimeZone::hasSameRules() expects parameter 1 to be IntlTimeZone, string given"
+int(2)
+string(66) "IntlTimeZone::hasSameRules(): intltz_has_same_rules: bad arguments"
+bool(false)
+int(4096)
+string(92) "Argument 1 passed to intltz_has_same_rules() must be an instance of IntlTimeZone, null given"
+int(2)
+string(74) "intltz_has_same_rules() expects parameter 1 to be IntlTimeZone, null given"
+int(2)
+string(61) "intltz_has_same_rules(): intltz_has_same_rules: bad arguments"
+bool(false)
diff --git a/ext/intl/tests/timezone_toDateTimeZone_basic.phpt b/ext/intl/tests/timezone_toDateTimeZone_basic.phpt
new file mode 100644
index 000000000..d22aa689d
--- /dev/null
+++ b/ext/intl/tests/timezone_toDateTimeZone_basic.phpt
@@ -0,0 +1,38 @@
+--TEST--
+IntlTimeZone::toDateTimeZone(): basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "nl");
+date_default_timezone_set('Europe/Lisbon');
+
+function do_test(IntlTimeZone $tz, $proc = false) {
+ var_dump($tz->getID(), $tz->getRawOffset());
+ if (!$proc)
+ $dtz = $tz->toDateTimeZone();
+ else
+ $dtz = intltz_to_date_time_zone($tz);
+ var_dump($dtz->getName(), $dtz->getOffset(new DateTime('2012-01-01 00:00:00')));
+}
+
+do_test(IntlTimeZone::createTimeZone('CET'));
+do_test(IntlTimeZone::createTimeZone('Europe/Amsterdam'));
+do_test(IntlTimeZone::createTimeZone('GMT+0405'), true);
+
+--EXPECTF--
+string(3) "CET"
+int(3600000)
+string(13) "Europe/Berlin"
+int(3600)
+string(16) "Europe/Amsterdam"
+int(3600000)
+string(16) "Europe/Amsterdam"
+int(3600)
+string(%s) "GMT+04%s5"
+int(14700000)
+string(6) "+04:05"
+int(14700)
diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
new file mode 100644
index 000000000..e48d7aca9
--- /dev/null
+++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
@@ -0,0 +1,38 @@
+--TEST--
+IntlTimeZone::toDateTimeZone(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Etc/Unknown');
+
+var_dump($tz->toDateTimeZone(''));
+try {
+ var_dump($tz->toDateTimeZone());
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+var_dump(intltz_to_date_time_zone());
+var_dump(intltz_to_date_time_zone(1));
+
+--EXPECTF--
+
+Warning: IntlTimeZone::toDateTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: bad arguments in %s on line %d
+bool(false)
+
+Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: DateTimeZone constructor threw exception in %s on line %d
+string(66) "DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
+
+Warning: intltz_to_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d
+
+Warning: intltz_to_date_time_zone(): intltz_to_date_time_zone: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s on line %d
diff --git a/ext/intl/tests/timezone_useDaylightTime_basic.phpt b/ext/intl/tests/timezone_useDaylightTime_basic.phpt
new file mode 100644
index 000000000..15baf108b
--- /dev/null
+++ b/ext/intl/tests/timezone_useDaylightTime_basic.phpt
@@ -0,0 +1,25 @@
+--TEST--
+IntlTimeZone::useDaylightTime: basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
+$gmt = IntlTimeZone::getGMT();
+
+var_dump($lsb->useDaylightTime());
+var_dump($gmt->useDaylightTime());
+
+var_dump(intltz_use_daylight_time($lsb));
+var_dump(intltz_use_daylight_time($gmt));
+?>
+==DONE==
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt
new file mode 100644
index 000000000..aa5ca6cfc
--- /dev/null
+++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlTimeZone::useDaylightTime(): errors
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+
+$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
+var_dump($tz->useDaylightTime('foo'));
+intltz_use_daylight_time(null);
+
+--EXPECTF--
+
+Warning: IntlTimeZone::useDaylightTime() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlTimeZone::useDaylightTime(): intltz_use_daylight_time: bad arguments in %s on line %d
+bool(false)
+
+Catchable fatal error: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s on line %d
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
new file mode 100644
index 000000000..374b16385
--- /dev/null
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -0,0 +1,540 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../intl_cppshims.h"
+
+#include <unicode/timezone.h>
+#include <unicode/calendar.h>
+#include "../intl_convertcpp.h"
+
+#include "../common/common_date.h"
+
+extern "C" {
+#include "../intl_convert.h"
+#define USE_TIMEZONE_POINTER 1
+#include "timezone_class.h"
+#include "timezone_methods.h"
+#include <zend_exceptions.h>
+#include <zend_interfaces.h>
+#include <ext/date/php_date.h>
+}
+
+/* {{{ Global variables */
+U_CDECL_BEGIN
+zend_class_entry *TimeZone_ce_ptr = NULL;
+zend_object_handlers TimeZone_handlers;
+U_CDECL_END
+/* }}} */
+
+/* {{{ timezone_object_construct */
+U_CFUNC void timezone_object_construct(const TimeZone *zone, zval *object, int owned TSRMLS_DC)
+{
+ TimeZone_object *to;
+
+ object_init_ex(object, TimeZone_ce_ptr);
+ TIMEZONE_METHOD_FETCH_OBJECT_NO_CHECK; /* fetch zend object from zval "object" into "to" */
+ to->utimezone = zone;
+ to->should_delete = owned;
+}
+/* }}} */
+
+/* {{{ timezone_convert_to_datetimezone
+ * Convert from TimeZone to DateTimeZone object */
+U_CFUNC zval *timezone_convert_to_datetimezone(const TimeZone *timeZone,
+ intl_error *outside_error,
+ const char *func TSRMLS_DC)
+{
+ zval *ret = NULL;
+ UnicodeString id;
+ char *message = NULL;
+ php_timezone_obj *tzobj;
+ zval arg = zval_used_for_init;
+
+ timeZone->getID(id);
+ if (id.isBogus()) {
+ spprintf(&message, 0, "%s: could not obtain TimeZone id", func);
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ goto error;
+ }
+
+ MAKE_STD_ZVAL(ret);
+ object_init_ex(ret, php_date_get_timezone_ce());
+ tzobj = (php_timezone_obj *)zend_objects_get_address(ret TSRMLS_CC);
+
+ if (id.compare(0, 3, UnicodeString("GMT", sizeof("GMT")-1, US_INV)) == 0) {
+ /* The DateTimeZone constructor doesn't support offset time zones,
+ * so we must mess with DateTimeZone structure ourselves */
+ tzobj->initialized = 1;
+ tzobj->type = TIMELIB_ZONETYPE_OFFSET;
+ //convert offset from milliseconds to minutes
+ tzobj->tzi.utc_offset = -1 * timeZone->getRawOffset() / (60 * 1000);
+ } else {
+ /* Call the constructor! */
+ Z_TYPE(arg) = IS_STRING;
+ if (intl_charFromString(id, &Z_STRVAL(arg), &Z_STRLEN(arg),
+ &INTL_ERROR_CODE(*outside_error)) == FAILURE) {
+ spprintf(&message, 0, "%s: could not convert id to UTF-8", func);
+ intl_errors_set(outside_error, INTL_ERROR_CODE(*outside_error),
+ message, 1 TSRMLS_CC);
+ goto error;
+ }
+ zend_call_method_with_1_params(&ret, NULL, NULL, "__construct",
+ NULL, &arg);
+ if (EG(exception)) {
+ spprintf(&message, 0,
+ "%s: DateTimeZone constructor threw exception", func);
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
+ message, 1 TSRMLS_CC);
+ zend_object_store_ctor_failed(ret TSRMLS_CC);
+ goto error;
+ }
+ }
+
+ if (0) {
+error:
+ if (ret) {
+ zval_ptr_dtor(&ret);
+ }
+ ret = NULL;
+ }
+
+ if (message) {
+ efree(message);
+ }
+ if (Z_TYPE(arg) == IS_STRING) {
+ zval_dtor(&arg);
+ }
+ return ret;
+}
+/* }}} */
+
+/* {{{ timezone_process_timezone_argument
+ * TimeZone argument processor. outside_error may be NULL (for static functions/constructors) */
+U_CFUNC TimeZone *timezone_process_timezone_argument(zval **zv_timezone,
+ intl_error *outside_error,
+ const char *func TSRMLS_DC)
+{
+ zval local_zv_tz = zval_used_for_init,
+ *local_zv_tz_p = &local_zv_tz;
+ char *message = NULL;
+ TimeZone *timeZone;
+
+ if (zv_timezone == NULL || Z_TYPE_PP(zv_timezone) == IS_NULL) {
+ timelib_tzinfo *tzinfo = get_timezone_info(TSRMLS_C);
+ ZVAL_STRING(&local_zv_tz, tzinfo->name, 0);
+ zv_timezone = &local_zv_tz_p;
+ }
+
+ if (Z_TYPE_PP(zv_timezone) == IS_OBJECT &&
+ instanceof_function(Z_OBJCE_PP(zv_timezone), TimeZone_ce_ptr TSRMLS_CC)) {
+ TimeZone_object *to = (TimeZone_object*)zend_objects_get_address(
+ *zv_timezone TSRMLS_CC);
+ if (to->utimezone == NULL) {
+ spprintf(&message, 0, "%s: passed IntlTimeZone is not "
+ "properly constructed", func);
+ if (message) {
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ return NULL;
+ }
+ timeZone = to->utimezone->clone();
+ if (timeZone == NULL) {
+ spprintf(&message, 0, "%s: could not clone TimeZone", func);
+ if (message) {
+ intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ return NULL;
+ }
+ } else if (Z_TYPE_PP(zv_timezone) == IS_OBJECT &&
+ instanceof_function(Z_OBJCE_PP(zv_timezone), php_date_get_timezone_ce() TSRMLS_CC)) {
+
+ php_timezone_obj *tzobj = (php_timezone_obj *)zend_objects_get_address(
+ *zv_timezone TSRMLS_CC);
+
+ return timezone_convert_datetimezone(tzobj->type, tzobj, 0,
+ outside_error, func TSRMLS_CC);
+ } else {
+ UnicodeString id,
+ gottenId;
+ UErrorCode status = U_ZERO_ERROR; /* outside_error may be NULL */
+ convert_to_string_ex(zv_timezone);
+ if (intl_stringFromChar(id, Z_STRVAL_PP(zv_timezone), Z_STRLEN_PP(zv_timezone),
+ &status) == FAILURE) {
+ spprintf(&message, 0, "%s: Time zone identifier given is not a "
+ "valid UTF-8 string", func);
+ if (message) {
+ intl_errors_set(outside_error, status, message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ return NULL;
+ }
+ timeZone = TimeZone::createTimeZone(id);
+ if (timeZone == NULL) {
+ spprintf(&message, 0, "%s: could not create time zone", func);
+ if (message) {
+ intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ return NULL;
+ }
+ if (timeZone->getID(gottenId) != id) {
+ spprintf(&message, 0, "%s: no such time zone: '%s'",
+ func, Z_STRVAL_PP(zv_timezone));
+ if (message) {
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ efree(message);
+ }
+ delete timeZone;
+ return NULL;
+ }
+ }
+
+ return timeZone;
+}
+/* }}} */
+
+/* {{{ clone handler for TimeZone */
+static zend_object_value TimeZone_clone_obj(zval *object TSRMLS_DC)
+{
+ TimeZone_object *to_orig,
+ *to_new;
+ zend_object_value ret_val;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ to_orig = (TimeZone_object*)zend_object_store_get_object(object TSRMLS_CC);
+ intl_error_reset(TIMEZONE_ERROR_P(to_orig) TSRMLS_CC);
+
+ ret_val = TimeZone_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
+ to_new = (TimeZone_object*)zend_object_store_get_object_by_handle(
+ ret_val.handle TSRMLS_CC);
+
+ zend_objects_clone_members(&to_new->zo, ret_val,
+ &to_orig->zo, Z_OBJ_HANDLE_P(object) TSRMLS_CC);
+
+ if (to_orig->utimezone != NULL) {
+ TimeZone *newTimeZone;
+
+ newTimeZone = to_orig->utimezone->clone();
+ to_new->should_delete = 1;
+ if (!newTimeZone) {
+ char *err_msg;
+ intl_errors_set_code(TIMEZONE_ERROR_P(to_orig),
+ U_MEMORY_ALLOCATION_ERROR TSRMLS_CC);
+ intl_errors_set_custom_msg(TIMEZONE_ERROR_P(to_orig),
+ "Could not clone IntlTimeZone", 0 TSRMLS_CC);
+ err_msg = intl_error_get_message(TIMEZONE_ERROR_P(to_orig) TSRMLS_CC);
+ zend_throw_exception(NULL, err_msg, 0 TSRMLS_CC);
+ efree(err_msg);
+ } else {
+ to_new->utimezone = newTimeZone;
+ }
+ } else {
+ zend_throw_exception(NULL, "Cannot clone unconstructed IntlTimeZone", 0 TSRMLS_CC);
+ }
+
+ return ret_val;
+}
+/* }}} */
+
+/* {{{ compare_objects handler for TimeZone
+ * Can't be used for >, >=, <, <= comparisons */
+static int TimeZone_compare_objects(zval *object1, zval *object2 TSRMLS_DC)
+{
+ TimeZone_object *to1,
+ *to2;
+ to1 = (TimeZone_object*)zend_object_store_get_object(object1 TSRMLS_CC);
+ to2 = (TimeZone_object*)zend_object_store_get_object(object2 TSRMLS_CC);
+
+ if (to1->utimezone == NULL || to2->utimezone == NULL) {
+ zend_throw_exception(NULL, "Comparison with at least one unconstructed "
+ "IntlTimeZone operand", 0 TSRMLS_CC);
+ /* intentionally not returning */
+ } else {
+ if (*to1->utimezone == *to2->utimezone) {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+/* }}} */
+
+/* {{{ get_debug_info handler for TimeZone */
+static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp TSRMLS_DC)
+{
+ zval zv = zval_used_for_init;
+ TimeZone_object *to;
+ const TimeZone *tz;
+ UnicodeString ustr;
+ char *str;
+ int str_len;
+ UErrorCode uec = U_ZERO_ERROR;
+
+ *is_temp = 1;
+
+ array_init_size(&zv, 4);
+
+ to = (TimeZone_object*)zend_object_store_get_object(object TSRMLS_CC);
+ tz = to->utimezone;
+
+ if (tz == NULL) {
+ add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 0);
+ return Z_ARRVAL(zv);
+ }
+
+ add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 1);
+
+ tz->getID(ustr);
+ intl_convert_utf16_to_utf8(&str, &str_len,
+ ustr.getBuffer(), ustr.length(), &uec);
+ if (U_FAILURE(uec)) {
+ return Z_ARRVAL(zv);
+ }
+ add_assoc_stringl_ex(&zv, "id", sizeof("id"), str, str_len, 0);
+
+ int32_t rawOffset, dstOffset;
+ UDate now = Calendar::getNow();
+ tz->getOffset(now, FALSE, rawOffset, dstOffset, uec);
+ if (U_FAILURE(uec)) {
+ return Z_ARRVAL(zv);
+ }
+
+ add_assoc_long_ex(&zv, "rawOffset", sizeof("rawOffset"), (long)rawOffset);
+ add_assoc_long_ex(&zv, "currentOffset", sizeof("currentOffset"),
+ (long)(rawOffset + dstOffset));
+
+ return Z_ARRVAL(zv);
+}
+/* }}} */
+
+/* {{{ void TimeZone_object_init(TimeZone_object* to)
+ * Initialize internals of TImeZone_object not specific to zend standard objects.
+ */
+static void TimeZone_object_init(TimeZone_object *to TSRMLS_DC)
+{
+ intl_error_init(TIMEZONE_ERROR_P(to) TSRMLS_CC);
+ to->utimezone = NULL;
+ to->should_delete = 0;
+}
+/* }}} */
+
+/* {{{ TimeZone_objects_dtor */
+static void TimeZone_objects_dtor(zend_object *object,
+ zend_object_handle handle TSRMLS_DC)
+{
+ zend_objects_destroy_object(object, handle TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ TimeZone_objects_free */
+static void TimeZone_objects_free(zend_object *object TSRMLS_DC)
+{
+ TimeZone_object* to = (TimeZone_object*) object;
+
+ if (to->utimezone && to->should_delete) {
+ delete to->utimezone;
+ to->utimezone = NULL;
+ }
+ intl_error_reset(TIMEZONE_ERROR_P(to) TSRMLS_CC);
+
+ zend_object_std_dtor(&to->zo TSRMLS_CC);
+
+ efree(to);
+}
+/* }}} */
+
+/* {{{ TimeZone_object_create */
+static zend_object_value TimeZone_object_create(zend_class_entry *ce TSRMLS_DC)
+{
+ zend_object_value retval;
+ TimeZone_object* intern;
+
+ intern = (TimeZone_object*)ecalloc(1, sizeof(TimeZone_object));
+
+ zend_object_std_init(&intern->zo, ce TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->zo.properties, &(ce->default_properties),
+ (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*));
+#else
+ object_properties_init((zend_object*) intern, ce);
+#endif
+ TimeZone_object_init(intern TSRMLS_CC);
+
+ retval.handle = zend_objects_store_put(
+ intern,
+ (zend_objects_store_dtor_t) TimeZone_objects_dtor,
+ (zend_objects_free_object_storage_t) TimeZone_objects_free,
+ NULL TSRMLS_CC);
+
+ retval.handlers = &TimeZone_handlers;
+
+ return retval;
+}
+/* }}} */
+
+/* {{{ TimeZone methods arguments info */
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_idarg, 0, 0, 1)
+ ZEND_ARG_INFO(0, zoneId)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_fromDateTimeZone, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, otherTimeZone, IntlTimeZone, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_createEnumeration, 0, 0, 0)
+ ZEND_ARG_INFO(0, countryOrRawOffset)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_countEquivalentIDs, 0, 0, 1)
+ ZEND_ARG_INFO(0, zoneId)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_createTimeZoneIDEnumeration, 0, 0, 1)
+ ZEND_ARG_INFO(0, zoneType)
+ ZEND_ARG_INFO(0, region)
+ ZEND_ARG_INFO(0, rawOffset)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_getCanonicalID, 0, 0, 1)
+ ZEND_ARG_INFO(0, zoneId)
+ ZEND_ARG_INFO(1, isSystemID)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_getEquivalentID, 0, 0, 2)
+ ZEND_ARG_INFO(0, zoneId)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_getOffset, 0, 0, 4)
+ ZEND_ARG_INFO(0, date)
+ ZEND_ARG_INFO(0, local)
+ ZEND_ARG_INFO(1, rawOffset)
+ ZEND_ARG_INFO(1, dstOffset)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_hasSameRules, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, otherTimeZone, IntlTimeZone, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_getDisplayName, 0, 0, 0)
+ ZEND_ARG_INFO(0, isDaylight)
+ ZEND_ARG_INFO(0, style)
+ ZEND_ARG_INFO(0, locale)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_void, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+/* }}} */
+
+/* {{{ TimeZone_class_functions
+ * Every 'IntlTimeZone' class method has an entry in this table
+ */
+static zend_function_entry TimeZone_class_functions[] = {
+ PHP_ME(IntlTimeZone, __construct, ainfo_tz_void, ZEND_ACC_PRIVATE)
+ PHP_ME_MAPPING(createTimeZone, intltz_create_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME_MAPPING(createDefault, intltz_create_default, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME_MAPPING(getGMT, intltz_get_gmt, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+ PHP_ME_MAPPING(getUnknown, intltz_get_unknown, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#endif
+ PHP_ME_MAPPING(createEnumeration, intltz_create_enumeration, ainfo_tz_createEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME_MAPPING(countEquivalentIDs, intltz_count_equivalent_ids, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ PHP_ME_MAPPING(createTimeZoneIDEnumeration, intltz_create_time_zone_id_enumeration, ainfo_tz_createTimeZoneIDEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#endif
+ PHP_ME_MAPPING(getCanonicalID, intltz_get_canonical_id, ainfo_tz_getCanonicalID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ PHP_ME_MAPPING(getRegion, intltz_get_region, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#endif
+ PHP_ME_MAPPING(getTZDataVersion, intltz_get_tz_data_version, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME_MAPPING(getEquivalentID, intltz_get_equivalent_id, ainfo_tz_getEquivalentID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+
+ PHP_ME_MAPPING(getID, intltz_get_id, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(useDaylightTime, intltz_use_daylight_time, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getOffset, intltz_get_offset, ainfo_tz_getOffset, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getRawOffset, intltz_get_raw_offset, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(hasSameRules, intltz_has_same_rules, ainfo_tz_hasSameRules, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getDisplayName, intltz_get_display_name, ainfo_tz_getDisplayName, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getDSTSavings, intltz_get_dst_savings, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(toDateTimeZone, intltz_to_date_time_zone, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getErrorCode, intltz_get_error_code, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_ME_MAPPING(getErrorMessage, intltz_get_error_message, ainfo_tz_void, ZEND_ACC_PUBLIC)
+ PHP_FE_END
+};
+/* }}} */
+
+/* {{{ timezone_register_IntlTimeZone_class
+ * Initialize 'IntlTimeZone' class
+ */
+U_CFUNC void timezone_register_IntlTimeZone_class(TSRMLS_D)
+{
+ zend_class_entry ce;
+
+ /* Create and register 'IntlTimeZone' class. */
+ INIT_CLASS_ENTRY(ce, "IntlTimeZone", TimeZone_class_functions);
+ ce.create_object = TimeZone_object_create;
+ TimeZone_ce_ptr = zend_register_internal_class(&ce TSRMLS_CC);
+ if (!TimeZone_ce_ptr) {
+ //can't happen now without bigger problems before
+ php_error_docref0(NULL TSRMLS_CC, E_ERROR,
+ "IntlTimeZone: class registration has failed.");
+ return;
+ }
+
+ memcpy(&TimeZone_handlers, zend_get_std_object_handlers(),
+ sizeof TimeZone_handlers);
+ TimeZone_handlers.clone_obj = TimeZone_clone_obj;
+ TimeZone_handlers.compare_objects = TimeZone_compare_objects;
+ TimeZone_handlers.get_debug_info = TimeZone_get_debug_info;
+
+ /* Declare 'IntlTimeZone' class constants */
+#define TIMEZONE_DECL_LONG_CONST(name, val) \
+ zend_declare_class_constant_long(TimeZone_ce_ptr, name, sizeof(name) - 1, \
+ val TSRMLS_CC)
+
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT", TimeZone::SHORT);
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG", TimeZone::LONG);
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT_GENERIC", TimeZone::SHORT_GENERIC);
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG_GENERIC", TimeZone::LONG_GENERIC);
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT_GMT", TimeZone::SHORT_GMT);
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG_GMT", TimeZone::LONG_GMT);
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT_COMMONLY_USED", TimeZone::SHORT_COMMONLY_USED);
+ TIMEZONE_DECL_LONG_CONST("DISPLAY_GENERIC_LOCATION", TimeZone::GENERIC_LOCATION);
+#endif
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+ TIMEZONE_DECL_LONG_CONST("TYPE_ANY", UCAL_ZONE_TYPE_ANY);
+ TIMEZONE_DECL_LONG_CONST("TYPE_CANONICAL", UCAL_ZONE_TYPE_CANONICAL);
+ TIMEZONE_DECL_LONG_CONST("TYPE_CANONICAL_LOCATION", UCAL_ZONE_TYPE_CANONICAL_LOCATION);
+#endif
+
+ /* Declare 'IntlTimeZone' class properties */
+
+}
+/* }}} */
diff --git a/ext/intl/timezone/timezone_class.h b/ext/intl/timezone/timezone_class.h
new file mode 100644
index 000000000..a638f6dbf
--- /dev/null
+++ b/ext/intl/timezone/timezone_class.h
@@ -0,0 +1,72 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@netcabo.pt> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef TIMEZONE_CLASS_H
+#define TIMEZONE_CLASS_H
+
+//redefinition of inline in PHP headers causes problems, so include this before
+#include <math.h>
+
+//fixes the build on windows for old versions of ICU
+#include <stdio.h>
+
+#include <php.h>
+#include "intl_error.h"
+#include "intl_data.h"
+
+#ifndef USE_TIMEZONE_POINTER
+typedef void TimeZone;
+#endif
+
+typedef struct {
+ zend_object zo;
+
+ // error handling
+ intl_error err;
+
+ // ICU TimeZone
+ const TimeZone *utimezone;
+
+ //whether to delete the timezone on object free
+ zend_bool should_delete;
+} TimeZone_object;
+
+#define TIMEZONE_ERROR(to) (to)->err
+#define TIMEZONE_ERROR_P(to) &(TIMEZONE_ERROR(to))
+
+#define TIMEZONE_ERROR_CODE(co) INTL_ERROR_CODE(TIMEZONE_ERROR(to))
+#define TIMEZONE_ERROR_CODE_P(co) &(INTL_ERROR_CODE(TIMEZONE_ERROR(to)))
+
+#define TIMEZONE_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(TimeZone, to)
+#define TIMEZONE_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(TimeZone, to)
+#define TIMEZONE_METHOD_FETCH_OBJECT\
+ TIMEZONE_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (to->utimezone == NULL) { \
+ intl_errors_set(&to->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlTimeZone", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
+zval *timezone_convert_to_datetimezone(const TimeZone *timeZone, intl_error *outside_error, const char *func TSRMLS_DC);
+TimeZone *timezone_process_timezone_argument(zval **zv_timezone, intl_error *error, const char *func TSRMLS_DC);
+
+void timezone_object_construct(const TimeZone *zone, zval *object, int owned TSRMLS_DC);
+
+void timezone_register_IntlTimeZone_class(TSRMLS_D);
+
+extern zend_class_entry *TimeZone_ce_ptr;
+extern zend_object_handlers TimeZone_handlers;
+
+#endif /* #ifndef TIMEZONE_CLASS_H */
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
new file mode 100644
index 000000000..9ca6b44c8
--- /dev/null
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -0,0 +1,659 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../intl_cppshims.h"
+
+#include <unicode/locid.h>
+#include <unicode/timezone.h>
+#include <unicode/ustring.h>
+#include "intl_convertcpp.h"
+
+#include "../common/common_date.h"
+
+extern "C" {
+#include "../php_intl.h"
+#define USE_TIMEZONE_POINTER 1
+#include "timezone_class.h"
+#include "intl_convert.h"
+#include <zend_exceptions.h>
+#include <ext/date/php_date.h>
+}
+#include "common/common_enum.h"
+
+U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
+{
+ zend_throw_exception( NULL,
+ "An object of this type cannot be created with the new operator",
+ 0 TSRMLS_CC );
+}
+
+U_CFUNC PHP_FUNCTION(intltz_create_time_zone)
+{
+ char *str_id;
+ int str_id_len;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ &str_id, &str_id_len) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_time_zone: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ UErrorCode status = UErrorCode();
+ UnicodeString id = UnicodeString();
+ if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
+ intl_error_set(NULL, status,
+ "intltz_create_time_zone: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ //guaranteed non-null; GMT if timezone cannot be understood
+ TimeZone *tz = TimeZone::createTimeZone(id);
+ timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
+{
+ zval *zv_timezone;
+ TimeZone *tz;
+ php_timezone_obj *tzobj;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O",
+ &zv_timezone, php_date_get_timezone_ce()) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_from_date_time_zone: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ tzobj = (php_timezone_obj *)zend_objects_get_address(zv_timezone TSRMLS_CC);
+ if (!tzobj->initialized) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_from_date_time_zone: DateTimeZone object is unconstructed",
+ 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ tz = timezone_convert_datetimezone(tzobj->type, tzobj, FALSE, NULL,
+ "intltz_from_date_time_zone" TSRMLS_CC);
+ if (tz == NULL) {
+ RETURN_NULL();
+ }
+
+ timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(intltz_create_default)
+{
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_default: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ TimeZone *tz = TimeZone::createDefault();
+ timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_gmt)
+{
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_gmt: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ timezone_object_construct(TimeZone::getGMT(), return_value, 0 TSRMLS_CC);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 49
+U_CFUNC PHP_FUNCTION(intltz_get_unknown)
+{
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_unknown: bad arguments", 0 TSRMLS_CC);
+ RETURN_NULL();
+ }
+
+ timezone_object_construct(&TimeZone::getUnknown(), return_value, 0 TSRMLS_CC);
+}
+#endif
+
+U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
+{
+ zval **arg = NULL;
+ StringEnumeration *se = NULL;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ /* double indirection to have the zend engine destroy the new zval that
+ * results from separation */
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|Z", &arg) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_enumeration: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (arg == NULL || Z_TYPE_PP(arg) == IS_NULL) {
+ se = TimeZone::createEnumeration();
+ } else if (Z_TYPE_PP(arg) == IS_LONG) {
+int_offset:
+ if (Z_LVAL_PP(arg) < (long)INT32_MIN ||
+ Z_LVAL_PP(arg) > (long)INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_enumeration: value is out of range", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ } else {
+ se = TimeZone::createEnumeration((int32_t) Z_LVAL_PP(arg));
+ }
+ } else if (Z_TYPE_PP(arg) == IS_DOUBLE) {
+double_offset:
+ convert_to_long_ex(arg);
+ goto int_offset;
+ } else if (Z_TYPE_PP(arg) == IS_OBJECT || Z_TYPE_PP(arg) == IS_STRING) {
+ long lval;
+ double dval;
+ convert_to_string_ex(arg);
+ switch (is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &lval, &dval, 0)) {
+ case IS_DOUBLE:
+ SEPARATE_ZVAL(arg);
+ zval_dtor(*arg);
+ Z_TYPE_PP(arg) = IS_DOUBLE;
+ Z_DVAL_PP(arg) = dval;
+ goto double_offset;
+ case IS_LONG:
+ SEPARATE_ZVAL(arg);
+ zval_dtor(*arg);
+ Z_TYPE_PP(arg) = IS_LONG;
+ Z_LVAL_PP(arg) = lval;
+ goto int_offset;
+ }
+ /* else call string version */
+ se = TimeZone::createEnumeration(Z_STRVAL_PP(arg));
+ } else {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_enumeration: invalid argument type", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (se) {
+ IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
+ } else {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_enumeration: error obtaining enumeration", 0 TSRMLS_CC);
+ RETVAL_FALSE;
+ }
+}
+
+U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
+{
+ char *str_id;
+ int str_id_len;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ &str_id, &str_id_len) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_count_equivalent_ids: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UErrorCode status = UErrorCode();
+ UnicodeString id = UnicodeString();
+ if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
+ intl_error_set(NULL, status,
+ "intltz_count_equivalent_ids: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ int32_t result = TimeZone::countEquivalentIDs(id);
+ RETURN_LONG((long)result);
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
+{
+ long zoneType,
+ offset_arg;
+ char *region = NULL;
+ int region_len = 0;
+ int32_t offset,
+ *offsetp = NULL;
+ int arg3isnull = 0;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ /* must come before zpp because zpp would convert the arg in the stack to 0 */
+ if (ZEND_NUM_ARGS() == 3) {
+ zval **dummy, **zvoffset;
+ arg3isnull = zend_get_parameters_ex(3, &dummy, &dummy, &zvoffset)
+ != FAILURE && Z_TYPE_PP(zvoffset) == IS_NULL;
+ }
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s!l",
+ &zoneType, &region, &region_len, &offset_arg) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_time_zone_id_enumeration: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (zoneType != UCAL_ZONE_TYPE_ANY && zoneType != UCAL_ZONE_TYPE_CANONICAL
+ && zoneType != UCAL_ZONE_TYPE_CANONICAL_LOCATION) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_time_zone_id_enumeration: bad zone type", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (ZEND_NUM_ARGS() == 3) {
+ if (offset_arg < (long)INT32_MIN || offset_arg > (long)INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_create_time_zone_id_enumeration: offset out of bounds", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (!arg3isnull) {
+ offset = (int32_t)offset_arg;
+ offsetp = &offset;
+ } //else leave offsetp NULL
+ }
+
+ StringEnumeration *se;
+ UErrorCode uec = UErrorCode();
+ se = TimeZone::createTimeZoneIDEnumeration((USystemTimeZoneType)zoneType,
+ region, offsetp, uec);
+ INTL_CHECK_STATUS(uec, "intltz_create_time_zone_id_enumeration: "
+ "Error obtaining time zone id enumeration")
+
+ IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
+}
+#endif
+
+U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
+{
+ char *str_id;
+ int str_id_len;
+ zval *is_systemid = NULL;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z",
+ &str_id, &str_id_len, &is_systemid) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_canonical_id: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UErrorCode status = UErrorCode();
+ UnicodeString id;
+ if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
+ intl_error_set(NULL, status,
+ "intltz_get_canonical_id: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UnicodeString result;
+ UBool isSystemID;
+ TimeZone::getCanonicalID(id, result, isSystemID, status);
+ INTL_CHECK_STATUS(status, "intltz_get_canonical_id: error obtaining canonical ID");
+
+ intl_convert_utf16_to_utf8(&Z_STRVAL_P(return_value), &Z_STRLEN_P(return_value),
+ result.getBuffer(), result.length(), &status);
+ INTL_CHECK_STATUS(status,
+ "intltz_get_canonical_id: could not convert time zone id to UTF-16");
+ Z_TYPE_P(return_value) = IS_STRING;
+
+ if (is_systemid) { /* by-ref argument passed */
+ zval_dtor(is_systemid);
+ ZVAL_BOOL(is_systemid, isSystemID);
+ }
+}
+
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
+U_CFUNC PHP_FUNCTION(intltz_get_region)
+{
+ char *str_id;
+ int str_id_len;
+ char outbuf[3];
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ &str_id, &str_id_len) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_region: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UErrorCode status = UErrorCode();
+ UnicodeString id;
+ if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
+ intl_error_set(NULL, status,
+ "intltz_get_region: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ int32_t region_len = TimeZone::getRegion(id, outbuf, sizeof(outbuf), status);
+ INTL_CHECK_STATUS(status, "intltz_get_region: Error obtaining region");
+
+ RETURN_STRINGL(outbuf, region_len, 1);
+}
+#endif
+
+U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
+{
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_tz_data_version: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UErrorCode status = UErrorCode();
+ const char *res = TimeZone::getTZDataVersion(status);
+ INTL_CHECK_STATUS(status, "intltz_get_tz_data_version: "
+ "Error obtaining time zone data version");
+
+ RETURN_STRING(res, 1);
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id)
+{
+ char *str_id;
+ int str_id_len;
+ long index;
+ intl_error_reset(NULL TSRMLS_CC);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl",
+ &str_id, &str_id_len, &index) == FAILURE ||
+ index < (long)INT32_MIN || index > (long)INT32_MAX) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_equivalent_id: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ UErrorCode status = UErrorCode();
+ UnicodeString id;
+ if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
+ intl_error_set(NULL, status,
+ "intltz_get_equivalent_id: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ const UnicodeString result = TimeZone::getEquivalentID(id, (int32_t)index);
+ intl_convert_utf16_to_utf8(&Z_STRVAL_P(return_value), &Z_STRLEN_P(return_value),
+ result.getBuffer(), result.length(), &status);
+ INTL_CHECK_STATUS(status, "intltz_get_equivalent_id: "
+ "could not convert resulting time zone id to UTF-16");
+ Z_TYPE_P(return_value) = IS_STRING;
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_id)
+{
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_id: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ UnicodeString id_us;
+ to->utimezone->getID(id_us);
+
+ char *id = NULL;
+ int id_len = 0;
+
+ intl_convert_utf16_to_utf8(&id, &id_len,
+ id_us.getBuffer(), id_us.length(), TIMEZONE_ERROR_CODE_P(to));
+ INTL_METHOD_CHECK_STATUS(to, "intltz_get_id: Could not convert id to UTF-8");
+
+ RETURN_STRINGL(id, id_len, 0);
+}
+
+U_CFUNC PHP_FUNCTION(intltz_use_daylight_time)
+{
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_use_daylight_time: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ RETURN_BOOL(to->utimezone->useDaylightTime());
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_offset)
+{
+ UDate date;
+ zend_bool local;
+ zval *rawOffsetArg,
+ *dstOffsetArg;
+ int32_t rawOffset,
+ dstOffset;
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "Odbzz", &object, TimeZone_ce_ptr, &date, &local, &rawOffsetArg,
+ &dstOffsetArg) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_offset: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ to->utimezone->getOffset(date, (UBool) local, rawOffset, dstOffset,
+ TIMEZONE_ERROR_CODE(to));
+
+ INTL_METHOD_CHECK_STATUS(to, "intltz_get_offset: error obtaining offset");
+
+ zval_dtor(rawOffsetArg);
+ ZVAL_LONG(rawOffsetArg, rawOffset);
+ zval_dtor(dstOffsetArg);
+ ZVAL_LONG(dstOffsetArg, dstOffset);
+
+ RETURN_TRUE;
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_raw_offset)
+{
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_raw_offset: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ RETURN_LONG(to->utimezone->getRawOffset());
+}
+
+U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
+{
+ zval *other_object;
+ TimeZone_object *other_to;
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "OO", &object, TimeZone_ce_ptr, &other_object, TimeZone_ce_ptr)
+ == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_has_same_rules: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+ TIMEZONE_METHOD_FETCH_OBJECT;
+ other_to = (TimeZone_object *) zend_object_store_get_object(other_object TSRMLS_CC);
+ if (other_to->utimezone == NULL) {
+ intl_errors_set(&to->err, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_has_same_rules: The second IntlTimeZone is unconstructed", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ RETURN_BOOL(to->utimezone->hasSameRules(*other_to->utimezone));
+}
+
+static const TimeZone::EDisplayType display_types[] = {
+ TimeZone::SHORT, TimeZone::LONG,
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
+ TimeZone::SHORT_GENERIC, TimeZone::LONG_GENERIC,
+ TimeZone::SHORT_GMT, TimeZone::LONG_GMT,
+ TimeZone::SHORT_COMMONLY_USED, TimeZone::GENERIC_LOCATION
+#endif
+};
+
+U_CFUNC PHP_FUNCTION(intltz_get_display_name)
+{
+ zend_bool daylight = 0;
+ long display_type = TimeZone::LONG;
+ const char *locale_str = NULL;
+ int dummy = 0;
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O|bls!", &object, TimeZone_ce_ptr, &daylight, &display_type,
+ &locale_str, &dummy) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_display_name: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ bool found = false;
+ for (int i = 0; !found && i < sizeof(display_types)/sizeof(*display_types); i++) {
+ if (display_types[i] == display_type)
+ found = true;
+ }
+ if (!found) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_display_name: wrong display type", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ if (!locale_str) {
+ locale_str = intl_locale_get_default(TSRMLS_C);
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ UnicodeString result;
+ to->utimezone->getDisplayName((UBool)daylight, (TimeZone::EDisplayType)display_type,
+ Locale::createFromName(locale_str), result);
+
+ intl_convert_utf16_to_utf8(&Z_STRVAL_P(return_value), &Z_STRLEN_P(return_value),
+ result.getBuffer(), result.length(), TIMEZONE_ERROR_CODE_P(to));
+ INTL_METHOD_CHECK_STATUS(to, "intltz_get_display_name: "
+ "could not convert resulting time zone id to UTF-16");
+
+ Z_TYPE_P(return_value) = IS_STRING;
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_dst_savings)
+{
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_dst_savings: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ RETURN_LONG((long)to->utimezone->getDSTSavings());
+}
+
+U_CFUNC PHP_FUNCTION(intltz_to_date_time_zone)
+{
+ TIMEZONE_METHOD_INIT_VARS;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ "O", &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_to_date_time_zone: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ TIMEZONE_METHOD_FETCH_OBJECT;
+
+ zval *ret = timezone_convert_to_datetimezone(to->utimezone,
+ &TIMEZONE_ERROR(to), "intltz_to_date_time_zone" TSRMLS_CC);
+
+ if (ret) {
+ RETURN_ZVAL(ret, 1, 1);
+ } else {
+ RETURN_FALSE;
+ }
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_error_code)
+{
+ TIMEZONE_METHOD_INIT_VARS
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_error_code: bad arguments", 0 TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
+ /* Fetch the object (without resetting its last error code ). */
+ to = (TimeZone_object*)zend_object_store_get_object(object TSRMLS_CC);
+ if (to == NULL)
+ RETURN_FALSE;
+
+ RETURN_LONG((long)TIMEZONE_ERROR_CODE(to));
+}
+
+U_CFUNC PHP_FUNCTION(intltz_get_error_message)
+{
+ const char* message = NULL;
+ TIMEZONE_METHOD_INIT_VARS
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ &object, TimeZone_ce_ptr) == FAILURE) {
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_error_message: bad arguments", 0 TSRMLS_CC );
+ RETURN_FALSE;
+ }
+
+
+ /* Fetch the object (without resetting its last error code ). */
+ to = (TimeZone_object*)zend_object_store_get_object(object TSRMLS_CC);
+ if (to == NULL)
+ RETURN_FALSE;
+
+ /* Return last error message. */
+ message = intl_error_get_message(TIMEZONE_ERROR_P(to) TSRMLS_CC);
+ RETURN_STRING(message, 0);
+}
diff --git a/ext/intl/timezone/timezone_methods.h b/ext/intl/timezone/timezone_methods.h
new file mode 100644
index 000000000..28c39f4fd
--- /dev/null
+++ b/ext/intl/timezone/timezone_methods.h
@@ -0,0 +1,68 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Gustavo Lopes <cataphract@netcabo.pt> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef TIMEZONE_METHODS_H
+#define TIMEZONE_METHODS_H
+
+#include <php.h>
+
+PHP_METHOD(IntlTimeZone, __construct);
+
+PHP_FUNCTION(intltz_create_time_zone);
+
+PHP_FUNCTION(intltz_from_date_time_zone);
+
+PHP_FUNCTION(intltz_create_default);
+
+PHP_FUNCTION(intltz_get_id);
+
+PHP_FUNCTION(intltz_get_gmt);
+
+PHP_FUNCTION(intltz_get_unknown);
+
+PHP_FUNCTION(intltz_create_enumeration);
+
+PHP_FUNCTION(intltz_count_equivalent_ids);
+
+PHP_FUNCTION(intltz_create_time_zone_id_enumeration);
+
+PHP_FUNCTION(intltz_get_canonical_id);
+
+PHP_FUNCTION(intltz_get_region);
+
+PHP_FUNCTION(intltz_get_tz_data_version);
+
+PHP_FUNCTION(intltz_get_equivalent_id);
+
+PHP_FUNCTION(intltz_use_daylight_time);
+
+PHP_FUNCTION(intltz_get_offset);
+
+PHP_FUNCTION(intltz_get_raw_offset);
+
+PHP_FUNCTION(intltz_has_same_rules);
+
+PHP_FUNCTION(intltz_get_display_name);
+
+PHP_FUNCTION(intltz_get_dst_savings);
+
+PHP_FUNCTION(intltz_to_date_time_zone);
+
+PHP_FUNCTION(intltz_get_error_code);
+
+PHP_FUNCTION(intltz_get_error_message);
+
+#endif /* #ifndef TIMEZONE_METHODS_H */
diff --git a/ext/intl/transliterator/transliterator.c b/ext/intl/transliterator/transliterator.c
index 75c9eaabd..8ee49e1e5 100644
--- a/ext/intl/transliterator/transliterator.c
+++ b/ext/intl/transliterator/transliterator.c
@@ -49,85 +49,6 @@ void transliterator_register_constants( INIT_FUNC_ARGS )
}
/* }}} */
-/* {{{ transliterator_parse_error_to_string
- * Transforms parse errors in strings.
- */
-smart_str transliterator_parse_error_to_string( UParseError* pe )
-{
- smart_str ret = {0};
- char *buf;
- int u8len;
- UErrorCode status;
- int any = 0;
-
- assert( pe != NULL );
-
- smart_str_appends( &ret, "parse error " );
- if( pe->line > 0 )
- {
- smart_str_appends( &ret, "on line " );
- smart_str_append_long( &ret, (long ) pe->line );
- any = 1;
- }
- if( pe->offset >= 0 ) {
- if( any )
- smart_str_appends( &ret, ", " );
- else
- smart_str_appends( &ret, "at " );
-
- smart_str_appends( &ret, "offset " );
- smart_str_append_long( &ret, (long ) pe->offset );
- any = 1;
- }
-
- if (pe->preContext[0] != 0 ) {
- if( any )
- smart_str_appends( &ret, ", " );
-
- smart_str_appends( &ret, "after \"" );
- intl_convert_utf16_to_utf8( &buf, &u8len, pe->preContext, -1, &status );
- if( U_FAILURE( status ) )
- {
- smart_str_appends( &ret, "(could not convert parser error pre-context to UTF-8)" );
- }
- else {
- smart_str_appendl( &ret, buf, u8len );
- efree( buf );
- }
- smart_str_appends( &ret, "\"" );
- any = 1;
- }
-
- if( pe->postContext[0] != 0 )
- {
- if( any )
- smart_str_appends( &ret, ", " );
-
- smart_str_appends( &ret, "before or at \"" );
- intl_convert_utf16_to_utf8( &buf, &u8len, pe->postContext, -1, &status );
- if( U_FAILURE( status ) )
- {
- smart_str_appends( &ret, "(could not convert parser error post-context to UTF-8)" );
- }
- else
- {
- smart_str_appendl( &ret, buf, u8len );
- efree( buf );
- }
- smart_str_appends( &ret, "\"" );
- any = 1;
- }
-
- if( !any )
- {
- smart_str_free( &ret );
- smart_str_appends( &ret, "no parse error" );
- }
-
- smart_str_0( &ret );
- return ret;
-}
-
/*
* Local variables:
* tab-width: 4
diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c
index d0cfb9790..1aa39c54b 100644
--- a/ext/intl/transliterator/transliterator_methods.c
+++ b/ext/intl/transliterator/transliterator_methods.c
@@ -183,7 +183,7 @@ PHP_FUNCTION( transliterator_create_from_rules )
{
char *msg = NULL;
smart_str parse_error_str;
- parse_error_str = transliterator_parse_error_to_string( &parse_error );
+ parse_error_str = intl_parse_error_to_string( &parse_error );
spprintf( &msg, 0, "transliterator_create_from_rules: unable to "
"create ICU transliterator from rules (%s)", parse_error_str.c );
smart_str_free( &parse_error_str );
diff --git a/ext/json/JSON_parser.h b/ext/json/JSON_parser.h
index 541664b8c..8671765b4 100644
--- a/ext/json/JSON_parser.h
+++ b/ext/json/JSON_parser.h
@@ -25,7 +25,10 @@ enum error_codes {
PHP_JSON_ERROR_STATE_MISMATCH,
PHP_JSON_ERROR_CTRL_CHAR,
PHP_JSON_ERROR_SYNTAX,
- PHP_JSON_ERROR_UTF8
+ PHP_JSON_ERROR_UTF8,
+ PHP_JSON_ERROR_RECURSION,
+ PHP_JSON_ERROR_INF_OR_NAN,
+ PHP_JSON_ERROR_UNSUPPORTED_TYPE
};
extern JSON_parser new_JSON_parser(int depth);
diff --git a/ext/json/json.c b/ext/json/json.c
index 786b21ac9..e4bb8a5d4 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -35,6 +35,7 @@ static PHP_MINFO_FUNCTION(json);
static PHP_FUNCTION(json_encode);
static PHP_FUNCTION(json_decode);
static PHP_FUNCTION(json_last_error);
+static PHP_FUNCTION(json_last_error_msg);
static const char digits[] = "0123456789abcdef";
@@ -46,6 +47,7 @@ ZEND_DECLARE_MODULE_GLOBALS(json)
ZEND_BEGIN_ARG_INFO_EX(arginfo_json_encode, 0, 0, 1)
ZEND_ARG_INFO(0, value)
ZEND_ARG_INFO(0, options)
+ ZEND_ARG_INFO(0, depth)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_json_decode, 0, 0, 1)
@@ -57,6 +59,9 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_json_last_error, 0)
ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_json_last_error_msg, 0)
+ZEND_END_ARG_INFO()
/* }}} */
/* {{{ json_functions[] */
@@ -64,6 +69,7 @@ static const zend_function_entry json_functions[] = {
PHP_FE(json_encode, arginfo_json_encode)
PHP_FE(json_decode, arginfo_json_decode)
PHP_FE(json_last_error, arginfo_json_last_error)
+ PHP_FE(json_last_error_msg, arginfo_json_last_error_msg)
PHP_FE_END
};
/* }}} */
@@ -96,6 +102,7 @@ static PHP_MINIT_FUNCTION(json)
REGISTER_LONG_CONSTANT("JSON_UNESCAPED_SLASHES", PHP_JSON_UNESCAPED_SLASHES, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_PRETTY_PRINT", PHP_JSON_PRETTY_PRINT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_UNESCAPED_UNICODE", PHP_JSON_UNESCAPED_UNICODE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("JSON_PARTIAL_OUTPUT_ON_ERROR", PHP_JSON_PARTIAL_OUTPUT_ON_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, CONST_CS | CONST_PERSISTENT);
@@ -103,6 +110,9 @@ static PHP_MINIT_FUNCTION(json)
REGISTER_LONG_CONSTANT("JSON_ERROR_CTRL_CHAR", PHP_JSON_ERROR_CTRL_CHAR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_SYNTAX", PHP_JSON_ERROR_SYNTAX, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_UTF8", PHP_JSON_ERROR_UTF8, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("JSON_ERROR_RECURSION", PHP_JSON_ERROR_RECURSION, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("JSON_ERROR_INF_OR_NAN", PHP_JSON_ERROR_INF_OR_NAN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("JSON_ERROR_UNSUPPORTED_TYPE", PHP_JSON_ERROR_UNSUPPORTED_TYPE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_OBJECT_AS_ARRAY", PHP_JSON_OBJECT_AS_ARRAY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_BIGINT_AS_STRING", PHP_JSON_BIGINT_AS_STRING, CONST_CS | CONST_PERSISTENT);
@@ -117,6 +127,7 @@ static PHP_GINIT_FUNCTION(json)
{
json_globals->encoder_depth = 0;
json_globals->error_code = 0;
+ json_globals->encode_max_depth = 0;
}
/* }}} */
@@ -231,7 +242,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
}
if (myht && myht->nApplyCount > 1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
+ JSON_G(error_code) = PHP_JSON_ERROR_RECURSION;
smart_str_appendl(buf, "null", 4);
return;
}
@@ -332,6 +343,9 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
}
}
+ if (JSON_G(encoder_depth) > JSON_G(encode_max_depth)) {
+ JSON_G(error_code) = PHP_JSON_ERROR_DEPTH;
+ }
--JSON_G(encoder_depth);
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
json_pretty_print_indent(buf, options TSRMLS_CC);
@@ -373,7 +387,7 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR
smart_str_appendl(buf, tmp, l);
efree(tmp);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "double %.9g does not conform to the JSON spec, encoded as 0", d);
+ JSON_G(error_code) = PHP_JSON_ERROR_INF_OR_NAN;
smart_str_appendc(buf, '0');
}
}
@@ -390,9 +404,6 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR
}
if (ulen < 0) {
JSON_G(error_code) = PHP_JSON_ERROR_UTF8;
- if (!PG(display_errors)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid UTF-8 sequence in argument");
- }
smart_str_appendl(buf, "null", 4);
} else {
smart_str_appendl(buf, "\"\"", 2);
@@ -525,7 +536,7 @@ static void json_encode_serializable_object(smart_str *buf, zval *val, int optio
}
if (myht && myht->nApplyCount > 1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
+ JSON_G(error_code) = PHP_JSON_ERROR_RECURSION;
smart_str_appendl(buf, "null", 4);
return;
}
@@ -589,7 +600,7 @@ PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_
smart_str_appendl(buf, d, len);
efree(d);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "double %.9g does not conform to the JSON spec, encoded as 0", dbl);
+ JSON_G(error_code) = PHP_JSON_ERROR_INF_OR_NAN;
smart_str_appendc(buf, '0');
}
}
@@ -610,7 +621,7 @@ PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "type is unsupported, encoded as null");
+ JSON_G(error_code) = PHP_JSON_ERROR_UNSUPPORTED_TYPE;
smart_str_appendl(buf, "null", 4);
break;
}
@@ -689,23 +700,30 @@ PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, int str_len,
/* }}} */
-/* {{{ proto string json_encode(mixed data [, int options])
+/* {{{ proto string json_encode(mixed data [, int options[, int depth]])
Returns the JSON representation of a value */
static PHP_FUNCTION(json_encode)
{
zval *parameter;
smart_str buf = {0};
long options = 0;
+ long depth = JSON_PARSER_DEFAULT_DEPTH;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &parameter, &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ll", &parameter, &options, &depth) == FAILURE) {
return;
}
JSON_G(error_code) = PHP_JSON_ERROR_NONE;
+ JSON_G(encode_max_depth) = depth;
+
php_json_encode(&buf, parameter, options TSRMLS_CC);
- ZVAL_STRINGL(return_value, buf.c, buf.len, 1);
+ if (JSON_G(error_code) != PHP_JSON_ERROR_NONE && !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) {
+ ZVAL_FALSE(return_value);
+ } else {
+ ZVAL_STRINGL(return_value, buf.c, buf.len, 1);
+ }
smart_str_free(&buf);
}
@@ -743,7 +761,7 @@ static PHP_FUNCTION(json_decode)
/* }}} */
/* {{{ proto int json_last_error()
- Returns the error code of the last json_decode(). */
+ Returns the error code of the last json_encode() or json_decode() call. */
static PHP_FUNCTION(json_last_error)
{
if (zend_parse_parameters_none() == FAILURE) {
@@ -754,6 +772,40 @@ static PHP_FUNCTION(json_last_error)
}
/* }}} */
+/* {{{ proto string json_last_error_msg()
+ Returns the error string of the last json_encode() or json_decode() call. */
+static PHP_FUNCTION(json_last_error_msg)
+{
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ switch(JSON_G(error_code)) {
+ case PHP_JSON_ERROR_NONE:
+ RETURN_STRING("No error", 1);
+ case PHP_JSON_ERROR_DEPTH:
+ RETURN_STRING("Maximum stack depth exceeded", 1);
+ case PHP_JSON_ERROR_STATE_MISMATCH:
+ RETURN_STRING("State mismatch (invalid or malformed JSON)", 1);
+ case PHP_JSON_ERROR_CTRL_CHAR:
+ RETURN_STRING("Control character error, possibly incorrectly encoded", 1);
+ case PHP_JSON_ERROR_SYNTAX:
+ RETURN_STRING("Syntax error", 1);
+ case PHP_JSON_ERROR_UTF8:
+ RETURN_STRING("Malformed UTF-8 characters, possibly incorrectly encoded", 1);
+ case PHP_JSON_ERROR_RECURSION:
+ RETURN_STRING("Recursion detected", 1);
+ case PHP_JSON_ERROR_INF_OR_NAN:
+ RETURN_STRING("Inf and NaN cannot be JSON encoded", 1);
+ case PHP_JSON_ERROR_UNSUPPORTED_TYPE:
+ RETURN_STRING("Type is not supported", 1);
+ default:
+ RETURN_STRING("Unknown error", 1);
+ }
+
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index ef3e4b5a7..2b3cf5868 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -40,6 +40,7 @@ extern zend_module_entry json_module_entry;
ZEND_BEGIN_MODULE_GLOBALS(json)
int encoder_depth;
int error_code;
+ int encode_max_depth;
ZEND_END_MODULE_GLOBALS(json)
#ifdef ZTS
@@ -63,6 +64,7 @@ extern zend_class_entry *php_json_serializable_ce;
#define PHP_JSON_UNESCAPED_SLASHES (1<<6)
#define PHP_JSON_PRETTY_PRINT (1<<7)
#define PHP_JSON_UNESCAPED_UNICODE (1<<8)
+#define PHP_JSON_PARTIAL_OUTPUT_ON_ERROR (1<<9)
/* Internal flags */
#define PHP_JSON_OUTPUT_ARRAY 0
diff --git a/ext/json/tests/003.phpt b/ext/json/tests/003.phpt
index 3b52fb088..4ce5b0fde 100644
--- a/ext/json/tests/003.phpt
+++ b/ext/json/tests/003.phpt
@@ -9,10 +9,16 @@ $a = array();
$a[] = &$a;
var_dump($a);
+
+echo "\n";
+
var_dump(json_encode($a));
+var_dump(json_last_error(), json_last_error_msg());
-/* Break circular data structure to prevent memory leaks */
-unset($a[0]);
+echo "\n";
+
+var_dump(json_encode($a, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
echo "Done\n";
?>
@@ -25,6 +31,11 @@ array(1) {
}
}
-Warning: json_encode(): recursion detected in %s on line %d
+bool(false)
+int(6)
+string(%d) "Recursion detected"
+
string(8) "[[null]]"
+int(6)
+string(%d) "Recursion detected"
Done
diff --git a/ext/json/tests/004.phpt b/ext/json/tests/004.phpt
index 1d282f9a9..70ef3ffd1 100644
--- a/ext/json/tests/004.phpt
+++ b/ext/json/tests/004.phpt
@@ -9,7 +9,16 @@ $a = new stdclass;
$a->prop = $a;
var_dump($a);
+
+echo "\n";
+
var_dump(json_encode($a));
+var_dump(json_last_error(), json_last_error_msg());
+
+echo "\n";
+
+var_dump(json_encode($a, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
echo "Done\n";
?>
@@ -19,6 +28,11 @@ object(stdClass)#%d (1) {
*RECURSION*
}
-Warning: json_encode(): recursion detected in %s on line %d
+bool(false)
+int(6)
+string(%d) "Recursion detected"
+
string(22) "{"prop":{"prop":null}}"
+int(6)
+string(%d) "Recursion detected"
Done
diff --git a/ext/json/tests/007.phpt b/ext/json/tests/007.phpt
index 9ee190a24..7557ac9ed 100644
--- a/ext/json/tests/007.phpt
+++ b/ext/json/tests/007.phpt
@@ -5,15 +5,15 @@ json_last_error() tests
--FILE--
<?php
var_dump(json_decode("[1]"));
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
var_dump(json_decode("[[1]]", false, 2));
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
var_dump(json_decode("[1}"));
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
var_dump(json_decode('["' . chr(0) . 'abcd"]'));
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
var_dump(json_decode("[1"));
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
echo "Done\n";
@@ -24,13 +24,17 @@ array(1) {
int(1)
}
int(0)
+string(8) "No error"
NULL
int(1)
+string(28) "Maximum stack depth exceeded"
NULL
int(2)
+string(42) "State mismatch (invalid or malformed JSON)"
NULL
int(3)
+string(53) "Control character error, possibly incorrectly encoded"
NULL
int(4)
+string(12) "Syntax error"
Done
-
diff --git a/ext/json/tests/bug43941.phpt b/ext/json/tests/bug43941.phpt
index 0f86d1dfa..48bd7ad52 100644
--- a/ext/json/tests/bug43941.phpt
+++ b/ext/json/tests/bug43941.phpt
@@ -7,15 +7,14 @@ Bug #43941 (json_encode() invalid UTF-8)
var_dump(json_encode("abc"));
var_dump(json_encode("ab\xE0"));
-var_dump(json_encode("ab\xE0c"));
-var_dump(json_encode(array("ab\xE0", "ab\xE0c", "abc")));
+var_dump(json_encode("ab\xE0", JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_encode(array("ab\xE0", "ab\xE0c", "abc"), JSON_PARTIAL_OUTPUT_ON_ERROR));
echo "Done\n";
?>
--EXPECTF--
string(5) ""abc""
-string(4) "null"
+bool(false)
string(4) "null"
string(17) "[null,null,"abc"]"
Done
-
diff --git a/ext/json/tests/bug53946.phpt b/ext/json/tests/bug53946.phpt
index abbb81238..111438ddc 100644
--- a/ext/json/tests/bug53946.phpt
+++ b/ext/json/tests/bug53946.phpt
@@ -9,8 +9,8 @@ var_dump(json_encode("latin 1234 -/ russian мама мыла раму speci
var_dump(json_encode("ab\xE0"));
var_dump(json_encode("ab\xE0", JSON_UNESCAPED_UNICODE));
?>
---EXPECT--
+--EXPECTF--
string(156) ""latin 1234 -\/ russian \u043c\u0430\u043c\u0430 \u043c\u044b\u043b\u0430 \u0440\u0430\u043c\u0443 specialchars \u0002 \b \n U+1D11E >\ud834\udd1e<""
string(100) ""latin 1234 -\/ russian мама мыла раму specialchars \u0002 \b \n U+1D11E >𝄞<""
-string(4) "null"
-string(4) "null"
+bool(false)
+bool(false)
diff --git a/ext/json/tests/bug54058.phpt b/ext/json/tests/bug54058.phpt
index 3b1136bdd..df1b3130f 100644
--- a/ext/json/tests/bug54058.phpt
+++ b/ext/json/tests/bug54058.phpt
@@ -8,28 +8,33 @@ Bug #54058 (json_last_error() invalid UTF-8 produces wrong error)
$bad_utf8 = quoted_printable_decode('=B0');
json_encode($bad_utf8);
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
$a = new stdclass;
$a->foo = quoted_printable_decode('=B0');
json_encode($a);
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
$b = new stdclass;
$b->foo = $bad_utf8;
$b->bar = 1;
json_encode($b);
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
$c = array(
'foo' => $bad_utf8,
'bar' => 1
);
json_encode($c);
-var_dump(json_last_error());
+var_dump(json_last_error(), json_last_error_msg());
+
?>
--EXPECTF--
int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
diff --git a/ext/json/tests/bug61537.phpt b/ext/json/tests/bug61537.phpt
new file mode 100644
index 000000000..80ed051c9
--- /dev/null
+++ b/ext/json/tests/bug61537.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #61537 (json_encode() incorrectly truncates/discards information)
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+$invalid_utf8 = "\x9f";
+
+var_dump(json_encode($invalid_utf8));
+var_dump(json_last_error(), json_last_error_msg());
+
+var_dump(json_encode($invalid_utf8, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
+
+echo "\n";
+
+$invalid_utf8 = "an invalid sequen\xce in the middle of a string";
+
+var_dump(json_encode($invalid_utf8));
+var_dump(json_last_error(), json_last_error_msg());
+
+var_dump(json_encode($invalid_utf8, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
+
+?>
+--EXPECTF--
+bool(false)
+int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
+string(4) "null"
+int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
+
+bool(false)
+int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
+string(4) "null"
+int(5)
+string(56) "Malformed UTF-8 characters, possibly incorrectly encoded"
diff --git a/ext/json/tests/bug61978.phpt b/ext/json/tests/bug61978.phpt
index 2c732979e..c34b03f8f 100644
--- a/ext/json/tests/bug61978.phpt
+++ b/ext/json/tests/bug61978.phpt
@@ -29,19 +29,15 @@ class JsonTest2 implements JsonSerializable {
$obj1 = new JsonTest1();
-var_dump(json_encode($obj1));
+var_dump(json_encode($obj1, JSON_PARTIAL_OUTPUT_ON_ERROR));
-echo "\n==\n";
+echo "==\n";
$obj2 = new JsonTest2();
-var_dump(json_encode($obj2));
+var_dump(json_encode($obj2, JSON_PARTIAL_OUTPUT_ON_ERROR));
?>
--EXPECTF--
-Warning: json_encode(): recursion detected in %s on line %d
string(44) "{"test":"123","me":{"test":"123","me":null}}"
-
==
-
-Warning: json_encode(): recursion detected in %s on line %d
string(44) "{"test":"123","me":{"test":"123","me":null}}"
diff --git a/ext/json/tests/bug62369.phpt b/ext/json/tests/bug62369.phpt
new file mode 100644
index 000000000..a5efd802c
--- /dev/null
+++ b/ext/json/tests/bug62369.phpt
@@ -0,0 +1,34 @@
+--TEST--
+FR #62369 (Segfault on json_encode(deeply_nested_array)
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+$array = array();
+for ($i=0; $i<550; $i++) {
+ $array = array($array);
+}
+
+json_encode($array, 0, 551);
+switch (json_last_error()) {
+ case JSON_ERROR_NONE:
+ echo 'OK'.PHP_EOL;
+ break;
+ case JSON_ERROR_DEPTH:
+ echo 'ERROR'.PHP_EOL;
+ break;
+}
+
+json_encode($array, 0, 540);
+switch (json_last_error()) {
+ case JSON_ERROR_NONE:
+ echo 'OK'.PHP_EOL;
+ break;
+ case JSON_ERROR_DEPTH:
+ echo 'ERROR'.PHP_EOL;
+ break;
+}
+--EXPECTF--
+OK
+ERROR
diff --git a/ext/json/tests/inf_nan_error.phpt b/ext/json/tests/inf_nan_error.phpt
new file mode 100644
index 000000000..f9deecc46
--- /dev/null
+++ b/ext/json/tests/inf_nan_error.phpt
@@ -0,0 +1,45 @@
+--TEST--
+An error is thrown when INF or NaN are encoded
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+$inf = INF;
+
+var_dump($inf);
+
+var_dump(json_encode($inf));
+var_dump(json_last_error(), json_last_error_msg());
+
+var_dump(json_encode($inf, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
+
+echo "\n";
+
+$nan = NAN;
+
+var_dump($nan);
+
+var_dump(json_encode($nan));
+var_dump(json_last_error(), json_last_error_msg());
+
+var_dump(json_encode($nan, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
+?>
+--EXPECTF--
+float(INF)
+bool(false)
+int(7)
+string(34) "Inf and NaN cannot be JSON encoded"
+string(1) "0"
+int(7)
+string(34) "Inf and NaN cannot be JSON encoded"
+
+float(NAN)
+bool(false)
+int(7)
+string(34) "Inf and NaN cannot be JSON encoded"
+string(1) "0"
+int(7)
+string(34) "Inf and NaN cannot be JSON encoded"
diff --git a/ext/json/tests/json_encode_basic.phpt b/ext/json/tests/json_encode_basic.phpt
index 152e24444..fc348eed8 100644
--- a/ext/json/tests/json_encode_basic.phpt
+++ b/ext/json/tests/json_encode_basic.phpt
@@ -150,9 +150,7 @@ string(4) "null"
-- Iteration 25 --
string(4) "null"
-- Iteration 26 --
-
-Warning: json_encode(): type is unsupported, encoded as null in %s on line %d
-string(4) "null"
+bool(false)
-- Iteration 27 --
string(82) "{"MyInt":99,"MyFloat":123.45,"MyBool":true,"MyNull":null,"MyString":"Hello World"}"
-===Done=== \ No newline at end of file
+===Done===
diff --git a/ext/json/tests/json_encode_error.phpt b/ext/json/tests/json_encode_error.phpt
index d130dd960..547c8bef1 100644
--- a/ext/json/tests/json_encode_error.phpt
+++ b/ext/json/tests/json_encode_error.phpt
@@ -34,7 +34,5 @@ Warning: json_encode() expects at least 1 parameter, 0 given in %s on line %d
NULL
-- Testing json_encode() function with more than expected no. of arguments --
-
-Warning: json_encode() expects at most 2 parameters, 3 given in %s on line %d
-NULL
+string(5) ""abc""
===Done===
diff --git a/ext/json/tests/pass001.1.phpt b/ext/json/tests/pass001.1.phpt
index 7e15a7622..a51f88578 100644
--- a/ext/json/tests/pass001.1.phpt
+++ b/ext/json/tests/pass001.1.phpt
@@ -90,10 +90,10 @@ $arr = json_decode($test, true);
var_dump($arr);
echo "ENCODE: FROM OBJECT\n";
-$obj_enc = json_encode($obj);
+$obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
echo $obj_enc . "\n";
echo "ENCODE: FROM ARRAY\n";
-$arr_enc = json_encode($arr);
+$arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
echo $arr_enc . "\n";
echo "DECODE AGAIN: AS OBJECT\n";
diff --git a/ext/json/tests/pass001.1_64bit.phpt b/ext/json/tests/pass001.1_64bit.phpt
index 9c3e66995..ff2714436 100644
--- a/ext/json/tests/pass001.1_64bit.phpt
+++ b/ext/json/tests/pass001.1_64bit.phpt
@@ -90,10 +90,10 @@ $arr = json_decode($test, true);
var_dump($arr);
echo "ENCODE: FROM OBJECT\n";
-$obj_enc = json_encode($obj);
+$obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
echo $obj_enc . "\n";
echo "ENCODE: FROM ARRAY\n";
-$arr_enc = json_encode($arr);
+$arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
echo $arr_enc . "\n";
echo "DECODE AGAIN: AS OBJECT\n";
diff --git a/ext/json/tests/pass001.phpt b/ext/json/tests/pass001.phpt
index 43be11e2b..1fd05fcdd 100644
--- a/ext/json/tests/pass001.phpt
+++ b/ext/json/tests/pass001.phpt
@@ -79,10 +79,10 @@ $arr = json_decode($test, true);
var_dump($arr);
echo "ENCODE: FROM OBJECT\n";
-$obj_enc = json_encode($obj);
+$obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
echo $obj_enc . "\n";
echo "ENCODE: FROM ARRAY\n";
-$arr_enc = json_encode($arr);
+$arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
echo $arr_enc . "\n";
echo "DECODE AGAIN: AS OBJECT\n";
diff --git a/ext/json/tests/unsupported_type_error.phpt b/ext/json/tests/unsupported_type_error.phpt
new file mode 100644
index 000000000..45a167a5a
--- /dev/null
+++ b/ext/json/tests/unsupported_type_error.phpt
@@ -0,0 +1,26 @@
+--TEST--
+An error is thrown when an unsupported type is encoded
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+$resource = fopen(__FILE__, "r");
+
+var_dump($resource);
+
+var_dump(json_encode($resource));
+var_dump(json_last_error(), json_last_error_msg());
+
+var_dump(json_encode($resource, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error(), json_last_error_msg());
+
+?>
+--EXPECTF--
+resource(5) of type (stream)
+bool(false)
+int(8)
+string(21) "Type is not supported"
+string(4) "null"
+int(8)
+string(21) "Type is not supported"
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index a39c875b2..c97ee6724 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -918,7 +918,7 @@ static PHP_FUNCTION(libxml_set_streams_context)
{
zval *arg;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg) == FAILURE) {
return;
}
if (LIBXML(stream_context)) {
diff --git a/ext/libxml/tests/004.phpt b/ext/libxml/tests/004.phpt
index 8bdf593b9..aa87ab750 100644
--- a/ext/libxml/tests/004.phpt
+++ b/ext/libxml/tests/004.phpt
@@ -27,26 +27,26 @@ echo "Done\n";
?>
--EXPECTF--
-Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line 10
-NULL
+Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line %d
-Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
-bool(true)
+Warning: libxml_set_streams_context() expects parameter 1 to be resource, null given in %s004.php on line %d
NULL
-
-Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
bool(true)
-NULL
-Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
-bool(true)
+Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %s004.php on line %d
NULL
+bool(true)
-Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
+Warning: libxml_set_streams_context() expects parameter 1 to be resource, integer given in %s004.php on line %d
+NULL
bool(true)
+
+Warning: libxml_set_streams_context() expects parameter 1 to be resource, object given in %s004.php on line %d
NULL
+bool(true)
-Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
+Warning: libxml_set_streams_context() expects parameter 1 to be resource, array given in %s004.php on line %d
+NULL
bool(true)
NULL
bool(true)
diff --git a/ext/libxml/tests/bug63389.phpt b/ext/libxml/tests/bug63389.phpt
new file mode 100644
index 000000000..e9498aae0
--- /dev/null
+++ b/ext/libxml/tests/bug63389.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak)
+--SKIPIF--
+<?php if (!extension_loaded('libxml')) die('skip'); ?>
+--FILE--
+<?php
+$fp = fopen("php://input", "r");
+libxml_set_streams_context($fp);
+libxml_set_streams_context("a");
+echo "okey";
+?>
+--EXPECTF--
+Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %sbug63389.php on line %d
+okey
diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32
index 7bc9518cb..6b7e05a32 100644
--- a/ext/mbstring/config.w32
+++ b/ext/mbstring/config.w32
@@ -37,7 +37,7 @@ if (PHP_MBSTRING != "no") {
mbfilter_uuencode.c mbfilter_armscii8.c mbfilter_cp850.c \
mbfilter_cp5022x.c mbfilter_sjis_open.c mbfilter_sjis_mobile.c \
mbfilter_sjis_mac.c \
- mbfilter_iso2022jp_2004.c mbfilter_iso2022jp_mobile.c \
+ mbfilter_iso2022jp_2004.c mbfilter_iso2022jp_mobile.c \
mbfilter_tl_jisx0201_jisx0208.c", "mbstring");
ADD_SOURCES("ext/mbstring/libmbfl/mbfl", "mbfilter.c mbfilter_8bit.c \
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c
index 8f12feb47..8f12feb47 100755..100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h
index a5e2d2fbe..a5e2d2fbe 100755..100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h
+++ b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c
index 2f84edff2..c134e5d58 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mac.c
@@ -424,7 +424,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
} else if (c == 0xa0) {
s1 = 0x00a0;
} else if (c == 0xa5) { /* YEN SIGN */
- s1 = 0x216f; /* FULLWIDTH YEN SIGN */
+ s1 = 0x216f; /* FULLWIDTH YEN SIGN */
} else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */
s1 = 0x2140;
}
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h
index ef5e6da7f..c127b1840 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h
+++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.h
@@ -49,6 +49,8 @@ extern const struct mbfl_convert_vtbl vtbl_wchar_utf8_kddi_b;
extern const struct mbfl_convert_vtbl vtbl_utf8_sb_wchar;
extern const struct mbfl_convert_vtbl vtbl_wchar_utf8_sb;
+
+
int mbfl_filt_conv_utf8_mobile_wchar(int c, mbfl_convert_filter *filter);
int mbfl_filt_conv_wchar_utf8_mobile(int c, mbfl_convert_filter *filter);
diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_defs.h b/ext/mbstring/libmbfl/mbfl/mbfl_defs.h
index fcfac2b89..fcfac2b89 100755..100644
--- a/ext/mbstring/libmbfl/mbfl/mbfl_defs.h
+++ b/ext/mbstring/libmbfl/mbfl/mbfl_defs.h
diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c
index 0797b893d..4e40e625d 100644
--- a/ext/mbstring/mb_gpc.c
+++ b/ext/mbstring/mb_gpc.c
@@ -254,6 +254,12 @@ const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_i
n++;
var = php_strtok_r(NULL, info->separator, &strtok_buf);
}
+
+ if (n > (PG(max_input_vars) * 2)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
+ goto out;
+ }
+
num = n; /* make sure to process initilized vars only */
/* initialize converter */
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 76654edbf..0861fa648 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -473,7 +473,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_replace_callback, 0, 0, 3)
ZEND_ARG_INFO(0, string)
ZEND_ARG_INFO(0, option)
ZEND_END_ARG_INFO()
-
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_split, 0, 0, 2)
ZEND_ARG_INFO(0, pattern)
ZEND_ARG_INFO(0, string)
@@ -1688,12 +1688,12 @@ PHP_MINFO_FUNCTION(mbstring)
php_info_print_table_start();
php_info_print_table_row(2, "Multibyte Support", "enabled");
php_info_print_table_row(2, "Multibyte string engine", "libmbfl");
- php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "enabled": "disabled");
- {
- char tmp[256];
- snprintf(tmp, sizeof(tmp), "%d.%d.%d", MBFL_VERSION_MAJOR, MBFL_VERSION_MINOR, MBFL_VERSION_TEENY);
- php_info_print_table_row(2, "libmbfl version", tmp);
- }
+ php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "enabled": "disabled");
+ {
+ char tmp[256];
+ snprintf(tmp, sizeof(tmp), "%d.%d.%d", MBFL_VERSION_MAJOR, MBFL_VERSION_MINOR, MBFL_VERSION_TEENY);
+ php_info_print_table_row(2, "libmbfl version", tmp);
+ }
php_info_print_table_end();
php_info_print_table_start();
diff --git a/ext/mbstring/oniguruma/COPYING b/ext/mbstring/oniguruma/COPYING
index 4d321bb93..2cee0bbec 100644
--- a/ext/mbstring/oniguruma/COPYING
+++ b/ext/mbstring/oniguruma/COPYING
@@ -1,12 +1,8 @@
Oniguruma LICENSE
-----------------
-When this software is partly used or it is distributed with Ruby,
-this of Ruby follows the license of Ruby.
-It follows the BSD license in the case of the one except for it.
-
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/ext/mbstring/oniguruma/HISTORY b/ext/mbstring/oniguruma/HISTORY
index a1debefa4..06f38c246 100644
--- a/ext/mbstring/oniguruma/HISTORY
+++ b/ext/mbstring/oniguruma/HISTORY
@@ -1,111 +1,316 @@
History
-2007/08/16: Version 4.7.1
-
-2007/08/16: [test] success in ruby 1.9.0 (2007-04-06) [i686-linux].
-2007/07/04: [spec] (thanks K.Takata)
+2010/01/09: Version 5.9.2
+
+2010/01/05: [bug] fix utf16be_code_to_mbc() and utf16le_code_to_mbc().
+2008/09/16: [bug] fix memory leaks in parse_exp().
+2008/08/01: [bug] fix memory leaks.
+2008/06/17: [bug] invalid type of argument was used
+ in onig_st_lookup_strend().
+2008/06/16: [bug] invalid CaseFoldMap entry in ISO-8859-5. 0xdf -> 0xde
+2008/02/19: [new] add: onig_reg_init().
+2008/02/19: [new] add: onig_free_body().
+2008/02/19: [new] add: onig_new_without_alloc().
+2008/02/19: [API] rename onig_alloc_init() to onig_reg_init(),
+ and argument type changed.
+2008/01/31: [impl] move UTF16_IS_SURROGATE_XXX() to regenc.h.
+2008/01/30: [bug] (thanks akr)
+ fix euctw_islead().
+2008/01/23: [bug] update enc/koi8.c.
+
+2007/12/22: Version 5.9.1
+
+2007/12/21: [impl] add sprint_byte().
+2007/11/28: [bug] (thanks Andy Armstrong)
+ don't overwrite error code in fetch_name().
+2007/11/12: [bug] utf8 mbc length of code 0xfe, 0xff are not 1,
+2007/10/23: [spec] onig_enc_len() takes three arguments. (not used)
+2007/10/15: [impl] (thanks Rui Hirokawa)
+ add check HAVE_STDARG_H.
+2007/09/07: [API] rename enc_len() to onig_enc_len() in oniguruma.h.
+2007/09/04: [API] remove ONIGENC_ERR_XXXXX.
+2007/09/03: [API] add error ONIGERR_INVALID_CODE_POINT_VALUE.
+2007/09/03: [impl] change error message to "invaid code point value"
+ for ONIGERR_INVALID_WIDE_CHAR_VALUE.
+2007/09/03: [bug] xxx_code_to_mbclen() should return
+ ONIGERR_INVALID_WIDE_CHAR_VALUE for invalid code point.
+ ex. /[\x{7fffffff}]/ for ASCII encoding.
+2007/08/28: [impl] remove "warning: no previous declaration ...".
+2007/08/21: [impl] remove warnings in enc/mktable.c.
+2007/08/20: [impl] remove "warning: unused parameter"
+2007/08/20: [impl] remove "warning: comparison between signed and unsigned".
+2007/08/06: [impl] remove clear_not_flag_cclass().
+2007/08/03: [bug] fix the case of undefined USE_NAMED_GROUP.
+2007/08/02: [spec] add backref by number.
+2007/08/01: [API] add OnigCtype.
+2007/07/27: [spec] add USE_CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS.
+2007/07/24: [impl] define PLATFORM_UNALIGNED_WORD_ACCESS.
+2007/07/23: [dist] fix doc/FAQ.ja.
+
+2007/07/14: Version 5.9.0
+
+2007/07/13: [bug] add check into onig_reduce_nested_quantifier().
+2007/06/26: [spec] (thanks K.Takata)
ONIG_OPTION_SINGLELINE: '$' -> '\Z' (as Perl)
-2007/07/04: [dist] (thanks K.Takata)
+2007/06/26: [dist] (thanks K.Takata)
fix documents API and API.ja.
-
-2007/06/18: Version 4.7.0
-
-2007/06/18: [test] success in ruby 1.9.0 (2007-04-06) [i686-linux].
+2007/06/19: [impl] remove IS_NOT_NULL() check before onig_node_free().
2007/06/18: [bug] (thanks KUBO Takehiro)
WORD_ALIGNMENT_SIZE must be sizeof(OnigCodePoint).
-2007/06/05: [impl] add #ifndef vsnprintf in regint.h.
-2007/06/05: [bug] should check USE_CRNL_AS_LINE_TERMINATOR case
+2007/06/18: [impl] rename CClassNode flags.
+2007/06/18: [bug] initialization miss.
+2007/06/13: [impl] change node type reference NXXXX.
+2007/06/11: [impl] add node type bit.
+2007/06/11: [spec] allow anchor in enclosed repeater. /(\z)*/
+2007/06/11: [impl] rename node types.
+2007/06/08: [impl] remove OP_SET_OPTION_PUSH and OP_SET_OPTION from match_at().
+2007/06/07: [impl] use xvsnprintf().
+2007/06/06: [tune] don't set qn->next_head_exact for string first byte is zero.
+2007/06/06: [impl] remove unused variables.
+
+2007/06/04: Version 5.8.0
+
+2007/06/04: [impl] add #ifndef vsnprintf into regint.h.
+2007/05/31: [dist] add configure option '--enable-crnl-as-line-terminator'.
+2007/05/30: [dist] add sample/crnl.c.
+2007/05/30: [bug] should check USE_CRNL_AS_LINE_TERMINATOR case
in onig_search().
+2007/05/29: [impl] move USE_CRNL_AS_LINE_TERMINATOR into regenc.h.
+2007/05/29: [impl] should check USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
+ in forward_search_range() and backward_search_range().
-2007/04/12: Version 4.6.2
+2007/04/27: Version 5.7.0
+2007/04/20: [spec] add config USE_MATCH_RANGE_IS_COMPLETE_RANGE.
+2007/04/20: [impl] refactoring in match_at().
+
+2007/04/12: Version 5.6.1
+
+2007/04/12: [bug] must not use UChar in oniguruma.h.
2007/04/09: [impl] change STATE_CHECK_BUFF_MAX_SIZE value from 0x8000
- to 0x4000.
+ to 0x4000. [ruby-core:10883]
+
+2007/04/04: Version 5.6.0 (mourning for Hideo Takamatsu)
+
+2007/04/03: [spec] add new notation (?'name'), \k'name', \g'name'.
+2007/04/03: [impl] remove unused variable.
2007/03/26: [impl] add 'void' to function declarations.
-2007/03/06: Version 4.6.1
+2007/03/06: Version 5.5.3
-2007/03/06: [test] success in ruby 1.9.0 (2006-10-23) [i686-linux].
2007/03/06: [bug] add #include <malloc.h> for bcc32.
(In bcc32, alloca() is declared in malloc.h.)
-2007/03/06: [impl] remove including version.h of Ruby.
2007/03/02: [bug] invalid optimization for semi-end-buf in onig_search().
ex. /\n\Z/.match("aaaaaaaaaa\n")
2007/03/02: [impl] move range > start check position in end_buf process.
-2007/02/08: Version 4.6.0
+2007/01/09: Version 5.5.2
-2007/02/08: [test] success in ruby 1.9.0 (2006-10-23) [i686-linux].
-2007/01/09: [tune] select_opt_exact_info() didn't work for empty info.
+2007/01/09: [impl] rename USE_EXTERNAL_LOWER_CASE_CONV_TABLE.
+2007/01/05: [tune] select_opt_exact_info() didn't work for empty info.
ex. /.a/ make MAP info instead of EXACT info.
-2006/12/29: [impl] add print_enc_string() for ONIG_DEBUG mode.
-2006/12/22: [spec] should check too short multibyte char in parse_exp().
- add USE_PAD_TO_SHORT_BYTE_CHAR.
- ex. /\x00/ in UTF16 should be error.
+2006/12/28: [impl] add print_enc_string() for ONIG_DEBUG mode.
+
+2006/12/22: Version 5.5.1
-2006/11/17: Version 4.5.1
+2006/12/22: [impl] rename ADD_PAD_TO_SHORT_BYTE_STRING
+ . to USE_PAD_TO_SHORT_BYTE_CHAR.
+2006/12/21: [spec] should check too short multibyte char in parse_exp().
+ add ADD_PAD_TO_SHORT_BYTE_STRING.
+ ex. /\x00/ in UTF16 should be error.
-2006/11/17: [test] success in ruby 1.9.0 (2006-10-23) [i686-linux].
-2006/11/15: [impl] remove CHECK_INTERRUPT.
+2006/12/06: Version 5.5.0
+
+2006/12/05: [bug] should add unfold-1 codes from folded code into
+ onigenc_unicode_get_case_fold_codes_by_str().
+ (ex. "S" -> "s" -> 0x017f)
+2006/12/05: [new] add flag ONIGENC_CASE_FOLD_TURKISH_AZERI and
+ USE_UNICODE_CASE_FOLD_TURKISH_AZERI. (disabled in default)
+2006/12/04: [spec] remove ONIGENC_CASE_FOLD_FULL.
+2006/11/30: [impl] remove unnecessary check in xxx_mbc_case_fold().
+
+2006/11/29: Version 5.4.0
+
+2006/11/28: [spec] INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR is enabled in
+ default case fold status.
+2006/11/28: [spec] rename ONIGENC_CASE_FOLD_MULTI_CHAR to
+ INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR.
+2006/11/28: [impl] remove USE_UNICODE_CASE_FOLD_MULTI_CHAR.
+2006/11/28: [impl] remove Fold[123]Table and add FoldTable.
+2006/11/27: [impl] change tool/unicode_fc.rb to see CaseFolding.txt.
+2006/11/24: [bug] should call callback for to[j] <-> to[k] in
+ onigenc_unicode_apply_all_case_fold().
+
+2006/11/22: Version 5.3.0
+
+2006/11/22: [dist] add index_ja.html.
+2006/11/22: [impl] undef ONIG_ESCAPE_UCHAR_COLLISION in regint.h and regenc.h.
+2006/11/21: [bug] invalid array access.
+2006/11/21: [impl] escape UChar collision from config.h.
+2006/11/20: [new] add Hiragana/Katakana properties into Shift_JIS.
+2006/11/20: [impl] fix CR_Katakana[] values in EUC-JP.
+2006/11/17: [impl] declare strend hash table functions in regint.h.
+2006/11/17: [impl] move property list functions to regenc.c.
+2006/11/17: [new] add Hiragana/Katakana properties into EUC-JP.
+2006/11/15: [impl] remove NOT_RUBY from AM_CFLAGS.
+
+2006/11/14: Version 5.2.0
+
+2006/11/14: [impl] remove program codes for Ruby.
+2006/11/14: [impl] reduce program codes for Ruby.
2006/11/10: [bug] 0x24, 0x2b, 0x3c, 0x3d, 0x3e, 0x5e, 0x60, 0x7c, 0x7e
should be [:punct:].
+2006/11/09: [new] (thanks Byte)
+ add new character encoding CP1251.
2006/11/08: [impl] rename QUALIFIER -> QUANTIFIER.
-2006/11/07: [bug] (thanks Byte)
- add 0xa3 <=> 0xb3 to CaseFoldMap[] for KOI8-R.
-2006/11/06: Version 4.5.0
+2006/11/07: Version 5.1.0
-2006/11/06: [test] success in ruby 1.9.0 (2006-10-23) [i686-linux].
-2006/11/06: [API] remove ONIGENC_AMBIGUOUS_MATCH_COMPOUND.
+2006/11/07: [dist] remove test.rb, testconv.rb and testconvu.rb.
+2006/11/07: [bug] get_case_fold_codes_by_str() should handle 'Ss' and 'sS'
+ combination for ess-tsett.
+2006/11/07: [impl] apply_all_case_fold() doesn't need to return all
+ case character combination for multi-character folding.
+ (ONIGENC_CASE_FOLD_MULTI_CHAR)
+2006/11/07: [bug] (thanks Byte)
+ add { 0xa3, 0xb3 } to CaseFoldMap[] for KOI8-R.
2006/11/06: [spec] change ONIG_OPTION_FIND_LONGEST to search all of
the string range.
add USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE.
-
-2006/10/30: Version 4.4.6
-
-2006/10/30: [test] success in ruby 1.9.0 (2006-10-23) [i686-linux].
+2006/11/02: [impl] re-implement expand_case_fold_string() for
+ ONIGENC_CASE_FOLD_MULTI_CHAR.
+2006/10/30: [impl] add NSTR_DONT_GET_OPTINFO flag.
2006/10/30: [impl] (thanks K.Takata)
add THREAD_SYSTEM_INIT and THREAD_SYSTEM_END.
2006/10/30: [bug] (thanks Wolfgang Nadasi-Donner)
invalid offset value was used in STATE_CHECK_BUFF_INIT().
-
-2006/10/24: Version 4.4.5
-
-2006/10/24: [test] success in ruby 1.9.0 (2006-10-23) [i686-linux].
-2006/10/24: [impl] escape -Wall warning.
-2006/10/24: [tune] (thanks Kornelius Kalnbach)
+2006/10/27: [tune] speed up ONIGENC_MBC_CASE_FOLD() for UTF-16, UTF-32.
+ (ASCII code check)
+2006/10/27: [tune] (thanks Kornelius Kalnbach)
String#scan for long string needs long time compare with
old Ruby
by initialization time for combination explosion check
ex. ("test " * 100_000).scan(/\w*\s?/)
change STATE_CHECK_BUFF_MAX_SIZE from 0x8000000 to 0x8000.
reduce initialization area of state_check_buff.
+2006/10/25: [impl] add DISABLE_CASE_FOLD_MULTI_CHAR().
+
+2006/10/23: Version 5.0.1
+
+2006/10/23: [bug] should fold string in expand_case_fold_string().
+2006/10/23: [bug] (thanks Km)
+ too many case fold/unfold expansion problem.
+ don't expand and set ambig flag to the string node.
+ (except ONIGENC_CASE_FOLD_MULTI_CHAR).
+2006/10/23: [bug] (thanks K.Takata)
+ invalid \p{Alnum}, \p{ASCII}, [:alnum:], [:ascii:].
+ fix OnigEncAsciiCtypeTable[] etc...
+2006/10/23: [spec] (thanks K.Takata)
+ add [:word:] POSIX bracket.
+2006/10/23: [bug] (thanks K.Takata)
+ \p{Word} doesn't work.
+2006/10/20: [impl] don't expand for AMBIG_FLAG string in
+ expand_case_fold_string().
+
+2006/10/19: Version 5.0.0
+
+2006/10/18: [bug] ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM should be 13.
+2006/10/18: [impl] remove unused functions.
+2006/10/18: [dist] update documents.
+2006/10/18: [API] move OnigMetaCharTableType to OnigSyntaxType.
+2006/10/18: [dev] add too/unicode_fc.rb, unicode_pc.rb.
+2006/10/18: [dist] remove MANIFEST-RUBY from distribution.
+2006/10/18: [bug] return duplicated code in
+ onigenc_unicode_get_case_fold_codes_by_str().
+2006/10/18 [API] remove ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS.
+2006/10/18: [dev] add tool/19.
+2006/10/18: [dist] remove target 19 from Makefile.am.
+2006/10/17: [dist] add enc/unicode.c to target 19 of win32/Makefile.
+2006/10/17: [impl] change type for escape VC++ warning.
+2006/10/17: [API] rename ONIGENC_CASE_FOLD_NONE to ONIGENC_CASE_FOLD_MIN.
+2006/10/17: [dist] remove INSTALL-RUBY from distribution.
+2006/10/17: [dist] update LTVERSION to "2:0:0".
+2006/10/17: [impl] remove warnings for [make CFLAGS="-g -O2 -Wall"]
+ in the case USE_UNICODE_PROPERTIES and
+ USE_UNICODE_CASE_FOLD_MULTI_CHAR are undefined.
+2006/10/17: [impl] remove warnings for [make CFLAGS="-g -O2 -Wall"].
+2006/10/17: [impl] re-implement onigenc_unicode_apply_all_case_fold().
+ multi-char by case folded char-class is treated as
+ caseless-string (ambig flag on).
+ enable OP_EXACT1_IC and OP_EXACTN_IC.
+2006/10/16: [bug] unfold expand for 1->2, 1->3 folding in
+ onigenc_unicode_apply_all_case_fold().
+ add CaseFoldExpand_12[], CaseFoldExpand_13[].
2006/10/16: [bug] (thanks Akinori Musha)
first argument of rb_warn() should be format string.
-2006/10/10: [impl] add msa.state_check_buff_size initialization
+2006/10/16: [impl] add msa.state_check_buff_size initialization
in onig_search().
+2006/10/16: [spec] re-implement Unicode Caseless Match codes.
2006/10/10: [bug] should call onig_st_free_table() in
onig_free_shared_cclass_table().
+2006/10/10: [impl] remove OnigCompCaseFoldCodes.
+2006/10/10: [impl] remove onigenc_ascii_is_mbc_ambiguous() and
+ onigenc_mbn_is_mbc_ambiguous().
+2006/10/10: [API] remove is_mbc_ambiguous() member from OnigEncodingType.
+2006/10/10: [API] rename onig_set_default_ambig_flag() to
+ onig_set_default_case_fold_flag(),
+ onig_get_default_ambig_flag() to
+ onig_get_default_case_fold_flag(),
+ onig_get_ambig_flag() to onig_get_case_fold_flag().
+2006/10/10: [API] rename ambig_flag to case_fold_flag.
+2006/10/10: [API] rename OnigAmbigType to OnigCaseFoldType.
+2006/10/10: [impl] rename ONIGENC_IS_CODE_SB_WORD() to IS_CODE_SB_WORD()
+ and move to regint.h.
2006/10/10: [impl] remove OP_WORD_SB and OP_WORD_MB.
+2006/10/10: [impl] remove OP_EXACT1_IC and OP_EXACTN_IC from match_at().
+2006/10/10: [impl] should free new_str in expand_case_fold_string().
+2006/10/06: [dist] add test entrys to sample/encode.c.
+2006/10/06: [impl] re-implement caseless match (case-fold).
+2006/10/06: [impl] expand string node by case fold variations.
+ add expand_case_fold_string().
+2006/10/05: [spec] rename OnigCompAmbigCodeItem to OnigCaseFoldCodeItem.
+2006/10/05: [spec] add apply_all_case_fold() and get_case_fold_codes_by_str()
+ to OnigEncodingType.
+2006/10/05: [spec] remove ambig_flag, get_all_pair_ambig_codes() and
+ get_all_comp_ambig_codes() member from OnigEncodingType.
+2006/10/03: [impl] rename mbc_to_normalize() to mbc_case_fold().
+2006/10/03: [spec] rename ONIGENC_AMBIGUOUS_MATCH_XXX
+ to ONIGENC_CASE_FOLD_XXX.
+ rename ONIGENC_CASE_FOLD_COMPOUND
+ to ONIGENC_CASE_FOLD_MULTI_CHAR.
+2006/10/02: [impl] remove all ONIG_RUBY_M17N part.
2006/09/29: [impl] initialize state_check_buff_size in STATE_CHECK_BUFF_INIT().
make valgrind happy.
-2006/09/22: [impl] convert to ascii for parameter string in
+2006/09/22: [impl] remove parse time ctype values (CTYPE_WORD etc...)
+2006/09/22: [ruby] enable USE_BACKREF_AT_LEVEL for Ruby mode.
+2006/09/22: [spec] (thanks Allan Odgaard)
+ allow upper case letter as the first character
+ of group name.
+ fetch_name() and fetch_name_with_level()
+2006/09/21: [impl] convert to ascii for parameter string in
onig_error_code_to_str().
add enc member into OnigErrorInfo.
-
-2006/09/19: Version 4.4.4
-
-2006/09/19: [test] success in ruby 1.9.0 (2006-08-22) [i686-linux].
+2006/09/21: [dist] update documents for Unicode Property.
+2006/09/21: [new] add Unicode Properties. (enc/unicode.c)
+ Any, Assigned, C, Cc, L, Lm, Arabic, Greek etc...
+2006/09/21: [impl] add USE_UNICODE_PROPERTIES into regenc.h.
+2006/09/21: [impl] remove USE_UNICODE_FULL_RANGE_CTYPE.
+2006/09/20: [impl] change ONIGENC_CTYPE_XXXX to sequencial values.
+ add BIT_CTYPE_XXXX bit flags to regenc.h.
+ update XXXX_CtypeTable[] for BIT_CTYPE_ALNUM.
+2006/09/19: [memo] move from CVS to Subversion (1.3.2).
2006/09/19: [impl] (thanks KOYAMA Tetsuji)
HAVE_STDARG_PROTOTYPES was not defined in Mac OS X
by Xcode 2.4(gcc 4.0.1) problem. [php-dev 1312] etc...
-
-2006/09/15: Version 4.4.3
-
-2006/09/15: [test] success in ruby 1.9.0 (2006-08-22) [i686-linux].
2006/09/15: [bug] (thanks Allan Odgaard)
out of range access in bm_search_notrev().
(p < s)
+2006/09/13: [impl] add ONIGENC_CTYPE_ENC_EXT flag.
+2006/09/13: [spec] remove 'Is' prefix check for property name
+ from fetch_char_property_to_ctype().
+2006/09/13: [API] add property_name_to_ctype member to OnigEncodingType.
+2006/09/12: [spec][ruby] add ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY and
+ ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT to OnigSyntaxRuby.
2006/09/08: Version 4.4.2
@@ -1808,8 +2013,17 @@ History
[inst: changes for installation]
[dist: distribution change]
[test: test]
+[dev: development]
[memo: memo]
--
+<create tag>
+svn copy file:///home/kosako/svnreps/svnrep_onig/trunk file:///home/kosako/svnreps/svnrep_onig/tags/5.0.0 -m "ADD TAG: 5.0.0"
+
+<set ignore files by .cvsignore>
+svn propset svn:ignore -F .cvsignore .
+svn commit -m "..."
+
+
<CVS: show all tags>
cvs history -T
@@ -1820,7 +2034,7 @@ cvs rtag "VERSION_X_X_X" oniguruma
<GNU Autotools: bootstrap>
* write Makefile.am and configure.in.
> aclocal
-> libtoolize
+> libtoolize or glibtoolize
> automake --foreign --add-missing
> autoconf
> configure --with-rubydir=... CFLAGS="-O2 -Wall"
diff --git a/ext/mbstring/oniguruma/README b/ext/mbstring/oniguruma/README
index dff7fba56..8390afd05 100644
--- a/ext/mbstring/oniguruma/README
+++ b/ext/mbstring/oniguruma/README
@@ -1,9 +1,8 @@
-README 2007/06/18
+README 2007/05/31
Oniguruma ---- (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
http://www.geocities.jp/kosako3/oniguruma/
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
@@ -13,16 +12,20 @@ Supported character encodings:
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
- Shift_JIS, Big5, GB 18030, KOI8-R, KOI8,
+ Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
-* GB 18030: contributed by KUBO Takehiro
-* KOI8 is not included in library archive by default setup.
- (need to edit Makefile if you want to use it.)
+* GB18030: contributed by KUBO Takehiro
+* CP1251: contributed by Byte
------------------------------------------------------------
+License
+
+ BSD license.
+
+
Install
Case 1: Unix and Cygwin platform
@@ -63,14 +66,6 @@ Install
-License
-
- When this software is partly used or it is distributed with Ruby,
- this of Ruby follows the license of Ruby.
- It follows the BSD license in the case of the one except for it.
-
-
-
Regular Expressions
See doc/RE (or doc/RE.ja for Japanese).
@@ -108,7 +103,10 @@ Sample Programs
sample/posix.c POSIX API sample.
sample/sql.c example of the variable meta characters.
(SQL-like pattern matching)
+
+Test Programs
sample/syntax.c Perl, Java and ASIS syntax test.
+ sample/crnl.c --enable-crnl-as-line-terminator test
Source Files
@@ -145,9 +143,10 @@ Source Files
enc/euc_kr.c EUC-KR, EUC-CN encoding.
enc/sjis.c Shift_JIS encoding.
enc/big5.c Big5 encoding.
- enc/gb18030.c GB 18030 encoding (contributed by KUBO Takehiro)
+ enc/gb18030.c GB18030 encoding.
enc/koi8.c KOI8 encoding.
enc/koi8_r.c KOI8-R encoding.
+ enc/cp1251.c CP1251 encoding.
enc/iso8859_1.c ISO-8859-1 encoding. (Latin-1)
enc/iso8859_2.c ISO-8859-2 encoding. (Latin-2)
enc/iso8859_3.c ISO-8859-3 encoding. (Latin-3)
@@ -176,14 +175,15 @@ Source Files
-API differences with Japanized GNU regex(version 0.12) of Ruby 1.8/1.6
-
- + re_compile_fastmap() is removed.
- + re_alloc_pattern() is added.
-
+ToDo
+ ? case fold flag: Katakana <-> Hiragana.
+ ? add ONIG_OPTION_NOTBOS/NOTEOS. (\A, \z, \Z)
+ ?? \X (== \PM\pM*)
+ ?? implement syntax behavior ONIG_SYN_CONTEXT_INDEP_ANCHORS.
+ ?? transmission stopper. (return ONIG_STOP from match_at())
-I'm thankful to Akinori MUSHA.
+and I'm thankful to Akinori MUSHA.
Mail Address: K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
diff --git a/ext/mbstring/oniguruma/README.ja b/ext/mbstring/oniguruma/README.ja
index 2dee793ca..b14822c9e 100644
--- a/ext/mbstring/oniguruma/README.ja
+++ b/ext/mbstring/oniguruma/README.ja
@@ -1,9 +1,8 @@
-README.ja 2007/06/18
+README.ja 2007/05/31
---- (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
http://www.geocities.jp/kosako3/oniguruma/
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
֤ɽ饤֥Ǥ롣
Υ饤֥Ĺϡ줾ɽ֥ȤȤ
@@ -13,16 +12,20 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
- Shift_JIS, Big5, GB 18030, KOI8-R, KOI8,
+ Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
-* GB 18030: ݷλ
-* KOI8ϥǥեȤΥåȥåפǤϥ饤֥˴ޤޤʤ
- (ɬפǤMakefileԽ뤳)
+* GB18030: ݷλ
+* CP1251: Byte
------------------------------------------------------------
+饤
+
+ BSD饤󥹤˽
+
+
󥹥ȡ
: UnixCygwinĶ
@@ -63,12 +66,6 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
5. nmake ctest
-饤
-
- ΥեȥRubyȰ˻Ѥޤۤˤϡ
- RubyΥ饤󥹤˽
- ʳξˤϡBSD饤󥹤˽
-
ɽ
@@ -97,7 +94,7 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
GNU libtoolѤƤΤǡץåȥեबͭ饤֥򥵥ݡȤ
СѤǤ褦ˤʤäƤ롣
Ū饤֥ȶͭ饤֥ΤɤѤ뤫ꤹˡ¹ԻǤ
- ĶˡˤĤƤϡʬĴ٤Ʋ
+ ĶˡˤĤƤϡʬĴ٤Ʋ
Win32ǥƥå󥯥饤֥(onig_s.lib)󥯤ˤϡ
@@ -112,7 +109,10 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
sample/listcap.c ǽλ
sample/posix.c POSIX API
sample/sql.c ѥ᥿ʸǽ (SQL-like ѥ)
+
+ƥȥץ
sample/syntax.c PerlJavaASISʸˡΥƥ
+ sample/crnl.c --enable-crnl-as-line-terminator ƥ
ե
@@ -149,9 +149,10 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
enc/euc_kr.c EUC-KR, EUC-CN 󥳡ǥ
enc/sjis.c Shift_JIS 󥳡ǥ
enc/big5.c Big5 󥳡ǥ
- enc/gb18030.c GB 18030 󥳡ǥ (ݷλ )
+ enc/gb18030.c GB18030 󥳡ǥ
enc/koi8.c KOI8 󥳡ǥ
enc/koi8_r.c KOI8-R 󥳡ǥ
+ enc/cp1251.c CP1251 󥳡ǥ
enc/iso8859_1.c ISO-8859-1 (Latin-1)
enc/iso8859_2.c ISO-8859-2 (Latin-2)
enc/iso8859_3.c ISO-8859-3 (Latin-3)
@@ -180,13 +181,15 @@ http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
-Ruby 1.8/1.6ܸ첽GNU regexȤAPIΰ㤤
-
- + re_compile_fastmap() Ϻ줿
- + re_alloc_pattern() ɲä줿
+ ? case fold flag: Katakana <-> Hiragana
+ ? ONIG_OPTION_NOTBOS/NOTEOSɲ (\A, \z, \Z)
+ ?? \X (== \PM\pM*)
+ ?? ʸˡ ONIG_SYN_CONTEXT_INDEP_ANCHORSμ
+ ?? ְư߱黻 (match_at()ONIG_STOP֤)
-I'm thankful to Akinori MUSHA.
+and I'm thankful to Akinori MUSHA.
ɥ쥹: K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
diff --git a/ext/mbstring/oniguruma/doc/API b/ext/mbstring/oniguruma/doc/API
index 2f66287d4..f3b88756b 100644
--- a/ext/mbstring/oniguruma/doc/API
+++ b/ext/mbstring/oniguruma/doc/API
@@ -1,4 +1,4 @@
-Oniguruma API Version 4.7.1 2007/07/04
+Oniguruma API Version 5.9.2 2008/02/19
#include <oniguruma.h>
@@ -105,10 +105,10 @@ Oniguruma API Version 4.7.1 2007/07/04
ONIG_ENCODING_EUC_KR EUC-KR
ONIG_ENCODING_EUC_CN EUC-CN
ONIG_ENCODING_SJIS Shift_JIS
- ONIG_ENCODING_KOI8 KOI8
ONIG_ENCODING_KOI8_R KOI8-R
+ ONIG_ENCODING_CP1251 CP1251
ONIG_ENCODING_BIG5 Big5
- ONIG_ENCODING_GB18030 GB 18030
+ ONIG_ENCODING_GB18030 GB18030
or any OnigEncodingType data address defined by user.
@@ -134,6 +134,18 @@ Oniguruma API Version 4.7.1 2007/07/04
+# int onig_new_without_alloc(regex_t* reg, const UChar* pattern,
+ const UChar* pattern_end,
+ OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
+ OnigErrorInfo* err_info)
+
+ Create a regex object.
+ reg object area is not allocated in this function.
+
+ normal return: ONIG_NORMAL
+
+
+
# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigCompileInfo* ci, OnigErrorInfo* einfo)
@@ -153,15 +165,12 @@ Oniguruma API Version 4.7.1 2007/07/04
ci->target_enc: target string character encoding.
ci->syntax: address of pattern syntax definition.
ci->option: compile time option.
- ci->ambig_flag: character matching ambiguity bit flag for
+ ci->case_fold_flag: character matching case fold bit flag for
ONIG_OPTION_IGNORECASE mode.
- ONIGENC_AMBIGUOUS_MATCH_NONE: exact
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE: ignore case for ASCII
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE: ignore case for non-ASCII
- ONIGENC_AMBIGUOUS_MATCH_FULL: all ambiguity on
- ONIGENC_AMBIGUOUS_MATCH_DEFAULT: (ASCII | NONASCII)
- onig_set_default_ambig_flag()
+ ONIGENC_CASE_FOLD_MIN: minimum
+ ONIGENC_CASE_FOLD_DEFAULT: minimum
+ onig_set_default_case_fold_flag()
5 err_info: address for return optional error info.
Use this value as 3rd argument of onig_error_code_to_str().
@@ -188,6 +197,14 @@ Oniguruma API Version 4.7.1 2007/07/04
1 reg: regex object.
+# void onig_free_body(regex_t* reg)
+
+ Free memory used by regex object. (Except reg oneself.)
+
+ arguments
+ 1 reg: regex object.
+
+
# int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start,
const UChar* range, OnigRegion* region, OnigOptionType option)
@@ -202,8 +219,8 @@ Oniguruma API Version 4.7.1 2007/07/04
3 end: terminate address of target string
4 start: search start address of target string
5 range: search terminate address of target string
- in forward search (start <= searched string head < range)
- in backward search (range <= searched string head <= start)
+ in forward search (start <= searched string < range)
+ in backward search (range <= searched string <= start)
6 region: address for return group match range info (NULL is allowed)
7 option: search time option
@@ -335,10 +352,10 @@ Oniguruma API Version 4.7.1 2007/07/04
1 reg: regex object.
-# OnigEncoding onig_get_encoding(regex_t* reg)
-# OnigOptionType onig_get_options(regex_t* reg)
-# OnigAmbigType onig_get_ambig_flag(regex_t* reg)
-# OnigSyntaxType* onig_get_syntax(regex_t* reg)
+# OnigEncoding onig_get_encoding(regex_t* reg)
+# OnigOptionType onig_get_options(regex_t* reg)
+# OnigCaseFoldType onig_get_case_fold_flag(regex_t* reg)
+# OnigSyntaxType* onig_get_syntax(regex_t* reg)
Return a value of the regex object.
@@ -518,7 +535,7 @@ Oniguruma API Version 4.7.1 2007/07/04
2 from: source address.
-# int onig_set_meta_char(OnigEncoding enc, unsigned int what,
+# int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what,
OnigCodePoint code)
Set a variable meta character to the code point value.
@@ -529,8 +546,8 @@ Oniguruma API Version 4.7.1 2007/07/04
normal return: ONIG_NORMAL
arguments
- 1 enc: target encoding
- 2 what: specifies which meta character it is.
+ 1 syntax: target syntax
+ 2 what: specifies which meta character it is.
ONIG_META_CHAR_ESCAPE
ONIG_META_CHAR_ANYCHAR
@@ -542,16 +559,16 @@ Oniguruma API Version 4.7.1 2007/07/04
3 code: meta character or ONIG_INEFFECTIVE_META_CHAR.
-# OnigAmbigType onig_get_default_ambig_flag()
+# OnigCaseFoldType onig_get_default_case_fold_flag()
- Get default ambig flag.
+ Get default case fold flag.
-# int onig_set_default_ambig_flag(OnigAmbigType ambig_flag)
+# int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag)
- Set default ambig flag.
+ Set default case fold flag.
- 1 ambig_flag: ambiguity flag
+ 1 case_fold_flag: case fold flag
# unsigned int onig_get_match_stack_limit_size(void)
@@ -580,6 +597,6 @@ Oniguruma API Version 4.7.1 2007/07/04
# const char* onig_version(void)
- Return version string. (ex. "2.2.8")
+ Return version string. (ex. "5.0.3")
// END
diff --git a/ext/mbstring/oniguruma/doc/API.ja b/ext/mbstring/oniguruma/doc/API.ja
index f2a8bd6f1..f681fa546 100644
--- a/ext/mbstring/oniguruma/doc/API.ja
+++ b/ext/mbstring/oniguruma/doc/API.ja
@@ -1,4 +1,4 @@
-֥󥿡ե Version 4.7.1 2007/07/04
+֥󥿡ե Version 5.9.2 2008/02/19
#include <oniguruma.h>
@@ -106,10 +106,10 @@
ONIG_ENCODING_EUC_KR EUC-KR
ONIG_ENCODING_EUC_CN EUC-CN
ONIG_ENCODING_SJIS Shift_JIS
- ONIG_ENCODING_KOI8 KOI8
ONIG_ENCODING_KOI8_R KOI8-R
+ ONIG_ENCODING_CP1251 CP1251
ONIG_ENCODING_BIG5 Big5
- ONIG_ENCODING_GB18030 GB 18030
+ ONIG_ENCODING_GB18030 GB18030
ޤϡ桼OnigEncodingTypeǡΥɥ쥹
@@ -134,6 +134,19 @@
onig_error_code_to_str()λܤΰȤƻѤ
+
+# int onig_new_without_alloc(regex_t* reg, const UChar* pattern,
+ const UChar* pattern_end,
+ OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
+ OnigErrorInfo* err_info)
+
+ ɽ֥(regex)롣
+ regΰdzƤʤ
+
+ ェλ: ONIG_NORMAL
+
+
+
# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigCompileInfo* ci, OnigErrorInfo* einfo)
@@ -153,15 +166,12 @@
ci->target_enc: оʸʸ󥳡ǥ
ci->syntax: ɽѥʸˡ
ci->option: ɽѥץ
- ci->ambig_flag: ONIG_OPTION_IGNORECASE⡼ɤǤ
+ ci->case_fold_flag: ONIG_OPTION_IGNORECASE⡼ɤǤ
ʸۣޥåӥåȥե饰
- ONIGENC_AMBIGUOUS_MATCH_NONE: ̵ۣ
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE: ASCIIʸʸ
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE: ASCIIʳʸʸ
- ONIGENC_AMBIGUOUS_MATCH_FULL: Ƥۣե饰ͭ
- ONIGENC_AMBIGUOUS_MATCH_DEFAULT: (ASCII | NONASCII)
- onig_set_default_ambig_flag()
+ ONIGENC_CASE_FOLD_MIN: Ǿ
+ ONIGENC_CASE_FOLD_DEFAULT: Ǿ
+ onig_set_default_case_fold_flag()
5 err_info: 顼֤Υɥ쥹
onig_error_code_to_str()λܤΰȤƻѤ
@@ -187,6 +197,14 @@
1 reg: ɽ֥
+# void onig_free_body(regex_t* reg)
+
+ ɽ֥ȤΥ롣(regȤΰ)
+
+
+ 1 reg: ɽ֥
+
+
# int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start,
const UChar* range, OnigRegion* region, OnigOptionType option)
@@ -200,10 +218,10 @@
1 reg: ɽ֥
2 str: оʸ
3 end: оʸνüɥ쥹
- 4 start: оʸθƬֳϥɥ쥹
- 5 range: оʸθƬֽüɥ쥹
- õ (start <= õʸƬ < range)
- õ (range <= õʸƬ <= start)
+ 4 start: оʸθƬ֥ɥ쥹
+ 5 range: оʸθλ֥ɥ쥹
+ õ (start <= õʸ < range)
+ õ (range <= õʸ <= start)
6 region: ޥåΰ(region) (NULL)
7 option: ץ
@@ -340,10 +358,10 @@
1 reg: ɽ֥
-# OnigEncoding onig_get_encoding(regex_t* reg)
-# OnigOptionType onig_get_options(regex_t* reg)
-# OnigAmbigType onig_get_ambig_flag(regex_t* reg)
-# OnigSyntaxType* onig_get_syntax(regex_t* reg)
+# OnigEncoding onig_get_encoding(regex_t* reg)
+# OnigOptionType onig_get_options(regex_t* reg)
+# OnigCaseFoldType onig_get_case_fold_flag(regex_t* reg)
+# OnigSyntaxType* onig_get_syntax(regex_t* reg)
ɽ֥ȤФơб֤ͤ
@@ -524,7 +542,7 @@
2 from:
-# int onig_set_meta_char(OnigEncoding enc, unsigned int what,
+# int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what,
OnigCodePoint code)
᥿ʸꤷɥݥͤ˥åȤ롣
@@ -535,8 +553,8 @@
ェλ: ONIG_NORMAL
- 1 enc: оʸ󥳡ǥ
- 2 what: ᥿ʸǽλ
+ 1 syntax: оʸˡ
+ 2 what: ᥿ʸǽλ
ONIG_META_CHAR_ESCAPE
ONIG_META_CHAR_ANYCHAR
@@ -548,17 +566,17 @@
3 code: ᥿ʸΥɥݥ ޤ ONIG_INEFFECTIVE_META_CHAR.
-# OnigAmbigType onig_get_default_ambig_flag()
+# OnigCaseFoldType onig_get_default_case_fold_flag()
- ǥեȤۣޥåե饰롣
+ ǥեȤcase foldե饰롣
-# int onig_set_default_ambig_flag(OnigAmbigType ambig_flag)
+# int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag)
- ǥեȤۣޥåե饰򥻥åȤ롣
+ ǥեȤcase foldե饰򥻥åȤ롣
- 1 ambig_flag: ۣޥåե饰
+ 1 case_fold_flag: case foldե饰
# unsigned int onig_get_match_stack_limit_size(void)
@@ -587,6 +605,6 @@
# const char* onig_version(void)
- Сʸ֤( "2.2.8")
+ Сʸ֤( "5.0.3")
// END
diff --git a/ext/mbstring/oniguruma/doc/FAQ b/ext/mbstring/oniguruma/doc/FAQ
index dccf242c8..46a3e0e08 100644
--- a/ext/mbstring/oniguruma/doc/FAQ
+++ b/ext/mbstring/oniguruma/doc/FAQ
@@ -1,4 +1,4 @@
-FAQ 2006/10/30
+FAQ 2006/11/14
1. Lognest match
@@ -12,7 +12,7 @@ FAQ 2006/10/30
(A) Oniguruma Layer
- Define the macro below at NOT_RUBY case in oniguruma/regint.h.
+ Define the macro below in oniguruma/regint.h.
USE_MULTI_THREAD_SYSTEM
THREAD_ATOMIC_START
diff --git a/ext/mbstring/oniguruma/doc/FAQ.ja b/ext/mbstring/oniguruma/doc/FAQ.ja
index 5582765ee..1d65f9fb6 100644
--- a/ext/mbstring/oniguruma/doc/FAQ.ja
+++ b/ext/mbstring/oniguruma/doc/FAQ.ja
@@ -1,4 +1,4 @@
-FAQ 2006/10/30
+FAQ 2007/07/23
1. Ĺޥå
@@ -13,7 +13,7 @@ FAQ 2006/10/30
(A) Oniguruma Layer
- oniguruma/regint.hNOT_RUBYʬΰʲΥޥ롣
+ oniguruma/regint.hΰʲΥޥ롣
USE_MULTI_THREAD_SYSTEM
THREAD_ATOMIC_START
@@ -35,7 +35,16 @@ FAQ 2006/10/30
"åɥդ˴ؤ­"˽񤤤Ƥ
-3. ᡼󥰥ꥹ
+3. CR + LF
+
+ DOSβ(CR(0x0c) + LF(0x0a)Ϣ³)
+
+ regenc.hΡʲʬͭˤ롣
+
+ /* #define USE_CRNL_AS_LINE_TERMINATOR */
+
+
+4. ᡼󥰥ꥹ
֤˴ؤ᡼󥰥ꥹȤ¸ߤʤ
@@ -59,8 +68,7 @@ Oniguruma饤֥ǹԤɤ餫֤ȤǤޤ
(A) Onigurumaб
-oniguruma/regint.hNOT_RUBYǰϤޤƤʬ
-ʲΥޥƺƥѥ뤷Ƥ
+oniguruma/regint.hǰʲΥޥƺƥѥ뤷Ƥ
USE_MULTI_THREAD_SYSTEM
diff --git a/ext/mbstring/oniguruma/doc/RE b/ext/mbstring/oniguruma/doc/RE
index 5a2783d16..21efe531a 100644
--- a/ext/mbstring/oniguruma/doc/RE
+++ b/ext/mbstring/oniguruma/doc/RE
@@ -1,4 +1,4 @@
-Oniguruma Regular Expressions Version 4.3.0 2006/08/17
+Oniguruma Regular Expressions Version 5.9.1 2007/09/05
syntax: ONIG_SYNTAX_RUBY (default)
@@ -70,6 +70,38 @@ syntax: ONIG_SYNTAX_RUBY (default)
\H non hexadecimal digit char
+ Character Property
+
+ * \p{property-name}
+ * \p{^property-name} (negative)
+ * \P{property-name} (negative)
+
+ property-name:
+
+ + works on all encodings
+ Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
+ Print, Punct, Space, Upper, XDigit, Word, ASCII,
+
+ + works on EUC_JP, Shift_JIS
+ Hiragana, Katakana
+
+ + works on UTF8, UTF16, UTF32
+ Any, Assigned, C, Cc, Cf, Cn, Co, Cs, L, Ll, Lm, Lo, Lt, Lu,
+ M, Mc, Me, Mn, N, Nd, Nl, No, P, Pc, Pd, Pe, Pf, Pi, Po, Ps,
+ S, Sc, Sk, Sm, So, Z, Zl, Zp, Zs,
+ Arabic, Armenian, Bengali, Bopomofo, Braille, Buginese,
+ Buhid, Canadian_Aboriginal, Cherokee, Common, Coptic,
+ Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian,
+ Glagolitic, Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul,
+ Hanunoo, Hebrew, Hiragana, Inherited, Kannada, Katakana,
+ Kharoshthi, Khmer, Lao, Latin, Limbu, Linear_B, Malayalam,
+ Mongolian, Myanmar, New_Tai_Lue, Ogham, Old_Italic, Old_Persian,
+ Oriya, Osmanya, Runic, Shavian, Sinhala, Syloti_Nagri, Syriac,
+ Tagalog, Tagbanwa, Tai_Le, Tamil, Telugu, Thaana, Thai, Tibetan,
+ Tifinagh, Ugaritic, Yi
+
+
+
4. Quantifier
greedy
@@ -111,11 +143,7 @@ syntax: ONIG_SYNTAX_RUBY (default)
\A beginning of string
\Z end of string, or before newline at the end
\z end of string
- \G matching start position (*)
-
- * Ruby Regexp:
- previous end-of-match position
- (This specification is not related to this library.)
+ \G matching start position
6. Character class
@@ -135,40 +163,43 @@ syntax: ONIG_SYNTAX_RUBY (default)
Not Unicode Case:
- alnum alphabet or digit char
- alpha alphabet
- ascii code value: [0 - 127]
- blank \t, \x20
- cntrl
- digit 0-9
- graph include all of multibyte encoded characters
- lower
- print include all of multibyte encoded characters
- punct
- space \t, \n, \v, \f, \r, \x20
- upper
- xdigit 0-9, a-f, A-F
+ alnum alphabet or digit char
+ alpha alphabet
+ ascii code value: [0 - 127]
+ blank \t, \x20
+ cntrl
+ digit 0-9
+ graph include all of multibyte encoded characters
+ lower
+ print include all of multibyte encoded characters
+ punct
+ space \t, \n, \v, \f, \r, \x20
+ upper
+ xdigit 0-9, a-f, A-F
+ word alphanumeric, "_" and multibyte characters
Unicode Case:
- alnum Letter | Mark | Decimal_Number
- alpha Letter | Mark
- ascii 0000 - 007F
- blank Space_Separator | 0009
- cntrl Control | Format | Unassigned | Private_Use | Surrogate
- digit Decimal_Number
- graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
- lower Lowercase_Letter
- print [[:graph:]] | [[:space:]]
- punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
- Final_Punctuation | Initial_Punctuation | Other_Punctuation |
- Open_Punctuation
- space Space_Separator | Line_Separator | Paragraph_Separator |
- 0009 | 000A | 000B | 000C | 000D | 0085
- upper Uppercase_Letter
- xdigit 0030 - 0039 | 0041 - 0046 | 0061 - 0066
- (0-9, a-f, A-F)
+ alnum Letter | Mark | Decimal_Number
+ alpha Letter | Mark
+ ascii 0000 - 007F
+ blank Space_Separator | 0009
+ cntrl Control | Format | Unassigned | Private_Use | Surrogate
+ digit Decimal_Number
+ graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
+ lower Lowercase_Letter
+ print [[:graph:]] | [[:space:]]
+ punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
+ Final_Punctuation | Initial_Punctuation | Other_Punctuation |
+ Open_Punctuation
+ space Space_Separator | Line_Separator | Paragraph_Separator |
+ 0009 | 000A | 000B | 000C | 000D | 0085
+ upper Uppercase_Letter
+ xdigit 0030 - 0039 | 0041 - 0046 | 0061 - 0066
+ (0-9, a-f, A-F)
+ word Letter | Mark | Decimal_Number | Connector_Punctuation
+
7. Extended groups
@@ -200,9 +231,9 @@ syntax: ONIG_SYNTAX_RUBY (default)
(?>subexp) atomic group
don't backtrack in subexp.
- (?<name>subexp) define named group
- (All characters of the name must be a word character.
- And first character must not be a digit or uppper case)
+ (?<name>subexp), (?'name'subexp)
+ define named group
+ (All characters of the name must be a word character.)
Not only a name but a number is assigned like a captured
group.
@@ -215,7 +246,12 @@ syntax: ONIG_SYNTAX_RUBY (default)
8. Back reference
\n back reference by group number (n >= 1)
+ \k<n> back reference by group number (n >= 1)
+ \k'n' back reference by group number (n >= 1)
+ \k<-n> back reference by relative group number (n >= 1)
+ \k'-n' back reference by relative group number (n >= 1)
\k<name> back reference by group name
+ \k'name' back reference by group name
In the back reference by the multiplex definition name,
a subexp with a large number is referred to preferentially.
@@ -227,10 +263,17 @@ syntax: ONIG_SYNTAX_RUBY (default)
back reference with nest level
- (This function is disabled in Ruby 1.9.)
+ level: 0, 1, 2, ...
- \k<name+n> n: 0, 1, 2, ...
- \k<name-n> n: 0, 1, 2, ...
+ \k<n+level> (n >= 1)
+ \k<n-level> (n >= 1)
+ \k'n+level' (n >= 1)
+ \k'n-level' (n >= 1)
+
+ \k<name+level>
+ \k<name-level>
+ \k'name+level'
+ \k'name-level'
Destinate relative nest level from back reference position.
@@ -256,7 +299,11 @@ syntax: ONIG_SYNTAX_RUBY (default)
9. Subexp call ("Tanaka Akira special")
\g<name> call by group name
+ \g'name' call by group name
\g<n> call by group number (n >= 1)
+ \g'n' call by group number (n >= 1)
+ \g<-n> call by relative group number (n >= 1)
+ \g'-n' call by relative group number (n >= 1)
* left-most recursive call is not allowed.
ex. (?<name>a|\g<name>b) => error
@@ -300,7 +347,6 @@ syntax: ONIG_SYNTAX_RUBY (default)
('g' and 'G' options are argued in ruby-dev ML)
- These options are not implemented in Ruby level.
-----------------------------
@@ -317,14 +363,13 @@ A-1. Syntax depend options
A-2. Original extensions
+ hexadecimal digit char type \h, \H
- + named group (?<name>...)
+ + named group (?<name>...), (?'name'...)
+ named backref \k<name>
+ subexp call \g<name>, \g<group-num>
A-3. Lacked features compare with perl 5.8.0
- + [:word:]
+ \N{name}
+ \l,\u,\L,\U, \X, \C
+ (?{code})
@@ -334,20 +379,10 @@ A-3. Lacked features compare with perl 5.8.0
* \Q...\E
This is effective on ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA.
- * \p{property}, \P{property}
- This is effective on ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA.
- Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
- Print, Punct, Space, Upper, XDigit, ASCII are supported.
-
- Prefix 'Is' of property name is allowed in ONIG_SYNTAX_PERL only.
- ex. \p{IsXDigit}.
-
- Negation operator of property is supported in ONIG_SYNTAX_PERL only.
- \p{^...}, \P{^...}
+A-4. Differences with Japanized GNU regex(version 0.12) of Ruby 1.8
-A-4. Differences with Japanized GNU regex(version 0.12) of Ruby
-
+ + add character property (\p{property}, \P{property})
+ add hexadecimal digit char type (\h, \H)
+ add look-behind
(?<=fixed-char-length-pattern), (?<!fixed-char-length-pattern)
@@ -401,7 +436,9 @@ A-5. Disabled functions by default syntax
A-6. Problems
- + Invalid encoding byte sequence is not checked in UTF-8.
+ + Invalid encoding byte sequence is not checked.
+
+ ex. UTF-8
* Invalid first byte is treated as a character.
/./u =~ "\xa3"
diff --git a/ext/mbstring/oniguruma/doc/RE.ja b/ext/mbstring/oniguruma/doc/RE.ja
index 51681715c..abde849fe 100644
--- a/ext/mbstring/oniguruma/doc/RE.ja
+++ b/ext/mbstring/oniguruma/doc/RE.ja
@@ -1,4 +1,4 @@
- ɽ Version 4.3.0 2006/08/17
+ ɽ Version 5.9.1 2007/09/05
ʸˡ: ONIG_SYNTAX_RUBY ()
@@ -70,6 +70,37 @@
\H 16ʿ
+ Character Property
+
+ * \p{property-name}
+ * \p{^property-name} (negative)
+ * \P{property-name} (negative)
+
+ property-name:
+
+ + ƤΥ󥳡ǥ󥰤ͭ
+ Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
+ Print, Punct, Space, Upper, XDigit, Word, ASCII,
+
+ + EUC-JP, Shift_JISͭ
+ Hiragana, Katakana
+
+ + UTF8, UTF16, UTF32ͭ
+ Any, Assigned, C, Cc, Cf, Cn, Co, Cs, L, Ll, Lm, Lo, Lt, Lu,
+ M, Mc, Me, Mn, N, Nd, Nl, No, P, Pc, Pd, Pe, Pf, Pi, Po, Ps,
+ S, Sc, Sk, Sm, So, Z, Zl, Zp, Zs,
+ Arabic, Armenian, Bengali, Bopomofo, Braille, Buginese,
+ Buhid, Canadian_Aboriginal, Cherokee, Common, Coptic,
+ Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian,
+ Glagolitic, Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul,
+ Hanunoo, Hebrew, Hiragana, Inherited, Kannada, Katakana,
+ Kharoshthi, Khmer, Lao, Latin, Limbu, Linear_B, Malayalam,
+ Mongolian, Myanmar, New_Tai_Lue, Ogham, Old_Italic, Old_Persian,
+ Oriya, Osmanya, Runic, Shavian, Sinhala, Syloti_Nagri, Syriac,
+ Tagalog, Tagbanwa, Tai_Le, Tamil, Telugu, Thaana, Thai, Tibetan,
+ Tifinagh, Ugaritic, Yi
+
+
4. ̻
@@ -112,12 +143,7 @@
\A ʸƬ
\Z ʸޤʸβԤľ
\z ʸ
- \G ȹ糫ϰ(*)
-
- * Ruby Regexp:
- ȹ
- (λͤRubyμ˴ؤΤǤꡢ
- ɽ饤֥Ȥ̵ط)
+ \G ȹ糫ϰ
6. ʸ
@@ -137,39 +163,42 @@
Unicodeʳξ:
- alnum ѿ
- alpha ѻ
- ascii 0 - 127
- blank \t, \x20
- cntrl
- digit 0-9
- graph ¿Хʸޤ
- lower
- print ¿Хʸޤ
- punct
- space \t, \n, \v, \f, \r, \x20
- upper
- xdigit 0-9, a-f, A-F
+ alnum ѿ
+ alpha ѻ
+ ascii 0 - 127
+ blank \t, \x20
+ cntrl
+ digit 0-9
+ graph ¿Хʸޤ
+ lower
+ print ¿Хʸޤ
+ punct
+ space \t, \n, \v, \f, \r, \x20
+ upper
+ xdigit 0-9, a-f, A-F
+ word ѿ, "_" ¿Хʸ
Unicodeξ:
- alnum Letter | Mark | Decimal_Number
- alpha Letter | Mark
- ascii 0000 - 007F
- blank Space_Separator | 0009
- cntrl Control | Format | Unassigned | Private_Use | Surrogate
- digit Decimal_Number
- graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
- lower Lowercase_Letter
- print [[:graph:]] | [[:space:]]
- punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
- Final_Punctuation | Initial_Punctuation | Other_Punctuation |
- Open_Punctuation
- space Space_Separator | Line_Separator | Paragraph_Separator |
- 0009 | 000A | 000B | 000C | 000D | 0085
- upper Uppercase_Letter
- xdigit 0030 - 0039 | 0041 - 0046 | 0061 - 0066
- (0-9, a-f, A-F)
+ alnum Letter | Mark | Decimal_Number
+ alpha Letter | Mark
+ ascii 0000 - 007F
+ blank Space_Separator | 0009
+ cntrl Control | Format | Unassigned | Private_Use | Surrogate
+ digit Decimal_Number
+ graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
+ lower Lowercase_Letter
+ print [[:graph:]] | [[:space:]]
+ punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
+ Final_Punctuation | Initial_Punctuation | Other_Punctuation |
+ Open_Punctuation
+ space Space_Separator | Line_Separator | Paragraph_Separator |
+ 0009 | 000A | 000B | 000C | 000D | 0085
+ upper Uppercase_Letter
+ xdigit 0030 - 0039 | 0041 - 0046 | 0061 - 0066
+ (0-9, a-f, A-F)
+ word Letter | Mark | Decimal_Number | Connector_Punctuation
+
7. ĥ
@@ -199,10 +228,10 @@
(?>) Ū
Τ̲ᤷȤǤθƻԤԤʤʤ
- (?<name>) ̾դͼ
+ (?<name>), (?'name')
+ ̾դͼ
̾Ƥ()
- (̾ñ칽ʸǤʤФʤʤǽʸ
- ʸǤäƤϤʤ)
+ (̾ñ칽ʸǤʤФʤʤ)
̾ǤʤͼƱֹͤƤ롣
ֹ꤬ػߤƤʤ (10. ͼ 򻲾)
@@ -215,8 +244,13 @@
8.
- \n ֹ껲 (n >= 1)
+ \n ֹ껲 (n >= 1)
+ \k<n> ֹ껲 (n >= 1)
+ \k'n' ֹ껲 (n >= 1)
+ \k<-n> ֹ껲 (n >= 1)
+ \k'-n' ֹ껲 (n >= 1)
\k<name> ̾껲
+ \k'name' ̾껲
̾껲Ȥǡ̾ʣμ¿Ƥˤϡ
ֹ礭礫ͥŪ˻Ȥ롣
@@ -229,10 +263,17 @@
ͥȥ٥դ
- εǽϸߡRuby 1.9Ǥ̵ˤƤ롣
+ level: 0, 1, 2, ...
+
+ \k<n+level> (n >= 1)
+ \k<n-level> (n >= 1)
+ \k'n+level' (n >= 1)
+ \k'n-level' (n >= 1)
- \k<name+n> n: 0, 1, 2, ...
- \k<name-n> n: 0, 1, 2, ...
+ \k<name+level>
+ \k<name-level>
+ \k'name+level'
+ \k'name-level'
Ȥΰ֤ŪʬƽФͥȥ٥ꤷơΥ٥Ǥ
ͤ򻲾Ȥ롣
@@ -259,7 +300,11 @@
9. ʬƽФ ("ůڥ")
\g<name> ̾ƽФ
- \g<n> ֹƽФ (n >= 1)
+ \g'name' ̾ƽФ
+ \g<n> ֹƽФ (n >= 1)
+ \g'n' ֹƽФ (n >= 1)
+ \g<-n> ֹƽФ (n >= 1)
+ \g'-n' ֹƽФ (n >= 1)
Ǻ֤ǤκƵƽФ϶ػߤ롣
. (?<name>a|\g<name>b) => error
@@ -306,7 +351,6 @@
οΰ̣ϡ
̾դ̵ͤ̾ͤƱ˻ѤɬΤ̤ϾʤǤ
Ȥͳͤ줿ΤǤ롣
- ΥץˤĤƤϡRubyǤϸ߼Ƥʤ
-----------------------------
@@ -323,14 +367,13 @@
䵭 2. ȼĥǽ
+ 16ʿ16ʿ \h, \H
- + ̾դͼ (?<name>...)
+ + ̾դͼ (?<name>...), (?'name'...)
+ ̾ \k<name>
+ ʬƽФ \g<name>, \g<group-num>
䵭 3. Perl 5.8.0Ӥ¸ߤʤǽ
- + [:word:]
+ \N{name}
+ \l,\u,\L,\U, \X, \C
+ (?{code})
@@ -340,21 +383,10 @@
* \Q...\E
âONIG_SYNTAX_PERLONIG_SYNTAX_JAVAǤͭ
- * \p{property}, \P{property}
- âONIG_SYNTAX_PERLONIG_SYNTAX_JAVAǤͭ
- Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
- Print, Punct, Space, Upper, XDigit, ASCIIǤ롣
-
- ̾ 'Is'ֻѤ뤳ȤϡONIG_SYNTAX_PERLǤΤ
- Ƥ롣
- ex. \p{IsXDigit}.
- 黻ҤϡONIG_SYNTAX_PERLǤΤߵƤ롣
- \p{^...}, \P{^...}
-
-
-䵭 4. Rubyܸ첽 GNU regex(version 0.12)Ȥΰ㤤
+䵭 4. Ruby 1.8 ܸ첽 GNU regex(version 0.12)Ȥΰ㤤
+ + ʸPropertyǽɲ (\p{property}, \P{Property})
+ 16ʿɲ (\h, \H)
+ ɤߵǽɲ
+ ߤʷ֤Ҥɲ (?+, *+, ++)
@@ -411,14 +443,18 @@
䵭 6.
- + UTF-8ǡХͤŬʲɤΥåϹԤʤäƤʤ
+ + 󥳡ǥ󥰥ХͤŬʲɤΥåϹԤʤäƤʤ
+
+ : UTF-8
* ƬХȤȤʥХȤʸȤߤʤ
/./u =~ "\xa3"
* ԴʥХȥ󥹤Υå򤷤ʤ
- /\w+/ =~ "a\xf3\x8ec"
+ /\w+/u =~ "a\xf3\x8ec"
Ĵ٤뤳ȤϲǽǤϤ뤬٤ʤΤǹԤʤʤ
+ ʸȤơΤ褦ʥХꤷưݾڤʤ
+
diff --git a/ext/mbstring/oniguruma/enc/ascii.c b/ext/mbstring/oniguruma/enc/ascii.c
index 64be21d7f..c2715f4e0 100644
--- a/ext/mbstring/oniguruma/enc/ascii.c
+++ b/ext/mbstring/oniguruma/enc/ascii.c
@@ -2,7 +2,7 @@
ascii.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2004 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -43,23 +43,14 @@ OnigEncodingType OnigEncodingASCII = {
"US-ASCII", /* name */
1, /* max byte length */
1, /* min byte length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- onigenc_ascii_mbc_to_normalize,
- onigenc_ascii_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ onigenc_ascii_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
ascii_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/big5.c b/ext/mbstring/oniguruma/enc/big5.c
index 86792666a..ca1e01b46 100644
--- a/ext/mbstring/oniguruma/enc/big5.c
+++ b/ext/mbstring/oniguruma/enc/big5.c
@@ -2,7 +2,7 @@
big5.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -67,18 +67,21 @@ big5_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-big5_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+big5_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+ UChar* lower)
{
- return onigenc_mbn_mbc_to_normalize(ONIG_ENCODING_BIG5, flag,
- pp, end, lower);
+ return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_BIG5, flag,
+ pp, end, lower);
}
+#if 0
static int
-big5_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+big5_is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_BIG5, flag, pp, end);
}
+#endif
static int
big5_is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -125,14 +128,14 @@ big5_left_adjust_char_head(const UChar* start, const UChar* s)
}
}
}
- len = enc_len(ONIG_ENCODING_BIG5, p);
+ len = enclen(ONIG_ENCODING_BIG5, p);
if (p + len > s) return (UChar* )p;
p += len;
return (UChar* )(p + ((s - p) & ~1));
}
static int
-big5_is_allowed_reverse_match(const UChar* s, const UChar* end)
+big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
const UChar c = *s;
@@ -144,23 +147,14 @@ OnigEncodingType OnigEncodingBIG5 = {
"Big5", /* name */
2, /* max enc length */
1, /* min enc length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
big5_mbc_to_code,
onigenc_mb2_code_to_mbclen,
big5_code_to_mbc,
- big5_mbc_to_normalize,
- big5_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ big5_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
big5_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
big5_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/cp1251.c b/ext/mbstring/oniguruma/enc/cp1251.c
new file mode 100644
index 000000000..63e58d2cd
--- /dev/null
+++ b/ext/mbstring/oniguruma/enc/cp1251.c
@@ -0,0 +1,200 @@
+/**********************************************************************
+ cp1251.c - Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2006-2007 Byte <byte AT mail DOT kna DOT ru>
+ * K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "regenc.h"
+
+#define ENC_CP1251_TO_LOWER_CASE(c) EncCP1251_ToLowerCaseTable[c]
+#define ENC_IS_CP1251_CTYPE(code,ctype) \
+ ((EncCP1251_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncCP1251_ToLowerCaseTable[256] = {
+ '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+ '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+ '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+ '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+ '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+ '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+ '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+ '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+ '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+ '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+ '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+ '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+ '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+ '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+ '\220', '\203', '\202', '\203', '\204', '\205', '\206', '\207',
+ '\210', '\211', '\232', '\213', '\234', '\235', '\236', '\237',
+ '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+ '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+ '\240', '\242', '\242', '\274', '\244', '\264', '\246', '\247',
+ '\270', '\251', '\272', '\253', '\254', '\255', '\256', '\277',
+ '\260', '\261', '\263', '\263', '\264', '\265', '\266', '\267',
+ '\270', '\271', '\272', '\273', '\274', '\276', '\276', '\277',
+ '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+ '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+ '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+ '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+ '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+ '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+ '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+ '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncCP1251_CtypeTable[256] = {
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x428c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+ 0x34a2, 0x34a2, 0x01a0, 0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0,
+ 0x0000, 0x01a0, 0x34a2, 0x01a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0,
+ 0x0008, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x0280, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0,
+ 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x34a2,
+ 0x01a0, 0x01a0, 0x34a2, 0x30e2, 0x30e2, 0x31e2, 0x01a0, 0x01a0,
+ 0x30e2, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+cp1251_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
+{
+ const UChar* p = *pp;
+
+ *lower = ENC_CP1251_TO_LOWER_CASE(*p);
+ (*pp)++;
+ return 1;
+}
+
+static int
+cp1251_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+{
+ if (code < 256)
+ return ENC_IS_CP1251_CTYPE(code, ctype);
+ else
+ return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xb8, 0xa8 },
+
+ { 0xe0, 0xc0 },
+ { 0xe1, 0xc1 },
+ { 0xe2, 0xc2 },
+ { 0xe3, 0xc3 },
+ { 0xe4, 0xc4 },
+ { 0xe5, 0xc5 },
+ { 0xe6, 0xc6 },
+ { 0xe7, 0xc7 },
+ { 0xe8, 0xc8 },
+ { 0xe9, 0xc9 },
+ { 0xea, 0xca },
+ { 0xeb, 0xcb },
+ { 0xec, 0xcc },
+ { 0xed, 0xcd },
+ { 0xee, 0xce },
+ { 0xef, 0xcf },
+
+ { 0xf0, 0xd0 },
+ { 0xf1, 0xd1 },
+ { 0xf2, 0xd2 },
+ { 0xf3, 0xd3 },
+ { 0xf4, 0xd4 },
+ { 0xf5, 0xd5 },
+ { 0xf6, 0xd6 },
+ { 0xf7, 0xd7 },
+ { 0xf8, 0xd8 },
+ { 0xf9, 0xd9 },
+ { 0xfa, 0xda },
+ { 0xfb, 0xdb },
+ { 0xfc, 0xdc },
+ { 0xfd, 0xdd },
+ { 0xfe, 0xde },
+ { 0xff, 0xdf }
+};
+
+static int
+cp1251_apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
+{
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, f, arg);
+}
+
+static int
+cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, p, end, items);
+}
+
+OnigEncodingType OnigEncodingCP1251 = {
+ onigenc_single_byte_mbc_enc_len,
+ "CP1251", /* name */
+ 1, /* max enc length */
+ 1, /* min enc length */
+ onigenc_is_mbc_newline_0x0a,
+ onigenc_single_byte_mbc_to_code,
+ onigenc_single_byte_code_to_mbclen,
+ onigenc_single_byte_code_to_mbc,
+ cp1251_mbc_case_fold,
+ cp1251_apply_all_case_fold,
+ cp1251_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ cp1251_is_code_ctype,
+ onigenc_not_support_get_ctype_code_range,
+ onigenc_single_byte_left_adjust_char_head,
+ onigenc_always_true_is_allowed_reverse_match
+};
diff --git a/ext/mbstring/oniguruma/enc/euc_jp.c b/ext/mbstring/oniguruma/enc/euc_jp.c
index 71c81ee9f..f605297cc 100644
--- a/ext/mbstring/oniguruma/enc/euc_jp.c
+++ b/ext/mbstring/oniguruma/enc/euc_jp.c
@@ -2,7 +2,7 @@
euc_jp.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
-#include "regenc.h"
+#include "regint.h"
#define eucjp_islead(c) ((UChar )((c) - 0xa1) > 0xfe - 0xa1)
@@ -51,18 +51,18 @@ static const int EncLen_EUCJP[] = {
};
static int
-eucjp_mbc_enc_len(const UChar* p)
+mbc_enc_len(const UChar* p)
{
return EncLen_EUCJP[*p];
}
static OnigCodePoint
-eucjp_mbc_to_code(const UChar* p, const UChar* end)
+mbc_to_code(const UChar* p, const UChar* end)
{
int c, i, len;
OnigCodePoint n;
- len = enc_len(ONIG_ENCODING_EUC_JP, p);
+ len = enclen(ONIG_ENCODING_EUC_JP, p);
n = (OnigCodePoint )*p++;
if (len == 1) return n;
@@ -75,17 +75,18 @@ eucjp_mbc_to_code(const UChar* p, const UChar* end)
}
static int
-eucjp_code_to_mbclen(OnigCodePoint code)
+code_to_mbclen(OnigCodePoint code)
{
if (ONIGENC_IS_CODE_ASCII(code)) return 1;
else if ((code & 0xff0000) != 0) return 3;
else if ((code & 0xff00) != 0) return 2;
- else return 0;
+ else
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
}
#if 0
static int
-eucjp_code_to_mbc_first(OnigCodePoint code)
+code_to_mbc_first(OnigCodePoint code)
{
int first;
@@ -103,7 +104,7 @@ eucjp_code_to_mbc_first(OnigCodePoint code)
#endif
static int
-eucjp_code_to_mbc(OnigCodePoint code, UChar *buf)
+code_to_mbc(OnigCodePoint code, UChar *buf)
{
UChar *p = buf;
@@ -112,66 +113,38 @@ eucjp_code_to_mbc(OnigCodePoint code, UChar *buf)
*p++ = (UChar )(code & 0xff);
#if 1
- if (enc_len(ONIG_ENCODING_EUC_JP, buf) != (p - buf))
- return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
+ if (enclen(ONIG_ENCODING_EUC_JP, buf) != (p - buf))
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
#endif
return p - buf;
}
static int
-eucjp_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
int len;
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
-
+ *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
(*pp)++;
return 1;
}
else {
- len = enc_len(ONIG_ENCODING_EUC_JP, p);
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
- }
+ int i;
+
+ len = enclen(ONIG_ENCODING_EUC_JP, p);
+ for (i = 0; i < len; i++) {
+ *lower++ = *p++;
}
(*pp) += len;
return len; /* return byte length of converted char to lower */
}
}
-static int
-eucjp_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
-{
- return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_EUC_JP, flag, pp, end);
-}
-
-static int
-eucjp_is_code_ctype(OnigCodePoint code, unsigned int ctype)
-{
- if (code < 128)
- return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
- else {
- if ((ctype & (ONIGENC_CTYPE_WORD |
- ONIGENC_CTYPE_GRAPH | ONIGENC_CTYPE_PRINT)) != 0) {
- return (eucjp_code_to_mbclen(code) > 1 ? TRUE : FALSE);
- }
- }
-
- return FALSE;
-}
-
static UChar*
-eucjp_left_adjust_char_head(const UChar* start, const UChar* s)
+left_adjust_char_head(const UChar* start, const UChar* s)
{
/* In this encoding
mb-trail bytes doesn't mix with single bytes.
@@ -183,14 +156,14 @@ eucjp_left_adjust_char_head(const UChar* start, const UChar* s)
p = s;
while (!eucjp_islead(*p) && p > start) p--;
- len = enc_len(ONIG_ENCODING_EUC_JP, p);
+ len = enclen(ONIG_ENCODING_EUC_JP, p);
if (p + len > s) return (UChar* )p;
p += len;
return (UChar* )(p + ((s - p) & ~1));
}
static int
-eucjp_is_allowed_reverse_match(const UChar* s, const UChar* end)
+is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
const UChar c = *s;
if (c <= 0x7e || c == 0x8e || c == 0x8f)
@@ -199,30 +172,114 @@ eucjp_is_allowed_reverse_match(const UChar* s, const UChar* end)
return FALSE;
}
+
+static int PropertyInited = 0;
+static const OnigCodePoint** PropertyList;
+static int PropertyListNum;
+static int PropertyListSize;
+static hash_table_type* PropertyNameTable;
+
+static const OnigCodePoint CR_Hiragana[] = {
+ 1,
+ 0xa4a1, 0xa4f3
+}; /* CR_Hiragana */
+
+static const OnigCodePoint CR_Katakana[] = {
+ 3,
+ 0xa5a1, 0xa5f6,
+ 0xaaa6, 0xaaaf,
+ 0xaab1, 0xaadd
+}; /* CR_Katakana */
+
+static int
+init_property_list(void)
+{
+ int r;
+
+ PROPERTY_LIST_ADD_PROP("Hiragana", CR_Hiragana);
+ PROPERTY_LIST_ADD_PROP("Katakana", CR_Katakana);
+ PropertyInited = 1;
+
+ end:
+ return r;
+}
+
+static int
+property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
+{
+ hash_data_type ctype;
+
+ PROPERTY_LIST_INIT_CHECK;
+
+ if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
+ return onigenc_minimum_property_name_to_ctype(enc, p, end);
+ }
+
+ return (int )ctype;
+}
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
+{
+ if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+ if (code < 128)
+ return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
+ else {
+ if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
+ return (code_to_mbclen(code) > 1 ? TRUE : FALSE);
+ }
+ }
+ }
+ else {
+ PROPERTY_LIST_INIT_CHECK;
+
+ ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+ if (ctype >= (unsigned int )PropertyListNum)
+ return ONIGERR_TYPE_BUG;
+
+ return onig_is_in_code_range((UChar* )PropertyList[ctype], code);
+ }
+
+ return FALSE;
+}
+
+static int
+get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
+ const OnigCodePoint* ranges[])
+{
+ if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+ return ONIG_NO_SUPPORT_CONFIG;
+ }
+ else {
+ *sb_out = 0x80;
+
+ PROPERTY_LIST_INIT_CHECK;
+
+ ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+ if (ctype >= (OnigCtype )PropertyListNum)
+ return ONIGERR_TYPE_BUG;
+
+ *ranges = PropertyList[ctype];
+ return 0;
+ }
+}
+
+
OnigEncodingType OnigEncodingEUC_JP = {
- eucjp_mbc_enc_len,
+ mbc_enc_len,
"EUC-JP", /* name */
3, /* max enc length */
1, /* min enc length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
- eucjp_mbc_to_code,
- eucjp_code_to_mbclen,
- eucjp_code_to_mbc,
- eucjp_mbc_to_normalize,
- eucjp_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- eucjp_is_code_ctype,
- onigenc_not_support_get_ctype_code_range,
- eucjp_left_adjust_char_head,
- eucjp_is_allowed_reverse_match
+ mbc_to_code,
+ code_to_mbclen,
+ code_to_mbc,
+ mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ property_name_to_ctype,
+ is_code_ctype,
+ get_ctype_code_range,
+ left_adjust_char_head,
+ is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/enc/euc_kr.c b/ext/mbstring/oniguruma/enc/euc_kr.c
index 57bf80153..1beef0900 100644
--- a/ext/mbstring/oniguruma/enc/euc_kr.c
+++ b/ext/mbstring/oniguruma/enc/euc_kr.c
@@ -2,7 +2,7 @@
euc_kr.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -67,18 +67,21 @@ euckr_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-euckr_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+euckr_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+ UChar* lower)
{
- return onigenc_mbn_mbc_to_normalize(ONIG_ENCODING_EUC_KR, flag,
- pp, end, lower);
+ return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_EUC_KR, flag,
+ pp, end, lower);
}
+#if 0
static int
-euckr_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+euckr_is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_EUC_KR, flag, pp, end);
}
+#endif
static int
euckr_is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -101,14 +104,14 @@ euckr_left_adjust_char_head(const UChar* start, const UChar* s)
p = s;
while (!euckr_islead(*p) && p > start) p--;
- len = enc_len(ONIG_ENCODING_EUC_KR, p);
+ len = enclen(ONIG_ENCODING_EUC_KR, p);
if (p + len > s) return (UChar* )p;
p += len;
return (UChar* )(p + ((s - p) & ~1));
}
static int
-euckr_is_allowed_reverse_match(const UChar* s, const UChar* end)
+euckr_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
const UChar c = *s;
if (c <= 0x7e) return TRUE;
@@ -120,23 +123,14 @@ OnigEncodingType OnigEncodingEUC_KR = {
"EUC-KR", /* name */
2, /* max enc length */
1, /* min enc length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
euckr_mbc_to_code,
onigenc_mb2_code_to_mbclen,
euckr_code_to_mbc,
- euckr_mbc_to_normalize,
- euckr_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ euckr_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
euckr_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
euckr_left_adjust_char_head,
@@ -149,23 +143,14 @@ OnigEncodingType OnigEncodingEUC_CN = {
"EUC-CN", /* name */
2, /* max enc length */
1, /* min enc length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
euckr_mbc_to_code,
onigenc_mb2_code_to_mbclen,
euckr_code_to_mbc,
- euckr_mbc_to_normalize,
- euckr_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ euckr_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
euckr_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
euckr_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/euc_tw.c b/ext/mbstring/oniguruma/enc/euc_tw.c
index 6f396e75e..2ddeb9318 100644
--- a/ext/mbstring/oniguruma/enc/euc_tw.c
+++ b/ext/mbstring/oniguruma/enc/euc_tw.c
@@ -2,7 +2,7 @@
euc_tw.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -67,17 +67,11 @@ euctw_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-euctw_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+euctw_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+ UChar* lower)
{
- return onigenc_mbn_mbc_to_normalize(ONIG_ENCODING_EUC_TW, flag,
- pp, end, lower);
-}
-
-static int
-euctw_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
-{
- return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_EUC_TW, flag, pp, end);
+ return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_EUC_TW, flag,
+ pp, end, lower);
}
static int
@@ -86,7 +80,7 @@ euctw_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return onigenc_mb4_is_code_ctype(ONIG_ENCODING_EUC_TW, code, ctype);
}
-#define euctw_islead(c) (((c) < 0xa1 && (c) != 0x8e) || (c) == 0xff)
+#define euctw_islead(c) ((UChar )((c) - 0xa1) > 0xfe - 0xa1)
static UChar*
euctw_left_adjust_char_head(const UChar* start, const UChar* s)
@@ -101,14 +95,14 @@ euctw_left_adjust_char_head(const UChar* start, const UChar* s)
p = s;
while (!euctw_islead(*p) && p > start) p--;
- len = enc_len(ONIG_ENCODING_EUC_TW, p);
+ len = enclen(ONIG_ENCODING_EUC_TW, p);
if (p + len > s) return (UChar* )p;
p += len;
return (UChar* )(p + ((s - p) & ~1));
}
static int
-euctw_is_allowed_reverse_match(const UChar* s, const UChar* end)
+euctw_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
const UChar c = *s;
if (c <= 0x7e) return TRUE;
@@ -120,23 +114,14 @@ OnigEncodingType OnigEncodingEUC_TW = {
"EUC-TW", /* name */
4, /* max enc length */
1, /* min enc length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
euctw_mbc_to_code,
onigenc_mb4_code_to_mbclen,
euctw_code_to_mbc,
- euctw_mbc_to_normalize,
- euctw_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ euctw_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
euctw_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
euctw_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/gb18030.c b/ext/mbstring/oniguruma/enc/gb18030.c
index 01995ea09..6bbd109ea 100644
--- a/ext/mbstring/oniguruma/enc/gb18030.c
+++ b/ext/mbstring/oniguruma/enc/gb18030.c
@@ -2,8 +2,8 @@
gb18030.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2005 KUBO Takehiro <kubo AT jiubao DOT org>
- * K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2005-2007 KUBO Takehiro <kubo AT jiubao DOT org>
+ * K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -88,18 +88,21 @@ gb18030_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-gb18030_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+gb18030_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+ UChar* lower)
{
- return onigenc_mbn_mbc_to_normalize(ONIG_ENCODING_GB18030, flag,
- pp, end, lower);
+ return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_GB18030, flag,
+ pp, end, lower);
}
+#if 0
static int
-gb18030_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+gb18030_is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_GB18030, flag, pp, end);
}
+#endif
static int
gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -467,7 +470,7 @@ gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
}
static int
-gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end)
+gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
return GB18030_MAP[*s] == C1 ? TRUE : FALSE;
}
@@ -477,23 +480,14 @@ OnigEncodingType OnigEncodingGB18030 = {
"GB18030", /* name */
4, /* max enc length */
1, /* min enc length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
gb18030_mbc_to_code,
onigenc_mb4_code_to_mbclen,
gb18030_code_to_mbc,
- gb18030_mbc_to_normalize,
- gb18030_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ gb18030_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
gb18030_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
gb18030_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/iso8859_1.c b/ext/mbstring/oniguruma/enc/iso8859_1.c
index 5646f26c1..174b97f02 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_1.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_1.c
@@ -2,7 +2,7 @@
iso8859_1.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,90 +30,221 @@
#include "regenc.h"
#define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \
- ((EncISO_8859_1_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const unsigned short EncISO_8859_1_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x00a0, 0x01a0,
- 0x00a0, 0x10a0, 0x10e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+ 0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
};
static int
-iso_8859_1_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* lower)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- const UChar* p = *pp;
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED,
+ const OnigUChar* p, const OnigUChar* end,
+ OnigCaseFoldCodeItem items[])
+{
+ if (0x41 <= *p && *p <= 0x5a) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+ if (*p == 0x53 && end > p + 1
+ && (*(p+1) == 0x53 || *(p+1) == 0x73)) { /* SS */
+ items[1].byte_len = 2;
+ items[1].code_len = 1;
+ items[1].code[0] = (OnigCodePoint )0xdf;
+ return 2;
+ }
+ else
+ return 1;
}
- else {
- *lower = *p;
+ else if (0x61 <= *p && *p <= 0x7a) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+ if (*p == 0x73 && end > p + 1
+ && (*(p+1) == 0x73 || *(p+1) == 0x53)) { /* ss */
+ items[1].byte_len = 2;
+ items[1].code_len = 1;
+ items[1].code[0] = (OnigCodePoint )0xdf;
+ return 2;
+ }
+ else
+ return 1;
}
- (*pp)++;
- return 1; /* return byte length of converted char to lower */
+ else if (0xc0 <= *p && *p <= 0xcf) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+ return 1;
+ }
+ else if (0xd0 <= *p && *p <= 0xdf) {
+ if (*p == 0xdf) {
+ items[0].byte_len = 1;
+ items[0].code_len = 2;
+ items[0].code[0] = (OnigCodePoint )'s';
+ items[0].code[1] = (OnigCodePoint )'s';
+
+ items[1].byte_len = 1;
+ items[1].code_len = 2;
+ items[1].code[0] = (OnigCodePoint )'S';
+ items[1].code[1] = (OnigCodePoint )'S';
+
+ items[2].byte_len = 1;
+ items[2].code_len = 2;
+ items[2].code[0] = (OnigCodePoint )'s';
+ items[2].code[1] = (OnigCodePoint )'S';
+
+ items[3].byte_len = 1;
+ items[3].code_len = 2;
+ items[3].code[0] = (OnigCodePoint )'S';
+ items[3].code[1] = (OnigCodePoint )'s';
+
+ return 4;
+ }
+ else if (*p != 0xd7) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+ return 1;
+ }
+ }
+ else if (0xe0 <= *p && *p <= 0xef) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+ return 1;
+ }
+ else if (0xf0 <= *p && *p <= 0xfe) {
+ if (*p != 0xf7) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+ return 1;
+ }
+ }
+
+ return 0;
}
static int
-iso_8859_1_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
+ const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
+ }
+
+ *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
(*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_1_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf, 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (*p == 0xdf || (*p >= 0xaa && *p <= 0xba))
- return FALSE;
- else
- return TRUE;
- }
+ return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
+{
+ int v;
+ const UChar* p = *pp;
- return (v != 0 ? TRUE : FALSE);
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
}
- return FALSE;
+
+ (*pp)++;
+ v = (EncISO_8859_1_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xdf, 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+ if (*p >= 0xaa && *p <= 0xba)
+ return FALSE;
+ else
+ return TRUE;
+ }
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_1_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_1_CTYPE(code, ctype);
@@ -126,25 +257,15 @@ OnigEncodingType OnigEncodingISO_8859_1 = {
"ISO-8859-1", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_1_mbc_to_normalize,
- iso_8859_1_is_mbc_ambiguous,
- onigenc_iso_8859_1_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- iso_8859_1_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_10.c b/ext/mbstring/oniguruma/enc/iso8859_10.c
index 8081ef801..e35c19d78 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_10.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_10.c
@@ -2,7 +2,7 @@
iso8859_10.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_10_TO_LOWER_CASE(c) EncISO_8859_10_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_10_CTYPE(code,ctype) \
- ((EncISO_8859_10_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_10_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_10_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,88 +69,82 @@ static const UChar EncISO_8859_10_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_10_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x01a0, 0x14a2, 0x14a2,
- 0x00a0, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x01a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x01a0, 0x10e2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x0284, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2,
+ 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
};
static int
-iso_8859_10_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_10_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_10_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-iso_8859_10_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_10_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf is lower case letter, but can't convert. */
- if (*p == 0xdf)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_10_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_10_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_10_CTYPE(code, ctype);
@@ -158,116 +152,71 @@ iso_8859_10_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa2, 0xb2 },
+ { 0xa3, 0xb3 },
+ { 0xa4, 0xb4 },
+ { 0xa5, 0xb5 },
+ { 0xa6, 0xb6 },
+ { 0xa8, 0xb8 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xae, 0xbe },
+ { 0xaf, 0xbf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-iso_8859_10_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xb1 },
- { 0xa2, 0xb2 },
- { 0xa3, 0xb3 },
- { 0xa4, 0xb4 },
- { 0xa5, 0xb5 },
- { 0xa6, 0xb6 },
- { 0xa8, 0xb8 },
- { 0xa9, 0xb9 },
- { 0xaa, 0xba },
- { 0xab, 0xbb },
- { 0xac, 0xbc },
- { 0xae, 0xbe },
- { 0xaf, 0xbf },
-
- { 0xb1, 0xa1 },
- { 0xb2, 0xa2 },
- { 0xb3, 0xa3 },
- { 0xb4, 0xa4 },
- { 0xb5, 0xa5 },
- { 0xb6, 0xa6 },
- { 0xb8, 0xa8 },
- { 0xb9, 0xa9 },
- { 0xba, 0xaa },
- { 0xbb, 0xab },
- { 0xbc, 0xac },
- { 0xbe, 0xae },
- { 0xbf, 0xaf },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd7, 0xf7 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf7, 0xd7 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_10 = {
@@ -275,25 +224,15 @@ OnigEncodingType OnigEncodingISO_8859_10 = {
"ISO-8859-10", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_10_mbc_to_normalize,
- iso_8859_10_is_mbc_ambiguous,
- iso_8859_10_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- iso_8859_10_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_11.c b/ext/mbstring/oniguruma/enc/iso8859_11.c
index de9bb3b82..8a460a304 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_11.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_11.c
@@ -2,7 +2,7 @@
iso8859_11.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2004 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,45 +30,45 @@
#include "regenc.h"
#define ENC_IS_ISO_8859_11_CTYPE(code,ctype) \
- ((EncISO_8859_11_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_11_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const unsigned short EncISO_8859_11_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000
+ 0x0284, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000
};
static int
-iso_8859_11_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_11_CTYPE(code, ctype);
@@ -81,24 +81,15 @@ OnigEncodingType OnigEncodingISO_8859_11 = {
"ISO-8859-11", /* name */
1, /* max enc length */
1, /* min enc length */
- ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- onigenc_ascii_mbc_to_normalize,
- onigenc_ascii_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- iso_8859_11_is_code_ctype,
+ onigenc_ascii_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_13.c b/ext/mbstring/oniguruma/enc/iso8859_13.c
index 69316edfc..3670d92ea 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_13.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_13.c
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_13_TO_LOWER_CASE(c) EncISO_8859_13_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_13_CTYPE(code,ctype) \
- ((EncISO_8859_13_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_13_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_13_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,84 +69,83 @@ static const UChar EncISO_8859_13_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_13_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
- 0x14a2, 0x00a0, 0x14a2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x14a2,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x01a0, 0x10e2, 0x00a0, 0x01a0,
- 0x10e2, 0x10a0, 0x10e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x01a0
+ 0x34a2, 0x00a0, 0x34a2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x34a2,
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x01a0, 0x30e2, 0x00a0, 0x01a0,
+ 0x30e2, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0
};
static int
-mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_13_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_13_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_13_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf, 0xb5 are lower case letter, but can't convert. */
- if (*p == 0xdf || *p == 0xb5)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_13_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xdf, 0xb5 are lower case letter, but can't convert. */
+ if (*p == 0xb5)
+ return FALSE;
+ else
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -157,85 +156,56 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-get_all_pair_ambig_codes(OnigAmbigType flag, const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_13 = {
@@ -243,24 +213,14 @@ OnigEncodingType OnigEncodingISO_8859_13 = {
"ISO-8859-13", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- mbc_to_normalize,
- is_mbc_ambiguous,
- get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/iso8859_14.c b/ext/mbstring/oniguruma/enc/iso8859_14.c
index 44638cf13..3596d4479 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_14.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_14.c
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_14_TO_LOWER_CASE(c) EncISO_8859_14_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_14_CTYPE(code,ctype) \
- ((EncISO_8859_14_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_14_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_14_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,84 +69,80 @@ static const UChar EncISO_8859_14_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_14_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x10e2, 0x00a0, 0x14a2, 0x10e2, 0x14a2, 0x00a0,
- 0x14a2, 0x00a0, 0x14a2, 0x10e2, 0x14a2, 0x01a0, 0x00a0, 0x14a2,
- 0x14a2, 0x10e2, 0x14a2, 0x10e2, 0x14a2, 0x10e2, 0x00a0, 0x14a2,
- 0x10e2, 0x10e2, 0x10e2, 0x14a2, 0x10e2, 0x14a2, 0x10e2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x0284, 0x34a2, 0x30e2, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x00a0,
+ 0x34a2, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x00a0, 0x34a2,
+ 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x00a0, 0x34a2,
+ 0x30e2, 0x30e2, 0x30e2, 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
};
static int
-mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_14_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_14_TO_LOWER_CASE(*p);
(*pp)++;
return 1; /* return byte length of converted char to lower */
}
+#if 0
static int
-is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_14_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf is lower case letter, but can't convert. */
- if (*p == 0xdf)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_14_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -157,115 +153,72 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xa2 },
+ { 0xa4, 0xa5 },
+ { 0xa6, 0xab },
+ { 0xa8, 0xb8 },
+ { 0xaa, 0xba },
+ { 0xac, 0xbc },
+ { 0xaf, 0xff },
+
+ { 0xb0, 0xb1 },
+ { 0xb2, 0xb3 },
+ { 0xb4, 0xb5 },
+ { 0xb7, 0xb9 },
+ { 0xbb, 0xbf },
+ { 0xbd, 0xbe },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-get_all_pair_ambig_codes(OnigAmbigType flag, const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xa2 },
- { 0xa2, 0xa1 },
- { 0xa4, 0xa5 },
- { 0xa5, 0xa4 },
- { 0xa6, 0xab },
- { 0xa8, 0xb8 },
- { 0xaa, 0xba },
- { 0xab, 0xa6 },
- { 0xac, 0xbc },
- { 0xaf, 0xff },
-
- { 0xb0, 0xb1 },
- { 0xb1, 0xb0 },
- { 0xb2, 0xb3 },
- { 0xb3, 0xb2 },
- { 0xb4, 0xb5 },
- { 0xb5, 0xb4 },
- { 0xb7, 0xb9 },
- { 0xb8, 0xa8 },
- { 0xb9, 0xb7 },
- { 0xba, 0xaa },
- { 0xbb, 0xbf },
- { 0xbc, 0xac },
- { 0xbd, 0xbe },
- { 0xbe, 0xbd },
- { 0xbf, 0xbb },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd7, 0xf7 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf7, 0xd7 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde },
- { 0xff, 0xaf }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_14 = {
@@ -273,24 +226,14 @@ OnigEncodingType OnigEncodingISO_8859_14 = {
"ISO-8859-14", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- mbc_to_normalize,
- is_mbc_ambiguous,
- get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/iso8859_15.c b/ext/mbstring/oniguruma/enc/iso8859_15.c
index f643b895d..08492fb4d 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_15.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_15.c
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_15_TO_LOWER_CASE(c) EncISO_8859_15_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_15_CTYPE(code,ctype) \
- ((EncISO_8859_15_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_15_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_15_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,84 +69,84 @@ static const UChar EncISO_8859_15_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_15_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x14a2, 0x00a0,
- 0x10e2, 0x00a0, 0x10e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x14a2, 0x10e2, 0x00a0, 0x01a0,
- 0x10e2, 0x10a0, 0x10e2, 0x01a0, 0x14a2, 0x10e2, 0x14a2, 0x01a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0,
+ 0x30e2, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x34a2, 0x30e2, 0x00a0, 0x01a0,
+ 0x30e2, 0x10a0, 0x30e2, 0x01a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
};
static int
-mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_15_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_15_TO_LOWER_CASE(*p);
(*pp)++;
return 1; /* return byte length of converted char to lower */
}
+#if 0
static int
-is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_15_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf etc.. are lower case letter, but can't convert. */
- if (*p == 0xdf || *p == 0xaa || *p == 0xb5 || *p == 0xba)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_15_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xdf etc.. are lower case letter, but can't convert. */
+ if (*p == 0xaa || *p == 0xb5 || *p == 0xba)
+ return FALSE;
+ else
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -157,96 +157,62 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa6, 0xa8 },
+
+ { 0xb4, 0xb8 },
+ { 0xbc, 0xbd },
+ { 0xbe, 0xff },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa6, 0xa8 },
- { 0xa8, 0xa6 },
-
- { 0xb4, 0xb8 },
- { 0xb8, 0xb4 },
- { 0xbc, 0xbd },
- { 0xbd, 0xbc },
- { 0xbe, 0xff },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde },
- { 0xff, 0xbe }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_15 = {
@@ -254,24 +220,14 @@ OnigEncodingType OnigEncodingISO_8859_15 = {
"ISO-8859-15", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- mbc_to_normalize,
- is_mbc_ambiguous,
- get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/iso8859_16.c b/ext/mbstring/oniguruma/enc/iso8859_16.c
index 921ae36d9..8b39c58a6 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_16.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_16.c
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_16_TO_LOWER_CASE(c) EncISO_8859_16_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_16_CTYPE(code,ctype) \
- ((EncISO_8859_16_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_16_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_16_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,84 +69,79 @@ static const UChar EncISO_8859_16_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_16_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x10e2, 0x14a2, 0x00a0, 0x01a0, 0x14a2, 0x00a0,
- 0x10e2, 0x00a0, 0x14a2, 0x01a0, 0x14a2, 0x01a0, 0x10e2, 0x14a2,
- 0x00a0, 0x00a0, 0x14a2, 0x10e2, 0x14a2, 0x01a0, 0x00a0, 0x01a0,
- 0x10e2, 0x10e2, 0x10e2, 0x01a0, 0x14a2, 0x10e2, 0x14a2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x0284, 0x34a2, 0x30e2, 0x34a2, 0x00a0, 0x01a0, 0x34a2, 0x00a0,
+ 0x30e2, 0x00a0, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x30e2, 0x34a2,
+ 0x00a0, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x00a0, 0x01a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x01a0, 0x34a2, 0x30e2, 0x34a2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
};
static int
-mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_16_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_16_TO_LOWER_CASE(*p);
(*pp)++;
return 1; /* return byte length of converted char to lower */
}
+#if 0
static int
-is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_16_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf is lower case letter, but can't convert. */
- if (*p == 0xdf)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_16_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -157,109 +152,69 @@ is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xa2 },
+ { 0xa3, 0xb3 },
+ { 0xa6, 0xa8 },
+ { 0xaa, 0xba },
+ { 0xac, 0xae },
+ { 0xaf, 0xbf },
+
+ { 0xb2, 0xb9 },
+ { 0xb4, 0xb8 },
+ { 0xbc, 0xbd },
+ { 0xbe, 0xff },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-get_all_pair_ambig_codes(OnigAmbigType flag, const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xa2 },
- { 0xa2, 0xa1 },
- { 0xa3, 0xb3 },
- { 0xa6, 0xa8 },
- { 0xa8, 0xa6 },
- { 0xaa, 0xba },
- { 0xac, 0xae },
- { 0xae, 0xac },
- { 0xaf, 0xbf },
-
- { 0xb2, 0xb9 },
- { 0xb3, 0xa3 },
- { 0xb4, 0xb8 },
- { 0xb8, 0xb4 },
- { 0xb9, 0xb2 },
- { 0xba, 0xaa },
- { 0xbc, 0xbd },
- { 0xbd, 0xbc },
- { 0xbe, 0xff },
- { 0xbf, 0xaf },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd7, 0xf7 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf7, 0xd7 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde },
- { 0xff, 0xbe }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_16 = {
@@ -267,24 +222,14 @@ OnigEncodingType OnigEncodingISO_8859_16 = {
"ISO-8859-16", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- mbc_to_normalize,
- is_mbc_ambiguous,
- get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/iso8859_2.c b/ext/mbstring/oniguruma/enc/iso8859_2.c
index f8cb3756f..80b93ba1b 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_2.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_2.c
@@ -2,7 +2,7 @@
iso8859_2.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \
- ((EncISO_8859_2_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_2_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_2_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,192 +69,145 @@ static const UChar EncISO_8859_2_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_2_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x00a0, 0x14a2, 0x00a0, 0x14a2, 0x14a2, 0x00a0,
- 0x00a0, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x01a0, 0x14a2, 0x14a2,
- 0x00a0, 0x10e2, 0x00a0, 0x10e2, 0x00a0, 0x10e2, 0x10e2, 0x00a0,
- 0x00a0, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0, 0x10e2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0
+ 0x0284, 0x34a2, 0x00a0, 0x34a2, 0x00a0, 0x34a2, 0x34a2, 0x00a0,
+ 0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2,
+ 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x30e2, 0x00a0,
+ 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0
};
static int
-iso_8859_2_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_2_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_2_TO_LOWER_CASE(*p);
(*pp)++;
return 1; /* return byte length of converted char to lower */
}
+#if 0
static int
-iso_8859_2_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_2_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf is lower case letter, but can't convert. */
- if (*p == 0xdf)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_2_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa3, 0xb3 },
+ { 0xa5, 0xb5 },
+ { 0xa6, 0xb6 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xae, 0xbe },
+ { 0xaf, 0xbf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
static int
-iso_8859_2_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xb1 },
- { 0xa3, 0xb3 },
- { 0xa5, 0xb5 },
- { 0xa6, 0xb6 },
- { 0xa9, 0xb9 },
- { 0xaa, 0xba },
- { 0xab, 0xbb },
- { 0xac, 0xbc },
- { 0xae, 0xbe },
- { 0xaf, 0xbf },
-
- { 0xb1, 0xa1 },
- { 0xb3, 0xa3 },
- { 0xb5, 0xa5 },
- { 0xb6, 0xa6 },
- { 0xb9, 0xa9 },
- { 0xba, 0xaa },
- { 0xbb, 0xab },
- { 0xbc, 0xac },
- { 0xbe, 0xae },
- { 0xbf, 0xaf },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
static int
-iso_8859_2_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_2_CTYPE(code, ctype);
@@ -267,25 +220,15 @@ OnigEncodingType OnigEncodingISO_8859_2 = {
"ISO-8859-2", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_2_mbc_to_normalize,
- iso_8859_2_is_mbc_ambiguous,
- iso_8859_2_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- iso_8859_2_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_3.c b/ext/mbstring/oniguruma/enc/iso8859_3.c
index e62d20de7..fd1168c38 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_3.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_3.c
@@ -2,7 +2,7 @@
iso8859_3.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_3_TO_LOWER_CASE(c) EncISO_8859_3_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_3_CTYPE(code,ctype) \
- ((EncISO_8859_3_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_3_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_3_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,88 +69,86 @@ static const UChar EncISO_8859_3_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_3_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x00a0, 0x00a0, 0x00a0, 0x0000, 0x14a2, 0x00a0,
- 0x00a0, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x01a0, 0x0000, 0x14a2,
- 0x00a0, 0x10e2, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x10e2, 0x01a0,
- 0x00a0, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x11a0, 0x0000, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x0000, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x0000, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x0000, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x0000, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0
+ 0x0284, 0x34a2, 0x00a0, 0x00a0, 0x00a0, 0x0000, 0x34a2, 0x00a0,
+ 0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x0000, 0x34a2,
+ 0x00a0, 0x30e2, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x30e2, 0x01a0,
+ 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x11a0, 0x0000, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x0000, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x0000, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0
};
static int
-iso_8859_3_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
+ const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_3_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_3_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-iso_8859_3_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_3_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf, 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (*p == 0xdf || *p == 0xb5)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_3_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+ if (*p == 0xb5)
+ return FALSE;
+ else
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_3_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_3_CTYPE(code, ctype);
@@ -158,97 +156,63 @@ iso_8859_3_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
-static int
-iso_8859_3_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
-{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xb1 },
- { 0xa6, 0xb6 },
- { 0xa9, 0xb9 },
- { 0xaa, 0xba },
- { 0xab, 0xbb },
- { 0xac, 0xbc },
- { 0xaf, 0xbf },
- { 0xb1, 0xa1 },
- { 0xb6, 0xa6 },
- { 0xb9, 0xa9 },
- { 0xba, 0xaa },
- { 0xbb, 0xab },
- { 0xbc, 0xac },
- { 0xbf, 0xaf },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa6, 0xb6 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xaf, 0xbf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
+{
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_3 = {
@@ -256,25 +220,15 @@ OnigEncodingType OnigEncodingISO_8859_3 = {
"ISO-8859-3", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_3_mbc_to_normalize,
- iso_8859_3_is_mbc_ambiguous,
- iso_8859_3_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- iso_8859_3_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_4.c b/ext/mbstring/oniguruma/enc/iso8859_4.c
index dd6bd7dfe..c124f5653 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_4.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_4.c
@@ -2,7 +2,7 @@
iso8859_4.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_4_TO_LOWER_CASE(c) EncISO_8859_4_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_4_CTYPE(code,ctype) \
- ((EncISO_8859_4_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_4_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_4_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,88 +69,85 @@ static const UChar EncISO_8859_4_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_4_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x10e2, 0x14a2, 0x00a0, 0x14a2, 0x14a2, 0x00a0,
- 0x00a0, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x01a0, 0x14a2, 0x00a0,
- 0x00a0, 0x10e2, 0x00a0, 0x10e2, 0x00a0, 0x10e2, 0x10e2, 0x00a0,
- 0x00a0, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x14a2, 0x10e2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0
+ 0x0284, 0x34a2, 0x30e2, 0x34a2, 0x00a0, 0x34a2, 0x34a2, 0x00a0,
+ 0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x00a0,
+ 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x30e2, 0x00a0,
+ 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0
};
static int
-iso_8859_4_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_4_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_4_TO_LOWER_CASE(*p);
(*pp)++;
return 1; /* return byte length of converted char to lower */
}
+#if 0
static int
-iso_8859_4_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_4_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf, 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (*p == 0xdf || *p == 0xa2)
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_4_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ if (*p == 0xa2)
+ return FALSE;
+ else
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_4_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_4_CTYPE(code, ctype);
@@ -158,106 +155,66 @@ iso_8859_4_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa3, 0xb3 },
+ { 0xa5, 0xb5 },
+ { 0xa6, 0xb6 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xae, 0xbe },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-iso_8859_4_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xb1 },
- { 0xa3, 0xb3 },
- { 0xa5, 0xb5 },
- { 0xa6, 0xb6 },
- { 0xa9, 0xb9 },
- { 0xaa, 0xba },
- { 0xab, 0xbb },
- { 0xac, 0xbc },
- { 0xae, 0xbe },
-
- { 0xb1, 0xa1 },
- { 0xb3, 0xa3 },
- { 0xb5, 0xa5 },
- { 0xb6, 0xa6 },
- { 0xb9, 0xa9 },
- { 0xba, 0xaa },
- { 0xbb, 0xab },
- { 0xbc, 0xac },
- { 0xbe, 0xae },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_4 = {
@@ -265,25 +222,15 @@ OnigEncodingType OnigEncodingISO_8859_4 = {
"ISO-8859-4", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_4_mbc_to_normalize,
- iso_8859_4_is_mbc_ambiguous,
- iso_8859_4_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- iso_8859_4_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_5.c b/ext/mbstring/oniguruma/enc/iso8859_5.c
index 87b7fb8a2..1ca67e735 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_5.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_5.c
@@ -2,7 +2,7 @@
iso8859_5.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_5_TO_LOWER_CASE(c) EncISO_8859_5_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_5_CTYPE(code,ctype) \
- ((EncISO_8859_5_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_5_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_5_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,80 +69,66 @@ static const UChar EncISO_8859_5_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_5_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x01a0, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x00a0, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0, 0x10e2, 0x10e2
+ 0x0284, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2
};
static int
-iso_8859_5_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
-
+ *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-iso_8859_5_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
(*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_5_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
- return (v != 0 ? TRUE : FALSE);
- }
- return FALSE;
+ v = (EncISO_8859_5_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_5_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_5_CTYPE(code, ctype);
@@ -150,120 +136,74 @@ iso_8859_5_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xf1 },
+ { 0xa2, 0xf2 },
+ { 0xa3, 0xf3 },
+ { 0xa4, 0xf4 },
+ { 0xa5, 0xf5 },
+ { 0xa6, 0xf6 },
+ { 0xa7, 0xf7 },
+ { 0xa8, 0xf8 },
+ { 0xa9, 0xf9 },
+ { 0xaa, 0xfa },
+ { 0xab, 0xfb },
+ { 0xac, 0xfc },
+ { 0xae, 0xfe },
+ { 0xaf, 0xff },
+
+ { 0xb0, 0xd0 },
+ { 0xb1, 0xd1 },
+ { 0xb2, 0xd2 },
+ { 0xb3, 0xd3 },
+ { 0xb4, 0xd4 },
+ { 0xb5, 0xd5 },
+ { 0xb6, 0xd6 },
+ { 0xb7, 0xd7 },
+ { 0xb8, 0xd8 },
+ { 0xb9, 0xd9 },
+ { 0xba, 0xda },
+ { 0xbb, 0xdb },
+ { 0xbc, 0xdc },
+ { 0xbd, 0xdd },
+ { 0xbe, 0xde },
+ { 0xbf, 0xdf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef }
+};
+
static int
-iso_8859_5_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa1, 0xf1 },
- { 0xa2, 0xf2 },
- { 0xa3, 0xf3 },
- { 0xa4, 0xf4 },
- { 0xa5, 0xf5 },
- { 0xa6, 0xf6 },
- { 0xa7, 0xf7 },
- { 0xa8, 0xf8 },
- { 0xa9, 0xf9 },
- { 0xaa, 0xfa },
- { 0xab, 0xfb },
- { 0xac, 0xfc },
- { 0xae, 0xfe },
- { 0xaf, 0xff },
-
- { 0xb0, 0xd0 },
- { 0xb1, 0xd1 },
- { 0xb2, 0xd2 },
- { 0xb3, 0xd3 },
- { 0xb4, 0xd4 },
- { 0xb5, 0xd5 },
- { 0xb6, 0xd6 },
- { 0xb7, 0xd7 },
- { 0xb8, 0xd8 },
- { 0xb9, 0xd9 },
- { 0xba, 0xda },
- { 0xbb, 0xdb },
- { 0xbc, 0xdc },
- { 0xbd, 0xdd },
- { 0xbe, 0xdf },
- { 0xbf, 0xdf },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xb0 },
- { 0xd1, 0xb1 },
- { 0xd2, 0xb2 },
- { 0xd3, 0xb3 },
- { 0xd4, 0xb4 },
- { 0xd5, 0xb5 },
- { 0xd6, 0xb6 },
- { 0xd7, 0xb7 },
- { 0xd8, 0xb8 },
- { 0xd9, 0xb9 },
- { 0xda, 0xba },
- { 0xdb, 0xbb },
- { 0xdc, 0xbc },
- { 0xdd, 0xbd },
- { 0xde, 0xbe },
- { 0xdf, 0xbf },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf1, 0xa1 },
- { 0xf2, 0xa2 },
- { 0xf3, 0xa3 },
- { 0xf4, 0xa4 },
- { 0xf5, 0xa5 },
- { 0xf6, 0xa6 },
- { 0xf7, 0xa7 },
- { 0xf8, 0xa8 },
- { 0xf9, 0xa9 },
- { 0xfa, 0xaa },
- { 0xfb, 0xab },
- { 0xfc, 0xac },
- { 0xfe, 0xae },
- { 0xff, 0xaf }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end,
+ OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_5 = {
@@ -271,25 +211,15 @@ OnigEncodingType OnigEncodingISO_8859_5 = {
"ISO-8859-5", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_5_mbc_to_normalize,
- iso_8859_5_is_mbc_ambiguous,
- iso_8859_5_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- iso_8859_5_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_6.c b/ext/mbstring/oniguruma/enc/iso8859_6.c
index fffcd0e7d..ab42eeed3 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_6.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_6.c
@@ -2,7 +2,7 @@
iso8859_6.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,25 +30,25 @@
#include "regenc.h"
#define ENC_IS_ISO_8859_6_CTYPE(code,ctype) \
- ((EncISO_8859_6_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_6_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const unsigned short EncISO_8859_6_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
@@ -57,18 +57,18 @@ static const unsigned short EncISO_8859_6_CtypeTable[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x01a0, 0x01a0, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x01a0, 0x0000, 0x0000, 0x0000, 0x01a0,
- 0x0000, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
static int
-iso_8859_6_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_6_CTYPE(code, ctype);
@@ -81,24 +81,15 @@ OnigEncodingType OnigEncodingISO_8859_6 = {
"ISO-8859-6", /* name */
1, /* max enc length */
1, /* min enc length */
- ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- onigenc_ascii_mbc_to_normalize,
- onigenc_ascii_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- iso_8859_6_is_code_ctype,
+ onigenc_ascii_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_7.c b/ext/mbstring/oniguruma/enc/iso8859_7.c
index e87661d84..1090064d7 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_7.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_7.c
@@ -2,7 +2,7 @@
iso8859_7.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_7_TO_LOWER_CASE(c) EncISO_8859_7_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_7_CTYPE(code,ctype) \
- ((EncISO_8859_7_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_7_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_7_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,87 +69,74 @@ static const UChar EncISO_8859_7_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_7_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0284, 0x01a0, 0x01a0, 0x00a0, 0x0000, 0x0000, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x0000, 0x01a0, 0x00a0, 0x01a0, 0x0000, 0x01a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x00a0, 0x14a2, 0x01a0,
- 0x14a2, 0x14a2, 0x14a2, 0x01a0, 0x14a2, 0x10a0, 0x14a2, 0x14a2,
- 0x10e2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x0000, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x0000
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x00a0, 0x34a2, 0x01a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x10a0, 0x34a2, 0x34a2,
+ 0x30e2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x0000
};
static int
-iso_8859_7_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_7_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
+ *lower = ENC_ISO_8859_7_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-iso_8859_7_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
(*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_7_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- if (*p == 0xc0 || *p == 0xe0)
- return FALSE;
- else
- return TRUE;
- }
-
- return (v != 0 ? TRUE : FALSE);
+ v = (EncISO_8859_7_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ if (*p == 0xc0 || *p == 0xe0)
+ return FALSE;
+ else
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_7_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_7_CTYPE(code, ctype);
@@ -157,121 +144,78 @@ iso_8859_7_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xb6, 0xdc },
+ { 0xb8, 0xdd },
+ { 0xb9, 0xde },
+ { 0xba, 0xdf },
+ { 0xbc, 0xfc },
+ { 0xbe, 0xfd },
+ { 0xbf, 0xfe },
+
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb }
+};
+
static int
-iso_8859_7_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xb6, 0xdc },
- { 0xb8, 0xdd },
- { 0xb9, 0xde },
- { 0xba, 0xdf },
- { 0xbc, 0xfc },
- { 0xbe, 0xfd },
- { 0xbf, 0xfe },
-
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd7, 0xf7 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xb6 },
- { 0xdd, 0xb8 },
- { 0xde, 0xb9 },
- { 0xdf, 0xba },
-
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf7, 0xd7 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xbc },
- { 0xfd, 0xbe },
- { 0xfe, 0xbf }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, p, end, items);
}
+
OnigEncodingType OnigEncodingISO_8859_7 = {
onigenc_single_byte_mbc_enc_len,
"ISO-8859-7", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_7_mbc_to_normalize,
- iso_8859_7_is_mbc_ambiguous,
- iso_8859_7_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- iso_8859_7_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_8.c b/ext/mbstring/oniguruma/enc/iso8859_8.c
index e76966c66..fb9846f25 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_8.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_8.c
@@ -2,7 +2,7 @@
iso8859_8.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2004 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,45 +30,45 @@
#include "regenc.h"
#define ENC_IS_ISO_8859_8_CTYPE(code,ctype) \
- ((EncISO_8859_8_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_8_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const unsigned short EncISO_8859_8_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0284, 0x0000, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x00a0, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x00a0, 0x01a0,
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
0x00a0, 0x10a0, 0x00a0, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x01a0,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2, 0x10a2,
- 0x10a2, 0x10a2, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+ 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
static int
-iso_8859_8_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_8_CTYPE(code, ctype);
@@ -81,24 +81,15 @@ OnigEncodingType OnigEncodingISO_8859_8 = {
"ISO-8859-8", /* name */
1, /* max enc length */
1, /* min enc length */
- ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- onigenc_ascii_mbc_to_normalize,
- onigenc_ascii_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- iso_8859_8_is_code_ctype,
+ onigenc_ascii_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/iso8859_9.c b/ext/mbstring/oniguruma/enc/iso8859_9.c
index 16a30c5f2..079d681c2 100644
--- a/ext/mbstring/oniguruma/enc/iso8859_9.c
+++ b/ext/mbstring/oniguruma/enc/iso8859_9.c
@@ -2,7 +2,7 @@
iso8859_9.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_ISO_8859_9_TO_LOWER_CASE(c) EncISO_8859_9_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_9_CTYPE(code,ctype) \
- ((EncISO_8859_9_CtypeTable[code] & ctype) != 0)
+ ((EncISO_8859_9_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncISO_8859_9_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,88 +69,86 @@ static const UChar EncISO_8859_9_ToLowerCaseTable[256] = {
};
static const unsigned short EncISO_8859_9_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x00a0, 0x01a0,
- 0x00a0, 0x10a0, 0x10e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+ 0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
};
static int
-iso_8859_9_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_ISO_8859_9_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ *lower++ = 's';
+ *lower = 's';
+ (*pp)++;
+ return 2;
}
+
+ *lower = ENC_ISO_8859_9_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-iso_8859_9_is_mbc_ambiguous(OnigAmbigType flag,
- const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
- (*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncISO_8859_9_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xdf etc.. are lower case letter, but can't convert. */
- if (*p == 0xdf || (*p >= 0xaa && *p <= 0xba))
- return FALSE;
- else
- return TRUE;
- }
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ (*pp)++;
+ return TRUE;
+ }
- return (v != 0 ? TRUE : FALSE);
+ (*pp)++;
+ v = (EncISO_8859_9_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xdf etc.. are lower case letter, but can't convert. */
+ if (*p >= 0xaa && *p <= 0xba)
+ return FALSE;
+ else
+ return TRUE;
}
- return FALSE;
+
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
-iso_8859_9_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 256)
return ENC_IS_ISO_8859_9_CTYPE(code, ctype);
@@ -158,86 +156,56 @@ iso_8859_9_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
static int
-iso_8859_9_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingISO_8859_9 = {
@@ -245,25 +213,15 @@ OnigEncodingType OnigEncodingISO_8859_9 = {
"ISO-8859-9", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- iso_8859_9_mbc_to_normalize,
- iso_8859_9_is_mbc_ambiguous,
- iso_8859_9_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- iso_8859_9_is_code_ctype,
+ mbc_case_fold,
+ apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
diff --git a/ext/mbstring/oniguruma/enc/koi8.c b/ext/mbstring/oniguruma/enc/koi8.c
index d7277e862..c6649572f 100644
--- a/ext/mbstring/oniguruma/enc/koi8.c
+++ b/ext/mbstring/oniguruma/enc/koi8.c
@@ -2,7 +2,7 @@
koi8.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2004 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_KOI8_TO_LOWER_CASE(c) EncKOI8_ToLowerCaseTable[c]
#define ENC_IS_KOI8_CTYPE(code,ctype) \
- ((EncKOI8_CtypeTable[code] & ctype) != 0)
+ ((EncKOI8_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncKOI8_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,22 +69,22 @@ static const UChar EncKOI8_ToLowerCaseTable[256] = {
};
static const unsigned short EncKOI8_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
@@ -93,52 +93,46 @@ static const unsigned short EncKOI8_CtypeTable[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2
};
+
static int
-koi8_mbc_to_normalize(OnigAmbigType flag,
- const OnigUChar** pp, const OnigUChar* end, OnigUChar* lower)
+koi8_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
- const OnigUChar* p = *pp;
+ const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_KOI8_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
+ *lower = ENC_KOI8_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
koi8_is_mbc_ambiguous(OnigAmbigType flag, const OnigUChar** pp, const OnigUChar* end)
{
const OnigUChar* p = *pp;
(*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
+ if (((flag & ONIGENC_CASE_FOLD_ASCII_CASE) != 0 &&
ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
+ ((flag & ONIGENC_CASE_FOLD_NONASCII_CASE) != 0 &&
!ONIGENC_IS_MBC_ASCII(p))) {
int v = (EncKOI8_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
+ (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
return (v != 0 ? TRUE : FALSE);
}
return FALSE;
}
-
+#endif
static int
koi8_is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -149,89 +143,91 @@ koi8_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe },
+ { 0xdf, 0xff },
+
+ { 0xe0, 0xc0 },
+ { 0xe1, 0xc1 },
+ { 0xe2, 0xc2 },
+ { 0xe3, 0xc3 },
+ { 0xe4, 0xc4 },
+ { 0xe5, 0xc5 },
+ { 0xe6, 0xc6 },
+ { 0xe7, 0xc7 },
+ { 0xe8, 0xc8 },
+ { 0xe9, 0xc9 },
+ { 0xea, 0xca },
+ { 0xeb, 0xcb },
+ { 0xec, 0xcc },
+ { 0xed, 0xcd },
+ { 0xee, 0xce },
+ { 0xef, 0xcf },
+
+ { 0xf0, 0xd0 },
+ { 0xf1, 0xd1 },
+ { 0xf2, 0xd2 },
+ { 0xf3, 0xd3 },
+ { 0xf4, 0xd4 },
+ { 0xf5, 0xd5 },
+ { 0xf6, 0xd6 },
+ { 0xf7, 0xd7 },
+ { 0xf8, 0xd8 },
+ { 0xf9, 0xd9 },
+ { 0xfa, 0xda },
+ { 0xfb, 0xdb },
+ { 0xfc, 0xdc },
+ { 0xfe, 0xde },
+ { 0xff, 0xdf }
+};
+
static int
-koi8_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+koi8_apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd7, 0xf7 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
- { 0xdf, 0xff },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf7, 0xd7 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfe, 0xde },
- { 0xff, 0xdf }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+koi8_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingKOI8 = {
@@ -239,24 +235,14 @@ OnigEncodingType OnigEncodingKOI8 = {
"KOI8", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- koi8_mbc_to_normalize,
- koi8_is_mbc_ambiguous,
- koi8_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ koi8_mbc_case_fold,
+ koi8_apply_all_case_fold,
+ koi8_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
koi8_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/koi8_r.c b/ext/mbstring/oniguruma/enc/koi8_r.c
index 1010f5ff9..364dda151 100644
--- a/ext/mbstring/oniguruma/enc/koi8_r.c
+++ b/ext/mbstring/oniguruma/enc/koi8_r.c
@@ -2,7 +2,7 @@
koi8_r.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
#define ENC_KOI8_R_TO_LOWER_CASE(c) EncKOI8_R_ToLowerCaseTable[c]
#define ENC_IS_KOI8_R_CTYPE(code,ctype) \
- ((EncKOI8_R_CtypeTable[code] & ctype) != 0)
+ ((EncKOI8_R_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
static const UChar EncKOI8_R_ToLowerCaseTable[256] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
@@ -69,75 +69,63 @@ static const UChar EncKOI8_R_ToLowerCaseTable[256] = {
};
static const unsigned short EncKOI8_R_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x0284, 0x00a0, 0x00a0, 0x10a0, 0x01a0, 0x00a0,
- 0x00a0, 0x00a0, 0x00a0, 0x10e2, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+ 0x00a0, 0x00a0, 0x00a0, 0x30e2, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x00a0, 0x14a2, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+ 0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2
};
static int
-koi8_r_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+koi8_r_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ENC_KOI8_R_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
+ *lower = ENC_KOI8_R_TO_LOWER_CASE(*p);
(*pp)++;
- return 1; /* return byte length of converted char to lower */
+ return 1;
}
+#if 0
static int
-koi8_r_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+koi8_r_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
+ int v;
const UChar* p = *pp;
(*pp)++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- int v = (EncKOI8_R_CtypeTable[*p] &
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
- return (v != 0 ? TRUE : FALSE);
- }
- return FALSE;
+ v = (EncKOI8_R_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ return (v != 0 ? TRUE : FALSE);
}
+#endif
static int
koi8_r_is_code_ctype(OnigCodePoint code, unsigned int ctype)
@@ -148,92 +136,60 @@ koi8_r_is_code_ctype(OnigCodePoint code, unsigned int ctype)
return FALSE;
}
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa3, 0xb3 },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe },
+ { 0xdf, 0xff }
+};
+
static int
-koi8_r_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+koi8_r_apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xa3, 0xb3 },
- { 0xb3, 0xa3 },
-
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd7, 0xf7 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
- { 0xdf, 0xff },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf7, 0xd7 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfe, 0xde },
- { 0xff, 0xdf }
- };
+ return onigenc_apply_all_case_fold_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, f, arg);
+}
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return 52;
- }
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
- }
- else
- return 0;
+static int
+koi8_r_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_get_case_fold_codes_by_str_with_map(
+ sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+ flag, p, end, items);
}
OnigEncodingType OnigEncodingKOI8_R = {
@@ -241,24 +197,14 @@ OnigEncodingType OnigEncodingKOI8_R = {
"KOI8-R", /* name */
1, /* max enc length */
1, /* min enc length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
onigenc_single_byte_mbc_to_code,
onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbc,
- koi8_r_mbc_to_normalize,
- koi8_r_is_mbc_ambiguous,
- koi8_r_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
+ koi8_r_mbc_case_fold,
+ koi8_r_apply_all_case_fold,
+ koi8_r_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
koi8_r_is_code_ctype,
onigenc_not_support_get_ctype_code_range,
onigenc_single_byte_left_adjust_char_head,
diff --git a/ext/mbstring/oniguruma/enc/mktable.c b/ext/mbstring/oniguruma/enc/mktable.c
index fcf057423..285216ebd 100644
--- a/ext/mbstring/oniguruma/enc/mktable.c
+++ b/ext/mbstring/oniguruma/enc/mktable.c
@@ -2,7 +2,7 @@
mktable.c
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,28 +29,32 @@
#include <stdlib.h>
#include <stdio.h>
+#include <locale.h>
+
+#define __USE_ISOC99
+#include <ctype.h>
-#define NOT_RUBY
#include "regenc.h"
-#define UNICODE_ISO_8859_1 0
-#define ISO_8859_1 1
-#define ISO_8859_2 2
-#define ISO_8859_3 3
-#define ISO_8859_4 4
-#define ISO_8859_5 5
-#define ISO_8859_6 6
-#define ISO_8859_7 7
-#define ISO_8859_8 8
-#define ISO_8859_9 9
-#define ISO_8859_10 10
-#define ISO_8859_11 11
-#define ISO_8859_13 12
-#define ISO_8859_14 13
-#define ISO_8859_15 14
-#define ISO_8859_16 15
-#define KOI8 16
-#define KOI8_R 17
+#define ASCII 0
+#define UNICODE_ISO_8859_1 1
+#define ISO_8859_1 2
+#define ISO_8859_2 3
+#define ISO_8859_3 4
+#define ISO_8859_4 5
+#define ISO_8859_5 6
+#define ISO_8859_6 7
+#define ISO_8859_7 8
+#define ISO_8859_8 9
+#define ISO_8859_9 10
+#define ISO_8859_10 11
+#define ISO_8859_11 12
+#define ISO_8859_13 13
+#define ISO_8859_14 14
+#define ISO_8859_15 15
+#define ISO_8859_16 16
+#define KOI8 17
+#define KOI8_R 18
typedef struct {
int num;
@@ -58,6 +62,7 @@ typedef struct {
} ENC_INFO;
static ENC_INFO Info[] = {
+ { ASCII, "ASCII" },
{ UNICODE_ISO_8859_1, "UNICODE_ISO_8859_1" },
{ ISO_8859_1, "ISO_8859_1" },
{ ISO_8859_2, "ISO_8859_2" },
@@ -81,6 +86,9 @@ static ENC_INFO Info[] = {
static int IsAlpha(int enc, int c)
{
+ if (enc == ASCII)
+ return isalpha(c);
+
if (c >= 0x41 && c <= 0x5a) return 1;
if (c >= 0x61 && c <= 0x7a) return 1;
@@ -255,6 +263,9 @@ static int IsAlpha(int enc, int c)
static int IsBlank(int enc, int c)
{
+ if (enc == ASCII)
+ return isblank(c);
+
if (c == 0x09 || c == 0x20) return 1;
switch (enc) {
@@ -291,6 +302,9 @@ static int IsBlank(int enc, int c)
static int IsCntrl(int enc, int c)
{
+ if (enc == ASCII)
+ return iscntrl(c);
+
if (c >= 0x00 && c <= 0x1F) return 1;
switch (enc) {
@@ -328,7 +342,7 @@ static int IsCntrl(int enc, int c)
return 0;
}
-static int IsDigit(int enc, int c)
+static int IsDigit(int enc ARG_UNUSED, int c)
{
if (c >= 0x30 && c <= 0x39) return 1;
return 0;
@@ -336,6 +350,9 @@ static int IsDigit(int enc, int c)
static int IsGraph(int enc, int c)
{
+ if (enc == ASCII)
+ return isgraph(c);
+
if (c >= 0x21 && c <= 0x7e) return 1;
switch (enc) {
@@ -405,6 +422,9 @@ static int IsGraph(int enc, int c)
static int IsLower(int enc, int c)
{
+ if (enc == ASCII)
+ return islower(c);
+
if (c >= 0x61 && c <= 0x7a) return 1;
switch (enc) {
@@ -534,6 +554,9 @@ static int IsLower(int enc, int c)
static int IsPrint(int enc, int c)
{
+ if (enc == ASCII)
+ return isprint(c);
+
if (c >= 0x20 && c <= 0x7e) return 1;
switch (enc) {
@@ -609,6 +632,9 @@ static int IsPrint(int enc, int c)
static int IsPunct(int enc, int c)
{
+ if (enc == ASCII)
+ return ispunct(c);
+
if (enc == UNICODE_ISO_8859_1) {
if (c == 0x24 || c == 0x2b || c == 0x5e || c == 0x60 ||
c == 0x7c || c == 0x7e) return 1;
@@ -705,6 +731,9 @@ static int IsPunct(int enc, int c)
static int IsSpace(int enc, int c)
{
+ if (enc == ASCII)
+ return isspace(c);
+
if (c >= 0x09 && c <= 0x0d) return 1;
if (c == 0x20) return 1;
@@ -744,6 +773,9 @@ static int IsSpace(int enc, int c)
static int IsUpper(int enc, int c)
{
+ if (enc == ASCII)
+ return isupper(c);
+
if (c >= 0x41 && c <= 0x5a) return 1;
switch (enc) {
@@ -868,6 +900,9 @@ static int IsUpper(int enc, int c)
static int IsXDigit(int enc, int c)
{
+ if (enc == ASCII)
+ return isxdigit(c);
+
if (c >= 0x30 && c <= 0x39) return 1;
if (c >= 0x41 && c <= 0x46) return 1;
if (c >= 0x61 && c <= 0x66) return 1;
@@ -876,6 +911,10 @@ static int IsXDigit(int enc, int c)
static int IsWord(int enc, int c)
{
+ if (enc == ASCII) {
+ return (isalpha(c) || isdigit(c) || c == 0x5f);
+ }
+
if (c >= 0x30 && c <= 0x39) return 1;
if (c >= 0x41 && c <= 0x5a) return 1;
if (c == 0x5f) return 1;
@@ -1052,13 +1091,13 @@ static int IsWord(int enc, int c)
return 0;
}
-static int IsAscii(int enc, int c)
+static int IsAscii(int enc ARG_UNUSED, int c)
{
if (c >= 0x00 && c <= 0x7f) return 1;
return 0;
}
-static int IsNewline(int enc, int c)
+static int IsNewline(int enc ARG_UNUSED, int c)
{
if (c == 0x0a) return 1;
return 0;
@@ -1072,25 +1111,25 @@ static int exec(FILE* fp, ENC_INFO* einfo)
enc = einfo->num;
- fprintf(fp, "static unsigned short Enc%s_CtypeTable[256] = {\n",
+ fprintf(fp, "static const unsigned short Enc%s_CtypeTable[256] = {\n",
einfo->name);
for (c = 0; c < 256; c++) {
val = 0;
- if (IsNewline(enc, c)) val |= ONIGENC_CTYPE_NEWLINE;
- if (IsAlpha (enc, c)) val |= ONIGENC_CTYPE_ALPHA;
- if (IsBlank (enc, c)) val |= ONIGENC_CTYPE_BLANK;
- if (IsCntrl (enc, c)) val |= ONIGENC_CTYPE_CNTRL;
- if (IsDigit (enc, c)) val |= ONIGENC_CTYPE_DIGIT;
- if (IsGraph (enc, c)) val |= ONIGENC_CTYPE_GRAPH;
- if (IsLower (enc, c)) val |= ONIGENC_CTYPE_LOWER;
- if (IsPrint (enc, c)) val |= ONIGENC_CTYPE_PRINT;
- if (IsPunct (enc, c)) val |= ONIGENC_CTYPE_PUNCT;
- if (IsSpace (enc, c)) val |= ONIGENC_CTYPE_SPACE;
- if (IsUpper (enc, c)) val |= ONIGENC_CTYPE_UPPER;
- if (IsXDigit(enc, c)) val |= ONIGENC_CTYPE_XDIGIT;
- if (IsWord (enc, c)) val |= ONIGENC_CTYPE_WORD;
- if (IsAscii (enc, c)) val |= ONIGENC_CTYPE_ASCII;
+ if (IsNewline(enc, c)) val |= BIT_CTYPE_NEWLINE;
+ if (IsAlpha (enc, c)) val |= (BIT_CTYPE_ALPHA | BIT_CTYPE_ALNUM);
+ if (IsBlank (enc, c)) val |= BIT_CTYPE_BLANK;
+ if (IsCntrl (enc, c)) val |= BIT_CTYPE_CNTRL;
+ if (IsDigit (enc, c)) val |= (BIT_CTYPE_DIGIT | BIT_CTYPE_ALNUM);
+ if (IsGraph (enc, c)) val |= BIT_CTYPE_GRAPH;
+ if (IsLower (enc, c)) val |= BIT_CTYPE_LOWER;
+ if (IsPrint (enc, c)) val |= BIT_CTYPE_PRINT;
+ if (IsPunct (enc, c)) val |= BIT_CTYPE_PUNCT;
+ if (IsSpace (enc, c)) val |= BIT_CTYPE_SPACE;
+ if (IsUpper (enc, c)) val |= BIT_CTYPE_UPPER;
+ if (IsXDigit(enc, c)) val |= BIT_CTYPE_XDIGIT;
+ if (IsWord (enc, c)) val |= BIT_CTYPE_WORD;
+ if (IsAscii (enc, c)) val |= BIT_CTYPE_ASCII;
if (c % NCOL == 0) fputs(" ", fp);
fprintf(fp, "0x%04x", val);
@@ -1104,12 +1143,20 @@ static int exec(FILE* fp, ENC_INFO* einfo)
return 0;
}
-extern int main(int argc, char* argv[])
+extern int main(int argc ARG_UNUSED, char* argv[] ARG_UNUSED)
{
int i;
FILE* fp = stdout;
- for (i = 0; i < sizeof(Info)/sizeof(ENC_INFO); i++) {
+ setlocale(LC_ALL, "C");
+ /* setlocale(LC_ALL, "POSIX"); */
+ /* setlocale(LC_ALL, "en_GB.iso88591"); */
+ /* setlocale(LC_ALL, "de_BE.iso88591"); */
+ /* setlocale(LC_ALL, "fr_FR.iso88591"); */
+
+ for (i = 0; i < (int )(sizeof(Info)/sizeof(ENC_INFO)); i++) {
exec(fp, &Info[i]);
}
+
+ return 0;
}
diff --git a/ext/mbstring/oniguruma/enc/sjis.c b/ext/mbstring/oniguruma/enc/sjis.c
index f7d7d5226..7a54c9fb3 100644
--- a/ext/mbstring/oniguruma/enc/sjis.c
+++ b/ext/mbstring/oniguruma/enc/sjis.c
@@ -2,7 +2,7 @@
sjis.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
-#include "regenc.h"
+#include "regint.h"
static const int EncLen_SJIS[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -71,13 +71,13 @@ static const char SJIS_CAN_BE_TRAIL_TABLE[256] = {
#define SJIS_ISMB_TRAIL(byte) SJIS_CAN_BE_TRAIL_TABLE[(byte)]
static int
-sjis_mbc_enc_len(const UChar* p)
+mbc_enc_len(const UChar* p)
{
return EncLen_SJIS[*p];
}
static int
-sjis_code_to_mbclen(OnigCodePoint code)
+code_to_mbclen(OnigCodePoint code)
{
if (code < 256) {
if (EncLen_SJIS[(int )code] == 1)
@@ -89,16 +89,16 @@ sjis_code_to_mbclen(OnigCodePoint code)
return 2;
}
else
- return 0;
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
}
static OnigCodePoint
-sjis_mbc_to_code(const UChar* p, const UChar* end)
+mbc_to_code(const UChar* p, const UChar* end)
{
int c, i, len;
OnigCodePoint n;
- len = enc_len(ONIG_ENCODING_SJIS, p);
+ len = enclen(ONIG_ENCODING_SJIS, p);
c = *p++;
n = c;
if (len == 1) return n;
@@ -112,7 +112,7 @@ sjis_mbc_to_code(const UChar* p, const UChar* end)
}
static int
-sjis_code_to_mbc(OnigCodePoint code, UChar *buf)
+code_to_mbc(OnigCodePoint code, UChar *buf)
{
UChar *p = buf;
@@ -120,67 +120,63 @@ sjis_code_to_mbc(OnigCodePoint code, UChar *buf)
*p++ = (UChar )(code & 0xff);
#if 0
- if (enc_len(ONIG_ENCODING_SJIS, buf) != (p - buf))
- return REGERR_INVALID_WIDE_CHAR_VALUE;
+ if (enclen(ONIG_ENCODING_SJIS, buf) != (p - buf))
+ return REGERR_INVALID_CODE_POINT_VALUE;
#endif
return p - buf;
}
static int
-sjis_mbc_to_normalize(OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
-
+ *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
(*pp)++;
return 1;
}
else {
- int len = enc_len(ONIG_ENCODING_SJIS, p);
+ int i;
+ int len = enclen(ONIG_ENCODING_SJIS, p);
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
- }
+ for (i = 0; i < len; i++) {
+ *lower++ = *p++;
}
(*pp) += len;
return len; /* return byte length of converted char to lower */
}
}
+#if 0
static int
-sjis_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end)
{
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end);
}
+#endif
+#if 0
static int
-sjis_is_code_ctype(OnigCodePoint code, unsigned int ctype)
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
if (code < 128)
return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
else {
- if ((ctype & (ONIGENC_CTYPE_WORD |
- ONIGENC_CTYPE_GRAPH | ONIGENC_CTYPE_PRINT)) != 0) {
- return (sjis_code_to_mbclen(code) > 1 ? TRUE : FALSE);
+ if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
+ return (code_to_mbclen(code) > 1 ? TRUE : FALSE);
}
}
return FALSE;
}
+#endif
static UChar*
-sjis_left_adjust_char_head(const UChar* start, const UChar* s)
+left_adjust_char_head(const UChar* start, const UChar* s)
{
const UChar *p;
int len;
@@ -196,43 +192,127 @@ sjis_left_adjust_char_head(const UChar* start, const UChar* s)
}
}
}
- len = enc_len(ONIG_ENCODING_SJIS, p);
+ len = enclen(ONIG_ENCODING_SJIS, p);
if (p + len > s) return (UChar* )p;
p += len;
return (UChar* )(p + ((s - p) & ~1));
}
static int
-sjis_is_allowed_reverse_match(const UChar* s, const UChar* end)
+is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
const UChar c = *s;
return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);
}
+
+static int PropertyInited = 0;
+static const OnigCodePoint** PropertyList;
+static int PropertyListNum;
+static int PropertyListSize;
+static hash_table_type* PropertyNameTable;
+
+static const OnigCodePoint CR_Hiragana[] = {
+ 1,
+ 0x829f, 0x82f1
+}; /* CR_Hiragana */
+
+static const OnigCodePoint CR_Katakana[] = {
+ 4,
+ 0x00a6, 0x00af,
+ 0x00b1, 0x00dd,
+ 0x8340, 0x837e,
+ 0x8380, 0x8396,
+}; /* CR_Katakana */
+
+static int
+init_property_list(void)
+{
+ int r;
+
+ PROPERTY_LIST_ADD_PROP("Hiragana", CR_Hiragana);
+ PROPERTY_LIST_ADD_PROP("Katakana", CR_Katakana);
+ PropertyInited = 1;
+
+ end:
+ return r;
+}
+
+static int
+property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
+{
+ hash_data_type ctype;
+
+ PROPERTY_LIST_INIT_CHECK;
+
+ if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
+ return onigenc_minimum_property_name_to_ctype(enc, p, end);
+ }
+
+ return (int )ctype;
+}
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
+{
+ if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+ if (code < 128)
+ return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
+ else {
+ if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
+ return (code_to_mbclen(code) > 1 ? TRUE : FALSE);
+ }
+ }
+ }
+ else {
+ PROPERTY_LIST_INIT_CHECK;
+
+ ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+ if (ctype >= (unsigned int )PropertyListNum)
+ return ONIGERR_TYPE_BUG;
+
+ return onig_is_in_code_range((UChar* )PropertyList[ctype], code);
+ }
+
+ return FALSE;
+}
+
+static int
+get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
+ const OnigCodePoint* ranges[])
+{
+ if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+ return ONIG_NO_SUPPORT_CONFIG;
+ }
+ else {
+ *sb_out = 0x80;
+
+ PROPERTY_LIST_INIT_CHECK;
+
+ ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+ if (ctype >= (OnigCtype )PropertyListNum)
+ return ONIGERR_TYPE_BUG;
+
+ *ranges = PropertyList[ctype];
+ return 0;
+ }
+}
+
OnigEncodingType OnigEncodingSJIS = {
- sjis_mbc_enc_len,
+ mbc_enc_len,
"Shift_JIS", /* name */
2, /* max byte length */
1, /* min byte length */
- ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
onigenc_is_mbc_newline_0x0a,
- sjis_mbc_to_code,
- sjis_code_to_mbclen,
- sjis_code_to_mbc,
- sjis_mbc_to_normalize,
- sjis_is_mbc_ambiguous,
- onigenc_ascii_get_all_pair_ambig_codes,
- onigenc_nothing_get_all_comp_ambig_codes,
- sjis_is_code_ctype,
- onigenc_not_support_get_ctype_code_range,
- sjis_left_adjust_char_head,
- sjis_is_allowed_reverse_match
+ mbc_to_code,
+ code_to_mbclen,
+ code_to_mbc,
+ mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ property_name_to_ctype,
+ is_code_ctype,
+ get_ctype_code_range,
+ left_adjust_char_head,
+ is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/enc/unicode.c b/ext/mbstring/oniguruma/enc/unicode.c
index a8cf53901..af7a86e08 100644
--- a/ext/mbstring/oniguruma/enc/unicode.c
+++ b/ext/mbstring/oniguruma/enc/unicode.c
@@ -2,7 +2,7 @@
unicode.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2004 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,475 +27,59 @@
* SUCH DAMAGE.
*/
-#include "regenc.h"
+#include "regint.h"
+#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code,ctype) \
+ ((EncUNICODE_ISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+#if 0
+#define ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(code,cbit) \
+ ((EncUNICODE_ISO_8859_1_CtypeTable[code] & (cbit)) != 0)
+#endif
-const unsigned short OnigEnc_Unicode_ISO_8859_1_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x228c, 0x2289, 0x2288, 0x2288, 0x2288, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
+static const unsigned short EncUNICODE_ISO_8859_1_CtypeTable[256] = {
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x428c, 0x4289, 0x4288, 0x4288, 0x4288, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0288, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10e2, 0x01a0, 0x00a0, 0x00a8, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x00a0, 0x01a0,
- 0x00a0, 0x10a0, 0x10e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
+ 0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x00a8, 0x00a0, 0x00a0,
+ 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+ 0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+ 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+ 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
};
-static const OnigCodePoint CRAlnum[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 414,
-#else
- 9,
-#endif
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ee, 0x02ee,
- 0x0300, 0x0357,
- 0x035d, 0x036f,
- 0x037a, 0x037a,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03f5,
- 0x03f7, 0x03fb,
- 0x0400, 0x0481,
- 0x0483, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0561, 0x0587,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f2,
- 0x0610, 0x0615,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x0660, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06de, 0x06e8,
- 0x06ea, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0963,
- 0x0966, 0x096f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bef,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f20, 0x0f29,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1049,
- 0x1050, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1369, 0x1371,
- 0x13a0, 0x13f4,
- 0x1401, 0x166c,
- 0x166f, 0x1676,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17b3,
- 0x17b6, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x17e0, 0x17e9,
- 0x180b, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x20d0, 0x20ea,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2131,
- 0x2133, 0x2139,
- 0x213d, 0x213f,
- 0x2145, 0x2149,
- 0x3005, 0x3006,
- 0x302a, 0x302f,
- 0x3031, 0x3035,
- 0x303b, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309a,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x31a0, 0x31b7,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xac00, 0xd7a3,
- 0xf900, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10300, 0x1031e,
- 0x10330, 0x10349,
- 0x10380, 0x1039d,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x20000, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRAlnum */
+/* 'NEWLINE' */
+static const OnigCodePoint CR_NEWLINE[] = {
+ 1,
+ 0x000a, 0x000a
+}; /* CR_NEWLINE */
-static const OnigCodePoint CRAlpha[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 396,
-#else
- 8,
-#endif
+/* 'Alpha': [[:Alpha:]] */
+static const OnigCodePoint CR_Alpha[] = {
+ 418,
0x0041, 0x005a,
0x0061, 0x007a,
0x00aa, 0x00aa,
@@ -503,15 +87,12 @@ static const OnigCodePoint CRAlpha[] = {
0x00ba, 0x00ba,
0x00c0, 0x00d6,
0x00d8, 0x00f6,
- 0x00f8, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00f8, 0x0241,
0x0250, 0x02c1,
0x02c6, 0x02d1,
0x02e0, 0x02e4,
0x02ee, 0x02ee,
- 0x0300, 0x0357,
- 0x035d, 0x036f,
+ 0x0300, 0x036f,
0x037a, 0x037a,
0x0386, 0x0386,
0x0388, 0x038a,
@@ -519,27 +100,25 @@ static const OnigCodePoint CRAlpha[] = {
0x038e, 0x03a1,
0x03a3, 0x03ce,
0x03d0, 0x03f5,
- 0x03f7, 0x03fb,
- 0x0400, 0x0481,
+ 0x03f7, 0x0481,
0x0483, 0x0486,
0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
+ 0x04d0, 0x04f9,
0x0500, 0x050f,
0x0531, 0x0556,
0x0559, 0x0559,
0x0561, 0x0587,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
+ 0x0591, 0x05b9,
0x05bb, 0x05bd,
0x05bf, 0x05bf,
0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
0x05d0, 0x05ea,
0x05f0, 0x05f2,
0x0610, 0x0615,
0x0621, 0x063a,
- 0x0640, 0x0658,
+ 0x0640, 0x065e,
0x066e, 0x06d3,
0x06d5, 0x06dc,
0x06de, 0x06e8,
@@ -547,12 +126,13 @@ static const OnigCodePoint CRAlpha[] = {
0x06fa, 0x06fc,
0x06ff, 0x06ff,
0x0710, 0x074a,
- 0x074d, 0x074f,
+ 0x074d, 0x076d,
0x0780, 0x07b1,
0x0901, 0x0939,
0x093c, 0x094d,
0x0950, 0x0954,
0x0958, 0x0963,
+ 0x097d, 0x097d,
0x0981, 0x0983,
0x0985, 0x098c,
0x098f, 0x0990,
@@ -562,7 +142,7 @@ static const OnigCodePoint CRAlpha[] = {
0x09b6, 0x09b9,
0x09bc, 0x09c4,
0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
+ 0x09cb, 0x09ce,
0x09d7, 0x09d7,
0x09dc, 0x09dd,
0x09df, 0x09e3,
@@ -617,8 +197,7 @@ static const OnigCodePoint CRAlpha[] = {
0x0b9e, 0x0b9f,
0x0ba3, 0x0ba4,
0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
+ 0x0bae, 0x0bb9,
0x0bbe, 0x0bc2,
0x0bc6, 0x0bc8,
0x0bca, 0x0bcd,
@@ -705,35 +284,29 @@ static const OnigCodePoint CRAlpha[] = {
0x1036, 0x1039,
0x1050, 0x1059,
0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10fc,
0x1100, 0x1159,
0x115f, 0x11a2,
0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
+ 0x1200, 0x1248,
0x124a, 0x124d,
0x1250, 0x1256,
0x1258, 0x1258,
0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
+ 0x1260, 0x1288,
0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
+ 0x1290, 0x12b0,
0x12b2, 0x12b5,
0x12b8, 0x12be,
0x12c0, 0x12c0,
0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
+ 0x1318, 0x135a,
+ 0x135f, 0x135f,
+ 0x1380, 0x138f,
0x13a0, 0x13f4,
0x1401, 0x166c,
0x166f, 0x1676,
@@ -758,7 +331,10 @@ static const OnigCodePoint CRAlpha[] = {
0x1930, 0x193b,
0x1950, 0x196d,
0x1970, 0x1974,
- 0x1d00, 0x1d6b,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x1a00, 0x1a1b,
+ 0x1d00, 0x1dc3,
0x1e00, 0x1e9b,
0x1ea0, 0x1ef9,
0x1f00, 0x1f15,
@@ -782,7 +358,8 @@ static const OnigCodePoint CRAlpha[] = {
0x1ff6, 0x1ffc,
0x2071, 0x2071,
0x207f, 0x207f,
- 0x20d0, 0x20ea,
+ 0x2090, 0x2094,
+ 0x20d0, 0x20eb,
0x2102, 0x2102,
0x2107, 0x2107,
0x210a, 0x2113,
@@ -794,8 +371,23 @@ static const OnigCodePoint CRAlpha[] = {
0x212a, 0x212d,
0x212f, 0x2131,
0x2133, 0x2139,
- 0x213d, 0x213f,
+ 0x213c, 0x213f,
0x2145, 0x2149,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2ce4,
+ 0x2d00, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
0x3005, 0x3006,
0x302a, 0x302f,
0x3031, 0x3035,
@@ -810,11 +402,13 @@ static const OnigCodePoint CRAlpha[] = {
0x31a0, 0x31b7,
0x31f0, 0x31ff,
0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
+ 0x4e00, 0x9fbb,
0xa000, 0xa48c,
+ 0xa800, 0xa827,
0xac00, 0xd7a3,
0xf900, 0xfa2d,
0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
0xfb00, 0xfb06,
0xfb13, 0xfb17,
0xfb1d, 0xfb28,
@@ -849,6 +443,8 @@ static const OnigCodePoint CRAlpha[] = {
0x10300, 0x1031e,
0x10330, 0x10349,
0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
0x10400, 0x1049d,
0x10800, 0x10805,
0x10808, 0x10808,
@@ -856,11 +452,19 @@ static const OnigCodePoint CRAlpha[] = {
0x10837, 0x10838,
0x1083c, 0x1083c,
0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
0x1d165, 0x1d169,
0x1d16d, 0x1d172,
0x1d17b, 0x1d182,
0x1d185, 0x1d18b,
0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
0x1d400, 0x1d454,
0x1d456, 0x1d49c,
0x1d49e, 0x1d49f,
@@ -879,7 +483,7 @@ static const OnigCodePoint CRAlpha[] = {
0x1d540, 0x1d544,
0x1d546, 0x1d546,
0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
+ 0x1d552, 0x1d6a5,
0x1d6a8, 0x1d6c0,
0x1d6c2, 0x1d6da,
0x1d6dc, 0x1d6fa,
@@ -894,40 +498,28 @@ static const OnigCodePoint CRAlpha[] = {
0x20000, 0x2a6d6,
0x2f800, 0x2fa1d,
0xe0100, 0xe01ef
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRAlpha */
+}; /* CR_Alpha */
-static const OnigCodePoint CRBlank[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
+/* 'Blank': [[:Blank:]] */
+static const OnigCodePoint CR_Blank[] = {
9,
-#else
- 3,
-#endif
0x0009, 0x0009,
0x0020, 0x0020,
- 0x00a0, 0x00a0
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00a0, 0x00a0,
0x1680, 0x1680,
0x180e, 0x180e,
0x2000, 0x200a,
0x202f, 0x202f,
0x205f, 0x205f,
0x3000, 0x3000
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRBlank */
+}; /* CR_Blank */
-static const OnigCodePoint CRCntrl[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
+/* 'Cntrl': [[:Cntrl:]] */
+static const OnigCodePoint CR_Cntrl[] = {
19,
-#else
- 3,
-#endif
0x0000, 0x001f,
0x007f, 0x009f,
- 0x00ad, 0x00ad
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00ad, 0x00ad,
0x0600, 0x0603,
0x06dd, 0x06dd,
0x070f, 0x070f,
@@ -944,18 +536,12 @@ static const OnigCodePoint CRCntrl[] = {
0xe0020, 0xe007f,
0xf0000, 0xffffd,
0x100000, 0x10fffd
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRCntrl */
+}; /* CR_Cntrl */
-static const OnigCodePoint CRDigit[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
+/* 'Digit': [[:Digit:]] */
+static const OnigCodePoint CR_Digit[] = {
23,
-#else
- 1,
-#endif
- 0x0030, 0x0039
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x0030, 0x0039,
0x0660, 0x0669,
0x06f0, 0x06f9,
0x0966, 0x096f,
@@ -963,7 +549,7 @@ static const OnigCodePoint CRDigit[] = {
0x0a66, 0x0a6f,
0x0ae6, 0x0aef,
0x0b66, 0x0b6f,
- 0x0be7, 0x0bef,
+ 0x0be6, 0x0bef,
0x0c66, 0x0c6f,
0x0ce6, 0x0cef,
0x0d66, 0x0d6f,
@@ -971,28 +557,21 @@ static const OnigCodePoint CRDigit[] = {
0x0ed0, 0x0ed9,
0x0f20, 0x0f29,
0x1040, 0x1049,
- 0x1369, 0x1371,
0x17e0, 0x17e9,
0x1810, 0x1819,
0x1946, 0x194f,
+ 0x19d0, 0x19d9,
0xff10, 0xff19,
0x104a0, 0x104a9,
0x1d7ce, 0x1d7ff
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRDigit */
+}; /* CR_Digit */
-static const OnigCodePoint CRGraph[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 405,
-#else
- 2,
-#endif
+/* 'Graph': [[:Graph:]] */
+static const OnigCodePoint CR_Graph[] = {
+ 424,
0x0021, 0x007e,
- 0x00a1, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x0357,
- 0x035d, 0x036f,
+ 0x00a1, 0x0241,
+ 0x0250, 0x036f,
0x0374, 0x0375,
0x037a, 0x037a,
0x037e, 0x037e,
@@ -1000,35 +579,33 @@ static const OnigCodePoint CRGraph[] = {
0x038c, 0x038c,
0x038e, 0x03a1,
0x03a3, 0x03ce,
- 0x03d0, 0x03fb,
- 0x0400, 0x0486,
+ 0x03d0, 0x0486,
0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
+ 0x04d0, 0x04f9,
0x0500, 0x050f,
0x0531, 0x0556,
0x0559, 0x055f,
0x0561, 0x0587,
0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05c7,
0x05d0, 0x05ea,
0x05f0, 0x05f4,
0x0600, 0x0603,
- 0x060c, 0x0615,
+ 0x060b, 0x0615,
0x061b, 0x061b,
- 0x061f, 0x061f,
+ 0x061e, 0x061f,
0x0621, 0x063a,
- 0x0640, 0x0658,
+ 0x0640, 0x065e,
0x0660, 0x070d,
0x070f, 0x074a,
- 0x074d, 0x074f,
+ 0x074d, 0x076d,
0x0780, 0x07b1,
0x0901, 0x0939,
0x093c, 0x094d,
0x0950, 0x0954,
0x0958, 0x0970,
+ 0x097d, 0x097d,
0x0981, 0x0983,
0x0985, 0x098c,
0x098f, 0x0990,
@@ -1038,7 +615,7 @@ static const OnigCodePoint CRGraph[] = {
0x09b6, 0x09b9,
0x09bc, 0x09c4,
0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
+ 0x09cb, 0x09ce,
0x09d7, 0x09d7,
0x09dc, 0x09dd,
0x09df, 0x09e3,
@@ -1095,13 +672,12 @@ static const OnigCodePoint CRGraph[] = {
0x0b9e, 0x0b9f,
0x0ba3, 0x0ba4,
0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
+ 0x0bae, 0x0bb9,
0x0bbe, 0x0bc2,
0x0bc6, 0x0bc8,
0x0bca, 0x0bcd,
0x0bd7, 0x0bd7,
- 0x0be7, 0x0bfa,
+ 0x0be6, 0x0bfa,
0x0c01, 0x0c03,
0x0c05, 0x0c0c,
0x0c0e, 0x0c10,
@@ -1175,7 +751,7 @@ static const OnigCodePoint CRGraph[] = {
0x0f90, 0x0f97,
0x0f99, 0x0fbc,
0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
+ 0x0fcf, 0x0fd1,
0x1000, 0x1021,
0x1023, 0x1027,
0x1029, 0x102a,
@@ -1183,37 +759,28 @@ static const OnigCodePoint CRGraph[] = {
0x1036, 0x1039,
0x1040, 0x1059,
0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x10fb, 0x10fb,
+ 0x10d0, 0x10fc,
0x1100, 0x1159,
0x115f, 0x11a2,
0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
+ 0x1200, 0x1248,
0x124a, 0x124d,
0x1250, 0x1256,
0x1258, 0x1258,
0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
+ 0x1260, 0x1288,
0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
+ 0x1290, 0x12b0,
0x12b2, 0x12b5,
0x12b8, 0x12be,
0x12c0, 0x12c0,
0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
0x13a0, 0x13f4,
0x1401, 0x1676,
0x1681, 0x169c,
@@ -1238,8 +805,12 @@ static const OnigCodePoint CRGraph[] = {
0x1940, 0x1940,
0x1944, 0x196d,
0x1970, 0x1974,
- 0x19e0, 0x19ff,
- 0x1d00, 0x1d6b,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+ 0x1d00, 0x1dc3,
0x1e00, 0x1e9b,
0x1ea0, 0x1ef9,
0x1f00, 0x1f15,
@@ -1260,23 +831,20 @@ static const OnigCodePoint CRGraph[] = {
0x1ff6, 0x1ffe,
0x200b, 0x2027,
0x202a, 0x202e,
- 0x2030, 0x2054,
- 0x2057, 0x2057,
+ 0x2030, 0x205e,
0x2060, 0x2063,
0x206a, 0x2071,
0x2074, 0x208e,
- 0x20a0, 0x20b1,
- 0x20d0, 0x20ea,
- 0x2100, 0x213b,
- 0x213d, 0x214b,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b5,
+ 0x20d0, 0x20eb,
+ 0x2100, 0x214c,
0x2153, 0x2183,
- 0x2190, 0x23d0,
+ 0x2190, 0x23db,
0x2400, 0x2426,
0x2440, 0x244a,
- 0x2460, 0x2617,
- 0x2619, 0x267d,
- 0x2680, 0x2691,
- 0x26a0, 0x26a1,
+ 0x2460, 0x269c,
+ 0x26a0, 0x26b1,
0x2701, 0x2704,
0x2706, 0x2709,
0x270c, 0x2727,
@@ -1288,8 +856,26 @@ static const OnigCodePoint CRGraph[] = {
0x2761, 0x2794,
0x2798, 0x27af,
0x27b1, 0x27be,
+ 0x27c0, 0x27c6,
0x27d0, 0x27eb,
- 0x27f0, 0x2b0d,
+ 0x27f0, 0x2b13,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
0x2e80, 0x2e99,
0x2e9b, 0x2ef3,
0x2f00, 0x2fd5,
@@ -1300,17 +886,20 @@ static const OnigCodePoint CRGraph[] = {
0x3105, 0x312c,
0x3131, 0x318e,
0x3190, 0x31b7,
+ 0x31c0, 0x31cf,
0x31f0, 0x321e,
0x3220, 0x3243,
- 0x3250, 0x327d,
- 0x327f, 0x32fe,
+ 0x3250, 0x32fe,
0x3300, 0x4db5,
- 0x4dc0, 0x9fa5,
+ 0x4dc0, 0x9fbb,
0xa000, 0xa48c,
0xa490, 0xa4c6,
+ 0xa700, 0xa716,
+ 0xa800, 0xa82b,
0xac00, 0xd7a3,
0xe000, 0xfa2d,
0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
0xfb00, 0xfb06,
0xfb13, 0xfb17,
0xfb1d, 0xfb36,
@@ -1323,7 +912,7 @@ static const OnigCodePoint CRGraph[] = {
0xfd50, 0xfd8f,
0xfd92, 0xfdc7,
0xfdf0, 0xfdfd,
- 0xfe00, 0xfe0f,
+ 0xfe00, 0xfe19,
0xfe20, 0xfe23,
0xfe30, 0xfe52,
0xfe54, 0xfe66,
@@ -1348,12 +937,13 @@ static const OnigCodePoint CRGraph[] = {
0x10080, 0x100fa,
0x10100, 0x10102,
0x10107, 0x10133,
- 0x10137, 0x1013f,
+ 0x10137, 0x1018a,
0x10300, 0x1031e,
0x10320, 0x10323,
0x10330, 0x1034a,
0x10380, 0x1039d,
- 0x1039f, 0x1039f,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
0x10400, 0x1049d,
0x104a0, 0x104a9,
0x10800, 0x10805,
@@ -1362,9 +952,18 @@ static const OnigCodePoint CRGraph[] = {
0x10837, 0x10838,
0x1083c, 0x1083c,
0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
0x1d000, 0x1d0f5,
0x1d100, 0x1d126,
0x1d12a, 0x1d1dd,
+ 0x1d200, 0x1d245,
0x1d300, 0x1d356,
0x1d400, 0x1d454,
0x1d456, 0x1d49c,
@@ -1384,7 +983,7 @@ static const OnigCodePoint CRGraph[] = {
0x1d540, 0x1d544,
0x1d546, 0x1d546,
0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
+ 0x1d552, 0x1d6a5,
0x1d6a8, 0x1d7c9,
0x1d7ce, 0x1d7ff,
0x20000, 0x2a6d6,
@@ -1394,23 +993,17 @@ static const OnigCodePoint CRGraph[] = {
0xe0100, 0xe01ef,
0xf0000, 0xffffd,
0x100000, 0x10fffd
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRGraph */
+}; /* CR_Graph */
-static const OnigCodePoint CRLower[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 424,
-#else
- 6,
-#endif
+/* 'Lower': [[:Lower:]] */
+static const OnigCodePoint CR_Lower[] = {
+ 480,
0x0061, 0x007a,
0x00aa, 0x00aa,
0x00b5, 0x00b5,
0x00ba, 0x00ba,
0x00df, 0x00f6,
- 0x00f8, 0x00ff
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00f8, 0x00ff,
0x0101, 0x0101,
0x0103, 0x0103,
0x0105, 0x0105,
@@ -1543,7 +1136,9 @@ static const OnigCodePoint CRLower[] = {
0x022d, 0x022d,
0x022f, 0x022f,
0x0231, 0x0231,
- 0x0233, 0x0236,
+ 0x0233, 0x0239,
+ 0x023c, 0x023c,
+ 0x023f, 0x0240,
0x0250, 0x02af,
0x0390, 0x0390,
0x03ac, 0x03ce,
@@ -1563,7 +1158,7 @@ static const OnigCodePoint CRLower[] = {
0x03ef, 0x03f3,
0x03f5, 0x03f5,
0x03f8, 0x03f8,
- 0x03fb, 0x03fb,
+ 0x03fb, 0x03fc,
0x0430, 0x045f,
0x0461, 0x0461,
0x0463, 0x0463,
@@ -1635,6 +1230,7 @@ static const OnigCodePoint CRLower[] = {
0x04f1, 0x04f1,
0x04f3, 0x04f3,
0x04f5, 0x04f5,
+ 0x04f7, 0x04f7,
0x04f9, 0x04f9,
0x0501, 0x0501,
0x0503, 0x0503,
@@ -1646,7 +1242,8 @@ static const OnigCodePoint CRLower[] = {
0x050f, 0x050f,
0x0561, 0x0587,
0x1d00, 0x1d2b,
- 0x1d62, 0x1d6b,
+ 0x1d62, 0x1d77,
+ 0x1d79, 0x1d9a,
0x1e01, 0x1e01,
0x1e03, 0x1e03,
0x1e05, 0x1e05,
@@ -1796,8 +1393,60 @@ static const OnigCodePoint CRLower[] = {
0x212f, 0x212f,
0x2134, 0x2134,
0x2139, 0x2139,
- 0x213d, 0x213d,
+ 0x213c, 0x213d,
0x2146, 0x2149,
+ 0x2c30, 0x2c5e,
+ 0x2c81, 0x2c81,
+ 0x2c83, 0x2c83,
+ 0x2c85, 0x2c85,
+ 0x2c87, 0x2c87,
+ 0x2c89, 0x2c89,
+ 0x2c8b, 0x2c8b,
+ 0x2c8d, 0x2c8d,
+ 0x2c8f, 0x2c8f,
+ 0x2c91, 0x2c91,
+ 0x2c93, 0x2c93,
+ 0x2c95, 0x2c95,
+ 0x2c97, 0x2c97,
+ 0x2c99, 0x2c99,
+ 0x2c9b, 0x2c9b,
+ 0x2c9d, 0x2c9d,
+ 0x2c9f, 0x2c9f,
+ 0x2ca1, 0x2ca1,
+ 0x2ca3, 0x2ca3,
+ 0x2ca5, 0x2ca5,
+ 0x2ca7, 0x2ca7,
+ 0x2ca9, 0x2ca9,
+ 0x2cab, 0x2cab,
+ 0x2cad, 0x2cad,
+ 0x2caf, 0x2caf,
+ 0x2cb1, 0x2cb1,
+ 0x2cb3, 0x2cb3,
+ 0x2cb5, 0x2cb5,
+ 0x2cb7, 0x2cb7,
+ 0x2cb9, 0x2cb9,
+ 0x2cbb, 0x2cbb,
+ 0x2cbd, 0x2cbd,
+ 0x2cbf, 0x2cbf,
+ 0x2cc1, 0x2cc1,
+ 0x2cc3, 0x2cc3,
+ 0x2cc5, 0x2cc5,
+ 0x2cc7, 0x2cc7,
+ 0x2cc9, 0x2cc9,
+ 0x2ccb, 0x2ccb,
+ 0x2ccd, 0x2ccd,
+ 0x2ccf, 0x2ccf,
+ 0x2cd1, 0x2cd1,
+ 0x2cd3, 0x2cd3,
+ 0x2cd5, 0x2cd5,
+ 0x2cd7, 0x2cd7,
+ 0x2cd9, 0x2cd9,
+ 0x2cdb, 0x2cdb,
+ 0x2cdd, 0x2cdd,
+ 0x2cdf, 0x2cdf,
+ 0x2ce1, 0x2ce1,
+ 0x2ce3, 0x2ce4,
+ 0x2d00, 0x2d25,
0xfb00, 0xfb06,
0xfb13, 0xfb17,
0xff41, 0xff5a,
@@ -1818,7 +1467,7 @@ static const OnigCodePoint CRLower[] = {
0x1d5ee, 0x1d607,
0x1d622, 0x1d63b,
0x1d656, 0x1d66f,
- 0x1d68a, 0x1d6a3,
+ 0x1d68a, 0x1d6a5,
0x1d6c2, 0x1d6da,
0x1d6dc, 0x1d6e1,
0x1d6fc, 0x1d714,
@@ -1829,23 +1478,16 @@ static const OnigCodePoint CRLower[] = {
0x1d78a, 0x1d78f,
0x1d7aa, 0x1d7c2,
0x1d7c4, 0x1d7c9
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRLower */
+}; /* CR_Lower */
-static const OnigCodePoint CRPrint[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 405,
-#else
- 4,
-#endif
+/* 'Print': [[:Print:]] */
+static const OnigCodePoint CR_Print[] = {
+ 423,
0x0009, 0x000d,
0x0020, 0x007e,
0x0085, 0x0085,
- 0x00a0, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x0357,
- 0x035d, 0x036f,
+ 0x00a0, 0x0241,
+ 0x0250, 0x036f,
0x0374, 0x0375,
0x037a, 0x037a,
0x037e, 0x037e,
@@ -1853,35 +1495,33 @@ static const OnigCodePoint CRPrint[] = {
0x038c, 0x038c,
0x038e, 0x03a1,
0x03a3, 0x03ce,
- 0x03d0, 0x03fb,
- 0x0400, 0x0486,
+ 0x03d0, 0x0486,
0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
+ 0x04d0, 0x04f9,
0x0500, 0x050f,
0x0531, 0x0556,
0x0559, 0x055f,
0x0561, 0x0587,
0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05c7,
0x05d0, 0x05ea,
0x05f0, 0x05f4,
0x0600, 0x0603,
- 0x060c, 0x0615,
+ 0x060b, 0x0615,
0x061b, 0x061b,
- 0x061f, 0x061f,
+ 0x061e, 0x061f,
0x0621, 0x063a,
- 0x0640, 0x0658,
+ 0x0640, 0x065e,
0x0660, 0x070d,
0x070f, 0x074a,
- 0x074d, 0x074f,
+ 0x074d, 0x076d,
0x0780, 0x07b1,
0x0901, 0x0939,
0x093c, 0x094d,
0x0950, 0x0954,
0x0958, 0x0970,
+ 0x097d, 0x097d,
0x0981, 0x0983,
0x0985, 0x098c,
0x098f, 0x0990,
@@ -1891,7 +1531,7 @@ static const OnigCodePoint CRPrint[] = {
0x09b6, 0x09b9,
0x09bc, 0x09c4,
0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
+ 0x09cb, 0x09ce,
0x09d7, 0x09d7,
0x09dc, 0x09dd,
0x09df, 0x09e3,
@@ -1948,13 +1588,12 @@ static const OnigCodePoint CRPrint[] = {
0x0b9e, 0x0b9f,
0x0ba3, 0x0ba4,
0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
+ 0x0bae, 0x0bb9,
0x0bbe, 0x0bc2,
0x0bc6, 0x0bc8,
0x0bca, 0x0bcd,
0x0bd7, 0x0bd7,
- 0x0be7, 0x0bfa,
+ 0x0be6, 0x0bfa,
0x0c01, 0x0c03,
0x0c05, 0x0c0c,
0x0c0e, 0x0c10,
@@ -2028,7 +1667,7 @@ static const OnigCodePoint CRPrint[] = {
0x0f90, 0x0f97,
0x0f99, 0x0fbc,
0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
+ 0x0fcf, 0x0fd1,
0x1000, 0x1021,
0x1023, 0x1027,
0x1029, 0x102a,
@@ -2036,37 +1675,28 @@ static const OnigCodePoint CRPrint[] = {
0x1036, 0x1039,
0x1040, 0x1059,
0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x10fb, 0x10fb,
+ 0x10d0, 0x10fc,
0x1100, 0x1159,
0x115f, 0x11a2,
0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
+ 0x1200, 0x1248,
0x124a, 0x124d,
0x1250, 0x1256,
0x1258, 0x1258,
0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
+ 0x1260, 0x1288,
0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
+ 0x1290, 0x12b0,
0x12b2, 0x12b5,
0x12b8, 0x12be,
0x12c0, 0x12c0,
0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
0x13a0, 0x13f4,
0x1401, 0x1676,
0x1680, 0x169c,
@@ -2091,8 +1721,12 @@ static const OnigCodePoint CRPrint[] = {
0x1940, 0x1940,
0x1944, 0x196d,
0x1970, 0x1974,
- 0x19e0, 0x19ff,
- 0x1d00, 0x1d6b,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+ 0x1d00, 0x1dc3,
0x1e00, 0x1e9b,
0x1ea0, 0x1ef9,
0x1f00, 0x1f15,
@@ -2111,23 +1745,19 @@ static const OnigCodePoint CRPrint[] = {
0x1fdd, 0x1fef,
0x1ff2, 0x1ff4,
0x1ff6, 0x1ffe,
- 0x2000, 0x2054,
- 0x2057, 0x2057,
- 0x205f, 0x2063,
+ 0x2000, 0x2063,
0x206a, 0x2071,
0x2074, 0x208e,
- 0x20a0, 0x20b1,
- 0x20d0, 0x20ea,
- 0x2100, 0x213b,
- 0x213d, 0x214b,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b5,
+ 0x20d0, 0x20eb,
+ 0x2100, 0x214c,
0x2153, 0x2183,
- 0x2190, 0x23d0,
+ 0x2190, 0x23db,
0x2400, 0x2426,
0x2440, 0x244a,
- 0x2460, 0x2617,
- 0x2619, 0x267d,
- 0x2680, 0x2691,
- 0x26a0, 0x26a1,
+ 0x2460, 0x269c,
+ 0x26a0, 0x26b1,
0x2701, 0x2704,
0x2706, 0x2709,
0x270c, 0x2727,
@@ -2139,8 +1769,26 @@ static const OnigCodePoint CRPrint[] = {
0x2761, 0x2794,
0x2798, 0x27af,
0x27b1, 0x27be,
+ 0x27c0, 0x27c6,
0x27d0, 0x27eb,
- 0x27f0, 0x2b0d,
+ 0x27f0, 0x2b13,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
0x2e80, 0x2e99,
0x2e9b, 0x2ef3,
0x2f00, 0x2fd5,
@@ -2151,17 +1799,20 @@ static const OnigCodePoint CRPrint[] = {
0x3105, 0x312c,
0x3131, 0x318e,
0x3190, 0x31b7,
+ 0x31c0, 0x31cf,
0x31f0, 0x321e,
0x3220, 0x3243,
- 0x3250, 0x327d,
- 0x327f, 0x32fe,
+ 0x3250, 0x32fe,
0x3300, 0x4db5,
- 0x4dc0, 0x9fa5,
+ 0x4dc0, 0x9fbb,
0xa000, 0xa48c,
0xa490, 0xa4c6,
+ 0xa700, 0xa716,
+ 0xa800, 0xa82b,
0xac00, 0xd7a3,
0xe000, 0xfa2d,
0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
0xfb00, 0xfb06,
0xfb13, 0xfb17,
0xfb1d, 0xfb36,
@@ -2174,7 +1825,7 @@ static const OnigCodePoint CRPrint[] = {
0xfd50, 0xfd8f,
0xfd92, 0xfdc7,
0xfdf0, 0xfdfd,
- 0xfe00, 0xfe0f,
+ 0xfe00, 0xfe19,
0xfe20, 0xfe23,
0xfe30, 0xfe52,
0xfe54, 0xfe66,
@@ -2199,12 +1850,13 @@ static const OnigCodePoint CRPrint[] = {
0x10080, 0x100fa,
0x10100, 0x10102,
0x10107, 0x10133,
- 0x10137, 0x1013f,
+ 0x10137, 0x1018a,
0x10300, 0x1031e,
0x10320, 0x10323,
0x10330, 0x1034a,
0x10380, 0x1039d,
- 0x1039f, 0x1039f,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
0x10400, 0x1049d,
0x104a0, 0x104a9,
0x10800, 0x10805,
@@ -2213,9 +1865,18 @@ static const OnigCodePoint CRPrint[] = {
0x10837, 0x10838,
0x1083c, 0x1083c,
0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
0x1d000, 0x1d0f5,
0x1d100, 0x1d126,
0x1d12a, 0x1d1dd,
+ 0x1d200, 0x1d245,
0x1d300, 0x1d356,
0x1d400, 0x1d454,
0x1d456, 0x1d49c,
@@ -2235,7 +1896,7 @@ static const OnigCodePoint CRPrint[] = {
0x1d540, 0x1d544,
0x1d546, 0x1d546,
0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
+ 0x1d552, 0x1d6a5,
0x1d6a8, 0x1d7c9,
0x1d7ce, 0x1d7ff,
0x20000, 0x2a6d6,
@@ -2245,15 +1906,11 @@ static const OnigCodePoint CRPrint[] = {
0xe0100, 0xe01ef,
0xf0000, 0xffffd,
0x100000, 0x10fffd
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRPrint */
+}; /* CR_Print */
-static const OnigCodePoint CRPunct[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 86,
-#else
- 14,
-#endif
+/* 'Punct': [[:Punct:]] */
+static const OnigCodePoint CR_Punct[] = {
+ 96,
0x0021, 0x0023,
0x0025, 0x002a,
0x002c, 0x002f,
@@ -2267,9 +1924,7 @@ static const OnigCodePoint CRPunct[] = {
0x00ab, 0x00ab,
0x00b7, 0x00b7,
0x00bb, 0x00bb,
- 0x00bf, 0x00bf
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00bf, 0x00bf,
0x037e, 0x037e,
0x0387, 0x0387,
0x055a, 0x055f,
@@ -2277,10 +1932,11 @@ static const OnigCodePoint CRPunct[] = {
0x05be, 0x05be,
0x05c0, 0x05c0,
0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
0x05f3, 0x05f4,
0x060c, 0x060d,
0x061b, 0x061b,
- 0x061f, 0x061f,
+ 0x061e, 0x061f,
0x066a, 0x066d,
0x06d4, 0x06d4,
0x0700, 0x070d,
@@ -2292,6 +1948,7 @@ static const OnigCodePoint CRPunct[] = {
0x0f04, 0x0f12,
0x0f3a, 0x0f3d,
0x0f85, 0x0f85,
+ 0x0fd0, 0x0fd1,
0x104a, 0x104f,
0x10fb, 0x10fb,
0x1361, 0x1368,
@@ -2303,20 +1960,26 @@ static const OnigCodePoint CRPunct[] = {
0x17d8, 0x17da,
0x1800, 0x180a,
0x1944, 0x1945,
+ 0x19de, 0x19df,
+ 0x1a1e, 0x1a1f,
0x2010, 0x2027,
0x2030, 0x2043,
0x2045, 0x2051,
- 0x2053, 0x2054,
- 0x2057, 0x2057,
+ 0x2053, 0x205e,
0x207d, 0x207e,
0x208d, 0x208e,
0x2329, 0x232a,
0x23b4, 0x23b6,
0x2768, 0x2775,
+ 0x27c5, 0x27c6,
0x27e6, 0x27eb,
0x2983, 0x2998,
0x29d8, 0x29db,
0x29fc, 0x29fd,
+ 0x2cf9, 0x2cfc,
+ 0x2cfe, 0x2cff,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
0x3001, 0x3003,
0x3008, 0x3011,
0x3014, 0x301f,
@@ -2325,6 +1988,7 @@ static const OnigCodePoint CRPunct[] = {
0x30a0, 0x30a0,
0x30fb, 0x30fb,
0xfd3e, 0xfd3f,
+ 0xfe10, 0xfe19,
0xfe30, 0xfe52,
0xfe54, 0xfe61,
0xfe63, 0xfe63,
@@ -2341,22 +2005,17 @@ static const OnigCodePoint CRPunct[] = {
0xff5d, 0xff5d,
0xff5f, 0xff65,
0x10100, 0x10101,
- 0x1039f, 0x1039f
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRPunct */
+ 0x1039f, 0x1039f,
+ 0x10a50, 0x10a58
+}; /* CR_Punct */
-static const OnigCodePoint CRSpace[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
+/* 'Space': [[:Space:]] */
+static const OnigCodePoint CR_Space[] = {
11,
-#else
- 4,
-#endif
0x0009, 0x000d,
0x0020, 0x0020,
0x0085, 0x0085,
- 0x00a0, 0x00a0
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00a0, 0x00a0,
0x1680, 0x1680,
0x180e, 0x180e,
0x2000, 0x200a,
@@ -2364,20 +2023,14 @@ static const OnigCodePoint CRSpace[] = {
0x202f, 0x202f,
0x205f, 0x205f,
0x3000, 0x3000
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRSpace */
+}; /* CR_Space */
-static const OnigCodePoint CRUpper[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 421,
-#else
- 3,
-#endif
+/* 'Upper': [[:Upper:]] */
+static const OnigCodePoint CR_Upper[] = {
+ 476,
0x0041, 0x005a,
0x00c0, 0x00d6,
- 0x00d8, 0x00de
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
+ 0x00d8, 0x00de,
0x0100, 0x0100,
0x0102, 0x0102,
0x0104, 0x0104,
@@ -2511,6 +2164,9 @@ static const OnigCodePoint CRUpper[] = {
0x022e, 0x022e,
0x0230, 0x0230,
0x0232, 0x0232,
+ 0x023a, 0x023b,
+ 0x023d, 0x023e,
+ 0x0241, 0x0241,
0x0386, 0x0386,
0x0388, 0x038a,
0x038c, 0x038c,
@@ -2533,7 +2189,7 @@ static const OnigCodePoint CRUpper[] = {
0x03f4, 0x03f4,
0x03f7, 0x03f7,
0x03f9, 0x03fa,
- 0x0400, 0x042f,
+ 0x03fd, 0x042f,
0x0460, 0x0460,
0x0462, 0x0462,
0x0464, 0x0464,
@@ -2604,6 +2260,7 @@ static const OnigCodePoint CRUpper[] = {
0x04f0, 0x04f0,
0x04f2, 0x04f2,
0x04f4, 0x04f4,
+ 0x04f6, 0x04f6,
0x04f8, 0x04f8,
0x0500, 0x0500,
0x0502, 0x0502,
@@ -2764,6 +2421,57 @@ static const OnigCodePoint CRUpper[] = {
0x2133, 0x2133,
0x213e, 0x213f,
0x2145, 0x2145,
+ 0x2c00, 0x2c2e,
+ 0x2c80, 0x2c80,
+ 0x2c82, 0x2c82,
+ 0x2c84, 0x2c84,
+ 0x2c86, 0x2c86,
+ 0x2c88, 0x2c88,
+ 0x2c8a, 0x2c8a,
+ 0x2c8c, 0x2c8c,
+ 0x2c8e, 0x2c8e,
+ 0x2c90, 0x2c90,
+ 0x2c92, 0x2c92,
+ 0x2c94, 0x2c94,
+ 0x2c96, 0x2c96,
+ 0x2c98, 0x2c98,
+ 0x2c9a, 0x2c9a,
+ 0x2c9c, 0x2c9c,
+ 0x2c9e, 0x2c9e,
+ 0x2ca0, 0x2ca0,
+ 0x2ca2, 0x2ca2,
+ 0x2ca4, 0x2ca4,
+ 0x2ca6, 0x2ca6,
+ 0x2ca8, 0x2ca8,
+ 0x2caa, 0x2caa,
+ 0x2cac, 0x2cac,
+ 0x2cae, 0x2cae,
+ 0x2cb0, 0x2cb0,
+ 0x2cb2, 0x2cb2,
+ 0x2cb4, 0x2cb4,
+ 0x2cb6, 0x2cb6,
+ 0x2cb8, 0x2cb8,
+ 0x2cba, 0x2cba,
+ 0x2cbc, 0x2cbc,
+ 0x2cbe, 0x2cbe,
+ 0x2cc0, 0x2cc0,
+ 0x2cc2, 0x2cc2,
+ 0x2cc4, 0x2cc4,
+ 0x2cc6, 0x2cc6,
+ 0x2cc8, 0x2cc8,
+ 0x2cca, 0x2cca,
+ 0x2ccc, 0x2ccc,
+ 0x2cce, 0x2cce,
+ 0x2cd0, 0x2cd0,
+ 0x2cd2, 0x2cd2,
+ 0x2cd4, 0x2cd4,
+ 0x2cd6, 0x2cd6,
+ 0x2cd8, 0x2cd8,
+ 0x2cda, 0x2cda,
+ 0x2cdc, 0x2cdc,
+ 0x2cde, 0x2cde,
+ 0x2ce0, 0x2ce0,
+ 0x2ce2, 0x2ce2,
0xff21, 0xff3a,
0x10400, 0x10427,
0x1d400, 0x1d419,
@@ -2796,35 +2504,19 @@ static const OnigCodePoint CRUpper[] = {
0x1d71c, 0x1d734,
0x1d756, 0x1d76e,
0x1d790, 0x1d7a8
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRUpper */
+}; /* CR_Upper */
-static const OnigCodePoint CRXDigit[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 3,
-#else
+/* 'XDigit': [[:XDigit:]] */
+static const OnigCodePoint CR_XDigit[] = {
3,
-#endif
0x0030, 0x0039,
0x0041, 0x0046,
0x0061, 0x0066
-};
-
-static const OnigCodePoint CRASCII[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 1,
-#else
- 1,
-#endif
- 0x0000, 0x007f
-};
+}; /* CR_XDigit */
-static const OnigCodePoint CRWord[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 436,
-#else
- 12,
-#endif
+/* 'Word': [[:Word:]] */
+static const OnigCodePoint CR_Word[] = {
+ 464,
0x0030, 0x0039,
0x0041, 0x005a,
0x005f, 0x005f,
@@ -2836,16 +2528,12 @@ static const OnigCodePoint CRWord[] = {
0x00bc, 0x00be,
0x00c0, 0x00d6,
0x00d8, 0x00f6,
-#ifndef USE_UNICODE_FULL_RANGE_CTYPE
- 0x00f8, 0x7fffffff
-#else /* not USE_UNICODE_FULL_RANGE_CTYPE */
- 0x00f8, 0x0236,
+ 0x00f8, 0x0241,
0x0250, 0x02c1,
0x02c6, 0x02d1,
0x02e0, 0x02e4,
0x02ee, 0x02ee,
- 0x0300, 0x0357,
- 0x035d, 0x036f,
+ 0x0300, 0x036f,
0x037a, 0x037a,
0x0386, 0x0386,
0x0388, 0x038a,
@@ -2853,27 +2541,25 @@ static const OnigCodePoint CRWord[] = {
0x038e, 0x03a1,
0x03a3, 0x03ce,
0x03d0, 0x03f5,
- 0x03f7, 0x03fb,
- 0x0400, 0x0481,
+ 0x03f7, 0x0481,
0x0483, 0x0486,
0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
+ 0x04d0, 0x04f9,
0x0500, 0x050f,
0x0531, 0x0556,
0x0559, 0x0559,
0x0561, 0x0587,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
+ 0x0591, 0x05b9,
0x05bb, 0x05bd,
0x05bf, 0x05bf,
0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
0x05d0, 0x05ea,
0x05f0, 0x05f2,
0x0610, 0x0615,
0x0621, 0x063a,
- 0x0640, 0x0658,
+ 0x0640, 0x065e,
0x0660, 0x0669,
0x066e, 0x06d3,
0x06d5, 0x06dc,
@@ -2881,13 +2567,14 @@ static const OnigCodePoint CRWord[] = {
0x06ea, 0x06fc,
0x06ff, 0x06ff,
0x0710, 0x074a,
- 0x074d, 0x074f,
+ 0x074d, 0x076d,
0x0780, 0x07b1,
0x0901, 0x0939,
0x093c, 0x094d,
0x0950, 0x0954,
0x0958, 0x0963,
0x0966, 0x096f,
+ 0x097d, 0x097d,
0x0981, 0x0983,
0x0985, 0x098c,
0x098f, 0x0990,
@@ -2897,7 +2584,7 @@ static const OnigCodePoint CRWord[] = {
0x09b6, 0x09b9,
0x09bc, 0x09c4,
0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
+ 0x09cb, 0x09ce,
0x09d7, 0x09d7,
0x09dc, 0x09dd,
0x09df, 0x09e3,
@@ -2955,13 +2642,12 @@ static const OnigCodePoint CRWord[] = {
0x0b9e, 0x0b9f,
0x0ba3, 0x0ba4,
0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
+ 0x0bae, 0x0bb9,
0x0bbe, 0x0bc2,
0x0bc6, 0x0bc8,
0x0bca, 0x0bcd,
0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
+ 0x0be6, 0x0bf2,
0x0c01, 0x0c03,
0x0c05, 0x0c0c,
0x0c0e, 0x0c10,
@@ -3051,36 +2737,30 @@ static const OnigCodePoint CRWord[] = {
0x1040, 0x1049,
0x1050, 0x1059,
0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10fc,
0x1100, 0x1159,
0x115f, 0x11a2,
0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
+ 0x1200, 0x1248,
0x124a, 0x124d,
0x1250, 0x1256,
0x1258, 0x1258,
0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
+ 0x1260, 0x1288,
0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
+ 0x1290, 0x12b0,
0x12b2, 0x12b5,
0x12b8, 0x12be,
0x12c0, 0x12c0,
0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
+ 0x1318, 0x135a,
+ 0x135f, 0x135f,
0x1369, 0x137c,
+ 0x1380, 0x138f,
0x13a0, 0x13f4,
0x1401, 0x166c,
0x166f, 0x1676,
@@ -3109,7 +2789,11 @@ static const OnigCodePoint CRWord[] = {
0x1930, 0x193b,
0x1946, 0x196d,
0x1970, 0x1974,
- 0x1d00, 0x1d6b,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x1a00, 0x1a1b,
+ 0x1d00, 0x1dc3,
0x1e00, 0x1e9b,
0x1ea0, 0x1ef9,
0x1f00, 0x1f15,
@@ -3136,7 +2820,8 @@ static const OnigCodePoint CRWord[] = {
0x2070, 0x2071,
0x2074, 0x2079,
0x207f, 0x2089,
- 0x20d0, 0x20ea,
+ 0x2090, 0x2094,
+ 0x20d0, 0x20eb,
0x2102, 0x2102,
0x2107, 0x2107,
0x210a, 0x2113,
@@ -3148,12 +2833,28 @@ static const OnigCodePoint CRWord[] = {
0x212a, 0x212d,
0x212f, 0x2131,
0x2133, 0x2139,
- 0x213d, 0x213f,
+ 0x213c, 0x213f,
0x2145, 0x2149,
0x2153, 0x2183,
0x2460, 0x249b,
0x24ea, 0x24ff,
0x2776, 0x2793,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2ce4,
+ 0x2cfd, 0x2cfd,
+ 0x2d00, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
0x3005, 0x3007,
0x3021, 0x302f,
0x3031, 0x3035,
@@ -3161,7 +2862,8 @@ static const OnigCodePoint CRWord[] = {
0x3041, 0x3096,
0x3099, 0x309a,
0x309d, 0x309f,
- 0x30a1, 0x30ff,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
0x3105, 0x312c,
0x3131, 0x318e,
0x3192, 0x3195,
@@ -3172,11 +2874,13 @@ static const OnigCodePoint CRWord[] = {
0x3280, 0x3289,
0x32b1, 0x32bf,
0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
+ 0x4e00, 0x9fbb,
0xa000, 0xa48c,
+ 0xa800, 0xa827,
0xac00, 0xd7a3,
0xf900, 0xfa2d,
0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
0xfb00, 0xfb06,
0xfb13, 0xfb17,
0xfb1d, 0xfb28,
@@ -3200,7 +2904,7 @@ static const OnigCodePoint CRWord[] = {
0xff21, 0xff3a,
0xff3f, 0xff3f,
0xff41, 0xff5a,
- 0xff65, 0xffbe,
+ 0xff66, 0xffbe,
0xffc2, 0xffc7,
0xffca, 0xffcf,
0xffd2, 0xffd7,
@@ -3213,10 +2917,15 @@ static const OnigCodePoint CRWord[] = {
0x10050, 0x1005d,
0x10080, 0x100fa,
0x10107, 0x10133,
+ 0x10140, 0x10178,
+ 0x1018a, 0x1018a,
0x10300, 0x1031e,
0x10320, 0x10323,
0x10330, 0x1034a,
0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
0x10400, 0x1049d,
0x104a0, 0x104a9,
0x10800, 0x10805,
@@ -3225,11 +2934,19 @@ static const OnigCodePoint CRWord[] = {
0x10837, 0x10838,
0x1083c, 0x1083c,
0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
0x1d165, 0x1d169,
0x1d16d, 0x1d172,
0x1d17b, 0x1d182,
0x1d185, 0x1d18b,
0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
0x1d400, 0x1d454,
0x1d456, 0x1d49c,
0x1d49e, 0x1d49f,
@@ -3248,7 +2965,7 @@ static const OnigCodePoint CRWord[] = {
0x1d540, 0x1d544,
0x1d546, 0x1d546,
0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
+ 0x1d552, 0x1d6a5,
0x1d6a8, 0x1d6c0,
0x1d6c2, 0x1d6da,
0x1d6dc, 0x1d6fa,
@@ -3264,140 +2981,8376 @@ static const OnigCodePoint CRWord[] = {
0x20000, 0x2a6d6,
0x2f800, 0x2fa1d,
0xe0100, 0xe01ef
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of CRWord */
+}; /* CR_Word */
+
+/* 'Alnum': [[:Alnum:]] */
+static const OnigCodePoint CR_Alnum[] = {
+ 436,
+ 0x0030, 0x0039,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x0241,
+ 0x0250, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ee, 0x02ee,
+ 0x0300, 0x036f,
+ 0x037a, 0x037a,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x0483, 0x0486,
+ 0x0488, 0x04ce,
+ 0x04d0, 0x04f9,
+ 0x0500, 0x050f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0561, 0x0587,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f2,
+ 0x0610, 0x0615,
+ 0x0621, 0x063a,
+ 0x0640, 0x065e,
+ 0x0660, 0x0669,
+ 0x066e, 0x06d3,
+ 0x06d5, 0x06dc,
+ 0x06de, 0x06e8,
+ 0x06ea, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x074a,
+ 0x074d, 0x076d,
+ 0x0780, 0x07b1,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0963,
+ 0x0966, 0x096f,
+ 0x097d, 0x097d,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09f1,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b6f,
+ 0x0b71, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bef,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e4e,
+ 0x0e50, 0x0e59,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f00,
+ 0x0f18, 0x0f19,
+ 0x0f20, 0x0f29,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f84,
+ 0x0f86, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1049,
+ 0x1050, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10fc,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x135f,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x166c,
+ 0x166f, 0x1676,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1734,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17b3,
+ 0x17b6, 0x17d3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x180b, 0x180d,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1946, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x1a00, 0x1a1b,
+ 0x1d00, 0x1dc3,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x2094,
+ 0x20d0, 0x20eb,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2131,
+ 0x2133, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2ce4,
+ 0x2d00, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x3005, 0x3006,
+ 0x302a, 0x302f,
+ 0x3031, 0x3035,
+ 0x303b, 0x303c,
+ 0x3041, 0x3096,
+ 0x3099, 0x309a,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31b7,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fbb,
+ 0xa000, 0xa48c,
+ 0xa800, 0xa827,
+ 0xac00, 0xd7a3,
+ 0xf900, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe23,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff10, 0xff19,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10300, 0x1031e,
+ 0x10330, 0x10349,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x1d165, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0x20000, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0xe0100, 0xe01ef
+}; /* CR_Alnum */
+
+/* 'ASCII': [[:ASCII:]] */
+static const OnigCodePoint CR_ASCII[] = {
+ 1,
+ 0x0000, 0x007f
+}; /* CR_ASCII */
+
+#ifdef USE_UNICODE_PROPERTIES
+
+/* 'Any': - */
+static const OnigCodePoint CR_Any[] = {
+ 1,
+ 0x0000, 0x10ffff
+}; /* CR_Any */
+
+/* 'Assigned': - */
+static const OnigCodePoint CR_Assigned[] = {
+ 420,
+ 0x0000, 0x0241,
+ 0x0250, 0x036f,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x0486,
+ 0x0488, 0x04ce,
+ 0x04d0, 0x04f9,
+ 0x0500, 0x050f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x060b, 0x0615,
+ 0x061b, 0x061b,
+ 0x061e, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x065e,
+ 0x0660, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x076d,
+ 0x0780, 0x07b1,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x097d, 0x097d,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fd1,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10fc,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+ 0x1d00, 0x1dc3,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2063,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b5,
+ 0x20d0, 0x20eb,
+ 0x2100, 0x214c,
+ 0x2153, 0x2183,
+ 0x2190, 0x23db,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x269c,
+ 0x26a0, 0x26b1,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27c6,
+ 0x27d0, 0x27eb,
+ 0x27f0, 0x2b13,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31c0, 0x31cf,
+ 0x31f0, 0x321e,
+ 0x3220, 0x3243,
+ 0x3250, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fbb,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa700, 0xa716,
+ 0xa800, 0xa82b,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xfffd,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0x20000, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd
+}; /* CR_Assigned */
+
+/* 'C': Major Category */
+static const OnigCodePoint CR_C[] = {
+ 422,
+ 0x0000, 0x001f,
+ 0x007f, 0x009f,
+ 0x00ad, 0x00ad,
+ 0x0242, 0x024f,
+ 0x0370, 0x0373,
+ 0x0376, 0x0379,
+ 0x037b, 0x037d,
+ 0x037f, 0x0383,
+ 0x038b, 0x038b,
+ 0x038d, 0x038d,
+ 0x03a2, 0x03a2,
+ 0x03cf, 0x03cf,
+ 0x0487, 0x0487,
+ 0x04cf, 0x04cf,
+ 0x04fa, 0x04ff,
+ 0x0510, 0x0530,
+ 0x0557, 0x0558,
+ 0x0560, 0x0560,
+ 0x0588, 0x0588,
+ 0x058b, 0x0590,
+ 0x05ba, 0x05ba,
+ 0x05c8, 0x05cf,
+ 0x05eb, 0x05ef,
+ 0x05f5, 0x060a,
+ 0x0616, 0x061a,
+ 0x061c, 0x061d,
+ 0x0620, 0x0620,
+ 0x063b, 0x063f,
+ 0x065f, 0x065f,
+ 0x06dd, 0x06dd,
+ 0x070e, 0x070f,
+ 0x074b, 0x074c,
+ 0x076e, 0x077f,
+ 0x07b2, 0x0900,
+ 0x093a, 0x093b,
+ 0x094e, 0x094f,
+ 0x0955, 0x0957,
+ 0x0971, 0x097c,
+ 0x097e, 0x0980,
+ 0x0984, 0x0984,
+ 0x098d, 0x098e,
+ 0x0991, 0x0992,
+ 0x09a9, 0x09a9,
+ 0x09b1, 0x09b1,
+ 0x09b3, 0x09b5,
+ 0x09ba, 0x09bb,
+ 0x09c5, 0x09c6,
+ 0x09c9, 0x09ca,
+ 0x09cf, 0x09d6,
+ 0x09d8, 0x09db,
+ 0x09de, 0x09de,
+ 0x09e4, 0x09e5,
+ 0x09fb, 0x0a00,
+ 0x0a04, 0x0a04,
+ 0x0a0b, 0x0a0e,
+ 0x0a11, 0x0a12,
+ 0x0a29, 0x0a29,
+ 0x0a31, 0x0a31,
+ 0x0a34, 0x0a34,
+ 0x0a37, 0x0a37,
+ 0x0a3a, 0x0a3b,
+ 0x0a3d, 0x0a3d,
+ 0x0a43, 0x0a46,
+ 0x0a49, 0x0a4a,
+ 0x0a4e, 0x0a58,
+ 0x0a5d, 0x0a5d,
+ 0x0a5f, 0x0a65,
+ 0x0a75, 0x0a80,
+ 0x0a84, 0x0a84,
+ 0x0a8e, 0x0a8e,
+ 0x0a92, 0x0a92,
+ 0x0aa9, 0x0aa9,
+ 0x0ab1, 0x0ab1,
+ 0x0ab4, 0x0ab4,
+ 0x0aba, 0x0abb,
+ 0x0ac6, 0x0ac6,
+ 0x0aca, 0x0aca,
+ 0x0ace, 0x0acf,
+ 0x0ad1, 0x0adf,
+ 0x0ae4, 0x0ae5,
+ 0x0af0, 0x0af0,
+ 0x0af2, 0x0b00,
+ 0x0b04, 0x0b04,
+ 0x0b0d, 0x0b0e,
+ 0x0b11, 0x0b12,
+ 0x0b29, 0x0b29,
+ 0x0b31, 0x0b31,
+ 0x0b34, 0x0b34,
+ 0x0b3a, 0x0b3b,
+ 0x0b44, 0x0b46,
+ 0x0b49, 0x0b4a,
+ 0x0b4e, 0x0b55,
+ 0x0b58, 0x0b5b,
+ 0x0b5e, 0x0b5e,
+ 0x0b62, 0x0b65,
+ 0x0b72, 0x0b81,
+ 0x0b84, 0x0b84,
+ 0x0b8b, 0x0b8d,
+ 0x0b91, 0x0b91,
+ 0x0b96, 0x0b98,
+ 0x0b9b, 0x0b9b,
+ 0x0b9d, 0x0b9d,
+ 0x0ba0, 0x0ba2,
+ 0x0ba5, 0x0ba7,
+ 0x0bab, 0x0bad,
+ 0x0bba, 0x0bbd,
+ 0x0bc3, 0x0bc5,
+ 0x0bc9, 0x0bc9,
+ 0x0bce, 0x0bd6,
+ 0x0bd8, 0x0be5,
+ 0x0bfb, 0x0c00,
+ 0x0c04, 0x0c04,
+ 0x0c0d, 0x0c0d,
+ 0x0c11, 0x0c11,
+ 0x0c29, 0x0c29,
+ 0x0c34, 0x0c34,
+ 0x0c3a, 0x0c3d,
+ 0x0c45, 0x0c45,
+ 0x0c49, 0x0c49,
+ 0x0c4e, 0x0c54,
+ 0x0c57, 0x0c5f,
+ 0x0c62, 0x0c65,
+ 0x0c70, 0x0c81,
+ 0x0c84, 0x0c84,
+ 0x0c8d, 0x0c8d,
+ 0x0c91, 0x0c91,
+ 0x0ca9, 0x0ca9,
+ 0x0cb4, 0x0cb4,
+ 0x0cba, 0x0cbb,
+ 0x0cc5, 0x0cc5,
+ 0x0cc9, 0x0cc9,
+ 0x0cce, 0x0cd4,
+ 0x0cd7, 0x0cdd,
+ 0x0cdf, 0x0cdf,
+ 0x0ce2, 0x0ce5,
+ 0x0cf0, 0x0d01,
+ 0x0d04, 0x0d04,
+ 0x0d0d, 0x0d0d,
+ 0x0d11, 0x0d11,
+ 0x0d29, 0x0d29,
+ 0x0d3a, 0x0d3d,
+ 0x0d44, 0x0d45,
+ 0x0d49, 0x0d49,
+ 0x0d4e, 0x0d56,
+ 0x0d58, 0x0d5f,
+ 0x0d62, 0x0d65,
+ 0x0d70, 0x0d81,
+ 0x0d84, 0x0d84,
+ 0x0d97, 0x0d99,
+ 0x0db2, 0x0db2,
+ 0x0dbc, 0x0dbc,
+ 0x0dbe, 0x0dbf,
+ 0x0dc7, 0x0dc9,
+ 0x0dcb, 0x0dce,
+ 0x0dd5, 0x0dd5,
+ 0x0dd7, 0x0dd7,
+ 0x0de0, 0x0df1,
+ 0x0df5, 0x0e00,
+ 0x0e3b, 0x0e3e,
+ 0x0e5c, 0x0e80,
+ 0x0e83, 0x0e83,
+ 0x0e85, 0x0e86,
+ 0x0e89, 0x0e89,
+ 0x0e8b, 0x0e8c,
+ 0x0e8e, 0x0e93,
+ 0x0e98, 0x0e98,
+ 0x0ea0, 0x0ea0,
+ 0x0ea4, 0x0ea4,
+ 0x0ea6, 0x0ea6,
+ 0x0ea8, 0x0ea9,
+ 0x0eac, 0x0eac,
+ 0x0eba, 0x0eba,
+ 0x0ebe, 0x0ebf,
+ 0x0ec5, 0x0ec5,
+ 0x0ec7, 0x0ec7,
+ 0x0ece, 0x0ecf,
+ 0x0eda, 0x0edb,
+ 0x0ede, 0x0eff,
+ 0x0f48, 0x0f48,
+ 0x0f6b, 0x0f70,
+ 0x0f8c, 0x0f8f,
+ 0x0f98, 0x0f98,
+ 0x0fbd, 0x0fbd,
+ 0x0fcd, 0x0fce,
+ 0x0fd2, 0x0fff,
+ 0x1022, 0x1022,
+ 0x1028, 0x1028,
+ 0x102b, 0x102b,
+ 0x1033, 0x1035,
+ 0x103a, 0x103f,
+ 0x105a, 0x109f,
+ 0x10c6, 0x10cf,
+ 0x10fd, 0x10ff,
+ 0x115a, 0x115e,
+ 0x11a3, 0x11a7,
+ 0x11fa, 0x11ff,
+ 0x1249, 0x1249,
+ 0x124e, 0x124f,
+ 0x1257, 0x1257,
+ 0x1259, 0x1259,
+ 0x125e, 0x125f,
+ 0x1289, 0x1289,
+ 0x128e, 0x128f,
+ 0x12b1, 0x12b1,
+ 0x12b6, 0x12b7,
+ 0x12bf, 0x12bf,
+ 0x12c1, 0x12c1,
+ 0x12c6, 0x12c7,
+ 0x12d7, 0x12d7,
+ 0x1311, 0x1311,
+ 0x1316, 0x1317,
+ 0x135b, 0x135e,
+ 0x137d, 0x137f,
+ 0x139a, 0x139f,
+ 0x13f5, 0x1400,
+ 0x1677, 0x167f,
+ 0x169d, 0x169f,
+ 0x16f1, 0x16ff,
+ 0x170d, 0x170d,
+ 0x1715, 0x171f,
+ 0x1737, 0x173f,
+ 0x1754, 0x175f,
+ 0x176d, 0x176d,
+ 0x1771, 0x1771,
+ 0x1774, 0x177f,
+ 0x17b4, 0x17b5,
+ 0x17de, 0x17df,
+ 0x17ea, 0x17ef,
+ 0x17fa, 0x17ff,
+ 0x180f, 0x180f,
+ 0x181a, 0x181f,
+ 0x1878, 0x187f,
+ 0x18aa, 0x18ff,
+ 0x191d, 0x191f,
+ 0x192c, 0x192f,
+ 0x193c, 0x193f,
+ 0x1941, 0x1943,
+ 0x196e, 0x196f,
+ 0x1975, 0x197f,
+ 0x19aa, 0x19af,
+ 0x19ca, 0x19cf,
+ 0x19da, 0x19dd,
+ 0x1a1c, 0x1a1d,
+ 0x1a20, 0x1cff,
+ 0x1dc4, 0x1dff,
+ 0x1e9c, 0x1e9f,
+ 0x1efa, 0x1eff,
+ 0x1f16, 0x1f17,
+ 0x1f1e, 0x1f1f,
+ 0x1f46, 0x1f47,
+ 0x1f4e, 0x1f4f,
+ 0x1f58, 0x1f58,
+ 0x1f5a, 0x1f5a,
+ 0x1f5c, 0x1f5c,
+ 0x1f5e, 0x1f5e,
+ 0x1f7e, 0x1f7f,
+ 0x1fb5, 0x1fb5,
+ 0x1fc5, 0x1fc5,
+ 0x1fd4, 0x1fd5,
+ 0x1fdc, 0x1fdc,
+ 0x1ff0, 0x1ff1,
+ 0x1ff5, 0x1ff5,
+ 0x1fff, 0x1fff,
+ 0x200b, 0x200f,
+ 0x202a, 0x202e,
+ 0x2060, 0x206f,
+ 0x2072, 0x2073,
+ 0x208f, 0x208f,
+ 0x2095, 0x209f,
+ 0x20b6, 0x20cf,
+ 0x20ec, 0x20ff,
+ 0x214d, 0x2152,
+ 0x2184, 0x218f,
+ 0x23dc, 0x23ff,
+ 0x2427, 0x243f,
+ 0x244b, 0x245f,
+ 0x269d, 0x269f,
+ 0x26b2, 0x2700,
+ 0x2705, 0x2705,
+ 0x270a, 0x270b,
+ 0x2728, 0x2728,
+ 0x274c, 0x274c,
+ 0x274e, 0x274e,
+ 0x2753, 0x2755,
+ 0x2757, 0x2757,
+ 0x275f, 0x2760,
+ 0x2795, 0x2797,
+ 0x27b0, 0x27b0,
+ 0x27bf, 0x27bf,
+ 0x27c7, 0x27cf,
+ 0x27ec, 0x27ef,
+ 0x2b14, 0x2bff,
+ 0x2c2f, 0x2c2f,
+ 0x2c5f, 0x2c7f,
+ 0x2ceb, 0x2cf8,
+ 0x2d26, 0x2d2f,
+ 0x2d66, 0x2d6e,
+ 0x2d70, 0x2d7f,
+ 0x2d97, 0x2d9f,
+ 0x2da7, 0x2da7,
+ 0x2daf, 0x2daf,
+ 0x2db7, 0x2db7,
+ 0x2dbf, 0x2dbf,
+ 0x2dc7, 0x2dc7,
+ 0x2dcf, 0x2dcf,
+ 0x2dd7, 0x2dd7,
+ 0x2ddf, 0x2dff,
+ 0x2e18, 0x2e1b,
+ 0x2e1e, 0x2e7f,
+ 0x2e9a, 0x2e9a,
+ 0x2ef4, 0x2eff,
+ 0x2fd6, 0x2fef,
+ 0x2ffc, 0x2fff,
+ 0x3040, 0x3040,
+ 0x3097, 0x3098,
+ 0x3100, 0x3104,
+ 0x312d, 0x3130,
+ 0x318f, 0x318f,
+ 0x31b8, 0x31bf,
+ 0x31d0, 0x31ef,
+ 0x321f, 0x321f,
+ 0x3244, 0x324f,
+ 0x32ff, 0x32ff,
+ 0x4db6, 0x4dbf,
+ 0x9fbc, 0x9fff,
+ 0xa48d, 0xa48f,
+ 0xa4c7, 0xa6ff,
+ 0xa717, 0xa7ff,
+ 0xa82c, 0xabff,
+ 0xd7a4, 0xf8ff,
+ 0xfa2e, 0xfa2f,
+ 0xfa6b, 0xfa6f,
+ 0xfada, 0xfaff,
+ 0xfb07, 0xfb12,
+ 0xfb18, 0xfb1c,
+ 0xfb37, 0xfb37,
+ 0xfb3d, 0xfb3d,
+ 0xfb3f, 0xfb3f,
+ 0xfb42, 0xfb42,
+ 0xfb45, 0xfb45,
+ 0xfbb2, 0xfbd2,
+ 0xfd40, 0xfd4f,
+ 0xfd90, 0xfd91,
+ 0xfdc8, 0xfdef,
+ 0xfdfe, 0xfdff,
+ 0xfe1a, 0xfe1f,
+ 0xfe24, 0xfe2f,
+ 0xfe53, 0xfe53,
+ 0xfe67, 0xfe67,
+ 0xfe6c, 0xfe6f,
+ 0xfe75, 0xfe75,
+ 0xfefd, 0xff00,
+ 0xffbf, 0xffc1,
+ 0xffc8, 0xffc9,
+ 0xffd0, 0xffd1,
+ 0xffd8, 0xffd9,
+ 0xffdd, 0xffdf,
+ 0xffe7, 0xffe7,
+ 0xffef, 0xfffb,
+ 0xfffe, 0xffff,
+ 0x1000c, 0x1000c,
+ 0x10027, 0x10027,
+ 0x1003b, 0x1003b,
+ 0x1003e, 0x1003e,
+ 0x1004e, 0x1004f,
+ 0x1005e, 0x1007f,
+ 0x100fb, 0x100ff,
+ 0x10103, 0x10106,
+ 0x10134, 0x10136,
+ 0x1018b, 0x102ff,
+ 0x1031f, 0x1031f,
+ 0x10324, 0x1032f,
+ 0x1034b, 0x1037f,
+ 0x1039e, 0x1039e,
+ 0x103c4, 0x103c7,
+ 0x103d6, 0x103ff,
+ 0x1049e, 0x1049f,
+ 0x104aa, 0x107ff,
+ 0x10806, 0x10807,
+ 0x10809, 0x10809,
+ 0x10836, 0x10836,
+ 0x10839, 0x1083b,
+ 0x1083d, 0x1083e,
+ 0x10840, 0x109ff,
+ 0x10a04, 0x10a04,
+ 0x10a07, 0x10a0b,
+ 0x10a14, 0x10a14,
+ 0x10a18, 0x10a18,
+ 0x10a34, 0x10a37,
+ 0x10a3b, 0x10a3e,
+ 0x10a48, 0x10a4f,
+ 0x10a59, 0x1cfff,
+ 0x1d0f6, 0x1d0ff,
+ 0x1d127, 0x1d129,
+ 0x1d173, 0x1d17a,
+ 0x1d1de, 0x1d1ff,
+ 0x1d246, 0x1d2ff,
+ 0x1d357, 0x1d3ff,
+ 0x1d455, 0x1d455,
+ 0x1d49d, 0x1d49d,
+ 0x1d4a0, 0x1d4a1,
+ 0x1d4a3, 0x1d4a4,
+ 0x1d4a7, 0x1d4a8,
+ 0x1d4ad, 0x1d4ad,
+ 0x1d4ba, 0x1d4ba,
+ 0x1d4bc, 0x1d4bc,
+ 0x1d4c4, 0x1d4c4,
+ 0x1d506, 0x1d506,
+ 0x1d50b, 0x1d50c,
+ 0x1d515, 0x1d515,
+ 0x1d51d, 0x1d51d,
+ 0x1d53a, 0x1d53a,
+ 0x1d53f, 0x1d53f,
+ 0x1d545, 0x1d545,
+ 0x1d547, 0x1d549,
+ 0x1d551, 0x1d551,
+ 0x1d6a6, 0x1d6a7,
+ 0x1d7ca, 0x1d7cd,
+ 0x1d800, 0x1ffff,
+ 0x2a6d7, 0x2f7ff,
+ 0x2fa1e, 0xe00ff,
+ 0xe01f0, 0x10ffff
+}; /* CR_C */
+
+/* 'Cc': General Category */
+static const OnigCodePoint CR_Cc[] = {
+ 2,
+ 0x0000, 0x001f,
+ 0x007f, 0x009f
+}; /* CR_Cc */
+
+/* 'Cf': General Category */
+static const OnigCodePoint CR_Cf[] = {
+ 14,
+ 0x00ad, 0x00ad,
+ 0x0600, 0x0603,
+ 0x06dd, 0x06dd,
+ 0x070f, 0x070f,
+ 0x17b4, 0x17b5,
+ 0x200b, 0x200f,
+ 0x202a, 0x202e,
+ 0x2060, 0x2063,
+ 0x206a, 0x206f,
+ 0xfeff, 0xfeff,
+ 0xfff9, 0xfffb,
+ 0x1d173, 0x1d17a,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f
+}; /* CR_Cf */
+
+/* 'Cn': General Category */
+static const OnigCodePoint CR_Cn[] = {
+ 420,
+ 0x0242, 0x024f,
+ 0x0370, 0x0373,
+ 0x0376, 0x0379,
+ 0x037b, 0x037d,
+ 0x037f, 0x0383,
+ 0x038b, 0x038b,
+ 0x038d, 0x038d,
+ 0x03a2, 0x03a2,
+ 0x03cf, 0x03cf,
+ 0x0487, 0x0487,
+ 0x04cf, 0x04cf,
+ 0x04fa, 0x04ff,
+ 0x0510, 0x0530,
+ 0x0557, 0x0558,
+ 0x0560, 0x0560,
+ 0x0588, 0x0588,
+ 0x058b, 0x0590,
+ 0x05ba, 0x05ba,
+ 0x05c8, 0x05cf,
+ 0x05eb, 0x05ef,
+ 0x05f5, 0x05ff,
+ 0x0604, 0x060a,
+ 0x0616, 0x061a,
+ 0x061c, 0x061d,
+ 0x0620, 0x0620,
+ 0x063b, 0x063f,
+ 0x065f, 0x065f,
+ 0x070e, 0x070e,
+ 0x074b, 0x074c,
+ 0x076e, 0x077f,
+ 0x07b2, 0x0900,
+ 0x093a, 0x093b,
+ 0x094e, 0x094f,
+ 0x0955, 0x0957,
+ 0x0971, 0x097c,
+ 0x097e, 0x0980,
+ 0x0984, 0x0984,
+ 0x098d, 0x098e,
+ 0x0991, 0x0992,
+ 0x09a9, 0x09a9,
+ 0x09b1, 0x09b1,
+ 0x09b3, 0x09b5,
+ 0x09ba, 0x09bb,
+ 0x09c5, 0x09c6,
+ 0x09c9, 0x09ca,
+ 0x09cf, 0x09d6,
+ 0x09d8, 0x09db,
+ 0x09de, 0x09de,
+ 0x09e4, 0x09e5,
+ 0x09fb, 0x0a00,
+ 0x0a04, 0x0a04,
+ 0x0a0b, 0x0a0e,
+ 0x0a11, 0x0a12,
+ 0x0a29, 0x0a29,
+ 0x0a31, 0x0a31,
+ 0x0a34, 0x0a34,
+ 0x0a37, 0x0a37,
+ 0x0a3a, 0x0a3b,
+ 0x0a3d, 0x0a3d,
+ 0x0a43, 0x0a46,
+ 0x0a49, 0x0a4a,
+ 0x0a4e, 0x0a58,
+ 0x0a5d, 0x0a5d,
+ 0x0a5f, 0x0a65,
+ 0x0a75, 0x0a80,
+ 0x0a84, 0x0a84,
+ 0x0a8e, 0x0a8e,
+ 0x0a92, 0x0a92,
+ 0x0aa9, 0x0aa9,
+ 0x0ab1, 0x0ab1,
+ 0x0ab4, 0x0ab4,
+ 0x0aba, 0x0abb,
+ 0x0ac6, 0x0ac6,
+ 0x0aca, 0x0aca,
+ 0x0ace, 0x0acf,
+ 0x0ad1, 0x0adf,
+ 0x0ae4, 0x0ae5,
+ 0x0af0, 0x0af0,
+ 0x0af2, 0x0b00,
+ 0x0b04, 0x0b04,
+ 0x0b0d, 0x0b0e,
+ 0x0b11, 0x0b12,
+ 0x0b29, 0x0b29,
+ 0x0b31, 0x0b31,
+ 0x0b34, 0x0b34,
+ 0x0b3a, 0x0b3b,
+ 0x0b44, 0x0b46,
+ 0x0b49, 0x0b4a,
+ 0x0b4e, 0x0b55,
+ 0x0b58, 0x0b5b,
+ 0x0b5e, 0x0b5e,
+ 0x0b62, 0x0b65,
+ 0x0b72, 0x0b81,
+ 0x0b84, 0x0b84,
+ 0x0b8b, 0x0b8d,
+ 0x0b91, 0x0b91,
+ 0x0b96, 0x0b98,
+ 0x0b9b, 0x0b9b,
+ 0x0b9d, 0x0b9d,
+ 0x0ba0, 0x0ba2,
+ 0x0ba5, 0x0ba7,
+ 0x0bab, 0x0bad,
+ 0x0bba, 0x0bbd,
+ 0x0bc3, 0x0bc5,
+ 0x0bc9, 0x0bc9,
+ 0x0bce, 0x0bd6,
+ 0x0bd8, 0x0be5,
+ 0x0bfb, 0x0c00,
+ 0x0c04, 0x0c04,
+ 0x0c0d, 0x0c0d,
+ 0x0c11, 0x0c11,
+ 0x0c29, 0x0c29,
+ 0x0c34, 0x0c34,
+ 0x0c3a, 0x0c3d,
+ 0x0c45, 0x0c45,
+ 0x0c49, 0x0c49,
+ 0x0c4e, 0x0c54,
+ 0x0c57, 0x0c5f,
+ 0x0c62, 0x0c65,
+ 0x0c70, 0x0c81,
+ 0x0c84, 0x0c84,
+ 0x0c8d, 0x0c8d,
+ 0x0c91, 0x0c91,
+ 0x0ca9, 0x0ca9,
+ 0x0cb4, 0x0cb4,
+ 0x0cba, 0x0cbb,
+ 0x0cc5, 0x0cc5,
+ 0x0cc9, 0x0cc9,
+ 0x0cce, 0x0cd4,
+ 0x0cd7, 0x0cdd,
+ 0x0cdf, 0x0cdf,
+ 0x0ce2, 0x0ce5,
+ 0x0cf0, 0x0d01,
+ 0x0d04, 0x0d04,
+ 0x0d0d, 0x0d0d,
+ 0x0d11, 0x0d11,
+ 0x0d29, 0x0d29,
+ 0x0d3a, 0x0d3d,
+ 0x0d44, 0x0d45,
+ 0x0d49, 0x0d49,
+ 0x0d4e, 0x0d56,
+ 0x0d58, 0x0d5f,
+ 0x0d62, 0x0d65,
+ 0x0d70, 0x0d81,
+ 0x0d84, 0x0d84,
+ 0x0d97, 0x0d99,
+ 0x0db2, 0x0db2,
+ 0x0dbc, 0x0dbc,
+ 0x0dbe, 0x0dbf,
+ 0x0dc7, 0x0dc9,
+ 0x0dcb, 0x0dce,
+ 0x0dd5, 0x0dd5,
+ 0x0dd7, 0x0dd7,
+ 0x0de0, 0x0df1,
+ 0x0df5, 0x0e00,
+ 0x0e3b, 0x0e3e,
+ 0x0e5c, 0x0e80,
+ 0x0e83, 0x0e83,
+ 0x0e85, 0x0e86,
+ 0x0e89, 0x0e89,
+ 0x0e8b, 0x0e8c,
+ 0x0e8e, 0x0e93,
+ 0x0e98, 0x0e98,
+ 0x0ea0, 0x0ea0,
+ 0x0ea4, 0x0ea4,
+ 0x0ea6, 0x0ea6,
+ 0x0ea8, 0x0ea9,
+ 0x0eac, 0x0eac,
+ 0x0eba, 0x0eba,
+ 0x0ebe, 0x0ebf,
+ 0x0ec5, 0x0ec5,
+ 0x0ec7, 0x0ec7,
+ 0x0ece, 0x0ecf,
+ 0x0eda, 0x0edb,
+ 0x0ede, 0x0eff,
+ 0x0f48, 0x0f48,
+ 0x0f6b, 0x0f70,
+ 0x0f8c, 0x0f8f,
+ 0x0f98, 0x0f98,
+ 0x0fbd, 0x0fbd,
+ 0x0fcd, 0x0fce,
+ 0x0fd2, 0x0fff,
+ 0x1022, 0x1022,
+ 0x1028, 0x1028,
+ 0x102b, 0x102b,
+ 0x1033, 0x1035,
+ 0x103a, 0x103f,
+ 0x105a, 0x109f,
+ 0x10c6, 0x10cf,
+ 0x10fd, 0x10ff,
+ 0x115a, 0x115e,
+ 0x11a3, 0x11a7,
+ 0x11fa, 0x11ff,
+ 0x1249, 0x1249,
+ 0x124e, 0x124f,
+ 0x1257, 0x1257,
+ 0x1259, 0x1259,
+ 0x125e, 0x125f,
+ 0x1289, 0x1289,
+ 0x128e, 0x128f,
+ 0x12b1, 0x12b1,
+ 0x12b6, 0x12b7,
+ 0x12bf, 0x12bf,
+ 0x12c1, 0x12c1,
+ 0x12c6, 0x12c7,
+ 0x12d7, 0x12d7,
+ 0x1311, 0x1311,
+ 0x1316, 0x1317,
+ 0x135b, 0x135e,
+ 0x137d, 0x137f,
+ 0x139a, 0x139f,
+ 0x13f5, 0x1400,
+ 0x1677, 0x167f,
+ 0x169d, 0x169f,
+ 0x16f1, 0x16ff,
+ 0x170d, 0x170d,
+ 0x1715, 0x171f,
+ 0x1737, 0x173f,
+ 0x1754, 0x175f,
+ 0x176d, 0x176d,
+ 0x1771, 0x1771,
+ 0x1774, 0x177f,
+ 0x17de, 0x17df,
+ 0x17ea, 0x17ef,
+ 0x17fa, 0x17ff,
+ 0x180f, 0x180f,
+ 0x181a, 0x181f,
+ 0x1878, 0x187f,
+ 0x18aa, 0x18ff,
+ 0x191d, 0x191f,
+ 0x192c, 0x192f,
+ 0x193c, 0x193f,
+ 0x1941, 0x1943,
+ 0x196e, 0x196f,
+ 0x1975, 0x197f,
+ 0x19aa, 0x19af,
+ 0x19ca, 0x19cf,
+ 0x19da, 0x19dd,
+ 0x1a1c, 0x1a1d,
+ 0x1a20, 0x1cff,
+ 0x1dc4, 0x1dff,
+ 0x1e9c, 0x1e9f,
+ 0x1efa, 0x1eff,
+ 0x1f16, 0x1f17,
+ 0x1f1e, 0x1f1f,
+ 0x1f46, 0x1f47,
+ 0x1f4e, 0x1f4f,
+ 0x1f58, 0x1f58,
+ 0x1f5a, 0x1f5a,
+ 0x1f5c, 0x1f5c,
+ 0x1f5e, 0x1f5e,
+ 0x1f7e, 0x1f7f,
+ 0x1fb5, 0x1fb5,
+ 0x1fc5, 0x1fc5,
+ 0x1fd4, 0x1fd5,
+ 0x1fdc, 0x1fdc,
+ 0x1ff0, 0x1ff1,
+ 0x1ff5, 0x1ff5,
+ 0x1fff, 0x1fff,
+ 0x2064, 0x2069,
+ 0x2072, 0x2073,
+ 0x208f, 0x208f,
+ 0x2095, 0x209f,
+ 0x20b6, 0x20cf,
+ 0x20ec, 0x20ff,
+ 0x214d, 0x2152,
+ 0x2184, 0x218f,
+ 0x23dc, 0x23ff,
+ 0x2427, 0x243f,
+ 0x244b, 0x245f,
+ 0x269d, 0x269f,
+ 0x26b2, 0x2700,
+ 0x2705, 0x2705,
+ 0x270a, 0x270b,
+ 0x2728, 0x2728,
+ 0x274c, 0x274c,
+ 0x274e, 0x274e,
+ 0x2753, 0x2755,
+ 0x2757, 0x2757,
+ 0x275f, 0x2760,
+ 0x2795, 0x2797,
+ 0x27b0, 0x27b0,
+ 0x27bf, 0x27bf,
+ 0x27c7, 0x27cf,
+ 0x27ec, 0x27ef,
+ 0x2b14, 0x2bff,
+ 0x2c2f, 0x2c2f,
+ 0x2c5f, 0x2c7f,
+ 0x2ceb, 0x2cf8,
+ 0x2d26, 0x2d2f,
+ 0x2d66, 0x2d6e,
+ 0x2d70, 0x2d7f,
+ 0x2d97, 0x2d9f,
+ 0x2da7, 0x2da7,
+ 0x2daf, 0x2daf,
+ 0x2db7, 0x2db7,
+ 0x2dbf, 0x2dbf,
+ 0x2dc7, 0x2dc7,
+ 0x2dcf, 0x2dcf,
+ 0x2dd7, 0x2dd7,
+ 0x2ddf, 0x2dff,
+ 0x2e18, 0x2e1b,
+ 0x2e1e, 0x2e7f,
+ 0x2e9a, 0x2e9a,
+ 0x2ef4, 0x2eff,
+ 0x2fd6, 0x2fef,
+ 0x2ffc, 0x2fff,
+ 0x3040, 0x3040,
+ 0x3097, 0x3098,
+ 0x3100, 0x3104,
+ 0x312d, 0x3130,
+ 0x318f, 0x318f,
+ 0x31b8, 0x31bf,
+ 0x31d0, 0x31ef,
+ 0x321f, 0x321f,
+ 0x3244, 0x324f,
+ 0x32ff, 0x32ff,
+ 0x4db6, 0x4dbf,
+ 0x9fbc, 0x9fff,
+ 0xa48d, 0xa48f,
+ 0xa4c7, 0xa6ff,
+ 0xa717, 0xa7ff,
+ 0xa82c, 0xabff,
+ 0xd7a4, 0xd7ff,
+ 0xfa2e, 0xfa2f,
+ 0xfa6b, 0xfa6f,
+ 0xfada, 0xfaff,
+ 0xfb07, 0xfb12,
+ 0xfb18, 0xfb1c,
+ 0xfb37, 0xfb37,
+ 0xfb3d, 0xfb3d,
+ 0xfb3f, 0xfb3f,
+ 0xfb42, 0xfb42,
+ 0xfb45, 0xfb45,
+ 0xfbb2, 0xfbd2,
+ 0xfd40, 0xfd4f,
+ 0xfd90, 0xfd91,
+ 0xfdc8, 0xfdef,
+ 0xfdfe, 0xfdff,
+ 0xfe1a, 0xfe1f,
+ 0xfe24, 0xfe2f,
+ 0xfe53, 0xfe53,
+ 0xfe67, 0xfe67,
+ 0xfe6c, 0xfe6f,
+ 0xfe75, 0xfe75,
+ 0xfefd, 0xfefe,
+ 0xff00, 0xff00,
+ 0xffbf, 0xffc1,
+ 0xffc8, 0xffc9,
+ 0xffd0, 0xffd1,
+ 0xffd8, 0xffd9,
+ 0xffdd, 0xffdf,
+ 0xffe7, 0xffe7,
+ 0xffef, 0xfff8,
+ 0xfffe, 0xffff,
+ 0x1000c, 0x1000c,
+ 0x10027, 0x10027,
+ 0x1003b, 0x1003b,
+ 0x1003e, 0x1003e,
+ 0x1004e, 0x1004f,
+ 0x1005e, 0x1007f,
+ 0x100fb, 0x100ff,
+ 0x10103, 0x10106,
+ 0x10134, 0x10136,
+ 0x1018b, 0x102ff,
+ 0x1031f, 0x1031f,
+ 0x10324, 0x1032f,
+ 0x1034b, 0x1037f,
+ 0x1039e, 0x1039e,
+ 0x103c4, 0x103c7,
+ 0x103d6, 0x103ff,
+ 0x1049e, 0x1049f,
+ 0x104aa, 0x107ff,
+ 0x10806, 0x10807,
+ 0x10809, 0x10809,
+ 0x10836, 0x10836,
+ 0x10839, 0x1083b,
+ 0x1083d, 0x1083e,
+ 0x10840, 0x109ff,
+ 0x10a04, 0x10a04,
+ 0x10a07, 0x10a0b,
+ 0x10a14, 0x10a14,
+ 0x10a18, 0x10a18,
+ 0x10a34, 0x10a37,
+ 0x10a3b, 0x10a3e,
+ 0x10a48, 0x10a4f,
+ 0x10a59, 0x1cfff,
+ 0x1d0f6, 0x1d0ff,
+ 0x1d127, 0x1d129,
+ 0x1d1de, 0x1d1ff,
+ 0x1d246, 0x1d2ff,
+ 0x1d357, 0x1d3ff,
+ 0x1d455, 0x1d455,
+ 0x1d49d, 0x1d49d,
+ 0x1d4a0, 0x1d4a1,
+ 0x1d4a3, 0x1d4a4,
+ 0x1d4a7, 0x1d4a8,
+ 0x1d4ad, 0x1d4ad,
+ 0x1d4ba, 0x1d4ba,
+ 0x1d4bc, 0x1d4bc,
+ 0x1d4c4, 0x1d4c4,
+ 0x1d506, 0x1d506,
+ 0x1d50b, 0x1d50c,
+ 0x1d515, 0x1d515,
+ 0x1d51d, 0x1d51d,
+ 0x1d53a, 0x1d53a,
+ 0x1d53f, 0x1d53f,
+ 0x1d545, 0x1d545,
+ 0x1d547, 0x1d549,
+ 0x1d551, 0x1d551,
+ 0x1d6a6, 0x1d6a7,
+ 0x1d7ca, 0x1d7cd,
+ 0x1d800, 0x1ffff,
+ 0x2a6d7, 0x2f7ff,
+ 0x2fa1e, 0xe0000,
+ 0xe0002, 0xe001f,
+ 0xe0080, 0xe00ff,
+ 0xe01f0, 0xeffff,
+ 0xffffe, 0xfffff,
+ 0x10fffe, 0x10ffff
+}; /* CR_Cn */
+
+/* 'Co': General Category */
+static const OnigCodePoint CR_Co[] = {
+ 3,
+ 0xe000, 0xf8ff,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd
+}; /* CR_Co */
+/* 'Cs': General Category */
+static const OnigCodePoint CR_Cs[] = {
+ 1,
+ 0xd800, 0xdfff
+}; /* CR_Cs */
+
+/* 'L': Major Category */
+static const OnigCodePoint CR_L[] = {
+ 347,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x0241,
+ 0x0250, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ee, 0x02ee,
+ 0x037a, 0x037a,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x04ce,
+ 0x04d0, 0x04f9,
+ 0x0500, 0x050f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0561, 0x0587,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f2,
+ 0x0621, 0x063a,
+ 0x0640, 0x064a,
+ 0x066e, 0x066f,
+ 0x0671, 0x06d3,
+ 0x06d5, 0x06d5,
+ 0x06e5, 0x06e6,
+ 0x06ee, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x076d,
+ 0x0780, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x0904, 0x0939,
+ 0x093d, 0x093d,
+ 0x0950, 0x0950,
+ 0x0958, 0x0961,
+ 0x097d, 0x097d,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09f0, 0x09f1,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a72, 0x0a74,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0abd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b71, 0x0b71,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c60, 0x0c61,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbd,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d60, 0x0d61,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e33,
+ 0x0e40, 0x0e46,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb0,
+ 0x0eb2, 0x0eb3,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f88, 0x0f8b,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x1050, 0x1055,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10fc,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x166c,
+ 0x166f, 0x1676,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x1700, 0x170c,
+ 0x170e, 0x1711,
+ 0x1720, 0x1731,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a8,
+ 0x1900, 0x191c,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19c1, 0x19c7,
+ 0x1a00, 0x1a16,
+ 0x1d00, 0x1dbf,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x2094,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2131,
+ 0x2133, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2ce4,
+ 0x2d00, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x3005, 0x3006,
+ 0x3031, 0x3035,
+ 0x303b, 0x303c,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31b7,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fbb,
+ 0xa000, 0xa48c,
+ 0xa800, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa822,
+ 0xac00, 0xd7a3,
+ 0xf900, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10300, 0x1031e,
+ 0x10330, 0x10349,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x10400, 0x1049d,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10a00, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7c9,
+ 0x20000, 0x2a6d6,
+ 0x2f800, 0x2fa1d
+}; /* CR_L */
+
+/* 'Ll': General Category */
+static const OnigCodePoint CR_Ll[] = {
+ 480,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00df, 0x00f6,
+ 0x00f8, 0x00ff,
+ 0x0101, 0x0101,
+ 0x0103, 0x0103,
+ 0x0105, 0x0105,
+ 0x0107, 0x0107,
+ 0x0109, 0x0109,
+ 0x010b, 0x010b,
+ 0x010d, 0x010d,
+ 0x010f, 0x010f,
+ 0x0111, 0x0111,
+ 0x0113, 0x0113,
+ 0x0115, 0x0115,
+ 0x0117, 0x0117,
+ 0x0119, 0x0119,
+ 0x011b, 0x011b,
+ 0x011d, 0x011d,
+ 0x011f, 0x011f,
+ 0x0121, 0x0121,
+ 0x0123, 0x0123,
+ 0x0125, 0x0125,
+ 0x0127, 0x0127,
+ 0x0129, 0x0129,
+ 0x012b, 0x012b,
+ 0x012d, 0x012d,
+ 0x012f, 0x012f,
+ 0x0131, 0x0131,
+ 0x0133, 0x0133,
+ 0x0135, 0x0135,
+ 0x0137, 0x0138,
+ 0x013a, 0x013a,
+ 0x013c, 0x013c,
+ 0x013e, 0x013e,
+ 0x0140, 0x0140,
+ 0x0142, 0x0142,
+ 0x0144, 0x0144,
+ 0x0146, 0x0146,
+ 0x0148, 0x0149,
+ 0x014b, 0x014b,
+ 0x014d, 0x014d,
+ 0x014f, 0x014f,
+ 0x0151, 0x0151,
+ 0x0153, 0x0153,
+ 0x0155, 0x0155,
+ 0x0157, 0x0157,
+ 0x0159, 0x0159,
+ 0x015b, 0x015b,
+ 0x015d, 0x015d,
+ 0x015f, 0x015f,
+ 0x0161, 0x0161,
+ 0x0163, 0x0163,
+ 0x0165, 0x0165,
+ 0x0167, 0x0167,
+ 0x0169, 0x0169,
+ 0x016b, 0x016b,
+ 0x016d, 0x016d,
+ 0x016f, 0x016f,
+ 0x0171, 0x0171,
+ 0x0173, 0x0173,
+ 0x0175, 0x0175,
+ 0x0177, 0x0177,
+ 0x017a, 0x017a,
+ 0x017c, 0x017c,
+ 0x017e, 0x0180,
+ 0x0183, 0x0183,
+ 0x0185, 0x0185,
+ 0x0188, 0x0188,
+ 0x018c, 0x018d,
+ 0x0192, 0x0192,
+ 0x0195, 0x0195,
+ 0x0199, 0x019b,
+ 0x019e, 0x019e,
+ 0x01a1, 0x01a1,
+ 0x01a3, 0x01a3,
+ 0x01a5, 0x01a5,
+ 0x01a8, 0x01a8,
+ 0x01aa, 0x01ab,
+ 0x01ad, 0x01ad,
+ 0x01b0, 0x01b0,
+ 0x01b4, 0x01b4,
+ 0x01b6, 0x01b6,
+ 0x01b9, 0x01ba,
+ 0x01bd, 0x01bf,
+ 0x01c6, 0x01c6,
+ 0x01c9, 0x01c9,
+ 0x01cc, 0x01cc,
+ 0x01ce, 0x01ce,
+ 0x01d0, 0x01d0,
+ 0x01d2, 0x01d2,
+ 0x01d4, 0x01d4,
+ 0x01d6, 0x01d6,
+ 0x01d8, 0x01d8,
+ 0x01da, 0x01da,
+ 0x01dc, 0x01dd,
+ 0x01df, 0x01df,
+ 0x01e1, 0x01e1,
+ 0x01e3, 0x01e3,
+ 0x01e5, 0x01e5,
+ 0x01e7, 0x01e7,
+ 0x01e9, 0x01e9,
+ 0x01eb, 0x01eb,
+ 0x01ed, 0x01ed,
+ 0x01ef, 0x01f0,
+ 0x01f3, 0x01f3,
+ 0x01f5, 0x01f5,
+ 0x01f9, 0x01f9,
+ 0x01fb, 0x01fb,
+ 0x01fd, 0x01fd,
+ 0x01ff, 0x01ff,
+ 0x0201, 0x0201,
+ 0x0203, 0x0203,
+ 0x0205, 0x0205,
+ 0x0207, 0x0207,
+ 0x0209, 0x0209,
+ 0x020b, 0x020b,
+ 0x020d, 0x020d,
+ 0x020f, 0x020f,
+ 0x0211, 0x0211,
+ 0x0213, 0x0213,
+ 0x0215, 0x0215,
+ 0x0217, 0x0217,
+ 0x0219, 0x0219,
+ 0x021b, 0x021b,
+ 0x021d, 0x021d,
+ 0x021f, 0x021f,
+ 0x0221, 0x0221,
+ 0x0223, 0x0223,
+ 0x0225, 0x0225,
+ 0x0227, 0x0227,
+ 0x0229, 0x0229,
+ 0x022b, 0x022b,
+ 0x022d, 0x022d,
+ 0x022f, 0x022f,
+ 0x0231, 0x0231,
+ 0x0233, 0x0239,
+ 0x023c, 0x023c,
+ 0x023f, 0x0240,
+ 0x0250, 0x02af,
+ 0x0390, 0x0390,
+ 0x03ac, 0x03ce,
+ 0x03d0, 0x03d1,
+ 0x03d5, 0x03d7,
+ 0x03d9, 0x03d9,
+ 0x03db, 0x03db,
+ 0x03dd, 0x03dd,
+ 0x03df, 0x03df,
+ 0x03e1, 0x03e1,
+ 0x03e3, 0x03e3,
+ 0x03e5, 0x03e5,
+ 0x03e7, 0x03e7,
+ 0x03e9, 0x03e9,
+ 0x03eb, 0x03eb,
+ 0x03ed, 0x03ed,
+ 0x03ef, 0x03f3,
+ 0x03f5, 0x03f5,
+ 0x03f8, 0x03f8,
+ 0x03fb, 0x03fc,
+ 0x0430, 0x045f,
+ 0x0461, 0x0461,
+ 0x0463, 0x0463,
+ 0x0465, 0x0465,
+ 0x0467, 0x0467,
+ 0x0469, 0x0469,
+ 0x046b, 0x046b,
+ 0x046d, 0x046d,
+ 0x046f, 0x046f,
+ 0x0471, 0x0471,
+ 0x0473, 0x0473,
+ 0x0475, 0x0475,
+ 0x0477, 0x0477,
+ 0x0479, 0x0479,
+ 0x047b, 0x047b,
+ 0x047d, 0x047d,
+ 0x047f, 0x047f,
+ 0x0481, 0x0481,
+ 0x048b, 0x048b,
+ 0x048d, 0x048d,
+ 0x048f, 0x048f,
+ 0x0491, 0x0491,
+ 0x0493, 0x0493,
+ 0x0495, 0x0495,
+ 0x0497, 0x0497,
+ 0x0499, 0x0499,
+ 0x049b, 0x049b,
+ 0x049d, 0x049d,
+ 0x049f, 0x049f,
+ 0x04a1, 0x04a1,
+ 0x04a3, 0x04a3,
+ 0x04a5, 0x04a5,
+ 0x04a7, 0x04a7,
+ 0x04a9, 0x04a9,
+ 0x04ab, 0x04ab,
+ 0x04ad, 0x04ad,
+ 0x04af, 0x04af,
+ 0x04b1, 0x04b1,
+ 0x04b3, 0x04b3,
+ 0x04b5, 0x04b5,
+ 0x04b7, 0x04b7,
+ 0x04b9, 0x04b9,
+ 0x04bb, 0x04bb,
+ 0x04bd, 0x04bd,
+ 0x04bf, 0x04bf,
+ 0x04c2, 0x04c2,
+ 0x04c4, 0x04c4,
+ 0x04c6, 0x04c6,
+ 0x04c8, 0x04c8,
+ 0x04ca, 0x04ca,
+ 0x04cc, 0x04cc,
+ 0x04ce, 0x04ce,
+ 0x04d1, 0x04d1,
+ 0x04d3, 0x04d3,
+ 0x04d5, 0x04d5,
+ 0x04d7, 0x04d7,
+ 0x04d9, 0x04d9,
+ 0x04db, 0x04db,
+ 0x04dd, 0x04dd,
+ 0x04df, 0x04df,
+ 0x04e1, 0x04e1,
+ 0x04e3, 0x04e3,
+ 0x04e5, 0x04e5,
+ 0x04e7, 0x04e7,
+ 0x04e9, 0x04e9,
+ 0x04eb, 0x04eb,
+ 0x04ed, 0x04ed,
+ 0x04ef, 0x04ef,
+ 0x04f1, 0x04f1,
+ 0x04f3, 0x04f3,
+ 0x04f5, 0x04f5,
+ 0x04f7, 0x04f7,
+ 0x04f9, 0x04f9,
+ 0x0501, 0x0501,
+ 0x0503, 0x0503,
+ 0x0505, 0x0505,
+ 0x0507, 0x0507,
+ 0x0509, 0x0509,
+ 0x050b, 0x050b,
+ 0x050d, 0x050d,
+ 0x050f, 0x050f,
+ 0x0561, 0x0587,
+ 0x1d00, 0x1d2b,
+ 0x1d62, 0x1d77,
+ 0x1d79, 0x1d9a,
+ 0x1e01, 0x1e01,
+ 0x1e03, 0x1e03,
+ 0x1e05, 0x1e05,
+ 0x1e07, 0x1e07,
+ 0x1e09, 0x1e09,
+ 0x1e0b, 0x1e0b,
+ 0x1e0d, 0x1e0d,
+ 0x1e0f, 0x1e0f,
+ 0x1e11, 0x1e11,
+ 0x1e13, 0x1e13,
+ 0x1e15, 0x1e15,
+ 0x1e17, 0x1e17,
+ 0x1e19, 0x1e19,
+ 0x1e1b, 0x1e1b,
+ 0x1e1d, 0x1e1d,
+ 0x1e1f, 0x1e1f,
+ 0x1e21, 0x1e21,
+ 0x1e23, 0x1e23,
+ 0x1e25, 0x1e25,
+ 0x1e27, 0x1e27,
+ 0x1e29, 0x1e29,
+ 0x1e2b, 0x1e2b,
+ 0x1e2d, 0x1e2d,
+ 0x1e2f, 0x1e2f,
+ 0x1e31, 0x1e31,
+ 0x1e33, 0x1e33,
+ 0x1e35, 0x1e35,
+ 0x1e37, 0x1e37,
+ 0x1e39, 0x1e39,
+ 0x1e3b, 0x1e3b,
+ 0x1e3d, 0x1e3d,
+ 0x1e3f, 0x1e3f,
+ 0x1e41, 0x1e41,
+ 0x1e43, 0x1e43,
+ 0x1e45, 0x1e45,
+ 0x1e47, 0x1e47,
+ 0x1e49, 0x1e49,
+ 0x1e4b, 0x1e4b,
+ 0x1e4d, 0x1e4d,
+ 0x1e4f, 0x1e4f,
+ 0x1e51, 0x1e51,
+ 0x1e53, 0x1e53,
+ 0x1e55, 0x1e55,
+ 0x1e57, 0x1e57,
+ 0x1e59, 0x1e59,
+ 0x1e5b, 0x1e5b,
+ 0x1e5d, 0x1e5d,
+ 0x1e5f, 0x1e5f,
+ 0x1e61, 0x1e61,
+ 0x1e63, 0x1e63,
+ 0x1e65, 0x1e65,
+ 0x1e67, 0x1e67,
+ 0x1e69, 0x1e69,
+ 0x1e6b, 0x1e6b,
+ 0x1e6d, 0x1e6d,
+ 0x1e6f, 0x1e6f,
+ 0x1e71, 0x1e71,
+ 0x1e73, 0x1e73,
+ 0x1e75, 0x1e75,
+ 0x1e77, 0x1e77,
+ 0x1e79, 0x1e79,
+ 0x1e7b, 0x1e7b,
+ 0x1e7d, 0x1e7d,
+ 0x1e7f, 0x1e7f,
+ 0x1e81, 0x1e81,
+ 0x1e83, 0x1e83,
+ 0x1e85, 0x1e85,
+ 0x1e87, 0x1e87,
+ 0x1e89, 0x1e89,
+ 0x1e8b, 0x1e8b,
+ 0x1e8d, 0x1e8d,
+ 0x1e8f, 0x1e8f,
+ 0x1e91, 0x1e91,
+ 0x1e93, 0x1e93,
+ 0x1e95, 0x1e9b,
+ 0x1ea1, 0x1ea1,
+ 0x1ea3, 0x1ea3,
+ 0x1ea5, 0x1ea5,
+ 0x1ea7, 0x1ea7,
+ 0x1ea9, 0x1ea9,
+ 0x1eab, 0x1eab,
+ 0x1ead, 0x1ead,
+ 0x1eaf, 0x1eaf,
+ 0x1eb1, 0x1eb1,
+ 0x1eb3, 0x1eb3,
+ 0x1eb5, 0x1eb5,
+ 0x1eb7, 0x1eb7,
+ 0x1eb9, 0x1eb9,
+ 0x1ebb, 0x1ebb,
+ 0x1ebd, 0x1ebd,
+ 0x1ebf, 0x1ebf,
+ 0x1ec1, 0x1ec1,
+ 0x1ec3, 0x1ec3,
+ 0x1ec5, 0x1ec5,
+ 0x1ec7, 0x1ec7,
+ 0x1ec9, 0x1ec9,
+ 0x1ecb, 0x1ecb,
+ 0x1ecd, 0x1ecd,
+ 0x1ecf, 0x1ecf,
+ 0x1ed1, 0x1ed1,
+ 0x1ed3, 0x1ed3,
+ 0x1ed5, 0x1ed5,
+ 0x1ed7, 0x1ed7,
+ 0x1ed9, 0x1ed9,
+ 0x1edb, 0x1edb,
+ 0x1edd, 0x1edd,
+ 0x1edf, 0x1edf,
+ 0x1ee1, 0x1ee1,
+ 0x1ee3, 0x1ee3,
+ 0x1ee5, 0x1ee5,
+ 0x1ee7, 0x1ee7,
+ 0x1ee9, 0x1ee9,
+ 0x1eeb, 0x1eeb,
+ 0x1eed, 0x1eed,
+ 0x1eef, 0x1eef,
+ 0x1ef1, 0x1ef1,
+ 0x1ef3, 0x1ef3,
+ 0x1ef5, 0x1ef5,
+ 0x1ef7, 0x1ef7,
+ 0x1ef9, 0x1ef9,
+ 0x1f00, 0x1f07,
+ 0x1f10, 0x1f15,
+ 0x1f20, 0x1f27,
+ 0x1f30, 0x1f37,
+ 0x1f40, 0x1f45,
+ 0x1f50, 0x1f57,
+ 0x1f60, 0x1f67,
+ 0x1f70, 0x1f7d,
+ 0x1f80, 0x1f87,
+ 0x1f90, 0x1f97,
+ 0x1fa0, 0x1fa7,
+ 0x1fb0, 0x1fb4,
+ 0x1fb6, 0x1fb7,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fc7,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fd7,
+ 0x1fe0, 0x1fe7,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ff7,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x210a, 0x210a,
+ 0x210e, 0x210f,
+ 0x2113, 0x2113,
+ 0x212f, 0x212f,
+ 0x2134, 0x2134,
+ 0x2139, 0x2139,
+ 0x213c, 0x213d,
+ 0x2146, 0x2149,
+ 0x2c30, 0x2c5e,
+ 0x2c81, 0x2c81,
+ 0x2c83, 0x2c83,
+ 0x2c85, 0x2c85,
+ 0x2c87, 0x2c87,
+ 0x2c89, 0x2c89,
+ 0x2c8b, 0x2c8b,
+ 0x2c8d, 0x2c8d,
+ 0x2c8f, 0x2c8f,
+ 0x2c91, 0x2c91,
+ 0x2c93, 0x2c93,
+ 0x2c95, 0x2c95,
+ 0x2c97, 0x2c97,
+ 0x2c99, 0x2c99,
+ 0x2c9b, 0x2c9b,
+ 0x2c9d, 0x2c9d,
+ 0x2c9f, 0x2c9f,
+ 0x2ca1, 0x2ca1,
+ 0x2ca3, 0x2ca3,
+ 0x2ca5, 0x2ca5,
+ 0x2ca7, 0x2ca7,
+ 0x2ca9, 0x2ca9,
+ 0x2cab, 0x2cab,
+ 0x2cad, 0x2cad,
+ 0x2caf, 0x2caf,
+ 0x2cb1, 0x2cb1,
+ 0x2cb3, 0x2cb3,
+ 0x2cb5, 0x2cb5,
+ 0x2cb7, 0x2cb7,
+ 0x2cb9, 0x2cb9,
+ 0x2cbb, 0x2cbb,
+ 0x2cbd, 0x2cbd,
+ 0x2cbf, 0x2cbf,
+ 0x2cc1, 0x2cc1,
+ 0x2cc3, 0x2cc3,
+ 0x2cc5, 0x2cc5,
+ 0x2cc7, 0x2cc7,
+ 0x2cc9, 0x2cc9,
+ 0x2ccb, 0x2ccb,
+ 0x2ccd, 0x2ccd,
+ 0x2ccf, 0x2ccf,
+ 0x2cd1, 0x2cd1,
+ 0x2cd3, 0x2cd3,
+ 0x2cd5, 0x2cd5,
+ 0x2cd7, 0x2cd7,
+ 0x2cd9, 0x2cd9,
+ 0x2cdb, 0x2cdb,
+ 0x2cdd, 0x2cdd,
+ 0x2cdf, 0x2cdf,
+ 0x2ce1, 0x2ce1,
+ 0x2ce3, 0x2ce4,
+ 0x2d00, 0x2d25,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff41, 0xff5a,
+ 0x10428, 0x1044f,
+ 0x1d41a, 0x1d433,
+ 0x1d44e, 0x1d454,
+ 0x1d456, 0x1d467,
+ 0x1d482, 0x1d49b,
+ 0x1d4b6, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d4cf,
+ 0x1d4ea, 0x1d503,
+ 0x1d51e, 0x1d537,
+ 0x1d552, 0x1d56b,
+ 0x1d586, 0x1d59f,
+ 0x1d5ba, 0x1d5d3,
+ 0x1d5ee, 0x1d607,
+ 0x1d622, 0x1d63b,
+ 0x1d656, 0x1d66f,
+ 0x1d68a, 0x1d6a5,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6e1,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d71b,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d755,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d78f,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7c9
+}; /* CR_Ll */
+
+/* 'Lm': General Category */
+static const OnigCodePoint CR_Lm[] = {
+ 26,
+ 0x02b0, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ee, 0x02ee,
+ 0x037a, 0x037a,
+ 0x0559, 0x0559,
+ 0x0640, 0x0640,
+ 0x06e5, 0x06e6,
+ 0x0e46, 0x0e46,
+ 0x0ec6, 0x0ec6,
+ 0x10fc, 0x10fc,
+ 0x17d7, 0x17d7,
+ 0x1843, 0x1843,
+ 0x1d2c, 0x1d61,
+ 0x1d78, 0x1d78,
+ 0x1d9b, 0x1dbf,
+ 0x2090, 0x2094,
+ 0x2d6f, 0x2d6f,
+ 0x3005, 0x3005,
+ 0x3031, 0x3035,
+ 0x303b, 0x303b,
+ 0x309d, 0x309e,
+ 0x30fc, 0x30fe,
+ 0xa015, 0xa015,
+ 0xff70, 0xff70,
+ 0xff9e, 0xff9f
+}; /* CR_Lm */
+
+/* 'Lo': General Category */
+static const OnigCodePoint CR_Lo[] = {
+ 245,
+ 0x01bb, 0x01bb,
+ 0x01c0, 0x01c3,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f2,
+ 0x0621, 0x063a,
+ 0x0641, 0x064a,
+ 0x066e, 0x066f,
+ 0x0671, 0x06d3,
+ 0x06d5, 0x06d5,
+ 0x06ee, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x076d,
+ 0x0780, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x0904, 0x0939,
+ 0x093d, 0x093d,
+ 0x0950, 0x0950,
+ 0x0958, 0x0961,
+ 0x097d, 0x097d,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09f0, 0x09f1,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a72, 0x0a74,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0abd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b71, 0x0b71,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c60, 0x0c61,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbd,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d60, 0x0d61,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e33,
+ 0x0e40, 0x0e45,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb0,
+ 0x0eb2, 0x0eb3,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f88, 0x0f8b,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x1050, 0x1055,
+ 0x10d0, 0x10fa,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x166c,
+ 0x166f, 0x1676,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x1700, 0x170c,
+ 0x170e, 0x1711,
+ 0x1720, 0x1731,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1842,
+ 0x1844, 0x1877,
+ 0x1880, 0x18a8,
+ 0x1900, 0x191c,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19c1, 0x19c7,
+ 0x1a00, 0x1a16,
+ 0x2135, 0x2138,
+ 0x2d30, 0x2d65,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x3006, 0x3006,
+ 0x303c, 0x303c,
+ 0x3041, 0x3096,
+ 0x309f, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30ff, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31b7,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fbb,
+ 0xa000, 0xa014,
+ 0xa016, 0xa48c,
+ 0xa800, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa822,
+ 0xac00, 0xd7a3,
+ 0xf900, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff66, 0xff6f,
+ 0xff71, 0xff9d,
+ 0xffa0, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10300, 0x1031e,
+ 0x10330, 0x10349,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x10450, 0x1049d,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10a00, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x20000, 0x2a6d6,
+ 0x2f800, 0x2fa1d
+}; /* CR_Lo */
+
+/* 'Lt': General Category */
+static const OnigCodePoint CR_Lt[] = {
+ 10,
+ 0x01c5, 0x01c5,
+ 0x01c8, 0x01c8,
+ 0x01cb, 0x01cb,
+ 0x01f2, 0x01f2,
+ 0x1f88, 0x1f8f,
+ 0x1f98, 0x1f9f,
+ 0x1fa8, 0x1faf,
+ 0x1fbc, 0x1fbc,
+ 0x1fcc, 0x1fcc,
+ 0x1ffc, 0x1ffc
+}; /* CR_Lt */
+
+/* 'Lu': General Category */
+static const OnigCodePoint CR_Lu[] = {
+ 476,
+ 0x0041, 0x005a,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00de,
+ 0x0100, 0x0100,
+ 0x0102, 0x0102,
+ 0x0104, 0x0104,
+ 0x0106, 0x0106,
+ 0x0108, 0x0108,
+ 0x010a, 0x010a,
+ 0x010c, 0x010c,
+ 0x010e, 0x010e,
+ 0x0110, 0x0110,
+ 0x0112, 0x0112,
+ 0x0114, 0x0114,
+ 0x0116, 0x0116,
+ 0x0118, 0x0118,
+ 0x011a, 0x011a,
+ 0x011c, 0x011c,
+ 0x011e, 0x011e,
+ 0x0120, 0x0120,
+ 0x0122, 0x0122,
+ 0x0124, 0x0124,
+ 0x0126, 0x0126,
+ 0x0128, 0x0128,
+ 0x012a, 0x012a,
+ 0x012c, 0x012c,
+ 0x012e, 0x012e,
+ 0x0130, 0x0130,
+ 0x0132, 0x0132,
+ 0x0134, 0x0134,
+ 0x0136, 0x0136,
+ 0x0139, 0x0139,
+ 0x013b, 0x013b,
+ 0x013d, 0x013d,
+ 0x013f, 0x013f,
+ 0x0141, 0x0141,
+ 0x0143, 0x0143,
+ 0x0145, 0x0145,
+ 0x0147, 0x0147,
+ 0x014a, 0x014a,
+ 0x014c, 0x014c,
+ 0x014e, 0x014e,
+ 0x0150, 0x0150,
+ 0x0152, 0x0152,
+ 0x0154, 0x0154,
+ 0x0156, 0x0156,
+ 0x0158, 0x0158,
+ 0x015a, 0x015a,
+ 0x015c, 0x015c,
+ 0x015e, 0x015e,
+ 0x0160, 0x0160,
+ 0x0162, 0x0162,
+ 0x0164, 0x0164,
+ 0x0166, 0x0166,
+ 0x0168, 0x0168,
+ 0x016a, 0x016a,
+ 0x016c, 0x016c,
+ 0x016e, 0x016e,
+ 0x0170, 0x0170,
+ 0x0172, 0x0172,
+ 0x0174, 0x0174,
+ 0x0176, 0x0176,
+ 0x0178, 0x0179,
+ 0x017b, 0x017b,
+ 0x017d, 0x017d,
+ 0x0181, 0x0182,
+ 0x0184, 0x0184,
+ 0x0186, 0x0187,
+ 0x0189, 0x018b,
+ 0x018e, 0x0191,
+ 0x0193, 0x0194,
+ 0x0196, 0x0198,
+ 0x019c, 0x019d,
+ 0x019f, 0x01a0,
+ 0x01a2, 0x01a2,
+ 0x01a4, 0x01a4,
+ 0x01a6, 0x01a7,
+ 0x01a9, 0x01a9,
+ 0x01ac, 0x01ac,
+ 0x01ae, 0x01af,
+ 0x01b1, 0x01b3,
+ 0x01b5, 0x01b5,
+ 0x01b7, 0x01b8,
+ 0x01bc, 0x01bc,
+ 0x01c4, 0x01c4,
+ 0x01c7, 0x01c7,
+ 0x01ca, 0x01ca,
+ 0x01cd, 0x01cd,
+ 0x01cf, 0x01cf,
+ 0x01d1, 0x01d1,
+ 0x01d3, 0x01d3,
+ 0x01d5, 0x01d5,
+ 0x01d7, 0x01d7,
+ 0x01d9, 0x01d9,
+ 0x01db, 0x01db,
+ 0x01de, 0x01de,
+ 0x01e0, 0x01e0,
+ 0x01e2, 0x01e2,
+ 0x01e4, 0x01e4,
+ 0x01e6, 0x01e6,
+ 0x01e8, 0x01e8,
+ 0x01ea, 0x01ea,
+ 0x01ec, 0x01ec,
+ 0x01ee, 0x01ee,
+ 0x01f1, 0x01f1,
+ 0x01f4, 0x01f4,
+ 0x01f6, 0x01f8,
+ 0x01fa, 0x01fa,
+ 0x01fc, 0x01fc,
+ 0x01fe, 0x01fe,
+ 0x0200, 0x0200,
+ 0x0202, 0x0202,
+ 0x0204, 0x0204,
+ 0x0206, 0x0206,
+ 0x0208, 0x0208,
+ 0x020a, 0x020a,
+ 0x020c, 0x020c,
+ 0x020e, 0x020e,
+ 0x0210, 0x0210,
+ 0x0212, 0x0212,
+ 0x0214, 0x0214,
+ 0x0216, 0x0216,
+ 0x0218, 0x0218,
+ 0x021a, 0x021a,
+ 0x021c, 0x021c,
+ 0x021e, 0x021e,
+ 0x0220, 0x0220,
+ 0x0222, 0x0222,
+ 0x0224, 0x0224,
+ 0x0226, 0x0226,
+ 0x0228, 0x0228,
+ 0x022a, 0x022a,
+ 0x022c, 0x022c,
+ 0x022e, 0x022e,
+ 0x0230, 0x0230,
+ 0x0232, 0x0232,
+ 0x023a, 0x023b,
+ 0x023d, 0x023e,
+ 0x0241, 0x0241,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x038f,
+ 0x0391, 0x03a1,
+ 0x03a3, 0x03ab,
+ 0x03d2, 0x03d4,
+ 0x03d8, 0x03d8,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03e2,
+ 0x03e4, 0x03e4,
+ 0x03e6, 0x03e6,
+ 0x03e8, 0x03e8,
+ 0x03ea, 0x03ea,
+ 0x03ec, 0x03ec,
+ 0x03ee, 0x03ee,
+ 0x03f4, 0x03f4,
+ 0x03f7, 0x03f7,
+ 0x03f9, 0x03fa,
+ 0x03fd, 0x042f,
+ 0x0460, 0x0460,
+ 0x0462, 0x0462,
+ 0x0464, 0x0464,
+ 0x0466, 0x0466,
+ 0x0468, 0x0468,
+ 0x046a, 0x046a,
+ 0x046c, 0x046c,
+ 0x046e, 0x046e,
+ 0x0470, 0x0470,
+ 0x0472, 0x0472,
+ 0x0474, 0x0474,
+ 0x0476, 0x0476,
+ 0x0478, 0x0478,
+ 0x047a, 0x047a,
+ 0x047c, 0x047c,
+ 0x047e, 0x047e,
+ 0x0480, 0x0480,
+ 0x048a, 0x048a,
+ 0x048c, 0x048c,
+ 0x048e, 0x048e,
+ 0x0490, 0x0490,
+ 0x0492, 0x0492,
+ 0x0494, 0x0494,
+ 0x0496, 0x0496,
+ 0x0498, 0x0498,
+ 0x049a, 0x049a,
+ 0x049c, 0x049c,
+ 0x049e, 0x049e,
+ 0x04a0, 0x04a0,
+ 0x04a2, 0x04a2,
+ 0x04a4, 0x04a4,
+ 0x04a6, 0x04a6,
+ 0x04a8, 0x04a8,
+ 0x04aa, 0x04aa,
+ 0x04ac, 0x04ac,
+ 0x04ae, 0x04ae,
+ 0x04b0, 0x04b0,
+ 0x04b2, 0x04b2,
+ 0x04b4, 0x04b4,
+ 0x04b6, 0x04b6,
+ 0x04b8, 0x04b8,
+ 0x04ba, 0x04ba,
+ 0x04bc, 0x04bc,
+ 0x04be, 0x04be,
+ 0x04c0, 0x04c1,
+ 0x04c3, 0x04c3,
+ 0x04c5, 0x04c5,
+ 0x04c7, 0x04c7,
+ 0x04c9, 0x04c9,
+ 0x04cb, 0x04cb,
+ 0x04cd, 0x04cd,
+ 0x04d0, 0x04d0,
+ 0x04d2, 0x04d2,
+ 0x04d4, 0x04d4,
+ 0x04d6, 0x04d6,
+ 0x04d8, 0x04d8,
+ 0x04da, 0x04da,
+ 0x04dc, 0x04dc,
+ 0x04de, 0x04de,
+ 0x04e0, 0x04e0,
+ 0x04e2, 0x04e2,
+ 0x04e4, 0x04e4,
+ 0x04e6, 0x04e6,
+ 0x04e8, 0x04e8,
+ 0x04ea, 0x04ea,
+ 0x04ec, 0x04ec,
+ 0x04ee, 0x04ee,
+ 0x04f0, 0x04f0,
+ 0x04f2, 0x04f2,
+ 0x04f4, 0x04f4,
+ 0x04f6, 0x04f6,
+ 0x04f8, 0x04f8,
+ 0x0500, 0x0500,
+ 0x0502, 0x0502,
+ 0x0504, 0x0504,
+ 0x0506, 0x0506,
+ 0x0508, 0x0508,
+ 0x050a, 0x050a,
+ 0x050c, 0x050c,
+ 0x050e, 0x050e,
+ 0x0531, 0x0556,
+ 0x10a0, 0x10c5,
+ 0x1e00, 0x1e00,
+ 0x1e02, 0x1e02,
+ 0x1e04, 0x1e04,
+ 0x1e06, 0x1e06,
+ 0x1e08, 0x1e08,
+ 0x1e0a, 0x1e0a,
+ 0x1e0c, 0x1e0c,
+ 0x1e0e, 0x1e0e,
+ 0x1e10, 0x1e10,
+ 0x1e12, 0x1e12,
+ 0x1e14, 0x1e14,
+ 0x1e16, 0x1e16,
+ 0x1e18, 0x1e18,
+ 0x1e1a, 0x1e1a,
+ 0x1e1c, 0x1e1c,
+ 0x1e1e, 0x1e1e,
+ 0x1e20, 0x1e20,
+ 0x1e22, 0x1e22,
+ 0x1e24, 0x1e24,
+ 0x1e26, 0x1e26,
+ 0x1e28, 0x1e28,
+ 0x1e2a, 0x1e2a,
+ 0x1e2c, 0x1e2c,
+ 0x1e2e, 0x1e2e,
+ 0x1e30, 0x1e30,
+ 0x1e32, 0x1e32,
+ 0x1e34, 0x1e34,
+ 0x1e36, 0x1e36,
+ 0x1e38, 0x1e38,
+ 0x1e3a, 0x1e3a,
+ 0x1e3c, 0x1e3c,
+ 0x1e3e, 0x1e3e,
+ 0x1e40, 0x1e40,
+ 0x1e42, 0x1e42,
+ 0x1e44, 0x1e44,
+ 0x1e46, 0x1e46,
+ 0x1e48, 0x1e48,
+ 0x1e4a, 0x1e4a,
+ 0x1e4c, 0x1e4c,
+ 0x1e4e, 0x1e4e,
+ 0x1e50, 0x1e50,
+ 0x1e52, 0x1e52,
+ 0x1e54, 0x1e54,
+ 0x1e56, 0x1e56,
+ 0x1e58, 0x1e58,
+ 0x1e5a, 0x1e5a,
+ 0x1e5c, 0x1e5c,
+ 0x1e5e, 0x1e5e,
+ 0x1e60, 0x1e60,
+ 0x1e62, 0x1e62,
+ 0x1e64, 0x1e64,
+ 0x1e66, 0x1e66,
+ 0x1e68, 0x1e68,
+ 0x1e6a, 0x1e6a,
+ 0x1e6c, 0x1e6c,
+ 0x1e6e, 0x1e6e,
+ 0x1e70, 0x1e70,
+ 0x1e72, 0x1e72,
+ 0x1e74, 0x1e74,
+ 0x1e76, 0x1e76,
+ 0x1e78, 0x1e78,
+ 0x1e7a, 0x1e7a,
+ 0x1e7c, 0x1e7c,
+ 0x1e7e, 0x1e7e,
+ 0x1e80, 0x1e80,
+ 0x1e82, 0x1e82,
+ 0x1e84, 0x1e84,
+ 0x1e86, 0x1e86,
+ 0x1e88, 0x1e88,
+ 0x1e8a, 0x1e8a,
+ 0x1e8c, 0x1e8c,
+ 0x1e8e, 0x1e8e,
+ 0x1e90, 0x1e90,
+ 0x1e92, 0x1e92,
+ 0x1e94, 0x1e94,
+ 0x1ea0, 0x1ea0,
+ 0x1ea2, 0x1ea2,
+ 0x1ea4, 0x1ea4,
+ 0x1ea6, 0x1ea6,
+ 0x1ea8, 0x1ea8,
+ 0x1eaa, 0x1eaa,
+ 0x1eac, 0x1eac,
+ 0x1eae, 0x1eae,
+ 0x1eb0, 0x1eb0,
+ 0x1eb2, 0x1eb2,
+ 0x1eb4, 0x1eb4,
+ 0x1eb6, 0x1eb6,
+ 0x1eb8, 0x1eb8,
+ 0x1eba, 0x1eba,
+ 0x1ebc, 0x1ebc,
+ 0x1ebe, 0x1ebe,
+ 0x1ec0, 0x1ec0,
+ 0x1ec2, 0x1ec2,
+ 0x1ec4, 0x1ec4,
+ 0x1ec6, 0x1ec6,
+ 0x1ec8, 0x1ec8,
+ 0x1eca, 0x1eca,
+ 0x1ecc, 0x1ecc,
+ 0x1ece, 0x1ece,
+ 0x1ed0, 0x1ed0,
+ 0x1ed2, 0x1ed2,
+ 0x1ed4, 0x1ed4,
+ 0x1ed6, 0x1ed6,
+ 0x1ed8, 0x1ed8,
+ 0x1eda, 0x1eda,
+ 0x1edc, 0x1edc,
+ 0x1ede, 0x1ede,
+ 0x1ee0, 0x1ee0,
+ 0x1ee2, 0x1ee2,
+ 0x1ee4, 0x1ee4,
+ 0x1ee6, 0x1ee6,
+ 0x1ee8, 0x1ee8,
+ 0x1eea, 0x1eea,
+ 0x1eec, 0x1eec,
+ 0x1eee, 0x1eee,
+ 0x1ef0, 0x1ef0,
+ 0x1ef2, 0x1ef2,
+ 0x1ef4, 0x1ef4,
+ 0x1ef6, 0x1ef6,
+ 0x1ef8, 0x1ef8,
+ 0x1f08, 0x1f0f,
+ 0x1f18, 0x1f1d,
+ 0x1f28, 0x1f2f,
+ 0x1f38, 0x1f3f,
+ 0x1f48, 0x1f4d,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f5f,
+ 0x1f68, 0x1f6f,
+ 0x1fb8, 0x1fbb,
+ 0x1fc8, 0x1fcb,
+ 0x1fd8, 0x1fdb,
+ 0x1fe8, 0x1fec,
+ 0x1ff8, 0x1ffb,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210b, 0x210d,
+ 0x2110, 0x2112,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x2130, 0x2131,
+ 0x2133, 0x2133,
+ 0x213e, 0x213f,
+ 0x2145, 0x2145,
+ 0x2c00, 0x2c2e,
+ 0x2c80, 0x2c80,
+ 0x2c82, 0x2c82,
+ 0x2c84, 0x2c84,
+ 0x2c86, 0x2c86,
+ 0x2c88, 0x2c88,
+ 0x2c8a, 0x2c8a,
+ 0x2c8c, 0x2c8c,
+ 0x2c8e, 0x2c8e,
+ 0x2c90, 0x2c90,
+ 0x2c92, 0x2c92,
+ 0x2c94, 0x2c94,
+ 0x2c96, 0x2c96,
+ 0x2c98, 0x2c98,
+ 0x2c9a, 0x2c9a,
+ 0x2c9c, 0x2c9c,
+ 0x2c9e, 0x2c9e,
+ 0x2ca0, 0x2ca0,
+ 0x2ca2, 0x2ca2,
+ 0x2ca4, 0x2ca4,
+ 0x2ca6, 0x2ca6,
+ 0x2ca8, 0x2ca8,
+ 0x2caa, 0x2caa,
+ 0x2cac, 0x2cac,
+ 0x2cae, 0x2cae,
+ 0x2cb0, 0x2cb0,
+ 0x2cb2, 0x2cb2,
+ 0x2cb4, 0x2cb4,
+ 0x2cb6, 0x2cb6,
+ 0x2cb8, 0x2cb8,
+ 0x2cba, 0x2cba,
+ 0x2cbc, 0x2cbc,
+ 0x2cbe, 0x2cbe,
+ 0x2cc0, 0x2cc0,
+ 0x2cc2, 0x2cc2,
+ 0x2cc4, 0x2cc4,
+ 0x2cc6, 0x2cc6,
+ 0x2cc8, 0x2cc8,
+ 0x2cca, 0x2cca,
+ 0x2ccc, 0x2ccc,
+ 0x2cce, 0x2cce,
+ 0x2cd0, 0x2cd0,
+ 0x2cd2, 0x2cd2,
+ 0x2cd4, 0x2cd4,
+ 0x2cd6, 0x2cd6,
+ 0x2cd8, 0x2cd8,
+ 0x2cda, 0x2cda,
+ 0x2cdc, 0x2cdc,
+ 0x2cde, 0x2cde,
+ 0x2ce0, 0x2ce0,
+ 0x2ce2, 0x2ce2,
+ 0xff21, 0xff3a,
+ 0x10400, 0x10427,
+ 0x1d400, 0x1d419,
+ 0x1d434, 0x1d44d,
+ 0x1d468, 0x1d481,
+ 0x1d49c, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b5,
+ 0x1d4d0, 0x1d4e9,
+ 0x1d504, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d538, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d56c, 0x1d585,
+ 0x1d5a0, 0x1d5b9,
+ 0x1d5d4, 0x1d5ed,
+ 0x1d608, 0x1d621,
+ 0x1d63c, 0x1d655,
+ 0x1d670, 0x1d689,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6e2, 0x1d6fa,
+ 0x1d71c, 0x1d734,
+ 0x1d756, 0x1d76e,
+ 0x1d790, 0x1d7a8
+}; /* CR_Lu */
+
+/* 'M': Major Category */
+static const OnigCodePoint CR_M[] = {
+ 133,
+ 0x0300, 0x036f,
+ 0x0483, 0x0486,
+ 0x0488, 0x0489,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x0615,
+ 0x064b, 0x065e,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06de, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x0901, 0x0903,
+ 0x093c, 0x093c,
+ 0x093e, 0x094d,
+ 0x0951, 0x0954,
+ 0x0962, 0x0963,
+ 0x0981, 0x0983,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09e2, 0x09e3,
+ 0x0a01, 0x0a03,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a70, 0x0a71,
+ 0x0a81, 0x0a83,
+ 0x0abc, 0x0abc,
+ 0x0abe, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0b01, 0x0b03,
+ 0x0b3c, 0x0b3c,
+ 0x0b3e, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b82, 0x0b82,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0c01, 0x0c03,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c82, 0x0c83,
+ 0x0cbc, 0x0cbc,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0d02, 0x0d03,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d82, 0x0d83,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e47, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0eb9,
+ 0x0ebb, 0x0ebc,
+ 0x0ec8, 0x0ecd,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f3f,
+ 0x0f71, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1056, 0x1059,
+ 0x135f, 0x135f,
+ 0x1712, 0x1714,
+ 0x1732, 0x1734,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b6, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180d,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x19b0, 0x19c0,
+ 0x19c8, 0x19c9,
+ 0x1a17, 0x1a1b,
+ 0x1dc0, 0x1dc3,
+ 0x20d0, 0x20eb,
+ 0x302a, 0x302f,
+ 0x3099, 0x309a,
+ 0xa802, 0xa802,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa823, 0xa827,
+ 0xfb1e, 0xfb1e,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe23,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x1d165, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0xe0100, 0xe01ef
+}; /* CR_M */
+
+/* 'Mc': General Category */
+static const OnigCodePoint CR_Mc[] = {
+ 63,
+ 0x0903, 0x0903,
+ 0x093e, 0x0940,
+ 0x0949, 0x094c,
+ 0x0982, 0x0983,
+ 0x09be, 0x09c0,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x09d7, 0x09d7,
+ 0x0a03, 0x0a03,
+ 0x0a3e, 0x0a40,
+ 0x0a83, 0x0a83,
+ 0x0abe, 0x0ac0,
+ 0x0ac9, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0b02, 0x0b03,
+ 0x0b3e, 0x0b3e,
+ 0x0b40, 0x0b40,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0b57, 0x0b57,
+ 0x0bbe, 0x0bbf,
+ 0x0bc1, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0bd7, 0x0bd7,
+ 0x0c01, 0x0c03,
+ 0x0c41, 0x0c44,
+ 0x0c82, 0x0c83,
+ 0x0cbe, 0x0cbe,
+ 0x0cc0, 0x0cc4,
+ 0x0cc7, 0x0cc8,
+ 0x0cca, 0x0ccb,
+ 0x0cd5, 0x0cd6,
+ 0x0d02, 0x0d03,
+ 0x0d3e, 0x0d40,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d57, 0x0d57,
+ 0x0d82, 0x0d83,
+ 0x0dcf, 0x0dd1,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0f3e, 0x0f3f,
+ 0x0f7f, 0x0f7f,
+ 0x102c, 0x102c,
+ 0x1031, 0x1031,
+ 0x1038, 0x1038,
+ 0x1056, 0x1057,
+ 0x17b6, 0x17b6,
+ 0x17be, 0x17c5,
+ 0x17c7, 0x17c8,
+ 0x1923, 0x1926,
+ 0x1929, 0x192b,
+ 0x1930, 0x1931,
+ 0x1933, 0x1938,
+ 0x19b0, 0x19c0,
+ 0x19c8, 0x19c9,
+ 0x1a19, 0x1a1b,
+ 0xa802, 0xa802,
+ 0xa823, 0xa824,
+ 0xa827, 0xa827,
+ 0x1d165, 0x1d166,
+ 0x1d16d, 0x1d172
+}; /* CR_Mc */
+
+/* 'Me': General Category */
+static const OnigCodePoint CR_Me[] = {
+ 4,
+ 0x0488, 0x0489,
+ 0x06de, 0x06de,
+ 0x20dd, 0x20e0,
+ 0x20e2, 0x20e4
+}; /* CR_Me */
+
+/* 'Mn': General Category */
+static const OnigCodePoint CR_Mn[] = {
+ 124,
+ 0x0300, 0x036f,
+ 0x0483, 0x0486,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x0615,
+ 0x064b, 0x065e,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06df, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x0901, 0x0902,
+ 0x093c, 0x093c,
+ 0x0941, 0x0948,
+ 0x094d, 0x094d,
+ 0x0951, 0x0954,
+ 0x0962, 0x0963,
+ 0x0981, 0x0981,
+ 0x09bc, 0x09bc,
+ 0x09c1, 0x09c4,
+ 0x09cd, 0x09cd,
+ 0x09e2, 0x09e3,
+ 0x0a01, 0x0a02,
+ 0x0a3c, 0x0a3c,
+ 0x0a41, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a70, 0x0a71,
+ 0x0a81, 0x0a82,
+ 0x0abc, 0x0abc,
+ 0x0ac1, 0x0ac5,
+ 0x0ac7, 0x0ac8,
+ 0x0acd, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0b01, 0x0b01,
+ 0x0b3c, 0x0b3c,
+ 0x0b3f, 0x0b3f,
+ 0x0b41, 0x0b43,
+ 0x0b4d, 0x0b4d,
+ 0x0b56, 0x0b56,
+ 0x0b82, 0x0b82,
+ 0x0bc0, 0x0bc0,
+ 0x0bcd, 0x0bcd,
+ 0x0c3e, 0x0c40,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0cbc, 0x0cbc,
+ 0x0cbf, 0x0cbf,
+ 0x0cc6, 0x0cc6,
+ 0x0ccc, 0x0ccd,
+ 0x0d41, 0x0d43,
+ 0x0d4d, 0x0d4d,
+ 0x0dca, 0x0dca,
+ 0x0dd2, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e47, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0eb9,
+ 0x0ebb, 0x0ebc,
+ 0x0ec8, 0x0ecd,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f71, 0x0f7e,
+ 0x0f80, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102d, 0x1030,
+ 0x1032, 0x1032,
+ 0x1036, 0x1037,
+ 0x1039, 0x1039,
+ 0x1058, 0x1059,
+ 0x135f, 0x135f,
+ 0x1712, 0x1714,
+ 0x1732, 0x1734,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b7, 0x17bd,
+ 0x17c6, 0x17c6,
+ 0x17c9, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180d,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x1922,
+ 0x1927, 0x1928,
+ 0x1932, 0x1932,
+ 0x1939, 0x193b,
+ 0x1a17, 0x1a18,
+ 0x1dc0, 0x1dc3,
+ 0x20d0, 0x20dc,
+ 0x20e1, 0x20e1,
+ 0x20e5, 0x20eb,
+ 0x302a, 0x302f,
+ 0x3099, 0x309a,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa825, 0xa826,
+ 0xfb1e, 0xfb1e,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe23,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x1d167, 0x1d169,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0xe0100, 0xe01ef
+}; /* CR_Mn */
+
+/* 'N': Major Category */
+static const OnigCodePoint CR_N[] = {
+ 53,
+ 0x0030, 0x0039,
+ 0x00b2, 0x00b3,
+ 0x00b9, 0x00b9,
+ 0x00bc, 0x00be,
+ 0x0660, 0x0669,
+ 0x06f0, 0x06f9,
+ 0x0966, 0x096f,
+ 0x09e6, 0x09ef,
+ 0x09f4, 0x09f9,
+ 0x0a66, 0x0a6f,
+ 0x0ae6, 0x0aef,
+ 0x0b66, 0x0b6f,
+ 0x0be6, 0x0bf2,
+ 0x0c66, 0x0c6f,
+ 0x0ce6, 0x0cef,
+ 0x0d66, 0x0d6f,
+ 0x0e50, 0x0e59,
+ 0x0ed0, 0x0ed9,
+ 0x0f20, 0x0f33,
+ 0x1040, 0x1049,
+ 0x1369, 0x137c,
+ 0x16ee, 0x16f0,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1810, 0x1819,
+ 0x1946, 0x194f,
+ 0x19d0, 0x19d9,
+ 0x2070, 0x2070,
+ 0x2074, 0x2079,
+ 0x2080, 0x2089,
+ 0x2153, 0x2183,
+ 0x2460, 0x249b,
+ 0x24ea, 0x24ff,
+ 0x2776, 0x2793,
+ 0x2cfd, 0x2cfd,
+ 0x3007, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303a,
+ 0x3192, 0x3195,
+ 0x3220, 0x3229,
+ 0x3251, 0x325f,
+ 0x3280, 0x3289,
+ 0x32b1, 0x32bf,
+ 0xff10, 0xff19,
+ 0x10107, 0x10133,
+ 0x10140, 0x10178,
+ 0x1018a, 0x1018a,
+ 0x10320, 0x10323,
+ 0x1034a, 0x1034a,
+ 0x103d1, 0x103d5,
+ 0x104a0, 0x104a9,
+ 0x10a40, 0x10a47,
+ 0x1d7ce, 0x1d7ff
+}; /* CR_N */
+
+/* 'Nd': General Category */
+static const OnigCodePoint CR_Nd[] = {
+ 23,
+ 0x0030, 0x0039,
+ 0x0660, 0x0669,
+ 0x06f0, 0x06f9,
+ 0x0966, 0x096f,
+ 0x09e6, 0x09ef,
+ 0x0a66, 0x0a6f,
+ 0x0ae6, 0x0aef,
+ 0x0b66, 0x0b6f,
+ 0x0be6, 0x0bef,
+ 0x0c66, 0x0c6f,
+ 0x0ce6, 0x0cef,
+ 0x0d66, 0x0d6f,
+ 0x0e50, 0x0e59,
+ 0x0ed0, 0x0ed9,
+ 0x0f20, 0x0f29,
+ 0x1040, 0x1049,
+ 0x17e0, 0x17e9,
+ 0x1810, 0x1819,
+ 0x1946, 0x194f,
+ 0x19d0, 0x19d9,
+ 0xff10, 0xff19,
+ 0x104a0, 0x104a9,
+ 0x1d7ce, 0x1d7ff
+}; /* CR_Nd */
+
+/* 'Nl': General Category */
+static const OnigCodePoint CR_Nl[] = {
+ 8,
+ 0x16ee, 0x16f0,
+ 0x2160, 0x2183,
+ 0x3007, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303a,
+ 0x10140, 0x10174,
+ 0x1034a, 0x1034a,
+ 0x103d1, 0x103d5
+}; /* CR_Nl */
+
+/* 'No': General Category */
+static const OnigCodePoint CR_No[] = {
+ 26,
+ 0x00b2, 0x00b3,
+ 0x00b9, 0x00b9,
+ 0x00bc, 0x00be,
+ 0x09f4, 0x09f9,
+ 0x0bf0, 0x0bf2,
+ 0x0f2a, 0x0f33,
+ 0x1369, 0x137c,
+ 0x17f0, 0x17f9,
+ 0x2070, 0x2070,
+ 0x2074, 0x2079,
+ 0x2080, 0x2089,
+ 0x2153, 0x215f,
+ 0x2460, 0x249b,
+ 0x24ea, 0x24ff,
+ 0x2776, 0x2793,
+ 0x2cfd, 0x2cfd,
+ 0x3192, 0x3195,
+ 0x3220, 0x3229,
+ 0x3251, 0x325f,
+ 0x3280, 0x3289,
+ 0x32b1, 0x32bf,
+ 0x10107, 0x10133,
+ 0x10175, 0x10178,
+ 0x1018a, 0x1018a,
+ 0x10320, 0x10323,
+ 0x10a40, 0x10a47
+}; /* CR_No */
+
+/* 'P': Major Category */
+static const OnigCodePoint CR_P[] = {
+ 96,
+ 0x0021, 0x0023,
+ 0x0025, 0x002a,
+ 0x002c, 0x002f,
+ 0x003a, 0x003b,
+ 0x003f, 0x0040,
+ 0x005b, 0x005d,
+ 0x005f, 0x005f,
+ 0x007b, 0x007b,
+ 0x007d, 0x007d,
+ 0x00a1, 0x00a1,
+ 0x00ab, 0x00ab,
+ 0x00b7, 0x00b7,
+ 0x00bb, 0x00bb,
+ 0x00bf, 0x00bf,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x055a, 0x055f,
+ 0x0589, 0x058a,
+ 0x05be, 0x05be,
+ 0x05c0, 0x05c0,
+ 0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
+ 0x05f3, 0x05f4,
+ 0x060c, 0x060d,
+ 0x061b, 0x061b,
+ 0x061e, 0x061f,
+ 0x066a, 0x066d,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x070d,
+ 0x0964, 0x0965,
+ 0x0970, 0x0970,
+ 0x0df4, 0x0df4,
+ 0x0e4f, 0x0e4f,
+ 0x0e5a, 0x0e5b,
+ 0x0f04, 0x0f12,
+ 0x0f3a, 0x0f3d,
+ 0x0f85, 0x0f85,
+ 0x0fd0, 0x0fd1,
+ 0x104a, 0x104f,
+ 0x10fb, 0x10fb,
+ 0x1361, 0x1368,
+ 0x166d, 0x166e,
+ 0x169b, 0x169c,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x17d4, 0x17d6,
+ 0x17d8, 0x17da,
+ 0x1800, 0x180a,
+ 0x1944, 0x1945,
+ 0x19de, 0x19df,
+ 0x1a1e, 0x1a1f,
+ 0x2010, 0x2027,
+ 0x2030, 0x2043,
+ 0x2045, 0x2051,
+ 0x2053, 0x205e,
+ 0x207d, 0x207e,
+ 0x208d, 0x208e,
+ 0x2329, 0x232a,
+ 0x23b4, 0x23b6,
+ 0x2768, 0x2775,
+ 0x27c5, 0x27c6,
+ 0x27e6, 0x27eb,
+ 0x2983, 0x2998,
+ 0x29d8, 0x29db,
+ 0x29fc, 0x29fd,
+ 0x2cf9, 0x2cfc,
+ 0x2cfe, 0x2cff,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
+ 0x3001, 0x3003,
+ 0x3008, 0x3011,
+ 0x3014, 0x301f,
+ 0x3030, 0x3030,
+ 0x303d, 0x303d,
+ 0x30a0, 0x30a0,
+ 0x30fb, 0x30fb,
+ 0xfd3e, 0xfd3f,
+ 0xfe10, 0xfe19,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe61,
+ 0xfe63, 0xfe63,
+ 0xfe68, 0xfe68,
+ 0xfe6a, 0xfe6b,
+ 0xff01, 0xff03,
+ 0xff05, 0xff0a,
+ 0xff0c, 0xff0f,
+ 0xff1a, 0xff1b,
+ 0xff1f, 0xff20,
+ 0xff3b, 0xff3d,
+ 0xff3f, 0xff3f,
+ 0xff5b, 0xff5b,
+ 0xff5d, 0xff5d,
+ 0xff5f, 0xff65,
+ 0x10100, 0x10101,
+ 0x1039f, 0x1039f,
+ 0x10a50, 0x10a58
+}; /* CR_P */
+
+/* 'Pc': General Category */
+static const OnigCodePoint CR_Pc[] = {
+ 6,
+ 0x005f, 0x005f,
+ 0x203f, 0x2040,
+ 0x2054, 0x2054,
+ 0xfe33, 0xfe34,
+ 0xfe4d, 0xfe4f,
+ 0xff3f, 0xff3f
+}; /* CR_Pc */
+
+/* 'Pd': General Category */
+static const OnigCodePoint CR_Pd[] = {
+ 12,
+ 0x002d, 0x002d,
+ 0x058a, 0x058a,
+ 0x1806, 0x1806,
+ 0x2010, 0x2015,
+ 0x2e17, 0x2e17,
+ 0x301c, 0x301c,
+ 0x3030, 0x3030,
+ 0x30a0, 0x30a0,
+ 0xfe31, 0xfe32,
+ 0xfe58, 0xfe58,
+ 0xfe63, 0xfe63,
+ 0xff0d, 0xff0d
+}; /* CR_Pd */
+
+/* 'Pe': General Category */
+static const OnigCodePoint CR_Pe[] = {
+ 65,
+ 0x0029, 0x0029,
+ 0x005d, 0x005d,
+ 0x007d, 0x007d,
+ 0x0f3b, 0x0f3b,
+ 0x0f3d, 0x0f3d,
+ 0x169c, 0x169c,
+ 0x2046, 0x2046,
+ 0x207e, 0x207e,
+ 0x208e, 0x208e,
+ 0x232a, 0x232a,
+ 0x23b5, 0x23b5,
+ 0x2769, 0x2769,
+ 0x276b, 0x276b,
+ 0x276d, 0x276d,
+ 0x276f, 0x276f,
+ 0x2771, 0x2771,
+ 0x2773, 0x2773,
+ 0x2775, 0x2775,
+ 0x27c6, 0x27c6,
+ 0x27e7, 0x27e7,
+ 0x27e9, 0x27e9,
+ 0x27eb, 0x27eb,
+ 0x2984, 0x2984,
+ 0x2986, 0x2986,
+ 0x2988, 0x2988,
+ 0x298a, 0x298a,
+ 0x298c, 0x298c,
+ 0x298e, 0x298e,
+ 0x2990, 0x2990,
+ 0x2992, 0x2992,
+ 0x2994, 0x2994,
+ 0x2996, 0x2996,
+ 0x2998, 0x2998,
+ 0x29d9, 0x29d9,
+ 0x29db, 0x29db,
+ 0x29fd, 0x29fd,
+ 0x3009, 0x3009,
+ 0x300b, 0x300b,
+ 0x300d, 0x300d,
+ 0x300f, 0x300f,
+ 0x3011, 0x3011,
+ 0x3015, 0x3015,
+ 0x3017, 0x3017,
+ 0x3019, 0x3019,
+ 0x301b, 0x301b,
+ 0x301e, 0x301f,
+ 0xfd3f, 0xfd3f,
+ 0xfe18, 0xfe18,
+ 0xfe36, 0xfe36,
+ 0xfe38, 0xfe38,
+ 0xfe3a, 0xfe3a,
+ 0xfe3c, 0xfe3c,
+ 0xfe3e, 0xfe3e,
+ 0xfe40, 0xfe40,
+ 0xfe42, 0xfe42,
+ 0xfe44, 0xfe44,
+ 0xfe48, 0xfe48,
+ 0xfe5a, 0xfe5a,
+ 0xfe5c, 0xfe5c,
+ 0xfe5e, 0xfe5e,
+ 0xff09, 0xff09,
+ 0xff3d, 0xff3d,
+ 0xff5d, 0xff5d,
+ 0xff60, 0xff60,
+ 0xff63, 0xff63
+}; /* CR_Pe */
+
+/* 'Pf': General Category */
+static const OnigCodePoint CR_Pf[] = {
+ 9,
+ 0x00bb, 0x00bb,
+ 0x2019, 0x2019,
+ 0x201d, 0x201d,
+ 0x203a, 0x203a,
+ 0x2e03, 0x2e03,
+ 0x2e05, 0x2e05,
+ 0x2e0a, 0x2e0a,
+ 0x2e0d, 0x2e0d,
+ 0x2e1d, 0x2e1d
+}; /* CR_Pf */
+
+/* 'Pi': General Category */
+static const OnigCodePoint CR_Pi[] = {
+ 10,
+ 0x00ab, 0x00ab,
+ 0x2018, 0x2018,
+ 0x201b, 0x201c,
+ 0x201f, 0x201f,
+ 0x2039, 0x2039,
+ 0x2e02, 0x2e02,
+ 0x2e04, 0x2e04,
+ 0x2e09, 0x2e09,
+ 0x2e0c, 0x2e0c,
+ 0x2e1c, 0x2e1c
+}; /* CR_Pi */
+
+/* 'Po': General Category */
+static const OnigCodePoint CR_Po[] = {
+ 88,
+ 0x0021, 0x0023,
+ 0x0025, 0x0027,
+ 0x002a, 0x002a,
+ 0x002c, 0x002c,
+ 0x002e, 0x002f,
+ 0x003a, 0x003b,
+ 0x003f, 0x0040,
+ 0x005c, 0x005c,
+ 0x00a1, 0x00a1,
+ 0x00b7, 0x00b7,
+ 0x00bf, 0x00bf,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x055a, 0x055f,
+ 0x0589, 0x0589,
+ 0x05be, 0x05be,
+ 0x05c0, 0x05c0,
+ 0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
+ 0x05f3, 0x05f4,
+ 0x060c, 0x060d,
+ 0x061b, 0x061b,
+ 0x061e, 0x061f,
+ 0x066a, 0x066d,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x070d,
+ 0x0964, 0x0965,
+ 0x0970, 0x0970,
+ 0x0df4, 0x0df4,
+ 0x0e4f, 0x0e4f,
+ 0x0e5a, 0x0e5b,
+ 0x0f04, 0x0f12,
+ 0x0f85, 0x0f85,
+ 0x0fd0, 0x0fd1,
+ 0x104a, 0x104f,
+ 0x10fb, 0x10fb,
+ 0x1361, 0x1368,
+ 0x166d, 0x166e,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x17d4, 0x17d6,
+ 0x17d8, 0x17da,
+ 0x1800, 0x1805,
+ 0x1807, 0x180a,
+ 0x1944, 0x1945,
+ 0x19de, 0x19df,
+ 0x1a1e, 0x1a1f,
+ 0x2016, 0x2017,
+ 0x2020, 0x2027,
+ 0x2030, 0x2038,
+ 0x203b, 0x203e,
+ 0x2041, 0x2043,
+ 0x2047, 0x2051,
+ 0x2053, 0x2053,
+ 0x2055, 0x205e,
+ 0x23b6, 0x23b6,
+ 0x2cf9, 0x2cfc,
+ 0x2cfe, 0x2cff,
+ 0x2e00, 0x2e01,
+ 0x2e06, 0x2e08,
+ 0x2e0b, 0x2e0b,
+ 0x2e0e, 0x2e16,
+ 0x3001, 0x3003,
+ 0x303d, 0x303d,
+ 0x30fb, 0x30fb,
+ 0xfe10, 0xfe16,
+ 0xfe19, 0xfe19,
+ 0xfe30, 0xfe30,
+ 0xfe45, 0xfe46,
+ 0xfe49, 0xfe4c,
+ 0xfe50, 0xfe52,
+ 0xfe54, 0xfe57,
+ 0xfe5f, 0xfe61,
+ 0xfe68, 0xfe68,
+ 0xfe6a, 0xfe6b,
+ 0xff01, 0xff03,
+ 0xff05, 0xff07,
+ 0xff0a, 0xff0a,
+ 0xff0c, 0xff0c,
+ 0xff0e, 0xff0f,
+ 0xff1a, 0xff1b,
+ 0xff1f, 0xff20,
+ 0xff3c, 0xff3c,
+ 0xff61, 0xff61,
+ 0xff64, 0xff65,
+ 0x10100, 0x10101,
+ 0x1039f, 0x1039f,
+ 0x10a50, 0x10a58
+}; /* CR_Po */
+
+/* 'Ps': General Category */
+static const OnigCodePoint CR_Ps[] = {
+ 67,
+ 0x0028, 0x0028,
+ 0x005b, 0x005b,
+ 0x007b, 0x007b,
+ 0x0f3a, 0x0f3a,
+ 0x0f3c, 0x0f3c,
+ 0x169b, 0x169b,
+ 0x201a, 0x201a,
+ 0x201e, 0x201e,
+ 0x2045, 0x2045,
+ 0x207d, 0x207d,
+ 0x208d, 0x208d,
+ 0x2329, 0x2329,
+ 0x23b4, 0x23b4,
+ 0x2768, 0x2768,
+ 0x276a, 0x276a,
+ 0x276c, 0x276c,
+ 0x276e, 0x276e,
+ 0x2770, 0x2770,
+ 0x2772, 0x2772,
+ 0x2774, 0x2774,
+ 0x27c5, 0x27c5,
+ 0x27e6, 0x27e6,
+ 0x27e8, 0x27e8,
+ 0x27ea, 0x27ea,
+ 0x2983, 0x2983,
+ 0x2985, 0x2985,
+ 0x2987, 0x2987,
+ 0x2989, 0x2989,
+ 0x298b, 0x298b,
+ 0x298d, 0x298d,
+ 0x298f, 0x298f,
+ 0x2991, 0x2991,
+ 0x2993, 0x2993,
+ 0x2995, 0x2995,
+ 0x2997, 0x2997,
+ 0x29d8, 0x29d8,
+ 0x29da, 0x29da,
+ 0x29fc, 0x29fc,
+ 0x3008, 0x3008,
+ 0x300a, 0x300a,
+ 0x300c, 0x300c,
+ 0x300e, 0x300e,
+ 0x3010, 0x3010,
+ 0x3014, 0x3014,
+ 0x3016, 0x3016,
+ 0x3018, 0x3018,
+ 0x301a, 0x301a,
+ 0x301d, 0x301d,
+ 0xfd3e, 0xfd3e,
+ 0xfe17, 0xfe17,
+ 0xfe35, 0xfe35,
+ 0xfe37, 0xfe37,
+ 0xfe39, 0xfe39,
+ 0xfe3b, 0xfe3b,
+ 0xfe3d, 0xfe3d,
+ 0xfe3f, 0xfe3f,
+ 0xfe41, 0xfe41,
+ 0xfe43, 0xfe43,
+ 0xfe47, 0xfe47,
+ 0xfe59, 0xfe59,
+ 0xfe5b, 0xfe5b,
+ 0xfe5d, 0xfe5d,
+ 0xff08, 0xff08,
+ 0xff3b, 0xff3b,
+ 0xff5b, 0xff5b,
+ 0xff5f, 0xff5f,
+ 0xff62, 0xff62
+}; /* CR_Ps */
+
+/* 'S': Major Category */
+static const OnigCodePoint CR_S[] = {
+ 162,
+ 0x0024, 0x0024,
+ 0x002b, 0x002b,
+ 0x003c, 0x003e,
+ 0x005e, 0x005e,
+ 0x0060, 0x0060,
+ 0x007c, 0x007c,
+ 0x007e, 0x007e,
+ 0x00a2, 0x00a9,
+ 0x00ac, 0x00ac,
+ 0x00ae, 0x00b1,
+ 0x00b4, 0x00b4,
+ 0x00b6, 0x00b6,
+ 0x00b8, 0x00b8,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x02c2, 0x02c5,
+ 0x02d2, 0x02df,
+ 0x02e5, 0x02ed,
+ 0x02ef, 0x02ff,
+ 0x0374, 0x0375,
+ 0x0384, 0x0385,
+ 0x03f6, 0x03f6,
+ 0x0482, 0x0482,
+ 0x060b, 0x060b,
+ 0x060e, 0x060f,
+ 0x06e9, 0x06e9,
+ 0x06fd, 0x06fe,
+ 0x09f2, 0x09f3,
+ 0x09fa, 0x09fa,
+ 0x0af1, 0x0af1,
+ 0x0b70, 0x0b70,
+ 0x0bf3, 0x0bfa,
+ 0x0e3f, 0x0e3f,
+ 0x0f01, 0x0f03,
+ 0x0f13, 0x0f17,
+ 0x0f1a, 0x0f1f,
+ 0x0f34, 0x0f34,
+ 0x0f36, 0x0f36,
+ 0x0f38, 0x0f38,
+ 0x0fbe, 0x0fc5,
+ 0x0fc7, 0x0fcc,
+ 0x0fcf, 0x0fcf,
+ 0x1360, 0x1360,
+ 0x1390, 0x1399,
+ 0x17db, 0x17db,
+ 0x1940, 0x1940,
+ 0x19e0, 0x19ff,
+ 0x1fbd, 0x1fbd,
+ 0x1fbf, 0x1fc1,
+ 0x1fcd, 0x1fcf,
+ 0x1fdd, 0x1fdf,
+ 0x1fed, 0x1fef,
+ 0x1ffd, 0x1ffe,
+ 0x2044, 0x2044,
+ 0x2052, 0x2052,
+ 0x207a, 0x207c,
+ 0x208a, 0x208c,
+ 0x20a0, 0x20b5,
+ 0x2100, 0x2101,
+ 0x2103, 0x2106,
+ 0x2108, 0x2109,
+ 0x2114, 0x2114,
+ 0x2116, 0x2118,
+ 0x211e, 0x2123,
+ 0x2125, 0x2125,
+ 0x2127, 0x2127,
+ 0x2129, 0x2129,
+ 0x212e, 0x212e,
+ 0x2132, 0x2132,
+ 0x213a, 0x213b,
+ 0x2140, 0x2144,
+ 0x214a, 0x214c,
+ 0x2190, 0x2328,
+ 0x232b, 0x23b3,
+ 0x23b7, 0x23db,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x249c, 0x24e9,
+ 0x2500, 0x269c,
+ 0x26a0, 0x26b1,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2794, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27c4,
+ 0x27d0, 0x27e5,
+ 0x27f0, 0x2982,
+ 0x2999, 0x29d7,
+ 0x29dc, 0x29fb,
+ 0x29fe, 0x2b13,
+ 0x2ce5, 0x2cea,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3004, 0x3004,
+ 0x3012, 0x3013,
+ 0x3020, 0x3020,
+ 0x3036, 0x3037,
+ 0x303e, 0x303f,
+ 0x309b, 0x309c,
+ 0x3190, 0x3191,
+ 0x3196, 0x319f,
+ 0x31c0, 0x31cf,
+ 0x3200, 0x321e,
+ 0x322a, 0x3243,
+ 0x3250, 0x3250,
+ 0x3260, 0x327f,
+ 0x328a, 0x32b0,
+ 0x32c0, 0x32fe,
+ 0x3300, 0x33ff,
+ 0x4dc0, 0x4dff,
+ 0xa490, 0xa4c6,
+ 0xa700, 0xa716,
+ 0xa828, 0xa82b,
+ 0xfb29, 0xfb29,
+ 0xfdfc, 0xfdfd,
+ 0xfe62, 0xfe62,
+ 0xfe64, 0xfe66,
+ 0xfe69, 0xfe69,
+ 0xff04, 0xff04,
+ 0xff0b, 0xff0b,
+ 0xff1c, 0xff1e,
+ 0xff3e, 0xff3e,
+ 0xff40, 0xff40,
+ 0xff5c, 0xff5c,
+ 0xff5e, 0xff5e,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfffc, 0xfffd,
+ 0x10102, 0x10102,
+ 0x10137, 0x1013f,
+ 0x10179, 0x10189,
+ 0x103d0, 0x103d0,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d164,
+ 0x1d16a, 0x1d16c,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1dd,
+ 0x1d200, 0x1d241,
+ 0x1d245, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d6c1, 0x1d6c1,
+ 0x1d6db, 0x1d6db,
+ 0x1d6fb, 0x1d6fb,
+ 0x1d715, 0x1d715,
+ 0x1d735, 0x1d735,
+ 0x1d74f, 0x1d74f,
+ 0x1d76f, 0x1d76f,
+ 0x1d789, 0x1d789,
+ 0x1d7a9, 0x1d7a9,
+ 0x1d7c3, 0x1d7c3
+}; /* CR_S */
+
+/* 'Sc': General Category */
+static const OnigCodePoint CR_Sc[] = {
+ 14,
+ 0x0024, 0x0024,
+ 0x00a2, 0x00a5,
+ 0x060b, 0x060b,
+ 0x09f2, 0x09f3,
+ 0x0af1, 0x0af1,
+ 0x0bf9, 0x0bf9,
+ 0x0e3f, 0x0e3f,
+ 0x17db, 0x17db,
+ 0x20a0, 0x20b5,
+ 0xfdfc, 0xfdfc,
+ 0xfe69, 0xfe69,
+ 0xff04, 0xff04,
+ 0xffe0, 0xffe1,
+ 0xffe5, 0xffe6
+}; /* CR_Sc */
+
+/* 'Sk': General Category */
+static const OnigCodePoint CR_Sk[] = {
+ 23,
+ 0x005e, 0x005e,
+ 0x0060, 0x0060,
+ 0x00a8, 0x00a8,
+ 0x00af, 0x00af,
+ 0x00b4, 0x00b4,
+ 0x00b8, 0x00b8,
+ 0x02c2, 0x02c5,
+ 0x02d2, 0x02df,
+ 0x02e5, 0x02ed,
+ 0x02ef, 0x02ff,
+ 0x0374, 0x0375,
+ 0x0384, 0x0385,
+ 0x1fbd, 0x1fbd,
+ 0x1fbf, 0x1fc1,
+ 0x1fcd, 0x1fcf,
+ 0x1fdd, 0x1fdf,
+ 0x1fed, 0x1fef,
+ 0x1ffd, 0x1ffe,
+ 0x309b, 0x309c,
+ 0xa700, 0xa716,
+ 0xff3e, 0xff3e,
+ 0xff40, 0xff40,
+ 0xffe3, 0xffe3
+}; /* CR_Sk */
+
+/* 'Sm': General Category */
+static const OnigCodePoint CR_Sm[] = {
+ 59,
+ 0x002b, 0x002b,
+ 0x003c, 0x003e,
+ 0x007c, 0x007c,
+ 0x007e, 0x007e,
+ 0x00ac, 0x00ac,
+ 0x00b1, 0x00b1,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x03f6, 0x03f6,
+ 0x2044, 0x2044,
+ 0x2052, 0x2052,
+ 0x207a, 0x207c,
+ 0x208a, 0x208c,
+ 0x2140, 0x2144,
+ 0x214b, 0x214b,
+ 0x2190, 0x2194,
+ 0x219a, 0x219b,
+ 0x21a0, 0x21a0,
+ 0x21a3, 0x21a3,
+ 0x21a6, 0x21a6,
+ 0x21ae, 0x21ae,
+ 0x21ce, 0x21cf,
+ 0x21d2, 0x21d2,
+ 0x21d4, 0x21d4,
+ 0x21f4, 0x22ff,
+ 0x2308, 0x230b,
+ 0x2320, 0x2321,
+ 0x237c, 0x237c,
+ 0x239b, 0x23b3,
+ 0x25b7, 0x25b7,
+ 0x25c1, 0x25c1,
+ 0x25f8, 0x25ff,
+ 0x266f, 0x266f,
+ 0x27c0, 0x27c4,
+ 0x27d0, 0x27e5,
+ 0x27f0, 0x27ff,
+ 0x2900, 0x2982,
+ 0x2999, 0x29d7,
+ 0x29dc, 0x29fb,
+ 0x29fe, 0x2aff,
+ 0xfb29, 0xfb29,
+ 0xfe62, 0xfe62,
+ 0xfe64, 0xfe66,
+ 0xff0b, 0xff0b,
+ 0xff1c, 0xff1e,
+ 0xff5c, 0xff5c,
+ 0xff5e, 0xff5e,
+ 0xffe2, 0xffe2,
+ 0xffe9, 0xffec,
+ 0x1d6c1, 0x1d6c1,
+ 0x1d6db, 0x1d6db,
+ 0x1d6fb, 0x1d6fb,
+ 0x1d715, 0x1d715,
+ 0x1d735, 0x1d735,
+ 0x1d74f, 0x1d74f,
+ 0x1d76f, 0x1d76f,
+ 0x1d789, 0x1d789,
+ 0x1d7a9, 0x1d7a9,
+ 0x1d7c3, 0x1d7c3
+}; /* CR_Sm */
+
+/* 'So': General Category */
+static const OnigCodePoint CR_So[] = {
+ 120,
+ 0x00a6, 0x00a7,
+ 0x00a9, 0x00a9,
+ 0x00ae, 0x00ae,
+ 0x00b0, 0x00b0,
+ 0x00b6, 0x00b6,
+ 0x0482, 0x0482,
+ 0x060e, 0x060f,
+ 0x06e9, 0x06e9,
+ 0x06fd, 0x06fe,
+ 0x09fa, 0x09fa,
+ 0x0b70, 0x0b70,
+ 0x0bf3, 0x0bf8,
+ 0x0bfa, 0x0bfa,
+ 0x0f01, 0x0f03,
+ 0x0f13, 0x0f17,
+ 0x0f1a, 0x0f1f,
+ 0x0f34, 0x0f34,
+ 0x0f36, 0x0f36,
+ 0x0f38, 0x0f38,
+ 0x0fbe, 0x0fc5,
+ 0x0fc7, 0x0fcc,
+ 0x0fcf, 0x0fcf,
+ 0x1360, 0x1360,
+ 0x1390, 0x1399,
+ 0x1940, 0x1940,
+ 0x19e0, 0x19ff,
+ 0x2100, 0x2101,
+ 0x2103, 0x2106,
+ 0x2108, 0x2109,
+ 0x2114, 0x2114,
+ 0x2116, 0x2118,
+ 0x211e, 0x2123,
+ 0x2125, 0x2125,
+ 0x2127, 0x2127,
+ 0x2129, 0x2129,
+ 0x212e, 0x212e,
+ 0x2132, 0x2132,
+ 0x213a, 0x213b,
+ 0x214a, 0x214a,
+ 0x214c, 0x214c,
+ 0x2195, 0x2199,
+ 0x219c, 0x219f,
+ 0x21a1, 0x21a2,
+ 0x21a4, 0x21a5,
+ 0x21a7, 0x21ad,
+ 0x21af, 0x21cd,
+ 0x21d0, 0x21d1,
+ 0x21d3, 0x21d3,
+ 0x21d5, 0x21f3,
+ 0x2300, 0x2307,
+ 0x230c, 0x231f,
+ 0x2322, 0x2328,
+ 0x232b, 0x237b,
+ 0x237d, 0x239a,
+ 0x23b7, 0x23db,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x249c, 0x24e9,
+ 0x2500, 0x25b6,
+ 0x25b8, 0x25c0,
+ 0x25c2, 0x25f7,
+ 0x2600, 0x266e,
+ 0x2670, 0x269c,
+ 0x26a0, 0x26b1,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2794, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x2800, 0x28ff,
+ 0x2b00, 0x2b13,
+ 0x2ce5, 0x2cea,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3004, 0x3004,
+ 0x3012, 0x3013,
+ 0x3020, 0x3020,
+ 0x3036, 0x3037,
+ 0x303e, 0x303f,
+ 0x3190, 0x3191,
+ 0x3196, 0x319f,
+ 0x31c0, 0x31cf,
+ 0x3200, 0x321e,
+ 0x322a, 0x3243,
+ 0x3250, 0x3250,
+ 0x3260, 0x327f,
+ 0x328a, 0x32b0,
+ 0x32c0, 0x32fe,
+ 0x3300, 0x33ff,
+ 0x4dc0, 0x4dff,
+ 0xa490, 0xa4c6,
+ 0xa828, 0xa82b,
+ 0xfdfd, 0xfdfd,
+ 0xffe4, 0xffe4,
+ 0xffe8, 0xffe8,
+ 0xffed, 0xffee,
+ 0xfffc, 0xfffd,
+ 0x10102, 0x10102,
+ 0x10137, 0x1013f,
+ 0x10179, 0x10189,
+ 0x103d0, 0x103d0,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d164,
+ 0x1d16a, 0x1d16c,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1dd,
+ 0x1d200, 0x1d241,
+ 0x1d245, 0x1d245,
+ 0x1d300, 0x1d356
+}; /* CR_So */
+
+/* 'Z': Major Category */
+static const OnigCodePoint CR_Z[] = {
+ 9,
+ 0x0020, 0x0020,
+ 0x00a0, 0x00a0,
+ 0x1680, 0x1680,
+ 0x180e, 0x180e,
+ 0x2000, 0x200a,
+ 0x2028, 0x2029,
+ 0x202f, 0x202f,
+ 0x205f, 0x205f,
+ 0x3000, 0x3000
+}; /* CR_Z */
+
+/* 'Zl': General Category */
+static const OnigCodePoint CR_Zl[] = {
+ 1,
+ 0x2028, 0x2028
+}; /* CR_Zl */
+
+/* 'Zp': General Category */
+static const OnigCodePoint CR_Zp[] = {
+ 1,
+ 0x2029, 0x2029
+}; /* CR_Zp */
+
+/* 'Zs': General Category */
+static const OnigCodePoint CR_Zs[] = {
+ 8,
+ 0x0020, 0x0020,
+ 0x00a0, 0x00a0,
+ 0x1680, 0x1680,
+ 0x180e, 0x180e,
+ 0x2000, 0x200a,
+ 0x202f, 0x202f,
+ 0x205f, 0x205f,
+ 0x3000, 0x3000
+}; /* CR_Zs */
+
+/* 'Arabic': Script */
+static const OnigCodePoint CR_Arabic[] = {
+ 17,
+ 0x060b, 0x060b,
+ 0x060d, 0x0615,
+ 0x061e, 0x061e,
+ 0x0621, 0x063a,
+ 0x0641, 0x064a,
+ 0x0656, 0x065e,
+ 0x066a, 0x066f,
+ 0x0671, 0x06dc,
+ 0x06de, 0x06ff,
+ 0x0750, 0x076d,
+ 0xfb50, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfc,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc
+}; /* CR_Arabic */
+
+/* 'Armenian': Script */
+static const OnigCodePoint CR_Armenian[] = {
+ 5,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x058a, 0x058a,
+ 0xfb13, 0xfb17
+}; /* CR_Armenian */
+
+/* 'Bengali': Script */
+static const OnigCodePoint CR_Bengali[] = {
+ 14,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa
+}; /* CR_Bengali */
+
+/* 'Bopomofo': Script */
+static const OnigCodePoint CR_Bopomofo[] = {
+ 2,
+ 0x3105, 0x312c,
+ 0x31a0, 0x31b7
+}; /* CR_Bopomofo */
+
+/* 'Braille': Script */
+static const OnigCodePoint CR_Braille[] = {
+ 1,
+ 0x2800, 0x28ff
+}; /* CR_Braille */
+
+/* 'Buginese': Script */
+static const OnigCodePoint CR_Buginese[] = {
+ 2,
+ 0x1a00, 0x1a1b,
+ 0x1a1e, 0x1a1f
+}; /* CR_Buginese */
+
+/* 'Buhid': Script */
+static const OnigCodePoint CR_Buhid[] = {
+ 1,
+ 0x1740, 0x1753
+}; /* CR_Buhid */
+
+/* 'Canadian_Aboriginal': Script */
+static const OnigCodePoint CR_Canadian_Aboriginal[] = {
+ 1,
+ 0x1401, 0x1676
+}; /* CR_Canadian_Aboriginal */
+
+/* 'Cherokee': Script */
+static const OnigCodePoint CR_Cherokee[] = {
+ 1,
+ 0x13a0, 0x13f4
+}; /* CR_Cherokee */
+
+/* 'Common': Script */
+static const OnigCodePoint CR_Common[] = {
+ 126,
+ 0x0000, 0x0040,
+ 0x005b, 0x0060,
+ 0x007b, 0x00a9,
+ 0x00ab, 0x00b9,
+ 0x00bb, 0x00bf,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x02b9, 0x02df,
+ 0x02e5, 0x02ff,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x0589, 0x0589,
+ 0x0600, 0x0603,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0640, 0x0640,
+ 0x0660, 0x0669,
+ 0x06dd, 0x06dd,
+ 0x0964, 0x0965,
+ 0x0970, 0x0970,
+ 0x0e3f, 0x0e3f,
+ 0x10fb, 0x10fb,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x2000, 0x200b,
+ 0x200e, 0x2063,
+ 0x206a, 0x2070,
+ 0x2074, 0x207e,
+ 0x2080, 0x208e,
+ 0x20a0, 0x20b5,
+ 0x2100, 0x2125,
+ 0x2127, 0x2129,
+ 0x212c, 0x214c,
+ 0x2153, 0x2183,
+ 0x2190, 0x23db,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x269c,
+ 0x26a0, 0x26b1,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27c6,
+ 0x27d0, 0x27eb,
+ 0x27f0, 0x27ff,
+ 0x2900, 0x2b13,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x3004,
+ 0x3006, 0x3006,
+ 0x3008, 0x3020,
+ 0x3030, 0x3037,
+ 0x303c, 0x303f,
+ 0x309b, 0x309c,
+ 0x30a0, 0x30a0,
+ 0x30fb, 0x30fc,
+ 0x3190, 0x319f,
+ 0x31c0, 0x31cf,
+ 0x3220, 0x3243,
+ 0x3250, 0x325f,
+ 0x327e, 0x32fe,
+ 0x3300, 0x33ff,
+ 0x4dc0, 0x4dff,
+ 0xa700, 0xa716,
+ 0xe000, 0xf8ff,
+ 0xfd3e, 0xfd3f,
+ 0xfdfd, 0xfdfd,
+ 0xfe10, 0xfe19,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff20,
+ 0xff3b, 0xff40,
+ 0xff5b, 0xff65,
+ 0xff70, 0xff70,
+ 0xff9e, 0xff9f,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xfffd,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1013f,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d166,
+ 0x1d16a, 0x1d17a,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1dd,
+ 0x1d300, 0x1d356,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd
+}; /* CR_Common */
+
+/* 'Coptic': Script */
+static const OnigCodePoint CR_Coptic[] = {
+ 3,
+ 0x03e2, 0x03ef,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2cff
+}; /* CR_Coptic */
+
+/* 'Cypriot': Script */
+static const OnigCodePoint CR_Cypriot[] = {
+ 6,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f
+}; /* CR_Cypriot */
+
+/* 'Cyrillic': Script */
+static const OnigCodePoint CR_Cyrillic[] = {
+ 6,
+ 0x0400, 0x0486,
+ 0x0488, 0x04ce,
+ 0x04d0, 0x04f9,
+ 0x0500, 0x050f,
+ 0x1d2b, 0x1d2b,
+ 0x1d78, 0x1d78
+}; /* CR_Cyrillic */
+
+/* 'Deseret': Script */
+static const OnigCodePoint CR_Deseret[] = {
+ 1,
+ 0x10400, 0x1044f
+}; /* CR_Deseret */
+
+/* 'Devanagari': Script */
+static const OnigCodePoint CR_Devanagari[] = {
+ 6,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0963,
+ 0x0966, 0x096f,
+ 0x097d, 0x097d
+}; /* CR_Devanagari */
+
+/* 'Ethiopic': Script */
+static const OnigCodePoint CR_Ethiopic[] = {
+ 27,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde
+}; /* CR_Ethiopic */
+
+/* 'Georgian': Script */
+static const OnigCodePoint CR_Georgian[] = {
+ 4,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10fc,
+ 0x2d00, 0x2d25
+}; /* CR_Georgian */
+
+/* 'Glagolitic': Script */
+static const OnigCodePoint CR_Glagolitic[] = {
+ 2,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e
+}; /* CR_Glagolitic */
+
+/* 'Gothic': Script */
+static const OnigCodePoint CR_Gothic[] = {
+ 1,
+ 0x10330, 0x1034a
+}; /* CR_Gothic */
+
+/* 'Greek': Script */
+static const OnigCodePoint CR_Greek[] = {
+ 31,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x0384, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03e1,
+ 0x03f0, 0x03ff,
+ 0x1d26, 0x1d2a,
+ 0x1d5d, 0x1d61,
+ 0x1d66, 0x1d6a,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2126, 0x2126,
+ 0x10140, 0x1018a,
+ 0x1d200, 0x1d245
+}; /* CR_Greek */
+
+/* 'Gujarati': Script */
+static const OnigCodePoint CR_Gujarati[] = {
+ 14,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1
+}; /* CR_Gujarati */
+
+/* 'Gurmukhi': Script */
+static const OnigCodePoint CR_Gurmukhi[] = {
+ 15,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74
+}; /* CR_Gurmukhi */
+
+/* 'Han': Script */
+static const OnigCodePoint CR_Han[] = {
+ 14,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x3005, 0x3005,
+ 0x3007, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303b,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fbb,
+ 0xf900, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0x20000, 0x2a6d6,
+ 0x2f800, 0x2fa1d
+}; /* CR_Han */
+
+/* 'Hangul': Script */
+static const OnigCodePoint CR_Hangul[] = {
+ 12,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x3131, 0x318e,
+ 0x3200, 0x321e,
+ 0x3260, 0x327d,
+ 0xac00, 0xd7a3,
+ 0xffa0, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc
+}; /* CR_Hangul */
+
+/* 'Hanunoo': Script */
+static const OnigCodePoint CR_Hanunoo[] = {
+ 1,
+ 0x1720, 0x1734
+}; /* CR_Hanunoo */
+
+/* 'Hebrew': Script */
+static const OnigCodePoint CR_Hebrew[] = {
+ 10,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfb4f
+}; /* CR_Hebrew */
+
+/* 'Hiragana': Script */
+static const OnigCodePoint CR_Hiragana[] = {
+ 2,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f
+}; /* CR_Hiragana */
+
+/* 'Inherited': Script */
+static const OnigCodePoint CR_Inherited[] = {
+ 15,
+ 0x0300, 0x036f,
+ 0x064b, 0x0655,
+ 0x0670, 0x0670,
+ 0x1dc0, 0x1dc3,
+ 0x200c, 0x200d,
+ 0x20d0, 0x20eb,
+ 0x302a, 0x302f,
+ 0x3099, 0x309a,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe23,
+ 0x1d167, 0x1d169,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0xe0100, 0xe01ef
+}; /* CR_Inherited */
+
+/* 'Kannada': Script */
+static const OnigCodePoint CR_Kannada[] = {
+ 13,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef
+}; /* CR_Kannada */
+
+/* 'Katakana': Script */
+static const OnigCodePoint CR_Katakana[] = {
+ 5,
+ 0x30a1, 0x30fa,
+ 0x30fd, 0x30ff,
+ 0x31f0, 0x31ff,
+ 0xff66, 0xff6f,
+ 0xff71, 0xff9d
+}; /* CR_Katakana */
+
+/* 'Kharoshthi': Script */
+static const OnigCodePoint CR_Kharoshthi[] = {
+ 8,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58
+}; /* CR_Kharoshthi */
+
+/* 'Khmer': Script */
+static const OnigCodePoint CR_Khmer[] = {
+ 4,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x19e0, 0x19ff
+}; /* CR_Khmer */
+
+/* 'Lao': Script */
+static const OnigCodePoint CR_Lao[] = {
+ 18,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd
+}; /* CR_Lao */
+
+/* 'Latin': Script */
+static const OnigCodePoint CR_Latin[] = {
+ 23,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x0241,
+ 0x0250, 0x02b8,
+ 0x02e0, 0x02e4,
+ 0x1d00, 0x1d25,
+ 0x1d2c, 0x1d5c,
+ 0x1d62, 0x1d65,
+ 0x1d6b, 0x1d77,
+ 0x1d79, 0x1dbf,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x2094,
+ 0x212a, 0x212b,
+ 0xfb00, 0xfb06,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a
+}; /* CR_Latin */
+
+/* 'Limbu': Script */
+static const OnigCodePoint CR_Limbu[] = {
+ 5,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x194f
+}; /* CR_Limbu */
+
+/* 'Linear_B': Script */
+static const OnigCodePoint CR_Linear_B[] = {
+ 7,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa
+}; /* CR_Linear_B */
+
+/* 'Malayalam': Script */
+static const OnigCodePoint CR_Malayalam[] = {
+ 11,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f
+}; /* CR_Malayalam */
+
+/* 'Mongolian': Script */
+static const OnigCodePoint CR_Mongolian[] = {
+ 4,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9
+}; /* CR_Mongolian */
+
+/* 'Myanmar': Script */
+static const OnigCodePoint CR_Myanmar[] = {
+ 6,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059
+}; /* CR_Myanmar */
+
+/* 'New_Tai_Lue': Script */
+static const OnigCodePoint CR_New_Tai_Lue[] = {
+ 4,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x19df
+}; /* CR_New_Tai_Lue */
+
+/* 'Ogham': Script */
+static const OnigCodePoint CR_Ogham[] = {
+ 1,
+ 0x1680, 0x169c
+}; /* CR_Ogham */
+
+/* 'Old_Italic': Script */
+static const OnigCodePoint CR_Old_Italic[] = {
+ 2,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323
+}; /* CR_Old_Italic */
+
+/* 'Old_Persian': Script */
+static const OnigCodePoint CR_Old_Persian[] = {
+ 2,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103d5
+}; /* CR_Old_Persian */
+
+/* 'Oriya': Script */
+static const OnigCodePoint CR_Oriya[] = {
+ 14,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b71
+}; /* CR_Oriya */
+
+/* 'Osmanya': Script */
+static const OnigCodePoint CR_Osmanya[] = {
+ 2,
+ 0x10480, 0x1049d,
+ 0x104a0, 0x104a9
+}; /* CR_Osmanya */
+
+/* 'Runic': Script */
+static const OnigCodePoint CR_Runic[] = {
+ 2,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f0
+}; /* CR_Runic */
+
+/* 'Shavian': Script */
+static const OnigCodePoint CR_Shavian[] = {
+ 1,
+ 0x10450, 0x1047f
+}; /* CR_Shavian */
+
+/* 'Sinhala': Script */
+static const OnigCodePoint CR_Sinhala[] = {
+ 11,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4
+}; /* CR_Sinhala */
+
+/* 'Syloti_Nagri': Script */
+static const OnigCodePoint CR_Syloti_Nagri[] = {
+ 1,
+ 0xa800, 0xa82b
+}; /* CR_Syloti_Nagri */
+
+/* 'Syriac': Script */
+static const OnigCodePoint CR_Syriac[] = {
+ 3,
+ 0x0700, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x074f
+}; /* CR_Syriac */
+
+/* 'Tagalog': Script */
+static const OnigCodePoint CR_Tagalog[] = {
+ 2,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714
+}; /* CR_Tagalog */
+
+/* 'Tagbanwa': Script */
+static const OnigCodePoint CR_Tagbanwa[] = {
+ 3,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773
+}; /* CR_Tagbanwa */
+
+/* 'Tai_Le': Script */
+static const OnigCodePoint CR_Tai_Le[] = {
+ 2,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974
+}; /* CR_Tai_Le */
+
+/* 'Tamil': Script */
+static const OnigCodePoint CR_Tamil[] = {
+ 15,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa
+}; /* CR_Tamil */
+
+/* 'Telugu': Script */
+static const OnigCodePoint CR_Telugu[] = {
+ 12,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f
+}; /* CR_Telugu */
+
+/* 'Thaana': Script */
+static const OnigCodePoint CR_Thaana[] = {
+ 1,
+ 0x0780, 0x07b1
+}; /* CR_Thaana */
+
+/* 'Thai': Script */
+static const OnigCodePoint CR_Thai[] = {
+ 2,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e5b
+}; /* CR_Thai */
+
+/* 'Tibetan': Script */
+static const OnigCodePoint CR_Tibetan[] = {
+ 7,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fd1
+}; /* CR_Tibetan */
+
+/* 'Tifinagh': Script */
+static const OnigCodePoint CR_Tifinagh[] = {
+ 2,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f
+}; /* CR_Tifinagh */
+
+/* 'Ugaritic': Script */
+static const OnigCodePoint CR_Ugaritic[] = {
+ 2,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x1039f
+}; /* CR_Ugaritic */
+
+/* 'Yi': Script */
+static const OnigCodePoint CR_Yi[] = {
+ 2,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6
+}; /* CR_Yi */
+
+
+#endif /* USE_UNICODE_PROPERTIES */
+
+
+typedef struct {
+ int n;
+ OnigCodePoint code[3];
+} CodePointList3;
+
+typedef struct {
+ OnigCodePoint from;
+ CodePointList3 to;
+} CaseFold_11_Type;
+
+typedef struct {
+ OnigCodePoint from;
+ CodePointList3 to;
+} CaseUnfold_11_Type;
+
+typedef struct {
+ int n;
+ OnigCodePoint code[2];
+} CodePointList2;
+
+typedef struct {
+ OnigCodePoint from[2];
+ CodePointList2 to;
+} CaseUnfold_12_Type;
+
+typedef struct {
+ OnigCodePoint from[3];
+ CodePointList2 to;
+} CaseUnfold_13_Type;
+
+static const CaseFold_11_Type CaseFold[] = {
+ { 0x0041, {1, {0x0061}}},
+ { 0x0042, {1, {0x0062}}},
+ { 0x0043, {1, {0x0063}}},
+ { 0x0044, {1, {0x0064}}},
+ { 0x0045, {1, {0x0065}}},
+ { 0x0046, {1, {0x0066}}},
+ { 0x0047, {1, {0x0067}}},
+ { 0x0048, {1, {0x0068}}},
+ { 0x004a, {1, {0x006a}}},
+ { 0x004b, {1, {0x006b}}},
+ { 0x004c, {1, {0x006c}}},
+ { 0x004d, {1, {0x006d}}},
+ { 0x004e, {1, {0x006e}}},
+ { 0x004f, {1, {0x006f}}},
+ { 0x0050, {1, {0x0070}}},
+ { 0x0051, {1, {0x0071}}},
+ { 0x0052, {1, {0x0072}}},
+ { 0x0053, {1, {0x0073}}},
+ { 0x0054, {1, {0x0074}}},
+ { 0x0055, {1, {0x0075}}},
+ { 0x0056, {1, {0x0076}}},
+ { 0x0057, {1, {0x0077}}},
+ { 0x0058, {1, {0x0078}}},
+ { 0x0059, {1, {0x0079}}},
+ { 0x005a, {1, {0x007a}}},
+ { 0x00b5, {1, {0x03bc}}},
+ { 0x00c0, {1, {0x00e0}}},
+ { 0x00c1, {1, {0x00e1}}},
+ { 0x00c2, {1, {0x00e2}}},
+ { 0x00c3, {1, {0x00e3}}},
+ { 0x00c4, {1, {0x00e4}}},
+ { 0x00c5, {1, {0x00e5}}},
+ { 0x00c6, {1, {0x00e6}}},
+ { 0x00c7, {1, {0x00e7}}},
+ { 0x00c8, {1, {0x00e8}}},
+ { 0x00c9, {1, {0x00e9}}},
+ { 0x00ca, {1, {0x00ea}}},
+ { 0x00cb, {1, {0x00eb}}},
+ { 0x00cc, {1, {0x00ec}}},
+ { 0x00cd, {1, {0x00ed}}},
+ { 0x00ce, {1, {0x00ee}}},
+ { 0x00cf, {1, {0x00ef}}},
+ { 0x00d0, {1, {0x00f0}}},
+ { 0x00d1, {1, {0x00f1}}},
+ { 0x00d2, {1, {0x00f2}}},
+ { 0x00d3, {1, {0x00f3}}},
+ { 0x00d4, {1, {0x00f4}}},
+ { 0x00d5, {1, {0x00f5}}},
+ { 0x00d6, {1, {0x00f6}}},
+ { 0x00d8, {1, {0x00f8}}},
+ { 0x00d9, {1, {0x00f9}}},
+ { 0x00da, {1, {0x00fa}}},
+ { 0x00db, {1, {0x00fb}}},
+ { 0x00dc, {1, {0x00fc}}},
+ { 0x00dd, {1, {0x00fd}}},
+ { 0x00de, {1, {0x00fe}}},
+ { 0x00df, {2, {0x0073, 0x0073}}},
+ { 0x0100, {1, {0x0101}}},
+ { 0x0102, {1, {0x0103}}},
+ { 0x0104, {1, {0x0105}}},
+ { 0x0106, {1, {0x0107}}},
+ { 0x0108, {1, {0x0109}}},
+ { 0x010a, {1, {0x010b}}},
+ { 0x010c, {1, {0x010d}}},
+ { 0x010e, {1, {0x010f}}},
+ { 0x0110, {1, {0x0111}}},
+ { 0x0112, {1, {0x0113}}},
+ { 0x0114, {1, {0x0115}}},
+ { 0x0116, {1, {0x0117}}},
+ { 0x0118, {1, {0x0119}}},
+ { 0x011a, {1, {0x011b}}},
+ { 0x011c, {1, {0x011d}}},
+ { 0x011e, {1, {0x011f}}},
+ { 0x0120, {1, {0x0121}}},
+ { 0x0122, {1, {0x0123}}},
+ { 0x0124, {1, {0x0125}}},
+ { 0x0126, {1, {0x0127}}},
+ { 0x0128, {1, {0x0129}}},
+ { 0x012a, {1, {0x012b}}},
+ { 0x012c, {1, {0x012d}}},
+ { 0x012e, {1, {0x012f}}},
+ { 0x0132, {1, {0x0133}}},
+ { 0x0134, {1, {0x0135}}},
+ { 0x0136, {1, {0x0137}}},
+ { 0x0139, {1, {0x013a}}},
+ { 0x013b, {1, {0x013c}}},
+ { 0x013d, {1, {0x013e}}},
+ { 0x013f, {1, {0x0140}}},
+ { 0x0141, {1, {0x0142}}},
+ { 0x0143, {1, {0x0144}}},
+ { 0x0145, {1, {0x0146}}},
+ { 0x0147, {1, {0x0148}}},
+ { 0x0149, {2, {0x02bc, 0x006e}}},
+ { 0x014a, {1, {0x014b}}},
+ { 0x014c, {1, {0x014d}}},
+ { 0x014e, {1, {0x014f}}},
+ { 0x0150, {1, {0x0151}}},
+ { 0x0152, {1, {0x0153}}},
+ { 0x0154, {1, {0x0155}}},
+ { 0x0156, {1, {0x0157}}},
+ { 0x0158, {1, {0x0159}}},
+ { 0x015a, {1, {0x015b}}},
+ { 0x015c, {1, {0x015d}}},
+ { 0x015e, {1, {0x015f}}},
+ { 0x0160, {1, {0x0161}}},
+ { 0x0162, {1, {0x0163}}},
+ { 0x0164, {1, {0x0165}}},
+ { 0x0166, {1, {0x0167}}},
+ { 0x0168, {1, {0x0169}}},
+ { 0x016a, {1, {0x016b}}},
+ { 0x016c, {1, {0x016d}}},
+ { 0x016e, {1, {0x016f}}},
+ { 0x0170, {1, {0x0171}}},
+ { 0x0172, {1, {0x0173}}},
+ { 0x0174, {1, {0x0175}}},
+ { 0x0176, {1, {0x0177}}},
+ { 0x0178, {1, {0x00ff}}},
+ { 0x0179, {1, {0x017a}}},
+ { 0x017b, {1, {0x017c}}},
+ { 0x017d, {1, {0x017e}}},
+ { 0x017f, {1, {0x0073}}},
+ { 0x0181, {1, {0x0253}}},
+ { 0x0182, {1, {0x0183}}},
+ { 0x0184, {1, {0x0185}}},
+ { 0x0186, {1, {0x0254}}},
+ { 0x0187, {1, {0x0188}}},
+ { 0x0189, {1, {0x0256}}},
+ { 0x018a, {1, {0x0257}}},
+ { 0x018b, {1, {0x018c}}},
+ { 0x018e, {1, {0x01dd}}},
+ { 0x018f, {1, {0x0259}}},
+ { 0x0190, {1, {0x025b}}},
+ { 0x0191, {1, {0x0192}}},
+ { 0x0193, {1, {0x0260}}},
+ { 0x0194, {1, {0x0263}}},
+ { 0x0196, {1, {0x0269}}},
+ { 0x0197, {1, {0x0268}}},
+ { 0x0198, {1, {0x0199}}},
+ { 0x019c, {1, {0x026f}}},
+ { 0x019d, {1, {0x0272}}},
+ { 0x019f, {1, {0x0275}}},
+ { 0x01a0, {1, {0x01a1}}},
+ { 0x01a2, {1, {0x01a3}}},
+ { 0x01a4, {1, {0x01a5}}},
+ { 0x01a6, {1, {0x0280}}},
+ { 0x01a7, {1, {0x01a8}}},
+ { 0x01a9, {1, {0x0283}}},
+ { 0x01ac, {1, {0x01ad}}},
+ { 0x01ae, {1, {0x0288}}},
+ { 0x01af, {1, {0x01b0}}},
+ { 0x01b1, {1, {0x028a}}},
+ { 0x01b2, {1, {0x028b}}},
+ { 0x01b3, {1, {0x01b4}}},
+ { 0x01b5, {1, {0x01b6}}},
+ { 0x01b7, {1, {0x0292}}},
+ { 0x01b8, {1, {0x01b9}}},
+ { 0x01bc, {1, {0x01bd}}},
+ { 0x01c4, {1, {0x01c6}}},
+ { 0x01c5, {1, {0x01c6}}},
+ { 0x01c7, {1, {0x01c9}}},
+ { 0x01c8, {1, {0x01c9}}},
+ { 0x01ca, {1, {0x01cc}}},
+ { 0x01cb, {1, {0x01cc}}},
+ { 0x01cd, {1, {0x01ce}}},
+ { 0x01cf, {1, {0x01d0}}},
+ { 0x01d1, {1, {0x01d2}}},
+ { 0x01d3, {1, {0x01d4}}},
+ { 0x01d5, {1, {0x01d6}}},
+ { 0x01d7, {1, {0x01d8}}},
+ { 0x01d9, {1, {0x01da}}},
+ { 0x01db, {1, {0x01dc}}},
+ { 0x01de, {1, {0x01df}}},
+ { 0x01e0, {1, {0x01e1}}},
+ { 0x01e2, {1, {0x01e3}}},
+ { 0x01e4, {1, {0x01e5}}},
+ { 0x01e6, {1, {0x01e7}}},
+ { 0x01e8, {1, {0x01e9}}},
+ { 0x01ea, {1, {0x01eb}}},
+ { 0x01ec, {1, {0x01ed}}},
+ { 0x01ee, {1, {0x01ef}}},
+ { 0x01f0, {2, {0x006a, 0x030c}}},
+ { 0x01f1, {1, {0x01f3}}},
+ { 0x01f2, {1, {0x01f3}}},
+ { 0x01f4, {1, {0x01f5}}},
+ { 0x01f6, {1, {0x0195}}},
+ { 0x01f7, {1, {0x01bf}}},
+ { 0x01f8, {1, {0x01f9}}},
+ { 0x01fa, {1, {0x01fb}}},
+ { 0x01fc, {1, {0x01fd}}},
+ { 0x01fe, {1, {0x01ff}}},
+ { 0x0200, {1, {0x0201}}},
+ { 0x0202, {1, {0x0203}}},
+ { 0x0204, {1, {0x0205}}},
+ { 0x0206, {1, {0x0207}}},
+ { 0x0208, {1, {0x0209}}},
+ { 0x020a, {1, {0x020b}}},
+ { 0x020c, {1, {0x020d}}},
+ { 0x020e, {1, {0x020f}}},
+ { 0x0210, {1, {0x0211}}},
+ { 0x0212, {1, {0x0213}}},
+ { 0x0214, {1, {0x0215}}},
+ { 0x0216, {1, {0x0217}}},
+ { 0x0218, {1, {0x0219}}},
+ { 0x021a, {1, {0x021b}}},
+ { 0x021c, {1, {0x021d}}},
+ { 0x021e, {1, {0x021f}}},
+ { 0x0220, {1, {0x019e}}},
+ { 0x0222, {1, {0x0223}}},
+ { 0x0224, {1, {0x0225}}},
+ { 0x0226, {1, {0x0227}}},
+ { 0x0228, {1, {0x0229}}},
+ { 0x022a, {1, {0x022b}}},
+ { 0x022c, {1, {0x022d}}},
+ { 0x022e, {1, {0x022f}}},
+ { 0x0230, {1, {0x0231}}},
+ { 0x0232, {1, {0x0233}}},
+ { 0x023b, {1, {0x023c}}},
+ { 0x023d, {1, {0x019a}}},
+ { 0x0241, {1, {0x0294}}},
+ { 0x0345, {1, {0x03b9}}},
+ { 0x0386, {1, {0x03ac}}},
+ { 0x0388, {1, {0x03ad}}},
+ { 0x0389, {1, {0x03ae}}},
+ { 0x038a, {1, {0x03af}}},
+ { 0x038c, {1, {0x03cc}}},
+ { 0x038e, {1, {0x03cd}}},
+ { 0x038f, {1, {0x03ce}}},
+ { 0x0390, {3, {0x03b9, 0x0308, 0x0301}}},
+ { 0x0391, {1, {0x03b1}}},
+ { 0x0392, {1, {0x03b2}}},
+ { 0x0393, {1, {0x03b3}}},
+ { 0x0394, {1, {0x03b4}}},
+ { 0x0395, {1, {0x03b5}}},
+ { 0x0396, {1, {0x03b6}}},
+ { 0x0397, {1, {0x03b7}}},
+ { 0x0398, {1, {0x03b8}}},
+ { 0x0399, {1, {0x03b9}}},
+ { 0x039a, {1, {0x03ba}}},
+ { 0x039b, {1, {0x03bb}}},
+ { 0x039c, {1, {0x03bc}}},
+ { 0x039d, {1, {0x03bd}}},
+ { 0x039e, {1, {0x03be}}},
+ { 0x039f, {1, {0x03bf}}},
+ { 0x03a0, {1, {0x03c0}}},
+ { 0x03a1, {1, {0x03c1}}},
+ { 0x03a3, {1, {0x03c3}}},
+ { 0x03a4, {1, {0x03c4}}},
+ { 0x03a5, {1, {0x03c5}}},
+ { 0x03a6, {1, {0x03c6}}},
+ { 0x03a7, {1, {0x03c7}}},
+ { 0x03a8, {1, {0x03c8}}},
+ { 0x03a9, {1, {0x03c9}}},
+ { 0x03aa, {1, {0x03ca}}},
+ { 0x03ab, {1, {0x03cb}}},
+ { 0x03b0, {3, {0x03c5, 0x0308, 0x0301}}},
+ { 0x03c2, {1, {0x03c3}}},
+ { 0x03d0, {1, {0x03b2}}},
+ { 0x03d1, {1, {0x03b8}}},
+ { 0x03d5, {1, {0x03c6}}},
+ { 0x03d6, {1, {0x03c0}}},
+ { 0x03d8, {1, {0x03d9}}},
+ { 0x03da, {1, {0x03db}}},
+ { 0x03dc, {1, {0x03dd}}},
+ { 0x03de, {1, {0x03df}}},
+ { 0x03e0, {1, {0x03e1}}},
+ { 0x03e2, {1, {0x03e3}}},
+ { 0x03e4, {1, {0x03e5}}},
+ { 0x03e6, {1, {0x03e7}}},
+ { 0x03e8, {1, {0x03e9}}},
+ { 0x03ea, {1, {0x03eb}}},
+ { 0x03ec, {1, {0x03ed}}},
+ { 0x03ee, {1, {0x03ef}}},
+ { 0x03f0, {1, {0x03ba}}},
+ { 0x03f1, {1, {0x03c1}}},
+ { 0x03f4, {1, {0x03b8}}},
+ { 0x03f5, {1, {0x03b5}}},
+ { 0x03f7, {1, {0x03f8}}},
+ { 0x03f9, {1, {0x03f2}}},
+ { 0x03fa, {1, {0x03fb}}},
+ { 0x0400, {1, {0x0450}}},
+ { 0x0401, {1, {0x0451}}},
+ { 0x0402, {1, {0x0452}}},
+ { 0x0403, {1, {0x0453}}},
+ { 0x0404, {1, {0x0454}}},
+ { 0x0405, {1, {0x0455}}},
+ { 0x0406, {1, {0x0456}}},
+ { 0x0407, {1, {0x0457}}},
+ { 0x0408, {1, {0x0458}}},
+ { 0x0409, {1, {0x0459}}},
+ { 0x040a, {1, {0x045a}}},
+ { 0x040b, {1, {0x045b}}},
+ { 0x040c, {1, {0x045c}}},
+ { 0x040d, {1, {0x045d}}},
+ { 0x040e, {1, {0x045e}}},
+ { 0x040f, {1, {0x045f}}},
+ { 0x0410, {1, {0x0430}}},
+ { 0x0411, {1, {0x0431}}},
+ { 0x0412, {1, {0x0432}}},
+ { 0x0413, {1, {0x0433}}},
+ { 0x0414, {1, {0x0434}}},
+ { 0x0415, {1, {0x0435}}},
+ { 0x0416, {1, {0x0436}}},
+ { 0x0417, {1, {0x0437}}},
+ { 0x0418, {1, {0x0438}}},
+ { 0x0419, {1, {0x0439}}},
+ { 0x041a, {1, {0x043a}}},
+ { 0x041b, {1, {0x043b}}},
+ { 0x041c, {1, {0x043c}}},
+ { 0x041d, {1, {0x043d}}},
+ { 0x041e, {1, {0x043e}}},
+ { 0x041f, {1, {0x043f}}},
+ { 0x0420, {1, {0x0440}}},
+ { 0x0421, {1, {0x0441}}},
+ { 0x0422, {1, {0x0442}}},
+ { 0x0423, {1, {0x0443}}},
+ { 0x0424, {1, {0x0444}}},
+ { 0x0425, {1, {0x0445}}},
+ { 0x0426, {1, {0x0446}}},
+ { 0x0427, {1, {0x0447}}},
+ { 0x0428, {1, {0x0448}}},
+ { 0x0429, {1, {0x0449}}},
+ { 0x042a, {1, {0x044a}}},
+ { 0x042b, {1, {0x044b}}},
+ { 0x042c, {1, {0x044c}}},
+ { 0x042d, {1, {0x044d}}},
+ { 0x042e, {1, {0x044e}}},
+ { 0x042f, {1, {0x044f}}},
+ { 0x0460, {1, {0x0461}}},
+ { 0x0462, {1, {0x0463}}},
+ { 0x0464, {1, {0x0465}}},
+ { 0x0466, {1, {0x0467}}},
+ { 0x0468, {1, {0x0469}}},
+ { 0x046a, {1, {0x046b}}},
+ { 0x046c, {1, {0x046d}}},
+ { 0x046e, {1, {0x046f}}},
+ { 0x0470, {1, {0x0471}}},
+ { 0x0472, {1, {0x0473}}},
+ { 0x0474, {1, {0x0475}}},
+ { 0x0476, {1, {0x0477}}},
+ { 0x0478, {1, {0x0479}}},
+ { 0x047a, {1, {0x047b}}},
+ { 0x047c, {1, {0x047d}}},
+ { 0x047e, {1, {0x047f}}},
+ { 0x0480, {1, {0x0481}}},
+ { 0x048a, {1, {0x048b}}},
+ { 0x048c, {1, {0x048d}}},
+ { 0x048e, {1, {0x048f}}},
+ { 0x0490, {1, {0x0491}}},
+ { 0x0492, {1, {0x0493}}},
+ { 0x0494, {1, {0x0495}}},
+ { 0x0496, {1, {0x0497}}},
+ { 0x0498, {1, {0x0499}}},
+ { 0x049a, {1, {0x049b}}},
+ { 0x049c, {1, {0x049d}}},
+ { 0x049e, {1, {0x049f}}},
+ { 0x04a0, {1, {0x04a1}}},
+ { 0x04a2, {1, {0x04a3}}},
+ { 0x04a4, {1, {0x04a5}}},
+ { 0x04a6, {1, {0x04a7}}},
+ { 0x04a8, {1, {0x04a9}}},
+ { 0x04aa, {1, {0x04ab}}},
+ { 0x04ac, {1, {0x04ad}}},
+ { 0x04ae, {1, {0x04af}}},
+ { 0x04b0, {1, {0x04b1}}},
+ { 0x04b2, {1, {0x04b3}}},
+ { 0x04b4, {1, {0x04b5}}},
+ { 0x04b6, {1, {0x04b7}}},
+ { 0x04b8, {1, {0x04b9}}},
+ { 0x04ba, {1, {0x04bb}}},
+ { 0x04bc, {1, {0x04bd}}},
+ { 0x04be, {1, {0x04bf}}},
+ { 0x04c1, {1, {0x04c2}}},
+ { 0x04c3, {1, {0x04c4}}},
+ { 0x04c5, {1, {0x04c6}}},
+ { 0x04c7, {1, {0x04c8}}},
+ { 0x04c9, {1, {0x04ca}}},
+ { 0x04cb, {1, {0x04cc}}},
+ { 0x04cd, {1, {0x04ce}}},
+ { 0x04d0, {1, {0x04d1}}},
+ { 0x04d2, {1, {0x04d3}}},
+ { 0x04d4, {1, {0x04d5}}},
+ { 0x04d6, {1, {0x04d7}}},
+ { 0x04d8, {1, {0x04d9}}},
+ { 0x04da, {1, {0x04db}}},
+ { 0x04dc, {1, {0x04dd}}},
+ { 0x04de, {1, {0x04df}}},
+ { 0x04e0, {1, {0x04e1}}},
+ { 0x04e2, {1, {0x04e3}}},
+ { 0x04e4, {1, {0x04e5}}},
+ { 0x04e6, {1, {0x04e7}}},
+ { 0x04e8, {1, {0x04e9}}},
+ { 0x04ea, {1, {0x04eb}}},
+ { 0x04ec, {1, {0x04ed}}},
+ { 0x04ee, {1, {0x04ef}}},
+ { 0x04f0, {1, {0x04f1}}},
+ { 0x04f2, {1, {0x04f3}}},
+ { 0x04f4, {1, {0x04f5}}},
+ { 0x04f6, {1, {0x04f7}}},
+ { 0x04f8, {1, {0x04f9}}},
+ { 0x0500, {1, {0x0501}}},
+ { 0x0502, {1, {0x0503}}},
+ { 0x0504, {1, {0x0505}}},
+ { 0x0506, {1, {0x0507}}},
+ { 0x0508, {1, {0x0509}}},
+ { 0x050a, {1, {0x050b}}},
+ { 0x050c, {1, {0x050d}}},
+ { 0x050e, {1, {0x050f}}},
+ { 0x0531, {1, {0x0561}}},
+ { 0x0532, {1, {0x0562}}},
+ { 0x0533, {1, {0x0563}}},
+ { 0x0534, {1, {0x0564}}},
+ { 0x0535, {1, {0x0565}}},
+ { 0x0536, {1, {0x0566}}},
+ { 0x0537, {1, {0x0567}}},
+ { 0x0538, {1, {0x0568}}},
+ { 0x0539, {1, {0x0569}}},
+ { 0x053a, {1, {0x056a}}},
+ { 0x053b, {1, {0x056b}}},
+ { 0x053c, {1, {0x056c}}},
+ { 0x053d, {1, {0x056d}}},
+ { 0x053e, {1, {0x056e}}},
+ { 0x053f, {1, {0x056f}}},
+ { 0x0540, {1, {0x0570}}},
+ { 0x0541, {1, {0x0571}}},
+ { 0x0542, {1, {0x0572}}},
+ { 0x0543, {1, {0x0573}}},
+ { 0x0544, {1, {0x0574}}},
+ { 0x0545, {1, {0x0575}}},
+ { 0x0546, {1, {0x0576}}},
+ { 0x0547, {1, {0x0577}}},
+ { 0x0548, {1, {0x0578}}},
+ { 0x0549, {1, {0x0579}}},
+ { 0x054a, {1, {0x057a}}},
+ { 0x054b, {1, {0x057b}}},
+ { 0x054c, {1, {0x057c}}},
+ { 0x054d, {1, {0x057d}}},
+ { 0x054e, {1, {0x057e}}},
+ { 0x054f, {1, {0x057f}}},
+ { 0x0550, {1, {0x0580}}},
+ { 0x0551, {1, {0x0581}}},
+ { 0x0552, {1, {0x0582}}},
+ { 0x0553, {1, {0x0583}}},
+ { 0x0554, {1, {0x0584}}},
+ { 0x0555, {1, {0x0585}}},
+ { 0x0556, {1, {0x0586}}},
+ { 0x0587, {2, {0x0565, 0x0582}}},
+ { 0x10a0, {1, {0x2d00}}},
+ { 0x10a1, {1, {0x2d01}}},
+ { 0x10a2, {1, {0x2d02}}},
+ { 0x10a3, {1, {0x2d03}}},
+ { 0x10a4, {1, {0x2d04}}},
+ { 0x10a5, {1, {0x2d05}}},
+ { 0x10a6, {1, {0x2d06}}},
+ { 0x10a7, {1, {0x2d07}}},
+ { 0x10a8, {1, {0x2d08}}},
+ { 0x10a9, {1, {0x2d09}}},
+ { 0x10aa, {1, {0x2d0a}}},
+ { 0x10ab, {1, {0x2d0b}}},
+ { 0x10ac, {1, {0x2d0c}}},
+ { 0x10ad, {1, {0x2d0d}}},
+ { 0x10ae, {1, {0x2d0e}}},
+ { 0x10af, {1, {0x2d0f}}},
+ { 0x10b0, {1, {0x2d10}}},
+ { 0x10b1, {1, {0x2d11}}},
+ { 0x10b2, {1, {0x2d12}}},
+ { 0x10b3, {1, {0x2d13}}},
+ { 0x10b4, {1, {0x2d14}}},
+ { 0x10b5, {1, {0x2d15}}},
+ { 0x10b6, {1, {0x2d16}}},
+ { 0x10b7, {1, {0x2d17}}},
+ { 0x10b8, {1, {0x2d18}}},
+ { 0x10b9, {1, {0x2d19}}},
+ { 0x10ba, {1, {0x2d1a}}},
+ { 0x10bb, {1, {0x2d1b}}},
+ { 0x10bc, {1, {0x2d1c}}},
+ { 0x10bd, {1, {0x2d1d}}},
+ { 0x10be, {1, {0x2d1e}}},
+ { 0x10bf, {1, {0x2d1f}}},
+ { 0x10c0, {1, {0x2d20}}},
+ { 0x10c1, {1, {0x2d21}}},
+ { 0x10c2, {1, {0x2d22}}},
+ { 0x10c3, {1, {0x2d23}}},
+ { 0x10c4, {1, {0x2d24}}},
+ { 0x10c5, {1, {0x2d25}}},
+ { 0x1e00, {1, {0x1e01}}},
+ { 0x1e02, {1, {0x1e03}}},
+ { 0x1e04, {1, {0x1e05}}},
+ { 0x1e06, {1, {0x1e07}}},
+ { 0x1e08, {1, {0x1e09}}},
+ { 0x1e0a, {1, {0x1e0b}}},
+ { 0x1e0c, {1, {0x1e0d}}},
+ { 0x1e0e, {1, {0x1e0f}}},
+ { 0x1e10, {1, {0x1e11}}},
+ { 0x1e12, {1, {0x1e13}}},
+ { 0x1e14, {1, {0x1e15}}},
+ { 0x1e16, {1, {0x1e17}}},
+ { 0x1e18, {1, {0x1e19}}},
+ { 0x1e1a, {1, {0x1e1b}}},
+ { 0x1e1c, {1, {0x1e1d}}},
+ { 0x1e1e, {1, {0x1e1f}}},
+ { 0x1e20, {1, {0x1e21}}},
+ { 0x1e22, {1, {0x1e23}}},
+ { 0x1e24, {1, {0x1e25}}},
+ { 0x1e26, {1, {0x1e27}}},
+ { 0x1e28, {1, {0x1e29}}},
+ { 0x1e2a, {1, {0x1e2b}}},
+ { 0x1e2c, {1, {0x1e2d}}},
+ { 0x1e2e, {1, {0x1e2f}}},
+ { 0x1e30, {1, {0x1e31}}},
+ { 0x1e32, {1, {0x1e33}}},
+ { 0x1e34, {1, {0x1e35}}},
+ { 0x1e36, {1, {0x1e37}}},
+ { 0x1e38, {1, {0x1e39}}},
+ { 0x1e3a, {1, {0x1e3b}}},
+ { 0x1e3c, {1, {0x1e3d}}},
+ { 0x1e3e, {1, {0x1e3f}}},
+ { 0x1e40, {1, {0x1e41}}},
+ { 0x1e42, {1, {0x1e43}}},
+ { 0x1e44, {1, {0x1e45}}},
+ { 0x1e46, {1, {0x1e47}}},
+ { 0x1e48, {1, {0x1e49}}},
+ { 0x1e4a, {1, {0x1e4b}}},
+ { 0x1e4c, {1, {0x1e4d}}},
+ { 0x1e4e, {1, {0x1e4f}}},
+ { 0x1e50, {1, {0x1e51}}},
+ { 0x1e52, {1, {0x1e53}}},
+ { 0x1e54, {1, {0x1e55}}},
+ { 0x1e56, {1, {0x1e57}}},
+ { 0x1e58, {1, {0x1e59}}},
+ { 0x1e5a, {1, {0x1e5b}}},
+ { 0x1e5c, {1, {0x1e5d}}},
+ { 0x1e5e, {1, {0x1e5f}}},
+ { 0x1e60, {1, {0x1e61}}},
+ { 0x1e62, {1, {0x1e63}}},
+ { 0x1e64, {1, {0x1e65}}},
+ { 0x1e66, {1, {0x1e67}}},
+ { 0x1e68, {1, {0x1e69}}},
+ { 0x1e6a, {1, {0x1e6b}}},
+ { 0x1e6c, {1, {0x1e6d}}},
+ { 0x1e6e, {1, {0x1e6f}}},
+ { 0x1e70, {1, {0x1e71}}},
+ { 0x1e72, {1, {0x1e73}}},
+ { 0x1e74, {1, {0x1e75}}},
+ { 0x1e76, {1, {0x1e77}}},
+ { 0x1e78, {1, {0x1e79}}},
+ { 0x1e7a, {1, {0x1e7b}}},
+ { 0x1e7c, {1, {0x1e7d}}},
+ { 0x1e7e, {1, {0x1e7f}}},
+ { 0x1e80, {1, {0x1e81}}},
+ { 0x1e82, {1, {0x1e83}}},
+ { 0x1e84, {1, {0x1e85}}},
+ { 0x1e86, {1, {0x1e87}}},
+ { 0x1e88, {1, {0x1e89}}},
+ { 0x1e8a, {1, {0x1e8b}}},
+ { 0x1e8c, {1, {0x1e8d}}},
+ { 0x1e8e, {1, {0x1e8f}}},
+ { 0x1e90, {1, {0x1e91}}},
+ { 0x1e92, {1, {0x1e93}}},
+ { 0x1e94, {1, {0x1e95}}},
+ { 0x1e96, {2, {0x0068, 0x0331}}},
+ { 0x1e97, {2, {0x0074, 0x0308}}},
+ { 0x1e98, {2, {0x0077, 0x030a}}},
+ { 0x1e99, {2, {0x0079, 0x030a}}},
+ { 0x1e9a, {2, {0x0061, 0x02be}}},
+ { 0x1e9b, {1, {0x1e61}}},
+ { 0x1ea0, {1, {0x1ea1}}},
+ { 0x1ea2, {1, {0x1ea3}}},
+ { 0x1ea4, {1, {0x1ea5}}},
+ { 0x1ea6, {1, {0x1ea7}}},
+ { 0x1ea8, {1, {0x1ea9}}},
+ { 0x1eaa, {1, {0x1eab}}},
+ { 0x1eac, {1, {0x1ead}}},
+ { 0x1eae, {1, {0x1eaf}}},
+ { 0x1eb0, {1, {0x1eb1}}},
+ { 0x1eb2, {1, {0x1eb3}}},
+ { 0x1eb4, {1, {0x1eb5}}},
+ { 0x1eb6, {1, {0x1eb7}}},
+ { 0x1eb8, {1, {0x1eb9}}},
+ { 0x1eba, {1, {0x1ebb}}},
+ { 0x1ebc, {1, {0x1ebd}}},
+ { 0x1ebe, {1, {0x1ebf}}},
+ { 0x1ec0, {1, {0x1ec1}}},
+ { 0x1ec2, {1, {0x1ec3}}},
+ { 0x1ec4, {1, {0x1ec5}}},
+ { 0x1ec6, {1, {0x1ec7}}},
+ { 0x1ec8, {1, {0x1ec9}}},
+ { 0x1eca, {1, {0x1ecb}}},
+ { 0x1ecc, {1, {0x1ecd}}},
+ { 0x1ece, {1, {0x1ecf}}},
+ { 0x1ed0, {1, {0x1ed1}}},
+ { 0x1ed2, {1, {0x1ed3}}},
+ { 0x1ed4, {1, {0x1ed5}}},
+ { 0x1ed6, {1, {0x1ed7}}},
+ { 0x1ed8, {1, {0x1ed9}}},
+ { 0x1eda, {1, {0x1edb}}},
+ { 0x1edc, {1, {0x1edd}}},
+ { 0x1ede, {1, {0x1edf}}},
+ { 0x1ee0, {1, {0x1ee1}}},
+ { 0x1ee2, {1, {0x1ee3}}},
+ { 0x1ee4, {1, {0x1ee5}}},
+ { 0x1ee6, {1, {0x1ee7}}},
+ { 0x1ee8, {1, {0x1ee9}}},
+ { 0x1eea, {1, {0x1eeb}}},
+ { 0x1eec, {1, {0x1eed}}},
+ { 0x1eee, {1, {0x1eef}}},
+ { 0x1ef0, {1, {0x1ef1}}},
+ { 0x1ef2, {1, {0x1ef3}}},
+ { 0x1ef4, {1, {0x1ef5}}},
+ { 0x1ef6, {1, {0x1ef7}}},
+ { 0x1ef8, {1, {0x1ef9}}},
+ { 0x1f08, {1, {0x1f00}}},
+ { 0x1f09, {1, {0x1f01}}},
+ { 0x1f0a, {1, {0x1f02}}},
+ { 0x1f0b, {1, {0x1f03}}},
+ { 0x1f0c, {1, {0x1f04}}},
+ { 0x1f0d, {1, {0x1f05}}},
+ { 0x1f0e, {1, {0x1f06}}},
+ { 0x1f0f, {1, {0x1f07}}},
+ { 0x1f18, {1, {0x1f10}}},
+ { 0x1f19, {1, {0x1f11}}},
+ { 0x1f1a, {1, {0x1f12}}},
+ { 0x1f1b, {1, {0x1f13}}},
+ { 0x1f1c, {1, {0x1f14}}},
+ { 0x1f1d, {1, {0x1f15}}},
+ { 0x1f28, {1, {0x1f20}}},
+ { 0x1f29, {1, {0x1f21}}},
+ { 0x1f2a, {1, {0x1f22}}},
+ { 0x1f2b, {1, {0x1f23}}},
+ { 0x1f2c, {1, {0x1f24}}},
+ { 0x1f2d, {1, {0x1f25}}},
+ { 0x1f2e, {1, {0x1f26}}},
+ { 0x1f2f, {1, {0x1f27}}},
+ { 0x1f38, {1, {0x1f30}}},
+ { 0x1f39, {1, {0x1f31}}},
+ { 0x1f3a, {1, {0x1f32}}},
+ { 0x1f3b, {1, {0x1f33}}},
+ { 0x1f3c, {1, {0x1f34}}},
+ { 0x1f3d, {1, {0x1f35}}},
+ { 0x1f3e, {1, {0x1f36}}},
+ { 0x1f3f, {1, {0x1f37}}},
+ { 0x1f48, {1, {0x1f40}}},
+ { 0x1f49, {1, {0x1f41}}},
+ { 0x1f4a, {1, {0x1f42}}},
+ { 0x1f4b, {1, {0x1f43}}},
+ { 0x1f4c, {1, {0x1f44}}},
+ { 0x1f4d, {1, {0x1f45}}},
+ { 0x1f50, {2, {0x03c5, 0x0313}}},
+ { 0x1f52, {3, {0x03c5, 0x0313, 0x0300}}},
+ { 0x1f54, {3, {0x03c5, 0x0313, 0x0301}}},
+ { 0x1f56, {3, {0x03c5, 0x0313, 0x0342}}},
+ { 0x1f59, {1, {0x1f51}}},
+ { 0x1f5b, {1, {0x1f53}}},
+ { 0x1f5d, {1, {0x1f55}}},
+ { 0x1f5f, {1, {0x1f57}}},
+ { 0x1f68, {1, {0x1f60}}},
+ { 0x1f69, {1, {0x1f61}}},
+ { 0x1f6a, {1, {0x1f62}}},
+ { 0x1f6b, {1, {0x1f63}}},
+ { 0x1f6c, {1, {0x1f64}}},
+ { 0x1f6d, {1, {0x1f65}}},
+ { 0x1f6e, {1, {0x1f66}}},
+ { 0x1f6f, {1, {0x1f67}}},
+ { 0x1f80, {2, {0x1f00, 0x03b9}}},
+ { 0x1f81, {2, {0x1f01, 0x03b9}}},
+ { 0x1f82, {2, {0x1f02, 0x03b9}}},
+ { 0x1f83, {2, {0x1f03, 0x03b9}}},
+ { 0x1f84, {2, {0x1f04, 0x03b9}}},
+ { 0x1f85, {2, {0x1f05, 0x03b9}}},
+ { 0x1f86, {2, {0x1f06, 0x03b9}}},
+ { 0x1f87, {2, {0x1f07, 0x03b9}}},
+ { 0x1f88, {2, {0x1f00, 0x03b9}}},
+ { 0x1f89, {2, {0x1f01, 0x03b9}}},
+ { 0x1f8a, {2, {0x1f02, 0x03b9}}},
+ { 0x1f8b, {2, {0x1f03, 0x03b9}}},
+ { 0x1f8c, {2, {0x1f04, 0x03b9}}},
+ { 0x1f8d, {2, {0x1f05, 0x03b9}}},
+ { 0x1f8e, {2, {0x1f06, 0x03b9}}},
+ { 0x1f8f, {2, {0x1f07, 0x03b9}}},
+ { 0x1f90, {2, {0x1f20, 0x03b9}}},
+ { 0x1f91, {2, {0x1f21, 0x03b9}}},
+ { 0x1f92, {2, {0x1f22, 0x03b9}}},
+ { 0x1f93, {2, {0x1f23, 0x03b9}}},
+ { 0x1f94, {2, {0x1f24, 0x03b9}}},
+ { 0x1f95, {2, {0x1f25, 0x03b9}}},
+ { 0x1f96, {2, {0x1f26, 0x03b9}}},
+ { 0x1f97, {2, {0x1f27, 0x03b9}}},
+ { 0x1f98, {2, {0x1f20, 0x03b9}}},
+ { 0x1f99, {2, {0x1f21, 0x03b9}}},
+ { 0x1f9a, {2, {0x1f22, 0x03b9}}},
+ { 0x1f9b, {2, {0x1f23, 0x03b9}}},
+ { 0x1f9c, {2, {0x1f24, 0x03b9}}},
+ { 0x1f9d, {2, {0x1f25, 0x03b9}}},
+ { 0x1f9e, {2, {0x1f26, 0x03b9}}},
+ { 0x1f9f, {2, {0x1f27, 0x03b9}}},
+ { 0x1fa0, {2, {0x1f60, 0x03b9}}},
+ { 0x1fa1, {2, {0x1f61, 0x03b9}}},
+ { 0x1fa2, {2, {0x1f62, 0x03b9}}},
+ { 0x1fa3, {2, {0x1f63, 0x03b9}}},
+ { 0x1fa4, {2, {0x1f64, 0x03b9}}},
+ { 0x1fa5, {2, {0x1f65, 0x03b9}}},
+ { 0x1fa6, {2, {0x1f66, 0x03b9}}},
+ { 0x1fa7, {2, {0x1f67, 0x03b9}}},
+ { 0x1fa8, {2, {0x1f60, 0x03b9}}},
+ { 0x1fa9, {2, {0x1f61, 0x03b9}}},
+ { 0x1faa, {2, {0x1f62, 0x03b9}}},
+ { 0x1fab, {2, {0x1f63, 0x03b9}}},
+ { 0x1fac, {2, {0x1f64, 0x03b9}}},
+ { 0x1fad, {2, {0x1f65, 0x03b9}}},
+ { 0x1fae, {2, {0x1f66, 0x03b9}}},
+ { 0x1faf, {2, {0x1f67, 0x03b9}}},
+ { 0x1fb2, {2, {0x1f70, 0x03b9}}},
+ { 0x1fb3, {2, {0x03b1, 0x03b9}}},
+ { 0x1fb4, {2, {0x03ac, 0x03b9}}},
+ { 0x1fb6, {2, {0x03b1, 0x0342}}},
+ { 0x1fb7, {3, {0x03b1, 0x0342, 0x03b9}}},
+ { 0x1fb8, {1, {0x1fb0}}},
+ { 0x1fb9, {1, {0x1fb1}}},
+ { 0x1fba, {1, {0x1f70}}},
+ { 0x1fbb, {1, {0x1f71}}},
+ { 0x1fbc, {2, {0x03b1, 0x03b9}}},
+ { 0x1fbe, {1, {0x03b9}}},
+ { 0x1fc2, {2, {0x1f74, 0x03b9}}},
+ { 0x1fc3, {2, {0x03b7, 0x03b9}}},
+ { 0x1fc4, {2, {0x03ae, 0x03b9}}},
+ { 0x1fc6, {2, {0x03b7, 0x0342}}},
+ { 0x1fc7, {3, {0x03b7, 0x0342, 0x03b9}}},
+ { 0x1fc8, {1, {0x1f72}}},
+ { 0x1fc9, {1, {0x1f73}}},
+ { 0x1fca, {1, {0x1f74}}},
+ { 0x1fcb, {1, {0x1f75}}},
+ { 0x1fcc, {2, {0x03b7, 0x03b9}}},
+ { 0x1fd2, {3, {0x03b9, 0x0308, 0x0300}}},
+ { 0x1fd3, {3, {0x03b9, 0x0308, 0x0301}}},
+ { 0x1fd6, {2, {0x03b9, 0x0342}}},
+ { 0x1fd7, {3, {0x03b9, 0x0308, 0x0342}}},
+ { 0x1fd8, {1, {0x1fd0}}},
+ { 0x1fd9, {1, {0x1fd1}}},
+ { 0x1fda, {1, {0x1f76}}},
+ { 0x1fdb, {1, {0x1f77}}},
+ { 0x1fe2, {3, {0x03c5, 0x0308, 0x0300}}},
+ { 0x1fe3, {3, {0x03c5, 0x0308, 0x0301}}},
+ { 0x1fe4, {2, {0x03c1, 0x0313}}},
+ { 0x1fe6, {2, {0x03c5, 0x0342}}},
+ { 0x1fe7, {3, {0x03c5, 0x0308, 0x0342}}},
+ { 0x1fe8, {1, {0x1fe0}}},
+ { 0x1fe9, {1, {0x1fe1}}},
+ { 0x1fea, {1, {0x1f7a}}},
+ { 0x1feb, {1, {0x1f7b}}},
+ { 0x1fec, {1, {0x1fe5}}},
+ { 0x1ff2, {2, {0x1f7c, 0x03b9}}},
+ { 0x1ff3, {2, {0x03c9, 0x03b9}}},
+ { 0x1ff4, {2, {0x03ce, 0x03b9}}},
+ { 0x1ff6, {2, {0x03c9, 0x0342}}},
+ { 0x1ff7, {3, {0x03c9, 0x0342, 0x03b9}}},
+ { 0x1ff8, {1, {0x1f78}}},
+ { 0x1ff9, {1, {0x1f79}}},
+ { 0x1ffa, {1, {0x1f7c}}},
+ { 0x1ffb, {1, {0x1f7d}}},
+ { 0x1ffc, {2, {0x03c9, 0x03b9}}},
+ { 0x2126, {1, {0x03c9}}},
+ { 0x212a, {1, {0x006b}}},
+ { 0x212b, {1, {0x00e5}}},
+ { 0x2160, {1, {0x2170}}},
+ { 0x2161, {1, {0x2171}}},
+ { 0x2162, {1, {0x2172}}},
+ { 0x2163, {1, {0x2173}}},
+ { 0x2164, {1, {0x2174}}},
+ { 0x2165, {1, {0x2175}}},
+ { 0x2166, {1, {0x2176}}},
+ { 0x2167, {1, {0x2177}}},
+ { 0x2168, {1, {0x2178}}},
+ { 0x2169, {1, {0x2179}}},
+ { 0x216a, {1, {0x217a}}},
+ { 0x216b, {1, {0x217b}}},
+ { 0x216c, {1, {0x217c}}},
+ { 0x216d, {1, {0x217d}}},
+ { 0x216e, {1, {0x217e}}},
+ { 0x216f, {1, {0x217f}}},
+ { 0x24b6, {1, {0x24d0}}},
+ { 0x24b7, {1, {0x24d1}}},
+ { 0x24b8, {1, {0x24d2}}},
+ { 0x24b9, {1, {0x24d3}}},
+ { 0x24ba, {1, {0x24d4}}},
+ { 0x24bb, {1, {0x24d5}}},
+ { 0x24bc, {1, {0x24d6}}},
+ { 0x24bd, {1, {0x24d7}}},
+ { 0x24be, {1, {0x24d8}}},
+ { 0x24bf, {1, {0x24d9}}},
+ { 0x24c0, {1, {0x24da}}},
+ { 0x24c1, {1, {0x24db}}},
+ { 0x24c2, {1, {0x24dc}}},
+ { 0x24c3, {1, {0x24dd}}},
+ { 0x24c4, {1, {0x24de}}},
+ { 0x24c5, {1, {0x24df}}},
+ { 0x24c6, {1, {0x24e0}}},
+ { 0x24c7, {1, {0x24e1}}},
+ { 0x24c8, {1, {0x24e2}}},
+ { 0x24c9, {1, {0x24e3}}},
+ { 0x24ca, {1, {0x24e4}}},
+ { 0x24cb, {1, {0x24e5}}},
+ { 0x24cc, {1, {0x24e6}}},
+ { 0x24cd, {1, {0x24e7}}},
+ { 0x24ce, {1, {0x24e8}}},
+ { 0x24cf, {1, {0x24e9}}},
+ { 0x2c00, {1, {0x2c30}}},
+ { 0x2c01, {1, {0x2c31}}},
+ { 0x2c02, {1, {0x2c32}}},
+ { 0x2c03, {1, {0x2c33}}},
+ { 0x2c04, {1, {0x2c34}}},
+ { 0x2c05, {1, {0x2c35}}},
+ { 0x2c06, {1, {0x2c36}}},
+ { 0x2c07, {1, {0x2c37}}},
+ { 0x2c08, {1, {0x2c38}}},
+ { 0x2c09, {1, {0x2c39}}},
+ { 0x2c0a, {1, {0x2c3a}}},
+ { 0x2c0b, {1, {0x2c3b}}},
+ { 0x2c0c, {1, {0x2c3c}}},
+ { 0x2c0d, {1, {0x2c3d}}},
+ { 0x2c0e, {1, {0x2c3e}}},
+ { 0x2c0f, {1, {0x2c3f}}},
+ { 0x2c10, {1, {0x2c40}}},
+ { 0x2c11, {1, {0x2c41}}},
+ { 0x2c12, {1, {0x2c42}}},
+ { 0x2c13, {1, {0x2c43}}},
+ { 0x2c14, {1, {0x2c44}}},
+ { 0x2c15, {1, {0x2c45}}},
+ { 0x2c16, {1, {0x2c46}}},
+ { 0x2c17, {1, {0x2c47}}},
+ { 0x2c18, {1, {0x2c48}}},
+ { 0x2c19, {1, {0x2c49}}},
+ { 0x2c1a, {1, {0x2c4a}}},
+ { 0x2c1b, {1, {0x2c4b}}},
+ { 0x2c1c, {1, {0x2c4c}}},
+ { 0x2c1d, {1, {0x2c4d}}},
+ { 0x2c1e, {1, {0x2c4e}}},
+ { 0x2c1f, {1, {0x2c4f}}},
+ { 0x2c20, {1, {0x2c50}}},
+ { 0x2c21, {1, {0x2c51}}},
+ { 0x2c22, {1, {0x2c52}}},
+ { 0x2c23, {1, {0x2c53}}},
+ { 0x2c24, {1, {0x2c54}}},
+ { 0x2c25, {1, {0x2c55}}},
+ { 0x2c26, {1, {0x2c56}}},
+ { 0x2c27, {1, {0x2c57}}},
+ { 0x2c28, {1, {0x2c58}}},
+ { 0x2c29, {1, {0x2c59}}},
+ { 0x2c2a, {1, {0x2c5a}}},
+ { 0x2c2b, {1, {0x2c5b}}},
+ { 0x2c2c, {1, {0x2c5c}}},
+ { 0x2c2d, {1, {0x2c5d}}},
+ { 0x2c2e, {1, {0x2c5e}}},
+ { 0x2c80, {1, {0x2c81}}},
+ { 0x2c82, {1, {0x2c83}}},
+ { 0x2c84, {1, {0x2c85}}},
+ { 0x2c86, {1, {0x2c87}}},
+ { 0x2c88, {1, {0x2c89}}},
+ { 0x2c8a, {1, {0x2c8b}}},
+ { 0x2c8c, {1, {0x2c8d}}},
+ { 0x2c8e, {1, {0x2c8f}}},
+ { 0x2c90, {1, {0x2c91}}},
+ { 0x2c92, {1, {0x2c93}}},
+ { 0x2c94, {1, {0x2c95}}},
+ { 0x2c96, {1, {0x2c97}}},
+ { 0x2c98, {1, {0x2c99}}},
+ { 0x2c9a, {1, {0x2c9b}}},
+ { 0x2c9c, {1, {0x2c9d}}},
+ { 0x2c9e, {1, {0x2c9f}}},
+ { 0x2ca0, {1, {0x2ca1}}},
+ { 0x2ca2, {1, {0x2ca3}}},
+ { 0x2ca4, {1, {0x2ca5}}},
+ { 0x2ca6, {1, {0x2ca7}}},
+ { 0x2ca8, {1, {0x2ca9}}},
+ { 0x2caa, {1, {0x2cab}}},
+ { 0x2cac, {1, {0x2cad}}},
+ { 0x2cae, {1, {0x2caf}}},
+ { 0x2cb0, {1, {0x2cb1}}},
+ { 0x2cb2, {1, {0x2cb3}}},
+ { 0x2cb4, {1, {0x2cb5}}},
+ { 0x2cb6, {1, {0x2cb7}}},
+ { 0x2cb8, {1, {0x2cb9}}},
+ { 0x2cba, {1, {0x2cbb}}},
+ { 0x2cbc, {1, {0x2cbd}}},
+ { 0x2cbe, {1, {0x2cbf}}},
+ { 0x2cc0, {1, {0x2cc1}}},
+ { 0x2cc2, {1, {0x2cc3}}},
+ { 0x2cc4, {1, {0x2cc5}}},
+ { 0x2cc6, {1, {0x2cc7}}},
+ { 0x2cc8, {1, {0x2cc9}}},
+ { 0x2cca, {1, {0x2ccb}}},
+ { 0x2ccc, {1, {0x2ccd}}},
+ { 0x2cce, {1, {0x2ccf}}},
+ { 0x2cd0, {1, {0x2cd1}}},
+ { 0x2cd2, {1, {0x2cd3}}},
+ { 0x2cd4, {1, {0x2cd5}}},
+ { 0x2cd6, {1, {0x2cd7}}},
+ { 0x2cd8, {1, {0x2cd9}}},
+ { 0x2cda, {1, {0x2cdb}}},
+ { 0x2cdc, {1, {0x2cdd}}},
+ { 0x2cde, {1, {0x2cdf}}},
+ { 0x2ce0, {1, {0x2ce1}}},
+ { 0x2ce2, {1, {0x2ce3}}},
+ { 0xfb00, {2, {0x0066, 0x0066}}},
+ { 0xfb01, {2, {0x0066, 0x0069}}},
+ { 0xfb02, {2, {0x0066, 0x006c}}},
+ { 0xfb03, {3, {0x0066, 0x0066, 0x0069}}},
+ { 0xfb04, {3, {0x0066, 0x0066, 0x006c}}},
+ { 0xfb05, {2, {0x0073, 0x0074}}},
+ { 0xfb06, {2, {0x0073, 0x0074}}},
+ { 0xfb13, {2, {0x0574, 0x0576}}},
+ { 0xfb14, {2, {0x0574, 0x0565}}},
+ { 0xfb15, {2, {0x0574, 0x056b}}},
+ { 0xfb16, {2, {0x057e, 0x0576}}},
+ { 0xfb17, {2, {0x0574, 0x056d}}},
+ { 0xff21, {1, {0xff41}}},
+ { 0xff22, {1, {0xff42}}},
+ { 0xff23, {1, {0xff43}}},
+ { 0xff24, {1, {0xff44}}},
+ { 0xff25, {1, {0xff45}}},
+ { 0xff26, {1, {0xff46}}},
+ { 0xff27, {1, {0xff47}}},
+ { 0xff28, {1, {0xff48}}},
+ { 0xff29, {1, {0xff49}}},
+ { 0xff2a, {1, {0xff4a}}},
+ { 0xff2b, {1, {0xff4b}}},
+ { 0xff2c, {1, {0xff4c}}},
+ { 0xff2d, {1, {0xff4d}}},
+ { 0xff2e, {1, {0xff4e}}},
+ { 0xff2f, {1, {0xff4f}}},
+ { 0xff30, {1, {0xff50}}},
+ { 0xff31, {1, {0xff51}}},
+ { 0xff32, {1, {0xff52}}},
+ { 0xff33, {1, {0xff53}}},
+ { 0xff34, {1, {0xff54}}},
+ { 0xff35, {1, {0xff55}}},
+ { 0xff36, {1, {0xff56}}},
+ { 0xff37, {1, {0xff57}}},
+ { 0xff38, {1, {0xff58}}},
+ { 0xff39, {1, {0xff59}}},
+ { 0xff3a, {1, {0xff5a}}},
+ { 0x10400, {1, {0x10428}}},
+ { 0x10401, {1, {0x10429}}},
+ { 0x10402, {1, {0x1042a}}},
+ { 0x10403, {1, {0x1042b}}},
+ { 0x10404, {1, {0x1042c}}},
+ { 0x10405, {1, {0x1042d}}},
+ { 0x10406, {1, {0x1042e}}},
+ { 0x10407, {1, {0x1042f}}},
+ { 0x10408, {1, {0x10430}}},
+ { 0x10409, {1, {0x10431}}},
+ { 0x1040a, {1, {0x10432}}},
+ { 0x1040b, {1, {0x10433}}},
+ { 0x1040c, {1, {0x10434}}},
+ { 0x1040d, {1, {0x10435}}},
+ { 0x1040e, {1, {0x10436}}},
+ { 0x1040f, {1, {0x10437}}},
+ { 0x10410, {1, {0x10438}}},
+ { 0x10411, {1, {0x10439}}},
+ { 0x10412, {1, {0x1043a}}},
+ { 0x10413, {1, {0x1043b}}},
+ { 0x10414, {1, {0x1043c}}},
+ { 0x10415, {1, {0x1043d}}},
+ { 0x10416, {1, {0x1043e}}},
+ { 0x10417, {1, {0x1043f}}},
+ { 0x10418, {1, {0x10440}}},
+ { 0x10419, {1, {0x10441}}},
+ { 0x1041a, {1, {0x10442}}},
+ { 0x1041b, {1, {0x10443}}},
+ { 0x1041c, {1, {0x10444}}},
+ { 0x1041d, {1, {0x10445}}},
+ { 0x1041e, {1, {0x10446}}},
+ { 0x1041f, {1, {0x10447}}},
+ { 0x10420, {1, {0x10448}}},
+ { 0x10421, {1, {0x10449}}},
+ { 0x10422, {1, {0x1044a}}},
+ { 0x10423, {1, {0x1044b}}},
+ { 0x10424, {1, {0x1044c}}},
+ { 0x10425, {1, {0x1044d}}},
+ { 0x10426, {1, {0x1044e}}},
+ { 0x10427, {1, {0x1044f}}}
+};
+
+static const CaseFold_11_Type CaseFold_Locale[] = {
+ { 0x0049, {1, {0x0069}}},
+ { 0x0130, {2, {0x0069, 0x0307}}}
+};
+
+static const CaseUnfold_11_Type CaseUnfold_11[] = {
+ { 0x0061, {1, {0x0041 }}},
+ { 0x0062, {1, {0x0042 }}},
+ { 0x0063, {1, {0x0043 }}},
+ { 0x0064, {1, {0x0044 }}},
+ { 0x0065, {1, {0x0045 }}},
+ { 0x0066, {1, {0x0046 }}},
+ { 0x0067, {1, {0x0047 }}},
+ { 0x0068, {1, {0x0048 }}},
+ { 0x006a, {1, {0x004a }}},
+ { 0x006b, {2, {0x212a, 0x004b }}},
+ { 0x006c, {1, {0x004c }}},
+ { 0x006d, {1, {0x004d }}},
+ { 0x006e, {1, {0x004e }}},
+ { 0x006f, {1, {0x004f }}},
+ { 0x0070, {1, {0x0050 }}},
+ { 0x0071, {1, {0x0051 }}},
+ { 0x0072, {1, {0x0052 }}},
+ { 0x0073, {2, {0x0053, 0x017f }}},
+ { 0x0074, {1, {0x0054 }}},
+ { 0x0075, {1, {0x0055 }}},
+ { 0x0076, {1, {0x0056 }}},
+ { 0x0077, {1, {0x0057 }}},
+ { 0x0078, {1, {0x0058 }}},
+ { 0x0079, {1, {0x0059 }}},
+ { 0x007a, {1, {0x005a }}},
+ { 0x00e0, {1, {0x00c0 }}},
+ { 0x00e1, {1, {0x00c1 }}},
+ { 0x00e2, {1, {0x00c2 }}},
+ { 0x00e3, {1, {0x00c3 }}},
+ { 0x00e4, {1, {0x00c4 }}},
+ { 0x00e5, {2, {0x212b, 0x00c5 }}},
+ { 0x00e6, {1, {0x00c6 }}},
+ { 0x00e7, {1, {0x00c7 }}},
+ { 0x00e8, {1, {0x00c8 }}},
+ { 0x00e9, {1, {0x00c9 }}},
+ { 0x00ea, {1, {0x00ca }}},
+ { 0x00eb, {1, {0x00cb }}},
+ { 0x00ec, {1, {0x00cc }}},
+ { 0x00ed, {1, {0x00cd }}},
+ { 0x00ee, {1, {0x00ce }}},
+ { 0x00ef, {1, {0x00cf }}},
+ { 0x00f0, {1, {0x00d0 }}},
+ { 0x00f1, {1, {0x00d1 }}},
+ { 0x00f2, {1, {0x00d2 }}},
+ { 0x00f3, {1, {0x00d3 }}},
+ { 0x00f4, {1, {0x00d4 }}},
+ { 0x00f5, {1, {0x00d5 }}},
+ { 0x00f6, {1, {0x00d6 }}},
+ { 0x00f8, {1, {0x00d8 }}},
+ { 0x00f9, {1, {0x00d9 }}},
+ { 0x00fa, {1, {0x00da }}},
+ { 0x00fb, {1, {0x00db }}},
+ { 0x00fc, {1, {0x00dc }}},
+ { 0x00fd, {1, {0x00dd }}},
+ { 0x00fe, {1, {0x00de }}},
+ { 0x00ff, {1, {0x0178 }}},
+ { 0x0101, {1, {0x0100 }}},
+ { 0x0103, {1, {0x0102 }}},
+ { 0x0105, {1, {0x0104 }}},
+ { 0x0107, {1, {0x0106 }}},
+ { 0x0109, {1, {0x0108 }}},
+ { 0x010b, {1, {0x010a }}},
+ { 0x010d, {1, {0x010c }}},
+ { 0x010f, {1, {0x010e }}},
+ { 0x0111, {1, {0x0110 }}},
+ { 0x0113, {1, {0x0112 }}},
+ { 0x0115, {1, {0x0114 }}},
+ { 0x0117, {1, {0x0116 }}},
+ { 0x0119, {1, {0x0118 }}},
+ { 0x011b, {1, {0x011a }}},
+ { 0x011d, {1, {0x011c }}},
+ { 0x011f, {1, {0x011e }}},
+ { 0x0121, {1, {0x0120 }}},
+ { 0x0123, {1, {0x0122 }}},
+ { 0x0125, {1, {0x0124 }}},
+ { 0x0127, {1, {0x0126 }}},
+ { 0x0129, {1, {0x0128 }}},
+ { 0x012b, {1, {0x012a }}},
+ { 0x012d, {1, {0x012c }}},
+ { 0x012f, {1, {0x012e }}},
+ { 0x0133, {1, {0x0132 }}},
+ { 0x0135, {1, {0x0134 }}},
+ { 0x0137, {1, {0x0136 }}},
+ { 0x013a, {1, {0x0139 }}},
+ { 0x013c, {1, {0x013b }}},
+ { 0x013e, {1, {0x013d }}},
+ { 0x0140, {1, {0x013f }}},
+ { 0x0142, {1, {0x0141 }}},
+ { 0x0144, {1, {0x0143 }}},
+ { 0x0146, {1, {0x0145 }}},
+ { 0x0148, {1, {0x0147 }}},
+ { 0x014b, {1, {0x014a }}},
+ { 0x014d, {1, {0x014c }}},
+ { 0x014f, {1, {0x014e }}},
+ { 0x0151, {1, {0x0150 }}},
+ { 0x0153, {1, {0x0152 }}},
+ { 0x0155, {1, {0x0154 }}},
+ { 0x0157, {1, {0x0156 }}},
+ { 0x0159, {1, {0x0158 }}},
+ { 0x015b, {1, {0x015a }}},
+ { 0x015d, {1, {0x015c }}},
+ { 0x015f, {1, {0x015e }}},
+ { 0x0161, {1, {0x0160 }}},
+ { 0x0163, {1, {0x0162 }}},
+ { 0x0165, {1, {0x0164 }}},
+ { 0x0167, {1, {0x0166 }}},
+ { 0x0169, {1, {0x0168 }}},
+ { 0x016b, {1, {0x016a }}},
+ { 0x016d, {1, {0x016c }}},
+ { 0x016f, {1, {0x016e }}},
+ { 0x0171, {1, {0x0170 }}},
+ { 0x0173, {1, {0x0172 }}},
+ { 0x0175, {1, {0x0174 }}},
+ { 0x0177, {1, {0x0176 }}},
+ { 0x017a, {1, {0x0179 }}},
+ { 0x017c, {1, {0x017b }}},
+ { 0x017e, {1, {0x017d }}},
+ { 0x0183, {1, {0x0182 }}},
+ { 0x0185, {1, {0x0184 }}},
+ { 0x0188, {1, {0x0187 }}},
+ { 0x018c, {1, {0x018b }}},
+ { 0x0192, {1, {0x0191 }}},
+ { 0x0195, {1, {0x01f6 }}},
+ { 0x0199, {1, {0x0198 }}},
+ { 0x019a, {1, {0x023d }}},
+ { 0x019e, {1, {0x0220 }}},
+ { 0x01a1, {1, {0x01a0 }}},
+ { 0x01a3, {1, {0x01a2 }}},
+ { 0x01a5, {1, {0x01a4 }}},
+ { 0x01a8, {1, {0x01a7 }}},
+ { 0x01ad, {1, {0x01ac }}},
+ { 0x01b0, {1, {0x01af }}},
+ { 0x01b4, {1, {0x01b3 }}},
+ { 0x01b6, {1, {0x01b5 }}},
+ { 0x01b9, {1, {0x01b8 }}},
+ { 0x01bd, {1, {0x01bc }}},
+ { 0x01bf, {1, {0x01f7 }}},
+ { 0x01c6, {2, {0x01c4, 0x01c5 }}},
+ { 0x01c9, {2, {0x01c7, 0x01c8 }}},
+ { 0x01cc, {2, {0x01ca, 0x01cb }}},
+ { 0x01ce, {1, {0x01cd }}},
+ { 0x01d0, {1, {0x01cf }}},
+ { 0x01d2, {1, {0x01d1 }}},
+ { 0x01d4, {1, {0x01d3 }}},
+ { 0x01d6, {1, {0x01d5 }}},
+ { 0x01d8, {1, {0x01d7 }}},
+ { 0x01da, {1, {0x01d9 }}},
+ { 0x01dc, {1, {0x01db }}},
+ { 0x01dd, {1, {0x018e }}},
+ { 0x01df, {1, {0x01de }}},
+ { 0x01e1, {1, {0x01e0 }}},
+ { 0x01e3, {1, {0x01e2 }}},
+ { 0x01e5, {1, {0x01e4 }}},
+ { 0x01e7, {1, {0x01e6 }}},
+ { 0x01e9, {1, {0x01e8 }}},
+ { 0x01eb, {1, {0x01ea }}},
+ { 0x01ed, {1, {0x01ec }}},
+ { 0x01ef, {1, {0x01ee }}},
+ { 0x01f3, {2, {0x01f1, 0x01f2 }}},
+ { 0x01f5, {1, {0x01f4 }}},
+ { 0x01f9, {1, {0x01f8 }}},
+ { 0x01fb, {1, {0x01fa }}},
+ { 0x01fd, {1, {0x01fc }}},
+ { 0x01ff, {1, {0x01fe }}},
+ { 0x0201, {1, {0x0200 }}},
+ { 0x0203, {1, {0x0202 }}},
+ { 0x0205, {1, {0x0204 }}},
+ { 0x0207, {1, {0x0206 }}},
+ { 0x0209, {1, {0x0208 }}},
+ { 0x020b, {1, {0x020a }}},
+ { 0x020d, {1, {0x020c }}},
+ { 0x020f, {1, {0x020e }}},
+ { 0x0211, {1, {0x0210 }}},
+ { 0x0213, {1, {0x0212 }}},
+ { 0x0215, {1, {0x0214 }}},
+ { 0x0217, {1, {0x0216 }}},
+ { 0x0219, {1, {0x0218 }}},
+ { 0x021b, {1, {0x021a }}},
+ { 0x021d, {1, {0x021c }}},
+ { 0x021f, {1, {0x021e }}},
+ { 0x0223, {1, {0x0222 }}},
+ { 0x0225, {1, {0x0224 }}},
+ { 0x0227, {1, {0x0226 }}},
+ { 0x0229, {1, {0x0228 }}},
+ { 0x022b, {1, {0x022a }}},
+ { 0x022d, {1, {0x022c }}},
+ { 0x022f, {1, {0x022e }}},
+ { 0x0231, {1, {0x0230 }}},
+ { 0x0233, {1, {0x0232 }}},
+ { 0x023c, {1, {0x023b }}},
+ { 0x0253, {1, {0x0181 }}},
+ { 0x0254, {1, {0x0186 }}},
+ { 0x0256, {1, {0x0189 }}},
+ { 0x0257, {1, {0x018a }}},
+ { 0x0259, {1, {0x018f }}},
+ { 0x025b, {1, {0x0190 }}},
+ { 0x0260, {1, {0x0193 }}},
+ { 0x0263, {1, {0x0194 }}},
+ { 0x0268, {1, {0x0197 }}},
+ { 0x0269, {1, {0x0196 }}},
+ { 0x026f, {1, {0x019c }}},
+ { 0x0272, {1, {0x019d }}},
+ { 0x0275, {1, {0x019f }}},
+ { 0x0280, {1, {0x01a6 }}},
+ { 0x0283, {1, {0x01a9 }}},
+ { 0x0288, {1, {0x01ae }}},
+ { 0x028a, {1, {0x01b1 }}},
+ { 0x028b, {1, {0x01b2 }}},
+ { 0x0292, {1, {0x01b7 }}},
+ { 0x0294, {1, {0x0241 }}},
+ { 0x03ac, {1, {0x0386 }}},
+ { 0x03ad, {1, {0x0388 }}},
+ { 0x03ae, {1, {0x0389 }}},
+ { 0x03af, {1, {0x038a }}},
+ { 0x03b1, {1, {0x0391 }}},
+ { 0x03b2, {2, {0x0392, 0x03d0 }}},
+ { 0x03b3, {1, {0x0393 }}},
+ { 0x03b4, {1, {0x0394 }}},
+ { 0x03b5, {2, {0x03f5, 0x0395 }}},
+ { 0x03b6, {1, {0x0396 }}},
+ { 0x03b7, {1, {0x0397 }}},
+ { 0x03b8, {3, {0x03f4, 0x0398, 0x03d1 }}},
+ { 0x03b9, {3, {0x1fbe, 0x0399, 0x0345 }}},
+ { 0x03ba, {2, {0x03f0, 0x039a }}},
+ { 0x03bb, {1, {0x039b }}},
+ { 0x03bc, {2, {0x00b5, 0x039c }}},
+ { 0x03bd, {1, {0x039d }}},
+ { 0x03be, {1, {0x039e }}},
+ { 0x03bf, {1, {0x039f }}},
+ { 0x03c0, {2, {0x03a0, 0x03d6 }}},
+ { 0x03c1, {2, {0x03f1, 0x03a1 }}},
+ { 0x03c3, {2, {0x03a3, 0x03c2 }}},
+ { 0x03c4, {1, {0x03a4 }}},
+ { 0x03c5, {1, {0x03a5 }}},
+ { 0x03c6, {2, {0x03a6, 0x03d5 }}},
+ { 0x03c7, {1, {0x03a7 }}},
+ { 0x03c8, {1, {0x03a8 }}},
+ { 0x03c9, {2, {0x03a9, 0x2126 }}},
+ { 0x03ca, {1, {0x03aa }}},
+ { 0x03cb, {1, {0x03ab }}},
+ { 0x03cc, {1, {0x038c }}},
+ { 0x03cd, {1, {0x038e }}},
+ { 0x03ce, {1, {0x038f }}},
+ { 0x03d9, {1, {0x03d8 }}},
+ { 0x03db, {1, {0x03da }}},
+ { 0x03dd, {1, {0x03dc }}},
+ { 0x03df, {1, {0x03de }}},
+ { 0x03e1, {1, {0x03e0 }}},
+ { 0x03e3, {1, {0x03e2 }}},
+ { 0x03e5, {1, {0x03e4 }}},
+ { 0x03e7, {1, {0x03e6 }}},
+ { 0x03e9, {1, {0x03e8 }}},
+ { 0x03eb, {1, {0x03ea }}},
+ { 0x03ed, {1, {0x03ec }}},
+ { 0x03ef, {1, {0x03ee }}},
+ { 0x03f2, {1, {0x03f9 }}},
+ { 0x03f8, {1, {0x03f7 }}},
+ { 0x03fb, {1, {0x03fa }}},
+ { 0x0430, {1, {0x0410 }}},
+ { 0x0431, {1, {0x0411 }}},
+ { 0x0432, {1, {0x0412 }}},
+ { 0x0433, {1, {0x0413 }}},
+ { 0x0434, {1, {0x0414 }}},
+ { 0x0435, {1, {0x0415 }}},
+ { 0x0436, {1, {0x0416 }}},
+ { 0x0437, {1, {0x0417 }}},
+ { 0x0438, {1, {0x0418 }}},
+ { 0x0439, {1, {0x0419 }}},
+ { 0x043a, {1, {0x041a }}},
+ { 0x043b, {1, {0x041b }}},
+ { 0x043c, {1, {0x041c }}},
+ { 0x043d, {1, {0x041d }}},
+ { 0x043e, {1, {0x041e }}},
+ { 0x043f, {1, {0x041f }}},
+ { 0x0440, {1, {0x0420 }}},
+ { 0x0441, {1, {0x0421 }}},
+ { 0x0442, {1, {0x0422 }}},
+ { 0x0443, {1, {0x0423 }}},
+ { 0x0444, {1, {0x0424 }}},
+ { 0x0445, {1, {0x0425 }}},
+ { 0x0446, {1, {0x0426 }}},
+ { 0x0447, {1, {0x0427 }}},
+ { 0x0448, {1, {0x0428 }}},
+ { 0x0449, {1, {0x0429 }}},
+ { 0x044a, {1, {0x042a }}},
+ { 0x044b, {1, {0x042b }}},
+ { 0x044c, {1, {0x042c }}},
+ { 0x044d, {1, {0x042d }}},
+ { 0x044e, {1, {0x042e }}},
+ { 0x044f, {1, {0x042f }}},
+ { 0x0450, {1, {0x0400 }}},
+ { 0x0451, {1, {0x0401 }}},
+ { 0x0452, {1, {0x0402 }}},
+ { 0x0453, {1, {0x0403 }}},
+ { 0x0454, {1, {0x0404 }}},
+ { 0x0455, {1, {0x0405 }}},
+ { 0x0456, {1, {0x0406 }}},
+ { 0x0457, {1, {0x0407 }}},
+ { 0x0458, {1, {0x0408 }}},
+ { 0x0459, {1, {0x0409 }}},
+ { 0x045a, {1, {0x040a }}},
+ { 0x045b, {1, {0x040b }}},
+ { 0x045c, {1, {0x040c }}},
+ { 0x045d, {1, {0x040d }}},
+ { 0x045e, {1, {0x040e }}},
+ { 0x045f, {1, {0x040f }}},
+ { 0x0461, {1, {0x0460 }}},
+ { 0x0463, {1, {0x0462 }}},
+ { 0x0465, {1, {0x0464 }}},
+ { 0x0467, {1, {0x0466 }}},
+ { 0x0469, {1, {0x0468 }}},
+ { 0x046b, {1, {0x046a }}},
+ { 0x046d, {1, {0x046c }}},
+ { 0x046f, {1, {0x046e }}},
+ { 0x0471, {1, {0x0470 }}},
+ { 0x0473, {1, {0x0472 }}},
+ { 0x0475, {1, {0x0474 }}},
+ { 0x0477, {1, {0x0476 }}},
+ { 0x0479, {1, {0x0478 }}},
+ { 0x047b, {1, {0x047a }}},
+ { 0x047d, {1, {0x047c }}},
+ { 0x047f, {1, {0x047e }}},
+ { 0x0481, {1, {0x0480 }}},
+ { 0x048b, {1, {0x048a }}},
+ { 0x048d, {1, {0x048c }}},
+ { 0x048f, {1, {0x048e }}},
+ { 0x0491, {1, {0x0490 }}},
+ { 0x0493, {1, {0x0492 }}},
+ { 0x0495, {1, {0x0494 }}},
+ { 0x0497, {1, {0x0496 }}},
+ { 0x0499, {1, {0x0498 }}},
+ { 0x049b, {1, {0x049a }}},
+ { 0x049d, {1, {0x049c }}},
+ { 0x049f, {1, {0x049e }}},
+ { 0x04a1, {1, {0x04a0 }}},
+ { 0x04a3, {1, {0x04a2 }}},
+ { 0x04a5, {1, {0x04a4 }}},
+ { 0x04a7, {1, {0x04a6 }}},
+ { 0x04a9, {1, {0x04a8 }}},
+ { 0x04ab, {1, {0x04aa }}},
+ { 0x04ad, {1, {0x04ac }}},
+ { 0x04af, {1, {0x04ae }}},
+ { 0x04b1, {1, {0x04b0 }}},
+ { 0x04b3, {1, {0x04b2 }}},
+ { 0x04b5, {1, {0x04b4 }}},
+ { 0x04b7, {1, {0x04b6 }}},
+ { 0x04b9, {1, {0x04b8 }}},
+ { 0x04bb, {1, {0x04ba }}},
+ { 0x04bd, {1, {0x04bc }}},
+ { 0x04bf, {1, {0x04be }}},
+ { 0x04c2, {1, {0x04c1 }}},
+ { 0x04c4, {1, {0x04c3 }}},
+ { 0x04c6, {1, {0x04c5 }}},
+ { 0x04c8, {1, {0x04c7 }}},
+ { 0x04ca, {1, {0x04c9 }}},
+ { 0x04cc, {1, {0x04cb }}},
+ { 0x04ce, {1, {0x04cd }}},
+ { 0x04d1, {1, {0x04d0 }}},
+ { 0x04d3, {1, {0x04d2 }}},
+ { 0x04d5, {1, {0x04d4 }}},
+ { 0x04d7, {1, {0x04d6 }}},
+ { 0x04d9, {1, {0x04d8 }}},
+ { 0x04db, {1, {0x04da }}},
+ { 0x04dd, {1, {0x04dc }}},
+ { 0x04df, {1, {0x04de }}},
+ { 0x04e1, {1, {0x04e0 }}},
+ { 0x04e3, {1, {0x04e2 }}},
+ { 0x04e5, {1, {0x04e4 }}},
+ { 0x04e7, {1, {0x04e6 }}},
+ { 0x04e9, {1, {0x04e8 }}},
+ { 0x04eb, {1, {0x04ea }}},
+ { 0x04ed, {1, {0x04ec }}},
+ { 0x04ef, {1, {0x04ee }}},
+ { 0x04f1, {1, {0x04f0 }}},
+ { 0x04f3, {1, {0x04f2 }}},
+ { 0x04f5, {1, {0x04f4 }}},
+ { 0x04f7, {1, {0x04f6 }}},
+ { 0x04f9, {1, {0x04f8 }}},
+ { 0x0501, {1, {0x0500 }}},
+ { 0x0503, {1, {0x0502 }}},
+ { 0x0505, {1, {0x0504 }}},
+ { 0x0507, {1, {0x0506 }}},
+ { 0x0509, {1, {0x0508 }}},
+ { 0x050b, {1, {0x050a }}},
+ { 0x050d, {1, {0x050c }}},
+ { 0x050f, {1, {0x050e }}},
+ { 0x0561, {1, {0x0531 }}},
+ { 0x0562, {1, {0x0532 }}},
+ { 0x0563, {1, {0x0533 }}},
+ { 0x0564, {1, {0x0534 }}},
+ { 0x0565, {1, {0x0535 }}},
+ { 0x0566, {1, {0x0536 }}},
+ { 0x0567, {1, {0x0537 }}},
+ { 0x0568, {1, {0x0538 }}},
+ { 0x0569, {1, {0x0539 }}},
+ { 0x056a, {1, {0x053a }}},
+ { 0x056b, {1, {0x053b }}},
+ { 0x056c, {1, {0x053c }}},
+ { 0x056d, {1, {0x053d }}},
+ { 0x056e, {1, {0x053e }}},
+ { 0x056f, {1, {0x053f }}},
+ { 0x0570, {1, {0x0540 }}},
+ { 0x0571, {1, {0x0541 }}},
+ { 0x0572, {1, {0x0542 }}},
+ { 0x0573, {1, {0x0543 }}},
+ { 0x0574, {1, {0x0544 }}},
+ { 0x0575, {1, {0x0545 }}},
+ { 0x0576, {1, {0x0546 }}},
+ { 0x0577, {1, {0x0547 }}},
+ { 0x0578, {1, {0x0548 }}},
+ { 0x0579, {1, {0x0549 }}},
+ { 0x057a, {1, {0x054a }}},
+ { 0x057b, {1, {0x054b }}},
+ { 0x057c, {1, {0x054c }}},
+ { 0x057d, {1, {0x054d }}},
+ { 0x057e, {1, {0x054e }}},
+ { 0x057f, {1, {0x054f }}},
+ { 0x0580, {1, {0x0550 }}},
+ { 0x0581, {1, {0x0551 }}},
+ { 0x0582, {1, {0x0552 }}},
+ { 0x0583, {1, {0x0553 }}},
+ { 0x0584, {1, {0x0554 }}},
+ { 0x0585, {1, {0x0555 }}},
+ { 0x0586, {1, {0x0556 }}},
+ { 0x1e01, {1, {0x1e00 }}},
+ { 0x1e03, {1, {0x1e02 }}},
+ { 0x1e05, {1, {0x1e04 }}},
+ { 0x1e07, {1, {0x1e06 }}},
+ { 0x1e09, {1, {0x1e08 }}},
+ { 0x1e0b, {1, {0x1e0a }}},
+ { 0x1e0d, {1, {0x1e0c }}},
+ { 0x1e0f, {1, {0x1e0e }}},
+ { 0x1e11, {1, {0x1e10 }}},
+ { 0x1e13, {1, {0x1e12 }}},
+ { 0x1e15, {1, {0x1e14 }}},
+ { 0x1e17, {1, {0x1e16 }}},
+ { 0x1e19, {1, {0x1e18 }}},
+ { 0x1e1b, {1, {0x1e1a }}},
+ { 0x1e1d, {1, {0x1e1c }}},
+ { 0x1e1f, {1, {0x1e1e }}},
+ { 0x1e21, {1, {0x1e20 }}},
+ { 0x1e23, {1, {0x1e22 }}},
+ { 0x1e25, {1, {0x1e24 }}},
+ { 0x1e27, {1, {0x1e26 }}},
+ { 0x1e29, {1, {0x1e28 }}},
+ { 0x1e2b, {1, {0x1e2a }}},
+ { 0x1e2d, {1, {0x1e2c }}},
+ { 0x1e2f, {1, {0x1e2e }}},
+ { 0x1e31, {1, {0x1e30 }}},
+ { 0x1e33, {1, {0x1e32 }}},
+ { 0x1e35, {1, {0x1e34 }}},
+ { 0x1e37, {1, {0x1e36 }}},
+ { 0x1e39, {1, {0x1e38 }}},
+ { 0x1e3b, {1, {0x1e3a }}},
+ { 0x1e3d, {1, {0x1e3c }}},
+ { 0x1e3f, {1, {0x1e3e }}},
+ { 0x1e41, {1, {0x1e40 }}},
+ { 0x1e43, {1, {0x1e42 }}},
+ { 0x1e45, {1, {0x1e44 }}},
+ { 0x1e47, {1, {0x1e46 }}},
+ { 0x1e49, {1, {0x1e48 }}},
+ { 0x1e4b, {1, {0x1e4a }}},
+ { 0x1e4d, {1, {0x1e4c }}},
+ { 0x1e4f, {1, {0x1e4e }}},
+ { 0x1e51, {1, {0x1e50 }}},
+ { 0x1e53, {1, {0x1e52 }}},
+ { 0x1e55, {1, {0x1e54 }}},
+ { 0x1e57, {1, {0x1e56 }}},
+ { 0x1e59, {1, {0x1e58 }}},
+ { 0x1e5b, {1, {0x1e5a }}},
+ { 0x1e5d, {1, {0x1e5c }}},
+ { 0x1e5f, {1, {0x1e5e }}},
+ { 0x1e61, {2, {0x1e9b, 0x1e60 }}},
+ { 0x1e63, {1, {0x1e62 }}},
+ { 0x1e65, {1, {0x1e64 }}},
+ { 0x1e67, {1, {0x1e66 }}},
+ { 0x1e69, {1, {0x1e68 }}},
+ { 0x1e6b, {1, {0x1e6a }}},
+ { 0x1e6d, {1, {0x1e6c }}},
+ { 0x1e6f, {1, {0x1e6e }}},
+ { 0x1e71, {1, {0x1e70 }}},
+ { 0x1e73, {1, {0x1e72 }}},
+ { 0x1e75, {1, {0x1e74 }}},
+ { 0x1e77, {1, {0x1e76 }}},
+ { 0x1e79, {1, {0x1e78 }}},
+ { 0x1e7b, {1, {0x1e7a }}},
+ { 0x1e7d, {1, {0x1e7c }}},
+ { 0x1e7f, {1, {0x1e7e }}},
+ { 0x1e81, {1, {0x1e80 }}},
+ { 0x1e83, {1, {0x1e82 }}},
+ { 0x1e85, {1, {0x1e84 }}},
+ { 0x1e87, {1, {0x1e86 }}},
+ { 0x1e89, {1, {0x1e88 }}},
+ { 0x1e8b, {1, {0x1e8a }}},
+ { 0x1e8d, {1, {0x1e8c }}},
+ { 0x1e8f, {1, {0x1e8e }}},
+ { 0x1e91, {1, {0x1e90 }}},
+ { 0x1e93, {1, {0x1e92 }}},
+ { 0x1e95, {1, {0x1e94 }}},
+ { 0x1ea1, {1, {0x1ea0 }}},
+ { 0x1ea3, {1, {0x1ea2 }}},
+ { 0x1ea5, {1, {0x1ea4 }}},
+ { 0x1ea7, {1, {0x1ea6 }}},
+ { 0x1ea9, {1, {0x1ea8 }}},
+ { 0x1eab, {1, {0x1eaa }}},
+ { 0x1ead, {1, {0x1eac }}},
+ { 0x1eaf, {1, {0x1eae }}},
+ { 0x1eb1, {1, {0x1eb0 }}},
+ { 0x1eb3, {1, {0x1eb2 }}},
+ { 0x1eb5, {1, {0x1eb4 }}},
+ { 0x1eb7, {1, {0x1eb6 }}},
+ { 0x1eb9, {1, {0x1eb8 }}},
+ { 0x1ebb, {1, {0x1eba }}},
+ { 0x1ebd, {1, {0x1ebc }}},
+ { 0x1ebf, {1, {0x1ebe }}},
+ { 0x1ec1, {1, {0x1ec0 }}},
+ { 0x1ec3, {1, {0x1ec2 }}},
+ { 0x1ec5, {1, {0x1ec4 }}},
+ { 0x1ec7, {1, {0x1ec6 }}},
+ { 0x1ec9, {1, {0x1ec8 }}},
+ { 0x1ecb, {1, {0x1eca }}},
+ { 0x1ecd, {1, {0x1ecc }}},
+ { 0x1ecf, {1, {0x1ece }}},
+ { 0x1ed1, {1, {0x1ed0 }}},
+ { 0x1ed3, {1, {0x1ed2 }}},
+ { 0x1ed5, {1, {0x1ed4 }}},
+ { 0x1ed7, {1, {0x1ed6 }}},
+ { 0x1ed9, {1, {0x1ed8 }}},
+ { 0x1edb, {1, {0x1eda }}},
+ { 0x1edd, {1, {0x1edc }}},
+ { 0x1edf, {1, {0x1ede }}},
+ { 0x1ee1, {1, {0x1ee0 }}},
+ { 0x1ee3, {1, {0x1ee2 }}},
+ { 0x1ee5, {1, {0x1ee4 }}},
+ { 0x1ee7, {1, {0x1ee6 }}},
+ { 0x1ee9, {1, {0x1ee8 }}},
+ { 0x1eeb, {1, {0x1eea }}},
+ { 0x1eed, {1, {0x1eec }}},
+ { 0x1eef, {1, {0x1eee }}},
+ { 0x1ef1, {1, {0x1ef0 }}},
+ { 0x1ef3, {1, {0x1ef2 }}},
+ { 0x1ef5, {1, {0x1ef4 }}},
+ { 0x1ef7, {1, {0x1ef6 }}},
+ { 0x1ef9, {1, {0x1ef8 }}},
+ { 0x1f00, {1, {0x1f08 }}},
+ { 0x1f01, {1, {0x1f09 }}},
+ { 0x1f02, {1, {0x1f0a }}},
+ { 0x1f03, {1, {0x1f0b }}},
+ { 0x1f04, {1, {0x1f0c }}},
+ { 0x1f05, {1, {0x1f0d }}},
+ { 0x1f06, {1, {0x1f0e }}},
+ { 0x1f07, {1, {0x1f0f }}},
+ { 0x1f10, {1, {0x1f18 }}},
+ { 0x1f11, {1, {0x1f19 }}},
+ { 0x1f12, {1, {0x1f1a }}},
+ { 0x1f13, {1, {0x1f1b }}},
+ { 0x1f14, {1, {0x1f1c }}},
+ { 0x1f15, {1, {0x1f1d }}},
+ { 0x1f20, {1, {0x1f28 }}},
+ { 0x1f21, {1, {0x1f29 }}},
+ { 0x1f22, {1, {0x1f2a }}},
+ { 0x1f23, {1, {0x1f2b }}},
+ { 0x1f24, {1, {0x1f2c }}},
+ { 0x1f25, {1, {0x1f2d }}},
+ { 0x1f26, {1, {0x1f2e }}},
+ { 0x1f27, {1, {0x1f2f }}},
+ { 0x1f30, {1, {0x1f38 }}},
+ { 0x1f31, {1, {0x1f39 }}},
+ { 0x1f32, {1, {0x1f3a }}},
+ { 0x1f33, {1, {0x1f3b }}},
+ { 0x1f34, {1, {0x1f3c }}},
+ { 0x1f35, {1, {0x1f3d }}},
+ { 0x1f36, {1, {0x1f3e }}},
+ { 0x1f37, {1, {0x1f3f }}},
+ { 0x1f40, {1, {0x1f48 }}},
+ { 0x1f41, {1, {0x1f49 }}},
+ { 0x1f42, {1, {0x1f4a }}},
+ { 0x1f43, {1, {0x1f4b }}},
+ { 0x1f44, {1, {0x1f4c }}},
+ { 0x1f45, {1, {0x1f4d }}},
+ { 0x1f51, {1, {0x1f59 }}},
+ { 0x1f53, {1, {0x1f5b }}},
+ { 0x1f55, {1, {0x1f5d }}},
+ { 0x1f57, {1, {0x1f5f }}},
+ { 0x1f60, {1, {0x1f68 }}},
+ { 0x1f61, {1, {0x1f69 }}},
+ { 0x1f62, {1, {0x1f6a }}},
+ { 0x1f63, {1, {0x1f6b }}},
+ { 0x1f64, {1, {0x1f6c }}},
+ { 0x1f65, {1, {0x1f6d }}},
+ { 0x1f66, {1, {0x1f6e }}},
+ { 0x1f67, {1, {0x1f6f }}},
+ { 0x1f70, {1, {0x1fba }}},
+ { 0x1f71, {1, {0x1fbb }}},
+ { 0x1f72, {1, {0x1fc8 }}},
+ { 0x1f73, {1, {0x1fc9 }}},
+ { 0x1f74, {1, {0x1fca }}},
+ { 0x1f75, {1, {0x1fcb }}},
+ { 0x1f76, {1, {0x1fda }}},
+ { 0x1f77, {1, {0x1fdb }}},
+ { 0x1f78, {1, {0x1ff8 }}},
+ { 0x1f79, {1, {0x1ff9 }}},
+ { 0x1f7a, {1, {0x1fea }}},
+ { 0x1f7b, {1, {0x1feb }}},
+ { 0x1f7c, {1, {0x1ffa }}},
+ { 0x1f7d, {1, {0x1ffb }}},
+ { 0x1fb0, {1, {0x1fb8 }}},
+ { 0x1fb1, {1, {0x1fb9 }}},
+ { 0x1fd0, {1, {0x1fd8 }}},
+ { 0x1fd1, {1, {0x1fd9 }}},
+ { 0x1fe0, {1, {0x1fe8 }}},
+ { 0x1fe1, {1, {0x1fe9 }}},
+ { 0x1fe5, {1, {0x1fec }}},
+ { 0x2170, {1, {0x2160 }}},
+ { 0x2171, {1, {0x2161 }}},
+ { 0x2172, {1, {0x2162 }}},
+ { 0x2173, {1, {0x2163 }}},
+ { 0x2174, {1, {0x2164 }}},
+ { 0x2175, {1, {0x2165 }}},
+ { 0x2176, {1, {0x2166 }}},
+ { 0x2177, {1, {0x2167 }}},
+ { 0x2178, {1, {0x2168 }}},
+ { 0x2179, {1, {0x2169 }}},
+ { 0x217a, {1, {0x216a }}},
+ { 0x217b, {1, {0x216b }}},
+ { 0x217c, {1, {0x216c }}},
+ { 0x217d, {1, {0x216d }}},
+ { 0x217e, {1, {0x216e }}},
+ { 0x217f, {1, {0x216f }}},
+ { 0x24d0, {1, {0x24b6 }}},
+ { 0x24d1, {1, {0x24b7 }}},
+ { 0x24d2, {1, {0x24b8 }}},
+ { 0x24d3, {1, {0x24b9 }}},
+ { 0x24d4, {1, {0x24ba }}},
+ { 0x24d5, {1, {0x24bb }}},
+ { 0x24d6, {1, {0x24bc }}},
+ { 0x24d7, {1, {0x24bd }}},
+ { 0x24d8, {1, {0x24be }}},
+ { 0x24d9, {1, {0x24bf }}},
+ { 0x24da, {1, {0x24c0 }}},
+ { 0x24db, {1, {0x24c1 }}},
+ { 0x24dc, {1, {0x24c2 }}},
+ { 0x24dd, {1, {0x24c3 }}},
+ { 0x24de, {1, {0x24c4 }}},
+ { 0x24df, {1, {0x24c5 }}},
+ { 0x24e0, {1, {0x24c6 }}},
+ { 0x24e1, {1, {0x24c7 }}},
+ { 0x24e2, {1, {0x24c8 }}},
+ { 0x24e3, {1, {0x24c9 }}},
+ { 0x24e4, {1, {0x24ca }}},
+ { 0x24e5, {1, {0x24cb }}},
+ { 0x24e6, {1, {0x24cc }}},
+ { 0x24e7, {1, {0x24cd }}},
+ { 0x24e8, {1, {0x24ce }}},
+ { 0x24e9, {1, {0x24cf }}},
+ { 0x2c30, {1, {0x2c00 }}},
+ { 0x2c31, {1, {0x2c01 }}},
+ { 0x2c32, {1, {0x2c02 }}},
+ { 0x2c33, {1, {0x2c03 }}},
+ { 0x2c34, {1, {0x2c04 }}},
+ { 0x2c35, {1, {0x2c05 }}},
+ { 0x2c36, {1, {0x2c06 }}},
+ { 0x2c37, {1, {0x2c07 }}},
+ { 0x2c38, {1, {0x2c08 }}},
+ { 0x2c39, {1, {0x2c09 }}},
+ { 0x2c3a, {1, {0x2c0a }}},
+ { 0x2c3b, {1, {0x2c0b }}},
+ { 0x2c3c, {1, {0x2c0c }}},
+ { 0x2c3d, {1, {0x2c0d }}},
+ { 0x2c3e, {1, {0x2c0e }}},
+ { 0x2c3f, {1, {0x2c0f }}},
+ { 0x2c40, {1, {0x2c10 }}},
+ { 0x2c41, {1, {0x2c11 }}},
+ { 0x2c42, {1, {0x2c12 }}},
+ { 0x2c43, {1, {0x2c13 }}},
+ { 0x2c44, {1, {0x2c14 }}},
+ { 0x2c45, {1, {0x2c15 }}},
+ { 0x2c46, {1, {0x2c16 }}},
+ { 0x2c47, {1, {0x2c17 }}},
+ { 0x2c48, {1, {0x2c18 }}},
+ { 0x2c49, {1, {0x2c19 }}},
+ { 0x2c4a, {1, {0x2c1a }}},
+ { 0x2c4b, {1, {0x2c1b }}},
+ { 0x2c4c, {1, {0x2c1c }}},
+ { 0x2c4d, {1, {0x2c1d }}},
+ { 0x2c4e, {1, {0x2c1e }}},
+ { 0x2c4f, {1, {0x2c1f }}},
+ { 0x2c50, {1, {0x2c20 }}},
+ { 0x2c51, {1, {0x2c21 }}},
+ { 0x2c52, {1, {0x2c22 }}},
+ { 0x2c53, {1, {0x2c23 }}},
+ { 0x2c54, {1, {0x2c24 }}},
+ { 0x2c55, {1, {0x2c25 }}},
+ { 0x2c56, {1, {0x2c26 }}},
+ { 0x2c57, {1, {0x2c27 }}},
+ { 0x2c58, {1, {0x2c28 }}},
+ { 0x2c59, {1, {0x2c29 }}},
+ { 0x2c5a, {1, {0x2c2a }}},
+ { 0x2c5b, {1, {0x2c2b }}},
+ { 0x2c5c, {1, {0x2c2c }}},
+ { 0x2c5d, {1, {0x2c2d }}},
+ { 0x2c5e, {1, {0x2c2e }}},
+ { 0x2c81, {1, {0x2c80 }}},
+ { 0x2c83, {1, {0x2c82 }}},
+ { 0x2c85, {1, {0x2c84 }}},
+ { 0x2c87, {1, {0x2c86 }}},
+ { 0x2c89, {1, {0x2c88 }}},
+ { 0x2c8b, {1, {0x2c8a }}},
+ { 0x2c8d, {1, {0x2c8c }}},
+ { 0x2c8f, {1, {0x2c8e }}},
+ { 0x2c91, {1, {0x2c90 }}},
+ { 0x2c93, {1, {0x2c92 }}},
+ { 0x2c95, {1, {0x2c94 }}},
+ { 0x2c97, {1, {0x2c96 }}},
+ { 0x2c99, {1, {0x2c98 }}},
+ { 0x2c9b, {1, {0x2c9a }}},
+ { 0x2c9d, {1, {0x2c9c }}},
+ { 0x2c9f, {1, {0x2c9e }}},
+ { 0x2ca1, {1, {0x2ca0 }}},
+ { 0x2ca3, {1, {0x2ca2 }}},
+ { 0x2ca5, {1, {0x2ca4 }}},
+ { 0x2ca7, {1, {0x2ca6 }}},
+ { 0x2ca9, {1, {0x2ca8 }}},
+ { 0x2cab, {1, {0x2caa }}},
+ { 0x2cad, {1, {0x2cac }}},
+ { 0x2caf, {1, {0x2cae }}},
+ { 0x2cb1, {1, {0x2cb0 }}},
+ { 0x2cb3, {1, {0x2cb2 }}},
+ { 0x2cb5, {1, {0x2cb4 }}},
+ { 0x2cb7, {1, {0x2cb6 }}},
+ { 0x2cb9, {1, {0x2cb8 }}},
+ { 0x2cbb, {1, {0x2cba }}},
+ { 0x2cbd, {1, {0x2cbc }}},
+ { 0x2cbf, {1, {0x2cbe }}},
+ { 0x2cc1, {1, {0x2cc0 }}},
+ { 0x2cc3, {1, {0x2cc2 }}},
+ { 0x2cc5, {1, {0x2cc4 }}},
+ { 0x2cc7, {1, {0x2cc6 }}},
+ { 0x2cc9, {1, {0x2cc8 }}},
+ { 0x2ccb, {1, {0x2cca }}},
+ { 0x2ccd, {1, {0x2ccc }}},
+ { 0x2ccf, {1, {0x2cce }}},
+ { 0x2cd1, {1, {0x2cd0 }}},
+ { 0x2cd3, {1, {0x2cd2 }}},
+ { 0x2cd5, {1, {0x2cd4 }}},
+ { 0x2cd7, {1, {0x2cd6 }}},
+ { 0x2cd9, {1, {0x2cd8 }}},
+ { 0x2cdb, {1, {0x2cda }}},
+ { 0x2cdd, {1, {0x2cdc }}},
+ { 0x2cdf, {1, {0x2cde }}},
+ { 0x2ce1, {1, {0x2ce0 }}},
+ { 0x2ce3, {1, {0x2ce2 }}},
+ { 0x2d00, {1, {0x10a0 }}},
+ { 0x2d01, {1, {0x10a1 }}},
+ { 0x2d02, {1, {0x10a2 }}},
+ { 0x2d03, {1, {0x10a3 }}},
+ { 0x2d04, {1, {0x10a4 }}},
+ { 0x2d05, {1, {0x10a5 }}},
+ { 0x2d06, {1, {0x10a6 }}},
+ { 0x2d07, {1, {0x10a7 }}},
+ { 0x2d08, {1, {0x10a8 }}},
+ { 0x2d09, {1, {0x10a9 }}},
+ { 0x2d0a, {1, {0x10aa }}},
+ { 0x2d0b, {1, {0x10ab }}},
+ { 0x2d0c, {1, {0x10ac }}},
+ { 0x2d0d, {1, {0x10ad }}},
+ { 0x2d0e, {1, {0x10ae }}},
+ { 0x2d0f, {1, {0x10af }}},
+ { 0x2d10, {1, {0x10b0 }}},
+ { 0x2d11, {1, {0x10b1 }}},
+ { 0x2d12, {1, {0x10b2 }}},
+ { 0x2d13, {1, {0x10b3 }}},
+ { 0x2d14, {1, {0x10b4 }}},
+ { 0x2d15, {1, {0x10b5 }}},
+ { 0x2d16, {1, {0x10b6 }}},
+ { 0x2d17, {1, {0x10b7 }}},
+ { 0x2d18, {1, {0x10b8 }}},
+ { 0x2d19, {1, {0x10b9 }}},
+ { 0x2d1a, {1, {0x10ba }}},
+ { 0x2d1b, {1, {0x10bb }}},
+ { 0x2d1c, {1, {0x10bc }}},
+ { 0x2d1d, {1, {0x10bd }}},
+ { 0x2d1e, {1, {0x10be }}},
+ { 0x2d1f, {1, {0x10bf }}},
+ { 0x2d20, {1, {0x10c0 }}},
+ { 0x2d21, {1, {0x10c1 }}},
+ { 0x2d22, {1, {0x10c2 }}},
+ { 0x2d23, {1, {0x10c3 }}},
+ { 0x2d24, {1, {0x10c4 }}},
+ { 0x2d25, {1, {0x10c5 }}},
+ { 0xff41, {1, {0xff21 }}},
+ { 0xff42, {1, {0xff22 }}},
+ { 0xff43, {1, {0xff23 }}},
+ { 0xff44, {1, {0xff24 }}},
+ { 0xff45, {1, {0xff25 }}},
+ { 0xff46, {1, {0xff26 }}},
+ { 0xff47, {1, {0xff27 }}},
+ { 0xff48, {1, {0xff28 }}},
+ { 0xff49, {1, {0xff29 }}},
+ { 0xff4a, {1, {0xff2a }}},
+ { 0xff4b, {1, {0xff2b }}},
+ { 0xff4c, {1, {0xff2c }}},
+ { 0xff4d, {1, {0xff2d }}},
+ { 0xff4e, {1, {0xff2e }}},
+ { 0xff4f, {1, {0xff2f }}},
+ { 0xff50, {1, {0xff30 }}},
+ { 0xff51, {1, {0xff31 }}},
+ { 0xff52, {1, {0xff32 }}},
+ { 0xff53, {1, {0xff33 }}},
+ { 0xff54, {1, {0xff34 }}},
+ { 0xff55, {1, {0xff35 }}},
+ { 0xff56, {1, {0xff36 }}},
+ { 0xff57, {1, {0xff37 }}},
+ { 0xff58, {1, {0xff38 }}},
+ { 0xff59, {1, {0xff39 }}},
+ { 0xff5a, {1, {0xff3a }}},
+ { 0x10428, {1, {0x10400 }}},
+ { 0x10429, {1, {0x10401 }}},
+ { 0x1042a, {1, {0x10402 }}},
+ { 0x1042b, {1, {0x10403 }}},
+ { 0x1042c, {1, {0x10404 }}},
+ { 0x1042d, {1, {0x10405 }}},
+ { 0x1042e, {1, {0x10406 }}},
+ { 0x1042f, {1, {0x10407 }}},
+ { 0x10430, {1, {0x10408 }}},
+ { 0x10431, {1, {0x10409 }}},
+ { 0x10432, {1, {0x1040a }}},
+ { 0x10433, {1, {0x1040b }}},
+ { 0x10434, {1, {0x1040c }}},
+ { 0x10435, {1, {0x1040d }}},
+ { 0x10436, {1, {0x1040e }}},
+ { 0x10437, {1, {0x1040f }}},
+ { 0x10438, {1, {0x10410 }}},
+ { 0x10439, {1, {0x10411 }}},
+ { 0x1043a, {1, {0x10412 }}},
+ { 0x1043b, {1, {0x10413 }}},
+ { 0x1043c, {1, {0x10414 }}},
+ { 0x1043d, {1, {0x10415 }}},
+ { 0x1043e, {1, {0x10416 }}},
+ { 0x1043f, {1, {0x10417 }}},
+ { 0x10440, {1, {0x10418 }}},
+ { 0x10441, {1, {0x10419 }}},
+ { 0x10442, {1, {0x1041a }}},
+ { 0x10443, {1, {0x1041b }}},
+ { 0x10444, {1, {0x1041c }}},
+ { 0x10445, {1, {0x1041d }}},
+ { 0x10446, {1, {0x1041e }}},
+ { 0x10447, {1, {0x1041f }}},
+ { 0x10448, {1, {0x10420 }}},
+ { 0x10449, {1, {0x10421 }}},
+ { 0x1044a, {1, {0x10422 }}},
+ { 0x1044b, {1, {0x10423 }}},
+ { 0x1044c, {1, {0x10424 }}},
+ { 0x1044d, {1, {0x10425 }}},
+ { 0x1044e, {1, {0x10426 }}},
+ { 0x1044f, {1, {0x10427 }}}
+};
+
+static const CaseUnfold_11_Type CaseUnfold_11_Locale[] = {
+ { 0x0069, {1, {0x0049 }}}
+};
+
+static const CaseUnfold_12_Type CaseUnfold_12[] = {
+ { {0x0061, 0x02be}, {1, {0x1e9a }}},
+ { {0x0066, 0x0066}, {1, {0xfb00 }}},
+ { {0x0066, 0x0069}, {1, {0xfb01 }}},
+ { {0x0066, 0x006c}, {1, {0xfb02 }}},
+ { {0x0068, 0x0331}, {1, {0x1e96 }}},
+ { {0x006a, 0x030c}, {1, {0x01f0 }}},
+ { {0x0073, 0x0073}, {1, {0x00df }}},
+ { {0x0073, 0x0074}, {2, {0xfb05, 0xfb06 }}},
+ { {0x0074, 0x0308}, {1, {0x1e97 }}},
+ { {0x0077, 0x030a}, {1, {0x1e98 }}},
+ { {0x0079, 0x030a}, {1, {0x1e99 }}},
+ { {0x02bc, 0x006e}, {1, {0x0149 }}},
+ { {0x03ac, 0x03b9}, {1, {0x1fb4 }}},
+ { {0x03ae, 0x03b9}, {1, {0x1fc4 }}},
+ { {0x03b1, 0x0342}, {1, {0x1fb6 }}},
+ { {0x03b1, 0x03b9}, {2, {0x1fb3, 0x1fbc }}},
+ { {0x03b7, 0x0342}, {1, {0x1fc6 }}},
+ { {0x03b7, 0x03b9}, {2, {0x1fc3, 0x1fcc }}},
+ { {0x03b9, 0x0342}, {1, {0x1fd6 }}},
+ { {0x03c1, 0x0313}, {1, {0x1fe4 }}},
+ { {0x03c5, 0x0313}, {1, {0x1f50 }}},
+ { {0x03c5, 0x0342}, {1, {0x1fe6 }}},
+ { {0x03c9, 0x0342}, {1, {0x1ff6 }}},
+ { {0x03c9, 0x03b9}, {2, {0x1ff3, 0x1ffc }}},
+ { {0x03ce, 0x03b9}, {1, {0x1ff4 }}},
+ { {0x0565, 0x0582}, {1, {0x0587 }}},
+ { {0x0574, 0x0565}, {1, {0xfb14 }}},
+ { {0x0574, 0x056b}, {1, {0xfb15 }}},
+ { {0x0574, 0x056d}, {1, {0xfb17 }}},
+ { {0x0574, 0x0576}, {1, {0xfb13 }}},
+ { {0x057e, 0x0576}, {1, {0xfb16 }}},
+ { {0x1f00, 0x03b9}, {2, {0x1f88, 0x1f80 }}},
+ { {0x1f01, 0x03b9}, {2, {0x1f81, 0x1f89 }}},
+ { {0x1f02, 0x03b9}, {2, {0x1f82, 0x1f8a }}},
+ { {0x1f03, 0x03b9}, {2, {0x1f83, 0x1f8b }}},
+ { {0x1f04, 0x03b9}, {2, {0x1f84, 0x1f8c }}},
+ { {0x1f05, 0x03b9}, {2, {0x1f85, 0x1f8d }}},
+ { {0x1f06, 0x03b9}, {2, {0x1f86, 0x1f8e }}},
+ { {0x1f07, 0x03b9}, {2, {0x1f87, 0x1f8f }}},
+ { {0x1f20, 0x03b9}, {2, {0x1f90, 0x1f98 }}},
+ { {0x1f21, 0x03b9}, {2, {0x1f91, 0x1f99 }}},
+ { {0x1f22, 0x03b9}, {2, {0x1f92, 0x1f9a }}},
+ { {0x1f23, 0x03b9}, {2, {0x1f93, 0x1f9b }}},
+ { {0x1f24, 0x03b9}, {2, {0x1f94, 0x1f9c }}},
+ { {0x1f25, 0x03b9}, {2, {0x1f95, 0x1f9d }}},
+ { {0x1f26, 0x03b9}, {2, {0x1f96, 0x1f9e }}},
+ { {0x1f27, 0x03b9}, {2, {0x1f97, 0x1f9f }}},
+ { {0x1f60, 0x03b9}, {2, {0x1fa0, 0x1fa8 }}},
+ { {0x1f61, 0x03b9}, {2, {0x1fa1, 0x1fa9 }}},
+ { {0x1f62, 0x03b9}, {2, {0x1fa2, 0x1faa }}},
+ { {0x1f63, 0x03b9}, {2, {0x1fa3, 0x1fab }}},
+ { {0x1f64, 0x03b9}, {2, {0x1fa4, 0x1fac }}},
+ { {0x1f65, 0x03b9}, {2, {0x1fa5, 0x1fad }}},
+ { {0x1f66, 0x03b9}, {2, {0x1fa6, 0x1fae }}},
+ { {0x1f67, 0x03b9}, {2, {0x1fa7, 0x1faf }}},
+ { {0x1f70, 0x03b9}, {1, {0x1fb2 }}},
+ { {0x1f74, 0x03b9}, {1, {0x1fc2 }}},
+ { {0x1f7c, 0x03b9}, {1, {0x1ff2 }}}
+};
+
+static const CaseUnfold_12_Type CaseUnfold_12_Locale[] = {
+ { {0x0069, 0x0307}, {1, {0x0130 }}}
+};
+
+static const CaseUnfold_13_Type CaseUnfold_13[] = {
+ { {0x0066, 0x0066, 0x0069}, {1, {0xfb03 }}},
+ { {0x0066, 0x0066, 0x006c}, {1, {0xfb04 }}},
+ { {0x03b1, 0x0342, 0x03b9}, {1, {0x1fb7 }}},
+ { {0x03b7, 0x0342, 0x03b9}, {1, {0x1fc7 }}},
+ { {0x03b9, 0x0308, 0x0300}, {1, {0x1fd2 }}},
+ { {0x03b9, 0x0308, 0x0301}, {2, {0x0390, 0x1fd3 }}},
+ { {0x03b9, 0x0308, 0x0342}, {1, {0x1fd7 }}},
+ { {0x03c5, 0x0308, 0x0300}, {1, {0x1fe2 }}},
+ { {0x03c5, 0x0308, 0x0301}, {2, {0x03b0, 0x1fe3 }}},
+ { {0x03c5, 0x0308, 0x0342}, {1, {0x1fe7 }}},
+ { {0x03c5, 0x0313, 0x0300}, {1, {0x1f52 }}},
+ { {0x03c5, 0x0313, 0x0301}, {1, {0x1f54 }}},
+ { {0x03c5, 0x0313, 0x0342}, {1, {0x1f56 }}},
+ { {0x03c9, 0x0342, 0x03b9}, {1, {0x1ff7 }}}
+};
+
+
+static PosixBracketEntryType HashEntryData[] = {
+ { (UChar* )"NEWLINE", 0, 7 },
+ { (UChar* )"Alpha", 1, 5 },
+ { (UChar* )"Blank", 2, 5 },
+ { (UChar* )"Cntrl", 3, 5 },
+ { (UChar* )"Digit", 4, 5 },
+ { (UChar* )"Graph", 5, 5 },
+ { (UChar* )"Lower", 6, 5 },
+ { (UChar* )"Print", 7, 5 },
+ { (UChar* )"Punct", 8, 5 },
+ { (UChar* )"Space", 9, 5 },
+ { (UChar* )"Upper", 10, 5 },
+ { (UChar* )"XDigit", 11, 6 },
+ { (UChar* )"Word", 12, 4 },
+ { (UChar* )"Alnum", 13, 5 },
+ { (UChar* )"ASCII", 14, 5 },
+
+#ifdef USE_UNICODE_PROPERTIES
+ { (UChar* )"Any", 15, 3 },
+ { (UChar* )"Assigned", 16, 8 },
+ { (UChar* )"C", 17, 1 },
+ { (UChar* )"Cc", 18, 2 },
+ { (UChar* )"Cf", 19, 2 },
+ { (UChar* )"Cn", 20, 2 },
+ { (UChar* )"Co", 21, 2 },
+ { (UChar* )"Cs", 22, 2 },
+ { (UChar* )"L", 23, 1 },
+ { (UChar* )"Ll", 24, 2 },
+ { (UChar* )"Lm", 25, 2 },
+ { (UChar* )"Lo", 26, 2 },
+ { (UChar* )"Lt", 27, 2 },
+ { (UChar* )"Lu", 28, 2 },
+ { (UChar* )"M", 29, 1 },
+ { (UChar* )"Mc", 30, 2 },
+ { (UChar* )"Me", 31, 2 },
+ { (UChar* )"Mn", 32, 2 },
+ { (UChar* )"N", 33, 1 },
+ { (UChar* )"Nd", 34, 2 },
+ { (UChar* )"Nl", 35, 2 },
+ { (UChar* )"No", 36, 2 },
+ { (UChar* )"P", 37, 1 },
+ { (UChar* )"Pc", 38, 2 },
+ { (UChar* )"Pd", 39, 2 },
+ { (UChar* )"Pe", 40, 2 },
+ { (UChar* )"Pf", 41, 2 },
+ { (UChar* )"Pi", 42, 2 },
+ { (UChar* )"Po", 43, 2 },
+ { (UChar* )"Ps", 44, 2 },
+ { (UChar* )"S", 45, 1 },
+ { (UChar* )"Sc", 46, 2 },
+ { (UChar* )"Sk", 47, 2 },
+ { (UChar* )"Sm", 48, 2 },
+ { (UChar* )"So", 49, 2 },
+ { (UChar* )"Z", 50, 1 },
+ { (UChar* )"Zl", 51, 2 },
+ { (UChar* )"Zp", 52, 2 },
+ { (UChar* )"Zs", 53, 2 },
+ { (UChar* )"Arabic", 54, 6 },
+ { (UChar* )"Armenian", 55, 8 },
+ { (UChar* )"Bengali", 56, 7 },
+ { (UChar* )"Bopomofo", 57, 8 },
+ { (UChar* )"Braille", 58, 7 },
+ { (UChar* )"Buginese", 59, 8 },
+ { (UChar* )"Buhid", 60, 5 },
+ { (UChar* )"Canadian_Aboriginal", 61, 19 },
+ { (UChar* )"Cherokee", 62, 8 },
+ { (UChar* )"Common", 63, 6 },
+ { (UChar* )"Coptic", 64, 6 },
+ { (UChar* )"Cypriot", 65, 7 },
+ { (UChar* )"Cyrillic", 66, 8 },
+ { (UChar* )"Deseret", 67, 7 },
+ { (UChar* )"Devanagari", 68, 10 },
+ { (UChar* )"Ethiopic", 69, 8 },
+ { (UChar* )"Georgian", 70, 8 },
+ { (UChar* )"Glagolitic", 71, 10 },
+ { (UChar* )"Gothic", 72, 6 },
+ { (UChar* )"Greek", 73, 5 },
+ { (UChar* )"Gujarati", 74, 8 },
+ { (UChar* )"Gurmukhi", 75, 8 },
+ { (UChar* )"Han", 76, 3 },
+ { (UChar* )"Hangul", 77, 6 },
+ { (UChar* )"Hanunoo", 78, 7 },
+ { (UChar* )"Hebrew", 79, 6 },
+ { (UChar* )"Hiragana", 80, 8 },
+ { (UChar* )"Inherited", 81, 9 },
+ { (UChar* )"Kannada", 82, 7 },
+ { (UChar* )"Katakana", 83, 8 },
+ { (UChar* )"Kharoshthi", 84, 10 },
+ { (UChar* )"Khmer", 85, 5 },
+ { (UChar* )"Lao", 86, 3 },
+ { (UChar* )"Latin", 87, 5 },
+ { (UChar* )"Limbu", 88, 5 },
+ { (UChar* )"Linear_B", 89, 8 },
+ { (UChar* )"Malayalam", 90, 9 },
+ { (UChar* )"Mongolian", 91, 9 },
+ { (UChar* )"Myanmar", 92, 7 },
+ { (UChar* )"New_Tai_Lue", 93, 11 },
+ { (UChar* )"Ogham", 94, 5 },
+ { (UChar* )"Old_Italic", 95, 10 },
+ { (UChar* )"Old_Persian", 96, 11 },
+ { (UChar* )"Oriya", 97, 5 },
+ { (UChar* )"Osmanya", 98, 7 },
+ { (UChar* )"Runic", 99, 5 },
+ { (UChar* )"Shavian", 100, 7 },
+ { (UChar* )"Sinhala", 101, 7 },
+ { (UChar* )"Syloti_Nagri", 102, 12 },
+ { (UChar* )"Syriac", 103, 6 },
+ { (UChar* )"Tagalog", 104, 7 },
+ { (UChar* )"Tagbanwa", 105, 8 },
+ { (UChar* )"Tai_Le", 106, 6 },
+ { (UChar* )"Tamil", 107, 5 },
+ { (UChar* )"Telugu", 108, 6 },
+ { (UChar* )"Thaana", 109, 6 },
+ { (UChar* )"Thai", 110, 4 },
+ { (UChar* )"Tibetan", 111, 7 },
+ { (UChar* )"Tifinagh", 112, 8 },
+ { (UChar* )"Ugaritic", 113, 8 },
+ { (UChar* )"Yi", 114, 2 },
+#endif /* USE_UNICODE_PROPERTIES */
+ { (UChar* )NULL, -1, 0 }
+};
+
+#ifdef USE_UNICODE_PROPERTIES
+#define CODE_RANGES_NUM 115
+#else
+#define CODE_RANGES_NUM 15
+#endif
+
+static const OnigCodePoint* CodeRanges[CODE_RANGES_NUM];
+static int CodeRangeTableInited = 0;
+
+static void init_code_range_array(void) {
+ THREAD_ATOMIC_START;
+
+ CodeRanges[0] = CR_NEWLINE;
+ CodeRanges[1] = CR_Alpha;
+ CodeRanges[2] = CR_Blank;
+ CodeRanges[3] = CR_Cntrl;
+ CodeRanges[4] = CR_Digit;
+ CodeRanges[5] = CR_Graph;
+ CodeRanges[6] = CR_Lower;
+ CodeRanges[7] = CR_Print;
+ CodeRanges[8] = CR_Punct;
+ CodeRanges[9] = CR_Space;
+ CodeRanges[10] = CR_Upper;
+ CodeRanges[11] = CR_XDigit;
+ CodeRanges[12] = CR_Word;
+ CodeRanges[13] = CR_Alnum;
+ CodeRanges[14] = CR_ASCII;
+
+#ifdef USE_UNICODE_PROPERTIES
+ CodeRanges[15] = CR_Any;
+ CodeRanges[16] = CR_Assigned;
+ CodeRanges[17] = CR_C;
+ CodeRanges[18] = CR_Cc;
+ CodeRanges[19] = CR_Cf;
+ CodeRanges[20] = CR_Cn;
+ CodeRanges[21] = CR_Co;
+ CodeRanges[22] = CR_Cs;
+ CodeRanges[23] = CR_L;
+ CodeRanges[24] = CR_Ll;
+ CodeRanges[25] = CR_Lm;
+ CodeRanges[26] = CR_Lo;
+ CodeRanges[27] = CR_Lt;
+ CodeRanges[28] = CR_Lu;
+ CodeRanges[29] = CR_M;
+ CodeRanges[30] = CR_Mc;
+ CodeRanges[31] = CR_Me;
+ CodeRanges[32] = CR_Mn;
+ CodeRanges[33] = CR_N;
+ CodeRanges[34] = CR_Nd;
+ CodeRanges[35] = CR_Nl;
+ CodeRanges[36] = CR_No;
+ CodeRanges[37] = CR_P;
+ CodeRanges[38] = CR_Pc;
+ CodeRanges[39] = CR_Pd;
+ CodeRanges[40] = CR_Pe;
+ CodeRanges[41] = CR_Pf;
+ CodeRanges[42] = CR_Pi;
+ CodeRanges[43] = CR_Po;
+ CodeRanges[44] = CR_Ps;
+ CodeRanges[45] = CR_S;
+ CodeRanges[46] = CR_Sc;
+ CodeRanges[47] = CR_Sk;
+ CodeRanges[48] = CR_Sm;
+ CodeRanges[49] = CR_So;
+ CodeRanges[50] = CR_Z;
+ CodeRanges[51] = CR_Zl;
+ CodeRanges[52] = CR_Zp;
+ CodeRanges[53] = CR_Zs;
+ CodeRanges[54] = CR_Arabic;
+ CodeRanges[55] = CR_Armenian;
+ CodeRanges[56] = CR_Bengali;
+ CodeRanges[57] = CR_Bopomofo;
+ CodeRanges[58] = CR_Braille;
+ CodeRanges[59] = CR_Buginese;
+ CodeRanges[60] = CR_Buhid;
+ CodeRanges[61] = CR_Canadian_Aboriginal;
+ CodeRanges[62] = CR_Cherokee;
+ CodeRanges[63] = CR_Common;
+ CodeRanges[64] = CR_Coptic;
+ CodeRanges[65] = CR_Cypriot;
+ CodeRanges[66] = CR_Cyrillic;
+ CodeRanges[67] = CR_Deseret;
+ CodeRanges[68] = CR_Devanagari;
+ CodeRanges[69] = CR_Ethiopic;
+ CodeRanges[70] = CR_Georgian;
+ CodeRanges[71] = CR_Glagolitic;
+ CodeRanges[72] = CR_Gothic;
+ CodeRanges[73] = CR_Greek;
+ CodeRanges[74] = CR_Gujarati;
+ CodeRanges[75] = CR_Gurmukhi;
+ CodeRanges[76] = CR_Han;
+ CodeRanges[77] = CR_Hangul;
+ CodeRanges[78] = CR_Hanunoo;
+ CodeRanges[79] = CR_Hebrew;
+ CodeRanges[80] = CR_Hiragana;
+ CodeRanges[81] = CR_Inherited;
+ CodeRanges[82] = CR_Kannada;
+ CodeRanges[83] = CR_Katakana;
+ CodeRanges[84] = CR_Kharoshthi;
+ CodeRanges[85] = CR_Khmer;
+ CodeRanges[86] = CR_Lao;
+ CodeRanges[87] = CR_Latin;
+ CodeRanges[88] = CR_Limbu;
+ CodeRanges[89] = CR_Linear_B;
+ CodeRanges[90] = CR_Malayalam;
+ CodeRanges[91] = CR_Mongolian;
+ CodeRanges[92] = CR_Myanmar;
+ CodeRanges[93] = CR_New_Tai_Lue;
+ CodeRanges[94] = CR_Ogham;
+ CodeRanges[95] = CR_Old_Italic;
+ CodeRanges[96] = CR_Old_Persian;
+ CodeRanges[97] = CR_Oriya;
+ CodeRanges[98] = CR_Osmanya;
+ CodeRanges[99] = CR_Runic;
+ CodeRanges[100] = CR_Shavian;
+ CodeRanges[101] = CR_Sinhala;
+ CodeRanges[102] = CR_Syloti_Nagri;
+ CodeRanges[103] = CR_Syriac;
+ CodeRanges[104] = CR_Tagalog;
+ CodeRanges[105] = CR_Tagbanwa;
+ CodeRanges[106] = CR_Tai_Le;
+ CodeRanges[107] = CR_Tamil;
+ CodeRanges[108] = CR_Telugu;
+ CodeRanges[109] = CR_Thaana;
+ CodeRanges[110] = CR_Thai;
+ CodeRanges[111] = CR_Tibetan;
+ CodeRanges[112] = CR_Tifinagh;
+ CodeRanges[113] = CR_Ugaritic;
+ CodeRanges[114] = CR_Yi;
+#endif /* USE_UNICODE_PROPERTIES */
+
+ CodeRangeTableInited = 1;
+ THREAD_ATOMIC_END;
+}
extern int
onigenc_unicode_is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
- if (code < 256) {
+ if (
+#ifdef USE_UNICODE_PROPERTIES
+ ctype <= ONIGENC_MAX_STD_CTYPE &&
+#endif
+ code < 256) {
return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype);
}
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
-
- switch (ctype) {
- case ONIGENC_CTYPE_ALPHA:
- return onig_is_in_code_range((UChar* )CRAlpha, code);
- break;
- case ONIGENC_CTYPE_BLANK:
- return onig_is_in_code_range((UChar* )CRBlank, code);
- break;
- case ONIGENC_CTYPE_CNTRL:
- return onig_is_in_code_range((UChar* )CRCntrl, code);
- break;
- case ONIGENC_CTYPE_DIGIT:
- return onig_is_in_code_range((UChar* )CRDigit, code);
- break;
- case ONIGENC_CTYPE_GRAPH:
- return onig_is_in_code_range((UChar* )CRGraph, code);
- break;
- case ONIGENC_CTYPE_LOWER:
- return onig_is_in_code_range((UChar* )CRLower, code);
- break;
- case ONIGENC_CTYPE_PRINT:
- return onig_is_in_code_range((UChar* )CRPrint, code);
- break;
- case ONIGENC_CTYPE_PUNCT:
- return onig_is_in_code_range((UChar* )CRPunct, code);
- break;
- case ONIGENC_CTYPE_SPACE:
- return onig_is_in_code_range((UChar* )CRSpace, code);
- break;
- case ONIGENC_CTYPE_UPPER:
- return onig_is_in_code_range((UChar* )CRUpper, code);
- break;
- case ONIGENC_CTYPE_XDIGIT:
- return FALSE;
- break;
- case ONIGENC_CTYPE_WORD:
- return onig_is_in_code_range((UChar* )CRWord, code);
- break;
- case ONIGENC_CTYPE_ASCII:
- return FALSE;
- break;
- case ONIGENC_CTYPE_ALNUM:
- return onig_is_in_code_range((UChar* )CRAlnum, code);
- break;
- case ONIGENC_CTYPE_NEWLINE:
- return FALSE;
- break;
-
- default:
- return ONIGENCERR_TYPE_BUG;
- break;
+ if (ctype >= CODE_RANGES_NUM) {
+ return ONIGERR_TYPE_BUG;
+ }
+
+ if (CodeRangeTableInited == 0) init_code_range_array();
+
+ return onig_is_in_code_range((UChar* )CodeRanges[ctype], code);
+}
+
+
+extern int
+onigenc_unicode_ctype_code_range(int ctype, const OnigCodePoint* ranges[])
+{
+ if (ctype >= CODE_RANGES_NUM) {
+ return ONIGERR_TYPE_BUG;
}
+ if (CodeRangeTableInited == 0) init_code_range_array();
+
+ *ranges = CodeRanges[ctype];
+
+ return 0;
+}
+
+extern int
+onigenc_utf16_32_get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
+ const OnigCodePoint* ranges[])
+{
+ *sb_out = 0x00;
+ return onigenc_unicode_ctype_code_range(ctype, ranges);
+}
+
+#include "st.h"
+
+#define PROPERTY_NAME_MAX_SIZE 20
+
+static st_table* NameCtypeTable;
+static int NameTableInited = 0;
+
+static int init_name_ctype_table(void)
+{
+ PosixBracketEntryType *pb;
+
+ THREAD_ATOMIC_START;
+
+ NameCtypeTable = onig_st_init_strend_table_with_size(100);
+ if (ONIG_IS_NULL(NameCtypeTable)) return ONIGERR_MEMORY;
+
+ for (pb = HashEntryData; ONIG_IS_NOT_NULL(pb->name); pb++) {
+ onig_st_insert_strend(NameCtypeTable, pb->name, pb->name + pb->len,
+ (st_data_t )pb->ctype);
+ }
+
+ NameTableInited = 1;
+ THREAD_ATOMIC_END;
+ return 0;
+}
+
+extern int
+onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end)
+{
+ int len;
+ hash_data_type ctype;
+ UChar buf[PROPERTY_NAME_MAX_SIZE];
+ UChar *p;
+ OnigCodePoint code;
+
+ p = name;
+ len = 0;
+ while (p < end) {
+ code = ONIGENC_MBC_TO_CODE(enc, p, end);
+ if (code >= 0x80)
+ return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+
+ buf[len++] = (UChar )code;
+ if (len >= PROPERTY_NAME_MAX_SIZE)
+ return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+
+ p += enclen(enc, p);
+ }
+
+ buf[len] = 0;
+
+ if (NameTableInited == 0) init_name_ctype_table();
+
+ if (onig_st_lookup_strend(NameCtypeTable, buf, buf + len, &ctype) == 0) {
+ return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+ }
+
+ return (int )ctype;
+}
+
+
+static int
+code2_cmp(OnigCodePoint* x, OnigCodePoint* y)
+{
+ if (x[0] == y[0] && x[1] == y[1]) return 0;
+ return 1;
+}
+
+static int
+code2_hash(OnigCodePoint* x)
+{
+ return (int )(x[0] + x[1]);
+}
+
+static struct st_hash_type type_code2_hash = {
+ code2_cmp,
+ code2_hash,
+};
+
+static int
+code3_cmp(OnigCodePoint* x, OnigCodePoint* y)
+{
+ if (x[0] == y[0] && x[1] == y[1] && x[2] == y[2]) return 0;
+ return 1;
+}
+
+static int
+code3_hash(OnigCodePoint* x)
+{
+ return (int )(x[0] + x[1] + x[2]);
+}
+
+static struct st_hash_type type_code3_hash = {
+ code3_cmp,
+ code3_hash,
+};
+
+
+static st_table* FoldTable; /* fold-1, fold-2, fold-3 */
+static st_table* Unfold1Table;
+static st_table* Unfold2Table;
+static st_table* Unfold3Table;
+static int CaseFoldInited = 0;
+
+static int init_case_fold_table(void)
+{
+ const CaseFold_11_Type *p;
+ const CaseUnfold_11_Type *p1;
+ const CaseUnfold_12_Type *p2;
+ const CaseUnfold_13_Type *p3;
+ int i;
+
+ THREAD_ATOMIC_START;
+
+ FoldTable = st_init_numtable_with_size(1200);
+ if (ONIG_IS_NULL(FoldTable)) return ONIGERR_MEMORY;
+ for (i = 0; i < (int )(sizeof(CaseFold)/sizeof(CaseFold_11_Type)); i++) {
+ p = &CaseFold[i];
+ st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to));
+ }
+ for (i = 0; i < (int )(sizeof(CaseFold_Locale)/sizeof(CaseFold_11_Type));
+ i++) {
+ p = &CaseFold_Locale[i];
+ st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to));
+ }
+
+ Unfold1Table = st_init_numtable_with_size(1000);
+ if (ONIG_IS_NULL(Unfold1Table)) return ONIGERR_MEMORY;
+
+ for (i = 0; i < (int )(sizeof(CaseUnfold_11)/sizeof(CaseUnfold_11_Type));
+ i++) {
+ p1 = &CaseUnfold_11[i];
+ st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to));
+ }
+ for (i = 0;
+ i < (int )(sizeof(CaseUnfold_11_Locale)/sizeof(CaseUnfold_11_Type));
+ i++) {
+ p1 = &CaseUnfold_11_Locale[i];
+ st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to));
+ }
+
+ Unfold2Table = st_init_table_with_size(&type_code2_hash, 200);
+ if (ONIG_IS_NULL(Unfold2Table)) return ONIGERR_MEMORY;
+
+ for (i = 0; i < (int )(sizeof(CaseUnfold_12)/sizeof(CaseUnfold_12_Type));
+ i++) {
+ p2 = &CaseUnfold_12[i];
+ st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(&p2->to));
+ }
+ for (i = 0;
+ i < (int )(sizeof(CaseUnfold_12_Locale)/sizeof(CaseUnfold_12_Type));
+ i++) {
+ p2 = &CaseUnfold_12_Locale[i];
+ st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(&p2->to));
+ }
+
+ Unfold3Table = st_init_table_with_size(&type_code3_hash, 30);
+ if (ONIG_IS_NULL(Unfold3Table)) return ONIGERR_MEMORY;
+
+ for (i = 0; i < (int )(sizeof(CaseUnfold_13)/sizeof(CaseUnfold_13_Type));
+ i++) {
+ p3 = &CaseUnfold_13[i];
+ st_add_direct(Unfold3Table, (st_data_t )p3->from, (st_data_t )(&p3->to));
+ }
+
+ CaseFoldInited = 1;
+ THREAD_ATOMIC_END;
+ return 0;
+}
+
+extern int
+onigenc_unicode_mbc_case_fold(OnigEncoding enc,
+ OnigCaseFoldType flag ARG_UNUSED, const UChar** pp, const UChar* end,
+ UChar* fold)
+{
+ CodePointList3 *to;
+ OnigCodePoint code;
+ int i, len, rlen;
+ const UChar *p = *pp;
+
+ if (CaseFoldInited == 0) init_case_fold_table();
+
+ code = ONIGENC_MBC_TO_CODE(enc, p, end);
+ len = enclen(enc, p);
+ *pp += len;
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (code == 0x0049) {
+ return ONIGENC_CODE_TO_MBC(enc, 0x0131, fold);
+ }
+ else if (code == 0x0130) {
+ return ONIGENC_CODE_TO_MBC(enc, 0x0069, fold);
+ }
+ }
+#endif
+
+ if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0) {
+ if (to->n == 1) {
+ return ONIGENC_CODE_TO_MBC(enc, to->code[0], fold);
+ }
+#if 0
+ /* NO NEEDS TO CHECK */
+ else if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
#else
+ else {
+#endif
+ rlen = 0;
+ for (i = 0; i < to->n; i++) {
+ len = ONIGENC_CODE_TO_MBC(enc, to->code[i], fold);
+ fold += len;
+ rlen += len;
+ }
+ return rlen;
+ }
+ }
- if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
- return TRUE;
+ for (i = 0; i < len; i++) {
+ *fold++ = *p++;
}
- return FALSE;
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
+ return len;
}
extern int
-onigenc_unicode_get_ctype_code_range(int ctype,
- const OnigCodePoint* sbr[], const OnigCodePoint* mbr[])
+onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigCodePoint EmptyRange[] = { 0 };
-
-#define CR_SET(list) do { \
- *mbr = list; \
-} while (0)
-
- *sbr = EmptyRange;
-
- switch (ctype) {
- case ONIGENC_CTYPE_ALPHA:
- CR_SET(CRAlpha);
- break;
- case ONIGENC_CTYPE_BLANK:
- CR_SET(CRBlank);
- break;
- case ONIGENC_CTYPE_CNTRL:
- CR_SET(CRCntrl);
- break;
- case ONIGENC_CTYPE_DIGIT:
- CR_SET(CRDigit);
- break;
- case ONIGENC_CTYPE_GRAPH:
- CR_SET(CRGraph);
- break;
- case ONIGENC_CTYPE_LOWER:
- CR_SET(CRLower);
- break;
- case ONIGENC_CTYPE_PRINT:
- CR_SET(CRPrint);
- break;
- case ONIGENC_CTYPE_PUNCT:
- CR_SET(CRPunct);
- break;
- case ONIGENC_CTYPE_SPACE:
- CR_SET(CRSpace);
- break;
- case ONIGENC_CTYPE_UPPER:
- CR_SET(CRUpper);
- break;
- case ONIGENC_CTYPE_XDIGIT:
- CR_SET(CRXDigit);
- break;
- case ONIGENC_CTYPE_WORD:
- CR_SET(CRWord);
- break;
- case ONIGENC_CTYPE_ASCII:
- CR_SET(CRASCII);
- break;
- case ONIGENC_CTYPE_ALNUM:
- CR_SET(CRAlnum);
- break;
-
- default:
- return ONIGENCERR_TYPE_BUG;
- break;
+ const CaseUnfold_11_Type* p11;
+ OnigCodePoint code;
+ int i, j, k, r;
+
+ /* if (CaseFoldInited == 0) init_case_fold_table(); */
+
+ for (i = 0; i < (int )(sizeof(CaseUnfold_11)/sizeof(CaseUnfold_11_Type));
+ i++) {
+ p11 = &CaseUnfold_11[i];
+ for (j = 0; j < p11->to.n; j++) {
+ code = p11->from;
+ r = (*f)(p11->to.code[j], &code, 1, arg);
+ if (r != 0) return r;
+
+ code = p11->to.code[j];
+ r = (*f)(p11->from, &code, 1, arg);
+ if (r != 0) return r;
+
+ for (k = 0; k < j; k++) {
+ r = (*f)(p11->to.code[j], (OnigCodePoint* )(&p11->to.code[k]), 1, arg);
+ if (r != 0) return r;
+
+ r = (*f)(p11->to.code[k], (OnigCodePoint* )(&p11->to.code[j]), 1, arg);
+ if (r != 0) return r;
+ }
+ }
+ }
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ code = 0x0131;
+ r = (*f)(0x0049, &code, 1, arg);
+ if (r != 0) return r;
+ code = 0x0049;
+ r = (*f)(0x0131, &code, 1, arg);
+ if (r != 0) return r;
+
+ code = 0x0130;
+ r = (*f)(0x0069, &code, 1, arg);
+ if (r != 0) return r;
+ code = 0x0069;
+ r = (*f)(0x0130, &code, 1, arg);
+ if (r != 0) return r;
+ }
+ else {
+#endif
+ for (i = 0;
+ i < (int )(sizeof(CaseUnfold_11_Locale)/sizeof(CaseUnfold_11_Type));
+ i++) {
+ p11 = &CaseUnfold_11_Locale[i];
+ for (j = 0; j < p11->to.n; j++) {
+ code = p11->from;
+ r = (*f)(p11->to.code[j], &code, 1, arg);
+ if (r != 0) return r;
+
+ code = p11->to.code[j];
+ r = (*f)(p11->from, &code, 1, arg);
+ if (r != 0) return r;
+
+ for (k = 0; k < j; k++) {
+ r = (*f)(p11->to.code[j], (OnigCodePoint* )(&p11->to.code[k]),
+ 1, arg);
+ if (r != 0) return r;
+
+ r = (*f)(p11->to.code[k], (OnigCodePoint* )(&p11->to.code[j]),
+ 1, arg);
+ if (r != 0) return r;
+ }
+ }
+ }
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ }
+#endif
+
+ if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ for (i = 0; i < (int )(sizeof(CaseUnfold_12)/sizeof(CaseUnfold_12_Type));
+ i++) {
+ for (j = 0; j < CaseUnfold_12[i].to.n; j++) {
+ r = (*f)(CaseUnfold_12[i].to.code[j],
+ (OnigCodePoint* )CaseUnfold_12[i].from, 2, arg);
+ if (r != 0) return r;
+
+ for (k = 0; k < CaseUnfold_12[i].to.n; k++) {
+ if (k == j) continue;
+
+ r = (*f)(CaseUnfold_12[i].to.code[j],
+ (OnigCodePoint* )(&CaseUnfold_12[i].to.code[k]), 1, arg);
+ if (r != 0) return r;
+ }
+ }
+ }
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) == 0) {
+#endif
+ for (i = 0;
+ i < (int )(sizeof(CaseUnfold_12_Locale)/sizeof(CaseUnfold_12_Type));
+ i++) {
+ for (j = 0; j < CaseUnfold_12_Locale[i].to.n; j++) {
+ r = (*f)(CaseUnfold_12_Locale[i].to.code[j],
+ (OnigCodePoint* )CaseUnfold_12_Locale[i].from, 2, arg);
+ if (r != 0) return r;
+
+ for (k = 0; k < CaseUnfold_12_Locale[i].to.n; k++) {
+ if (k == j) continue;
+
+ r = (*f)(CaseUnfold_12_Locale[i].to.code[j],
+ (OnigCodePoint* )(&CaseUnfold_12_Locale[i].to.code[k]),
+ 1, arg);
+ if (r != 0) return r;
+ }
+ }
+ }
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ }
+#endif
+
+ for (i = 0; i < (int )(sizeof(CaseUnfold_13)/sizeof(CaseUnfold_13_Type));
+ i++) {
+ for (j = 0; j < CaseUnfold_13[i].to.n; j++) {
+ r = (*f)(CaseUnfold_13[i].to.code[j],
+ (OnigCodePoint* )CaseUnfold_13[i].from, 3, arg);
+ if (r != 0) return r;
+
+ for (k = 0; k < CaseUnfold_13[i].to.n; k++) {
+ if (k == j) continue;
+
+ r = (*f)(CaseUnfold_13[i].to.code[j],
+ (OnigCodePoint* )(&CaseUnfold_13[i].to.code[k]), 1, arg);
+ if (r != 0) return r;
+ }
+ }
+ }
}
return 0;
}
+
+extern int
+onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
+ OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end,
+ OnigCaseFoldCodeItem items[])
+{
+ int n, i, j, k, len;
+ OnigCodePoint code, codes[3];
+ CodePointList3 *to, *z3;
+ CodePointList2 *z2;
+
+ if (CaseFoldInited == 0) init_case_fold_table();
+
+ n = 0;
+
+ code = ONIGENC_MBC_TO_CODE(enc, p, end);
+ len = enclen(enc, p);
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (code == 0x0049) {
+ items[0].byte_len = len;
+ items[0].code_len = 1;
+ items[0].code[0] = 0x0131;
+ return 1;
+ }
+ else if (code == 0x0130) {
+ items[0].byte_len = len;
+ items[0].code_len = 1;
+ items[0].code[0] = 0x0069;
+ return 1;
+ }
+ else if (code == 0x0131) {
+ items[0].byte_len = len;
+ items[0].code_len = 1;
+ items[0].code[0] = 0x0049;
+ return 1;
+ }
+ else if (code == 0x0069) {
+ items[0].byte_len = len;
+ items[0].code_len = 1;
+ items[0].code[0] = 0x0130;
+ return 1;
+ }
+ }
+#endif
+
+ if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0) {
+ if (to->n == 1) {
+ OnigCodePoint orig_code = code;
+
+ items[0].byte_len = len;
+ items[0].code_len = 1;
+ items[0].code[0] = to->code[0];
+ n++;
+
+ code = to->code[0];
+ if (onig_st_lookup(Unfold1Table, (st_data_t )code, (void* )&to) != 0) {
+ for (i = 0; i < to->n; i++) {
+ if (to->code[i] != orig_code) {
+ items[n].byte_len = len;
+ items[n].code_len = 1;
+ items[n].code[0] = to->code[i];
+ n++;
+ }
+ }
+ }
+ }
+ else if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ OnigCodePoint cs[3][4];
+ int fn, ncs[3];
+
+ for (fn = 0; fn < to->n; fn++) {
+ cs[fn][0] = to->code[fn];
+ if (onig_st_lookup(Unfold1Table, (st_data_t )cs[fn][0],
+ (void* )&z3) != 0) {
+ for (i = 0; i < z3->n; i++) {
+ cs[fn][i+1] = z3->code[i];
+ }
+ ncs[fn] = z3->n + 1;
+ }
+ else
+ ncs[fn] = 1;
+ }
+
+ if (fn == 2) {
+ for (i = 0; i < ncs[0]; i++) {
+ for (j = 0; j < ncs[1]; j++) {
+ items[n].byte_len = len;
+ items[n].code_len = 2;
+ items[n].code[0] = cs[0][i];
+ items[n].code[1] = cs[1][j];
+ n++;
+ }
+ }
+
+ if (onig_st_lookup(Unfold2Table, (st_data_t )to->code,
+ (void* )&z2) != 0) {
+ for (i = 0; i < z2->n; i++) {
+ if (z2->code[i] == code) continue;
+
+ items[n].byte_len = len;
+ items[n].code_len = 1;
+ items[n].code[0] = z2->code[i];
+ n++;
+ }
+ }
+ }
+ else {
+ for (i = 0; i < ncs[0]; i++) {
+ for (j = 0; j < ncs[1]; j++) {
+ for (k = 0; k < ncs[2]; k++) {
+ items[n].byte_len = len;
+ items[n].code_len = 3;
+ items[n].code[0] = cs[0][i];
+ items[n].code[1] = cs[1][j];
+ items[n].code[2] = cs[2][k];
+ n++;
+ }
+ }
+ }
+
+ if (onig_st_lookup(Unfold3Table, (st_data_t )to->code,
+ (void* )&z2) != 0) {
+ for (i = 0; i < z2->n; i++) {
+ if (z2->code[i] == code) continue;
+
+ items[n].byte_len = len;
+ items[n].code_len = 1;
+ items[n].code[0] = z2->code[i];
+ n++;
+ }
+ }
+ }
+
+ /* multi char folded code is not head of another folded multi char */
+ flag = 0; /* DISABLE_CASE_FOLD_MULTI_CHAR(flag); */
+ }
+ }
+ else {
+ if (onig_st_lookup(Unfold1Table, (st_data_t )code, (void* )&to) != 0) {
+ for (i = 0; i < to->n; i++) {
+ items[n].byte_len = len;
+ items[n].code_len = 1;
+ items[n].code[0] = to->code[i];
+ n++;
+ }
+ }
+ }
+
+
+ if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ p += len;
+ if (p < end) {
+ int clen;
+
+ codes[0] = code;
+ code = ONIGENC_MBC_TO_CODE(enc, p, end);
+ if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0
+ && to->n == 1) {
+ codes[1] = to->code[0];
+ }
+ else
+ codes[1] = code;
+
+ clen = enclen(enc, p);
+ len += clen;
+ if (onig_st_lookup(Unfold2Table, (st_data_t )codes, (void* )&z2) != 0) {
+ for (i = 0; i < z2->n; i++) {
+ items[n].byte_len = len;
+ items[n].code_len = 1;
+ items[n].code[0] = z2->code[i];
+ n++;
+ }
+ }
+
+ p += clen;
+ if (p < end) {
+ code = ONIGENC_MBC_TO_CODE(enc, p, end);
+ if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0
+ && to->n == 1) {
+ codes[2] = to->code[0];
+ }
+ else
+ codes[2] = code;
+
+ clen = enclen(enc, p);
+ len += clen;
+ if (onig_st_lookup(Unfold3Table, (st_data_t )codes,
+ (void* )&z2) != 0) {
+ for (i = 0; i < z2->n; i++) {
+ items[n].byte_len = len;
+ items[n].code_len = 1;
+ items[n].code[0] = z2->code[i];
+ n++;
+ }
+ }
+ }
+ }
+ }
+
+ return n;
+}
diff --git a/ext/mbstring/oniguruma/enc/utf16_be.c b/ext/mbstring/oniguruma/enc/utf16_be.c
index 6ab80a6c1..1e909ebbf 100755..100644
--- a/ext/mbstring/oniguruma/enc/utf16_be.c
+++ b/ext/mbstring/oniguruma/enc/utf16_be.c
@@ -2,7 +2,7 @@
utf16_be.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,9 +29,6 @@
#include "regenc.h"
-#define UTF16_IS_SURROGATE_FIRST(c) (c >= 0xd8 && c <= 0xdb)
-#define UTF16_IS_SURROGATE_SECOND(c) (c >= 0xdc && c <= 0xdf)
-
static const int EncLen_UTF16[] = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -64,7 +61,11 @@ utf16be_is_mbc_newline(const UChar* p, const UChar* end)
if (*(p+1) == 0x0a && *p == 0x00)
return 1;
#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
- if ((*(p+1) == 0x0d || *(p+1) == 0x85) && *p == 0x00)
+ if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+ *(p+1) == 0x0d ||
+#endif
+ *(p+1) == 0x85) && *p == 0x00)
return 1;
if (*p == 0x20 && (*(p+1) == 0x29 || *(p+1) == 0x28))
return 1;
@@ -74,7 +75,7 @@ utf16be_is_mbc_newline(const UChar* p, const UChar* end)
}
static OnigCodePoint
-utf16be_mbc_to_code(const UChar* p, const UChar* end)
+utf16be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
OnigCodePoint code;
@@ -103,11 +104,11 @@ utf16be_code_to_mbc(OnigCodePoint code, UChar *buf)
if (code > 0xffff) {
unsigned int plane, high;
- plane = code >> 16;
+ plane = (code >> 16) - 1;
*p++ = (plane >> 2) + 0xd8;
high = (code & 0xff00) >> 8;
*p++ = ((plane & 0x03) << 6) + (high >> 2);
- *p++ = (high & 0x02) + 0xdc;
+ *p++ = (high & 0x03) + 0xdc;
*p = (UChar )(code & 0xff);
return 4;
}
@@ -119,43 +120,37 @@ utf16be_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-utf16be_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+utf16be_mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end, UChar* fold)
{
const UChar* p = *pp;
- if (*p == 0) {
+ if (ONIGENC_IS_ASCII_CODE(*(p+1)) && *p == 0) {
p++;
- *lower++ = '\0';
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
-
- (*pp) += 2;
- return 2; /* return byte length of converted char to lower */
- }
- else {
- int len;
- len = EncLen_UTF16[*p];
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (*p == 0x49) {
+ *fold++ = 0x01;
+ *fold = 0x31;
+ (*pp) += 2;
+ return 2;
}
}
- (*pp) += len;
- return len; /* return byte length of converted char to lower */
+#endif
+
+ *fold++ = 0;
+ *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+ *pp += 2;
+ return 2;
}
+ else
+ return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF16_BE, flag,
+ pp, end, fold);
}
+#if 0
static int
-utf16be_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+utf16be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
const UChar* p = *pp;
@@ -165,27 +160,27 @@ utf16be_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
int c, v;
p++;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- c = *p;
- v = ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(c,
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
-
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (c >= 0xaa && c <= 0xba)
- return FALSE;
- else
- return TRUE;
- }
- return (v != 0 ? TRUE : FALSE);
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ return TRUE;
+ }
+
+ c = *p;
+ v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+ (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+ if (c >= 0xaa && c <= 0xba)
+ return FALSE;
+ else
+ return TRUE;
}
+ return (v != 0 ? TRUE : FALSE);
}
return FALSE;
}
+#endif
static UChar*
utf16be_left_adjust_char_head(const UChar* start, const UChar* s)
@@ -202,31 +197,29 @@ utf16be_left_adjust_char_head(const UChar* start, const UChar* s)
return (UChar* )s;
}
+static int
+utf16be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF16_BE,
+ flag, p, end, items);
+}
+
OnigEncodingType OnigEncodingUTF16_BE = {
utf16be_mbc_enc_len,
"UTF-16BE", /* name */
4, /* max byte length */
2, /* min byte length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
utf16be_is_mbc_newline,
utf16be_mbc_to_code,
utf16be_code_to_mbclen,
utf16be_code_to_mbc,
- utf16be_mbc_to_normalize,
- utf16be_is_mbc_ambiguous,
- onigenc_iso_8859_1_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ utf16be_mbc_case_fold,
+ onigenc_unicode_apply_all_case_fold,
+ utf16be_get_case_fold_codes_by_str,
+ onigenc_unicode_property_name_to_ctype,
onigenc_unicode_is_code_ctype,
- onigenc_unicode_get_ctype_code_range,
+ onigenc_utf16_32_get_ctype_code_range,
utf16be_left_adjust_char_head,
onigenc_always_false_is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/enc/utf16_le.c b/ext/mbstring/oniguruma/enc/utf16_le.c
index 2248e4910..5cc075911 100755..100644
--- a/ext/mbstring/oniguruma/enc/utf16_le.c
+++ b/ext/mbstring/oniguruma/enc/utf16_le.c
@@ -2,7 +2,7 @@
utf16_le.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,9 +29,6 @@
#include "regenc.h"
-#define UTF16_IS_SURROGATE_FIRST(c) (c >= 0xd8 && c <= 0xdb)
-#define UTF16_IS_SURROGATE_SECOND(c) (c >= 0xdc && c <= 0xdf)
-
static const int EncLen_UTF16[] = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -70,7 +67,11 @@ utf16le_is_mbc_newline(const UChar* p, const UChar* end)
if (*p == 0x0a && *(p+1) == 0x00)
return 1;
#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
- if ((*p == 0x0d || *p == 0x85) && *(p+1) == 0x00)
+ if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+ *p == 0x0d ||
+#endif
+ *p == 0x85) && *(p+1) == 0x00)
return 1;
if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28))
return 1;
@@ -80,7 +81,7 @@ utf16le_is_mbc_newline(const UChar* p, const UChar* end)
}
static OnigCodePoint
-utf16le_mbc_to_code(const UChar* p, const UChar* end)
+utf16le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
OnigCodePoint code;
UChar c0 = *p;
@@ -105,13 +106,13 @@ utf16le_code_to_mbc(OnigCodePoint code, UChar *buf)
if (code > 0xffff) {
unsigned int plane, high;
- plane = code >> 16;
+ plane = (code >> 16) - 1;
high = (code & 0xff00) >> 8;
*p++ = ((plane & 0x03) << 6) + (high >> 2);
*p++ = (plane >> 2) + 0xd8;
*p++ = (UChar )(code & 0xff);
- *p = (high & 0x02) + 0xdc;
+ *p = (high & 0x03) + 0xdc;
return 4;
}
else {
@@ -122,40 +123,37 @@ utf16le_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-utf16le_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+utf16le_mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end, UChar* fold)
{
const UChar* p = *pp;
- if (*(p+1) == 0) {
- *(lower+1) = '\0';
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
- (*pp) += 2;
- return 2; /* return byte length of converted char to lower */
- }
- else {
- int len = EncLen_UTF16[*(p+1)];
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
+ if (ONIGENC_IS_ASCII_CODE(*p) && *(p+1) == 0) {
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (*p == 0x49) {
+ *fold++ = 0x31;
+ *fold = 0x01;
+ (*pp) += 2;
+ return 2;
}
}
- (*pp) += len;
- return len; /* return byte length of converted char to lower */
+#endif
+
+ *fold++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+ *fold = 0;
+ *pp += 2;
+ return 2;
}
+ else
+ return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF16_LE, flag, pp, end,
+ fold);
}
+#if 0
static int
-utf16le_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+utf16le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
+ const UChar* end)
{
const UChar* p = *pp;
@@ -164,26 +162,26 @@ utf16le_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
if (*(p+1) == 0) {
int c, v;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- c = *p;
- v = ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(c,
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (c >= 0xaa && c <= 0xba)
- return FALSE;
- else
- return TRUE;
- }
- return (v != 0 ? TRUE : FALSE);
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ return TRUE;
}
+
+ c = *p;
+ v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+ (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+ if (c >= 0xaa && c <= 0xba)
+ return FALSE;
+ else
+ return TRUE;
+ }
+ return (v != 0 ? TRUE : FALSE);
}
return FALSE;
}
+#endif
static UChar*
utf16le_left_adjust_char_head(const UChar* start, const UChar* s)
@@ -200,31 +198,29 @@ utf16le_left_adjust_char_head(const UChar* start, const UChar* s)
return (UChar* )s;
}
+static int
+utf16le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF16_LE,
+ flag, p, end, items);
+}
+
OnigEncodingType OnigEncodingUTF16_LE = {
utf16le_mbc_enc_len,
"UTF-16LE", /* name */
4, /* max byte length */
2, /* min byte length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
utf16le_is_mbc_newline,
utf16le_mbc_to_code,
utf16le_code_to_mbclen,
utf16le_code_to_mbc,
- utf16le_mbc_to_normalize,
- utf16le_is_mbc_ambiguous,
- onigenc_iso_8859_1_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ utf16le_mbc_case_fold,
+ onigenc_unicode_apply_all_case_fold,
+ utf16le_get_case_fold_codes_by_str,
+ onigenc_unicode_property_name_to_ctype,
onigenc_unicode_is_code_ctype,
- onigenc_unicode_get_ctype_code_range,
+ onigenc_utf16_32_get_ctype_code_range,
utf16le_left_adjust_char_head,
onigenc_always_false_is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/enc/utf32_be.c b/ext/mbstring/oniguruma/enc/utf32_be.c
index 75133ca26..b4f822607 100755..100644
--- a/ext/mbstring/oniguruma/enc/utf32_be.c
+++ b/ext/mbstring/oniguruma/enc/utf32_be.c
@@ -2,7 +2,7 @@
utf32_be.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
#include "regenc.h"
static int
-utf32be_mbc_enc_len(const UChar* p)
+utf32be_mbc_enc_len(const UChar* p ARG_UNUSED)
{
return 4;
}
@@ -42,7 +42,11 @@ utf32be_is_mbc_newline(const UChar* p, const UChar* end)
if (*(p+3) == 0x0a && *(p+2) == 0 && *(p+1) == 0 && *p == 0)
return 1;
#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
- if ((*(p+3) == 0x0d || *(p+3) == 0x85)
+ if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+ *(p+3) == 0x0d ||
+#endif
+ *(p+3) == 0x85)
&& *(p+2) == 0 && *(p+1) == 0 && *p == 0x00)
return 1;
if (*(p+2) == 0x20 && (*(p+3) == 0x29 || *(p+3) == 0x28)
@@ -54,13 +58,13 @@ utf32be_is_mbc_newline(const UChar* p, const UChar* end)
}
static OnigCodePoint
-utf32be_mbc_to_code(const UChar* p, const UChar* end)
+utf32be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
return (OnigCodePoint )(((p[0] * 256 + p[1]) * 256 + p[2]) * 256 + p[3]);
}
static int
-utf32be_code_to_mbclen(OnigCodePoint code)
+utf32be_code_to_mbclen(OnigCodePoint code ARG_UNUSED)
{
return 4;
}
@@ -78,44 +82,39 @@ utf32be_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-utf32be_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+utf32be_mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end, UChar* fold)
{
const UChar* p = *pp;
- if (*(p+2) == 0 && *(p+1) == 0 && *p == 0) {
- p += 3;
- *lower++ = '\0';
- *lower++ = '\0';
- *lower++ = '\0';
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
-
- (*pp) += 4;
- return 4; /* return byte length of converted char to lower */
- }
- else {
- int len = 4;
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
+ if (ONIGENC_IS_ASCII_CODE(*(p+3)) && *(p+2) == 0 && *(p+1) == 0 && *p == 0) {
+ *fold++ = 0;
+ *fold++ = 0;
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (*(p+3) == 0x49) {
+ *fold++ = 0x01;
+ *fold = 0x31;
+ (*pp) += 4;
+ return 4;
}
}
- (*pp) += len;
- return len; /* return byte length of converted char to lower */
+#endif
+
+ *fold++ = 0;
+ *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*(p+3));
+ *pp += 4;
+ return 4;
}
+ else
+ return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF32_BE, flag, pp, end,
+ fold);
}
+#if 0
static int
-utf32be_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+utf32be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
const UChar* p = *pp;
@@ -125,26 +124,26 @@ utf32be_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
int c, v;
p += 3;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- c = *p;
- v = ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(c,
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (c >= 0xaa && c <= 0xba)
- return FALSE;
- else
- return TRUE;
- }
- return (v != 0 ? TRUE : FALSE);
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ return TRUE;
+ }
+
+ c = *p;
+ v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+ (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+ if (c >= 0xaa && c <= 0xba)
+ return FALSE;
+ else
+ return TRUE;
}
+ return (v != 0 ? TRUE : FALSE);
}
return FALSE;
}
+#endif
static UChar*
utf32be_left_adjust_char_head(const UChar* start, const UChar* s)
@@ -157,31 +156,29 @@ utf32be_left_adjust_char_head(const UChar* start, const UChar* s)
return (UChar* )(s - rem);
}
+static int
+utf32be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF32_BE,
+ flag, p, end, items);
+}
+
OnigEncodingType OnigEncodingUTF32_BE = {
utf32be_mbc_enc_len,
"UTF-32BE", /* name */
4, /* max byte length */
4, /* min byte length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
utf32be_is_mbc_newline,
utf32be_mbc_to_code,
utf32be_code_to_mbclen,
utf32be_code_to_mbc,
- utf32be_mbc_to_normalize,
- utf32be_is_mbc_ambiguous,
- onigenc_iso_8859_1_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ utf32be_mbc_case_fold,
+ onigenc_unicode_apply_all_case_fold,
+ utf32be_get_case_fold_codes_by_str,
+ onigenc_unicode_property_name_to_ctype,
onigenc_unicode_is_code_ctype,
- onigenc_unicode_get_ctype_code_range,
+ onigenc_utf16_32_get_ctype_code_range,
utf32be_left_adjust_char_head,
onigenc_always_false_is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/enc/utf32_le.c b/ext/mbstring/oniguruma/enc/utf32_le.c
index 21dca10c1..8f413bfc7 100755..100644
--- a/ext/mbstring/oniguruma/enc/utf32_le.c
+++ b/ext/mbstring/oniguruma/enc/utf32_le.c
@@ -2,7 +2,7 @@
utf32_le.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
#include "regenc.h"
static int
-utf32le_mbc_enc_len(const UChar* p)
+utf32le_mbc_enc_len(const UChar* p ARG_UNUSED)
{
return 4;
}
@@ -42,8 +42,12 @@ utf32le_is_mbc_newline(const UChar* p, const UChar* end)
if (*p == 0x0a && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0)
return 1;
#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
- if ((*p == 0x0d || *p == 0x85) && *(p+1) == 0x00
- && (p+2) == 0x00 && *(p+3) == 0x00)
+ if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+ *p == 0x0d ||
+#endif
+ *p == 0x85)
+ && *(p+1) == 0x00 && (p+2) == 0x00 && *(p+3) == 0x00)
return 1;
if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28)
&& *(p+2) == 0x00 && *(p+3) == 0x00)
@@ -54,13 +58,13 @@ utf32le_is_mbc_newline(const UChar* p, const UChar* end)
}
static OnigCodePoint
-utf32le_mbc_to_code(const UChar* p, const UChar* end)
+utf32le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
return (OnigCodePoint )(((p[3] * 256 + p[2]) * 256 + p[1]) * 256 + p[0]);
}
static int
-utf32le_code_to_mbclen(OnigCodePoint code)
+utf32le_code_to_mbclen(OnigCodePoint code ARG_UNUSED)
{
return 4;
}
@@ -78,43 +82,40 @@ utf32le_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-utf32le_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end,
- UChar* lower)
+utf32le_mbc_case_fold(OnigCaseFoldType flag,
+ const UChar** pp, const UChar* end, UChar* fold)
{
const UChar* p = *pp;
- if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- *lower++ = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
+ if (ONIGENC_IS_ASCII_CODE(*p) && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (*p == 0x49) {
+ *fold++ = 0x31;
+ *fold++ = 0x01;
+ }
}
else {
- *lower++ = *p;
+#endif
+ *fold++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+ *fold++ = 0;
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
}
- *lower++ = '\0';
- *lower++ = '\0';
- *lower = '\0';
+#endif
- (*pp) += 4;
- return 4; /* return byte length of converted char to lower */
- }
- else {
- int len = 4;
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
- }
- }
- (*pp) += len;
- return len; /* return byte length of converted char to lower */
+ *fold++ = 0;
+ *fold = 0;
+ *pp += 4;
+ return 4;
}
+ else
+ return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF32_LE, flag, pp, end,
+ fold);
}
+#if 0
static int
-utf32le_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+utf32le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
const UChar* p = *pp;
@@ -123,26 +124,26 @@ utf32le_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
int c, v;
- if (((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
- ONIGENC_IS_MBC_ASCII(p)) ||
- ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0 &&
- !ONIGENC_IS_MBC_ASCII(p))) {
- c = *p;
- v = ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(c,
- (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER));
- if ((v | ONIGENC_CTYPE_LOWER) != 0) {
- /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
- if (c >= 0xaa && c <= 0xba)
- return FALSE;
- else
- return TRUE;
- }
- return (v != 0 ? TRUE : FALSE);
+ if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ return TRUE;
+ }
+
+ c = *p;
+ v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+ (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+ if ((v | BIT_CTYPE_LOWER) != 0) {
+ /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+ if (c >= 0xaa && c <= 0xba)
+ return FALSE;
+ else
+ return TRUE;
}
+ return (v != 0 ? TRUE : FALSE);
}
return FALSE;
}
+#endif
static UChar*
utf32le_left_adjust_char_head(const UChar* start, const UChar* s)
@@ -155,31 +156,29 @@ utf32le_left_adjust_char_head(const UChar* start, const UChar* s)
return (UChar* )(s - rem);
}
+static int
+utf32le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF32_LE,
+ flag, p, end, items);
+}
+
OnigEncodingType OnigEncodingUTF32_LE = {
utf32le_mbc_enc_len,
"UTF-32LE", /* name */
4, /* max byte length */
4, /* min byte length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
utf32le_is_mbc_newline,
utf32le_mbc_to_code,
utf32le_code_to_mbclen,
utf32le_code_to_mbc,
- utf32le_mbc_to_normalize,
- utf32le_is_mbc_ambiguous,
- onigenc_iso_8859_1_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
+ utf32le_mbc_case_fold,
+ onigenc_unicode_apply_all_case_fold,
+ utf32le_get_case_fold_codes_by_str,
+ onigenc_unicode_property_name_to_ctype,
onigenc_unicode_is_code_ctype,
- onigenc_unicode_get_ctype_code_range,
+ onigenc_utf16_32_get_ctype_code_range,
utf32le_left_adjust_char_head,
onigenc_always_false_is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/enc/utf8.c b/ext/mbstring/oniguruma/enc/utf8.c
index c7481d705..5e2c1721a 100644
--- a/ext/mbstring/oniguruma/enc/utf8.c
+++ b/ext/mbstring/oniguruma/enc/utf8.c
@@ -2,7 +2,7 @@
utf8.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -60,19 +60,21 @@ static const int EncLen_UTF8[] = {
};
static int
-utf8_mbc_enc_len(const UChar* p)
+mbc_enc_len(const UChar* p)
{
return EncLen_UTF8[*p];
}
static int
-utf8_is_mbc_newline(const UChar* p, const UChar* end)
+is_mbc_newline(const UChar* p, const UChar* end)
{
if (p < end) {
if (*p == 0x0a) return 1;
#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
if (*p == 0x0d) return 1;
+#endif
if (p + 1 < end) {
if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */
return 1;
@@ -89,12 +91,12 @@ utf8_is_mbc_newline(const UChar* p, const UChar* end)
}
static OnigCodePoint
-utf8_mbc_to_code(const UChar* p, const UChar* end)
+mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
int c, len;
OnigCodePoint n;
- len = enc_len(ONIG_ENCODING_UTF8, p);
+ len = enclen(ONIG_ENCODING_UTF8, p);
c = *p++;
if (len > 1) {
len--;
@@ -116,14 +118,10 @@ utf8_mbc_to_code(const UChar* p, const UChar* end)
}
static int
-utf8_code_to_mbclen(OnigCodePoint code)
+code_to_mbclen(OnigCodePoint code)
{
if ((code & 0xffffff80) == 0) return 1;
- else if ((code & 0xfffff800) == 0) {
- if (code <= 0xff && code >= 0xfe)
- return 1;
- return 2;
- }
+ else if ((code & 0xfffff800) == 0) return 2;
else if ((code & 0xffff0000) == 0) return 3;
else if ((code & 0xffe00000) == 0) return 4;
else if ((code & 0xfc000000) == 0) return 5;
@@ -133,35 +131,11 @@ utf8_code_to_mbclen(OnigCodePoint code)
else if (code == INVALID_CODE_FF) return 1;
#endif
else
- return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
-}
-
-#if 0
-static int
-utf8_code_to_mbc_first(OnigCodePoint code)
-{
- if ((code & 0xffffff80) == 0)
- return code;
- else {
- if ((code & 0xfffff800) == 0)
- return ((code>>6)& 0x1f) | 0xc0;
- else if ((code & 0xffff0000) == 0)
- return ((code>>12) & 0x0f) | 0xe0;
- else if ((code & 0xffe00000) == 0)
- return ((code>>18) & 0x07) | 0xf0;
- else if ((code & 0xfc000000) == 0)
- return ((code>>24) & 0x03) | 0xf8;
- else if ((code & 0x80000000) == 0)
- return ((code>>30) & 0x01) | 0xfc;
- else {
- return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
- }
- }
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
}
-#endif
static int
-utf8_code_to_mbc(OnigCodePoint code, UChar *buf)
+code_to_mbc(OnigCodePoint code, UChar *buf)
{
#define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80)
#define UTF8_TRAIL0(code) (UChar )(((code) & 0x3f) | 0x80)
@@ -209,7 +183,7 @@ utf8_code_to_mbc(OnigCodePoint code, UChar *buf)
}
#endif
else {
- return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
+ return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
}
*p++ = UTF8_TRAIL0(code);
@@ -218,76 +192,60 @@ utf8_code_to_mbc(OnigCodePoint code, UChar *buf)
}
static int
-utf8_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* lower)
+mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
+ const UChar* end, UChar* fold)
{
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+ if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+ if (*p == 0x49) {
+ *fold++ = 0xc4;
+ *fold = 0xb1;
+ (*pp)++;
+ return 2;
+ }
}
+#endif
+
+ *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
(*pp)++;
return 1; /* return byte length of converted char to lower */
}
else {
- int len;
-
- if (*p == 195) { /* 195 == '\303' */
- int c = *(p + 1);
- if (c >= 128) {
- if (c <= (UChar )'\236' && /* upper */
- (flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
- if (c != (UChar )'\227') {
- *lower++ = *p;
- *lower = (UChar )(c + 32);
- (*pp) += 2;
- return 2;
- }
- }
- }
- }
-
- len = enc_len(ONIG_ENCODING_UTF8, p);
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
- }
- }
- (*pp) += len;
- return len; /* return byte length of converted char to lower */
+ return onigenc_unicode_mbc_case_fold(ONIG_ENCODING_UTF8, flag,
+ pp, end, fold);
}
}
+#if 0
static int
-utf8_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
{
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
(*pp)++;
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
- }
+ return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
}
else {
- (*pp) += enc_len(ONIG_ENCODING_UTF8, p);
+ (*pp) += enclen(ONIG_ENCODING_UTF8, p);
- if (*p == 195) { /* 195 == '\303' */
+ if (*p == 0xc3) {
int c = *(p + 1);
- if (c >= 128) {
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
- if (c <= (UChar )'\236') { /* upper */
- if (c == (UChar )'\227') return FALSE;
- return TRUE;
- }
- else if (c >= (UChar )'\240' && c <= (UChar )'\276') { /* lower */
- if (c == (UChar )'\267') return FALSE;
- return TRUE;
- }
+ if (c >= 0x80) {
+ if (c <= (UChar )0x9e) { /* upper */
+ if (c == (UChar )0x97) return FALSE;
+ return TRUE;
+ }
+ else if (c >= (UChar )0xa0 && c <= (UChar )0xbe) { /* lower */
+ if (c == (UChar )'\267') return FALSE;
+ return TRUE;
+ }
+ else if (c == (UChar )0x9f &&
+ (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+ return TRUE;
}
}
}
@@ -295,3401 +253,20 @@ utf8_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
return FALSE;
}
-
-
-static const OnigCodePoint EmptyRange[] = { 0 };
-
-static const OnigCodePoint SBAlnum[] = {
- 3,
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x0061, 0x007a
-};
-
-static const OnigCodePoint MBAlnum[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 411,
-#else
- 6,
-#endif
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ee, 0x02ee,
- 0x0300, 0x0357,
- 0x035d, 0x036f,
- 0x037a, 0x037a,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03f5,
- 0x03f7, 0x03fb,
- 0x0400, 0x0481,
- 0x0483, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0561, 0x0587,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f2,
- 0x0610, 0x0615,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x0660, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06de, 0x06e8,
- 0x06ea, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0963,
- 0x0966, 0x096f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bef,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f20, 0x0f29,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1049,
- 0x1050, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1369, 0x1371,
- 0x13a0, 0x13f4,
- 0x1401, 0x166c,
- 0x166f, 0x1676,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17b3,
- 0x17b6, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x17e0, 0x17e9,
- 0x180b, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x20d0, 0x20ea,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2131,
- 0x2133, 0x2139,
- 0x213d, 0x213f,
- 0x2145, 0x2149,
- 0x3005, 0x3006,
- 0x302a, 0x302f,
- 0x3031, 0x3035,
- 0x303b, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309a,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x31a0, 0x31b7,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xac00, 0xd7a3,
- 0xf900, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10300, 0x1031e,
- 0x10330, 0x10349,
- 0x10380, 0x1039d,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x20000, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBAlnum */
-
-static const OnigCodePoint SBAlpha[] = {
- 2,
- 0x0041, 0x005a,
- 0x0061, 0x007a
-};
-
-static const OnigCodePoint MBAlpha[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 394,
-#else
- 6,
-#endif
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ee, 0x02ee,
- 0x0300, 0x0357,
- 0x035d, 0x036f,
- 0x037a, 0x037a,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03f5,
- 0x03f7, 0x03fb,
- 0x0400, 0x0481,
- 0x0483, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0561, 0x0587,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f2,
- 0x0610, 0x0615,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06de, 0x06e8,
- 0x06ea, 0x06ef,
- 0x06fa, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0963,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09f0, 0x09f1,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a70, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1050, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x13a0, 0x13f4,
- 0x1401, 0x166c,
- 0x166f, 0x1676,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17b3,
- 0x17b6, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x180b, 0x180d,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x20d0, 0x20ea,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2131,
- 0x2133, 0x2139,
- 0x213d, 0x213f,
- 0x2145, 0x2149,
- 0x3005, 0x3006,
- 0x302a, 0x302f,
- 0x3031, 0x3035,
- 0x303b, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309a,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x31a0, 0x31b7,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xac00, 0xd7a3,
- 0xf900, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10300, 0x1031e,
- 0x10330, 0x10349,
- 0x10380, 0x1039d,
- 0x10400, 0x1049d,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9,
- 0x20000, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBAlpha */
-
-static const OnigCodePoint SBBlank[] = {
- 2,
- 0x0009, 0x0009,
- 0x0020, 0x0020
-};
-
-static const OnigCodePoint MBBlank[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 7,
-#else
- 1,
-#endif
- 0x00a0, 0x00a0
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x1680, 0x1680,
- 0x180e, 0x180e,
- 0x2000, 0x200a,
- 0x202f, 0x202f,
- 0x205f, 0x205f,
- 0x3000, 0x3000
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBBlank */
-
-static const OnigCodePoint SBCntrl[] = {
- 2,
- 0x0000, 0x001f,
- 0x007f, 0x007f
-};
-
-static const OnigCodePoint MBCntrl[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 18,
-#else
- 2,
-#endif
- 0x0080, 0x009f,
- 0x00ad, 0x00ad
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0600, 0x0603,
- 0x06dd, 0x06dd,
- 0x070f, 0x070f,
- 0x17b4, 0x17b5,
- 0x200b, 0x200f,
- 0x202a, 0x202e,
- 0x2060, 0x2063,
- 0x206a, 0x206f,
- 0xd800, 0xf8ff,
- 0xfeff, 0xfeff,
- 0xfff9, 0xfffb,
- 0x1d173, 0x1d17a,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBCntrl */
-
-static const OnigCodePoint SBDigit[] = {
- 1,
- 0x0030, 0x0039
-};
-
-static const OnigCodePoint MBDigit[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 22,
-#else
- 0
-#endif
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 0x0660, 0x0669,
- 0x06f0, 0x06f9,
- 0x0966, 0x096f,
- 0x09e6, 0x09ef,
- 0x0a66, 0x0a6f,
- 0x0ae6, 0x0aef,
- 0x0b66, 0x0b6f,
- 0x0be7, 0x0bef,
- 0x0c66, 0x0c6f,
- 0x0ce6, 0x0cef,
- 0x0d66, 0x0d6f,
- 0x0e50, 0x0e59,
- 0x0ed0, 0x0ed9,
- 0x0f20, 0x0f29,
- 0x1040, 0x1049,
- 0x1369, 0x1371,
- 0x17e0, 0x17e9,
- 0x1810, 0x1819,
- 0x1946, 0x194f,
- 0xff10, 0xff19,
- 0x104a0, 0x104a9,
- 0x1d7ce, 0x1d7ff
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBDigit */
-
-static const OnigCodePoint SBGraph[] = {
- 1,
- 0x0021, 0x007e
-};
-
-static const OnigCodePoint MBGraph[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 404,
-#else
- 1,
-#endif
- 0x00a1, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x0357,
- 0x035d, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03fb,
- 0x0400, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x060c, 0x0615,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1681, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x19e0, 0x19ff,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x200b, 0x2027,
- 0x202a, 0x202e,
- 0x2030, 0x2054,
- 0x2057, 0x2057,
- 0x2060, 0x2063,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x20a0, 0x20b1,
- 0x20d0, 0x20ea,
- 0x2100, 0x213b,
- 0x213d, 0x214b,
- 0x2153, 0x2183,
- 0x2190, 0x23d0,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2617,
- 0x2619, 0x267d,
- 0x2680, 0x2691,
- 0x26a0, 0x26a1,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27d0, 0x27eb,
- 0x27f0, 0x2b0d,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3001, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31f0, 0x321e,
- 0x3220, 0x3243,
- 0x3250, 0x327d,
- 0x327f, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fa5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xac00, 0xd7a3,
- 0xe000, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xfffd,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1013f,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x1039f,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d300, 0x1d356,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x20000, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBGraph */
-
-static const OnigCodePoint SBLower[] = {
- 1,
- 0x0061, 0x007a
-};
-
-static const OnigCodePoint MBLower[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 423,
-#else
- 5,
-#endif
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00df, 0x00f6,
- 0x00f8, 0x00ff
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0101, 0x0101,
- 0x0103, 0x0103,
- 0x0105, 0x0105,
- 0x0107, 0x0107,
- 0x0109, 0x0109,
- 0x010b, 0x010b,
- 0x010d, 0x010d,
- 0x010f, 0x010f,
- 0x0111, 0x0111,
- 0x0113, 0x0113,
- 0x0115, 0x0115,
- 0x0117, 0x0117,
- 0x0119, 0x0119,
- 0x011b, 0x011b,
- 0x011d, 0x011d,
- 0x011f, 0x011f,
- 0x0121, 0x0121,
- 0x0123, 0x0123,
- 0x0125, 0x0125,
- 0x0127, 0x0127,
- 0x0129, 0x0129,
- 0x012b, 0x012b,
- 0x012d, 0x012d,
- 0x012f, 0x012f,
- 0x0131, 0x0131,
- 0x0133, 0x0133,
- 0x0135, 0x0135,
- 0x0137, 0x0138,
- 0x013a, 0x013a,
- 0x013c, 0x013c,
- 0x013e, 0x013e,
- 0x0140, 0x0140,
- 0x0142, 0x0142,
- 0x0144, 0x0144,
- 0x0146, 0x0146,
- 0x0148, 0x0149,
- 0x014b, 0x014b,
- 0x014d, 0x014d,
- 0x014f, 0x014f,
- 0x0151, 0x0151,
- 0x0153, 0x0153,
- 0x0155, 0x0155,
- 0x0157, 0x0157,
- 0x0159, 0x0159,
- 0x015b, 0x015b,
- 0x015d, 0x015d,
- 0x015f, 0x015f,
- 0x0161, 0x0161,
- 0x0163, 0x0163,
- 0x0165, 0x0165,
- 0x0167, 0x0167,
- 0x0169, 0x0169,
- 0x016b, 0x016b,
- 0x016d, 0x016d,
- 0x016f, 0x016f,
- 0x0171, 0x0171,
- 0x0173, 0x0173,
- 0x0175, 0x0175,
- 0x0177, 0x0177,
- 0x017a, 0x017a,
- 0x017c, 0x017c,
- 0x017e, 0x0180,
- 0x0183, 0x0183,
- 0x0185, 0x0185,
- 0x0188, 0x0188,
- 0x018c, 0x018d,
- 0x0192, 0x0192,
- 0x0195, 0x0195,
- 0x0199, 0x019b,
- 0x019e, 0x019e,
- 0x01a1, 0x01a1,
- 0x01a3, 0x01a3,
- 0x01a5, 0x01a5,
- 0x01a8, 0x01a8,
- 0x01aa, 0x01ab,
- 0x01ad, 0x01ad,
- 0x01b0, 0x01b0,
- 0x01b4, 0x01b4,
- 0x01b6, 0x01b6,
- 0x01b9, 0x01ba,
- 0x01bd, 0x01bf,
- 0x01c6, 0x01c6,
- 0x01c9, 0x01c9,
- 0x01cc, 0x01cc,
- 0x01ce, 0x01ce,
- 0x01d0, 0x01d0,
- 0x01d2, 0x01d2,
- 0x01d4, 0x01d4,
- 0x01d6, 0x01d6,
- 0x01d8, 0x01d8,
- 0x01da, 0x01da,
- 0x01dc, 0x01dd,
- 0x01df, 0x01df,
- 0x01e1, 0x01e1,
- 0x01e3, 0x01e3,
- 0x01e5, 0x01e5,
- 0x01e7, 0x01e7,
- 0x01e9, 0x01e9,
- 0x01eb, 0x01eb,
- 0x01ed, 0x01ed,
- 0x01ef, 0x01f0,
- 0x01f3, 0x01f3,
- 0x01f5, 0x01f5,
- 0x01f9, 0x01f9,
- 0x01fb, 0x01fb,
- 0x01fd, 0x01fd,
- 0x01ff, 0x01ff,
- 0x0201, 0x0201,
- 0x0203, 0x0203,
- 0x0205, 0x0205,
- 0x0207, 0x0207,
- 0x0209, 0x0209,
- 0x020b, 0x020b,
- 0x020d, 0x020d,
- 0x020f, 0x020f,
- 0x0211, 0x0211,
- 0x0213, 0x0213,
- 0x0215, 0x0215,
- 0x0217, 0x0217,
- 0x0219, 0x0219,
- 0x021b, 0x021b,
- 0x021d, 0x021d,
- 0x021f, 0x021f,
- 0x0221, 0x0221,
- 0x0223, 0x0223,
- 0x0225, 0x0225,
- 0x0227, 0x0227,
- 0x0229, 0x0229,
- 0x022b, 0x022b,
- 0x022d, 0x022d,
- 0x022f, 0x022f,
- 0x0231, 0x0231,
- 0x0233, 0x0236,
- 0x0250, 0x02af,
- 0x0390, 0x0390,
- 0x03ac, 0x03ce,
- 0x03d0, 0x03d1,
- 0x03d5, 0x03d7,
- 0x03d9, 0x03d9,
- 0x03db, 0x03db,
- 0x03dd, 0x03dd,
- 0x03df, 0x03df,
- 0x03e1, 0x03e1,
- 0x03e3, 0x03e3,
- 0x03e5, 0x03e5,
- 0x03e7, 0x03e7,
- 0x03e9, 0x03e9,
- 0x03eb, 0x03eb,
- 0x03ed, 0x03ed,
- 0x03ef, 0x03f3,
- 0x03f5, 0x03f5,
- 0x03f8, 0x03f8,
- 0x03fb, 0x03fb,
- 0x0430, 0x045f,
- 0x0461, 0x0461,
- 0x0463, 0x0463,
- 0x0465, 0x0465,
- 0x0467, 0x0467,
- 0x0469, 0x0469,
- 0x046b, 0x046b,
- 0x046d, 0x046d,
- 0x046f, 0x046f,
- 0x0471, 0x0471,
- 0x0473, 0x0473,
- 0x0475, 0x0475,
- 0x0477, 0x0477,
- 0x0479, 0x0479,
- 0x047b, 0x047b,
- 0x047d, 0x047d,
- 0x047f, 0x047f,
- 0x0481, 0x0481,
- 0x048b, 0x048b,
- 0x048d, 0x048d,
- 0x048f, 0x048f,
- 0x0491, 0x0491,
- 0x0493, 0x0493,
- 0x0495, 0x0495,
- 0x0497, 0x0497,
- 0x0499, 0x0499,
- 0x049b, 0x049b,
- 0x049d, 0x049d,
- 0x049f, 0x049f,
- 0x04a1, 0x04a1,
- 0x04a3, 0x04a3,
- 0x04a5, 0x04a5,
- 0x04a7, 0x04a7,
- 0x04a9, 0x04a9,
- 0x04ab, 0x04ab,
- 0x04ad, 0x04ad,
- 0x04af, 0x04af,
- 0x04b1, 0x04b1,
- 0x04b3, 0x04b3,
- 0x04b5, 0x04b5,
- 0x04b7, 0x04b7,
- 0x04b9, 0x04b9,
- 0x04bb, 0x04bb,
- 0x04bd, 0x04bd,
- 0x04bf, 0x04bf,
- 0x04c2, 0x04c2,
- 0x04c4, 0x04c4,
- 0x04c6, 0x04c6,
- 0x04c8, 0x04c8,
- 0x04ca, 0x04ca,
- 0x04cc, 0x04cc,
- 0x04ce, 0x04ce,
- 0x04d1, 0x04d1,
- 0x04d3, 0x04d3,
- 0x04d5, 0x04d5,
- 0x04d7, 0x04d7,
- 0x04d9, 0x04d9,
- 0x04db, 0x04db,
- 0x04dd, 0x04dd,
- 0x04df, 0x04df,
- 0x04e1, 0x04e1,
- 0x04e3, 0x04e3,
- 0x04e5, 0x04e5,
- 0x04e7, 0x04e7,
- 0x04e9, 0x04e9,
- 0x04eb, 0x04eb,
- 0x04ed, 0x04ed,
- 0x04ef, 0x04ef,
- 0x04f1, 0x04f1,
- 0x04f3, 0x04f3,
- 0x04f5, 0x04f5,
- 0x04f9, 0x04f9,
- 0x0501, 0x0501,
- 0x0503, 0x0503,
- 0x0505, 0x0505,
- 0x0507, 0x0507,
- 0x0509, 0x0509,
- 0x050b, 0x050b,
- 0x050d, 0x050d,
- 0x050f, 0x050f,
- 0x0561, 0x0587,
- 0x1d00, 0x1d2b,
- 0x1d62, 0x1d6b,
- 0x1e01, 0x1e01,
- 0x1e03, 0x1e03,
- 0x1e05, 0x1e05,
- 0x1e07, 0x1e07,
- 0x1e09, 0x1e09,
- 0x1e0b, 0x1e0b,
- 0x1e0d, 0x1e0d,
- 0x1e0f, 0x1e0f,
- 0x1e11, 0x1e11,
- 0x1e13, 0x1e13,
- 0x1e15, 0x1e15,
- 0x1e17, 0x1e17,
- 0x1e19, 0x1e19,
- 0x1e1b, 0x1e1b,
- 0x1e1d, 0x1e1d,
- 0x1e1f, 0x1e1f,
- 0x1e21, 0x1e21,
- 0x1e23, 0x1e23,
- 0x1e25, 0x1e25,
- 0x1e27, 0x1e27,
- 0x1e29, 0x1e29,
- 0x1e2b, 0x1e2b,
- 0x1e2d, 0x1e2d,
- 0x1e2f, 0x1e2f,
- 0x1e31, 0x1e31,
- 0x1e33, 0x1e33,
- 0x1e35, 0x1e35,
- 0x1e37, 0x1e37,
- 0x1e39, 0x1e39,
- 0x1e3b, 0x1e3b,
- 0x1e3d, 0x1e3d,
- 0x1e3f, 0x1e3f,
- 0x1e41, 0x1e41,
- 0x1e43, 0x1e43,
- 0x1e45, 0x1e45,
- 0x1e47, 0x1e47,
- 0x1e49, 0x1e49,
- 0x1e4b, 0x1e4b,
- 0x1e4d, 0x1e4d,
- 0x1e4f, 0x1e4f,
- 0x1e51, 0x1e51,
- 0x1e53, 0x1e53,
- 0x1e55, 0x1e55,
- 0x1e57, 0x1e57,
- 0x1e59, 0x1e59,
- 0x1e5b, 0x1e5b,
- 0x1e5d, 0x1e5d,
- 0x1e5f, 0x1e5f,
- 0x1e61, 0x1e61,
- 0x1e63, 0x1e63,
- 0x1e65, 0x1e65,
- 0x1e67, 0x1e67,
- 0x1e69, 0x1e69,
- 0x1e6b, 0x1e6b,
- 0x1e6d, 0x1e6d,
- 0x1e6f, 0x1e6f,
- 0x1e71, 0x1e71,
- 0x1e73, 0x1e73,
- 0x1e75, 0x1e75,
- 0x1e77, 0x1e77,
- 0x1e79, 0x1e79,
- 0x1e7b, 0x1e7b,
- 0x1e7d, 0x1e7d,
- 0x1e7f, 0x1e7f,
- 0x1e81, 0x1e81,
- 0x1e83, 0x1e83,
- 0x1e85, 0x1e85,
- 0x1e87, 0x1e87,
- 0x1e89, 0x1e89,
- 0x1e8b, 0x1e8b,
- 0x1e8d, 0x1e8d,
- 0x1e8f, 0x1e8f,
- 0x1e91, 0x1e91,
- 0x1e93, 0x1e93,
- 0x1e95, 0x1e9b,
- 0x1ea1, 0x1ea1,
- 0x1ea3, 0x1ea3,
- 0x1ea5, 0x1ea5,
- 0x1ea7, 0x1ea7,
- 0x1ea9, 0x1ea9,
- 0x1eab, 0x1eab,
- 0x1ead, 0x1ead,
- 0x1eaf, 0x1eaf,
- 0x1eb1, 0x1eb1,
- 0x1eb3, 0x1eb3,
- 0x1eb5, 0x1eb5,
- 0x1eb7, 0x1eb7,
- 0x1eb9, 0x1eb9,
- 0x1ebb, 0x1ebb,
- 0x1ebd, 0x1ebd,
- 0x1ebf, 0x1ebf,
- 0x1ec1, 0x1ec1,
- 0x1ec3, 0x1ec3,
- 0x1ec5, 0x1ec5,
- 0x1ec7, 0x1ec7,
- 0x1ec9, 0x1ec9,
- 0x1ecb, 0x1ecb,
- 0x1ecd, 0x1ecd,
- 0x1ecf, 0x1ecf,
- 0x1ed1, 0x1ed1,
- 0x1ed3, 0x1ed3,
- 0x1ed5, 0x1ed5,
- 0x1ed7, 0x1ed7,
- 0x1ed9, 0x1ed9,
- 0x1edb, 0x1edb,
- 0x1edd, 0x1edd,
- 0x1edf, 0x1edf,
- 0x1ee1, 0x1ee1,
- 0x1ee3, 0x1ee3,
- 0x1ee5, 0x1ee5,
- 0x1ee7, 0x1ee7,
- 0x1ee9, 0x1ee9,
- 0x1eeb, 0x1eeb,
- 0x1eed, 0x1eed,
- 0x1eef, 0x1eef,
- 0x1ef1, 0x1ef1,
- 0x1ef3, 0x1ef3,
- 0x1ef5, 0x1ef5,
- 0x1ef7, 0x1ef7,
- 0x1ef9, 0x1ef9,
- 0x1f00, 0x1f07,
- 0x1f10, 0x1f15,
- 0x1f20, 0x1f27,
- 0x1f30, 0x1f37,
- 0x1f40, 0x1f45,
- 0x1f50, 0x1f57,
- 0x1f60, 0x1f67,
- 0x1f70, 0x1f7d,
- 0x1f80, 0x1f87,
- 0x1f90, 0x1f97,
- 0x1fa0, 0x1fa7,
- 0x1fb0, 0x1fb4,
- 0x1fb6, 0x1fb7,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fc7,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fd7,
- 0x1fe0, 0x1fe7,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ff7,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x210a, 0x210a,
- 0x210e, 0x210f,
- 0x2113, 0x2113,
- 0x212f, 0x212f,
- 0x2134, 0x2134,
- 0x2139, 0x2139,
- 0x213d, 0x213d,
- 0x2146, 0x2149,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff41, 0xff5a,
- 0x10428, 0x1044f,
- 0x1d41a, 0x1d433,
- 0x1d44e, 0x1d454,
- 0x1d456, 0x1d467,
- 0x1d482, 0x1d49b,
- 0x1d4b6, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d4cf,
- 0x1d4ea, 0x1d503,
- 0x1d51e, 0x1d537,
- 0x1d552, 0x1d56b,
- 0x1d586, 0x1d59f,
- 0x1d5ba, 0x1d5d3,
- 0x1d5ee, 0x1d607,
- 0x1d622, 0x1d63b,
- 0x1d656, 0x1d66f,
- 0x1d68a, 0x1d6a3,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6e1,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d71b,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d755,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d78f,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBLower */
-
-static const OnigCodePoint SBPrint[] = {
- 2,
- 0x0009, 0x000d,
- 0x0020, 0x007e
-};
-
-static const OnigCodePoint MBPrint[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 403,
-#else
- 2,
#endif
- 0x0085, 0x0085,
- 0x00a0, 0x0236
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0250, 0x0357,
- 0x035d, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03fb,
- 0x0400, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x060c, 0x0615,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x19e0, 0x19ff,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2054,
- 0x2057, 0x2057,
- 0x205f, 0x2063,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x20a0, 0x20b1,
- 0x20d0, 0x20ea,
- 0x2100, 0x213b,
- 0x213d, 0x214b,
- 0x2153, 0x2183,
- 0x2190, 0x23d0,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2617,
- 0x2619, 0x267d,
- 0x2680, 0x2691,
- 0x26a0, 0x26a1,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27d0, 0x27eb,
- 0x27f0, 0x2b0d,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31f0, 0x321e,
- 0x3220, 0x3243,
- 0x3250, 0x327d,
- 0x327f, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fa5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xac00, 0xd7a3,
- 0xe000, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xfffd,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1013f,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x1039f,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d300, 0x1d356,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x20000, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBPrint */
-
-static const OnigCodePoint SBPunct[] = {
- 9,
- 0x0021, 0x0023,
- 0x0025, 0x002a,
- 0x002c, 0x002f,
- 0x003a, 0x003b,
- 0x003f, 0x0040,
- 0x005b, 0x005d,
- 0x005f, 0x005f,
- 0x007b, 0x007b,
- 0x007d, 0x007d
-}; /* end of SBPunct */
-
-static const OnigCodePoint MBPunct[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 77,
-#else
- 5,
-#endif
- 0x00a1, 0x00a1,
- 0x00ab, 0x00ab,
- 0x00b7, 0x00b7,
- 0x00bb, 0x00bb,
- 0x00bf, 0x00bf
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x037e, 0x037e,
- 0x0387, 0x0387,
- 0x055a, 0x055f,
- 0x0589, 0x058a,
- 0x05be, 0x05be,
- 0x05c0, 0x05c0,
- 0x05c3, 0x05c3,
- 0x05f3, 0x05f4,
- 0x060c, 0x060d,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x066a, 0x066d,
- 0x06d4, 0x06d4,
- 0x0700, 0x070d,
- 0x0964, 0x0965,
- 0x0970, 0x0970,
- 0x0df4, 0x0df4,
- 0x0e4f, 0x0e4f,
- 0x0e5a, 0x0e5b,
- 0x0f04, 0x0f12,
- 0x0f3a, 0x0f3d,
- 0x0f85, 0x0f85,
- 0x104a, 0x104f,
- 0x10fb, 0x10fb,
- 0x1361, 0x1368,
- 0x166d, 0x166e,
- 0x169b, 0x169c,
- 0x16eb, 0x16ed,
- 0x1735, 0x1736,
- 0x17d4, 0x17d6,
- 0x17d8, 0x17da,
- 0x1800, 0x180a,
- 0x1944, 0x1945,
- 0x2010, 0x2027,
- 0x2030, 0x2043,
- 0x2045, 0x2051,
- 0x2053, 0x2054,
- 0x2057, 0x2057,
- 0x207d, 0x207e,
- 0x208d, 0x208e,
- 0x2329, 0x232a,
- 0x23b4, 0x23b6,
- 0x2768, 0x2775,
- 0x27e6, 0x27eb,
- 0x2983, 0x2998,
- 0x29d8, 0x29db,
- 0x29fc, 0x29fd,
- 0x3001, 0x3003,
- 0x3008, 0x3011,
- 0x3014, 0x301f,
- 0x3030, 0x3030,
- 0x303d, 0x303d,
- 0x30a0, 0x30a0,
- 0x30fb, 0x30fb,
- 0xfd3e, 0xfd3f,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe61,
- 0xfe63, 0xfe63,
- 0xfe68, 0xfe68,
- 0xfe6a, 0xfe6b,
- 0xff01, 0xff03,
- 0xff05, 0xff0a,
- 0xff0c, 0xff0f,
- 0xff1a, 0xff1b,
- 0xff1f, 0xff20,
- 0xff3b, 0xff3d,
- 0xff3f, 0xff3f,
- 0xff5b, 0xff5b,
- 0xff5d, 0xff5d,
- 0xff5f, 0xff65,
- 0x10100, 0x10101,
- 0x1039f, 0x1039f
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBPunct */
-
-static const OnigCodePoint SBSpace[] = {
- 2,
- 0x0009, 0x000d,
- 0x0020, 0x0020
-};
-
-static const OnigCodePoint MBSpace[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 9,
-#else
- 2,
-#endif
- 0x0085, 0x0085,
- 0x00a0, 0x00a0
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x1680, 0x1680,
- 0x180e, 0x180e,
- 0x2000, 0x200a,
- 0x2028, 0x2029,
- 0x202f, 0x202f,
- 0x205f, 0x205f,
- 0x3000, 0x3000
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBSpace */
-
-static const OnigCodePoint SBUpper[] = {
- 1,
- 0x0041, 0x005a
-};
-
-static const OnigCodePoint MBUpper[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 420,
-#else
- 2,
-#endif
- 0x00c0, 0x00d6,
- 0x00d8, 0x00de
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- ,
- 0x0100, 0x0100,
- 0x0102, 0x0102,
- 0x0104, 0x0104,
- 0x0106, 0x0106,
- 0x0108, 0x0108,
- 0x010a, 0x010a,
- 0x010c, 0x010c,
- 0x010e, 0x010e,
- 0x0110, 0x0110,
- 0x0112, 0x0112,
- 0x0114, 0x0114,
- 0x0116, 0x0116,
- 0x0118, 0x0118,
- 0x011a, 0x011a,
- 0x011c, 0x011c,
- 0x011e, 0x011e,
- 0x0120, 0x0120,
- 0x0122, 0x0122,
- 0x0124, 0x0124,
- 0x0126, 0x0126,
- 0x0128, 0x0128,
- 0x012a, 0x012a,
- 0x012c, 0x012c,
- 0x012e, 0x012e,
- 0x0130, 0x0130,
- 0x0132, 0x0132,
- 0x0134, 0x0134,
- 0x0136, 0x0136,
- 0x0139, 0x0139,
- 0x013b, 0x013b,
- 0x013d, 0x013d,
- 0x013f, 0x013f,
- 0x0141, 0x0141,
- 0x0143, 0x0143,
- 0x0145, 0x0145,
- 0x0147, 0x0147,
- 0x014a, 0x014a,
- 0x014c, 0x014c,
- 0x014e, 0x014e,
- 0x0150, 0x0150,
- 0x0152, 0x0152,
- 0x0154, 0x0154,
- 0x0156, 0x0156,
- 0x0158, 0x0158,
- 0x015a, 0x015a,
- 0x015c, 0x015c,
- 0x015e, 0x015e,
- 0x0160, 0x0160,
- 0x0162, 0x0162,
- 0x0164, 0x0164,
- 0x0166, 0x0166,
- 0x0168, 0x0168,
- 0x016a, 0x016a,
- 0x016c, 0x016c,
- 0x016e, 0x016e,
- 0x0170, 0x0170,
- 0x0172, 0x0172,
- 0x0174, 0x0174,
- 0x0176, 0x0176,
- 0x0178, 0x0179,
- 0x017b, 0x017b,
- 0x017d, 0x017d,
- 0x0181, 0x0182,
- 0x0184, 0x0184,
- 0x0186, 0x0187,
- 0x0189, 0x018b,
- 0x018e, 0x0191,
- 0x0193, 0x0194,
- 0x0196, 0x0198,
- 0x019c, 0x019d,
- 0x019f, 0x01a0,
- 0x01a2, 0x01a2,
- 0x01a4, 0x01a4,
- 0x01a6, 0x01a7,
- 0x01a9, 0x01a9,
- 0x01ac, 0x01ac,
- 0x01ae, 0x01af,
- 0x01b1, 0x01b3,
- 0x01b5, 0x01b5,
- 0x01b7, 0x01b8,
- 0x01bc, 0x01bc,
- 0x01c4, 0x01c4,
- 0x01c7, 0x01c7,
- 0x01ca, 0x01ca,
- 0x01cd, 0x01cd,
- 0x01cf, 0x01cf,
- 0x01d1, 0x01d1,
- 0x01d3, 0x01d3,
- 0x01d5, 0x01d5,
- 0x01d7, 0x01d7,
- 0x01d9, 0x01d9,
- 0x01db, 0x01db,
- 0x01de, 0x01de,
- 0x01e0, 0x01e0,
- 0x01e2, 0x01e2,
- 0x01e4, 0x01e4,
- 0x01e6, 0x01e6,
- 0x01e8, 0x01e8,
- 0x01ea, 0x01ea,
- 0x01ec, 0x01ec,
- 0x01ee, 0x01ee,
- 0x01f1, 0x01f1,
- 0x01f4, 0x01f4,
- 0x01f6, 0x01f8,
- 0x01fa, 0x01fa,
- 0x01fc, 0x01fc,
- 0x01fe, 0x01fe,
- 0x0200, 0x0200,
- 0x0202, 0x0202,
- 0x0204, 0x0204,
- 0x0206, 0x0206,
- 0x0208, 0x0208,
- 0x020a, 0x020a,
- 0x020c, 0x020c,
- 0x020e, 0x020e,
- 0x0210, 0x0210,
- 0x0212, 0x0212,
- 0x0214, 0x0214,
- 0x0216, 0x0216,
- 0x0218, 0x0218,
- 0x021a, 0x021a,
- 0x021c, 0x021c,
- 0x021e, 0x021e,
- 0x0220, 0x0220,
- 0x0222, 0x0222,
- 0x0224, 0x0224,
- 0x0226, 0x0226,
- 0x0228, 0x0228,
- 0x022a, 0x022a,
- 0x022c, 0x022c,
- 0x022e, 0x022e,
- 0x0230, 0x0230,
- 0x0232, 0x0232,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x038f,
- 0x0391, 0x03a1,
- 0x03a3, 0x03ab,
- 0x03d2, 0x03d4,
- 0x03d8, 0x03d8,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03e2,
- 0x03e4, 0x03e4,
- 0x03e6, 0x03e6,
- 0x03e8, 0x03e8,
- 0x03ea, 0x03ea,
- 0x03ec, 0x03ec,
- 0x03ee, 0x03ee,
- 0x03f4, 0x03f4,
- 0x03f7, 0x03f7,
- 0x03f9, 0x03fa,
- 0x0400, 0x042f,
- 0x0460, 0x0460,
- 0x0462, 0x0462,
- 0x0464, 0x0464,
- 0x0466, 0x0466,
- 0x0468, 0x0468,
- 0x046a, 0x046a,
- 0x046c, 0x046c,
- 0x046e, 0x046e,
- 0x0470, 0x0470,
- 0x0472, 0x0472,
- 0x0474, 0x0474,
- 0x0476, 0x0476,
- 0x0478, 0x0478,
- 0x047a, 0x047a,
- 0x047c, 0x047c,
- 0x047e, 0x047e,
- 0x0480, 0x0480,
- 0x048a, 0x048a,
- 0x048c, 0x048c,
- 0x048e, 0x048e,
- 0x0490, 0x0490,
- 0x0492, 0x0492,
- 0x0494, 0x0494,
- 0x0496, 0x0496,
- 0x0498, 0x0498,
- 0x049a, 0x049a,
- 0x049c, 0x049c,
- 0x049e, 0x049e,
- 0x04a0, 0x04a0,
- 0x04a2, 0x04a2,
- 0x04a4, 0x04a4,
- 0x04a6, 0x04a6,
- 0x04a8, 0x04a8,
- 0x04aa, 0x04aa,
- 0x04ac, 0x04ac,
- 0x04ae, 0x04ae,
- 0x04b0, 0x04b0,
- 0x04b2, 0x04b2,
- 0x04b4, 0x04b4,
- 0x04b6, 0x04b6,
- 0x04b8, 0x04b8,
- 0x04ba, 0x04ba,
- 0x04bc, 0x04bc,
- 0x04be, 0x04be,
- 0x04c0, 0x04c1,
- 0x04c3, 0x04c3,
- 0x04c5, 0x04c5,
- 0x04c7, 0x04c7,
- 0x04c9, 0x04c9,
- 0x04cb, 0x04cb,
- 0x04cd, 0x04cd,
- 0x04d0, 0x04d0,
- 0x04d2, 0x04d2,
- 0x04d4, 0x04d4,
- 0x04d6, 0x04d6,
- 0x04d8, 0x04d8,
- 0x04da, 0x04da,
- 0x04dc, 0x04dc,
- 0x04de, 0x04de,
- 0x04e0, 0x04e0,
- 0x04e2, 0x04e2,
- 0x04e4, 0x04e4,
- 0x04e6, 0x04e6,
- 0x04e8, 0x04e8,
- 0x04ea, 0x04ea,
- 0x04ec, 0x04ec,
- 0x04ee, 0x04ee,
- 0x04f0, 0x04f0,
- 0x04f2, 0x04f2,
- 0x04f4, 0x04f4,
- 0x04f8, 0x04f8,
- 0x0500, 0x0500,
- 0x0502, 0x0502,
- 0x0504, 0x0504,
- 0x0506, 0x0506,
- 0x0508, 0x0508,
- 0x050a, 0x050a,
- 0x050c, 0x050c,
- 0x050e, 0x050e,
- 0x0531, 0x0556,
- 0x10a0, 0x10c5,
- 0x1e00, 0x1e00,
- 0x1e02, 0x1e02,
- 0x1e04, 0x1e04,
- 0x1e06, 0x1e06,
- 0x1e08, 0x1e08,
- 0x1e0a, 0x1e0a,
- 0x1e0c, 0x1e0c,
- 0x1e0e, 0x1e0e,
- 0x1e10, 0x1e10,
- 0x1e12, 0x1e12,
- 0x1e14, 0x1e14,
- 0x1e16, 0x1e16,
- 0x1e18, 0x1e18,
- 0x1e1a, 0x1e1a,
- 0x1e1c, 0x1e1c,
- 0x1e1e, 0x1e1e,
- 0x1e20, 0x1e20,
- 0x1e22, 0x1e22,
- 0x1e24, 0x1e24,
- 0x1e26, 0x1e26,
- 0x1e28, 0x1e28,
- 0x1e2a, 0x1e2a,
- 0x1e2c, 0x1e2c,
- 0x1e2e, 0x1e2e,
- 0x1e30, 0x1e30,
- 0x1e32, 0x1e32,
- 0x1e34, 0x1e34,
- 0x1e36, 0x1e36,
- 0x1e38, 0x1e38,
- 0x1e3a, 0x1e3a,
- 0x1e3c, 0x1e3c,
- 0x1e3e, 0x1e3e,
- 0x1e40, 0x1e40,
- 0x1e42, 0x1e42,
- 0x1e44, 0x1e44,
- 0x1e46, 0x1e46,
- 0x1e48, 0x1e48,
- 0x1e4a, 0x1e4a,
- 0x1e4c, 0x1e4c,
- 0x1e4e, 0x1e4e,
- 0x1e50, 0x1e50,
- 0x1e52, 0x1e52,
- 0x1e54, 0x1e54,
- 0x1e56, 0x1e56,
- 0x1e58, 0x1e58,
- 0x1e5a, 0x1e5a,
- 0x1e5c, 0x1e5c,
- 0x1e5e, 0x1e5e,
- 0x1e60, 0x1e60,
- 0x1e62, 0x1e62,
- 0x1e64, 0x1e64,
- 0x1e66, 0x1e66,
- 0x1e68, 0x1e68,
- 0x1e6a, 0x1e6a,
- 0x1e6c, 0x1e6c,
- 0x1e6e, 0x1e6e,
- 0x1e70, 0x1e70,
- 0x1e72, 0x1e72,
- 0x1e74, 0x1e74,
- 0x1e76, 0x1e76,
- 0x1e78, 0x1e78,
- 0x1e7a, 0x1e7a,
- 0x1e7c, 0x1e7c,
- 0x1e7e, 0x1e7e,
- 0x1e80, 0x1e80,
- 0x1e82, 0x1e82,
- 0x1e84, 0x1e84,
- 0x1e86, 0x1e86,
- 0x1e88, 0x1e88,
- 0x1e8a, 0x1e8a,
- 0x1e8c, 0x1e8c,
- 0x1e8e, 0x1e8e,
- 0x1e90, 0x1e90,
- 0x1e92, 0x1e92,
- 0x1e94, 0x1e94,
- 0x1ea0, 0x1ea0,
- 0x1ea2, 0x1ea2,
- 0x1ea4, 0x1ea4,
- 0x1ea6, 0x1ea6,
- 0x1ea8, 0x1ea8,
- 0x1eaa, 0x1eaa,
- 0x1eac, 0x1eac,
- 0x1eae, 0x1eae,
- 0x1eb0, 0x1eb0,
- 0x1eb2, 0x1eb2,
- 0x1eb4, 0x1eb4,
- 0x1eb6, 0x1eb6,
- 0x1eb8, 0x1eb8,
- 0x1eba, 0x1eba,
- 0x1ebc, 0x1ebc,
- 0x1ebe, 0x1ebe,
- 0x1ec0, 0x1ec0,
- 0x1ec2, 0x1ec2,
- 0x1ec4, 0x1ec4,
- 0x1ec6, 0x1ec6,
- 0x1ec8, 0x1ec8,
- 0x1eca, 0x1eca,
- 0x1ecc, 0x1ecc,
- 0x1ece, 0x1ece,
- 0x1ed0, 0x1ed0,
- 0x1ed2, 0x1ed2,
- 0x1ed4, 0x1ed4,
- 0x1ed6, 0x1ed6,
- 0x1ed8, 0x1ed8,
- 0x1eda, 0x1eda,
- 0x1edc, 0x1edc,
- 0x1ede, 0x1ede,
- 0x1ee0, 0x1ee0,
- 0x1ee2, 0x1ee2,
- 0x1ee4, 0x1ee4,
- 0x1ee6, 0x1ee6,
- 0x1ee8, 0x1ee8,
- 0x1eea, 0x1eea,
- 0x1eec, 0x1eec,
- 0x1eee, 0x1eee,
- 0x1ef0, 0x1ef0,
- 0x1ef2, 0x1ef2,
- 0x1ef4, 0x1ef4,
- 0x1ef6, 0x1ef6,
- 0x1ef8, 0x1ef8,
- 0x1f08, 0x1f0f,
- 0x1f18, 0x1f1d,
- 0x1f28, 0x1f2f,
- 0x1f38, 0x1f3f,
- 0x1f48, 0x1f4d,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f5f,
- 0x1f68, 0x1f6f,
- 0x1fb8, 0x1fbb,
- 0x1fc8, 0x1fcb,
- 0x1fd8, 0x1fdb,
- 0x1fe8, 0x1fec,
- 0x1ff8, 0x1ffb,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210b, 0x210d,
- 0x2110, 0x2112,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x2130, 0x2131,
- 0x2133, 0x2133,
- 0x213e, 0x213f,
- 0x2145, 0x2145,
- 0xff21, 0xff3a,
- 0x10400, 0x10427,
- 0x1d400, 0x1d419,
- 0x1d434, 0x1d44d,
- 0x1d468, 0x1d481,
- 0x1d49c, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b5,
- 0x1d4d0, 0x1d4e9,
- 0x1d504, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d538, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d56c, 0x1d585,
- 0x1d5a0, 0x1d5b9,
- 0x1d5d4, 0x1d5ed,
- 0x1d608, 0x1d621,
- 0x1d63c, 0x1d655,
- 0x1d670, 0x1d689,
- 0x1d6a8, 0x1d6c0,
- 0x1d6e2, 0x1d6fa,
- 0x1d71c, 0x1d734,
- 0x1d756, 0x1d76e,
- 0x1d790, 0x1d7a8
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBUpper */
-
-static const OnigCodePoint SBXDigit[] = {
- 3,
- 0x0030, 0x0039,
- 0x0041, 0x0046,
- 0x0061, 0x0066
-};
-
-static const OnigCodePoint SBASCII[] = {
- 1,
- 0x0000, 0x007f
-};
-
-static const OnigCodePoint SBWord[] = {
- 4,
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x005f, 0x005f,
- 0x0061, 0x007a
-};
-
-static const OnigCodePoint MBWord[] = {
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- 432,
-#else
- 8,
-#endif
- 0x00aa, 0x00aa,
- 0x00b2, 0x00b3,
- 0x00b5, 0x00b5,
- 0x00b9, 0x00ba,
- 0x00bc, 0x00be,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
-#ifndef USE_UNICODE_FULL_RANGE_CTYPE
- 0x00f8, 0x7fffffff
-#else /* not USE_UNICODE_FULL_RANGE_CTYPE */
- 0x00f8, 0x0236,
- 0x0250, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ee, 0x02ee,
- 0x0300, 0x0357,
- 0x035d, 0x036f,
- 0x037a, 0x037a,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03f5,
- 0x03f7, 0x03fb,
- 0x0400, 0x0481,
- 0x0483, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0561, 0x0587,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f2,
- 0x0610, 0x0615,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x0660, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06de, 0x06e8,
- 0x06ea, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0963,
- 0x0966, 0x096f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x09f4, 0x09f9,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f20, 0x0f33,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1049,
- 0x1050, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1369, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x166c,
- 0x166f, 0x1676,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17b3,
- 0x17b6, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x180b, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x203f, 0x2040,
- 0x2054, 0x2054,
- 0x2070, 0x2071,
- 0x2074, 0x2079,
- 0x207f, 0x2089,
- 0x20d0, 0x20ea,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2131,
- 0x2133, 0x2139,
- 0x213d, 0x213f,
- 0x2145, 0x2149,
- 0x2153, 0x2183,
- 0x2460, 0x249b,
- 0x24ea, 0x24ff,
- 0x2776, 0x2793,
- 0x3005, 0x3007,
- 0x3021, 0x302f,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309a,
- 0x309d, 0x309f,
- 0x30a1, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3192, 0x3195,
- 0x31a0, 0x31b7,
- 0x31f0, 0x31ff,
- 0x3220, 0x3229,
- 0x3251, 0x325f,
- 0x3280, 0x3289,
- 0x32b1, 0x32bf,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xac00, 0xd7a3,
- 0xf900, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe33, 0xfe34,
- 0xfe4d, 0xfe4f,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff3f, 0xff3f,
- 0xff41, 0xff5a,
- 0xff65, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10107, 0x10133,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x20000, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-}; /* end of MBWord */
static int
-utf8_get_ctype_code_range(int ctype,
- const OnigCodePoint* sbr[], const OnigCodePoint* mbr[])
+get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out,
+ const OnigCodePoint* ranges[])
{
-#define CR_SET(sbl,mbl) do { \
- *sbr = sbl; \
- *mbr = mbl; \
-} while (0)
-
-#define CR_SB_SET(sbl) do { \
- *sbr = sbl; \
- *mbr = EmptyRange; \
-} while (0)
-
- switch (ctype) {
- case ONIGENC_CTYPE_ALPHA:
- CR_SET(SBAlpha, MBAlpha);
- break;
- case ONIGENC_CTYPE_BLANK:
- CR_SET(SBBlank, MBBlank);
- break;
- case ONIGENC_CTYPE_CNTRL:
- CR_SET(SBCntrl, MBCntrl);
- break;
- case ONIGENC_CTYPE_DIGIT:
- CR_SET(SBDigit, MBDigit);
- break;
- case ONIGENC_CTYPE_GRAPH:
- CR_SET(SBGraph, MBGraph);
- break;
- case ONIGENC_CTYPE_LOWER:
- CR_SET(SBLower, MBLower);
- break;
- case ONIGENC_CTYPE_PRINT:
- CR_SET(SBPrint, MBPrint);
- break;
- case ONIGENC_CTYPE_PUNCT:
- CR_SET(SBPunct, MBPunct);
- break;
- case ONIGENC_CTYPE_SPACE:
- CR_SET(SBSpace, MBSpace);
- break;
- case ONIGENC_CTYPE_UPPER:
- CR_SET(SBUpper, MBUpper);
- break;
- case ONIGENC_CTYPE_XDIGIT:
- CR_SB_SET(SBXDigit);
- break;
- case ONIGENC_CTYPE_WORD:
- CR_SET(SBWord, MBWord);
- break;
- case ONIGENC_CTYPE_ASCII:
- CR_SB_SET(SBASCII);
- break;
- case ONIGENC_CTYPE_ALNUM:
- CR_SET(SBAlnum, MBAlnum);
- break;
-
- default:
- return ONIGENCERR_TYPE_BUG;
- break;
- }
-
- return 0;
+ *sb_out = 0x80;
+ return onigenc_unicode_ctype_code_range(ctype, ranges);
}
-static int
-utf8_is_code_ctype(OnigCodePoint code, unsigned int ctype)
-{
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
- const OnigCodePoint *range;
-#endif
-
- if (code < 256) {
- return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype);
- }
-
-#ifdef USE_UNICODE_FULL_RANGE_CTYPE
-
- switch (ctype) {
- case ONIGENC_CTYPE_ALPHA:
- range = MBAlpha;
- break;
- case ONIGENC_CTYPE_BLANK:
- range = MBBlank;
- break;
- case ONIGENC_CTYPE_CNTRL:
- range = MBCntrl;
- break;
- case ONIGENC_CTYPE_DIGIT:
- range = MBDigit;
- break;
- case ONIGENC_CTYPE_GRAPH:
- range = MBGraph;
- break;
- case ONIGENC_CTYPE_LOWER:
- range = MBLower;
- break;
- case ONIGENC_CTYPE_PRINT:
- range = MBPrint;
- break;
- case ONIGENC_CTYPE_PUNCT:
- range = MBPunct;
- break;
- case ONIGENC_CTYPE_SPACE:
- range = MBSpace;
- break;
- case ONIGENC_CTYPE_UPPER:
- range = MBUpper;
- break;
- case ONIGENC_CTYPE_XDIGIT:
- return FALSE;
- break;
- case ONIGENC_CTYPE_WORD:
- range = MBWord;
- break;
- case ONIGENC_CTYPE_ASCII:
- return FALSE;
- break;
- case ONIGENC_CTYPE_ALNUM:
- range = MBAlnum;
- break;
- case ONIGENC_CTYPE_NEWLINE:
- return FALSE;
- break;
-
- default:
- return ONIGENCERR_TYPE_BUG;
- break;
- }
-
- return onig_is_in_code_range((UChar* )range, code);
-
-#else
-
- if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
-#ifdef USE_INVALID_CODE_SCHEME
- if (code <= VALID_CODE_LIMIT)
-#endif
- return TRUE;
- }
-#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
-
- return FALSE;
-}
static UChar*
-utf8_left_adjust_char_head(const UChar* start, const UChar* s)
+left_adjust_char_head(const UChar* start, const UChar* s)
{
const UChar *p;
@@ -3700,31 +277,29 @@ utf8_left_adjust_char_head(const UChar* start, const UChar* s)
return (UChar* )p;
}
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF8,
+ flag, p, end, items);
+}
+
OnigEncodingType OnigEncodingUTF8 = {
- utf8_mbc_enc_len,
+ mbc_enc_len,
"UTF-8", /* name */
6, /* max byte length */
1, /* min byte length */
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE ),
- {
- (OnigCodePoint )'\\' /* esc */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
- , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
- },
- utf8_is_mbc_newline,
- utf8_mbc_to_code,
- utf8_code_to_mbclen,
- utf8_code_to_mbc,
- utf8_mbc_to_normalize,
- utf8_is_mbc_ambiguous,
- onigenc_iso_8859_1_get_all_pair_ambig_codes,
- onigenc_ess_tsett_get_all_comp_ambig_codes,
- utf8_is_code_ctype,
- utf8_get_ctype_code_range,
- utf8_left_adjust_char_head,
+ is_mbc_newline,
+ mbc_to_code,
+ code_to_mbclen,
+ code_to_mbc,
+ mbc_case_fold,
+ onigenc_unicode_apply_all_case_fold,
+ get_case_fold_codes_by_str,
+ onigenc_unicode_property_name_to_ctype,
+ onigenc_unicode_is_code_ctype,
+ get_ctype_code_range,
+ left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
diff --git a/ext/mbstring/oniguruma/index.html b/ext/mbstring/oniguruma/index.html
index d55f1cc94..af3426ce3 100755
--- a/ext/mbstring/oniguruma/index.html
+++ b/ext/mbstring/oniguruma/index.html
@@ -8,7 +8,7 @@
<h1>Oniguruma</h1> (<a href="index_ja.html">Japanese</a>)
<p>
-(c) K.Kosako, updated at: 2007/08/16
+(c) K.Kosako, updated at: 2010/01/09
</p>
<dl>
@@ -16,8 +16,8 @@
<dt><b>What's new</b>
</font>
<ul>
+<li>2010/01/09: Version 5.9.2 released.</li>
<li>2007/08/16: Version 4.7.1 released.</li>
-<li>2007/07/14: Version 5.9.0 released.</li>
<li>2007/06/20: Version 2.5.9 released.</li>
<li>2007/06/20: Maintainer of 2.x was changed.</li>
</ul>
@@ -62,9 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
<dt><b>Download:</b>
<ul>
-<li> <a href="archive/onig-5.9.0.tar.gz">Latest release version 5.9.0</a> (2007/07/14) <a href="HISTORY_5X.txt">Change Log</a>
-<li> <a href="archive/onig-5.8.0.tar.gz">5.8.0</a> (2007/06/04)
-<li> <a href="archive/onig-5.7.0.tar.gz">5.7.0</a> (2007/04/27)
+<li> <a href="archive/onig-5.9.2.tar.gz">Latest release version 5.9.2</a> (2010/01/09) <a href="HISTORY_5X.txt">Change Log</a>
+<li> <a href="archive/onig-5.9.1.tar.gz">5.9.1</a> (2007/12/22)
<li> <a href="archive/onig-4.7.1.tar.gz">Latest release version 4.7.1</a> (2007/08/16) <a href="HISTORY_4X.txt">Change Log</a>
<li> <a href="archive/onig-4.7.0.tar.gz">4.7.0</a> (2007/06/18)
<li> <a href="archive/onigd2_5_9.tar.gz">Latest release version 2.5.9</a> (2007/06/20) <a href="HISTORY_2X.txt">Change Log</a>
@@ -79,7 +78,7 @@ About 2.x, please contact him.<br>
* 2.x supports Ruby1.6/1.8.<br>
<br>
-<dt><b>Documents:</b> (version 5.9.0)
+<dt><b>Documents:</b> (version 5.9.2)
<ul>
<li> <a href="doc/RE.txt">Regular Expressions</a>
<a href="doc/RE.ja.txt">(Japanese: EUC-JP)</a>
@@ -133,6 +132,7 @@ About 2.x, please contact him.<br>
<li> <a href="http://www.php.gr.jp/">Japan PHP User Group</a> PHP 5.0 mb_ereg (Japanese page)
<li> <a href="http://yatsu.info/wiki/Pufui/">Pufui (Mac OS X)</a> (Japanese page)
<li> <a href="http://ultrapop.jp/?q2ch">q2ch</a> (Japanese page)
+<li> <a href="http://search.cpan.org/~andya/re-engine-Oniguruma">re-engine-Oniguruma</a>
<li> <a href="http://harumune.s56.xrea.com/assari/index.php?RSSTyping">RSSTyping</a> (Japanese page)
<li> <a href="http://tobysoft.net/wiki/index.php?Ruby%2Fruby-win32-oniguruma">ruby-win32-oniguruma</a> (Japanese page)
<li> <a href="http://quux.s74.xrea.com/">SevenFour (Mac OS X)</a> (Japanese page)
@@ -142,6 +142,7 @@ About 2.x, please contact him.<br>
<li> <a href="http://www.cyanworks.net/mac.html">TunesTEXT (Mac OS X)</a>
<li> <a href="http://sourceforge.jp/projects/frogger/">XML parser</a>
<li> <a href="http://www.yokkasoft.net/">YokkaSoft (Win32)</a> (Japanese page)
+<li> <a href="http://www.hi-ho.ne.jp/kuze/tool.htm">Zed (Win32)</a> (Japanese page)
</ul>
<br>
@@ -174,14 +175,13 @@ and I'm thankful to Akinori MUSHA.
<li> <a href="http://re2c.org/">re2c</a>
<li> <a href="http://tiny-rex.sourceforge.net/">T-Rex</a>
<li> <a href="http://laurikari.net/tre/">TRE</a>
+<li> <a href="http://svn.codehaus.org/jruby/joni/">Joni (Java)</a>
<li> <a href="http://jregex.sourceforge.net/">JRegex (Java)</a>
<li> <a href="http://www.cacas.org/java/gnu/regexp/">gnu.regexp for Java</a>
<li> <a href="http://jakarta.apache.org/regexp/index.html">Jakarta Project Regexp</a>
<li> <a href="http://jakarta.apache.org/oro/">Jakarta Project ORO</a>
+<li> <a href="http://sourceforge.jp/projects/onig4j/">Oniguruma for Java</a>
</ul>
</dl>
-
-<hr>
-<a href="../">Back to Home</a>
</body>
</html>
diff --git a/ext/mbstring/oniguruma/index_ja.html b/ext/mbstring/oniguruma/index_ja.html
new file mode 100644
index 000000000..e03b045b9
--- /dev/null
+++ b/ext/mbstring/oniguruma/index_ja.html
@@ -0,0 +1,190 @@
+<html>
+<head>
+ <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8">
+ <title>鬼車</title>
+</head>
+<body BGCOLOR="#ffffff" VLINK="#808040" TEXT="#696969">
+
+<h1>鬼車</h1>
+
+<p>
+(c) K.Kosako, 最終更新: 2010/01/09
+</p>
+
+<dl>
+<font color="orange">
+<dt><b>更新情報</b>
+</font>
+<ul>
+<li>2010/01/09: Version 5.9.2 リリース</li>
+<li>2007/08/16: Version 4.7.1 リリース</li>
+<li>2007/06/20: Version 2.5.9 リリース</li>
+<li>2007/06/20: 2.xの保守担当者を変更</li>
+</ul>
+</dl>
+<hr>
+
+<p>
+鬼車は正規表現ライブラリである。<br>
+このライブラリの特徴は、それぞれの正規表現オブジェクトごとに異なる文字エンコーディングを
+指定できること。<br>
+(API: GNU regex, POSIX and Oniguruma native)
+</p>
+
+<dl>
+<dt><b>対応している文字エンコーディング:</b><br>
+ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,<br>
+EUC-JP, EUC-TW, EUC-KR, EUC-CN,<br>
+Shift_JIS, Big5, GB18030, KOI8-R, CP1251,<br>
+ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,<br>
+ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,<br>
+ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
+<font color="orange">
+(GB18030は、KUBO Takehiro氏提供)<br>
+(CP1251は、Byte氏提供)
+</font>
+</p>
+</dl>
+
+<hr>
+
+<dt><b>ライセンス:</b>BSDライセンス
+
+<dl>
+<dt><b>プラットフォーム:</b>
+<ul>
+<li> Unix (Mac OS Xを含む)
+<li> Cygwin
+<li> Win32
+</ul>
+
+<br>
+
+<dt><b>ダウンロード:</b>
+<ul>
+<li> <a href="archive/onig-5.9.2.tar.gz">5.9.2 最新版</a> (2010/01/09) <a href="HISTORY_5X.txt">更新履歴</a>
+<li> <a href="archive/onig-5.9.1.tar.gz">5.9.1</a> (2007/12/22)
+<li> <a href="archive/onig-4.7.1.tar.gz">4.7.1 最新版</a> (2007/08/16) <a href="HISTORY_4X.txt">更新履歴</a>
+<li> <a href="archive/onig-4.7.0.tar.gz">4.7.0</a> (2007/06/18)
+<li> <a href="archive/onigd2_5_9.tar.gz">2.5.9 最新版</a> (2007/06/20) <a href="HISTORY_2X.txt">更新履歴</a>
+</ul>
+
+<br>
+<font color="red">
+2.xの保守担当は、Hannes Wyss &lt;hwyss AT ywesee.com&gt;に交替しました。<br>
+2.xについては、彼に連絡してください。<br>
+</font>
+* 5.xはUnicode Property/Scriptを提供<br>
+* 2.xはRuby1.6/1.8組込みライブラリとして動作する。 (2006年末で保守を終了)<br>
+
+<br>
+<dt><b>ドキュメント:</b> (version 5.9.2)
+<ul>
+ <li> <a href="doc/RE.txt">正規表現</a>
+ <a href="doc/RE.ja.txt">(日本語: EUC-JP)</a>
+ <li> <a href="doc/API.txt">鬼車API</a>
+ <a href="doc/API.ja.txt">(日本語: EUC-JP)</a>
+</ul>
+
+<br>
+<dt><b>サンプルプログラム:</b>
+<ul>
+ <li><a href="sample/simple.c">最小使用例</a>
+ <li><a href="sample/sql.c">可変文法と可変メタ文字機能使用例(SQL-like pattern match)</a>
+</ul>
+
+<br>
+<dt><b>サイト:</b>
+<ul>
+<li> <a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/">FreeBSD ports</a>
+<li> <a href="http://www.softantenna.com/lib/1953/index.html">SoftAntenna &gt; Lib &gt; Oniguruma</a> (日本語)
+</ul>
+
+<br>
+<dt><b>リンク:</b>
+<ul>
+<li> <a href="http://homepage3.nifty.com/k-takata/mysoft/bregonig.html">bregonig.dll (Win32)</a> (日本語)
+<li> <a href="http://www.halbiz.com/osaru/cnregex.html">cnRegex 4D Plugin (Mac OS X)</a> (日本語)
+<li> <a href="http://kmaebashi.com/">crowbar</a> (日本語)
+<li> <a href="http://oniguruma5.darwinports.com">Darwin Ports (Mac OS X)</a>
+<li> <a href="http://homepage2.nifty.com/Km/onig.htm">Delphi interface (Win32)</a> (日本語)
+<li> <a href="http://pyxis-project.net/ensemble/">Ensemble (Mac OS X)</a> (日本語)
+<li> <a href="http://www.srcw.net/FaEdit/">FaEdit (Win32)</a> (日本語)
+<li> <a href="http://www.tom.sfc.keio.ac.jp/~sakai/d/?date=20050209">GHC patch</a> Masahiro Sakai (Japanese Blog)
+<li> <a href="http://www.gyazsquare.com/gyazmail/index.php">GyazMail (Mac OS X)</a>
+<li> <a href="http://www5d.biglobe.ne.jp/~f-taste/knt3/jcref3.html">J-cref v3</a> (日本語)
+<li> <a href="http://www.artman21.net/">Jedit X (Mac OS X)</a>
+<li> <a href="http://www.chitora.jp/lhaz.html">Lhaz (Win32)</a> (日本語)
+<li> <a href="http://limechat.net/">LimeChat</a> (日本語)
+<li> <a href="http://medb.enhiro.com/">meDB</a> (日本語)
+<li> <a href="http://monaos.org/">Mona OS</a>
+<li> <a href="http://mongoose.jp/">mongoose</a> (日本語)
+<li> <a href="http://www.irori.org/tool/mregexp.html">mregexp</a> (日本語)
+<li> <a href="http://ochusha.sourceforge.jp/">おちゅ〜しゃ</a> (日本語)
+<li> <a href="http://www8.ocn.ne.jp/%7esonoisa/OgreKit/index.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (日本語)
+<li> <a href="http://www.kanetaka.net/4dapi/wiki4d.dll/4dcgi/wiki.cgi?plugins-oniguruma">OnigRegexp</a> (日本語)
+<li> <a href="http://rubyforge.org/projects/oniguruma">Oniguruma for Ruby</a>
+<li> <a href="http://openspace.timedia.co.jp/~yasuyuki/wiliki/wiliki.cgi?Oniguruma-mysqld&l=jp">Oniguruma-mysqld</a>
+<li> <a href="http://www.void.in/wiki/OnigPP">OnigPP</a> (日本語)
+<li> <a href="http://www.kt.rim.or.jp/~kbk/sed/index.html">Onigsed (Win32)</a> (日本語)
+<li> <a href="http://glozer.net/code.html#oregexp">oregexp</a> Erlang binding
+<li> <a href="http://www.kt.rim.or.jp/~kbk/yagrep/index.html">yagrep (Win32)</a> (日本語)
+<li> <a href="http://www.php.gr.jp/">日本PHPユーザ会</a> PHP 5.0 mb_ereg (日本語)
+<li> <a href="http://yatsu.info/wiki/Pufui/">Pufui (Mac OS X)</a> (日本語)
+<li> <a href="http://ultrapop.jp/?q2ch">q2ch</a> (日本語)
+<li> <a href="http://search.cpan.org/~andya/re-engine-Oniguruma">re-engine-Oniguruma</a>
+<li> <a href="http://harumune.s56.xrea.com/assari/index.php?RSSTyping">RSSTyping</a> (日本語)
+<li> <a href="http://tobysoft.net/wiki/index.php?Ruby%2Fruby-win32-oniguruma">ruby-win32-oniguruma</a> (日本語)
+<li> <a href="http://quux.s74.xrea.com/">SevenFour (Mac OS X)</a> (日本語)
+<li> <a href="http://storklab.cyber-ninja.jp/">Stork Lab. Products (Mac OS X)</a> (日本語)
+<li> <a href="http://sourceforge.jp/projects/ttssh2/">TeraTerm (Win32)</a>
+<li> <a href="http://www8.ocn.ne.jp/~sonoisa/TiddlyWikiPod/">TiddlyWikiPod (Mac OS X)</a>
+<li> <a href="http://www.cyanworks.net/mac.html">TunesTEXT (Mac OS X)</a>
+<li> <a href="http://sourceforge.jp/projects/frogger/">XML parser</a>
+<li> <a href="http://www.yokkasoft.net/">YokkaSoft (Win32)</a> (日本語)
+<li> <a href="http://www.hi-ho.ne.jp/kuze/tool.htm">Zed (Win32)</a> (日本語)
+</ul>
+
+<br>
+<dt><b>参考資料:</b>
+<ul>
+<li> <a href="http://www.ruby-lang.org/ja/man/index.cgi?cmd=view;name=%C0%B5%B5%AC%C9%BD%B8%BD">Rubyリファレンスマニュアル</a> (日本語)
+<li> <a href="http://www.perl.com/doc/manual/html/pod/perlre.html">Perl regular expressions</a>
+<li> <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern (J2SE 1.4.2)</a>
+<li> <a href="http://www.opengroup.org/onlinepubs/007908799/xbd/re.html">The Open Group</a>
+<li> <a href="http://regex.info/">Mastering Regular Expressions</a>
+<li> <a href="http://www.unicode.org/">Unicode Home Page</a>
+<li> <a href="http://www.kt.rim.or.jp/~kbk/regex/regex.html">正規表現メモ</a> (日本語)
+<li> <a href="http://www.din.or.jp/~ohzaki/regex.htm">Perl正規表現雑技</a> (日本語)
+</ul>
+
+<br>
+</dl>
+<p>
+and I'm thankful to Akinori MUSHA.
+</p>
+
+<hr>
+<dl>
+<dt><b>他のライブラリ:</b>
+<ul>
+<li> <a href="http://www.boost.org/libs/regex/doc/">Boost.Regex</a>
+<li> <a href="http://arglist.com/regex/">A copy of Henry Spencer's</a>
+<li> <a href="http://directory.fsf.org/regex.html">GNU regex</a>
+<li> <a href="http://www.pcre.org/">PCRE</a>
+<li> <a href="http://re2c.org/">re2c</a>
+<li> <a href="http://tiny-rex.sourceforge.net/">T-Rex</a>
+<li> <a href="http://laurikari.net/tre/">TRE</a>
+<li> <a href="http://svn.codehaus.org/jruby/joni/">Joni (Java)</a>
+<li> <a href="http://jregex.sourceforge.net/">JRegex (Java)</a>
+<li> <a href="http://www.cacas.org/java/gnu/regexp/">gnu.regexp for Java</a>
+<li> <a href="http://jakarta.apache.org/regexp/index.html">Jakarta Project Regexp</a>
+<li> <a href="http://jakarta.apache.org/oro/">Jakarta Project ORO</a>
+<li> <a href="http://sourceforge.jp/projects/onig4j/">Oniguruma for Java</a>
+</ul>
+</dl>
+
+<hr>
+<a href="../">ホームにもどる</a>
+</body>
+</html>
diff --git a/ext/mbstring/oniguruma/onigposix.h b/ext/mbstring/oniguruma/onigposix.h
index cfeb88a29..f1cb35fbd 100644
--- a/ext/mbstring/oniguruma/onigposix.h
+++ b/ext/mbstring/oniguruma/onigposix.h
@@ -97,7 +97,7 @@ typedef struct {
#ifndef ONIG_EXTERN
#if defined(_WIN32) && !defined(__GNUC__)
-#if defined(EXPORT) || defined(RUBY_EXPORT)
+#if defined(EXPORT)
#define ONIG_EXTERN extern __declspec(dllexport)
#else
#define ONIG_EXTERN extern __declspec(dllimport)
diff --git a/ext/mbstring/oniguruma/oniguruma.h b/ext/mbstring/oniguruma/oniguruma.h
index 5196a3d58..3b557639f 100644
--- a/ext/mbstring/oniguruma/oniguruma.h
+++ b/ext/mbstring/oniguruma/oniguruma.h
@@ -4,7 +4,7 @@
oniguruma.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,16 +29,14 @@
* SUCH DAMAGE.
*/
-#include "../php_onig_compat.h"
-
#ifdef __cplusplus
extern "C" {
#endif
#define ONIGURUMA
-#define ONIGURUMA_VERSION_MAJOR 4
-#define ONIGURUMA_VERSION_MINOR 7
-#define ONIGURUMA_VERSION_TEENY 1
+#define ONIGURUMA_VERSION_MAJOR 5
+#define ONIGURUMA_VERSION_MINOR 9
+#define ONIGURUMA_VERSION_TEENY 2
#ifdef __cplusplus
# ifndef HAVE_PROTOTYPES
@@ -56,6 +54,12 @@ extern "C" {
# endif
#endif
+#ifdef HAVE_STDARG_H
+# ifndef HAVE_STDARG_PROTOTYPES
+# define HAVE_STDARG_PROTOTYPES 1
+# endif
+#endif
+
#ifndef P_
#if defined(__STDC__) || defined(_WIN32)
# define P_(args) args
@@ -94,28 +98,27 @@ extern "C" {
typedef unsigned char OnigUChar;
typedef unsigned long OnigCodePoint;
+typedef unsigned int OnigCtype;
typedef unsigned int OnigDistance;
#define ONIG_INFINITE_DISTANCE ~((OnigDistance )0)
-/* ambiguous match flag */
-typedef unsigned int OnigAmbigType;
+typedef unsigned int OnigCaseFoldType; /* case fold flag */
-ONIG_EXTERN OnigAmbigType OnigDefaultAmbigFlag;
+ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag;
-#define ONIGENC_AMBIGUOUS_MATCH_NONE 0
-#define ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE (1<<0)
-#define ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE (1<<1)
+/* #define ONIGENC_CASE_FOLD_HIRAGANA_KATAKANA (1<<1) */
+/* #define ONIGENC_CASE_FOLD_KATAKANA_WIDTH (1<<2) */
+#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20)
+#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30)
-#define ONIGENC_AMBIGUOUS_MATCH_LIMIT (1<<1)
+#define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
+#define ONIGENC_CASE_FOLD_DEFAULT OnigDefaultCaseFoldFlag
-#define ONIGENC_AMBIGUOUS_MATCH_FULL \
- ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE | ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE )
-#define ONIGENC_AMBIGUOUS_MATCH_DEFAULT OnigDefaultAmbigFlag
-
-#define ONIGENC_MAX_COMP_AMBIG_CODE_LEN 3
-#define ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM 4
+#define ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN 3
+#define ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM 13
+/* 13 => Unicode:0x1ffc */
/* code range */
#define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0])
@@ -123,20 +126,10 @@ ONIG_EXTERN OnigAmbigType OnigDefaultAmbigFlag;
#define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2]
typedef struct {
- int len;
- OnigCodePoint code[ONIGENC_MAX_COMP_AMBIG_CODE_LEN];
-} OnigCompAmbigCodeItem;
-
-typedef struct {
- int n;
- OnigCodePoint code;
- OnigCompAmbigCodeItem items[ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM];
-} OnigCompAmbigCodes;
-
-typedef struct {
- OnigCodePoint from;
- OnigCodePoint to;
-} OnigPairAmbigCodes;
+ int byte_len; /* argument(original) character(s) byte length */
+ int code_len; /* number of code */
+ OnigCodePoint code[ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN];
+} OnigCaseFoldCodeItem;
typedef struct {
OnigCodePoint esc;
@@ -146,32 +139,24 @@ typedef struct {
OnigCodePoint one_or_more_time;
OnigCodePoint anychar_anytime;
} OnigMetaCharTableType;
+
+typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg);
-
-#if defined(RUBY_PLATFORM) && defined(M17N_H)
-
-#define ONIG_RUBY_M17N
-typedef m17n_encoding* OnigEncoding;
-
-#else
-
-typedef struct {
+typedef struct OnigEncodingTypeST {
int (*mbc_enc_len)(const OnigUChar* p);
const char* name;
int max_enc_len;
int min_enc_len;
- OnigAmbigType support_ambig_flag;
- OnigMetaCharTableType meta_char_table;
int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end);
OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end);
int (*code_to_mbclen)(OnigCodePoint code);
int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf);
- int (*mbc_to_normalize)(OnigAmbigType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to);
- int (*is_mbc_ambiguous)(OnigAmbigType flag, const OnigUChar** pp, const OnigUChar* end);
- int (*get_all_pair_ambig_codes)(OnigAmbigType flag, const OnigPairAmbigCodes** acs);
- int (*get_all_comp_ambig_codes)(OnigAmbigType flag, const OnigCompAmbigCodes** acs);
- int (*is_code_ctype)(OnigCodePoint code, unsigned int ctype);
- int (*get_ctype_code_range)(int ctype, const OnigCodePoint* sb_range[], const OnigCodePoint* mb_range[]);
+ int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to);
+ int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg);
+ int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[]);
+ int (*property_name_to_ctype)(struct OnigEncodingTypeST* enc, OnigUChar* p, OnigUChar* end);
+ int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype);
+ int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[]);
OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p);
int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end);
} OnigEncodingType;
@@ -206,6 +191,7 @@ ONIG_EXTERN OnigEncodingType OnigEncodingEUC_CN;
ONIG_EXTERN OnigEncodingType OnigEncodingSJIS;
ONIG_EXTERN OnigEncodingType OnigEncodingKOI8;
ONIG_EXTERN OnigEncodingType OnigEncodingKOI8_R;
+ONIG_EXTERN OnigEncodingType OnigEncodingCP1251;
ONIG_EXTERN OnigEncodingType OnigEncodingBIG5;
ONIG_EXTERN OnigEncodingType OnigEncodingGB18030;
@@ -237,136 +223,60 @@ ONIG_EXTERN OnigEncodingType OnigEncodingGB18030;
#define ONIG_ENCODING_SJIS (&OnigEncodingSJIS)
#define ONIG_ENCODING_KOI8 (&OnigEncodingKOI8)
#define ONIG_ENCODING_KOI8_R (&OnigEncodingKOI8_R)
+#define ONIG_ENCODING_CP1251 (&OnigEncodingCP1251)
#define ONIG_ENCODING_BIG5 (&OnigEncodingBIG5)
#define ONIG_ENCODING_GB18030 (&OnigEncodingGB18030)
-#endif /* else RUBY && M17N */
-
#define ONIG_ENCODING_UNDEF ((OnigEncoding )0)
/* work size */
-#define ONIGENC_CODE_TO_MBC_MAXLEN 7
-#define ONIGENC_MBC_NORMALIZE_MAXLEN ONIGENC_CODE_TO_MBC_MAXLEN
+#define ONIGENC_CODE_TO_MBC_MAXLEN 7
+#define ONIGENC_MBC_CASE_FOLD_MAXLEN 18
+/* 18: 6(max-byte) * 3(case-fold chars) */
/* character types */
-#define ONIGENC_CTYPE_NEWLINE (1<< 0)
-#define ONIGENC_CTYPE_ALPHA (1<< 1)
-#define ONIGENC_CTYPE_BLANK (1<< 2)
-#define ONIGENC_CTYPE_CNTRL (1<< 3)
-#define ONIGENC_CTYPE_DIGIT (1<< 4)
-#define ONIGENC_CTYPE_GRAPH (1<< 5)
-#define ONIGENC_CTYPE_LOWER (1<< 6)
-#define ONIGENC_CTYPE_PRINT (1<< 7)
-#define ONIGENC_CTYPE_PUNCT (1<< 8)
-#define ONIGENC_CTYPE_SPACE (1<< 9)
-#define ONIGENC_CTYPE_UPPER (1<<10)
-#define ONIGENC_CTYPE_XDIGIT (1<<11)
-#define ONIGENC_CTYPE_WORD (1<<12)
-#define ONIGENC_CTYPE_ASCII (1<<13)
-#define ONIGENC_CTYPE_ALNUM (ONIGENC_CTYPE_ALPHA | ONIGENC_CTYPE_DIGIT)
-
-#define enc_len(enc,p) ONIGENC_MBC_ENC_LEN(enc, p)
+#define ONIGENC_CTYPE_NEWLINE 0
+#define ONIGENC_CTYPE_ALPHA 1
+#define ONIGENC_CTYPE_BLANK 2
+#define ONIGENC_CTYPE_CNTRL 3
+#define ONIGENC_CTYPE_DIGIT 4
+#define ONIGENC_CTYPE_GRAPH 5
+#define ONIGENC_CTYPE_LOWER 6
+#define ONIGENC_CTYPE_PRINT 7
+#define ONIGENC_CTYPE_PUNCT 8
+#define ONIGENC_CTYPE_SPACE 9
+#define ONIGENC_CTYPE_UPPER 10
+#define ONIGENC_CTYPE_XDIGIT 11
+#define ONIGENC_CTYPE_WORD 12
+#define ONIGENC_CTYPE_ALNUM 13 /* alpha || digit */
+#define ONIGENC_CTYPE_ASCII 14
+#define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII
+
+
+#define onig_enc_len(enc,p,end) ONIGENC_MBC_ENC_LEN(enc,p)
#define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF)
#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1)
#define ONIGENC_IS_MBC_HEAD(enc,p) (ONIGENC_MBC_ENC_LEN(enc,p) != 1)
#define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128)
#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128)
-#define ONIGENC_IS_CODE_SB_WORD(enc,code) \
- (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
#define ONIGENC_IS_MBC_WORD(enc,s,end) \
ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
-#ifdef ONIG_RUBY_M17N
-
-#include <ctype.h> /* for isblank(), isgraph() */
-
-#define ONIGENC_MBC_TO_NORMALIZE(enc,flag,pp,end,buf) \
- onigenc_mbc_to_normalize(enc,flag,pp,end,buf)
-#define ONIGENC_IS_MBC_AMBIGUOUS(enc,flag,pp,end) \
- onigenc_is_mbc_ambiguous(enc,flag,pp,end)
-
-#define ONIGENC_SUPPORT_AMBIG_FLAG(enc) ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE
-#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \
- onigenc_is_allowed_reverse_match(enc, s, end)
-#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \
- onigenc_get_left_adjust_char_head(enc, start, s)
-#define ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc, ambig_flag, acs) 0
-#define ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, ambig_flag, acs) 0
-#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbr,mbr) \
- ONIG_NO_SUPPORT_CONFIG
-#define ONIGENC_MBC_ENC_LEN(enc,p) m17n_mbclen(enc,(int )(*p))
-#define ONIGENC_MBC_MAXLEN(enc) m17n_mbmaxlen(enc)
-#define ONIGENC_MBC_MAXLEN_DIST(enc) \
- (ONIGENC_MBC_MAXLEN(enc) > 0 ? ONIGENC_MBC_MAXLEN(enc) \
- : ONIG_INFINITE_DISTANCE)
-#define ONIGENC_MBC_MINLEN(enc) 1
-#define ONIGENC_MBC_TO_CODE(enc,p,e) m17n_codepoint((enc),(p),(e))
-#define ONIGENC_CODE_TO_MBCLEN(enc,code) m17n_codelen((enc),(code))
-#define ONIGENC_CODE_TO_MBC(enc,code,buf) onigenc_code_to_mbc(enc, code, buf)
-
-#if 0 /* !! not supported !! */
-#define ONIGENC_IS_MBC_NEWLINE(enc,p,end)
-#define ONIGENC_STEP_BACK(enc,start,s,n)
-#endif
-
-#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) \
- onigenc_is_code_ctype(enc,code,ctype)
-
-#ifdef isblank
-# define ONIGENC_IS_CODE_BLANK(enc,code) isblank((int )code)
-#else
-# define ONIGENC_IS_CODE_BLANK(enc,code) ((code) == ' ' || (code) == '\t')
-#endif
-#ifdef isgraph
-# define ONIGENC_IS_CODE_GRAPH(enc,code) isgraph((int )code)
-#else
-# define ONIGENC_IS_CODE_GRAPH(enc,code) \
- (isprint((int )code) && !isspace((int )code))
-#endif
-
-#define ONIGENC_IS_CODE_PRINT(enc,code) m17n_isprint(enc,code)
-#define ONIGENC_IS_CODE_ALNUM(enc,code) m17n_isalnum(enc,code)
-#define ONIGENC_IS_CODE_ALPHA(enc,code) m17n_isalpha(enc,code)
-#define ONIGENC_IS_CODE_LOWER(enc,code) m17n_islower(enc,code)
-#define ONIGENC_IS_CODE_UPPER(enc,code) m17n_isupper(enc,code)
-#define ONIGENC_IS_CODE_CNTRL(enc,code) m17n_iscntrl(enc,code)
-#define ONIGENC_IS_CODE_PUNCT(enc,code) m17n_ispunct(enc,code)
-#define ONIGENC_IS_CODE_SPACE(enc,code) m17n_isspace(enc,code)
-#define ONIGENC_IS_CODE_DIGIT(enc,code) m17n_isdigit(enc,code)
-#define ONIGENC_IS_CODE_XDIGIT(enc,code) m17n_isxdigit(enc,code)
-#define ONIGENC_IS_CODE_WORD(enc,code) m17n_iswchar(enc,code)
-
-ONIG_EXTERN
-int onigenc_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, int ctype));
-ONIG_EXTERN
-int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, OnigUChar *buf));
-ONIG_EXTERN
-int onigenc_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* buf));
-ONIG_EXTERN
-int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const OnigUChar** pp, const OnigUChar* end));
-ONIG_EXTERN
-int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const OnigUChar* s, const OnigUChar* end));
-
-#else /* ONIG_RUBY_M17N */
-
#define ONIGENC_NAME(enc) ((enc)->name)
-#define ONIGENC_MBC_TO_NORMALIZE(enc,flag,pp,end,buf) \
- (enc)->mbc_to_normalize(flag,(const OnigUChar** )pp,end,buf)
-#define ONIGENC_IS_MBC_AMBIGUOUS(enc,flag,pp,end) \
- (enc)->is_mbc_ambiguous(flag,(const OnigUChar** )pp,end)
-#define ONIGENC_SUPPORT_AMBIG_FLAG(enc) ((enc)->support_ambig_flag)
+#define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) \
+ (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf)
#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \
(enc)->is_allowed_reverse_match(s,end)
#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \
(enc)->left_adjust_char_head(start, s)
-#define ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc,ambig_flag,acs) \
- (enc)->get_all_pair_ambig_codes(ambig_flag,acs)
-#define ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc,ambig_flag,acs) \
- (enc)->get_all_comp_ambig_codes(ambig_flag,acs)
+#define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) \
+ (enc)->apply_all_case_fold(case_fold_flag,f,arg)
+#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) \
+ (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs)
#define ONIGENC_STEP_BACK(enc,start,s,n) \
onigenc_step_back((enc),(start),(s),(n))
@@ -378,6 +288,8 @@ int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const OnigUChar* s, c
#define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end))
#define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code)
#define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf)
+#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) \
+ (enc)->property_name_to_ctype(enc,p,end)
#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype)
@@ -410,14 +322,12 @@ int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const OnigUChar* s, c
#define ONIGENC_IS_CODE_WORD(enc,code) \
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
-#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbr,mbr) \
- (enc)->get_ctype_code_range(ctype,sbr,mbr)
+#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) \
+ (enc)->get_ctype_code_range(ctype,sbout,ranges)
ONIG_EXTERN
OnigUChar* onigenc_step_back P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, int n));
-#endif /* is not ONIG_RUBY_M17N */
-
/* encoding API */
ONIG_EXTERN
@@ -482,10 +392,11 @@ typedef unsigned int OnigOptionType;
/* syntax */
typedef struct {
- unsigned int op;
- unsigned int op2;
- unsigned int behavior;
- OnigOptionType options; /* default option */
+ unsigned int op;
+ unsigned int op2;
+ unsigned int behavior;
+ OnigOptionType options; /* default option */
+ OnigMetaCharTableType meta_char_table;
} OnigSyntaxType;
ONIG_EXTERN OnigSyntaxType OnigSyntaxASIS;
@@ -566,7 +477,7 @@ ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax;
#define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15) /* \`, \' */
#define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16) /* \p{...}, \P{...} */
#define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17) /* \p{^..}, \P{^..} */
-#define ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS (1U<<18) /* \p{IsXDigit} */
+/* #define ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS (1U<<18) */
#define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19) /* \h, \H */
#define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20) /* \ */
@@ -666,6 +577,7 @@ ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax;
#define ONIGERR_NEVER_ENDING_RECURSION -221
#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222
#define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223
+#define ONIGERR_INVALID_CODE_POINT_VALUE -400
#define ONIGERR_INVALID_WIDE_CHAR_VALUE -400
#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401
#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402
@@ -755,10 +667,10 @@ typedef struct re_pattern_buffer {
int repeat_range_alloc;
OnigRepeatRange* repeat_range;
- OnigEncoding enc;
+ OnigEncoding enc;
OnigOptionType options;
OnigSyntaxType* syntax;
- OnigAmbigType ambig_flag;
+ OnigCaseFoldType case_fold_flag;
void* name_table;
/* optimization info (string search, char-map and anchors) */
@@ -793,7 +705,7 @@ typedef struct {
OnigEncoding target_enc;
OnigSyntaxType* syntax;
OnigOptionType option;
- OnigAmbigType ambig_flag;
+ OnigCaseFoldType case_fold_flag;
} OnigCompileInfo;
/* Oniguruma Native API */
@@ -808,10 +720,15 @@ void onig_set_verb_warn_func P_((OnigWarnFunc f));
ONIG_EXTERN
int onig_new P_((OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
ONIG_EXTERN
+int onig_reg_init P_((regex_t* reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, OnigSyntaxType* syntax));
+int onig_new_without_alloc P_((OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
+ONIG_EXTERN
int onig_new_deluxe P_((OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
ONIG_EXTERN
void onig_free P_((OnigRegex));
ONIG_EXTERN
+void onig_free_body P_((OnigRegex));
+ONIG_EXTERN
int onig_recompile P_((OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
ONIG_EXTERN
int onig_recompile_deluxe P_((OnigRegex reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
@@ -856,7 +773,7 @@ OnigEncoding onig_get_encoding P_((OnigRegex reg));
ONIG_EXTERN
OnigOptionType onig_get_options P_((OnigRegex reg));
ONIG_EXTERN
-OnigAmbigType onig_get_ambig_flag P_((OnigRegex reg));
+OnigCaseFoldType onig_get_case_fold_flag P_((OnigRegex reg));
ONIG_EXTERN
OnigSyntaxType* onig_get_syntax P_((OnigRegex reg));
ONIG_EXTERN
@@ -880,13 +797,13 @@ void onig_set_syntax_behavior P_((OnigSyntaxType* syntax, unsigned int behavior)
ONIG_EXTERN
void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options));
ONIG_EXTERN
-int onig_set_meta_char P_((OnigEncoding enc, unsigned int what, OnigCodePoint code));
+int onig_set_meta_char P_((OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code));
ONIG_EXTERN
void onig_copy_encoding P_((OnigEncoding to, OnigEncoding from));
ONIG_EXTERN
-OnigAmbigType onig_get_default_ambig_flag P_((void));
+OnigCaseFoldType onig_get_default_case_fold_flag P_((void));
ONIG_EXTERN
-int onig_set_default_ambig_flag P_((OnigAmbigType ambig_flag));
+int onig_set_default_case_fold_flag P_((OnigCaseFoldType case_fold_flag));
ONIG_EXTERN
unsigned int onig_get_match_stack_limit_size P_((void));
ONIG_EXTERN
diff --git a/ext/mbstring/oniguruma/regcomp.c b/ext/mbstring/oniguruma/regcomp.c
index 6a0976dee..f9d99563b 100644
--- a/ext/mbstring/oniguruma/regcomp.c
+++ b/ext/mbstring/oniguruma/regcomp.c
@@ -2,7 +2,7 @@
regcomp.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,26 +29,28 @@
#include "regparse.h"
-OnigAmbigType OnigDefaultAmbigFlag =
- (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
- ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE);
+OnigCaseFoldType OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN;
-extern OnigAmbigType
-onig_get_default_ambig_flag(void)
+extern OnigCaseFoldType
+onig_get_default_case_fold_flag(void)
{
- return OnigDefaultAmbigFlag;
+ return OnigDefaultCaseFoldFlag;
}
extern int
-onig_set_default_ambig_flag(OnigAmbigType ambig_flag)
+onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag)
{
- OnigDefaultAmbigFlag = ambig_flag;
+ OnigDefaultCaseFoldFlag = case_fold_flag;
return 0;
}
+#ifndef PLATFORM_UNALIGNED_WORD_ACCESS
+static unsigned char PadBuf[WORD_ALIGNMENT_SIZE];
+#endif
+
static UChar*
-k_strdup(UChar* s, UChar* end)
+str_dup(UChar* s, UChar* end)
{
int len = end - s;
@@ -62,15 +64,29 @@ k_strdup(UChar* s, UChar* end)
else return NULL;
}
-/*
- Caution: node should not be a string node.
- (s and end member address break)
-*/
static void
swap_node(Node* a, Node* b)
{
Node c;
c = *a; *a = *b; *b = c;
+
+ if (NTYPE(a) == NT_STR) {
+ StrNode* sn = NSTR(a);
+ if (sn->capa == 0) {
+ int len = sn->end - sn->s;
+ sn->s = sn->buf;
+ sn->end = sn->s + len;
+ }
+ }
+
+ if (NTYPE(b) == NT_STR) {
+ StrNode* sn = NSTR(b);
+ if (sn->capa == 0) {
+ int len = sn->end - sn->s;
+ sn->s = sn->buf;
+ sn->end = sn->s + len;
+ }
+ }
}
static OnigDistance
@@ -99,7 +115,7 @@ static int
bitset_is_empty(BitSetRef bs)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
+ for (i = 0; i < (int )BITSET_SIZE; i++) {
if (bs[i] != 0) return 0;
}
return 1;
@@ -122,8 +138,14 @@ bitset_on_num(BitSetRef bs)
extern int
onig_bbuf_init(BBuf* buf, int size)
{
- buf->p = (UChar* )xmalloc(size);
- if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
+ if (size <= 0) {
+ size = 0;
+ buf->p = NULL;
+ }
+ else {
+ buf->p = (UChar* )xmalloc(size);
+ if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
+ }
buf->alloc = size;
buf->used = 0;
@@ -139,7 +161,7 @@ unset_addr_list_init(UnsetAddrList* uslist, int size)
UnsetAddr* p;
p = (UnsetAddr* )xmalloc(sizeof(UnsetAddr)* size);
- CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(p);
uslist->num = 0;
uslist->alloc = size;
uslist->us = p;
@@ -162,7 +184,7 @@ unset_addr_list_add(UnsetAddrList* uslist, int offset, struct _Node* node)
if (uslist->num >= uslist->alloc) {
size = uslist->alloc * 2;
p = (UnsetAddr* )xrealloc(uslist->us, sizeof(UnsetAddr) * size);
- CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(p);
uslist->alloc = size;
uslist->us = p;
}
@@ -394,8 +416,8 @@ compile_tree_n_times(Node* node, int n, regex_t* reg)
}
static int
-add_compile_string_length(UChar* s, int mb_len, int str_len,
- regex_t* reg, int ignore_case)
+add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, int str_len,
+ regex_t* reg ARG_UNUSED, int ignore_case)
{
int len;
int op = select_str_opcode(mb_len, str_len, ignore_case);
@@ -440,20 +462,20 @@ compile_length_string_node(Node* node, regex_t* reg)
UChar *p, *prev;
StrNode* sn;
- sn = &(NSTRING(node));
+ sn = NSTR(node);
if (sn->end <= sn->s)
return 0;
ambig = NSTRING_IS_AMBIG(node);
p = prev = sn->s;
- prev_len = enc_len(enc, p);
+ prev_len = enclen(enc, p);
p += prev_len;
slen = 1;
rlen = 0;
for (; p < sn->end; ) {
- len = enc_len(enc, p);
+ len = enclen(enc, p);
if (len == prev_len) {
slen++;
}
@@ -488,7 +510,7 @@ compile_string_node(Node* node, regex_t* reg)
UChar *p, *prev, *end;
StrNode* sn;
- sn = &(NSTRING(node));
+ sn = NSTR(node);
if (sn->end <= sn->s)
return 0;
@@ -496,12 +518,12 @@ compile_string_node(Node* node, regex_t* reg)
ambig = NSTRING_IS_AMBIG(node);
p = prev = sn->s;
- prev_len = enc_len(enc, p);
+ prev_len = enclen(enc, p);
p += prev_len;
slen = 1;
for (; p < end; ) {
- len = enc_len(enc, p);
+ len = enclen(enc, p);
if (len == prev_len) {
slen++;
}
@@ -535,8 +557,6 @@ add_multi_byte_cclass(BBuf* mbuf, regex_t* reg)
add_length(reg, mbuf->used);
return add_bytes(reg, mbuf->p, mbuf->used);
#else
- static unsigned char PadBuf[WORD_ALIGNMENT_SIZE];
-
int r, pad_size;
UChar* p = BBUF_GET_ADD_ADDRESS(reg) + SIZE_LENGTH;
@@ -558,7 +578,7 @@ compile_length_cclass_node(CClassNode* cc, regex_t* reg)
{
int len;
- if (IS_CCLASS_SHARE(cc)) {
+ if (IS_NCCLASS_SHARE(cc)) {
len = SIZE_OPCODE + SIZE_POINTER;
return len;
}
@@ -588,14 +608,14 @@ compile_cclass_node(CClassNode* cc, regex_t* reg)
{
int r;
- if (IS_CCLASS_SHARE(cc)) {
+ if (IS_NCCLASS_SHARE(cc)) {
add_opcode(reg, OP_CCLASS_NODE);
r = add_pointer(reg, cc);
return r;
}
if (IS_NULL(cc->mbuf)) {
- if (IS_CCLASS_NOT(cc))
+ if (IS_NCCLASS_NOT(cc))
add_opcode(reg, OP_CCLASS_NOT);
else
add_opcode(reg, OP_CCLASS);
@@ -604,7 +624,7 @@ compile_cclass_node(CClassNode* cc, regex_t* reg)
}
else {
if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
- if (IS_CCLASS_NOT(cc))
+ if (IS_NCCLASS_NOT(cc))
add_opcode(reg, OP_CCLASS_MB_NOT);
else
add_opcode(reg, OP_CCLASS_MB);
@@ -612,7 +632,7 @@ compile_cclass_node(CClassNode* cc, regex_t* reg)
r = add_multi_byte_cclass(cc->mbuf, reg);
}
else {
- if (IS_CCLASS_NOT(cc))
+ if (IS_NCCLASS_NOT(cc))
add_opcode(reg, OP_CCLASS_MIX_NOT);
else
add_opcode(reg, OP_CCLASS_MIX);
@@ -635,7 +655,7 @@ entry_repeat_range(regex_t* reg, int id, int lower, int upper)
if (reg->repeat_range_alloc == 0) {
p = (OnigRepeatRange* )xmalloc(sizeof(OnigRepeatRange) * REPEAT_RANGE_ALLOC);
- CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(p);
reg->repeat_range = p;
reg->repeat_range_alloc = REPEAT_RANGE_ALLOC;
}
@@ -644,7 +664,7 @@ entry_repeat_range(regex_t* reg, int id, int lower, int upper)
n = reg->repeat_range_alloc + REPEAT_RANGE_ALLOC;
p = (OnigRepeatRange* )xrealloc(reg->repeat_range,
sizeof(OnigRepeatRange) * n);
- CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(p);
reg->repeat_range = p;
reg->repeat_range_alloc = n;
}
@@ -658,7 +678,7 @@ entry_repeat_range(regex_t* reg, int id, int lower, int upper)
}
static int
-compile_range_repeat_node(QuantifierNode* qn, int target_len, int empty_info,
+compile_range_repeat_node(QtfrNode* qn, int target_len, int empty_info,
regex_t* reg)
{
int r;
@@ -694,10 +714,10 @@ compile_range_repeat_node(QuantifierNode* qn, int target_len, int empty_info,
}
static int
-is_anychar_star_quantifier(QuantifierNode* qn)
+is_anychar_star_quantifier(QtfrNode* qn)
{
if (qn->greedy && IS_REPEAT_INFINITE(qn->upper) &&
- NTYPE(qn->target) == N_ANYCHAR)
+ NTYPE(qn->target) == NT_CANY)
return 1;
else
return 0;
@@ -709,7 +729,7 @@ is_anychar_star_quantifier(QuantifierNode* qn)
#ifdef USE_COMBINATION_EXPLOSION_CHECK
static int
-compile_length_quantifier_node(QuantifierNode* qn, regex_t* reg)
+compile_length_quantifier_node(QtfrNode* qn, regex_t* reg)
{
int len, mod_tlen, cklen;
int ckn;
@@ -724,7 +744,7 @@ compile_length_quantifier_node(QuantifierNode* qn, regex_t* reg)
cklen = (CKN_ON ? SIZE_STATE_CHECK_NUM: 0);
/* anychar repeat */
- if (NTYPE(qn->target) == N_ANYCHAR) {
+ if (NTYPE(qn->target) == NT_CANY) {
if (qn->greedy && infinite) {
if (IS_NOT_NULL(qn->next_head_exact) && !CKN_ON)
return SIZE_OP_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower + cklen;
@@ -789,7 +809,7 @@ compile_length_quantifier_node(QuantifierNode* qn, regex_t* reg)
}
static int
-compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
+compile_quantifier_node(QtfrNode* qn, regex_t* reg)
{
int r, mod_tlen;
int ckn;
@@ -815,7 +835,7 @@ compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
if (r) return r;
}
- return add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
+ return add_bytes(reg, NSTR(qn->next_head_exact)->s, 1);
}
else {
if (IS_MULTILINE(reg->options)) {
@@ -943,7 +963,7 @@ compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
#else /* USE_COMBINATION_EXPLOSION_CHECK */
static int
-compile_length_quantifier_node(QuantifierNode* qn, regex_t* reg)
+compile_length_quantifier_node(QtfrNode* qn, regex_t* reg)
{
int len, mod_tlen;
int infinite = IS_REPEAT_INFINITE(qn->upper);
@@ -953,7 +973,7 @@ compile_length_quantifier_node(QuantifierNode* qn, regex_t* reg)
if (tlen < 0) return tlen;
/* anychar repeat */
- if (NTYPE(qn->target) == N_ANYCHAR) {
+ if (NTYPE(qn->target) == NT_CANY) {
if (qn->greedy && infinite) {
if (IS_NOT_NULL(qn->next_head_exact))
return SIZE_OP_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower;
@@ -1008,7 +1028,7 @@ compile_length_quantifier_node(QuantifierNode* qn, regex_t* reg)
}
static int
-compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
+compile_quantifier_node(QtfrNode* qn, regex_t* reg)
{
int i, r, mod_tlen;
int infinite = IS_REPEAT_INFINITE(qn->upper);
@@ -1026,7 +1046,7 @@ compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
else
r = add_opcode(reg, OP_ANYCHAR_STAR_PEEK_NEXT);
if (r) return r;
- return add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
+ return add_bytes(reg, NSTR(qn->next_head_exact)->s, 1);
}
else {
if (IS_MULTILINE(reg->options))
@@ -1067,7 +1087,7 @@ compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
r = add_opcode_rel_addr(reg, OP_PUSH_OR_JUMP_EXACT1,
mod_tlen + SIZE_OP_JUMP);
if (r) return r;
- add_bytes(reg, NSTRING(qn->head_exact).s, 1);
+ add_bytes(reg, NSTR(qn->head_exact)->s, 1);
r = compile_tree_empty_check(qn->target, reg, empty_info);
if (r) return r;
r = add_opcode_rel_addr(reg, OP_JUMP,
@@ -1077,7 +1097,7 @@ compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
r = add_opcode_rel_addr(reg, OP_PUSH_IF_PEEK_NEXT,
mod_tlen + SIZE_OP_JUMP);
if (r) return r;
- add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
+ add_bytes(reg, NSTR(qn->next_head_exact)->s, 1);
r = compile_tree_empty_check(qn->target, reg, empty_info);
if (r) return r;
r = add_opcode_rel_addr(reg, OP_JUMP,
@@ -1136,7 +1156,7 @@ compile_quantifier_node(QuantifierNode* qn, regex_t* reg)
#endif /* USE_COMBINATION_EXPLOSION_CHECK */
static int
-compile_length_option_node(EffectNode* node, regex_t* reg)
+compile_length_option_node(EncloseNode* node, regex_t* reg)
{
int tlen;
OnigOptionType prev = reg->options;
@@ -1156,7 +1176,7 @@ compile_length_option_node(EffectNode* node, regex_t* reg)
}
static int
-compile_option_node(EffectNode* node, regex_t* reg)
+compile_option_node(EncloseNode* node, regex_t* reg)
{
int r;
OnigOptionType prev = reg->options;
@@ -1182,12 +1202,12 @@ compile_option_node(EffectNode* node, regex_t* reg)
}
static int
-compile_length_effect_node(EffectNode* node, regex_t* reg)
+compile_length_enclose_node(EncloseNode* node, regex_t* reg)
{
int len;
int tlen;
- if (node->type == EFFECT_OPTION)
+ if (node->type == ENCLOSE_OPTION)
return compile_length_option_node(node, reg);
if (node->target) {
@@ -1198,16 +1218,16 @@ compile_length_effect_node(EffectNode* node, regex_t* reg)
tlen = 0;
switch (node->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
#ifdef USE_SUBEXP_CALL
- if (IS_EFFECT_CALLED(node)) {
+ if (IS_ENCLOSE_CALLED(node)) {
len = SIZE_OP_MEMORY_START_PUSH + tlen
+ SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
- len += (IS_EFFECT_RECURSION(node)
+ len += (IS_ENCLOSE_RECURSION(node)
? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
else
- len += (IS_EFFECT_RECURSION(node)
+ len += (IS_ENCLOSE_RECURSION(node)
? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
}
else
@@ -1223,9 +1243,9 @@ compile_length_effect_node(EffectNode* node, regex_t* reg)
}
break;
- case EFFECT_STOP_BACKTRACK:
- if (IS_EFFECT_STOP_BT_SIMPLE_REPEAT(node)) {
- QuantifierNode* qn = &NQUANTIFIER(node->target);
+ case ENCLOSE_STOP_BACKTRACK:
+ if (IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(node)) {
+ QtfrNode* qn = NQTFR(node->target);
tlen = compile_length_tree(qn->target, reg);
if (tlen < 0) return tlen;
@@ -1248,17 +1268,17 @@ compile_length_effect_node(EffectNode* node, regex_t* reg)
static int get_char_length_tree(Node* node, regex_t* reg, int* len);
static int
-compile_effect_node(EffectNode* node, regex_t* reg)
+compile_enclose_node(EncloseNode* node, regex_t* reg)
{
int r, len;
- if (node->type == EFFECT_OPTION)
+ if (node->type == ENCLOSE_OPTION)
return compile_option_node(node, reg);
switch (node->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
#ifdef USE_SUBEXP_CALL
- if (IS_EFFECT_CALLED(node)) {
+ if (IS_ENCLOSE_CALLED(node)) {
r = add_opcode(reg, OP_CALL);
if (r) return r;
node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
@@ -1268,10 +1288,10 @@ compile_effect_node(EffectNode* node, regex_t* reg)
len = compile_length_tree(node->target, reg);
len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN);
if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
- len += (IS_EFFECT_RECURSION(node)
+ len += (IS_ENCLOSE_RECURSION(node)
? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
else
- len += (IS_EFFECT_RECURSION(node)
+ len += (IS_ENCLOSE_RECURSION(node)
? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
r = add_opcode_rel_addr(reg, OP_JUMP, len);
@@ -1288,12 +1308,12 @@ compile_effect_node(EffectNode* node, regex_t* reg)
r = compile_tree(node->target, reg);
if (r) return r;
#ifdef USE_SUBEXP_CALL
- if (IS_EFFECT_CALLED(node)) {
+ if (IS_ENCLOSE_CALLED(node)) {
if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
- r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
+ r = add_opcode(reg, (IS_ENCLOSE_RECURSION(node)
? OP_MEMORY_END_PUSH_REC : OP_MEMORY_END_PUSH));
else
- r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
+ r = add_opcode(reg, (IS_ENCLOSE_RECURSION(node)
? OP_MEMORY_END_REC : OP_MEMORY_END));
if (r) return r;
@@ -1313,9 +1333,9 @@ compile_effect_node(EffectNode* node, regex_t* reg)
}
break;
- case EFFECT_STOP_BACKTRACK:
- if (IS_EFFECT_STOP_BT_SIMPLE_REPEAT(node)) {
- QuantifierNode* qn = &NQUANTIFIER(node->target);
+ case ENCLOSE_STOP_BACKTRACK:
+ if (IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(node)) {
+ QtfrNode* qn = NQTFR(node->target);
r = compile_tree_n_times(qn->target, qn->lower, reg);
if (r) return r;
@@ -1472,50 +1492,50 @@ compile_length_tree(Node* node, regex_t* reg)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
len = 0;
do {
- r = compile_length_tree(NCONS(node).left, reg);
+ r = compile_length_tree(NCAR(node), reg);
if (r < 0) return r;
len += r;
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ } while (IS_NOT_NULL(node = NCDR(node)));
r = len;
break;
- case N_ALT:
+ case NT_ALT:
{
int n;
n = r = 0;
do {
- r += compile_length_tree(NCONS(node).left, reg);
+ r += compile_length_tree(NCAR(node), reg);
n++;
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ } while (IS_NOT_NULL(node = NCDR(node)));
r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1);
}
break;
- case N_STRING:
+ case NT_STR:
if (NSTRING_IS_RAW(node))
- r = compile_length_string_raw_node(&(NSTRING(node)), reg);
+ r = compile_length_string_raw_node(NSTR(node), reg);
else
r = compile_length_string_node(node, reg);
break;
- case N_CCLASS:
- r = compile_length_cclass_node(&(NCCLASS(node)), reg);
+ case NT_CCLASS:
+ r = compile_length_cclass_node(NCCLASS(node), reg);
break;
- case N_CTYPE:
- case N_ANYCHAR:
+ case NT_CTYPE:
+ case NT_CANY:
r = SIZE_OPCODE;
break;
- case N_BACKREF:
+ case NT_BREF:
{
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
if (IS_BACKREF_NEST_LEVEL(br)) {
r = SIZE_OPCODE + SIZE_OPTION + SIZE_LENGTH +
SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
@@ -1533,21 +1553,21 @@ compile_length_tree(Node* node, regex_t* reg)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
+ case NT_CALL:
r = SIZE_OP_CALL;
break;
#endif
- case N_QUANTIFIER:
- r = compile_length_quantifier_node(&(NQUANTIFIER(node)), reg);
+ case NT_QTFR:
+ r = compile_length_quantifier_node(NQTFR(node), reg);
break;
- case N_EFFECT:
- r = compile_length_effect_node(&NEFFECT(node), reg);
+ case NT_ENCLOSE:
+ r = compile_length_enclose_node(NENCLOSE(node), reg);
break;
- case N_ANCHOR:
- r = compile_length_anchor_node(&(NANCHOR(node)), reg);
+ case NT_ANCHOR:
+ r = compile_length_anchor_node(NANCHOR(node), reg);
break;
default:
@@ -1565,59 +1585,61 @@ compile_tree(Node* node, regex_t* reg)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
do {
- r = compile_tree(NCONS(node).left, reg);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = compile_tree(NCAR(node), reg);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_ALT:
+ case NT_ALT:
{
Node* x = node;
len = 0;
do {
- len += compile_length_tree(NCONS(x).left, reg);
- if (NCONS(x).right != NULL) {
+ len += compile_length_tree(NCAR(x), reg);
+ if (NCDR(x) != NULL) {
len += SIZE_OP_PUSH + SIZE_OP_JUMP;
}
- } while (IS_NOT_NULL(x = NCONS(x).right));
+ } while (IS_NOT_NULL(x = NCDR(x)));
pos = reg->used + len; /* goal position */
do {
- len = compile_length_tree(NCONS(node).left, reg);
- if (IS_NOT_NULL(NCONS(node).right)) {
+ len = compile_length_tree(NCAR(node), reg);
+ if (IS_NOT_NULL(NCDR(node))) {
r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_JUMP);
if (r) break;
}
- r = compile_tree(NCONS(node).left, reg);
+ r = compile_tree(NCAR(node), reg);
if (r) break;
- if (IS_NOT_NULL(NCONS(node).right)) {
+ if (IS_NOT_NULL(NCDR(node))) {
len = pos - (reg->used + SIZE_OP_JUMP);
r = add_opcode_rel_addr(reg, OP_JUMP, len);
if (r) break;
}
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ } while (IS_NOT_NULL(node = NCDR(node)));
}
break;
- case N_STRING:
+ case NT_STR:
if (NSTRING_IS_RAW(node))
- r = compile_string_raw_node(&(NSTRING(node)), reg);
+ r = compile_string_raw_node(NSTR(node), reg);
else
r = compile_string_node(node, reg);
break;
- case N_CCLASS:
- r = compile_cclass_node(&(NCCLASS(node)), reg);
+ case NT_CCLASS:
+ r = compile_cclass_node(NCCLASS(node), reg);
break;
- case N_CTYPE:
+ case NT_CTYPE:
{
int op;
- switch (NCTYPE(node).type) {
- case CTYPE_WORD: op = OP_WORD; break;
- case CTYPE_NOT_WORD: op = OP_NOT_WORD; break;
+ switch (NCTYPE(node)->ctype) {
+ case ONIGENC_CTYPE_WORD:
+ if (NCTYPE(node)->not != 0) op = OP_NOT_WORD;
+ else op = OP_WORD;
+ break;
default:
return ONIGERR_TYPE_BUG;
break;
@@ -1626,20 +1648,20 @@ compile_tree(Node* node, regex_t* reg)
}
break;
- case N_ANYCHAR:
+ case NT_CANY:
if (IS_MULTILINE(reg->options))
r = add_opcode(reg, OP_ANYCHAR_ML);
else
r = add_opcode(reg, OP_ANYCHAR);
break;
- case N_BACKREF:
+ case NT_BREF:
{
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
if (IS_BACKREF_NEST_LEVEL(br)) {
- r = add_opcode(reg, OP_BACKREF_AT_LEVEL);
+ r = add_opcode(reg, OP_BACKREF_WITH_LEVEL);
if (r) return r;
r = add_option(reg, (reg->options & ONIG_OPTION_IGNORECASE));
if (r) return r;
@@ -1681,7 +1703,7 @@ compile_tree(Node* node, regex_t* reg)
}
if (r) return r;
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
add_bacref_mems:
#endif
r = add_length(reg, br->back_num);
@@ -1696,21 +1718,21 @@ compile_tree(Node* node, regex_t* reg)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- r = compile_call(&(NCALL(node)), reg);
+ case NT_CALL:
+ r = compile_call(NCALL(node), reg);
break;
#endif
- case N_QUANTIFIER:
- r = compile_quantifier_node(&(NQUANTIFIER(node)), reg);
+ case NT_QTFR:
+ r = compile_quantifier_node(NQTFR(node), reg);
break;
- case N_EFFECT:
- r = compile_effect_node(&NEFFECT(node), reg);
+ case NT_ENCLOSE:
+ r = compile_enclose_node(NENCLOSE(node), reg);
break;
- case N_ANCHOR:
- r = compile_anchor_node(&(NANCHOR(node)), reg);
+ case NT_ANCHOR:
+ r = compile_anchor_node(NANCHOR(node), reg);
break;
default:
@@ -1732,29 +1754,29 @@ noname_disable_map(Node** plink, GroupNumRemap* map, int* counter)
Node* node = *plink;
switch (NTYPE(node)) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
do {
- r = noname_disable_map(&(NCONS(node).left), map, counter);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = noname_disable_map(&(NCAR(node)), map, counter);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{
- Node** ptarget = &(NQUANTIFIER(node).target);
+ Node** ptarget = &(NQTFR(node)->target);
Node* old = *ptarget;
r = noname_disable_map(ptarget, map, counter);
- if (*ptarget != old && NTYPE(*ptarget) == N_QUANTIFIER) {
+ if (*ptarget != old && NTYPE(*ptarget) == NT_QTFR) {
onig_reduce_nested_quantifier(node, *ptarget);
}
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
- if (en->type == EFFECT_MEMORY) {
- if (IS_EFFECT_NAMED_GROUP(en)) {
+ EncloseNode* en = NENCLOSE(node);
+ if (en->type == ENCLOSE_MEMORY) {
+ if (IS_ENCLOSE_NAMED_GROUP(en)) {
(*counter)++;
map[en->regnum].new_val = *counter;
en->regnum = *counter;
@@ -1784,7 +1806,7 @@ renumber_node_backref(Node* node, GroupNumRemap* map)
{
int i, pos, n, old_num;
int *backs;
- BackrefNode* bn = &(NBACKREF(node));
+ BRefNode* bn = NBREF(node);
if (! IS_BACKREF_NAME_REF(bn))
return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
@@ -1813,20 +1835,20 @@ renumber_by_map(Node* node, GroupNumRemap* map)
int r = 0;
switch (NTYPE(node)) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
do {
- r = renumber_by_map(NCONS(node).left, map);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = renumber_by_map(NCAR(node), map);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
- r = renumber_by_map(NQUANTIFIER(node).target, map);
+ case NT_QTFR:
+ r = renumber_by_map(NQTFR(node)->target, map);
break;
- case N_EFFECT:
- r = renumber_by_map(NEFFECT(node).target, map);
+ case NT_ENCLOSE:
+ r = renumber_by_map(NENCLOSE(node)->target, map);
break;
- case N_BACKREF:
+ case NT_BREF:
r = renumber_node_backref(node, map);
break;
@@ -1843,21 +1865,21 @@ numbered_ref_check(Node* node)
int r = 0;
switch (NTYPE(node)) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
do {
- r = numbered_ref_check(NCONS(node).left);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = numbered_ref_check(NCAR(node));
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
- r = numbered_ref_check(NQUANTIFIER(node).target);
+ case NT_QTFR:
+ r = numbered_ref_check(NQTFR(node)->target);
break;
- case N_EFFECT:
- r = numbered_ref_check(NEFFECT(node).target);
+ case NT_ENCLOSE:
+ r = numbered_ref_check(NENCLOSE(node)->target);
break;
- case N_BACKREF:
- if (! IS_BACKREF_NAME_REF(&(NBACKREF(node))))
+ case NT_BREF:
+ if (! IS_BACKREF_NAME_REF(NBREF(node)))
return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
break;
@@ -1876,7 +1898,7 @@ disable_noname_group_capture(Node** root, regex_t* reg, ScanEnv* env)
GroupNumRemap* map;
map = (GroupNumRemap* )xalloca(sizeof(GroupNumRemap) * (env->num_mem + 1));
- CHECK_NULL_RETURN_VAL(map, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(map);
for (i = 1; i <= env->num_mem; i++) {
map[i].new_val = 0;
}
@@ -1914,12 +1936,12 @@ static int
unset_addr_list_fix(UnsetAddrList* uslist, regex_t* reg)
{
int i, offset;
- EffectNode* en;
+ EncloseNode* en;
AbsAddrType addr;
for (i = 0; i < uslist->num; i++) {
- en = &(NEFFECT(uslist->us[i].target));
- if (! IS_EFFECT_ADDR_FIXED(en)) return ONIGERR_PARSER_BUG;
+ en = NENCLOSE(uslist->us[i].target);
+ if (! IS_ENCLOSE_ADDR_FIXED(en)) return ONIGERR_PARSER_BUG;
addr = en->call_addr;
offset = uslist->us[i].offset;
@@ -1929,53 +1951,53 @@ unset_addr_list_fix(UnsetAddrList* uslist, regex_t* reg)
}
#endif
-#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
+#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT
static int
quantifiers_memory_node_info(Node* node)
{
int r = 0;
switch (NTYPE(node)) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
{
int v;
do {
- v = quantifiers_memory_node_info(NCONS(node).left);
+ v = quantifiers_memory_node_info(NCAR(node));
if (v > r) r = v;
- } while (v >= 0 && IS_NOT_NULL(node = NCONS(node).right));
+ } while (v >= 0 && IS_NOT_NULL(node = NCDR(node)));
}
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- if (IS_CALL_RECURSION(&NCALL(node))) {
+ case NT_CALL:
+ if (IS_CALL_RECURSION(NCALL(node))) {
return NQ_TARGET_IS_EMPTY_REC; /* tiny version */
}
else
- r = quantifiers_memory_node_info(NCALL(node).target);
+ r = quantifiers_memory_node_info(NCALL(node)->target);
break;
#endif
- case N_QUANTIFIER:
+ case NT_QTFR:
{
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
if (qn->upper != 0) {
r = quantifiers_memory_node_info(qn->target);
}
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
return NQ_TARGET_IS_EMPTY_MEM;
break;
- case EFFECT_OPTION:
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_OPTION:
+ case ENCLOSE_STOP_BACKTRACK:
r = quantifiers_memory_node_info(en->target);
break;
default:
@@ -1984,19 +2006,19 @@ quantifiers_memory_node_info(Node* node)
}
break;
- case N_BACKREF:
- case N_STRING:
- case N_CTYPE:
- case N_CCLASS:
- case N_ANYCHAR:
- case N_ANCHOR:
+ case NT_BREF:
+ case NT_STR:
+ case NT_CTYPE:
+ case NT_CCLASS:
+ case NT_CANY:
+ case NT_ANCHOR:
default:
break;
}
return r;
}
-#endif /* USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK */
+#endif /* USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT */
static int
get_min_match_length(Node* node, OnigDistance *min, ScanEnv* env)
@@ -2006,12 +2028,12 @@ get_min_match_length(Node* node, OnigDistance *min, ScanEnv* env)
*min = 0;
switch (NTYPE(node)) {
- case N_BACKREF:
+ case NT_BREF:
{
int i;
int* backs;
Node** nodes = SCANENV_MEM_NODES(env);
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
if (br->state & NST_RECURSION) break;
backs = BACKREFS_P(br);
@@ -2028,62 +2050,57 @@ get_min_match_length(Node* node, OnigDistance *min, ScanEnv* env)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- if (IS_CALL_RECURSION(&NCALL(node))) {
- EffectNode* en = &(NEFFECT(NCALL(node).target));
- if (IS_EFFECT_MIN_FIXED(en))
+ case NT_CALL:
+ if (IS_CALL_RECURSION(NCALL(node))) {
+ EncloseNode* en = NENCLOSE(NCALL(node)->target);
+ if (IS_ENCLOSE_MIN_FIXED(en))
*min = en->min_len;
}
else
- r = get_min_match_length(NCALL(node).target, min, env);
+ r = get_min_match_length(NCALL(node)->target, min, env);
break;
#endif
- case N_LIST:
+ case NT_LIST:
do {
- r = get_min_match_length(NCONS(node).left, &tmin, env);
+ r = get_min_match_length(NCAR(node), &tmin, env);
if (r == 0) *min += tmin;
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_ALT:
+ case NT_ALT:
{
Node *x, *y;
y = node;
do {
- x = NCONS(y).left;
+ x = NCAR(y);
r = get_min_match_length(x, &tmin, env);
if (r != 0) break;
if (y == node) *min = tmin;
else if (*min > tmin) *min = tmin;
- } while (r == 0 && IS_NOT_NULL(y = NCONS(y).right));
+ } while (r == 0 && IS_NOT_NULL(y = NCDR(y)));
}
break;
- case N_STRING:
+ case NT_STR:
{
- StrNode* sn = &(NSTRING(node));
+ StrNode* sn = NSTR(node);
*min = sn->end - sn->s;
}
break;
- case N_CTYPE:
- switch (NCTYPE(node).type) {
- case CTYPE_WORD: *min = 1; break;
- case CTYPE_NOT_WORD: *min = 1; break;
- default:
- break;
- }
+ case NT_CTYPE:
+ *min = 1;
break;
- case N_CCLASS:
- case N_ANYCHAR:
+ case NT_CCLASS:
+ case NT_CANY:
*min = 1;
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
if (qn->lower > 0) {
r = get_min_match_length(qn->target, min, env);
@@ -2093,32 +2110,32 @@ get_min_match_length(Node* node, OnigDistance *min, ScanEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
#ifdef USE_SUBEXP_CALL
- if (IS_EFFECT_MIN_FIXED(en))
+ if (IS_ENCLOSE_MIN_FIXED(en))
*min = en->min_len;
else {
r = get_min_match_length(en->target, min, env);
if (r == 0) {
en->min_len = *min;
- SET_EFFECT_STATUS(node, NST_MIN_FIXED);
+ SET_ENCLOSE_STATUS(node, NST_MIN_FIXED);
}
}
break;
#endif
- case EFFECT_OPTION:
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_OPTION:
+ case ENCLOSE_STOP_BACKTRACK:
r = get_min_match_length(en->target, min, env);
break;
}
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
default:
break;
}
@@ -2134,51 +2151,43 @@ get_max_match_length(Node* node, OnigDistance *max, ScanEnv* env)
*max = 0;
switch (NTYPE(node)) {
- case N_LIST:
+ case NT_LIST:
do {
- r = get_max_match_length(NCONS(node).left, &tmax, env);
+ r = get_max_match_length(NCAR(node), &tmax, env);
if (r == 0)
*max = distance_add(*max, tmax);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_ALT:
+ case NT_ALT:
do {
- r = get_max_match_length(NCONS(node).left, &tmax, env);
+ r = get_max_match_length(NCAR(node), &tmax, env);
if (r == 0 && *max < tmax) *max = tmax;
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_STRING:
+ case NT_STR:
{
- StrNode* sn = &(NSTRING(node));
+ StrNode* sn = NSTR(node);
*max = sn->end - sn->s;
}
break;
- case N_CTYPE:
- switch (NCTYPE(node).type) {
- case CTYPE_WORD:
- case CTYPE_NOT_WORD:
- *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
- break;
-
- default:
- break;
- }
+ case NT_CTYPE:
+ *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
break;
- case N_CCLASS:
- case N_ANYCHAR:
+ case NT_CCLASS:
+ case NT_CANY:
*max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
break;
- case N_BACKREF:
+ case NT_BREF:
{
int i;
int* backs;
Node** nodes = SCANENV_MEM_NODES(env);
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
if (br->state & NST_RECURSION) {
*max = ONIG_INFINITE_DISTANCE;
break;
@@ -2194,17 +2203,17 @@ get_max_match_length(Node* node, OnigDistance *max, ScanEnv* env)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- if (! IS_CALL_RECURSION(&(NCALL(node))))
- r = get_max_match_length(NCALL(node).target, max, env);
+ case NT_CALL:
+ if (! IS_CALL_RECURSION(NCALL(node)))
+ r = get_max_match_length(NCALL(node)->target, max, env);
else
*max = ONIG_INFINITE_DISTANCE;
break;
#endif
- case N_QUANTIFIER:
+ case NT_QTFR:
{
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
if (qn->upper != 0) {
r = get_max_match_length(qn->target, max, env);
@@ -2218,32 +2227,32 @@ get_max_match_length(Node* node, OnigDistance *max, ScanEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
#ifdef USE_SUBEXP_CALL
- if (IS_EFFECT_MAX_FIXED(en))
+ if (IS_ENCLOSE_MAX_FIXED(en))
*max = en->max_len;
else {
r = get_max_match_length(en->target, max, env);
if (r == 0) {
en->max_len = *max;
- SET_EFFECT_STATUS(node, NST_MAX_FIXED);
+ SET_ENCLOSE_STATUS(node, NST_MAX_FIXED);
}
}
break;
#endif
- case EFFECT_OPTION:
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_OPTION:
+ case ENCLOSE_STOP_BACKTRACK:
r = get_max_match_length(en->target, max, env);
break;
}
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
default:
break;
}
@@ -2264,22 +2273,22 @@ get_char_length_tree1(Node* node, regex_t* reg, int* len, int level)
level++;
*len = 0;
switch (NTYPE(node)) {
- case N_LIST:
+ case NT_LIST:
do {
- r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
+ r = get_char_length_tree1(NCAR(node), reg, &tlen, level);
if (r == 0)
*len = distance_add(*len, tlen);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_ALT:
+ case NT_ALT:
{
int tlen2;
int varlen = 0;
- r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
- while (r == 0 && IS_NOT_NULL(node = NCONS(node).right)) {
- r = get_char_length_tree1(NCONS(node).left, reg, &tlen2, level);
+ r = get_char_length_tree1(NCAR(node), reg, &tlen, level);
+ while (r == 0 && IS_NOT_NULL(node = NCDR(node))) {
+ r = get_char_length_tree1(NCAR(node), reg, &tlen2, level);
if (r == 0) {
if (tlen != tlen2)
varlen = 1;
@@ -2298,20 +2307,20 @@ get_char_length_tree1(Node* node, regex_t* reg, int* len, int level)
}
break;
- case N_STRING:
+ case NT_STR:
{
- StrNode* sn = &(NSTRING(node));
+ StrNode* sn = NSTR(node);
UChar *s = sn->s;
while (s < sn->end) {
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
(*len)++;
}
}
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
if (qn->lower == qn->upper) {
r = get_char_length_tree1(qn->target, reg, &tlen, level);
if (r == 0)
@@ -2323,47 +2332,42 @@ get_char_length_tree1(Node* node, regex_t* reg, int* len, int level)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- if (! IS_CALL_RECURSION(&(NCALL(node))))
- r = get_char_length_tree1(NCALL(node).target, reg, len, level);
+ case NT_CALL:
+ if (! IS_CALL_RECURSION(NCALL(node)))
+ r = get_char_length_tree1(NCALL(node)->target, reg, len, level);
else
r = GET_CHAR_LEN_VARLEN;
break;
#endif
- case N_CTYPE:
- switch (NCTYPE(node).type) {
- case CTYPE_WORD:
- case CTYPE_NOT_WORD:
- *len = 1;
- break;
- }
+ case NT_CTYPE:
+ *len = 1;
break;
- case N_CCLASS:
- case N_ANYCHAR:
+ case NT_CCLASS:
+ case NT_CANY:
*len = 1;
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
#ifdef USE_SUBEXP_CALL
- if (IS_EFFECT_CLEN_FIXED(en))
+ if (IS_ENCLOSE_CLEN_FIXED(en))
*len = en->char_len;
else {
r = get_char_length_tree1(en->target, reg, len, level);
if (r == 0) {
en->char_len = *len;
- SET_EFFECT_STATUS(node, NST_CLEN_FIXED);
+ SET_ENCLOSE_STATUS(node, NST_CLEN_FIXED);
}
}
break;
#endif
- case EFFECT_OPTION:
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_OPTION:
+ case ENCLOSE_STOP_BACKTRACK:
r = get_char_length_tree1(en->target, reg, len, level);
break;
default:
@@ -2372,7 +2376,7 @@ get_char_length_tree1(Node* node, regex_t* reg, int* len, int level)
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
break;
default:
@@ -2401,29 +2405,18 @@ is_not_included(Node* x, Node* y, regex_t* reg)
retry:
ytype = NTYPE(y);
switch (NTYPE(x)) {
- case N_CTYPE:
+ case NT_CTYPE:
{
switch (ytype) {
- case N_CTYPE:
- switch (NCTYPE(x).type) {
- case CTYPE_WORD:
- if (NCTYPE(y).type == CTYPE_NOT_WORD)
- return 1;
- else
- return 0;
- break;
- case CTYPE_NOT_WORD:
- if (NCTYPE(y).type == CTYPE_WORD)
- return 1;
- else
- return 0;
- break;
- default:
- break;
- }
+ case NT_CTYPE:
+ if (NCTYPE(y)->ctype == NCTYPE(x)->ctype &&
+ NCTYPE(y)->not != NCTYPE(x)->not)
+ return 1;
+ else
+ return 0;
break;
- case N_CCLASS:
+ case NT_CCLASS:
swap:
{
Node* tmp;
@@ -2432,7 +2425,7 @@ is_not_included(Node* x, Node* y, regex_t* reg)
}
break;
- case N_STRING:
+ case NT_STR:
goto swap;
break;
@@ -2442,37 +2435,39 @@ is_not_included(Node* x, Node* y, regex_t* reg)
}
break;
- case N_CCLASS:
+ case NT_CCLASS:
{
- CClassNode* xc = &(NCCLASS(x));
+ CClassNode* xc = NCCLASS(x);
switch (ytype) {
- case N_CTYPE:
- switch (NCTYPE(y).type) {
- case CTYPE_WORD:
- if (IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) {
- for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
- if (BITSET_AT(xc->bs, i)) {
- if (ONIGENC_IS_CODE_SB_WORD(reg->enc, i)) return 0;
+ case NT_CTYPE:
+ switch (NCTYPE(y)->ctype) {
+ case ONIGENC_CTYPE_WORD:
+ if (NCTYPE(y)->not == 0) {
+ if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) {
+ for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
+ if (BITSET_AT(xc->bs, i)) {
+ if (IS_CODE_SB_WORD(reg->enc, i)) return 0;
+ }
}
+ return 1;
}
- return 1;
+ return 0;
}
- return 0;
- break;
- case CTYPE_NOT_WORD:
- for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
- if (! ONIGENC_IS_CODE_SB_WORD(reg->enc, i)) {
- if (!IS_CCLASS_NOT(xc)) {
- if (BITSET_AT(xc->bs, i))
- return 0;
- }
- else {
- if (! BITSET_AT(xc->bs, i))
- return 0;
+ else {
+ for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
+ if (! IS_CODE_SB_WORD(reg->enc, i)) {
+ if (!IS_NCCLASS_NOT(xc)) {
+ if (BITSET_AT(xc->bs, i))
+ return 0;
+ }
+ else {
+ if (! BITSET_AT(xc->bs, i))
+ return 0;
+ }
}
}
+ return 1;
}
- return 1;
break;
default:
@@ -2480,29 +2475,29 @@ is_not_included(Node* x, Node* y, regex_t* reg)
}
break;
- case N_CCLASS:
+ case NT_CCLASS:
{
int v;
- CClassNode* yc = &(NCCLASS(y));
+ CClassNode* yc = NCCLASS(y);
for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
v = BITSET_AT(xc->bs, i);
- if ((v != 0 && !IS_CCLASS_NOT(xc)) ||
- (v == 0 && IS_CCLASS_NOT(xc))) {
+ if ((v != 0 && !IS_NCCLASS_NOT(xc)) ||
+ (v == 0 && IS_NCCLASS_NOT(xc))) {
v = BITSET_AT(yc->bs, i);
- if ((v != 0 && !IS_CCLASS_NOT(yc)) ||
- (v == 0 && IS_CCLASS_NOT(yc)))
+ if ((v != 0 && !IS_NCCLASS_NOT(yc)) ||
+ (v == 0 && IS_NCCLASS_NOT(yc)))
return 0;
}
}
- if ((IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) ||
- (IS_NULL(yc->mbuf) && !IS_CCLASS_NOT(yc)))
+ if ((IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) ||
+ (IS_NULL(yc->mbuf) && !IS_NCCLASS_NOT(yc)))
return 1;
return 0;
}
break;
- case N_STRING:
+ case NT_STR:
goto swap;
break;
@@ -2512,30 +2507,30 @@ is_not_included(Node* x, Node* y, regex_t* reg)
}
break;
- case N_STRING:
+ case NT_STR:
{
- StrNode* xs = &(NSTRING(x));
+ StrNode* xs = NSTR(x);
if (NSTRING_LEN(x) == 0)
break;
c = *(xs->s);
switch (ytype) {
- case N_CTYPE:
- switch (NCTYPE(y).type) {
- case CTYPE_WORD:
- return (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end) ? 0 : 1);
- break;
- case CTYPE_NOT_WORD:
- return (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end) ? 1 : 0);
+ case NT_CTYPE:
+ switch (NCTYPE(y)->ctype) {
+ case ONIGENC_CTYPE_WORD:
+ if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end))
+ return NCTYPE(y)->not;
+ else
+ return !(NCTYPE(y)->not);
break;
default:
break;
}
break;
- case N_CCLASS:
+ case NT_CCLASS:
{
- CClassNode* cc = &(NCCLASS(y));
+ CClassNode* cc = NCCLASS(y);
code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s,
xs->s + ONIGENC_MBC_MAXLEN(reg->enc));
@@ -2543,10 +2538,10 @@ is_not_included(Node* x, Node* y, regex_t* reg)
}
break;
- case N_STRING:
+ case NT_STR:
{
UChar *q;
- StrNode* ys = &(NSTRING(y));
+ StrNode* ys = NSTR(y);
len = NSTRING_LEN(x);
if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y);
if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) {
@@ -2580,40 +2575,34 @@ get_head_value_node(Node* node, int exact, regex_t* reg)
Node* n = NULL_NODE;
switch (NTYPE(node)) {
- case N_BACKREF:
- case N_ALT:
- case N_ANYCHAR:
+ case NT_BREF:
+ case NT_ALT:
+ case NT_CANY:
#ifdef USE_SUBEXP_CALL
- case N_CALL:
+ case NT_CALL:
#endif
break;
- case N_CTYPE:
- case N_CCLASS:
+ case NT_CTYPE:
+ case NT_CCLASS:
if (exact == 0) {
n = node;
}
break;
- case N_LIST:
- n = get_head_value_node(NCONS(node).left, exact, reg);
+ case NT_LIST:
+ n = get_head_value_node(NCAR(node), exact, reg);
break;
- case N_STRING:
+ case NT_STR:
{
- StrNode* sn = &(NSTRING(node));
+ StrNode* sn = NSTR(node);
if (sn->end <= sn->s)
break;
if (exact != 0 &&
!NSTRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) {
-#if 0
- UChar* tmp = sn->s;
- if (! ONIGENC_IS_MBC_AMBIGUOUS(reg->enc, reg->ambig_flag,
- &tmp, sn->end))
- n = node;
-#endif
}
else {
n = node;
@@ -2621,9 +2610,9 @@ get_head_value_node(Node* node, int exact, regex_t* reg)
}
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
if (qn->lower > 0) {
if (IS_NOT_NULL(qn->head_exact))
n = qn->head_exact;
@@ -2633,31 +2622,31 @@ get_head_value_node(Node* node, int exact, regex_t* reg)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_OPTION:
+ case ENCLOSE_OPTION:
{
OnigOptionType options = reg->options;
- reg->options = NEFFECT(node).option;
- n = get_head_value_node(NEFFECT(node).target, exact, reg);
+ reg->options = NENCLOSE(node)->option;
+ n = get_head_value_node(NENCLOSE(node)->target, exact, reg);
reg->options = options;
}
break;
- case EFFECT_MEMORY:
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_MEMORY:
+ case ENCLOSE_STOP_BACKTRACK:
n = get_head_value_node(en->target, exact, reg);
break;
}
}
break;
- case N_ANCHOR:
- if (NANCHOR(node).type == ANCHOR_PREC_READ)
- n = get_head_value_node(NANCHOR(node).target, exact, reg);
+ case NT_ANCHOR:
+ if (NANCHOR(node)->type == ANCHOR_PREC_READ)
+ n = get_head_value_node(NANCHOR(node)->target, exact, reg);
break;
default:
@@ -2668,45 +2657,46 @@ get_head_value_node(Node* node, int exact, regex_t* reg)
}
static int
-check_type_tree(Node* node, int type_mask, int effect_mask, int anchor_mask)
+check_type_tree(Node* node, int type_mask, int enclose_mask, int anchor_mask)
{
int type, r = 0;
type = NTYPE(node);
- if ((type & type_mask) == 0)
+ if ((NTYPE2BIT(type) & type_mask) == 0)
return 1;
switch (type) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
do {
- r = check_type_tree(NCONS(node).left, type_mask, effect_mask, anchor_mask);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = check_type_tree(NCAR(node), type_mask, enclose_mask,
+ anchor_mask);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
- r = check_type_tree(NQUANTIFIER(node).target, type_mask, effect_mask,
+ case NT_QTFR:
+ r = check_type_tree(NQTFR(node)->target, type_mask, enclose_mask,
anchor_mask);
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
- if ((en->type & effect_mask) == 0)
+ EncloseNode* en = NENCLOSE(node);
+ if ((en->type & enclose_mask) == 0)
return 1;
- r = check_type_tree(en->target, type_mask, effect_mask, anchor_mask);
+ r = check_type_tree(en->target, type_mask, enclose_mask, anchor_mask);
}
break;
- case N_ANCHOR:
- type = NANCHOR(node).type;
+ case NT_ANCHOR:
+ type = NANCHOR(node)->type;
if ((type & anchor_mask) == 0)
return 1;
- if (NANCHOR(node).target)
- r = check_type_tree(NANCHOR(node).target,
- type_mask, effect_mask, anchor_mask);
+ if (NANCHOR(node)->target)
+ r = check_type_tree(NANCHOR(node)->target,
+ type_mask, enclose_mask, anchor_mask);
break;
default:
@@ -2728,7 +2718,7 @@ subexp_inf_recursive_check(Node* node, ScanEnv* env, int head)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
{
Node *x;
OnigDistance min;
@@ -2736,40 +2726,40 @@ subexp_inf_recursive_check(Node* node, ScanEnv* env, int head)
x = node;
do {
- ret = subexp_inf_recursive_check(NCONS(x).left, env, head);
+ ret = subexp_inf_recursive_check(NCAR(x), env, head);
if (ret < 0 || ret == RECURSION_INFINITE) return ret;
r |= ret;
if (head) {
- ret = get_min_match_length(NCONS(x).left, &min, env);
+ ret = get_min_match_length(NCAR(x), &min, env);
if (ret != 0) return ret;
if (min != 0) head = 0;
}
- } while (IS_NOT_NULL(x = NCONS(x).right));
+ } while (IS_NOT_NULL(x = NCDR(x)));
}
break;
- case N_ALT:
+ case NT_ALT:
{
int ret;
r = RECURSION_EXIST;
do {
- ret = subexp_inf_recursive_check(NCONS(node).left, env, head);
+ ret = subexp_inf_recursive_check(NCAR(node), env, head);
if (ret < 0 || ret == RECURSION_INFINITE) return ret;
r &= ret;
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ } while (IS_NOT_NULL(node = NCDR(node)));
}
break;
- case N_QUANTIFIER:
- r = subexp_inf_recursive_check(NQUANTIFIER(node).target, env, head);
+ case NT_QTFR:
+ r = subexp_inf_recursive_check(NQTFR(node)->target, env, head);
if (r == RECURSION_EXIST) {
- if (NQUANTIFIER(node).lower == 0) r = 0;
+ if (NQTFR(node)->lower == 0) r = 0;
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
{
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
switch (an->type) {
case ANCHOR_PREC_READ:
case ANCHOR_PREC_READ_NOT:
@@ -2781,19 +2771,19 @@ subexp_inf_recursive_check(Node* node, ScanEnv* env, int head)
}
break;
- case N_CALL:
- r = subexp_inf_recursive_check(NCALL(node).target, env, head);
+ case NT_CALL:
+ r = subexp_inf_recursive_check(NCALL(node)->target, env, head);
break;
- case N_EFFECT:
- if (IS_EFFECT_MARK2(&(NEFFECT(node))))
+ case NT_ENCLOSE:
+ if (IS_ENCLOSE_MARK2(NENCLOSE(node)))
return 0;
- else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
+ else if (IS_ENCLOSE_MARK1(NENCLOSE(node)))
return (head == 0 ? RECURSION_EXIST : RECURSION_INFINITE);
else {
- SET_EFFECT_STATUS(node, NST_MARK2);
- r = subexp_inf_recursive_check(NEFFECT(node).target, env, head);
- CLEAR_EFFECT_STATUS(node, NST_MARK2);
+ SET_ENCLOSE_STATUS(node, NST_MARK2);
+ r = subexp_inf_recursive_check(NENCLOSE(node)->target, env, head);
+ CLEAR_ENCLOSE_STATUS(node, NST_MARK2);
}
break;
@@ -2812,20 +2802,20 @@ subexp_inf_recursive_check_trav(Node* node, ScanEnv* env)
type = NTYPE(node);
switch (type) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
do {
- r = subexp_inf_recursive_check_trav(NCONS(node).left, env);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = subexp_inf_recursive_check_trav(NCAR(node), env);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
- r = subexp_inf_recursive_check_trav(NQUANTIFIER(node).target, env);
+ case NT_QTFR:
+ r = subexp_inf_recursive_check_trav(NQTFR(node)->target, env);
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
{
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
switch (an->type) {
case ANCHOR_PREC_READ:
case ANCHOR_PREC_READ_NOT:
@@ -2837,15 +2827,15 @@ subexp_inf_recursive_check_trav(Node* node, ScanEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
- if (IS_EFFECT_RECURSION(en)) {
- SET_EFFECT_STATUS(node, NST_MARK1);
+ if (IS_ENCLOSE_RECURSION(en)) {
+ SET_ENCLOSE_STATUS(node, NST_MARK1);
r = subexp_inf_recursive_check(en->target, env, 1);
if (r > 0) return ONIGERR_NEVER_ENDING_RECURSION;
- CLEAR_EFFECT_STATUS(node, NST_MARK1);
+ CLEAR_ENCLOSE_STATUS(node, NST_MARK1);
}
r = subexp_inf_recursive_check_trav(en->target, env);
}
@@ -2862,25 +2852,23 @@ subexp_inf_recursive_check_trav(Node* node, ScanEnv* env)
static int
subexp_recursive_check(Node* node)
{
- int type;
int r = 0;
- type = NTYPE(node);
- switch (type) {
- case N_LIST:
- case N_ALT:
+ switch (NTYPE(node)) {
+ case NT_LIST:
+ case NT_ALT:
do {
- r |= subexp_recursive_check(NCONS(node).left);
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ r |= subexp_recursive_check(NCAR(node));
+ } while (IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
- r = subexp_recursive_check(NQUANTIFIER(node).target);
+ case NT_QTFR:
+ r = subexp_recursive_check(NQTFR(node)->target);
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
{
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
switch (an->type) {
case ANCHOR_PREC_READ:
case ANCHOR_PREC_READ_NOT:
@@ -2892,20 +2880,20 @@ subexp_recursive_check(Node* node)
}
break;
- case N_CALL:
- r = subexp_recursive_check(NCALL(node).target);
+ case NT_CALL:
+ r = subexp_recursive_check(NCALL(node)->target);
if (r != 0) SET_CALL_RECURSION(node);
break;
- case N_EFFECT:
- if (IS_EFFECT_MARK2(&(NEFFECT(node))))
+ case NT_ENCLOSE:
+ if (IS_ENCLOSE_MARK2(NENCLOSE(node)))
return 0;
- else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
+ else if (IS_ENCLOSE_MARK1(NENCLOSE(node)))
return 1; /* recursion */
else {
- SET_EFFECT_STATUS(node, NST_MARK2);
- r = subexp_recursive_check(NEFFECT(node).target);
- CLEAR_EFFECT_STATUS(node, NST_MARK2);
+ SET_ENCLOSE_STATUS(node, NST_MARK2);
+ r = subexp_recursive_check(NENCLOSE(node)->target);
+ CLEAR_ENCLOSE_STATUS(node, NST_MARK2);
}
break;
@@ -2927,29 +2915,29 @@ subexp_recursive_check_trav(Node* node, ScanEnv* env)
type = NTYPE(node);
switch (type) {
- case N_LIST:
- case N_ALT:
+ case NT_LIST:
+ case NT_ALT:
{
int ret;
do {
- ret = subexp_recursive_check_trav(NCONS(node).left, env);
+ ret = subexp_recursive_check_trav(NCAR(node), env);
if (ret == FOUND_CALLED_NODE) r = FOUND_CALLED_NODE;
else if (ret < 0) return ret;
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ } while (IS_NOT_NULL(node = NCDR(node)));
}
break;
- case N_QUANTIFIER:
- r = subexp_recursive_check_trav(NQUANTIFIER(node).target, env);
- if (NQUANTIFIER(node).upper == 0) {
+ case NT_QTFR:
+ r = subexp_recursive_check_trav(NQTFR(node)->target, env);
+ if (NQTFR(node)->upper == 0) {
if (r == FOUND_CALLED_NODE)
- NQUANTIFIER(node).is_refered = 1;
+ NQTFR(node)->is_refered = 1;
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
{
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
switch (an->type) {
case ANCHOR_PREC_READ:
case ANCHOR_PREC_READ_NOT:
@@ -2961,20 +2949,20 @@ subexp_recursive_check_trav(Node* node, ScanEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
- if (! IS_EFFECT_RECURSION(en)) {
- if (IS_EFFECT_CALLED(en)) {
- SET_EFFECT_STATUS(node, NST_MARK1);
+ if (! IS_ENCLOSE_RECURSION(en)) {
+ if (IS_ENCLOSE_CALLED(en)) {
+ SET_ENCLOSE_STATUS(node, NST_MARK1);
r = subexp_recursive_check(en->target);
- if (r != 0) SET_EFFECT_STATUS(node, NST_RECURSION);
- CLEAR_EFFECT_STATUS(node, NST_MARK1);
+ if (r != 0) SET_ENCLOSE_STATUS(node, NST_RECURSION);
+ CLEAR_ENCLOSE_STATUS(node, NST_MARK1);
}
}
r = subexp_recursive_check_trav(en->target, env);
- if (IS_EFFECT_CALLED(en))
+ if (IS_ENCLOSE_CALLED(en))
r |= FOUND_CALLED_NODE;
}
break;
@@ -2994,46 +2982,33 @@ setup_subexp_call(Node* node, ScanEnv* env)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
do {
- r = setup_subexp_call(NCONS(node).left, env);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = setup_subexp_call(NCAR(node), env);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_ALT:
+ case NT_ALT:
do {
- r = setup_subexp_call(NCONS(node).left, env);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = setup_subexp_call(NCAR(node), env);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_QUANTIFIER:
- r = setup_subexp_call(NQUANTIFIER(node).target, env);
+ case NT_QTFR:
+ r = setup_subexp_call(NQTFR(node)->target, env);
break;
- case N_EFFECT:
- r = setup_subexp_call(NEFFECT(node).target, env);
+ case NT_ENCLOSE:
+ r = setup_subexp_call(NENCLOSE(node)->target, env);
break;
- case N_CALL:
+ case NT_CALL:
{
- int n, num, *refs;
- UChar *p;
- CallNode* cn = &(NCALL(node));
+ CallNode* cn = NCALL(node);
Node** nodes = SCANENV_MEM_NODES(env);
-#ifdef USE_NAMED_GROUP
- n = onig_name_to_group_numbers(env->reg, cn->name, cn->name_end, &refs);
-#else
- n = -1;
-#endif
- if (n <= 0) {
- /* name not found, check group number. (?*ddd) */
- p = cn->name;
- num = onig_scan_unsigned_number(&p, cn->name_end, env->enc);
- if (num <= 0 || p != cn->name_end) {
- onig_scan_env_set_error_string(env,
- ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
- return ONIGERR_UNDEFINED_NAME_REFERENCE;
- }
+ if (cn->group_num != 0) {
+ int gnum = cn->group_num;
+
#ifdef USE_NAMED_GROUP
if (env->num_named > 0 &&
IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
@@ -3041,38 +3016,53 @@ setup_subexp_call(Node* node, ScanEnv* env)
return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
}
#endif
- if (num > env->num_mem) {
+ if (gnum > env->num_mem) {
onig_scan_env_set_error_string(env,
ONIGERR_UNDEFINED_GROUP_REFERENCE, cn->name, cn->name_end);
return ONIGERR_UNDEFINED_GROUP_REFERENCE;
}
- cn->ref_num = num;
- goto set_call_attr;
- }
- else if (n > 1) {
- onig_scan_env_set_error_string(env,
- ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, cn->name, cn->name_end);
- return ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL;
- }
- else {
- cn->ref_num = refs[0];
+
+#ifdef USE_NAMED_GROUP
set_call_attr:
- cn->target = nodes[cn->ref_num];
+#endif
+ cn->target = nodes[cn->group_num];
if (IS_NULL(cn->target)) {
onig_scan_env_set_error_string(env,
- ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
+ ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
return ONIGERR_UNDEFINED_NAME_REFERENCE;
}
- SET_EFFECT_STATUS(cn->target, NST_CALLED);
- BIT_STATUS_ON_AT(env->bt_mem_start, cn->ref_num);
+ SET_ENCLOSE_STATUS(cn->target, NST_CALLED);
+ BIT_STATUS_ON_AT(env->bt_mem_start, cn->group_num);
cn->unset_addr_list = env->unset_addr_list;
}
+#ifdef USE_NAMED_GROUP
+ else {
+ int *refs;
+
+ int n = onig_name_to_group_numbers(env->reg, cn->name, cn->name_end,
+ &refs);
+ if (n <= 0) {
+ onig_scan_env_set_error_string(env,
+ ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
+ return ONIGERR_UNDEFINED_NAME_REFERENCE;
+ }
+ else if (n > 1) {
+ onig_scan_env_set_error_string(env,
+ ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, cn->name, cn->name_end);
+ return ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL;
+ }
+ else {
+ cn->group_num = refs[0];
+ goto set_call_attr;
+ }
+ }
+#endif
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
{
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
switch (an->type) {
case ANCHOR_PREC_READ:
@@ -3100,30 +3090,29 @@ setup_subexp_call(Node* node, ScanEnv* env)
static int
divide_look_behind_alternatives(Node* node)
{
- Node tmp_node;
Node *head, *np, *insert_node;
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
int anc_type = an->type;
head = an->target;
- np = NCONS(head).left;
- tmp_node = *node; *node = *head; *head = tmp_node;
- NCONS(node).left = head;
- NANCHOR(head).target = np;
+ np = NCAR(head);
+ swap_node(node, head);
+ NCAR(node) = head;
+ NANCHOR(head)->target = np;
np = node;
- while ((np = NCONS(np).right) != NULL_NODE) {
+ while ((np = NCDR(np)) != NULL_NODE) {
insert_node = onig_node_new_anchor(anc_type);
- CHECK_NULL_RETURN_VAL(insert_node, ONIGERR_MEMORY);
- NANCHOR(insert_node).target = NCONS(np).left;
- NCONS(np).left = insert_node;
+ CHECK_NULL_RETURN_MEMERR(insert_node);
+ NANCHOR(insert_node)->target = NCAR(np);
+ NCAR(np) = insert_node;
}
if (anc_type == ANCHOR_LOOK_BEHIND_NOT) {
np = node;
do {
- np->type = N_LIST; /* alt -> list */
- } while ((np = NCONS(np).right) != NULL_NODE);
+ SET_NTYPE(np, NT_LIST); /* alt -> list */
+ } while ((np = NCDR(np)) != NULL_NODE);
}
return 0;
}
@@ -3132,7 +3121,7 @@ static int
setup_look_behind(Node* node, regex_t* reg, ScanEnv* env)
{
int r, len;
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
r = get_char_length_tree(an->target, reg, &len);
if (r == 0)
@@ -3156,11 +3145,15 @@ next_setup(Node* node, Node* next_node, regex_t* reg)
retry:
type = NTYPE(node);
- if (type == N_QUANTIFIER) {
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ if (type == NT_QTFR) {
+ QtfrNode* qn = NQTFR(node);
if (qn->greedy && IS_REPEAT_INFINITE(qn->upper)) {
-#ifdef USE_QUANTIFIER_PEEK_NEXT
- qn->next_head_exact = get_head_value_node(next_node, 1, reg);
+#ifdef USE_QTFR_PEEK_NEXT
+ Node* n = get_head_value_node(next_node, 1, reg);
+ /* '\0': for UTF-16BE etc... */
+ if (IS_NOT_NULL(n) && NSTR(n)->s[0] != '\0') {
+ qn->next_head_exact = n;
+ }
#endif
/* automatic posseivation a*b ==> (?>a*)b */
if (qn->lower <= 1) {
@@ -3171,20 +3164,20 @@ next_setup(Node* node, Node* next_node, regex_t* reg)
if (IS_NOT_NULL(x)) {
y = get_head_value_node(next_node, 0, reg);
if (IS_NOT_NULL(y) && is_not_included(x, y, reg)) {
- Node* en = onig_node_new_effect(EFFECT_STOP_BACKTRACK);
- CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
- SET_EFFECT_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT);
+ Node* en = onig_node_new_enclose(ENCLOSE_STOP_BACKTRACK);
+ CHECK_NULL_RETURN_MEMERR(en);
+ SET_ENCLOSE_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT);
swap_node(node, en);
- NEFFECT(node).target = en;
+ NENCLOSE(node)->target = en;
}
}
}
}
}
}
- else if (type == N_EFFECT) {
- EffectNode* en = &(NEFFECT(node));
- if (en->type == EFFECT_MEMORY) {
+ else if (type == NT_ENCLOSE) {
+ EncloseNode* en = NENCLOSE(node);
+ if (en->type == ENCLOSE_MEMORY) {
node = en->target;
goto retry;
}
@@ -3194,100 +3187,318 @@ next_setup(Node* node, Node* next_node, regex_t* reg)
static int
-divide_ambig_string_node_sub(regex_t* reg, int prev_ambig,
- UChar* prev_start, UChar* prev,
- UChar* end, Node*** tailp, Node** root)
+update_string_node_case_fold(regex_t* reg, Node *node)
{
- UChar *tmp, *wp;
- Node* snode;
+ UChar *p, *q, *end, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
+ UChar *sbuf, *ebuf, *sp;
+ int r, i, len, sbuf_size;
+ StrNode* sn = NSTR(node);
+
+ end = sn->end;
+ sbuf_size = (end - sn->s) * 2;
+ sbuf = (UChar* )xmalloc(sbuf_size);
+ CHECK_NULL_RETURN_MEMERR(sbuf);
+ ebuf = sbuf + sbuf_size;
- if (prev_ambig != 0) {
- tmp = prev_start;
- wp = prev_start;
- while (tmp < prev) {
- wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
- &tmp, end, wp);
+ sp = sbuf;
+ p = sn->s;
+ while (p < end) {
+ len = ONIGENC_MBC_CASE_FOLD(reg->enc, reg->case_fold_flag, &p, end, buf);
+ q = buf;
+ for (i = 0; i < len; i++) {
+ if (sp >= ebuf) {
+ sbuf = (UChar* )xrealloc(sbuf, sbuf_size * 2);
+ CHECK_NULL_RETURN_MEMERR(sbuf);
+ sp = sbuf + sbuf_size;
+ sbuf_size *= 2;
+ ebuf = sbuf + sbuf_size;
+ }
+
+ *sp++ = buf[i];
}
- snode = onig_node_new_str(prev_start, wp);
- CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
- NSTRING_SET_AMBIG(snode);
- if (wp != prev) NSTRING_SET_AMBIG_REDUCE(snode);
}
- else {
- snode = onig_node_new_str(prev_start, prev);
- CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
+
+ r = onig_node_str_set(node, sbuf, sp);
+ if (r != 0) {
+ xfree(sbuf);
+ return r;
+ }
+
+ xfree(sbuf);
+ return 0;
+}
+
+static int
+expand_case_fold_make_rem_string(Node** rnode, UChar *s, UChar *end,
+ regex_t* reg)
+{
+ int r;
+ Node *node;
+
+ node = onig_node_new_str(s, end);
+ if (IS_NULL(node)) return ONIGERR_MEMORY;
+
+ r = update_string_node_case_fold(reg, node);
+ if (r != 0) {
+ onig_node_free(node);
+ return r;
+ }
+
+ NSTRING_SET_AMBIG(node);
+ NSTRING_SET_DONT_GET_OPT_INFO(node);
+ *rnode = node;
+ return 0;
+}
+
+static int
+expand_case_fold_string_alt(int item_num, OnigCaseFoldCodeItem items[],
+ UChar *p, int slen, UChar *end,
+ regex_t* reg, Node **rnode)
+{
+ int r, i, j, len, varlen;
+ Node *anode, *var_anode, *snode, *xnode, *an;
+ UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
+
+ *rnode = var_anode = NULL_NODE;
+
+ varlen = 0;
+ for (i = 0; i < item_num; i++) {
+ if (items[i].byte_len != slen) {
+ varlen = 1;
+ break;
+ }
}
- if (*tailp == (Node** )0) {
- *root = onig_node_new_list(snode, NULL);
- CHECK_NULL_RETURN_VAL(*root, ONIGERR_MEMORY);
- *tailp = &(NCONS(*root).right);
+ if (varlen != 0) {
+ *rnode = var_anode = onig_node_new_alt(NULL_NODE, NULL_NODE);
+ if (IS_NULL(var_anode)) return ONIGERR_MEMORY;
+
+ xnode = onig_node_new_list(NULL, NULL);
+ if (IS_NULL(xnode)) goto mem_err;
+ NCAR(var_anode) = xnode;
+
+ anode = onig_node_new_alt(NULL_NODE, NULL_NODE);
+ if (IS_NULL(anode)) goto mem_err;
+ NCAR(xnode) = anode;
}
else {
- **tailp = onig_node_new_list(snode, NULL);
- CHECK_NULL_RETURN_VAL(**tailp, ONIGERR_MEMORY);
- *tailp = &(NCONS(**tailp).right);
+ *rnode = anode = onig_node_new_alt(NULL_NODE, NULL_NODE);
+ if (IS_NULL(anode)) return ONIGERR_MEMORY;
}
- return 0;
+ snode = onig_node_new_str(p, p + slen);
+ if (IS_NULL(snode)) goto mem_err;
+
+ NCAR(anode) = snode;
+
+ for (i = 0; i < item_num; i++) {
+ snode = onig_node_new_str(NULL, NULL);
+ if (IS_NULL(snode)) goto mem_err;
+
+ for (j = 0; j < items[i].code_len; j++) {
+ len = ONIGENC_CODE_TO_MBC(reg->enc, items[i].code[j], buf);
+ if (len < 0) {
+ r = len;
+ goto mem_err2;
+ }
+
+ r = onig_node_str_cat(snode, buf, buf + len);
+ if (r != 0) goto mem_err2;
+ }
+
+ an = onig_node_new_alt(NULL_NODE, NULL_NODE);
+ if (IS_NULL(an)) {
+ goto mem_err2;
+ }
+
+ if (items[i].byte_len != slen) {
+ Node *rem;
+ UChar *q = p + items[i].byte_len;
+
+ if (q < end) {
+ r = expand_case_fold_make_rem_string(&rem, q, end, reg);
+ if (r != 0) {
+ onig_node_free(an);
+ goto mem_err2;
+ }
+
+ xnode = onig_node_list_add(NULL_NODE, snode);
+ if (IS_NULL(xnode)) {
+ onig_node_free(an);
+ onig_node_free(rem);
+ goto mem_err2;
+ }
+ if (IS_NULL(onig_node_list_add(xnode, rem))) {
+ onig_node_free(an);
+ onig_node_free(xnode);
+ onig_node_free(rem);
+ goto mem_err;
+ }
+
+ NCAR(an) = xnode;
+ }
+ else {
+ NCAR(an) = snode;
+ }
+
+ NCDR(var_anode) = an;
+ var_anode = an;
+ }
+ else {
+ NCAR(an) = snode;
+ NCDR(anode) = an;
+ anode = an;
+ }
+ }
+
+ return varlen;
+
+ mem_err2:
+ onig_node_free(snode);
+
+ mem_err:
+ onig_node_free(*rnode);
+
+ return ONIGERR_MEMORY;
}
static int
-divide_ambig_string_node(Node* node, regex_t* reg)
+expand_case_fold_string(Node* node, regex_t* reg)
{
- StrNode* sn = &NSTRING(node);
- int ambig, prev_ambig;
- UChar *prev, *p, *end, *prev_start, *start, *tmp, *wp;
- Node *root = NULL_NODE;
- Node **tailp = (Node** )0;
- int r;
+#define THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8
- start = prev_start = p = sn->s;
- end = sn->end;
- if (p >= end) return 0;
+ int r, n, len, alt_num;
+ UChar *start, *end, *p;
+ Node *top_root, *root, *snode, *prev_node;
+ OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM];
+ StrNode* sn = NSTR(node);
- prev_ambig = ONIGENC_IS_MBC_AMBIGUOUS(reg->enc, reg->ambig_flag, &p, end);
+ if (NSTRING_IS_AMBIG(node)) return 0;
+ start = sn->s;
+ end = sn->end;
+ if (start >= end) return 0;
+
+ r = 0;
+ top_root = root = prev_node = snode = NULL_NODE;
+ alt_num = 1;
+ p = start;
while (p < end) {
- prev = p;
- if (prev_ambig != (ambig = ONIGENC_IS_MBC_AMBIGUOUS(reg->enc,
- reg->ambig_flag, &p, end))) {
+ n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(reg->enc, reg->case_fold_flag,
+ p, end, items);
+ if (n < 0) {
+ r = n;
+ goto err;
+ }
+
+ len = enclen(reg->enc, p);
+
+ if (n == 0) {
+ if (IS_NULL(snode)) {
+ if (IS_NULL(root) && IS_NOT_NULL(prev_node)) {
+ top_root = root = onig_node_list_add(NULL_NODE, prev_node);
+ if (IS_NULL(root)) {
+ onig_node_free(prev_node);
+ goto mem_err;
+ }
+ }
- r = divide_ambig_string_node_sub(reg, prev_ambig, prev_start, prev,
- end, &tailp, &root);
- if (r != 0) return r;
+ prev_node = snode = onig_node_new_str(NULL, NULL);
+ if (IS_NULL(snode)) goto mem_err;
+ if (IS_NOT_NULL(root)) {
+ if (IS_NULL(onig_node_list_add(root, snode))) {
+ onig_node_free(snode);
+ goto mem_err;
+ }
+ }
+ }
- prev_ambig = ambig;
- prev_start = prev;
+ r = onig_node_str_cat(snode, p, p + len);
+ if (r != 0) goto err;
}
- }
+ else {
+ alt_num *= (n + 1);
+ if (alt_num > THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION) break;
+
+ if (IS_NULL(root) && IS_NOT_NULL(prev_node)) {
+ top_root = root = onig_node_list_add(NULL_NODE, prev_node);
+ if (IS_NULL(root)) {
+ onig_node_free(prev_node);
+ goto mem_err;
+ }
+ }
- if (prev_start == start) {
- if (prev_ambig != 0) {
- NSTRING_SET_AMBIG(node);
- tmp = start;
- wp = start;
- while (tmp < end) {
- wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
- &tmp, end, wp);
+ r = expand_case_fold_string_alt(n, items, p, len, end, reg, &prev_node);
+ if (r < 0) goto mem_err;
+ if (r == 1) {
+ if (IS_NULL(root)) {
+ top_root = prev_node;
+ }
+ else {
+ if (IS_NULL(onig_node_list_add(root, prev_node))) {
+ onig_node_free(prev_node);
+ goto mem_err;
+ }
+ }
+
+ root = NCAR(prev_node);
+ }
+ else { /* r == 0 */
+ if (IS_NOT_NULL(root)) {
+ if (IS_NULL(onig_node_list_add(root, prev_node))) {
+ onig_node_free(prev_node);
+ goto mem_err;
+ }
+ }
}
- if (wp != sn->end) NSTRING_SET_AMBIG_REDUCE(node);
- sn->end = wp;
+
+ snode = NULL_NODE;
}
+
+ p += len;
}
- else {
- r = divide_ambig_string_node_sub(reg, prev_ambig, prev_start, end,
- end, &tailp, &root);
- if (r != 0) return r;
- swap_node(node, root);
- onig_node_str_clear(root); /* should be after swap! */
- onig_node_free(root); /* free original string node */
+ if (p < end) {
+ Node *srem;
+
+ r = expand_case_fold_make_rem_string(&srem, p, end, reg);
+ if (r != 0) goto mem_err;
+
+ if (IS_NOT_NULL(prev_node) && IS_NULL(root)) {
+ top_root = root = onig_node_list_add(NULL_NODE, prev_node);
+ if (IS_NULL(root)) {
+ onig_node_free(srem);
+ onig_node_free(prev_node);
+ goto mem_err;
+ }
+ }
+
+ if (IS_NULL(root)) {
+ prev_node = srem;
+ }
+ else {
+ if (IS_NULL(onig_node_list_add(root, srem))) {
+ onig_node_free(srem);
+ goto mem_err;
+ }
+ }
}
+ /* ending */
+ top_root = (IS_NOT_NULL(top_root) ? top_root : prev_node);
+ swap_node(node, top_root);
+ onig_node_free(top_root);
return 0;
+
+ mem_err:
+ r = ONIGERR_MEMORY;
+
+ err:
+ onig_node_free(top_root);
+ return r;
}
+
#ifdef USE_COMBINATION_EXPLOSION_CHECK
#define CEC_THRES_NUM_BIG_REPEAT 512
@@ -3305,31 +3516,31 @@ setup_comb_exp_check(Node* node, int state, ScanEnv* env)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
{
Node* prev = NULL_NODE;
do {
- r = setup_comb_exp_check(NCONS(node).left, r, env);
- prev = NCONS(node).left;
- } while (r >= 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = setup_comb_exp_check(NCAR(node), r, env);
+ prev = NCAR(node);
+ } while (r >= 0 && IS_NOT_NULL(node = NCDR(node)));
}
break;
- case N_ALT:
+ case NT_ALT:
{
int ret;
do {
- ret = setup_comb_exp_check(NCONS(node).left, state, env);
+ ret = setup_comb_exp_check(NCAR(node), state, env);
r |= ret;
- } while (ret >= 0 && IS_NOT_NULL(node = NCONS(node).right));
+ } while (ret >= 0 && IS_NOT_NULL(node = NCDR(node)));
}
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{
int child_state = state;
int add_state = 0;
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
Node* target = qn->target;
int var_num;
@@ -3340,11 +3551,11 @@ setup_comb_exp_check(Node* node, int state, ScanEnv* env)
/* check (a*){n,m}, (a+){n,m} => (a*){n,n}, (a+){n,n} */
if (env->backrefed_mem == 0) {
- if (NTYPE(qn->target) == N_EFFECT) {
- EffectNode* en = &(NEFFECT(qn->target));
- if (en->type == EFFECT_MEMORY) {
- if (NTYPE(en->target) == N_QUANTIFIER) {
- QuantifierNode* q = &(NQUANTIFIER(en->target));
+ if (NTYPE(qn->target) == NT_ENCLOSE) {
+ EncloseNode* en = NENCLOSE(qn->target);
+ if (en->type == ENCLOSE_MEMORY) {
+ if (NTYPE(en->target) == NT_QTFR) {
+ QtfrNode* q = NQTFR(en->target);
if (IS_REPEAT_INFINITE(q->upper)
&& q->greedy == qn->greedy) {
qn->upper = (qn->lower == 0 ? 1 : qn->lower);
@@ -3390,12 +3601,12 @@ setup_comb_exp_check(Node* node, int state, ScanEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
{
if (env->curr_max_regnum < en->regnum)
env->curr_max_regnum = en->regnum;
@@ -3412,11 +3623,11 @@ setup_comb_exp_check(Node* node, int state, ScanEnv* env)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- if (IS_CALL_RECURSION(&(NCALL(node))))
+ case NT_CALL:
+ if (IS_CALL_RECURSION(NCALL(node)))
env->has_recursion = 1;
else
- r = setup_comb_exp_check(NCALL(node).target, state, env);
+ r = setup_comb_exp_check(NCALL(node)->target, state, env);
break;
#endif
@@ -3449,68 +3660,68 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
{
Node* prev = NULL_NODE;
do {
- r = setup_tree(NCONS(node).left, reg, state, env);
+ r = setup_tree(NCAR(node), reg, state, env);
if (IS_NOT_NULL(prev) && r == 0) {
- r = next_setup(prev, NCONS(node).left, reg);
+ r = next_setup(prev, NCAR(node), reg);
}
- prev = NCONS(node).left;
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ prev = NCAR(node);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
}
break;
- case N_ALT:
+ case NT_ALT:
do {
- r = setup_tree(NCONS(node).left, reg, (state | IN_ALT), env);
- } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
+ r = setup_tree(NCAR(node), reg, (state | IN_ALT), env);
+ } while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
- case N_CCLASS:
+ case NT_CCLASS:
break;
- case N_STRING:
+ case NT_STR:
if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
- r = divide_ambig_string_node(node, reg);
+ r = expand_case_fold_string(node, reg);
}
break;
- case N_CTYPE:
- case N_ANYCHAR:
+ case NT_CTYPE:
+ case NT_CANY:
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
+ case NT_CALL:
break;
#endif
- case N_BACKREF:
+ case NT_BREF:
{
int i;
int* p;
Node** nodes = SCANENV_MEM_NODES(env);
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
p = BACKREFS_P(br);
for (i = 0; i < br->back_num; i++) {
if (p[i] > env->num_mem) return ONIGERR_INVALID_BACKREF;
BIT_STATUS_ON_AT(env->backrefed_mem, p[i]);
BIT_STATUS_ON_AT(env->bt_mem_start, p[i]);
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
if (IS_BACKREF_NEST_LEVEL(br)) {
BIT_STATUS_ON_AT(env->bt_mem_end, p[i]);
}
#endif
- SET_EFFECT_STATUS(nodes[p[i]], NST_MEM_BACKREFED);
+ SET_ENCLOSE_STATUS(nodes[p[i]], NST_MEM_BACKREFED);
}
}
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{
OnigDistance d;
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
Node* target = qn->target;
if ((state & IN_REPEAT) != 0) {
@@ -3522,7 +3733,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
if (r) break;
if (d == 0) {
qn->target_empty_info = NQ_TARGET_IS_EMPTY;
-#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
+#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT
r = quantifiers_memory_node_info(target);
if (r < 0) break;
if (r > 0) {
@@ -3535,7 +3746,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
/* ()* ==> ()?, ()+ ==> () */
qn->upper = 1;
if (qn->lower > 1) qn->lower = 1;
- if (NTYPE(target) == N_STRING) {
+ if (NTYPE(target) == NT_STR) {
qn->upper = qn->lower = 0; /* /(?:)+/ ==> // */
}
}
@@ -3551,29 +3762,29 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
/* expand string */
#define EXPAND_STRING_MAX_LENGTH 100
- if (NTYPE(target) == N_STRING) {
+ if (NTYPE(target) == NT_STR) {
if (!IS_REPEAT_INFINITE(qn->lower) && qn->lower == qn->upper &&
qn->lower > 1 && qn->lower <= EXPAND_STRING_MAX_LENGTH) {
int len = NSTRING_LEN(target);
- StrNode* sn = &(NSTRING(target));
+ StrNode* sn = NSTR(target);
if (len * qn->lower <= EXPAND_STRING_MAX_LENGTH) {
int i, n = qn->lower;
- onig_node_conv_to_str_node(node, NSTRING(target).flag);
+ onig_node_conv_to_str_node(node, NSTR(target)->flag);
for (i = 0; i < n; i++) {
r = onig_node_str_cat(node, sn->s, sn->end);
if (r) break;
}
onig_node_free(target);
- break; /* break case N_QUANTIFIER: */
+ break; /* break case NT_QTFR: */
}
}
}
#ifdef USE_OP_PUSH_OR_JUMP_EXACT
if (qn->greedy && (qn->target_empty_info != 0)) {
- if (NTYPE(target) == N_QUANTIFIER) {
- QuantifierNode* tqn = &(NQUANTIFIER(target));
+ if (NTYPE(target) == NT_QTFR) {
+ QtfrNode* tqn = NQTFR(target);
if (IS_NOT_NULL(tqn->head_exact)) {
qn->head_exact = tqn->head_exact;
tqn->head_exact = NULL;
@@ -3587,39 +3798,39 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_OPTION:
+ case ENCLOSE_OPTION:
{
OnigOptionType options = reg->options;
- reg->options = NEFFECT(node).option;
- r = setup_tree(NEFFECT(node).target, reg, state, env);
+ reg->options = NENCLOSE(node)->option;
+ r = setup_tree(NENCLOSE(node)->target, reg, state, env);
reg->options = options;
}
break;
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT)) != 0) {
BIT_STATUS_ON_AT(env->bt_mem_start, en->regnum);
- /* SET_EFFECT_STATUS(node, NST_MEM_IN_ALT_NOT); */
+ /* SET_ENCLOSE_STATUS(node, NST_MEM_IN_ALT_NOT); */
}
r = setup_tree(en->target, reg, state, env);
break;
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_STOP_BACKTRACK:
{
Node* target = en->target;
r = setup_tree(target, reg, state, env);
- if (NTYPE(target) == N_QUANTIFIER) {
- QuantifierNode* tqn = &(NQUANTIFIER(target));
+ if (NTYPE(target) == NT_QTFR) {
+ QtfrNode* tqn = NQTFR(target);
if (IS_REPEAT_INFINITE(tqn->upper) && tqn->lower <= 1 &&
tqn->greedy != 0) { /* (?>a*), a*+ etc... */
int qtype = NTYPE(tqn->target);
if (IS_NODE_TYPE_SIMPLE(qtype))
- SET_EFFECT_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT);
+ SET_ENCLOSE_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT);
}
}
}
@@ -3628,9 +3839,9 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
}
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
{
- AnchorNode* an = &(NANCHOR(node));
+ AnchorNode* an = NANCHOR(node);
switch (an->type) {
case ANCHOR_PREC_READ:
@@ -3642,11 +3853,11 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
/* allowed node types in look-behind */
#define ALLOWED_TYPE_IN_LB \
- ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
- N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUANTIFIER | N_CALL )
+ ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \
+ BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL )
-#define ALLOWED_EFFECT_IN_LB ( EFFECT_MEMORY )
-#define ALLOWED_EFFECT_IN_LB_NOT 0
+#define ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY )
+#define ALLOWED_ENCLOSE_IN_LB_NOT 0
#define ALLOWED_ANCHOR_IN_LB \
( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION )
@@ -3656,7 +3867,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
case ANCHOR_LOOK_BEHIND:
{
r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
- ALLOWED_EFFECT_IN_LB, ALLOWED_ANCHOR_IN_LB);
+ ALLOWED_ENCLOSE_IN_LB, ALLOWED_ANCHOR_IN_LB);
if (r < 0) return r;
if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
r = setup_look_behind(node, reg, env);
@@ -3668,7 +3879,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
case ANCHOR_LOOK_BEHIND_NOT:
{
r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
- ALLOWED_EFFECT_IN_LB_NOT, ALLOWED_ANCHOR_IN_LB_NOT);
+ ALLOWED_ENCLOSE_IN_LB_NOT, ALLOWED_ANCHOR_IN_LB_NOT);
if (r < 0) return r;
if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
r = setup_look_behind(node, reg, env);
@@ -3689,7 +3900,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
/* set skip map for Boyer-Moor search */
static int
-set_bm_skip(UChar* s, UChar* end, OnigEncoding enc,
+set_bm_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED,
UChar skip[], int** int_skip)
{
int i, len;
@@ -3722,11 +3933,11 @@ typedef struct {
} MinMaxLen;
typedef struct {
- MinMaxLen mmd;
- OnigEncoding enc;
- OnigOptionType options;
- OnigAmbigType ambig_flag;
- ScanEnv* scan_env;
+ MinMaxLen mmd;
+ OnigEncoding enc;
+ OnigOptionType options;
+ OnigCaseFoldType case_fold_flag;
+ ScanEnv* scan_env;
} OptEnv;
typedef struct {
@@ -3778,7 +3989,7 @@ map_position_value(OnigEncoding enc, int i)
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 1
};
- if (i < sizeof(ByteValTable)/sizeof(ByteValTable[0])) {
+ if (i < (int )(sizeof(ByteValTable)/sizeof(ByteValTable[0]))) {
if (i == 0 && ONIGENC_MBC_MINLEN(enc) > 1)
return 20;
else
@@ -3810,7 +4021,7 @@ distance_value(MinMaxLen* mm)
if (mm->max == ONIG_INFINITE_DISTANCE) return 0;
d = mm->max - mm->min;
- if (d < sizeof(dist_vals)/sizeof(dist_vals[0]))
+ if (d < (int )(sizeof(dist_vals)/sizeof(dist_vals[0])))
/* return dist_vals[d] * 16 / (mm->min + 12); */
return (int )dist_vals[d];
else
@@ -4003,7 +4214,7 @@ concat_opt_exact_info(OptExactInfo* to, OptExactInfo* add, OnigEncoding enc)
p = add->s;
end = p + add->len;
for (i = to->len; p < end; ) {
- len = enc_len(enc, p);
+ len = enclen(enc, p);
if (i + len > OPT_EXACT_MAXLEN) break;
for (j = 0; j < len && p < end; j++)
to->s[i++] = *p++;
@@ -4018,14 +4229,14 @@ concat_opt_exact_info(OptExactInfo* to, OptExactInfo* add, OnigEncoding enc)
}
static void
-concat_opt_exact_info_str(OptExactInfo* to,
- UChar* s, UChar* end, int raw, OnigEncoding enc)
+concat_opt_exact_info_str(OptExactInfo* to, UChar* s, UChar* end,
+ int raw ARG_UNUSED, OnigEncoding enc)
{
int i, j, len;
UChar *p;
for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
- len = enc_len(enc, p);
+ len = enclen(enc, p);
if (i + len > OPT_EXACT_MAXLEN) break;
for (j = 0; j < len && p < end; j++)
to->s[i++] = *p++;
@@ -4051,7 +4262,7 @@ alt_merge_opt_exact_info(OptExactInfo* to, OptExactInfo* add, OptEnv* env)
for (i = 0; i < to->len && i < add->len; ) {
if (to->s[i] != add->s[i]) break;
- len = enc_len(env->enc, to->s + i);
+ len = enclen(env->enc, to->s + i);
for (j = 1; j < len; j++) {
if (to->s[i+j] != add->s[i+j]) break;
@@ -4146,29 +4357,23 @@ add_char_opt_map_info(OptMapInfo* map, UChar c, OnigEncoding enc)
static int
add_char_amb_opt_map_info(OptMapInfo* map, UChar* p, UChar* end,
- OnigEncoding enc, OnigAmbigType ambig_flag)
+ OnigEncoding enc, OnigCaseFoldType case_fold_flag)
{
- int i, n, len;
- UChar buf[ONIGENC_MBC_NORMALIZE_MAXLEN];
- OnigCodePoint code;
- const OnigPairAmbigCodes* pccs;
- OnigAmbigType amb;
+ OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM];
+ UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
+ int i, n;
add_char_opt_map_info(map, p[0], enc);
- code = ONIGENC_MBC_TO_CODE(enc, p, end);
- for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
- if ((amb & ambig_flag) == 0) continue;
+ case_fold_flag = DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag);
+ n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, case_fold_flag, p, end, items);
+ if (n < 0) return n;
- n = ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc, amb, &pccs);
- for (i = 0; i < n; i++) {
- if (pccs[i].from == code) {
- len = ONIGENC_CODE_TO_MBC(enc, pccs[i].to, buf);
- if (len < 0) return len;
- add_char_opt_map_info(map, buf[0], enc);
- }
- }
+ for (i = 0; i < n; i++) {
+ ONIGENC_CODE_TO_MBC(enc, items[i].code[0], buf);
+ add_char_opt_map_info(map, buf[0], enc);
}
+
return 0;
}
@@ -4341,7 +4546,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
type = NTYPE(node);
switch (type) {
- case N_LIST:
+ case NT_LIST:
{
OptEnv nenv;
NodeOptInfo nopt;
@@ -4349,33 +4554,33 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
copy_opt_env(&nenv, env);
do {
- r = optimize_node_left(NCONS(nd).left, &nopt, &nenv);
+ r = optimize_node_left(NCAR(nd), &nopt, &nenv);
if (r == 0) {
add_mml(&nenv.mmd, &nopt.len);
concat_left_node_opt_info(env->enc, opt, &nopt);
}
- } while (r == 0 && IS_NOT_NULL(nd = NCONS(nd).right));
+ } while (r == 0 && IS_NOT_NULL(nd = NCDR(nd)));
}
break;
- case N_ALT:
+ case NT_ALT:
{
NodeOptInfo nopt;
Node* nd = node;
do {
- r = optimize_node_left(NCONS(nd).left, &nopt, env);
+ r = optimize_node_left(NCAR(nd), &nopt, env);
if (r == 0) {
if (nd == node) copy_node_opt_info(opt, &nopt);
else alt_merge_node_opt_info(opt, &nopt, env);
}
- } while ((r == 0) && IS_NOT_NULL(nd = NCONS(nd).right));
+ } while ((r == 0) && IS_NOT_NULL(nd = NCDR(nd)));
}
break;
- case N_STRING:
+ case NT_STR:
{
- StrNode* sn = &(NSTRING(node));
+ StrNode* sn = NSTR(node);
int slen = sn->end - sn->s;
int is_raw = NSTRING_IS_RAW(node);
@@ -4388,25 +4593,26 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
set_mml(&opt->len, slen, slen);
}
else {
- int n, max;
+ int max;
- concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
- is_raw, env->enc);
- opt->exb.ignore_case = 1;
+ if (NSTRING_IS_DONT_GET_OPT_INFO(node)) {
+ int n = onigenc_strlen(env->enc, sn->s, sn->end);
+ max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
+ }
+ else {
+ concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
+ is_raw, env->enc);
+ opt->exb.ignore_case = 1;
+
+ if (slen > 0) {
+ r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end,
+ env->enc, env->case_fold_flag);
+ if (r != 0) break;
+ }
- if (slen > 0) {
- r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end,
- env->enc, env->ambig_flag);
- if (r != 0) break;
+ max = slen;
}
- if (NSTRING_IS_AMBIG_REDUCE(node)) {
- n = onigenc_strlen(env->enc, sn->s, sn->end);
- max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
- }
- else {
- max = slen;
- }
set_mml(&opt->len, slen, max);
}
@@ -4415,14 +4621,14 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case N_CCLASS:
+ case NT_CCLASS:
{
int i, z;
- CClassNode* cc = &(NCCLASS(node));
+ CClassNode* cc = NCCLASS(node);
/* no need to check ignore case. (setted in setup_tree()) */
- if (IS_NOT_NULL(cc->mbuf) || IS_CCLASS_NOT(cc)) {
+ if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) {
OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
@@ -4431,7 +4637,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
else {
for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
z = BITSET_AT(cc->bs, i);
- if ((z && !IS_CCLASS_NOT(cc)) || (!z && IS_CCLASS_NOT(cc))) {
+ if ((z && !IS_NCCLASS_NOT(cc)) || (!z && IS_NCCLASS_NOT(cc))) {
add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
}
}
@@ -4440,7 +4646,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case N_CTYPE:
+ case NT_CTYPE:
{
int i, min, max;
@@ -4449,21 +4655,22 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
if (max == 1) {
min = 1;
- switch (NCTYPE(node).type) {
- case CTYPE_NOT_WORD:
- for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
- if (! ONIGENC_IS_CODE_WORD(env->enc, i)) {
- add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
- }
- }
- break;
-
- case CTYPE_WORD:
- for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
- if (ONIGENC_IS_CODE_WORD(env->enc, i)) {
- add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
- }
- }
+ switch (NCTYPE(node)->ctype) {
+ case ONIGENC_CTYPE_WORD:
+ if (NCTYPE(node)->not != 0) {
+ for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
+ if (! ONIGENC_IS_CODE_WORD(env->enc, i)) {
+ add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
+ }
+ }
+ }
+ else {
+ for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
+ if (ONIGENC_IS_CODE_WORD(env->enc, i)) {
+ add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
+ }
+ }
+ }
break;
}
}
@@ -4474,7 +4681,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case N_ANYCHAR:
+ case NT_CANY:
{
OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
@@ -4482,22 +4689,22 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case N_ANCHOR:
- switch (NANCHOR(node).type) {
+ case NT_ANCHOR:
+ switch (NANCHOR(node)->type) {
case ANCHOR_BEGIN_BUF:
case ANCHOR_BEGIN_POSITION:
case ANCHOR_BEGIN_LINE:
case ANCHOR_END_BUF:
case ANCHOR_SEMI_END_BUF:
case ANCHOR_END_LINE:
- add_opt_anc_info(&opt->anc, NANCHOR(node).type);
+ add_opt_anc_info(&opt->anc, NANCHOR(node)->type);
break;
case ANCHOR_PREC_READ:
{
NodeOptInfo nopt;
- r = optimize_node_left(NANCHOR(node).target, &nopt, env);
+ r = optimize_node_left(NANCHOR(node)->target, &nopt, env);
if (r == 0) {
if (nopt.exb.len > 0)
copy_opt_exact_info(&opt->expr, &nopt.exb);
@@ -4519,13 +4726,13 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case N_BACKREF:
+ case NT_BREF:
{
int i;
int* backs;
OnigDistance min, max, tmin, tmax;
Node** nodes = SCANENV_MEM_NODES(env->scan_env);
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
if (br->state & NST_RECURSION) {
set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
@@ -4549,31 +4756,31 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
- if (IS_CALL_RECURSION(&(NCALL(node))))
+ case NT_CALL:
+ if (IS_CALL_RECURSION(NCALL(node)))
set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
else {
OnigOptionType save = env->options;
- env->options = NEFFECT(NCALL(node).target).option;
- r = optimize_node_left(NCALL(node).target, opt, env);
+ env->options = NENCLOSE(NCALL(node)->target)->option;
+ r = optimize_node_left(NCALL(node)->target, opt, env);
env->options = save;
}
break;
#endif
- case N_QUANTIFIER:
+ case NT_QTFR:
{
int i;
OnigDistance min, max;
NodeOptInfo nopt;
- QuantifierNode* qn = &(NQUANTIFIER(node));
+ QtfrNode* qn = NQTFR(node);
r = optimize_node_left(qn->target, &nopt, env);
if (r) break;
if (qn->lower == 0 && IS_REPEAT_INFINITE(qn->upper)) {
if (env->mmd.max == 0 &&
- NTYPE(qn->target) == N_ANYCHAR && qn->greedy) {
+ NTYPE(qn->target) == NT_CANY && qn->greedy) {
if (IS_MULTILINE(env->options))
add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_ML);
else
@@ -4585,7 +4792,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
copy_node_opt_info(opt, &nopt);
if (nopt.exb.len > 0) {
if (nopt.exb.reach_end) {
- for (i = 2; i < qn->lower &&
+ for (i = 2; i <= qn->lower &&
! is_full_opt_exact_info(&opt->exb); i++) {
concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc);
}
@@ -4614,12 +4821,12 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case N_EFFECT:
+ case NT_ENCLOSE:
{
- EffectNode* en = &(NEFFECT(node));
+ EncloseNode* en = NENCLOSE(node);
switch (en->type) {
- case EFFECT_OPTION:
+ case ENCLOSE_OPTION:
{
OnigOptionType save = env->options;
@@ -4629,7 +4836,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case EFFECT_MEMORY:
+ case ENCLOSE_MEMORY:
#ifdef USE_SUBEXP_CALL
en->opt_count++;
if (en->opt_count > MAX_NODE_OPT_INFO_REF_COUNT) {
@@ -4637,8 +4844,8 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
min = 0;
max = ONIG_INFINITE_DISTANCE;
- if (IS_EFFECT_MIN_FIXED(en)) min = en->min_len;
- if (IS_EFFECT_MAX_FIXED(en)) max = en->max_len;
+ if (IS_ENCLOSE_MIN_FIXED(en)) min = en->min_len;
+ if (IS_ENCLOSE_MAX_FIXED(en)) max = en->max_len;
set_mml(&opt->len, min, max);
}
else
@@ -4653,7 +4860,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
break;
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_STOP_BACKTRACK:
r = optimize_node_left(en->target, opt, env);
break;
}
@@ -4681,7 +4888,7 @@ set_optimize_exact_info(regex_t* reg, OptExactInfo* e)
if (e->ignore_case) {
reg->exact = (UChar* )xmalloc(e->len);
- CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(reg->exact);
xmemcpy(reg->exact, e->s, e->len);
reg->exact_end = reg->exact + e->len;
reg->optimize = ONIG_OPTIMIZE_EXACT_IC;
@@ -4689,8 +4896,8 @@ set_optimize_exact_info(regex_t* reg, OptExactInfo* e)
else {
int allow_reverse;
- reg->exact = k_strdup(e->s, e->s + e->len);
- CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
+ reg->exact = str_dup(e->s, e->s + e->len);
+ CHECK_NULL_RETURN_MEMERR(reg->exact);
reg->exact_end = reg->exact + e->len;
allow_reverse =
@@ -4755,9 +4962,9 @@ set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env)
NodeOptInfo opt;
OptEnv env;
- env.enc = reg->enc;
- env.options = reg->options;
- env.ambig_flag = reg->ambig_flag;
+ env.enc = reg->enc;
+ env.options = reg->options;
+ env.case_fold_flag = reg->case_fold_flag;
env.scan_env = scan_env;
clear_mml(&env.mmd);
@@ -4839,7 +5046,7 @@ static void print_enc_string(FILE* fp, OnigEncoding enc,
fputc((int )code, fp);
}
- p += enc_len(enc, p);
+ p += enclen(enc, p);
}
}
else {
@@ -4971,19 +5178,21 @@ print_optimize_info(FILE* f, regex_t* reg)
#endif /* ONIG_DEBUG */
-static void
+extern void
onig_free_body(regex_t* reg)
{
- if (IS_NOT_NULL(reg->p)) xfree(reg->p);
- if (IS_NOT_NULL(reg->exact)) xfree(reg->exact);
- if (IS_NOT_NULL(reg->int_map)) xfree(reg->int_map);
- if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward);
- if (IS_NOT_NULL(reg->repeat_range)) xfree(reg->repeat_range);
- if (IS_NOT_NULL(reg->chain)) onig_free(reg->chain);
+ if (IS_NOT_NULL(reg)) {
+ if (IS_NOT_NULL(reg->p)) xfree(reg->p);
+ if (IS_NOT_NULL(reg->exact)) xfree(reg->exact);
+ if (IS_NOT_NULL(reg->int_map)) xfree(reg->int_map);
+ if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward);
+ if (IS_NOT_NULL(reg->repeat_range)) xfree(reg->repeat_range);
+ if (IS_NOT_NULL(reg->chain)) onig_free(reg->chain);
#ifdef USE_NAMED_GROUP
- onig_names_free(reg);
+ onig_names_free(reg);
#endif
+ }
}
extern void
@@ -5043,84 +5252,6 @@ onig_chain_reduce(regex_t* reg)
}
}
-#if 0
-extern int
-onig_clone(regex_t** to, regex_t* from)
-{
- int r, size;
- regex_t* reg;
-
-#ifdef USE_MULTI_THREAD_SYSTEM
- if (ONIG_STATE(from) >= ONIG_STATE_NORMAL) {
- ONIG_STATE_INC(from);
- if (IS_NOT_NULL(from->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
- onig_chain_reduce(from);
- ONIG_STATE_INC(from);
- }
- }
- else {
- int n = 0;
- while (ONIG_STATE(from) < ONIG_STATE_NORMAL) {
- if (++n > THREAD_PASS_LIMIT_COUNT)
- return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;
- THREAD_PASS;
- }
- ONIG_STATE_INC(from);
- }
-#endif /* USE_MULTI_THREAD_SYSTEM */
-
- r = onig_alloc_init(&reg, ONIG_OPTION_NONE, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
- from->enc, ONIG_SYNTAX_DEFAULT);
- if (r != 0) {
- ONIG_STATE_DEC(from);
- return r;
- }
-
- xmemcpy(reg, from, sizeof(onig_t));
- reg->chain = (regex_t* )NULL;
- reg->state = ONIG_STATE_NORMAL;
-
- if (from->p) {
- reg->p = (UChar* )xmalloc(reg->alloc);
- if (IS_NULL(reg->p)) goto mem_error;
- xmemcpy(reg->p, from->p, reg->alloc);
- }
-
- if (from->exact) {
- reg->exact = (UChar* )xmalloc(from->exact_end - from->exact);
- if (IS_NULL(reg->exact)) goto mem_error;
- reg->exact_end = reg->exact + (from->exact_end - from->exact);
- xmemcpy(reg->exact, from->exact, reg->exact_end - reg->exact);
- }
-
- if (from->int_map) {
- size = sizeof(int) * ONIG_CHAR_TABLE_SIZE;
- reg->int_map = (int* )xmalloc(size);
- if (IS_NULL(reg->int_map)) goto mem_error;
- xmemcpy(reg->int_map, from->int_map, size);
- }
-
- if (from->int_map_backward) {
- size = sizeof(int) * ONIG_CHAR_TABLE_SIZE;
- reg->int_map_backward = (int* )xmalloc(size);
- if (IS_NULL(reg->int_map_backward)) goto mem_error;
- xmemcpy(reg->int_map_backward, from->int_map_backward, size);
- }
-
-#ifdef USE_NAMED_GROUP
- reg->name_table = names_clone(from); /* names_clone is not implemented */
-#endif
-
- ONIG_STATE_DEC(from);
- *to = reg;
- return 0;
-
- mem_error:
- ONIG_STATE_DEC(from);
- return ONIGERR_MEMORY;
-}
-#endif
-
#ifdef ONIG_DEBUG
static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
#endif
@@ -5141,6 +5272,8 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
UnsetAddrList uslist;
#endif
+ if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
+
reg->state = ONIG_STATE_COMPILING;
#ifdef ONIG_DEBUG
@@ -5182,10 +5315,6 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
}
#endif
-#ifdef ONIG_DEBUG_PARSE_TREE
- print_tree(stderr, root);
-#endif
-
#ifdef USE_SUBEXP_CALL
if (scan_env.num_call > 0) {
r = unset_addr_list_init(&uslist, scan_env.num_call);
@@ -5207,6 +5336,10 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
r = setup_tree(root, reg, 0, &scan_env);
if (r != 0) goto err_unset;
+#ifdef ONIG_DEBUG_PARSE_TREE
+ print_tree(stderr, root);
+#endif
+
reg->capture_history = scan_env.capture_history;
reg->bt_mem_start = scan_env.bt_mem_start;
reg->bt_mem_start |= reg->capture_history;
@@ -5308,7 +5441,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
}
}
- if (IS_NOT_NULL(root)) onig_node_free(root);
+ onig_node_free(root);
if (IS_NOT_NULL(scan_env.mem_nodes_dynamic))
xfree(scan_env.mem_nodes_dynamic);
return r;
@@ -5338,12 +5471,16 @@ onig_recompile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
static int onig_inited = 0;
extern int
-onig_alloc_init(regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag,
- OnigEncoding enc, OnigSyntaxType* syntax)
+onig_reg_init(regex_t* reg, OnigOptionType option,
+ OnigCaseFoldType case_fold_flag,
+ OnigEncoding enc, OnigSyntaxType* syntax)
{
if (! onig_inited)
onig_init();
+ if (IS_NULL(reg))
+ return ONIGERR_INVALID_ARGUMENT;
+
if (ONIGENC_IS_UNDEF(enc))
return ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED;
@@ -5352,9 +5489,7 @@ onig_alloc_init(regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag,
return ONIGERR_INVALID_COMBINATION_OF_OPTIONS;
}
- *reg = (regex_t* )xmalloc(sizeof(regex_t));
- if (IS_NULL(*reg)) return ONIGERR_MEMORY;
- (*reg)->state = ONIG_STATE_MODIFY;
+ (reg)->state = ONIG_STATE_MODIFY;
if ((option & ONIG_OPTION_NEGATE_SINGLELINE) != 0) {
option |= syntax->options;
@@ -5363,24 +5498,36 @@ onig_alloc_init(regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag,
else
option |= syntax->options;
- (*reg)->enc = enc;
- (*reg)->options = option;
- (*reg)->syntax = syntax;
- (*reg)->optimize = 0;
- (*reg)->exact = (UChar* )NULL;
- (*reg)->int_map = (int* )NULL;
- (*reg)->int_map_backward = (int* )NULL;
- (*reg)->chain = (regex_t* )NULL;
+ (reg)->enc = enc;
+ (reg)->options = option;
+ (reg)->syntax = syntax;
+ (reg)->optimize = 0;
+ (reg)->exact = (UChar* )NULL;
+ (reg)->int_map = (int* )NULL;
+ (reg)->int_map_backward = (int* )NULL;
+ (reg)->chain = (regex_t* )NULL;
+
+ (reg)->p = (UChar* )NULL;
+ (reg)->alloc = 0;
+ (reg)->used = 0;
+ (reg)->name_table = (void* )NULL;
+
+ (reg)->case_fold_flag = case_fold_flag;
+ return 0;
+}
- (*reg)->p = (UChar* )NULL;
- (*reg)->alloc = 0;
- (*reg)->used = 0;
- (*reg)->name_table = (void* )NULL;
+extern int
+onig_new_without_alloc(regex_t* reg, const UChar* pattern,
+ const UChar* pattern_end, OnigOptionType option, OnigEncoding enc,
+ OnigSyntaxType* syntax, OnigErrorInfo* einfo)
+{
+ int r;
- (*reg)->ambig_flag = ambig_flag;
- (*reg)->ambig_flag &= ONIGENC_SUPPORT_AMBIG_FLAG(enc);
+ r = onig_reg_init(reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax);
+ if (r) return r;
- return 0;
+ r = onig_compile(reg, pattern, pattern_end, einfo);
+ return r;
}
extern int
@@ -5390,33 +5537,35 @@ onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
{
int r;
- if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
+ *reg = (regex_t* )xmalloc(sizeof(regex_t));
+ if (IS_NULL(*reg)) return ONIGERR_MEMORY;
- r = onig_alloc_init(reg, option, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
- enc, syntax);
- if (r) return r;
+ r = onig_reg_init(*reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax);
+ if (r) goto err;
r = onig_compile(*reg, pattern, pattern_end, einfo);
if (r) {
+ err:
onig_free(*reg);
*reg = NULL;
}
return r;
}
+
extern int
onig_init(void)
{
if (onig_inited != 0)
return 0;
- onig_inited = 1;
-
THREAD_SYSTEM_INIT;
THREAD_ATOMIC_START;
+ onig_inited = 1;
+
onigenc_init();
- onigenc_set_default_caseconv_table((UChar* )0);
+ /* onigenc_set_default_caseconv_table((UChar* )0); */
#ifdef ONIG_DEBUG_STATISTICS
onig_statistics_init();
@@ -5430,8 +5579,6 @@ onig_init(void)
extern int
onig_end(void)
{
- extern int onig_free_shared_cclass_table(void);
-
THREAD_ATOMIC_START;
#ifdef ONIG_DEBUG_STATISTICS
@@ -5442,7 +5589,7 @@ onig_end(void)
onig_free_shared_cclass_table();
#endif
-#ifdef USE_RECYCLE_NODE
+#ifdef USE_PARSE_TREE_NODE_RECYCLE
onig_free_node_list();
#endif
@@ -5453,6 +5600,64 @@ onig_end(void)
return 0;
}
+extern int
+onig_is_in_code_range(const UChar* p, OnigCodePoint code)
+{
+ OnigCodePoint n, *data;
+ OnigCodePoint low, high, x;
+
+ GET_CODE_POINT(n, p);
+ data = (OnigCodePoint* )p;
+ data++;
+
+ for (low = 0, high = n; low < high; ) {
+ x = (low + high) >> 1;
+ if (code > data[x * 2 + 1])
+ low = x + 1;
+ else
+ high = x;
+ }
+
+ return ((low < n && code >= data[low * 2]) ? 1 : 0);
+}
+
+extern int
+onig_is_code_in_cc_len(int elen, OnigCodePoint code, CClassNode* cc)
+{
+ int found;
+
+ if (elen > 1 || (code >= SINGLE_BYTE_SIZE)) {
+ if (IS_NULL(cc->mbuf)) {
+ found = 0;
+ }
+ else {
+ found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0);
+ }
+ }
+ else {
+ found = (BITSET_AT(cc->bs, code) == 0 ? 0 : 1);
+ }
+
+ if (IS_NCCLASS_NOT(cc))
+ return !found;
+ else
+ return found;
+}
+
+extern int
+onig_is_code_in_cc(OnigEncoding enc, OnigCodePoint code, CClassNode* cc)
+{
+ int len;
+
+ if (ONIGENC_MBC_MINLEN(enc) > 1) {
+ len = 2;
+ }
+ else {
+ len = ONIGENC_CODE_TO_MBCLEN(enc, code);
+ }
+ return onig_is_code_in_cc_len(len, code, cc);
+}
+
#ifdef ONIG_DEBUG
@@ -5514,7 +5719,7 @@ OnigOpInfoType OnigOpInfo[] = {
{ OP_BACKREFN_IC, "backrefn-ic", ARG_SPECIAL },
{ OP_BACKREF_MULTI, "backref_multi", ARG_SPECIAL },
{ OP_BACKREF_MULTI_IC, "backref_multi-ic", ARG_SPECIAL },
- { OP_BACKREF_AT_LEVEL, "backref_at_level", ARG_SPECIAL },
+ { OP_BACKREF_WITH_LEVEL, "backref_at_level", ARG_SPECIAL },
{ OP_MEMORY_START_PUSH, "mem-start-push", ARG_MEMNUM },
{ OP_MEMORY_START, "mem-start", ARG_MEMNUM },
{ OP_MEMORY_END_PUSH, "mem-end-push", ARG_MEMNUM },
@@ -5706,7 +5911,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp,
break;
case OP_EXACT1_IC:
- len = enc_len(enc, bp);
+ len = enclen(enc, bp);
p_string(f, len, bp);
bp += len;
break;
@@ -5781,7 +5986,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp,
}
break;
- case OP_BACKREF_AT_LEVEL:
+ case OP_BACKREF_WITH_LEVEL:
{
OnigOptionType option;
LengthType level;
@@ -5889,27 +6094,27 @@ print_indent_tree(FILE* f, Node* node, int indent)
type = NTYPE(node);
switch (type) {
- case N_LIST:
- case N_ALT:
- if (NTYPE(node) == N_LIST)
+ case NT_LIST:
+ case NT_ALT:
+ if (NTYPE(node) == NT_LIST)
fprintf(f, "<list:%x>\n", (int )node);
else
fprintf(f, "<alt:%x>\n", (int )node);
- print_indent_tree(f, NCONS(node).left, indent + add);
- while (IS_NOT_NULL(node = NCONS(node).right)) {
+ print_indent_tree(f, NCAR(node), indent + add);
+ while (IS_NOT_NULL(node = NCDR(node))) {
if (NTYPE(node) != type) {
fprintf(f, "ERROR: list/alt right is not a cons. %d\n", NTYPE(node));
exit(0);
}
- print_indent_tree(f, NCONS(node).left, indent + add);
+ print_indent_tree(f, NCAR(node), indent + add);
}
break;
- case N_STRING:
+ case NT_STR:
fprintf(f, "<string%s:%x>",
(NSTRING_IS_RAW(node) ? "-raw" : ""), (int )node);
- for (p = NSTRING(node).s; p < NSTRING(node).end; p++) {
+ for (p = NSTR(node)->s; p < NSTR(node)->end; p++) {
if (*p >= 0x20 && *p < 0x7f)
fputc(*p, f);
else {
@@ -5918,11 +6123,11 @@ print_indent_tree(FILE* f, Node* node, int indent)
}
break;
- case N_CCLASS:
+ case NT_CCLASS:
fprintf(f, "<cclass:%x>", (int )node);
- if (IS_CCLASS_NOT(&NCCLASS(node))) fputs(" not", f);
- if (NCCLASS(node).mbuf) {
- BBuf* bbuf = NCCLASS(node).mbuf;
+ if (IS_NCCLASS_NOT(NCCLASS(node))) fputs(" not", f);
+ if (NCCLASS(node)->mbuf) {
+ BBuf* bbuf = NCCLASS(node)->mbuf;
for (i = 0; i < bbuf->used; i++) {
if (i > 0) fprintf(f, ",");
fprintf(f, "%0x", bbuf->p[i]);
@@ -5930,24 +6135,29 @@ print_indent_tree(FILE* f, Node* node, int indent)
}
break;
- case N_CTYPE:
+ case NT_CTYPE:
fprintf(f, "<ctype:%x> ", (int )node);
- switch (NCTYPE(node).type) {
- case CTYPE_WORD: fputs("word", f); break;
- case CTYPE_NOT_WORD: fputs("not word", f); break;
+ switch (NCTYPE(node)->ctype) {
+ case ONIGENC_CTYPE_WORD:
+ if (NCTYPE(node)->not != 0)
+ fputs("not word", f);
+ else
+ fputs("word", f);
+ break;
+
default:
fprintf(f, "ERROR: undefined ctype.\n");
exit(0);
}
break;
- case N_ANYCHAR:
+ case NT_CANY:
fprintf(f, "<anychar:%x>", (int )node);
break;
- case N_ANCHOR:
+ case NT_ANCHOR:
fprintf(f, "<anchor:%x> ", (int )node);
- switch (NANCHOR(node).type) {
+ switch (NANCHOR(node)->type) {
case ANCHOR_BEGIN_BUF: fputs("begin buf", f); break;
case ANCHOR_END_BUF: fputs("end buf", f); break;
case ANCHOR_BEGIN_LINE: fputs("begin line", f); break;
@@ -5972,10 +6182,10 @@ print_indent_tree(FILE* f, Node* node, int indent)
}
break;
- case N_BACKREF:
+ case NT_BREF:
{
int* p;
- BackrefNode* br = &(NBACKREF(node));
+ BRefNode* br = NBREF(node);
p = BACKREFS_P(br);
fprintf(f, "<backref:%x>", (int )node);
for (i = 0; i < br->back_num; i++) {
@@ -5986,33 +6196,33 @@ print_indent_tree(FILE* f, Node* node, int indent)
break;
#ifdef USE_SUBEXP_CALL
- case N_CALL:
+ case NT_CALL:
{
- CallNode* cn = &(NCALL(node));
+ CallNode* cn = NCALL(node);
fprintf(f, "<call:%x>", (int )node);
p_string(f, cn->name_end - cn->name, cn->name);
}
break;
#endif
- case N_QUANTIFIER:
+ case NT_QTFR:
fprintf(f, "<quantifier:%x>{%d,%d}%s\n", (int )node,
- NQUANTIFIER(node).lower, NQUANTIFIER(node).upper,
- (NQUANTIFIER(node).greedy ? "" : "?"));
- print_indent_tree(f, NQUANTIFIER(node).target, indent + add);
+ NQTFR(node)->lower, NQTFR(node)->upper,
+ (NQTFR(node)->greedy ? "" : "?"));
+ print_indent_tree(f, NQTFR(node)->target, indent + add);
break;
- case N_EFFECT:
- fprintf(f, "<effect:%x> ", (int )node);
- switch (NEFFECT(node).type) {
- case EFFECT_OPTION:
- fprintf(f, "option:%d\n", NEFFECT(node).option);
- print_indent_tree(f, NEFFECT(node).target, indent + add);
+ case NT_ENCLOSE:
+ fprintf(f, "<enclose:%x> ", (int )node);
+ switch (NENCLOSE(node)->type) {
+ case ENCLOSE_OPTION:
+ fprintf(f, "option:%d\n", NENCLOSE(node)->option);
+ print_indent_tree(f, NENCLOSE(node)->target, indent + add);
break;
- case EFFECT_MEMORY:
- fprintf(f, "memory:%d", NEFFECT(node).regnum);
+ case ENCLOSE_MEMORY:
+ fprintf(f, "memory:%d", NENCLOSE(node)->regnum);
break;
- case EFFECT_STOP_BACKTRACK:
+ case ENCLOSE_STOP_BACKTRACK:
fprintf(f, "stop-bt");
break;
@@ -6020,7 +6230,7 @@ print_indent_tree(FILE* f, Node* node, int indent)
break;
}
fprintf(f, "\n");
- print_indent_tree(f, NEFFECT(node).target, indent + add);
+ print_indent_tree(f, NENCLOSE(node)->target, indent + add);
break;
default:
@@ -6028,8 +6238,8 @@ print_indent_tree(FILE* f, Node* node, int indent)
break;
}
- if (type != N_LIST && type != N_ALT && type != N_QUANTIFIER &&
- type != N_EFFECT)
+ if (type != NT_LIST && type != NT_ALT && type != NT_QTFR &&
+ type != NT_ENCLOSE)
fprintf(f, "\n");
fflush(f);
}
diff --git a/ext/mbstring/oniguruma/regenc.c b/ext/mbstring/oniguruma/regenc.c
index 958917e12..80903508b 100644
--- a/ext/mbstring/oniguruma/regenc.c
+++ b/ext/mbstring/oniguruma/regenc.c
@@ -55,7 +55,7 @@ onigenc_get_right_adjust_char_head(OnigEncoding enc, const UChar* start, const U
{
UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
if (p < s) {
- p += enc_len(enc, p);
+ p += enclen(enc, p);
}
return p;
}
@@ -68,7 +68,7 @@ onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc,
if (p < s) {
if (prev) *prev = (const UChar* )p;
- p += enc_len(enc, p);
+ p += enclen(enc, p);
}
else {
if (prev) *prev = (const UChar* )NULL; /* Sorry */
@@ -169,52 +169,7 @@ onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s)
}
}
-#ifndef ONIG_RUBY_M17N
-
-#ifndef NOT_RUBY
-
-#define USE_APPLICATION_TO_LOWER_CASE_TABLE
-
-const unsigned short OnigEnc_Unicode_ISO_8859_1_CtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x228c, 0x2289, 0x2288, 0x2288, 0x2288, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
- 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0288, 0x0008, 0x0008,
- 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
- 0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10e2, 0x01a0, 0x00a0, 0x00a8, 0x00a0, 0x00a0,
- 0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x00a0, 0x01a0,
- 0x00a0, 0x10a0, 0x10e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
- 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
- 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
-};
-#endif
-
-const UChar* OnigEncAsciiToLowerCaseTable = (const UChar* )0;
-
-#ifndef USE_APPLICATION_TO_LOWER_CASE_TABLE
-static const UChar BuiltInAsciiToLowerCaseTable[] = {
+const UChar OnigEncAsciiToLowerCaseTable[] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
@@ -248,7 +203,6 @@ static const UChar BuiltInAsciiToLowerCaseTable[] = {
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
};
-#endif /* not USE_APPLICATION_TO_LOWER_CASE_TABLE */
#ifdef USE_UPPER_CASE_TABLE
const UChar OnigEncAsciiToUpperCaseTable[256] = {
@@ -288,23 +242,22 @@ const UChar OnigEncAsciiToUpperCaseTable[256] = {
#endif
const unsigned short OnigEncAsciiCtypeTable[256] = {
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
- 0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
- 0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
- 0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
- 0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
- 0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
- 0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
-
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+ 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+ 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+ 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+ 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+ 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+ 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -396,19 +349,10 @@ const UChar OnigEncISO_8859_1_ToUpperCaseTable[256] = {
#endif
extern void
-onigenc_set_default_caseconv_table(const UChar* table)
+onigenc_set_default_caseconv_table(const UChar* table ARG_UNUSED)
{
- if (table == (const UChar* )0) {
-#ifndef USE_APPLICATION_TO_LOWER_CASE_TABLE
- table = BuiltInAsciiToLowerCaseTable;
-#else
- return ;
-#endif
- }
-
- if (table != OnigEncAsciiToLowerCaseTable) {
- OnigEncAsciiToLowerCaseTable = table;
- }
+ /* nothing */
+ /* obsoleted. */
}
extern UChar*
@@ -417,7 +361,7 @@ onigenc_get_left_adjust_char_head(OnigEncoding enc, const UChar* start, const UC
return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
}
-const OnigPairAmbigCodes OnigAsciiPairAmbigCodes[] = {
+const OnigPairCaseFoldCodes OnigAsciiLowerMap[] = {
{ 0x41, 0x61 },
{ 0x42, 0x62 },
{ 0x43, 0x63 },
@@ -443,157 +387,175 @@ const OnigPairAmbigCodes OnigAsciiPairAmbigCodes[] = {
{ 0x57, 0x77 },
{ 0x58, 0x78 },
{ 0x59, 0x79 },
- { 0x5a, 0x7a },
-
- { 0x61, 0x41 },
- { 0x62, 0x42 },
- { 0x63, 0x43 },
- { 0x64, 0x44 },
- { 0x65, 0x45 },
- { 0x66, 0x46 },
- { 0x67, 0x47 },
- { 0x68, 0x48 },
- { 0x69, 0x49 },
- { 0x6a, 0x4a },
- { 0x6b, 0x4b },
- { 0x6c, 0x4c },
- { 0x6d, 0x4d },
- { 0x6e, 0x4e },
- { 0x6f, 0x4f },
- { 0x70, 0x50 },
- { 0x71, 0x51 },
- { 0x72, 0x52 },
- { 0x73, 0x53 },
- { 0x74, 0x54 },
- { 0x75, 0x55 },
- { 0x76, 0x56 },
- { 0x77, 0x57 },
- { 0x78, 0x58 },
- { 0x79, 0x59 },
- { 0x7a, 0x5a }
+ { 0x5a, 0x7a }
};
extern int
-onigenc_ascii_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+onigenc_ascii_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return (sizeof(OnigAsciiPairAmbigCodes) / sizeof(OnigPairAmbigCodes));
- }
- else {
- return 0;
+ OnigCodePoint code;
+ int i, r;
+
+ for (i = 0;
+ i < (int )(sizeof(OnigAsciiLowerMap)/sizeof(OnigPairCaseFoldCodes));
+ i++) {
+ code = OnigAsciiLowerMap[i].to;
+ r = (*f)(OnigAsciiLowerMap[i].from, &code, 1, arg);
+ if (r != 0) return r;
+
+ code = OnigAsciiLowerMap[i].from;
+ r = (*f)(OnigAsciiLowerMap[i].to, &code, 1, arg);
+ if (r != 0) return r;
}
-}
-extern int
-onigenc_nothing_get_all_comp_ambig_codes(OnigAmbigType flag,
- const OnigCompAmbigCodes** ccs)
-{
return 0;
}
extern int
-onigenc_iso_8859_1_get_all_pair_ambig_codes(OnigAmbigType flag,
- const OnigPairAmbigCodes** ccs)
+onigenc_ascii_get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED,
+ const OnigUChar* p, const OnigUChar* end ARG_UNUSED,
+ OnigCaseFoldCodeItem items[])
{
- static const OnigPairAmbigCodes cc[] = {
- { 0xc0, 0xe0 },
- { 0xc1, 0xe1 },
- { 0xc2, 0xe2 },
- { 0xc3, 0xe3 },
- { 0xc4, 0xe4 },
- { 0xc5, 0xe5 },
- { 0xc6, 0xe6 },
- { 0xc7, 0xe7 },
- { 0xc8, 0xe8 },
- { 0xc9, 0xe9 },
- { 0xca, 0xea },
- { 0xcb, 0xeb },
- { 0xcc, 0xec },
- { 0xcd, 0xed },
- { 0xce, 0xee },
- { 0xcf, 0xef },
-
- { 0xd0, 0xf0 },
- { 0xd1, 0xf1 },
- { 0xd2, 0xf2 },
- { 0xd3, 0xf3 },
- { 0xd4, 0xf4 },
- { 0xd5, 0xf5 },
- { 0xd6, 0xf6 },
- { 0xd8, 0xf8 },
- { 0xd9, 0xf9 },
- { 0xda, 0xfa },
- { 0xdb, 0xfb },
- { 0xdc, 0xfc },
- { 0xdd, 0xfd },
- { 0xde, 0xfe },
-
- { 0xe0, 0xc0 },
- { 0xe1, 0xc1 },
- { 0xe2, 0xc2 },
- { 0xe3, 0xc3 },
- { 0xe4, 0xc4 },
- { 0xe5, 0xc5 },
- { 0xe6, 0xc6 },
- { 0xe7, 0xc7 },
- { 0xe8, 0xc8 },
- { 0xe9, 0xc9 },
- { 0xea, 0xca },
- { 0xeb, 0xcb },
- { 0xec, 0xcc },
- { 0xed, 0xcd },
- { 0xee, 0xce },
- { 0xef, 0xcf },
-
- { 0xf0, 0xd0 },
- { 0xf1, 0xd1 },
- { 0xf2, 0xd2 },
- { 0xf3, 0xd3 },
- { 0xf4, 0xd4 },
- { 0xf5, 0xd5 },
- { 0xf6, 0xd6 },
- { 0xf8, 0xd8 },
- { 0xf9, 0xd9 },
- { 0xfa, 0xda },
- { 0xfb, 0xdb },
- { 0xfc, 0xdc },
- { 0xfd, 0xdd },
- { 0xfe, 0xde }
- };
-
- if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
- *ccs = OnigAsciiPairAmbigCodes;
- return (sizeof(OnigAsciiPairAmbigCodes) / sizeof(OnigPairAmbigCodes));
+ if (0x41 <= *p && *p <= 0x5a) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+ return 1;
}
- else if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = cc;
- return sizeof(cc) / sizeof(OnigPairAmbigCodes);
+ else if (0x61 <= *p && *p <= 0x7a) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+ return 1;
}
else
return 0;
}
+static int
+ss_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+ OnigApplyAllCaseFoldFunc f, void* arg)
+{
+ static OnigCodePoint ss[] = { 0x73, 0x73 };
+
+ return (*f)((OnigCodePoint )0xdf, ss, 2, arg);
+}
+
extern int
-onigenc_ess_tsett_get_all_comp_ambig_codes(OnigAmbigType flag,
- const OnigCompAmbigCodes** ccs)
+onigenc_apply_all_case_fold_with_map(int map_size,
+ const OnigPairCaseFoldCodes map[],
+ int ess_tsett_flag, OnigCaseFoldType flag,
+ OnigApplyAllCaseFoldFunc f, void* arg)
{
- static const OnigCompAmbigCodes folds[] = {
- { 2, 0xdf, {{ 2, { 0x53, 0x53 } }, { 2, { 0x73, 0x73} } } }
- };
+ OnigCodePoint code;
+ int i, r;
+
+ r = onigenc_ascii_apply_all_case_fold(flag, f, arg);
+ if (r != 0) return r;
- if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
- *ccs = folds;
- return sizeof(folds) / sizeof(OnigCompAmbigCodes);
+ for (i = 0; i < map_size; i++) {
+ code = map[i].to;
+ r = (*f)(map[i].from, &code, 1, arg);
+ if (r != 0) return r;
+
+ code = map[i].from;
+ r = (*f)(map[i].to, &code, 1, arg);
+ if (r != 0) return r;
}
- else
- return 0;
+
+ if (ess_tsett_flag != 0)
+ return ss_apply_all_case_fold(flag, f, arg);
+
+ return 0;
}
extern int
-onigenc_not_support_get_ctype_code_range(int ctype,
- const OnigCodePoint* sbr[], const OnigCodePoint* mbr[])
+onigenc_get_case_fold_codes_by_str_with_map(int map_size,
+ const OnigPairCaseFoldCodes map[],
+ int ess_tsett_flag, OnigCaseFoldType flag ARG_UNUSED,
+ const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
+{
+ if (0x41 <= *p && *p <= 0x5a) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+ if (*p == 0x53 && ess_tsett_flag != 0 && end > p + 1
+ && (*(p+1) == 0x53 || *(p+1) == 0x73)) {
+ /* SS */
+ items[1].byte_len = 2;
+ items[1].code_len = 1;
+ items[1].code[0] = (OnigCodePoint )0xdf;
+ return 2;
+ }
+ else
+ return 1;
+ }
+ else if (0x61 <= *p && *p <= 0x7a) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+ if (*p == 0x73 && ess_tsett_flag != 0 && end > p + 1
+ && (*(p+1) == 0x73 || *(p+1) == 0x53)) {
+ /* ss */
+ items[1].byte_len = 2;
+ items[1].code_len = 1;
+ items[1].code[0] = (OnigCodePoint )0xdf;
+ return 2;
+ }
+ else
+ return 1;
+ }
+ else if (*p == 0xdf && ess_tsett_flag != 0) {
+ items[0].byte_len = 1;
+ items[0].code_len = 2;
+ items[0].code[0] = (OnigCodePoint )'s';
+ items[0].code[1] = (OnigCodePoint )'s';
+
+ items[1].byte_len = 1;
+ items[1].code_len = 2;
+ items[1].code[0] = (OnigCodePoint )'S';
+ items[1].code[1] = (OnigCodePoint )'S';
+
+ items[2].byte_len = 1;
+ items[2].code_len = 2;
+ items[2].code[0] = (OnigCodePoint )'s';
+ items[2].code[1] = (OnigCodePoint )'S';
+
+ items[3].byte_len = 1;
+ items[3].code_len = 2;
+ items[3].code[0] = (OnigCodePoint )'S';
+ items[3].code[1] = (OnigCodePoint )'s';
+
+ return 4;
+ }
+ else {
+ int i;
+
+ for (i = 0; i < map_size; i++) {
+ if (*p == map[i].from) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = map[i].to;
+ return 1;
+ }
+ else if (*p == map[i].to) {
+ items[0].byte_len = 1;
+ items[0].code_len = 1;
+ items[0].code[0] = map[i].from;
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+
+extern int
+onigenc_not_support_get_ctype_code_range(OnigCtype ctype ARG_UNUSED,
+ OnigCodePoint* sb_out ARG_UNUSED,
+ const OnigCodePoint* ranges[] ARG_UNUSED)
{
return ONIG_NO_SUPPORT_CONFIG;
}
@@ -609,57 +571,43 @@ onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end)
/* for single byte encodings */
extern int
-onigenc_ascii_mbc_to_normalize(OnigAmbigType flag, const UChar** p, const UChar*end,
- UChar* lower)
+onigenc_ascii_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** p,
+ const UChar*end ARG_UNUSED, UChar* lower)
{
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p);
- }
- else {
- *lower = **p;
- }
+ *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p);
(*p)++;
return 1; /* return byte length of converted char to lower */
}
+#if 0
extern int
-onigenc_ascii_is_mbc_ambiguous(OnigAmbigType flag,
+onigenc_ascii_is_mbc_ambiguous(OnigCaseFoldType flag,
const UChar** pp, const UChar* end)
{
const UChar* p = *pp;
(*pp)++;
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
- }
- else {
- return FALSE;
- }
+ return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
}
+#endif
extern int
-onigenc_single_byte_mbc_enc_len(const UChar* p)
+onigenc_single_byte_mbc_enc_len(const UChar* p ARG_UNUSED)
{
return 1;
}
extern OnigCodePoint
-onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end)
+onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
return (OnigCodePoint )(*p);
}
extern int
-onigenc_single_byte_code_to_mbclen(OnigCodePoint code)
-{
- return 1;
-}
-
-extern int
-onigenc_single_byte_code_to_mbc_first(OnigCodePoint code)
+onigenc_single_byte_code_to_mbclen(OnigCodePoint code ARG_UNUSED)
{
- return (code & 0xff);
+ return (code < 0x100 ? 1 : ONIGERR_INVALID_CODE_POINT_VALUE);
}
extern int
@@ -670,19 +618,22 @@ onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf)
}
extern UChar*
-onigenc_single_byte_left_adjust_char_head(const UChar* start, const UChar* s)
+onigenc_single_byte_left_adjust_char_head(const UChar* start ARG_UNUSED,
+ const UChar* s)
{
return (UChar* )s;
}
extern int
-onigenc_always_true_is_allowed_reverse_match(const UChar* s, const UChar* end)
+onigenc_always_true_is_allowed_reverse_match(const UChar* s ARG_UNUSED,
+ const UChar* end ARG_UNUSED)
{
return TRUE;
}
extern int
-onigenc_always_false_is_allowed_reverse_match(const UChar* s, const UChar* end)
+onigenc_always_false_is_allowed_reverse_match(const UChar* s ARG_UNUSED,
+ const UChar* end ARG_UNUSED)
{
return FALSE;
}
@@ -693,7 +644,7 @@ onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end)
int c, i, len;
OnigCodePoint n;
- len = enc_len(enc, p);
+ len = enclen(enc, p);
n = (OnigCodePoint )(*p++);
if (len == 1) return n;
@@ -706,54 +657,46 @@ onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end)
}
extern int
-onigenc_mbn_mbc_to_normalize(OnigEncoding enc, OnigAmbigType flag,
- const UChar** pp, const UChar* end, UChar* lower)
+onigenc_mbn_mbc_case_fold(OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED,
+ const UChar** pp, const UChar* end ARG_UNUSED,
+ UChar* lower)
{
int len;
const UChar *p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
- }
- else {
- *lower = *p;
- }
+ *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
(*pp)++;
return 1;
}
else {
- len = enc_len(enc, p);
- if (lower != p) {
- int i;
- for (i = 0; i < len; i++) {
- *lower++ = *p++;
- }
+ int i;
+
+ len = enclen(enc, p);
+ for (i = 0; i < len; i++) {
+ *lower++ = *p++;
}
(*pp) += len;
return len; /* return byte length of converted to lower char */
}
}
+#if 0
extern int
-onigenc_mbn_is_mbc_ambiguous(OnigEncoding enc, OnigAmbigType flag,
+onigenc_mbn_is_mbc_ambiguous(OnigEncoding enc, OnigCaseFoldType flag,
const UChar** pp, const UChar* end)
{
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
(*pp)++;
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
- }
- else {
- return FALSE;
- }
+ return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
}
- (*pp) += enc_len(enc, p);
+ (*pp) += enclen(enc, p);
return FALSE;
}
+#endif
extern int
onigenc_mb2_code_to_mbclen(OnigCodePoint code)
@@ -772,40 +715,6 @@ onigenc_mb4_code_to_mbclen(OnigCodePoint code)
}
extern int
-onigenc_mb2_code_to_mbc_first(OnigCodePoint code)
-{
- int first;
-
- if ((code & 0xff00) != 0) {
- first = (code >> 8) & 0xff;
- }
- else {
- return (int )code;
- }
- return first;
-}
-
-extern int
-onigenc_mb4_code_to_mbc_first(OnigCodePoint code)
-{
- int first;
-
- if ((code & 0xff000000) != 0) {
- first = (code >> 24) & 0xff;
- }
- else if ((code & 0xff0000) != 0) {
- first = (code >> 16) & 0xff;
- }
- else if ((code & 0xff00) != 0) {
- first = (code >> 8) & 0xff;
- }
- else {
- return (int )code;
- }
- return first;
-}
-
-extern int
onigenc_mb2_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
{
UChar *p = buf;
@@ -816,8 +725,8 @@ onigenc_mb2_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
*p++ = (UChar )(code & 0xff);
#if 1
- if (enc_len(enc, buf) != (p - buf))
- return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
+ if (enclen(enc, buf) != (p - buf))
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
#endif
return p - buf;
}
@@ -839,21 +748,54 @@ onigenc_mb4_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
*p++ = (UChar )(code & 0xff);
#if 1
- if (enc_len(enc, buf) != (p - buf))
- return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
+ if (enclen(enc, buf) != (p - buf))
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
#endif
return p - buf;
}
extern int
+onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
+{
+ static PosixBracketEntryType PBS[] = {
+ { (UChar* )"Alnum", ONIGENC_CTYPE_ALNUM, 5 },
+ { (UChar* )"Alpha", ONIGENC_CTYPE_ALPHA, 5 },
+ { (UChar* )"Blank", ONIGENC_CTYPE_BLANK, 5 },
+ { (UChar* )"Cntrl", ONIGENC_CTYPE_CNTRL, 5 },
+ { (UChar* )"Digit", ONIGENC_CTYPE_DIGIT, 5 },
+ { (UChar* )"Graph", ONIGENC_CTYPE_GRAPH, 5 },
+ { (UChar* )"Lower", ONIGENC_CTYPE_LOWER, 5 },
+ { (UChar* )"Print", ONIGENC_CTYPE_PRINT, 5 },
+ { (UChar* )"Punct", ONIGENC_CTYPE_PUNCT, 5 },
+ { (UChar* )"Space", ONIGENC_CTYPE_SPACE, 5 },
+ { (UChar* )"Upper", ONIGENC_CTYPE_UPPER, 5 },
+ { (UChar* )"XDigit", ONIGENC_CTYPE_XDIGIT, 6 },
+ { (UChar* )"ASCII", ONIGENC_CTYPE_ASCII, 5 },
+ { (UChar* )"Word", ONIGENC_CTYPE_WORD, 4 },
+ { (UChar* )NULL, -1, 0 }
+ };
+
+ PosixBracketEntryType *pb;
+ int len;
+
+ len = onigenc_strlen(enc, p, end);
+ for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
+ if (len == pb->len &&
+ onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0)
+ return pb->ctype;
+ }
+
+ return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+}
+
+extern int
onigenc_mb2_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
unsigned int ctype)
{
if (code < 128)
return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
else {
- if ((ctype & (ONIGENC_CTYPE_WORD |
- ONIGENC_CTYPE_GRAPH | ONIGENC_CTYPE_PRINT)) != 0) {
+ if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
}
}
@@ -868,8 +810,7 @@ onigenc_mb4_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
if (code < 128)
return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
else {
- if ((ctype & (ONIGENC_CTYPE_WORD |
- ONIGENC_CTYPE_GRAPH | ONIGENC_CTYPE_PRINT)) != 0) {
+ if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
}
}
@@ -891,138 +832,71 @@ onigenc_with_ascii_strncmp(OnigEncoding enc, const UChar* p, const UChar* end,
if (x) return x;
sascii++;
- p += enc_len(enc, p);
+ p += enclen(enc, p);
}
return 0;
}
-#else /* ONIG_RUBY_M17N */
-
-extern int
-onigenc_is_code_ctype(OnigEncoding enc, OnigCodePoint code, int ctype)
+/* Property management */
+static int
+resize_property_list(int new_size, const OnigCodePoint*** plist, int* psize)
{
- switch (ctype) {
- case ONIGENC_CTYPE_NEWLINE:
- if (code == 0x0a) return 1;
- break;
-
- case ONIGENC_CTYPE_ALPHA:
- return m17n_isalpha(enc, code);
- break;
- case ONIGENC_CTYPE_BLANK:
- return ONIGENC_IS_CODE_BLANK(enc, (int )(code));
- break;
- case ONIGENC_CTYPE_CNTRL:
- return m17n_iscntrl(enc, code);
- break;
- case ONIGENC_CTYPE_DIGIT:
- return m17n_isdigit(enc, code);
- break;
- case ONIGENC_CTYPE_GRAPH:
- return ONIGENC_IS_CODE_GRAPH(enc, (int )(code));
- break;
- case ONIGENC_CTYPE_LOWER:
- return m17n_islower(enc, code);
- break;
- case ONIGENC_CTYPE_PRINT:
- return m17n_isprint(enc, code);
- break;
- case ONIGENC_CTYPE_PUNCT:
- return m17n_ispunct(enc, code);
- break;
- case ONIGENC_CTYPE_SPACE:
- return m17n_isspace(enc, code);
- break;
- case ONIGENC_CTYPE_UPPER:
- return m17n_isupper(enc, code);
- break;
- case ONIGENC_CTYPE_XDIGIT:
- return m17n_isxdigit(enc, code);
- break;
- case ONIGENC_CTYPE_WORD:
- return m17n_iswchar(enc, code);
- break;
- case ONIGENC_CTYPE_ASCII:
- return (code < 128 ? TRUE : FALSE);
- break;
- case ONIGENC_CTYPE_ALNUM:
- return m17n_isalnum(enc, code);
- break;
- default:
- break;
+ int size;
+ const OnigCodePoint **list = *plist;
+
+ size = sizeof(OnigCodePoint*) * new_size;
+ if (IS_NULL(list)) {
+ list = (const OnigCodePoint** )xmalloc(size);
+ }
+ else {
+ list = (const OnigCodePoint** )xrealloc((void* )list, size);
}
- return 0;
-}
+ if (IS_NULL(list)) return ONIGERR_MEMORY;
-extern int
-onigenc_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
-{
- int c, len;
+ *plist = list;
+ *psize = new_size;
- m17n_mbcput(enc, code, buf);
- c = m17n_firstbyte(enc, code);
- len = enc_len(enc, c);
- return len;
+ return 0;
}
extern int
-onigenc_mbc_to_lower(OnigEncoding enc, UChar* p, UChar* buf)
+onigenc_property_list_add_property(UChar* name, const OnigCodePoint* prop,
+ hash_table_type **table, const OnigCodePoint*** plist, int *pnum,
+ int *psize)
{
- unsigned int c, low;
-
- c = m17n_codepoint(enc, p, p + enc_len(enc, *p));
- low = m17n_tolower(enc, c);
- m17n_mbcput(enc, low, buf);
+#define PROP_INIT_SIZE 16
- return m17n_codelen(enc, low);
-}
+ int r;
-extern int
-onigenc_is_mbc_ambiguous(OnigEncoding enc, OnigAmbigType flag,
- UChar** pp, UChar* end)
-{
- int len;
- unsigned int c;
- UChar* p = *pp;
+ if (*psize <= *pnum) {
+ int new_size = (*psize == 0 ? PROP_INIT_SIZE : *psize * 2);
+ r = resize_property_list(new_size, plist, psize);
+ if (r != 0) return r;
+ }
- len = enc_len(enc, *p);
- (*pp) += len;
- c = m17n_codepoint(enc, p, p + len);
+ (*plist)[*pnum] = prop;
- if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
- if (m17n_isupper(enc, c) || m17n_islower(enc, c))
- return TRUE;
+ if (ONIG_IS_NULL(*table)) {
+ *table = onig_st_init_strend_table_with_size(PROP_INIT_SIZE);
+ if (ONIG_IS_NULL(*table)) return ONIGERR_MEMORY;
}
- return FALSE;
+ *pnum = *pnum + 1;
+ onig_st_insert_strend(*table, name, name + strlen((char* )name),
+ (hash_data_type )(*pnum + ONIGENC_MAX_STD_CTYPE));
+ return 0;
}
-extern UChar*
-onigenc_get_left_adjust_char_head(OnigEncoding enc, UChar* start, UChar* s)
+extern int
+onigenc_property_list_init(int (*f)(void))
{
- UChar *p;
- int len;
+ int r;
- if (s <= start) return s;
- p = s;
+ THREAD_ATOMIC_START;
- while (!m17n_islead(enc, *p) && p > start) p--;
- while (p + (len = enc_len(enc, *p)) < s) {
- p += len;
- }
- if (p + len == s) return s;
- return p;
-}
+ r = f();
-extern int
-onigenc_is_allowed_reverse_match(OnigEncoding enc,
- const UChar* s, const UChar* end)
-{
- return ONIGENC_IS_SINGLEBYTE(enc);
+ THREAD_ATOMIC_END;
+ return r;
}
-
-extern void
-onigenc_set_default_caseconv_table(UChar* table) { }
-
-#endif /* ONIG_RUBY_M17N */
diff --git a/ext/mbstring/oniguruma/regenc.h b/ext/mbstring/oniguruma/regenc.h
index 58ee3e7f2..40963280d 100644
--- a/ext/mbstring/oniguruma/regenc.h
+++ b/ext/mbstring/oniguruma/regenc.h
@@ -4,7 +4,7 @@
regenc.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,11 +29,23 @@
* SUCH DAMAGE.
*/
-#ifndef RUBY_PLATFORM
+#ifndef PACKAGE
+/* PACKAGE is defined in config.h */
#include "config.h"
#endif
+
+#ifdef ONIG_ESCAPE_UCHAR_COLLISION
+#undef ONIG_ESCAPE_UCHAR_COLLISION
+#endif
+
#include "oniguruma.h"
+typedef struct {
+ OnigCodePoint from;
+ OnigCodePoint to;
+} OnigPairCaseFoldCodes;
+
+
#ifndef NULL
#define NULL ((void* )0)
#endif
@@ -46,45 +58,73 @@
#define FALSE 0
#endif
-/* error codes */
-#define ONIGENCERR_MEMORY -5
-#define ONIGENCERR_TYPE_BUG -6
-#define ONIGENCERR_INVALID_WIDE_CHAR_VALUE -400
-#define ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE -401
+#ifndef ARG_UNUSED
+#if defined(__GNUC__)
+# define ARG_UNUSED __attribute__ ((unused))
+#else
+# define ARG_UNUSED
+#endif
+#endif
#define ONIG_IS_NULL(p) (((void*)(p)) == (void*)0)
#define ONIG_IS_NOT_NULL(p) (((void*)(p)) != (void*)0)
#define ONIG_CHECK_NULL_RETURN(p) if (ONIG_IS_NULL(p)) return NULL
#define ONIG_CHECK_NULL_RETURN_VAL(p,val) if (ONIG_IS_NULL(p)) return (val)
-
-#ifdef ONIG_RUBY_M17N
-
-#define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_UNDEF
-
-#else /* ONIG_RUBY_M17N */
-
-#define USE_UNICODE_FULL_RANGE_CTYPE
-/* following must not use with USE_CRNL_AS_LINE_TERMINATOR */
+#define enclen(enc,p) ONIGENC_MBC_ENC_LEN(enc,p)
+
+/* character types bit flag */
+#define BIT_CTYPE_NEWLINE (1<< ONIGENC_CTYPE_NEWLINE)
+#define BIT_CTYPE_ALPHA (1<< ONIGENC_CTYPE_ALPHA)
+#define BIT_CTYPE_BLANK (1<< ONIGENC_CTYPE_BLANK)
+#define BIT_CTYPE_CNTRL (1<< ONIGENC_CTYPE_CNTRL)
+#define BIT_CTYPE_DIGIT (1<< ONIGENC_CTYPE_DIGIT)
+#define BIT_CTYPE_GRAPH (1<< ONIGENC_CTYPE_GRAPH)
+#define BIT_CTYPE_LOWER (1<< ONIGENC_CTYPE_LOWER)
+#define BIT_CTYPE_PRINT (1<< ONIGENC_CTYPE_PRINT)
+#define BIT_CTYPE_PUNCT (1<< ONIGENC_CTYPE_PUNCT)
+#define BIT_CTYPE_SPACE (1<< ONIGENC_CTYPE_SPACE)
+#define BIT_CTYPE_UPPER (1<< ONIGENC_CTYPE_UPPER)
+#define BIT_CTYPE_XDIGIT (1<< ONIGENC_CTYPE_XDIGIT)
+#define BIT_CTYPE_WORD (1<< ONIGENC_CTYPE_WORD)
+#define BIT_CTYPE_ALNUM (1<< ONIGENC_CTYPE_ALNUM)
+#define BIT_CTYPE_ASCII (1<< ONIGENC_CTYPE_ASCII)
+
+#define CTYPE_TO_BIT(ctype) (1<<(ctype))
+#define CTYPE_IS_WORD_GRAPH_PRINT(ctype) \
+ ((ctype) == ONIGENC_CTYPE_WORD || (ctype) == ONIGENC_CTYPE_GRAPH ||\
+ (ctype) == ONIGENC_CTYPE_PRINT)
+
+
+typedef struct {
+ UChar *name;
+ int ctype;
+ short int len;
+} PosixBracketEntryType;
+
+
+/* #define USE_CRNL_AS_LINE_TERMINATOR */
+#define USE_UNICODE_PROPERTIES
+/* #define USE_UNICODE_CASE_FOLD_TURKISH_AZERI */
/* #define USE_UNICODE_ALL_LINE_TERMINATORS */ /* see Unicode.org UTF#18 */
+
#define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_ASCII
/* for encoding system implementation (internal) */
-ONIG_EXTERN int onigenc_ascii_get_all_pair_ambig_codes P_((OnigAmbigType flag, const OnigPairAmbigCodes** acs));
-ONIG_EXTERN int onigenc_nothing_get_all_comp_ambig_codes P_((OnigAmbigType flag, const OnigCompAmbigCodes** acs));
-ONIG_EXTERN int onigenc_iso_8859_1_get_all_pair_ambig_codes P_((OnigAmbigType flag, const OnigPairAmbigCodes** acs));
-ONIG_EXTERN int onigenc_ess_tsett_get_all_comp_ambig_codes P_((OnigAmbigType flag, const OnigCompAmbigCodes** acs));
-ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((int ctype, const OnigCodePoint* sbr[], const OnigCodePoint* mbr[]));
+ONIG_EXTERN int onigenc_ascii_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg));
+ONIG_EXTERN int onigenc_ascii_get_case_fold_codes_by_str P_((OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]));
+ONIG_EXTERN int onigenc_apply_all_case_fold_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg));
+ONIG_EXTERN int onigenc_get_case_fold_codes_by_str_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]));
+ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[]));
ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end));
+
/* methods for single byte encoding */
-ONIG_EXTERN int onigenc_ascii_mbc_to_normalize P_((OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
-ONIG_EXTERN int onigenc_ascii_is_mbc_ambiguous P_((OnigAmbigType flag, const UChar** p, const UChar* end));
+ONIG_EXTERN int onigenc_ascii_mbc_case_fold P_((OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower));
ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p));
ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end));
ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code));
-ONIG_EXTERN int onigenc_single_byte_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf));
ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s));
ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
@@ -92,37 +132,36 @@ ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s
/* methods for multi byte encoding */
ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
-ONIG_EXTERN int onigenc_mbn_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
-ONIG_EXTERN int onigenc_mbn_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end));
+ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower));
ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code));
-ONIG_EXTERN int onigenc_mb2_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
+ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end));
+ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end));
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code));
-ONIG_EXTERN int onigenc_mb4_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
-ONIG_EXTERN int onigenc_get_all_fold_match_code_ss_0xdf P_((OnigCodePoint** codes));
/* in enc/unicode.c */
ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype));
-ONIG_EXTERN int onigenc_unicode_get_ctype_code_range P_((int ctype, const OnigCodePoint* sbr[], const OnigCodePoint* mbr[]));
+ONIG_EXTERN int onigenc_utf16_32_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint* ranges[]));
+ONIG_EXTERN int onigenc_unicode_ctype_code_range P_((int ctype, const OnigCodePoint* ranges[]));
+ONIG_EXTERN int onigenc_unicode_get_case_fold_codes_by_str P_((OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]));
+ONIG_EXTERN int onigenc_unicode_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** pp, const UChar* end, UChar* fold));
+ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg));
+
+#define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8)
+#define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc)
#define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \
OnigEncISO_8859_1_ToLowerCaseTable[c]
#define ONIGENC_ISO_8859_1_TO_UPPER_CASE(c) \
OnigEncISO_8859_1_ToUpperCaseTable[c]
-#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code,ctype) \
- ((OnigEnc_Unicode_ISO_8859_1_CtypeTable[code] & ctype) != 0)
ONIG_EXTERN const UChar OnigEncISO_8859_1_ToLowerCaseTable[];
ONIG_EXTERN const UChar OnigEncISO_8859_1_ToUpperCaseTable[];
-ONIG_EXTERN const unsigned short OnigEnc_Unicode_ISO_8859_1_CtypeTable[];
-ONIG_EXTERN const OnigPairAmbigCodes OnigAsciiPairAmbigCodes[];
-
-#endif /* is not ONIG_RUBY_M17N */
ONIG_EXTERN int
onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n));
@@ -133,15 +172,18 @@ onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n));
extern int onig_is_in_code_range P_((const UChar* p, OnigCodePoint code));
ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding;
-ONIG_EXTERN const UChar* OnigEncAsciiToLowerCaseTable;
+ONIG_EXTERN const UChar OnigEncAsciiToLowerCaseTable[];
ONIG_EXTERN const UChar OnigEncAsciiToUpperCaseTable[];
ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[];
+#define ONIGENC_IS_ASCII_CODE(code) ((code) < 0x80)
#define ONIGENC_ASCII_CODE_TO_LOWER_CASE(c) OnigEncAsciiToLowerCaseTable[c]
#define ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) OnigEncAsciiToUpperCaseTable[c]
#define ONIGENC_IS_ASCII_CODE_CTYPE(code,ctype) \
- ((OnigEncAsciiCtypeTable[code] & ctype) != 0)
+ ((OnigEncAsciiCtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
#define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \
- ONIGENC_IS_ASCII_CODE_CTYPE(code, (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER))
+ (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\
+ ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER))
+
#endif /* REGENC_H */
diff --git a/ext/mbstring/oniguruma/regerror.c b/ext/mbstring/oniguruma/regerror.c
index d6ec91856..385e560d9 100644
--- a/ext/mbstring/oniguruma/regerror.c
+++ b/ext/mbstring/oniguruma/regerror.c
@@ -2,7 +2,7 @@
regerror.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -85,9 +85,9 @@ onig_error_code_to_format(int code)
case ONIGERR_END_PATTERN_AT_CONTROL:
p = "end pattern at control"; break;
case ONIGERR_META_CODE_SYNTAX:
- p = "illegal meta-code syntax"; break;
+ p = "invalid meta-code syntax"; break;
case ONIGERR_CONTROL_CODE_SYNTAX:
- p = "illegal control-code syntax"; break;
+ p = "invalid control-code syntax"; break;
case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE:
p = "char-class value at end of range"; break;
case ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE:
@@ -142,8 +142,8 @@ onig_error_code_to_format(int code)
p = "too big wide-char value"; break;
case ONIGERR_TOO_LONG_WIDE_CHAR_VALUE:
p = "too long wide-char value"; break;
- case ONIGERR_INVALID_WIDE_CHAR_VALUE:
- p = "invalid wide-char value"; break;
+ case ONIGERR_INVALID_CODE_POINT_VALUE:
+ p = "invalid code point value"; break;
case ONIGERR_EMPTY_GROUP_NAME:
p = "group name is empty"; break;
case ONIGERR_INVALID_GROUP_NAME:
@@ -182,6 +182,15 @@ onig_error_code_to_format(int code)
return (UChar* )p;
}
+static void sprint_byte(char* s, unsigned int v)
+{
+ sprintf(s, "%02x", (v & 0377));
+}
+
+static void sprint_byte_with_x(char* s, unsigned int v)
+{
+ sprintf(s, "\\x%02x", (v & 0377));
+}
static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
UChar buf[], int buf_size, int *is_over)
@@ -196,10 +205,17 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
while (p < end) {
code = ONIGENC_MBC_TO_CODE(enc, p, end);
if (code >= 0x80) {
- if (len + 5 <= buf_size) {
- sprintf((char* )(&(buf[len])), "\\%03o",
- (unsigned int)(code & 0377));
- len += 5;
+ if (code > 0xffff && len + 10 <= buf_size) {
+ sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
+ sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
+ sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
+ sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
+ len += 10;
+ }
+ else if (len + 6 <= buf_size) {
+ sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
+ sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
+ len += 6;
}
else {
break;
@@ -209,7 +225,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
buf[len++] = (UChar )code;
}
- p += enc_len(enc, p);
+ p += enclen(enc, p);
if (len >= buf_size) break;
}
@@ -317,7 +333,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
va_list args;
va_init_list(args, fmt);
- n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
+ n = xvsnprintf((char* )buf, bufsize, (const char* )fmt, args);
va_end(args);
need = (pat_end - pat) * 4 + 4;
@@ -328,17 +344,17 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
p = pat;
while (p < pat_end) {
- if (*p == MC_ESC(enc)) {
+ if (*p == '\\') {
*s++ = *p++;
- len = enc_len(enc, p);
+ len = enclen(enc, p);
while (len-- > 0) *s++ = *p++;
}
else if (*p == '/') {
- *s++ = (unsigned char )MC_ESC(enc);
+ *s++ = (unsigned char )'\\';
*s++ = *p++;
}
else if (ONIGENC_IS_MBC_HEAD(enc, p)) {
- len = enc_len(enc, p);
+ len = enclen(enc, p);
if (ONIGENC_MBC_MINLEN(enc) == 1) {
while (len-- > 0) *s++ = *p++;
}
@@ -346,7 +362,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
int blen;
while (len-- > 0) {
- sprintf((char* )bs, "\\%03o", *p++ & 0377);
+ sprint_byte_with_x((char* )bs, (unsigned int )(*p++));
blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
bp = bs;
while (blen-- > 0) *s++ = *bp++;
@@ -355,7 +371,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
}
else if (!ONIGENC_IS_CODE_PRINT(enc, *p) &&
!ONIGENC_IS_CODE_SPACE(enc, *p)) {
- sprintf((char* )bs, "\\%03o", *p++ & 0377);
+ sprint_byte_with_x((char* )bs, (unsigned int )(*p++));
len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
bp = bs;
while (len-- > 0) *s++ = *bp++;
diff --git a/ext/mbstring/oniguruma/regexec.c b/ext/mbstring/oniguruma/regexec.c
index 918aa67aa..7430d7851 100644
--- a/ext/mbstring/oniguruma/regexec.c
+++ b/ext/mbstring/oniguruma/regexec.c
@@ -2,7 +2,7 @@
regexec.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,10 +29,12 @@
#include "regint.h"
+#define USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+
#ifdef USE_CRNL_AS_LINE_TERMINATOR
#define ONIGENC_IS_MBC_CRNL(enc,p,end) \
(ONIGENC_MBC_TO_CODE(enc,p,end) == 13 && \
- ONIGENC_IS_MBC_NEWLINE(enc,(p+enc_len(enc,p)),end))
+ ONIGENC_IS_MBC_NEWLINE(enc,(p+enclen(enc,p)),end))
#endif
#ifdef USE_CAPTURE_HISTORY
@@ -111,7 +113,7 @@ history_tree_add_child(OnigCaptureTreeNode* parent, OnigCaptureTreeNode* child)
(OnigCaptureTreeNode** )xrealloc(parent->childs,
sizeof(OnigCaptureTreeNode*) * n);
}
- CHECK_NULL_RETURN_VAL(parent->childs, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(parent->childs);
for (i = parent->allocated; i < n; i++) {
parent->childs[i] = (OnigCaptureTreeNode* )0;
}
@@ -196,7 +198,7 @@ onig_region_resize(OnigRegion* region, int n)
return 0;
}
-extern int
+static int
onig_region_resize_clear(OnigRegion* region, int n)
{
int r;
@@ -297,47 +299,6 @@ onig_region_copy(OnigRegion* to, OnigRegion* from)
/** stack **/
#define INVALID_STACK_INDEX -1
-typedef long StackIndex;
-
-typedef struct _StackType {
- unsigned int type;
- union {
- struct {
- UChar *pcode; /* byte code position */
- UChar *pstr; /* string position */
- UChar *pstr_prev; /* previous char position of pstr */
-#ifdef USE_COMBINATION_EXPLOSION_CHECK
- unsigned int state_check;
-#endif
- } state;
- struct {
- int count; /* for OP_REPEAT_INC, OP_REPEAT_INC_NG */
- UChar *pcode; /* byte code position (head of repeated target) */
- int num; /* repeat id */
- } repeat;
- struct {
- StackIndex si; /* index of stack */
- } repeat_inc;
- struct {
- int num; /* memory num */
- UChar *pstr; /* start/end position */
- /* Following information is setted, if this stack type is MEM-START */
- StackIndex start; /* prev. info (for backtrack "(...)*" ) */
- StackIndex end; /* prev. info (for backtrack "(...)*" ) */
- } mem;
- struct {
- int num; /* null check id */
- UChar *pstr; /* start position */
- } null_check;
-#ifdef USE_SUBEXP_CALL
- struct {
- UChar *ret_addr; /* byte code position */
- int num; /* null check id */
- UChar *pstr; /* string position */
- } call_frame;
-#endif
- } u;
-} StackType;
/* stack type */
/* used by normal-POP */
@@ -365,22 +326,6 @@ typedef struct _StackType {
#define STK_MASK_TO_VOID_TARGET 0x10ff
#define STK_MASK_MEM_END_OR_MARK 0x8000 /* MEM_END or MEM_END_MARK */
-typedef struct {
- void* stack_p;
- int stack_n;
- OnigOptionType options;
- OnigRegion* region;
- const UChar* start; /* search start position (for \G: BEGIN_POSITION) */
-#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
- int best_len; /* for ONIG_OPTION_FIND_LONGEST */
- UChar* best_s;
-#endif
-#ifdef USE_COMBINATION_EXPLOSION_CHECK
- void* state_check_buff;
- int state_check_buff_size;
-#endif
-} MatchArg;
-
#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
#define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\
(msa).stack_p = (void* )0;\
@@ -388,14 +333,14 @@ typedef struct {
(msa).region = (arg_region);\
(msa).start = (arg_start);\
(msa).best_len = ONIG_MISMATCH;\
-} while (0)
+} while(0)
#else
#define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\
(msa).stack_p = (void* )0;\
(msa).options = (arg_option);\
(msa).region = (arg_region);\
(msa).start = (arg_start);\
-} while (0)
+} while(0)
#endif
#ifdef USE_COMBINATION_EXPLOSION_CHECK
@@ -424,14 +369,14 @@ typedef struct {
(msa).state_check_buff = (void* )0;\
(msa).state_check_buff_size = 0;\
}\
-} while (0)
+ } while(0)
#define MATCH_ARG_FREE(msa) do {\
if ((msa).stack_p) xfree((msa).stack_p);\
if ((msa).state_check_buff_size >= STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE) { \
if ((msa).state_check_buff) xfree((msa).state_check_buff);\
}\
-} while (0);
+} while(0)
#else
#define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num)
#define MATCH_ARG_FREE(msa) if ((msa).stack_p) xfree((msa).stack_p)
@@ -442,15 +387,15 @@ typedef struct {
#define STACK_INIT(alloc_addr, ptr_num, stack_num) do {\
if (msa->stack_p) {\
alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num));\
- stk_alloc = (StackType* )(msa->stack_p);\
+ stk_alloc = (OnigStackType* )(msa->stack_p);\
stk_base = stk_alloc;\
stk = stk_base;\
stk_end = stk_base + msa->stack_n;\
}\
else {\
alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num)\
- + sizeof(StackType) * (stack_num));\
- stk_alloc = (StackType* )(alloc_addr + sizeof(char*) * (ptr_num));\
+ + sizeof(OnigStackType) * (stack_num));\
+ stk_alloc = (OnigStackType* )(alloc_addr + sizeof(char*) * (ptr_num));\
stk_base = stk_alloc;\
stk = stk_base;\
stk_end = stk_base + (stack_num);\
@@ -480,11 +425,11 @@ onig_set_match_stack_limit_size(unsigned int size)
}
static int
-stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
- StackType** arg_stk, StackType* stk_alloc, MatchArg* msa)
+stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
+ OnigStackType** arg_stk, OnigStackType* stk_alloc, OnigMatchArg* msa)
{
unsigned int n;
- StackType *x, *stk_base, *stk_end, *stk;
+ OnigStackType *x, *stk_base, *stk_end, *stk;
stk_base = *arg_stk_base;
stk_end = *arg_stk_end;
@@ -492,12 +437,12 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
n = stk_end - stk_base;
if (stk_base == stk_alloc && IS_NULL(msa->stack_p)) {
- x = (StackType* )xmalloc(sizeof(StackType) * n * 2);
+ x = (OnigStackType* )xmalloc(sizeof(OnigStackType) * n * 2);
if (IS_NULL(x)) {
STACK_SAVE;
return ONIGERR_MEMORY;
}
- xmemcpy(x, stk_base, n * sizeof(StackType));
+ xmemcpy(x, stk_base, n * sizeof(OnigStackType));
n *= 2;
}
else {
@@ -508,7 +453,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
else
n = MatchStackLimitSize;
}
- x = (StackType* )xrealloc(stk_base, sizeof(StackType) * n);
+ x = (OnigStackType* )xrealloc(stk_base, sizeof(OnigStackType) * n);
if (IS_NULL(x)) {
STACK_SAVE;
return ONIGERR_MEMORY;
@@ -680,7 +625,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
level--;\
}\
}\
-} while (0)
+} while(0)
#define STACK_GET_MEM_RANGE(k, mnum, start, end) do {\
int level = 0;\
@@ -698,7 +643,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
}\
k++;\
}\
-} while (0)
+} while(0)
#define STACK_PUSH_NULL_CHECK_START(cnum, s) do {\
STACK_ENSURE(1);\
@@ -844,7 +789,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
} while(0)
#define STACK_STOP_BT_END do {\
- StackType *k = stk;\
+ OnigStackType *k = stk;\
while (1) {\
k--;\
STACK_BASE_CHECK(k, "STACK_STOP_BT_END"); \
@@ -859,7 +804,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
} while(0)
#define STACK_NULL_CHECK(isnull,id,s) do {\
- StackType* k = stk;\
+ OnigStackType* k = stk;\
while (1) {\
k--;\
STACK_BASE_CHECK(k, "STACK_NULL_CHECK"); \
@@ -874,7 +819,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
#define STACK_NULL_CHECK_REC(isnull,id,s) do {\
int level = 0;\
- StackType* k = stk;\
+ OnigStackType* k = stk;\
while (1) {\
k--;\
STACK_BASE_CHECK(k, "STACK_NULL_CHECK_REC"); \
@@ -894,7 +839,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
} while(0)
#define STACK_NULL_CHECK_MEMST(isnull,id,s,reg) do {\
- StackType* k = stk;\
+ OnigStackType* k = stk;\
while (1) {\
k--;\
STACK_BASE_CHECK(k, "STACK_NULL_CHECK_MEMST"); \
@@ -934,7 +879,7 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
#define STACK_NULL_CHECK_MEMST_REC(isnull,id,s,reg) do {\
int level = 0;\
- StackType* k = stk;\
+ OnigStackType* k = stk;\
while (1) {\
k--;\
STACK_BASE_CHECK(k, "STACK_NULL_CHECK_MEMST_REC"); \
@@ -996,11 +941,11 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
else if (k->type == STK_CALL_FRAME) level--;\
else if (k->type == STK_RETURN) level++;\
}\
-} while (0)
+} while(0)
#define STACK_RETURN(addr) do {\
int level = 0;\
- StackType* k = stk;\
+ OnigStackType* k = stk;\
while (1) {\
k--;\
STACK_BASE_CHECK(k, "STACK_RETURN"); \
@@ -1023,25 +968,25 @@ stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
}\
} while(0)
-#define STRING_CMP_IC(ambig_flag,s1,ps2,len) do {\
- if (string_cmp_ic(encode, ambig_flag, s1, ps2, len) == 0) \
+#define STRING_CMP_IC(case_fold_flag,s1,ps2,len) do {\
+ if (string_cmp_ic(encode, case_fold_flag, s1, ps2, len) == 0) \
goto fail; \
} while(0)
-static int string_cmp_ic(OnigEncoding enc, int ambig_flag,
+static int string_cmp_ic(OnigEncoding enc, int case_fold_flag,
UChar* s1, UChar** ps2, int mblen)
{
- UChar buf1[ONIGENC_MBC_NORMALIZE_MAXLEN];
- UChar buf2[ONIGENC_MBC_NORMALIZE_MAXLEN];
- UChar *p1, *p2, *end, *s2, *end2;
+ UChar buf1[ONIGENC_MBC_CASE_FOLD_MAXLEN];
+ UChar buf2[ONIGENC_MBC_CASE_FOLD_MAXLEN];
+ UChar *p1, *p2, *end1, *s2, *end2;
int len1, len2;
s2 = *ps2;
- end = s1 + mblen;
+ end1 = s1 + mblen;
end2 = s2 + mblen;
- while (s1 < end) {
- len1 = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &s1, end, buf1);
- len2 = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &s2, end2, buf2);
+ while (s1 < end1) {
+ len1 = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &s1, end1, buf1);
+ len2 = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &s2, end2, buf2);
if (len1 != len2) return 0;
p1 = buf1;
p2 = buf2;
@@ -1065,31 +1010,36 @@ static int string_cmp_ic(OnigEncoding enc, int ambig_flag,
}\
} while(0)
-#define STRING_CMP_VALUE_IC(ambig_flag,s1,ps2,len,is_fail) do {\
- if (string_cmp_ic(encode, ambig_flag, s1, ps2, len) == 0) \
+#define STRING_CMP_VALUE_IC(case_fold_flag,s1,ps2,len,is_fail) do {\
+ if (string_cmp_ic(encode, case_fold_flag, s1, ps2, len) == 0) \
is_fail = 1; \
else \
is_fail = 0; \
} while(0)
-#define ON_STR_BEGIN(s) ((s) == str)
-#define ON_STR_END(s) ((s) == end)
-#define IS_EMPTY_STR (str == end)
-
-#define DATA_ENSURE(n) \
- if (s + (n) > end) goto fail
-
+#define IS_EMPTY_STR (str == end)
+#define ON_STR_BEGIN(s) ((s) == str)
+#define ON_STR_END(s) ((s) == end)
+#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+#define DATA_ENSURE_CHECK1 (s < right_range)
+#define DATA_ENSURE_CHECK(n) (s + (n) <= right_range)
+#define DATA_ENSURE(n) if (s + (n) > right_range) goto fail
+#else
+#define DATA_ENSURE_CHECK1 (s < end)
#define DATA_ENSURE_CHECK(n) (s + (n) <= end)
+#define DATA_ENSURE(n) if (s + (n) > end) goto fail
+#endif /* USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE */
+
#ifdef USE_CAPTURE_HISTORY
static int
-make_capture_history_tree(OnigCaptureTreeNode* node, StackType** kp,
- StackType* stk_top, UChar* str, regex_t* reg)
+make_capture_history_tree(OnigCaptureTreeNode* node, OnigStackType** kp,
+ OnigStackType* stk_top, UChar* str, regex_t* reg)
{
int n, r;
OnigCaptureTreeNode* child;
- StackType* k = *kp;
+ OnigStackType* k = *kp;
while (k < stk_top) {
if (k->type == STK_MEM_START) {
@@ -1097,7 +1047,7 @@ make_capture_history_tree(OnigCaptureTreeNode* node, StackType** kp,
if (n <= ONIG_MAX_CAPTURE_HISTORY_GROUP &&
BIT_STATUS_AT(reg->capture_history, n) != 0) {
child = history_node_new();
- CHECK_NULL_RETURN_VAL(child, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(child);
child->group = n;
child->beg = (int )(k->u.mem.pstr - str);
r = history_tree_add_child(node, child);
@@ -1124,7 +1074,7 @@ make_capture_history_tree(OnigCaptureTreeNode* node, StackType** kp,
}
#endif
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
static int mem_is_in_memp(int mem, int num, UChar* memp)
{
int i;
@@ -1138,13 +1088,13 @@ static int mem_is_in_memp(int mem, int num, UChar* memp)
}
static int backref_match_at_nested_level(regex_t* reg
- , StackType* top, StackType* stk_base
- , int ignore_case, int ambig_flag
+ , OnigStackType* top, OnigStackType* stk_base
+ , int ignore_case, int case_fold_flag
, int nest, int mem_num, UChar* memp, UChar** s, const UChar* send)
{
UChar *ss, *p, *pstart, *pend = NULL_UCHARP;
int level;
- StackType* k;
+ OnigStackType* k;
level = 0;
k = top;
@@ -1166,7 +1116,7 @@ static int backref_match_at_nested_level(regex_t* reg
ss = *s;
if (ignore_case != 0) {
- if (string_cmp_ic(reg->enc, ambig_flag,
+ if (string_cmp_ic(reg->enc, case_fold_flag,
pstart, &ss, (int )(pend - pstart)) == 0)
return 0; /* or goto next_mem; */
}
@@ -1192,70 +1142,8 @@ static int backref_match_at_nested_level(regex_t* reg
return 0;
}
-#endif /* USE_BACKREF_AT_LEVEL */
-
-
-#ifdef RUBY_PLATFORM
-
-typedef struct {
- int state;
- regex_t* reg;
- MatchArg* msa;
- StackType* stk_base;
-} TrapEnsureArg;
-
-static VALUE
-trap_ensure(VALUE arg)
-{
- TrapEnsureArg* ta = (TrapEnsureArg* )arg;
-
- if (ta->state == 0) { /* trap_exec() is not normal return */
- ONIG_STATE_DEC_THREAD(ta->reg);
- if (! IS_NULL(ta->msa->stack_p) && ta->stk_base != ta->msa->stack_p)
- xfree(ta->stk_base);
-
- MATCH_ARG_FREE(*(ta->msa));
- }
-
- return Qnil;
-}
+#endif /* USE_BACKREF_WITH_LEVEL */
-static VALUE
-trap_exec(VALUE arg)
-{
- TrapEnsureArg* ta;
-
- rb_trap_exec();
-
- ta = (TrapEnsureArg* )arg;
- ta->state = 1; /* normal return */
- return Qnil;
-}
-
-extern void
-onig_exec_trap(regex_t* reg, MatchArg* msa, StackType* stk_base)
-{
- VALUE arg;
- TrapEnsureArg ta;
-
- ta.state = 0;
- ta.reg = reg;
- ta.msa = msa;
- ta.stk_base = stk_base;
- arg = (VALUE )(&ta);
- rb_ensure(trap_exec, arg, trap_ensure, arg);
-}
-
-#define CHECK_INTERRUPT_IN_MATCH_AT do {\
- if (rb_trap_pending) {\
- if (! rb_prohibit_interrupt) {\
- onig_exec_trap(reg, msa, stk_base);\
- }\
- }\
-} while (0)
-#else
-#define CHECK_INTERRUPT_IN_MATCH_AT
-#endif /* RUBY_PLATFORM */
#ifdef ONIG_DEBUG_STATISTICS
@@ -1288,41 +1176,26 @@ static int OpCurr = OP_FINISH;
static int OpPrevTarget = OP_FAIL;
static int MaxStackDepth = 0;
-#define STAT_OP_IN(opcode) do {\
+#define MOP_IN(opcode) do {\
if (opcode == OpPrevTarget) OpPrevCounter[OpCurr]++;\
OpCurr = opcode;\
OpCounter[opcode]++;\
GETTIME(ts);\
-} while (0)
+} while(0)
-#define STAT_OP_OUT do {\
+#define MOP_OUT do {\
GETTIME(te);\
OpTime[OpCurr] += TIMEDIFF(te, ts);\
-} while (0)
-
-#ifdef RUBY_PLATFORM
-
-/*
- * :nodoc:
- */
-static VALUE onig_stat_print(void)
-{
- onig_print_statistics(stderr);
- return Qnil;
-}
-#endif
+} while(0)
-extern void onig_statistics_init(void)
+extern void
+onig_statistics_init(void)
{
int i;
for (i = 0; i < 256; i++) {
OpCounter[i] = OpPrevCounter[i] = 0; OpTime[i] = 0;
}
MaxStackDepth = 0;
-
-#ifdef RUBY_PLATFORM
- rb_define_global_function("onig_stat_print", onig_stat_print, 0);
-#endif
}
extern void
@@ -1341,73 +1214,15 @@ onig_print_statistics(FILE* f)
stk++;\
if (stk - stk_base > MaxStackDepth) \
MaxStackDepth = stk - stk_base;\
-} while (0)
+} while(0)
#else
#define STACK_INC stk++
-#define STAT_OP_IN(opcode)
-#define STAT_OP_OUT
+#define MOP_IN(opcode)
+#define MOP_OUT
#endif
-extern int
-onig_is_in_code_range(const UChar* p, OnigCodePoint code)
-{
- OnigCodePoint n, *data;
- OnigCodePoint low, high, x;
-
- GET_CODE_POINT(n, p);
- data = (OnigCodePoint* )p;
- data++;
-
- for (low = 0, high = n; low < high; ) {
- x = (low + high) >> 1;
- if (code > data[x * 2 + 1])
- low = x + 1;
- else
- high = x;
- }
-
- return ((low < n && code >= data[low * 2]) ? 1 : 0);
-}
-
-static int
-is_code_in_cc(int enclen, OnigCodePoint code, CClassNode* cc)
-{
- int found;
-
- if (enclen > 1 || (code >= SINGLE_BYTE_SIZE)) {
- if (IS_NULL(cc->mbuf)) {
- found = 0;
- }
- else {
- found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0);
- }
- }
- else {
- found = (BITSET_AT(cc->bs, code) == 0 ? 0 : 1);
- }
-
- if (IS_CCLASS_NOT(cc))
- return !found;
- else
- return found;
-}
-
-extern int
-onig_is_code_in_cc(OnigEncoding enc, OnigCodePoint code, CClassNode* cc)
-{
- int len;
-
- if (ONIGENC_MBC_MINLEN(enc) > 1) {
- len = 2;
- }
- else {
- len = ONIGENC_CODE_TO_MBCLEN(enc, code);
- }
- return is_code_in_cc(len, code, cc);
-}
-
/* matching region of POSIX API */
typedef int regoff_t;
@@ -1420,8 +1235,11 @@ typedef struct {
/* match data(str - end) from position (sstart). */
/* if sstart == str then set sprev to NULL. */
static int
-match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
- UChar* sprev, MatchArg* msa)
+match_at(regex_t* reg, const UChar* str, const UChar* end,
+#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+ const UChar* right_range,
+#endif
+ const UChar* sstart, UChar* sprev, OnigMatchArg* msa)
{
static UChar FinishCode[] = { OP_FINISH };
@@ -1431,15 +1249,15 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
RelAddrType addr;
OnigOptionType option = reg->options;
OnigEncoding encode = reg->enc;
- OnigAmbigType ambig_flag = reg->ambig_flag;
+ OnigCaseFoldType case_fold_flag = reg->case_fold_flag;
UChar *s, *q, *sbegin;
UChar *p = reg->p;
char *alloca_base;
- StackType *stk_alloc, *stk_base, *stk, *stk_end;
- StackType *stkp; /* used as any purpose. */
- StackIndex si;
- StackIndex *repeat_stk;
- StackIndex *mem_start_stk, *mem_end_stk;
+ OnigStackType *stk_alloc, *stk_base, *stk, *stk_end;
+ OnigStackType *stkp; /* used as any purpose. */
+ OnigStackIndex si;
+ OnigStackIndex *repeat_stk;
+ OnigStackIndex *mem_start_stk, *mem_end_stk;
#ifdef USE_COMBINATION_EXPLOSION_CHECK
int scv;
unsigned char* state_check_buff = msa->state_check_buff;
@@ -1450,9 +1268,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
STACK_INIT(alloca_base, n, INIT_MATCH_STACK_SIZE);
pop_level = reg->stack_pop_level;
num_mem = reg->num_mem;
- repeat_stk = (StackIndex* )alloca_base;
+ repeat_stk = (OnigStackIndex* )alloca_base;
- mem_start_stk = (StackIndex* )(repeat_stk + reg->num_repeat);
+ mem_start_stk = (OnigStackIndex* )(repeat_stk + reg->num_repeat);
mem_end_stk = mem_start_stk + num_mem;
mem_start_stk--; /* for index start from 1,
mem_start_stk[1]..mem_start_stk[num_mem] */
@@ -1480,13 +1298,13 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
fprintf(stderr, "%4d> \"", (int )(s - str));
bp = buf;
for (i = 0, q = s; i < 7 && q < end; i++) {
- len = enc_len(encode, q);
+ len = enclen(encode, q);
while (len-- > 0) *bp++ = *q++;
}
if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }
else { xmemcpy(bp, "\"", 1); bp += 1; }
*bp = 0;
- fputs(buf, stderr);
+ fputs((char* )buf, stderr);
for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr);
onig_print_compiled_byte_code(stderr, p, NULL, encode);
fprintf(stderr, "\n");
@@ -1495,7 +1313,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
sbegin = s;
switch (*p++) {
- case OP_END: STAT_OP_IN(OP_END);
+ case OP_END: MOP_IN(OP_END);
n = s - sstart;
if (n > best_len) {
OnigRegion* region;
@@ -1512,7 +1330,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
best_len = n;
region = msa->region;
if (region) {
-#ifdef USE_POSIX_REGION_OPTION
+#ifdef USE_POSIX_API_REGION_OPTION
if (IS_POSIX_REGION(msa->options)) {
posix_regmatch_t* rmt = (posix_regmatch_t* )region;
@@ -1535,7 +1353,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
}
}
else {
-#endif /* USE_POSIX_REGION_OPTION */
+#endif /* USE_POSIX_API_REGION_OPTION */
region->beg[0] = sstart - str;
region->end[0] = s - str;
for (i = 1; i <= num_mem; i++) {
@@ -1561,7 +1379,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
if (IS_NULL(region->history_root)) {
region->history_root = node = history_node_new();
- CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(node);
}
else {
node = region->history_root;
@@ -1581,7 +1399,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
}
}
#endif /* USE_CAPTURE_HISTORY */
-#ifdef USE_POSIX_REGION_OPTION
+#ifdef USE_POSIX_API_REGION_OPTION
} /* else IS_POSIX_REGION() */
#endif
} /* if (region) */
@@ -1590,14 +1408,14 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
end_best_len:
#endif
- STAT_OP_OUT;
+ MOP_OUT;
if (IS_FIND_CONDITION(option)) {
if (IS_FIND_NOT_EMPTY(option) && s == sstart) {
best_len = ONIG_MISMATCH;
goto fail; /* for retry */
}
- if (IS_FIND_LONGEST(option) && s < end) {
+ if (IS_FIND_LONGEST(option) && DATA_ENSURE_CHECK1) {
goto fail; /* for retry */
}
}
@@ -1606,7 +1424,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
goto finish;
break;
- case OP_EXACT1: STAT_OP_IN(OP_EXACT1);
+ case OP_EXACT1: MOP_IN(OP_EXACT1);
#if 0
DATA_ENSURE(1);
if (*p != *s) goto fail;
@@ -1615,19 +1433,19 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
if (*p != *s++) goto fail;
DATA_ENSURE(0);
p++;
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_EXACT1_IC: STAT_OP_IN(OP_EXACT1_IC);
+ case OP_EXACT1_IC: MOP_IN(OP_EXACT1_IC);
{
int len;
- UChar *q, *ss, *sp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
+ UChar *q, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
DATA_ENSURE(1);
- ss = s;
- sp = p;
-
- len = ONIGENC_MBC_TO_NORMALIZE(encode, ambig_flag, &s, end, lowbuf);
+ len = ONIGENC_MBC_CASE_FOLD(encode,
+ /* DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag), */
+ case_fold_flag,
+ &s, end, lowbuf);
DATA_ENSURE(0);
q = lowbuf;
while (len-- > 0) {
@@ -1637,21 +1455,21 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p++; q++;
}
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_EXACT2: STAT_OP_IN(OP_EXACT2);
+ case OP_EXACT2: MOP_IN(OP_EXACT2);
DATA_ENSURE(2);
if (*p != *s) goto fail;
p++; s++;
if (*p != *s) goto fail;
sprev = s;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACT3: STAT_OP_IN(OP_EXACT3);
+ case OP_EXACT3: MOP_IN(OP_EXACT3);
DATA_ENSURE(3);
if (*p != *s) goto fail;
p++; s++;
@@ -1660,11 +1478,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
if (*p != *s) goto fail;
sprev = s;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACT4: STAT_OP_IN(OP_EXACT4);
+ case OP_EXACT4: MOP_IN(OP_EXACT4);
DATA_ENSURE(4);
if (*p != *s) goto fail;
p++; s++;
@@ -1675,11 +1493,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
if (*p != *s) goto fail;
sprev = s;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACT5: STAT_OP_IN(OP_EXACT5);
+ case OP_EXACT5: MOP_IN(OP_EXACT5);
DATA_ENSURE(5);
if (*p != *s) goto fail;
p++; s++;
@@ -1692,25 +1510,25 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
if (*p != *s) goto fail;
sprev = s;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTN: STAT_OP_IN(OP_EXACTN);
+ case OP_EXACTN: MOP_IN(OP_EXACTN);
GET_LENGTH_INC(tlen, p);
DATA_ENSURE(tlen);
while (tlen-- > 0) {
if (*p++ != *s++) goto fail;
}
sprev = s - 1;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTN_IC: STAT_OP_IN(OP_EXACTN_IC);
+ case OP_EXACTN_IC: MOP_IN(OP_EXACTN_IC);
{
int len;
- UChar *ss, *sp, *q, *endp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
+ UChar *q, *endp, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
GET_LENGTH_INC(tlen, p);
endp = p + tlen;
@@ -1718,35 +1536,33 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
while (p < endp) {
sprev = s;
DATA_ENSURE(1);
- ss = s;
- sp = p;
-
- len = ONIGENC_MBC_TO_NORMALIZE(encode, ambig_flag, &s, end, lowbuf);
+ len = ONIGENC_MBC_CASE_FOLD(encode,
+ /* DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag), */
+ case_fold_flag,
+ &s, end, lowbuf);
DATA_ENSURE(0);
q = lowbuf;
while (len-- > 0) {
- if (*p != *q) {
- goto fail;
- }
+ if (*p != *q) goto fail;
p++; q++;
}
}
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTMB2N1: STAT_OP_IN(OP_EXACTMB2N1);
+ case OP_EXACTMB2N1: MOP_IN(OP_EXACTMB2N1);
DATA_ENSURE(2);
if (*p != *s) goto fail;
p++; s++;
if (*p != *s) goto fail;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_EXACTMB2N2: STAT_OP_IN(OP_EXACTMB2N2);
+ case OP_EXACTMB2N2: MOP_IN(OP_EXACTMB2N2);
DATA_ENSURE(4);
if (*p != *s) goto fail;
p++; s++;
@@ -1757,11 +1573,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p++; s++;
if (*p != *s) goto fail;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTMB2N3: STAT_OP_IN(OP_EXACTMB2N3);
+ case OP_EXACTMB2N3: MOP_IN(OP_EXACTMB2N3);
DATA_ENSURE(6);
if (*p != *s) goto fail;
p++; s++;
@@ -1776,11 +1592,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p++; s++;
if (*p != *s) goto fail;
p++; s++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTMB2N: STAT_OP_IN(OP_EXACTMB2N);
+ case OP_EXACTMB2N: MOP_IN(OP_EXACTMB2N);
GET_LENGTH_INC(tlen, p);
DATA_ENSURE(tlen * 2);
while (tlen-- > 0) {
@@ -1790,11 +1606,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p++; s++;
}
sprev = s - 2;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTMB3N: STAT_OP_IN(OP_EXACTMB3N);
+ case OP_EXACTMB3N: MOP_IN(OP_EXACTMB3N);
GET_LENGTH_INC(tlen, p);
DATA_ENSURE(tlen * 3);
while (tlen-- > 0) {
@@ -1806,11 +1622,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p++; s++;
}
sprev = s - 3;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_EXACTMBN: STAT_OP_IN(OP_EXACTMBN);
+ case OP_EXACTMBN: MOP_IN(OP_EXACTMBN);
GET_LENGTH_INC(tlen, p); /* mb-len */
GET_LENGTH_INC(tlen2, p); /* string len */
tlen2 *= tlen;
@@ -1820,19 +1636,19 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p++; s++;
}
sprev = s - tlen;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_CCLASS: STAT_OP_IN(OP_CCLASS);
+ case OP_CCLASS: MOP_IN(OP_CCLASS);
DATA_ENSURE(1);
if (BITSET_AT(((BitSetRef )p), *s) == 0) goto fail;
p += SIZE_BITSET;
- s += enc_len(encode, s); /* OP_CCLASS can match mb-code. \D, \S */
- STAT_OP_OUT;
+ s += enclen(encode, s); /* OP_CCLASS can match mb-code. \D, \S */
+ MOP_OUT;
break;
- case OP_CCLASS_MB: STAT_OP_IN(OP_CCLASS_MB);
+ case OP_CCLASS_MB: MOP_IN(OP_CCLASS_MB);
if (! ONIGENC_IS_MBC_HEAD(encode, s)) goto fail;
cclass_mb:
@@ -1843,7 +1659,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
int mb_len;
DATA_ENSURE(1);
- mb_len = enc_len(encode, s);
+ mb_len = enclen(encode, s);
DATA_ENSURE(mb_len);
ss = s;
s += mb_len;
@@ -1858,10 +1674,10 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
#endif
}
p += tlen;
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_CCLASS_MIX: STAT_OP_IN(OP_CCLASS_MIX);
+ case OP_CCLASS_MIX: MOP_IN(OP_CCLASS_MIX);
DATA_ENSURE(1);
if (ONIGENC_IS_MBC_HEAD(encode, s)) {
p += SIZE_BITSET;
@@ -1876,18 +1692,18 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p += tlen;
s++;
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_CCLASS_NOT: STAT_OP_IN(OP_CCLASS_NOT);
+ case OP_CCLASS_NOT: MOP_IN(OP_CCLASS_NOT);
DATA_ENSURE(1);
if (BITSET_AT(((BitSetRef )p), *s) != 0) goto fail;
p += SIZE_BITSET;
- s += enc_len(encode, s);
- STAT_OP_OUT;
+ s += enclen(encode, s);
+ MOP_OUT;
break;
- case OP_CCLASS_MB_NOT: STAT_OP_IN(OP_CCLASS_MB_NOT);
+ case OP_CCLASS_MB_NOT: MOP_IN(OP_CCLASS_MB_NOT);
DATA_ENSURE(1);
if (! ONIGENC_IS_MBC_HEAD(encode, s)) {
s++;
@@ -1901,9 +1717,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
{
OnigCodePoint code;
UChar *ss;
- int mb_len = enc_len(encode, s);
+ int mb_len = enclen(encode, s);
- if (s + mb_len > end) {
+ if (! DATA_ENSURE_CHECK(mb_len)) {
DATA_ENSURE(1);
s = (UChar* )end;
p += tlen;
@@ -1925,10 +1741,10 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p += tlen;
cc_mb_not_success:
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_CCLASS_MIX_NOT: STAT_OP_IN(OP_CCLASS_MIX_NOT);
+ case OP_CCLASS_MIX_NOT: MOP_IN(OP_CCLASS_MIX_NOT);
DATA_ENSURE(1);
if (ONIGENC_IS_MBC_HEAD(encode, s)) {
p += SIZE_BITSET;
@@ -1943,10 +1759,10 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p += tlen;
s++;
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_CCLASS_NODE: STAT_OP_IN(OP_CCLASS_NODE);
+ case OP_CCLASS_NODE: MOP_IN(OP_CCLASS_NODE);
{
OnigCodePoint code;
void *node;
@@ -1955,49 +1771,49 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
DATA_ENSURE(1);
GET_POINTER_INC(node, p);
- mb_len = enc_len(encode, s);
+ mb_len = enclen(encode, s);
ss = s;
s += mb_len;
DATA_ENSURE(0);
code = ONIGENC_MBC_TO_CODE(encode, ss, s);
- if (is_code_in_cc(mb_len, code, node) == 0) goto fail;
+ if (onig_is_code_in_cc_len(mb_len, code, node) == 0) goto fail;
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_ANYCHAR: STAT_OP_IN(OP_ANYCHAR);
+ case OP_ANYCHAR: MOP_IN(OP_ANYCHAR);
DATA_ENSURE(1);
- n = enc_len(encode, s);
+ n = enclen(encode, s);
DATA_ENSURE(n);
if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
s += n;
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_ANYCHAR_ML: STAT_OP_IN(OP_ANYCHAR_ML);
+ case OP_ANYCHAR_ML: MOP_IN(OP_ANYCHAR_ML);
DATA_ENSURE(1);
- n = enc_len(encode, s);
+ n = enclen(encode, s);
DATA_ENSURE(n);
s += n;
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_ANYCHAR_STAR: STAT_OP_IN(OP_ANYCHAR_STAR);
- while (s < end) {
+ case OP_ANYCHAR_STAR: MOP_IN(OP_ANYCHAR_STAR);
+ while (DATA_ENSURE_CHECK1) {
STACK_PUSH_ALT(p, s, sprev);
- n = enc_len(encode, s);
+ n = enclen(encode, s);
DATA_ENSURE(n);
if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
sprev = s;
s += n;
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_ANYCHAR_ML_STAR: STAT_OP_IN(OP_ANYCHAR_ML_STAR);
- while (s < end) {
+ case OP_ANYCHAR_ML_STAR: MOP_IN(OP_ANYCHAR_ML_STAR);
+ while (DATA_ENSURE_CHECK1) {
STACK_PUSH_ALT(p, s, sprev);
- n = enc_len(encode, s);
+ n = enclen(encode, s);
if (n > 1) {
DATA_ENSURE(n);
sprev = s;
@@ -2008,31 +1824,31 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
s++;
}
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_ANYCHAR_STAR_PEEK_NEXT: STAT_OP_IN(OP_ANYCHAR_STAR_PEEK_NEXT);
- while (s < end) {
+ case OP_ANYCHAR_STAR_PEEK_NEXT: MOP_IN(OP_ANYCHAR_STAR_PEEK_NEXT);
+ while (DATA_ENSURE_CHECK1) {
if (*p == *s) {
STACK_PUSH_ALT(p + 1, s, sprev);
}
- n = enc_len(encode, s);
+ n = enclen(encode, s);
DATA_ENSURE(n);
if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
sprev = s;
s += n;
}
p++;
- STAT_OP_OUT;
+ MOP_OUT;
break;
- case OP_ANYCHAR_ML_STAR_PEEK_NEXT:STAT_OP_IN(OP_ANYCHAR_ML_STAR_PEEK_NEXT);
- while (s < end) {
+ case OP_ANYCHAR_ML_STAR_PEEK_NEXT:MOP_IN(OP_ANYCHAR_ML_STAR_PEEK_NEXT);
+ while (DATA_ENSURE_CHECK1) {
if (*p == *s) {
STACK_PUSH_ALT(p + 1, s, sprev);
}
- n = enc_len(encode, s);
- if (n >1) {
+ n = enclen(encode, s);
+ if (n > 1) {
DATA_ENSURE(n);
sprev = s;
s += n;
@@ -2043,36 +1859,36 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
}
}
p++;
- STAT_OP_OUT;
+ MOP_OUT;
break;
#ifdef USE_COMBINATION_EXPLOSION_CHECK
- case OP_STATE_CHECK_ANYCHAR_STAR: STAT_OP_IN(OP_STATE_CHECK_ANYCHAR_STAR);
+ case OP_STATE_CHECK_ANYCHAR_STAR: MOP_IN(OP_STATE_CHECK_ANYCHAR_STAR);
GET_STATE_CHECK_NUM_INC(mem, p);
- while (s < end) {
+ while (DATA_ENSURE_CHECK1) {
STATE_CHECK_VAL(scv, mem);
if (scv) goto fail;
STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem);
- n = enc_len(encode, s);
+ n = enclen(encode, s);
DATA_ENSURE(n);
if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
sprev = s;
s += n;
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
case OP_STATE_CHECK_ANYCHAR_ML_STAR:
- STAT_OP_IN(OP_STATE_CHECK_ANYCHAR_ML_STAR);
+ MOP_IN(OP_STATE_CHECK_ANYCHAR_ML_STAR);
GET_STATE_CHECK_NUM_INC(mem, p);
- while (s < end) {
+ while (DATA_ENSURE_CHECK1) {
STATE_CHECK_VAL(scv, mem);
if (scv) goto fail;
STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem);
- n = enc_len(encode, s);
+ n = enclen(encode, s);
if (n > 1) {
DATA_ENSURE(n);
sprev = s;
@@ -2083,29 +1899,29 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
s++;
}
}
- STAT_OP_OUT;
+ MOP_OUT;
break;
#endif /* USE_COMBINATION_EXPLOSION_CHECK */
- case OP_WORD: STAT_OP_IN(OP_WORD);
+ case OP_WORD: MOP_IN(OP_WORD);
DATA_ENSURE(1);
if (! ONIGENC_IS_MBC_WORD(encode, s, end))
goto fail;
- s += enc_len(encode, s);
- STAT_OP_OUT;
+ s += enclen(encode, s);
+ MOP_OUT;
break;
- case OP_NOT_WORD: STAT_OP_IN(OP_NOT_WORD);
+ case OP_NOT_WORD: MOP_IN(OP_NOT_WORD);
DATA_ENSURE(1);
if (ONIGENC_IS_MBC_WORD(encode, s, end))
goto fail;
- s += enc_len(encode, s);
- STAT_OP_OUT;
+ s += enclen(encode, s);
+ MOP_OUT;
break;
- case OP_WORD_BOUND: STAT_OP_IN(OP_WORD_BOUND);
+ case OP_WORD_BOUND: MOP_IN(OP_WORD_BOUND);
if (ON_STR_BEGIN(s)) {
DATA_ENSURE(1);
if (! ONIGENC_IS_MBC_WORD(encode, s, end))
@@ -2120,13 +1936,13 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
== ONIGENC_IS_MBC_WORD(encode, sprev, end))
goto fail;
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_NOT_WORD_BOUND: STAT_OP_IN(OP_NOT_WORD_BOUND);
+ case OP_NOT_WORD_BOUND: MOP_IN(OP_NOT_WORD_BOUND);
if (ON_STR_BEGIN(s)) {
- if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end))
+ if (DATA_ENSURE_CHECK1 && ONIGENC_IS_MBC_WORD(encode, s, end))
goto fail;
}
else if (ON_STR_END(s)) {
@@ -2138,25 +1954,25 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
!= ONIGENC_IS_MBC_WORD(encode, sprev, end))
goto fail;
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#ifdef USE_WORD_BEGIN_END
- case OP_WORD_BEGIN: STAT_OP_IN(OP_WORD_BEGIN);
- if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end)) {
+ case OP_WORD_BEGIN: MOP_IN(OP_WORD_BEGIN);
+ if (DATA_ENSURE_CHECK1 && ONIGENC_IS_MBC_WORD(encode, s, end)) {
if (ON_STR_BEGIN(s) || !ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
}
goto fail;
break;
- case OP_WORD_END: STAT_OP_IN(OP_WORD_END);
+ case OP_WORD_END: MOP_IN(OP_WORD_END);
if (!ON_STR_BEGIN(s) && ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
if (ON_STR_END(s) || !ONIGENC_IS_MBC_WORD(encode, s, end)) {
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
}
@@ -2164,80 +1980,81 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
break;
#endif
- case OP_BEGIN_BUF: STAT_OP_IN(OP_BEGIN_BUF);
+ case OP_BEGIN_BUF: MOP_IN(OP_BEGIN_BUF);
if (! ON_STR_BEGIN(s)) goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_END_BUF: STAT_OP_IN(OP_END_BUF);
+ case OP_END_BUF: MOP_IN(OP_END_BUF);
if (! ON_STR_END(s)) goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_BEGIN_LINE: STAT_OP_IN(OP_BEGIN_LINE);
+ case OP_BEGIN_LINE: MOP_IN(OP_BEGIN_LINE);
if (ON_STR_BEGIN(s)) {
if (IS_NOTBOL(msa->options)) goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
else if (ONIGENC_IS_MBC_NEWLINE(encode, sprev, end) && !ON_STR_END(s)) {
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
goto fail;
break;
- case OP_END_LINE: STAT_OP_IN(OP_END_LINE);
+ case OP_END_LINE: MOP_IN(OP_END_LINE);
if (ON_STR_END(s)) {
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
#endif
if (IS_NOTEOL(msa->options)) goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
}
#endif
}
else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) {
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
#ifdef USE_CRNL_AS_LINE_TERMINATOR
else if (ONIGENC_IS_MBC_CRNL(encode, s, end)) {
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
#endif
goto fail;
break;
- case OP_SEMI_END_BUF: STAT_OP_IN(OP_SEMI_END_BUF);
+ case OP_SEMI_END_BUF: MOP_IN(OP_SEMI_END_BUF);
if (ON_STR_END(s)) {
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
#endif
- if (IS_NOTEOL(msa->options)) goto fail; /* Is it needed? */
- STAT_OP_OUT;
+ if (IS_NOTEOL(msa->options)) goto fail;
+ MOP_OUT;
continue;
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
}
#endif
}
else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end) &&
- ON_STR_END(s + enc_len(encode, s))) {
- STAT_OP_OUT;
+ ON_STR_END(s + enclen(encode, s))) {
+ MOP_OUT;
continue;
}
#ifdef USE_CRNL_AS_LINE_TERMINATOR
else if (ONIGENC_IS_MBC_CRNL(encode, s, end)) {
- UChar* ss = s + enc_len(encode, s);
- if (ON_STR_END(ss + enc_len(encode, ss))) {
- STAT_OP_OUT;
+ UChar* ss = s + enclen(encode, s);
+ ss += enclen(encode, ss);
+ if (ON_STR_END(ss)) {
+ MOP_OUT;
continue;
}
}
@@ -2245,79 +2062,79 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
goto fail;
break;
- case OP_BEGIN_POSITION: STAT_OP_IN(OP_BEGIN_POSITION);
+ case OP_BEGIN_POSITION: MOP_IN(OP_BEGIN_POSITION);
if (s != msa->start)
goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_MEMORY_START_PUSH: STAT_OP_IN(OP_MEMORY_START_PUSH);
+ case OP_MEMORY_START_PUSH: MOP_IN(OP_MEMORY_START_PUSH);
GET_MEMNUM_INC(mem, p);
STACK_PUSH_MEM_START(mem, s);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_MEMORY_START: STAT_OP_IN(OP_MEMORY_START);
+ case OP_MEMORY_START: MOP_IN(OP_MEMORY_START);
GET_MEMNUM_INC(mem, p);
- mem_start_stk[mem] = (StackIndex )((void* )s);
- STAT_OP_OUT;
+ mem_start_stk[mem] = (OnigStackIndex )((void* )s);
+ MOP_OUT;
continue;
break;
- case OP_MEMORY_END_PUSH: STAT_OP_IN(OP_MEMORY_END_PUSH);
+ case OP_MEMORY_END_PUSH: MOP_IN(OP_MEMORY_END_PUSH);
GET_MEMNUM_INC(mem, p);
STACK_PUSH_MEM_END(mem, s);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_MEMORY_END: STAT_OP_IN(OP_MEMORY_END);
+ case OP_MEMORY_END: MOP_IN(OP_MEMORY_END);
GET_MEMNUM_INC(mem, p);
- mem_end_stk[mem] = (StackIndex )((void* )s);
- STAT_OP_OUT;
+ mem_end_stk[mem] = (OnigStackIndex )((void* )s);
+ MOP_OUT;
continue;
break;
#ifdef USE_SUBEXP_CALL
- case OP_MEMORY_END_PUSH_REC: STAT_OP_IN(OP_MEMORY_END_PUSH_REC);
+ case OP_MEMORY_END_PUSH_REC: MOP_IN(OP_MEMORY_END_PUSH_REC);
GET_MEMNUM_INC(mem, p);
STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
STACK_PUSH_MEM_END(mem, s);
mem_start_stk[mem] = GET_STACK_INDEX(stkp);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_MEMORY_END_REC: STAT_OP_IN(OP_MEMORY_END_REC);
+ case OP_MEMORY_END_REC: MOP_IN(OP_MEMORY_END_REC);
GET_MEMNUM_INC(mem, p);
- mem_end_stk[mem] = (StackIndex )((void* )s);
+ mem_end_stk[mem] = (OnigStackIndex )((void* )s);
STACK_GET_MEM_START(mem, stkp);
if (BIT_STATUS_AT(reg->bt_mem_start, mem))
mem_start_stk[mem] = GET_STACK_INDEX(stkp);
else
- mem_start_stk[mem] = (StackIndex )((void* )stkp->u.mem.pstr);
+ mem_start_stk[mem] = (OnigStackIndex )((void* )stkp->u.mem.pstr);
STACK_PUSH_MEM_END_MARK(mem);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#endif
- case OP_BACKREF1: STAT_OP_IN(OP_BACKREF1);
+ case OP_BACKREF1: MOP_IN(OP_BACKREF1);
mem = 1;
goto backref;
break;
- case OP_BACKREF2: STAT_OP_IN(OP_BACKREF2);
+ case OP_BACKREF2: MOP_IN(OP_BACKREF2);
mem = 2;
goto backref;
break;
- case OP_BACKREFN: STAT_OP_IN(OP_BACKREFN);
+ case OP_BACKREFN: MOP_IN(OP_BACKREFN);
GET_MEMNUM_INC(mem, p);
backref:
{
@@ -2342,15 +2159,15 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
DATA_ENSURE(n);
sprev = s;
STRING_CMP(pstart, s, n);
- while (sprev + (len = enc_len(encode, sprev)) < s)
+ while (sprev + (len = enclen(encode, sprev)) < s)
sprev += len;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
break;
- case OP_BACKREFN_IC: STAT_OP_IN(OP_BACKREFN_IC);
+ case OP_BACKREFN_IC: MOP_IN(OP_BACKREFN_IC);
GET_MEMNUM_INC(mem, p);
{
int len;
@@ -2373,16 +2190,16 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
n = pend - pstart;
DATA_ENSURE(n);
sprev = s;
- STRING_CMP_IC(ambig_flag, pstart, &s, n);
- while (sprev + (len = enc_len(encode, sprev)) < s)
+ STRING_CMP_IC(case_fold_flag, pstart, &s, n);
+ while (sprev + (len = enclen(encode, sprev)) < s)
sprev += len;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
break;
- case OP_BACKREF_MULTI: STAT_OP_IN(OP_BACKREF_MULTI);
+ case OP_BACKREF_MULTI: MOP_IN(OP_BACKREF_MULTI);
{
int len, is_fail;
UChar *pstart, *pend, *swork;
@@ -2409,19 +2226,19 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
STRING_CMP_VALUE(pstart, swork, n, is_fail);
if (is_fail) continue;
s = swork;
- while (sprev + (len = enc_len(encode, sprev)) < s)
+ while (sprev + (len = enclen(encode, sprev)) < s)
sprev += len;
p += (SIZE_MEMNUM * (tlen - i - 1));
break; /* success */
}
if (i == tlen) goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
break;
- case OP_BACKREF_MULTI_IC: STAT_OP_IN(OP_BACKREF_MULTI_IC);
+ case OP_BACKREF_MULTI_IC: MOP_IN(OP_BACKREF_MULTI_IC);
{
int len, is_fail;
UChar *pstart, *pend, *swork;
@@ -2445,23 +2262,23 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
DATA_ENSURE(n);
sprev = s;
swork = s;
- STRING_CMP_VALUE_IC(ambig_flag, pstart, &swork, n, is_fail);
+ STRING_CMP_VALUE_IC(case_fold_flag, pstart, &swork, n, is_fail);
if (is_fail) continue;
s = swork;
- while (sprev + (len = enc_len(encode, sprev)) < s)
+ while (sprev + (len = enclen(encode, sprev)) < s)
sprev += len;
p += (SIZE_MEMNUM * (tlen - i - 1));
break; /* success */
}
if (i == tlen) goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
break;
-#ifdef USE_BACKREF_AT_LEVEL
- case OP_BACKREF_AT_LEVEL:
+#ifdef USE_BACKREF_WITH_LEVEL
+ case OP_BACKREF_WITH_LEVEL:
{
int len;
OnigOptionType ic;
@@ -2472,9 +2289,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
GET_LENGTH_INC(tlen, p);
sprev = s;
- if (backref_match_at_nested_level(reg, stk, stk_base, ic, ambig_flag
- , (int )level, (int )tlen, p, &s, end)) {
- while (sprev + (len = enc_len(encode, sprev)) < s)
+ if (backref_match_at_nested_level(reg, stk, stk_base, ic
+ , case_fold_flag, (int )level, (int )tlen, p, &s, end)) {
+ while (sprev + (len = enclen(encode, sprev)) < s)
sprev += len;
p += (SIZE_MEMNUM * tlen);
@@ -2482,35 +2299,37 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
else
goto fail;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
break;
#endif
-
- case OP_SET_OPTION_PUSH: STAT_OP_IN(OP_SET_OPTION_PUSH);
+
+#if 0 /* no need: IS_DYNAMIC_OPTION() == 0 */
+ case OP_SET_OPTION_PUSH: MOP_IN(OP_SET_OPTION_PUSH);
GET_OPTION_INC(option, p);
STACK_PUSH_ALT(p, s, sprev);
p += SIZE_OP_SET_OPTION + SIZE_OP_FAIL;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_SET_OPTION: STAT_OP_IN(OP_SET_OPTION);
+ case OP_SET_OPTION: MOP_IN(OP_SET_OPTION);
GET_OPTION_INC(option, p);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
+#endif
- case OP_NULL_CHECK_START: STAT_OP_IN(OP_NULL_CHECK_START);
+ case OP_NULL_CHECK_START: MOP_IN(OP_NULL_CHECK_START);
GET_MEMNUM_INC(mem, p); /* mem: null check id */
STACK_PUSH_NULL_CHECK_START(mem, s);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_NULL_CHECK_END: STAT_OP_IN(OP_NULL_CHECK_END);
+ case OP_NULL_CHECK_END: MOP_IN(OP_NULL_CHECK_END);
{
int isnull;
@@ -2540,12 +2359,12 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
}
}
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
-#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
- case OP_NULL_CHECK_END_MEMST: STAT_OP_IN(OP_NULL_CHECK_END_MEMST);
+#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT
+ case OP_NULL_CHECK_END_MEMST: MOP_IN(OP_NULL_CHECK_END_MEMST);
{
int isnull;
@@ -2560,19 +2379,19 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
goto null_check_found;
}
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#endif
#ifdef USE_SUBEXP_CALL
case OP_NULL_CHECK_END_MEMST_PUSH:
- STAT_OP_IN(OP_NULL_CHECK_END_MEMST_PUSH);
+ MOP_IN(OP_NULL_CHECK_END_MEMST_PUSH);
{
int isnull;
GET_MEMNUM_INC(mem, p); /* mem: null check id */
-#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
+#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT
STACK_NULL_CHECK_MEMST_REC(isnull, mem, s, reg);
#else
STACK_NULL_CHECK_REC(isnull, mem, s);
@@ -2589,39 +2408,39 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
STACK_PUSH_NULL_CHECK_END(mem);
}
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#endif
- case OP_JUMP: STAT_OP_IN(OP_JUMP);
+ case OP_JUMP: MOP_IN(OP_JUMP);
GET_RELADDR_INC(addr, p);
p += addr;
- STAT_OP_OUT;
+ MOP_OUT;
CHECK_INTERRUPT_IN_MATCH_AT;
continue;
break;
- case OP_PUSH: STAT_OP_IN(OP_PUSH);
+ case OP_PUSH: MOP_IN(OP_PUSH);
GET_RELADDR_INC(addr, p);
STACK_PUSH_ALT(p + addr, s, sprev);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#ifdef USE_COMBINATION_EXPLOSION_CHECK
- case OP_STATE_CHECK_PUSH: STAT_OP_IN(OP_STATE_CHECK_PUSH);
+ case OP_STATE_CHECK_PUSH: MOP_IN(OP_STATE_CHECK_PUSH);
GET_STATE_CHECK_NUM_INC(mem, p);
STATE_CHECK_VAL(scv, mem);
if (scv) goto fail;
GET_RELADDR_INC(addr, p);
STACK_PUSH_ALT_WITH_STATE_CHECK(p + addr, s, sprev, mem);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_STATE_CHECK_PUSH_OR_JUMP: STAT_OP_IN(OP_STATE_CHECK_PUSH_OR_JUMP);
+ case OP_STATE_CHECK_PUSH_OR_JUMP: MOP_IN(OP_STATE_CHECK_PUSH_OR_JUMP);
GET_STATE_CHECK_NUM_INC(mem, p);
GET_RELADDR_INC(addr, p);
STATE_CHECK_VAL(scv, mem);
@@ -2631,54 +2450,54 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
else {
STACK_PUSH_ALT_WITH_STATE_CHECK(p + addr, s, sprev, mem);
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_STATE_CHECK: STAT_OP_IN(OP_STATE_CHECK);
+ case OP_STATE_CHECK: MOP_IN(OP_STATE_CHECK);
GET_STATE_CHECK_NUM_INC(mem, p);
STATE_CHECK_VAL(scv, mem);
if (scv) goto fail;
STACK_PUSH_STATE_CHECK(s, mem);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#endif /* USE_COMBINATION_EXPLOSION_CHECK */
- case OP_POP: STAT_OP_IN(OP_POP);
+ case OP_POP: MOP_IN(OP_POP);
STACK_POP_ONE;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_PUSH_OR_JUMP_EXACT1: STAT_OP_IN(OP_PUSH_OR_JUMP_EXACT1);
+ case OP_PUSH_OR_JUMP_EXACT1: MOP_IN(OP_PUSH_OR_JUMP_EXACT1);
GET_RELADDR_INC(addr, p);
- if (*p == *s && DATA_ENSURE_CHECK(1)) {
+ if (*p == *s && DATA_ENSURE_CHECK1) {
p++;
STACK_PUSH_ALT(p + addr, s, sprev);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
p += (addr + 1);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_PUSH_IF_PEEK_NEXT: STAT_OP_IN(OP_PUSH_IF_PEEK_NEXT);
+ case OP_PUSH_IF_PEEK_NEXT: MOP_IN(OP_PUSH_IF_PEEK_NEXT);
GET_RELADDR_INC(addr, p);
if (*p == *s) {
p++;
STACK_PUSH_ALT(p + addr, s, sprev);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
}
p++;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_REPEAT: STAT_OP_IN(OP_REPEAT);
+ case OP_REPEAT: MOP_IN(OP_REPEAT);
{
GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
GET_RELADDR_INC(addr, p);
@@ -2691,11 +2510,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
STACK_PUSH_ALT(p + addr, s, sprev);
}
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_REPEAT_NG: STAT_OP_IN(OP_REPEAT_NG);
+ case OP_REPEAT_NG: MOP_IN(OP_REPEAT_NG);
{
GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
GET_RELADDR_INC(addr, p);
@@ -2709,11 +2528,11 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p += addr;
}
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_REPEAT_INC: STAT_OP_IN(OP_REPEAT_INC);
+ case OP_REPEAT_INC: MOP_IN(OP_REPEAT_INC);
GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
si = repeat_stk[mem];
stkp = STACK_AT(si);
@@ -2731,19 +2550,19 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
p = stkp->u.repeat.pcode;
}
STACK_PUSH_REPEAT_INC(si);
- STAT_OP_OUT;
+ MOP_OUT;
CHECK_INTERRUPT_IN_MATCH_AT;
continue;
break;
- case OP_REPEAT_INC_SG: STAT_OP_IN(OP_REPEAT_INC_SG);
+ case OP_REPEAT_INC_SG: MOP_IN(OP_REPEAT_INC_SG);
GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
STACK_GET_REPEAT(mem, stkp);
si = GET_STACK_INDEX(stkp);
goto repeat_inc;
break;
- case OP_REPEAT_INC_NG: STAT_OP_IN(OP_REPEAT_INC_NG);
+ case OP_REPEAT_INC_NG: MOP_IN(OP_REPEAT_INC_NG);
GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
si = repeat_stk[mem];
stkp = STACK_AT(si);
@@ -2765,68 +2584,68 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
else if (stkp->u.repeat.count == reg->repeat_range[mem].upper) {
STACK_PUSH_REPEAT_INC(si);
}
- STAT_OP_OUT;
+ MOP_OUT;
CHECK_INTERRUPT_IN_MATCH_AT;
continue;
break;
- case OP_REPEAT_INC_NG_SG: STAT_OP_IN(OP_REPEAT_INC_NG_SG);
+ case OP_REPEAT_INC_NG_SG: MOP_IN(OP_REPEAT_INC_NG_SG);
GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
STACK_GET_REPEAT(mem, stkp);
si = GET_STACK_INDEX(stkp);
goto repeat_inc_ng;
break;
- case OP_PUSH_POS: STAT_OP_IN(OP_PUSH_POS);
+ case OP_PUSH_POS: MOP_IN(OP_PUSH_POS);
STACK_PUSH_POS(s, sprev);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_POP_POS: STAT_OP_IN(OP_POP_POS);
+ case OP_POP_POS: MOP_IN(OP_POP_POS);
{
STACK_POS_END(stkp);
s = stkp->u.state.pstr;
sprev = stkp->u.state.pstr_prev;
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_PUSH_POS_NOT: STAT_OP_IN(OP_PUSH_POS_NOT);
+ case OP_PUSH_POS_NOT: MOP_IN(OP_PUSH_POS_NOT);
GET_RELADDR_INC(addr, p);
STACK_PUSH_POS_NOT(p + addr, s, sprev);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_FAIL_POS: STAT_OP_IN(OP_FAIL_POS);
+ case OP_FAIL_POS: MOP_IN(OP_FAIL_POS);
STACK_POP_TIL_POS_NOT;
goto fail;
break;
- case OP_PUSH_STOP_BT: STAT_OP_IN(OP_PUSH_STOP_BT);
+ case OP_PUSH_STOP_BT: MOP_IN(OP_PUSH_STOP_BT);
STACK_PUSH_STOP_BT;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_POP_STOP_BT: STAT_OP_IN(OP_POP_STOP_BT);
+ case OP_POP_STOP_BT: MOP_IN(OP_POP_STOP_BT);
STACK_STOP_BT_END;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_LOOK_BEHIND: STAT_OP_IN(OP_LOOK_BEHIND);
+ case OP_LOOK_BEHIND: MOP_IN(OP_LOOK_BEHIND);
GET_LENGTH_INC(tlen, p);
s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
if (IS_NULL(s)) goto fail;
sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_PUSH_LOOK_BEHIND_NOT: STAT_OP_IN(OP_PUSH_LOOK_BEHIND_NOT);
+ case OP_PUSH_LOOK_BEHIND_NOT: MOP_IN(OP_PUSH_LOOK_BEHIND_NOT);
GET_RELADDR_INC(addr, p);
GET_LENGTH_INC(tlen, p);
q = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
@@ -2841,28 +2660,28 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
s = q;
sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
}
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_FAIL_LOOK_BEHIND_NOT: STAT_OP_IN(OP_FAIL_LOOK_BEHIND_NOT);
+ case OP_FAIL_LOOK_BEHIND_NOT: MOP_IN(OP_FAIL_LOOK_BEHIND_NOT);
STACK_POP_TIL_LOOK_BEHIND_NOT;
goto fail;
break;
#ifdef USE_SUBEXP_CALL
- case OP_CALL: STAT_OP_IN(OP_CALL);
+ case OP_CALL: MOP_IN(OP_CALL);
GET_ABSADDR_INC(addr, p);
STACK_PUSH_CALL_FRAME(p);
p = reg->p + addr;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
- case OP_RETURN: STAT_OP_IN(OP_RETURN);
+ case OP_RETURN: MOP_IN(OP_RETURN);
STACK_RETURN(p);
STACK_PUSH_RETURN;
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
#endif
@@ -2872,9 +2691,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
break;
fail:
- STAT_OP_OUT;
+ MOP_OUT;
/* fall */
- case OP_FAIL: STAT_OP_IN(OP_FAIL);
+ case OP_FAIL: MOP_IN(OP_FAIL);
STACK_POP;
p = stk->u.state.pcode;
s = stk->u.state.pstr;
@@ -2887,7 +2706,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
}
#endif
- STAT_OP_OUT;
+ MOP_OUT;
continue;
break;
@@ -2943,32 +2762,25 @@ slow_search(OnigEncoding enc, UChar* target, UChar* target_end,
if (t == target_end)
return s;
}
- s += enc_len(enc, s);
+ s += enclen(enc, s);
}
return (UChar* )NULL;
}
static int
-str_lower_case_match(OnigEncoding enc, int ambig_flag,
+str_lower_case_match(OnigEncoding enc, int case_fold_flag,
const UChar* t, const UChar* tend,
const UChar* p, const UChar* end)
{
int lowlen;
- UChar *q, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
- const UChar* tsave;
- const UChar* psave;
-
- tsave = t;
- psave = p;
+ UChar *q, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
while (t < tend) {
- lowlen = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &p, end, lowbuf);
+ lowlen = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &p, end, lowbuf);
q = lowbuf;
while (lowlen > 0) {
- if (*t++ != *q++) {
- return 0;
- }
+ if (*t++ != *q++) return 0;
lowlen--;
}
}
@@ -2977,7 +2789,7 @@ str_lower_case_match(OnigEncoding enc, int ambig_flag,
}
static UChar*
-slow_search_ic(OnigEncoding enc, int ambig_flag,
+slow_search_ic(OnigEncoding enc, int case_fold_flag,
UChar* target, UChar* target_end,
const UChar* text, const UChar* text_end, UChar* text_range)
{
@@ -2991,10 +2803,11 @@ slow_search_ic(OnigEncoding enc, int ambig_flag,
s = (UChar* )text;
while (s < end) {
- if (str_lower_case_match(enc, ambig_flag, target, target_end, s, text_end))
+ if (str_lower_case_match(enc, case_fold_flag, target, target_end,
+ s, text_end))
return s;
- s += enc_len(enc, s);
+ s += enclen(enc, s);
}
return (UChar* )NULL;
@@ -3033,7 +2846,7 @@ slow_search_backward(OnigEncoding enc, UChar* target, UChar* target_end,
}
static UChar*
-slow_search_backward_ic(OnigEncoding enc, int ambig_flag,
+slow_search_backward_ic(OnigEncoding enc, int case_fold_flag,
UChar* target, UChar* target_end,
const UChar* text, const UChar* adjust_text,
const UChar* text_end, const UChar* text_start)
@@ -3048,7 +2861,7 @@ slow_search_backward_ic(OnigEncoding enc, int ambig_flag,
s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s);
while (s >= text) {
- if (str_lower_case_match(enc, ambig_flag,
+ if (str_lower_case_match(enc, case_fold_flag,
target, target_end, s, text_end))
return s;
@@ -3084,15 +2897,14 @@ bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
while (s < end) {
p = se = s + tlen1;
t = tail;
- while (t >= target && *p == *t) {
- p--; t--;
+ while (*p == *t) {
+ if (t == target) return (UChar* )s;
+ p--; t--;
}
- if (t < target) return (UChar* )s;
-
skip = reg->map[*se];
t = s;
do {
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
} while ((s - t) < skip && s < end);
}
}
@@ -3100,15 +2912,14 @@ bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
while (s < end) {
p = se = s + tlen1;
t = tail;
- while (t >= target && *p == *t) {
- p--; t--;
+ while (*p == *t) {
+ if (t == target) return (UChar* )s;
+ p--; t--;
}
- if (t < target) return (UChar* )s;
-
skip = reg->int_map[*se];
t = s;
do {
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
} while ((s - t) < skip && s < end);
}
}
@@ -3133,10 +2944,10 @@ bm_search(regex_t* reg, const UChar* target, const UChar* target_end,
while (s < end) {
p = s;
t = tail;
- while (t >= target && *p == *t) {
+ while (*p == *t) {
+ if (t == target) return (UChar* )p;
p--; t--;
}
- if (t < target) return (UChar* )(p + 1);
s += reg->map[*s];
}
}
@@ -3144,10 +2955,10 @@ bm_search(regex_t* reg, const UChar* target, const UChar* target_end,
while (s < end) {
p = s;
t = tail;
- while (t >= target && *p == *t) {
+ while (*p == *t) {
+ if (t == target) return (UChar* )p;
p--; t--;
}
- if (t < target) return (UChar* )(p + 1);
s += reg->int_map[*s];
}
}
@@ -3155,7 +2966,8 @@ bm_search(regex_t* reg, const UChar* target, const UChar* target_end,
}
static int
-set_bm_backward_skip(UChar* s, UChar* end, OnigEncoding enc, int** skip)
+set_bm_backward_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED,
+ int** skip)
{
int i, len;
@@ -3213,7 +3025,7 @@ map_search(OnigEncoding enc, UChar map[],
while (s < text_range) {
if (map[*s]) return (UChar* )s;
- s += enc_len(enc, s);
+ s += enclen(enc, s);
}
return (UChar* )NULL;
}
@@ -3239,7 +3051,7 @@ onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, On
{
int r;
UChar *prev;
- MatchArg msa;
+ OnigMatchArg msa;
#if defined(USE_RECOMPILE_API) && defined(USE_MULTI_THREAD_SYSTEM)
start:
@@ -3275,7 +3087,7 @@ onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, On
#endif
if (region
-#ifdef USE_POSIX_REGION_OPTION
+#ifdef USE_POSIX_API_REGION_OPTION
&& !IS_POSIX_REGION(option)
#endif
) {
@@ -3286,7 +3098,11 @@ onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, On
if (r == 0) {
prev = (UChar* )onigenc_get_prev_char_head(reg->enc, str, at);
- r = match_at(reg, str, end, at, prev, &msa);
+ r = match_at(reg, str, end,
+#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+ end,
+#endif
+ at, prev, &msa);
}
MATCH_ARG_FREE(msa);
@@ -3312,7 +3128,7 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
}
else {
UChar *q = p + reg->dmin;
- while (p < q) p += enc_len(reg->enc, p);
+ while (p < q) p += enclen(reg->enc, p);
}
}
@@ -3322,7 +3138,7 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
p = slow_search(reg->enc, reg->exact, reg->exact_end, p, end, range);
break;
case ONIG_OPTIMIZE_EXACT_IC:
- p = slow_search_ic(reg->enc, reg->ambig_flag,
+ p = slow_search_ic(reg->enc, reg->case_fold_flag,
reg->exact, reg->exact_end, p, end, range);
break;
@@ -3343,7 +3159,7 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
if (p - reg->dmin < s) {
retry_gate:
pprev = p;
- p += enc_len(reg->enc, p);
+ p += enclen(reg->enc, p);
goto retry;
}
@@ -3362,10 +3178,12 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
case ANCHOR_END_LINE:
if (ON_STR_END(p)) {
+#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
prev = (UChar* )onigenc_get_prev_char_head(reg->enc,
(pprev ? pprev : str), p);
if (prev && ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end))
goto retry_gate;
+#endif
}
else if (! ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end)
#ifdef USE_CRNL_AS_LINE_TERMINATOR
@@ -3443,7 +3261,7 @@ backward_search_range(regex_t* reg, const UChar* str, const UChar* end,
break;
case ONIG_OPTIMIZE_EXACT_IC:
- p = slow_search_backward_ic(reg->enc, reg->ambig_flag,
+ p = slow_search_backward_ic(reg->enc, reg->case_fold_flag,
reg->exact, reg->exact_end,
range, adjrange, end, p);
break;
@@ -3484,12 +3302,14 @@ backward_search_range(regex_t* reg, const UChar* str, const UChar* end,
case ANCHOR_END_LINE:
if (ON_STR_END(p)) {
+#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
prev = onigenc_get_prev_char_head(reg->enc, adjrange, p);
if (IS_NULL(prev)) goto fail;
if (ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) {
p = prev;
goto retry;
}
+#endif
}
else if (! ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end)
#ifdef USE_CRNL_AS_LINE_TERMINATOR
@@ -3532,8 +3352,11 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
{
int r;
UChar *s, *prev;
- MatchArg msa;
+ OnigMatchArg msa;
const UChar *orig_start = start;
+#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+ const UChar *orig_range = range;
+#endif
#if defined(USE_RECOMPILE_API) && defined(USE_MULTI_THREAD_SYSTEM)
start:
@@ -3567,7 +3390,7 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
#endif
if (region
-#ifdef USE_POSIX_REGION_OPTION
+#ifdef USE_POSIX_API_REGION_OPTION
&& !IS_POSIX_REGION(option)
#endif
) {
@@ -3577,8 +3400,32 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
if (start > end || start < str) goto mismatch_no_msa;
+
+#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
+#define MATCH_AND_RETURN_CHECK(upper_range) \
+ r = match_at(reg, str, end, (upper_range), s, prev, &msa); \
+ if (r != ONIG_MISMATCH) {\
+ if (r >= 0) {\
+ if (! IS_FIND_LONGEST(reg->options)) {\
+ goto match;\
+ }\
+ }\
+ else goto finish; /* error */ \
+ }
+#else
+#define MATCH_AND_RETURN_CHECK(upper_range) \
+ r = match_at(reg, str, end, (upper_range), s, prev, &msa); \
+ if (r != ONIG_MISMATCH) {\
+ if (r >= 0) {\
+ goto match;\
+ }\
+ else goto finish; /* error */ \
+ }
+#endif /* USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE */
+#else
#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
-#define MATCH_AND_RETURN_CHECK \
+#define MATCH_AND_RETURN_CHECK(none) \
r = match_at(reg, str, end, s, prev, &msa);\
if (r != ONIG_MISMATCH) {\
if (r >= 0) {\
@@ -3589,7 +3436,7 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
else goto finish; /* error */ \
}
#else
-#define MATCH_AND_RETURN_CHECK \
+#define MATCH_AND_RETURN_CHECK(none) \
r = match_at(reg, str, end, s, prev, &msa);\
if (r != ONIG_MISMATCH) {\
if (r >= 0) {\
@@ -3597,7 +3444,9 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
}\
else goto finish; /* error */ \
}
-#endif
+#endif /* USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE */
+#endif /* USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE */
+
/* anchor optimize: resume search range */
if (reg->anchor != 0 && str < end) {
@@ -3700,10 +3549,10 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
MATCH_ARG_INIT(msa, option, region, start);
#ifdef USE_COMBINATION_EXPLOSION_CHECK
- msa.state_check_buff = (void* )0;
- msa.state_check_buff_size = 0;
+ msa.state_check_buff = (void* )0;
+ msa.state_check_buff_size = 0; /* NO NEED, for valgrind */
#endif
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(end);
goto mismatch;
}
goto mismatch_no_msa;
@@ -3754,9 +3603,9 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
prev = low_prev;
}
while (s <= high) {
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(orig_range);
prev = s;
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
}
} while (s < range);
goto mismatch;
@@ -3767,13 +3616,13 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
if ((reg->anchor & ANCHOR_ANYCHAR_STAR) != 0) {
do {
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(orig_range);
prev = s;
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
while (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end) && s < range) {
prev = s;
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
}
} while (s < range);
goto mismatch;
@@ -3782,16 +3631,21 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
}
do {
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(orig_range);
prev = s;
- s += enc_len(reg->enc, s);
+ s += enclen(reg->enc, s);
} while (s < range);
if (s == range) { /* because empty match with /$/. */
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(orig_range);
}
}
else { /* backward search */
+#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
+ if (orig_start < end)
+ orig_start += enclen(reg->enc, orig_start); /* is upper range */
+#endif
+
if (reg->optimize != ONIG_OPTIMIZE_NONE) {
UChar *low, *high, *adjrange, *sch_start;
@@ -3814,7 +3668,7 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
while (s >= low) {
prev = onigenc_get_prev_char_head(reg->enc, str, s);
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(orig_start);
s = prev;
}
} while (s >= range);
@@ -3842,7 +3696,7 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
do {
prev = onigenc_get_prev_char_head(reg->enc, str, s);
- MATCH_AND_RETURN_CHECK;
+ MATCH_AND_RETURN_CHECK(orig_start);
s = prev;
} while (s >= range);
}
@@ -3865,7 +3719,7 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
/* If result is mismatch and no FIND_NOT_EMPTY option,
then the region is not setted in match_at(). */
if (IS_FIND_NOT_EMPTY(reg->options) && region
-#ifdef USE_POSIX_REGION_OPTION
+#ifdef USE_POSIX_API_REGION_OPTION
&& !IS_POSIX_REGION(option)
#endif
) {
@@ -3906,10 +3760,10 @@ onig_get_options(regex_t* reg)
return reg->options;
}
-extern OnigAmbigType
-onig_get_ambig_flag(regex_t* reg)
+extern OnigCaseFoldType
+onig_get_case_fold_flag(regex_t* reg)
{
- return reg->ambig_flag;
+ return reg->case_fold_flag;
}
extern OnigSyntaxType*
diff --git a/ext/mbstring/oniguruma/regext.c b/ext/mbstring/oniguruma/regext.c
index f5ad1f35a..b1b957b40 100755..100644
--- a/ext/mbstring/oniguruma/regext.c
+++ b/ext/mbstring/oniguruma/regext.c
@@ -2,7 +2,7 @@
regext.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -100,7 +100,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
if (to == ONIG_ENCODING_UTF16_BE) {
if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) {
*conv = (UChar* )xmalloc(len * 2);
- CHECK_NULL_RETURN_VAL(*conv, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*conv);
*conv_end = *conv + (len * 2);
conv_ext0be(s, end, *conv);
return 0;
@@ -108,7 +108,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
else if (from == ONIG_ENCODING_UTF16_LE) {
swap16:
*conv = (UChar* )xmalloc(len);
- CHECK_NULL_RETURN_VAL(*conv, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*conv);
*conv_end = *conv + len;
conv_swap2bytes(s, end, *conv);
return 0;
@@ -117,7 +117,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
else if (to == ONIG_ENCODING_UTF16_LE) {
if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) {
*conv = (UChar* )xmalloc(len * 2);
- CHECK_NULL_RETURN_VAL(*conv, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*conv);
*conv_end = *conv + (len * 2);
conv_ext0le(s, end, *conv);
return 0;
@@ -129,7 +129,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
if (to == ONIG_ENCODING_UTF32_BE) {
if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) {
*conv = (UChar* )xmalloc(len * 4);
- CHECK_NULL_RETURN_VAL(*conv, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*conv);
*conv_end = *conv + (len * 4);
conv_ext0be32(s, end, *conv);
return 0;
@@ -137,7 +137,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
else if (from == ONIG_ENCODING_UTF32_LE) {
swap32:
*conv = (UChar* )xmalloc(len);
- CHECK_NULL_RETURN_VAL(*conv, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*conv);
*conv_end = *conv + len;
conv_swap4bytes(s, end, *conv);
return 0;
@@ -146,7 +146,7 @@ conv_encoding(OnigEncoding from, OnigEncoding to, const UChar* s, const UChar* e
else if (to == ONIG_ENCODING_UTF32_LE) {
if (from == ONIG_ENCODING_ASCII || from == ONIG_ENCODING_ISO_8859_1) {
*conv = (UChar* )xmalloc(len * 4);
- CHECK_NULL_RETURN_VAL(*conv, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*conv);
*conv_end = *conv + (len * 4);
conv_ext0le32(s, end, *conv);
return 0;
@@ -178,17 +178,24 @@ onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
cpat_end = (UChar* )pattern_end;
}
- r = onig_alloc_init(reg, ci->option, ci->ambig_flag, ci->target_enc,
- ci->syntax);
+ *reg = (regex_t* )xmalloc(sizeof(regex_t));
+ if (IS_NULL(*reg)) {
+ r = ONIGERR_MEMORY;
+ goto err2;
+ }
+
+ r = onig_reg_init(*reg, ci->option, ci->case_fold_flag, ci->target_enc,
+ ci->syntax);
if (r) goto err;
r = onig_compile(*reg, cpat, cpat_end, einfo);
if (r) {
+ err:
onig_free(*reg);
*reg = NULL;
}
- err:
+ err2:
if (cpat != pattern) xfree(cpat);
return r;
diff --git a/ext/mbstring/oniguruma/reggnu.c b/ext/mbstring/oniguruma/reggnu.c
index 248957c9d..4bd18c45e 100644
--- a/ext/mbstring/oniguruma/reggnu.c
+++ b/ext/mbstring/oniguruma/reggnu.c
@@ -2,7 +2,7 @@
reggnu.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -85,7 +85,7 @@ re_compile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf)
OnigErrorInfo einfo;
r = onig_compile(reg, (UChar* )pattern, (UChar* )(pattern + size), &einfo);
- if (r != 0) {
+ if (r != ONIG_NORMAL) {
if (IS_NOT_NULL(ebuf))
(void )onig_error_code_to_str((UChar* )ebuf, r, &einfo);
}
@@ -108,7 +108,7 @@ re_recompile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf)
r = onig_recompile(reg, (UChar* )pattern, (UChar* )(pattern + size),
reg->options, enc, OnigDefaultSyntax, &einfo);
- if (r != 0) {
+ if (r != ONIG_NORMAL) {
if (IS_NOT_NULL(ebuf))
(void )onig_error_code_to_str((UChar* )ebuf, r, &einfo);
}
@@ -125,10 +125,13 @@ re_free_pattern(regex_t* reg)
extern int
re_alloc_pattern(regex_t** reg)
{
- return onig_alloc_init(reg, ONIG_OPTION_DEFAULT,
- ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
- OnigEncDefaultCharEncoding,
- OnigDefaultSyntax);
+ *reg = (regex_t* )xmalloc(sizeof(regex_t));
+ if (IS_NULL(*reg)) return ONIGERR_MEMORY;
+
+ return onig_reg_init(*reg, ONIG_OPTION_DEFAULT,
+ ONIGENC_CASE_FOLD_DEFAULT,
+ OnigEncDefaultCharEncoding,
+ OnigDefaultSyntax);
}
extern void
@@ -138,18 +141,8 @@ re_set_casetable(const char* table)
}
extern void
-#ifdef ONIG_RUBY_M17N
-re_mbcinit(OnigEncoding enc)
-#else
re_mbcinit(int mb_code)
-#endif
{
-#ifdef ONIG_RUBY_M17N
-
- onigenc_set_default_encoding(enc);
-
-#else
-
OnigEncoding enc;
switch (mb_code) {
@@ -171,5 +164,4 @@ re_mbcinit(int mb_code)
}
onigenc_set_default_encoding(enc);
-#endif
}
diff --git a/ext/mbstring/oniguruma/regint.h b/ext/mbstring/oniguruma/regint.h
index d6819d8f9..a0ce4912d 100644
--- a/ext/mbstring/oniguruma/regint.h
+++ b/ext/mbstring/oniguruma/regint.h
@@ -4,7 +4,7 @@
regint.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,64 +56,77 @@
/* config */
/* spec. config */
-/* #define USE_UNICODE_FULL_RANGE_CTYPE */ /* --> move to regenc.h */
#define USE_NAMED_GROUP
#define USE_SUBEXP_CALL
-#define USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK /* /(?:()|())*\2/ */
+#define USE_BACKREF_WITH_LEVEL /* \k<name+n>, \k<name-n> */
+#define USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT /* /(?:()|())*\2/ */
#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE /* /\n$/ =~ "\n" */
#define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
/* #define USE_RECOMPILE_API */
-/* treat \r\n as line terminator.
- !!! NO SUPPORT !!!
- use this configuration on your own responsibility */
-/* #define USE_CRNL_AS_LINE_TERMINATOR */
+/* !!! moved to regenc.h. */ /* #define USE_CRNL_AS_LINE_TERMINATOR */
/* internal config */
-#define USE_RECYCLE_NODE
+#define USE_PARSE_TREE_NODE_RECYCLE
#define USE_OP_PUSH_OR_JUMP_EXACT
-#define USE_QUANTIFIER_PEEK_NEXT
-#define USE_ST_HASH_TABLE
+#define USE_QTFR_PEEK_NEXT
+#define USE_ST_LIBRARY
#define USE_SHARED_CCLASS_TABLE
#define INIT_MATCH_STACK_SIZE 160
#define DEFAULT_MATCH_STACK_LIMIT_SIZE 0 /* unlimited */
-/* interface to external system */
-#ifdef NOT_RUBY /* given from Makefile */
+#if defined(__GNUC__)
+# define ARG_UNUSED __attribute__ ((unused))
+#else
+# define ARG_UNUSED
+#endif
+
+/* */
+/* escape other system UChar definition */
#include "config.h"
-#define USE_BACKREF_AT_LEVEL
+#ifdef ONIG_ESCAPE_UCHAR_COLLISION
+#undef ONIG_ESCAPE_UCHAR_COLLISION
+#endif
+
+#define USE_WORD_BEGIN_END /* "\<", "\>" */
#define USE_CAPTURE_HISTORY
#define USE_VARIABLE_META_CHARS
-#define USE_WORD_BEGIN_END /* "\<": word-begin, "\>": word-end */
-#define USE_POSIX_REGION_OPTION /* needed for POSIX API support */
+#define USE_POSIX_API_REGION_OPTION
#define USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
/* #define USE_COMBINATION_EXPLOSION_CHECK */ /* (X*)* */
+
/* #define USE_MULTI_THREAD_SYSTEM */
-#define THREAD_SYSTEM_INIT /* depend on thread system */
-#define THREAD_SYSTEM_END /* depend on thread system */
-#define THREAD_ATOMIC_START /* depend on thread system */
-#define THREAD_ATOMIC_END /* depend on thread system */
-#define THREAD_PASS /* depend on thread system */
+#define THREAD_SYSTEM_INIT /* depend on thread system */
+#define THREAD_SYSTEM_END /* depend on thread system */
+#define THREAD_ATOMIC_START /* depend on thread system */
+#define THREAD_ATOMIC_END /* depend on thread system */
+#define THREAD_PASS /* depend on thread system */
#define xmalloc malloc
#define xrealloc realloc
#define xcalloc calloc
#define xfree free
-#else
-#include "ruby.h"
-#include "rubysig.h" /* for DEFER_INTS, ENABLE_INTS */
-
-#define USE_COMBINATION_EXPLOSION_CHECK /* (X*)* */
-#define USE_MULTI_THREAD_SYSTEM
-#define THREAD_SYSTEM_INIT
-#define THREAD_SYSTEM_END
-#define THREAD_ATOMIC_START DEFER_INTS
-#define THREAD_ATOMIC_END ENABLE_INTS
-#define THREAD_PASS rb_thread_schedule()
-#define DEFAULT_WARN_FUNCTION onig_rb_warn
-#define DEFAULT_VERB_WARN_FUNCTION onig_rb_warning
+#define CHECK_INTERRUPT_IN_MATCH_AT
-#endif /* else NOT_RUBY */
+#define st_init_table onig_st_init_table
+#define st_init_table_with_size onig_st_init_table_with_size
+#define st_init_numtable onig_st_init_numtable
+#define st_init_numtable_with_size onig_st_init_numtable_with_size
+#define st_init_strtable onig_st_init_strtable
+#define st_init_strtable_with_size onig_st_init_strtable_with_size
+#define st_delete onig_st_delete
+#define st_delete_safe onig_st_delete_safe
+#define st_insert onig_st_insert
+#define st_lookup onig_st_lookup
+#define st_foreach onig_st_foreach
+#define st_add_direct onig_st_add_direct
+#define st_free_table onig_st_free_table
+#define st_cleanup_safe onig_st_cleanup_safe
+#define st_copy onig_st_copy
+#define st_nothing_key_clone onig_st_nothing_key_clone
+#define st_nothing_key_free onig_st_nothing_key_free
+/* */
+#define onig_st_is_member st_is_member
#define STATE_CHECK_STRING_THRESHOLD_LEN 7
#define STATE_CHECK_BUFF_MAX_SIZE 0x4000
@@ -122,17 +135,16 @@
#define xmemset memset
#define xmemcpy memcpy
#define xmemmove memmove
+
#if defined(_WIN32) && !defined(__GNUC__)
#define xalloca _alloca
-#if _MSC_VER < 1500
-#ifndef vsnprintf
-#define vsnprintf _vsnprintf
-#endif
-#endif
+#define xvsnprintf _vsnprintf
#else
#define xalloca alloca
+#define xvsnprintf vsnprintf
#endif
+
#if defined(USE_RECOMPILE_API) && defined(USE_MULTI_THREAD_SYSTEM)
#define ONIG_STATE_INC(reg) (reg)->state++
#define ONIG_STATE_DEC(reg) (reg)->state--
@@ -154,60 +166,6 @@
#define ONIG_STATE_DEC_THREAD(reg) /* Nothing */
#endif /* USE_RECOMPILE_API && USE_MULTI_THREAD_SYSTEM */
-
-#define onig_st_is_member st_is_member
-
-#ifdef NOT_RUBY
-
-#define st_init_table onig_st_init_table
-#define st_init_table_with_size onig_st_init_table_with_size
-#define st_init_numtable onig_st_init_numtable
-#define st_init_numtable_with_size onig_st_init_numtable_with_size
-#define st_init_strtable onig_st_init_strtable
-#define st_init_strtable_with_size onig_st_init_strtable_with_size
-#define st_init_strend_table_with_size onig_st_init_strend_table_with_size
-#define st_delete onig_st_delete
-#define st_delete_safe onig_st_delete_safe
-#define st_insert onig_st_insert
-#define st_insert_strend onig_st_insert_strend
-#define st_lookup onig_st_lookup
-#define st_lookup_strend onig_st_lookup_strend
-#define st_foreach onig_st_foreach
-#define st_add_direct onig_st_add_direct
-#define st_add_direct_strend onig_st_add_direct_strend
-#define st_free_table onig_st_free_table
-#define st_cleanup_safe onig_st_cleanup_safe
-#define st_copy onig_st_copy
-#define st_nothing_key_clone onig_st_nothing_key_clone
-#define st_nothing_key_free onig_st_nothing_key_free
-
-#else /* NOT_RUBY */
-
-#define onig_st_init_table st_init_table
-#define onig_st_init_table_with_size st_init_table_with_size
-#define onig_st_init_numtable st_init_numtable
-#define onig_st_init_numtable_with_size st_init_numtable_with_size
-#define onig_st_init_strtable st_init_strtable
-#define onig_st_init_strtable_with_size st_init_strtable_with_size
-#define onig_st_init_strend_table_with_size st_init_strend_table_with_size
-#define onig_st_delete st_delete
-#define onig_st_delete_safe st_delete_safe
-#define onig_st_insert st_insert
-#define onig_st_insert_strend st_insert_strend
-#define onig_st_lookup st_lookup
-#define onig_st_lookup_strend st_lookup_strend
-#define onig_st_foreach st_foreach
-#define onig_st_add_direct st_add_direct
-#define onig_st_add_direct_strend st_add_direct_strend
-#define onig_st_free_table st_free_table
-#define onig_st_cleanup_safe st_cleanup_safe
-#define onig_st_copy st_copy
-#define onig_st_nothing_key_clone st_nothing_key_clone
-#define onig_st_nothing_key_free st_nothing_key_free
-
-#endif /* NOT_RUBY */
-
-
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@ -238,7 +196,6 @@
#endif
#include "regenc.h"
-#include "oniguruma.h"
#ifdef MIN
#undef MIN
@@ -252,10 +209,23 @@
#define IS_NULL(p) (((void*)(p)) == (void*)0)
#define IS_NOT_NULL(p) (((void*)(p)) != (void*)0)
#define CHECK_NULL_RETURN(p) if (IS_NULL(p)) return NULL
-#define CHECK_NULL_RETURN_VAL(p,val) if (IS_NULL(p)) return (val)
+#define CHECK_NULL_RETURN_MEMERR(p) if (IS_NULL(p)) return ONIGERR_MEMORY
#define NULL_UCHARP ((UChar* )0)
-#ifndef PLATFORM_UNALIGNED_WORD_ACCESS
+#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
+
+#define PLATFORM_GET_INC(val,p,type) do{\
+ val = *(type* )p;\
+ (p) += sizeof(type);\
+} while(0)
+
+#else
+
+#define PLATFORM_GET_INC(val,p,type) do{\
+ xmemcpy(&val, (p), sizeof(type));\
+ (p) += sizeof(type);\
+} while(0)
+
/* sizeof(OnigCodePoint) */
#define WORD_ALIGNMENT_SIZE SIZEOF_LONG
@@ -270,86 +240,6 @@
(addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
} while (0)
-
-#define B_SHIFT 8
-#define B_MASK 0xff
-
-#define SERIALIZE_2BYTE_INT(i,p) do {\
- *(p) = ((i) >> B_SHIFT) & B_MASK;\
- *((p)+1) = (i) & B_MASK;\
-} while (0)
-
-#define SERIALIZE_4BYTE_INT(i,p) do {\
- *(p) = ((i) >> B_SHIFT*3) & B_MASK;\
- *((p)+1) = ((i) >> B_SHIFT*2) & B_MASK;\
- *((p)+2) = ((i) >> B_SHIFT ) & B_MASK;\
- *((p)+3) = (i) & B_MASK;\
-} while (0)
-
-#define SERIALIZE_8BYTE_INT(i,p) do {\
- *(p) = ((i) >> B_SHIFT*7) & B_MASK;\
- *((p)+1) = ((i) >> B_SHIFT*6) & B_MASK;\
- *((p)+2) = ((i) >> B_SHIFT*5) & B_MASK;\
- *((p)+3) = ((i) >> B_SHIFT*4) & B_MASK;\
- *((p)+4) = ((i) >> B_SHIFT*3) & B_MASK;\
- *((p)+5) = ((i) >> B_SHIFT*2) & B_MASK;\
- *((p)+6) = ((i) >> B_SHIFT ) & B_MASK;\
- *((p)+7) = (i) & B_MASK;\
-} while (0)
-
-#define GET_2BYTE_INT_INC(type,i,p) do {\
- (i) = (type )(((unsigned int )(*(p)) << B_SHIFT) | (unsigned int )((p)[1]));\
- (p) += 2;\
-} while (0)
-
-#define GET_4BYTE_INT_INC(type,i,p) do {\
- (i) = (type )(((unsigned int )((p)[0]) << B_SHIFT*3) | \
- ((unsigned int )((p)[1]) << B_SHIFT*2) | \
- ((unsigned int )((p)[2]) << B_SHIFT ) | \
- ((unsigned int )((p)[3]) )); \
- (p) += 4;\
-} while (0)
-
-#define GET_8BYTE_INT_INC(type,i,p) do {\
- (i) = (type )(((unsigned long )((p)[0]) << B_SHIFT*7) | \
- ((unsigned long )((p)[1]) << B_SHIFT*6) | \
- ((unsigned long )((p)[2]) << B_SHIFT*5) | \
- ((unsigned long )((p)[3]) << B_SHIFT*4) | \
- ((unsigned long )((p)[4]) << B_SHIFT*3) | \
- ((unsigned long )((p)[5]) << B_SHIFT*2) | \
- ((unsigned long )((p)[6]) << B_SHIFT ) | \
- ((unsigned long )((p)[7]) )); \
- (p) += 8;\
-} while (0)
-
-#if SIZEOF_SHORT == 2
-#define GET_SHORT_INC(i,p) GET_2BYTE_INT_INC(short,i,p)
-#define SERIALIZE_SHORT(i,p) SERIALIZE_2BYTE_INT(i,p)
-#elif SIZEOF_SHORT == 4
-#define GET_SHORT_INC(i,p) GET_4BYTE_INT_INC(short,i,p)
-#define SERIALIZE_SHORT(i,p) SERIALIZE_4BYTE_INT(i,p)
-#elif SIZEOF_SHORT == 8
-#define GET_SHORT_INC(i,p) GET_8BYTE_INT_INC(short,i,p)
-#define SERIALIZE_SHORT(i,p) SERIALIZE_8BYTE_INT(i,p)
-#endif
-
-#if SIZEOF_INT == 2
-#define GET_INT_INC(i,p) GET_2BYTE_INT_INC(int,i,p)
-#define GET_UINT_INC(i,p) GET_2BYTE_INT_INC(unsigned,i,p)
-#define SERIALIZE_INT(i,p) SERIALIZE_2BYTE_INT(i,p)
-#define SERIALIZE_UINT(i,p) SERIALIZE_2BYTE_INT(i,p)
-#elif SIZEOF_INT == 4
-#define GET_INT_INC(i,p) GET_4BYTE_INT_INC(int,i,p)
-#define GET_UINT_INC(i,p) GET_4BYTE_INT_INC(unsigned,i,p)
-#define SERIALIZE_INT(i,p) SERIALIZE_4BYTE_INT(i,p)
-#define SERIALIZE_UINT(i,p) SERIALIZE_4BYTE_INT(i,p)
-#elif SIZEOF_INT == 8
-#define GET_INT_INC(i,p) GET_8BYTE_INT_INC(int,i,p)
-#define GET_UINT_INC(i,p) GET_8BYTE_INT_INC(unsigned,i,p)
-#define SERIALIZE_INT(i,p) SERIALIZE_8BYTE_INT(i,p)
-#define SERIALIZE_UINT(i,p) SERIALIZE_8BYTE_INT(i,p)
-#endif
-
#endif /* PLATFORM_UNALIGNED_WORD_ACCESS */
/* stack pop level */
@@ -372,17 +262,17 @@ typedef unsigned int BitStatusType;
#define BIT_STATUS_CLEAR(stats) (stats) = 0
#define BIT_STATUS_ON_ALL(stats) (stats) = ~((BitStatusType )0)
#define BIT_STATUS_AT(stats,n) \
- ((n) < BIT_STATUS_BITS_NUM ? ((stats) & (1 << n)) : ((stats) & 1))
+ ((n) < (int )BIT_STATUS_BITS_NUM ? ((stats) & (1 << n)) : ((stats) & 1))
#define BIT_STATUS_ON_AT(stats,n) do {\
- if ((n) < BIT_STATUS_BITS_NUM)\
+ if ((n) < (int )BIT_STATUS_BITS_NUM) \
(stats) |= (1 << (n));\
else\
(stats) |= 1;\
} while (0)
#define BIT_STATUS_ON_AT_SIMPLE(stats,n) do {\
- if ((n) < BIT_STATUS_BITS_NUM)\
+ if ((n) < (int )BIT_STATUS_BITS_NUM)\
(stats) |= (1 << (n));\
} while (0)
@@ -401,7 +291,6 @@ typedef unsigned int BitStatusType;
#define IS_EXTEND(option) ((option) & ONIG_OPTION_EXTEND)
#define IS_FIND_LONGEST(option) ((option) & ONIG_OPTION_FIND_LONGEST)
#define IS_FIND_NOT_EMPTY(option) ((option) & ONIG_OPTION_FIND_NOT_EMPTY)
-#define IS_POSIXLINE(option) (IS_SINGLELINE(option) && IS_MULTILINE(option))
#define IS_FIND_CONDITION(option) ((option) & \
(ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY))
#define IS_NOTBOL(option) ((option) & ONIG_OPTION_NOTBOL)
@@ -415,6 +304,9 @@ typedef unsigned int BitStatusType;
/* ignore-case and multibyte status are included in compiled code. */
#define IS_DYNAMIC_OPTION(option) 0
+#define DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag) \
+ ((case_fold_flag) & ~INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR)
+
#define REPEAT_INFINITE -1
#define IS_REPEAT_INFINITE(n) ((n) == REPEAT_INFINITE)
@@ -436,7 +328,7 @@ typedef Bits* BitSetRef;
#define BITSET_CLEAR(bs) do {\
int i;\
- for (i = 0; i < BITSET_SIZE; i++) { (bs)[i] = 0; }\
+ for (i = 0; i < (int )BITSET_SIZE; i++) { (bs)[i] = 0; } \
} while (0)
#define BS_ROOM(bs,pos) (bs)[pos / BITS_IN_ROOM]
@@ -603,7 +495,7 @@ enum OpCode {
OP_BACKREFN_IC,
OP_BACKREF_MULTI,
OP_BACKREF_MULTI_IC,
- OP_BACKREF_AT_LEVEL, /* \k<xxx+n>, \k<xxx-n> */
+ OP_BACKREF_WITH_LEVEL, /* \k<xxx+n>, \k<xxx-n> */
OP_MEMORY_START,
OP_MEMORY_START_PUSH, /* push back-tracker to stack */
@@ -612,9 +504,6 @@ enum OpCode {
OP_MEMORY_END,
OP_MEMORY_END_REC, /* push marker to stack */
- OP_SET_OPTION_PUSH, /* set option and push recover option */
- OP_SET_OPTION, /* set option */
-
OP_FAIL, /* pop stack and move */
OP_JUMP,
OP_PUSH,
@@ -649,7 +538,11 @@ enum OpCode {
OP_STATE_CHECK_PUSH_OR_JUMP, /* check ok -> push, else jump */
OP_STATE_CHECK, /* check only */
OP_STATE_CHECK_ANYCHAR_STAR,
- OP_STATE_CHECK_ANYCHAR_ML_STAR
+ OP_STATE_CHECK_ANYCHAR_ML_STAR,
+
+ /* no need: IS_DYNAMIC_OPTION() == 0 */
+ OP_SET_OPTION_PUSH, /* set option and push recover option */
+ OP_SET_OPTION /* set option */
};
typedef int RelAddrType;
@@ -672,22 +565,6 @@ typedef void* PointerType;
#define SIZE_POINTER sizeof(PointerType)
-#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
-
-#define PLATFORM_GET_INC(val,p,type) do{\
- val = *(type* )p;\
- (p) += sizeof(type);\
-} while(0)
-
-#else
-
-#define PLATFORM_GET_INC(val,p,type) do{\
- xmemcpy(&val, (p), sizeof(type));\
- (p) += sizeof(type);\
-} while(0)
-
-#endif /* PLATFORM_UNALIGNED_WORD_ACCESS */
-
#define GET_RELADDR_INC(addr,p) PLATFORM_GET_INC(addr, p, RelAddrType)
#define GET_ABSADDR_INC(addr,p) PLATFORM_GET_INC(addr, p, AbsAddrType)
#define GET_LENGTH_INC(len,p) PLATFORM_GET_INC(len, p, LengthType)
@@ -745,15 +622,15 @@ typedef void* PointerType;
#define SIZE_OP_STATE_CHECK_ANYCHAR_STAR (SIZE_OPCODE + SIZE_STATE_CHECK_NUM)
#endif
-#define MC_ESC(enc) (enc)->meta_char_table.esc
-#define MC_ANYCHAR(enc) (enc)->meta_char_table.anychar
-#define MC_ANYTIME(enc) (enc)->meta_char_table.anytime
-#define MC_ZERO_OR_ONE_TIME(enc) (enc)->meta_char_table.zero_or_one_time
-#define MC_ONE_OR_MORE_TIME(enc) (enc)->meta_char_table.one_or_more_time
-#define MC_ANYCHAR_ANYTIME(enc) (enc)->meta_char_table.anychar_anytime
+#define MC_ESC(syn) (syn)->meta_char_table.esc
+#define MC_ANYCHAR(syn) (syn)->meta_char_table.anychar
+#define MC_ANYTIME(syn) (syn)->meta_char_table.anytime
+#define MC_ZERO_OR_ONE_TIME(syn) (syn)->meta_char_table.zero_or_one_time
+#define MC_ONE_OR_MORE_TIME(syn) (syn)->meta_char_table.one_or_more_time
+#define MC_ANYCHAR_ANYTIME(syn) (syn)->meta_char_table.anychar_anytime
-#define IS_MC_ESC_CODE(code, enc, syn) \
- ((code) == MC_ESC(enc) && \
+#define IS_MC_ESC_CODE(code, syn) \
+ ((code) == MC_ESC(syn) && \
!IS_SYNTAX_OP2((syn), ONIG_SYN_OP2_INEFFECTIVE_ESCAPE))
@@ -782,22 +659,96 @@ typedef void* PointerType;
ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \
ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
+
+#define NCCLASS_FLAGS(cc) ((cc)->flags)
+#define NCCLASS_FLAG_SET(cc,flag) (NCCLASS_FLAGS(cc) |= (flag))
+#define NCCLASS_FLAG_CLEAR(cc,flag) (NCCLASS_FLAGS(cc) &= ~(flag))
+#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0)
+
/* cclass node */
-#define FLAG_CCLASS_NOT 1
-#define FLAG_CCLASS_SHARE (1<<1)
+#define FLAG_NCCLASS_NOT (1<<0)
+#define FLAG_NCCLASS_SHARE (1<<1)
-#define CCLASS_SET_NOT(cc) (cc)->flags |= FLAG_CCLASS_NOT
-#define CCLASS_CLEAR_NOT(cc) (cc)->flags &= ~FLAG_CCLASS_NOT
-#define CCLASS_SET_SHARE(cc) (cc)->flags |= FLAG_CCLASS_SHARE
-#define IS_CCLASS_NOT(cc) (((cc)->flags & FLAG_CCLASS_NOT) != 0)
-#define IS_CCLASS_SHARE(cc) (((cc)->flags & FLAG_CCLASS_SHARE) != 0)
+#define NCCLASS_SET_NOT(nd) NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_NOT)
+#define NCCLASS_SET_SHARE(nd) NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_SHARE)
+#define NCCLASS_CLEAR_NOT(nd) NCCLASS_FLAG_CLEAR(nd, FLAG_NCCLASS_NOT)
+#define IS_NCCLASS_NOT(nd) IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT)
+#define IS_NCCLASS_SHARE(nd) IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_SHARE)
typedef struct {
- int flags;
+ int type;
+ /* struct _Node* next; */
+ /* unsigned int flags; */
+} NodeBase;
+
+typedef struct {
+ NodeBase base;
+ unsigned int flags;
BitSet bs;
- BBuf* mbuf; /* multi-byte info or NULL */
+ BBuf* mbuf; /* multi-byte info or NULL */
} CClassNode;
+typedef long OnigStackIndex;
+
+typedef struct _OnigStackType {
+ unsigned int type;
+ union {
+ struct {
+ UChar *pcode; /* byte code position */
+ UChar *pstr; /* string position */
+ UChar *pstr_prev; /* previous char position of pstr */
+#ifdef USE_COMBINATION_EXPLOSION_CHECK
+ unsigned int state_check;
+#endif
+ } state;
+ struct {
+ int count; /* for OP_REPEAT_INC, OP_REPEAT_INC_NG */
+ UChar *pcode; /* byte code position (head of repeated target) */
+ int num; /* repeat id */
+ } repeat;
+ struct {
+ OnigStackIndex si; /* index of stack */
+ } repeat_inc;
+ struct {
+ int num; /* memory num */
+ UChar *pstr; /* start/end position */
+ /* Following information is setted, if this stack type is MEM-START */
+ OnigStackIndex start; /* prev. info (for backtrack "(...)*" ) */
+ OnigStackIndex end; /* prev. info (for backtrack "(...)*" ) */
+ } mem;
+ struct {
+ int num; /* null check id */
+ UChar *pstr; /* start position */
+ } null_check;
+#ifdef USE_SUBEXP_CALL
+ struct {
+ UChar *ret_addr; /* byte code position */
+ int num; /* null check id */
+ UChar *pstr; /* string position */
+ } call_frame;
+#endif
+ } u;
+} OnigStackType;
+
+typedef struct {
+ void* stack_p;
+ int stack_n;
+ OnigOptionType options;
+ OnigRegion* region;
+ const UChar* start; /* search start position (for \G: BEGIN_POSITION) */
+#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
+ int best_len; /* for ONIG_OPTION_FIND_LONGEST */
+ UChar* best_s;
+#endif
+#ifdef USE_COMBINATION_EXPLOSION_CHECK
+ void* state_check_buff;
+ int state_check_buff_size;
+#endif
+} OnigMatchArg;
+
+
+#define IS_CODE_SB_WORD(enc,code) \
+ (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
#ifdef ONIG_DEBUG
@@ -820,11 +771,38 @@ extern void onig_print_statistics P_((FILE* f));
extern UChar* onig_error_code_to_format P_((int code));
extern void onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...));
extern int onig_bbuf_init P_((BBuf* buf, int size));
-extern int onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType* syntax));
extern int onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
extern void onig_chain_reduce P_((regex_t* reg));
extern void onig_chain_link_add P_((regex_t* to, regex_t* add));
extern void onig_transfer P_((regex_t* to, regex_t* from));
extern int onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc));
+extern int onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, CClassNode* cc));
+
+/* strend hash */
+typedef void hash_table_type;
+typedef unsigned long hash_data_type;
+
+extern hash_table_type* onig_st_init_strend_table_with_size P_((int size));
+extern int onig_st_lookup_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type *value));
+extern int onig_st_insert_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type value));
+
+/* encoding property management */
+#define PROPERTY_LIST_ADD_PROP(Name, CR) \
+ r = onigenc_property_list_add_property((UChar* )Name, CR,\
+ &PropertyNameTable, &PropertyList, &PropertyListNum,\
+ &PropertyListSize);\
+ if (r != 0) goto end
+
+#define PROPERTY_LIST_INIT_CHECK \
+ if (PropertyInited == 0) {\
+ int r = onigenc_property_list_init(init_property_list);\
+ if (r != 0) return r;\
+ }
+
+extern int onigenc_property_list_add_property P_((UChar* name, const OnigCodePoint* prop, hash_table_type **table, const OnigCodePoint*** plist, int *pnum, int *psize));
+
+typedef int (*ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE)(void);
+
+extern int onigenc_property_list_init P_((ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE));
#endif /* REGINT_H */
diff --git a/ext/mbstring/oniguruma/regparse.c b/ext/mbstring/oniguruma/regparse.c
index abf2cc1cb..01131300c 100644
--- a/ext/mbstring/oniguruma/regparse.c
+++ b/ext/mbstring/oniguruma/regparse.c
@@ -2,7 +2,7 @@
regparse.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -28,9 +28,13 @@
*/
#include "regparse.h"
+#include "st.h"
#define WARN_BUFSIZE 256
+#define CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS
+
+
OnigSyntaxType OnigSyntaxRuby = {
(( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
@@ -41,6 +45,8 @@ OnigSyntaxType OnigSyntaxRuby = {
ONIG_SYN_OP2_OPTION_RUBY |
ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
ONIG_SYN_OP2_ESC_G_SUBEXP_CALL |
+ ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
+ ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL |
ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB |
@@ -54,25 +60,20 @@ OnigSyntaxType OnigSyntaxRuby = {
ONIG_SYN_WARN_CC_OP_NOT_ESCAPED |
ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT )
, ONIG_OPTION_NONE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType* OnigDefaultSyntax = ONIG_SYNTAX_RUBY;
-extern void onig_null_warn(const char* s) { }
-
-#ifdef RUBY_PLATFORM
-extern void
-onig_rb_warn(const char* s)
-{
- rb_warn("%s", s);
-}
-
-extern void
-onig_rb_warning(const char* s)
-{
- rb_warning("%s", s);
-}
-#endif
+extern void onig_null_warn(const char* s ARG_UNUSED) { }
#ifdef DEFAULT_WARN_FUNCTION
static OnigWarnFunc onig_warn = (OnigWarnFunc )DEFAULT_WARN_FUNCTION;
@@ -112,7 +113,7 @@ bbuf_clone(BBuf** rto, BBuf* from)
BBuf *to;
*rto = to = (BBuf* )xmalloc(sizeof(BBuf));
- CHECK_NULL_RETURN_VAL(to, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(to);
r = BBUF_INIT(to, from->alloc);
if (r != 0) return r;
to->used = from->used;
@@ -120,6 +121,9 @@ bbuf_clone(BBuf** rto, BBuf* from)
return 0;
}
+#define BACKREF_REL_TO_ABS(rel_no, env) \
+ ((env)->num_mem + 1 + (rel_no))
+
#define ONOFF(v,f,negative) (negative) ? ((v) &= ~(f)) : ((v) |= (f))
#define MBCODE_START_POS(enc) \
@@ -139,7 +143,7 @@ bbuf_clone(BBuf** rto, BBuf* from)
#define BITSET_IS_EMPTY(bs,empty) do {\
int i;\
empty = 1;\
- for (i = 0; i < BITSET_SIZE; i++) {\
+ for (i = 0; i < (int )BITSET_SIZE; i++) {\
if ((bs)[i] != 0) {\
empty = 0; break;\
}\
@@ -160,9 +164,7 @@ static void
bitset_set_all(BitSetRef bs)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
- bs[i] = ~((Bits )0);
- }
+ for (i = 0; i < BITSET_SIZE; i++) { bs[i] = ~((Bits )0); }
}
#endif
@@ -170,45 +172,35 @@ static void
bitset_invert(BitSetRef bs)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
- bs[i] = ~(bs[i]);
- }
+ for (i = 0; i < (int )BITSET_SIZE; i++) { bs[i] = ~(bs[i]); }
}
static void
bitset_invert_to(BitSetRef from, BitSetRef to)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
- to[i] = ~(from[i]);
- }
+ for (i = 0; i < (int )BITSET_SIZE; i++) { to[i] = ~(from[i]); }
}
static void
bitset_and(BitSetRef dest, BitSetRef bs)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
- dest[i] &= bs[i];
- }
+ for (i = 0; i < (int )BITSET_SIZE; i++) { dest[i] &= bs[i]; }
}
static void
bitset_or(BitSetRef dest, BitSetRef bs)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
- dest[i] |= bs[i];
- }
+ for (i = 0; i < (int )BITSET_SIZE; i++) { dest[i] |= bs[i]; }
}
static void
bitset_copy(BitSetRef dest, BitSetRef bs)
{
int i;
- for (i = 0; i < BITSET_SIZE; i++) {
- dest[i] = bs[i];
- }
+ for (i = 0; i < (int )BITSET_SIZE; i++) { dest[i] = bs[i]; }
}
extern int
@@ -223,8 +215,8 @@ onig_strncmp(const UChar* s1, const UChar* s2, int n)
return 0;
}
-static void
-k_strcpy(UChar* dest, const UChar* src, const UChar* end)
+extern void
+onig_strcpy(UChar* dest, const UChar* src, const UChar* end)
{
int len = end - src;
if (len > 0) {
@@ -233,6 +225,7 @@ k_strcpy(UChar* dest, const UChar* src, const UChar* end)
}
}
+#ifdef USE_NAMED_GROUP
static UChar*
strdup_with_null(OnigEncoding enc, UChar* s, UChar* end)
{
@@ -251,7 +244,7 @@ strdup_with_null(OnigEncoding enc, UChar* s, UChar* end)
return r;
}
-
+#endif
/* scan pattern methods */
#define PEND_VALUE 0
@@ -273,7 +266,7 @@ strdup_with_null(OnigEncoding enc, UChar* s, UChar* end)
#define PPEEK_IS(c) (PPEEK == (OnigCodePoint )c)
static UChar*
-k_strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_end,
+strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_end,
int capa)
{
UChar* r;
@@ -284,7 +277,7 @@ k_strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_e
r = (UChar* )xmalloc(capa + 1);
CHECK_NULL_RETURN(r);
- k_strcpy(r + (dest_end - dest), src, src_end);
+ onig_strcpy(r + (dest_end - dest), src, src_end);
return r;
}
@@ -297,78 +290,23 @@ strcat_capa_from_static(UChar* dest, UChar* dest_end,
r = (UChar* )xmalloc(capa + 1);
CHECK_NULL_RETURN(r);
- k_strcpy(r, dest, dest_end);
- k_strcpy(r + (dest_end - dest), src, src_end);
+ onig_strcpy(r, dest, dest_end);
+ onig_strcpy(r + (dest_end - dest), src, src_end);
return r;
}
-#ifdef USE_NAMED_GROUP
-
-#define INIT_NAME_BACKREFS_ALLOC_NUM 8
-
-typedef struct {
- UChar* name;
- int name_len; /* byte length */
- int back_num; /* number of backrefs */
- int back_alloc;
- int back_ref1;
- int* back_refs;
-} NameEntry;
-
-#ifdef USE_ST_HASH_TABLE
-#include "st.h"
+#ifdef USE_ST_LIBRARY
typedef struct {
- unsigned char* s;
- unsigned char* end;
-} st_strend_key;
-
-static int strend_cmp(st_strend_key*, st_strend_key*);
-static int strend_hash(st_strend_key*);
-
-static struct st_hash_type type_strend_hash = {
- strend_cmp,
- strend_hash,
-};
-
-static st_table*
-onig_st_init_strend_table_with_size(int size)
-{
- return onig_st_init_table_with_size(&type_strend_hash, size);
-}
-
-static int
-onig_st_lookup_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t *value)
-{
- st_strend_key key;
-
- key.s = (unsigned char* )str_key;
- key.end = (unsigned char* )end_key;
-
- return onig_st_lookup(table, (st_data_t )(&key), value);
-}
-
-static int
-onig_st_insert_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t value)
-{
- st_strend_key* key;
- int result;
-
- key = (st_strend_key* )xmalloc(sizeof(st_strend_key));
- key->s = (unsigned char* )str_key;
- key->end = (unsigned char* )end_key;
- result = onig_st_insert(table, (st_data_t )key, value);
- if (result) {
- xfree(key);
- }
- return result;
-}
+ UChar* s;
+ UChar* end;
+} st_str_end_key;
static int
-strend_cmp(st_strend_key* x, st_strend_key* y)
+str_end_cmp(st_str_end_key* x, st_str_end_key* y)
{
- unsigned char *p, *q;
+ UChar *p, *q;
int c;
if ((x->end - x->s) != (y->end - y->s))
@@ -387,12 +325,11 @@ strend_cmp(st_strend_key* x, st_strend_key* y)
}
static int
-strend_hash(st_strend_key* x)
+str_end_hash(st_str_end_key* x)
{
- int val;
- unsigned char *p;
+ UChar *p;
+ int val = 0;
- val = 0;
p = x->s;
while (p < x->end) {
val = val * 997 + (int )*p++;
@@ -401,6 +338,65 @@ strend_hash(st_strend_key* x)
return val + (val >> 5);
}
+extern hash_table_type*
+onig_st_init_strend_table_with_size(int size)
+{
+ static struct st_hash_type hashType = {
+ str_end_cmp,
+ str_end_hash,
+ };
+
+ return (hash_table_type* )
+ onig_st_init_table_with_size(&hashType, size);
+}
+
+extern int
+onig_st_lookup_strend(hash_table_type* table, const UChar* str_key,
+ const UChar* end_key, hash_data_type *value)
+{
+ st_str_end_key key;
+
+ key.s = (UChar* )str_key;
+ key.end = (UChar* )end_key;
+
+ return onig_st_lookup(table, (st_data_t )(&key), value);
+}
+
+extern int
+onig_st_insert_strend(hash_table_type* table, const UChar* str_key,
+ const UChar* end_key, hash_data_type value)
+{
+ st_str_end_key* key;
+ int result;
+
+ key = (st_str_end_key* )xmalloc(sizeof(st_str_end_key));
+ key->s = (UChar* )str_key;
+ key->end = (UChar* )end_key;
+ result = onig_st_insert(table, (st_data_t )key, value);
+ if (result) {
+ xfree(key);
+ }
+ return result;
+}
+
+#endif /* USE_ST_LIBRARY */
+
+
+#ifdef USE_NAMED_GROUP
+
+#define INIT_NAME_BACKREFS_ALLOC_NUM 8
+
+typedef struct {
+ UChar* name;
+ int name_len; /* byte length */
+ int back_num; /* number of backrefs */
+ int back_alloc;
+ int back_ref1;
+ int* back_refs;
+} NameEntry;
+
+#ifdef USE_ST_LIBRARY
+
typedef st_table NameTable;
typedef st_data_t HashDataType; /* 1.6 st.h doesn't define st_data_t type */
@@ -441,10 +437,10 @@ onig_print_names(FILE* fp, regex_t* reg)
}
return 0;
}
-#endif
+#endif /* ONIG_DEBUG */
static int
-i_free_name_entry(UChar* key, NameEntry* e, void* arg)
+i_free_name_entry(UChar* key, NameEntry* e, void* arg ARG_UNUSED)
{
xfree(e->name);
if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
@@ -501,10 +497,9 @@ typedef struct {
} INamesArg;
static int
-i_names(UChar* key, NameEntry* e, INamesArg* arg)
+i_names(UChar* key ARG_UNUSED, NameEntry* e, INamesArg* arg)
{
int r = (*(arg->func))(e->name,
- /*e->name + onigenc_str_bytelen_null(arg->enc, e->name), */
e->name + e->name_len,
e->back_num,
(e->back_num > 1 ? e->back_refs : &(e->back_ref1)),
@@ -518,8 +513,7 @@ i_names(UChar* key, NameEntry* e, INamesArg* arg)
extern int
onig_foreach_name(regex_t* reg,
- int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
- void* arg)
+ int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg)
{
INamesArg narg;
NameTable* t = (NameTable* )reg->name_table;
@@ -536,7 +530,7 @@ onig_foreach_name(regex_t* reg,
}
static int
-i_renumber_name(UChar* key, NameEntry* e, GroupNumRemap* map)
+i_renumber_name(UChar* key ARG_UNUSED, NameEntry* e, GroupNumRemap* map)
{
int i;
@@ -575,7 +569,7 @@ onig_number_of_names(regex_t* reg)
return 0;
}
-#else /* USE_ST_HASH_TABLE */
+#else /* USE_ST_LIBRARY */
#define INIT_NAMES_ALLOC_NUM 8
@@ -585,7 +579,6 @@ typedef struct {
int alloc;
} NameTable;
-
#ifdef ONIG_DEBUG
extern int
onig_print_names(FILE* fp, regex_t* reg)
@@ -683,8 +676,7 @@ name_find(regex_t* reg, UChar* name, UChar* name_end)
extern int
onig_foreach_name(regex_t* reg,
- int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
- void* arg)
+ int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg)
{
int i, r;
NameEntry* e;
@@ -713,7 +705,7 @@ onig_number_of_names(regex_t* reg)
return 0;
}
-#endif /* else USE_ST_HASH_TABLE */
+#endif /* else USE_ST_LIBRARY */
static int
name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
@@ -727,16 +719,18 @@ name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
e = name_find(reg, name, name_end);
if (IS_NULL(e)) {
-#ifdef USE_ST_HASH_TABLE
+#ifdef USE_ST_LIBRARY
if (IS_NULL(t)) {
t = onig_st_init_strend_table_with_size(5);
reg->name_table = (void* )t;
}
e = (NameEntry* )xmalloc(sizeof(NameEntry));
- CHECK_NULL_RETURN_VAL(e, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(e);
e->name = strdup_with_null(reg->enc, name, name_end);
- if (IS_NULL(e->name)) return ONIGERR_MEMORY;
+ if (IS_NULL(e->name)) {
+ xfree(e); return ONIGERR_MEMORY;
+ }
onig_st_insert_strend(t, e->name, (e->name + (name_end - name)),
(HashDataType )e);
@@ -750,7 +744,7 @@ name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
if (IS_NULL(t)) {
alloc = INIT_NAMES_ALLOC_NUM;
t = (NameTable* )xmalloc(sizeof(NameTable));
- CHECK_NULL_RETURN_VAL(t, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(t);
t->e = NULL;
t->alloc = 0;
t->num = 0;
@@ -769,7 +763,7 @@ name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
alloc = t->alloc * 2;
t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc);
- CHECK_NULL_RETURN_VAL(t->e, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(t->e);
t->alloc = alloc;
clear:
@@ -784,6 +778,7 @@ name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
e = &(t->e[t->num]);
t->num++;
e->name = strdup_with_null(reg->enc, name, name_end);
+ if (IS_NULL(e->name)) return ONIGERR_MEMORY;
e->name_len = name_end - name;
#endif
}
@@ -803,7 +798,7 @@ name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
if (e->back_num == 2) {
alloc = INIT_NAME_BACKREFS_ALLOC_NUM;
e->back_refs = (int* )xmalloc(sizeof(int) * alloc);
- CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(e->back_refs);
e->back_alloc = alloc;
e->back_refs[0] = e->back_ref1;
e->back_refs[1] = backref;
@@ -812,7 +807,7 @@ name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
if (e->back_num > e->back_alloc) {
alloc = e->back_alloc * 2;
e->back_refs = (int* )xrealloc(e->back_refs, sizeof(int) * alloc);
- CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(e->back_refs);
e->back_alloc = alloc;
}
e->back_refs[e->back_num - 1] = backref;
@@ -826,9 +821,8 @@ extern int
onig_name_to_group_numbers(regex_t* reg, const UChar* name,
const UChar* name_end, int** nums)
{
- NameEntry* e;
+ NameEntry* e = name_find(reg, name, name_end);
- e = name_find(reg, name, name_end);
if (IS_NULL(e)) return ONIGERR_UNDEFINED_NAME_REFERENCE;
switch (e->back_num) {
@@ -886,8 +880,7 @@ onig_name_to_backref_number(regex_t* reg, const UChar* name,
extern int
onig_foreach_name(regex_t* reg,
- int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
- void* arg)
+ int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg)
{
return ONIG_NO_SUPPORT_CONFIG;
}
@@ -928,12 +921,12 @@ scan_env_clear(ScanEnv* env)
BIT_STATUS_CLEAR(env->bt_mem_start);
BIT_STATUS_CLEAR(env->bt_mem_end);
BIT_STATUS_CLEAR(env->backrefed_mem);
- env->error = (UChar* )NULL;
- env->error_end = (UChar* )NULL;
- env->num_call = 0;
- env->num_mem = 0;
+ env->error = (UChar* )NULL;
+ env->error_end = (UChar* )NULL;
+ env->num_call = 0;
+ env->num_mem = 0;
#ifdef USE_NAMED_GROUP
- env->num_named = 0;
+ env->num_named = 0;
#endif
env->mem_alloc = 0;
env->mem_nodes_dynamic = (Node** )NULL;
@@ -968,7 +961,7 @@ scan_env_add_mem_entry(ScanEnv* env)
alloc = env->mem_alloc * 2;
p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc);
}
- CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(p);
for (i = env->num_mem + 1; i < alloc; i++)
p[i] = NULL_NODE;
@@ -993,7 +986,7 @@ scan_env_set_mem_node(ScanEnv* env, int num, Node* node)
}
-#ifdef USE_RECYCLE_NODE
+#ifdef USE_PARSE_TREE_NODE_RECYCLE
typedef struct _FreeNode {
struct _FreeNode* next;
} FreeNode;
@@ -1008,20 +1001,20 @@ onig_node_free(Node* node)
if (IS_NULL(node)) return ;
switch (NTYPE(node)) {
- case N_STRING:
- if (IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
- xfree(NSTRING(node).s);
+ case NT_STR:
+ if (NSTR(node)->capa != 0 &&
+ IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) {
+ xfree(NSTR(node)->s);
}
break;
- case N_LIST:
- case N_ALT:
- onig_node_free(NCONS(node).left);
- /* onig_node_free(NCONS(node).right); */
+ case NT_LIST:
+ case NT_ALT:
+ onig_node_free(NCAR(node));
{
- Node* next_node = NCONS(node).right;
+ Node* next_node = NCDR(node);
-#ifdef USE_RECYCLE_NODE
+#ifdef USE_PARSE_TREE_NODE_RECYCLE
{
FreeNode* n = (FreeNode* )node;
@@ -1033,46 +1026,43 @@ onig_node_free(Node* node)
#else
xfree(node);
#endif
-
node = next_node;
goto start;
}
break;
- case N_CCLASS:
+ case NT_CCLASS:
{
- CClassNode* cc = &(NCCLASS(node));
-
- if (IS_CCLASS_SHARE(cc))
- return ;
+ CClassNode* cc = NCCLASS(node);
+ if (IS_NCCLASS_SHARE(cc)) return ;
if (cc->mbuf)
bbuf_free(cc->mbuf);
}
break;
- case N_QUANTIFIER:
- if (NQUANTIFIER(node).target)
- onig_node_free(NQUANTIFIER(node).target);
+ case NT_QTFR:
+ if (NQTFR(node)->target)
+ onig_node_free(NQTFR(node)->target);
break;
- case N_EFFECT:
- if (NEFFECT(node).target)
- onig_node_free(NEFFECT(node).target);
+ case NT_ENCLOSE:
+ if (NENCLOSE(node)->target)
+ onig_node_free(NENCLOSE(node)->target);
break;
- case N_BACKREF:
- if (IS_NOT_NULL(NBACKREF(node).back_dynamic))
- xfree(NBACKREF(node).back_dynamic);
+ case NT_BREF:
+ if (IS_NOT_NULL(NBREF(node)->back_dynamic))
+ xfree(NBREF(node)->back_dynamic);
break;
- case N_ANCHOR:
- if (NANCHOR(node).target)
- onig_node_free(NANCHOR(node).target);
+ case NT_ANCHOR:
+ if (NANCHOR(node)->target)
+ onig_node_free(NANCHOR(node)->target);
break;
}
-#ifdef USE_RECYCLE_NODE
+#ifdef USE_PARSE_TREE_NODE_RECYCLE
{
FreeNode* n = (FreeNode* )node;
@@ -1086,7 +1076,7 @@ onig_node_free(Node* node)
#endif
}
-#ifdef USE_RECYCLE_NODE
+#ifdef USE_PARSE_TREE_NODE_RECYCLE
extern int
onig_free_node_list(void)
{
@@ -1108,7 +1098,7 @@ node_new(void)
{
Node* node;
-#ifdef USE_RECYCLE_NODE
+#ifdef USE_PARSE_TREE_NODE_RECYCLE
THREAD_ATOMIC_START;
if (IS_NOT_NULL(FreeNodeList)) {
node = (Node* )FreeNodeList;
@@ -1120,6 +1110,7 @@ node_new(void)
#endif
node = (Node* )xmalloc(sizeof(Node));
+ /* xmemset(node, 0, sizeof(Node)); */
return node;
}
@@ -1128,6 +1119,7 @@ static void
initialize_cclass(CClassNode* cc)
{
BITSET_CLEAR(cc->bs);
+ /* cc->base.flags = 0; */
cc->flags = 0;
cc->mbuf = NULL;
}
@@ -1137,53 +1129,55 @@ node_new_cclass(void)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_CCLASS;
- initialize_cclass(&(NCCLASS(node)));
+ SET_NTYPE(node, NT_CCLASS);
+ initialize_cclass(NCCLASS(node));
return node;
}
static Node*
-node_new_cclass_by_codepoint_range(int not,
- const OnigCodePoint sbr[], const OnigCodePoint mbr[])
+node_new_cclass_by_codepoint_range(int not, OnigCodePoint sb_out,
+ const OnigCodePoint ranges[])
{
+ int n, i;
CClassNode* cc;
- int n, i, j;
+ OnigCodePoint j;
- Node* node = node_new();
+ Node* node = node_new_cclass();
CHECK_NULL_RETURN(node);
- node->type = N_CCLASS;
- cc = &(NCCLASS(node));
- cc->flags = 0;
- if (not != 0) CCLASS_SET_NOT(cc);
+ cc = NCCLASS(node);
+ if (not != 0) NCCLASS_SET_NOT(cc);
BITSET_CLEAR(cc->bs);
- if (IS_NOT_NULL(sbr)) {
- n = ONIGENC_CODE_RANGE_NUM(sbr);
+ if (sb_out > 0 && IS_NOT_NULL(ranges)) {
+ n = ONIGENC_CODE_RANGE_NUM(ranges);
for (i = 0; i < n; i++) {
- for (j = ONIGENC_CODE_RANGE_FROM(sbr, i);
- j <= (int )ONIGENC_CODE_RANGE_TO(sbr, i); j++) {
+ for (j = ONIGENC_CODE_RANGE_FROM(ranges, i);
+ j <= (OnigCodePoint )ONIGENC_CODE_RANGE_TO(ranges, i); j++) {
+ if (j >= sb_out) goto sb_end;
+
BITSET_SET_BIT(cc->bs, j);
}
}
}
- if (IS_NULL(mbr)) {
+ sb_end:
+ if (IS_NULL(ranges)) {
is_null:
cc->mbuf = NULL;
}
else {
BBuf* bbuf;
- n = ONIGENC_CODE_RANGE_NUM(mbr);
+ n = ONIGENC_CODE_RANGE_NUM(ranges);
if (n == 0) goto is_null;
bbuf = (BBuf* )xmalloc(sizeof(BBuf));
- CHECK_NULL_RETURN_VAL(bbuf, NULL);
+ CHECK_NULL_RETURN(bbuf);
bbuf->alloc = n + 1;
bbuf->used = n + 1;
- bbuf->p = (UChar* )((void* )mbr);
+ bbuf->p = (UChar* )((void* )ranges);
cc->mbuf = bbuf;
}
@@ -1192,12 +1186,14 @@ node_new_cclass_by_codepoint_range(int not,
}
static Node*
-node_new_ctype(int type)
+node_new_ctype(int type, int not)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_CTYPE;
- NCTYPE(node).type = type;
+
+ SET_NTYPE(node, NT_CTYPE);
+ NCTYPE(node)->ctype = type;
+ NCTYPE(node)->not = not;
return node;
}
@@ -1206,7 +1202,8 @@ node_new_anychar(void)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_ANYCHAR;
+
+ SET_NTYPE(node, NT_CANY);
return node;
}
@@ -1215,9 +1212,10 @@ node_new_list(Node* left, Node* right)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_LIST;
- NCONS(node).left = left;
- NCONS(node).right = right;
+
+ SET_NTYPE(node, NT_LIST);
+ NCAR(node) = left;
+ NCDR(node) = right;
return node;
}
@@ -1227,14 +1225,33 @@ onig_node_new_list(Node* left, Node* right)
return node_new_list(left, right);
}
-static Node*
-node_new_alt(Node* left, Node* right)
+extern Node*
+onig_node_list_add(Node* list, Node* x)
+{
+ Node *n;
+
+ n = onig_node_new_list(x, NULL);
+ if (IS_NULL(n)) return NULL_NODE;
+
+ if (IS_NOT_NULL(list)) {
+ while (IS_NOT_NULL(NCDR(list)))
+ list = NCDR(list);
+
+ NCDR(list) = n;
+ }
+
+ return n;
+}
+
+extern Node*
+onig_node_new_alt(Node* left, Node* right)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_ALT;
- NCONS(node).left = left;
- NCONS(node).right = right;
+
+ SET_NTYPE(node, NT_ALT);
+ NCAR(node) = left;
+ NCDR(node) = right;
return node;
}
@@ -1243,16 +1260,17 @@ onig_node_new_anchor(int type)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_ANCHOR;
- NANCHOR(node).type = type;
- NANCHOR(node).target = NULL;
- NANCHOR(node).char_len = -1;
+
+ SET_NTYPE(node, NT_ANCHOR);
+ NANCHOR(node)->type = type;
+ NANCHOR(node)->target = NULL;
+ NANCHOR(node)->char_len = -1;
return node;
}
static Node*
node_new_backref(int back_num, int* backrefs, int by_name,
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
int exist_level, int nest_level,
#endif
ScanEnv* env)
@@ -1261,31 +1279,32 @@ node_new_backref(int back_num, int* backrefs, int by_name,
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_BACKREF;
- NBACKREF(node).state = 0;
- NBACKREF(node).back_num = back_num;
- NBACKREF(node).back_dynamic = (int* )NULL;
+
+ SET_NTYPE(node, NT_BREF);
+ NBREF(node)->state = 0;
+ NBREF(node)->back_num = back_num;
+ NBREF(node)->back_dynamic = (int* )NULL;
if (by_name != 0)
- NBACKREF(node).state |= NST_NAME_REF;
+ NBREF(node)->state |= NST_NAME_REF;
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
if (exist_level != 0) {
- NBACKREF(node).state |= NST_NEST_LEVEL;
- NBACKREF(node).nest_level = nest_level;
+ NBREF(node)->state |= NST_NEST_LEVEL;
+ NBREF(node)->nest_level = nest_level;
}
#endif
for (i = 0; i < back_num; i++) {
if (backrefs[i] <= env->num_mem &&
IS_NULL(SCANENV_MEM_NODES(env)[backrefs[i]])) {
- NBACKREF(node).state |= NST_RECURSION; /* /...(\1).../ */
+ NBREF(node)->state |= NST_RECURSION; /* /...(\1).../ */
break;
}
}
if (back_num <= NODE_BACKREFS_SIZE) {
for (i = 0; i < back_num; i++)
- NBACKREF(node).back_static[i] = backrefs[i];
+ NBREF(node)->back_static[i] = backrefs[i];
}
else {
int* p = (int* )xmalloc(sizeof(int) * back_num);
@@ -1293,7 +1312,7 @@ node_new_backref(int back_num, int* backrefs, int by_name,
onig_node_free(node);
return NULL;
}
- NBACKREF(node).back_dynamic = p;
+ NBREF(node)->back_dynamic = p;
for (i = 0; i < back_num; i++)
p[i] = backrefs[i];
}
@@ -1302,17 +1321,17 @@ node_new_backref(int back_num, int* backrefs, int by_name,
#ifdef USE_SUBEXP_CALL
static Node*
-node_new_call(UChar* name, UChar* name_end)
+node_new_call(UChar* name, UChar* name_end, int gnum)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_CALL;
- NCALL(node).state = 0;
- NCALL(node).ref_num = CALLNODE_REFNUM_UNDEF;
- NCALL(node).target = NULL_NODE;
- NCALL(node).name = name;
- NCALL(node).name_end = name_end;
+ SET_NTYPE(node, NT_CALL);
+ NCALL(node)->state = 0;
+ NCALL(node)->target = NULL_NODE;
+ NCALL(node)->name = name;
+ NCALL(node)->name_end = name_end;
+ NCALL(node)->group_num = gnum; /* call by number if gnum != 0 */
return node;
}
#endif
@@ -1322,58 +1341,60 @@ node_new_quantifier(int lower, int upper, int by_number)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_QUANTIFIER;
- NQUANTIFIER(node).state = 0;
- NQUANTIFIER(node).target = NULL;
- NQUANTIFIER(node).lower = lower;
- NQUANTIFIER(node).upper = upper;
- NQUANTIFIER(node).greedy = 1;
- NQUANTIFIER(node).target_empty_info = NQ_TARGET_ISNOT_EMPTY;
- NQUANTIFIER(node).head_exact = NULL_NODE;
- NQUANTIFIER(node).next_head_exact = NULL_NODE;
- NQUANTIFIER(node).is_refered = 0;
+
+ SET_NTYPE(node, NT_QTFR);
+ NQTFR(node)->state = 0;
+ NQTFR(node)->target = NULL;
+ NQTFR(node)->lower = lower;
+ NQTFR(node)->upper = upper;
+ NQTFR(node)->greedy = 1;
+ NQTFR(node)->target_empty_info = NQ_TARGET_ISNOT_EMPTY;
+ NQTFR(node)->head_exact = NULL_NODE;
+ NQTFR(node)->next_head_exact = NULL_NODE;
+ NQTFR(node)->is_refered = 0;
if (by_number != 0)
- NQUANTIFIER(node).state |= NST_BY_NUMBER;
+ NQTFR(node)->state |= NST_BY_NUMBER;
#ifdef USE_COMBINATION_EXPLOSION_CHECK
- NQUANTIFIER(node).comb_exp_check_num = 0;
+ NQTFR(node)->comb_exp_check_num = 0;
#endif
return node;
}
static Node*
-node_new_effect(int type)
+node_new_enclose(int type)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_EFFECT;
- NEFFECT(node).type = type;
- NEFFECT(node).state = 0;
- NEFFECT(node).regnum = 0;
- NEFFECT(node).option = 0;
- NEFFECT(node).target = NULL;
- NEFFECT(node).call_addr = -1;
- NEFFECT(node).opt_count = 0;
+
+ SET_NTYPE(node, NT_ENCLOSE);
+ NENCLOSE(node)->type = type;
+ NENCLOSE(node)->state = 0;
+ NENCLOSE(node)->regnum = 0;
+ NENCLOSE(node)->option = 0;
+ NENCLOSE(node)->target = NULL;
+ NENCLOSE(node)->call_addr = -1;
+ NENCLOSE(node)->opt_count = 0;
return node;
}
extern Node*
-onig_node_new_effect(int type)
+onig_node_new_enclose(int type)
{
- return node_new_effect(type);
+ return node_new_enclose(type);
}
static Node*
-node_new_effect_memory(OnigOptionType option, int is_named)
+node_new_enclose_memory(OnigOptionType option, int is_named)
{
- Node* node = node_new_effect(EFFECT_MEMORY);
+ Node* node = node_new_enclose(ENCLOSE_MEMORY);
CHECK_NULL_RETURN(node);
if (is_named != 0)
- SET_EFFECT_STATUS(node, NST_NAMED_GROUP);
+ SET_ENCLOSE_STATUS(node, NST_NAMED_GROUP);
#ifdef USE_SUBEXP_CALL
- NEFFECT(node).option = option;
+ NENCLOSE(node)->option = option;
#endif
return node;
}
@@ -1381,9 +1402,9 @@ node_new_effect_memory(OnigOptionType option, int is_named)
static Node*
node_new_option(OnigOptionType option)
{
- Node* node = node_new_effect(EFFECT_OPTION);
+ Node* node = node_new_enclose(ENCLOSE_OPTION);
CHECK_NULL_RETURN(node);
- NEFFECT(node).option = option;
+ NENCLOSE(node)->option = option;
return node;
}
@@ -1393,36 +1414,43 @@ onig_node_str_cat(Node* node, const UChar* s, const UChar* end)
int addlen = end - s;
if (addlen > 0) {
- int len = NSTRING(node).end - NSTRING(node).s;
+ int len = NSTR(node)->end - NSTR(node)->s;
- if (NSTRING(node).capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
+ if (NSTR(node)->capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
UChar* p;
int capa = len + addlen + NODE_STR_MARGIN;
- if (capa <= NSTRING(node).capa) {
- k_strcpy(NSTRING(node).s + len, s, end);
+ if (capa <= NSTR(node)->capa) {
+ onig_strcpy(NSTR(node)->s + len, s, end);
}
else {
- if (NSTRING(node).s == NSTRING(node).buf)
- p = strcat_capa_from_static(NSTRING(node).s, NSTRING(node).end,
+ if (NSTR(node)->s == NSTR(node)->buf)
+ p = strcat_capa_from_static(NSTR(node)->s, NSTR(node)->end,
s, end, capa);
else
- p = k_strcat_capa(NSTRING(node).s, NSTRING(node).end, s, end, capa);
+ p = strcat_capa(NSTR(node)->s, NSTR(node)->end, s, end, capa);
- CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
- NSTRING(node).s = p;
- NSTRING(node).capa = capa;
+ CHECK_NULL_RETURN_MEMERR(p);
+ NSTR(node)->s = p;
+ NSTR(node)->capa = capa;
}
}
else {
- k_strcpy(NSTRING(node).s + len, s, end);
+ onig_strcpy(NSTR(node)->s + len, s, end);
}
- NSTRING(node).end = NSTRING(node).s + len + addlen;
+ NSTR(node)->end = NSTR(node)->s + len + addlen;
}
return 0;
}
+extern int
+onig_node_str_set(Node* node, const UChar* s, const UChar* end)
+{
+ onig_node_str_clear(node);
+ return onig_node_str_cat(node, s, end);
+}
+
static int
node_str_cat_char(Node* node, UChar c)
{
@@ -1435,26 +1463,25 @@ node_str_cat_char(Node* node, UChar c)
extern void
onig_node_conv_to_str_node(Node* node, int flag)
{
- node->type = N_STRING;
-
- NSTRING(node).flag = flag;
- NSTRING(node).capa = 0;
- NSTRING(node).s = NSTRING(node).buf;
- NSTRING(node).end = NSTRING(node).buf;
+ SET_NTYPE(node, NT_STR);
+ NSTR(node)->flag = flag;
+ NSTR(node)->capa = 0;
+ NSTR(node)->s = NSTR(node)->buf;
+ NSTR(node)->end = NSTR(node)->buf;
}
extern void
onig_node_str_clear(Node* node)
{
- if (NSTRING(node).capa != 0 &&
- IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
- xfree(NSTRING(node).s);
+ if (NSTR(node)->capa != 0 &&
+ IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) {
+ xfree(NSTR(node)->s);
}
- NSTRING(node).capa = 0;
- NSTRING(node).flag = 0;
- NSTRING(node).s = NSTRING(node).buf;
- NSTRING(node).end = NSTRING(node).buf;
+ NSTR(node)->capa = 0;
+ NSTR(node)->flag = 0;
+ NSTR(node)->s = NSTR(node)->buf;
+ NSTR(node)->end = NSTR(node)->buf;
}
static Node*
@@ -1463,11 +1490,11 @@ node_new_str(const UChar* s, const UChar* end)
Node* node = node_new();
CHECK_NULL_RETURN(node);
- node->type = N_STRING;
- NSTRING(node).capa = 0;
- NSTRING(node).flag = 0;
- NSTRING(node).s = NSTRING(node).buf;
- NSTRING(node).end = NSTRING(node).buf;
+ SET_NTYPE(node, NT_STR);
+ NSTR(node)->capa = 0;
+ NSTR(node)->flag = 0;
+ NSTR(node)->s = NSTR(node)->buf;
+ NSTR(node)->end = NSTR(node)->buf;
if (onig_node_str_cat(node, s, end)) {
onig_node_free(node);
return NULL;
@@ -1481,7 +1508,6 @@ onig_node_new_str(const UChar* s, const UChar* end)
return node_new_str(s, end);
}
-#ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG
static Node*
node_new_str_raw(UChar* s, UChar* end)
{
@@ -1489,7 +1515,6 @@ node_new_str_raw(UChar* s, UChar* end)
NSTRING_SET_RAW(node);
return node;
}
-#endif
static Node*
node_new_empty(void)
@@ -1498,12 +1523,12 @@ node_new_empty(void)
}
static Node*
-node_new_str_char(UChar c)
+node_new_str_raw_char(UChar c)
{
UChar p[1];
p[0] = c;
- return node_new_str(p, p + 1);
+ return node_new_str_raw(p, p + 1);
}
static Node*
@@ -1528,7 +1553,7 @@ static int
str_node_can_be_split(StrNode* sn, OnigEncoding enc)
{
if (sn->end > sn->s) {
- return ((enc_len(enc, sn->s) < sn->end - sn->s) ? 1 : 0);
+ return ((enclen(enc, sn->s) < sn->end - sn->s) ? 1 : 0);
}
return 0;
}
@@ -1651,7 +1676,7 @@ new_code_range(BBuf** pbuf)
BBuf* bbuf;
bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf));
- CHECK_NULL_RETURN_VAL(*pbuf, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*pbuf);
r = BBUF_INIT(*pbuf, INIT_MULTI_BYTE_RANGE_SIZE);
if (r) return r;
@@ -1952,10 +1977,10 @@ and_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc)
BitSetRef bsr1, bsr2;
BitSet bs1, bs2;
- not1 = IS_CCLASS_NOT(dest);
+ not1 = IS_NCCLASS_NOT(dest);
bsr1 = dest->bs;
buf1 = dest->mbuf;
- not2 = IS_CCLASS_NOT(cc);
+ not2 = IS_NCCLASS_NOT(cc);
bsr2 = cc->bs;
buf2 = cc->mbuf;
@@ -2010,10 +2035,10 @@ or_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc)
BitSetRef bsr1, bsr2;
BitSet bs1, bs2;
- not1 = IS_CCLASS_NOT(dest);
+ not1 = IS_NCCLASS_NOT(dest);
bsr1 = dest->bs;
buf1 = dest->mbuf;
- not2 = IS_CCLASS_NOT(cc);
+ not2 = IS_NCCLASS_NOT(cc);
bsr2 = cc->bs;
buf2 = cc->mbuf;
@@ -2066,13 +2091,13 @@ conv_backslash_value(int c, ScanEnv* env)
{
if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) {
switch (c) {
- case 'n': return '\n';
- case 't': return '\t';
- case 'r': return '\r';
- case 'f': return '\f';
- case 'a': return '\007';
- case 'b': return '\010';
- case 'e': return '\033';
+ case 'n': return '\n';
+ case 't': return '\t';
+ case 'r': return '\r';
+ case 'f': return '\f';
+ case 'a': return '\007';
+ case 'b': return '\010';
+ case 'e': return '\033';
case 'v':
if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB))
return '\v';
@@ -2089,26 +2114,26 @@ static int
is_invalid_quantifier_target(Node* node)
{
switch (NTYPE(node)) {
- case N_ANCHOR:
+ case NT_ANCHOR:
return 1;
break;
- case N_EFFECT:
- if (NEFFECT(node).type == EFFECT_OPTION)
- return is_invalid_quantifier_target(NEFFECT(node).target);
+ case NT_ENCLOSE:
+ /* allow enclosed elements */
+ /* return is_invalid_quantifier_target(NENCLOSE(node)->target); */
break;
- case N_LIST: /* ex. (?:\G\A)* */
+ case NT_LIST:
do {
- if (! is_invalid_quantifier_target(NCONS(node).left)) return 0;
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ if (! is_invalid_quantifier_target(NCAR(node))) return 0;
+ } while (IS_NOT_NULL(node = NCDR(node)));
return 0;
break;
- case N_ALT: /* ex. (?:abc|\A)* */
+ case NT_ALT:
do {
- if (is_invalid_quantifier_target(NCONS(node).left)) return 1;
- } while (IS_NOT_NULL(node = NCONS(node).right));
+ if (is_invalid_quantifier_target(NCAR(node))) return 1;
+ } while (IS_NOT_NULL(node = NCDR(node)));
break;
default:
@@ -2119,24 +2144,24 @@ is_invalid_quantifier_target(Node* node)
/* ?:0, *:1, +:2, ??:3, *?:4, +?:5 */
static int
-popular_quantifier_num(QuantifierNode* qf)
+popular_quantifier_num(QtfrNode* q)
{
- if (qf->greedy) {
- if (qf->lower == 0) {
- if (qf->upper == 1) return 0;
- else if (IS_REPEAT_INFINITE(qf->upper)) return 1;
+ if (q->greedy) {
+ if (q->lower == 0) {
+ if (q->upper == 1) return 0;
+ else if (IS_REPEAT_INFINITE(q->upper)) return 1;
}
- else if (qf->lower == 1) {
- if (IS_REPEAT_INFINITE(qf->upper)) return 2;
+ else if (q->lower == 1) {
+ if (IS_REPEAT_INFINITE(q->upper)) return 2;
}
}
else {
- if (qf->lower == 0) {
- if (qf->upper == 1) return 3;
- else if (IS_REPEAT_INFINITE(qf->upper)) return 4;
+ if (q->lower == 0) {
+ if (q->upper == 1) return 3;
+ else if (IS_REPEAT_INFINITE(q->upper)) return 4;
}
- else if (qf->lower == 1) {
- if (IS_REPEAT_INFINITE(qf->upper)) return 5;
+ else if (q->lower == 1) {
+ if (IS_REPEAT_INFINITE(q->upper)) return 5;
}
}
return -1;
@@ -2166,16 +2191,17 @@ extern void
onig_reduce_nested_quantifier(Node* pnode, Node* cnode)
{
int pnum, cnum;
- QuantifierNode *p, *c;
+ QtfrNode *p, *c;
- p = &(NQUANTIFIER(pnode));
- c = &(NQUANTIFIER(cnode));
+ p = NQTFR(pnode);
+ c = NQTFR(cnode);
pnum = popular_quantifier_num(p);
cnum = popular_quantifier_num(c);
+ if (pnum < 0 || cnum < 0) return ;
switch(ReduceTypeTable[cnum][pnum]) {
case RQ_DEL:
- *p = *c;
+ *pnode = *cnode;
break;
case RQ_A:
p->target = c->target;
@@ -2262,7 +2288,7 @@ typedef struct {
int ref1;
int* refs;
int by_name;
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
int exist_level;
int level; /* \k<name+n> */
#endif
@@ -2270,8 +2296,10 @@ typedef struct {
struct {
UChar* name;
UChar* name_end;
+ int gnum;
} call;
struct {
+ int ctype;
int not;
} prop;
} u;
@@ -2346,7 +2374,7 @@ fetch_range_quantifier(UChar** src, UChar* end, OnigToken* tok, ScanEnv* env)
if (PEND) goto invalid;
PFETCH(c);
if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) {
- if (c != MC_ESC(enc)) goto invalid;
+ if (c != MC_ESC(env->syntax)) goto invalid;
PFETCH(c);
}
if (c != '}') goto invalid;
@@ -2389,7 +2417,7 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
if (c != '-') return ONIGERR_META_CODE_SYNTAX;
if (PEND) return ONIGERR_END_PATTERN_AT_META;
PFETCH(c);
- if (c == MC_ESC(enc)) {
+ if (c == MC_ESC(env->syntax)) {
v = fetch_escaped_value(&p, end, env);
if (v < 0) return v;
c = (OnigCodePoint )v;
@@ -2419,7 +2447,7 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
c = 0177;
}
else {
- if (c == MC_ESC(enc)) {
+ if (c == MC_ESC(env->syntax)) {
v = fetch_escaped_value(&p, end, env);
if (v < 0) return v;
c = (OnigCodePoint )v;
@@ -2444,23 +2472,47 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
static int fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env);
+static OnigCodePoint
+get_name_end_code_point(OnigCodePoint start)
+{
+ switch (start) {
+ case '<': return (OnigCodePoint )'>'; break;
+ case '\'': return (OnigCodePoint )'\''; break;
+ default:
+ break;
+ }
+
+ return (OnigCodePoint )0;
+}
+
#ifdef USE_NAMED_GROUP
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
/*
\k<name+n>, \k<name-n>
+ \k<num+n>, \k<num-n>
+ \k<-num+n>, \k<-num-n>
*/
static int
-fetch_name_with_level(UChar** src, UChar* end, UChar** rname_end
- , ScanEnv* env, int* level)
+fetch_name_with_level(OnigCodePoint start_code, UChar** src, UChar* end,
+ UChar** rname_end, ScanEnv* env,
+ int* rback_num, int* rlevel)
{
- int r, exist_level = 0;
+ int r, sign, is_num, exist_level;
+ OnigCodePoint end_code;
OnigCodePoint c = 0;
- OnigCodePoint first_code;
OnigEncoding enc = env->enc;
UChar *name_end;
+ UChar *pnum_head;
UChar *p = *src;
PFETCH_READY;
+ *rback_num = 0;
+ is_num = exist_level = 0;
+ sign = 1;
+ pnum_head = *src;
+
+ end_code = get_name_end_code_point(start_code);
+
name_end = end;
r = 0;
if (PEND) {
@@ -2468,11 +2520,18 @@ fetch_name_with_level(UChar** src, UChar* end, UChar** rname_end
}
else {
PFETCH(c);
- first_code = c;
- if (c == '>')
+ if (c == end_code)
return ONIGERR_EMPTY_GROUP_NAME;
- if (!ONIGENC_IS_CODE_WORD(enc, c)) {
+ if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
+ is_num = 1;
+ }
+ else if (c == '-') {
+ is_num = 2;
+ sign = -1;
+ pnum_head = p;
+ }
+ else if (!ONIGENC_IS_CODE_WORD(enc, c)) {
r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
}
}
@@ -2480,43 +2539,58 @@ fetch_name_with_level(UChar** src, UChar* end, UChar** rname_end
while (!PEND) {
name_end = p;
PFETCH(c);
- if (c == '>' || c == ')' || c == '+' || c == '-') break;
+ if (c == end_code || c == ')' || c == '+' || c == '-') {
+ if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME;
+ break;
+ }
- if (!ONIGENC_IS_CODE_WORD(enc, c)) {
+ if (is_num != 0) {
+ if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
+ is_num = 1;
+ }
+ else {
+ r = ONIGERR_INVALID_GROUP_NAME;
+ is_num = 0;
+ }
+ }
+ else if (!ONIGENC_IS_CODE_WORD(enc, c)) {
r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
}
}
- if (c != '>') {
+ if (r == 0 && c != end_code) {
if (c == '+' || c == '-') {
- int num;
+ int level;
int flag = (c == '-' ? -1 : 1);
PFETCH(c);
if (! ONIGENC_IS_CODE_DIGIT(enc, c)) goto err;
PUNFETCH;
- num = onig_scan_unsigned_number(&p, end, enc);
- if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
- *level = (num * flag);
+ level = onig_scan_unsigned_number(&p, end, enc);
+ if (level < 0) return ONIGERR_TOO_BIG_NUMBER;
+ *rlevel = (level * flag);
exist_level = 1;
PFETCH(c);
- if (c == '>')
- goto first_check;
+ if (c == end_code)
+ goto end;
}
err:
r = ONIGERR_INVALID_GROUP_NAME;
name_end = end;
}
- else {
- first_check:
- if (ONIGENC_IS_CODE_ASCII(first_code) &&
- ONIGENC_IS_CODE_UPPER(enc, first_code))
- r = ONIGERR_INVALID_GROUP_NAME;
- }
+ end:
if (r == 0) {
+ if (is_num != 0) {
+ *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc);
+ if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER;
+ else if (*rback_num == 0) goto err;
+
+ *rback_num *= sign;
+ }
+
*rname_end = name_end;
*src = p;
return (exist_level ? 1 : 0);
@@ -2526,33 +2600,40 @@ fetch_name_with_level(UChar** src, UChar* end, UChar** rname_end
return r;
}
}
-#endif /* USE_BACKREF_AT_LEVEL */
+#endif /* USE_BACKREF_WITH_LEVEL */
/*
def: 0 -> define name (don't allow number name)
1 -> reference name (allow number name)
*/
static int
-fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
+fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
+ UChar** rname_end, ScanEnv* env, int* rback_num, int ref)
{
- int r, is_num;
+ int r, is_num, sign;
+ OnigCodePoint end_code;
OnigCodePoint c = 0;
- OnigCodePoint first_code;
OnigEncoding enc = env->enc;
UChar *name_end;
+ UChar *pnum_head;
UChar *p = *src;
PFETCH_READY;
+ *rback_num = 0;
+
+ end_code = get_name_end_code_point(start_code);
+
name_end = end;
+ pnum_head = *src;
r = 0;
is_num = 0;
+ sign = 1;
if (PEND) {
return ONIGERR_EMPTY_GROUP_NAME;
}
else {
PFETCH(c);
- first_code = c;
- if (c == '>')
+ if (c == end_code)
return ONIGERR_EMPTY_GROUP_NAME;
if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
@@ -2560,6 +2641,18 @@ fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
is_num = 1;
else {
r = ONIGERR_INVALID_GROUP_NAME;
+ is_num = 0;
+ }
+ }
+ else if (c == '-') {
+ if (ref == 1) {
+ is_num = 2;
+ sign = -1;
+ pnum_head = p;
+ }
+ else {
+ r = ONIGERR_INVALID_GROUP_NAME;
+ is_num = 0;
}
}
else if (!ONIGENC_IS_CODE_WORD(enc, c)) {
@@ -2567,74 +2660,137 @@ fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
}
}
- while (!PEND) {
- name_end = p;
- PFETCH(c);
- if (c == '>' || c == ')') break;
+ if (r == 0) {
+ while (!PEND) {
+ name_end = p;
+ PFETCH(c);
+ if (c == end_code || c == ')') {
+ if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME;
+ break;
+ }
- if (is_num == 1) {
- if (! ONIGENC_IS_CODE_DIGIT(enc, c)) {
- if (!ONIGENC_IS_CODE_WORD(enc, c))
- r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
- else
- r = ONIGERR_INVALID_GROUP_NAME;
+ if (is_num != 0) {
+ if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
+ is_num = 1;
+ }
+ else {
+ if (!ONIGENC_IS_CODE_WORD(enc, c))
+ r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
+ else
+ r = ONIGERR_INVALID_GROUP_NAME;
+
+ is_num = 0;
+ }
}
- }
- else {
- if (!ONIGENC_IS_CODE_WORD(enc, c)) {
- r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
+ else {
+ if (!ONIGENC_IS_CODE_WORD(enc, c)) {
+ r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
+ }
}
}
- }
- if (c != '>') {
- r = ONIGERR_INVALID_GROUP_NAME;
- name_end = end;
- }
- else {
- if (ONIGENC_IS_CODE_ASCII(first_code) &&
- ONIGENC_IS_CODE_UPPER(enc, first_code))
+ if (c != end_code) {
r = ONIGERR_INVALID_GROUP_NAME;
- }
+ name_end = end;
+ }
+
+ if (is_num != 0) {
+ *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc);
+ if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER;
+ else if (*rback_num == 0) {
+ r = ONIGERR_INVALID_GROUP_NAME;
+ goto err;
+ }
+
+ *rback_num *= sign;
+ }
- if (r == 0) {
*rname_end = name_end;
*src = p;
return 0;
}
else {
+ while (!PEND) {
+ name_end = p;
+ PFETCH(c);
+ if (c == end_code || c == ')')
+ break;
+ }
+ if (PEND)
+ name_end = end;
+
+ err:
onig_scan_env_set_error_string(env, r, *src, name_end);
return r;
}
}
#else
static int
-fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
+fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
+ UChar** rname_end, ScanEnv* env, int* rback_num, int ref)
{
- int r, len;
+ int r, is_num, sign;
+ OnigCodePoint end_code;
OnigCodePoint c = 0;
UChar *name_end;
OnigEncoding enc = env->enc;
+ UChar *pnum_head;
UChar *p = *src;
PFETCH_READY;
+ *rback_num = 0;
+
+ end_code = get_name_end_code_point(start_code);
+
+ *rname_end = name_end = end;
r = 0;
+ pnum_head = *src;
+ is_num = 0;
+ sign = 1;
+
+ if (PEND) {
+ return ONIGERR_EMPTY_GROUP_NAME;
+ }
+ else {
+ PFETCH(c);
+ if (c == end_code)
+ return ONIGERR_EMPTY_GROUP_NAME;
+
+ if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
+ is_num = 1;
+ }
+ else if (c == '-') {
+ is_num = 2;
+ sign = -1;
+ pnum_head = p;
+ }
+ else {
+ r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
+ }
+ }
+
while (!PEND) {
name_end = p;
- if (enc_len(enc, p) > 1)
- r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
PFETCH(c);
- if (c == '>' || c == ')') break;
+ if (c == end_code || c == ')') break;
if (! ONIGENC_IS_CODE_DIGIT(enc, c))
r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
}
- if (c != '>') {
+ if (r == 0 && c != end_code) {
r = ONIGERR_INVALID_GROUP_NAME;
name_end = end;
}
if (r == 0) {
+ *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc);
+ if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER;
+ else if (*rback_num == 0) {
+ r = ONIGERR_INVALID_GROUP_NAME;
+ goto err;
+ }
+ *rback_num *= sign;
+
*rname_end = name_end;
*src = p;
return 0;
@@ -2645,7 +2801,7 @@ fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
return r;
}
}
-#endif
+#endif /* USE_NAMED_GROUP */
static void
CC_ESC_WARN(ScanEnv* env, UChar *c)
@@ -2663,7 +2819,7 @@ CC_ESC_WARN(ScanEnv* env, UChar *c)
}
static void
-CCEND_ESC_WARN(ScanEnv* env, UChar* c)
+CLOSE_BRACKET_WITHOUT_ESC_WARN(ScanEnv* env, UChar* c)
{
if (onig_warn == onig_null_warn) return ;
@@ -2687,12 +2843,12 @@ find_str_position(OnigCodePoint s[], int n, UChar* from, UChar* to,
while (p < to) {
x = ONIGENC_MBC_TO_CODE(enc, p, to);
- q = p + enc_len(enc, p);
+ q = p + enclen(enc, p);
if (x == s[0]) {
for (i = 1; i < n && q < to; i++) {
x = ONIGENC_MBC_TO_CODE(enc, q, to);
if (x != s[i]) break;
- q += enc_len(enc, q);
+ q += enclen(enc, q);
}
if (i >= n) {
if (IS_NOT_NULL(next))
@@ -2707,7 +2863,7 @@ find_str_position(OnigCodePoint s[], int n, UChar* from, UChar* to,
static int
str_exist_check_with_esc(OnigCodePoint s[], int n, UChar* from, UChar* to,
- OnigCodePoint bad, OnigEncoding enc)
+ OnigCodePoint bad, OnigEncoding enc, OnigSyntaxType* syn)
{
int i, in_esc;
OnigCodePoint x;
@@ -2718,24 +2874,24 @@ str_exist_check_with_esc(OnigCodePoint s[], int n, UChar* from, UChar* to,
while (p < to) {
if (in_esc) {
in_esc = 0;
- p += enc_len(enc, p);
+ p += enclen(enc, p);
}
else {
x = ONIGENC_MBC_TO_CODE(enc, p, to);
- q = p + enc_len(enc, p);
+ q = p + enclen(enc, p);
if (x == s[0]) {
for (i = 1; i < n && q < to; i++) {
x = ONIGENC_MBC_TO_CODE(enc, q, to);
if (x != s[i]) break;
- q += enc_len(enc, q);
+ q += enclen(enc, q);
}
if (i >= n) return 1;
- p += enc_len(enc, p);
+ p += enclen(enc, p);
}
else {
x = ONIGENC_MBC_TO_CODE(enc, p, to);
if (x == bad) return 0;
- else if (x == MC_ESC(enc)) in_esc = 1;
+ else if (x == MC_ESC(syn)) in_esc = 1;
p = q;
}
}
@@ -2771,7 +2927,7 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
else if (c == '-') {
tok->type = TK_CC_RANGE;
}
- else if (c == MC_ESC(enc)) {
+ else if (c == MC_ESC(syn)) {
if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC))
goto end;
@@ -2783,37 +2939,45 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
switch (c) {
case 'w':
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_WORD;
+ tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
+ tok->u.prop.not = 0;
break;
case 'W':
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_WORD;
+ tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
+ tok->u.prop.not = 1;
break;
case 'd':
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_DIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
+ tok->u.prop.not = 0;
break;
case 'D':
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_DIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
+ tok->u.prop.not = 1;
break;
case 's':
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_WHITE_SPACE;
+ tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
+ tok->u.prop.not = 0;
break;
case 'S':
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
+ tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
+ tok->u.prop.not = 1;
break;
case 'h':
if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_XDIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
+ tok->u.prop.not = 0;
break;
case 'H':
if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_XDIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
+ tok->u.prop.not = 1;
break;
case 'p':
@@ -2850,7 +3014,7 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
}
- if (p > prev + enc_len(enc, prev) && !PEND && (PPEEK_IS('}'))) {
+ if (p > prev + enclen(enc, prev) && !PEND && (PPEEK_IS('}'))) {
PINC;
tok->type = TK_CODE_POINT;
tok->base = 16;
@@ -2922,7 +3086,7 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
tok->backp = p; /* point at '[' is readed */
PINC;
if (str_exist_check_with_esc(send, 2, p, end,
- (OnigCodePoint )']', enc)) {
+ (OnigCodePoint )']', enc, syn)) {
tok->type = TK_POSIX_BRACKET_OPEN;
}
else {
@@ -2975,7 +3139,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
tok->backp = p;
PFETCH(c);
- if (IS_MC_ESC_CODE(c, enc, syn)) {
+ if (IS_MC_ESC_CODE(c, syn)) {
if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
tok->backp = p;
@@ -3062,13 +3226,15 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
case 'w':
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_WORD;
+ tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
+ tok->u.prop.not = 0;
break;
case 'W':
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_WORD;
+ tok->u.prop.ctype = ONIGENC_CTYPE_WORD;
+ tok->u.prop.not = 1;
break;
case 'b':
@@ -3100,37 +3266,43 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
case 's':
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_WHITE_SPACE;
+ tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
+ tok->u.prop.not = 0;
break;
case 'S':
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
+ tok->u.prop.ctype = ONIGENC_CTYPE_SPACE;
+ tok->u.prop.not = 1;
break;
case 'd':
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_DIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
+ tok->u.prop.not = 0;
break;
case 'D':
if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_DIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT;
+ tok->u.prop.not = 1;
break;
case 'h':
if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_XDIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
+ tok->u.prop.not = 0;
break;
case 'H':
if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
tok->type = TK_CHAR_TYPE;
- tok->u.subtype = CTYPE_NOT_XDIGIT;
+ tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT;
+ tok->u.prop.not = 1;
break;
case 'A':
@@ -3182,7 +3354,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
}
- if ((p > prev + enc_len(enc, prev)) && !PEND && PPEEK_IS('}')) {
+ if ((p > prev + enclen(enc, prev)) && !PEND && PPEEK_IS('}')) {
PINC;
tok->type = TK_CODE_POINT;
tok->u.code = (OnigCodePoint )num;
@@ -3240,7 +3412,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
tok->u.backref.num = 1;
tok->u.backref.ref1 = num;
tok->u.backref.by_name = 0;
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
tok->u.backref.exist_level = 0;
#endif
break;
@@ -3276,46 +3448,67 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
case 'k':
if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) {
PFETCH(c);
- if (c == '<') {
+ if (c == '<' || c == '\'') {
UChar* name_end;
int* backs;
+ int back_num;
prev = p;
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
name_end = NULL_UCHARP; /* no need. escape gcc warning. */
- r = fetch_name_with_level(&p, end, &name_end, env, &tok->u.backref.level);
+ r = fetch_name_with_level((OnigCodePoint )c, &p, end, &name_end,
+ env, &back_num, &tok->u.backref.level);
if (r == 1) tok->u.backref.exist_level = 1;
else tok->u.backref.exist_level = 0;
#else
- r = fetch_name(&p, end, &name_end, env, 1);
+ r = fetch_name(&p, end, &name_end, env, &back_num, 1);
#endif
if (r < 0) return r;
- num = onig_name_to_group_numbers(env->reg, prev, name_end, &backs);
- if (num <= 0) {
- onig_scan_env_set_error_string(env,
- ONIGERR_UNDEFINED_NAME_REFERENCE, prev, name_end);
- return ONIGERR_UNDEFINED_NAME_REFERENCE;
- }
- if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
- int i;
- for (i = 0; i < num; i++) {
- if (backs[i] > env->num_mem ||
- IS_NULL(SCANENV_MEM_NODES(env)[backs[i]]))
+ if (back_num != 0) {
+ if (back_num < 0) {
+ back_num = BACKREF_REL_TO_ABS(back_num, env);
+ if (back_num <= 0)
return ONIGERR_INVALID_BACKREF;
}
- }
- tok->type = TK_BACKREF;
- tok->u.backref.by_name = 1;
- if (num == 1) {
+ if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
+ if (back_num > env->num_mem ||
+ IS_NULL(SCANENV_MEM_NODES(env)[back_num]))
+ return ONIGERR_INVALID_BACKREF;
+ }
+ tok->type = TK_BACKREF;
+ tok->u.backref.by_name = 0;
tok->u.backref.num = 1;
- tok->u.backref.ref1 = backs[0];
+ tok->u.backref.ref1 = back_num;
}
else {
- tok->u.backref.num = num;
- tok->u.backref.refs = backs;
+ num = onig_name_to_group_numbers(env->reg, prev, name_end, &backs);
+ if (num <= 0) {
+ onig_scan_env_set_error_string(env,
+ ONIGERR_UNDEFINED_NAME_REFERENCE, prev, name_end);
+ return ONIGERR_UNDEFINED_NAME_REFERENCE;
+ }
+ if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
+ int i;
+ for (i = 0; i < num; i++) {
+ if (backs[i] > env->num_mem ||
+ IS_NULL(SCANENV_MEM_NODES(env)[backs[i]]))
+ return ONIGERR_INVALID_BACKREF;
+ }
+ }
+
+ tok->type = TK_BACKREF;
+ tok->u.backref.by_name = 1;
+ if (num == 1) {
+ tok->u.backref.num = 1;
+ tok->u.backref.ref1 = backs[0];
+ }
+ else {
+ tok->u.backref.num = num;
+ tok->u.backref.refs = backs;
+ }
}
}
else
@@ -3328,16 +3521,18 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
case 'g':
if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) {
PFETCH(c);
- if (c == '<') {
+ if (c == '<' || c == '\'') {
+ int gnum;
UChar* name_end;
prev = p;
- r = fetch_name(&p, end, &name_end, env, 1);
+ r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &gnum, 1);
if (r < 0) return r;
tok->type = TK_CALL;
tok->u.call.name = prev;
tok->u.call.name_end = name_end;
+ tok->u.call.gnum = gnum;
}
else
PUNFETCH;
@@ -3380,7 +3575,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
tok->u.code = (OnigCodePoint )num;
}
else { /* string */
- p = tok->backp + enc_len(enc, tok->backp);
+ p = tok->backp + enclen(enc, tok->backp);
}
break;
}
@@ -3392,15 +3587,15 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
#ifdef USE_VARIABLE_META_CHARS
if ((c != ONIG_INEFFECTIVE_META_CHAR) &&
IS_SYNTAX_OP(syn, ONIG_SYN_OP_VARIABLE_META_CHARACTERS)) {
- if (c == MC_ANYCHAR(enc))
+ if (c == MC_ANYCHAR(syn))
goto any_char;
- else if (c == MC_ANYTIME(enc))
+ else if (c == MC_ANYTIME(syn))
goto anytime;
- else if (c == MC_ZERO_OR_ONE_TIME(enc))
+ else if (c == MC_ZERO_OR_ONE_TIME(syn))
goto zero_or_one_time;
- else if (c == MC_ONE_OR_MORE_TIME(enc))
+ else if (c == MC_ONE_OR_MORE_TIME(syn))
goto one_or_more_time;
- else if (c == MC_ANYCHAR_ANYTIME(enc)) {
+ else if (c == MC_ANYCHAR_ANYTIME(syn)) {
tok->type = TK_ANYCHAR_ANYTIME;
goto out;
}
@@ -3477,7 +3672,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
while (1) {
if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PFETCH(c);
- if (c == MC_ESC(enc)) {
+ if (c == MC_ESC(syn)) {
if (!PEND) PFETCH(c);
}
else {
@@ -3519,7 +3714,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
case ']':
if (*src > env->pattern) /* /].../ is allowed. */
- CCEND_ESC_WARN(env, (UChar* )"]");
+ CLOSE_BRACKET_WITHOUT_ESC_WARN(env, (UChar* )"]");
break;
case '#':
@@ -3553,24 +3748,36 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
}
static int
-add_ctype_to_cc_by_range(CClassNode* cc, int ctype, int not, OnigEncoding enc,
- const OnigCodePoint sbr[], const OnigCodePoint mbr[])
+add_ctype_to_cc_by_range(CClassNode* cc, int ctype ARG_UNUSED, int not,
+ OnigEncoding enc ARG_UNUSED,
+ OnigCodePoint sb_out, const OnigCodePoint mbr[])
{
int i, r;
OnigCodePoint j;
- int nsb = ONIGENC_CODE_RANGE_NUM(sbr);
- int nmb = ONIGENC_CODE_RANGE_NUM(mbr);
+ int n = ONIGENC_CODE_RANGE_NUM(mbr);
if (not == 0) {
- for (i = 0; i < nsb; i++) {
- for (j = ONIGENC_CODE_RANGE_FROM(sbr, i);
- j <= ONIGENC_CODE_RANGE_TO(sbr, i); j++) {
+ for (i = 0; i < n; i++) {
+ for (j = ONIGENC_CODE_RANGE_FROM(mbr, i);
+ j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) {
+ if (j >= sb_out) {
+ if (j == ONIGENC_CODE_RANGE_TO(mbr, i)) i++;
+ else if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) {
+ r = add_code_range_to_buf(&(cc->mbuf), j,
+ ONIGENC_CODE_RANGE_TO(mbr, i));
+ if (r != 0) return r;
+ i++;
+ }
+
+ goto sb_end;
+ }
BITSET_SET_BIT(cc->bs, j);
}
}
- for (i = 0; i < nmb; i++) {
+ sb_end:
+ for ( ; i < n; i++) {
r = add_code_range_to_buf(&(cc->mbuf),
ONIGENC_CODE_RANGE_FROM(mbr, i),
ONIGENC_CODE_RANGE_TO(mbr, i));
@@ -3580,24 +3787,24 @@ add_ctype_to_cc_by_range(CClassNode* cc, int ctype, int not, OnigEncoding enc,
else {
OnigCodePoint prev = 0;
- if (ONIGENC_MBC_MINLEN(enc) == 1) {
- for (i = 0; i < nsb; i++) {
- for (j = prev;
- j < ONIGENC_CODE_RANGE_FROM(sbr, i); j++) {
- BITSET_SET_BIT(cc->bs, j);
- }
- prev = ONIGENC_CODE_RANGE_TO(sbr, i) + 1;
- }
- if (prev < 0x7f) {
- for (j = prev; j < 0x7f; j++) {
- BITSET_SET_BIT(cc->bs, j);
- }
+ for (i = 0; i < n; i++) {
+ for (j = prev;
+ j < ONIGENC_CODE_RANGE_FROM(mbr, i); j++) {
+ if (j >= sb_out) {
+ goto sb_end2;
+ }
+ BITSET_SET_BIT(cc->bs, j);
}
-
- prev = 0x80;
+ prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1;
+ }
+ for (j = prev; j < sb_out; j++) {
+ BITSET_SET_BIT(cc->bs, j);
}
- for (i = 0; i < nmb; i++) {
+ sb_end2:
+ prev = sb_out;
+
+ for (i = 0; i < n; i++) {
if (prev < ONIGENC_CODE_RANGE_FROM(mbr, i)) {
r = add_code_range_to_buf(&(cc->mbuf), prev,
ONIGENC_CODE_RANGE_FROM(mbr, i) - 1);
@@ -3618,12 +3825,13 @@ static int
add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env)
{
int c, r;
- const OnigCodePoint *sbr, *mbr;
+ const OnigCodePoint *ranges;
+ OnigCodePoint sb_out;
OnigEncoding enc = env->enc;
- r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sbr, &mbr);
+ r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sb_out, &ranges);
if (r == 0) {
- return add_ctype_to_cc_by_range(cc, ctype, not, env->enc, sbr, mbr);
+ return add_ctype_to_cc_by_range(cc, ctype, not, env->enc, sb_out, ranges);
}
else if (r != ONIG_NO_SUPPORT_CONFIG) {
return r;
@@ -3677,13 +3885,13 @@ add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env)
case ONIGENC_CTYPE_WORD:
if (not == 0) {
for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
- if (ONIGENC_IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c);
+ if (IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c);
}
ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
}
else {
for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
- if ((ONIGENC_CODE_TO_MBCLEN(enc, c) > 0) /* 0: invalid code point */
+ if ((ONIGENC_CODE_TO_MBCLEN(enc, c) > 0) /* check invalid code point */
&& ! ONIGENC_IS_CODE_WORD(enc, c))
BITSET_SET_BIT(cc->bs, c);
}
@@ -3699,61 +3907,10 @@ add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env)
}
static int
-parse_ctype_to_enc_ctype(int pctype, int* not)
-{
- int ctype;
-
- switch (pctype) {
- case CTYPE_WORD:
- ctype = ONIGENC_CTYPE_WORD;
- *not = 0;
- break;
- case CTYPE_NOT_WORD:
- ctype = ONIGENC_CTYPE_WORD;
- *not = 1;
- break;
- case CTYPE_WHITE_SPACE:
- ctype = ONIGENC_CTYPE_SPACE;
- *not = 0;
- break;
- case CTYPE_NOT_WHITE_SPACE:
- ctype = ONIGENC_CTYPE_SPACE;
- *not = 1;
- break;
- case CTYPE_DIGIT:
- ctype = ONIGENC_CTYPE_DIGIT;
- *not = 0;
- break;
- case CTYPE_NOT_DIGIT:
- ctype = ONIGENC_CTYPE_DIGIT;
- *not = 1;
- break;
- case CTYPE_XDIGIT:
- ctype = ONIGENC_CTYPE_XDIGIT;
- *not = 0;
- break;
- case CTYPE_NOT_XDIGIT:
- ctype = ONIGENC_CTYPE_XDIGIT;
- *not = 1;
- break;
- default:
- return ONIGERR_PARSER_BUG;
- break;
- }
- return ctype;
-}
-
-typedef struct {
- UChar *name;
- int ctype;
- short int len;
-} PosixBracketEntryType;
-
-static int
parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
{
#define POSIX_BRACKET_CHECK_LIMIT_LENGTH 20
-#define POSIX_BRACKET_NAME_MAX_LEN 6
+#define POSIX_BRACKET_NAME_MIN_LEN 4
static PosixBracketEntryType PBS[] = {
{ (UChar* )"alnum", ONIGENC_CTYPE_ALNUM, 5 },
@@ -3769,7 +3926,8 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
{ (UChar* )"upper", ONIGENC_CTYPE_UPPER, 5 },
{ (UChar* )"xdigit", ONIGENC_CTYPE_XDIGIT, 6 },
{ (UChar* )"ascii", ONIGENC_CTYPE_ASCII, 5 },
- { (UChar* )NULL, -1, 0 }
+ { (UChar* )"word", ONIGENC_CTYPE_WORD, 4 },
+ { (UChar* )NULL, -1, 0 }
};
PosixBracketEntryType *pb;
@@ -3786,7 +3944,7 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
else
not = 0;
- if (onigenc_strlen(enc, p, end) < POSIX_BRACKET_NAME_MAX_LEN + 2)
+ if (onigenc_strlen(enc, p, end) < POSIX_BRACKET_NAME_MIN_LEN + 3)
goto not_posix_bracket;
for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
@@ -3820,86 +3978,39 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
}
}
- return 1; /* 1: is not POSIX bracket, but no error. */
-}
-
-static int
-property_name_to_ctype(UChar* p, UChar* end, OnigEncoding enc)
-{
- static PosixBracketEntryType PBS[] = {
- { (UChar* )"Alnum", ONIGENC_CTYPE_ALNUM, 5 },
- { (UChar* )"Alpha", ONIGENC_CTYPE_ALPHA, 5 },
- { (UChar* )"Blank", ONIGENC_CTYPE_BLANK, 5 },
- { (UChar* )"Cntrl", ONIGENC_CTYPE_CNTRL, 5 },
- { (UChar* )"Digit", ONIGENC_CTYPE_DIGIT, 5 },
- { (UChar* )"Graph", ONIGENC_CTYPE_GRAPH, 5 },
- { (UChar* )"Lower", ONIGENC_CTYPE_LOWER, 5 },
- { (UChar* )"Print", ONIGENC_CTYPE_PRINT, 5 },
- { (UChar* )"Punct", ONIGENC_CTYPE_PUNCT, 5 },
- { (UChar* )"Space", ONIGENC_CTYPE_SPACE, 5 },
- { (UChar* )"Upper", ONIGENC_CTYPE_UPPER, 5 },
- { (UChar* )"XDigit", ONIGENC_CTYPE_XDIGIT, 6 },
- { (UChar* )"ASCII", ONIGENC_CTYPE_ASCII, 5 },
- { (UChar* )NULL, -1, 0 }
- };
-
- PosixBracketEntryType *pb;
- int len;
-
- len = onigenc_strlen(enc, p, end);
- for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
- if (len == pb->len &&
- onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0)
- return pb->ctype;
- }
-
- return -1;
+ return 1; /* 1: is not POSIX bracket, but no error. */
}
static int
fetch_char_property_to_ctype(UChar** src, UChar* end, ScanEnv* env)
{
- int ctype;
+ int r;
OnigCodePoint c;
OnigEncoding enc = env->enc;
UChar *prev, *start, *p = *src;
PFETCH_READY;
- /* 'IsXXXX' => 'XXXX' */
- if (!PEND &&
- IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS)) {
- c = PPEEK;
- if (c == 'I') {
- PINC;
- if (! PEND) {
- c = PPEEK;
- if (c == 's')
- PINC;
- else
- PUNFETCH;
- }
- }
- }
-
+ r = 0;
start = prev = p;
while (!PEND) {
prev = p;
PFETCH(c);
if (c == '}') {
- ctype = property_name_to_ctype(start, prev, enc);
- if (ctype < 0) break;
+ r = ONIGENC_PROPERTY_NAME_TO_CTYPE(enc, start, prev);
+ if (r < 0) break;
*src = p;
- return ctype;
+ return r;
}
- else if (c == '(' || c == ')' || c == '{' || c == '|')
+ else if (c == '(' || c == ')' || c == '{' || c == '|') {
+ r = ONIGERR_INVALID_CHAR_PROPERTY_NAME;
break;
+ }
}
- onig_scan_env_set_error_string(env, ONIGERR_INVALID_CHAR_PROPERTY_NAME,
- *src, prev);
- return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+ onig_scan_env_set_error_string(env, r, *src, prev);
+ return r;
}
static int
@@ -3913,11 +4024,11 @@ parse_char_property(Node** np, OnigToken* tok, UChar** src, UChar* end,
if (ctype < 0) return ctype;
*np = node_new_cclass();
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
- cc = &(NCCLASS(*np));
+ CHECK_NULL_RETURN_MEMERR(*np);
+ cc = NCCLASS(*np);
r = add_ctype_to_cc(cc, ctype, 0, env);
if (r != 0) return r;
- if (tok->u.prop.not != 0) CCLASS_SET_NOT(cc);
+ if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc);
return 0;
}
@@ -3981,7 +4092,7 @@ next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v,
if (intype == *type) {
if (intype == CCV_SB) {
if (*vs > 0xff || v > 0xff)
- return ONIGERR_INVALID_WIDE_CHAR_VALUE;
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
if (*vs > v) {
if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
@@ -4036,10 +4147,11 @@ next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v,
static int
code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped,
- OnigEncoding enc)
+ ScanEnv* env)
{
int in_esc;
OnigCodePoint code;
+ OnigEncoding enc = env->enc;
UChar* p = from;
PFETCH_READY;
@@ -4051,7 +4163,7 @@ code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped,
else {
PFETCH(code);
if (code == c) return 1;
- if (code == MC_ESC(enc)) in_esc = 1;
+ if (code == MC_ESC(env->syntax)) in_esc = 1;
}
}
return 0;
@@ -4086,7 +4198,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
if (r < 0) return r;
if (r == TK_CC_CLOSE) {
if (! code_exist_check((OnigCodePoint )']',
- *src, env->pattern_end, 1, env->enc))
+ *src, env->pattern_end, 1, env))
return ONIGERR_EMPTY_CHAR_CLASS;
CC_ESC_WARN(env, (UChar* )"]");
@@ -4094,8 +4206,8 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
}
*np = node = node_new_cclass();
- CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
- cc = &(NCCLASS(node));
+ CHECK_NULL_RETURN_MEMERR(node);
+ cc = NCCLASS(node);
and_start = 0;
state = CCS_START;
@@ -4108,6 +4220,10 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
if (len > 1) {
in_type = CCV_CODE_POINT;
}
+ else if (len < 0) {
+ r = len;
+ goto err;
+ }
else {
sb_char:
in_type = CCV_SB;
@@ -4141,7 +4257,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
goto err;
}
- len = enc_len(env->enc, buf);
+ len = enclen(env->enc, buf);
if (i < len) {
r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
goto err;
@@ -4202,12 +4318,8 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
break;
case TK_CHAR_TYPE:
- {
- int ctype, not;
- ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
- r = add_ctype_to_cc(cc, ctype, not, env);
- if (r != 0) return r;
- }
+ r = add_ctype_to_cc(cc, tok->u.prop.ctype, tok->u.prop.not, env);
+ if (r != 0) return r;
next_class:
r = next_state_class(cc, &vs, &val_type, &state, env);
@@ -4287,7 +4399,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
r = parse_char_class(&anode, tok, &p, end, env);
if (r != 0) goto cc_open_err;
- acc = &(NCCLASS(anode));
+ acc = NCCLASS(anode);
r = or_cclass(cc, acc, env->enc);
onig_node_free(anode);
@@ -4352,10 +4464,10 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
}
if (neg != 0)
- CCLASS_SET_NOT(cc);
+ NCCLASS_SET_NOT(cc);
else
- CCLASS_CLEAR_NOT(cc);
- if (IS_CCLASS_NOT(cc) &&
+ NCCLASS_CLEAR_NOT(cc);
+ if (IS_NCCLASS_NOT(cc) &&
IS_SYNTAX_BV(env->syntax, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC)) {
int is_empty;
@@ -4378,7 +4490,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
return 0;
err:
- if (cc != &(NCCLASS(*np)))
+ if (cc != NCCLASS(*np))
bbuf_free(cc->mbuf);
onig_node_free(*np);
return r;
@@ -4388,15 +4500,19 @@ static int parse_subexp(Node** top, OnigToken* tok, int term,
UChar** src, UChar* end, ScanEnv* env);
static int
-parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
- ScanEnv* env)
+parse_enclose(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
+ ScanEnv* env)
{
int r, num;
- int list_capture;
Node *target;
OnigOptionType option;
- OnigEncoding enc = env->enc;
OnigCodePoint c;
+ OnigEncoding enc = env->enc;
+
+#ifdef USE_NAMED_GROUP
+ int list_capture;
+#endif
+
UChar* p = *src;
PFETCH_READY;
@@ -4428,9 +4544,19 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
*np = onig_node_new_anchor(ANCHOR_PREC_READ_NOT);
break;
case '>': /* (?>...) stop backtrack */
- *np = node_new_effect(EFFECT_STOP_BACKTRACK);
+ *np = node_new_enclose(ENCLOSE_STOP_BACKTRACK);
break;
+#ifdef USE_NAMED_GROUP
+ case '\'':
+ if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
+ goto named_group1;
+ }
+ else
+ return ONIGERR_UNDEFINED_GROUP_OPTION;
+ break;
+#endif
+
case '<': /* look behind (?<=...), (?<!...) */
PFETCH(c);
if (c == '=')
@@ -4438,35 +4564,45 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
else if (c == '!')
*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND_NOT);
#ifdef USE_NAMED_GROUP
- else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
- UChar *name;
- UChar *name_end;
+ else {
+ if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
+ UChar *name;
+ UChar *name_end;
- PUNFETCH;
- list_capture = 0;
+ PUNFETCH;
+ c = '<';
- named_group:
- name = p;
- r = fetch_name(&p, end, &name_end, env, 0);
- if (r < 0) return r;
+ named_group1:
+ list_capture = 0;
- num = scan_env_add_mem_entry(env);
- if (num < 0) return num;
- if (list_capture != 0 && num >= BIT_STATUS_BITS_NUM)
- return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
+ named_group2:
+ name = p;
+ r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &num, 0);
+ if (r < 0) return r;
- r = name_add(env->reg, name, name_end, num, env);
- if (r != 0) return r;
- *np = node_new_effect_memory(env->option, 1);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
- NEFFECT(*np).regnum = num;
- if (list_capture != 0)
- BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
- env->num_named++;
+ num = scan_env_add_mem_entry(env);
+ if (num < 0) return num;
+ if (list_capture != 0 && num >= (int )BIT_STATUS_BITS_NUM)
+ return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
+
+ r = name_add(env->reg, name, name_end, num, env);
+ if (r != 0) return r;
+ *np = node_new_enclose_memory(env->option, 1);
+ CHECK_NULL_RETURN_MEMERR(*np);
+ NENCLOSE(*np)->regnum = num;
+ if (list_capture != 0)
+ BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
+ env->num_named++;
+ }
+ else {
+ return ONIGERR_UNDEFINED_GROUP_OPTION;
+ }
}
-#endif
- else
+#else
+ else {
return ONIGERR_UNDEFINED_GROUP_OPTION;
+ }
+#endif
break;
case '@':
@@ -4474,25 +4610,25 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
#ifdef USE_NAMED_GROUP
if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
PFETCH(c);
- if (c == '<') {
+ if (c == '<' || c == '\'') {
list_capture = 1;
- goto named_group; /* (?@<name>...) */
+ goto named_group2; /* (?@<name>...) */
}
PUNFETCH;
}
#endif
- *np = node_new_effect_memory(env->option, 0);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ *np = node_new_enclose_memory(env->option, 0);
+ CHECK_NULL_RETURN_MEMERR(*np);
num = scan_env_add_mem_entry(env);
if (num < 0) {
onig_node_free(*np);
return num;
}
- else if (num >= BIT_STATUS_BITS_NUM) {
+ else if (num >= (int )BIT_STATUS_BITS_NUM) {
onig_node_free(*np);
return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
}
- NEFFECT(*np).regnum = num;
+ NENCLOSE(*np)->regnum = num;
BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
}
else {
@@ -4545,7 +4681,7 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
if (c == ')') {
*np = node_new_option(option);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
*src = p;
return 2; /* option only */
}
@@ -4559,8 +4695,8 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
env->option = prev;
if (r < 0) return r;
*np = node_new_option(option);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
- NEFFECT(*np).target = target;
+ CHECK_NULL_RETURN_MEMERR(*np);
+ NENCLOSE(*np)->target = target;
*src = p;
return 0;
}
@@ -4579,26 +4715,26 @@ parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
if (ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_DONT_CAPTURE_GROUP))
goto group;
- *np = node_new_effect_memory(env->option, 0);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ *np = node_new_enclose_memory(env->option, 0);
+ CHECK_NULL_RETURN_MEMERR(*np);
num = scan_env_add_mem_entry(env);
if (num < 0) return num;
- NEFFECT(*np).regnum = num;
+ NENCLOSE(*np)->regnum = num;
}
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
r = fetch_token(tok, &p, end, env);
if (r < 0) return r;
r = parse_subexp(&target, tok, term, &p, end, env);
if (r < 0) return r;
- if (NTYPE(*np) == N_ANCHOR)
- NANCHOR(*np).target = target;
+ if (NTYPE(*np) == NT_ANCHOR)
+ NANCHOR(*np)->target = target;
else {
- NEFFECT(*np).target = target;
- if (NEFFECT(*np).type == EFFECT_MEMORY) {
+ NENCLOSE(*np)->target = target;
+ if (NENCLOSE(*np)->type == ENCLOSE_MEMORY) {
/* Don't move this to previous of parse_subexp() */
- r = scan_env_set_mem_node(env, NEFFECT(*np).regnum, *np);
+ r = scan_env_set_mem_node(env, NENCLOSE(*np)->regnum, *np);
if (r != 0) return r;
}
}
@@ -4618,17 +4754,17 @@ static const char* ReduceQStr[] = {
static int
set_quantifier(Node* qnode, Node* target, int group, ScanEnv* env)
{
- QuantifierNode* qn;
+ QtfrNode* qn;
- qn = &(NQUANTIFIER(qnode));
+ qn = NQTFR(qnode);
if (qn->lower == 1 && qn->upper == 1) {
return 1;
}
switch (NTYPE(target)) {
- case N_STRING:
+ case NT_STR:
if (! group) {
- StrNode* sn = &(NSTRING(target));
+ StrNode* sn = NSTR(target);
if (str_node_can_be_split(sn, env->enc)) {
Node* n = str_node_split_last_char(sn, env->enc);
if (IS_NOT_NULL(n)) {
@@ -4639,10 +4775,10 @@ set_quantifier(Node* qnode, Node* target, int group, ScanEnv* env)
}
break;
- case N_QUANTIFIER:
+ case NT_QTFR:
{ /* check redundant double repeat. */
/* verbose warn (?:.?)? etc... but not warn (.?)? etc... */
- QuantifierNode* qnt = &(NQUANTIFIER(target));
+ QtfrNode* qnt = NQTFR(target);
int nestq_num = popular_quantifier_num(qn);
int targetq_num = popular_quantifier_num(qnt);
@@ -4705,6 +4841,7 @@ set_quantifier(Node* qnode, Node* target, int group, ScanEnv* env)
return 0;
}
+
#ifdef USE_SHARED_CCLASS_TABLE
#define THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS 8
@@ -4728,17 +4865,17 @@ static int type_cclass_cmp(type_cclass_key* x, type_cclass_key* y)
static int type_cclass_hash(type_cclass_key* key)
{
int i, val;
- unsigned char *p;
+ UChar *p;
val = 0;
- p = (unsigned char* )&(key->enc);
- for (i = 0; i < sizeof(key->enc); i++) {
+ p = (UChar* )&(key->enc);
+ for (i = 0; i < (int )sizeof(key->enc); i++) {
val = val * 997 + (int )*p++;
}
- p = (unsigned char* )(&key->type);
- for (i = 0; i < sizeof(key->type); i++) {
+ p = (UChar* )(&key->type);
+ for (i = 0; i < (int )sizeof(key->type); i++) {
val = val * 997 + (int )*p++;
}
@@ -4755,10 +4892,10 @@ static st_table* OnigTypeCClassTable;
static int
-i_free_shared_class(type_cclass_key* key, Node* node, void* arg)
+i_free_shared_class(type_cclass_key* key, Node* node, void* arg ARG_UNUSED)
{
if (IS_NOT_NULL(node)) {
- CClassNode* cc = &(NCCLASS(node));
+ CClassNode* cc = NCCLASS(node);
if (IS_NOT_NULL(cc->mbuf)) xfree(cc->mbuf);
xfree(node);
}
@@ -4782,6 +4919,118 @@ onig_free_shared_cclass_table(void)
#endif /* USE_SHARED_CCLASS_TABLE */
+#ifndef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS
+static int
+clear_not_flag_cclass(CClassNode* cc, OnigEncoding enc)
+{
+ BBuf *tbuf;
+ int r;
+
+ if (IS_NCCLASS_NOT(cc)) {
+ bitset_invert(cc->bs);
+
+ if (! ONIGENC_IS_SINGLEBYTE(enc)) {
+ r = not_code_range_buf(enc, cc->mbuf, &tbuf);
+ if (r != 0) return r;
+
+ bbuf_free(cc->mbuf);
+ cc->mbuf = tbuf;
+ }
+
+ NCCLASS_CLEAR_NOT(cc);
+ }
+
+ return 0;
+}
+#endif /* CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS */
+
+typedef struct {
+ ScanEnv* env;
+ CClassNode* cc;
+ Node* alt_root;
+ Node** ptail;
+} IApplyCaseFoldArg;
+
+static int
+i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[],
+ int to_len, void* arg)
+{
+ IApplyCaseFoldArg* iarg;
+ ScanEnv* env;
+ CClassNode* cc;
+ BitSetRef bs;
+
+ iarg = (IApplyCaseFoldArg* )arg;
+ env = iarg->env;
+ cc = iarg->cc;
+ bs = cc->bs;
+
+ if (to_len == 1) {
+ int is_in = onig_is_code_in_cc(env->enc, from, cc);
+#ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS
+ if ((is_in != 0 && !IS_NCCLASS_NOT(cc)) ||
+ (is_in == 0 && IS_NCCLASS_NOT(cc))) {
+ if (ONIGENC_MBC_MINLEN(env->enc) > 1 || *to >= SINGLE_BYTE_SIZE) {
+ add_code_range(&(cc->mbuf), env, *to, *to);
+ }
+ else {
+ BITSET_SET_BIT(bs, *to);
+ }
+ }
+#else
+ if (is_in != 0) {
+ if (ONIGENC_MBC_MINLEN(env->enc) > 1 || *to >= SINGLE_BYTE_SIZE) {
+ if (IS_NCCLASS_NOT(cc)) clear_not_flag_cclass(cc, env->enc);
+ add_code_range(&(cc->mbuf), env, *to, *to);
+ }
+ else {
+ if (IS_NCCLASS_NOT(cc)) {
+ BITSET_CLEAR_BIT(bs, *to);
+ }
+ else
+ BITSET_SET_BIT(bs, *to);
+ }
+ }
+#endif /* CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS */
+ }
+ else {
+ int r, i, len;
+ UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
+ Node *snode = NULL_NODE;
+
+ if (onig_is_code_in_cc(env->enc, from, cc)
+#ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS
+ && !IS_NCCLASS_NOT(cc)
+#endif
+ ) {
+ for (i = 0; i < to_len; i++) {
+ len = ONIGENC_CODE_TO_MBC(env->enc, to[i], buf);
+ if (i == 0) {
+ snode = onig_node_new_str(buf, buf + len);
+ CHECK_NULL_RETURN_MEMERR(snode);
+
+ /* char-class expanded multi-char only
+ compare with string folded at match time. */
+ NSTRING_SET_AMBIG(snode);
+ }
+ else {
+ r = onig_node_str_cat(snode, buf, buf + len);
+ if (r < 0) {
+ onig_node_free(snode);
+ return r;
+ }
+ }
+ }
+
+ *(iarg->ptail) = onig_node_new_alt(snode, NULL_NODE);
+ CHECK_NULL_RETURN_MEMERR(*(iarg->ptail));
+ iarg->ptail = &(NCDR((*(iarg->ptail))));
+ }
+ }
+
+ return 0;
+}
+
static int
parse_exp(Node** np, OnigToken* tok, int term,
UChar** src, UChar* end, ScanEnv* env)
@@ -4791,7 +5040,7 @@ parse_exp(Node** np, OnigToken* tok, int term,
Node** targetp;
*np = NULL;
- if (tok->type == term)
+ if (tok->type == (enum TokenSyms )term)
goto end_of_token;
switch (tok->type) {
@@ -4803,20 +5052,20 @@ parse_exp(Node** np, OnigToken* tok, int term,
break;
case TK_SUBEXP_OPEN:
- r = parse_effect(np, tok, TK_SUBEXP_CLOSE, src, end, env);
+ r = parse_enclose(np, tok, TK_SUBEXP_CLOSE, src, end, env);
if (r < 0) return r;
if (r == 1) group = 1;
else if (r == 2) { /* option only */
Node* target;
OnigOptionType prev = env->option;
- env->option = NEFFECT(*np).option;
+ env->option = NENCLOSE(*np)->option;
r = fetch_token(tok, src, end, env);
if (r < 0) return r;
r = parse_subexp(&target, tok, term, src, end, env);
env->option = prev;
if (r < 0) return r;
- NEFFECT(*np).target = target;
+ NENCLOSE(*np)->target = target;
return tok->type;
}
break;
@@ -4833,7 +5082,7 @@ parse_exp(Node** np, OnigToken* tok, int term,
tk_byte:
{
*np = node_new_str(tok->backp, *src);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
while (1) {
r = fetch_token(tok, src, end, env);
@@ -4853,13 +5102,14 @@ parse_exp(Node** np, OnigToken* tok, int term,
case TK_RAW_BYTE:
tk_raw_byte:
{
- *np = node_new_str_char((UChar )tok->u.c);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ *np = node_new_str_raw_char((UChar )tok->u.c);
+ CHECK_NULL_RETURN_MEMERR(*np);
len = 1;
while (1) {
if (len >= ONIGENC_MBC_MINLEN(env->enc)) {
- if (len == enc_len(env->enc, NSTRING(*np).s)) {
+ if (len == enclen(env->enc, NSTR(*np)->s)) {
r = fetch_token(tok, src, end, env);
+ NSTRING_CLEAR_RAW(*np);
goto string_end;
}
}
@@ -4867,12 +5117,14 @@ parse_exp(Node** np, OnigToken* tok, int term,
r = fetch_token(tok, src, end, env);
if (r < 0) return r;
if (r != TK_RAW_BYTE) {
+ /* Don't use this, it is wrong for little endian encodings. */
#ifdef USE_PAD_TO_SHORT_BYTE_CHAR
int rem;
if (len < ONIGENC_MBC_MINLEN(env->enc)) {
rem = ONIGENC_MBC_MINLEN(env->enc) - len;
- (void )node_str_head_pad(&NSTRING(*np), rem, (UChar )0);
- if (len + rem == enc_len(env->enc, NSTRING(*np).s)) {
+ (void )node_str_head_pad(NSTR(*np), rem, (UChar )0);
+ if (len + rem == enclen(env->enc, NSTR(*np)->s)) {
+ NSTRING_CLEAR_RAW(*np);
goto string_end;
}
}
@@ -4898,7 +5150,7 @@ parse_exp(Node** np, OnigToken* tok, int term,
#else
*np = node_new_str(buf, buf + num);
#endif
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
}
break;
@@ -4907,7 +5159,7 @@ parse_exp(Node** np, OnigToken* tok, int term,
OnigCodePoint end_op[2];
UChar *qstart, *qend, *nextp;
- end_op[0] = (OnigCodePoint )MC_ESC(env->enc);
+ end_op[0] = (OnigCodePoint )MC_ESC(env->syntax);
end_op[1] = (OnigCodePoint )'E';
qstart = *src;
qend = find_str_position(end_op, 2, qstart, end, &nextp, env->enc);
@@ -4915,35 +5167,31 @@ parse_exp(Node** np, OnigToken* tok, int term,
nextp = qend = end;
}
*np = node_new_str(qstart, qend);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
*src = nextp;
}
break;
case TK_CHAR_TYPE:
{
- switch (tok->u.subtype) {
- case CTYPE_WORD:
- case CTYPE_NOT_WORD:
- *np = node_new_ctype(tok->u.subtype);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ switch (tok->u.prop.ctype) {
+ case ONIGENC_CTYPE_WORD:
+ *np = node_new_ctype(tok->u.prop.ctype, tok->u.prop.not);
+ CHECK_NULL_RETURN_MEMERR(*np);
break;
- case CTYPE_WHITE_SPACE:
- case CTYPE_NOT_WHITE_SPACE:
- case CTYPE_DIGIT:
- case CTYPE_NOT_DIGIT:
- case CTYPE_XDIGIT:
- case CTYPE_NOT_XDIGIT:
+ case ONIGENC_CTYPE_SPACE:
+ case ONIGENC_CTYPE_DIGIT:
+ case ONIGENC_CTYPE_XDIGIT:
{
CClassNode* cc;
- int ctype, not;
#ifdef USE_SHARED_CCLASS_TABLE
- const OnigCodePoint *sbr, *mbr;
+ const OnigCodePoint *mbr;
+ OnigCodePoint sb_out;
- ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
- r = ONIGENC_GET_CTYPE_CODE_RANGE(env->enc, ctype, &sbr, &mbr);
+ r = ONIGENC_GET_CTYPE_CODE_RANGE(env->enc, tok->u.prop.ctype,
+ &sb_out, &mbr);
if (r == 0 &&
ONIGENC_CODE_RANGE_NUM(mbr)
>= THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS) {
@@ -4951,8 +5199,8 @@ parse_exp(Node** np, OnigToken* tok, int term,
type_cclass_key* new_key;
key.enc = env->enc;
- key.not = not;
- key.type = ctype;
+ key.not = tok->u.prop.not;
+ key.type = tok->u.prop.ctype;
THREAD_ATOMIC_START;
@@ -4972,15 +5220,17 @@ parse_exp(Node** np, OnigToken* tok, int term,
}
}
- *np = node_new_cclass_by_codepoint_range(not, sbr, mbr);
+ *np = node_new_cclass_by_codepoint_range(tok->u.prop.not,
+ sb_out, mbr);
if (IS_NULL(*np)) {
THREAD_ATOMIC_END;
return ONIGERR_MEMORY;
}
- CCLASS_SET_SHARE(&(NCCLASS(*np)));
+ cc = NCCLASS(*np);
+ NCCLASS_SET_SHARE(cc);
new_key = (type_cclass_key* )xmalloc(sizeof(type_cclass_key));
- xmemcpy(new_key, &key, sizeof(type_cclass_key));
+ xmemcpy(new_key, &key, sizeof(type_cclass_key));
onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key,
(st_data_t )*np);
@@ -4988,12 +5238,11 @@ parse_exp(Node** np, OnigToken* tok, int term,
}
else {
#endif
- ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
*np = node_new_cclass();
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
- cc = &(NCCLASS(*np));
- add_ctype_to_cc(cc, ctype, 0, env);
- if (not != 0) CCLASS_SET_NOT(cc);
+ CHECK_NULL_RETURN_MEMERR(*np);
+ cc = NCCLASS(*np);
+ add_ctype_to_cc(cc, tok->u.prop.ctype, 0, env);
+ if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc);
#ifdef USE_SHARED_CCLASS_TABLE
}
#endif
@@ -5019,55 +5268,44 @@ parse_exp(Node** np, OnigToken* tok, int term,
r = parse_char_class(np, tok, src, end, env);
if (r != 0) return r;
- cc = &(NCCLASS(*np));
-
+ cc = NCCLASS(*np);
if (IS_IGNORECASE(env->option)) {
- int i, n, in_cc;
- const OnigPairAmbigCodes* ccs;
- BitSetRef bs = cc->bs;
- OnigAmbigType amb;
-
- for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
- if ((amb & env->ambig_flag) == 0) continue;
-
- n = ONIGENC_GET_ALL_PAIR_AMBIG_CODES(env->enc, amb, &ccs);
- for (i = 0; i < n; i++) {
- in_cc = onig_is_code_in_cc(env->enc, ccs[i].from, cc);
-
- if ((in_cc != 0 && !IS_CCLASS_NOT(cc)) ||
- (in_cc == 0 && IS_CCLASS_NOT(cc))) {
- if (ONIGENC_MBC_MINLEN(env->enc) > 1 ||
- ccs[i].from >= SINGLE_BYTE_SIZE) {
- /* if (cc->not) clear_not_flag_cclass(cc, env->enc); */
- add_code_range(&(cc->mbuf), env, ccs[i].to, ccs[i].to);
- }
- else {
- if (BITSET_AT(bs, ccs[i].from)) {
- /* /(?i:[^A-C])/.match("a") ==> fail. */
- BITSET_SET_BIT(bs, ccs[i].to);
- }
- if (BITSET_AT(bs, ccs[i].to)) {
- BITSET_SET_BIT(bs, ccs[i].from);
- }
- }
- }
+ IApplyCaseFoldArg iarg;
+
+ iarg.env = env;
+ iarg.cc = cc;
+ iarg.alt_root = NULL_NODE;
+ iarg.ptail = &(iarg.alt_root);
+
+ r = ONIGENC_APPLY_ALL_CASE_FOLD(env->enc, env->case_fold_flag,
+ i_apply_case_fold, &iarg);
+ if (r != 0) {
+ onig_node_free(iarg.alt_root);
+ return r;
+ }
+ if (IS_NOT_NULL(iarg.alt_root)) {
+ Node* work = onig_node_new_alt(*np, iarg.alt_root);
+ if (IS_NULL(work)) {
+ onig_node_free(iarg.alt_root);
+ return ONIGERR_MEMORY;
}
- }
+ *np = work;
+ }
}
}
break;
case TK_ANYCHAR:
*np = node_new_anychar();
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
break;
case TK_ANYCHAR_ANYTIME:
*np = node_new_anychar();
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
qn = node_new_quantifier(0, REPEAT_INFINITE, 0);
- CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
- NQUANTIFIER(qn).target = *np;
+ CHECK_NULL_RETURN_MEMERR(qn);
+ NQTFR(qn)->target = *np;
*np = qn;
break;
@@ -5076,19 +5314,28 @@ parse_exp(Node** np, OnigToken* tok, int term,
*np = node_new_backref(len,
(len > 1 ? tok->u.backref.refs : &(tok->u.backref.ref1)),
tok->u.backref.by_name,
-#ifdef USE_BACKREF_AT_LEVEL
+#ifdef USE_BACKREF_WITH_LEVEL
tok->u.backref.exist_level,
tok->u.backref.level,
#endif
env);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
+ CHECK_NULL_RETURN_MEMERR(*np);
break;
#ifdef USE_SUBEXP_CALL
case TK_CALL:
- *np = node_new_call(tok->u.call.name, tok->u.call.name_end);
- CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
- env->num_call++;
+ {
+ int gnum = tok->u.call.gnum;
+
+ if (gnum < 0) {
+ gnum = BACKREF_REL_TO_ABS(gnum, env);
+ if (gnum <= 0)
+ return ONIGERR_INVALID_BACKREF;
+ }
+ *np = node_new_call(tok->u.call.name, tok->u.call.name_end, gnum);
+ CHECK_NULL_RETURN_MEMERR(*np);
+ env->num_call++;
+ }
break;
#endif
@@ -5127,31 +5374,46 @@ parse_exp(Node** np, OnigToken* tok, int term,
return ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID;
qn = node_new_quantifier(tok->u.repeat.lower, tok->u.repeat.upper,
- (r == TK_INTERVAL ? 1 : 0));
- CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
- NQUANTIFIER(qn).greedy = tok->u.repeat.greedy;
+ (r == TK_INTERVAL ? 1 : 0));
+ CHECK_NULL_RETURN_MEMERR(qn);
+ NQTFR(qn)->greedy = tok->u.repeat.greedy;
r = set_quantifier(qn, *targetp, group, env);
- if (r < 0) return r;
-
+ if (r < 0) {
+ onig_node_free(qn);
+ return r;
+ }
+
if (tok->u.repeat.possessive != 0) {
Node* en;
- en = node_new_effect(EFFECT_STOP_BACKTRACK);
- CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
- NEFFECT(en).target = qn;
+ en = node_new_enclose(ENCLOSE_STOP_BACKTRACK);
+ if (IS_NULL(en)) {
+ onig_node_free(qn);
+ return ONIGERR_MEMORY;
+ }
+ NENCLOSE(en)->target = qn;
qn = en;
}
if (r == 0) {
*targetp = qn;
}
+ else if (r == 1) {
+ onig_node_free(qn);
+ }
else if (r == 2) { /* split case: /abc+/ */
Node *tmp;
*targetp = node_new_list(*targetp, NULL);
- CHECK_NULL_RETURN_VAL(*targetp, ONIGERR_MEMORY);
- tmp = NCONS(*targetp).right = node_new_list(qn, NULL);
- CHECK_NULL_RETURN_VAL(tmp, ONIGERR_MEMORY);
- targetp = &(NCONS(tmp).left);
+ if (IS_NULL(*targetp)) {
+ onig_node_free(qn);
+ return ONIGERR_MEMORY;
+ }
+ tmp = NCDR(*targetp) = node_new_list(qn, NULL);
+ if (IS_NULL(tmp)) {
+ onig_node_free(qn);
+ return ONIGERR_MEMORY;
+ }
+ targetp = &(NCAR(tmp));
}
goto re_entry;
}
@@ -5176,19 +5438,19 @@ parse_branch(Node** top, OnigToken* tok, int term,
}
else {
*top = node_new_list(node, NULL);
- headp = &(NCONS(*top).right);
+ headp = &(NCDR(*top));
while (r != TK_EOT && r != term && r != TK_ALT) {
r = parse_exp(&node, tok, term, src, end, env);
if (r < 0) return r;
- if (NTYPE(node) == N_LIST) {
+ if (NTYPE(node) == NT_LIST) {
*headp = node;
- while (IS_NOT_NULL(NCONS(node).right)) node = NCONS(node).right;
- headp = &(NCONS(node).right);
+ while (IS_NOT_NULL(NCDR(node))) node = NCDR(node);
+ headp = &(NCDR(node));
}
else {
*headp = node_new_list(node, NULL);
- headp = &(NCONS(*headp).right);
+ headp = &(NCDR(*headp));
}
}
}
@@ -5215,19 +5477,19 @@ parse_subexp(Node** top, OnigToken* tok, int term,
*top = node;
}
else if (r == TK_ALT) {
- *top = node_new_alt(node, NULL);
- headp = &(NCONS(*top).right);
+ *top = onig_node_new_alt(node, NULL);
+ headp = &(NCDR(*top));
while (r == TK_ALT) {
r = fetch_token(tok, src, end, env);
if (r < 0) return r;
r = parse_branch(&node, tok, term, src, end, env);
if (r < 0) return r;
- *headp = node_new_alt(node, NULL);
- headp = &(NCONS(*headp).right);
+ *headp = onig_node_new_alt(node, NULL);
+ headp = &(NCDR(*headp));
}
- if (tok->type != term)
+ if (tok->type != (enum TokenSyms )term)
goto err;
}
else {
@@ -5255,8 +5517,8 @@ parse_regexp(Node** top, UChar** src, UChar* end, ScanEnv* env)
}
extern int
-onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_t* reg,
- ScanEnv* env)
+onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end,
+ regex_t* reg, ScanEnv* env)
{
int r;
UChar* p;
@@ -5266,13 +5528,13 @@ onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_
#endif
scan_env_clear(env);
- env->option = reg->options;
- env->ambig_flag = reg->ambig_flag;
- env->enc = reg->enc;
- env->syntax = reg->syntax;
- env->pattern = (UChar* )pattern;
- env->pattern_end = (UChar* )end;
- env->reg = reg;
+ env->option = reg->options;
+ env->case_fold_flag = reg->case_fold_flag;
+ env->enc = reg->enc;
+ env->syntax = reg->syntax;
+ env->pattern = (UChar* )pattern;
+ env->pattern_end = (UChar* )end;
+ env->reg = reg;
*root = NULL;
p = (UChar* )pattern;
@@ -5282,7 +5544,7 @@ onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_
}
extern void
-onig_scan_env_set_error_string(ScanEnv* env, int ecode,
+onig_scan_env_set_error_string(ScanEnv* env, int ecode ARG_UNUSED,
UChar* arg, UChar* arg_end)
{
env->error = arg;
diff --git a/ext/mbstring/oniguruma/regparse.h b/ext/mbstring/oniguruma/regparse.h
index b25618a33..0c5c2c936 100644
--- a/ext/mbstring/oniguruma/regparse.h
+++ b/ext/mbstring/oniguruma/regparse.h
@@ -32,47 +32,61 @@
#include "regint.h"
/* node type */
-#define N_STRING (1<< 0)
-#define N_CCLASS (1<< 1)
-#define N_CTYPE (1<< 2)
-#define N_ANYCHAR (1<< 3)
-#define N_BACKREF (1<< 4)
-#define N_QUANTIFIER (1<< 5)
-#define N_EFFECT (1<< 6)
-#define N_ANCHOR (1<< 7)
-#define N_LIST (1<< 8)
-#define N_ALT (1<< 9)
-#define N_CALL (1<<10)
+#define NT_STR 0
+#define NT_CCLASS 1
+#define NT_CTYPE 2
+#define NT_CANY 3
+#define NT_BREF 4
+#define NT_QTFR 5
+#define NT_ENCLOSE 6
+#define NT_ANCHOR 7
+#define NT_LIST 8
+#define NT_ALT 9
+#define NT_CALL 10
+
+/* node type bit */
+#define NTYPE2BIT(type) (1<<(type))
+
+#define BIT_NT_STR NTYPE2BIT(NT_STR)
+#define BIT_NT_CCLASS NTYPE2BIT(NT_CCLASS)
+#define BIT_NT_CTYPE NTYPE2BIT(NT_CTYPE)
+#define BIT_NT_CANY NTYPE2BIT(NT_CANY)
+#define BIT_NT_BREF NTYPE2BIT(NT_BREF)
+#define BIT_NT_QTFR NTYPE2BIT(NT_QTFR)
+#define BIT_NT_ENCLOSE NTYPE2BIT(NT_ENCLOSE)
+#define BIT_NT_ANCHOR NTYPE2BIT(NT_ANCHOR)
+#define BIT_NT_LIST NTYPE2BIT(NT_LIST)
+#define BIT_NT_ALT NTYPE2BIT(NT_ALT)
+#define BIT_NT_CALL NTYPE2BIT(NT_CALL)
#define IS_NODE_TYPE_SIMPLE(type) \
- (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)
-
-#define NTYPE(node) ((node)->type)
-#define NCONS(node) ((node)->u.cons)
-#define NSTRING(node) ((node)->u.str)
-#define NCCLASS(node) ((node)->u.cclass)
-#define NCTYPE(node) ((node)->u.ctype)
-#define NQUANTIFIER(node) ((node)->u.quantifier)
-#define NANCHOR(node) ((node)->u.anchor)
-#define NBACKREF(node) ((node)->u.backref)
-#define NEFFECT(node) ((node)->u.effect)
-#define NCALL(node) ((node)->u.call)
-
-#define CTYPE_WORD (1<<0)
-#define CTYPE_NOT_WORD (1<<1)
-#define CTYPE_WHITE_SPACE (1<<2)
-#define CTYPE_NOT_WHITE_SPACE (1<<3)
-#define CTYPE_DIGIT (1<<4)
-#define CTYPE_NOT_DIGIT (1<<5)
-#define CTYPE_XDIGIT (1<<6)
-#define CTYPE_NOT_XDIGIT (1<<7)
+ ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
+ BIT_NT_CANY | BIT_NT_BREF)) != 0)
+
+#define NTYPE(node) ((node)->u.base.type)
+#define SET_NTYPE(node, ntype) (node)->u.base.type = (ntype)
+
+#define NSTR(node) (&((node)->u.str))
+#define NCCLASS(node) (&((node)->u.cclass))
+#define NCTYPE(node) (&((node)->u.ctype))
+#define NBREF(node) (&((node)->u.bref))
+#define NQTFR(node) (&((node)->u.qtfr))
+#define NENCLOSE(node) (&((node)->u.enclose))
+#define NANCHOR(node) (&((node)->u.anchor))
+#define NCONS(node) (&((node)->u.cons))
+#define NCALL(node) (&((node)->u.call))
+
+#define NCAR(node) (NCONS(node)->car)
+#define NCDR(node) (NCONS(node)->cdr)
+
+
#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
#define ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)
-#define EFFECT_MEMORY (1<<0)
-#define EFFECT_OPTION (1<<1)
-#define EFFECT_STOP_BACKTRACK (1<<2)
+#define ENCLOSE_MEMORY (1<<0)
+#define ENCLOSE_OPTION (1<<1)
+#define ENCLOSE_STOP_BACKTRACK (1<<2)
#define NODE_STR_MARGIN 16
#define NODE_STR_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */
@@ -80,17 +94,18 @@
#define NSTR_RAW (1<<0) /* by backslashed number */
#define NSTR_AMBIG (1<<1)
-#define NSTR_AMBIG_REDUCE (1<<2)
+#define NSTR_DONT_GET_OPT_INFO (1<<2)
#define NSTRING_LEN(node) ((node)->u.str.end - (node)->u.str.s)
#define NSTRING_SET_RAW(node) (node)->u.str.flag |= NSTR_RAW
#define NSTRING_CLEAR_RAW(node) (node)->u.str.flag &= ~NSTR_RAW
#define NSTRING_SET_AMBIG(node) (node)->u.str.flag |= NSTR_AMBIG
-#define NSTRING_SET_AMBIG_REDUCE(node) (node)->u.str.flag |= NSTR_AMBIG_REDUCE
+#define NSTRING_SET_DONT_GET_OPT_INFO(node) \
+ (node)->u.str.flag |= NSTR_DONT_GET_OPT_INFO
#define NSTRING_IS_RAW(node) (((node)->u.str.flag & NSTR_RAW) != 0)
#define NSTRING_IS_AMBIG(node) (((node)->u.str.flag & NSTR_AMBIG) != 0)
-#define NSTRING_IS_AMBIG_REDUCE(node) \
- (((node)->u.str.flag & NSTR_AMBIG_REDUCE) != 0)
+#define NSTRING_IS_DONT_GET_OPT_INFO(node) \
+ (((node)->u.str.flag & NSTR_DONT_GET_OPT_INFO) != 0)
#define BACKREFS_P(br) \
(IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
@@ -100,39 +115,6 @@
#define NQ_TARGET_IS_EMPTY_MEM 2
#define NQ_TARGET_IS_EMPTY_REC 3
-
-typedef struct {
- UChar* s;
- UChar* end;
- unsigned int flag;
- int capa; /* (allocated size - 1) or 0: use buf[] */
- UChar buf[NODE_STR_BUF_SIZE];
-} StrNode;
-
-/* move to regint.h */
-#if 0
-typedef struct {
- int flags;
- BitSet bs;
- BBuf* mbuf; /* multi-byte info or NULL */
-} CClassNode;
-#endif
-
-typedef struct {
- int state;
- struct _Node* target;
- int lower;
- int upper;
- int greedy;
- int target_empty_info;
- struct _Node* head_exact;
- struct _Node* next_head_exact;
- int is_refered; /* include called node. don't eliminate even if {0} */
-#ifdef USE_COMBINATION_EXPLOSION_CHECK
- int comb_exp_check_num; /* 1,2,3...: check, 0: no check */
-#endif
-} QuantifierNode;
-
/* status bits */
#define NST_MIN_FIXED (1<<0)
#define NST_MAX_FIXED (1<<1)
@@ -150,105 +132,142 @@ typedef struct {
#define NST_NEST_LEVEL (1<<13)
#define NST_BY_NUMBER (1<<14) /* {n,m} */
-#define SET_EFFECT_STATUS(node,f) (node)->u.effect.state |= (f)
-#define CLEAR_EFFECT_STATUS(node,f) (node)->u.effect.state &= ~(f)
-
-#define IS_EFFECT_CALLED(en) (((en)->state & NST_CALLED) != 0)
-#define IS_EFFECT_ADDR_FIXED(en) (((en)->state & NST_ADDR_FIXED) != 0)
-#define IS_EFFECT_RECURSION(en) (((en)->state & NST_RECURSION) != 0)
-#define IS_EFFECT_MARK1(en) (((en)->state & NST_MARK1) != 0)
-#define IS_EFFECT_MARK2(en) (((en)->state & NST_MARK2) != 0)
-#define IS_EFFECT_MIN_FIXED(en) (((en)->state & NST_MIN_FIXED) != 0)
-#define IS_EFFECT_MAX_FIXED(en) (((en)->state & NST_MAX_FIXED) != 0)
-#define IS_EFFECT_CLEN_FIXED(en) (((en)->state & NST_CLEN_FIXED) != 0)
-#define IS_EFFECT_STOP_BT_SIMPLE_REPEAT(en) \
+#define SET_ENCLOSE_STATUS(node,f) (node)->u.enclose.state |= (f)
+#define CLEAR_ENCLOSE_STATUS(node,f) (node)->u.enclose.state &= ~(f)
+
+#define IS_ENCLOSE_CALLED(en) (((en)->state & NST_CALLED) != 0)
+#define IS_ENCLOSE_ADDR_FIXED(en) (((en)->state & NST_ADDR_FIXED) != 0)
+#define IS_ENCLOSE_RECURSION(en) (((en)->state & NST_RECURSION) != 0)
+#define IS_ENCLOSE_MARK1(en) (((en)->state & NST_MARK1) != 0)
+#define IS_ENCLOSE_MARK2(en) (((en)->state & NST_MARK2) != 0)
+#define IS_ENCLOSE_MIN_FIXED(en) (((en)->state & NST_MIN_FIXED) != 0)
+#define IS_ENCLOSE_MAX_FIXED(en) (((en)->state & NST_MAX_FIXED) != 0)
+#define IS_ENCLOSE_CLEN_FIXED(en) (((en)->state & NST_CLEN_FIXED) != 0)
+#define IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(en) \
(((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)
-#define IS_EFFECT_NAMED_GROUP(en) (((en)->state & NST_NAMED_GROUP) != 0)
+#define IS_ENCLOSE_NAMED_GROUP(en) (((en)->state & NST_NAMED_GROUP) != 0)
#define SET_CALL_RECURSION(node) (node)->u.call.state |= NST_RECURSION
#define IS_CALL_RECURSION(cn) (((cn)->state & NST_RECURSION) != 0)
#define IS_CALL_NAME_REF(cn) (((cn)->state & NST_NAME_REF) != 0)
#define IS_BACKREF_NAME_REF(bn) (((bn)->state & NST_NAME_REF) != 0)
#define IS_BACKREF_NEST_LEVEL(bn) (((bn)->state & NST_NEST_LEVEL) != 0)
-#define IS_QUANTIFIER_IN_REPEAT(qn) (((qn)->state & NST_IN_REPEAT) != 0)
-#define IS_QUANTIFIER_BY_NUMBER(qn) (((qn)->state & NST_BY_NUMBER) != 0)
+#define IS_QUANTIFIER_IN_REPEAT(qn) (((qn)->state & NST_IN_REPEAT) != 0)
+#define IS_QUANTIFIER_BY_NUMBER(qn) (((qn)->state & NST_BY_NUMBER) != 0)
+
+#define CALLNODE_REFNUM_UNDEF -1
typedef struct {
+ NodeBase base;
+ UChar* s;
+ UChar* end;
+ unsigned int flag;
+ int capa; /* (allocated size - 1) or 0: use buf[] */
+ UChar buf[NODE_STR_BUF_SIZE];
+} StrNode;
+
+typedef struct {
+ NodeBase base;
+ int state;
+ struct _Node* target;
+ int lower;
+ int upper;
+ int greedy;
+ int target_empty_info;
+ struct _Node* head_exact;
+ struct _Node* next_head_exact;
+ int is_refered; /* include called node. don't eliminate even if {0} */
+#ifdef USE_COMBINATION_EXPLOSION_CHECK
+ int comb_exp_check_num; /* 1,2,3...: check, 0: no check */
+#endif
+} QtfrNode;
+
+typedef struct {
+ NodeBase base;
int state;
int type;
int regnum;
OnigOptionType option;
- struct _Node* target;
- AbsAddrType call_addr;
+ struct _Node* target;
+ AbsAddrType call_addr;
/* for multiple call reference */
OnigDistance min_len; /* min length (byte) */
OnigDistance max_len; /* max length (byte) */
- int char_len; /* character length */
- int opt_count; /* referenced count in optimize_node_left() */
-} EffectNode;
-
-#define CALLNODE_REFNUM_UNDEF -1
+ int char_len; /* character length */
+ int opt_count; /* referenced count in optimize_node_left() */
+} EncloseNode;
#ifdef USE_SUBEXP_CALL
typedef struct {
- int offset;
+ int offset;
struct _Node* target;
} UnsetAddr;
typedef struct {
- int num;
- int alloc;
+ int num;
+ int alloc;
UnsetAddr* us;
} UnsetAddrList;
typedef struct {
+ NodeBase base;
int state;
- int ref_num;
+ int group_num;
UChar* name;
UChar* name_end;
- struct _Node* target; /* EffectNode : EFFECT_MEMORY */
+ struct _Node* target; /* EncloseNode : ENCLOSE_MEMORY */
UnsetAddrList* unset_addr_list;
} CallNode;
#endif
typedef struct {
- int state;
- int back_num;
- int back_static[NODE_BACKREFS_SIZE];
- int* back_dynamic;
- int nest_level;
-} BackrefNode;
+ NodeBase base;
+ int state;
+ int back_num;
+ int back_static[NODE_BACKREFS_SIZE];
+ int* back_dynamic;
+ int nest_level;
+} BRefNode;
typedef struct {
+ NodeBase base;
int type;
struct _Node* target;
int char_len;
} AnchorNode;
+typedef struct {
+ NodeBase base;
+ struct _Node* car;
+ struct _Node* cdr;
+} ConsAltNode;
+
+typedef struct {
+ NodeBase base;
+ int ctype;
+ int not;
+} CtypeNode;
+
typedef struct _Node {
- int type;
union {
- StrNode str;
- CClassNode cclass;
- QuantifierNode quantifier;
- EffectNode effect;
+ NodeBase base;
+ StrNode str;
+ CClassNode cclass;
+ QtfrNode qtfr;
+ EncloseNode enclose;
+ BRefNode bref;
+ AnchorNode anchor;
+ ConsAltNode cons;
+ CtypeNode ctype;
#ifdef USE_SUBEXP_CALL
- CallNode call;
+ CallNode call;
#endif
- BackrefNode backref;
- AnchorNode anchor;
- struct {
- struct _Node* left;
- struct _Node* right;
- } cons;
- struct {
- int type;
- } ctype;
} u;
} Node;
+
#define NULL_NODE ((Node* )0)
#define SCANENV_MEMNODES_SIZE 8
@@ -257,30 +276,30 @@ typedef struct _Node {
(senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)
typedef struct {
- OnigOptionType option;
- OnigAmbigType ambig_flag;
- OnigEncoding enc;
- OnigSyntaxType* syntax;
- BitStatusType capture_history;
- BitStatusType bt_mem_start;
- BitStatusType bt_mem_end;
- BitStatusType backrefed_mem;
- UChar* pattern;
- UChar* pattern_end;
- UChar* error;
- UChar* error_end;
- regex_t* reg; /* for reg->names only */
- int num_call;
+ OnigOptionType option;
+ OnigCaseFoldType case_fold_flag;
+ OnigEncoding enc;
+ OnigSyntaxType* syntax;
+ BitStatusType capture_history;
+ BitStatusType bt_mem_start;
+ BitStatusType bt_mem_end;
+ BitStatusType backrefed_mem;
+ UChar* pattern;
+ UChar* pattern_end;
+ UChar* error;
+ UChar* error_end;
+ regex_t* reg; /* for reg->names only */
+ int num_call;
#ifdef USE_SUBEXP_CALL
- UnsetAddrList* unset_addr_list;
+ UnsetAddrList* unset_addr_list;
#endif
- int num_mem;
+ int num_mem;
#ifdef USE_NAMED_GROUP
- int num_named;
+ int num_named;
#endif
- int mem_alloc;
- Node* mem_nodes_static[SCANENV_MEMNODES_SIZE];
- Node** mem_nodes_dynamic;
+ int mem_alloc;
+ Node* mem_nodes_static[SCANENV_MEMNODES_SIZE];
+ Node** mem_nodes_dynamic;
#ifdef USE_COMBINATION_EXPLOSION_CHECK
int num_comb_exp_check;
int comb_exp_max_regnum;
@@ -294,7 +313,6 @@ typedef struct {
#define IS_SYNTAX_OP2(syn, opm) (((syn)->op2 & (opm)) != 0)
#define IS_SYNTAX_BV(syn, bvm) (((syn)->behavior & (bvm)) != 0)
-
#ifdef USE_NAMED_GROUP
typedef struct {
int new_val;
@@ -304,20 +322,25 @@ extern int onig_renumber_name_table P_((regex_t* reg, GroupNumRemap* map));
#endif
extern int onig_strncmp P_((const UChar* s1, const UChar* s2, int n));
+extern void onig_strcpy P_((UChar* dest, const UChar* src, const UChar* end));
extern void onig_scan_env_set_error_string P_((ScanEnv* env, int ecode, UChar* arg, UChar* arg_end));
extern int onig_scan_unsigned_number P_((UChar** src, const UChar* end, OnigEncoding enc));
extern void onig_reduce_nested_quantifier P_((Node* pnode, Node* cnode));
extern void onig_node_conv_to_str_node P_((Node* node, int raw));
extern int onig_node_str_cat P_((Node* node, const UChar* s, const UChar* end));
+extern int onig_node_str_set P_((Node* node, const UChar* s, const UChar* end));
extern void onig_node_free P_((Node* node));
-extern Node* onig_node_new_effect P_((int type));
+extern Node* onig_node_new_enclose P_((int type));
extern Node* onig_node_new_anchor P_((int type));
extern Node* onig_node_new_str P_((const UChar* s, const UChar* end));
extern Node* onig_node_new_list P_((Node* left, Node* right));
+extern Node* onig_node_list_add P_((Node* list, Node* x));
+extern Node* onig_node_new_alt P_((Node* left, Node* right));
extern void onig_node_str_clear P_((Node* node));
extern int onig_free_node_list P_((void));
extern int onig_names_free P_((regex_t* reg));
extern int onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env));
+extern int onig_free_shared_cclass_table P_((void));
#ifdef ONIG_DEBUG
#ifdef USE_NAMED_GROUP
diff --git a/ext/mbstring/oniguruma/regposerr.c b/ext/mbstring/oniguruma/regposerr.c
index e54b5c408..56f75abfc 100644
--- a/ext/mbstring/oniguruma/regposerr.c
+++ b/ext/mbstring/oniguruma/regposerr.c
@@ -2,7 +2,7 @@
regposerr.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,12 @@
# include <strings.h>
#endif
+#if defined(__GNUC__)
+# define ARG_UNUSED __attribute__ ((unused))
+#else
+# define ARG_UNUSED
+#endif
+
static char* ESTRING[] = {
NULL,
"failed to match", /* REG_NOMATCH */
@@ -63,13 +69,15 @@ static char* ESTRING[] = {
extern size_t
-regerror(int posix_ecode, const regex_t* reg, char* buf, size_t size)
+regerror(int posix_ecode, const regex_t* reg ARG_UNUSED, char* buf,
+ size_t size)
{
char* s;
char tbuf[35];
size_t len;
- if (posix_ecode > 0 && posix_ecode < sizeof(ESTRING) / sizeof(ESTRING[0])) {
+ if (posix_ecode > 0
+ && posix_ecode < (int )(sizeof(ESTRING) / sizeof(ESTRING[0]))) {
s = ESTRING[posix_ecode];
}
else if (posix_ecode == 0) {
diff --git a/ext/mbstring/oniguruma/regposix.c b/ext/mbstring/oniguruma/regposix.c
index a3bacf722..7d1857cf2 100644
--- a/ext/mbstring/oniguruma/regposix.c
+++ b/ext/mbstring/oniguruma/regposix.c
@@ -2,7 +2,7 @@
regposix.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -102,7 +102,7 @@ onig2posix_error_code(int code)
{ ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED, REG_BADPAT },
{ ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, REG_EONIG_BADWC },
{ ONIGERR_TOO_LONG_WIDE_CHAR_VALUE, REG_EONIG_BADWC },
- { ONIGERR_INVALID_WIDE_CHAR_VALUE, REG_EONIG_BADWC },
+ { ONIGERR_INVALID_CODE_POINT_VALUE, REG_EONIG_BADWC },
{ ONIGERR_EMPTY_GROUP_NAME, REG_BADPAT },
{ ONIGERR_INVALID_GROUP_NAME, REG_BADPAT },
{ ONIGERR_INVALID_CHAR_IN_GROUP_NAME, REG_BADPAT },
@@ -122,7 +122,7 @@ onig2posix_error_code(int code)
if (code >= 0) return 0;
- for (i = 0; i < sizeof(o2p) / sizeof(o2p[0]); i++) {
+ for (i = 0; i < (int )(sizeof(o2p) / sizeof(o2p[0])); i++) {
if (code == o2p[i].onig_err)
return o2p[i].posix_err;
}
@@ -273,9 +273,9 @@ typedef struct {
void* arg;
} i_wrap;
-static int i_wrapper(const unsigned char* name, const unsigned char* name_end,
- int ng, int* gs,
- onig_regex_t* reg, void* arg)
+static int
+i_wrapper(const UChar* name, const UChar* name_end, int ng, int* gs,
+ onig_regex_t* reg ARG_UNUSED, void* arg)
{
i_wrap* warg = (i_wrap* )arg;
diff --git a/ext/mbstring/oniguruma/regsyntax.c b/ext/mbstring/oniguruma/regsyntax.c
index 9114e39e6..ade5b55f7 100644
--- a/ext/mbstring/oniguruma/regsyntax.c
+++ b/ext/mbstring/oniguruma/regsyntax.c
@@ -34,6 +34,15 @@ OnigSyntaxType OnigSyntaxASIS = {
, ONIG_SYN_OP2_INEFFECTIVE_ESCAPE
, 0
, ONIG_OPTION_NONE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxPosixBasic = {
@@ -42,6 +51,15 @@ OnigSyntaxType OnigSyntaxPosixBasic = {
, 0
, 0
, ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxPosixExtended = {
@@ -54,6 +72,15 @@ OnigSyntaxType OnigSyntaxPosixExtended = {
ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP |
ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
, ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxEmacs = {
@@ -66,6 +93,15 @@ OnigSyntaxType OnigSyntaxEmacs = {
, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR
, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC
, ONIG_OPTION_NONE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxGrep = {
@@ -79,6 +115,15 @@ OnigSyntaxType OnigSyntaxGrep = {
, 0
, ( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC | ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC )
, ONIG_OPTION_NONE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxGnuRegex = {
@@ -86,6 +131,15 @@ OnigSyntaxType OnigSyntaxGnuRegex = {
, 0
, SYN_GNU_REGEX_BV
, ONIG_OPTION_NONE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxJava = {
@@ -100,6 +154,15 @@ OnigSyntaxType OnigSyntaxJava = {
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY )
, ( SYN_GNU_REGEX_BV | ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND )
, ONIG_OPTION_SINGLELINE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
OnigSyntaxType OnigSyntaxPerl = {
@@ -111,10 +174,18 @@ OnigSyntaxType OnigSyntaxPerl = {
, ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE |
ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
- ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
- ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS )
+ ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT )
, SYN_GNU_REGEX_BV
, ONIG_OPTION_SINGLELINE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
/* Perl + named group */
@@ -128,7 +199,6 @@ OnigSyntaxType OnigSyntaxPerl_NG = {
ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
- ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS |
ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP |
ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
ONIG_SYN_OP2_ESC_G_SUBEXP_CALL )
@@ -136,6 +206,15 @@ OnigSyntaxType OnigSyntaxPerl_NG = {
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |
ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME )
, ONIG_OPTION_SINGLELINE
+ ,
+ {
+ (OnigCodePoint )'\\' /* esc */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
+ , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
+ }
};
@@ -205,7 +284,7 @@ onig_get_syntax_options(OnigSyntaxType* syntax)
}
#ifdef USE_VARIABLE_META_CHARS
-extern int onig_set_meta_char(OnigEncoding enc,
+extern int onig_set_meta_char(OnigSyntaxType* enc,
unsigned int what, OnigCodePoint code)
{
switch (what) {
diff --git a/ext/mbstring/oniguruma/regversion.c b/ext/mbstring/oniguruma/regversion.c
index 5fad0cc18..113fbaedc 100644
--- a/ext/mbstring/oniguruma/regversion.c
+++ b/ext/mbstring/oniguruma/regversion.c
@@ -2,7 +2,7 @@
regversion.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,6 +27,7 @@
* SUCH DAMAGE.
*/
+#include "config.h"
#include "oniguruma.h"
#include <stdio.h>
@@ -47,7 +48,7 @@ onig_copyright(void)
{
static char s[58];
- sprintf(s, "Oniguruma %d.%d.%d : Copyright (C) 2002-2006 K.Kosako",
+ sprintf(s, "Oniguruma %d.%d.%d : Copyright (C) 2002-2008 K.Kosako",
ONIGURUMA_VERSION_MAJOR,
ONIGURUMA_VERSION_MINOR,
ONIGURUMA_VERSION_TEENY);
diff --git a/ext/mbstring/oniguruma/st.c b/ext/mbstring/oniguruma/st.c
index 2324da263..022880ae3 100644
--- a/ext/mbstring/oniguruma/st.c
+++ b/ext/mbstring/oniguruma/st.c
@@ -2,7 +2,6 @@
/* static char sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; */
-#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -11,22 +10,7 @@
#include <malloc.h>
#endif
-#ifdef NOT_RUBY
#include "regint.h"
-#else
-#ifdef RUBY_PLATFORM
-#define xmalloc ruby_xmalloc
-#define xcalloc ruby_xcalloc
-#define xrealloc ruby_xrealloc
-#define xfree ruby_xfree
-
-void *xmalloc(long);
-void *xcalloc(long, long);
-void *xrealloc(void *, long);
-void xfree(void *);
-#endif
-#endif
-
#include "st.h"
typedef struct st_table_entry st_table_entry;
@@ -467,8 +451,13 @@ st_delete_safe(table, key, value, never)
}
static int
+#if defined(__GNUC__)
+delete_never(st_data_t key __attribute__ ((unused)), st_data_t value,
+ st_data_t never)
+#else
delete_never(key, value, never)
st_data_t key, value, never;
+#endif
{
if (value == never) return ST_DELETE;
return ST_CONTINUE;
diff --git a/ext/mbstring/oniguruma/testc.c b/ext/mbstring/oniguruma/testc.c
new file mode 100644
index 000000000..6a8c77896
--- /dev/null
+++ b/ext/mbstring/oniguruma/testc.c
@@ -0,0 +1,863 @@
+/*
+ * This program was generated by testconv.rb.
+ */
+#include "config.h"
+#ifdef ONIG_ESCAPE_UCHAR_COLLISION
+#undef ONIG_ESCAPE_UCHAR_COLLISION
+#endif
+#include <stdio.h>
+
+#ifdef POSIX_TEST
+#include "onigposix.h"
+#else
+#include "oniguruma.h"
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#define SLEN(s) strlen(s)
+
+static int nsucc = 0;
+static int nfail = 0;
+static int nerror = 0;
+
+static FILE* err_file;
+
+#ifndef POSIX_TEST
+static OnigRegion* region;
+#endif
+
+static void xx(char* pattern, char* str, int from, int to, int mem, int not)
+{
+ int r;
+
+#ifdef POSIX_TEST
+ regex_t reg;
+ char buf[200];
+ regmatch_t pmatch[25];
+
+ r = regcomp(&reg, pattern, REG_EXTENDED | REG_NEWLINE);
+ if (r) {
+ regerror(r, &reg, buf, sizeof(buf));
+ fprintf(err_file, "ERROR: %s\n", buf);
+ nerror++;
+ return ;
+ }
+
+ r = regexec(&reg, str, reg.re_nsub + 1, pmatch, 0);
+ if (r != 0 && r != REG_NOMATCH) {
+ regerror(r, &reg, buf, sizeof(buf));
+ fprintf(err_file, "ERROR: %s\n", buf);
+ nerror++;
+ return ;
+ }
+
+ if (r == REG_NOMATCH) {
+ if (not) {
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ }
+ else {
+ if (not) {
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ else {
+ if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) {
+ fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
+ from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo);
+ nfail++;
+ }
+ }
+ }
+ regfree(&reg);
+
+#else
+ regex_t* reg;
+ OnigErrorInfo einfo;
+
+ r = onig_new(&reg, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)),
+ ONIG_OPTION_DEFAULT, ONIG_ENCODING_EUC_JP, ONIG_SYNTAX_DEFAULT, &einfo);
+ if (r) {
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+ onig_error_code_to_str((UChar* )s, r, &einfo);
+ fprintf(err_file, "ERROR: %s\n", s);
+ nerror++;
+ return ;
+ }
+
+ r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)),
+ (UChar* )str, (UChar* )(str + SLEN(str)),
+ region, ONIG_OPTION_NONE);
+ if (r < ONIG_MISMATCH) {
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+ onig_error_code_to_str((UChar* )s, r);
+ fprintf(err_file, "ERROR: %s\n", s);
+ nerror++;
+ return ;
+ }
+
+ if (r == ONIG_MISMATCH) {
+ if (not) {
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ }
+ else {
+ if (not) {
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ else {
+ if (region->beg[mem] == from && region->end[mem] == to) {
+ fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
+ from, to, region->beg[mem], region->end[mem]);
+ nfail++;
+ }
+ }
+ }
+ onig_free(reg);
+#endif
+}
+
+static void x2(char* pattern, char* str, int from, int to)
+{
+ xx(pattern, str, from, to, 0, 0);
+}
+
+static void x3(char* pattern, char* str, int from, int to, int mem)
+{
+ xx(pattern, str, from, to, mem, 0);
+}
+
+static void n(char* pattern, char* str)
+{
+ xx(pattern, str, 0, 0, 0, 1);
+}
+
+extern int main(int argc, char* argv[])
+{
+ err_file = stdout;
+
+#ifdef POSIX_TEST
+ reg_set_encoding(REG_POSIX_ENCODING_EUC_JP);
+#else
+ region = onig_region_new();
+#endif
+
+ x2("", "", 0, 0);
+ x2("^", "", 0, 0);
+ x2("$", "", 0, 0);
+ x2("\\G", "", 0, 0);
+ x2("\\A", "", 0, 0);
+ x2("\\Z", "", 0, 0);
+ x2("\\z", "", 0, 0);
+ x2("^$", "", 0, 0);
+ x2("\\ca", "\001", 0, 1);
+ x2("\\C-b", "\002", 0, 1);
+ x2("\\c\\\\", "\034", 0, 1);
+ x2("q[\\c\\\\]", "q\034", 0, 2);
+ x2("", "a", 0, 0);
+ x2("a", "a", 0, 1);
+ x2("\\x61", "a", 0, 1);
+ x2("aa", "aa", 0, 2);
+ x2("aaa", "aaa", 0, 3);
+ x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35);
+ x2("ab", "ab", 0, 2);
+ x2("b", "ab", 1, 2);
+ x2("bc", "abc", 1, 3);
+ x2("(?i:#RET#)", "#INS##RET#", 5, 10);
+ x2("\\17", "\017", 0, 1);
+ x2("\\x1f", "\x1f", 0, 1);
+ x2("a(?#....\\\\JJJJ)b", "ab", 0, 2);
+ x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7);
+ x2(".", "a", 0, 1);
+ n(".", "");
+ x2("..", "ab", 0, 2);
+ x2("\\w", "e", 0, 1);
+ n("\\W", "e");
+ x2("\\s", " ", 0, 1);
+ x2("\\S", "b", 0, 1);
+ x2("\\d", "4", 0, 1);
+ n("\\D", "4");
+ x2("\\b", "z ", 0, 0);
+ x2("\\b", " z", 1, 1);
+ x2("\\B", "zz ", 1, 1);
+ x2("\\B", "z ", 2, 2);
+ x2("\\B", " z", 0, 0);
+ x2("[ab]", "b", 0, 1);
+ n("[ab]", "c");
+ x2("[a-z]", "t", 0, 1);
+ n("[^a]", "a");
+ x2("[^a]", "\n", 0, 1);
+ x2("[]]", "]", 0, 1);
+ n("[^]]", "]");
+ x2("[\\^]+", "0^^1", 1, 3);
+ x2("[b-]", "b", 0, 1);
+ x2("[b-]", "-", 0, 1);
+ x2("[\\w]", "z", 0, 1);
+ n("[\\w]", " ");
+ x2("[\\W]", "b$", 1, 2);
+ x2("[\\d]", "5", 0, 1);
+ n("[\\d]", "e");
+ x2("[\\D]", "t", 0, 1);
+ n("[\\D]", "3");
+ x2("[\\s]", " ", 0, 1);
+ n("[\\s]", "a");
+ x2("[\\S]", "b", 0, 1);
+ n("[\\S]", " ");
+ x2("[\\w\\d]", "2", 0, 1);
+ n("[\\w\\d]", " ");
+ x2("[[:upper:]]", "B", 0, 1);
+ x2("[*[:xdigit:]+]", "+", 0, 1);
+ x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7);
+ x2("[*[:xdigit:]+]", "-@^+", 3, 4);
+ n("[[:upper]]", "A");
+ x2("[[:upper]]", ":", 0, 1);
+ x2("[\\044-\\047]", "\046", 0, 1);
+ x2("[\\x5a-\\x5c]", "\x5b", 0, 1);
+ x2("[\\x6A-\\x6D]", "\x6c", 0, 1);
+ n("[\\x6A-\\x6D]", "\x6E");
+ n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply");
+ x2("[\\[]", "[", 0, 1);
+ x2("[\\]]", "]", 0, 1);
+ x2("[&]", "&", 0, 1);
+ x2("[[ab]]", "b", 0, 1);
+ x2("[[ab]c]", "c", 0, 1);
+ n("[[^a]]", "a");
+ n("[^[a]]", "a");
+ x2("[[ab]&&bc]", "b", 0, 1);
+ n("[[ab]&&bc]", "a");
+ n("[[ab]&&bc]", "c");
+ x2("[a-z&&b-y&&c-x]", "w", 0, 1);
+ n("[^a-z&&b-y&&c-x]", "w");
+ x2("[[^a&&a]&&a-z]", "b", 0, 1);
+ n("[[^a&&a]&&a-z]", "a");
+ x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1);
+ n("[[^a-z&&bcdef]&&[^c-g]]", "c");
+ x2("[^[^abc]&&[^cde]]", "c", 0, 1);
+ x2("[^[^abc]&&[^cde]]", "e", 0, 1);
+ n("[^[^abc]&&[^cde]]", "f");
+ x2("[a-&&-a]", "-", 0, 1);
+ n("[a\\-&&\\-a]", "&");
+ n("\\wabc", " abc");
+ x2("a\\Wbc", "a bc", 0, 4);
+ x2("a.b.c", "aabbc", 0, 5);
+ x2(".\\wb\\W..c", "abb bcc", 0, 7);
+ x2("\\s\\wzzz", " zzzz", 0, 5);
+ x2("aa.b", "aabb", 0, 4);
+ n(".a", "ab");
+ x2(".a", "aa", 0, 2);
+ x2("^a", "a", 0, 1);
+ x2("^a$", "a", 0, 1);
+ x2("^\\w$", "a", 0, 1);
+ n("^\\w$", " ");
+ x2("^\\wab$", "zab", 0, 3);
+ x2("^\\wabcdef$", "zabcdef", 0, 7);
+ x2("^\\w...def$", "zabcdef", 0, 7);
+ x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8);
+ x2("\\A\\Z", "", 0, 0);
+ x2("\\Axyz", "xyz", 0, 3);
+ x2("xyz\\Z", "xyz", 0, 3);
+ x2("xyz\\z", "xyz", 0, 3);
+ x2("a\\Z", "a", 0, 1);
+ x2("\\Gaz", "az", 0, 2);
+ n("\\Gz", "bza");
+ n("az\\G", "az");
+ n("az\\A", "az");
+ n("a\\Az", "az");
+ x2("\\^\\$", "^$", 0, 2);
+ x2("^x?y", "xy", 0, 2);
+ x2("^(x?y)", "xy", 0, 2);
+ x2("\\w", "_", 0, 1);
+ n("\\W", "_");
+ x2("(?=z)z", "z", 0, 1);
+ n("(?=z).", "a");
+ x2("(?!z)a", "a", 0, 1);
+ n("(?!z)a", "z");
+ x2("(?i:a)", "a", 0, 1);
+ x2("(?i:a)", "A", 0, 1);
+ x2("(?i:A)", "a", 0, 1);
+ n("(?i:A)", "b");
+ x2("(?i:[A-Z])", "a", 0, 1);
+ x2("(?i:[f-m])", "H", 0, 1);
+ x2("(?i:[f-m])", "h", 0, 1);
+ n("(?i:[f-m])", "e");
+ x2("(?i:[A-c])", "D", 0, 1);
+ n("(?i:[^a-z])", "A");
+ n("(?i:[^a-z])", "a");
+ x2("(?i:[!-k])", "Z", 0, 1);
+ x2("(?i:[!-k])", "7", 0, 1);
+ x2("(?i:[T-}])", "b", 0, 1);
+ x2("(?i:[T-}])", "{", 0, 1);
+ x2("(?i:\\?a)", "?A", 0, 2);
+ x2("(?i:\\*A)", "*a", 0, 2);
+ n(".", "\n");
+ x2("(?m:.)", "\n", 0, 1);
+ x2("(?m:a.)", "a\n", 0, 2);
+ x2("(?m:.b)", "a\nb", 1, 3);
+ x2(".*abc", "dddabdd\nddabc", 8, 13);
+ x2("(?m:.*abc)", "dddabddabc", 0, 10);
+ n("(?i)(?-i)a", "A");
+ n("(?i)(?-i:a)", "A");
+ x2("a?", "", 0, 0);
+ x2("a?", "b", 0, 0);
+ x2("a?", "a", 0, 1);
+ x2("a*", "", 0, 0);
+ x2("a*", "a", 0, 1);
+ x2("a*", "aaa", 0, 3);
+ x2("a*", "baaaa", 0, 0);
+ n("a+", "");
+ x2("a+", "a", 0, 1);
+ x2("a+", "aaaa", 0, 4);
+ x2("a+", "aabbb", 0, 2);
+ x2("a+", "baaaa", 1, 5);
+ x2(".?", "", 0, 0);
+ x2(".?", "f", 0, 1);
+ x2(".?", "\n", 0, 0);
+ x2(".*", "", 0, 0);
+ x2(".*", "abcde", 0, 5);
+ x2(".+", "z", 0, 1);
+ x2(".+", "zdswer\n", 0, 6);
+ x2("(.*)a\\1f", "babfbac", 0, 4);
+ x2("(.*)a\\1f", "bacbabf", 3, 7);
+ x2("((.*)a\\2f)", "bacbabf", 3, 7);
+ x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23);
+ x2("a|b", "a", 0, 1);
+ x2("a|b", "b", 0, 1);
+ x2("|a", "a", 0, 0);
+ x2("(|a)", "a", 0, 0);
+ x2("ab|bc", "ab", 0, 2);
+ x2("ab|bc", "bc", 0, 2);
+ x2("z(?:ab|bc)", "zbc", 0, 3);
+ x2("a(?:ab|bc)c", "aabc", 0, 4);
+ x2("ab|(?:ac|az)", "az", 0, 2);
+ x2("a|b|c", "dc", 1, 2);
+ x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2);
+ n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn");
+ x2("a|^z", "ba", 1, 2);
+ x2("a|^z", "za", 0, 1);
+ x2("a|\\Gz", "bza", 2, 3);
+ x2("a|\\Gz", "za", 0, 1);
+ x2("a|\\Az", "bza", 2, 3);
+ x2("a|\\Az", "za", 0, 1);
+ x2("a|b\\Z", "ba", 1, 2);
+ x2("a|b\\Z", "b", 0, 1);
+ x2("a|b\\z", "ba", 1, 2);
+ x2("a|b\\z", "b", 0, 1);
+ x2("\\w|\\s", " ", 0, 1);
+ n("\\w|\\w", " ");
+ x2("\\w|%", "%", 0, 1);
+ x2("\\w|[&$]", "&", 0, 1);
+ x2("[b-d]|[^e-z]", "a", 0, 1);
+ x2("(?:a|[c-f])|bz", "dz", 0, 1);
+ x2("(?:a|[c-f])|bz", "bz", 0, 2);
+ x2("abc|(?=zz)..f", "zzf", 0, 3);
+ x2("abc|(?!zz)..f", "abf", 0, 3);
+ x2("(?=za)..a|(?=zz)..a", "zza", 0, 3);
+ n("(?>a|abd)c", "abdc");
+ x2("(?>abd|a)c", "abdc", 0, 4);
+ x2("a?|b", "a", 0, 1);
+ x2("a?|b", "b", 0, 0);
+ x2("a?|b", "", 0, 0);
+ x2("a*|b", "aa", 0, 2);
+ x2("a*|b*", "ba", 0, 0);
+ x2("a*|b*", "ab", 0, 1);
+ x2("a+|b*", "", 0, 0);
+ x2("a+|b*", "bbb", 0, 3);
+ x2("a+|b*", "abbb", 0, 1);
+ n("a+|b+", "");
+ x2("(a|b)?", "b", 0, 1);
+ x2("(a|b)*", "ba", 0, 2);
+ x2("(a|b)+", "bab", 0, 3);
+ x2("(ab|ca)+", "caabbc", 0, 4);
+ x2("(ab|ca)+", "aabca", 1, 5);
+ x2("(ab|ca)+", "abzca", 0, 2);
+ x2("(a|bab)+", "ababa", 0, 5);
+ x2("(a|bab)+", "ba", 1, 2);
+ x2("(a|bab)+", "baaaba", 1, 4);
+ x2("(?:a|b)(?:a|b)", "ab", 0, 2);
+ x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3);
+ x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6);
+ x2("(?:a+|b+){2}", "aaabbb", 0, 6);
+ x2("h{0,}", "hhhh", 0, 4);
+ x2("(?:a+|b+){1,2}", "aaabbb", 0, 6);
+ n("ax{2}*a", "0axxxa1");
+ n("a.{0,2}a", "0aXXXa0");
+ n("a.{0,2}?a", "0aXXXa0");
+ n("a.{0,2}?a", "0aXXXXa0");
+ x2("^a{2,}?a$", "aaa", 0, 3);
+ x2("^[a-z]{2,}?$", "aaa", 0, 3);
+ x2("(?:a+|\\Ab*)cc", "cc", 0, 2);
+ n("(?:a+|\\Ab*)cc", "abcc");
+ x2("(?:^a+|b+)*c", "aabbbabc", 6, 8);
+ x2("(?:^a+|b+)*c", "aabbbbc", 0, 7);
+ x2("a|(?i)c", "C", 0, 1);
+ x2("(?i)c|a", "C", 0, 1);
+ x2("(?i)c|a", "A", 0, 1);
+ x2("(?i:c)|a", "C", 0, 1);
+ n("(?i:c)|a", "A");
+ x2("[abc]?", "abc", 0, 1);
+ x2("[abc]*", "abc", 0, 3);
+ x2("[^abc]*", "abc", 0, 0);
+ n("[^abc]+", "abc");
+ x2("a?\?", "aaa", 0, 0);
+ x2("ba?\?b", "bab", 0, 3);
+ x2("a*?", "aaa", 0, 0);
+ x2("ba*?", "baa", 0, 1);
+ x2("ba*?b", "baab", 0, 4);
+ x2("a+?", "aaa", 0, 1);
+ x2("ba+?", "baa", 0, 2);
+ x2("ba+?b", "baab", 0, 4);
+ x2("(?:a?)?\?", "a", 0, 0);
+ x2("(?:a?\?)?", "a", 0, 0);
+ x2("(?:a?)+?", "aaa", 0, 1);
+ x2("(?:a+)?\?", "aaa", 0, 0);
+ x2("(?:a+)?\?b", "aaab", 0, 4);
+ x2("(?:ab)?{2}", "", 0, 0);
+ x2("(?:ab)?{2}", "ababa", 0, 4);
+ x2("(?:ab)*{0}", "ababa", 0, 0);
+ x2("(?:ab){3,}", "abababab", 0, 8);
+ n("(?:ab){3,}", "abab");
+ x2("(?:ab){2,4}", "ababab", 0, 6);
+ x2("(?:ab){2,4}", "ababababab", 0, 8);
+ x2("(?:ab){2,4}?", "ababababab", 0, 4);
+ x2("(?:ab){,}", "ab{,}", 0, 5);
+ x2("(?:abc)+?{2}", "abcabcabc", 0, 6);
+ x2("(?:X*)(?i:xa)", "XXXa", 0, 4);
+ x2("(d+)([^abc]z)", "dddz", 0, 4);
+ x2("([^abc]*)([^abc]z)", "dddz", 0, 4);
+ x2("(\\w+)(\\wz)", "dddz", 0, 4);
+ x3("(a)", "a", 0, 1, 1);
+ x3("(ab)", "ab", 0, 2, 1);
+ x2("((ab))", "ab", 0, 2);
+ x3("((ab))", "ab", 0, 2, 1);
+ x3("((ab))", "ab", 0, 2, 2);
+ x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20);
+ x3("(ab)(cd)", "abcd", 0, 2, 1);
+ x3("(ab)(cd)", "abcd", 2, 4, 2);
+ x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3);
+ x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4);
+ x2("(^a)", "a", 0, 1);
+ x3("(a)|(a)", "ba", 1, 2, 1);
+ x3("(^a)|(a)", "ba", 1, 2, 2);
+ x3("(a?)", "aaa", 0, 1, 1);
+ x3("(a*)", "aaa", 0, 3, 1);
+ x3("(a*)", "", 0, 0, 1);
+ x3("(a+)", "aaaaaaa", 0, 7, 1);
+ x3("(a+|b*)", "bbbaa", 0, 3, 1);
+ x3("(a+|b?)", "bbbaa", 0, 1, 1);
+ x3("(abc)?", "abc", 0, 3, 1);
+ x3("(abc)*", "abc", 0, 3, 1);
+ x3("(abc)+", "abc", 0, 3, 1);
+ x3("(xyz|abc)+", "abc", 0, 3, 1);
+ x3("([xyz][abc]|abc)+", "abc", 0, 3, 1);
+ x3("((?i:abc))", "AbC", 0, 3, 1);
+ x2("(abc)(?i:\\1)", "abcABC", 0, 6);
+ x3("((?m:a.c))", "a\nc", 0, 3, 1);
+ x3("((?=az)a)", "azb", 0, 1, 1);
+ x3("abc|(.abd)", "zabd", 0, 4, 1);
+ x2("(?:abc)|(ABC)", "abc", 0, 3);
+ x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1);
+ x3("a*(.)", "aaaaz", 4, 5, 1);
+ x3("a*?(.)", "aaaaz", 0, 1, 1);
+ x3("a*?(c)", "aaaac", 4, 5, 1);
+ x3("[bcd]a*(.)", "caaaaz", 5, 6, 1);
+ x3("(\\Abb)cc", "bbcc", 0, 2, 1);
+ n("(\\Abb)cc", "zbbcc");
+ x3("(^bb)cc", "bbcc", 0, 2, 1);
+ n("(^bb)cc", "zbbcc");
+ x3("cc(bb$)", "ccbb", 2, 4, 1);
+ n("cc(bb$)", "ccbbb");
+ n("(\\1)", "");
+ n("\\1(a)", "aa");
+ n("(a(b)\\1)\\2+", "ababb");
+ n("(?:(?:\\1|z)(a))+$", "zaa");
+ x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4);
+ x2("(a)(?=\\1)", "aa", 0, 1);
+ n("(a)$|\\1", "az");
+ x2("(a)\\1", "aa", 0, 2);
+ n("(a)\\1", "ab");
+ x2("(a?)\\1", "aa", 0, 2);
+ x2("(a?\?)\\1", "aa", 0, 0);
+ x2("(a*)\\1", "aaaaa", 0, 4);
+ x3("(a*)\\1", "aaaaa", 0, 2, 1);
+ x2("a(b*)\\1", "abbbb", 0, 5);
+ x2("a(b*)\\1", "ab", 0, 1);
+ x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10);
+ x2("(a*)(b*)\\2", "aaabbbb", 0, 7);
+ x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8);
+ x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7);
+ x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6);
+ x2("([a-d])\\1", "cc", 0, 2);
+ x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6);
+ n("(\\w\\d\\s)\\1", "f5 f5");
+ x2("(who|[a-c]{3})\\1", "whowho", 0, 6);
+ x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9);
+ x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6);
+ x2("(^a)\\1", "aa", 0, 2);
+ n("(^a)\\1", "baa");
+ n("(a$)\\1", "aa");
+ n("(ab\\Z)\\1", "ab");
+ x2("(a*\\Z)\\1", "a", 1, 1);
+ x2(".(a*\\Z)\\1", "ba", 1, 2);
+ x3("(.(abc)\\2)", "zabcabc", 0, 7, 1);
+ x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1);
+ x2("((?i:az))\\1", "AzAz", 0, 4);
+ n("((?i:az))\\1", "Azaz");
+ x2("(?<=a)b", "ab", 1, 2);
+ n("(?<=a)b", "bb");
+ x2("(?<=a|b)b", "bb", 1, 2);
+ x2("(?<=a|bc)b", "bcb", 2, 3);
+ x2("(?<=a|bc)b", "ab", 1, 2);
+ x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2);
+ x2("(a)\\g<1>", "aa", 0, 2);
+ x2("(?<!a)b", "cb", 1, 2);
+ n("(?<!a)b", "ab");
+ x2("(?<!a|bc)b", "bbb", 0, 1);
+ n("(?<!a|bc)z", "bcz");
+ x2("(?<name1>a)", "a", 0, 1);
+ x2("(?<name_2>ab)\\g<name_2>", "abab", 0, 4);
+ x2("(?<name_3>.zv.)\\k<name_3>", "azvbazvb", 0, 8);
+ x2("(?<=\\g<ab>)|-\\zEND (?<ab>XyZ)", "XyZ", 3, 3);
+ x2("(?<n>|a\\g<n>)+", "", 0, 0);
+ x2("(?<n>|\\(\\g<n>\\))+$", "()(())", 0, 6);
+ x3("\\g<n>(?<n>.){0}", "X", 0, 1, 1);
+ x2("\\g<n>(abc|df(?<n>.YZ){2,8}){0}", "XYZ", 0, 3);
+ x2("\\A(?<n>(a\\g<n>)|)\\z", "aaaa", 0, 4);
+ x2("(?<n>|\\g<m>\\g<n>)\\z|\\zEND (?<m>a|(b)\\g<m>)", "bbbbabba", 0, 8);
+ x2("(?<name1240>\\w+\\sx)a+\\k<name1240>", " fg xaaaaaaaafg x", 2, 18);
+ x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1);
+ x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3);
+ x2("((?<name1>\\d)|(?<name2>\\w))(\\k<name1>|\\k<name2>)", "ff", 0, 2);
+ x2("(?:(?<x>)|(?<x>efg))\\k<x>", "", 0, 0);
+ x2("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefgefg", 3, 9);
+ n("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefg");
+ x2("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "a-pyumpyum", 2, 10);
+ x3("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14);
+ x3("(?<name1>)(?<name2>)(?<name3>)(?<name4>)(?<name5>)(?<name6>)(?<name7>)(?<name8>)(?<name9>)(?<name10>)(?<name11>)(?<name12>)(?<name13>)(?<name14>)(?<name15>)(?<name16>aaa)(?<name17>)$", "aaa", 0, 3, 16);
+ x2("(?<foo>a|\\(\\g<foo>\\))", "a", 0, 1);
+ x2("(?<foo>a|\\(\\g<foo>\\))", "((((((a))))))", 0, 13);
+ x3("(?<foo>a|\\(\\g<foo>\\))", "((((((((a))))))))", 0, 17, 1);
+ x2("\\g<bar>|\\zEND(?<bar>.*abc$)", "abcxxxabc", 0, 9);
+ x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3);
+ x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1);
+ x2("\\A(?:\\g<pon>|\\g<pan>|\\zEND (?<pan>a|c\\g<pon>c)(?<pon>b|d\\g<pan>d))$", "cdcbcdc", 0, 7);
+ x2("\\A(?<n>|a\\g<m>)\\z|\\zEND (?<m>\\g<n>)", "aaaa", 0, 4);
+ x2("(?<n>(a|b\\g<n>c){3,5})", "baaaaca", 1, 5);
+ x2("(?<n>(a|b\\g<n>c){3,5})", "baaaacaaaaa", 0, 10);
+ x2("(?<pare>\\(([^\\(\\)]++|\\g<pare>)*+\\))", "((a))", 0, 5);
+ x2("()*\\1", "", 0, 0);
+ x2("(?:()|())*\\1\\2", "", 0, 0);
+ x3("(?:\\1a|())*", "a", 0, 0, 1);
+ x2("x((.)*)*x", "0x1x2x3", 1, 6);
+ x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9);
+ x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0);
+ x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1);
+ x2("\\xED\\xF2", "\xed\xf2", 0, 2);
+ x2("", "", 0, 0);
+ x2("", "", 0, 2);
+ n("", "");
+ x2("", "", 0, 4);
+ x2("", "", 0, 6);
+ x2("", "", 0, 70);
+ x2("", "", 2, 4);
+ x2("", "", 2, 6);
+ x2("\\xca\\xb8", "\xca\xb8", 0, 2);
+ x2(".", "", 0, 2);
+ x2("..", "", 0, 4);
+ x2("\\w", "", 0, 2);
+ n("\\W", "");
+ x2("[\\W]", "$", 2, 3);
+ x2("\\S", "", 0, 2);
+ x2("\\S", "", 0, 2);
+ x2("\\b", " ", 0, 0);
+ x2("\\b", " ", 1, 1);
+ x2("\\B", " ", 2, 2);
+ x2("\\B", " ", 3, 3);
+ x2("\\B", " ", 0, 0);
+ x2("[]", "", 0, 2);
+ n("[ʤ]", "");
+ x2("[-]", "", 0, 2);
+ n("[^]", "");
+ x2("[\\w]", "", 0, 2);
+ n("[\\d]", "");
+ x2("[\\D]", "", 0, 2);
+ n("[\\s]", "");
+ x2("[\\S]", "", 0, 2);
+ x2("[\\w\\d]", "", 0, 2);
+ x2("[\\w\\d]", " ", 3, 5);
+ n("\\w", " ");
+ x2("\\W", " ", 0, 5);
+ x2("..", "", 0, 10);
+ x2(".\\w\\W..", " ", 0, 13);
+ x2("\\s\\w", " ", 0, 9);
+ x2(".", "", 0, 8);
+ n(".", "");
+ x2(".", "", 0, 4);
+ x2("^", "", 0, 2);
+ x2("^$", "", 0, 2);
+ x2("^\\w$", "", 0, 2);
+ x2("^\\w$", "z", 0, 11);
+ x2("^\\w...$", "z", 0, 13);
+ x2("\\w\\w\\s\\W\\d", "a 4", 0, 12);
+ x2("\\A", "", 0, 6);
+ x2("\\Z", "", 0, 6);
+ x2("\\z", "", 0, 6);
+ x2("\\Z", "\n", 0, 6);
+ x2("\\Gݤ", "ݤ", 0, 4);
+ n("\\G", "");
+ n("Ȥ\\G", "Ȥ");
+ n("ޤ\\A", "ޤ");
+ n("\\A", "ޤ");
+ x2("(?=)", "", 0, 2);
+ n("(?=).", "");
+ x2("(?!)", "", 0, 2);
+ n("(?!)", "");
+ x2("(?i:)", "", 0, 2);
+ x2("(?i:֤)", "֤", 0, 4);
+ n("(?i:)", "");
+ x2("(?m:.)", "\n", 0, 3);
+ x2("(?m:.)", "\n", 2, 5);
+ x2("?", "", 0, 0);
+ x2("?", "", 0, 0);
+ x2("?", "", 0, 2);
+ x2("*", "", 0, 0);
+ x2("*", "", 0, 2);
+ x2("*", "һһ", 0, 6);
+ x2("*", "", 0, 0);
+ n("+", "");
+ x2("+", "", 0, 2);
+ x2("+", "", 0, 8);
+ x2("+", "", 0, 4);
+ x2("+", "", 2, 10);
+ x2(".?", "", 0, 2);
+ x2(".*", "ѤԤפ", 0, 8);
+ x2(".+", "", 0, 2);
+ x2(".+", "\n", 0, 8);
+ x2("|", "", 0, 2);
+ x2("|", "", 0, 2);
+ x2("|", "", 0, 4);
+ x2("|", "", 0, 4);
+ x2("(?:|)", "򤫤", 0, 6);
+ x2("(?:|)", "򤭤", 0, 8);
+ x2("|(?:|)", "", 0, 4);
+ x2("||", "", 2, 4);
+ x2("|||||||||ĤƤȤʤ|̤", "", 0, 6);
+ n("|||||||||ĤƤȤʤ|̤", "");
+ x2("|^", "֤", 2, 4);
+ x2("|^", "", 0, 2);
+ x2("|\\G", "ֵ", 4, 6);
+ x2("|\\G", "ֵ", 0, 2);
+ x2("|\\A", "bֵ", 3, 5);
+ x2("|\\A", "", 0, 2);
+ x2("|\\Z", "ֵ", 2, 4);
+ x2("|\\Z", "", 0, 2);
+ x2("|\\Z", "\n", 0, 2);
+ x2("|\\z", "ֵ", 2, 4);
+ x2("|\\z", "", 0, 2);
+ x2("\\w|\\s", "", 0, 2);
+ x2("\\w|%", "%", 0, 1);
+ x2("\\w|[&$]", "&", 0, 2);
+ x2("[-]", "", 0, 2);
+ x2("[-]|[^-]", "", 0, 2);
+ x2("[-]|[^-]", "", 0, 2);
+ x2("[^]", "\n", 0, 1);
+ x2("(?:|[-])|", "", 0, 2);
+ x2("(?:|[-])|", "", 0, 4);
+ x2("|(?=)..", "", 0, 6);
+ x2("|(?!)..", "", 0, 6);
+ x2("(?=)..|(?=)..", "", 0, 6);
+ x2("(?<=|)", "", 4, 6);
+ n("(?>|)", "");
+ x2("(?>|)", "", 0, 8);
+ x2("?|", "", 0, 2);
+ x2("?|", "", 0, 0);
+ x2("?|", "", 0, 0);
+ x2("*|", "", 0, 4);
+ x2("*|*", "", 0, 0);
+ x2("*|*", "", 0, 2);
+ x2("[a]*|*", "a", 0, 3);
+ x2("+|*", "", 0, 0);
+ x2("+|*", "", 0, 6);
+ x2("+|*", "", 0, 2);
+ x2("+|*", "a", 0, 0);
+ n("+|+", "");
+ x2("(|)?", "", 0, 2);
+ x2("(|)*", "", 0, 4);
+ x2("(|)+", "", 0, 6);
+ x2("(|)+", "", 0, 8);
+ x2("(|)+", "", 4, 12);
+ x2("(|)+", "", 2, 10);
+ x2("(|)+", "򤦤", 0, 4);
+ x2("(|)+", "$$zzzz򤦤", 6, 10);
+ x2("(|)+", "", 0, 10);
+ x2("(|)+", "", 2, 4);
+ x2("(|)+", "", 2, 8);
+ x2("(?:|)(?:|)", "", 0, 4);
+ x2("(?:*|*)(?:*|*)", "", 0, 6);
+ x2("(?:*|*)(?:+|+)", "", 0, 12);
+ x2("(?:+|+){2}", "", 0, 12);
+ x2("(?:+|+){1,2}", "", 0, 12);
+ x2("(?:+|\\A*)", "", 0, 4);
+ n("(?:+|\\A*)", "");
+ x2("(?:^+|+)*", "", 12, 16);
+ x2("(?:^+|+)*", "", 0, 14);
+ x2("{0,}", "", 0, 8);
+ x2("|(?i)c", "C", 0, 1);
+ x2("(?i)c|", "C", 0, 1);
+ x2("(?i:)|a", "a", 0, 1);
+ n("(?i:)|a", "A");
+ x2("[]?", "", 0, 2);
+ x2("[]*", "", 0, 6);
+ x2("[^]*", "", 0, 0);
+ n("[^]+", "");
+ x2("?\?", "", 0, 0);
+ x2("?\?", "", 0, 6);
+ x2("*?", "", 0, 0);
+ x2("*?", "", 0, 2);
+ x2("*?", "", 0, 8);
+ x2("+?", "", 0, 2);
+ x2("+?", "", 0, 4);
+ x2("+?", "", 0, 8);
+ x2("(?:ŷ?)?\?", "ŷ", 0, 0);
+ x2("(?:ŷ?\?)?", "ŷ", 0, 0);
+ x2("(?:̴?)+?", "̴̴̴", 0, 2);
+ x2("(?:+)?\?", "", 0, 0);
+ x2("(?:+)?\?", "", 0, 8);
+ x2("(?:)?{2}", "", 0, 0);
+ x2("(?:)?{2}", "ֵֵ", 0, 8);
+ x2("(?:)*{0}", "ֵֵ", 0, 0);
+ x2("(?:){3,}", "ֵֵֵ", 0, 16);
+ n("(?:){3,}", "ֵ");
+ x2("(?:){2,4}", "ֵֵ", 0, 12);
+ x2("(?:){2,4}", "ֵֵֵֵ", 0, 16);
+ x2("(?:){2,4}?", "ֵֵֵֵ", 0, 8);
+ x2("(?:){,}", "{,}", 0, 7);
+ x2("(?:)+?{2}", "", 0, 12);
+ x3("()", "", 0, 2, 1);
+ x3("(п)", "п", 0, 4, 1);
+ x2("(())", "", 0, 4);
+ x3("(())", "", 0, 4, 1);
+ x3("(())", "", 0, 4, 2);
+ x3("((((((((((((((((((((̻))))))))))))))))))))", "̻", 0, 4, 20);
+ x3("()()", "", 0, 4, 1);
+ x3("()()", "", 4, 8, 2);
+ x3("()()()", "", 6, 12, 3);
+ x3("(()()())", "", 6, 12, 4);
+ x3(".*(ե)󡦥(()奿)", "ե󡦥ޥ󥷥奿", 10, 18, 2);
+ x2("(^)", "", 0, 2);
+ x3("()|()", "", 2, 4, 1);
+ x3("(^)|()", "", 2, 4, 2);
+ x3("(?)", "", 0, 2, 1);
+ x3("(*)", "ޤޤ", 0, 6, 1);
+ x3("(*)", "", 0, 0, 1);
+ x3("(+)", "", 0, 14, 1);
+ x3("(+|*)", "դդդؤ", 0, 6, 1);
+ x3("(+|?)", "", 0, 2, 1);
+ x3("()?", "", 0, 6, 1);
+ x3("()*", "", 0, 6, 1);
+ x3("()+", "", 0, 6, 1);
+ x3("(|)+", "", 0, 6, 1);
+ x3("([ʤˤ][]|)+", "", 0, 6, 1);
+ x3("((?i:))", "", 0, 6, 1);
+ x3("((?m:.))", "\n", 0, 5, 1);
+ x3("((?=))", "", 0, 2, 1);
+ x3("|(.)", "󤢤", 0, 8, 1);
+ x3("*(.)", "", 8, 10, 1);
+ x3("*?(.)", "", 0, 2, 1);
+ x3("*?()", "", 8, 10, 1);
+ x3("[]*(.)", "", 10, 12, 1);
+ x3("(\\A)", "", 0, 4, 1);
+ n("(\\A)", "󤤤");
+ x3("(^)", "", 0, 4, 1);
+ n("(^)", "󤤤");
+ x3("($)", "", 4, 8, 1);
+ n("($)", "");
+ x2("(̵)\\1", "̵̵", 0, 4);
+ n("(̵)\\1", "̵");
+ x2("(?)\\1", "", 0, 4);
+ x2("(?\?)\\1", "", 0, 0);
+ x2("(*)\\1", "", 0, 8);
+ x3("(*)\\1", "", 0, 4, 1);
+ x2("(*)\\1", "", 0, 10);
+ x2("(*)\\1", "", 0, 2);
+ x2("(*)(*)\\1\\2", "", 0, 20);
+ x2("(*)(*)\\2", "", 0, 14);
+ x3("(*)(*)\\2", "", 6, 10, 2);
+ x2("(((((((*)))))))\\7", "ݤݤݤڤԤݤݤ", 0, 16);
+ x3("(((((((*)))))))\\7", "ݤݤݤڤԤݤݤ", 0, 6, 7);
+ x2("()()()\\2\\1\\3", "ϤҤդҤϤ", 0, 12);
+ x2("([-])\\1", "", 0, 4);
+ x2("(\\w\\d\\s)\\1", "5 5 ", 0, 8);
+ n("(\\w\\d\\s)\\1", "5 5");
+ x2("(ï|[-]{3})\\1", "ïï", 0, 8);
+ x2("...(ï|[-]{3})\\1", "aïï", 0, 13);
+ x2("(ï|[-]{3})\\1", "", 0, 12);
+ x2("(^)\\1", "", 0, 4);
+ n("(^)\\1", "");
+ n("($)\\1", "");
+ n("(\\Z)\\1", "");
+ x2("(*\\Z)\\1", "", 2, 2);
+ x2(".(*\\Z)\\1", "", 2, 4);
+ x3("(.(䤤)\\2)", "z䤤䤤", 0, 13, 1);
+ x3("(.(..\\d.)\\2)", "12341234", 0, 10, 1);
+ x2("((?i:v))\\1", "vv", 0, 10);
+ x2("(?<>|\\(\\g<>\\))", "(((((())))))", 0, 14);
+ x2("\\A(?:\\g<_1>|\\g<_2>|\\zλ (?<_1>|\\g<_2>)(?<_2>|\\g<_1>))$", "߼", 0, 26);
+ x2("[[Ҥ]]", "", 0, 2);
+ x2("[[]]", "", 0, 2);
+ n("[[^]]", "");
+ n("[^[]]", "");
+ x2("[^[^]]", "", 0, 2);
+ x2("[[]&&]", "", 0, 2);
+ n("[[]&&]", "");
+ n("[[]&&]", "");
+ x2("[-&&-&&-]", "", 0, 2);
+ n("[^-&&-&&-]", "");
+ x2("[[^&&]&&-]", "", 0, 2);
+ n("[[^&&]&&-]", "");
+ x2("[[^-&&]&&[^-]]", "", 0, 2);
+ n("[[^-&&]&&[^-]]", "");
+ x2("[^[^]&&[^]]", "", 0, 2);
+ x2("[^[^]&&[^]]", "", 0, 2);
+ n("[^[^]&&[^]]", "");
+ x2("[-&&-]", "-", 0, 1);
+ x2("[^[^a-z]&&[^bcdefg]q-w]", "", 0, 2);
+ x2("[^[^a-z]&&[^bcdefg]g-w]", "f", 0, 1);
+ x2("[^[^a-z]&&[^bcdefg]g-w]", "g", 0, 1);
+ n("[^[^a-z]&&[^bcdefg]g-w]", "2");
+ x2("a<b>СΥ<\\/b>", "a<b>СΥ</b>", 0, 32);
+ x2(".<b>СΥ<\\/b>", "a<b>СΥ</b>", 0, 32);
+ fprintf(stdout,
+ "\nRESULT SUCC: %d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n",
+ nsucc, nfail, nerror, onig_version());
+
+#ifndef POSIX_TEST
+ onig_region_free(region, 1);
+ onig_end();
+#endif
+
+ return ((nfail == 0 && nerror == 0) ? 0 : -1);
+}
diff --git a/ext/mbstring/oniguruma/testu.c b/ext/mbstring/oniguruma/testu.c
new file mode 100644
index 000000000..5652988ca
--- /dev/null
+++ b/ext/mbstring/oniguruma/testu.c
@@ -0,0 +1,911 @@
+/*
+ * This program was generated by testconv.rb.
+ */
+#include<stdio.h>
+
+#ifdef POSIX_TEST
+#include "onigposix.h"
+#else
+#include "oniguruma.h"
+#endif
+
+static int nsucc = 0;
+static int nfail = 0;
+static int nerror = 0;
+
+static FILE* err_file;
+
+#ifndef POSIX_TEST
+static OnigRegion* region;
+static OnigEncoding ENC;
+#endif
+
+#define ulen(p) onigenc_str_bytelen_null(ENC, (UChar* )p)
+
+static void uconv(char* from, char* to, int len)
+{
+ int i;
+ unsigned char c;
+ char *q;
+
+ q = to;
+
+ for (i = 0; i < len; i += 2) {
+ c = (unsigned char )from[i];
+ if (c == 0) {
+ c = (unsigned char )from[i+1];
+ if (c < 0x20 || c >= 0x7f || c == 0x5c || c == 0x22) {
+ sprintf(q, "\\%03o", c);
+ q += 4;
+ }
+ else {
+ sprintf(q, "%c", c);
+ q++;
+ }
+ }
+ else {
+ sprintf(q, "\\%03o", c);
+ q += 4;
+ c = (unsigned char )from[i+1];
+ sprintf(q, "\\%03o", c);
+ q += 4;
+ }
+ }
+
+ *q = 0;
+}
+
+static void xx(char* pattern, char* str, int from, int to, int mem, int not)
+{
+ int r;
+ char cpat[4000], cstr[4000];
+
+#ifdef POSIX_TEST
+ regex_t reg;
+ char buf[200];
+ regmatch_t pmatch[20];
+
+ uconv(pattern, cpat, ulen(pattern));
+ uconv(str, cstr, ulen(str));
+
+ r = regcomp(&reg, pattern, REG_EXTENDED | REG_NEWLINE);
+ if (r) {
+ regerror(r, &reg, buf, sizeof(buf));
+ fprintf(err_file, "ERROR: %s\n", buf);
+ nerror++;
+ return ;
+ }
+
+ r = regexec(&reg, str, reg.re_nsub + 1, pmatch, 0);
+ if (r != 0 && r != REG_NOMATCH) {
+ regerror(r, &reg, buf, sizeof(buf));
+ fprintf(err_file, "ERROR: %s\n", buf);
+ nerror++;
+ return ;
+ }
+
+ if (r == REG_NOMATCH) {
+ if (not) {
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", cpat, cstr);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", cpat, cstr);
+ nfail++;
+ }
+ }
+ else {
+ if (not) {
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", cpat, cstr);
+ nfail++;
+ }
+ else {
+ if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) {
+ fprintf(stdout, "OK: /%s/ '%s'\n", cpat, cstr);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", cpat, cstr,
+ from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo);
+ nfail++;
+ }
+ }
+ }
+ regfree(&reg);
+
+#else
+ regex_t* reg;
+ OnigCompileInfo ci;
+ OnigErrorInfo einfo;
+
+ uconv(pattern, cpat, ulen(pattern));
+ uconv(str, cstr, ulen(str));
+
+#if 0
+ r = onig_new(&reg, (UChar* )pattern, (UChar* )(pattern + ulen(pattern)),
+ ONIG_OPTION_DEFAULT, ENC, ONIG_SYNTAX_DEFAULT, &einfo);
+#else
+ ci.num_of_elements = 5;
+ ci.pattern_enc = ENC;
+ ci.target_enc = ENC;
+ ci.syntax = ONIG_SYNTAX_DEFAULT;
+ ci.option = ONIG_OPTION_DEFAULT;
+ ci.case_fold_flag = ONIGENC_CASE_FOLD_DEFAULT;
+
+ r = onig_new_deluxe(&reg, (UChar* )pattern,
+ (UChar* )(pattern + ulen(pattern)),
+ &ci, &einfo);
+#endif
+
+ if (r) {
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+ onig_error_code_to_str(s, r, &einfo);
+ fprintf(err_file, "ERROR: %s\n", s);
+ nerror++;
+ return ;
+ }
+
+ r = onig_search(reg, (UChar* )str, (UChar* )(str + ulen(str)),
+ (UChar* )str, (UChar* )(str + ulen(str)),
+ region, ONIG_OPTION_NONE);
+ if (r < ONIG_MISMATCH) {
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+ onig_error_code_to_str(s, r);
+ fprintf(err_file, "ERROR: %s\n", s);
+ nerror++;
+ return ;
+ }
+
+ if (r == ONIG_MISMATCH) {
+ if (not) {
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", cpat, cstr);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", cpat, cstr);
+ nfail++;
+ }
+ }
+ else {
+ if (not) {
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", cpat, cstr);
+ nfail++;
+ }
+ else {
+ if (region->beg[mem] == from && region->end[mem] == to) {
+ fprintf(stdout, "OK: /%s/ '%s'\n", cpat, cstr);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", cpat, cstr,
+ from, to, region->beg[mem], region->end[mem]);
+ nfail++;
+ }
+ }
+ }
+ onig_free(reg);
+#endif
+}
+
+static void x2(char* pattern, char* str, int from, int to)
+{
+ xx(pattern, str, from, to, 0, 0);
+}
+
+static void x3(char* pattern, char* str, int from, int to, int mem)
+{
+ xx(pattern, str, from, to, mem, 0);
+}
+
+static void n(char* pattern, char* str)
+{
+ xx(pattern, str, 0, 0, 0, 1);
+}
+
+extern int main(int argc, char* argv[])
+{
+ err_file = stdout;
+
+#ifndef POSIX_TEST
+ region = onig_region_new();
+#endif
+#ifdef POSIX_TEST
+ reg_set_encoding(REG_POSIX_ENCODING_UTF16_BE);
+#else
+ ENC = ONIG_ENCODING_UTF16_BE;
+#endif
+ x2("\000\000", "\000\000", 0, 0);
+ x2("\000^\000\000", "\000\000", 0, 0);
+ x2("\000$\000\000", "\000\000", 0, 0);
+ x2("\000\134\000G\000\000", "\000\000", 0, 0);
+ x2("\000\134\000A\000\000", "\000\000", 0, 0);
+ x2("\000\134\000Z\000\000", "\000\000", 0, 0);
+ x2("\000\134\000z\000\000", "\000\000", 0, 0);
+ x2("\000^\000$\000\000", "\000\000", 0, 0);
+ x2("\000\134\000c\000a\000\000", "\000\001\000\000", 0, 2);
+ x2("\000\134\000C\000-\000b\000\000", "\000\002\000\000", 0, 2);
+ x2("\000\134\000c\000\134\000\134\000\000", "\000\034\000\000", 0, 2);
+ x2("\000q\000[\000\134\000c\000\134\000\134\000]\000\000", "\000q\000\034\000\000", 0, 4);
+ x2("\000\000", "\000a\000\000", 0, 0);
+ x2("\000a\000\000", "\000a\000\000", 0, 2);
+ x2("\000\134\000x\0000\0000\000\134\000x\0006\0001\000\000", "\000a\000\000", 0, 2);
+ x2("\000a\000a\000\000", "\000a\000a\000\000", 0, 4);
+ x2("\000a\000a\000a\000\000", "\000a\000a\000a\000\000", 0, 6);
+ x2("\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000\000", "\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000a\000\000", 0, 70);
+ x2("\000a\000b\000\000", "\000a\000b\000\000", 0, 4);
+ x2("\000b\000\000", "\000a\000b\000\000", 2, 4);
+ x2("\000b\000c\000\000", "\000a\000b\000c\000\000", 2, 6);
+ x2("\000(\000?\000i\000:\000#\000R\000E\000T\000#\000)\000\000", "\000#\000I\000N\000S\000#\000#\000R\000E\000T\000#\000\000", 10, 20);
+ x2("\000\134\0000\0000\0000\000\134\0001\0007\000\000", "\000\017\000\000", 0, 2);
+ x2("\000\134\000x\0000\0000\000\134\000x\0001\000f\000\000", "\000\037\000\000", 0, 2);
+ x2("\000a\000(\000?\000#\000.\000.\000.\000.\000\134\000\134\000J\000J\000J\000J\000)\000b\000\000", "\000a\000b\000\000", 0, 4);
+ x2("\000(\000?\000x\000)\000 \000 \000G\000 \000(\000o\000 \000O\000(\000?\000-\000x\000)\000o\000O\000)\000 \000g\000 \000L\000\000", "\000G\000o\000O\000o\000O\000g\000L\000e\000\000", 0, 14);
+ x2("\000.\000\000", "\000a\000\000", 0, 2);
+ n("\000.\000\000", "\000\000");
+ x2("\000.\000.\000\000", "\000a\000b\000\000", 0, 4);
+ x2("\000\134\000w\000\000", "\000e\000\000", 0, 2);
+ n("\000\134\000W\000\000", "\000e\000\000");
+ x2("\000\134\000s\000\000", "\000 \000\000", 0, 2);
+ x2("\000\134\000S\000\000", "\000b\000\000", 0, 2);
+ x2("\000\134\000d\000\000", "\0004\000\000", 0, 2);
+ n("\000\134\000D\000\000", "\0004\000\000");
+ x2("\000\134\000b\000\000", "\000z\000 \000\000", 0, 0);
+ x2("\000\134\000b\000\000", "\000 \000z\000\000", 2, 2);
+ x2("\000\134\000B\000\000", "\000z\000z\000 \000\000", 2, 2);
+ x2("\000\134\000B\000\000", "\000z\000 \000\000", 4, 4);
+ x2("\000\134\000B\000\000", "\000 \000z\000\000", 0, 0);
+ x2("\000[\000a\000b\000]\000\000", "\000b\000\000", 0, 2);
+ n("\000[\000a\000b\000]\000\000", "\000c\000\000");
+ x2("\000[\000a\000-\000z\000]\000\000", "\000t\000\000", 0, 2);
+ n("\000[\000^\000a\000]\000\000", "\000a\000\000");
+ x2("\000[\000^\000a\000]\000\000", "\000\012\000\000", 0, 2);
+ x2("\000[\000]\000]\000\000", "\000]\000\000", 0, 2);
+ n("\000[\000^\000]\000]\000\000", "\000]\000\000");
+ x2("\000[\000\134\000^\000]\000+\000\000", "\0000\000^\000^\0001\000\000", 2, 6);
+ x2("\000[\000b\000-\000]\000\000", "\000b\000\000", 0, 2);
+ x2("\000[\000b\000-\000]\000\000", "\000-\000\000", 0, 2);
+ x2("\000[\000\134\000w\000]\000\000", "\000z\000\000", 0, 2);
+ n("\000[\000\134\000w\000]\000\000", "\000 \000\000");
+ x2("\000[\000\134\000W\000]\000\000", "\000b\000$\000\000", 2, 4);
+ x2("\000[\000\134\000d\000]\000\000", "\0005\000\000", 0, 2);
+ n("\000[\000\134\000d\000]\000\000", "\000e\000\000");
+ x2("\000[\000\134\000D\000]\000\000", "\000t\000\000", 0, 2);
+ n("\000[\000\134\000D\000]\000\000", "\0003\000\000");
+ x2("\000[\000\134\000s\000]\000\000", "\000 \000\000", 0, 2);
+ n("\000[\000\134\000s\000]\000\000", "\000a\000\000");
+ x2("\000[\000\134\000S\000]\000\000", "\000b\000\000", 0, 2);
+ n("\000[\000\134\000S\000]\000\000", "\000 \000\000");
+ x2("\000[\000\134\000w\000\134\000d\000]\000\000", "\0002\000\000", 0, 2);
+ n("\000[\000\134\000w\000\134\000d\000]\000\000", "\000 \000\000");
+ x2("\000[\000[\000:\000u\000p\000p\000e\000r\000:\000]\000]\000\000", "\000B\000\000", 0, 2);
+ x2("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000+\000\000", 0, 2);
+ x2("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000G\000H\000I\000K\000K\000-\0009\000+\000*\000\000", 12, 14);
+ x2("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000-\000@\000^\000+\000\000", 6, 8);
+ n("\000[\000[\000:\000u\000p\000p\000e\000r\000]\000]\000\000", "\000A\000\000");
+ x2("\000[\000[\000:\000u\000p\000p\000e\000r\000]\000]\000\000", "\000:\000\000", 0, 2);
+ x2("\000[\000\134\0000\0000\0000\000\134\0000\0004\0004\000-\000\134\0000\0000\0000\000\134\0000\0004\0007\000]\000\000", "\000&\000\000", 0, 2);
+ x2("\000[\000\134\000x\0000\0000\000\134\000x\0005\000a\000-\000\134\000x\0000\0000\000\134\000x\0005\000c\000]\000\000", "\000[\000\000", 0, 2);
+ x2("\000[\000\134\000x\0000\0000\000\134\000x\0006\000A\000-\000\134\000x\0000\0000\000\134\000x\0006\000D\000]\000\000", "\000l\000\000", 0, 2);
+ n("\000[\000\134\000x\0000\0000\000\134\000x\0006\000A\000-\000\134\000x\0000\0000\000\134\000x\0006\000D\000]\000\000", "\000n\000\000");
+ n("\000^\000[\0000\000-\0009\000A\000-\000F\000]\000+\000 \0000\000+\000 \000U\000N\000D\000E\000F\000 \000\000", "\0007\0005\000F\000 \0000\0000\0000\0000\0000\0000\0000\0000\000 \000S\000E\000C\000T\0001\0004\000A\000 \000n\000o\000t\000y\000p\000e\000 \000(\000)\000 \000 \000 \000 \000E\000x\000t\000e\000r\000n\000a\000l\000 \000 \000 \000 \000|\000 \000_\000r\000b\000_\000a\000p\000p\000l\000y\000\000");
+ x2("\000[\000\134\000[\000]\000\000", "\000[\000\000", 0, 2);
+ x2("\000[\000\134\000]\000]\000\000", "\000]\000\000", 0, 2);
+ x2("\000[\000&\000]\000\000", "\000&\000\000", 0, 2);
+ x2("\000[\000[\000a\000b\000]\000]\000\000", "\000b\000\000", 0, 2);
+ x2("\000[\000[\000a\000b\000]\000c\000]\000\000", "\000c\000\000", 0, 2);
+ n("\000[\000[\000^\000a\000]\000]\000\000", "\000a\000\000");
+ n("\000[\000^\000[\000a\000]\000]\000\000", "\000a\000\000");
+ x2("\000[\000[\000a\000b\000]\000&\000&\000b\000c\000]\000\000", "\000b\000\000", 0, 2);
+ n("\000[\000[\000a\000b\000]\000&\000&\000b\000c\000]\000\000", "\000a\000\000");
+ n("\000[\000[\000a\000b\000]\000&\000&\000b\000c\000]\000\000", "\000c\000\000");
+ x2("\000[\000a\000-\000z\000&\000&\000b\000-\000y\000&\000&\000c\000-\000x\000]\000\000", "\000w\000\000", 0, 2);
+ n("\000[\000^\000a\000-\000z\000&\000&\000b\000-\000y\000&\000&\000c\000-\000x\000]\000\000", "\000w\000\000");
+ x2("\000[\000[\000^\000a\000&\000&\000a\000]\000&\000&\000a\000-\000z\000]\000\000", "\000b\000\000", 0, 2);
+ n("\000[\000[\000^\000a\000&\000&\000a\000]\000&\000&\000a\000-\000z\000]\000\000", "\000a\000\000");
+ x2("\000[\000[\000^\000a\000-\000z\000&\000&\000b\000c\000d\000e\000f\000]\000&\000&\000[\000^\000c\000-\000g\000]\000]\000\000", "\000h\000\000", 0, 2);
+ n("\000[\000[\000^\000a\000-\000z\000&\000&\000b\000c\000d\000e\000f\000]\000&\000&\000[\000^\000c\000-\000g\000]\000]\000\000", "\000c\000\000");
+ x2("\000[\000^\000[\000^\000a\000b\000c\000]\000&\000&\000[\000^\000c\000d\000e\000]\000]\000\000", "\000c\000\000", 0, 2);
+ x2("\000[\000^\000[\000^\000a\000b\000c\000]\000&\000&\000[\000^\000c\000d\000e\000]\000]\000\000", "\000e\000\000", 0, 2);
+ n("\000[\000^\000[\000^\000a\000b\000c\000]\000&\000&\000[\000^\000c\000d\000e\000]\000]\000\000", "\000f\000\000");
+ x2("\000[\000a\000-\000&\000&\000-\000a\000]\000\000", "\000-\000\000", 0, 2);
+ n("\000[\000a\000\134\000-\000&\000&\000\134\000-\000a\000]\000\000", "\000&\000\000");
+ n("\000\134\000w\000a\000b\000c\000\000", "\000 \000a\000b\000c\000\000");
+ x2("\000a\000\134\000W\000b\000c\000\000", "\000a\000 \000b\000c\000\000", 0, 8);
+ x2("\000a\000.\000b\000.\000c\000\000", "\000a\000a\000b\000b\000c\000\000", 0, 10);
+ x2("\000.\000\134\000w\000b\000\134\000W\000.\000.\000c\000\000", "\000a\000b\000b\000 \000b\000c\000c\000\000", 0, 14);
+ x2("\000\134\000s\000\134\000w\000z\000z\000z\000\000", "\000 \000z\000z\000z\000z\000\000", 0, 10);
+ x2("\000a\000a\000.\000b\000\000", "\000a\000a\000b\000b\000\000", 0, 8);
+ n("\000.\000a\000\000", "\000a\000b\000\000");
+ x2("\000.\000a\000\000", "\000a\000a\000\000", 0, 4);
+ x2("\000^\000a\000\000", "\000a\000\000", 0, 2);
+ x2("\000^\000a\000$\000\000", "\000a\000\000", 0, 2);
+ x2("\000^\000\134\000w\000$\000\000", "\000a\000\000", 0, 2);
+ n("\000^\000\134\000w\000$\000\000", "\000 \000\000");
+ x2("\000^\000\134\000w\000a\000b\000$\000\000", "\000z\000a\000b\000\000", 0, 6);
+ x2("\000^\000\134\000w\000a\000b\000c\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14);
+ x2("\000^\000\134\000w\000.\000.\000.\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14);
+ x2("\000\134\000w\000\134\000w\000\134\000s\000\134\000W\000a\000a\000a\000\134\000d\000\000", "\000a\000a\000 \000 \000a\000a\000a\0004\000\000", 0, 16);
+ x2("\000\134\000A\000\134\000Z\000\000", "\000\000", 0, 0);
+ x2("\000\134\000A\000x\000y\000z\000\000", "\000x\000y\000z\000\000", 0, 6);
+ x2("\000x\000y\000z\000\134\000Z\000\000", "\000x\000y\000z\000\000", 0, 6);
+ x2("\000x\000y\000z\000\134\000z\000\000", "\000x\000y\000z\000\000", 0, 6);
+ x2("\000a\000\134\000Z\000\000", "\000a\000\000", 0, 2);
+ x2("\000\134\000G\000a\000z\000\000", "\000a\000z\000\000", 0, 4);
+ n("\000\134\000G\000z\000\000", "\000b\000z\000a\000\000");
+ n("\000a\000z\000\134\000G\000\000", "\000a\000z\000\000");
+ n("\000a\000z\000\134\000A\000\000", "\000a\000z\000\000");
+ n("\000a\000\134\000A\000z\000\000", "\000a\000z\000\000");
+ x2("\000\134\000^\000\134\000$\000\000", "\000^\000$\000\000", 0, 4);
+ x2("\000^\000x\000?\000y\000\000", "\000x\000y\000\000", 0, 4);
+ x2("\000^\000(\000x\000?\000y\000)\000\000", "\000x\000y\000\000", 0, 4);
+ x2("\000\134\000w\000\000", "\000_\000\000", 0, 2);
+ n("\000\134\000W\000\000", "\000_\000\000");
+ x2("\000(\000?\000=\000z\000)\000z\000\000", "\000z\000\000", 0, 2);
+ n("\000(\000?\000=\000z\000)\000.\000\000", "\000a\000\000");
+ x2("\000(\000?\000!\000z\000)\000a\000\000", "\000a\000\000", 0, 2);
+ n("\000(\000?\000!\000z\000)\000a\000\000", "\000z\000\000");
+ x2("\000(\000?\000i\000:\000a\000)\000\000", "\000a\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000a\000)\000\000", "\000A\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000A\000)\000\000", "\000a\000\000", 0, 2);
+ n("\000(\000?\000i\000:\000A\000)\000\000", "\000b\000\000");
+ x2("\000(\000?\000i\000:\000[\000A\000-\000Z\000]\000)\000\000", "\000a\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000[\000f\000-\000m\000]\000)\000\000", "\000H\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000[\000f\000-\000m\000]\000)\000\000", "\000h\000\000", 0, 2);
+ n("\000(\000?\000i\000:\000[\000f\000-\000m\000]\000)\000\000", "\000e\000\000");
+ x2("\000(\000?\000i\000:\000[\000A\000-\000c\000]\000)\000\000", "\000D\000\000", 0, 2);
+ n("\000(\000?\000i\000:\000[\000^\000a\000-\000z\000]\000)\000\000", "\000A\000\000");
+ n("\000(\000?\000i\000:\000[\000^\000a\000-\000z\000]\000)\000\000", "\000a\000\000");
+ x2("\000(\000?\000i\000:\000[\000!\000-\000k\000]\000)\000\000", "\000Z\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000[\000!\000-\000k\000]\000)\000\000", "\0007\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000[\000T\000-\000}\000]\000)\000\000", "\000b\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000[\000T\000-\000}\000]\000)\000\000", "\000{\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000\134\000?\000a\000)\000\000", "\000?\000A\000\000", 0, 4);
+ x2("\000(\000?\000i\000:\000\134\000*\000A\000)\000\000", "\000*\000a\000\000", 0, 4);
+ n("\000.\000\000", "\000\012\000\000");
+ x2("\000(\000?\000m\000:\000.\000)\000\000", "\000\012\000\000", 0, 2);
+ x2("\000(\000?\000m\000:\000a\000.\000)\000\000", "\000a\000\012\000\000", 0, 4);
+ x2("\000(\000?\000m\000:\000.\000b\000)\000\000", "\000a\000\012\000b\000\000", 2, 6);
+ x2("\000.\000*\000a\000b\000c\000\000", "\000d\000d\000d\000a\000b\000d\000d\000\012\000d\000d\000a\000b\000c\000\000", 16, 26);
+ x2("\000(\000?\000m\000:\000.\000*\000a\000b\000c\000)\000\000", "\000d\000d\000d\000a\000b\000d\000d\000a\000b\000c\000\000", 0, 20);
+ n("\000(\000?\000i\000)\000(\000?\000-\000i\000)\000a\000\000", "\000A\000\000");
+ n("\000(\000?\000i\000)\000(\000?\000-\000i\000:\000a\000)\000\000", "\000A\000\000");
+ x2("\000a\000?\000\000", "\000\000", 0, 0);
+ x2("\000a\000?\000\000", "\000b\000\000", 0, 0);
+ x2("\000a\000?\000\000", "\000a\000\000", 0, 2);
+ x2("\000a\000*\000\000", "\000\000", 0, 0);
+ x2("\000a\000*\000\000", "\000a\000\000", 0, 2);
+ x2("\000a\000*\000\000", "\000a\000a\000a\000\000", 0, 6);
+ x2("\000a\000*\000\000", "\000b\000a\000a\000a\000a\000\000", 0, 0);
+ n("\000a\000+\000\000", "\000\000");
+ x2("\000a\000+\000\000", "\000a\000\000", 0, 2);
+ x2("\000a\000+\000\000", "\000a\000a\000a\000a\000\000", 0, 8);
+ x2("\000a\000+\000\000", "\000a\000a\000b\000b\000b\000\000", 0, 4);
+ x2("\000a\000+\000\000", "\000b\000a\000a\000a\000a\000\000", 2, 10);
+ x2("\000.\000?\000\000", "\000\000", 0, 0);
+ x2("\000.\000?\000\000", "\000f\000\000", 0, 2);
+ x2("\000.\000?\000\000", "\000\012\000\000", 0, 0);
+ x2("\000.\000*\000\000", "\000\000", 0, 0);
+ x2("\000.\000*\000\000", "\000a\000b\000c\000d\000e\000\000", 0, 10);
+ x2("\000.\000+\000\000", "\000z\000\000", 0, 2);
+ x2("\000.\000+\000\000", "\000z\000d\000s\000w\000e\000r\000\012\000\000", 0, 12);
+ x2("\000(\000.\000*\000)\000a\000\134\0001\000f\000\000", "\000b\000a\000b\000f\000b\000a\000c\000\000", 0, 8);
+ x2("\000(\000.\000*\000)\000a\000\134\0001\000f\000\000", "\000b\000a\000c\000b\000a\000b\000f\000\000", 6, 14);
+ x2("\000(\000(\000.\000*\000)\000a\000\134\0002\000f\000)\000\000", "\000b\000a\000c\000b\000a\000b\000f\000\000", 6, 14);
+ x2("\000(\000.\000*\000)\000a\000\134\0001\000f\000\000", "\000b\000a\000c\000z\000z\000z\000z\000z\000z\000\012\000b\000a\000z\000z\000\012\000z\000z\000z\000z\000b\000a\000b\000f\000\000", 38, 46);
+ x2("\000a\000|\000b\000\000", "\000a\000\000", 0, 2);
+ x2("\000a\000|\000b\000\000", "\000b\000\000", 0, 2);
+ x2("\000|\000a\000\000", "\000a\000\000", 0, 0);
+ x2("\000(\000|\000a\000)\000\000", "\000a\000\000", 0, 0);
+ x2("\000a\000b\000|\000b\000c\000\000", "\000a\000b\000\000", 0, 4);
+ x2("\000a\000b\000|\000b\000c\000\000", "\000b\000c\000\000", 0, 4);
+ x2("\000z\000(\000?\000:\000a\000b\000|\000b\000c\000)\000\000", "\000z\000b\000c\000\000", 0, 6);
+ x2("\000a\000(\000?\000:\000a\000b\000|\000b\000c\000)\000c\000\000", "\000a\000a\000b\000c\000\000", 0, 8);
+ x2("\000a\000b\000|\000(\000?\000:\000a\000c\000|\000a\000z\000)\000\000", "\000a\000z\000\000", 0, 4);
+ x2("\000a\000|\000b\000|\000c\000\000", "\000d\000c\000\000", 2, 4);
+ x2("\000a\000|\000b\000|\000c\000d\000|\000e\000f\000g\000|\000h\000|\000i\000j\000k\000|\000l\000m\000n\000|\000o\000|\000p\000q\000|\000r\000s\000t\000u\000v\000w\000x\000|\000y\000z\000\000", "\000p\000q\000r\000\000", 0, 4);
+ n("\000a\000|\000b\000|\000c\000d\000|\000e\000f\000g\000|\000h\000|\000i\000j\000k\000|\000l\000m\000n\000|\000o\000|\000p\000q\000|\000r\000s\000t\000u\000v\000w\000x\000|\000y\000z\000\000", "\000m\000n\000\000");
+ x2("\000a\000|\000^\000z\000\000", "\000b\000a\000\000", 2, 4);
+ x2("\000a\000|\000^\000z\000\000", "\000z\000a\000\000", 0, 2);
+ x2("\000a\000|\000\134\000G\000z\000\000", "\000b\000z\000a\000\000", 4, 6);
+ x2("\000a\000|\000\134\000G\000z\000\000", "\000z\000a\000\000", 0, 2);
+ x2("\000a\000|\000\134\000A\000z\000\000", "\000b\000z\000a\000\000", 4, 6);
+ x2("\000a\000|\000\134\000A\000z\000\000", "\000z\000a\000\000", 0, 2);
+ x2("\000a\000|\000b\000\134\000Z\000\000", "\000b\000a\000\000", 2, 4);
+ x2("\000a\000|\000b\000\134\000Z\000\000", "\000b\000\000", 0, 2);
+ x2("\000a\000|\000b\000\134\000z\000\000", "\000b\000a\000\000", 2, 4);
+ x2("\000a\000|\000b\000\134\000z\000\000", "\000b\000\000", 0, 2);
+ x2("\000\134\000w\000|\000\134\000s\000\000", "\000 \000\000", 0, 2);
+ n("\000\134\000w\000|\000\134\000w\000\000", "\000 \000\000");
+ x2("\000\134\000w\000|\000%\000\000", "\000%\000\000", 0, 2);
+ x2("\000\134\000w\000|\000[\000&\000$\000]\000\000", "\000&\000\000", 0, 2);
+ x2("\000[\000b\000-\000d\000]\000|\000[\000^\000e\000-\000z\000]\000\000", "\000a\000\000", 0, 2);
+ x2("\000(\000?\000:\000a\000|\000[\000c\000-\000f\000]\000)\000|\000b\000z\000\000", "\000d\000z\000\000", 0, 2);
+ x2("\000(\000?\000:\000a\000|\000[\000c\000-\000f\000]\000)\000|\000b\000z\000\000", "\000b\000z\000\000", 0, 4);
+ x2("\000a\000b\000c\000|\000(\000?\000=\000z\000z\000)\000.\000.\000f\000\000", "\000z\000z\000f\000\000", 0, 6);
+ x2("\000a\000b\000c\000|\000(\000?\000!\000z\000z\000)\000.\000.\000f\000\000", "\000a\000b\000f\000\000", 0, 6);
+ x2("\000(\000?\000=\000z\000a\000)\000.\000.\000a\000|\000(\000?\000=\000z\000z\000)\000.\000.\000a\000\000", "\000z\000z\000a\000\000", 0, 6);
+ n("\000(\000?\000>\000a\000|\000a\000b\000d\000)\000c\000\000", "\000a\000b\000d\000c\000\000");
+ x2("\000(\000?\000>\000a\000b\000d\000|\000a\000)\000c\000\000", "\000a\000b\000d\000c\000\000", 0, 8);
+ x2("\000a\000?\000|\000b\000\000", "\000a\000\000", 0, 2);
+ x2("\000a\000?\000|\000b\000\000", "\000b\000\000", 0, 0);
+ x2("\000a\000?\000|\000b\000\000", "\000\000", 0, 0);
+ x2("\000a\000*\000|\000b\000\000", "\000a\000a\000\000", 0, 4);
+ x2("\000a\000*\000|\000b\000*\000\000", "\000b\000a\000\000", 0, 0);
+ x2("\000a\000*\000|\000b\000*\000\000", "\000a\000b\000\000", 0, 2);
+ x2("\000a\000+\000|\000b\000*\000\000", "\000\000", 0, 0);
+ x2("\000a\000+\000|\000b\000*\000\000", "\000b\000b\000b\000\000", 0, 6);
+ x2("\000a\000+\000|\000b\000*\000\000", "\000a\000b\000b\000b\000\000", 0, 2);
+ n("\000a\000+\000|\000b\000+\000\000", "\000\000");
+ x2("\000(\000a\000|\000b\000)\000?\000\000", "\000b\000\000", 0, 2);
+ x2("\000(\000a\000|\000b\000)\000*\000\000", "\000b\000a\000\000", 0, 4);
+ x2("\000(\000a\000|\000b\000)\000+\000\000", "\000b\000a\000b\000\000", 0, 6);
+ x2("\000(\000a\000b\000|\000c\000a\000)\000+\000\000", "\000c\000a\000a\000b\000b\000c\000\000", 0, 8);
+ x2("\000(\000a\000b\000|\000c\000a\000)\000+\000\000", "\000a\000a\000b\000c\000a\000\000", 2, 10);
+ x2("\000(\000a\000b\000|\000c\000a\000)\000+\000\000", "\000a\000b\000z\000c\000a\000\000", 0, 4);
+ x2("\000(\000a\000|\000b\000a\000b\000)\000+\000\000", "\000a\000b\000a\000b\000a\000\000", 0, 10);
+ x2("\000(\000a\000|\000b\000a\000b\000)\000+\000\000", "\000b\000a\000\000", 2, 4);
+ x2("\000(\000a\000|\000b\000a\000b\000)\000+\000\000", "\000b\000a\000a\000a\000b\000a\000\000", 2, 8);
+ x2("\000(\000?\000:\000a\000|\000b\000)\000(\000?\000:\000a\000|\000b\000)\000\000", "\000a\000b\000\000", 0, 4);
+ x2("\000(\000?\000:\000a\000*\000|\000b\000*\000)\000(\000?\000:\000a\000*\000|\000b\000*\000)\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 6);
+ x2("\000(\000?\000:\000a\000*\000|\000b\000*\000)\000(\000?\000:\000a\000+\000|\000b\000+\000)\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 12);
+ x2("\000(\000?\000:\000a\000+\000|\000b\000+\000)\000{\0002\000}\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 12);
+ x2("\000h\000{\0000\000,\000}\000\000", "\000h\000h\000h\000h\000\000", 0, 8);
+ x2("\000(\000?\000:\000a\000+\000|\000b\000+\000)\000{\0001\000,\0002\000}\000\000", "\000a\000a\000a\000b\000b\000b\000\000", 0, 12);
+ n("\000a\000x\000{\0002\000}\000*\000a\000\000", "\0000\000a\000x\000x\000x\000a\0001\000\000");
+ n("\000a\000.\000{\0000\000,\0002\000}\000a\000\000", "\0000\000a\000X\000X\000X\000a\0000\000\000");
+ n("\000a\000.\000{\0000\000,\0002\000}\000?\000a\000\000", "\0000\000a\000X\000X\000X\000a\0000\000\000");
+ n("\000a\000.\000{\0000\000,\0002\000}\000?\000a\000\000", "\0000\000a\000X\000X\000X\000X\000a\0000\000\000");
+ x2("\000^\000a\000{\0002\000,\000}\000?\000a\000$\000\000", "\000a\000a\000a\000\000", 0, 6);
+ x2("\000^\000[\000a\000-\000z\000]\000{\0002\000,\000}\000?\000$\000\000", "\000a\000a\000a\000\000", 0, 6);
+ x2("\000(\000?\000:\000a\000+\000|\000\134\000A\000b\000*\000)\000c\000c\000\000", "\000c\000c\000\000", 0, 4);
+ n("\000(\000?\000:\000a\000+\000|\000\134\000A\000b\000*\000)\000c\000c\000\000", "\000a\000b\000c\000c\000\000");
+ x2("\000(\000?\000:\000^\000a\000+\000|\000b\000+\000)\000*\000c\000\000", "\000a\000a\000b\000b\000b\000a\000b\000c\000\000", 12, 16);
+ x2("\000(\000?\000:\000^\000a\000+\000|\000b\000+\000)\000*\000c\000\000", "\000a\000a\000b\000b\000b\000b\000c\000\000", 0, 14);
+ x2("\000a\000|\000(\000?\000i\000)\000c\000\000", "\000C\000\000", 0, 2);
+ x2("\000(\000?\000i\000)\000c\000|\000a\000\000", "\000C\000\000", 0, 2);
+ x2("\000(\000?\000i\000)\000c\000|\000a\000\000", "\000A\000\000", 0, 2);
+ x2("\000(\000?\000i\000:\000c\000)\000|\000a\000\000", "\000C\000\000", 0, 2);
+ n("\000(\000?\000i\000:\000c\000)\000|\000a\000\000", "\000A\000\000");
+ x2("\000[\000a\000b\000c\000]\000?\000\000", "\000a\000b\000c\000\000", 0, 2);
+ x2("\000[\000a\000b\000c\000]\000*\000\000", "\000a\000b\000c\000\000", 0, 6);
+ x2("\000[\000^\000a\000b\000c\000]\000*\000\000", "\000a\000b\000c\000\000", 0, 0);
+ n("\000[\000^\000a\000b\000c\000]\000+\000\000", "\000a\000b\000c\000\000");
+ x2("\000a\000?\000?\000\000", "\000a\000a\000a\000\000", 0, 0);
+ x2("\000b\000a\000?\000?\000b\000\000", "\000b\000a\000b\000\000", 0, 6);
+ x2("\000a\000*\000?\000\000", "\000a\000a\000a\000\000", 0, 0);
+ x2("\000b\000a\000*\000?\000\000", "\000b\000a\000a\000\000", 0, 2);
+ x2("\000b\000a\000*\000?\000b\000\000", "\000b\000a\000a\000b\000\000", 0, 8);
+ x2("\000a\000+\000?\000\000", "\000a\000a\000a\000\000", 0, 2);
+ x2("\000b\000a\000+\000?\000\000", "\000b\000a\000a\000\000", 0, 4);
+ x2("\000b\000a\000+\000?\000b\000\000", "\000b\000a\000a\000b\000\000", 0, 8);
+ x2("\000(\000?\000:\000a\000?\000)\000?\000?\000\000", "\000a\000\000", 0, 0);
+ x2("\000(\000?\000:\000a\000?\000?\000)\000?\000\000", "\000a\000\000", 0, 0);
+ x2("\000(\000?\000:\000a\000?\000)\000+\000?\000\000", "\000a\000a\000a\000\000", 0, 2);
+ x2("\000(\000?\000:\000a\000+\000)\000?\000?\000\000", "\000a\000a\000a\000\000", 0, 0);
+ x2("\000(\000?\000:\000a\000+\000)\000?\000?\000b\000\000", "\000a\000a\000a\000b\000\000", 0, 8);
+ x2("\000(\000?\000:\000a\000b\000)\000?\000{\0002\000}\000\000", "\000\000", 0, 0);
+ x2("\000(\000?\000:\000a\000b\000)\000?\000{\0002\000}\000\000", "\000a\000b\000a\000b\000a\000\000", 0, 8);
+ x2("\000(\000?\000:\000a\000b\000)\000*\000{\0000\000}\000\000", "\000a\000b\000a\000b\000a\000\000", 0, 0);
+ x2("\000(\000?\000:\000a\000b\000)\000{\0003\000,\000}\000\000", "\000a\000b\000a\000b\000a\000b\000a\000b\000\000", 0, 16);
+ n("\000(\000?\000:\000a\000b\000)\000{\0003\000,\000}\000\000", "\000a\000b\000a\000b\000\000");
+ x2("\000(\000?\000:\000a\000b\000)\000{\0002\000,\0004\000}\000\000", "\000a\000b\000a\000b\000a\000b\000\000", 0, 12);
+ x2("\000(\000?\000:\000a\000b\000)\000{\0002\000,\0004\000}\000\000", "\000a\000b\000a\000b\000a\000b\000a\000b\000a\000b\000\000", 0, 16);
+ x2("\000(\000?\000:\000a\000b\000)\000{\0002\000,\0004\000}\000?\000\000", "\000a\000b\000a\000b\000a\000b\000a\000b\000a\000b\000\000", 0, 8);
+ x2("\000(\000?\000:\000a\000b\000)\000{\000,\000}\000\000", "\000a\000b\000{\000,\000}\000\000", 0, 10);
+ x2("\000(\000?\000:\000a\000b\000c\000)\000+\000?\000{\0002\000}\000\000", "\000a\000b\000c\000a\000b\000c\000a\000b\000c\000\000", 0, 12);
+ x2("\000(\000?\000:\000X\000*\000)\000(\000?\000i\000:\000x\000a\000)\000\000", "\000X\000X\000X\000a\000\000", 0, 8);
+ x2("\000(\000d\000+\000)\000(\000[\000^\000a\000b\000c\000]\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
+ x2("\000(\000[\000^\000a\000b\000c\000]\000*\000)\000(\000[\000^\000a\000b\000c\000]\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
+ x2("\000(\000\134\000w\000+\000)\000(\000\134\000w\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
+ x3("\000(\000a\000)\000\000", "\000a\000\000", 0, 2, 1);
+ x3("\000(\000a\000b\000)\000\000", "\000a\000b\000\000", 0, 4, 1);
+ x2("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4);
+ x3("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4, 1);
+ x3("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4, 2);
+ x3("\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000a\000b\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000\000", "\000a\000b\000\000", 0, 4, 20);
+ x3("\000(\000a\000b\000)\000(\000c\000d\000)\000\000", "\000a\000b\000c\000d\000\000", 0, 4, 1);
+ x3("\000(\000a\000b\000)\000(\000c\000d\000)\000\000", "\000a\000b\000c\000d\000\000", 4, 8, 2);
+ x3("\000(\000)\000(\000a\000)\000b\000c\000(\000d\000e\000f\000)\000g\000h\000i\000j\000k\000\000", "\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000\000", 6, 12, 3);
+ x3("\000(\000(\000)\000(\000a\000)\000b\000c\000(\000d\000e\000f\000)\000g\000h\000i\000j\000k\000)\000\000", "\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000\000", 6, 12, 4);
+ x2("\000(\000^\000a\000)\000\000", "\000a\000\000", 0, 2);
+ x3("\000(\000a\000)\000|\000(\000a\000)\000\000", "\000b\000a\000\000", 2, 4, 1);
+ x3("\000(\000^\000a\000)\000|\000(\000a\000)\000\000", "\000b\000a\000\000", 2, 4, 2);
+ x3("\000(\000a\000?\000)\000\000", "\000a\000a\000a\000\000", 0, 2, 1);
+ x3("\000(\000a\000*\000)\000\000", "\000a\000a\000a\000\000", 0, 6, 1);
+ x3("\000(\000a\000*\000)\000\000", "\000\000", 0, 0, 1);
+ x3("\000(\000a\000+\000)\000\000", "\000a\000a\000a\000a\000a\000a\000a\000\000", 0, 14, 1);
+ x3("\000(\000a\000+\000|\000b\000*\000)\000\000", "\000b\000b\000b\000a\000a\000\000", 0, 6, 1);
+ x3("\000(\000a\000+\000|\000b\000?\000)\000\000", "\000b\000b\000b\000a\000a\000\000", 0, 2, 1);
+ x3("\000(\000a\000b\000c\000)\000?\000\000", "\000a\000b\000c\000\000", 0, 6, 1);
+ x3("\000(\000a\000b\000c\000)\000*\000\000", "\000a\000b\000c\000\000", 0, 6, 1);
+ x3("\000(\000a\000b\000c\000)\000+\000\000", "\000a\000b\000c\000\000", 0, 6, 1);
+ x3("\000(\000x\000y\000z\000|\000a\000b\000c\000)\000+\000\000", "\000a\000b\000c\000\000", 0, 6, 1);
+ x3("\000(\000[\000x\000y\000z\000]\000[\000a\000b\000c\000]\000|\000a\000b\000c\000)\000+\000\000", "\000a\000b\000c\000\000", 0, 6, 1);
+ x3("\000(\000(\000?\000i\000:\000a\000b\000c\000)\000)\000\000", "\000A\000b\000C\000\000", 0, 6, 1);
+ x2("\000(\000a\000b\000c\000)\000(\000?\000i\000:\000\134\0001\000)\000\000", "\000a\000b\000c\000A\000B\000C\000\000", 0, 12);
+ x3("\000(\000(\000?\000m\000:\000a\000.\000c\000)\000)\000\000", "\000a\000\012\000c\000\000", 0, 6, 1);
+ x3("\000(\000(\000?\000=\000a\000z\000)\000a\000)\000\000", "\000a\000z\000b\000\000", 0, 2, 1);
+ x3("\000a\000b\000c\000|\000(\000.\000a\000b\000d\000)\000\000", "\000z\000a\000b\000d\000\000", 0, 8, 1);
+ x2("\000(\000?\000:\000a\000b\000c\000)\000|\000(\000A\000B\000C\000)\000\000", "\000a\000b\000c\000\000", 0, 6);
+ x3("\000(\000?\000i\000:\000(\000a\000b\000c\000)\000)\000|\000(\000z\000z\000z\000)\000\000", "\000A\000B\000C\000\000", 0, 6, 1);
+ x3("\000a\000*\000(\000.\000)\000\000", "\000a\000a\000a\000a\000z\000\000", 8, 10, 1);
+ x3("\000a\000*\000?\000(\000.\000)\000\000", "\000a\000a\000a\000a\000z\000\000", 0, 2, 1);
+ x3("\000a\000*\000?\000(\000c\000)\000\000", "\000a\000a\000a\000a\000c\000\000", 8, 10, 1);
+ x3("\000[\000b\000c\000d\000]\000a\000*\000(\000.\000)\000\000", "\000c\000a\000a\000a\000a\000z\000\000", 10, 12, 1);
+ x3("\000(\000\134\000A\000b\000b\000)\000c\000c\000\000", "\000b\000b\000c\000c\000\000", 0, 4, 1);
+ n("\000(\000\134\000A\000b\000b\000)\000c\000c\000\000", "\000z\000b\000b\000c\000c\000\000");
+ x3("\000(\000^\000b\000b\000)\000c\000c\000\000", "\000b\000b\000c\000c\000\000", 0, 4, 1);
+ n("\000(\000^\000b\000b\000)\000c\000c\000\000", "\000z\000b\000b\000c\000c\000\000");
+ x3("\000c\000c\000(\000b\000b\000$\000)\000\000", "\000c\000c\000b\000b\000\000", 4, 8, 1);
+ n("\000c\000c\000(\000b\000b\000$\000)\000\000", "\000c\000c\000b\000b\000b\000\000");
+ n("\000(\000\134\0001\000)\000\000", "\000\000");
+ n("\000\134\0001\000(\000a\000)\000\000", "\000a\000a\000\000");
+ n("\000(\000a\000(\000b\000)\000\134\0001\000)\000\134\0002\000+\000\000", "\000a\000b\000a\000b\000b\000\000");
+ n("\000(\000?\000:\000(\000?\000:\000\134\0001\000|\000z\000)\000(\000a\000)\000)\000+\000$\000\000", "\000z\000a\000a\000\000");
+ x2("\000(\000?\000:\000(\000?\000:\000\134\0001\000|\000z\000)\000(\000a\000)\000)\000+\000$\000\000", "\000z\000a\000a\000a\000\000", 0, 8);
+ x2("\000(\000a\000)\000(\000?\000=\000\134\0001\000)\000\000", "\000a\000a\000\000", 0, 2);
+ n("\000(\000a\000)\000$\000|\000\134\0001\000\000", "\000a\000z\000\000");
+ x2("\000(\000a\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 4);
+ n("\000(\000a\000)\000\134\0001\000\000", "\000a\000b\000\000");
+ x2("\000(\000a\000?\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 4);
+ x2("\000(\000a\000?\000?\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 0);
+ x2("\000(\000a\000*\000)\000\134\0001\000\000", "\000a\000a\000a\000a\000a\000\000", 0, 8);
+ x3("\000(\000a\000*\000)\000\134\0001\000\000", "\000a\000a\000a\000a\000a\000\000", 0, 4, 1);
+ x2("\000a\000(\000b\000*\000)\000\134\0001\000\000", "\000a\000b\000b\000b\000b\000\000", 0, 10);
+ x2("\000a\000(\000b\000*\000)\000\134\0001\000\000", "\000a\000b\000\000", 0, 2);
+ x2("\000(\000a\000*\000)\000(\000b\000*\000)\000\134\0001\000\134\0002\000\000", "\000a\000a\000a\000b\000b\000a\000a\000a\000b\000b\000\000", 0, 20);
+ x2("\000(\000a\000*\000)\000(\000b\000*\000)\000\134\0002\000\000", "\000a\000a\000a\000b\000b\000b\000b\000\000", 0, 14);
+ x2("\000(\000(\000(\000(\000(\000(\000(\000a\000*\000)\000b\000)\000)\000)\000)\000)\000)\000c\000\134\0007\000\000", "\000a\000a\000a\000b\000c\000a\000a\000a\000\000", 0, 16);
+ x3("\000(\000(\000(\000(\000(\000(\000(\000a\000*\000)\000b\000)\000)\000)\000)\000)\000)\000c\000\134\0007\000\000", "\000a\000a\000a\000b\000c\000a\000a\000a\000\000", 0, 6, 7);
+ x2("\000(\000a\000)\000(\000b\000)\000(\000c\000)\000\134\0002\000\134\0001\000\134\0003\000\000", "\000a\000b\000c\000b\000a\000c\000\000", 0, 12);
+ x2("\000(\000[\000a\000-\000d\000]\000)\000\134\0001\000\000", "\000c\000c\000\000", 0, 4);
+ x2("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000 \000\000", 0, 12);
+ n("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000\000");
+ x2("\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000w\000h\000o\000w\000h\000o\000\000", 0, 12);
+ x2("\000.\000.\000.\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000a\000b\000c\000w\000h\000o\000w\000h\000o\000\000", 0, 18);
+ x2("\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000c\000b\000c\000c\000b\000c\000\000", 0, 12);
+ x2("\000(\000^\000a\000)\000\134\0001\000\000", "\000a\000a\000\000", 0, 4);
+ n("\000(\000^\000a\000)\000\134\0001\000\000", "\000b\000a\000a\000\000");
+ n("\000(\000a\000$\000)\000\134\0001\000\000", "\000a\000a\000\000");
+ n("\000(\000a\000b\000\134\000Z\000)\000\134\0001\000\000", "\000a\000b\000\000");
+ x2("\000(\000a\000*\000\134\000Z\000)\000\134\0001\000\000", "\000a\000\000", 2, 2);
+ x2("\000.\000(\000a\000*\000\134\000Z\000)\000\134\0001\000\000", "\000b\000a\000\000", 2, 4);
+ x3("\000(\000.\000(\000a\000b\000c\000)\000\134\0002\000)\000\000", "\000z\000a\000b\000c\000a\000b\000c\000\000", 0, 14, 1);
+ x3("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "\000z\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1);
+ x2("\000(\000(\000?\000i\000:\000a\000z\000)\000)\000\134\0001\000\000", "\000A\000z\000A\000z\000\000", 0, 8);
+ n("\000(\000(\000?\000i\000:\000a\000z\000)\000)\000\134\0001\000\000", "\000A\000z\000a\000z\000\000");
+ x2("\000(\000?\000<\000=\000a\000)\000b\000\000", "\000a\000b\000\000", 2, 4);
+ n("\000(\000?\000<\000=\000a\000)\000b\000\000", "\000b\000b\000\000");
+ x2("\000(\000?\000<\000=\000a\000|\000b\000)\000b\000\000", "\000b\000b\000\000", 2, 4);
+ x2("\000(\000?\000<\000=\000a\000|\000b\000c\000)\000b\000\000", "\000b\000c\000b\000\000", 4, 6);
+ x2("\000(\000?\000<\000=\000a\000|\000b\000c\000)\000b\000\000", "\000a\000b\000\000", 2, 4);
+ x2("\000(\000?\000<\000=\000a\000|\000b\000c\000|\000|\000d\000e\000f\000g\000h\000i\000j\000|\000k\000l\000m\000n\000o\000p\000q\000|\000r\000)\000z\000\000", "\000r\000z\000\000", 2, 4);
+ x2("\000(\000a\000)\000\134\000g\000<\0001\000>\000\000", "\000a\000a\000\000", 0, 4);
+ x2("\000(\000?\000<\000!\000a\000)\000b\000\000", "\000c\000b\000\000", 2, 4);
+ n("\000(\000?\000<\000!\000a\000)\000b\000\000", "\000a\000b\000\000");
+ x2("\000(\000?\000<\000!\000a\000|\000b\000c\000)\000b\000\000", "\000b\000b\000b\000\000", 0, 2);
+ n("\000(\000?\000<\000!\000a\000|\000b\000c\000)\000z\000\000", "\000b\000c\000z\000\000");
+ x2("\000(\000?\000<\000n\000a\000m\000e\0001\000>\000a\000)\000\000", "\000a\000\000", 0, 2);
+ x2("\000(\000?\000<\000n\000a\000m\000e\000_\0002\000>\000a\000b\000)\000\134\000g\000<\000n\000a\000m\000e\000_\0002\000>\000\000", "\000a\000b\000a\000b\000\000", 0, 8);
+ x2("\000(\000?\000<\000n\000a\000m\000e\000_\0003\000>\000.\000z\000v\000.\000)\000\134\000k\000<\000n\000a\000m\000e\000_\0003\000>\000\000", "\000a\000z\000v\000b\000a\000z\000v\000b\000\000", 0, 16);
+ x2("\000(\000?\000<\000=\000\134\000g\000<\000a\000b\000>\000)\000|\000-\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000a\000b\000>\000X\000y\000Z\000)\000\000", "\000X\000y\000Z\000\000", 6, 6);
+ x2("\000(\000?\000<\000n\000>\000|\000a\000\134\000g\000<\000n\000>\000)\000+\000\000", "\000\000", 0, 0);
+ x2("\000(\000?\000<\000n\000>\000|\000\134\000(\000\134\000g\000<\000n\000>\000\134\000)\000)\000+\000$\000\000", "\000(\000)\000(\000(\000)\000)\000\000", 0, 12);
+ x3("\000\134\000g\000<\000n\000>\000(\000?\000<\000n\000>\000.\000)\000{\0000\000}\000\000", "\000X\000\000", 0, 2, 1);
+ x2("\000\134\000g\000<\000n\000>\000(\000a\000b\000c\000|\000d\000f\000(\000?\000<\000n\000>\000.\000Y\000Z\000)\000{\0002\000,\0008\000}\000)\000{\0000\000}\000\000", "\000X\000Y\000Z\000\000", 0, 6);
+ x2("\000\134\000A\000(\000?\000<\000n\000>\000(\000a\000\134\000g\000<\000n\000>\000)\000|\000)\000\134\000z\000\000", "\000a\000a\000a\000a\000\000", 0, 8);
+ x2("\000(\000?\000<\000n\000>\000|\000\134\000g\000<\000m\000>\000\134\000g\000<\000n\000>\000)\000\134\000z\000|\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000m\000>\000a\000|\000(\000b\000)\000\134\000g\000<\000m\000>\000)\000\000", "\000b\000b\000b\000b\000a\000b\000b\000a\000\000", 0, 16);
+ x2("\000(\000?\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\134\000w\000+\000\134\000s\000x\000)\000a\000+\000\134\000k\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\000", "\000 \000 \000f\000g\000 \000x\000a\000a\000a\000a\000a\000a\000a\000a\000f\000g\000 \000x\000\000", 4, 36);
+ x3("\000(\000z\000)\000(\000)\000(\000)\000(\000?\000<\000_\0009\000>\000a\000)\000\134\000g\000<\000_\0009\000>\000\000", "\000z\000a\000a\000\000", 4, 6, 1);
+ x2("\000(\000.\000)\000(\000(\000(\000?\000<\000_\000>\000a\000)\000)\000)\000\134\000k\000<\000_\000>\000\000", "\000z\000a\000a\000\000", 0, 6);
+ x2("\000(\000(\000?\000<\000n\000a\000m\000e\0001\000>\000\134\000d\000)\000|\000(\000?\000<\000n\000a\000m\000e\0002\000>\000\134\000w\000)\000)\000(\000\134\000k\000<\000n\000a\000m\000e\0001\000>\000|\000\134\000k\000<\000n\000a\000m\000e\0002\000>\000)\000\000", "\000f\000f\000\000", 0, 4);
+ x2("\000(\000?\000:\000(\000?\000<\000x\000>\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000\000", 0, 0);
+ x2("\000(\000?\000:\000(\000?\000<\000x\000>\000a\000b\000c\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000a\000b\000c\000e\000f\000g\000e\000f\000g\000\000", 6, 18);
+ n("\000(\000?\000:\000(\000?\000<\000x\000>\000a\000b\000c\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000a\000b\000c\000e\000f\000g\000\000");
+ x2("\000(\000?\000:\000(\000?\000<\000n\0001\000>\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000)\000\134\000k\000<\000n\0001\000>\000$\000\000", "\000a\000-\000p\000y\000u\000m\000p\000y\000u\000m\000\000", 4, 20);
+ x3("\000(\000?\000:\000(\000?\000<\000n\0001\000>\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000|\000(\000?\000<\000n\0001\000>\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000.\000)\000)\000\134\000k\000<\000n\0001\000>\000$\000\000", "\000x\000x\000x\000x\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000l\000m\000n\000a\000b\000c\000d\000e\000f\000g\000h\000i\000j\000k\000l\000m\000n\000\000", 8, 36, 14);
+ x3("\000(\000?\000<\000n\000a\000m\000e\0001\000>\000)\000(\000?\000<\000n\000a\000m\000e\0002\000>\000)\000(\000?\000<\000n\000a\000m\000e\0003\000>\000)\000(\000?\000<\000n\000a\000m\000e\0004\000>\000)\000(\000?\000<\000n\000a\000m\000e\0005\000>\000)\000(\000?\000<\000n\000a\000m\000e\0006\000>\000)\000(\000?\000<\000n\000a\000m\000e\0007\000>\000)\000(\000?\000<\000n\000a\000m\000e\0008\000>\000)\000(\000?\000<\000n\000a\000m\000e\0009\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0000\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0001\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0002\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0003\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0004\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0005\000>\000)\000(\000?\000<\000n\000a\000m\000e\0001\0006\000>\000a\000a\000a\000)\000(\000?\000<\000n\000a\000m\000e\0001\0007\000>\000)\000$\000\000", "\000a\000a\000a\000\000", 0, 6, 16);
+ x2("\000(\000?\000<\000f\000o\000o\000>\000a\000|\000\134\000(\000\134\000g\000<\000f\000o\000o\000>\000\134\000)\000)\000\000", "\000a\000\000", 0, 2);
+ x2("\000(\000?\000<\000f\000o\000o\000>\000a\000|\000\134\000(\000\134\000g\000<\000f\000o\000o\000>\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(\000a\000)\000)\000)\000)\000)\000)\000\000", 0, 26);
+ x3("\000(\000?\000<\000f\000o\000o\000>\000a\000|\000\134\000(\000\134\000g\000<\000f\000o\000o\000>\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(\000(\000(\000a\000)\000)\000)\000)\000)\000)\000)\000)\000\000", 0, 34, 1);
+ x2("\000\134\000g\000<\000b\000a\000r\000>\000|\000\134\000z\000E\000N\000D\000(\000?\000<\000b\000a\000r\000>\000.\000*\000a\000b\000c\000$\000)\000\000", "\000a\000b\000c\000x\000x\000x\000a\000b\000c\000\000", 0, 18);
+ x2("\000\134\000g\000<\0001\000>\000|\000\134\000z\000E\000N\000D\000(\000.\000a\000.\000)\000\000", "\000b\000a\000c\000\000", 0, 6);
+ x3("\000\134\000g\000<\000_\000A\000>\000\134\000g\000<\000_\000A\000>\000|\000\134\000z\000E\000N\000D\000(\000.\000a\000.\000)\000(\000?\000<\000_\000A\000>\000.\000b\000.\000)\000\000", "\000x\000b\000x\000y\000b\000y\000\000", 6, 12, 1);
+ x2("\000\134\000A\000(\000?\000:\000\134\000g\000<\000p\000o\000n\000>\000|\000\134\000g\000<\000p\000a\000n\000>\000|\000\134\000z\000E\000N\000D\000 \000 \000(\000?\000<\000p\000a\000n\000>\000a\000|\000c\000\134\000g\000<\000p\000o\000n\000>\000c\000)\000(\000?\000<\000p\000o\000n\000>\000b\000|\000d\000\134\000g\000<\000p\000a\000n\000>\000d\000)\000)\000$\000\000", "\000c\000d\000c\000b\000c\000d\000c\000\000", 0, 14);
+ x2("\000\134\000A\000(\000?\000<\000n\000>\000|\000a\000\134\000g\000<\000m\000>\000)\000\134\000z\000|\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000m\000>\000\134\000g\000<\000n\000>\000)\000\000", "\000a\000a\000a\000a\000\000", 0, 8);
+ x2("\000(\000?\000<\000n\000>\000(\000a\000|\000b\000\134\000g\000<\000n\000>\000c\000)\000{\0003\000,\0005\000}\000)\000\000", "\000b\000a\000a\000a\000a\000c\000a\000\000", 2, 10);
+ x2("\000(\000?\000<\000n\000>\000(\000a\000|\000b\000\134\000g\000<\000n\000>\000c\000)\000{\0003\000,\0005\000}\000)\000\000", "\000b\000a\000a\000a\000a\000c\000a\000a\000a\000a\000a\000\000", 0, 20);
+ x2("\000(\000?\000<\000p\000a\000r\000e\000>\000\134\000(\000(\000[\000^\000\134\000(\000\134\000)\000]\000+\000+\000|\000\134\000g\000<\000p\000a\000r\000e\000>\000)\000*\000+\000\134\000)\000)\000\000", "\000(\000(\000a\000)\000)\000\000", 0, 10);
+ x2("\000(\000)\000*\000\134\0001\000\000", "\000\000", 0, 0);
+ x2("\000(\000?\000:\000(\000)\000|\000(\000)\000)\000*\000\134\0001\000\134\0002\000\000", "\000\000", 0, 0);
+ x3("\000(\000?\000:\000\134\0001\000a\000|\000(\000)\000)\000*\000\000", "\000a\000\000", 0, 0, 1);
+ x2("\000x\000(\000(\000.\000)\000*\000)\000*\000x\000\000", "\0000\000x\0001\000x\0002\000x\0003\000\000", 2, 12);
+ x2("\000x\000(\000(\000.\000)\000*\000)\000*\000x\000(\000?\000i\000:\000\134\0001\000)\000\134\000Z\000\000", "\0000\000x\0001\000x\0002\000x\0001\000X\0002\000\000", 2, 18);
+ x2("\000(\000?\000:\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000)\000)\000*\000\134\0002\000\134\0005\000\000", "\000\000", 0, 0);
+ x2("\000(\000?\000:\000(\000)\000|\000(\000)\000|\000(\000)\000|\000(\000x\000)\000|\000(\000)\000|\000(\000)\000)\000*\000\134\0002\000b\000\134\0005\000\000", "\000b\000\000", 0, 2);
+ x2("\217\372\000\000", "\217\372\000\000", 0, 2);
+ x2("\000\000", "0B\000\000", 0, 0);
+ x2("0B\000\000", "0B\000\000", 0, 2);
+ n("0D\000\000", "0B\000\000");
+ x2("0F0F\000\000", "0F0F\000\000", 0, 4);
+ x2("0B0D0F\000\000", "0B0D0F\000\000", 0, 6);
+ x2("0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S\000\000", "0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S0S\000\000", 0, 70);
+ x2("0B\000\000", "0D0B\000\000", 2, 4);
+ x2("0D0F\000\000", "0B0D0F\000\000", 2, 6);
+ x2("e\207\000\000", "e\207\000\000", 0, 2);
+ x2("\000.\000\000", "0B\000\000", 0, 2);
+ x2("\000.\000.\000\000", "0K0M\000\000", 0, 4);
+ x2("\000\134\000w\000\000", "0J\000\000", 0, 2);
+ n("\000\134\000W\000\000", "0B\000\000");
+ x2("\000[\000\134\000W\000]\000\000", "0F\000$\000\000", 2, 4);
+ x2("\000\134\000S\000\000", "0]\000\000", 0, 2);
+ x2("\000\134\000S\000\000", "o\042\000\000", 0, 2);
+ x2("\000\134\000b\000\000", "l\027\000 \000\000", 0, 0);
+ x2("\000\134\000b\000\000", "\000 0{\000\000", 2, 2);
+ x2("\000\134\000B\000\000", "0[0]\000 \000\000", 2, 2);
+ x2("\000\134\000B\000\000", "0F\000 \000\000", 4, 4);
+ x2("\000\134\000B\000\000", "\000 0D\000\000", 0, 0);
+ x2("\000[0_0a\000]\000\000", "0a\000\000", 0, 2);
+ n("\000[0j0k\000]\000\000", "0l\000\000");
+ x2("\000[0F\000-0J\000]\000\000", "0H\000\000", 0, 2);
+ n("\000[\000^0Q\000]\000\000", "0Q\000\000");
+ x2("\000[\000\134\000w\000]\000\000", "0m\000\000", 0, 2);
+ n("\000[\000\134\000d\000]\000\000", "0u\000\000");
+ x2("\000[\000\134\000D\000]\000\000", "0o\000\000", 0, 2);
+ n("\000[\000\134\000s\000]\000\000", "0O\000\000");
+ x2("\000[\000\134\000S\000]\000\000", "0x\000\000", 0, 2);
+ x2("\000[\000\134\000w\000\134\000d\000]\000\000", "0\210\000\000", 0, 2);
+ x2("\000[\000\134\000w\000\134\000d\000]\000\000", "\000 \000 \000 0\210\000\000", 6, 8);
+ n("\000\134\000w\233<\216\312\000\000", "\000 \233<\216\312\000\000");
+ x2("\233<\000\134\000W\216\312\000\000", "\233<\000 \216\312\000\000", 0, 6);
+ x2("0B\000.0D\000.0F\000\000", "0B0B0D0D0F\000\000", 0, 10);
+ x2("\000.\000\134\000w0F\000\134\000W\000.\000.0^\000\000", "0H0F0F\000 0F0^0^\000\000", 0, 14);
+ x2("\000\134\000s\000\134\000w0S0S0S\000\000", "\000 0S0S0S0S\000\000", 0, 10);
+ x2("0B0B\000.0Q\000\000", "0B0B0Q0Q\000\000", 0, 8);
+ n("\000.0D\000\000", "0D0H\000\000");
+ x2("\000.0J\000\000", "0J0J\000\000", 0, 4);
+ x2("\000^0B\000\000", "0B\000\000", 0, 2);
+ x2("\000^0\200\000$\000\000", "0\200\000\000", 0, 2);
+ x2("\000^\000\134\000w\000$\000\000", "0k\000\000", 0, 2);
+ x2("\000^\000\134\000w0K0M0O0Q0S\000$\000\000", "\000z0K0M0O0Q0S\000\000", 0, 12);
+ x2("\000^\000\134\000w\000.\000.\000.0F0H0J\000$\000\000", "\000z0B0D0F0F0H0J\000\000", 0, 14);
+ x2("\000\134\000w\000\134\000w\000\134\000s\000\134\000W0J0J0J\000\134\000d\000\000", "\000a0J\000 \000 0J0J0J\0004\000\000", 0, 16);
+ x2("\000\134\000A0_0a0d\000\000", "0_0a0d\000\000", 0, 6);
+ x2("0\2000\2010\202\000\134\000Z\000\000", "0\2000\2010\202\000\000", 0, 6);
+ x2("0K0M0O\000\134\000z\000\000", "0K0M0O\000\000", 0, 6);
+ x2("0K0M0O\000\134\000Z\000\000", "0K0M0O\000\012\000\000", 0, 6);
+ x2("\000\134\000G0}0t\000\000", "0}0t\000\000", 0, 4);
+ n("\000\134\000G0H\000\000", "0F0H0J\000\000");
+ n("0h0f\000\134\000G\000\000", "0h0f\000\000");
+ n("0~0\177\000\134\000A\000\000", "0~0\177\000\000");
+ n("0~\000\134\000A0\177\000\000", "0~0\177\000\000");
+ x2("\000(\000?\000=0[\000)0[\000\000", "0[\000\000", 0, 2);
+ n("\000(\000?\000=0F\000)\000.\000\000", "0D\000\000");
+ x2("\000(\000?\000!0F\000)0K\000\000", "0K\000\000", 0, 2);
+ n("\000(\000?\000!0h\000)0B\000\000", "0h\000\000");
+ x2("\000(\000?\000i\000:0B\000)\000\000", "0B\000\000", 0, 2);
+ x2("\000(\000?\000i\000:0v0y\000)\000\000", "0v0y\000\000", 0, 4);
+ n("\000(\000?\000i\000:0D\000)\000\000", "0F\000\000");
+ x2("\000(\000?\000m\000:0\210\000.\000)\000\000", "0\210\000\012\000\000", 0, 4);
+ x2("\000(\000?\000m\000:\000.0\201\000)\000\000", "0~\000\0120\201\000\000", 2, 6);
+ x2("0B\000?\000\000", "\000\000", 0, 0);
+ x2("Y\011\000?\000\000", "S\026\000\000", 0, 0);
+ x2("Y\011\000?\000\000", "Y\011\000\000", 0, 2);
+ x2("\221\317\000*\000\000", "\000\000", 0, 0);
+ x2("\221\317\000*\000\000", "\221\317\000\000", 0, 2);
+ x2("[P\000*\000\000", "[P[P[P\000\000", 0, 6);
+ x2("\231\254\000*\000\000", "\236\177\231\254\231\254\231\254\231\254\000\000", 0, 0);
+ n("\134q\000+\000\000", "\000\000");
+ x2("l\263\000+\000\000", "l\263\000\000", 0, 2);
+ x2("fB\000+\000\000", "fBfBfBfB\000\000", 0, 8);
+ x2("0H\000+\000\000", "0H0H0F0F0F\000\000", 0, 4);
+ x2("0F\000+\000\000", "0J0F0F0F0F\000\000", 2, 10);
+ x2("\000.\000?\000\000", "0_\000\000", 0, 2);
+ x2("\000.\000*\000\000", "0q0t0w0z\000\000", 0, 8);
+ x2("\000.\000+\000\000", "0\215\000\000", 0, 2);
+ x2("\000.\000+\000\000", "0D0F0H0K\000\012\000\000", 0, 8);
+ x2("0B\000|0D\000\000", "0B\000\000", 0, 2);
+ x2("0B\000|0D\000\000", "0D\000\000", 0, 2);
+ x2("0B0D\000|0D0F\000\000", "0B0D\000\000", 0, 4);
+ x2("0B0D\000|0D0F\000\000", "0D0F\000\000", 0, 4);
+ x2("0\222\000(\000?\000:0K0M\000|0M0O\000)\000\000", "0\2220K0M\000\000", 0, 6);
+ x2("0\222\000(\000?\000:0K0M\000|0M0O\000)0Q\000\000", "0\2220M0O0Q\000\000", 0, 8);
+ x2("0B0D\000|\000(\000?\000:0B0F\000|0B0\222\000)\000\000", "0B0\222\000\000", 0, 4);
+ x2("0B\000|0D\000|0F\000\000", "0H0F\000\000", 2, 4);
+ x2("0B\000|0D\000|0F0H\000|0J0K0M\000|0O\000|0Q0S0U\000|0W0Y0[\000|0]\000|0_0a\000|0d0f0h0j0k\000|0l0m\000\000", "0W0Y0[\000\000", 0, 6);
+ n("0B\000|0D\000|0F0H\000|0J0K0M\000|0O\000|0Q0S0U\000|0W0Y0[\000|0]\000|0_0a\000|0d0f0h0j0k\000|0l0m\000\000", "0Y0[\000\000");
+ x2("0B\000|\000^0\217\000\000", "0v0B\000\000", 2, 4);
+ x2("0B\000|\000^0\222\000\000", "0\2220B\000\000", 0, 2);
+ x2("\233<\000|\000\134\000G\216\312\000\000", "0Q\216\312\233<\000\000", 4, 6);
+ x2("\233<\000|\000\134\000G\216\312\000\000", "\216\312\233<\000\000", 0, 2);
+ x2("\233<\000|\000\134\000A\216\312\000\000", "\000b\216\312\233<\000\000", 4, 6);
+ x2("\233<\000|\000\134\000A\216\312\000\000", "\216\312\000\000", 0, 2);
+ x2("\233<\000|\216\312\000\134\000Z\000\000", "\216\312\233<\000\000", 2, 4);
+ x2("\233<\000|\216\312\000\134\000Z\000\000", "\216\312\000\000", 0, 2);
+ x2("\233<\000|\216\312\000\134\000Z\000\000", "\216\312\000\012\000\000", 0, 2);
+ x2("\233<\000|\216\312\000\134\000z\000\000", "\216\312\233<\000\000", 2, 4);
+ x2("\233<\000|\216\312\000\134\000z\000\000", "\216\312\000\000", 0, 2);
+ x2("\000\134\000w\000|\000\134\000s\000\000", "0J\000\000", 0, 2);
+ x2("\000\134\000w\000|\000%\000\000", "\000%0J\000\000", 0, 2);
+ x2("\000\134\000w\000|\000[\000&\000$\000]\000\000", "0F\000&\000\000", 0, 2);
+ x2("\000[0D\000-0Q\000]\000\000", "0F\000\000", 0, 2);
+ x2("\000[0D\000-0Q\000]\000|\000[\000^0K\000-0S\000]\000\000", "0B\000\000", 0, 2);
+ x2("\000[0D\000-0Q\000]\000|\000[\000^0K\000-0S\000]\000\000", "0K\000\000", 0, 2);
+ x2("\000[\000^0B\000]\000\000", "\000\012\000\000", 0, 2);
+ x2("\000(\000?\000:0B\000|\000[0F\000-0M\000]\000)\000|0D0\222\000\000", "0F0\222\000\000", 0, 2);
+ x2("\000(\000?\000:0B\000|\000[0F\000-0M\000]\000)\000|0D0\222\000\000", "0D0\222\000\000", 0, 4);
+ x2("0B0D0F\000|\000(\000?\000=0Q0Q\000)\000.\000.0{\000\000", "0Q0Q0{\000\000", 0, 6);
+ x2("0B0D0F\000|\000(\000?\000!0Q0Q\000)\000.\000.0{\000\000", "0B0D0{\000\000", 0, 6);
+ x2("\000(\000?\000=0\2220B\000)\000.\000.0B\000|\000(\000?\000=0\2220\222\000)\000.\000.0B\000\000", "0\2220\2220B\000\000", 0, 6);
+ x2("\000(\000?\000<\000=0B\000|0D0F\000)0D\000\000", "0D0F0D\000\000", 4, 6);
+ n("\000(\000?\000>0B\000|0B0D0H\000)0F\000\000", "0B0D0H0F\000\000");
+ x2("\000(\000?\000>0B0D0H\000|0B\000)0F\000\000", "0B0D0H0F\000\000", 0, 8);
+ x2("0B\000?\000|0D\000\000", "0B\000\000", 0, 2);
+ x2("0B\000?\000|0D\000\000", "0D\000\000", 0, 0);
+ x2("0B\000?\000|0D\000\000", "\000\000", 0, 0);
+ x2("0B\000*\000|0D\000\000", "0B0B\000\000", 0, 4);
+ x2("0B\000*\000|0D\000*\000\000", "0D0B\000\000", 0, 0);
+ x2("0B\000*\000|0D\000*\000\000", "0B0D\000\000", 0, 2);
+ x2("\000[\000a0B\000]\000*\000|0D\000*\000\000", "\000a0B0D0D0D\000\000", 0, 4);
+ x2("0B\000+\000|0D\000*\000\000", "\000\000", 0, 0);
+ x2("0B\000+\000|0D\000*\000\000", "0D0D0D\000\000", 0, 6);
+ x2("0B\000+\000|0D\000*\000\000", "0B0D0D0D\000\000", 0, 2);
+ x2("0B\000+\000|0D\000*\000\000", "\000a0B0D0D0D\000\000", 0, 0);
+ n("0B\000+\000|0D\000+\000\000", "\000\000");
+ x2("\000(0B\000|0D\000)\000?\000\000", "0D\000\000", 0, 2);
+ x2("\000(0B\000|0D\000)\000*\000\000", "0D0B\000\000", 0, 4);
+ x2("\000(0B\000|0D\000)\000+\000\000", "0D0B0D\000\000", 0, 6);
+ x2("\000(0B0D\000|0F0B\000)\000+\000\000", "0F0B0B0D0F0H\000\000", 0, 8);
+ x2("\000(0B0D\000|0F0H\000)\000+\000\000", "0F0B0B0D0F0H\000\000", 4, 12);
+ x2("\000(0B0D\000|0F0B\000)\000+\000\000", "0B0B0D0F0B\000\000", 2, 10);
+ x2("\000(0B0D\000|0F0B\000)\000+\000\000", "0B0D0\2220F0B\000\000", 0, 4);
+ x2("\000(0B0D\000|0F0B\000)\000+\000\000", "\000$\000$\000z\000z\000z\000z0B0D0\2220F0B\000\000", 12, 16);
+ x2("\000(0B\000|0D0B0D\000)\000+\000\000", "0B0D0B0D0B\000\000", 0, 10);
+ x2("\000(0B\000|0D0B0D\000)\000+\000\000", "0D0B\000\000", 2, 4);
+ x2("\000(0B\000|0D0B0D\000)\000+\000\000", "0D0B0B0B0D0B\000\000", 2, 8);
+ x2("\000(\000?\000:0B\000|0D\000)\000(\000?\000:0B\000|0D\000)\000\000", "0B0D\000\000", 0, 4);
+ x2("\000(\000?\000:0B\000*\000|0D\000*\000)\000(\000?\000:0B\000*\000|0D\000*\000)\000\000", "0B0B0B0D0D0D\000\000", 0, 6);
+ x2("\000(\000?\000:0B\000*\000|0D\000*\000)\000(\000?\000:0B\000+\000|0D\000+\000)\000\000", "0B0B0B0D0D0D\000\000", 0, 12);
+ x2("\000(\000?\000:0B\000+\000|0D\000+\000)\000{\0002\000}\000\000", "0B0B0B0D0D0D\000\000", 0, 12);
+ x2("\000(\000?\000:0B\000+\000|0D\000+\000)\000{\0001\000,\0002\000}\000\000", "0B0B0B0D0D0D\000\000", 0, 12);
+ x2("\000(\000?\000:0B\000+\000|\000\134\000A0D\000*\000)0F0F\000\000", "0F0F\000\000", 0, 4);
+ n("\000(\000?\000:0B\000+\000|\000\134\000A0D\000*\000)0F0F\000\000", "0B0D0F0F\000\000");
+ x2("\000(\000?\000:\000^0B\000+\000|0D\000+\000)\000*0F\000\000", "0B0B0D0D0D0B0D0F\000\000", 12, 16);
+ x2("\000(\000?\000:\000^0B\000+\000|0D\000+\000)\000*0F\000\000", "0B0B0D0D0D0D0F\000\000", 0, 14);
+ x2("0F\000{\0000\000,\000}\000\000", "0F0F0F0F\000\000", 0, 8);
+ x2("0B\000|\000(\000?\000i\000)\000c\000\000", "\000C\000\000", 0, 2);
+ x2("\000(\000?\000i\000)\000c\000|0B\000\000", "\000C\000\000", 0, 2);
+ x2("\000(\000?\000i\000:0B\000)\000|\000a\000\000", "\000a\000\000", 0, 2);
+ n("\000(\000?\000i\000:0B\000)\000|\000a\000\000", "\000A\000\000");
+ x2("\000[0B0D0F\000]\000?\000\000", "0B0D0F\000\000", 0, 2);
+ x2("\000[0B0D0F\000]\000*\000\000", "0B0D0F\000\000", 0, 6);
+ x2("\000[\000^0B0D0F\000]\000*\000\000", "0B0D0F\000\000", 0, 0);
+ n("\000[\000^0B0D0F\000]\000+\000\000", "0B0D0F\000\000");
+ x2("0B\000?\000?\000\000", "0B0B0B\000\000", 0, 0);
+ x2("0D0B\000?\000?0D\000\000", "0D0B0D\000\000", 0, 6);
+ x2("0B\000*\000?\000\000", "0B0B0B\000\000", 0, 0);
+ x2("0D0B\000*\000?\000\000", "0D0B0B\000\000", 0, 2);
+ x2("0D0B\000*\000?0D\000\000", "0D0B0B0D\000\000", 0, 8);
+ x2("0B\000+\000?\000\000", "0B0B0B\000\000", 0, 2);
+ x2("0D0B\000+\000?\000\000", "0D0B0B\000\000", 0, 4);
+ x2("0D0B\000+\000?0D\000\000", "0D0B0B0D\000\000", 0, 8);
+ x2("\000(\000?\000:Y)\000?\000)\000?\000?\000\000", "Y)\000\000", 0, 0);
+ x2("\000(\000?\000:Y)\000?\000?\000)\000?\000\000", "Y)\000\000", 0, 0);
+ x2("\000(\000?\000:Y\042\000?\000)\000+\000?\000\000", "Y\042Y\042Y\042\000\000", 0, 2);
+ x2("\000(\000?\000:\230\250\000+\000)\000?\000?\000\000", "\230\250\230\250\230\250\000\000", 0, 0);
+ x2("\000(\000?\000:\226\352\000+\000)\000?\000?\227\034\000\000", "\226\352\226\352\226\352\227\034\000\000", 0, 8);
+ x2("\000(\000?\000:0B0D\000)\000?\000{\0002\000}\000\000", "\000\000", 0, 0);
+ x2("\000(\000?\000:\233<\216\312\000)\000?\000{\0002\000}\000\000", "\233<\216\312\233<\216\312\233<\000\000", 0, 8);
+ x2("\000(\000?\000:\233<\216\312\000)\000*\000{\0000\000}\000\000", "\233<\216\312\233<\216\312\233<\000\000", 0, 0);
+ x2("\000(\000?\000:\233<\216\312\000)\000{\0003\000,\000}\000\000", "\233<\216\312\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 16);
+ n("\000(\000?\000:\233<\216\312\000)\000{\0003\000,\000}\000\000", "\233<\216\312\233<\216\312\000\000");
+ x2("\000(\000?\000:\233<\216\312\000)\000{\0002\000,\0004\000}\000\000", "\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 12);
+ x2("\000(\000?\000:\233<\216\312\000)\000{\0002\000,\0004\000}\000\000", "\233<\216\312\233<\216\312\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 16);
+ x2("\000(\000?\000:\233<\216\312\000)\000{\0002\000,\0004\000}\000?\000\000", "\233<\216\312\233<\216\312\233<\216\312\233<\216\312\233<\216\312\000\000", 0, 8);
+ x2("\000(\000?\000:\233<\216\312\000)\000{\000,\000}\000\000", "\233<\216\312\000{\000,\000}\000\000", 0, 10);
+ x2("\000(\000?\000:0K0M0O\000)\000+\000?\000{\0002\000}\000\000", "0K0M0O0K0M0O0K0M0O\000\000", 0, 12);
+ x3("\000(pk\000)\000\000", "pk\000\000", 0, 2, 1);
+ x3("\000(pkl4\000)\000\000", "pkl4\000\000", 0, 4, 1);
+ x2("\000(\000(fB\225\223\000)\000)\000\000", "fB\225\223\000\000", 0, 4);
+ x3("\000(\000(\230\250l4\000)\000)\000\000", "\230\250l4\000\000", 0, 4, 1);
+ x3("\000(\000(f(e\345\000)\000)\000\000", "f(e\345\000\000", 0, 4, 2);
+ x3("\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\000(\221\317[P\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000)\000\000", "\221\317[P\000\000", 0, 4, 20);
+ x3("\000(0B0D\000)\000(0F0H\000)\000\000", "0B0D0F0H\000\000", 0, 4, 1);
+ x3("\000(0B0D\000)\000(0F0H\000)\000\000", "0B0D0F0H\000\000", 4, 8, 2);
+ x3("\000(\000)\000(0B\000)0D0F\000(0H0J0K\000)0M0O0Q0S\000\000", "0B0D0F0H0J0K0M0O0Q0S\000\000", 6, 12, 3);
+ x3("\000(\000(\000)\000(0B\000)0D0F\000(0H0J0K\000)0M0O0Q0S\000)\000\000", "0B0D0F0H0J0K0M0O0Q0S\000\000", 6, 12, 4);
+ x3("\000.\000*\000(0\3250\251\000)0\3630\3730\336\000(0\363\000(\000)0\2670\3450\277\000)0\2440\363\000\000", "0\3250\2510\3630\3730\3360\3630\2670\3450\2770\2440\363\000\000", 10, 18, 2);
+ x2("\000(\000^0B\000)\000\000", "0B\000\000", 0, 2);
+ x3("\000(0B\000)\000|\000(0B\000)\000\000", "0D0B\000\000", 2, 4, 1);
+ x3("\000(\000^0B\000)\000|\000(0B\000)\000\000", "0D0B\000\000", 2, 4, 2);
+ x3("\000(0B\000?\000)\000\000", "0B0B0B\000\000", 0, 2, 1);
+ x3("\000(0~\000*\000)\000\000", "0~0~0~\000\000", 0, 6, 1);
+ x3("\000(0h\000*\000)\000\000", "\000\000", 0, 0, 1);
+ x3("\000(0\213\000+\000)\000\000", "0\2130\2130\2130\2130\2130\2130\213\000\000", 0, 14, 1);
+ x3("\000(0u\000+\000|0x\000*\000)\000\000", "0u0u0u0x0x\000\000", 0, 6, 1);
+ x3("\000(0B\000+\000|0D\000?\000)\000\000", "0D0D0D0B0B\000\000", 0, 2, 1);
+ x3("\000(0B0D0F\000)\000?\000\000", "0B0D0F\000\000", 0, 6, 1);
+ x3("\000(0B0D0F\000)\000*\000\000", "0B0D0F\000\000", 0, 6, 1);
+ x3("\000(0B0D0F\000)\000+\000\000", "0B0D0F\000\000", 0, 6, 1);
+ x3("\000(0U0W0Y\000|0B0D0F\000)\000+\000\000", "0B0D0F\000\000", 0, 6, 1);
+ x3("\000(\000[0j0k0l\000]\000[0K0M0O\000]\000|0K0M0O\000)\000+\000\000", "0K0M0O\000\000", 0, 6, 1);
+ x3("\000(\000(\000?\000i\000:0B0D0F\000)\000)\000\000", "0B0D0F\000\000", 0, 6, 1);
+ x3("\000(\000(\000?\000m\000:0B\000.0F\000)\000)\000\000", "0B\000\0120F\000\000", 0, 6, 1);
+ x3("\000(\000(\000?\000=0B0\223\000)0B\000)\000\000", "0B0\2230D\000\000", 0, 2, 1);
+ x3("0B0D0F\000|\000(\000.0B0D0H\000)\000\000", "0\2230B0D0H\000\000", 0, 8, 1);
+ x3("0B\000*\000(\000.\000)\000\000", "0B0B0B0B0\223\000\000", 8, 10, 1);
+ x3("0B\000*\000?\000(\000.\000)\000\000", "0B0B0B0B0\223\000\000", 0, 2, 1);
+ x3("0B\000*\000?\000(0\223\000)\000\000", "0B0B0B0B0\223\000\000", 8, 10, 1);
+ x3("\000[0D0F0H\000]0B\000*\000(\000.\000)\000\000", "0H0B0B0B0B0\223\000\000", 10, 12, 1);
+ x3("\000(\000\134\000A0D0D\000)0F0F\000\000", "0D0D0F0F\000\000", 0, 4, 1);
+ n("\000(\000\134\000A0D0D\000)0F0F\000\000", "0\2230D0D0F0F\000\000");
+ x3("\000(\000^0D0D\000)0F0F\000\000", "0D0D0F0F\000\000", 0, 4, 1);
+ n("\000(\000^0D0D\000)0F0F\000\000", "0\2230D0D0F0F\000\000");
+ x3("0\2150\215\000(0\2130\213\000$\000)\000\000", "0\2150\2150\2130\213\000\000", 4, 8, 1);
+ n("0\2150\215\000(0\2130\213\000$\000)\000\000", "0\2150\2150\2130\2130\213\000\000");
+ x2("\000(q!\000)\000\134\0001\000\000", "q!q!\000\000", 0, 4);
+ n("\000(q!\000)\000\134\0001\000\000", "q!kf\000\000");
+ x2("\000(zz\000?\000)\000\134\0001\000\000", "zzzz\000\000", 0, 4);
+ x2("\000(zz\000?\000?\000)\000\134\0001\000\000", "zzzz\000\000", 0, 0);
+ x2("\000(zz\000*\000)\000\134\0001\000\000", "zzzzzzzzzz\000\000", 0, 8);
+ x3("\000(zz\000*\000)\000\134\0001\000\000", "zzzzzzzzzz\000\000", 0, 4, 1);
+ x2("0B\000(0D\000*\000)\000\134\0001\000\000", "0B0D0D0D0D\000\000", 0, 10);
+ x2("0B\000(0D\000*\000)\000\134\0001\000\000", "0B0D\000\000", 0, 2);
+ x2("\000(0B\000*\000)\000(0D\000*\000)\000\134\0001\000\134\0002\000\000", "0B0B0B0D0D0B0B0B0D0D\000\000", 0, 20);
+ x2("\000(0B\000*\000)\000(0D\000*\000)\000\134\0002\000\000", "0B0B0B0D0D0D0D\000\000", 0, 14);
+ x3("\000(0B\000*\000)\000(0D\000*\000)\000\134\0002\000\000", "0B0B0B0D0D0D0D\000\000", 6, 10, 2);
+ x2("\000(\000(\000(\000(\000(\000(\000(0}\000*\000)0z\000)\000)\000)\000)\000)\000)0t\000\134\0007\000\000", "0}0}0}0z0t0}0}0}\000\000", 0, 16);
+ x3("\000(\000(\000(\000(\000(\000(\000(0}\000*\000)0z\000)\000)\000)\000)\000)\000)0t\000\134\0007\000\000", "0}0}0}0z0t0}0}0}\000\000", 0, 6, 7);
+ x2("\000(0o\000)\000(0r\000)\000(0u\000)\000\134\0002\000\134\0001\000\134\0003\000\000", "0o0r0u0r0o0u\000\000", 0, 12);
+ x2("\000(\000[0M\000-0Q\000]\000)\000\134\0001\000\000", "0O0O\000\000", 0, 4);
+ x2("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000 \000\000", 0, 12);
+ n("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000\000");
+ x2("\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "\212\260\377\037\212\260\377\037\000\000", 0, 8);
+ x2("\000.\000.\000.\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "0B\000a0B\212\260\377\037\212\260\377\037\000\000", 0, 14);
+ x2("\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "0F0D0F0F0D0F\000\000", 0, 12);
+ x2("\000(\000^0S\000)\000\134\0001\000\000", "0S0S\000\000", 0, 4);
+ n("\000(\000^0\200\000)\000\134\0001\000\000", "0\2010\2000\200\000\000");
+ n("\000(0B\000$\000)\000\134\0001\000\000", "0B0B\000\000");
+ n("\000(0B0D\000\134\000Z\000)\000\134\0001\000\000", "0B0D\000\000");
+ x2("\000(0B\000*\000\134\000Z\000)\000\134\0001\000\000", "0B\000\000", 2, 2);
+ x2("\000.\000(0B\000*\000\134\000Z\000)\000\134\0001\000\000", "0D0B\000\000", 2, 4);
+ x3("\000(\000.\000(0\2040D0\206\000)\000\134\0002\000)\000\000", "\000z0\2040D0\2060\2040D0\206\000\000", 0, 14, 1);
+ x3("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "0B\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1);
+ x2("\000(\000(\000?\000i\000:0B\000v0Z\000)\000)\000\134\0001\000\000", "0B\000v0Z0B\000v0Z\000\000", 0, 12);
+ x2("\000(\000?\000<a\0320K\000>Y\011\000|\000\134\000(\000\134\000g\000<a\0320K\000>\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(Y\011\000)\000)\000)\000)\000)\000)\000\000", 0, 26);
+ x2("\000\134\000A\000(\000?\000:\000\134\000g\000<\226?\000_\0001\000>\000|\000\134\000g\000<N\221\000_\0002\000>\000|\000\134\000z}BN\206\000 \000 \000(\000?\000<\226?\000_\0001\000>\211\263\000|\201\352\000\134\000g\000<N\221\000_\0002\000>\201\352\000)\000(\000?\000<N\221\000_\0002\000>W(\000|\203\351\205\251\000\134\000g\000<\226?\000_\0001\000>\203\351\205\251\000)\000)\000$\000\000", "\203\351\205\251\201\352\203\351\205\251\201\352W(\201\352\203\351\205\251\201\352\203\351\205\251\000\000", 0, 26);
+ x2("\000[\000[0r0u\000]\000]\000\000", "0u\000\000", 0, 2);
+ x2("\000[\000[0D0J0F\000]0K\000]\000\000", "0K\000\000", 0, 2);
+ n("\000[\000[\000^0B\000]\000]\000\000", "0B\000\000");
+ n("\000[\000^\000[0B\000]\000]\000\000", "0B\000\000");
+ x2("\000[\000^\000[\000^0B\000]\000]\000\000", "0B\000\000", 0, 2);
+ x2("\000[\000[0K0M0O\000]\000&\000&0M0O\000]\000\000", "0O\000\000", 0, 2);
+ n("\000[\000[0K0M0O\000]\000&\000&0M0O\000]\000\000", "0K\000\000");
+ n("\000[\000[0K0M0O\000]\000&\000&0M0O\000]\000\000", "0Q\000\000");
+ x2("\000[0B\000-0\223\000&\000&0D\000-0\222\000&\000&0F\000-0\221\000]\000\000", "0\221\000\000", 0, 2);
+ n("\000[\000^0B\000-0\223\000&\000&0D\000-0\222\000&\000&0F\000-0\221\000]\000\000", "0\221\000\000");
+ x2("\000[\000[\000^0B\000&\000&0B\000]\000&\000&0B\000-0\223\000]\000\000", "0D\000\000", 0, 2);
+ n("\000[\000[\000^0B\000&\000&0B\000]\000&\000&0B\000-0\223\000]\000\000", "0B\000\000");
+ x2("\000[\000[\000^0B\000-0\223\000&\000&0D0F0H0J\000]\000&\000&\000[\000^0F\000-0K\000]\000]\000\000", "0M\000\000", 0, 2);
+ n("\000[\000[\000^0B\000-0\223\000&\000&0D0F0H0J\000]\000&\000&\000[\000^0F\000-0K\000]\000]\000\000", "0D\000\000");
+ x2("\000[\000^\000[\000^0B0D0F\000]\000&\000&\000[\000^0F0H0J\000]\000]\000\000", "0F\000\000", 0, 2);
+ x2("\000[\000^\000[\000^0B0D0F\000]\000&\000&\000[\000^0F0H0J\000]\000]\000\000", "0H\000\000", 0, 2);
+ n("\000[\000^\000[\000^0B0D0F\000]\000&\000&\000[\000^0F0H0J\000]\000]\000\000", "0K\000\000");
+ x2("\000[0B\000-\000&\000&\000-0B\000]\000\000", "\000-\000\000", 0, 2);
+ x2("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000q\000-\000w\000]\000\000", "0H\000\000", 0, 2);
+ x2("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000g\000-\000w\000]\000\000", "\000f\000\000", 0, 2);
+ x2("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000g\000-\000w\000]\000\000", "\000g\000\000", 0, 2);
+ n("\000[\000^\000[\000^\000a\000-\000z0B0D0F\000]\000&\000&\000[\000^\000b\000c\000d\000e\000f\000g0F0H0J\000]\000g\000-\000w\000]\000\000", "\0002\000\000");
+ x2("\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000\134\000/\000b\000>\000\000", "\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000/\000b\000>\000\000", 0, 40);
+ x2("\000.\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000\134\000/\000b\000>\000\000", "\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000/\000b\000>\000\000", 0, 40);
+ fprintf(stdout,
+ "\nRESULT SUCC: %d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n",
+ nsucc, nfail, nerror, onig_version());
+
+#ifndef POSIX_TEST
+ onig_region_free(region, 1);
+ onig_end();
+#endif
+
+ return ((nfail == 0 && nerror == 0) ? 0 : -1);
+}
diff --git a/ext/mbstring/oniguruma/win32/Makefile b/ext/mbstring/oniguruma/win32/Makefile
new file mode 100644
index 000000000..d08722baa
--- /dev/null
+++ b/ext/mbstring/oniguruma/win32/Makefile
@@ -0,0 +1,200 @@
+# Oniguruma Makefile for Win32
+
+product_name = oniguruma
+
+CPPFLAGS =
+CFLAGS = -O2 -nologo /W3
+LDFLAGS =
+LOADLIBES =
+ARLIB = lib
+ARLIB_FLAGS = -nologo
+ARDLL = cl
+ARDLL_FLAGS = -nologo -LD $(LINKFLAGS) -dll
+LINKFLAGS = -link -incremental:no -pdb:none
+
+INSTALL = install -c
+CP = copy
+CC = cl
+DEFS = -DHAVE_CONFIG_H -DNOT_RUBY -DEXPORT
+RUBYDIR = ..
+
+subdirs =
+
+libbase = onig
+libname = $(libbase)_s.lib
+dllname = $(libbase).dll
+dlllib = $(libbase).lib
+
+onigheaders = oniguruma.h regint.h regparse.h regenc.h st.h
+posixheaders = onigposix.h
+headers = $(posixheaders) $(onigheaders)
+
+onigobjs = reggnu.obj regerror.obj regparse.obj regext.obj regcomp.obj \
+ regexec.obj regenc.obj regsyntax.obj regtrav.obj \
+ regversion.obj st.obj
+posixobjs = regposix.obj regposerr.obj
+libobjs = $(onigobjs) $(posixobjs)
+
+jp_objs = $(encdir)\euc_jp.obj $(encdir)\sjis.obj
+iso8859_objs = $(encdir)\iso8859_1.obj $(encdir)\iso8859_2.obj \
+ $(encdir)\iso8859_3.obj $(encdir)\iso8859_4.obj \
+ $(encdir)\iso8859_5.obj $(encdir)\iso8859_6.obj \
+ $(encdir)\iso8859_7.obj $(encdir)\iso8859_8.obj \
+ $(encdir)\iso8859_9.obj $(encdir)\iso8859_10.obj \
+ $(encdir)\iso8859_11.obj $(encdir)\iso8859_13.obj \
+ $(encdir)\iso8859_14.obj $(encdir)\iso8859_15.obj \
+ $(encdir)\iso8859_16.obj
+
+encobjs = $(encdir)\ascii.obj $(encdir)\utf8.obj \
+ $(encdir)\unicode.obj \
+ $(encdir)\utf16_be.obj $(encdir)\utf16_le.obj \
+ $(encdir)\utf32_be.obj $(encdir)\utf32_le.obj \
+ $(jp_objs) $(iso8859_objs) \
+ $(encdir)\euc_tw.obj $(encdir)\euc_kr.obj $(encdir)\big5.obj \
+ $(encdir)\gb18030.obj \
+ $(encdir)\koi8_r.obj \
+ $(encdir)\cp1251.obj # $(encdir)\koi8.obj
+
+onigsources = regerror.c regparse.c regext.c regcomp.c regexec.c regenc.c \
+ regsyntax.c regtrav.c regversion.c reggnu.c st.c
+posixsources = regposix.c regposerr.c
+libsources = $(posixsources) $(onigsources)
+rubysources = $(onigsources)
+
+encdir = enc
+patchfiles = re.c.168.patch re.c.181.patch
+distfiles = README COPYING HISTORY \
+ Makefile.in configure.in config.h.in configure \
+ $(headers) $(libsources) $(patchfiles) \
+ test.rb testconv.rb
+testc = testc
+testp = testp
+
+makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)'
+
+.SUFFIXES:
+.SUFFIXES: .obj .c .h .ps .dvi .info .texinfo
+
+.c.obj:
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) /I. /I.. /Fo$@ /c $<
+
+# targets
+default: all
+
+setup:
+ $(CP) win32\config.h config.h
+ $(CP) win32\testc.c testc.c
+
+
+all: $(libname) $(dllname)
+
+$(libname): $(libobjs) $(encobjs)
+ $(ARLIB) $(ARLIB_FLAGS) -out:$@ $(libobjs) $(encobjs)
+
+$(dllname): $(libobjs) $(encobjs)
+ $(ARDLL) $(libobjs) $(encobjs) -Fe$@ $(ARDLL_FLAGS)
+
+regparse.obj: regparse.c $(onigheaders) config.h st.h
+regext.obj: regext.c $(onigheaders) config.h
+regtrav.obj: regtrav.c $(onigheaders) config.h
+regcomp.obj: regcomp.c $(onigheaders) config.h
+regexec.obj: regexec.c regint.h regenc.h oniguruma.h config.h
+reggnu.obj: reggnu.c regint.h regenc.h oniguruma.h config.h oniggnu.h
+regerror.obj: regerror.c regint.h regenc.h oniguruma.h config.h
+regenc.obj: regenc.c regenc.h oniguruma.h config.h
+regsyntax.obj: regsyntax.c regint.h regenc.h oniguruma.h config.h
+regversion.obj: regversion.c oniguruma.h config.h
+regposix.obj: regposix.c $(posixheaders) oniguruma.h config.h
+regposerr.obj: regposerr.c $(posixheaders) config.h
+st.obj: st.c regint.h oniguruma.h config.h st.h
+
+$(encdir)\ascii.obj: $(encdir)\ascii.c regenc.h config.h
+$(encdir)\unicode.obj: $(encdir)\unicode.c regenc.h config.h
+$(encdir)\utf8.obj: $(encdir)\utf8.c regenc.h config.h
+$(encdir)\utf16_be.obj: $(encdir)\utf16_be.c regenc.h config.h
+$(encdir)\utf16_le.obj: $(encdir)\utf16_le.c regenc.h config.h
+$(encdir)\utf32_be.obj: $(encdir)\utf32_be.c regenc.h config.h
+$(encdir)\utf32_le.obj: $(encdir)\utf32_le.c regenc.h config.h
+$(encdir)\euc_jp.obj: $(encdir)\euc_jp.c regenc.h config.h
+$(encdir)\euc_tw.obj: $(encdir)\euc_tw.c regenc.h config.h
+$(encdir)\euc_kr.obj: $(encdir)\euc_kr.c regenc.h config.h
+$(encdir)\sjis.obj: $(encdir)\sjis.c regenc.h config.h
+$(encdir)\iso8859_1.obj: $(encdir)\iso8859_1.c regenc.h config.h
+$(encdir)\iso8859_2.obj: $(encdir)\iso8859_2.c regenc.h config.h
+$(encdir)\iso8859_3.obj: $(encdir)\iso8859_3.c regenc.h config.h
+$(encdir)\iso8859_4.obj: $(encdir)\iso8859_4.c regenc.h config.h
+$(encdir)\iso8859_5.obj: $(encdir)\iso8859_5.c regenc.h config.h
+$(encdir)\iso8859_6.obj: $(encdir)\iso8859_6.c regenc.h config.h
+$(encdir)\iso8859_7.obj: $(encdir)\iso8859_7.c regenc.h config.h
+$(encdir)\iso8859_8.obj: $(encdir)\iso8859_8.c regenc.h config.h
+$(encdir)\iso8859_9.obj: $(encdir)\iso8859_9.c regenc.h config.h
+$(encdir)\iso8859_10.obj: $(encdir)\iso8859_10.c regenc.h config.h
+$(encdir)\iso8859_11.obj: $(encdir)\iso8859_11.c regenc.h config.h
+$(encdir)\iso8859_13.obj: $(encdir)\iso8859_13.c regenc.h config.h
+$(encdir)\iso8859_14.obj: $(encdir)\iso8859_14.c regenc.h config.h
+$(encdir)\iso8859_15.obj: $(encdir)\iso8859_15.c regenc.h config.h
+$(encdir)\iso8859_16.obj: $(encdir)\iso8859_16.c regenc.h config.h
+$(encdir)\koi8.obj: $(encdir)\koi8.c regenc.h config.h
+$(encdir)\koi8_r.obj: $(encdir)\koi8_r.c regenc.h config.h
+$(encdir)\cp1251.obj: $(encdir)\cp1251.c regenc.h config.h
+$(encdir)\big5.obj: $(encdir)\big5.c regenc.h config.h
+$(encdir)\gb18030.obj: $(encdir)\gb18030.c regenc.h config.h
+
+
+# Ruby test
+rtest:
+ $(RUBYDIR)\win32\ruby -w -Ke test.rb
+
+# C library test
+ctest: $(testc)
+ .\$(testc)
+
+# POSIX C library test
+ptest: $(testp)
+ .\$(testp)
+
+$(testc): $(testc).c $(libname)
+ $(CC) -nologo -o $(testc) -DONIG_EXTERN=extern $(testc).c $(libname)
+
+$(testp): $(testc).c $(dlllib)
+ $(CC) -nologo -DPOSIX_TEST -o $(testp) $(testc).c $(dlllib)
+
+#$(testc)u.c: test.rb testconvu.rb
+# ruby -Ke testconvu.rb test.rb > $@
+
+$(testc)u: $(testc)u.c $(libname)
+ $(CC) -nologo -o $(testc)u -DONIG_EXTERN=extern $(testc)u.c $(libname)
+
+clean:
+ del *.obj $(encdir)\*.obj *.lib *.exp *.dll $(testp).exe $(testc).exe $(testc).obj
+
+
+# backup file suffix
+SORIG = ruby_orig
+
+# ruby 1.9 source update
+19:
+ $(CP) regerror.c $(RUBYDIR)
+ $(CP) regparse.c $(RUBYDIR)
+ $(CP) regcomp.c $(RUBYDIR)
+ $(CP) regexec.c $(RUBYDIR)
+ $(CP) regenc.c $(RUBYDIR)
+ $(CP) regint.h $(RUBYDIR)
+ $(CP) regparse.h $(RUBYDIR)
+ $(CP) regenc.h $(RUBYDIR)
+ $(CP) oniguruma.h $(RUBYDIR)
+ $(CP) enc\ascii.c $(RUBYDIR)
+ $(CP) enc\utf8.c $(RUBYDIR)
+ $(CP) enc\euc_jp.c $(RUBYDIR)
+ $(CP) enc\sjis.c $(RUBYDIR)
+ $(CP) enc\unicode.c $(RUBYDIR)
+
+
+samples: all
+ $(CC) $(CFLAGS) -I. -o simple sample\simple.c $(dlllib)
+ $(CC) $(CFLAGS) -I. -o posix sample\posix.c $(dlllib)
+ $(CC) $(CFLAGS) -I. -o names sample\names.c $(dlllib)
+ $(CC) $(CFLAGS) -I. -o listcap sample\listcap.c $(dlllib)
+ $(CC) $(CFLAGS) -I. -o sql sample\sql.c $(dlllib)
+ $(CC) $(CFLAGS) -I. -o encode sample\encode.c $(dlllib)
+ $(CC) $(CFLAGS) -I. -o syntax sample\syntax.c $(dlllib)
diff --git a/ext/mbstring/oniguruma/win32/testc.c b/ext/mbstring/oniguruma/win32/testc.c
new file mode 100644
index 000000000..acc13189d
--- /dev/null
+++ b/ext/mbstring/oniguruma/win32/testc.c
@@ -0,0 +1,863 @@
+/*
+ * This program was generated by testconv.rb.
+ */
+#include "config.h"
+#ifdef ONIG_ESCAPE_UCHAR_COLLISION
+#undef ONIG_ESCAPE_UCHAR_COLLISION
+#endif
+#include <stdio.h>
+
+#ifdef POSIX_TEST
+#include "onigposix.h"
+#else
+#include "oniguruma.h"
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#define SLEN(s) strlen(s)
+
+static int nsucc = 0;
+static int nfail = 0;
+static int nerror = 0;
+
+static FILE* err_file;
+
+#ifndef POSIX_TEST
+static OnigRegion* region;
+#endif
+
+static void xx(char* pattern, char* str, int from, int to, int mem, int not)
+{
+ int r;
+
+#ifdef POSIX_TEST
+ regex_t reg;
+ char buf[200];
+ regmatch_t pmatch[25];
+
+ r = regcomp(&reg, pattern, REG_EXTENDED | REG_NEWLINE);
+ if (r) {
+ regerror(r, &reg, buf, sizeof(buf));
+ fprintf(err_file, "ERROR: %s\n", buf);
+ nerror++;
+ return ;
+ }
+
+ r = regexec(&reg, str, reg.re_nsub + 1, pmatch, 0);
+ if (r != 0 && r != REG_NOMATCH) {
+ regerror(r, &reg, buf, sizeof(buf));
+ fprintf(err_file, "ERROR: %s\n", buf);
+ nerror++;
+ return ;
+ }
+
+ if (r == REG_NOMATCH) {
+ if (not) {
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ }
+ else {
+ if (not) {
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ else {
+ if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) {
+ fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
+ from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo);
+ nfail++;
+ }
+ }
+ }
+ regfree(&reg);
+
+#else
+ regex_t* reg;
+ OnigErrorInfo einfo;
+
+ r = onig_new(&reg, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)),
+ ONIG_OPTION_DEFAULT, ONIG_ENCODING_SJIS, ONIG_SYNTAX_DEFAULT, &einfo);
+ if (r) {
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+ onig_error_code_to_str((UChar* )s, r, &einfo);
+ fprintf(err_file, "ERROR: %s\n", s);
+ nerror++;
+ return ;
+ }
+
+ r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)),
+ (UChar* )str, (UChar* )(str + SLEN(str)),
+ region, ONIG_OPTION_NONE);
+ if (r < ONIG_MISMATCH) {
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+ onig_error_code_to_str((UChar* )s, r);
+ fprintf(err_file, "ERROR: %s\n", s);
+ nerror++;
+ return ;
+ }
+
+ if (r == ONIG_MISMATCH) {
+ if (not) {
+ fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ }
+ else {
+ if (not) {
+ fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
+ nfail++;
+ }
+ else {
+ if (region->beg[mem] == from && region->end[mem] == to) {
+ fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
+ nsucc++;
+ }
+ else {
+ fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
+ from, to, region->beg[mem], region->end[mem]);
+ nfail++;
+ }
+ }
+ }
+ onig_free(reg);
+#endif
+}
+
+static void x2(char* pattern, char* str, int from, int to)
+{
+ xx(pattern, str, from, to, 0, 0);
+}
+
+static void x3(char* pattern, char* str, int from, int to, int mem)
+{
+ xx(pattern, str, from, to, mem, 0);
+}
+
+static void n(char* pattern, char* str)
+{
+ xx(pattern, str, 0, 0, 0, 1);
+}
+
+extern int main(int argc, char* argv[])
+{
+ err_file = stdout;
+
+#ifdef POSIX_TEST
+ reg_set_encoding(REG_POSIX_ENCODING_SJIS);
+#else
+ region = onig_region_new();
+#endif
+
+ x2("", "", 0, 0);
+ x2("^", "", 0, 0);
+ x2("$", "", 0, 0);
+ x2("\\G", "", 0, 0);
+ x2("\\A", "", 0, 0);
+ x2("\\Z", "", 0, 0);
+ x2("\\z", "", 0, 0);
+ x2("^$", "", 0, 0);
+ x2("\\ca", "\001", 0, 1);
+ x2("\\C-b", "\002", 0, 1);
+ x2("\\c\\\\", "\034", 0, 1);
+ x2("q[\\c\\\\]", "q\034", 0, 2);
+ x2("", "a", 0, 0);
+ x2("a", "a", 0, 1);
+ x2("\\x61", "a", 0, 1);
+ x2("aa", "aa", 0, 2);
+ x2("aaa", "aaa", 0, 3);
+ x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35);
+ x2("ab", "ab", 0, 2);
+ x2("b", "ab", 1, 2);
+ x2("bc", "abc", 1, 3);
+ x2("(?i:#RET#)", "#INS##RET#", 5, 10);
+ x2("\\17", "\017", 0, 1);
+ x2("\\x1f", "\x1f", 0, 1);
+ x2("a(?#....\\\\JJJJ)b", "ab", 0, 2);
+ x2("(?x) G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7);
+ x2(".", "a", 0, 1);
+ n(".", "");
+ x2("..", "ab", 0, 2);
+ x2("\\w", "e", 0, 1);
+ n("\\W", "e");
+ x2("\\s", " ", 0, 1);
+ x2("\\S", "b", 0, 1);
+ x2("\\d", "4", 0, 1);
+ n("\\D", "4");
+ x2("\\b", "z ", 0, 0);
+ x2("\\b", " z", 1, 1);
+ x2("\\B", "zz ", 1, 1);
+ x2("\\B", "z ", 2, 2);
+ x2("\\B", " z", 0, 0);
+ x2("[ab]", "b", 0, 1);
+ n("[ab]", "c");
+ x2("[a-z]", "t", 0, 1);
+ n("[^a]", "a");
+ x2("[^a]", "\n", 0, 1);
+ x2("[]]", "]", 0, 1);
+ n("[^]]", "]");
+ x2("[\\^]+", "0^^1", 1, 3);
+ x2("[b-]", "b", 0, 1);
+ x2("[b-]", "-", 0, 1);
+ x2("[\\w]", "z", 0, 1);
+ n("[\\w]", " ");
+ x2("[\\W]", "b$", 1, 2);
+ x2("[\\d]", "5", 0, 1);
+ n("[\\d]", "e");
+ x2("[\\D]", "t", 0, 1);
+ n("[\\D]", "3");
+ x2("[\\s]", " ", 0, 1);
+ n("[\\s]", "a");
+ x2("[\\S]", "b", 0, 1);
+ n("[\\S]", " ");
+ x2("[\\w\\d]", "2", 0, 1);
+ n("[\\w\\d]", " ");
+ x2("[[:upper:]]", "B", 0, 1);
+ x2("[*[:xdigit:]+]", "+", 0, 1);
+ x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7);
+ x2("[*[:xdigit:]+]", "-@^+", 3, 4);
+ n("[[:upper]]", "A");
+ x2("[[:upper]]", ":", 0, 1);
+ x2("[\\044-\\047]", "\046", 0, 1);
+ x2("[\\x5a-\\x5c]", "\x5b", 0, 1);
+ x2("[\\x6A-\\x6D]", "\x6c", 0, 1);
+ n("[\\x6A-\\x6D]", "\x6E");
+ n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype () External | _rb_apply");
+ x2("[\\[]", "[", 0, 1);
+ x2("[\\]]", "]", 0, 1);
+ x2("[&]", "&", 0, 1);
+ x2("[[ab]]", "b", 0, 1);
+ x2("[[ab]c]", "c", 0, 1);
+ n("[[^a]]", "a");
+ n("[^[a]]", "a");
+ x2("[[ab]&&bc]", "b", 0, 1);
+ n("[[ab]&&bc]", "a");
+ n("[[ab]&&bc]", "c");
+ x2("[a-z&&b-y&&c-x]", "w", 0, 1);
+ n("[^a-z&&b-y&&c-x]", "w");
+ x2("[[^a&&a]&&a-z]", "b", 0, 1);
+ n("[[^a&&a]&&a-z]", "a");
+ x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1);
+ n("[[^a-z&&bcdef]&&[^c-g]]", "c");
+ x2("[^[^abc]&&[^cde]]", "c", 0, 1);
+ x2("[^[^abc]&&[^cde]]", "e", 0, 1);
+ n("[^[^abc]&&[^cde]]", "f");
+ x2("[a-&&-a]", "-", 0, 1);
+ n("[a\\-&&\\-a]", "&");
+ n("\\wabc", " abc");
+ x2("a\\Wbc", "a bc", 0, 4);
+ x2("a.b.c", "aabbc", 0, 5);
+ x2(".\\wb\\W..c", "abb bcc", 0, 7);
+ x2("\\s\\wzzz", " zzzz", 0, 5);
+ x2("aa.b", "aabb", 0, 4);
+ n(".a", "ab");
+ x2(".a", "aa", 0, 2);
+ x2("^a", "a", 0, 1);
+ x2("^a$", "a", 0, 1);
+ x2("^\\w$", "a", 0, 1);
+ n("^\\w$", " ");
+ x2("^\\wab$", "zab", 0, 3);
+ x2("^\\wabcdef$", "zabcdef", 0, 7);
+ x2("^\\w...def$", "zabcdef", 0, 7);
+ x2("\\w\\w\\s\\Waaa\\d", "aa aaa4", 0, 8);
+ x2("\\A\\Z", "", 0, 0);
+ x2("\\Axyz", "xyz", 0, 3);
+ x2("xyz\\Z", "xyz", 0, 3);
+ x2("xyz\\z", "xyz", 0, 3);
+ x2("a\\Z", "a", 0, 1);
+ x2("\\Gaz", "az", 0, 2);
+ n("\\Gz", "bza");
+ n("az\\G", "az");
+ n("az\\A", "az");
+ n("a\\Az", "az");
+ x2("\\^\\$", "^$", 0, 2);
+ x2("^x?y", "xy", 0, 2);
+ x2("^(x?y)", "xy", 0, 2);
+ x2("\\w", "_", 0, 1);
+ n("\\W", "_");
+ x2("(?=z)z", "z", 0, 1);
+ n("(?=z).", "a");
+ x2("(?!z)a", "a", 0, 1);
+ n("(?!z)a", "z");
+ x2("(?i:a)", "a", 0, 1);
+ x2("(?i:a)", "A", 0, 1);
+ x2("(?i:A)", "a", 0, 1);
+ n("(?i:A)", "b");
+ x2("(?i:[A-Z])", "a", 0, 1);
+ x2("(?i:[f-m])", "H", 0, 1);
+ x2("(?i:[f-m])", "h", 0, 1);
+ n("(?i:[f-m])", "e");
+ x2("(?i:[A-c])", "D", 0, 1);
+ n("(?i:[^a-z])", "A");
+ n("(?i:[^a-z])", "a");
+ x2("(?i:[!-k])", "Z", 0, 1);
+ x2("(?i:[!-k])", "7", 0, 1);
+ x2("(?i:[T-}])", "b", 0, 1);
+ x2("(?i:[T-}])", "{", 0, 1);
+ x2("(?i:\\?a)", "?A", 0, 2);
+ x2("(?i:\\*A)", "*a", 0, 2);
+ n(".", "\n");
+ x2("(?m:.)", "\n", 0, 1);
+ x2("(?m:a.)", "a\n", 0, 2);
+ x2("(?m:.b)", "a\nb", 1, 3);
+ x2(".*abc", "dddabdd\nddabc", 8, 13);
+ x2("(?m:.*abc)", "dddabddabc", 0, 10);
+ n("(?i)(?-i)a", "A");
+ n("(?i)(?-i:a)", "A");
+ x2("a?", "", 0, 0);
+ x2("a?", "b", 0, 0);
+ x2("a?", "a", 0, 1);
+ x2("a*", "", 0, 0);
+ x2("a*", "a", 0, 1);
+ x2("a*", "aaa", 0, 3);
+ x2("a*", "baaaa", 0, 0);
+ n("a+", "");
+ x2("a+", "a", 0, 1);
+ x2("a+", "aaaa", 0, 4);
+ x2("a+", "aabbb", 0, 2);
+ x2("a+", "baaaa", 1, 5);
+ x2(".?", "", 0, 0);
+ x2(".?", "f", 0, 1);
+ x2(".?", "\n", 0, 0);
+ x2(".*", "", 0, 0);
+ x2(".*", "abcde", 0, 5);
+ x2(".+", "z", 0, 1);
+ x2(".+", "zdswer\n", 0, 6);
+ x2("(.*)a\\1f", "babfbac", 0, 4);
+ x2("(.*)a\\1f", "bacbabf", 3, 7);
+ x2("((.*)a\\2f)", "bacbabf", 3, 7);
+ x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23);
+ x2("a|b", "a", 0, 1);
+ x2("a|b", "b", 0, 1);
+ x2("|a", "a", 0, 0);
+ x2("(|a)", "a", 0, 0);
+ x2("ab|bc", "ab", 0, 2);
+ x2("ab|bc", "bc", 0, 2);
+ x2("z(?:ab|bc)", "zbc", 0, 3);
+ x2("a(?:ab|bc)c", "aabc", 0, 4);
+ x2("ab|(?:ac|az)", "az", 0, 2);
+ x2("a|b|c", "dc", 1, 2);
+ x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2);
+ n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn");
+ x2("a|^z", "ba", 1, 2);
+ x2("a|^z", "za", 0, 1);
+ x2("a|\\Gz", "bza", 2, 3);
+ x2("a|\\Gz", "za", 0, 1);
+ x2("a|\\Az", "bza", 2, 3);
+ x2("a|\\Az", "za", 0, 1);
+ x2("a|b\\Z", "ba", 1, 2);
+ x2("a|b\\Z", "b", 0, 1);
+ x2("a|b\\z", "ba", 1, 2);
+ x2("a|b\\z", "b", 0, 1);
+ x2("\\w|\\s", " ", 0, 1);
+ n("\\w|\\w", " ");
+ x2("\\w|%", "%", 0, 1);
+ x2("\\w|[&$]", "&", 0, 1);
+ x2("[b-d]|[^e-z]", "a", 0, 1);
+ x2("(?:a|[c-f])|bz", "dz", 0, 1);
+ x2("(?:a|[c-f])|bz", "bz", 0, 2);
+ x2("abc|(?=zz)..f", "zzf", 0, 3);
+ x2("abc|(?!zz)..f", "abf", 0, 3);
+ x2("(?=za)..a|(?=zz)..a", "zza", 0, 3);
+ n("(?>a|abd)c", "abdc");
+ x2("(?>abd|a)c", "abdc", 0, 4);
+ x2("a?|b", "a", 0, 1);
+ x2("a?|b", "b", 0, 0);
+ x2("a?|b", "", 0, 0);
+ x2("a*|b", "aa", 0, 2);
+ x2("a*|b*", "ba", 0, 0);
+ x2("a*|b*", "ab", 0, 1);
+ x2("a+|b*", "", 0, 0);
+ x2("a+|b*", "bbb", 0, 3);
+ x2("a+|b*", "abbb", 0, 1);
+ n("a+|b+", "");
+ x2("(a|b)?", "b", 0, 1);
+ x2("(a|b)*", "ba", 0, 2);
+ x2("(a|b)+", "bab", 0, 3);
+ x2("(ab|ca)+", "caabbc", 0, 4);
+ x2("(ab|ca)+", "aabca", 1, 5);
+ x2("(ab|ca)+", "abzca", 0, 2);
+ x2("(a|bab)+", "ababa", 0, 5);
+ x2("(a|bab)+", "ba", 1, 2);
+ x2("(a|bab)+", "baaaba", 1, 4);
+ x2("(?:a|b)(?:a|b)", "ab", 0, 2);
+ x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3);
+ x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6);
+ x2("(?:a+|b+){2}", "aaabbb", 0, 6);
+ x2("h{0,}", "hhhh", 0, 4);
+ x2("(?:a+|b+){1,2}", "aaabbb", 0, 6);
+ n("ax{2}*a", "0axxxa1");
+ n("a.{0,2}a", "0aXXXa0");
+ n("a.{0,2}?a", "0aXXXa0");
+ n("a.{0,2}?a", "0aXXXXa0");
+ x2("^a{2,}?a$", "aaa", 0, 3);
+ x2("^[a-z]{2,}?$", "aaa", 0, 3);
+ x2("(?:a+|\\Ab*)cc", "cc", 0, 2);
+ n("(?:a+|\\Ab*)cc", "abcc");
+ x2("(?:^a+|b+)*c", "aabbbabc", 6, 8);
+ x2("(?:^a+|b+)*c", "aabbbbc", 0, 7);
+ x2("a|(?i)c", "C", 0, 1);
+ x2("(?i)c|a", "C", 0, 1);
+ x2("(?i)c|a", "A", 0, 1);
+ x2("(?i:c)|a", "C", 0, 1);
+ n("(?i:c)|a", "A");
+ x2("[abc]?", "abc", 0, 1);
+ x2("[abc]*", "abc", 0, 3);
+ x2("[^abc]*", "abc", 0, 0);
+ n("[^abc]+", "abc");
+ x2("a?\?", "aaa", 0, 0);
+ x2("ba?\?b", "bab", 0, 3);
+ x2("a*?", "aaa", 0, 0);
+ x2("ba*?", "baa", 0, 1);
+ x2("ba*?b", "baab", 0, 4);
+ x2("a+?", "aaa", 0, 1);
+ x2("ba+?", "baa", 0, 2);
+ x2("ba+?b", "baab", 0, 4);
+ x2("(?:a?)?\?", "a", 0, 0);
+ x2("(?:a?\?)?", "a", 0, 0);
+ x2("(?:a?)+?", "aaa", 0, 1);
+ x2("(?:a+)?\?", "aaa", 0, 0);
+ x2("(?:a+)?\?b", "aaab", 0, 4);
+ x2("(?:ab)?{2}", "", 0, 0);
+ x2("(?:ab)?{2}", "ababa", 0, 4);
+ x2("(?:ab)*{0}", "ababa", 0, 0);
+ x2("(?:ab){3,}", "abababab", 0, 8);
+ n("(?:ab){3,}", "abab");
+ x2("(?:ab){2,4}", "ababab", 0, 6);
+ x2("(?:ab){2,4}", "ababababab", 0, 8);
+ x2("(?:ab){2,4}?", "ababababab", 0, 4);
+ x2("(?:ab){,}", "ab{,}", 0, 5);
+ x2("(?:abc)+?{2}", "abcabcabc", 0, 6);
+ x2("(?:X*)(?i:xa)", "XXXa", 0, 4);
+ x2("(d+)([^abc]z)", "dddz", 0, 4);
+ x2("([^abc]*)([^abc]z)", "dddz", 0, 4);
+ x2("(\\w+)(\\wz)", "dddz", 0, 4);
+ x3("(a)", "a", 0, 1, 1);
+ x3("(ab)", "ab", 0, 2, 1);
+ x2("((ab))", "ab", 0, 2);
+ x3("((ab))", "ab", 0, 2, 1);
+ x3("((ab))", "ab", 0, 2, 2);
+ x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20);
+ x3("(ab)(cd)", "abcd", 0, 2, 1);
+ x3("(ab)(cd)", "abcd", 2, 4, 2);
+ x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3);
+ x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4);
+ x2("(^a)", "a", 0, 1);
+ x3("(a)|(a)", "ba", 1, 2, 1);
+ x3("(^a)|(a)", "ba", 1, 2, 2);
+ x3("(a?)", "aaa", 0, 1, 1);
+ x3("(a*)", "aaa", 0, 3, 1);
+ x3("(a*)", "", 0, 0, 1);
+ x3("(a+)", "aaaaaaa", 0, 7, 1);
+ x3("(a+|b*)", "bbbaa", 0, 3, 1);
+ x3("(a+|b?)", "bbbaa", 0, 1, 1);
+ x3("(abc)?", "abc", 0, 3, 1);
+ x3("(abc)*", "abc", 0, 3, 1);
+ x3("(abc)+", "abc", 0, 3, 1);
+ x3("(xyz|abc)+", "abc", 0, 3, 1);
+ x3("([xyz][abc]|abc)+", "abc", 0, 3, 1);
+ x3("((?i:abc))", "AbC", 0, 3, 1);
+ x2("(abc)(?i:\\1)", "abcABC", 0, 6);
+ x3("((?m:a.c))", "a\nc", 0, 3, 1);
+ x3("((?=az)a)", "azb", 0, 1, 1);
+ x3("abc|(.abd)", "zabd", 0, 4, 1);
+ x2("(?:abc)|(ABC)", "abc", 0, 3);
+ x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1);
+ x3("a*(.)", "aaaaz", 4, 5, 1);
+ x3("a*?(.)", "aaaaz", 0, 1, 1);
+ x3("a*?(c)", "aaaac", 4, 5, 1);
+ x3("[bcd]a*(.)", "caaaaz", 5, 6, 1);
+ x3("(\\Abb)cc", "bbcc", 0, 2, 1);
+ n("(\\Abb)cc", "zbbcc");
+ x3("(^bb)cc", "bbcc", 0, 2, 1);
+ n("(^bb)cc", "zbbcc");
+ x3("cc(bb$)", "ccbb", 2, 4, 1);
+ n("cc(bb$)", "ccbbb");
+ n("(\\1)", "");
+ n("\\1(a)", "aa");
+ n("(a(b)\\1)\\2+", "ababb");
+ n("(?:(?:\\1|z)(a))+$", "zaa");
+ x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4);
+ x2("(a)(?=\\1)", "aa", 0, 1);
+ n("(a)$|\\1", "az");
+ x2("(a)\\1", "aa", 0, 2);
+ n("(a)\\1", "ab");
+ x2("(a?)\\1", "aa", 0, 2);
+ x2("(a?\?)\\1", "aa", 0, 0);
+ x2("(a*)\\1", "aaaaa", 0, 4);
+ x3("(a*)\\1", "aaaaa", 0, 2, 1);
+ x2("a(b*)\\1", "abbbb", 0, 5);
+ x2("a(b*)\\1", "ab", 0, 1);
+ x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10);
+ x2("(a*)(b*)\\2", "aaabbbb", 0, 7);
+ x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8);
+ x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7);
+ x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6);
+ x2("([a-d])\\1", "cc", 0, 2);
+ x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6);
+ n("(\\w\\d\\s)\\1", "f5 f5");
+ x2("(who|[a-c]{3})\\1", "whowho", 0, 6);
+ x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9);
+ x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6);
+ x2("(^a)\\1", "aa", 0, 2);
+ n("(^a)\\1", "baa");
+ n("(a$)\\1", "aa");
+ n("(ab\\Z)\\1", "ab");
+ x2("(a*\\Z)\\1", "a", 1, 1);
+ x2(".(a*\\Z)\\1", "ba", 1, 2);
+ x3("(.(abc)\\2)", "zabcabc", 0, 7, 1);
+ x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1);
+ x2("((?i:az))\\1", "AzAz", 0, 4);
+ n("((?i:az))\\1", "Azaz");
+ x2("(?<=a)b", "ab", 1, 2);
+ n("(?<=a)b", "bb");
+ x2("(?<=a|b)b", "bb", 1, 2);
+ x2("(?<=a|bc)b", "bcb", 2, 3);
+ x2("(?<=a|bc)b", "ab", 1, 2);
+ x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2);
+ x2("(a)\\g<1>", "aa", 0, 2);
+ x2("(?<!a)b", "cb", 1, 2);
+ n("(?<!a)b", "ab");
+ x2("(?<!a|bc)b", "bbb", 0, 1);
+ n("(?<!a|bc)z", "bcz");
+ x2("(?<name1>a)", "a", 0, 1);
+ x2("(?<name_2>ab)\\g<name_2>", "abab", 0, 4);
+ x2("(?<name_3>.zv.)\\k<name_3>", "azvbazvb", 0, 8);
+ x2("(?<=\\g<ab>)|-\\zEND (?<ab>XyZ)", "XyZ", 3, 3);
+ x2("(?<n>|a\\g<n>)+", "", 0, 0);
+ x2("(?<n>|\\(\\g<n>\\))+$", "()(())", 0, 6);
+ x3("\\g<n>(?<n>.){0}", "X", 0, 1, 1);
+ x2("\\g<n>(abc|df(?<n>.YZ){2,8}){0}", "XYZ", 0, 3);
+ x2("\\A(?<n>(a\\g<n>)|)\\z", "aaaa", 0, 4);
+ x2("(?<n>|\\g<m>\\g<n>)\\z|\\zEND (?<m>a|(b)\\g<m>)", "bbbbabba", 0, 8);
+ x2("(?<name1240>\\w+\\sx)a+\\k<name1240>", " fg xaaaaaaaafg x", 2, 18);
+ x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1);
+ x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3);
+ x2("((?<name1>\\d)|(?<name2>\\w))(\\k<name1>|\\k<name2>)", "ff", 0, 2);
+ x2("(?:(?<x>)|(?<x>efg))\\k<x>", "", 0, 0);
+ x2("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefgefg", 3, 9);
+ n("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefg");
+ x2("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "a-pyumpyum", 2, 10);
+ x3("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14);
+ x3("(?<name1>)(?<name2>)(?<name3>)(?<name4>)(?<name5>)(?<name6>)(?<name7>)(?<name8>)(?<name9>)(?<name10>)(?<name11>)(?<name12>)(?<name13>)(?<name14>)(?<name15>)(?<name16>aaa)(?<name17>)$", "aaa", 0, 3, 16);
+ x2("(?<foo>a|\\(\\g<foo>\\))", "a", 0, 1);
+ x2("(?<foo>a|\\(\\g<foo>\\))", "((((((a))))))", 0, 13);
+ x3("(?<foo>a|\\(\\g<foo>\\))", "((((((((a))))))))", 0, 17, 1);
+ x2("\\g<bar>|\\zEND(?<bar>.*abc$)", "abcxxxabc", 0, 9);
+ x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3);
+ x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1);
+ x2("\\A(?:\\g<pon>|\\g<pan>|\\zEND (?<pan>a|c\\g<pon>c)(?<pon>b|d\\g<pan>d))$", "cdcbcdc", 0, 7);
+ x2("\\A(?<n>|a\\g<m>)\\z|\\zEND (?<m>\\g<n>)", "aaaa", 0, 4);
+ x2("(?<n>(a|b\\g<n>c){3,5})", "baaaaca", 1, 5);
+ x2("(?<n>(a|b\\g<n>c){3,5})", "baaaacaaaaa", 0, 10);
+ x2("(?<pare>\\(([^\\(\\)]++|\\g<pare>)*+\\))", "((a))", 0, 5);
+ x2("()*\\1", "", 0, 0);
+ x2("(?:()|())*\\1\\2", "", 0, 0);
+ x3("(?:\\1a|())*", "a", 0, 0, 1);
+ x2("x((.)*)*x", "0x1x2x3", 1, 6);
+ x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9);
+ x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0);
+ x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1);
+ x2("\\xED\\xF2", "\xed\xf2", 0, 2);
+ x2("", "", 0, 0);
+ x2("", "", 0, 2);
+ n("", "");
+ x2("", "", 0, 4);
+ x2("", "", 0, 6);
+ x2("", "", 0, 70);
+ x2("", "", 2, 4);
+ x2("", "", 2, 6);
+ x2("\\xca\\xb8", "\xca\xb8", 0, 2);
+ x2(".", "", 0, 2);
+ x2("..", "", 0, 4);
+ x2("\\w", "", 0, 2);
+ n("\\W", "");
+ x2("[\\W]", "$", 2, 3);
+ x2("\\S", "", 0, 2);
+ x2("\\S", "", 0, 2);
+ x2("\\b", "C ", 0, 0);
+ x2("\\b", " ", 1, 1);
+ x2("\\B", " ", 2, 2);
+ x2("\\B", " ", 3, 3);
+ x2("\\B", " ", 0, 0);
+ x2("[]", "", 0, 2);
+ n("[Ȃ]", "");
+ x2("[-]", "", 0, 2);
+ n("[^]", "");
+ x2("[\\w]", "", 0, 2);
+ n("[\\d]", "");
+ x2("[\\D]", "", 0, 2);
+ n("[\\s]", "");
+ x2("[\\S]", "", 0, 2);
+ x2("[\\w\\d]", "", 0, 2);
+ x2("[\\w\\d]", " ", 3, 5);
+ n("\\wS", " S");
+ x2("S\\W", "S ", 0, 5);
+ x2("..", "", 0, 10);
+ x2(".\\w\\W..", " ", 0, 13);
+ x2("\\s\\w", " ", 0, 9);
+ x2(".", "", 0, 8);
+ n(".", "");
+ x2(".", "", 0, 4);
+ x2("^", "", 0, 2);
+ x2("^$", "", 0, 2);
+ x2("^\\w$", "", 0, 2);
+ x2("^\\w$", "z", 0, 11);
+ x2("^\\w...$", "z", 0, 13);
+ x2("\\w\\w\\s\\W\\d", "a 4", 0, 12);
+ x2("\\A", "", 0, 6);
+ x2("ނ߂\\Z", "ނ߂", 0, 6);
+ x2("\\z", "", 0, 6);
+ x2("\\Z", "\n", 0, 6);
+ x2("\\Gۂ", "ۂ", 0, 4);
+ n("\\G", "");
+ n("Ƃ\\G", "Ƃ");
+ n("܂\\A", "܂");
+ n("\\A", "܂");
+ x2("(?=)", "", 0, 2);
+ n("(?=).", "");
+ x2("(?!)", "", 0, 2);
+ n("(?!)", "");
+ x2("(?i:)", "", 0, 2);
+ x2("(?i:Ԃ)", "Ԃ", 0, 4);
+ n("(?i:)", "");
+ x2("(?m:.)", "\n", 0, 3);
+ x2("(?m:.)", "\n", 2, 5);
+ x2("?", "", 0, 0);
+ x2("?", "", 0, 0);
+ x2("?", "", 0, 2);
+ x2("*", "", 0, 0);
+ x2("*", "", 0, 2);
+ x2("q*", "qqq", 0, 6);
+ x2("n*", "nnnn", 0, 0);
+ n("R+", "");
+ x2("+", "", 0, 2);
+ x2("+", "", 0, 8);
+ x2("+", "", 0, 4);
+ x2("+", "", 2, 10);
+ x2(".?", "", 0, 2);
+ x2(".*", "ς҂Ղ", 0, 8);
+ x2(".+", "", 0, 2);
+ x2(".+", "\n", 0, 8);
+ x2("|", "", 0, 2);
+ x2("|", "", 0, 2);
+ x2("|", "", 0, 4);
+ x2("|", "", 0, 4);
+ x2("(?:|)", "", 0, 6);
+ x2("(?:|)", "", 0, 8);
+ x2("|(?:|)", "", 0, 4);
+ x2("||", "", 2, 4);
+ x2("|||||||||‚ĂƂȂ|ʂ", "", 0, 6);
+ n("|||||||||‚ĂƂȂ|ʂ", "");
+ x2("|^", "Ԃ", 2, 4);
+ x2("|^", "", 0, 2);
+ x2("S|\\G", "ԋS", 4, 6);
+ x2("S|\\G", "ԋS", 0, 2);
+ x2("S|\\A", "bԋS", 3, 5);
+ x2("S|\\A", "", 0, 2);
+ x2("S|\\Z", "ԋS", 2, 4);
+ x2("S|\\Z", "", 0, 2);
+ x2("S|\\Z", "\n", 0, 2);
+ x2("S|\\z", "ԋS", 2, 4);
+ x2("S|\\z", "", 0, 2);
+ x2("\\w|\\s", "", 0, 2);
+ x2("\\w|%", "%", 0, 1);
+ x2("\\w|[&$]", "&", 0, 2);
+ x2("[-]", "", 0, 2);
+ x2("[-]|[^-]", "", 0, 2);
+ x2("[-]|[^-]", "", 0, 2);
+ x2("[^]", "\n", 0, 1);
+ x2("(?:|[-])|", "", 0, 2);
+ x2("(?:|[-])|", "", 0, 4);
+ x2("|(?=)..", "", 0, 6);
+ x2("|(?!)..", "", 0, 6);
+ x2("(?=)..|(?=)..", "", 0, 6);
+ x2("(?<=|)", "", 4, 6);
+ n("(?>|)", "");
+ x2("(?>|)", "", 0, 8);
+ x2("?|", "", 0, 2);
+ x2("?|", "", 0, 0);
+ x2("?|", "", 0, 0);
+ x2("*|", "", 0, 4);
+ x2("*|*", "", 0, 0);
+ x2("*|*", "", 0, 2);
+ x2("[a]*|*", "a", 0, 3);
+ x2("+|*", "", 0, 0);
+ x2("+|*", "", 0, 6);
+ x2("+|*", "", 0, 2);
+ x2("+|*", "a", 0, 0);
+ n("+|+", "");
+ x2("(|)?", "", 0, 2);
+ x2("(|)*", "", 0, 4);
+ x2("(|)+", "", 0, 6);
+ x2("(|)+", "", 0, 8);
+ x2("(|)+", "", 4, 12);
+ x2("(|)+", "", 2, 10);
+ x2("(|)+", "", 0, 4);
+ x2("(|)+", "$$zzzz", 6, 10);
+ x2("(|)+", "", 0, 10);
+ x2("(|)+", "", 2, 4);
+ x2("(|)+", "", 2, 8);
+ x2("(?:|)(?:|)", "", 0, 4);
+ x2("(?:*|*)(?:*|*)", "", 0, 6);
+ x2("(?:*|*)(?:+|+)", "", 0, 12);
+ x2("(?:+|+){2}", "", 0, 12);
+ x2("(?:+|+){1,2}", "", 0, 12);
+ x2("(?:+|\\A*)", "", 0, 4);
+ n("(?:+|\\A*)", "");
+ x2("(?:^+|+)*", "", 12, 16);
+ x2("(?:^+|+)*", "", 0, 14);
+ x2("{0,}", "", 0, 8);
+ x2("|(?i)c", "C", 0, 1);
+ x2("(?i)c|", "C", 0, 1);
+ x2("(?i:)|a", "a", 0, 1);
+ n("(?i:)|a", "A");
+ x2("[]?", "", 0, 2);
+ x2("[]*", "", 0, 6);
+ x2("[^]*", "", 0, 0);
+ n("[^]+", "");
+ x2("?\?", "", 0, 0);
+ x2("?\?", "", 0, 6);
+ x2("*?", "", 0, 0);
+ x2("*?", "", 0, 2);
+ x2("*?", "", 0, 8);
+ x2("+?", "", 0, 2);
+ x2("+?", "", 0, 4);
+ x2("+?", "", 0, 8);
+ x2("(?:V?)?\?", "V", 0, 0);
+ x2("(?:V?\?)?", "V", 0, 0);
+ x2("(?:?)+?", "", 0, 2);
+ x2("(?:+)?\?", "", 0, 0);
+ x2("(?:+)?\?", "ᑚ", 0, 8);
+ x2("(?:)?{2}", "", 0, 0);
+ x2("(?:S)?{2}", "SԋSԋS", 0, 8);
+ x2("(?:S)*{0}", "SԋSԋS", 0, 0);
+ x2("(?:S){3,}", "SԋSԋSԋS", 0, 16);
+ n("(?:S){3,}", "SԋS");
+ x2("(?:S){2,4}", "SԋSԋS", 0, 12);
+ x2("(?:S){2,4}", "SԋSԋSԋSԋS", 0, 16);
+ x2("(?:S){2,4}?", "SԋSԋSԋSԋS", 0, 8);
+ x2("(?:S){,}", "S{,}", 0, 7);
+ x2("(?:)+?{2}", "", 0, 12);
+ x3("()", "", 0, 2, 1);
+ x3("(ΐ)", "ΐ", 0, 4, 1);
+ x2("(())", "", 0, 4);
+ x3("(())", "", 0, 4, 1);
+ x3("(())", "", 0, 4, 2);
+ x3("((((((((((((((((((((ʎq))))))))))))))))))))", "ʎq", 0, 4, 20);
+ x3("()()", "", 0, 4, 1);
+ x3("()()", "", 4, 8, 2);
+ x3("()()()", "", 6, 12, 3);
+ x3("(()()())", "", 6, 12, 4);
+ x3(".*(tH)E}(()V^)C", "tHE}V^C", 10, 18, 2);
+ x2("(^)", "", 0, 2);
+ x3("()|()", "", 2, 4, 1);
+ x3("(^)|()", "", 2, 4, 2);
+ x3("(?)", "", 0, 2, 1);
+ x3("(*)", "܂܂", 0, 6, 1);
+ x3("(*)", "", 0, 0, 1);
+ x3("(+)", "", 0, 14, 1);
+ x3("(+|*)", "ӂӂӂւ", 0, 6, 1);
+ x3("(+|?)", "", 0, 2, 1);
+ x3("()?", "", 0, 6, 1);
+ x3("()*", "", 0, 6, 1);
+ x3("()+", "", 0, 6, 1);
+ x3("(|)+", "", 0, 6, 1);
+ x3("([Ȃɂ][]|)+", "", 0, 6, 1);
+ x3("((?i:))", "", 0, 6, 1);
+ x3("((?m:.))", "\n", 0, 5, 1);
+ x3("((?=))", "", 0, 2, 1);
+ x3("|(.)", "񂠂", 0, 8, 1);
+ x3("*(.)", "", 8, 10, 1);
+ x3("*?(.)", "", 0, 2, 1);
+ x3("*?()", "", 8, 10, 1);
+ x3("[]*(.)", "", 10, 12, 1);
+ x3("(\\A)", "", 0, 4, 1);
+ n("(\\A)", "񂢂");
+ x3("(^)", "", 0, 4, 1);
+ n("(^)", "񂢂");
+ x3("($)", "", 4, 8, 1);
+ n("($)", "");
+ x2("()\\1", "", 0, 4);
+ n("()\\1", "");
+ x2("(?)\\1", "", 0, 4);
+ x2("(?\?)\\1", "", 0, 0);
+ x2("(*)\\1", "", 0, 8);
+ x3("(*)\\1", "", 0, 4, 1);
+ x2("(*)\\1", "", 0, 10);
+ x2("(*)\\1", "", 0, 2);
+ x2("(*)(*)\\1\\2", "", 0, 20);
+ x2("(*)(*)\\2", "", 0, 14);
+ x3("(*)(*)\\2", "", 6, 10, 2);
+ x2("(((((((*)))))))\\7", "ۂۂۂ؂҂ۂۂ", 0, 16);
+ x3("(((((((*)))))))\\7", "ۂۂۂ؂҂ۂۂ", 0, 6, 7);
+ x2("()()()\\2\\1\\3", "͂ЂӂЂ͂", 0, 12);
+ x2("([-])\\1", "", 0, 4);
+ x2("(\\w\\d\\s)\\1", "5 5 ", 0, 8);
+ n("(\\w\\d\\s)\\1", "5 5");
+ x2("(NH|[-]{3})\\1", "NHNH", 0, 8);
+ x2("...(NH|[-]{3})\\1", "aNHNH", 0, 13);
+ x2("(NH|[-]{3})\\1", "", 0, 12);
+ x2("(^)\\1", "", 0, 4);
+ n("(^)\\1", "߂ނ");
+ n("($)\\1", "");
+ n("(\\Z)\\1", "");
+ x2("(*\\Z)\\1", "", 2, 2);
+ x2(".(*\\Z)\\1", "", 2, 4);
+ x3("(.(₢)\\2)", "z₢₢", 0, 13, 1);
+ x3("(.(..\\d.)\\2)", "12341234", 0, 10, 1);
+ x2("((?i:v))\\1", "vv", 0, 10);
+ x2("(?<>|\\(\\g<>\\))", "(((((())))))", 0, 14);
+ x2("\\A(?:\\g<_1>|\\g<]_2>|\\zI (?<_1>|\\g<]_2>)(?<]_2>|F\\g<_1>F))$", "FFݎFF", 0, 26);
+ x2("[[Ђ]]", "", 0, 2);
+ x2("[[]]", "", 0, 2);
+ n("[[^]]", "");
+ n("[^[]]", "");
+ x2("[^[^]]", "", 0, 2);
+ x2("[[]&&]", "", 0, 2);
+ n("[[]&&]", "");
+ n("[[]&&]", "");
+ x2("[-&&-&&-]", "", 0, 2);
+ n("[^-&&-&&-]", "");
+ x2("[[^&&]&&-]", "", 0, 2);
+ n("[[^&&]&&-]", "");
+ x2("[[^-&&]&&[^-]]", "", 0, 2);
+ n("[[^-&&]&&[^-]]", "");
+ x2("[^[^]&&[^]]", "", 0, 2);
+ x2("[^[^]&&[^]]", "", 0, 2);
+ n("[^[^]&&[^]]", "");
+ x2("[-&&-]", "-", 0, 1);
+ x2("[^[^a-z]&&[^bcdefg]q-w]", "", 0, 2);
+ x2("[^[^a-z]&&[^bcdefg]g-w]", "f", 0, 1);
+ x2("[^[^a-z]&&[^bcdefg]g-w]", "g", 0, 1);
+ n("[^[^a-z]&&[^bcdefg]g-w]", "2");
+ x2("a<b>o[W̃_E[h<\\/b>", "a<b>o[W̃_E[h</b>", 0, 32);
+ x2(".<b>o[W̃_E[h<\\/b>", "a<b>o[W̃_E[h</b>", 0, 32);
+ fprintf(stdout,
+ "\nRESULT SUCC: %d, FAIL: %d, ERROR: %d (by Oniguruma %s)\n",
+ nsucc, nfail, nerror, onig_version());
+
+#ifndef POSIX_TEST
+ onig_region_free(region, 1);
+ onig_end();
+#endif
+
+ return ((nfail == 0 && nerror == 0) ? 0 : -1);
+}
diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h
index 2464c1b1c..3ff961a34 100644
--- a/ext/mbstring/php_mbregex.h
+++ b/ext/mbstring/php_mbregex.h
@@ -34,7 +34,7 @@
PHP_FE(mb_eregi, arginfo_mb_eregi) \
PHP_FE(mb_ereg_replace, arginfo_mb_ereg_replace) \
PHP_FE(mb_eregi_replace, arginfo_mb_eregi_replace) \
- PHP_FE(mb_ereg_replace_callback, arginfo_mb_ereg_replace_callback) \
+ PHP_FE(mb_ereg_replace_callback, arginfo_mb_ereg_replace_callback) \
PHP_FE(mb_split, arginfo_mb_split) \
PHP_FE(mb_ereg_match, arginfo_mb_ereg_match) \
PHP_FE(mb_ereg_search, arginfo_mb_ereg_search) \
diff --git a/ext/mbstring/tests/bug63447_001.phpt b/ext/mbstring/tests/bug63447_001.phpt
new file mode 100644
index 000000000..51302994d
--- /dev/null
+++ b/ext/mbstring/tests/bug63447_001.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #63447 (max_input_vars doesn't filter variables when mbstring.encoding_translation = On)
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+?>
+--INI--
+max_input_nesting_level=10
+max_input_vars=5
+mbstring.encoding_translation=1
+--POST--
+a=1&b=2&c=3&d=4&e=5&f=6
+--FILE--
+<?php
+var_dump($_POST);
+?>
+--EXPECT--
+Warning: Unknown: Input variables exceeded 5. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
+array(0) {
+}
diff --git a/ext/mbstring/tests/bug63447_002.phpt b/ext/mbstring/tests/bug63447_002.phpt
new file mode 100644
index 000000000..e51089b79
--- /dev/null
+++ b/ext/mbstring/tests/bug63447_002.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #63447 (max_input_vars doesn't filter variables when mbstring.encoding_translation = On)
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+?>
+--INI--
+max_input_nesting_level=10
+max_input_vars=4
+mbstring.encoding_translation=1
+--POST--
+a=1&b=2&c=3&d=4&e=5
+--FILE--
+<?php
+var_dump($_POST);
+?>
+--EXPECT--
+Warning: Unknown: Input variables exceeded 4. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
+array(0) {
+}
diff --git a/ext/mbstring/tests/bug63447_003.phpt b/ext/mbstring/tests/bug63447_003.phpt
new file mode 100644
index 000000000..a4a7e1485
--- /dev/null
+++ b/ext/mbstring/tests/bug63447_003.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #63447 (max_input_vars doesn't filter variables when mbstring.encoding_translation = On)
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip');
+?>
+--INI--
+max_input_nesting_level=5
+max_input_vars=100
+mbstring.encoding_translation=1
+--POST--
+a=1&b[][][]=2&c[][][][][][]=7
+--FILE--
+<?php
+print_r($_POST);
+?>
+--EXPECT--
+Array
+(
+ [a] => 1
+ [b] => Array
+ (
+ [0] => Array
+ (
+ [0] => Array
+ (
+ [0] => 2
+ )
+
+ )
+
+ )
+
+)
diff --git a/ext/mbstring/tests/mb_ereg_search.phpt b/ext/mbstring/tests/mb_ereg_search.phpt
index 4df54c482..4df54c482 100755..100644
--- a/ext/mbstring/tests/mb_ereg_search.phpt
+++ b/ext/mbstring/tests/mb_ereg_search.phpt
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 05f13cf59..dcac776d0 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -238,10 +238,10 @@ ZEND_END_ARG_INFO()
/* }}} */
const zend_function_entry mcrypt_functions[] = { /* {{{ */
- PHP_FE(mcrypt_ecb, arginfo_mcrypt_ecb)
- PHP_FE(mcrypt_cbc, arginfo_mcrypt_cbc)
- PHP_FE(mcrypt_cfb, arginfo_mcrypt_cfb)
- PHP_FE(mcrypt_ofb, arginfo_mcrypt_ofb)
+ PHP_DEP_FE(mcrypt_ecb, arginfo_mcrypt_ecb)
+ PHP_DEP_FE(mcrypt_cbc, arginfo_mcrypt_cbc)
+ PHP_DEP_FE(mcrypt_cfb, arginfo_mcrypt_cfb)
+ PHP_DEP_FE(mcrypt_ofb, arginfo_mcrypt_ofb)
PHP_FE(mcrypt_get_key_size, arginfo_mcrypt_get_key_size)
PHP_FE(mcrypt_get_block_size, arginfo_mcrypt_get_block_size)
PHP_FE(mcrypt_get_cipher_name, arginfo_mcrypt_get_cipher_name)
@@ -1387,7 +1387,7 @@ PHP_FUNCTION(mcrypt_create_iv)
}
iv = ecalloc(size + 1, 1);
-
+
if (source == RANDOM || source == URANDOM) {
#if PHP_WIN32
/* random/urandom equivalent on Windows */
diff --git a/ext/mcrypt/tests/mcrypt_cbc.phpt b/ext/mcrypt/tests/mcrypt_cbc.phpt
index f9160db01..27cc5b222 100644
--- a/ext/mcrypt/tests/mcrypt_cbc.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc.phpt
@@ -18,6 +18,12 @@ echo trim(mcrypt_cbc($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
mcrypt_cbc($cipher, $key, $enc_data, MCRYPT_DECRYPT);
--EXPECTF--
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
PHP Testfest 2008
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt b/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt
index 6df307993..67799a3fd 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt
@@ -72,16 +72,24 @@ function special_var_dump($str) {
--- testing different key lengths
key length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(32) "736563726574206d6573736167650000"
key length=20
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(32) "736563726574206d6573736167650000"
key length=24
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(32) "736563726574206d6573736167650000"
key length=26
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): Size of key is too large for this algorithm in %s on line %d
string(32) "736563726574206d6573736167650000"
@@ -89,14 +97,20 @@ string(32) "736563726574206d6573736167650000"
iv length=4
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(32) "736563726574206d6573736167650000"
iv length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(32) "736563726574206d6573736167650000"
iv length=9
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(32) "736563726574206d6573736167650000"
===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt b/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt
index 35fabd9ac..1af094c27 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt
@@ -55,16 +55,24 @@ foreach ($ivs as $iv) {
--- testing different key lengths
key length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(112) "082b437d039d09418e20dc9de1dafa7ed6da5c6335b78950968441da1faf40c1f886e04da8ca177b80b376811e138c1bf51cb48dae2e7939"
key length=20
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(112) "0627351e0f8a082bf7981ae2c700a43fd3d44b270ac67b00fded1c5796eea935be0fef2a23da0b3f5e243929e62ac957bf0bf463aa90fc4f"
key length=24
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b62617eb2e44213c2d44462d388bc0b8f119384b12c84ac"
key length=26
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): Size of key is too large for this algorithm in %s on line %d
string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b62617eb2e44213c2d44462d388bc0b8f119384b12c84ac"
@@ -72,14 +80,20 @@ string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b6
iv length=4
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(112) "440a6f54601969b127aad3c217ce7583c7f7b29989693130645569301db0020b29a34a3dcd104b2d0e3ba19d6cbd8a33d352b9c27cc34ef1"
iv length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(112) "bac347506bf092c5557c4363c301745d78f047028e2953e84fd66b30aeb6005812dadbe8baa871b83278341599b0c448ddaaa52b5a378ce5"
iv length=9
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(112) "440a6f54601969b127aad3c217ce7583c7f7b29989693130645569301db0020b29a34a3dcd104b2d0e3ba19d6cbd8a33d352b9c27cc34ef1"
===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_cbc_error.phpt b/ext/mcrypt/tests/mcrypt_cbc_error.phpt
index ec3912b03..3c2218021 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_error.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_error.phpt
@@ -41,11 +41,15 @@ var_dump( mcrypt_cbc($cipher, $key, $data) );
-- Testing mcrypt_cbc() function with more than expected no. of arguments --
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc() expects at most 5 parameters, 6 given in %s on line %d
NULL
-- Testing mcrypt_cbc() function with less than expected no. of arguments --
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc() expects at least 4 parameters, 3 given in %s on line %d
NULL
===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_cbc_variation1.phpt b/ext/mcrypt/tests/mcrypt_cbc_variation1.phpt
index 5482de3e2..eb233e3f9 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_variation1.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_variation1.phpt
@@ -124,106 +124,132 @@ fclose($fp);
*** Testing mcrypt_cbc() : usage variation ***
--int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
NULL
--int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
NULL
--associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
NULL
--nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
NULL
--uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 1 to be string, object given, %s(%d)
NULL
--undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
bool(false)
--resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 1 to be string, resource given, %s(%d)
NULL
===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_cbc_variation2.phpt b/ext/mcrypt/tests/mcrypt_cbc_variation2.phpt
index f49e80ee9..3d2a06147 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_variation2.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_variation2.phpt
@@ -124,87 +124,112 @@ fclose($fp);
*** Testing mcrypt_cbc() : usage variation ***
--int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "bc27b3a4e33b531d5983fc7df693cd09"
--int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "bc27b3a4e33b531d5983fc7df693cd09"
--int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "d109b7973383127002474ae731c4b3a8"
--int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "3e82a931cedb03a38b91a637ff8c9f9e"
--float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "de71833586c1d7132a289960ebeeca7a"
--float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "7d0489dd2e99ae910ecc015573f3dd16"
--float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "978055b42c0506a8947e3c3c8d994baf"
--float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "4aa84ba400c2b8ef467d4d98372b4f4e"
--float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "e731dc5059b84e0c8774ac490f77d6e6"
--empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
string(0) ""
--int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
string(0) ""
--associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
string(0) ""
--nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
string(0) ""
--uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "bc27b3a4e33b531d5983fc7df693cd09"
--lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "bc27b3a4e33b531d5983fc7df693cd09"
--uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "19420fa26f561ee82ed84abbcd2d284b"
--instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 2 to be string, object given, %s(%d)
string(0) ""
--undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "be722a5ffc361d721fbcab1eacc6acf5"
--resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 2 to be string, resource given, %s(%d)
string(0) ""
===DONE===
-
diff --git a/ext/mcrypt/tests/mcrypt_cbc_variation3.phpt b/ext/mcrypt/tests/mcrypt_cbc_variation3.phpt
index 5b2398ddb..9a1464b11 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_variation3.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_variation3.phpt
@@ -124,87 +124,112 @@ fclose($fp);
*** Testing mcrypt_cbc() : usage variation ***
--int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "ce5fcfe737859795"
--int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "84df495f6cd82dd9"
--int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "905ab1ae27ee9991"
--int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "5835174e9c67c3e7"
--float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "28ff0601ad9e47fa"
--float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "ce9f2b6e2fc3d9f7"
--float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "24eb882ce9763e4018fba9b7f01b0c3e"
--float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5eed30e428f32de1d7a7064d0ed4d3eb"
--float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "bebf2a13676e1e30"
--empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
string(0) ""
--int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
string(0) ""
--associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
string(0) ""
--nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
string(0) ""
--uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "84df495f6cd82dd9"
--lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "84df495f6cd82dd9"
--uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "7c91cdf8f8c51485034a9ee528eb016b"
--instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 3 to be string, object given, %s(%d)
string(0) ""
--undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(16) "206f6d3617a5ab32"
--resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 3 to be string, resource given, %s(%d)
string(0) ""
===DONE===
-
diff --git a/ext/mcrypt/tests/mcrypt_cbc_variation4.phpt b/ext/mcrypt/tests/mcrypt_cbc_variation4.phpt
index f9a511f39..a3dd29ba4 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_variation4.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_variation4.phpt
@@ -124,82 +124,108 @@ fclose($fp);
*** Testing mcrypt_cbc() : usage variation ***
--float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--mixed case string--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--heredoc--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 8 - Object of class classWithToString could not be converted to int, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d)
string(32) "983d5edc5f77fe42e2372a0339dc22b0"
--undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
string(32) "5f781523f696d596e4b809d72197a0cc"
--resource--
-string(%d) %s
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
+string(32) "983d5edc5f77fe42e2372a0339dc22b0"
===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_cbc_variation5.phpt b/ext/mcrypt/tests/mcrypt_cbc_variation5.phpt
index 7d49db853..0c75c9793 100644
--- a/ext/mcrypt/tests/mcrypt_cbc_variation5.phpt
+++ b/ext/mcrypt/tests/mcrypt_cbc_variation5.phpt
@@ -124,106 +124,132 @@ fclose($fp);
*** Testing mcrypt_cbc() : usage variation ***
--int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
string(0) ""
--int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
string(0) ""
--associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
string(0) ""
--nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
string(0) ""
--uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 5 to be string, object given, %s(%d)
string(0) ""
--undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
string(32) "6438db90653c4d3080c3ceab43618c05"
--resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
Error: 2 - mcrypt_cbc() expects parameter 5 to be string, resource given, %s(%d)
string(0) ""
===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_cfb.phpt b/ext/mcrypt/tests/mcrypt_cfb.phpt
index 54919c858..11120633a 100644
--- a/ext/mcrypt/tests/mcrypt_cfb.phpt
+++ b/ext/mcrypt/tests/mcrypt_cfb.phpt
@@ -18,6 +18,12 @@ echo trim(mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
--EXPECTF--
+
+Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
PHP Testfest 2008
+Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
+
Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_ecb.phpt b/ext/mcrypt/tests/mcrypt_ecb.phpt
index e75d9fa6c..b6d0a2278 100644
--- a/ext/mcrypt/tests/mcrypt_ecb.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb.phpt
@@ -18,4 +18,10 @@ echo trim(mcrypt_ecb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
mcrypt_ecb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
--EXPECTF--
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
PHP Testfest 2008
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
index 7a5cc27f4..82f9608da 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -94,4 +96,4 @@ string(32) "736563726574206d6573736167650000"
iv length=9
string(32) "736563726574206d6573736167650000"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
index da26b4ba8..50107b4b0 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
diff --git a/ext/mcrypt/tests/mcrypt_ecb_error.phpt b/ext/mcrypt/tests/mcrypt_ecb_error.phpt
index b33034afc..7e521f222 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_error.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_error.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt b/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
index 282a0cce1..7271deec1 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt b/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
index 49e0a551f..ed57400e0 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt b/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
index cedda4930..299930456 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt b/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
index 599b4fbe7..e52040e29 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt b/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
index f64744fcd..3f4f7f5dd 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ofb.phpt b/ext/mcrypt/tests/mcrypt_ofb.phpt
index 1532c4cf2..942035306 100644
--- a/ext/mcrypt/tests/mcrypt_ofb.phpt
+++ b/ext/mcrypt/tests/mcrypt_ofb.phpt
@@ -17,5 +17,11 @@ echo trim(mcrypt_ofb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
// a warning must be issued if we don't use a IV on a AES cipher, that usually requires an IV
mcrypt_ofb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv);
---EXPECT--
-PHP Testfest 2008 \ No newline at end of file
+--EXPECTF--
+
+Deprecated: Function mcrypt_ofb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_ofb() is deprecated in %s on line %d
+PHP Testfest 2008
+
+Deprecated: Function mcrypt_ofb() is deprecated in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt b/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
index 100352a1c..e450a6904 100644
--- a/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
+++ b/ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt
@@ -76,24 +76,34 @@ foreach ($ivs as $iv) {
key length=0
string(128) "4fbf24aaa789f5194260ade1acd9499402c1845cc517e8fe43cfb5b90a0df294db33ecd1a836c47d6bf6d8600512ba415e17008a1e1991f81056258d82099397"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
key length=0
string(128) "4fbf24aaa789f5194260ade1acd9499402c1845cc517e8fe43cfb5b90a0df294db33ecd1a836c47d6bf6d8600512ba415e17008a1e1991f81056258d82099397"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
key length=8
string(128) "d6a3042b278fa5816dc6f46152acbe5fd7d1813c3808c27cd969d8e10a64d0238724edfda0322f4512308f22d142df0e92bed861c2b732f7650e234df59183dc"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
key length=16
string(128) "dc8f957ec530acf10cd95ba7da7b6405380fe19a2941e9a8de54680512f18491bc374e5464885ae6c2ae2aa7a6cdd2fbe12a06bbc4bd59dbbfaa15f09044f101"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
--- testing different iv lengths
iv length=0
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
@@ -102,6 +112,8 @@ string(128) "546869732069732074686520736563726574206d657373616765207768696368206
iv length=0
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
@@ -110,6 +122,8 @@ string(128) "546869732069732074686520736563726574206d657373616765207768696368206
iv length=8
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
@@ -117,14 +131,18 @@ Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
iv length=16
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
string(128) "dc8f957ec530acf10cd95ba7da7b6405380fe19a2941e9a8de54680512f18491bc374e5464885ae6c2ae2aa7a6cdd2fbe12a06bbc4bd59dbbfaa15f09044f101"
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
iv length=17
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4
index fa7a46f85..5968c4334 100644
--- a/ext/mysql/config.m4
+++ b/ext/mysql/config.m4
@@ -97,6 +97,13 @@ Note that the MySQL client library is not bundled anymore!])
done
if test -z "$MYSQL_LIB_DIR"; then
+ MYSQL_LIB_CHK(lib/x86_64-linux-gnu)
+ fi
+ if test -z "$MYSQL_LIB_DIR"; then
+ MYSQL_LIB_CHK(lib/i386-linux-gnu)
+ fi
+
+ if test -z "$MYSQL_LIB_DIR"; then
AC_MSG_ERROR([Cannot find lib$MYSQL_LIBNAME under $MYSQL_DIR.
Note that the MySQL client library is not bundled anymore!])
fi
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index d6a0c9467..f1aab94f8 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -297,27 +297,27 @@ static const zend_function_entry mysql_functions[] = {
PHP_FE(mysql_set_charset, arginfo_mysql_set_charset)
#endif
/* for downwards compatability */
- PHP_FALIAS(mysql, mysql_db_query, arginfo_mysql_db_query)
- PHP_FALIAS(mysql_fieldname, mysql_field_name, arginfo_mysql_field_name)
- PHP_FALIAS(mysql_fieldtable, mysql_field_table, arginfo_mysql_field_seek)
- PHP_FALIAS(mysql_fieldlen, mysql_field_len, arginfo_mysql_field_seek)
- PHP_FALIAS(mysql_fieldtype, mysql_field_type, arginfo_mysql_field_seek)
- PHP_FALIAS(mysql_fieldflags, mysql_field_flags, arginfo_mysql_field_seek)
- PHP_FALIAS(mysql_selectdb, mysql_select_db, arginfo_mysql_select_db)
+ PHP_DEP_FALIAS(mysql, mysql_db_query, arginfo_mysql_db_query)
+ PHP_DEP_FALIAS(mysql_fieldname, mysql_field_name, arginfo_mysql_field_name)
+ PHP_DEP_FALIAS(mysql_fieldtable, mysql_field_table, arginfo_mysql_field_seek)
+ PHP_DEP_FALIAS(mysql_fieldlen, mysql_field_len, arginfo_mysql_field_seek)
+ PHP_DEP_FALIAS(mysql_fieldtype, mysql_field_type, arginfo_mysql_field_seek)
+ PHP_DEP_FALIAS(mysql_fieldflags, mysql_field_flags, arginfo_mysql_field_seek)
+ PHP_DEP_FALIAS(mysql_selectdb, mysql_select_db, arginfo_mysql_select_db)
#ifndef NETWARE /* The below two functions not supported on NetWare */
#if MYSQL_VERSION_ID < 40000
PHP_DEP_FALIAS(mysql_createdb, mysql_create_db, arginfo_mysql_select_db)
PHP_DEP_FALIAS(mysql_dropdb, mysql_drop_db, arginfo_mysql_select_db)
#endif
#endif /* NETWARE */
- PHP_FALIAS(mysql_freeresult, mysql_free_result, arginfo__result_mysql_arg)
- PHP_FALIAS(mysql_numfields, mysql_num_fields, arginfo__result_mysql_arg)
- PHP_FALIAS(mysql_numrows, mysql_num_rows, arginfo__result_mysql_arg)
- PHP_FALIAS(mysql_listdbs, mysql_list_dbs, arginfo__optional_mysql_link)
+ PHP_DEP_FALIAS(mysql_freeresult, mysql_free_result, arginfo__result_mysql_arg)
+ PHP_DEP_FALIAS(mysql_numfields, mysql_num_fields, arginfo__result_mysql_arg)
+ PHP_DEP_FALIAS(mysql_numrows, mysql_num_rows, arginfo__result_mysql_arg)
+ PHP_DEP_FALIAS(mysql_listdbs, mysql_list_dbs, arginfo__optional_mysql_link)
PHP_DEP_FALIAS(mysql_listtables,mysql_list_tables, arginfo_mysql_select_db)
- PHP_FALIAS(mysql_listfields, mysql_list_fields, arginfo_mysql_list_fields)
+ PHP_DEP_FALIAS(mysql_listfields, mysql_list_fields, arginfo_mysql_list_fields)
PHP_FALIAS(mysql_db_name, mysql_result, arginfo_mysql_result)
- PHP_FALIAS(mysql_dbname, mysql_result, arginfo_mysql_result)
+ PHP_DEP_FALIAS(mysql_dbname, mysql_result, arginfo_mysql_result)
PHP_FALIAS(mysql_tablename, mysql_result, arginfo_mysql_result)
PHP_FALIAS(mysql_table_name, mysql_result, arginfo_mysql_result)
PHP_FE_END
@@ -1989,16 +1989,16 @@ Q: String or long first?
if (sql_row[field_offset]) {
Z_TYPE_P(return_value) = IS_STRING;
-#if PHP_API_VERSION < 20100412
+#if PHP_API_VERSION < 20100412
if (PG(magic_quotes_runtime)) {
Z_STRVAL_P(return_value) = php_addslashes(sql_row[field_offset], sql_row_lengths[field_offset],&Z_STRLEN_P(return_value), 0 TSRMLS_CC);
} else {
-#endif
+#endif
Z_STRLEN_P(return_value) = sql_row_lengths[field_offset];
Z_STRVAL_P(return_value) = (char *) safe_estrndup(sql_row[field_offset], Z_STRLEN_P(return_value));
#if PHP_API_VERSION < 20100412
}
-#endif
+#endif
} else {
Z_TYPE_P(return_value) = IS_NULL;
}
@@ -2116,16 +2116,16 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
MAKE_STD_ZVAL(data);
-#if PHP_API_VERSION < 20100412
+#if PHP_API_VERSION < 20100412
if (PG(magic_quotes_runtime)) {
Z_TYPE_P(data) = IS_STRING;
Z_STRVAL_P(data) = php_addslashes(mysql_row[i], mysql_row_lengths[i], &Z_STRLEN_P(data), 0 TSRMLS_CC);
} else {
-#endif
+#endif
ZVAL_STRINGL(data, mysql_row[i], mysql_row_lengths[i], 1);
-#if PHP_API_VERSION < 20100412
+#if PHP_API_VERSION < 20100412
}
-#endif
+#endif
if (result_type & MYSQL_NUM) {
add_index_zval(return_value, i, data);
diff --git a/ext/mysql/tests/001.phpt b/ext/mysql/tests/001.phpt
index 72b661477..72b661477 100755..100644
--- a/ext/mysql/tests/001.phpt
+++ b/ext/mysql/tests/001.phpt
diff --git a/ext/mysql/tests/002.phpt b/ext/mysql/tests/002.phpt
index 8355c5f11..8355c5f11 100755..100644
--- a/ext/mysql/tests/002.phpt
+++ b/ext/mysql/tests/002.phpt
diff --git a/ext/mysql/tests/003.phpt b/ext/mysql/tests/003.phpt
index 2d0b68b9f..2d0b68b9f 100755..100644
--- a/ext/mysql/tests/003.phpt
+++ b/ext/mysql/tests/003.phpt
diff --git a/ext/mysql/tests/bug55473.phpt b/ext/mysql/tests/bug55473.phpt
index befecef19..df584bdef 100644
--- a/ext/mysql/tests/bug55473.phpt
+++ b/ext/mysql/tests/bug55473.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #55473 (mysql_pconnect leaks file descriptors on reconnect)
+Bug #5547 (mysql_pconnect leaks file descriptors on reconnect)
--SKIPIF--
<?php
require_once('skipif.inc');
@@ -8,7 +8,7 @@ if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
die("skip Test doesn't work on Windows");
}
-if (!($output = @exec("lsof -nwp " . getmypid())))
+if (!($output = @exec("lsof -np " . getmypid())))
die("skip Test can't find command line tool lsof");
?>
--INI--
@@ -56,9 +56,9 @@ mysql.allow_persistent=1
if ($opened_files == -1) {
- $opened_files = trim(exec("lsof -nwp " . getmypid() . " | wc -l"));
+ $opened_files = trim(exec("lsof -np " . getmypid() . " | wc -l"));
printf("[005] Setting openened files...\n");
- } else if (($tmp = trim(exec("lsof -nwp " . getmypid() . " | wc -l"))) != $opened_files) {
+ } else if (($tmp = trim(exec("lsof -np " . getmypid() . " | wc -l"))) != $opened_files) {
printf("[006] [%d] different number of opened_files : expected %d, got %d", $i, $opened_files, $tmp);
} else {
printf("[007] Opened files as expected\n");
@@ -76,4 +76,4 @@ mysql.allow_persistent=1
[007] Opened files as expected
[003] reconnect 3
[007] Opened files as expected
-done!
+done! \ No newline at end of file
diff --git a/ext/mysql/tests/connect.inc b/ext/mysql/tests/connect.inc
index 0df5bc3aa..0df5bc3aa 100755..100644
--- a/ext/mysql/tests/connect.inc
+++ b/ext/mysql/tests/connect.inc
diff --git a/ext/mysql/tests/mysql_field_flags.phpt b/ext/mysql/tests/mysql_field_flags.phpt
index 6489affc1..e07e041d2 100644
--- a/ext/mysql/tests/mysql_field_flags.phpt
+++ b/ext/mysql/tests/mysql_field_flags.phpt
@@ -81,13 +81,17 @@ $tables = array(
array('label1', sprintf("'%s'", @date("Y-m-d H:i:s"))),
'label1' => array(
'timestamp',
- 'unsigned',
- 'zerofill',
'binary',
'not_null'),
),
);
+if ($version < 560) {
+ $tables['label1 TIMESTAMP']['label1'][] = 'zerofill';
+ $tables['label1 TIMESTAMP']['label1'][] = 'unsigned';
+}
+
+
foreach ($tables as $columns => $expected) {
if (!mysql_query("DROP TABLE IF EXISTS test", $link)) {
printf("[010/%s] [%d] %s\n", $columns, mysql_errno($link), mysql_error($link));
diff --git a/ext/mysql/tests/mysql_pconn_kill.phpt b/ext/mysql/tests/mysql_pconn_kill.phpt
index efef42160..efef42160 100755..100644
--- a/ext/mysql/tests/mysql_pconn_kill.phpt
+++ b/ext/mysql/tests/mysql_pconn_kill.phpt
diff --git a/ext/mysql/tests/mysql_reflection_extension.phpt b/ext/mysql/tests/mysql_reflection_extension.phpt
new file mode 100644
index 000000000..169036cd5
--- /dev/null
+++ b/ext/mysql/tests/mysql_reflection_extension.phpt
@@ -0,0 +1,105 @@
+--TEST--
+ReflectionExtension basics to check API
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+ $r = new ReflectionExtension("mysql");
+
+ printf("Name: %s\n", $r->name);
+ printf("Version: %s\n", $r->getVersion());
+ $classes = $r->getClasses();
+ if (!empty($classes)) {
+ printf("[002] Expecting no class\n");
+ asort($classes);
+ var_dump($classes);
+ }
+
+ $ignore = array();
+
+ $functions = $r->getFunctions();
+ asort($functions);
+ printf("Functions:\n");
+ foreach ($functions as $func) {
+ if (isset($ignore[$func->name])) {
+ unset($ignore[$func->name]);
+ } else {
+ printf(" %s\n", $func->name);
+ }
+ }
+ if (!empty($ignore)) {
+ printf("Dumping version dependent and missing functions\n");
+ var_dump($ignore);
+ }
+
+
+ print "done!";
+?>
+--EXPECTF--
+Name: mysql
+Version: 1.0
+Functions:
+ mysql
+ mysql_affected_rows
+ mysql_client_encoding
+ mysql_close
+ mysql_connect
+ mysql_data_seek
+ mysql_db_name
+ mysql_db_query
+ mysql_dbname
+ mysql_errno
+ mysql_error
+ mysql_escape_string
+ mysql_fetch_array
+ mysql_fetch_assoc
+ mysql_fetch_field
+ mysql_fetch_lengths
+ mysql_fetch_object
+ mysql_fetch_row
+ mysql_field_flags
+ mysql_field_len
+ mysql_field_name
+ mysql_field_seek
+ mysql_field_table
+ mysql_field_type
+ mysql_fieldflags
+ mysql_fieldlen
+ mysql_fieldname
+ mysql_fieldtable
+ mysql_fieldtype
+ mysql_free_result
+ mysql_freeresult
+ mysql_get_client_info
+ mysql_get_host_info
+ mysql_get_proto_info
+ mysql_get_server_info
+ mysql_info
+ mysql_insert_id
+ mysql_list_dbs
+ mysql_list_fields
+ mysql_list_processes
+ mysql_list_tables
+ mysql_listdbs
+ mysql_listfields
+ mysql_listtables
+ mysql_num_fields
+ mysql_num_rows
+ mysql_numfields
+ mysql_numrows
+ mysql_pconnect
+ mysql_ping
+ mysql_query
+ mysql_real_escape_string
+ mysql_result
+ mysql_select_db
+ mysql_selectdb
+ mysql_set_charset
+ mysql_stat
+ mysql_table_name
+ mysql_tablename
+ mysql_thread_id
+ mysql_unbuffered_query
+done! \ No newline at end of file
diff --git a/ext/mysql/tests/mysql_reflection_functions.phpt b/ext/mysql/tests/mysql_reflection_functions.phpt
new file mode 100644
index 000000000..4f2710d80
--- /dev/null
+++ b/ext/mysql/tests/mysql_reflection_functions.phpt
@@ -0,0 +1,387 @@
+--TEST--
+ReflectionFunction to check API
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+ $r = new ReflectionExtension("mysql");
+
+ $ignore = array();
+
+ $functions = $r->getFunctions();
+ asort($functions);
+ printf("Functions:\n");
+ foreach ($functions as $func) {
+ if (isset($ignore[$func->name]))
+ continue;
+
+ printf(" %s\n", $func->name);
+ $rf = new ReflectionFunction($func->name);
+ printf(" Deprecated: %s\n", $rf->isDeprecated() ? "yes" : "no");
+ printf(" Accepted parameters: %d\n", $rf->getNumberOfParameters());
+ printf(" Required parameters: %d\n", $rf->getNumberOfRequiredParameters());
+ foreach( $rf->getParameters() as $param ) {
+ printf(" %s\n", $param);
+ }
+ }
+
+ print "done!";
+?>
+--EXPECTF--
+Functions:
+ mysql
+ Deprecated: yes
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <required> $query ]
+ Parameter #2 [ <optional> $link_identifier ]
+ mysql_affected_rows
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_client_encoding
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_close
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_connect
+ Deprecated: no
+ Accepted parameters: 5
+ Required parameters: 0
+ Parameter #0 [ <optional> $hostname ]
+ Parameter #1 [ <optional> $username ]
+ Parameter #2 [ <optional> $password ]
+ Parameter #3 [ <optional> $new ]
+ Parameter #4 [ <optional> $flags ]
+ mysql_data_seek
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $row_number ]
+ mysql_db_name
+ Deprecated: no
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $row ]
+ Parameter #2 [ <optional> $field ]
+ mysql_db_query
+ Deprecated: yes
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <required> $query ]
+ Parameter #2 [ <optional> $link_identifier ]
+ mysql_dbname
+ Deprecated: yes
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $row ]
+ Parameter #2 [ <optional> $field ]
+ mysql_errno
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_error
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_escape_string
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $string ]
+ mysql_fetch_array
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <optional> $result_type ]
+ mysql_fetch_assoc
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_fetch_field
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <optional> $field_offset ]
+ mysql_fetch_lengths
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_fetch_object
+ Deprecated: no
+ Accepted parameters: 3
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <optional> $class_name ]
+ Parameter #2 [ <optional> $ctor_params ]
+ mysql_fetch_row
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_field_flags
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_field_len
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_field_name
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_index ]
+ mysql_field_seek
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_field_table
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_field_type
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_fieldflags
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_fieldlen
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_fieldname
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_index ]
+ mysql_fieldtable
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_fieldtype
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $field_offset ]
+ mysql_free_result
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_freeresult
+ Deprecated: yes
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_get_client_info
+ Deprecated: no
+ Accepted parameters: 0
+ Required parameters: 0
+ mysql_get_host_info
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_get_proto_info
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_get_server_info
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_info
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_insert_id
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_list_dbs
+ Deprecated: yes
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_list_fields
+ Deprecated: no
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <required> $table_name ]
+ Parameter #2 [ <optional> $link_identifier ]
+ mysql_list_processes
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_list_tables
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_listdbs
+ Deprecated: yes
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_listfields
+ Deprecated: yes
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <required> $table_name ]
+ Parameter #2 [ <optional> $link_identifier ]
+ mysql_listtables
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_num_fields
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_num_rows
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_numfields
+ Deprecated: yes
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_numrows
+ Deprecated: yes
+ Accepted parameters: 1
+ Required parameters: 1
+ Parameter #0 [ <required> $result ]
+ mysql_pconnect
+ Deprecated: no
+ Accepted parameters: 4
+ Required parameters: 0
+ Parameter #0 [ <optional> $hostname ]
+ Parameter #1 [ <optional> $username ]
+ Parameter #2 [ <optional> $password ]
+ Parameter #3 [ <optional> $flags ]
+ mysql_ping
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_query
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $query ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_real_escape_string
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $string ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_result
+ Deprecated: no
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $row ]
+ Parameter #2 [ <optional> $field ]
+ mysql_select_db
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_selectdb
+ Deprecated: yes
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $database_name ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_set_charset
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $charset_name ]
+ Parameter #1 [ <optional> $link_identifier ]
+ mysql_stat
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_table_name
+ Deprecated: no
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $row ]
+ Parameter #2 [ <optional> $field ]
+ mysql_tablename
+ Deprecated: no
+ Accepted parameters: 3
+ Required parameters: 2
+ Parameter #0 [ <required> $result ]
+ Parameter #1 [ <required> $row ]
+ Parameter #2 [ <optional> $field ]
+ mysql_thread_id
+ Deprecated: no
+ Accepted parameters: 1
+ Required parameters: 0
+ Parameter #0 [ <optional> $link_identifier ]
+ mysql_unbuffered_query
+ Deprecated: no
+ Accepted parameters: 2
+ Required parameters: 1
+ Parameter #0 [ <required> $query ]
+ Parameter #1 [ <optional> $link_identifier ]
+done! \ No newline at end of file
diff --git a/ext/mysql/tests/mysql_stat.phpt b/ext/mysql/tests/mysql_stat.phpt
index 288c53f06..30a840a2a 100644
--- a/ext/mysql/tests/mysql_stat.phpt
+++ b/ext/mysql/tests/mysql_stat.phpt
@@ -34,7 +34,7 @@ if ((!is_string($stat_def = mysql_stat())) || ('' === $stat_def))
printf("[003] Expecting non empty string, got %s/'%s', [%d] %s\n",
gettype($stat_def), $stat_def, mysql_errno(), mysql_error());
-assert($stat === $stat_def);
+assert(soundex($stat) === soundex($stat_def));
mysql_close($link);
@@ -45,4 +45,4 @@ print "done!";
?>
--EXPECTF--
Warning: mysql_stat(): %d is not a valid MySQL-Link resource in %s on line %d
-done! \ No newline at end of file
+done!
diff --git a/ext/mysql/tests/skipif.inc b/ext/mysql/tests/skipif.inc
index 0f932892c..0f932892c 100755..100644
--- a/ext/mysql/tests/skipif.inc
+++ b/ext/mysql/tests/skipif.inc
diff --git a/ext/mysql/tests/skipifconnectfailure.inc b/ext/mysql/tests/skipifconnectfailure.inc
index a57c7dbd5..a57c7dbd5 100755..100644
--- a/ext/mysql/tests/skipifconnectfailure.inc
+++ b/ext/mysql/tests/skipifconnectfailure.inc
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 6d283aa9c..81bae23a5 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -699,6 +699,10 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_LONG_CONSTANT("MYSQLI_OPT_SSL_VERIFY_SERVER_CERT", MYSQL_OPT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
#endif
+#if MYSQL_VERSION_ID > 50605 || defined(MYSQLI_USE_MYSQLND)
+ REGISTER_LONG_CONSTANT("MYSQLI_SERVER_PUBLIC_KEY", MYSQL_SERVER_PUBLIC_KEY, CONST_CS | CONST_PERSISTENT);
+#endif
+
/* mysqli_real_connect flags */
REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_SSL", CLIENT_SSL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_COMPRESS",CLIENT_COMPRESS, CONST_CS | CONST_PERSISTENT);
@@ -1321,218 +1325,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
}
/* }}} */
-
-#if !defined(MYSQLI_USE_MYSQLND)
-
-#define ALLOC_CALLBACK_ARGS(a, b, c)\
-if (c) {\
- a = (zval ***)safe_emalloc(c, sizeof(zval **), 0);\
- for (i = b; i < c; i++) {\
- a[i] = emalloc(sizeof(zval *));\
- MAKE_STD_ZVAL(*a[i]);\
- }\
-}
-
-#define FREE_CALLBACK_ARGS(a, b, c)\
-if (a) {\
- for (i=b; i < c; i++) {\
- zval_ptr_dtor(a[i]);\
- efree(a[i]);\
- }\
- efree(a);\
-}
-
-#define LOCAL_INFILE_ERROR_MSG(source,dest)\
- memset(source, 0, LOCAL_INFILE_ERROR_LEN);\
- memcpy(source, dest, MIN(strlen(dest), LOCAL_INFILE_ERROR_LEN-1));\
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", dest);
-
-
-/* {{{ php_local_infile_init
- */
-static int php_local_infile_init(void **ptr, const char *filename, void *userdata)
-{
- mysqli_local_infile *data;
- MY_MYSQL *mysql;
- php_stream_context *context = NULL;
-
- TSRMLS_FETCH();
-
- /* save pointer to MY_MYSQL structure (userdata) */
- if (!(*ptr= data= ((mysqli_local_infile *)calloc(1, sizeof(mysqli_local_infile))))) {
- return 1;
- }
-
- if (!(mysql = (MY_MYSQL *)userdata)) {
- LOCAL_INFILE_ERROR_MSG(data->error_msg, ER(CR_UNKNOWN_ERROR));
- return 1;
- }
-
- /* check open_basedir */
- if (PG(open_basedir)) {
- if (php_check_open_basedir_ex(filename, 0 TSRMLS_CC) == -1) {
- LOCAL_INFILE_ERROR_MSG(data->error_msg, "open_basedir restriction in effect. Unable to open file");
- return 1;
- }
- }
-
- mysql->li_stream = php_stream_open_wrapper_ex((char *)filename, "r", 0, NULL, context);
-
- if (mysql->li_stream == NULL) {
- snprintf((char *)data->error_msg, sizeof(data->error_msg), "Can't find file '%-.64s'.", filename);
- return 1;
- }
-
- data->userdata = mysql;
-
- return 0;
-}
-/* }}} */
-
-/* {{{ int php_local_infile_read */
-static int php_local_infile_read(void *ptr, char *buf, uint buf_len)
-{
- mysqli_local_infile *data;
- MY_MYSQL *mysql;
- zval ***callback_args;
- zval *retval;
- zval *fp;
- int argc = 4;
- int i;
- long rc;
-
- TSRMLS_FETCH();
-
- data= (mysqli_local_infile *)ptr;
- mysql = data->userdata;
-
- /* default processing */
- if (!mysql->li_read) {
- int count = (int)php_stream_read(mysql->li_stream, buf, buf_len);
-
- if (count < 0) {
- LOCAL_INFILE_ERROR_MSG(data->error_msg, ER(2));
- }
-
- return count;
- }
-
- ALLOC_CALLBACK_ARGS(callback_args, 1, argc);
-
- /* set parameters: filepointer, buffer, buffer_len, errormsg */
-
- MAKE_STD_ZVAL(fp);
- php_stream_to_zval(mysql->li_stream, fp);
- callback_args[0] = &fp;
- ZVAL_STRING(*callback_args[1], "", 1);
- ZVAL_LONG(*callback_args[2], buf_len);
- ZVAL_STRING(*callback_args[3], "", 1);
-
- if (call_user_function_ex(EG(function_table),
- NULL,
- mysql->li_read,
- &retval,
- argc,
- callback_args,
- 0,
- NULL TSRMLS_CC) == SUCCESS) {
-
- rc = Z_LVAL_P(retval);
- zval_ptr_dtor(&retval);
-
- if (rc > 0) {
- if (rc >= 0 && rc != Z_STRLEN_P(*callback_args[1])) {
- LOCAL_INFILE_ERROR_MSG(data->error_msg,
- "Mismatch between the return value of the callback and the content "
- "length of the buffer.");
- rc = -1;
- } else if (rc > buf_len) {
- /* check buffer overflow */
- LOCAL_INFILE_ERROR_MSG(data->error_msg, "Too much data returned");
- rc = -1;
- } else {
- memcpy(buf, Z_STRVAL_P(*callback_args[1]), MIN(rc, Z_STRLEN_P(*callback_args[1])));
- }
- } else if (rc < 0) {
- LOCAL_INFILE_ERROR_MSG(data->error_msg, Z_STRVAL_P(*callback_args[3]));
- }
- } else {
- LOCAL_INFILE_ERROR_MSG(data->error_msg, "Can't execute load data local init callback function");
- rc = -1;
- }
- /*
- If the (ab)user has closed the file handle we should
- not try to use it anymore or even close it
- */
- if (!zend_rsrc_list_get_rsrc_type(Z_LVAL_P(fp) TSRMLS_CC)) {
- LOCAL_INFILE_ERROR_MSG(data->error_msg, "File handle closed");
- rc = -1;
- /* Thus the end handler won't try to free already freed memory */
- mysql->li_stream = NULL;
- }
-
- FREE_CALLBACK_ARGS(callback_args, 1, argc);
- efree(fp);
- return rc;
-}
-/* }}} */
-
-/* {{{ php_local_infile_error
- */
-static int php_local_infile_error(void *ptr, char *error_msg, uint error_msg_len)
-{
- mysqli_local_infile *data = (mysqli_local_infile *) ptr;
-
- if (data) {
- strlcpy(error_msg, data->error_msg, error_msg_len);
- return 2000;
- }
- strlcpy(error_msg, ER(CR_OUT_OF_MEMORY), error_msg_len);
- return CR_OUT_OF_MEMORY;
-}
-/* }}} */
-
-/* {{{ php_local_infile_end
- */
-static void php_local_infile_end(void *ptr)
-{
- mysqli_local_infile *data;
- MY_MYSQL *mysql;
-
- TSRMLS_FETCH();
-
- data= (mysqli_local_infile *)ptr;
-
- if (!data || !(mysql = data->userdata)) {
- if (data) {
- free(data);
- }
- return;
- }
-
- if (mysql->li_stream) {
- php_stream_close(mysql->li_stream);
- }
- free(data);
- return;
-}
-/* }}} */
-
-
-/* {{{ void php_set_local_infile_handler_default
-*/
-void php_set_local_infile_handler_default(MY_MYSQL *mysql) {
- /* register internal callback functions */
- mysql_set_local_infile_handler(mysql->mysql, &php_local_infile_init, &php_local_infile_read,
- &php_local_infile_end, &php_local_infile_error, (void *)mysql);
- if (mysql->li_read) {
- zval_ptr_dtor(&mysql->li_read);
- mysql->li_read = NULL;
- }
-}
-/* }}} */
-#endif
-
/*
* Local variables:
* tab-width: 4
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index ce7588ecb..1ac9173ee 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -566,14 +566,17 @@ PHP_FUNCTION(mysqli_character_set_name)
{
MY_MYSQL *mysql;
zval *mysql_link;
+ const char *cs_name;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
-
- RETURN_STRING((char *)mysql_character_set_name(mysql->mysql), 1);
+ cs_name = mysql_character_set_name(mysql->mysql);
+ if (cs_name) {
+ RETURN_STRING(cs_name, 1);
+ }
}
/* }}} */
@@ -732,12 +735,16 @@ PHP_FUNCTION(mysqli_error)
{
MY_MYSQL *mysql;
zval *mysql_link;
+ const char *err;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
- RETURN_STRING((char *)mysql_error(mysql->mysql),1);
+ err = mysql_error(mysql->mysql);
+ if (err) {
+ RETURN_STRING(err, 1);
+ }
}
/* }}} */
@@ -1268,7 +1275,10 @@ PHP_FUNCTION(mysqli_free_result)
Get MySQL client info */
PHP_FUNCTION(mysqli_get_client_info)
{
- RETURN_STRING((char *)mysql_get_client_info(), 1);
+ const char * info = mysql_get_client_info();
+ if (info) {
+ RETURN_STRING(info, 1);
+ }
}
/* }}} */
@@ -1320,15 +1330,18 @@ PHP_FUNCTION(mysqli_get_server_info)
{
MY_MYSQL *mysql;
zval *mysql_link = NULL;
+ const char *info;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
- RETURN_STRING((char *)mysql_get_server_info(mysql->mysql), 1);
+ info = mysql_get_server_info(mysql->mysql);
+ if (info) {
+ RETURN_STRING(info, 1);
+ }
}
-
/* }}} */
/* {{{ proto int mysqli_get_server_version(object link)
@@ -1361,7 +1374,9 @@ PHP_FUNCTION(mysqli_info)
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
info = mysql_info(mysql->mysql);
- RETURN_STRING((info) ? (char *)info : "", 1);
+ if (info) {
+ RETURN_STRING(info, 1);
+ }
}
/* }}} */
@@ -1456,64 +1471,6 @@ PHP_FUNCTION(mysqli_kill)
}
/* }}} */
-/* {{{ proto void mysqli_set_local_infile_default(object link)
- unsets user defined handler for load local infile command */
-#if !defined(MYSQLI_USE_MYSQLND)
-PHP_FUNCTION(mysqli_set_local_infile_default)
-{
- MY_MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
-
- MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
-
- if (mysql->li_read) {
- zval_ptr_dtor(&(mysql->li_read));
- mysql->li_read = NULL;
- }
-}
-/* }}} */
-
-/* {{{ proto bool mysqli_set_local_infile_handler(object link, callback read_func)
- Set callback functions for LOAD DATA LOCAL INFILE */
-PHP_FUNCTION(mysqli_set_local_infile_handler)
-{
- MY_MYSQL *mysql;
- zval *mysql_link;
- char *callback_name;
- zval *callback_func;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &mysql_link, mysqli_link_class_entry,
- &callback_func) == FAILURE) {
- return;
- }
-
- MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
-
- /* check callback function */
- if (!zend_is_callable(callback_func, 0, &callback_name TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a valid callback function %s", callback_name);
- efree(callback_name);
- RETURN_FALSE;
- }
- efree(callback_name);
-
- /* save callback function */
- if (!mysql->li_read) {
- MAKE_STD_ZVAL(mysql->li_read);
- } else {
- zval_dtor(mysql->li_read);
- }
- ZVAL_ZVAL(mysql->li_read, callback_func, 1, 0);
-
- RETURN_TRUE;
-}
-#endif
-/* }}} */
-
/* {{{ proto bool mysqli_more_results(object link)
check if there any more query results from a multi query */
PHP_FUNCTION(mysqli_more_results)
@@ -1645,10 +1602,10 @@ static int mysqli_options_get_option_zval_type(int option)
#endif /* MYSQLI_USE_MYSQLND */
case MYSQL_OPT_CONNECT_TIMEOUT:
#ifdef MYSQL_REPORT_DATA_TRUNCATION
- case MYSQL_REPORT_DATA_TRUNCATION:
+ case MYSQL_REPORT_DATA_TRUNCATION:
#endif
- case MYSQL_OPT_LOCAL_INFILE:
- case MYSQL_OPT_NAMED_PIPE:
+ case MYSQL_OPT_LOCAL_INFILE:
+ case MYSQL_OPT_NAMED_PIPE:
#ifdef MYSQL_OPT_PROTOCOL
case MYSQL_OPT_PROTOCOL:
#endif /* MySQL 4.1.0 */
@@ -1664,7 +1621,7 @@ static int mysqli_options_get_option_zval_type(int option)
case MYSQL_OPT_RECONNECT:
#endif /* MySQL 5.0.13 */
#ifdef MYSQL_OPT_SSL_VERIFY_SERVER_CERT
- case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
+ case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
#endif /* MySQL 5.0.23 */
#ifdef MYSQL_OPT_COMPRESS
case MYSQL_OPT_COMPRESS:
@@ -1685,6 +1642,9 @@ static int mysqli_options_get_option_zval_type(int option)
case MYSQL_INIT_COMMAND:
case MYSQL_SET_CHARSET_NAME:
case MYSQL_SET_CHARSET_DIR:
+#if MYSQL_VERSION_ID > 50605 || defined(MYSQLI_USE_MYSQLND)
+ case MYSQL_SERVER_PUBLIC_KEY:
+#endif
return IS_STRING;
default:
@@ -2151,12 +2111,16 @@ PHP_FUNCTION(mysqli_sqlstate)
{
MY_MYSQL *mysql;
zval *mysql_link;
+ const char *state;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
- RETURN_STRING((char *)mysql_sqlstate(mysql->mysql),1);
+ state = mysql_sqlstate(mysql->mysql);
+ if (state) {
+ RETURN_STRING(state, 1);
+ }
}
/* }}} */
@@ -2334,13 +2298,17 @@ PHP_FUNCTION(mysqli_stmt_error)
{
MY_STMT *stmt;
zval *mysql_stmt;
+ const char * err;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_INITIALIZED);
- RETURN_STRING((char *)mysql_stmt_error(stmt->stmt),1);
+ err = mysql_stmt_error(stmt->stmt);
+ if (err) {
+ RETURN_STRING(err, 1);
+ }
}
/* }}} */
@@ -2479,13 +2447,17 @@ PHP_FUNCTION(mysqli_stmt_sqlstate)
{
MY_STMT *stmt;
zval *mysql_stmt;
+ const char * state;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID);
- RETURN_STRING((char *)mysql_stmt_sqlstate(stmt->stmt),1);
+ state = mysql_stmt_sqlstate(stmt->stmt);
+ if (state) {
+ RETURN_STRING(state, 1);
+ }
}
/* }}} */
diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c
index 9ebb9352f..80ae848f9 100644
--- a/ext/mysqli/mysqli_fe.c
+++ b/ext/mysqli/mysqli_fe.c
@@ -200,16 +200,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1)
ZEND_ARG_INFO(0, connection_id)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_local_infile_handler, 0, 0, 2)
- MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
- ZEND_ARG_INFO(0, read_callback)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_local_infile_handler, 0, 0, 1)
- MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
- ZEND_ARG_INFO(0, read_callback)
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2)
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
ZEND_ARG_INFO(0, query)
@@ -388,10 +378,6 @@ const zend_function_entry mysqli_functions[] = {
PHP_FE(mysqli_info, arginfo_mysqli_only_link)
PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link)
PHP_FE(mysqli_kill, arginfo_mysqli_kill)
-#if !defined(MYSQLI_USE_MYSQLND)
- PHP_FE(mysqli_set_local_infile_default, arginfo_mysqli_only_link)
- PHP_FE(mysqli_set_local_infile_handler, arginfo_mysqli_set_local_infile_handler)
-#endif
PHP_FE(mysqli_more_results, arginfo_mysqli_only_link)
PHP_FE(mysqli_multi_query, arginfo_mysqli_query)
PHP_FE(mysqli_next_result, arginfo_mysqli_only_link)
@@ -490,10 +476,6 @@ const zend_function_entry mysqli_link_methods[] = {
PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params)
PHP_FALIAS(init,mysqli_init, arginfo_mysqli_no_params)
PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill)
-#if !defined(MYSQLI_USE_MYSQLND)
- PHP_FALIAS(set_local_infile_default, mysqli_set_local_infile_default, arginfo_mysqli_no_params)
- PHP_FALIAS(set_local_infile_handler, mysqli_set_local_infile_handler, arginfo_class_mysqli_set_local_infile_handler)
-#endif
PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query)
PHP_FALIAS(mysqli, mysqli_link_construct, arginfo_mysqli_connect)
PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params)
diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h
index 7b55ad1c1..f7689122a 100644
--- a/ext/mysqli/mysqli_fe.h
+++ b/ext/mysqli/mysqli_fe.h
@@ -136,4 +136,3 @@ PHP_METHOD(mysqli_warning,__construct);
#endif /* MYSQLI_FE_H */
-
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 7e1b9355d..2b6a1af0e 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -259,9 +259,6 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne
#if !defined(MYSQLI_USE_MYSQLND)
mysql->mysql->reconnect = MyG(reconnect);
-
- /* set our own local_infile handler */
- php_set_local_infile_handler_default(mysql);
#endif
mysql_options(mysql->mysql, MYSQL_OPT_LOCAL_INFILE, (char *)&MyG(allow_local_infile));
@@ -731,7 +728,7 @@ static int mysqlnd_dont_poll_zval_array_from_mysqlnd_array(MYSQLND **in_array, z
int ret = 0;
ALLOC_HASHTABLE(new_hash);
- zend_hash_init(new_hash, zend_hash_num_elements(Z_ARRVAL_P(in_zval_array)), NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_init(new_hash, in_zval_array? zend_hash_num_elements(Z_ARRVAL_P(in_zval_array)):0, NULL, ZVAL_PTR_DTOR, 0);
if (in_array) {
for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(in_zval_array));
zend_hash_get_current_data(Z_ARRVAL_P(in_zval_array), (void **) &elem) == SUCCESS;
diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h
index 9dd11117d..ecbdacb4e 100644
--- a/ext/mysqli/mysqli_priv.h
+++ b/ext/mysqli/mysqli_priv.h
@@ -76,7 +76,6 @@ extern void php_clear_warnings(MYSQLI_WARNING *w);
extern void php_free_stmt_bind_buffer(BIND_BUFFER bbuf, int type);
extern void php_mysqli_report_error(const char *sqlstate, int errorno, const char *error TSRMLS_DC);
extern void php_mysqli_report_index(const char *query, unsigned int status TSRMLS_DC);
-extern void php_set_local_infile_handler_default(MY_MYSQL *);
extern void php_mysqli_throw_sql_exception(char *sqlstate, int errorno TSRMLS_DC, char *format, ...);
#ifdef HAVE_SPL
diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c
index 908de63d2..87661b286 100644
--- a/ext/mysqli/mysqli_prop.c
+++ b/ext/mysqli/mysqli_prop.c
@@ -253,8 +253,8 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, MYSQLI_GET_M
MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu")
/* {{{ property link_stat_read */
-static int link_stat_read(mysqli_object *obj, zval **retval TSRMLS_DC)\
-{\
+static int link_stat_read(mysqli_object *obj, zval **retval TSRMLS_DC)
+{
MY_MYSQL *mysql;
MAKE_STD_ZVAL(*retval);
diff --git a/ext/mysqli/mysqli_report.h b/ext/mysqli/mysqli_report.h
deleted file mode 100644
index 4035a4b91..000000000
--- a/ext/mysqli/mysqli_report.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2012 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Georg Richter <georg@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-#ifndef __HAVE_MYSQLI_PROFILER_H__
-#define __HAVE_MYSQLI_PROFILER_H__
-
-#ifdef PHP_WIN32
-#include <process.h>
-#include <direct.h>
-#include "win32/time.h"
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/time.h>
-#endif
-
-typedef struct {
- struct timeval starttime,
- endtime; /* execution time */
-} PR_TIME_INFO;
-
-
-#define MYSQLI_PR_REPORT_STDERR 1
-#define MYSQLI_PR_REPORT_PORT 2
-
-
-
-/*** PROFILER MACROS ***/
-#define MYSQLI_PROFILER_STARTTIME(ptr) if (MyG(profiler.mode)) gettimeofday(&ptr.starttime, NULL)
-#define MYSQLI_PROFILER_ENDTIME(ptr) if (MyG(profiler.mode)) gettimeofday(&ptr.endtime, NULL)
-#define MYSQLI_PROFILER_REPORT(_type, _time, ptr) if (MyG(profiler.mode)) php_mysqli_profiler_report(_type, _time, (void *)ptr)
-
-
-
-#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/mysqli/package.xml b/ext/mysqli/package.xml
index 6de81d7a9..c27316a05 100644
--- a/ext/mysqli/package.xml
+++ b/ext/mysqli/package.xml
@@ -43,7 +43,6 @@ package.xml added to support installation using pear installer
<file role="src" name="mysqli_prop.c"/>
<file role="src" name="mysqli_repl.c"/>
<file role="src" name="mysqli_report.c"/>
- <file role="src" name="mysqli_report.h"/>
<file role="src" name="php_mysqli.h"/>
<file role="doc" name="CREDITS"/>
<file role="test" name="tests/001.phpt"/>
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h
index ed468e282..1d363ab24 100644
--- a/ext/mysqli/php_mysqli_structs.h
+++ b/ext/mysqli/php_mysqli_structs.h
@@ -131,12 +131,6 @@ typedef struct {
} MY_MYSQL;
typedef struct {
- int mode;
- int socket;
- FILE *fp;
-} PROFILER;
-
-typedef struct {
void *ptr; /* resource: (mysql, result, stmt) */
void *info; /* additional buffer */
enum mysqli_status status; /* object status */
@@ -164,12 +158,6 @@ typedef struct _mysqli_property_entry {
int (*w_func)(mysqli_object *obj, zval *value TSRMLS_DC);
} mysqli_property_entry;
-#if !defined(MYSQLI_USE_MYSQLND)
-typedef struct {
- char error_msg[LOCAL_INFILE_ERROR_LEN];
- void *userdata;
-} mysqli_local_infile;
-#endif
typedef struct {
zend_ptr_stack free_links;
diff --git a/ext/mysqli/tests/bug38710.phpt b/ext/mysqli/tests/bug38710.phpt
index c3bb7285c..c3bb7285c 100755..100644
--- a/ext/mysqli/tests/bug38710.phpt
+++ b/ext/mysqli/tests/bug38710.phpt
diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt
index b1c1e87a7..78540f1c3 100644
--- a/ext/mysqli/tests/bug51647.phpt
+++ b/ext/mysqli/tests/bug51647.phpt
@@ -24,12 +24,12 @@ if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
}
}
-
+
if (empty($row))
die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
-if ($row[1] == 'NO')
+if (($row[1] == 'NO') || ($row[1] == 'DISABLED'))
die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
$link->close();
diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt
index 6000fce0a..d03daaee8 100644
--- a/ext/mysqli/tests/bug55283.phpt
+++ b/ext/mysqli/tests/bug55283.phpt
@@ -29,7 +29,7 @@ if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
if (empty($row))
die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
-if ($row[1] == 'NO')
+if (($row[1] == 'NO') || ($row[1] == 'DISABLED'))
die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
$link->close();
@@ -41,7 +41,7 @@ $link->close();
$flags = MYSQLI_CLIENT_SSL;
-
+
$link = mysqli_init();
mysqli_ssl_set($link, null, null, null, null, "RC4-MD5");
if (my_mysqli_real_connect($link, 'p:' . $host, $user, $passwd, $db, $port, null, $flags)) {
diff --git a/ext/mysqli/tests/bug55859.phpt b/ext/mysqli/tests/bug55859.phpt
index a8bb4b3f2..ba6e9902b 100644
--- a/ext/mysqli/tests/bug55859.phpt
+++ b/ext/mysqli/tests/bug55859.phpt
@@ -12,9 +12,9 @@ require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
}
- var_dump(mysqli_stat($link) === $link->stat);
+ var_dump(soundex(mysqli_stat($link)) === soundex($link->stat));
echo "done!";
?>
--EXPECT--
bool(true)
-done! \ No newline at end of file
+done!
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
index 3a9d8ec25..4acc20cb9 100644
--- a/ext/mysqli/tests/connect.inc
+++ b/ext/mysqli/tests/connect.inc
@@ -129,99 +129,6 @@
}
}
- function my_get_charsets($link) {
-
- /* Those tree are set by SET NAMES */
- $charsets = array(
- 'client' => NULL,
- 'results' => NULL,
- 'connection' => NULL,
- );
-
- if (!($res = mysqli_query($link, "SHOW VARIABLES LIKE '%character%'"))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
-
- $names = array();
- while ($row = mysqli_fetch_assoc($res)) {
- $names[$row['Variable_name']] = $row['Value'];
- }
- mysqli_free_result($res);
-
- if (!($res = mysqli_query($link, sprintf("SHOW CHARACTER SET LIKE '%s'", $names['character_set_client']))) ||
- !($details = mysqli_fetch_assoc($res))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
- mysqli_free_result($res);
-
- $charsets['client'] = array(
- 'charset' => $details['Charset'],
- 'desc' => $details['Description'],
- 'collation' => $details['Default collation'],
- 'maxlen' => $details['Maxlen'],
- 'nr' => NULL,
- );
-
- if (!($res = mysqli_query($link, sprintf("SHOW COLLATION LIKE '%s'", $details['Default collation']))) ||
- !($collation = mysqli_fetch_assoc($res))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
- mysqli_free_result($res);
- $charsets['client']['nr'] = $collation['Id'];
-
- if (!($res = mysqli_query($link, sprintf("SHOW CHARACTER SET LIKE '%s'", $names['character_set_results']))) ||
- !($details = mysqli_fetch_assoc($res))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
- mysqli_free_result($res);
-
- $charsets['results'] = array(
- 'charset' => $details['Charset'],
- 'desc' => $details['Description'],
- 'collation' => $details['Default collation'],
- 'maxlen' => $details['Maxlen'],
- 'nr' => NULL,
- );
-
- if (!($res = mysqli_query($link, sprintf("SHOW COLLATION LIKE '%s'", $details['Default collation']))) ||
- !($collation = mysqli_fetch_assoc($res))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
- mysqli_free_result($res);
- $charsets['results']['nr'] = $collation['Id'];
-
-
- if (!($res = mysqli_query($link, sprintf("SHOW CHARACTER SET LIKE '%s'", $names['character_set_connection']))) ||
- !($details = mysqli_fetch_assoc($res))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
- mysqli_free_result($res);
-
- $charsets['connection'] = array(
- 'charset' => $details['Charset'],
- 'desc' => $details['Description'],
- 'collation' => $details['Default collation'],
- 'maxlen' => $details['Maxlen'],
- 'nr' => NULL,
- );
-
- if (!($res = mysqli_query($link, sprintf("SHOW COLLATION LIKE '%s'", $details['Default collation']))) ||
- !($collation = mysqli_fetch_assoc($res))) {
- printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
- return $charsets;
- }
- mysqli_free_result($res);
- $charsets['connection']['nr'] = $collation['Id'];
-
- return $charsets;
- }
-
function have_innodb($link) {
if (($res = $link->query("SHOW VARIABLES LIKE 'have_innodb'")) &&
($row = $res->fetch_row()) &&
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
index c6d4e7cc3..19ba0086f 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
@@ -67,12 +67,6 @@ require_once('skipifconnectfailure.inc');
$expected_methods['get_connection_stats'] = true;
$expected_methods['reap_async_query'] = true;
$expected_methods['poll'] = true;
- } else {
- // libmysql only
- if (function_exists('mysqli_ssl_set'))
- $expected_methods['ssl_set'] = true;
- $expected_methods['set_local_infile_default'] = true;
- $expected_methods['set_local_infile_handler'] = true;
}
/* we should add ruled when to expect them */
@@ -211,7 +205,7 @@ require_once('skipifconnectfailure.inc');
$mysqli->sqlstate, gettype($mysqli->sqlstate),
mysqli_sqlstate($link), gettype(mysqli_sqlstate($link)));
- assert(mysqli_stat($link) === $mysqli->stat);
+ assert(soundex(mysqli_stat($link)) == soundex($mysqli->stat));
printf("mysqli->stat = '%s'/%s ('%s'/%s)\n",
$mysqli->stat, gettype($mysqli->stat),
mysqli_stat($link), gettype(mysqli_stat($link)));
@@ -301,7 +295,7 @@ mysqli->insert_id = '0'/integer ('0'/integer)
mysqli->sqlstate = '00000'/%unicode|string% ('00000'/%unicode|string%)
mysqli->stat = 'Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d'/string ('Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d'/string)
mysqli->host_info = '%s'/%unicode|string% ('%s'/%unicode|string%)
-mysqli->info = ''/NULL (''/%unicode|string%)
+mysqli->info = ''/NULL (''/NULL)
mysqli->thread_id = '%d'/integer ('%d'/integer)
mysqli->protocol_version = '%d'/integer ('%d'/integer)
mysqli->server_info = '%s'/%unicode|string% ('%s'/%unicode|string%)
diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt
index 613dddfc8..0f8718721 100644
--- a/ext/mysqli/tests/mysqli_constants.phpt
+++ b/ext/mysqli/tests/mysqli_constants.phpt
@@ -125,6 +125,12 @@ require_once('skipifconnectfailure.inc');
$expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true;
}
+
+ /* First introduced in MySQL 6.0, backported to MySQL 5.5 */
+ if ($version >= 50606 || $IS_MYSQLND) {
+ $expected_constants['MYSQLI_SERVER_PUBLIC_KEY'] = true;
+ }
+
if ($version > 50002) {
$expected_constants = array_merge($expected_constants, array(
"MYSQLI_TYPE_NEWDECIMAL" => true,
diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt
index d1d358b34..2b9108072 100644
--- a/ext/mysqli/tests/mysqli_fetch_field.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field.phpt
@@ -22,7 +22,13 @@ require_once('skipifconnectfailure.inc');
require('table.inc');
- $charsets = my_get_charsets($link);
+ // Make sure that client, connection and result charsets are all the
+ // same. Not sure whether this is strictly necessary.
+ if (!mysqli_set_charset($link, 'utf8'))
+ printf("[%d] %s\n", mysqli_errno($link), mysqli_errno($link));
+
+ $charsetInfo = mysqli_get_charset($link);
+
if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
@@ -34,19 +40,17 @@ require_once('skipifconnectfailure.inc');
/* label column, result set charset */
$tmp = mysqli_fetch_field($res);
var_dump($tmp);
- if ($tmp->charsetnr != $charsets['results']['nr']) {
+ if ($tmp->charsetnr != $charsetInfo->number) {
printf("[004] Expecting charset %s/%d got %d\n",
- $charsets['results']['charset'],
- $charsets['results']['nr'], $tmp->charsetnr);
+ $charsetInfo->charset, $charsetInfo->number, $tmp->charsetnr);
}
- if ($tmp->length != (1 * $charsets['results']['maxlen'])) {
+ if ($tmp->length != $charsetInfo->max_length) {
printf("[005] Expecting length %d got %d\n",
- $charsets['results']['maxlen'],
- $tmp->max_length);
+ $charsetInfo->max_length, $tmp->max_length);
}
if ($tmp->db != $db) {
printf("011] Expecting database '%s' got '%s'\n",
- $db, $tmp->db);
+ $db, $tmp->db);
}
var_dump(mysqli_fetch_field($res));
@@ -174,4 +178,4 @@ object(stdClass)#%d (13) {
[%u|b%"decimals"]=>
int(0)
}
-done! \ No newline at end of file
+done!
diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
index 42cbc1487..8259d2f50 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
@@ -84,6 +84,8 @@ mysqli_close($link);
'VARCHAR(2) NOT NULL PRIMARY KEY' => 'NOT_NULL PRI_KEY NO_DEFAULT_VALUE PART_KEY'
);
+
+
function checkFlags($reported_flags, $expected_flags, $flags) {
$found_flags = $unexpected_flags = '';
foreach ($flags as $code => $name) {
@@ -104,6 +106,10 @@ mysqli_close($link);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ if (mysqli_get_server_version($link) > 50600) {
+ $columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP BINARY NOT_NULL';
+ }
+
foreach ($columns as $column_def => $expected_flags) {
if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) {
printf("[002] %s [%d] %s\n", $column_def,
diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
index 2d5ad261b..8c5609b16 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
@@ -27,7 +27,12 @@ require_once('skipifconnectfailure.inc');
if (!is_null($tmp = @$res->fetch_field($link)))
printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- $charsets = my_get_charsets($link);
+ // Make sure that client, connection and result charsets are all the
+ // same. Not sure whether this is strictly necessary.
+ if (!$mysqli->set_charset('utf8'))
+ printf("[%d] %s\n", $mysqli->errno, $mysqli->errno);
+
+ $charsetInfo = $mysqli->get_charset();
if (!$res = $mysqli->query("SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1")) {
printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
@@ -37,18 +42,16 @@ require_once('skipifconnectfailure.inc');
$tmp = $res->fetch_field();
var_dump($tmp);
- if ($tmp->charsetnr != $charsets['results']['nr']) {
+ if ($tmp->charsetnr != $charsetInfo->number) {
printf("[005] Expecting charset %s/%d got %d\n",
- $charsets['results']['charset'],
- $charsets['results']['nr'], $tmp->charsetnr);
+ $charsetInfo->charset, $charsetInfo->number, $tmp->charsetnr);
}
- if ($tmp->length != (1 * $charsets['results']['maxlen'])) {
+ if ($tmp->length != $charsetInfo->max_length) {
printf("[006] Expecting length %d got %d\n",
- $charsets['results']['maxlen'],
- $tmp->max_length);
+ $charsetInfo->max_length, $tmp->max_length);
}
if ($tmp->db != $db) {
- printf("008] Expecting database '%s' got '%s'\n",
+ printf("[007] Expecting database '%s' got '%s'\n",
$db, $tmp->db);
}
@@ -126,4 +129,4 @@ object(stdClass)#%d (13) {
bool(false)
Warning: mysqli_result::fetch_field(): Couldn't fetch mysqli_result in %s on line %d
-done! \ No newline at end of file
+done!
diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt
index 479c71cbb..6b66d6f23 100644
--- a/ext/mysqli/tests/mysqli_fetch_fields.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt
@@ -21,7 +21,13 @@ require_once('skipifconnectfailure.inc');
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
- $charsets = my_get_charsets($link);
+
+ // Make sure that client, connection and result charsets are all the
+ // same. Not sure whether this is strictly necessary.
+ if (!mysqli_set_charset($link, 'utf8'))
+ printf("[%d] %s\n", mysqli_errno($link), mysqli_errno($link));
+
+ $charsetInfo = mysqli_get_charset($link);
if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -33,14 +39,14 @@ require_once('skipifconnectfailure.inc');
switch ($k) {
case 1:
/* label column, result set charset */
- if ($field->charsetnr != $charsets['results']['nr']) {
+ if ($field->charsetnr != $charsetInfo->number) {
printf("[004] Expecting charset %s/%d got %d\n",
- $charsets['results']['charset'],
- $charsets['results']['nr'], $field->charsetnr);
+ $charsetInfo->charset,
+ $charsetInfo->number, $field->charsetnr);
}
- if ($field->length != (1 * $charsets['results']['maxlen'])) {
+ if ($field->length != $charsetInfo->max_length) {
printf("[005] Expecting length %d got %d\n",
- $charsets['results']['maxlen'],
+ $charsetInfo->max_length,
$field->max_length);
}
break;
@@ -118,4 +124,4 @@ object(stdClass)#%d (13) {
}
Warning: mysqli_fetch_fields(): Couldn't fetch mysqli_result in %s on line %d
-done! \ No newline at end of file
+done!
diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt
index a747bdfa0..449d2f90d 100644
--- a/ext/mysqli/tests/mysqli_field_seek.phpt
+++ b/ext/mysqli/tests/mysqli_field_seek.phpt
@@ -66,7 +66,13 @@ require_once('skipifconnectfailure.inc');
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
- $charsets = my_get_charsets($link);
+
+ // Make sure that client, connection and result charsets are all the
+ // same. Not sure whether this is strictly necessary.
+ if (!mysqli_set_charset($link, 'utf8'))
+ printf("[%d] %s\n", mysqli_errno($link), mysqli_errno($link));
+
+ $charsetInfo = mysqli_get_charset($link);
if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1", MYSQLI_USE_RESULT)) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -81,15 +87,13 @@ require_once('skipifconnectfailure.inc');
$field = mysqli_fetch_field($res);
var_dump($field);
/* label column, result set charset */
- if ($field->charsetnr != $charsets['results']['nr']) {
+ if ($field->charsetnr != $charsetInfo->number) {
printf("[004] Expecting charset %s/%d got %d\n",
- $charsets['results']['charset'],
- $charsets['results']['nr'], $field->charsetnr);
+ $charsetInfo->charset, $charsetInfo->number, $field->charsetnr);
}
- if ($field->length != (1 * $charsets['results']['maxlen'])) {
+ if ($field->length != $charsetInfo->max_length) {
printf("[005] Expecting length %d got %d\n",
- $charsets['results']['maxlen'],
- $field->max_length);
+ $charsetInfo->max_length, $field->max_length);
}
var_dump(mysqli_field_tell($res));
@@ -217,7 +221,7 @@ bool(false)
Warning: mysqli_field_seek(): Invalid field offset in %s on line %d
bool(false)
bool(true)
-object(stdClass)#3 (13) {
+object(stdClass)#%d (13) {
[%u|b%"name"]=>
%unicode|string%(5) "_null"
[%u|b%"orgname"]=>
@@ -248,4 +252,4 @@ object(stdClass)#3 (13) {
Warning: mysqli_field_seek(): Couldn't fetch mysqli_result in %s on line %d
NULL
-done! \ No newline at end of file
+done!
diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt
index 2d5004fe6..6bb5d215e 100644
--- a/ext/mysqli/tests/mysqli_info.phpt
+++ b/ext/mysqli/tests/mysqli_info.phpt
@@ -21,8 +21,8 @@ require_once('skipifconnectfailure.inc');
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// NOTE: empty string, no multiple insert syntax
- if (!is_string($tmp = mysqli_info($link)) || ('' != $tmp))
- printf("[004] Expecting string/empty, got %s/%s\n", gettype($tmp), $tmp);
+ if (!is_null($tmp = mysqli_info($link)) || ('' != $tmp))
+ printf("[004] Expecting null, got %s/%s\n", gettype($tmp), $tmp);
if (!$res = mysqli_query($link, "INSERT INTO test(id, label) VALUES (101, 'a'), (102, 'b')"))
printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -54,8 +54,8 @@ require_once('skipifconnectfailure.inc');
if (!$res = mysqli_query($link, "SELECT 1"))
printf("[013] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (!is_string($tmp = mysqli_info($link)) || ('' != $tmp))
- printf("[014] Expecting string/empty, got %s/%s\n", gettype($tmp), $tmp);
+ if (!is_null($tmp = mysqli_info($link)) || ('' != $tmp))
+ printf("[014] Expecting null, got %s/%s\n", gettype($tmp), $tmp);
mysqli_free_result($res);
// NOTE: no LOAD DATA INFILE test
diff --git a/ext/mysqli/tests/mysqli_pam_sha256.phpt b/ext/mysqli/tests/mysqli_pam_sha256.phpt
new file mode 100644
index 000000000..3016e200d
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_pam_sha256.phpt
@@ -0,0 +1,113 @@
+--TEST--
+PAM: SHA-256
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+
+ob_start();
+phpinfo(INFO_MODULES);
+$tmp = ob_get_contents();
+ob_end_clean();
+if (!stristr($tmp, "auth_plugin_sha256_password"))
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
+
+require_once('connect.inc');
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+
+if (mysqli_get_server_version($link) < 50606)
+ die("skip: SHA-256 requires MySQL 5.6.6+");
+
+if (!($res = $link->query("SHOW PLUGINS"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+$found = false;
+while ($row = $res->fetch_assoc()) {
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
+}
+if (!$found)
+ die("skip SHA-256 server plugin unavailable");
+
+if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+if (!($row = $res->fetch_assoc())) {
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+}
+
+if (strlen($row['Value']) < 100) {
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+}
+
+if (!$link->query("SET @@session.old_passwords=2")) {
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+}
+
+$link->query('DROP USER shatest');
+$link->query("DROP USER shatest@localhost");
+
+
+if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query("DROP TABLE IF EXISTS test") ||
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+
+
+if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+}
+
+$link->close();
+?>
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ if (!$link = my_mysqli_connect($host, 'shatest', 'shatest', $db, $port, $socket)) {
+ printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, "shatest", $db, $port, $socket);
+ } else {
+
+ if (!$res = $link->query("SELECT id FROM test WHERE id = 1"))
+ printf("[002] [%d] %s\n", $link->errno, $link->error);
+
+ if (!$row = mysqli_fetch_assoc($res)) {
+ printf("[003] [%d] %s\n", $link->errno, $link->error);
+ }
+
+ if ($row['id'] != 1) {
+ printf("[004] Expecting 1 got %s/'%s'", gettype($row['id']), $row['id']);
+ }
+
+ $res->close();
+ $link->close();
+ }
+
+ print "done!";
+?>
+--CLEAN--
+<?php
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
+?>
+--EXPECTF--
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
new file mode 100644
index 000000000..27bbed138
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
@@ -0,0 +1,129 @@
+--TEST--
+PAM: SHA-256, mysqlnd.sha256_server_public_key
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+
+ob_start();
+phpinfo(INFO_MODULES);
+$tmp = ob_get_contents();
+ob_end_clean();
+if (!stristr($tmp, "auth_plugin_sha256_password"))
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
+
+require_once('connect.inc');
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+
+if (mysqli_get_server_version($link) < 50606)
+ die("skip: SHA-256 requires MySQL 5.6.6+");
+
+if (!($res = $link->query("SHOW PLUGINS"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+$found = false;
+while ($row = $res->fetch_assoc()) {
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
+}
+if (!$found)
+ die("skip SHA-256 server plugin unavailable");
+
+if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+if (!($row = $res->fetch_assoc())) {
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+}
+
+$key = $row['Value'];
+if (strlen($key) < 100) {
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+}
+
+/* date changes may give false positive */
+$file = "test_sha256_ini";
+if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
+ die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
+}
+$key = str_replace("A", "a", $key);
+$key = str_replace("M", "m", $key);
+if (strlen($key) != fwrite($fp, $key)) {
+ die(sprintf("skip Failed to create pub key file"));
+}
+
+
+if (!$link->query("SET @@session.old_passwords=2")) {
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+}
+
+$link->query('DROP USER shatest');
+$link->query("DROP USER shatest@localhost");
+
+
+if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query("DROP TABLE IF EXISTS test") ||
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+
+
+if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+}
+
+$link->close();
+?>
+--INI--
+mysqlnd.sha256_server_public_key="test_sha256_ini"
+--FILE--
+<?php
+ require_once("connect.inc");
+
+
+ $link = new mysqli($host, 'shatest', 'shatest', $db, $port, $socket);
+ if ($link->connect_errno) {
+ printf("[001] [%d] %s\n", $link->connect_errno, $link->connect_error);
+ } else {
+ if (!$res = $link->query("SELECT id FROM test WHERE id = 1"))
+ printf("[002] [%d] %s\n", $link->errno, $link->error);
+
+ if (!$row = mysqli_fetch_assoc($res)) {
+ printf("[003] [%d] %s\n", $link->errno, $link->error);
+ }
+
+ if ($row['id'] != 1) {
+ printf("[004] Expecting 1 got %s/'%s'", gettype($row['id']), $row['id']);
+ }
+ }
+ print "done!";
+?>
+--CLEAN--
+<?php
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
+ $file = "test_sha256_ini";
+ @unlink($file);
+?>
+--EXPECTF--
+
+Warning: mysqli::mysqli(): (HY000/1045): %s in %s on line %d
+[001] [1045] %s
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt
new file mode 100644
index 000000000..afed773b0
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt
@@ -0,0 +1,132 @@
+--TEST--
+PAM: SHA-256, option: MYSQLI_SERVER_PUBLIC_KEY
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+
+ob_start();
+phpinfo(INFO_MODULES);
+$tmp = ob_get_contents();
+ob_end_clean();
+if (!stristr($tmp, "auth_plugin_sha256_password"))
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
+
+require_once('connect.inc');
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+
+if (mysqli_get_server_version($link) < 50606)
+ die("skip: SHA-256 requires MySQL 5.6.6+");
+
+if (!($res = $link->query("SHOW PLUGINS"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+$found = false;
+while ($row = $res->fetch_assoc()) {
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
+}
+if (!$found)
+ die("skip SHA-256 server plugin unavailable");
+
+if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+if (!($row = $res->fetch_assoc())) {
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+}
+
+if (strlen($row['Value']) < 100) {
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+}
+
+/* date changes may give false positive */
+$file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
+ die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
+}
+if (strlen($row['Value']) != fwrite($fp, $row['Value'])) {
+ die(sprintf("skip Failed to create pub key file"));
+}
+
+
+if (!$link->query("SET @@session.old_passwords=2")) {
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+}
+
+$link->query('DROP USER shatest');
+$link->query("DROP USER shatest@localhost");
+
+
+if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query("DROP TABLE IF EXISTS test") ||
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+
+
+if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+}
+
+$link->close();
+?>
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+ if (file_exists($file) && is_readable($file)) {
+
+ $link = mysqli_init();
+ if (!($link->options(MYSQLI_SERVER_PUBLIC_KEY, $file))) {
+ printf("[001] mysqli_options failed, [%d] %s\n", $link->errno, $link->error);
+ }
+
+ if (!$link->real_connect($host, 'shatest', 'shatest', $db, $port, $socket)) {
+ printf("[002] [%d] %s\n", $link->connect_errno, $link->connect_error);
+ }
+
+ if (!$res = $link->query("SELECT id FROM test WHERE id = 1"))
+ printf("[003] [%d] %s\n", $link->errno, $link->error);
+
+ if (!$row = mysqli_fetch_assoc($res)) {
+ printf("[004] [%d] %s\n", $link->errno, $link->error);
+ }
+
+ if ($row['id'] != 1) {
+ printf("[005] Expecting 1 got %s/'%s'", gettype($row['id']), $row['id']);
+ }
+
+ $res->close();
+ $link->close();
+ }
+
+ print "done!";
+?>
+--CLEAN--
+<?php
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
+ $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+ @unlink($file);
+?>
+--EXPECTF--
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt
new file mode 100644
index 000000000..e2626240d
--- /dev/null
+++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt
@@ -0,0 +1,188 @@
+--TEST--
+PAM: SHA-256, option: MYSQLI_SERVER_PUBLIC_KEY (invalid)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+
+ob_start();
+phpinfo(INFO_MODULES);
+$tmp = ob_get_contents();
+ob_end_clean();
+if (!stristr($tmp, "auth_plugin_sha256_password"))
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
+
+require_once('connect.inc');
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+
+if (mysqli_get_server_version($link) < 50606)
+ die("skip: SHA-256 requires MySQL 5.6.6+");
+
+if (!($res = $link->query("SHOW PLUGINS"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+$found = false;
+while ($row = $res->fetch_assoc()) {
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
+}
+if (!$found)
+ die("skip SHA-256 server plugin unavailable");
+
+if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+}
+
+if (!($row = $res->fetch_assoc())) {
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+}
+
+if (strlen($row['Value']) < 100) {
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+}
+
+/* date changes may give false positive */
+$file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
+ die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
+}
+if (strlen($row['Value']) != fwrite($fp, $row['Value'])) {
+ die(sprintf("skip Failed to create pub key file"));
+}
+
+
+if (!$link->query("SET @@session.old_passwords=2")) {
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+}
+
+$link->query('DROP USER shatest');
+$link->query("DROP USER shatest@localhost");
+
+
+if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+}
+
+if (!$link->query("DROP TABLE IF EXISTS test") ||
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+
+
+if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+}
+
+$link->close();
+?>
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ function sha_connect($offset, $host, $db, $port, $socket, $file) {
+
+ $link = mysqli_init();
+ if (!($link->options(MYSQLI_SERVER_PUBLIC_KEY, $file))) {
+ printf("[%03d + 001] mysqli_options failed, [%d] %s\n", $offset, $link->errno, $link->error);
+ return false;
+ }
+
+ if (!$link->real_connect($host, 'shatest', 'shatest', $db, $port, $socket)) {
+ printf("[%03d + 002] [%d] %s\n", $offset, $link->connect_errno, $link->connect_error);
+ return false;
+ }
+
+ if (!$res = $link->query("SELECT id FROM test WHERE id = 1"))
+ printf("[%03d + 003] [%d] %s\n", $offset, $link->errno, $link->error);
+ return false;
+
+ if (!$row = mysqli_fetch_assoc($res)) {
+ printf("[%03d + 004] [%d] %s\n", $offset, $link->errno, $link->error);
+ return false;
+ }
+
+ if ($row['id'] != 1) {
+ printf("[%03d + 005] Expecting 1 got %s/'%s'", $offset, gettype($row['id']), $row['id']);
+ return false;
+ }
+
+ $res->close();
+ $link->close();
+ return true;
+ }
+
+ $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+ if (file_exists($file) && is_readable($file)) {
+
+ /* valid key */
+ sha_connect(100, $host, $db, $port, $socket, $file);
+
+ /* invalid key */
+ $file_wrong = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_wrong" , @date("Ymd"));
+
+ $key = file_get_contents($file);
+ $key = str_replace("A", "a", $key);
+ $key = str_replace("M", "m", $key);
+ @unlink($file_wrong);
+ if (!($fp = fopen($file_wrong, "w"))) {
+ printf("[002] Can't write public key file.");
+ } else {
+ fwrite($fp, $key);
+ fclose($fp);
+ sha_connect(200, $host, $db, $port, $socket, $file_wrong);
+ }
+
+ /* empty file */
+ @unlink($file_wrong);
+ if (!($fp = fopen($file_wrong, "w"))) {
+ printf("[003] Can't write public key file.");
+ } else {
+ fwrite($fp, "");
+ fclose($fp);
+ sha_connect(300, $host, $db, $port, $socket, $file_wrong);
+ }
+
+ /* file does not exist */
+ @unlink($file_wrong);
+ sha_connect(400, $host, $db, $port, $socket, $file_wrong);
+
+ } else {
+ printf("[001] Cannot read public key file.");
+ }
+
+ print "done!";
+?>
+--CLEAN--
+<?php
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
+ $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+ @unlink($file);
+ $file_wrong = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_wrong" , @date("Ymd"));
+ @unlink($file_wrong);
+?>
+--EXPECTF--
+Warning: mysqli::real_connect(): (HY000/1045): %s in %s on line %d
+[200 + 002] [1045] %s
+
+Warning: mysqli::real_connect(): (HY000/1045): %s in %s on line %d
+[300 + 002] [1045] %s
+
+Warning: mysqli::real_connect(%sest_sha256_wrong_%d): failed to open stream: No such file or directory in %s on line %d
+
+Warning: mysqli::real_connect(): (HY000/1045): %s in %s on line %d
+[400 + 002] [1045] %s
+done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_pconn_kill.phpt b/ext/mysqli/tests/mysqli_pconn_kill.phpt
index f8d8d7e8b..f8d8d7e8b 100755..100644
--- a/ext/mysqli/tests/mysqli_pconn_kill.phpt
+++ b/ext/mysqli/tests/mysqli_pconn_kill.phpt
diff --git a/ext/mysqli/tests/mysqli_query_local_infile_large.phpt b/ext/mysqli/tests/mysqli_query_local_infile_large.phpt
deleted file mode 100644
index 76bc415d8..000000000
--- a/ext/mysqli/tests/mysqli_query_local_infile_large.phpt
+++ /dev/null
@@ -1,103 +0,0 @@
---TEST--
-mysql_query(LOAD DATA LOCAL INFILE) with large data set (10MB)
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifconnectfailure.inc');
-
-$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
-if (!$link)
- die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- // Create a large CVS file
- $file = tempnam(sys_get_temp_dir(), 'mysqli_test.cvs');
- if (!$fp = fopen($file, 'w'))
- printf("[001] Cannot create CVS file '%s'\n", $file);
-
- $data = str_repeat("a", 127) . ";" . str_repeat("b", 127) . "\n";
-
- $runtime = 5;
- $max_bytes = 1024 * 1024 * 10;
-
- $start = microtime(true);
- $bytes = 0;
- $rowno = 0;
- while (($bytes < $max_bytes) && ((microtime(true) - $start) < $runtime)) {
- if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1))
- $bytes += fwrite($fp, (binary)(++$rowno . ";" . $data));
- else
- $bytes += fwrite($fp, ++$rowno . ";" . $data);
- }
- fclose($fp);
- printf("Filesize in bytes: %d\nRows: %d\n", $bytes, $rowno);
-
- require_once("connect.inc");
- if (!($link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
- printf("[002] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
-
- if (!mysqli_query($link, "DROP TABLE IF EXISTS test") ||
- !mysqli_query($link, "CREATE TABLE test(id INT, col1 VARCHAR(255), col2 VARCHAR(255)) ENGINE = " . $engine))
- printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (!mysqli_query($link, sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE test FIELDS TERMINATED BY ';'", mysqli_real_escape_string($link, $file))))
- printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if ((!is_string(mysqli_info($link))) || ('' == mysqli_info($link))) {
- printf("[005] [%d] %s, mysqli_info not set \n", mysqli_errno($link), mysqli_error($link));
- }
-
- if (!($res = mysqli_query($link, "SELECT COUNT(*) AS _num FROM test")))
- printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- $row = mysqli_fetch_assoc($res);
- if (($row["_num"] != $rowno))
- printf("[007] Expecting %d rows, found %d\n", $rowno, $row["_num"]);
-
- mysqli_free_result($res);
-
- $random = mt_rand(1, $rowno);
- if (!$res = mysqli_query($link, "SELECT id, col1, col2 FROM test WHERE id = " . $random))
- printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- $row = mysqli_fetch_assoc($res);
- var_dump($row);
- mysqli_free_result($res);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
-$file = tempnam(sys_get_temp_dir(), 'mysqli_test.cvs');
-if (file_exists($file))
- unlink($file);
-
-require_once("connect.inc");
-if (!($link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
- printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
-
-if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-?>
---EXPECTF--
-Filesize in bytes: %d
-Rows: %d
-array(3) {
- [%u|b%"id"]=>
- %unicode|string%(%d) "%d"
- [%u|b%"col1"]=>
- %unicode|string%(127) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- [%u|b%"col2"]=>
- %unicode|string%(127) "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
-}
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_send_query.phpt b/ext/mysqli/tests/mysqli_send_query.phpt
index 7de2bfc21..7de2bfc21 100755..100644
--- a/ext/mysqli/tests/mysqli_send_query.phpt
+++ b/ext/mysqli/tests/mysqli_send_query.phpt
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_default.phpt b/ext/mysqli/tests/mysqli_set_local_infile_default.phpt
deleted file mode 100644
index 0348b01f6..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_default.phpt
+++ /dev/null
@@ -1,132 +0,0 @@
---TEST--
-mysqli_set_local_infile_default()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
-if (!$link)
- die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
-
- $link = $tmp = null;
- if (!is_null($tmp = @mysqli_set_local_infile_default()))
- printf("[001] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_local_infile_default($link)))
- printf("[002] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
- $link = new mysqli();
- if (!is_null($tmp = @mysqli_set_local_infile_default($link)))
- printf("[002a] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
- include("table.inc");
-
- if (!is_null($tmp = @mysqli_set_local_infile_default($link, 'foo')))
- printf("[003] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
-
- function callback_simple($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation);
-
- $invocation++;
- if (!is_resource($fp))
- printf("[012] First argument passed to callback is not a resource but %s/%s\n",
- $fp, gettype($fp));
-
- if (!$buffer = fread($fp, $buflen)) {
- if ($invocation == 1) {
- printf("[013] Cannot read from stream\n");
- $error = 'Cannot read from stream';
- } else {
- return strlen($buffer);
- }
- }
-
- $lines = explode("\n", $buffer);
- if (count($lines) != 4 && strlen($buffer) > 0) {
- printf("[014] Test is too simple to handle a buffer of size %d that cannot hold all lines\n", $buflen);
- $error = 'Parser too simple';
- }
-
- $buffer = '';
- foreach ($lines as $k => $line) {
- if ('' === trim($line))
- continue;
-
- $columns = explode(';', $line);
- if (empty($columns)) {
- printf("[015] Cannot parse columns\n");
- $error = 'Cannot parse columns';
- }
-
- // increase id column value
- $columns[0] += 1;
- $buffer .= implode(';', $columns);
- $buffer .= "\n";
- }
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(4);
- $expected = array(
- array('id' => 98, 'label' => 'x'),
- array('id' => 99, 'label' => 'y'),
- array('id' => 100, 'label' => 'z'),
- );
- try_handler(10, $link, $file, 'callback_simple', $expected);
-
- $expected = array(
- array('id' => 97, 'label' => 'x'),
- array('id' => 98, 'label' => 'y'),
- array('id' => 99, 'label' => 'z'),
- );
- try_handler(20, $link, $file, 'default', $expected);
-
- $expected = array(
- array('id' => 98, 'label' => 'x'),
- array('id' => 99, 'label' => 'y'),
- array('id' => 100, 'label' => 'z'),
- );
- try_handler(30, $link, $file, 'callback_simple', $expected);
-
- mysqli_close($link);
-
- if (!is_null($tmp = @mysqli_set_local_infile_default($link)))
- printf("[300] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
-
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_simple'
-Callback: 0
-Callback: 1
-Callback set to 'default'
-Callback set to 'callback_simple'
-Callback: 2
-Callback: 3
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt
deleted file mode 100644
index 58f4c7035..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt
+++ /dev/null
@@ -1,196 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_simple($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation);
-
- $invocation++;
- if (!is_resource($fp))
- printf("[012] First argument passed to callback is not a resource but %s/%s\n",
- $fp, gettype($fp));
-
- if (!$buffer = fread($fp, $buflen)) {
- if ($invocation == 1) {
- printf("[013] Cannot read from stream\n");
- $error = 'Cannot read from stream';
- } else {
- return strlen($buffer);
- }
- }
-
- $lines = explode("\n", $buffer);
- if (count($lines) != 4 && strlen($buffer) > 0) {
- printf("[014] Test is too simple to handle a buffer of size %d that cannot hold all lines\n", $buflen);
- $error = 'Parser too simple';
- }
-
- $buffer = '';
- foreach ($lines as $k => $line) {
- if ('' === trim($line))
- continue;
-
- $columns = explode(';', $line);
- if (empty($columns)) {
- printf("[015] Cannot parse columns\n");
- $error = 'Cannot parse columns';
- }
-
- // increase id column value
- $columns[0] += 1;
- $buffer .= implode(';', $columns);
- $buffer .= "\n";
- }
-
- return strlen($buffer);
- }
-
- function callback_fclose($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
-
- fclose($fp);
- return strlen($buffer);
- }
-
- function callback_closefile($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
- if (is_resource($fp))
- fclose($fp);
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- }
-
- function callback_invalid_args($fp, &$buffer, $buflen) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- $buffer = fread($fp, $buflen);
-
- return strlen($buffer);
- }
-
- function callback_error($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- $buffer = fread($fp, $buflen);
- $error = 'How to access this error?';
-
- return -1;
- }
-
- if (!is_null($tmp = @mysqli_set_local_infile_handler()))
- printf("[001] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
-
- $handle = null;
- if (!is_null($tmp = @mysqli_set_local_infile_handler($handle)))
- printf("[002] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
-
- $handle = @new mysqli();
- if (!is_null($tmp = @mysqli_set_local_infile_handler($handle, 'callback_simple')))
- printf("[003] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
-
- if (false !== ($tmp = @mysqli_set_local_infile_handler($link, 'unknown')))
- printf("[004] Expecting false/boolean got %s/%s\n", $tmp, gettype($tmp));
-
- $file = create_standard_csv(5);
-
- $expected = array(
- array('id' => 98, 'label' => 'x'),
- array('id' => 99, 'label' => 'y'),
- array('id' => 100, 'label' => 'z'),
- );
- try_handler(10, $link, $file, 'callback_simple', $expected);
-
- $expected = array();
- try_handler(20, $link, $file, 'callback_fclose', $expected);
-
- // FIXME - TODO - KLUDGE -
- // IMHO this is wrong. ext/mysqli should bail as the function signature
- // is not complete. That's a BC break, OK, but it makes perfectly sense.
- $expected = array();
- try_handler(30, $link, $file, 'callback_invalid_args', $expected);
-
- $expected = array();
- try_handler(40, $link, $file, 'callback_error', $expected);
-
-
- mysqli_close($link);
-
- if (!is_null($tmp = @mysqli_set_local_infile_handler($link, 'callback_simple')))
- printf("[300] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
-
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_simple'
-Callback: 0
-Callback: 1
-Callback set to 'callback_fclose'
-Callback: 0
-[022] LOAD DATA failed, [2000] File handle close%s
-Callback set to 'callback_invalid_args'
-Callback: 0
-Callback: 1
-[037] More results than expected!
-array(2) {
- [%u|b%"id"]=>
- %unicode|string%(2) "97"
- [%u|b%"label"]=>
- %unicode|string%(1) "x"
-}
-array(2) {
- [%u|b%"id"]=>
- %unicode|string%(2) "98"
- [%u|b%"label"]=>
- %unicode|string%(1) "y"
-}
-array(2) {
- [%u|b%"id"]=>
- %unicode|string%(2) "99"
- [%u|b%"label"]=>
- %unicode|string%(1) "z"
-}
-Callback set to 'callback_error'
-Callback: 0
-[042] LOAD DATA failed, [2000] How to access this error?
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt
deleted file mode 100644
index b8f51c214..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt
+++ /dev/null
@@ -1,82 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - random ASCII character including \0
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-require_once('connect.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_bad_character($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
-
- $num_chars = (version_compare(PHP_VERSION, '5.9.9', '>') == 1) ? (floor($buflen / 2) - 10) : ($buflen - 5);
- $part1 = floor($num_chars / 2);
- $part2 = $num_chars - $part1;
-
- $buffer = '';
- for ($i = 0; $i < $part1; $i++)
- $buffer .= chr(mt_rand(0, 255));
-
- $buffer .= ';"';
-
- for ($i = 0; $i < $part2; $i++)
- $buffer .= chr(mt_rand(0, 255));
-
- $buffer .= '";';
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(5);
- /* we feed the handler with random data, therefore we cannot specify and expected rows */
- try_handler(20, $link, $file, 'callback_bad_character');
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_bad_character'
-Callback: 0
-Callback: 1
-Callback: 2
-Callback: 3
-Callback: 4
-Callback: 5
-Callback: 6
-Callback: 7
-Callback: 8
-Callback: 9
-Callback: 10
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt
deleted file mode 100644
index a3c880102..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - buffer overflow
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_buffer_overflow($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation);
- $buffer = fread($fp, $buflen);
-
- $buffer = str_repeat(';', $buflen * 2);
- return strlen($buffer);
- }
-
- $file = create_standard_csv(5);
- $expected = array();
- try_handler(20, $link, $file, 'callback_buffer_overflow', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_buffer_overflow'
-Callback: 0
-
-Warning: mysqli_query(): Too much data returned in %s on line %d
-[022] LOAD DATA failed, [%d] Too much data returned
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt
deleted file mode 100644
index 408bb29ec..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt
+++ /dev/null
@@ -1,61 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - close database link
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require("table.inc");
- require_once('local_infile_tools.inc');
-
- function callback_close_link($fp, &$buffer, $buflen, &$error) {
- global $link;
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
- if (is_object($link))
- mysqli_close($link);
-
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- try_handler(20, $link, $file, 'callback_close_link', $expected);
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_close_link'
-Callback: 0
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt
deleted file mode 100644
index 168cbc135..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt
+++ /dev/null
@@ -1,70 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - do not use the file pointer
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once("table.inc");
- require_once('local_infile_tools.inc');
-
- function callback_closefile($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
- if (is_resource($fp))
- fclose($fp);
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- try_handler(20, $link, $file, 'callback_closefile', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_closefile'
-Callback: 0
-Callback: 1
-Callback: 2
-Callback: 3
-Callback: 4
-Callback: 5
-Callback: 6
-Callback: 7
-Callback: 8
-Callback: 9
-Callback: 10
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt
deleted file mode 100755
index ad7ab32c1..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt
+++ /dev/null
@@ -1,62 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - use closures as handler
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- $callback_replace_buffer = function ($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
-
- $buffer = fread($fp, $buflen);
-
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- };
-
- $file = create_standard_csv(1);
- if (!try_handler(20, $link, $file, $callback_replace_buffer, null))
- printf("[008] Failure\n");
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'Closure object'
-Callback: 0
-Callback: 1
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt
deleted file mode 100644
index b2b42a22e..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt
+++ /dev/null
@@ -1,61 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - kill database link
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require("table.inc");
- require_once('local_infile_tools.inc');
-
- function callback_kill_link($fp, &$buffer, $buflen, &$error) {
- global $link;
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
- if (is_object($link))
- mysqli_kill($link, mysqli_thread_id($link));
-
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- mysqli_set_local_infile_default($link);
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- try_handler(20, $link, $file, 'callback_kill_link', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_kill_link'
-Callback: 0
-[022] LOAD DATA failed, [2000] Can't execute load data local init callback function
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt
deleted file mode 100644
index 16e38c5fa..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt
+++ /dev/null
@@ -1,58 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - negative return value/buflen to indicate an error
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_negative_len($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation);
- $buffer = fread($fp, $buflen);
-
- $error = "negative length means error";
- return -1;
- }
-
- $file = create_standard_csv(1);
- $expected = array();
- try_handler(20, $link, $file, 'callback_negative_len', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_negative_len'
-Callback: 0
-[022] LOAD DATA failed, [2000] negative length means error
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt
deleted file mode 100644
index 4663fe236..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt
+++ /dev/null
@@ -1,107 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - nested calls
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_simple($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback - callback_simple(): %d\n", $invocation);
-
- $invocation++;
- if (!is_resource($fp))
- printf("[012] First argument passed to callback is not a resource but %s/%s\n",
- $fp, gettype($fp));
-
- if (!$buffer = fread($fp, $buflen)) {
- if ($invocation == 1) {
- printf("[013] Cannot read from stream\n");
- $error = 'Cannot read from stream';
- } else {
- return strlen($buffer);
- }
- }
-
- $lines = explode("\n", $buffer);
- if (count($lines) != 4 && strlen($buffer) > 0) {
- printf("[014] Test is too simple to handle a buffer of size %d that cannot hold all lines\n", $buflen);
- $error = 'Parser too simple';
- }
-
- $buffer = '';
- foreach ($lines as $k => $line) {
- if ('' === trim($line))
- continue;
-
- $columns = explode(';', $line);
- if (empty($columns)) {
- printf("[015] Cannot parse columns\n");
- $error = 'Cannot parse columns';
- }
-
- // increase id column value
- $columns[0] += 1;
- $buffer .= implode(';', $columns);
- $buffer .= "\n";
- }
-
- /* report the wrong length */
- return strlen($buffer);
- }
-
- function callback_report_short_len($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback - report_short_len(): %d\n", $invocation++);
- return callback_simple($fp, $buffer, $buflen, $error);
- }
-
- $file = create_standard_csv(1);
- $expected = array(
- array('id' => 98, 'label' => 'x'),
- array('id' => 99, 'label' => 'y'),
- array('id' => 100, 'label' => 'z'),
- );
- try_handler(20, $link, $file, 'callback_report_short_len', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_report_short_len'
-Callback - report_short_len(): 0
-Callback - callback_simple(): 0
-Callback - report_short_len(): 1
-Callback - callback_simple(): 1
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt
deleted file mode 100644
index ca06435c5..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt
+++ /dev/null
@@ -1,71 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - run new query on db link
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_new_query($fp, &$buffer, $buflen, &$error) {
- global $link;
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
- if (is_object($link)) {
- if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
- printf("[Callback 001 - %03d] Cannot run query, [%d] %s\n",
- $invocation, mysqli_errno($link), mysqli_error($link));
- }
- if ($res)
- mysqli_free_result($res);
- }
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- mysqli_set_local_infile_default($link);
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- try_handler(20, $link, $file, 'callback_new_query', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_new_query'
-Callback: 0
-[Callback 001 - 001] Cannot run query, [2014] Commands out of sync; you can't run this command now
-[022] LOAD DATA failed, [2000] Can't execute load data local init callback function
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt
deleted file mode 100644
index 601a09e12..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt
+++ /dev/null
@@ -1,70 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - do not use the file pointer
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_nofileop($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
-
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- try_handler(20, $link, $file, 'callback_nofileop', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_nofileop'
-Callback: 0
-Callback: 1
-Callback: 2
-Callback: 3
-Callback: 4
-Callback: 5
-Callback: 6
-Callback: 7
-Callback: 8
-Callback: 9
-Callback: 10
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt
deleted file mode 100644
index 7163aca10..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt
+++ /dev/null
@@ -1,115 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - open basedir restrictions
---SKIPIF--
-<?php
-if (!$fp = @fopen('skipif.inc', 'r'))
- die("skip open_basedir restrictions forbid opening include files");
-
-include_once('skipif.inc');
-include_once('skipifemb.inc');
-include_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-include_once('connect.inc');
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) {
- mysqli_close($link);
- die("skip Cannot check if Server variable 'local_infile' is set to 'ON'");
-}
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-open_basedir="."
---FILE--
-<?php
- @include('connect.inc');
- if (!isset($db)) {
- // stupid run-tests.php - any idea how to set system ini setting dynamically???
- print "Warning: tempnam(): open_basedir restriction in effect. File(grrr) is not within the allowed path(s): (grrr) in grrr on line 0
-[005 + 1] Cannot create CVS file ''
-Callback set to 'callback_simple'
-[012] LOAD DATA failed, [0] grrr
-[014/0] [0] ''
-done!";
- die();
- }
-
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_simple($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation);
-
- $invocation++;
- if (!is_resource($fp))
- printf("[012] First argument passed to callback is not a resource but %s/%s\n",
- $fp, gettype($fp));
-
- if (!$buffer = fread($fp, $buflen)) {
- if ($invocation == 1) {
- printf("[013] Cannot read from stream\n");
- $error = 'Cannot read from stream';
- } else {
- return strlen($buffer);
- }
- }
-
- $lines = explode("\n", $buffer);
- if (count($lines) != 4 && strlen($buffer) > 0) {
- printf("[014] Test is too simple to handle a buffer of size %d that cannot hold all lines\n", $buflen);
- $error = 'Parser too simple';
- }
-
- $buffer = '';
- foreach ($lines as $k => $line) {
- if ('' === trim($line))
- continue;
-
- $columns = explode(';', $line);
- if (empty($columns)) {
- printf("[015] Cannot parse columns\n");
- $error = 'Cannot parse columns';
- }
-
- // increase id column value
- $columns[0] += 1;
- $buffer .= implode(';', $columns);
- $buffer .= "\n";
- }
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(5);
- $expected = array(
- array('id' => 98, 'label' => 'x'),
- array('id' => 99, 'label' => 'y'),
- array('id' => 100, 'label' => 'z'),
- );
- try_handler(10, $link, $file, 'callback_simple', $expected);
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Warning: tempnam(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d
-[005 + 1] Cannot create CVS file ''
-Callback set to 'callback_simple'
-[012] LOAD DATA failed, [%d] %s
-[014/0] [0] ''
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt
deleted file mode 100644
index 0d4024e52..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt
+++ /dev/null
@@ -1,78 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - replace buffer pointer
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_replace_buffer($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
-
- $buffer = fread($fp, $buflen);
-
- $ret = "1;'a';\n";
- $buffer = $ret;
-
- $num_chars = ((version_compare(PHP_VERSION, '5.9.9', '>') == 1)) ? floor($buflen / 2) : $buflen;
- assert(strlen($buffer) < $num_chars);
-
- if ($invocation > 10)
- return 0;
-
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- if (!try_handler(20, $link, $file, 'callback_replace_buffer', $expected))
- printf("[008] Failure\n");
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_replace_buffer'
-Callback: 0
-Callback: 1
-Callback: 2
-Callback: 3
-Callback: 4
-Callback: 5
-Callback: 6
-Callback: 7
-Callback: 8
-Callback: 9
-Callback: 10
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt
deleted file mode 100644
index b3144e430..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt
+++ /dev/null
@@ -1,101 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - report shorter buffer
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_short_len($fp, &$buffer, $buflen, &$error) {
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation);
-
- $invocation++;
- if (!is_resource($fp))
- printf("[012] First argument passed to callback is not a resource but %s/%s\n",
- $fp, gettype($fp));
-
- if (!$buffer = fread($fp, $buflen)) {
- if ($invocation == 1) {
- printf("[013] Cannot read from stream\n");
- $error = 'Cannot read from stream';
- } else {
- return strlen($buffer);
- }
- }
-
- $lines = explode("\n", $buffer);
- if (count($lines) != 4 && strlen($buffer) > 0) {
- printf("[014] Test is too simple to handle a buffer of size %d that cannot hold all lines\n", $buflen);
- $error = 'Parser too simple';
- }
-
- $buffer = '';
- foreach ($lines as $k => $line) {
- if ('' === trim($line))
- continue;
-
- $columns = explode(';', $line);
- if (empty($columns)) {
- printf("[015] Cannot parse columns\n");
- $error = 'Cannot parse columns';
- }
-
- // increase id column value
- $columns[0] += 1;
- $buffer .= implode(';', $columns);
- $buffer .= "\n";
- }
-
- /* report the wrong length */
- return strlen($buffer) - 1;
- }
-
- $file = create_standard_csv(1);
- $expected = array(
- array('id' => 98, 'label' => 'x'),
- array('id' => 99, 'label' => 'y'),
- array('id' => 100, 'label' => 'z'),
- );
- try_handler(20, $link, $file, 'callback_short_len', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_short_len'
-Callback: 0
-
-Warning: mysqli_query(): Mismatch between the return value of the callback and the content length of the buffer. in %s on line %d
-[022] LOAD DATA failed, [2000] Mismatch between the return value of the callback and the content length of the buffer.
-[024/0] [0] ''
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt
deleted file mode 100644
index f287f4d87..000000000
--- a/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt
+++ /dev/null
@@ -1,64 +0,0 @@
---TEST--
-mysqli_set_local_infile_handler() - do not use the file pointer
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-
-if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
-
-require_once('connect.inc');
-if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
-
-include_once("local_infile_tools.inc");
-if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
-
-mysqli_close($link);
-?>
---INI--
-mysqli.allow_local_infile=1
---FILE--
-<?php
- require_once('connect.inc');
- require_once('local_infile_tools.inc');
- require_once('table.inc');
-
- function callback_unregister($fp, &$buffer, $buflen, &$error) {
- global $link;
- static $invocation = 0;
-
- printf("Callback: %d\n", $invocation++);
- flush();
- if (is_resource($fp))
- fclose($fp);
- $buffer = "1;'a';\n";
- if ($invocation > 10)
- return 0;
-
- mysqli_set_local_infile_default($link);
- return strlen($buffer);
- }
-
- $file = create_standard_csv(1);
- $expected = array(array('id' => 1, 'label' => 'a'));
- try_handler(20, $link, $file, 'callback_unregister', $expected);
-
- mysqli_close($link);
- print "done!";
-?>
---CLEAN--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-Callback set to 'callback_unregister'
-Callback: 0
-
-Warning: mysqli_query(): File handle closed in %s on line %d
-[022] LOAD DATA failed, [2000] File handle closed
-[024/0] [0] ''
-done!
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
index afaccaf3c..739bf56ea 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
@@ -12,7 +12,13 @@ if (!function_exists('mysqli_stmt_get_result'))
--FILE--
<?php
require('table.inc');
- $charsets = my_get_charsets($link);
+
+ // Make sure that client, connection and result charsets are all the
+ // same. Not sure whether this is strictly necessary.
+ if (!mysqli_set_charset($link, 'utf8'))
+ printf("[%d] %s\n", mysqli_errno($link), mysqli_errno($link));
+
+ $charsetInfo = mysqli_get_charset($link);
if (!($stmt = mysqli_stmt_init($link)) ||
!mysqli_stmt_prepare($stmt, "SELECT id, label, id + 1 as _id, concat(label, '_') ___label FROM test ORDER BY id ASC LIMIT 3") ||
@@ -39,15 +45,14 @@ if (!function_exists('mysqli_stmt_get_result'))
Label column, result set charset.
All of the following columns are "too hot" - too server dependent
*/
- if ($field->charsetnr != $charsets['results']['nr']) {
+ if ($field->charsetnr != $charsetInfo->number) {
printf("[004] Expecting charset %s/%d got %d\n",
- $charsets['results']['charset'],
- $charsets['results']['nr'], $field->charsetnr);
+ $charsetInfo->charset,
+ $charsetInfo->number, $field->charsetnr);
}
- if ($field->length != (1 * $charsets['results']['maxlen'])) {
+ if ($field->length != $charsetInfo->max_length) {
printf("[005] Expecting length %d got %d\n",
- $charsets['results']['maxlen'],
- $field->max_length);
+ $charsetInfo->max_length, $field->max_length);
}
}
}
@@ -173,4 +178,4 @@ object(stdClass)#%d (13) {
[%u|b%"decimals"]=>
int(31)
}
-done! \ No newline at end of file
+done!
diff --git a/ext/mysqli/tests/skipifconnectfailure.inc b/ext/mysqli/tests/skipifconnectfailure.inc
index 32a976357..32a976357 100755..100644
--- a/ext/mysqli/tests/skipifconnectfailure.inc
+++ b/ext/mysqli/tests/skipifconnectfailure.inc
diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4
index 2c15c34e8..3fc767b23 100644
--- a/ext/mysqlnd/config9.m4
+++ b/ext/mysqlnd/config9.m4
@@ -28,7 +28,17 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
fi
- AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support])
+
+ AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable core mysqlnd SSL code])
+
+ test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
+
+ if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then
+ AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
+ AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
+
+ PHP_SETUP_OPENSSL(MYSQLND_SHARED_LIBADD, [AC_DEFINE(MYSQLND_HAVE_SSL,1,[Enable mysqlnd code that uses OpenSSL directly])])
+ fi
mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared)
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 900f8207b..ad91212f2 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -114,7 +114,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn TSRMLS
}
if (conn->net) {
- conn->net->m.free_contents(conn->net TSRMLS_CC);
+ conn->net->data->m.free_contents(conn->net TSRMLS_CC);
}
DBG_INF("Freeing memory of members");
@@ -303,17 +303,16 @@ MYSQLND_METHOD(mysqlnd_conn_data, simple_command_handle_response)(MYSQLND_CONN_D
/* }}} */
-/* {{{ mysqlnd_conn_data::simple_command */
+/* {{{ mysqlnd_conn_data::simple_command_send_request */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
- const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent,
- zend_bool ignore_upsert_status TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
+ const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC)
{
enum_func_status ret = PASS;
MYSQLND_PACKET_COMMAND * cmd_packet;
- DBG_ENTER("mysqlnd_conn_data::simple_command");
- DBG_INF_FMT("command=%s ok_packet=%u silent=%u", mysqlnd_command_to_text[command], ok_packet, silent);
+ DBG_ENTER("mysqlnd_conn_data::simple_command_send_request");
+ DBG_INF_FMT("command=%s silent=%u", mysqlnd_command_to_text[command], silent);
switch (CONN_GET_STATE(conn)) {
case CONN_READY:
@@ -355,13 +354,30 @@ MYSQLND_METHOD(mysqlnd_conn_data, simple_command)(MYSQLND_CONN_DATA * conn, enum
php_error(E_WARNING, "Error while sending %s packet. PID=%d", mysqlnd_command_to_text[command], getpid());
}
CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ conn->m->send_close(conn TSRMLS_CC);
DBG_ERR("Server is gone");
ret = FAIL;
- } else if (ok_packet != PROT_LAST) {
+ }
+ PACKET_FREE(cmd_packet);
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_conn_data::simple_command */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn_data, simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
+ const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent,
+ zend_bool ignore_upsert_status TSRMLS_DC)
+{
+ enum_func_status ret;
+ DBG_ENTER("mysqlnd_conn_data::simple_command");
+
+ ret = conn->m->simple_command_send_request(conn, command, arg, arg_len, silent, ignore_upsert_status TSRMLS_CC);
+ if (PASS == ret && ok_packet != PROT_LAST) {
ret = conn->m->simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status TSRMLS_CC);
}
- PACKET_FREE(cmd_packet);
DBG_INF(ret == PASS ? "PASS":"FAIL");
DBG_RETURN(ret);
}
@@ -440,11 +456,7 @@ mysqlnd_switch_to_ssl_if_needed(
if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) {
auth_packet->charset_no = charset->nr;
} else {
-#if MYSQLND_UNICODE
- auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */
-#else
auth_packet->charset_no = greet_packet->charset_no;
-#endif
}
#ifdef MYSQLND_SSL_SUPPORTED
@@ -453,13 +465,14 @@ mysqlnd_switch_to_ssl_if_needed(
DBG_INF("Switching to SSL");
if (!PACKET_WRITE(auth_packet, conn)) {
CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ conn->m->send_close(conn TSRMLS_CC);
SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
goto end;
}
- conn->net->m.set_client_option(conn->net, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &verify TSRMLS_CC);
+ conn->net->data->m.set_client_option(conn->net, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &verify TSRMLS_CC);
- if (FAIL == conn->net->m.enable_ssl(conn->net TSRMLS_CC)) {
+ if (FAIL == conn->net->data->m.enable_ssl(conn->net TSRMLS_CC)) {
goto end;
}
}
@@ -472,6 +485,159 @@ end:
/* }}} */
+/* {{{ mysqlnd_conn_data::fetch_auth_plugin_by_name */
+static struct st_mysqlnd_authentication_plugin *
+MYSQLND_METHOD(mysqlnd_conn_data, fetch_auth_plugin_by_name)(const char * const requested_protocol TSRMLS_DC)
+{
+ struct st_mysqlnd_authentication_plugin * auth_plugin;
+ char * plugin_name = NULL;
+ DBG_ENTER("mysqlnd_conn_data::fetch_auth_plugin_by_name");
+
+ mnd_sprintf(&plugin_name, 0, "auth_plugin_%s", requested_protocol);
+ DBG_INF_FMT("looking for %s auth plugin", plugin_name);
+ auth_plugin = mysqlnd_plugin_find(plugin_name);
+ mnd_sprintf_free(plugin_name);
+
+ DBG_RETURN(auth_plugin);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_run_authentication */
+static enum_func_status
+mysqlnd_run_authentication(
+ MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const size_t passwd_len,
+ const char * const db,
+ const size_t db_len,
+ const zend_uchar * const auth_plugin_data,
+ const size_t auth_plugin_data_len,
+ const char * const auth_protocol,
+ unsigned int charset_no,
+ const MYSQLND_OPTIONS * const options,
+ unsigned long mysql_flags,
+ zend_bool silent,
+ zend_bool is_change_user
+ TSRMLS_DC)
+{
+ enum_func_status ret = FAIL;
+ zend_bool first_call = TRUE;
+
+ char * switch_to_auth_protocol = NULL;
+ size_t switch_to_auth_protocol_len = 0;
+ char * requested_protocol = NULL;
+ zend_uchar * plugin_data;
+ size_t plugin_data_len;
+
+ DBG_ENTER("mysqlnd_run_authentication");
+
+ plugin_data_len = auth_plugin_data_len;
+ plugin_data = mnd_emalloc(plugin_data_len + 1);
+ if (!plugin_data) {
+ goto end;
+ }
+ memcpy(plugin_data, auth_plugin_data, plugin_data_len);
+ plugin_data[plugin_data_len] = '\0';
+
+ requested_protocol = mnd_pestrdup(auth_protocol? auth_protocol : MYSQLND_DEFAULT_AUTH_PROTOCOL, FALSE);
+ if (!requested_protocol) {
+ goto end;
+ }
+
+ do {
+ struct st_mysqlnd_authentication_plugin * auth_plugin = conn->m->fetch_auth_plugin_by_name(requested_protocol TSRMLS_CC);
+
+ if (!auth_plugin) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
+ SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method umknown to the client");
+ goto end;
+ }
+ DBG_INF("plugin found");
+
+ {
+ zend_uchar * switch_to_auth_protocol_data = NULL;
+ size_t switch_to_auth_protocol_data_len = 0;
+ zend_uchar * scrambled_data = NULL;
+ size_t scrambled_data_len = 0;
+
+ switch_to_auth_protocol = NULL;
+ switch_to_auth_protocol_len = 0;
+
+ if (conn->auth_plugin_data) {
+ mnd_pefree(conn->auth_plugin_data, conn->persistent);
+ conn->auth_plugin_data = NULL;
+ }
+ conn->auth_plugin_data_len = plugin_data_len;
+ conn->auth_plugin_data = mnd_pemalloc(conn->auth_plugin_data_len, conn->persistent);
+ if (!conn->auth_plugin_data) {
+ SET_OOM_ERROR(*conn->error_info);
+ goto end;
+ }
+ memcpy(conn->auth_plugin_data, plugin_data, plugin_data_len);
+
+ DBG_INF_FMT("salt(%d)=[%.*s]", plugin_data_len, plugin_data_len, plugin_data);
+ /* The data should be allocated with malloc() */
+ scrambled_data =
+ auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
+ plugin_data, plugin_data_len, options, &conn->net->data->options, mysql_flags TSRMLS_CC);
+ if (conn->error_info->error_no) {
+ goto end;
+ }
+ if (FALSE == is_change_user) {
+ ret = mysqlnd_auth_handshake(conn, user, passwd, passwd_len, db, db_len, options, mysql_flags,
+ charset_no,
+ first_call,
+ requested_protocol,
+ scrambled_data, scrambled_data_len,
+ &switch_to_auth_protocol, &switch_to_auth_protocol_len,
+ &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
+ TSRMLS_CC);
+ } else {
+ ret = mysqlnd_auth_change_user(conn, user, strlen(user), passwd, passwd_len, db, db_len, silent,
+ first_call,
+ requested_protocol,
+ scrambled_data, scrambled_data_len,
+ &switch_to_auth_protocol, &switch_to_auth_protocol_len,
+ &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
+ TSRMLS_CC);
+ }
+ first_call = FALSE;
+ free(scrambled_data);
+
+ DBG_INF_FMT("switch_to_auth_protocol=%s", switch_to_auth_protocol? switch_to_auth_protocol:"n/a");
+ if (requested_protocol && switch_to_auth_protocol) {
+ mnd_efree(requested_protocol);
+ requested_protocol = switch_to_auth_protocol;
+ }
+
+ if (plugin_data) {
+ mnd_efree(plugin_data);
+ }
+ plugin_data_len = switch_to_auth_protocol_data_len;
+ plugin_data = switch_to_auth_protocol_data;
+ }
+ DBG_INF_FMT("conn->error_info->error_no = %d", conn->error_info->error_no);
+ } while (ret == FAIL && conn->error_info->error_no == 0 && switch_to_auth_protocol != NULL);
+
+ if (ret == PASS) {
+ DBG_INF_FMT("saving requested_protocol=%s", requested_protocol);
+ conn->m->set_client_option(conn, MYSQLND_OPT_AUTH_PROTOCOL, requested_protocol TSRMLS_CC);
+ }
+end:
+ if (plugin_data) {
+ mnd_efree(plugin_data);
+ }
+ if (requested_protocol) {
+ mnd_efree(requested_protocol);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
/* {{{ mysqlnd_connect_run_authentication */
static enum_func_status
mysqlnd_connect_run_authentication(
@@ -491,116 +657,160 @@ mysqlnd_connect_run_authentication(
ret = mysqlnd_switch_to_ssl_if_needed(conn, greet_packet, options, mysql_flags TSRMLS_CC);
if (PASS == ret) {
- zend_bool first_call = TRUE;
+ ret = mysqlnd_run_authentication(conn, user, passwd, passwd_len, db, db_len,
+ greet_packet->auth_plugin_data, greet_packet->auth_plugin_data_len, greet_packet->auth_protocol,
+ greet_packet->charset_no, options, mysql_flags, FALSE /*silent*/, FALSE/*is_change*/ TSRMLS_CC);
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
- char * switch_to_auth_protocol = NULL;
- size_t switch_to_auth_protocol_len = 0;
- char * requested_protocol = NULL;
- zend_uchar * plugin_data;
- size_t plugin_data_len;
- plugin_data_len = greet_packet->auth_plugin_data_len;
- plugin_data = mnd_emalloc(plugin_data_len + 1);
- if (!plugin_data) {
- ret = FAIL;
- goto end;
- }
- memcpy(plugin_data, greet_packet->auth_plugin_data, plugin_data_len);
- plugin_data[plugin_data_len] = '\0';
+/* {{{ mysqlnd_conn_data::execute_init_commands */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands)(MYSQLND_CONN_DATA * conn TSRMLS_DC)
+{
+ enum_func_status ret = PASS;
- requested_protocol = mnd_pestrdup(greet_packet->auth_protocol? greet_packet->auth_protocol: "mysql_native_password", FALSE);
- if (!requested_protocol) {
- ret = FAIL;
- goto end;
+ DBG_ENTER("mysqlnd_conn_data::execute_init_commands");
+ if (conn->options->init_commands) {
+ unsigned int current_command = 0;
+ for (; current_command < conn->options->num_commands; ++current_command) {
+ const char * const command = conn->options->init_commands[current_command];
+ if (command) {
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_EXECUTED_COUNT);
+ if (PASS != conn->m->query(conn, command, strlen(command) TSRMLS_CC)) {
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_FAILED_COUNT);
+ ret = FAIL;
+ break;
+ }
+ if (conn->last_query_type == QUERY_SELECT) {
+ MYSQLND_RES * result = conn->m->use_result(conn TSRMLS_CC);
+ if (result) {
+ result->m.free_result(result, TRUE TSRMLS_CC);
+ }
+ }
+ }
}
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
- do {
- struct st_mysqlnd_authentication_plugin * auth_plugin;
- {
- char * plugin_name = NULL;
- mnd_sprintf(&plugin_name, 0, "auth_plugin_%s", requested_protocol);
+/* {{{ mysqlnd_conn_data::get_updated_connect_flags */
+static unsigned int
+MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA * conn, unsigned int mysql_flags TSRMLS_DC)
+{
+ MYSQLND_NET * net = conn->net;
- DBG_INF_FMT("looking for %s auth plugin", plugin_name);
- auth_plugin = mysqlnd_plugin_find(plugin_name);
- mnd_sprintf_free(plugin_name);
+ DBG_ENTER("mysqlnd_conn_data::get_updated_connect_flags");
+ /* we allow load data local infile by default */
+ mysql_flags |= MYSQLND_CAPABILITIES;
- if (!auth_plugin) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method umknown to the client");
- break;
- }
- }
- DBG_INF("plugin found");
+ if (PG(open_basedir) && strlen(PG(open_basedir))) {
+ mysql_flags ^= CLIENT_LOCAL_FILES;
+ }
- {
- zend_uchar * switch_to_auth_protocol_data = NULL;
- size_t switch_to_auth_protocol_data_len = 0;
- zend_uchar * scrambled_data = NULL;
- size_t scrambled_data_len = 0;
+#ifndef MYSQLND_COMPRESSION_ENABLED
+ if (mysql_flags & CLIENT_COMPRESS) {
+ mysql_flags &= ~CLIENT_COMPRESS;
+ }
+#else
+ if (net && net->data->options.flags & MYSQLND_NET_FLAG_USE_COMPRESSION) {
+ mysql_flags |= CLIENT_COMPRESS;
+ }
+#endif
+#ifndef MYSQLND_SSL_SUPPORTED
+ if (mysql_flags & CLIENT_SSL) {
+ mysql_flags &= ~CLIENT_SSL;
+ }
+#else
+ if (net && (net->data->options.ssl_key || net->data->options.ssl_cert ||
+ net->data->options.ssl_ca || net->data->options.ssl_capath || net->data->options.ssl_cipher))
+ {
+ mysql_flags |= CLIENT_SSL;
+ }
+#endif
- switch_to_auth_protocol = NULL;
- switch_to_auth_protocol_len = 0;
+ DBG_RETURN(mysql_flags);
+}
+/* }}} */
- if (conn->auth_plugin_data) {
- mnd_pefree(conn->auth_plugin_data, conn->persistent);
- conn->auth_plugin_data = NULL;
- }
- conn->auth_plugin_data_len = plugin_data_len;
- conn->auth_plugin_data = mnd_pemalloc(conn->auth_plugin_data_len, conn->persistent);
- if (!conn->auth_plugin_data) {
- SET_OOM_ERROR(*conn->error_info);
- goto end;
- }
- memcpy(conn->auth_plugin_data, plugin_data, plugin_data_len);
- DBG_INF_FMT("salt=[%*s]", plugin_data_len - 1, plugin_data);
- /* The data should be allocated with malloc() */
- scrambled_data =
- auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
- plugin_data, plugin_data_len, options, mysql_flags TSRMLS_CC);
+/* {{{ mysqlnd_conn_data::connect_handshake */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
+ const char * const host, const char * const user,
+ const char * const passwd, const unsigned int passwd_len,
+ const char * const db, const unsigned int db_len,
+ const unsigned int mysql_flags TSRMLS_DC)
+{
+ MYSQLND_PACKET_GREET * greet_packet;
+ MYSQLND_NET * net = conn->net;
+ DBG_ENTER("mysqlnd_conn_data::connect_handshake");
- ret = mysqlnd_auth_handshake(conn, user, passwd, passwd_len, db, db_len, options, mysql_flags,
- greet_packet->charset_no,
- first_call,
- requested_protocol,
- scrambled_data, scrambled_data_len,
- &switch_to_auth_protocol, &switch_to_auth_protocol_len,
- &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
- TSRMLS_CC);
- first_call = FALSE;
- free(scrambled_data);
+ greet_packet = conn->protocol->m.get_greet_packet(conn->protocol, FALSE TSRMLS_CC);
+ if (!greet_packet) {
+ SET_OOM_ERROR(*conn->error_info);
+ DBG_RETURN(FAIL); /* OOM */
+ }
- DBG_INF_FMT("switch_to_auth_protocol=%s", switch_to_auth_protocol? switch_to_auth_protocol:"n/a");
- if (requested_protocol && switch_to_auth_protocol) {
- mnd_efree(requested_protocol);
- requested_protocol = switch_to_auth_protocol;
- }
+ if (FAIL == net->data->m.connect_ex(conn->net, conn->scheme, conn->scheme_len, conn->persistent,
+ conn->stats, conn->error_info TSRMLS_CC))
+ {
+ goto err;
+ }
- if (plugin_data) {
- mnd_efree(plugin_data);
- }
- plugin_data_len = switch_to_auth_protocol_data_len;
- plugin_data = switch_to_auth_protocol_data;
- }
- DBG_INF_FMT("conn->error_info->error_no = %d", conn->error_info->error_no);
- } while (ret == FAIL && conn->error_info->error_no == 0 && switch_to_auth_protocol != NULL);
- if (plugin_data) {
- mnd_efree(plugin_data);
- }
-
- if (ret == PASS) {
- DBG_INF_FMT("saving requested_protocol=%s", requested_protocol);
- conn->m->set_client_option(conn, MYSQLND_OPT_AUTH_PROTOCOL, requested_protocol TSRMLS_CC);
- }
+ DBG_INF_FMT("stream=%p", net->data->m.get_stream(net TSRMLS_CC));
- if (requested_protocol) {
- mnd_efree(requested_protocol);
- }
+ if (FAIL == PACKET_READ(greet_packet, conn)) {
+ DBG_ERR("Error while reading greeting packet");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading greeting packet. PID=%d", getpid());
+ goto err;
+ } else if (greet_packet->error_no) {
+ DBG_ERR_FMT("errorno=%u error=%s", greet_packet->error_no, greet_packet->error);
+ SET_CLIENT_ERROR(*conn->error_info, greet_packet->error_no, greet_packet->sqlstate, greet_packet->error);
+ goto err;
+ } else if (greet_packet->pre41) {
+ DBG_ERR_FMT("Connecting to 3.22, 3.23 & 4.0 is not supported. Server is %-.32s", greet_packet->server_version);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Connecting to 3.22, 3.23 & 4.0 "
+ " is not supported. Server is %-.32s", greet_packet->server_version);
+ SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
+ "Connecting to 3.22, 3.23 & 4.0 servers is not supported");
+ goto err;
}
-end:
- DBG_RETURN(ret);
+
+ conn->thread_id = greet_packet->thread_id;
+ conn->protocol_version = greet_packet->protocol_version;
+ conn->server_version = mnd_pestrdup(greet_packet->server_version, conn->persistent);
+
+ conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
+ if (!conn->greet_charset) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "Server sent charset (%d) unknown to the client. Please, report to the developers", greet_packet->charset_no);
+ SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
+ "Server sent charset unknown to the client. Please, report to the developers");
+ goto err;
+ }
+
+ if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len,
+ greet_packet, conn->options, mysql_flags TSRMLS_CC))
+ {
+ goto err;
+ }
+ conn->client_flag = mysql_flags;
+ conn->server_capabilities = greet_packet->server_capabilities;
+ conn->upsert_status->warning_count = 0;
+ conn->upsert_status->server_status = greet_packet->server_status;
+ conn->upsert_status->affected_rows = 0;
+
+ PACKET_FREE(greet_packet);
+ DBG_RETURN(PASS);
+err:
+ PACKET_FREE(greet_packet);
+ DBG_RETURN(FAIL);
}
/* }}} */
@@ -623,10 +833,10 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
zend_bool reconnect = FALSE;
zend_bool saved_compression = FALSE;
zend_bool local_tx_started = FALSE;
-
- MYSQLND_PACKET_GREET * greet_packet = NULL;
+ MYSQLND_NET * net = conn->net;
DBG_ENTER("mysqlnd_conn_data::connect");
+ DBG_INF_FMT("conn=%p", conn);
if (PASS != conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
goto err;
@@ -655,14 +865,17 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
MYSQLND_DEC_CONN_STATISTIC(conn->stats, STAT_OPENED_PERSISTENT_CONNECTIONS);
}
/* Now reconnect using the same handle */
- if (conn->net->compressed) {
+ if (net->data->compressed) {
/*
we need to save the state. As we will re-connect, net->compressed should be off, or
we will look for a compression header as part of the greet message, but there will
be none.
*/
saved_compression = TRUE;
- conn->net->compressed = FALSE;
+ net->data->compressed = FALSE;
+ }
+ if (net->data->ssl) {
+ net->data->ssl = FALSE;
}
} else {
unsigned int max_allowed_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE;
@@ -685,6 +898,8 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
DBG_INF_FMT("no db given, using empty string");
db = "";
db_len = 0;
+ } else {
+ mysql_flags |= CLIENT_CONNECT_WITH_DB;
}
host_len = strlen(host);
@@ -728,84 +943,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
}
}
- greet_packet = conn->protocol->m.get_greet_packet(conn->protocol, FALSE TSRMLS_CC);
- if (!greet_packet) {
- SET_OOM_ERROR(*conn->error_info);
- goto err; /* OOM */
- }
+ mysql_flags = conn->m->get_updated_connect_flags(conn, mysql_flags TSRMLS_CC);
- if (FAIL == conn->net->m.connect_ex(conn->net, conn->scheme, conn->scheme_len, conn->persistent,
- conn->stats, conn->error_info TSRMLS_CC))
- {
- goto err;
- }
-
- DBG_INF_FMT("stream=%p", conn->net->stream);
-
- if (FAIL == PACKET_READ(greet_packet, conn)) {
- DBG_ERR("Error while reading greeting packet");
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading greeting packet. PID=%d", getpid());
- goto err;
- } else if (greet_packet->error_no) {
- DBG_ERR_FMT("errorno=%u error=%s", greet_packet->error_no, greet_packet->error);
- SET_CLIENT_ERROR(*conn->error_info, greet_packet->error_no, greet_packet->sqlstate, greet_packet->error);
- goto err;
- } else if (greet_packet->pre41) {
- DBG_ERR_FMT("Connecting to 3.22, 3.23 & 4.0 is not supported. Server is %-.32s", greet_packet->server_version);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Connecting to 3.22, 3.23 & 4.0 "
- " is not supported. Server is %-.32s", greet_packet->server_version);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
- "Connecting to 3.22, 3.23 & 4.0 servers is not supported");
- goto err;
- }
-
- conn->thread_id = greet_packet->thread_id;
- conn->protocol_version = greet_packet->protocol_version;
- conn->server_version = mnd_pestrdup(greet_packet->server_version, conn->persistent);
-
- conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
- if (!conn->greet_charset) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "Server sent charset (%d) unknown to the client. Please, report to the developers", greet_packet->charset_no);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
- "Server sent charset unknown to the client. Please, report to the developers");
- goto err;
- }
- /* we allow load data local infile by default */
- mysql_flags |= MYSQLND_CAPABILITIES;
-
- if (db) {
- mysql_flags |= CLIENT_CONNECT_WITH_DB;
- }
-
- if (PG(open_basedir) && strlen(PG(open_basedir))) {
- mysql_flags ^= CLIENT_LOCAL_FILES;
- }
-
-#ifndef MYSQLND_COMPRESSION_ENABLED
- if (mysql_flags & CLIENT_COMPRESS) {
- mysql_flags &= ~CLIENT_COMPRESS;
- }
-#else
- if (conn->net->options.flags & MYSQLND_NET_FLAG_USE_COMPRESSION) {
- mysql_flags |= CLIENT_COMPRESS;
- }
-#endif
-#ifndef MYSQLND_SSL_SUPPORTED
- if (mysql_flags & CLIENT_SSL) {
- mysql_flags &= ~CLIENT_SSL;
- }
-#else
- if (conn->net->options.ssl_key || conn->net->options.ssl_cert ||
- conn->net->options.ssl_ca || conn->net->options.ssl_capath || conn->net->options.ssl_cipher)
- {
- mysql_flags |= CLIENT_SSL;
- }
-#endif
-
- if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len,
- greet_packet, conn->options, mysql_flags TSRMLS_CC))
- {
+ if (FAIL == conn->m->connect_handshake(conn, host, user, passwd, passwd_len, db, db_len, mysql_flags TSRMLS_CC)) {
goto err;
}
@@ -813,14 +953,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
CONN_SET_STATE(conn, CONN_READY);
if (saved_compression) {
- conn->net->compressed = TRUE;
+ net->data->compressed = TRUE;
}
/*
If a connect on a existing handle is performed and mysql_flags is
passed which doesn't CLIENT_COMPRESS, then we need to overwrite the value
which we set based on saved_compression.
*/
- conn->net->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE;
+ net->data->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE;
conn->user = mnd_pestrdup(user, conn->persistent);
conn->user_len = strlen(conn->user);
@@ -882,46 +1022,17 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
}
conn->unix_socket_len = strlen(conn->unix_socket);
}
- conn->client_flag = mysql_flags;
conn->max_packet_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE;
/* todo: check if charset is available */
- conn->server_capabilities = greet_packet->server_capabilities;
- conn->upsert_status->warning_count = 0;
- conn->upsert_status->server_status = greet_packet->server_status;
- conn->upsert_status->affected_rows = 0;
SET_EMPTY_ERROR(*conn->error_info);
mysqlnd_local_infile_default(conn);
-#if MYSQLND_UNICODE
- {
- unsigned int as_unicode = 1;
- conn->m->set_client_option(conn, MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, (char *)&as_unicode TSRMLS_CC);
- DBG_INF("unicode set");
- }
-#endif
- if (conn->options->init_commands) {
- unsigned int current_command = 0;
- for (; current_command < conn->options->num_commands; ++current_command) {
- const char * const command = conn->options->init_commands[current_command];
- if (command) {
- MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_EXECUTED_COUNT);
- if (PASS != conn->m->query(conn, command, strlen(command) TSRMLS_CC)) {
- MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_FAILED_COUNT);
- goto err;
- }
- if (conn->last_query_type == QUERY_SELECT) {
- MYSQLND_RES * result = conn->m->use_result(conn TSRMLS_CC);
- if (result) {
- result->m.free_result(result, TRUE TSRMLS_CC);
- }
- }
- }
- }
+ if (FAIL == conn->m->execute_init_commands(conn TSRMLS_CC)) {
+ goto err;
}
-
MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, STAT_CONNECT_SUCCESS, 1, STAT_OPENED_CONNECTIONS, 1);
if (reconnect) {
MYSQLND_INC_GLOBAL_STATISTIC(STAT_RECONNECT);
@@ -932,13 +1043,10 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
DBG_INF_FMT("connection_id=%llu", conn->thread_id);
- PACKET_FREE(greet_packet);
-
conn->m->local_tx_end(conn, this_func, PASS TSRMLS_CC);
DBG_RETURN(PASS);
}
err:
- PACKET_FREE(greet_packet);
DBG_ERR_FMT("[%u] %.128s (trying to connect via %s)", conn->error_info->error_no, conn->error_info->error, conn->scheme);
if (!conn->error_info->error_no) {
@@ -1036,7 +1144,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, query)(MYSQLND_CONN_DATA * conn, const char *
size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, query);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::query");
- DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);
+ DBG_INF_FMT("conn=%p conn=%llu query=%s", conn, conn->thread_id, query);
if (PASS == conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
if (PASS == conn->m->send_query(conn, query, query_len TSRMLS_CC) &&
@@ -1149,7 +1257,7 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p
* when casting. It is only used here so that the buffered data warning
* is not displayed.
* */
- if (SUCCESS == php_stream_cast((*p)->data->net->stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
+ if (SUCCESS == php_stream_cast((*p)->data->net->data->m.get_stream((*p)->data->net TSRMLS_CC), PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
(void*)&this_fd, 1) && this_fd >= 0) {
PHP_SAFE_FD_SET(this_fd, fds);
@@ -1174,7 +1282,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds
MYSQLND **fwd = conn_array, **bckwd = conn_array;
while (*fwd) {
- if (SUCCESS == php_stream_cast((*fwd)->data->net->stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
+ if (SUCCESS == php_stream_cast((*fwd)->data->net->data->m.get_stream((*fwd)->data->net TSRMLS_CC), PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
(void*)&this_fd, 1) && this_fd >= 0) {
if (PHP_SAFE_FD_ISSET(this_fd, fds)) {
if (disproportion) {
@@ -1220,13 +1328,12 @@ _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND ***dont_poll, long s
DBG_RETURN(FAIL);
}
- *dont_poll = mysqlnd_stream_array_check_for_readiness(r_array TSRMLS_CC);
-
FD_ZERO(&rfds);
FD_ZERO(&wfds);
FD_ZERO(&efds);
if (r_array != NULL) {
+ *dont_poll = mysqlnd_stream_array_check_for_readiness(r_array TSRMLS_CC);
set_count = mysqlnd_stream_array_to_fd_set(r_array, &rfds, &max_fd TSRMLS_CC);
if (set_count > max_set_count) {
max_set_count = set_count;
@@ -1445,14 +1552,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, ssl_set)(MYSQLND_CONN_DATA * const conn, const
{
size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, ssl_set);
enum_func_status ret = FAIL;
+ MYSQLND_NET * net = conn->net;
DBG_ENTER("mysqlnd_conn_data::ssl_set");
if (PASS == conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
- ret = (PASS == conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_KEY, key TSRMLS_CC) &&
- PASS == conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CERT, cert TSRMLS_CC) &&
- PASS == conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CA, ca TSRMLS_CC) &&
- PASS == conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CAPATH, capath TSRMLS_CC) &&
- PASS == conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CIPHER, cipher TSRMLS_CC)) ? PASS : FAIL;
+ ret = (PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_KEY, key TSRMLS_CC) &&
+ PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CERT, cert TSRMLS_CC) &&
+ PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CA, ca TSRMLS_CC) &&
+ PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CAPATH, capath TSRMLS_CC) &&
+ PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CIPHER, cipher TSRMLS_CC)) ? PASS : FAIL;
conn->m->local_tx_end(conn, this_func, ret TSRMLS_CC);
}
@@ -1627,6 +1735,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, kill)(MYSQLND_CONN_DATA * conn, unsigned int p
SET_ERROR_AFF_ROWS(conn);
} else if (PASS == (ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_LAST, FALSE, TRUE TSRMLS_CC))) {
CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ conn->m->send_close(conn TSRMLS_CC);
}
conn->m->local_tx_end(conn, this_func, ret TSRMLS_CC);
@@ -1724,10 +1833,11 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn TSRMLS_DC)
{
enum_func_status ret = PASS;
+ MYSQLND_NET * net = conn->net;
+ php_stream * net_stream = net->data->m.get_stream(net TSRMLS_CC);
DBG_ENTER("mysqlnd_send_close");
- DBG_INF_FMT("conn=%llu conn->net->stream->abstract=%p",
- conn->thread_id, conn->net->stream? conn->net->stream->abstract:NULL);
+ DBG_INF_FMT("conn=%llu net->data->stream->abstract=%p", conn->thread_id, net_stream? net_stream->abstract:NULL);
if (CONN_GET_STATE(conn) >= CONN_READY) {
MYSQLND_DEC_CONN_STATISTIC(conn->stats, STAT_OPENED_CONNECTIONS);
@@ -1738,10 +1848,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn TSR
switch (CONN_GET_STATE(conn)) {
case CONN_READY:
DBG_INF("Connection clean, sending COM_QUIT");
- if (conn->net->stream) {
+ if (net_stream) {
ret = conn->m->simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE TSRMLS_CC);
+ net->data->m.close_stream(net, conn->stats, conn->error_info TSRMLS_CC);
}
- /* Do nothing */
+ CONN_SET_STATE(conn, CONN_QUIT_SENT);
break;
case CONN_SENDING_LOAD_DATA:
/*
@@ -1757,6 +1868,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn TSR
Do nothing, the connection will be brutally closed
and the server will catch it and free close from its side.
*/
+ /* Fall-through */
case CONN_ALLOCED:
/*
Allocated but not connected or there was failure when trying
@@ -1764,15 +1876,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn TSR
Fall-through
*/
+ CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ /* Fall-through */
case CONN_QUIT_SENT:
/* The user has killed its own connection */
+ net->data->m.close_stream(net, conn->stats, conn->error_info TSRMLS_CC);
break;
}
- /*
- We hold one reference, and every other object which needs the
- connection does increase it by 1.
- */
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
DBG_RETURN(ret);
}
@@ -1814,7 +1924,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, free_reference)(MYSQLND_CONN_DATA * co
/* {{{ mysqlnd_conn_data::get_state */
static enum mysqlnd_connection_state
-MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, get_state)(MYSQLND_CONN_DATA * const conn TSRMLS_DC)
+MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, get_state)(const MYSQLND_CONN_DATA * const conn TSRMLS_DC)
{
DBG_ENTER("mysqlnd_conn_data::get_state");
DBG_RETURN(conn->state);
@@ -2012,6 +2122,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, next_result)(MYSQLND_CONN_DATA * const conn TS
DBG_ERR_FMT("Serious error. %s::%u", __FILE__, __LINE__);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Serious error. PID=%d", getpid());
CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ conn->m->send_close(conn TSRMLS_CC);
} else {
DBG_INF_FMT("Error from the server : (%u) %s", conn->error_info->error_no, conn->error_info->error);
}
@@ -2091,13 +2202,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
TSRMLS_DC)
{
size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, change_user);
- /*
- User could be max 16 * 3 (utf8), pass is 20 usually, db is up to 64*3
- Stack space is not that expensive, so use a bit more to be protected against
- buffer overflows.
- */
enum_func_status ret = FAIL;
- zend_bool local_tx_started = FALSE;
DBG_ENTER("mysqlnd_conn_data::change_user");
DBG_INF_FMT("conn=%llu user=%s passwd=%s db=%s silent=%u",
@@ -2106,7 +2211,6 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
if (PASS != conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
goto end;
}
- local_tx_started = TRUE;
SET_EMPTY_ERROR(*conn->error_info);
SET_ERROR_AFF_ROWS(conn);
@@ -2119,122 +2223,20 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
}
if (!db) {
db = "";
- }
-
- {
- zend_bool first_call = TRUE;
- char * switch_to_auth_protocol = NULL;
- size_t switch_to_auth_protocol_len = 0;
- char * requested_protocol = NULL;
- zend_uchar * plugin_data;
- size_t plugin_data_len;
-
- plugin_data_len = conn->auth_plugin_data_len;
- plugin_data = mnd_emalloc(plugin_data_len);
- if (!plugin_data) {
- ret = FAIL;
- goto end;
- }
- memcpy(plugin_data, conn->auth_plugin_data, plugin_data_len);
-
- requested_protocol = mnd_pestrdup(conn->options->auth_protocol? conn->options->auth_protocol:"mysql_native_password", FALSE);
- if (!requested_protocol) {
- ret = FAIL;
- goto end;
- }
-
- do {
- struct st_mysqlnd_authentication_plugin * auth_plugin;
- {
- char * plugin_name = NULL;
-
- mnd_sprintf(&plugin_name, 0, "auth_plugin_%s", requested_protocol);
- DBG_INF_FMT("looking for %s auth plugin", plugin_name);
- auth_plugin = mysqlnd_plugin_find(plugin_name);
- mnd_sprintf_free(plugin_name);
-
- if (!auth_plugin) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method umknown to the client");
- break;
- }
- }
- DBG_INF("plugin found");
-
- {
- zend_uchar * switch_to_auth_protocol_data = NULL;
- size_t switch_to_auth_protocol_data_len = 0;
- zend_uchar * scrambled_data = NULL;
- size_t scrambled_data_len = 0;
-
- switch_to_auth_protocol = NULL;
- switch_to_auth_protocol_len = 0;
-
- if (conn->auth_plugin_data) {
- mnd_pefree(conn->auth_plugin_data, conn->persistent);
- conn->auth_plugin_data = NULL;
- }
- conn->auth_plugin_data_len = plugin_data_len;
- conn->auth_plugin_data = mnd_pemalloc(conn->auth_plugin_data_len, conn->persistent);
- if (!conn->auth_plugin_data) {
- SET_OOM_ERROR(*conn->error_info);
- ret = FAIL;
- goto end;
- }
- memcpy(conn->auth_plugin_data, plugin_data, plugin_data_len);
-
- DBG_INF_FMT("salt=[%*.s]", plugin_data_len - 1, plugin_data);
-
- /* The data should be allocated with malloc() */
- scrambled_data =
- auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
- plugin_data, plugin_data_len, 0, conn->server_capabilities TSRMLS_CC);
-
-
- ret = mysqlnd_auth_change_user(conn, user, strlen(user), passwd, passwd_len, db, strlen(db), silent,
- first_call,
- requested_protocol,
- scrambled_data, scrambled_data_len,
- &switch_to_auth_protocol, &switch_to_auth_protocol_len,
- &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
- TSRMLS_CC);
+ }
- first_call = FALSE;
- free(scrambled_data);
+ /* XXX: passwords that have \0 inside work during auth, but in this case won't work with change user */
+ ret = mysqlnd_run_authentication(conn, user, passwd, strlen(passwd), db, strlen(db),
+ conn->auth_plugin_data, conn->auth_plugin_data_len, conn->options->auth_protocol,
+ 0 /*charset not used*/, conn->options, conn->server_capabilities, silent, TRUE/*is_change*/ TSRMLS_CC);
- DBG_INF_FMT("switch_to_auth_protocol=%s", switch_to_auth_protocol? switch_to_auth_protocol:"n/a");
- if (requested_protocol) {
- mnd_efree(requested_protocol);
- }
- requested_protocol = switch_to_auth_protocol;
-
- if (plugin_data) {
- mnd_efree(plugin_data);
- }
- plugin_data_len = switch_to_auth_protocol_data_len;
- plugin_data = switch_to_auth_protocol_data;
- }
- DBG_INF_FMT("conn->error_info->error_no = %d", conn->error_info->error_no);
- } while (ret == FAIL && conn->error_info->error_no == 0 && switch_to_auth_protocol != NULL);
- if (plugin_data) {
- mnd_efree(plugin_data);
- }
- if (ret == PASS) {
- conn->m->set_client_option(conn, MYSQLND_OPT_AUTH_PROTOCOL, requested_protocol TSRMLS_CC);
- }
- if (requested_protocol) {
- mnd_efree(requested_protocol);
- }
- }
/*
Here we should close all statements. Unbuffered queries should not be a
problem as we won't allow sending COM_CHANGE_USER.
*/
+ conn->m->local_tx_end(conn, this_func, ret TSRMLS_CC);
end:
- if (TRUE == local_tx_started) {
- conn->m->local_tx_end(conn, this_func, ret TSRMLS_CC);
- }
DBG_INF(ret == PASS? "PASS":"FAIL");
DBG_RETURN(ret);
}
@@ -2271,13 +2273,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
case MYSQL_OPT_CONNECT_TIMEOUT:
case MYSQLND_OPT_NET_CMD_BUFFER_SIZE:
case MYSQLND_OPT_NET_READ_BUFFER_SIZE:
- ret = conn->net->m.set_client_option(conn->net, option, value TSRMLS_CC);
- break;
-#if MYSQLND_UNICODE
- case MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE:
- conn->options->numeric_and_datetime_as_unicode = *(unsigned int*) value;
+ case MYSQL_SERVER_PUBLIC_KEY:
+ ret = conn->net->data->m.set_client_option(conn->net, option, value TSRMLS_CC);
break;
-#endif
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
case MYSQLND_OPT_INT_AND_FLOAT_NATIVE:
conn->options->int_and_float_native = *(unsigned int*) value;
@@ -2438,7 +2436,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, store_result)(MYSQLND_CONN_DATA * const conn T
MYSQLND_RES * result = NULL;
DBG_ENTER("mysqlnd_conn_data::store_result");
- DBG_INF_FMT("conn=%llu", conn->thread_id);
+ DBG_INF_FMT("conn=%llu conn=%p", conn->thread_id, conn);
if (PASS == conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
do {
@@ -2650,7 +2648,12 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD(mysqlnd_conn_data, tx_commit),
MYSQLND_METHOD(mysqlnd_conn_data, tx_rollback),
MYSQLND_METHOD(mysqlnd_conn_data, local_tx_start),
- MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end)
+ MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end),
+ MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands),
+ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags),
+ MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake),
+ MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request),
+ MYSQLND_METHOD(mysqlnd_conn_data, fetch_auth_plugin_by_name)
MYSQLND_CLASS_METHODS_END;
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index b0b3b15c6..b0db48f5f 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -22,10 +22,10 @@
#ifndef MYSQLND_H
#define MYSQLND_H
-#define MYSQLND_VERSION "mysqlnd 5.0.10 - 20111026 - $Id$"
-#define MYSQLND_VERSION_ID 50010
+#define MYSQLND_VERSION "mysqlnd 5.0.11-dev - 20120503 - $Id$"
+#define MYSQLND_VERSION_ID 50011
-#define MYSQLND_PLUGIN_API_VERSION 1
+#define MYSQLND_PLUGIN_API_VERSION 2
#define MYSQLND_STRING_TO_INT_CONVERSION
/*
@@ -262,8 +262,10 @@ PHPAPI void _mysqlnd_get_client_stats(zval *return_value TSRMLS_DC ZEND_FILE_L
ZEND_BEGIN_MODULE_GLOBALS(mysqlnd)
zend_bool collect_statistics;
zend_bool collect_memory_statistics;
- char* debug; /* The actual string */
- MYSQLND_DEBUG *dbg; /* The DBG object */
+ char * debug; /* The actual string */
+ char * trace_alloc_settings; /* The actual string */
+ MYSQLND_DEBUG * dbg; /* The DBG object for standard tracing */
+ MYSQLND_DEBUG * trace_alloc; /* The DBG object for allocation tracing */
long net_cmd_buffer_size;
long net_read_buffer_size;
long log_mask;
@@ -275,6 +277,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqlnd)
long debug_malloc_fail_threshold;
long debug_calloc_fail_threshold;
long debug_realloc_fail_threshold;
+ char * sha256_server_public_key;
ZEND_END_MODULE_GLOBALS(mysqlnd)
PHPAPI ZEND_EXTERN_MODULE_GLOBALS(mysqlnd)
diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c
index 06e979a6e..e681d3385 100644
--- a/ext/mysqlnd/mysqlnd_alloc.c
+++ b/ext/mysqlnd/mysqlnd_alloc.c
@@ -65,8 +65,8 @@ const char * mysqlnd_debug_std_no_trace_funcs[] =
#if ZEND_DEBUG
#else
-#define __zend_filename "/unknown/unknown"
-#define __zend_lineno 0
+#define __zend_orig_filename "/unknown/unknown"
+#define __zend_orig_lineno 0
#endif
#define REAL_SIZE(s) (collect_memory_statistics? (s) + sizeof(size_t) : (s))
@@ -81,15 +81,17 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = &MYSQLND_G(debug_emalloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_emalloc_name);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_emalloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
#if PHP_DEBUG
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = emalloc(REAL_SIZE(size));
+ ret = _emalloc(REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -97,13 +99,13 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("size=%lu ptr=%p", size, ret);
+ TRACE_ALLOC_INF_FMT("size=%lu ptr=%p", size, ret);
if (ret && collect_memory_statistics) {
*(size_t *) ret = size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EMALLOC_COUNT, 1, STAT_MEM_EMALLOC_AMOUNT, size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -116,14 +118,16 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_pemalloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_pemalloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d persistent=%u",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno, persistent);
#if PHP_DEBUG
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = pemalloc(REAL_SIZE(size), persistent);
+ ret = (persistent) ? __zend_malloc(REAL_SIZE(size)) : _emalloc(REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -131,7 +135,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("size=%lu ptr=%p persistent=%u", size, ret, persistent);
+ TRACE_ALLOC_INF_FMT("size=%lu ptr=%p persistent=%u", size, ret, persistent);
if (ret && collect_memory_statistics) {
enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_MALLOC_COUNT:STAT_MEM_EMALLOC_COUNT;
@@ -140,7 +144,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -153,15 +157,17 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_ecalloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("before: %lu", zend_memory_usage(FALSE TSRMLS_CC));
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("before: %lu", zend_memory_usage(FALSE TSRMLS_CC));
#if PHP_DEBUG
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = ecalloc(nmemb, REAL_SIZE(size));
+ ret = _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -169,13 +175,13 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("after : %lu", zend_memory_usage(FALSE TSRMLS_CC));
- DBG_INF_FMT("size=%lu ptr=%p", size, ret);
+ TRACE_ALLOC_INF_FMT("after : %lu", zend_memory_usage(FALSE TSRMLS_CC));
+ TRACE_ALLOC_INF_FMT("size=%lu ptr=%p", size, ret);
if (ret && collect_memory_statistics) {
*(size_t *) ret = size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_ECALLOC_COUNT, 1, STAT_MEM_ECALLOC_AMOUNT, size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -188,14 +194,16 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M
#if PHP_DEBUG
long * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_pecalloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d persistent=%u",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno, persistent);
#if PHP_DEBUG
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = pecalloc(nmemb, REAL_SIZE(size), persistent);
+ ret = (persistent) ? __zend_calloc(nmemb, REAL_SIZE(size)) : _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -203,7 +211,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M
}
#endif
- DBG_INF_FMT("size=%lu ptr=%p", size, ret);
+ TRACE_ALLOC_INF_FMT("size=%lu ptr=%p", size, ret);
if (ret && collect_memory_statistics) {
enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_CALLOC_COUNT:STAT_MEM_ECALLOC_COUNT;
@@ -212,7 +220,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -226,15 +234,17 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = &MYSQLND_G(debug_erealloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_erealloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_erealloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size);
#if PHP_DEBUG
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = erealloc(REAL_PTR(ptr), REAL_SIZE(new_size));
+ ret = _erealloc(REAL_PTR(ptr), REAL_SIZE(new_size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -242,12 +252,12 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("new_ptr=%p", (char*)ret);
+ TRACE_ALLOC_INF_FMT("new_ptr=%p", (char*)ret);
if (ret && collect_memory_statistics) {
*(size_t *) ret = new_size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EREALLOC_COUNT, 1, STAT_MEM_EREALLOC_AMOUNT, new_size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -261,9 +271,11 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
#if PHP_DEBUG
long * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_perealloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, persistent);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_perealloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, persistent);
#if PHP_DEBUG
/* -1 is also "true" */
@@ -277,7 +289,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
}
#endif
- DBG_INF_FMT("new_ptr=%p", (char*)ret);
+ TRACE_ALLOC_INF_FMT("new_ptr=%p", (char*)ret);
if (ret && collect_memory_statistics) {
enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_REALLOC_COUNT:STAT_MEM_EREALLOC_COUNT;
@@ -285,7 +297,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
*(size_t *) ret = new_size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, new_size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -295,22 +307,24 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)
{
size_t free_amount = 0;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
- DBG_ENTER(mysqlnd_efree_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p", ptr);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_efree_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
if (ptr) {
if (collect_memory_statistics) {
free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t));
- DBG_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
+ TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
}
- efree(REAL_PTR(ptr));
+ _efree(REAL_PTR(ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
if (collect_memory_statistics) {
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EFREE_COUNT, 1, STAT_MEM_EFREE_AMOUNT, free_amount);
}
- DBG_VOID_RETURN;
+ TRACE_ALLOC_VOID_RETURN;
}
/* }}} */
@@ -320,24 +334,27 @@ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
{
size_t free_amount = 0;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
- DBG_ENTER(mysqlnd_pefree_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p persistent=%u", ptr, persistent);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_pefree_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p persistent=%u", ptr, persistent);
if (ptr) {
if (collect_memory_statistics) {
free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t));
- DBG_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
+ TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
}
- pefree(REAL_PTR(ptr), persistent);
+ (persistent) ? free(REAL_PTR(ptr)) : _efree(REAL_PTR(ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
if (collect_memory_statistics) {
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(persistent? STAT_MEM_FREE_COUNT:STAT_MEM_EFREE_COUNT, 1,
persistent? STAT_MEM_FREE_AMOUNT:STAT_MEM_EFREE_AMOUNT, free_amount);
}
- DBG_VOID_RETURN;
+ TRACE_ALLOC_VOID_RETURN;
}
+/* }}} */
/* {{{ _mysqlnd_malloc */
@@ -348,8 +365,10 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = &MYSQLND_G(debug_malloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_malloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_malloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
#if PHP_DEBUG
/* -1 is also "true" */
@@ -363,12 +382,12 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("size=%lu ptr=%p", size, ret);
+ TRACE_ALLOC_INF_FMT("size=%lu ptr=%p", size, ret);
if (ret && collect_memory_statistics) {
*(size_t *) ret = size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_MALLOC_COUNT, 1, STAT_MEM_MALLOC_AMOUNT, size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -381,8 +400,10 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = &MYSQLND_G(debug_calloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_calloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_calloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
#if PHP_DEBUG
/* -1 is also "true" */
@@ -396,12 +417,12 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("size=%lu ptr=%p", size, ret);
+ TRACE_ALLOC_INF_FMT("size=%lu ptr=%p", size, ret);
if (ret && collect_memory_statistics) {
*(size_t *) ret = size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_CALLOC_COUNT, 1, STAT_MEM_CALLOC_AMOUNT, size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -414,10 +435,12 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D)
#if PHP_DEBUG
long * threshold = &MYSQLND_G(debug_realloc_fail_threshold);
#endif
- DBG_ENTER(mysqlnd_realloc_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr);
- DBG_INF_FMT("before: %lu", zend_memory_usage(TRUE TSRMLS_CC));
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_realloc_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr);
+ TRACE_ALLOC_INF_FMT("before: %lu", zend_memory_usage(TRUE TSRMLS_CC));
#if PHP_DEBUG
/* -1 is also "true" */
@@ -431,13 +454,13 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D)
}
#endif
- DBG_INF_FMT("new_ptr=%p", (char*)ret);
+ TRACE_ALLOC_INF_FMT("new_ptr=%p", (char*)ret);
if (ret && collect_memory_statistics) {
*(size_t *) ret = new_size;
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_REALLOC_COUNT, 1, STAT_MEM_REALLOC_AMOUNT, new_size);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -447,14 +470,16 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
{
size_t free_amount = 0;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
- DBG_ENTER(mysqlnd_free_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p", ptr);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_free_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
if (ptr) {
if (collect_memory_statistics) {
free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t));
- DBG_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
+ TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
}
free(REAL_PTR(ptr));
}
@@ -462,7 +487,7 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
if (collect_memory_statistics) {
MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_FREE_COUNT, 1, STAT_MEM_FREE_AMOUNT, free_amount);
}
- DBG_VOID_RETURN;
+ TRACE_ALLOC_VOID_RETURN;
}
/* }}} */
@@ -476,11 +501,13 @@ char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persi
{
char * ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
- DBG_ENTER(mysqlnd_pestrndup_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p", ptr);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_pestrndup_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
- ret = pemalloc(REAL_SIZE(length) + 1, persistent);
+ ret = (persistent) ? __zend_malloc(REAL_SIZE(length + 1)) : _emalloc(REAL_SIZE(length + 1) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
{
size_t l = length;
char * p = (char *) ptr;
@@ -496,7 +523,7 @@ char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persi
MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_STRNDUP_COUNT : STAT_MEM_ESTRNDUP_COUNT);
}
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -508,14 +535,16 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME
smart_str tmp_str = {0, 0, 0};
const char * p = ptr;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
- DBG_ENTER(mysqlnd_pestrdup_name);
- DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
- DBG_INF_FMT("ptr=%p", ptr);
+ char * fn = NULL;
+ TRACE_ALLOC_ENTER(mysqlnd_pestrdup_name);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d",
+ (fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR))? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
do {
smart_str_appendc(&tmp_str, *p);
} while (*p++);
- ret = pemalloc(tmp_str.len + sizeof(size_t), persistent);
+ ret = (persistent) ? __zend_malloc(tmp_str.len + sizeof(size_t)) : _emalloc(REAL_SIZE(tmp_str.len + sizeof(size_t)) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
memcpy(FAKE_PTR(ret), tmp_str.c, tmp_str.len);
if (ret && collect_memory_statistics) {
@@ -524,7 +553,7 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME
}
smart_str_free(&tmp_str);
- DBG_RETURN(FAKE_PTR(ret));
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
}
/* }}} */
@@ -549,7 +578,7 @@ PHPAPI void _mysqlnd_sprintf_free(char * p)
}
/* }}} */
-
+/* {{{ _mysqlnd_vsprintf */
PHPAPI int _mysqlnd_vsprintf(char ** pbuf, size_t max_len, const char * format, va_list ap)
{
return vspprintf(pbuf, max_len, format, ap);
diff --git a/ext/mysqlnd/mysqlnd_alloc.h b/ext/mysqlnd/mysqlnd_alloc.h
index 673d4f6da..8d0e3bfac 100644
--- a/ext/mysqlnd/mysqlnd_alloc.h
+++ b/ext/mysqlnd/mysqlnd_alloc.h
@@ -26,8 +26,8 @@
extern const char * mysqlnd_debug_std_no_trace_funcs[];
-#define MYSQLND_MEM_D TSRMLS_DC ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC
-#define MYSQLND_MEM_C TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC
+#define MYSQLND_MEM_D TSRMLS_DC ZEND_FILE_LINE_ORIG_DC
+#define MYSQLND_MEM_C TSRMLS_CC ZEND_FILE_LINE_CC
struct st_mysqlnd_allocator_methods
{
diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c
index 10c932a96..cdbdf6d7e 100644
--- a/ext/mysqlnd/mysqlnd_auth.c
+++ b/ext/mysqlnd/mysqlnd_auth.c
@@ -88,11 +88,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) {
auth_packet->charset_no = charset->nr;
} else {
-#if MYSQLND_UNICODE
- auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */
-#else
auth_packet->charset_no = server_charset_no;
-#endif
}
auth_packet->send_auth_data = TRUE;
@@ -360,7 +356,9 @@ mysqlnd_native_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options, unsigned long mysql_flags
+ const MYSQLND_OPTIONS * const options,
+ const MYSQLND_NET_OPTIONS * const net_options,
+ unsigned long mysql_flags
TSRMLS_DC)
{
zend_uchar * ret = NULL;
@@ -418,7 +416,9 @@ mysqlnd_pam_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self,
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options, unsigned long mysql_flags
+ const MYSQLND_OPTIONS * const options,
+ const MYSQLND_NET_OPTIONS * const net_options,
+ unsigned long mysql_flags
TSRMLS_DC)
{
zend_uchar * ret = NULL;
@@ -442,7 +442,7 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_pam_authentication_plugin
MYSQLND_VERSION_ID,
MYSQLND_VERSION,
"PHP License 3.01",
- "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>, Georg Richter <georg@mysql.com>",
+ "Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>, Georg Richter <georg@php.net>",
{
NULL, /* no statistics , will be filled later if there are some */
NULL, /* no statistics */
@@ -457,12 +457,202 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_pam_authentication_plugin
};
+/******************************************* SHA256 Password ***********************************/
+#ifdef MYSQLND_HAVE_SSL
+static void
+mysqlnd_xor_string(char * dst, const size_t dst_len, const char * xor_str, const size_t xor_str_len)
+{
+ unsigned int i;
+ for (i = 0; i <= dst_len; ++i) {
+ dst[i] ^= xor_str[i % xor_str_len];
+ }
+}
+
+
+#include <openssl/rsa.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+
+
+/* {{{ mysqlnd_sha256_get_rsa_key */
+static RSA *
+mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn,
+ const MYSQLND_OPTIONS * const options,
+ const MYSQLND_NET_OPTIONS * const net_options
+ TSRMLS_DC)
+{
+ RSA * ret = NULL;
+ int len;
+ const char * fname = (net_options->sha256_server_public_key && net_options->sha256_server_public_key[0] != '\0')?
+ net_options->sha256_server_public_key:
+ MYSQLND_G(sha256_server_public_key);
+ php_stream * stream;
+ DBG_ENTER("mysqlnd_sha256_get_rsa_key");
+ DBG_INF_FMT("options_s256_pk=[%s] MYSQLND_G(sha256_server_public_key)=[%s]",
+ net_options->sha256_server_public_key? net_options->sha256_server_public_key:"n/a",
+ MYSQLND_G(sha256_server_public_key)? MYSQLND_G(sha256_server_public_key):"n/a");
+ if (!fname || fname[0] == '\0') {
+ MYSQLND_PACKET_SHA256_PK_REQUEST * pk_req_packet = NULL;
+ MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE * pk_resp_packet = NULL;
+
+ do {
+ DBG_INF("requesting the public key from the server");
+ pk_req_packet = conn->protocol->m.get_sha256_pk_request_packet(conn->protocol, FALSE TSRMLS_CC);
+ if (!pk_req_packet) {
+ SET_OOM_ERROR(*conn->error_info);
+ break;
+ }
+ pk_resp_packet = conn->protocol->m.get_sha256_pk_request_response_packet(conn->protocol, FALSE TSRMLS_CC);
+ if (!pk_resp_packet) {
+ SET_OOM_ERROR(*conn->error_info);
+ PACKET_FREE(pk_req_packet);
+ break;
+ }
+
+ if (! PACKET_WRITE(pk_req_packet, conn)) {
+ DBG_ERR_FMT("Error while sending public key request packet");
+ php_error(E_WARNING, "Error while sending public key request packet. PID=%d", getpid());
+ CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ break;
+ }
+ if (FAIL == PACKET_READ(pk_resp_packet, conn) || NULL == pk_resp_packet->public_key) {
+ DBG_ERR_FMT("Error while receiving public key");
+ php_error(E_WARNING, "Error while receiving public key. PID=%d", getpid());
+ CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ break;
+ }
+ DBG_INF_FMT("Public key(%d):\n%s", pk_resp_packet->public_key_len, pk_resp_packet->public_key);
+ /* now extract the public key */
+ {
+ BIO * bio = BIO_new_mem_buf(pk_resp_packet->public_key, pk_resp_packet->public_key_len);
+ ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL);
+ BIO_free(bio);
+ }
+ } while (0);
+ PACKET_FREE(pk_req_packet);
+ PACKET_FREE(pk_resp_packet);
+
+ DBG_INF_FMT("ret=%p", ret);
+ DBG_RETURN(ret);
+
+ SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE,
+ "sha256_server_public_key is not set for the connection or as mysqlnd.sha256_server_public_key");
+ DBG_ERR("server_public_key is not set");
+ DBG_RETURN(NULL);
+ } else {
+ char * key_str = NULL;
+ DBG_INF_FMT("Key in a file. [%s]", fname);
+ stream = php_stream_open_wrapper((char *) fname, "rb", REPORT_ERRORS, NULL);
+
+ if (stream) {
+ if ((len = php_stream_copy_to_mem(stream, &key_str, PHP_STREAM_COPY_ALL, 0)) >= 0 ) {
+ BIO * bio = BIO_new_mem_buf(key_str, len);
+ ret = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL);
+ BIO_free(bio);
+ DBG_INF("Successfully loaded");
+ }
+ if (key_str) {
+ DBG_INF_FMT("Public key:%*.s", len, key_str);
+ efree(key_str);
+ }
+ php_stream_free(stream, PHP_STREAM_FREE_CLOSE);
+ }
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_sha256_auth_get_auth_data */
+static zend_uchar *
+mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self,
+ size_t * auth_data_len,
+ MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
+ const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
+ const MYSQLND_OPTIONS * const options,
+ const MYSQLND_NET_OPTIONS * const net_options,
+ unsigned long mysql_flags
+ TSRMLS_DC)
+{
+ RSA * server_public_key;
+ zend_uchar * ret = NULL;
+ DBG_ENTER("mysqlnd_sha256_auth_get_auth_data");
+ DBG_INF_FMT("salt(%d)=[%.*s]", auth_plugin_data_len, auth_plugin_data_len, auth_plugin_data);
+
+
+ if (conn->net->data->ssl) {
+ DBG_INF("simple clear text under SSL");
+ /* clear text under SSL */
+ *auth_data_len = passwd_len;
+ ret = malloc(passwd_len);
+ memcpy(ret, passwd, passwd_len);
+ } else {
+ *auth_data_len = 0;
+ server_public_key = mysqlnd_sha256_get_rsa_key(conn, options, net_options TSRMLS_CC);
+
+ if (server_public_key) {
+ int server_public_key_len;
+ char xor_str[passwd_len + 1];
+ memcpy(xor_str, passwd, passwd_len);
+ xor_str[passwd_len] = '\0';
+ mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, auth_plugin_data_len);
+
+ server_public_key_len = RSA_size(server_public_key);
+ /*
+ Because RSA_PKCS1_OAEP_PADDING is used there is a restriction on the passwd_len.
+ RSA_PKCS1_OAEP_PADDING is recommended for new applications. See more here:
+ http://www.openssl.org/docs/crypto/RSA_public_encrypt.html
+ */
+ if ((size_t) server_public_key_len - 41 <= passwd_len) {
+ /* password message is to long */
+ SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long");
+ DBG_ERR("password is too long");
+ DBG_RETURN(NULL);
+ }
+
+ *auth_data_len = server_public_key_len;
+ ret = malloc(*auth_data_len);
+ RSA_public_encrypt(passwd_len + 1, (zend_uchar *) xor_str, ret, server_public_key, RSA_PKCS1_OAEP_PADDING);
+ }
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+static struct st_mysqlnd_authentication_plugin mysqlnd_sha256_authentication_plugin =
+{
+ {
+ MYSQLND_PLUGIN_API_VERSION,
+ "auth_plugin_sha256_password",
+ MYSQLND_VERSION_ID,
+ MYSQLND_VERSION,
+ "PHP License 3.01",
+ "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>",
+ {
+ NULL, /* no statistics , will be filled later if there are some */
+ NULL, /* no statistics */
+ },
+ {
+ NULL /* plugin shutdown */
+ }
+ },
+ {/* methods */
+ mysqlnd_sha256_auth_get_auth_data
+ }
+};
+#endif
+
/* {{{ mysqlnd_register_builtin_authentication_plugins */
void
mysqlnd_register_builtin_authentication_plugins(TSRMLS_D)
{
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_native_auth_plugin TSRMLS_CC);
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_pam_authentication_plugin TSRMLS_CC);
+#ifdef MYSQLND_HAVE_SSL
+ mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_sha256_authentication_plugin TSRMLS_CC);
+#endif
}
/* }}} */
diff --git a/ext/mysqlnd/mysqlnd_bt.c b/ext/mysqlnd/mysqlnd_bt.c
index 937518405..73cf1f5a6 100644
--- a/ext/mysqlnd/mysqlnd_bt.c
+++ b/ext/mysqlnd/mysqlnd_bt.c
@@ -25,252 +25,6 @@
/* Follows code borrowed from zend_builtin_functions.c because the functions there are static */
-#if MYSQLND_UNICODE
-/* {{{ gettraceasstring() macros */
-#define TRACE_APPEND_CHR(chr) \
- *str = (char*)erealloc(*str, *len + 1 + 1); \
- (*str)[(*len)++] = chr
-
-#define TRACE_APPEND_STRL(val, vallen) \
- { \
- int l = vallen; \
- *str = (char*)erealloc(*str, *len + l + 1); \
- memcpy((*str) + *len, val, l); \
- *len += l; \
- }
-
-#define TRACE_APPEND_USTRL(val, vallen) \
- { \
- zval tmp, copy; \
- int use_copy; \
- ZVAL_UNICODEL(&tmp, val, vallen, 1); \
- zend_make_printable_zval(&tmp, &copy, &use_copy); \
- TRACE_APPEND_STRL(Z_STRVAL(copy), Z_STRLEN(copy)); \
- zval_dtor(&copy); \
- zval_dtor(&tmp); \
- }
-
-#define TRACE_APPEND_ZVAL(zv) \
- if (Z_TYPE_P((zv)) == IS_UNICODE) { \
- zval copy; \
- int use_copy; \
- zend_make_printable_zval((zv), &copy, &use_copy); \
- TRACE_APPEND_STRL(Z_STRVAL(copy), Z_STRLEN(copy)); \
- zval_dtor(&copy); \
- } else { \
- TRACE_APPEND_STRL(Z_STRVAL_P((zv)), Z_STRLEN_P((zv))); \
- }
-
-#define TRACE_APPEND_STR(val) \
- TRACE_APPEND_STRL(val, sizeof(val)-1)
-
-#define TRACE_APPEND_KEY(key) \
- if (zend_ascii_hash_find(ht, key, sizeof(key), (void**)&tmp) == SUCCESS) { \
- if (Z_TYPE_PP(tmp) == IS_UNICODE) { \
- zval copy; \
- int use_copy; \
- zend_make_printable_zval(*tmp, &copy, &use_copy); \
- TRACE_APPEND_STRL(Z_STRVAL(copy), Z_STRLEN(copy)); \
- zval_dtor(&copy); \
- } else { \
- TRACE_APPEND_STRL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); \
- } \
- }
-/* }}} */
-
-
-/* {{{ mysqlnd_build_trace_args */
-static int mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
-{
- char **str;
- int *len;
-
- str = va_arg(args, char**);
- len = va_arg(args, int*);
-
- /* the trivial way would be to do:
- * conver_to_string_ex(arg);
- * append it and kill the now tmp arg.
- * but that could cause some E_NOTICE and also damn long lines.
- */
-
- switch (Z_TYPE_PP(arg)) {
- case IS_NULL:
- TRACE_APPEND_STR("NULL, ");
- break;
- case IS_STRING: {
- int l_added;
- TRACE_APPEND_CHR('\'');
- if (Z_STRLEN_PP(arg) > 15) {
- TRACE_APPEND_STRL(Z_STRVAL_PP(arg), 15);
- TRACE_APPEND_STR("...', ");
- l_added = 15 + 6 + 1; /* +1 because of while (--l_added) */
- } else {
- l_added = Z_STRLEN_PP(arg);
- TRACE_APPEND_STRL(Z_STRVAL_PP(arg), l_added);
- TRACE_APPEND_STR("', ");
- l_added += 3 + 1;
- }
- while (--l_added) {
- if ((unsigned char)(*str)[*len - l_added] < 32) {
- (*str)[*len - l_added] = '?';
- }
- }
- break;
- }
- case IS_UNICODE: {
- int l_added;
-
- /*
- * We do not want to apply current error mode here, since
- * zend_make_printable_zval() uses output encoding converter.
- * Temporarily set output encoding converter to escape offending
- * chars with \uXXXX notation.
- */
- zend_set_converter_error_mode(ZEND_U_CONVERTER(UG(output_encoding_conv)), ZEND_FROM_UNICODE, ZEND_CONV_ERROR_ESCAPE_JAVA);
- TRACE_APPEND_CHR('\'');
- if (Z_USTRLEN_PP(arg) > 15) {
- TRACE_APPEND_USTRL(Z_USTRVAL_PP(arg), 15);
- TRACE_APPEND_STR("...', ");
- l_added = 15 + 6 + 1; /* +1 because of while (--l_added) */
- } else {
- l_added = Z_USTRLEN_PP(arg);
- TRACE_APPEND_USTRL(Z_USTRVAL_PP(arg), l_added);
- TRACE_APPEND_STR("', ");
- l_added += 3 + 1;
- }
- /*
- * Reset output encoding converter error mode.
- */
- zend_set_converter_error_mode(ZEND_U_CONVERTER(UG(output_encoding_conv)), ZEND_FROM_UNICODE, UG(from_error_mode));
- while (--l_added) {
- if ((unsigned char)(*str)[*len - l_added] < 32) {
- (*str)[*len - l_added] = '?';
- }
- }
- break;
- }
- case IS_BOOL:
- if (Z_LVAL_PP(arg)) {
- TRACE_APPEND_STR("true, ");
- } else {
- TRACE_APPEND_STR("false, ");
- }
- break;
- case IS_RESOURCE:
- TRACE_APPEND_STR("Resource id #");
- /* break; */
- case IS_LONG: {
- long lval = Z_LVAL_PP(arg);
- char s_tmp[MAX_LENGTH_OF_LONG + 1];
- int l_tmp = zend_sprintf(s_tmp, "%ld", lval); /* SAFE */
- TRACE_APPEND_STRL(s_tmp, l_tmp);
- TRACE_APPEND_STR(", ");
- break;
- }
- case IS_DOUBLE: {
- double dval = Z_DVAL_PP(arg);
- char *s_tmp;
- int l_tmp;
-
- s_tmp = emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
- l_tmp = zend_sprintf(s_tmp, "%.*G", (int) EG(precision), dval); /* SAFE */
- TRACE_APPEND_STRL(s_tmp, l_tmp);
- /* %G already handles removing trailing zeros from the fractional part, yay */
- efree(s_tmp);
- TRACE_APPEND_STR(", ");
- break;
- }
- case IS_ARRAY:
- TRACE_APPEND_STR("Array, ");
- break;
- case IS_OBJECT: {
- zval tmp;
- zstr class_name;
- zend_uint class_name_len;
- int dup;
-
- TRACE_APPEND_STR("Object(");
-
- dup = zend_get_object_classname(*arg, &class_name, &class_name_len TSRMLS_CC);
-
- ZVAL_UNICODEL(&tmp, class_name.u, class_name_len, 1);
- convert_to_string_with_converter(&tmp, ZEND_U_CONVERTER(UG(output_encoding_conv)));
- TRACE_APPEND_STRL(Z_STRVAL(tmp), Z_STRLEN(tmp));
- zval_dtor(&tmp);
-
- if(!dup) {
- efree(class_name.v);
- }
-
- TRACE_APPEND_STR("), ");
- break;
- }
- default:
- break;
- }
- return ZEND_HASH_APPLY_KEEP;
-}
-/* }}} */
-
-
-static int mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
-{
- char *s_tmp, **str;
- int *len, *num;
- long line;
- HashTable *ht = Z_ARRVAL_PP(frame);
- zval **file, **tmp;
- uint * level;
-
- level = va_arg(args, uint *);
- str = va_arg(args, char**);
- len = va_arg(args, int*);
- num = va_arg(args, int*);
-
- if (!*level) {
- return ZEND_HASH_APPLY_KEEP;
- }
- --*level;
-
- s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 1 + 1);
- sprintf(s_tmp, "#%d ", (*num)++);
- TRACE_APPEND_STRL(s_tmp, strlen(s_tmp));
- efree(s_tmp);
- if (zend_ascii_hash_find(ht, "file", sizeof("file"), (void**)&file) == SUCCESS) {
- if (zend_ascii_hash_find(ht, "line", sizeof("line"), (void**)&tmp) == SUCCESS) {
- line = Z_LVAL_PP(tmp);
- } else {
- line = 0;
- }
- TRACE_APPEND_ZVAL(*file);
- s_tmp = emalloc(MAX_LENGTH_OF_LONG + 2 + 1);
- sprintf(s_tmp, "(%ld): ", line);
- TRACE_APPEND_STRL(s_tmp, strlen(s_tmp));
- efree(s_tmp);
- } else {
- TRACE_APPEND_STR("[internal function]: ");
- }
- TRACE_APPEND_KEY("class");
- TRACE_APPEND_KEY("type");
- TRACE_APPEND_KEY("function");
- TRACE_APPEND_CHR('(');
- if (zend_ascii_hash_find(ht, "args", sizeof("args"), (void**)&tmp) == SUCCESS) {
- int last_len = *len;
- zend_hash_apply_with_arguments(Z_ARRVAL_PP(tmp) TSRMLS_CC, (apply_func_args_t)mysqlnd_build_trace_args, 2, str, len);
- if (last_len != *len) {
- *len -= 2; /* remove last ', ' */
- }
- }
- TRACE_APPEND_STR(")\n");
- return ZEND_HASH_APPLY_KEEP;
-}
-/* }}} */
-
-
-#else /* PHP 5*/
-
-
/* {{{ gettraceasstring() macros */
#define TRACE_APPEND_CHR(chr) \
*str = (char*)erealloc(*str, *len + 1 + 1); \
@@ -295,7 +49,8 @@ static int mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_l
/* }}} */
-static int mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+static int
+mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
{
char **str;
int *len;
@@ -391,7 +146,8 @@ static int mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list
}
/* }}} */
-static int mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+static int
+mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
{
char *s_tmp, **str;
int *len, *num;
@@ -442,10 +198,10 @@ static int mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_l
return ZEND_HASH_APPLY_KEEP;
}
/* }}} */
-#endif
-PHPAPI char * mysqlnd_get_backtrace(uint max_levels, size_t * length TSRMLS_DC)
+PHPAPI char *
+mysqlnd_get_backtrace(uint max_levels, size_t * length TSRMLS_DC)
{
zval *trace;
char *res = estrdup(""), **str = &res, *s_tmp;
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c
index 044a7d680..5ed2f8373 100644
--- a/ext/mysqlnd/mysqlnd_debug.c
+++ b/ext/mysqlnd/mysqlnd_debug.c
@@ -747,21 +747,26 @@ mysqlnd_debug_init(const char * skip_functions[] TSRMLS_DC)
PHPAPI void _mysqlnd_debug(const char * mode TSRMLS_DC)
{
#if PHP_DEBUG
- MYSQLND_DEBUG *dbg = MYSQLND_G(dbg);
+ MYSQLND_DEBUG * dbg = MYSQLND_G(dbg);
if (!dbg) {
- MYSQLND_G(dbg) = dbg = mysqlnd_debug_init(mysqlnd_debug_std_no_trace_funcs TSRMLS_CC);
- if (!dbg) {
- return;
+ struct st_mysqlnd_plugin_trace_log * trace_log_plugin = mysqlnd_plugin_find("debug_trace");
+ if (trace_log_plugin) {
+ dbg = trace_log_plugin->methods.trace_instance_init(mysqlnd_debug_std_no_trace_funcs TSRMLS_CC);
+ if (!dbg) {
+ return;
+ }
+ MYSQLND_G(dbg) = dbg;
}
}
-
- dbg->m->close(dbg);
- dbg->m->set_mode(dbg, mode);
- while (zend_stack_count(&dbg->call_stack)) {
- zend_stack_del_top(&dbg->call_stack);
- }
- while (zend_stack_count(&dbg->call_time_stack)) {
- zend_stack_del_top(&dbg->call_time_stack);
+ if (dbg) {
+ dbg->m->close(dbg);
+ dbg->m->set_mode(dbg, mode);
+ while (zend_stack_count(&dbg->call_stack)) {
+ zend_stack_del_top(&dbg->call_stack);
+ }
+ while (zend_stack_count(&dbg->call_time_stack)) {
+ zend_stack_del_top(&dbg->call_time_stack);
+ }
}
#endif
}
diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h
index d805178e2..37fbb8036 100644
--- a/ext/mysqlnd/mysqlnd_debug.h
+++ b/ext/mysqlnd/mysqlnd_debug.h
@@ -96,52 +96,72 @@ PHPAPI char * mysqlnd_get_backtrace(uint max_levels, size_t * length TSRMLS_DC);
#define DBG_PROFILE_END_TIME(duration)
#endif
-#define DBG_INF_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "info : ", (msg)); } while (0)
-#define DBG_ERR_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "error: ", (msg)); } while (0)
-#define DBG_INF_FMT_EX(dbg_obj, ...) do { if (dbg_skip_trace == FALSE) (dbg_obj)->m->log_va((dbg_obj), __LINE__, __FILE__, -1, "info : ", __VA_ARGS__); } while (0)
-#define DBG_ERR_FMT_EX(dbg_obj, ...) do { if (dbg_skip_trace == FALSE) (dbg_obj)->m->log_va((dbg_obj), __LINE__, __FILE__, -1, "error: ", __VA_ARGS__); } while (0)
+#define DBG_INF_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE && (dbg_obj)) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "info : ", (msg)); } while (0)
+#define DBG_ERR_EX(dbg_obj, msg) do { if (dbg_skip_trace == FALSE && (dbg_obj)) (dbg_obj)->m->log((dbg_obj), __LINE__, __FILE__, -1, "error: ", (msg)); } while (0)
+#define DBG_INF_FMT_EX(dbg_obj, ...) do { if (dbg_skip_trace == FALSE && (dbg_obj)) (dbg_obj)->m->log_va((dbg_obj), __LINE__, __FILE__, -1, "info : ", __VA_ARGS__); } while (0)
+#define DBG_ERR_FMT_EX(dbg_obj, ...) do { if (dbg_skip_trace == FALSE && (dbg_obj)) (dbg_obj)->m->log_va((dbg_obj), __LINE__, __FILE__, -1, "error: ", __VA_ARGS__); } while (0)
-#define DBG_BLOCK_ENTER_EX(dbg_obj, block_name) \
+#define DBG_BLOCK_ENTER_EX(dbg_obj, block_name) DBG_BLOCK_ENTER_EX2((dbg_obj), NULL, (block_name))
+#define DBG_BLOCK_LEAVE_EX(dbg_obj) DBG_BLOCK_LEAVE_EX2((dbg_obj))
+
+#define DBG_BLOCK_ENTER_EX2(dbg_obj1, dbg_obj2, block_name) \
{ \
- DBG_ENTER_EX(dbg_obj, (block_name));
+ DBG_ENTER_EX2((dbg_obj1), (db_obj2), (block_name));
-#define DBG_BLOCK_LEAVE_EX(dbg_obj) \
- DBG_LEAVE_EX((dbg_obj), ;) \
+#define DBG_BLOCK_LEAVE_EX2(dbg_obj1, dbg_obj2) \
+ DBG_LEAVE_EX2((dbg_obj1), (dbg_obj2), ;) \
} \
-#define DBG_ENTER_EX(dbg_obj, func_name) \
+#define DBG_ENTER_EX(dbg_obj, func_name) DBG_ENTER_EX2((dbg_obj), (MYSQLND_DEBUG *) NULL, (func_name))
+#define DBG_LEAVE_EX(dbg_obj, leave) DBG_LEAVE_EX2((dbg_obj), (MYSQLND_DEBUG *) NULL, leave)
+
+#define DBG_ENTER_EX2(dbg_obj1, dbg_obj2, func_name) \
struct timeval __dbg_prof_tp = {0}; \
uint64_t __dbg_prof_start = 0; /* initialization is needed */ \
zend_bool dbg_skip_trace = TRUE; \
- if ((dbg_obj)) { \
- dbg_skip_trace = !(dbg_obj)->m->func_enter((dbg_obj), __LINE__, __FILE__, func_name, strlen(func_name)); \
+ if ((dbg_obj1)) { \
+ dbg_skip_trace = !(dbg_obj1)->m->func_enter((dbg_obj1), __LINE__, __FILE__, func_name, strlen(func_name)); \
} \
+ if ((dbg_obj2)) { \
+ dbg_skip_trace |= !(dbg_obj2)->m->func_enter((dbg_obj2), __LINE__, __FILE__, func_name, strlen(func_name)); \
+ } \
+ if (dbg_skip_trace); /* shut compiler's mouth */\
do { \
- if ((dbg_obj) && (dbg_obj)->flags & MYSQLND_DEBUG_PROFILE_CALLS) { \
+ if (((dbg_obj1) && (dbg_obj1)->flags & MYSQLND_DEBUG_PROFILE_CALLS) || \
+ ((dbg_obj2) && (dbg_obj2)->flags & MYSQLND_DEBUG_PROFILE_CALLS)) \
+ { \
DBG_PROFILE_START_TIME(); \
} \
} while (0);
-#define DBG_LEAVE_EX(dbg_obj, leave) \
+#define DBG_LEAVE_EX2(dbg_obj1, dbg_obj2, leave) \
do {\
- if ((dbg_obj)) { \
- uint64_t this_call_duration = 0; \
- if ((dbg_obj)->flags & MYSQLND_DEBUG_PROFILE_CALLS) { \
- DBG_PROFILE_END_TIME(this_call_duration); \
- } \
- (dbg_obj)->m->func_leave((dbg_obj), __LINE__, __FILE__, this_call_duration); \
+ uint64_t this_call_duration = 0; \
+ if (((dbg_obj1) && (dbg_obj1)->flags & MYSQLND_DEBUG_PROFILE_CALLS) || \
+ ((dbg_obj2) && (dbg_obj2)->flags & MYSQLND_DEBUG_PROFILE_CALLS)) \
+ { \
+ DBG_PROFILE_END_TIME(this_call_duration); \
+ } \
+ if ((dbg_obj1)) { \
+ (dbg_obj1)->m->func_leave((dbg_obj1), __LINE__, __FILE__, this_call_duration); \
+ } \
+ if ((dbg_obj2)) { \
+ (dbg_obj2)->m->func_leave((dbg_obj2), __LINE__, __FILE__, this_call_duration); \
} \
leave \
} while (0);
-#define DBG_RETURN_EX(dbg_obj, value) DBG_LEAVE_EX(dbg_obj, return (value);)
-#define DBG_VOID_RETURN_EX(dbg_obj) DBG_LEAVE_EX(dbg_obj, return;)
+#define DBG_RETURN_EX(dbg_obj, value) DBG_LEAVE_EX((dbg_obj), return (value);)
+#define DBG_VOID_RETURN_EX(dbg_obj) DBG_LEAVE_EX((dbg_obj), return;)
+#define DBG_RETURN_EX2(dbg_obj1, dbg_obj2, value) DBG_LEAVE_EX2((dbg_obj1), (dbg_obj2), return (value);)
+#define DBG_VOID_RETURN_EX2(dbg_obj1, dbg_obj2) DBG_LEAVE_EX2((dbg_obj1), (dbg_obj2), return;)
-#else
+
+#else /* defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 1400)) */
static inline void DBG_INF_EX(MYSQLND_DEBUG * dbg_obj, const char * const msg) {}
static inline void DBG_ERR_EX(MYSQLND_DEBUG * dbg_obj, const char * const msg) {}
static inline void DBG_INF_FMT_EX(MYSQLND_DEBUG * dbg_obj, ...) {}
@@ -167,6 +187,18 @@ static inline void DBG_ENTER_EX(MYSQLND_DEBUG * dbg_obj, const char * const func
#define DBG_VOID_RETURN DBG_VOID_RETURN_EX(MYSQLND_G(dbg))
#define DBG_BLOCK_LEAVE DBG_BLOCK_LEAVE_EX(MYSQLND_G(dbg))
+
+#define TRACE_ALLOC_INF(msg) DBG_INF_EX(MYSQLND_G(trace_alloc), (msg))
+#define TRACE_ALLOC_ERR(msg) DBG_ERR_EX(MYSQLND_G(trace_alloc), (msg))
+#define TRACE_ALLOC_INF_FMT(...) DBG_INF_FMT_EX(MYSQLND_G(trace_alloc), __VA_ARGS__)
+#define TRACE_ALLOC_ERR_FMT(...) DBG_ERR_FMT_EX(MYSQLND_G(trace_alloc), __VA_ARGS__)
+
+#define TRACE_ALLOC_ENTER(func_name) DBG_ENTER_EX2(MYSQLND_G(dbg), MYSQLND_G(trace_alloc), (func_name))
+#define TRACE_ALLOC_BLOCK_ENTER(bname) DBG_BLOCK_ENTER_EX2(MYSQLND_G(dbg), MYSQLND_G(trace_alloc), (bname))
+#define TRACE_ALLOC_RETURN(value) DBG_RETURN_EX2(MYSQLND_G(dbg), MYSQLND_G(trace_alloc), (value))
+#define TRACE_ALLOC_VOID_RETURN DBG_VOID_RETURN_EX2(MYSQLND_G(dbg), MYSQLND_G(trace_alloc))
+#define TRACE_ALLOC_BLOCK_LEAVE DBG_BLOCK_LEAVE_EX2(MYSQLND_G(dbg), MYSQLND_G(trace_alloc))
+
#elif MYSQLND_DBG_ENABLED == 0
static inline void DBG_INF(const char * const msg) {}
@@ -175,10 +207,21 @@ static inline void DBG_INF_FMT(const char * const format, ...) {}
static inline void DBG_ERR_FMT(const char * const format, ...) {}
static inline void DBG_ENTER(const char * const func_name) {}
#define DBG_BLOCK_ENTER(bname) {
-#define DBG_RETURN(value) return (value)
-#define DBG_VOID_RETURN return
+#define DBG_RETURN(value) return (value)
+#define DBG_VOID_RETURN return
#define DBG_BLOCK_LEAVE }
+
+static inline void TRACE_ALLOC_INF(const char * const msg) {}
+static inline void TRACE_ALLOC_ERR(const char * const msg) {}
+static inline void TRACE_ALLOC_INF_FMT(const char * const format, ...) {}
+static inline void TRACE_ALLOC_ERR_FMT(const char * const format, ...) {}
+static inline void TRACE_ALLOC_ENTER(const char * const func_name) {}
+#define TRACE_ALLOC_BLOCK_ENTER(bname) {
+#define TRACE_ALLOC_RETURN(value) return (value)
+#define TRACE_ALLOC_VOID_RETURN return
+#define TRACE_ALLOC_BLOCK_LEAVE }
+
#endif
#endif /* MYSQLND_DEBUG_H */
diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c
index aeb34a66e..93f3d3fc9 100644
--- a/ext/mysqlnd/mysqlnd_driver.c
+++ b/ext/mysqlnd/mysqlnd_driver.c
@@ -81,7 +81,9 @@ PHPAPI void mysqlnd_library_init(TSRMLS_D)
mysqlnd_plugin_core.plugin_header.plugin_stats.values = mysqlnd_global_stats;
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_plugin_core TSRMLS_CC);
}
+#if defined(MYSQLND_DBG_ENABLED) && MYSQLND_DBG_ENABLED == 1
mysqlnd_example_plugin_register(TSRMLS_C);
+#endif
mysqlnd_debug_trace_plugin_register(TSRMLS_C);
mysqlnd_register_builtin_authentication_plugins(TSRMLS_C);
@@ -91,6 +93,7 @@ PHPAPI void mysqlnd_library_init(TSRMLS_D)
/* }}} */
+
/* {{{ mysqlnd_error_list_pdtor */
static void
mysqlnd_error_list_pdtor(void * pDest)
@@ -248,17 +251,29 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA
PHPAPI MYSQLND_NET *
MYSQLND_METHOD(mysqlnd_object_factory, get_io_channel)(zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info TSRMLS_DC)
{
- size_t alloc_size = sizeof(MYSQLND_NET) + mysqlnd_plugin_count() * sizeof(void *);
- MYSQLND_NET * net = mnd_pecalloc(1, alloc_size, persistent);
+ size_t net_alloc_size = sizeof(MYSQLND_NET) + mysqlnd_plugin_count() * sizeof(void *);
+ size_t net_data_alloc_size = sizeof(MYSQLND_NET_DATA) + mysqlnd_plugin_count() * sizeof(void *);
+ MYSQLND_NET * net = mnd_pecalloc(1, net_alloc_size, persistent);
+ MYSQLND_NET_DATA * net_data = mnd_pecalloc(1, net_data_alloc_size, persistent);
DBG_ENTER("mysqlnd_object_factory::get_io_channel");
DBG_INF_FMT("persistent=%u", persistent);
- if (net) {
- net->persistent = persistent;
- net->m = *mysqlnd_net_get_methods();
+ if (net && net_data) {
+ net->data = net_data;
+ net->persistent = net->data->persistent = persistent;
+ net->data->m = *mysqlnd_net_get_methods();
- if (PASS != net->m.init(net, stats, error_info TSRMLS_CC)) {
- net->m.dtor(net, stats, error_info TSRMLS_CC);
+ if (PASS != net->data->m.init(net, stats, error_info TSRMLS_CC)) {
+ net->data->m.dtor(net, stats, error_info TSRMLS_CC);
+ net = NULL;
+ }
+ } else {
+ if (net_data) {
+ mnd_pefree(net_data, persistent);
+ net_data = NULL;
+ }
+ if (net) {
+ mnd_pefree(net, persistent);
net = NULL;
}
}
@@ -268,7 +283,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_io_channel)(zend_bool persistent, MYS
/* {{{ mysqlnd_object_factory::get_protocol_decoder */
-PHPAPI MYSQLND_PROTOCOL *
+static MYSQLND_PROTOCOL *
MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_decoder)(zend_bool persistent TSRMLS_DC)
{
size_t alloc_size = sizeof(MYSQLND_PROTOCOL) + mysqlnd_plugin_count() * sizeof(void *);
@@ -286,7 +301,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_decoder)(zend_bool persisten
/* }}} */
-MYSQLND_CLASS_METHODS_START(mysqlnd_object_factory)
+PHPAPI MYSQLND_CLASS_METHODS_START(mysqlnd_object_factory)
MYSQLND_METHOD(mysqlnd_object_factory, get_connection),
MYSQLND_METHOD(mysqlnd_object_factory, clone_connection_object),
MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement),
diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h
index b0fe88648..26ad8815c 100644
--- a/ext/mysqlnd/mysqlnd_enum_n_def.h
+++ b/ext/mysqlnd/mysqlnd_enum_n_def.h
@@ -37,6 +37,8 @@
#define MYSQLND_ASSEMBLED_PACKET_MAX_SIZE 3UL*1024UL*1024UL*1024UL
+#define MYSQLND_DEFAULT_AUTH_PROTOCOL "mysql_native_password"
+
#define MYSQLND_ERRMSG_SIZE 512
#define MYSQLND_SQLSTATE_LENGTH 5
#define MYSQLND_SQLSTATE_NULL "00000"
@@ -164,9 +166,8 @@ typedef enum mysqlnd_option
MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
MYSQL_PLUGIN_DIR,
MYSQL_DEFAULT_AUTH,
-#if MYSQLND_UNICODE
- MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE = 200,
-#endif
+ MYSQL_SERVER_PUBLIC_KEY,
+ MYSQLND_DEPRECATED_ENUM1 = 200,
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
MYSQLND_OPT_INT_AND_FLOAT_NATIVE = 201,
#endif
@@ -535,6 +536,8 @@ enum mysqlnd_packet_type
PROT_STATS_PACKET,
PROT_PREPARE_RESP_PACKET,
PROT_CHG_USER_RESP_PACKET,
+ PROT_SHA256_PK_REQUEST_PACKET,
+ PROT_SHA256_PK_REQUEST_RESPONSE_PACKET,
PROT_LAST /* should always be last */
};
diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.c b/ext/mysqlnd/mysqlnd_ext_plugin.c
index 02cd9a891..2eacac528 100644
--- a/ext/mysqlnd/mysqlnd_ext_plugin.c
+++ b/ext/mysqlnd/mysqlnd_ext_plugin.c
@@ -215,7 +215,6 @@ mysqlnd_net_set_methods(struct st_mysqlnd_net_methods * methods)
/* }}} */
-
/*
* Local variables:
* tab-width: 4
diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c
index 82ee63458..4655481af 100644
--- a/ext/mysqlnd/mysqlnd_loaddata.c
+++ b/ext/mysqlnd/mysqlnd_loaddata.c
@@ -172,7 +172,7 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
if (!(conn->options->flags & CLIENT_LOCAL_FILES)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "LOAD DATA LOCAL INFILE forbidden");
/* write empty packet to server */
- ret = net->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info TSRMLS_CC);
+ ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info TSRMLS_CC);
*is_warning = TRUE;
goto infile_error;
}
@@ -192,13 +192,13 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf) TSRMLS_CC);
SET_CLIENT_ERROR(*conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
/* write empty packet to server */
- ret = net->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info TSRMLS_CC);
+ ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info TSRMLS_CC);
goto infile_error;
}
/* read data */
while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEADER_SIZE TSRMLS_CC)) > 0) {
- if ((ret = net->m.send_ex(net, buf, bufsize, conn->stats, conn->error_info TSRMLS_CC)) == 0) {
+ if ((ret = net->data->m.send_ex(net, buf, bufsize, conn->stats, conn->error_info TSRMLS_CC)) == 0) {
DBG_ERR_FMT("Error during read : %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
goto infile_error;
@@ -206,7 +206,7 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
}
/* send empty packet for eof */
- if ((ret = net->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info TSRMLS_CC)) == 0) {
+ if ((ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info TSRMLS_CC)) == 0) {
SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
goto infile_error;
}
diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c
index 800f57733..5e9f40423 100644
--- a/ext/mysqlnd/mysqlnd_net.c
+++ b/ext/mysqlnd/mysqlnd_net.c
@@ -67,16 +67,17 @@ MYSQLND_METHOD(mysqlnd_net, network_read_ex)(MYSQLND_NET * const net, zend_uchar
MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC)
{
enum_func_status return_value = PASS;
+ php_stream * net_stream = net->data->m.get_stream(net TSRMLS_CC);
+ size_t old_chunk_size = net_stream->chunk_size;
size_t to_read = count, ret;
- size_t old_chunk_size = net->stream->chunk_size;
zend_uchar * p = buffer;
DBG_ENTER("mysqlnd_net::network_read_ex");
DBG_INF_FMT("count="MYSQLND_SZ_T_SPEC, count);
- net->stream->chunk_size = MIN(to_read, net->options.net_read_buffer_size);
+ net_stream->chunk_size = MIN(to_read, net->data->options.net_read_buffer_size);
while (to_read) {
- if (!(ret = php_stream_read(net->stream, (char *) p, to_read))) {
+ if (!(ret = php_stream_read(net_stream, (char *) p, to_read))) {
DBG_ERR_FMT("Error while reading header from socket");
return_value = FAIL;
break;
@@ -85,7 +86,7 @@ MYSQLND_METHOD(mysqlnd_net, network_read_ex)(MYSQLND_NET * const net, zend_uchar
to_read -= ret;
}
MYSQLND_INC_CONN_STATISTIC_W_VALUE(stats, STAT_BYTES_RECEIVED, count - to_read);
- net->stream->chunk_size = old_chunk_size;
+ net_stream->chunk_size = old_chunk_size;
DBG_RETURN(return_value);
}
/* }}} */
@@ -98,13 +99,13 @@ MYSQLND_METHOD(mysqlnd_net, network_write_ex)(MYSQLND_NET * const net, const zen
{
size_t ret;
DBG_ENTER("mysqlnd_net::network_write_ex");
- ret = php_stream_write(net->stream, (char *)buffer, count);
+ ret = php_stream_write(net->data->m.get_stream(net TSRMLS_CC), (char *)buffer, count);
DBG_RETURN(ret);
}
/* }}} */
/* {{{ mysqlnd_net::open_pipe */
-static enum_func_status
+static php_stream *
MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len,
const zend_bool persistent,
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC)
@@ -114,32 +115,35 @@ MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const char * con
#else
unsigned int streams_options = 0;
#endif
+ php_stream * net_stream = NULL;
+
DBG_ENTER("mysqlnd_net::open_pipe");
if (persistent) {
streams_options |= STREAM_OPEN_PERSISTENT;
}
streams_options |= IGNORE_URL;
- net->stream = php_stream_open_wrapper((char*) scheme + sizeof("pipe://") - 1, "r+", streams_options, NULL);
- if (!net->stream) {
+ net_stream = php_stream_open_wrapper((char*) scheme + sizeof("pipe://") - 1, "r+", streams_options, NULL);
+ if (!net_stream) {
SET_CLIENT_ERROR(*error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "Unknown errror while connecting");
- DBG_RETURN(FAIL);
+ DBG_RETURN(NULL);
}
/*
Streams are not meant for C extensions! Thus we need a hack. Every connected stream will
be registered as resource (in EG(regular_list). So far, so good. However, it won't be
unregistered yntil the script ends. So, we need to take care of that.
*/
- net->stream->in_free = 1;
- zend_hash_index_del(&EG(regular_list), net->stream->rsrc_id);
- net->stream->in_free = 0;
+ net_stream->in_free = 1;
+ zend_hash_index_del(&EG(regular_list), net_stream->rsrc_id);
+ net_stream->in_free = 0;
- DBG_RETURN(PASS);
+
+ DBG_RETURN(net_stream);
}
/* }}} */
/* {{{ mysqlnd_net::open_tcp_or_unix */
-static enum_func_status
+static php_stream *
MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len,
const zend_bool persistent,
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC)
@@ -155,24 +159,27 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
char * errstr = NULL;
int errcode = 0;
struct timeval tv;
+ php_stream * net_stream = NULL;
DBG_ENTER("mysqlnd_net::open_tcp_or_unix");
+ net->data->stream = NULL;
+
if (persistent) {
hashed_details_len = mnd_sprintf(&hashed_details, 0, "%p", net);
DBG_INF_FMT("hashed_details=%s", hashed_details);
}
- if (net->options.timeout_connect) {
- tv.tv_sec = net->options.timeout_connect;
+ if (net->data->options.timeout_connect) {
+ tv.tv_sec = net->data->options.timeout_connect;
tv.tv_usec = 0;
}
DBG_INF_FMT("calling php_stream_xport_create");
- net->stream = php_stream_xport_create(scheme, scheme_len, streams_options, streams_flags,
- hashed_details, (net->options.timeout_connect) ? &tv : NULL,
+ net_stream = php_stream_xport_create(scheme, scheme_len, streams_options, streams_flags,
+ hashed_details, (net->data->options.timeout_connect) ? &tv : NULL,
NULL /*ctx*/, &errstr, &errcode);
- if (errstr || !net->stream) {
+ if (errstr || !net_stream) {
DBG_ERR("Error");
if (hashed_details) {
mnd_sprintf_free(hashed_details);
@@ -183,7 +190,7 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
/* no mnd_ since we don't allocate it */
efree(errstr);
}
- DBG_RETURN(FAIL);
+ DBG_RETURN(NULL);
}
if (hashed_details) {
/*
@@ -199,13 +206,13 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
but STREAMS suck big time regarding persistent streams.
Just not compatible for extensions that need persistency.
*/
- net->stream->in_free = 1;
+ net_stream->in_free = 1;
zend_hash_del(&EG(persistent_list), hashed_details, hashed_details_len + 1);
- net->stream->in_free = 0;
+ net_stream->in_free = 0;
}
#if ZEND_DEBUG
/* Shut-up the streams, they don't know what they are doing */
- net->stream->__exposed = 1;
+ net_stream->__exposed = 1;
#endif
mnd_sprintf_free(hashed_details);
}
@@ -215,33 +222,36 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
be registered as resource (in EG(regular_list). So far, so good. However, it won't be
unregistered yntil the script ends. So, we need to take care of that.
*/
- net->stream->in_free = 1;
- zend_hash_index_del(&EG(regular_list), net->stream->rsrc_id);
- net->stream->in_free = 0;
+ net_stream->in_free = 1;
+ zend_hash_index_del(&EG(regular_list), net_stream->rsrc_id);
+ net_stream->in_free = 0;
- DBG_RETURN(PASS);
+ DBG_RETURN(net_stream);
}
/* }}} */
-/* {{{ mysqlnd_net::connect_ex */
+/* {{{ mysqlnd_net::post_connect_set_opt */
static void
MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt)(MYSQLND_NET * const net,
const char * const scheme, const size_t scheme_len,
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC)
{
+ php_stream * net_stream = net->data->m.get_stream(net TSRMLS_CC);
DBG_ENTER("mysqlnd_net::post_connect_set_opt");
- if (net->options.timeout_read) {
- struct timeval tv;
- DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->options.timeout_read);
- tv.tv_sec = net->options.timeout_read;
- tv.tv_usec = 0;
- php_stream_set_option(net->stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv);
- }
+ if (net_stream) {
+ if (net->data->options.timeout_read) {
+ struct timeval tv;
+ DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->data->options.timeout_read);
+ tv.tv_sec = net->data->options.timeout_read;
+ tv.tv_usec = 0;
+ php_stream_set_option(net_stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv);
+ }
- if (!memcmp(scheme, "tcp://", sizeof("tcp://") - 1)) {
- /* TCP -> Set TCP_NODELAY */
- mysqlnd_set_sock_no_delay(net->stream TSRMLS_CC);
+ if (!memcmp(scheme, "tcp://", sizeof("tcp://") - 1)) {
+ /* TCP -> Set TCP_NODELAY */
+ mysqlnd_set_sock_no_delay(net_stream TSRMLS_CC);
+ }
}
DBG_VOID_RETURN;
@@ -249,6 +259,31 @@ MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt)(MYSQLND_NET * const net,
/* }}} */
+/* {{{ mysqlnd_net::get_open_stream */
+static func_mysqlnd_net__open_stream
+MYSQLND_METHOD(mysqlnd_net, get_open_stream)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len,
+ MYSQLND_ERROR_INFO * const error_info TSRMLS_DC)
+{
+ func_mysqlnd_net__open_stream ret = NULL;
+ DBG_ENTER("mysqlnd_net::get_open_stream");
+ if (scheme_len > (sizeof("pipe://") - 1) && !memcmp(scheme, "pipe://", sizeof("pipe://") - 1)) {
+ ret = net->data->m.open_pipe;
+ } else if ((scheme_len > (sizeof("tcp://") - 1) && !memcmp(scheme, "tcp://", sizeof("tcp://") - 1))
+ ||
+ (scheme_len > (sizeof("unix://") - 1) && !memcmp(scheme, "unix://", sizeof("unix://") - 1)))
+ {
+ ret = net->data->m.open_tcp_or_unix;
+ }
+
+ if (!ret) {
+ SET_CLIENT_ERROR(*error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "No handler for this scheme");
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
/* {{{ mysqlnd_net::connect_ex */
static enum_func_status
MYSQLND_METHOD(mysqlnd_net, connect_ex)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len,
@@ -261,13 +296,16 @@ MYSQLND_METHOD(mysqlnd_net, connect_ex)(MYSQLND_NET * const net, const char * co
net->packet_no = net->compressed_envelope_packet_no = 0;
- net->m.close_stream(net, conn_stats, error_info TSRMLS_CC);
+ net->data->m.close_stream(net, conn_stats, error_info TSRMLS_CC);
- open_stream = (scheme_len > (sizeof("pipe://") - 1) && !memcmp(scheme, "pipe://", sizeof("pipe://") - 1))? net->m.open_pipe:
- net->m.open_tcp_or_unix;
-
- if (PASS == (ret = open_stream(net, scheme, scheme_len, persistent, conn_stats, error_info TSRMLS_CC))) {
- net->m.post_connect_set_opt(net, scheme, scheme_len, conn_stats, error_info TSRMLS_CC);
+ open_stream = net->data->m.get_open_stream(net, scheme, scheme_len, error_info TSRMLS_CC);
+ if (open_stream) {
+ php_stream * net_stream = open_stream(net, scheme, scheme_len, persistent, conn_stats, error_info TSRMLS_CC);
+ if (net_stream) {
+ (void) net->data->m.set_stream(net, net_stream TSRMLS_CC);
+ net->data->m.post_connect_set_opt(net, scheme, scheme_len, conn_stats, error_info TSRMLS_CC);
+ ret = PASS;
+ }
}
DBG_RETURN(ret);
@@ -309,9 +347,9 @@ MYSQLND_METHOD(mysqlnd_net, send_ex)(MYSQLND_NET * const net, zend_uchar * const
size_t to_be_sent;
DBG_ENTER("mysqlnd_net::send_ex");
- DBG_INF_FMT("count=" MYSQLND_SZ_T_SPEC " compression=%u", count, net->compressed);
+ DBG_INF_FMT("count=" MYSQLND_SZ_T_SPEC " compression=%u", count, net->data->compressed);
- if (net->compressed == TRUE) {
+ if (net->data->compressed == TRUE) {
size_t comp_buf_size = MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE + MIN(left, MYSQLND_MAX_PACKET_SIZE);
DBG_INF_FMT("compress_buf_size="MYSQLND_SZ_T_SPEC, comp_buf_size);
compress_buf = mnd_emalloc(comp_buf_size);
@@ -320,7 +358,7 @@ MYSQLND_METHOD(mysqlnd_net, send_ex)(MYSQLND_NET * const net, zend_uchar * const
do {
to_be_sent = MIN(left, MYSQLND_MAX_PACKET_SIZE);
#ifdef MYSQLND_COMPRESSION_ENABLED
- if (net->compressed == TRUE) {
+ if (net->data->compressed == TRUE) {
/* here we need to compress the data and then write it, first comes the compressed header */
size_t tmp_complen = to_be_sent;
size_t payload_size;
@@ -329,7 +367,7 @@ MYSQLND_METHOD(mysqlnd_net, send_ex)(MYSQLND_NET * const net, zend_uchar * const
STORE_HEADER_SIZE(safe_storage, uncompressed_payload);
int3store(uncompressed_payload, to_be_sent);
int1store(uncompressed_payload + 3, net->packet_no);
- if (PASS == net->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen,
+ if (PASS == net->data->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen,
uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE TSRMLS_CC))
{
int3store(compress_buf + MYSQLND_HEADER_SIZE, to_be_sent + MYSQLND_HEADER_SIZE);
@@ -344,14 +382,14 @@ MYSQLND_METHOD(mysqlnd_net, send_ex)(MYSQLND_NET * const net, zend_uchar * const
int3store(compress_buf, payload_size);
int1store(compress_buf + 3, net->packet_no);
DBG_INF_FMT("writing "MYSQLND_SZ_T_SPEC" bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE);
- bytes_sent = net->m.network_write_ex(net, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE,
+ bytes_sent = net->data->m.network_write_ex(net, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE,
conn_stats, error_info TSRMLS_CC);
net->compressed_envelope_packet_no++;
#if WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY
if (res == Z_OK) {
size_t decompressed_size = left + MYSQLND_HEADER_SIZE;
zend_uchar * decompressed_data = mnd_malloc(decompressed_size);
- int error = net->m.decode(decompressed_data, decompressed_size,
+ int error = net->data->m.decode(decompressed_data, decompressed_size,
compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, payload_size);
if (error == Z_OK) {
int i;
@@ -376,7 +414,7 @@ MYSQLND_METHOD(mysqlnd_net, send_ex)(MYSQLND_NET * const net, zend_uchar * const
STORE_HEADER_SIZE(safe_storage, p);
int3store(p, to_be_sent);
int1store(p + 3, net->packet_no);
- bytes_sent = net->m.network_write_ex(net, p, to_be_sent + MYSQLND_HEADER_SIZE, conn_stats, error_info TSRMLS_CC);
+ bytes_sent = net->data->m.network_write_ex(net, p, to_be_sent + MYSQLND_HEADER_SIZE, conn_stats, error_info TSRMLS_CC);
RESTORE_HEADER_SIZE(p, safe_storage);
net->compressed_envelope_packet_no++;
}
@@ -486,13 +524,13 @@ MYSQLND_METHOD(mysqlnd_net, read_compressed_packet_from_stream_and_fill_read_buf
(MYSQLND_NET * net, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info TSRMLS_DC)
{
size_t decompressed_size;
- enum_func_status ret = PASS;
+ enum_func_status retval = PASS;
zend_uchar * compressed_data = NULL;
zend_uchar comp_header[COMPRESSED_HEADER_SIZE];
- DBG_ENTER("mysqlnd_net::read_compressed_packet_from_stream_and_fill_read_buffe");
+ DBG_ENTER("mysqlnd_net::read_compressed_packet_from_stream_and_fill_read_buffer");
/* Read the compressed header */
- if (FAIL == net->m.network_read_ex(net, comp_header, COMPRESSED_HEADER_SIZE, conn_stats, error_info TSRMLS_CC)) {
+ if (FAIL == net->data->m.network_read_ex(net, comp_header, COMPRESSED_HEADER_SIZE, conn_stats, error_info TSRMLS_CC)) {
DBG_RETURN(FAIL);
}
decompressed_size = uint3korr(comp_header);
@@ -502,20 +540,20 @@ MYSQLND_METHOD(mysqlnd_net, read_compressed_packet_from_stream_and_fill_read_buf
if (decompressed_size) {
compressed_data = mnd_emalloc(net_payload_size);
- if (FAIL == net->m.network_read_ex(net, compressed_data, net_payload_size, conn_stats, error_info TSRMLS_CC)) {
- ret = FAIL;
+ if (FAIL == net->data->m.network_read_ex(net, compressed_data, net_payload_size, conn_stats, error_info TSRMLS_CC)) {
+ retval = FAIL;
goto end;
}
net->uncompressed_data = mysqlnd_create_read_buffer(decompressed_size TSRMLS_CC);
- ret = net->m.decode(net->uncompressed_data->data, decompressed_size, compressed_data, net_payload_size TSRMLS_CC);
- if (ret == FAIL) {
+ retval = net->data->m.decode(net->uncompressed_data->data, decompressed_size, compressed_data, net_payload_size TSRMLS_CC);
+ if (FAIL == retval) {
goto end;
}
} else {
DBG_INF_FMT("The server decided not to compress the data. Our job is easy. Copying %u bytes", net_payload_size);
net->uncompressed_data = mysqlnd_create_read_buffer(net_payload_size TSRMLS_CC);
- if (FAIL == net->m.network_read_ex(net, net->uncompressed_data->data, net_payload_size, conn_stats, error_info TSRMLS_CC)) {
- ret = FAIL;
+ if (FAIL == net->data->m.network_read_ex(net, net->uncompressed_data->data, net_payload_size, conn_stats, error_info TSRMLS_CC)) {
+ retval = FAIL;
goto end;
}
}
@@ -523,7 +561,7 @@ end:
if (compressed_data) {
mnd_efree(compressed_data);
}
- DBG_RETURN(ret);
+ DBG_RETURN(retval);
}
/* }}} */
#endif /* MYSQLND_COMPRESSION_ENABLED */
@@ -590,16 +628,16 @@ MYSQLND_METHOD(mysqlnd_net, receive_ex)(MYSQLND_NET * const net, zend_uchar * co
DBG_ENTER("mysqlnd_net::receive_ex");
#ifdef MYSQLND_COMPRESSION_ENABLED
- if (net->compressed) {
+ if (net->data->compressed) {
if (net->uncompressed_data) {
size_t to_read_from_buffer = MIN(net->uncompressed_data->bytes_left(net->uncompressed_data), to_read);
- DBG_INF_FMT("reading %u from uncompressed_data buffer", to_read_from_buffer);
+ DBG_INF_FMT("reading "MYSQLND_SZ_T_SPEC" from uncompressed_data buffer", to_read_from_buffer);
if (to_read_from_buffer) {
net->uncompressed_data->read(net->uncompressed_data, to_read_from_buffer, (zend_uchar *) p);
p += to_read_from_buffer;
to_read -= to_read_from_buffer;
}
- DBG_INF_FMT("left %u to read", to_read);
+ DBG_INF_FMT("left "MYSQLND_SZ_T_SPEC" to read", to_read);
if (TRUE == net->uncompressed_data->is_empty(net->uncompressed_data)) {
/* Everything was consumed. This should never happen here, but for security */
net->uncompressed_data->free_buffer(&net->uncompressed_data TSRMLS_CC);
@@ -610,7 +648,7 @@ MYSQLND_METHOD(mysqlnd_net, receive_ex)(MYSQLND_NET * const net, zend_uchar * co
size_t net_payload_size;
zend_uchar packet_no;
- if (FAIL == net->m.network_read_ex(net, net_header, MYSQLND_HEADER_SIZE, conn_stats, error_info TSRMLS_CC)) {
+ if (FAIL == net->data->m.network_read_ex(net, net_header, MYSQLND_HEADER_SIZE, conn_stats, error_info TSRMLS_CC)) {
DBG_RETURN(FAIL);
}
net_payload_size = uint3korr(net_header);
@@ -628,7 +666,7 @@ MYSQLND_METHOD(mysqlnd_net, receive_ex)(MYSQLND_NET * const net, zend_uchar * co
DBG_INF_FMT("HEADER: hwd_packet_no=%u size=%3u", packet_no, (unsigned long) net_payload_size);
#endif
/* Now let's read from the wire, decompress it and fill the read buffer */
- net->m.read_compressed_packet_from_stream_and_fill_read_buffer(net, net_payload_size, conn_stats, error_info TSRMLS_CC);
+ net->data->m.read_compressed_packet_from_stream_and_fill_read_buffer(net, net_payload_size, conn_stats, error_info TSRMLS_CC);
/*
Now a bit of recursion - read from the read buffer,
@@ -636,12 +674,12 @@ MYSQLND_METHOD(mysqlnd_net, receive_ex)(MYSQLND_NET * const net, zend_uchar * co
is not enough, then the recursive call will try to
satisfy it until it is satisfied.
*/
- DBG_RETURN(net->m.receive_ex(net, p, to_read, conn_stats, error_info TSRMLS_CC));
+ DBG_RETURN(net->data->m.receive_ex(net, p, to_read, conn_stats, error_info TSRMLS_CC));
}
DBG_RETURN(PASS);
}
#endif /* MYSQLND_COMPRESSION_ENABLED */
- DBG_RETURN(net->m.network_read_ex(net, p, to_read, conn_stats, error_info TSRMLS_CC));
+ DBG_RETURN(net->data->m.network_read_ex(net, p, to_read, conn_stats, error_info TSRMLS_CC));
}
/* }}} */
@@ -659,7 +697,7 @@ MYSQLND_METHOD(mysqlnd_net, set_client_option)(MYSQLND_NET * const net, enum mys
DBG_RETURN(FAIL);
}
net->cmd_buffer.length = *(unsigned int*) value;
- DBG_INF_FMT("new_length=%u", net->cmd_buffer.length);
+ DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->cmd_buffer.length);
if (!net->cmd_buffer.buffer) {
net->cmd_buffer.buffer = mnd_pemalloc(net->cmd_buffer.length, net->persistent);
} else {
@@ -668,81 +706,90 @@ MYSQLND_METHOD(mysqlnd_net, set_client_option)(MYSQLND_NET * const net, enum mys
break;
case MYSQLND_OPT_NET_READ_BUFFER_SIZE:
DBG_INF("MYSQLND_OPT_NET_READ_BUFFER_SIZE");
- net->options.net_read_buffer_size = *(unsigned int*) value;
- DBG_INF_FMT("new_length=%u", net->options.net_read_buffer_size);
+ net->data->options.net_read_buffer_size = *(unsigned int*) value;
+ DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->data->options.net_read_buffer_size);
break;
case MYSQL_OPT_CONNECT_TIMEOUT:
DBG_INF("MYSQL_OPT_CONNECT_TIMEOUT");
- net->options.timeout_connect = *(unsigned int*) value;
+ net->data->options.timeout_connect = *(unsigned int*) value;
break;
case MYSQLND_OPT_SSL_KEY:
{
zend_bool pers = net->persistent;
- if (net->options.ssl_key) {
- mnd_pefree(net->options.ssl_key, pers);
+ if (net->data->options.ssl_key) {
+ mnd_pefree(net->data->options.ssl_key, pers);
}
- net->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL;
+ net->data->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL;
break;
}
case MYSQLND_OPT_SSL_CERT:
{
zend_bool pers = net->persistent;
- if (net->options.ssl_cert) {
- mnd_pefree(net->options.ssl_cert, pers);
+ if (net->data->options.ssl_cert) {
+ mnd_pefree(net->data->options.ssl_cert, pers);
}
- net->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL;
+ net->data->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL;
break;
}
case MYSQLND_OPT_SSL_CA:
{
zend_bool pers = net->persistent;
- if (net->options.ssl_ca) {
- mnd_pefree(net->options.ssl_ca, pers);
+ if (net->data->options.ssl_ca) {
+ mnd_pefree(net->data->options.ssl_ca, pers);
}
- net->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL;
+ net->data->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL;
break;
}
case MYSQLND_OPT_SSL_CAPATH:
{
zend_bool pers = net->persistent;
- if (net->options.ssl_capath) {
- mnd_pefree(net->options.ssl_capath, pers);
+ if (net->data->options.ssl_capath) {
+ mnd_pefree(net->data->options.ssl_capath, pers);
}
- net->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL;
+ net->data->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL;
break;
}
case MYSQLND_OPT_SSL_CIPHER:
{
zend_bool pers = net->persistent;
- if (net->options.ssl_cipher) {
- mnd_pefree(net->options.ssl_cipher, pers);
+ if (net->data->options.ssl_cipher) {
+ mnd_pefree(net->data->options.ssl_cipher, pers);
}
- net->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL;
+ net->data->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL;
break;
}
case MYSQLND_OPT_SSL_PASSPHRASE:
{
zend_bool pers = net->persistent;
- if (net->options.ssl_passphrase) {
- mnd_pefree(net->options.ssl_passphrase, pers);
+ if (net->data->options.ssl_passphrase) {
+ mnd_pefree(net->data->options.ssl_passphrase, pers);
}
- net->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL;
+ net->data->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL;
break;
}
case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
- net->options.ssl_verify_peer = value? ((*(zend_bool *)value)? TRUE:FALSE): FALSE;
+ net->data->options.ssl_verify_peer = value? ((*(zend_bool *)value)? TRUE:FALSE): FALSE;
break;
case MYSQL_OPT_READ_TIMEOUT:
- net->options.timeout_read = *(unsigned int*) value;
+ net->data->options.timeout_read = *(unsigned int*) value;
break;
#ifdef WHEN_SUPPORTED_BY_MYSQLI
case MYSQL_OPT_WRITE_TIMEOUT:
- net->options.timeout_write = *(unsigned int*) value;
+ net->data->options.timeout_write = *(unsigned int*) value;
break;
#endif
case MYSQL_OPT_COMPRESS:
- net->options.flags |= MYSQLND_NET_FLAG_USE_COMPRESSION;
+ net->data->options.flags |= MYSQLND_NET_FLAG_USE_COMPRESSION;
break;
+ case MYSQL_SERVER_PUBLIC_KEY:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.sha256_server_public_key) {
+ mnd_pefree(net->data->options.sha256_server_public_key, pers);
+ }
+ net->data->options.sha256_server_public_key = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
default:
DBG_RETURN(FAIL);
}
@@ -765,7 +812,8 @@ MYSQLND_METHOD(mysqlnd_net, consume_uneaten_data)(MYSQLND_NET * const net, enum
char tmp_buf[256];
size_t skipped_bytes = 0;
int opt = PHP_STREAM_OPTION_BLOCKING;
- int was_blocked = net->stream->ops->set_option(net->stream, opt, 0, NULL TSRMLS_CC);
+ php_stream * net_stream = net->data->get_stream(net TSRMLS_CC);
+ int was_blocked = net_stream->ops->set_option(net_stream, opt, 0, NULL TSRMLS_CC);
DBG_ENTER("mysqlnd_net::consume_uneaten_data");
@@ -774,11 +822,11 @@ MYSQLND_METHOD(mysqlnd_net, consume_uneaten_data)(MYSQLND_NET * const net, enum
int bytes_consumed;
do {
- skipped_bytes += (bytes_consumed = php_stream_read(net->stream, tmp_buf, sizeof(tmp_buf)));
+ skipped_bytes += (bytes_consumed = php_stream_read(net_stream, tmp_buf, sizeof(tmp_buf)));
} while (bytes_consumed == sizeof(tmp_buf));
if (was_blocked) {
- net->stream->ops->set_option(net->stream, opt, 1, NULL TSRMLS_CC);
+ net_stream->ops->set_option(net_stream, opt, 1, NULL TSRMLS_CC);
}
if (bytes_consumed) {
@@ -806,58 +854,61 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC)
{
#ifdef MYSQLND_SSL_SUPPORTED
- php_stream_context *context = php_stream_context_alloc(TSRMLS_C);
+ php_stream_context * context = php_stream_context_alloc(TSRMLS_C);
+ php_stream * net_stream = net->data->m.get_stream(net TSRMLS_CC);
+
DBG_ENTER("mysqlnd_net::enable_ssl");
if (!context) {
DBG_RETURN(FAIL);
}
- if (net->options.ssl_key) {
+ if (net->data->options.ssl_key) {
zval key_zval;
- ZVAL_STRING(&key_zval, net->options.ssl_key, 0);
+ ZVAL_STRING(&key_zval, net->data->options.ssl_key, 0);
php_stream_context_set_option(context, "ssl", "local_pk", &key_zval);
}
- if (net->options.ssl_verify_peer) {
+ if (net->data->options.ssl_verify_peer) {
zval verify_peer_zval;
ZVAL_TRUE(&verify_peer_zval);
php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval);
}
- if (net->options.ssl_cert) {
+ if (net->data->options.ssl_cert) {
zval cert_zval;
- ZVAL_STRING(&cert_zval, net->options.ssl_cert, 0);
+ ZVAL_STRING(&cert_zval, net->data->options.ssl_cert, 0);
php_stream_context_set_option(context, "ssl", "local_cert", &cert_zval);
- if (!net->options.ssl_key) {
+ if (!net->data->options.ssl_key) {
php_stream_context_set_option(context, "ssl", "local_pk", &cert_zval);
}
}
- if (net->options.ssl_ca) {
+ if (net->data->options.ssl_ca) {
zval cafile_zval;
- ZVAL_STRING(&cafile_zval, net->options.ssl_ca, 0);
+ ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca, 0);
php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval);
}
- if (net->options.ssl_capath) {
+ if (net->data->options.ssl_capath) {
zval capath_zval;
- ZVAL_STRING(&capath_zval, net->options.ssl_capath, 0);
+ ZVAL_STRING(&capath_zval, net->data->options.ssl_capath, 0);
php_stream_context_set_option(context, "ssl", "cafile", &capath_zval);
}
- if (net->options.ssl_passphrase) {
+ if (net->data->options.ssl_passphrase) {
zval passphrase_zval;
- ZVAL_STRING(&passphrase_zval, net->options.ssl_passphrase, 0);
+ ZVAL_STRING(&passphrase_zval, net->data->options.ssl_passphrase, 0);
php_stream_context_set_option(context, "ssl", "passphrase", &passphrase_zval);
}
- if (net->options.ssl_cipher) {
+ if (net->data->options.ssl_cipher) {
zval cipher_zval;
- ZVAL_STRING(&cipher_zval, net->options.ssl_cipher, 0);
+ ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher, 0);
php_stream_context_set_option(context, "ssl", "ciphers", &cipher_zval);
}
- php_stream_context_set(net->stream, context);
- if (php_stream_xport_crypto_setup(net->stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL TSRMLS_CC) < 0 ||
- php_stream_xport_crypto_enable(net->stream, 1 TSRMLS_CC) < 0)
+ php_stream_context_set(net_stream, context);
+ if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL TSRMLS_CC) < 0 ||
+ php_stream_xport_crypto_enable(net_stream, 1 TSRMLS_CC) < 0)
{
DBG_ERR("Cannot connect to MySQL by using SSL");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot connect to MySQL by using SSL");
DBG_RETURN(FAIL);
}
+ net->data->ssl = TRUE;
/*
get rid of the context. we are persistent and if this is a real pconn used by mysql/mysqli,
then the context would not survive cleaning of EG(regular_list), where it is registered, as a
@@ -865,19 +916,20 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC)
of the context, which means usage of already freed memory, bad. Actually we don't need this
context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it.
*/
- php_stream_context_set(net->stream, NULL);
+ php_stream_context_set(net_stream, NULL);
- if (net->options.timeout_read) {
+ if (net->data->options.timeout_read) {
struct timeval tv;
- DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->options.timeout_read);
- tv.tv_sec = net->options.timeout_read;
+ DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->data->options.timeout_read);
+ tv.tv_sec = net->data->options.timeout_read;
tv.tv_usec = 0;
- php_stream_set_option(net->stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv);
+ php_stream_set_option(net_stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv);
}
DBG_RETURN(PASS);
#else
DBG_ENTER("mysqlnd_net::enable_ssl");
+ DBG_INFO("MYSQLND_SSL_SUPPORTED is not defined");
DBG_RETURN(PASS);
#endif
}
@@ -906,25 +958,29 @@ MYSQLND_METHOD(mysqlnd_net, free_contents)(MYSQLND_NET * net TSRMLS_DC)
net->uncompressed_data->free_buffer(&net->uncompressed_data TSRMLS_CC);
}
#endif
- if (net->options.ssl_key) {
- mnd_pefree(net->options.ssl_key, pers);
- net->options.ssl_key = NULL;
+ if (net->data->options.ssl_key) {
+ mnd_pefree(net->data->options.ssl_key, pers);
+ net->data->options.ssl_key = NULL;
+ }
+ if (net->data->options.ssl_cert) {
+ mnd_pefree(net->data->options.ssl_cert, pers);
+ net->data->options.ssl_cert = NULL;
}
- if (net->options.ssl_cert) {
- mnd_pefree(net->options.ssl_cert, pers);
- net->options.ssl_cert = NULL;
+ if (net->data->options.ssl_ca) {
+ mnd_pefree(net->data->options.ssl_ca, pers);
+ net->data->options.ssl_ca = NULL;
}
- if (net->options.ssl_ca) {
- mnd_pefree(net->options.ssl_ca, pers);
- net->options.ssl_ca = NULL;
+ if (net->data->options.ssl_capath) {
+ mnd_pefree(net->data->options.ssl_capath, pers);
+ net->data->options.ssl_capath = NULL;
}
- if (net->options.ssl_capath) {
- mnd_pefree(net->options.ssl_capath, pers);
- net->options.ssl_capath = NULL;
+ if (net->data->options.ssl_cipher) {
+ mnd_pefree(net->data->options.ssl_cipher, pers);
+ net->data->options.ssl_cipher = NULL;
}
- if (net->options.ssl_cipher) {
- mnd_pefree(net->options.ssl_cipher, pers);
- net->options.ssl_cipher = NULL;
+ if (net->data->options.sha256_server_public_key) {
+ mnd_pefree(net->data->options.sha256_server_public_key, pers);
+ net->data->options.sha256_server_public_key = NULL;
}
DBG_VOID_RETURN;
@@ -936,24 +992,25 @@ MYSQLND_METHOD(mysqlnd_net, free_contents)(MYSQLND_NET * net TSRMLS_DC)
static void
MYSQLND_METHOD(mysqlnd_net, close_stream)(MYSQLND_NET * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC)
{
+ php_stream * net_stream;
DBG_ENTER("mysqlnd_net::close_stream");
- if (net && net->stream) {
+ if (net && (net_stream = net->data->m.get_stream(net TSRMLS_CC))) {
zend_bool pers = net->persistent;
- DBG_INF_FMT("Freeing stream. abstract=%p", net->stream->abstract);
+ DBG_INF_FMT("Freeing stream. abstract=%p", net_stream->abstract);
if (pers) {
if (EG(active)) {
- php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE_PERSISTENT | PHP_STREAM_FREE_RSRC_DTOR);
+ php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE_PERSISTENT | PHP_STREAM_FREE_RSRC_DTOR);
} else {
/*
otherwise we will crash because the EG(persistent_list) has been freed already,
before the modules are shut down
*/
- php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_RSRC_DTOR);
+ php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_RSRC_DTOR);
}
} else {
- php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE);
+ php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE);
}
- net->stream = NULL;
+ (void) net->data->m.set_stream(net, NULL TSRMLS_CC);
}
DBG_VOID_RETURN;
@@ -969,13 +1026,13 @@ MYSQLND_METHOD(mysqlnd_net, init)(MYSQLND_NET * const net, MYSQLND_STATS * const
DBG_ENTER("mysqlnd_net::init");
buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/
- net->m.set_client_option(net, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size TSRMLS_CC);
+ net->data->m.set_client_option(net, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size TSRMLS_CC);
buf_size = MYSQLND_G(net_read_buffer_size); /* this is long, cast to unsigned int*/
- net->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size TSRMLS_CC);
+ net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size TSRMLS_CC);
buf_size = MYSQLND_G(net_read_timeout); /* this is long, cast to unsigned int*/
- net->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size TSRMLS_CC);
+ net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size TSRMLS_CC);
DBG_RETURN(PASS);
}
@@ -988,22 +1045,49 @@ MYSQLND_METHOD(mysqlnd_net, dtor)(MYSQLND_NET * const net, MYSQLND_STATS * const
{
DBG_ENTER("mysqlnd_net::dtor");
if (net) {
- zend_bool pers = net->persistent;
-
- net->m.free_contents(net TSRMLS_CC);
- net->m.close_stream(net, stats, error_info TSRMLS_CC);
+ net->data->m.free_contents(net TSRMLS_CC);
+ net->data->m.close_stream(net, stats, error_info TSRMLS_CC);
+
if (net->cmd_buffer.buffer) {
DBG_INF("Freeing cmd buffer");
- mnd_pefree(net->cmd_buffer.buffer, pers);
+ mnd_pefree(net->cmd_buffer.buffer, net->persistent);
net->cmd_buffer.buffer = NULL;
}
- mnd_pefree(net, pers);
+
+ mnd_pefree(net->data, net->data->persistent);
+ mnd_pefree(net, net->persistent);
}
DBG_VOID_RETURN;
}
/* }}} */
+/* {{{ mysqlnd_net::get_stream */
+static php_stream *
+MYSQLND_METHOD(mysqlnd_net, get_stream)(const MYSQLND_NET * const net TSRMLS_DC)
+{
+ DBG_ENTER("mysqlnd_net::get_stream");
+ DBG_INF_FMT("%p", net? net->data->stream:NULL);
+ DBG_RETURN(net? net->data->stream:NULL);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_net::set_stream */
+static php_stream *
+MYSQLND_METHOD(mysqlnd_net, set_stream)(MYSQLND_NET * const net, php_stream * net_stream TSRMLS_DC)
+{
+ php_stream * ret = NULL;
+ DBG_ENTER("mysqlnd_net::set_stream");
+ if (net) {
+ net->data->stream = net_stream;
+ ret = net->data->stream;
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
MYSQLND_CLASS_METHODS_START(mysqlnd_net)
MYSQLND_METHOD(mysqlnd_net, init),
MYSQLND_METHOD(mysqlnd_net, dtor),
@@ -1011,8 +1095,9 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_net)
MYSQLND_METHOD(mysqlnd_net, close_stream),
MYSQLND_METHOD(mysqlnd_net, open_pipe),
MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix),
- NULL, /* unused 1 */
- NULL, /* unused 2 */
+ MYSQLND_METHOD(mysqlnd_net, get_stream),
+ MYSQLND_METHOD(mysqlnd_net, set_stream),
+ MYSQLND_METHOD(mysqlnd_net, get_open_stream),
MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt),
MYSQLND_METHOD(mysqlnd_net, set_client_option),
MYSQLND_METHOD(mysqlnd_net, decode),
@@ -1026,10 +1111,15 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_net)
MYSQLND_METHOD(mysqlnd_net, send_ex),
MYSQLND_METHOD(mysqlnd_net, receive_ex),
#ifdef MYSQLND_COMPRESSION_ENABLED
- MYSQLND_METHOD(mysqlnd_net, read_compressed_packet_from_stream_and_fill_read_buffer)
+ MYSQLND_METHOD(mysqlnd_net, read_compressed_packet_from_stream_and_fill_read_buffer),
#else
- NULL
+ NULL,
#endif
+ NULL, /* unused 1 */
+ NULL, /* unused 2 */
+ NULL, /* unused 3 */
+ NULL, /* unused 4 */
+ NULL /* unused 5 */
MYSQLND_CLASS_METHODS_END;
@@ -1051,7 +1141,7 @@ mysqlnd_net_free(MYSQLND_NET * const net, MYSQLND_STATS * stats, MYSQLND_ERROR_I
{
DBG_ENTER("mysqlnd_net_free");
if (net) {
- net->m.dtor(net, stats, error_info TSRMLS_CC);
+ net->data->m.dtor(net, stats, error_info TSRMLS_CC);
}
DBG_VOID_RETURN;
}
diff --git a/ext/mysqlnd/mysqlnd_plugin.c b/ext/mysqlnd/mysqlnd_plugin.c
index 2dbb57d1c..61ab1974f 100644
--- a/ext/mysqlnd/mysqlnd_plugin.c
+++ b/ext/mysqlnd/mysqlnd_plugin.c
@@ -26,7 +26,7 @@
#include "mysqlnd_debug.h"
/*--------------------------------------------------------------------*/
-
+#if defined(MYSQLND_DBG_ENABLED) && MYSQLND_DBG_ENABLED == 1
static enum_func_status mysqlnd_example_plugin_end(void * p TSRMLS_DC);
static MYSQLND_STATS * mysqlnd_plugin_example_stats = NULL;
@@ -87,7 +87,7 @@ mysqlnd_example_plugin_register(TSRMLS_D)
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_example_plugin TSRMLS_CC);
}
/* }}} */
-
+#endif /* defined(MYSQLND_DBG_ENABLED) && MYSQLND_DBG_ENABLED == 1 */
/*--------------------------------------------------------------------*/
static HashTable mysqlnd_registered_plugins;
diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h
index addce670d..8fe74cb75 100644
--- a/ext/mysqlnd/mysqlnd_priv.h
+++ b/ext/mysqlnd/mysqlnd_priv.h
@@ -33,12 +33,6 @@
#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
#endif
-#if PHP_MAJOR_VERSION >= 6
-#define MYSQLND_UNICODE 1
-#else
-#define MYSQLND_UNICODE 0
-#endif
-
#ifdef ZTS
#include "TSRM.h"
#endif
@@ -47,21 +41,12 @@
#define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
#endif
-#if MYSQLND_UNICODE
-#define mysqlnd_array_init(arg, field_count) \
-{ \
- ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\
- zend_u_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0, 0);\
- Z_TYPE_P(arg) = IS_ARRAY;\
-}
-#else
#define mysqlnd_array_init(arg, field_count) \
{ \
ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\
zend_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0); \
Z_TYPE_P(arg) = IS_ARRAY;\
}
-#endif
#define MYSQLND_STR_W_LEN(str) str, (sizeof(str) - 1)
@@ -174,9 +159,7 @@
#define CONN_SET_STATE(c, s) (c)->m->set_state((c), (s) TSRMLS_CC)
/* PS stuff */
-typedef void (*ps_field_fetch_func)(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool everything_as_unicode TSRMLS_DC);
+typedef void (*ps_field_fetch_func)(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC);
struct st_mysqlnd_perm_bind {
ps_field_fetch_func func;
/* should be signed int */
@@ -193,23 +176,21 @@ PHPAPI extern const char * const mysqlnd_out_of_sync;
PHPAPI extern const char * const mysqlnd_server_gone;
PHPAPI extern const char * const mysqlnd_out_of_memory;
-extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_object_factory);
-extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn);
-extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn_data);
-extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_res);
-extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol);
-extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_net);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_object_factory);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn_data);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_res);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_net);
-enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char *filename, zend_bool *is_warning TSRMLS_DC);
+enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zend_bool * is_warning TSRMLS_DC);
void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */
void _mysqlnd_init_ps_fetch_subsystem();
-void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row, zend_bool as_unicode,
- unsigned int byte_count TSRMLS_DC);
+void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row, unsigned int byte_count TSRMLS_DC);
void mysqlnd_plugin_subsystem_init(TSRMLS_D);
void mysqlnd_plugin_subsystem_end(TSRMLS_D);
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index 1b48ba1d7..d5e7d3ffb 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -734,7 +734,6 @@ mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int f
current_row,
meta->field_count,
meta->fields,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC);
if (PASS != rc) {
@@ -853,7 +852,6 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int
result->unbuf->last_row_data,
row_packet->field_count,
row_packet->fields_metadata,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC))
{
@@ -871,14 +869,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int
zval_dtor(stmt->result_bind[i].zv);
#endif
if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data)) ) {
- if (
- (Z_TYPE_P(data) == IS_STRING
-#if MYSQLND_UNICODE
- || Z_TYPE_P(data) == IS_UNICODE
-#endif
- )
- && (result->meta->fields[i].max_length < (unsigned long) Z_STRLEN_P(data)))
- {
+ if ((Z_TYPE_P(data) == IS_STRING) && (result->meta->fields[i].max_length < (unsigned long) Z_STRLEN_P(data))) {
result->meta->fields[i].max_length = Z_STRLEN_P(data);
}
stmt->result_bind[i].zv->value = data->value;
@@ -1037,7 +1028,6 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla
result->unbuf->last_row_data,
row_packet->field_count,
row_packet->fields_metadata,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC))
{
@@ -1058,13 +1048,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla
DBG_INF_FMT("i=%u bound_var=%p type=%u refc=%u", i, stmt->result_bind[i].zv,
Z_TYPE_P(data), Z_REFCOUNT_P(stmt->result_bind[i].zv));
if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data))) {
- if ((Z_TYPE_P(data) == IS_STRING
-#if MYSQLND_UNICODE
- || Z_TYPE_P(data) == IS_UNICODE
-#endif
- )
- && (result->meta->fields[i].max_length < (unsigned long) Z_STRLEN_P(data)))
- {
+ if ((Z_TYPE_P(data) == IS_STRING) && (result->meta->fields[i].max_length < (unsigned long) Z_STRLEN_P(data))) {
result->meta->fields[i].max_length = Z_STRLEN_P(data);
}
stmt->result_bind[i].zv->value = data->value;
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index ce0736fdf..95945cf67 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -53,9 +53,9 @@ struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1];
#define MYSQLND_PS_SKIP_RESULT_STR -2
/* {{{ ps_fetch_from_1_to_8_bytes */
-void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row, zend_bool as_unicode,
- unsigned int byte_count TSRMLS_DC)
+void
+ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len,
+ zend_uchar ** row, unsigned int byte_count TSRMLS_DC)
{
char tmp[22];
size_t tmp_len = 0;
@@ -117,16 +117,7 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field,
}
if (tmp_len) {
-#if MYSQLND_UNICODE
- if (as_unicode) {
- DBG_INF("stringify");
- ZVAL_UTF8_STRINGL(zv, tmp, tmp_len, ZSTR_DUPLICATE);
- } else
-#endif
- {
- DBG_INF("stringify");
- ZVAL_STRINGL(zv, tmp, tmp_len, 1);
- }
+ ZVAL_STRINGL(zv, tmp, tmp_len, 1);
}
(*row)+= byte_count;
DBG_VOID_RETURN;
@@ -135,10 +126,8 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field,
/* {{{ ps_fetch_null */
-static
-void ps_fetch_null(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_null(zval *zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
ZVAL_NULL(zv);
}
@@ -146,54 +135,44 @@ void ps_fetch_null(zval *zv, const MYSQLND_FIELD * const field,
/* {{{ ps_fetch_int8 */
-static
-void ps_fetch_int8(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_int8(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
- ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, as_unicode, 1 TSRMLS_CC);
+ ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 1 TSRMLS_CC);
}
/* }}} */
/* {{{ ps_fetch_int16 */
-static
-void ps_fetch_int16(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_int16(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
- ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, as_unicode, 2 TSRMLS_CC);
+ ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 2 TSRMLS_CC);
}
/* }}} */
/* {{{ ps_fetch_int32 */
-static
-void ps_fetch_int32(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_int32(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
- ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, as_unicode, 4 TSRMLS_CC);
+ ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 4 TSRMLS_CC);
}
/* }}} */
/* {{{ ps_fetch_int64 */
-static
-void ps_fetch_int64(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_int64(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
- ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, as_unicode, 8 TSRMLS_CC);
+ ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 8 TSRMLS_CC);
}
/* }}} */
/* {{{ ps_fetch_float */
-static
-void ps_fetch_float(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_float(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
float value;
DBG_ENTER("ps_fetch_float");
@@ -207,10 +186,8 @@ void ps_fetch_float(zval *zv, const MYSQLND_FIELD * const field,
/* {{{ ps_fetch_double */
-static
-void ps_fetch_double(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_double(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
double value;
DBG_ENTER("ps_fetch_double");
@@ -224,18 +201,16 @@ void ps_fetch_double(zval *zv, const MYSQLND_FIELD * const field,
/* {{{ ps_fetch_time */
-static
-void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
struct st_mysqlnd_time t;
- unsigned int length; /* First byte encodes the length*/
+ unsigned long length; /* First byte encodes the length*/
char * value;
DBG_ENTER("ps_fetch_time");
if ((length = php_mysqlnd_net_field_length(row))) {
- zend_uchar *to= *row;
+ zend_uchar * to= *row;
t.time_type = MYSQLND_TIMESTAMP_TIME;
t.neg = (zend_bool) to[0];
@@ -261,29 +236,19 @@ void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field,
length = mnd_sprintf(&value, 0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second);
DBG_INF_FMT("%s", value);
-#if MYSQLND_UNICODE
- if (!as_unicode) {
-#endif
- ZVAL_STRINGL(zv, value, length, 1);
- mnd_sprintf_free(value);
-#if MYSQLND_UNICODE
- } else {
- ZVAL_UTF8_STRINGL(zv, value, length, ZSTR_AUTOFREE);
- }
-#endif
+ ZVAL_STRINGL(zv, value, length, 1);
+ mnd_sprintf_free(value);
DBG_VOID_RETURN;
}
/* }}} */
/* {{{ ps_fetch_date */
-static
-void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_date(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
struct st_mysqlnd_time t = {0};
- unsigned int length; /* First byte encodes the length*/
+ unsigned long length; /* First byte encodes the length*/
char * value;
DBG_ENTER("ps_fetch_date");
@@ -308,34 +273,24 @@ void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field,
length = mnd_sprintf(&value, 0, "%04u-%02u-%02u", t.year, t.month, t.day);
DBG_INF_FMT("%s", value);
-#if MYSQLND_UNICODE
- if (!as_unicode) {
-#endif
- ZVAL_STRINGL(zv, value, length, 1);
- mnd_sprintf_free(value);
-#if MYSQLND_UNICODE
- } else {
- ZVAL_UTF8_STRINGL(zv, value, length, ZSTR_AUTOFREE);
- }
-#endif
+ ZVAL_STRINGL(zv, value, length, 1);
+ mnd_sprintf_free(value);
DBG_VOID_RETURN;
}
/* }}} */
/* {{{ ps_fetch_datetime */
-static
-void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_datetime(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
struct st_mysqlnd_time t;
- unsigned int length; /* First byte encodes the length*/
+ unsigned long length; /* First byte encodes the length*/
char * value;
DBG_ENTER("ps_fetch_datetime");
if ((length = php_mysqlnd_net_field_length(row))) {
- zend_uchar *to= *row;
+ zend_uchar * to = *row;
t.time_type = MYSQLND_TIMESTAMP_DATETIME;
t.neg = 0;
@@ -362,46 +317,26 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field,
length = mnd_sprintf(&value, 0, "%04u-%02u-%02u %02u:%02u:%02u", t.year, t.month, t.day, t.hour, t.minute, t.second);
DBG_INF_FMT("%s", value);
-#if MYSQLND_UNICODE
- if (!as_unicode) {
-#endif
- ZVAL_STRINGL(zv, value, length, 1);
- mnd_sprintf_free(value);
-#if MYSQLND_UNICODE
- } else {
- ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE);
- }
-#endif
+ ZVAL_STRINGL(zv, value, length, 1);
+ mnd_sprintf_free(value);
DBG_VOID_RETURN;
}
/* }}} */
/* {{{ ps_fetch_string */
-static
-void ps_fetch_string(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_string(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
/*
For now just copy, before we make it possible
to write \0 to the row buffer
*/
- unsigned long length = php_mysqlnd_net_field_length(row);
+ const unsigned long length = php_mysqlnd_net_field_length(row);
DBG_ENTER("ps_fetch_string");
DBG_INF_FMT("len = %lu", length);
-#if MYSQLND_UNICODE
- if (field->charsetnr == MYSQLND_BINARY_CHARSET_NR) {
- DBG_INF("Binary charset");
- ZVAL_STRINGL(zv, (char *)*row, length, 1);
- } else {
- DBG_INF_FMT("copying from the row buffer");
- ZVAL_UTF8_STRINGL(zv, (char*)*row, length, ZSTR_DUPLICATE);
- }
-#else
DBG_INF("copying from the row buffer");
ZVAL_STRINGL(zv, (char *)*row, length, 1);
-#endif
(*row) += length;
DBG_VOID_RETURN;
@@ -410,13 +345,11 @@ void ps_fetch_string(zval *zv, const MYSQLND_FIELD * const field,
/* {{{ ps_fetch_bit */
-static
-void ps_fetch_bit(zval *zv, const MYSQLND_FIELD * const field,
- unsigned int pack_len, zend_uchar **row,
- zend_bool as_unicode TSRMLS_DC)
+static void
+ps_fetch_bit(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row TSRMLS_DC)
{
- unsigned long length= php_mysqlnd_net_field_length(row);
- ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, as_unicode, length TSRMLS_CC);
+ unsigned long length = php_mysqlnd_net_field_length(row);
+ ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, length TSRMLS_CC);
}
/* }}} */
@@ -566,7 +499,7 @@ void _mysqlnd_init_ps_fetch_subsystem()
/* {{{ mysqlnd_stmt_copy_it */
static enum_func_status
-mysqlnd_stmt_copy_it(zval *** copies, zval *original, unsigned int param_count, unsigned int current TSRMLS_DC)
+mysqlnd_stmt_copy_it(zval *** copies, zval * original, unsigned int param_count, unsigned int current TSRMLS_DC)
{
if (!*copies) {
*copies = mnd_ecalloc(param_count, sizeof(zval *));
@@ -786,12 +719,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar
case MYSQL_TYPE_VAR_STRING:
use_string:
data_size += 8; /* max 8 bytes for size */
-#if MYSQLND_UNICODE
- if (Z_TYPE_P(the_var) != IS_STRING || Z_TYPE_P(the_var) == IS_UNICODE)
-#else
- if (Z_TYPE_P(the_var) != IS_STRING)
-#endif
- {
+ if (Z_TYPE_P(the_var) != IS_STRING) {
if (!copies || !copies[i]) {
if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) {
SET_OOM_ERROR(*stmt->error_info);
@@ -799,11 +727,6 @@ use_string:
}
}
the_var = copies[i];
-#if MYSQLND_UNICODE
- if (Z_TYPE_P(the_var) == IS_UNICODE) {
- zval_unicode_to_string_ex(the_var, UG(utf8_conv) TSRMLS_CC);
- }
-#endif
}
convert_to_string_ex(&the_var);
data_size += Z_STRLEN_P(the_var);
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c
index 8ae2665ba..3dd06edb3 100644
--- a/ext/mysqlnd/mysqlnd_result.c
+++ b/ext/mysqlnd/mysqlnd_result.c
@@ -55,7 +55,6 @@ MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest)(MYSQLND_RES * const resu
data_cursor,
result->meta->field_count,
result->meta->fields,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC);
if (rc != PASS) {
@@ -106,16 +105,6 @@ mysqlnd_rset_zval_ptr_dtor(zval **zv, enum_mysqlnd_res_type type, zend_bool * co
/*
Not a prepared statement, then we have to
call copy_ctor and then zval_ptr_dtor()
-
- In Unicode mode the destruction of the zvals should not call
- zval_copy_ctor() because then we will leak.
- I suppose we can use UG(unicode) in mysqlnd.c when freeing a result set
- to check if we need to call copy_ctor().
-
- If the type is IS_UNICODE, which can happen with PHP6, then we don't
- need to copy_ctor, as the data doesn't point to our internal buffers.
- If it's string (in PHP5 always) and in PHP6 if data is binary, then
- it still points to internal buffers and has to be copied.
*/
if (Z_TYPE_PP(zv) == IS_STRING) {
zval_copy_ctor(*zv);
@@ -669,7 +658,6 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC)
result->unbuf->last_row_data,
row_packet->field_count,
row_packet->fields_metadata,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC);
if (PASS != rc) {
@@ -784,7 +772,6 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int fla
result->unbuf->last_row_data,
field_count,
row_packet->fields_metadata,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC);
if (PASS != rc) {
@@ -812,19 +799,11 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int fla
*/
Z_ADDREF_P(data);
if (hash_key->is_numeric == FALSE) {
-#if MYSQLND_UNICODE
- zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE,
- hash_key->ustr,
- hash_key->ulen + 1,
- hash_key->key,
- (void *) &data, sizeof(zval *), NULL);
-#else
zend_hash_quick_update(Z_ARRVAL_P(row),
field->name,
field->name_length + 1,
hash_key->key,
(void *) &data, sizeof(zval *), NULL);
-#endif
} else {
zend_hash_index_update(Z_ARRVAL_P(row),
hash_key->key,
@@ -950,7 +929,6 @@ mysqlnd_fetch_row_buffered_c(MYSQLND_RES * result TSRMLS_DC)
current_row,
result->meta->field_count,
result->meta->fields,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC);
if (rc != PASS) {
@@ -1023,7 +1001,6 @@ mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags
current_row,
result->meta->field_count,
result->meta->fields,
- result->conn->options->numeric_and_datetime_as_unicode,
result->conn->options->int_and_float_native,
result->conn->stats TSRMLS_CC);
if (rc != PASS) {
@@ -1062,19 +1039,11 @@ mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags
*/
Z_ADDREF_P(data);
if (hash_key->is_numeric == FALSE) {
-#if MYSQLND_UNICODE
- zend_u_hash_quick_update(Z_ARRVAL_P(row), IS_UNICODE,
- hash_key->ustr,
- hash_key->ulen + 1,
- hash_key->key,
- (void *) &data, sizeof(zval *), NULL);
-#else
zend_hash_quick_update(Z_ARRVAL_P(row),
field->name,
field->name_length + 1,
hash_key->key,
(void *) &data, sizeof(zval *), NULL);
-#endif
} else {
zend_hash_index_update(Z_ARRVAL_P(row),
hash_key->key,
diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c
index 9469ceaf1..53368a8fb 100644
--- a/ext/mysqlnd/mysqlnd_result_meta.c
+++ b/ext/mysqlnd/mysqlnd_result_meta.c
@@ -92,60 +92,12 @@ mysqlnd_is_key_numeric(const char * key, size_t length, long *idx)
/* }}} */
-#if MYSQLND_UNICODE
-/* {{{ mysqlnd_unicode_is_key_numeric */
-static zend_bool
-mysqlnd_unicode_is_key_numeric(UChar *key, size_t length, long *idx)
-{
- register UChar * tmp=key;
-
- if (*tmp==0x2D /*'-'*/) {
- tmp++;
- }
- if ((*tmp>=0x30 /*'0'*/ && *tmp<=0x39 /*'9'*/)) { /* possibly a numeric index */
- do {
- UChar *end=key+length-1;
-
- if (*tmp++==0x30 && length>2) { /* don't accept numbers with leading zeros */
- break;
- }
- while (tmp<end) {
- if (!(*tmp>=0x30 /*'0'*/ && *tmp<=0x39 /*'9'*/)) {
- break;
- }
- tmp++;
- }
- if (tmp==end && *tmp==0) { /* a numeric index */
- if (*key==0x2D /*'-'*/) {
- *idx = zend_u_strtol(key, NULL, 10);
- if (*idx!=LONG_MIN) {
- return TRUE;
- }
- } else {
- *idx = zend_u_strtol(key, NULL, 10);
- if (*idx!=LONG_MAX) {
- return TRUE;
- }
- }
- }
- } while (0);
- }
- return FALSE;
-}
-/* }}} */
-#endif
-
-
/* {{{ mysqlnd_res_meta::read_metadata */
static enum_func_status
MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND_CONN_DATA * conn TSRMLS_DC)
{
unsigned int i = 0;
MYSQLND_PACKET_RES_FIELD * field_packet;
-#if MYSQLND_UNICODE
- UChar *ustr;
- int ulen;
-#endif
DBG_ENTER("mysqlnd_res_meta::read_metadata");
@@ -226,21 +178,6 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
}
}
-#if MYSQLND_UNICODE
- zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen,
- meta->fields[i].name,
- meta->fields[i].name_length TSRMLS_CC);
- if ((meta->zend_hash_keys[i].is_numeric =
- mysqlnd_unicode_is_key_numeric(ustr, ulen + 1, &idx)))
- {
- meta->zend_hash_keys[i].key = idx;
- mnd_efree(ustr);
- } else {
- meta->zend_hash_keys[i].ustr.u = ustr;
- meta->zend_hash_keys[i].ulen = ulen;
- meta->zend_hash_keys[i].key = zend_u_get_hash_value(IS_UNICODE, ZSTR(ustr), ulen + 1);
- }
-#else
/* For BC we have to check whether the key is numeric and use it like this */
if ((meta->zend_hash_keys[i].is_numeric =
mysqlnd_is_key_numeric(field_packet->metadata->name,
@@ -253,7 +190,6 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
zend_get_hash_value(field_packet->metadata->name,
field_packet->metadata->name_length + 1);
}
-#endif
}
PACKET_FREE(field_packet);
@@ -283,15 +219,6 @@ MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta TSRMLS_DC)
if (meta->zend_hash_keys) {
DBG_INF("Freeing zend_hash_keys");
-#if MYSQLND_UNICODE
- if (UG(unicode)) {
- for (i = 0; i < meta->field_count; i++) {
- if (meta->zend_hash_keys[i].ustr.v) {
- mnd_pefree(meta->zend_hash_keys[i].ustr.v, meta->persistent);
- }
- }
- }
-#endif
mnd_pefree(meta->zend_hash_keys, meta->persistent);
meta->zend_hash_keys = NULL;
}
@@ -379,15 +306,6 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co
/* copy the trailing \0 too */
memcpy(new_fields[i].def, orig_fields[i].def, orig_fields[i].def_length + 1);
}
-#if MYSQLND_UNICODE
- if (new_meta->zend_hash_keys[i].ustr.u) {
- new_meta->zend_hash_keys[i].ustr.u =
- eustrndup(new_meta->zend_hash_keys[i].ustr.u, new_meta->zend_hash_keys[i].ulen);
- if (!new_meta->zend_hash_keys[i].ustr.u) {
- goto oom;
- }
- }
-#endif
}
new_meta->current_field = 0;
new_meta->field_count = meta->field_count;
diff --git a/ext/mysqlnd/mysqlnd_reverse_api.h b/ext/mysqlnd/mysqlnd_reverse_api.h
index 005df5a1a..7e780edb5 100644
--- a/ext/mysqlnd/mysqlnd_reverse_api.h
+++ b/ext/mysqlnd/mysqlnd_reverse_api.h
@@ -47,4 +47,3 @@ PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv TSRMLS_DC);
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
-
diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c
index bb00a9192..00145a3db 100644
--- a/ext/mysqlnd/mysqlnd_statistics.c
+++ b/ext/mysqlnd/mysqlnd_statistics.c
@@ -203,22 +203,10 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING
mysqlnd_array_init(return_value, stats->count);
for (i = 0; i < stats->count; i++) {
-#if MYSQLND_UNICODE
- UChar *ustr, *tstr;
- int ulen, tlen;
-#endif
char tmp[25];
sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]);
-#if MYSQLND_UNICODE
- zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, names[i].s, names[i].l + 1 TSRMLS_CC);
- zend_string_to_unicode(UG(utf8_conv), &tstr, &tlen, tmp, strlen(tmp) + 1 TSRMLS_CC);
- add_u_assoc_unicode_ex(return_value, IS_UNICODE, ZSTR(ustr), ulen, tstr, 1);
- efree(ustr);
- efree(tstr);
-#else
add_assoc_string_ex(return_value, names[i].s, names[i].l + 1, tmp, 1);
-#endif
}
}
/* }}} */
diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h
index 43eba40a2..28def7259 100644
--- a/ext/mysqlnd/mysqlnd_structs.h
+++ b/ext/mysqlnd/mysqlnd_structs.h
@@ -183,7 +183,6 @@ typedef struct st_mysqlnd_options
/* maximum allowed packet size for communication */
ulong max_allowed_packet;
- zend_bool numeric_and_datetime_as_unicode;
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
zend_bool int_and_float_native;
#endif
@@ -207,12 +206,20 @@ typedef struct st_mysqlnd_net_options
char *ssl_passphrase;
zend_bool ssl_verify_peer;
uint64_t flags;
+
+ char * sha256_server_public_key;
+
+ char * unused1;
+ char * unused2;
+ char * unused3;
+ char * unused4;
} MYSQLND_NET_OPTIONS;
typedef struct st_mysqlnd_connection MYSQLND;
typedef struct st_mysqlnd_connection_data MYSQLND_CONN_DATA;
typedef struct st_mysqlnd_net MYSQLND_NET;
+typedef struct st_mysqlnd_net_data MYSQLND_NET_DATA;
typedef struct st_mysqlnd_protocol MYSQLND_PROTOCOL;
typedef struct st_mysqlnd_res MYSQLND_RES;
typedef char** MYSQLND_ROW_C; /* return data as array of strings */
@@ -282,7 +289,10 @@ typedef enum_func_status (*func_mysqlnd_net__init)(MYSQLND_NET * const net, MYSQ
typedef void (*func_mysqlnd_net__dtor)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
typedef enum_func_status (*func_mysqlnd_net__connect_ex)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
typedef void (*func_mysqlnd_net__close_stream)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
-typedef enum_func_status (*func_mysqlnd_net__open_stream)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
+typedef php_stream * (*func_mysqlnd_net__open_stream)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
+typedef php_stream * (*func_mysqlnd_net__get_stream)(const MYSQLND_NET * const net TSRMLS_DC);
+typedef php_stream * (*func_mysqlnd_net__set_stream)(MYSQLND_NET * const net, php_stream * net_stream TSRMLS_DC);
+typedef func_mysqlnd_net__open_stream (*func_mysqlnd_net__get_open_stream)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
typedef void (*func_mysqlnd_net__post_connect_set_opt)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info TSRMLS_DC);
typedef enum_func_status (*func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_NET * net, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info TSRMLS_DC);
@@ -295,8 +305,10 @@ struct st_mysqlnd_net_methods
func_mysqlnd_net__open_stream open_pipe;
func_mysqlnd_net__open_stream open_tcp_or_unix;
- void * unused1;
- void * unused2;
+ func_mysqlnd_net__get_stream get_stream;
+ func_mysqlnd_net__set_stream set_stream;
+ func_mysqlnd_net__get_open_stream get_open_stream;
+
func_mysqlnd_net__post_connect_set_opt post_connect_set_opt;
func_mysqlnd_net__set_client_option set_client_option;
@@ -314,11 +326,11 @@ struct st_mysqlnd_net_methods
func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer read_compressed_packet_from_stream_and_fill_read_buffer;
+ void * unused1;
+ void * unused2;
void * unused3;
void * unused4;
void * unused5;
- void * unused6;
- void * unused7;
};
@@ -335,6 +347,8 @@ struct st_mysqlnd_packet_stats;
struct st_mysqlnd_packet_prepare_response;
struct st_mysqlnd_packet_chg_user_resp;
struct st_mysqlnd_packet_auth_pam;
+struct st_mysqlnd_packet_sha256_pk_request;
+struct st_mysqlnd_packet_sha256_pk_request_response;
typedef struct st_mysqlnd_packet_greet * (*func_mysqlnd_protocol__get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
typedef struct st_mysqlnd_packet_auth * (*func_mysqlnd_protocol__get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
@@ -349,6 +363,8 @@ typedef struct st_mysqlnd_packet_row * (*func_mysqlnd_protocol__get_row_packet
typedef struct st_mysqlnd_packet_stats * (*func_mysqlnd_protocol__get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
typedef struct st_mysqlnd_packet_prepare_response *(*func_mysqlnd_protocol__get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol__get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
+typedef struct st_mysqlnd_packet_sha256_pk_request *(*func_mysqlnd_protocol__get_sha256_pk_request_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
+typedef struct st_mysqlnd_packet_sha256_pk_request_response *(*func_mysqlnd_protocol__get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC);
struct st_mysqlnd_protocol_methods
{
@@ -365,12 +381,12 @@ struct st_mysqlnd_protocol_methods
func_mysqlnd_protocol__get_stats_packet get_stats_packet;
func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet;
func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet;
+ func_mysqlnd_protocol__get_sha256_pk_request_packet get_sha256_pk_request_packet;
+ func_mysqlnd_protocol__get_sha256_pk_request_response_packet get_sha256_pk_request_response_packet;
void * unused1;
void * unused2;
void * unused3;
- void * unused4;
- void * unused5;
};
@@ -447,7 +463,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__query_read_result_set_header)
typedef MYSQLND_CONN_DATA * (*func_mysqlnd_conn_data__get_reference)(MYSQLND_CONN_DATA * const conn TSRMLS_DC);
typedef enum_func_status (*func_mysqlnd_conn_data__free_reference)(MYSQLND_CONN_DATA * const conn TSRMLS_DC);
-typedef enum mysqlnd_connection_state (*func_mysqlnd_conn_data__get_state)(MYSQLND_CONN_DATA * const conn TSRMLS_DC);
+typedef enum mysqlnd_connection_state (*func_mysqlnd_conn_data__get_state)(const MYSQLND_CONN_DATA * const conn TSRMLS_DC);
typedef void (*func_mysqlnd_conn_data__set_state)(MYSQLND_CONN_DATA * const conn, enum mysqlnd_connection_state new_state TSRMLS_DC);
typedef enum_func_status (*func_mysqlnd_conn_data__simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC);
@@ -467,7 +483,11 @@ typedef enum_func_status (*func_mysqlnd_conn_data__tx_rollback)(MYSQLND_CONN_DAT
typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_start)(MYSQLND_CONN_DATA * conn, size_t this_func TSRMLS_DC);
typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_end)(MYSQLND_CONN_DATA * conn, size_t this_func, enum_func_status status TSRMLS_DC);
-
+typedef enum_func_status (*func_mysqlnd_conn_data__execute_init_commands)(MYSQLND_CONN_DATA * conn TSRMLS_DC);
+typedef unsigned int (*func_mysqlnd_conn_data__get_updated_connect_flags)(MYSQLND_CONN_DATA * conn, unsigned int mysql_flags TSRMLS_DC);
+typedef enum_func_status (*func_mysqlnd_conn_data__connect_handshake)(MYSQLND_CONN_DATA * conn, const char * const host, const char * const user, const char * const passwd, const unsigned int passwd_len, const char * const db, const unsigned int db_len, const unsigned int mysql_flags TSRMLS_DC);
+typedef enum_func_status (*func_mysqlnd_conn_data__simple_command_send_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC);
+typedef struct st_mysqlnd_authentication_plugin * (*func_mysqlnd_conn_data__fetch_auth_plugin_by_name)(const char * const requested_protocol TSRMLS_DC);
struct st_mysqlnd_conn_data_methods
{
@@ -547,6 +567,12 @@ struct st_mysqlnd_conn_data_methods
func_mysqlnd_conn_data__local_tx_start local_tx_start;
func_mysqlnd_conn_data__local_tx_end local_tx_end;
+
+ func_mysqlnd_conn_data__execute_init_commands execute_init_commands;
+ func_mysqlnd_conn_data__get_updated_connect_flags get_updated_connect_flags;
+ func_mysqlnd_conn_data__connect_handshake connect_handshake;
+ func_mysqlnd_conn_data__simple_command_send_request simple_command_send_request;
+ func_mysqlnd_conn_data__fetch_auth_plugin_by_name fetch_auth_plugin_by_name;
};
@@ -598,9 +624,8 @@ typedef void (*func_mysqlnd_res__unbuffered_free_last_data)(MYSQLND_RES *resu
/* for decoding - binary or text protocol */
typedef enum_func_status (*func_mysqlnd_res__row_decoder)(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
- unsigned int field_count, MYSQLND_FIELD *fields_metadata,
- zend_bool as_unicode, zend_bool as_int_or_float,
- MYSQLND_STATS * stats TSRMLS_DC);
+ unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
+ zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC);
typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent TSRMLS_DC);
@@ -768,31 +793,44 @@ struct st_mysqlnd_stmt_methods
};
-struct st_mysqlnd_net
+struct st_mysqlnd_net_data
{
php_stream *stream;
+ zend_bool compressed;
+ zend_bool ssl;
+#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
+ zend_uchar last_command;
+#else
+ zend_uchar unused_pad1;
+#endif
+ MYSQLND_NET_OPTIONS options;
+
+ unsigned int refcount;
+
+ zend_bool persistent;
+
+ struct st_mysqlnd_net_methods m;
+};
+
+
+struct st_mysqlnd_net
+{
+ struct st_mysqlnd_net_data * data;
+
/* sequence for simple checking of correct packets */
zend_uchar packet_no;
- zend_bool compressed;
zend_uchar compressed_envelope_packet_no;
+
#ifdef MYSQLND_COMPRESSION_ENABLED
MYSQLND_READ_BUFFER * uncompressed_data;
#else
void * unused_pad1;
#endif
-#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
- zend_uchar last_command;
-#else
- zend_uchar unused_pad2;
-#endif
+
/* cmd buffer */
MYSQLND_CMD_BUFFER cmd_buffer;
- MYSQLND_NET_OPTIONS options;
-
- zend_bool persistent;
-
- struct st_mysqlnd_net_methods m;
+ zend_bool persistent;
};
@@ -893,10 +931,6 @@ struct mysqlnd_field_hash_key
{
zend_bool is_numeric;
unsigned long key;
-#if MYSQLND_UNICODE
- zstr ustr;
- unsigned int ulen;
-#endif
};
@@ -1070,7 +1104,8 @@ typedef zend_uchar * (*func_auth_plugin__get_auth_data)(struct st_mysqlnd_authen
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options, unsigned long mysql_flags
+ const MYSQLND_OPTIONS * const options,
+ const MYSQLND_NET_OPTIONS * const net_options, unsigned long mysql_flags
TSRMLS_DC);
struct st_mysqlnd_authentication_plugin
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index ce94ad8d8..65db8f0b2 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -47,7 +47,7 @@
(buf_size), (packet)->header.size, (packet)->header.size - (buf_size)); \
DBG_RETURN(FAIL); \
}\
- if (FAIL == conn->net->m.receive_ex((conn)->net, (buf), (packet)->header.size, (conn)->stats, ((conn)->error_info) TSRMLS_CC)) { \
+ if (FAIL == conn->net->data->m.receive_ex((conn)->net, (buf), (packet)->header.size, (conn)->stats, ((conn)->error_info) TSRMLS_CC)) { \
CONN_SET_STATE(conn, CONN_QUIT_SENT); \
SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);\
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", mysqlnd_server_gone); \
@@ -264,8 +264,8 @@ mysqlnd_read_header(MYSQLND_NET * net, MYSQLND_PACKET_HEADER * header,
zend_uchar buffer[MYSQLND_HEADER_SIZE];
DBG_ENTER(mysqlnd_read_header_name);
- DBG_INF_FMT("compressed=%u", net->compressed);
- if (FAIL == net->m.receive_ex(net, buffer, MYSQLND_HEADER_SIZE, conn_stats, error_info TSRMLS_CC)) {
+ DBG_INF_FMT("compressed=%u", net->data->compressed);
+ if (FAIL == net->data->m.receive_ex(net, buffer, MYSQLND_HEADER_SIZE, conn_stats, error_info TSRMLS_CC)) {
DBG_RETURN(FAIL);
}
@@ -279,7 +279,7 @@ mysqlnd_read_header(MYSQLND_NET * net, MYSQLND_PACKET_HEADER * header,
STAT_PROTOCOL_OVERHEAD_IN, MYSQLND_HEADER_SIZE,
STAT_PACKETS_RECEIVED, 1);
- if (net->compressed || net->packet_no == header->packet_no) {
+ if (net->data->compressed || net->packet_no == header->packet_no) {
/*
Have to increase the number, so we can send correct number back. It will
round at 255 as this is unsigned char. The server needs this for simple
@@ -549,7 +549,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC
}
DBG_RETURN(p - buffer - MYSQLND_HEADER_SIZE);
} else {
- size_t sent = conn->net->m.send_ex(conn->net, buffer, p - buffer - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info TSRMLS_CC);
+ size_t sent = conn->net->data->m.send_ex(conn->net, buffer, p - buffer - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info TSRMLS_CC);
if (!sent) {
CONN_SET_STATE(conn, CONN_QUIT_SENT);
}
@@ -623,7 +623,7 @@ php_mysqlnd_auth_response_read(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_D
memcpy(packet->new_auth_protocol_data, p, packet->new_auth_protocol_data_len);
}
DBG_INF_FMT("The server requested switching auth plugin to : %s", packet->new_auth_protocol);
- DBG_INF_FMT("Server salt : [%*s]", packet->new_auth_protocol_data_len, packet->new_auth_protocol_data);
+ DBG_INF_FMT("Server salt : [%d][%.*s]", packet->new_auth_protocol_data_len, packet->new_auth_protocol_data_len, packet->new_auth_protocol_data);
}
} else {
/* Everything was fine! */
@@ -709,7 +709,7 @@ php_mysqlnd_change_auth_response_write(void * _packet, MYSQLND_CONN_DATA * conn
}
{
- size_t sent = conn->net->m.send_ex(conn->net, buffer, p - buffer - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info TSRMLS_CC);
+ size_t sent = conn->net->data->m.send_ex(conn->net, buffer, p - buffer - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info TSRMLS_CC);
if (buffer != conn->net->cmd_buffer.buffer) {
mnd_efree(buffer);
}
@@ -923,14 +923,14 @@ size_t php_mysqlnd_cmd_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_PACKETS_SENT_CMD);
#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
- net->m.consume_uneaten_data(net, packet->command TSRMLS_CC);
+ net->data->m.consume_uneaten_data(net, packet->command TSRMLS_CC);
#endif
if (!packet->argument || !packet->arg_len) {
zend_uchar buffer[MYSQLND_HEADER_SIZE + 1];
int1store(buffer + MYSQLND_HEADER_SIZE, packet->command);
- sent = net->m.send_ex(net, buffer, 1, conn->stats, conn->error_info TSRMLS_CC);
+ sent = net->data->m.send_ex(net, buffer, 1, conn->stats, conn->error_info TSRMLS_CC);
} else {
size_t tmp_len = packet->arg_len + 1 + MYSQLND_HEADER_SIZE;
zend_uchar *tmp, *p;
@@ -945,7 +945,7 @@ size_t php_mysqlnd_cmd_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
memcpy(p, packet->argument, packet->arg_len);
- sent = net->m.send_ex(net, tmp, tmp_len - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info TSRMLS_CC);
+ sent = net->data->m.send_ex(net, tmp, tmp_len - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info TSRMLS_CC);
if (tmp != net->cmd_buffer.buffer) {
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_CMD_BUFFER_TOO_SMALL);
mnd_efree(tmp);
@@ -1201,7 +1201,7 @@ php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
p += 2;
BAIL_IF_NO_MORE_DATA;
- meta->decimals = uint2korr(p);
+ meta->decimals = uint1korr(p);
p += 1;
BAIL_IF_NO_MORE_DATA;
@@ -1388,7 +1388,7 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
p = (*buffer)->ptr + (*data_size - header.size);
}
- if (PASS != (ret = conn->net->m.receive_ex(conn->net, p, header.size, conn->stats, conn->error_info TSRMLS_CC))) {
+ if (PASS != (ret = conn->net->data->m.receive_ex(conn->net, p, header.size, conn->stats, conn->error_info TSRMLS_CC))) {
DBG_ERR("Empty row packet body");
php_error(E_WARNING, "Empty row packet body");
break;
@@ -1411,9 +1411,8 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
/* {{{ php_mysqlnd_rowp_read_binary_protocol */
enum_func_status
php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
- unsigned int field_count, MYSQLND_FIELD *fields_metadata,
- zend_bool as_unicode, zend_bool as_int_or_float,
- MYSQLND_STATS * stats TSRMLS_DC)
+ unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
+ zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC)
{
unsigned int i;
zend_uchar * p = row_buffer->ptr;
@@ -1446,17 +1445,17 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
enum_mysqlnd_collected_stats statistic;
zend_uchar * orig_p = p;
- DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u as_unicode=%u",
+ DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u",
*current_field, i,
fields_metadata[i].db, fields_metadata[i].table, fields_metadata[i].name, fields_metadata[i].type,
- fields_metadata[i].flags & UNSIGNED_FLAG, fields_metadata[i].flags, fields_metadata[i].type == MYSQL_TYPE_BIT, as_unicode);
+ fields_metadata[i].flags & UNSIGNED_FLAG, fields_metadata[i].flags, fields_metadata[i].type == MYSQL_TYPE_BIT);
if (*null_ptr & bit) {
DBG_INF("It's null");
ZVAL_NULL(*current_field);
statistic = STAT_BINARY_TYPE_FETCHED_NULL;
} else {
enum_mysqlnd_field_types type = fields_metadata[i].type;
- mysqlnd_ps_fetch_functions[type].func(*current_field, &fields_metadata[i], 0, &p, as_unicode TSRMLS_CC);
+ mysqlnd_ps_fetch_functions[type].func(*current_field, &fields_metadata[i], 0, &p TSRMLS_CC);
if (MYSQLND_G(collect_statistics)) {
switch (fields_metadata[i].type) {
@@ -1510,9 +1509,8 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
/* {{{ php_mysqlnd_rowp_read_text_protocol */
enum_func_status
php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
- unsigned int field_count, MYSQLND_FIELD *fields_metadata,
- zend_bool as_unicode, zend_bool as_int_or_float,
- MYSQLND_STATS * stats TSRMLS_DC)
+ unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
+ zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC)
{
unsigned int i;
zend_bool last_field_was_string = FALSE;
@@ -1564,7 +1562,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
ZVAL_NULL(*current_field);
last_field_was_string = FALSE;
} else {
-#if MYSQLND_UNICODE || defined(MYSQLND_STRING_TO_INT_CONVERSION)
+#if defined(MYSQLND_STRING_TO_INT_CONVERSION)
struct st_mysqlnd_perm_bind perm_bind =
mysqlnd_ps_fetch_functions[fields_metadata[i].type];
#endif
@@ -1660,7 +1658,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
Definitely not nice, _hackish_ :(, but works.
*/
zend_uchar *start = bit_area;
- ps_fetch_from_1_to_8_bytes(*current_field, &(fields_metadata[i]), 0, &p, as_unicode, len TSRMLS_CC);
+ ps_fetch_from_1_to_8_bytes(*current_field, &(fields_metadata[i]), 0, &p, len TSRMLS_CC);
/*
We have advanced in ps_fetch_from_1_to_8_bytes. We should go back because
later in this function there will be an advancement.
@@ -1668,60 +1666,16 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
p -= len;
if (Z_TYPE_PP(current_field) == IS_LONG) {
bit_area += 1 + sprintf((char *)start, "%ld", Z_LVAL_PP(current_field));
-#if MYSQLND_UNICODE
- if (as_unicode) {
- ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
- } else
-#endif
- {
- ZVAL_STRINGL(*current_field, (char *) start, bit_area - start - 1, 0);
- }
+ ZVAL_STRINGL(*current_field, (char *) start, bit_area - start - 1, 0);
} else if (Z_TYPE_PP(current_field) == IS_STRING){
memcpy(bit_area, Z_STRVAL_PP(current_field), Z_STRLEN_PP(current_field));
bit_area += Z_STRLEN_PP(current_field);
*bit_area++ = '\0';
zval_dtor(*current_field);
-#if MYSQLND_UNICODE
- if (as_unicode) {
- ZVAL_UTF8_STRINGL(*current_field, start, bit_area - start - 1, 0);
- } else
-#endif
- {
- ZVAL_STRINGL(*current_field, (char *) start, bit_area - start - 1, 0);
- }
+ ZVAL_STRINGL(*current_field, (char *) start, bit_area - start - 1, 0);
}
- /*
- IS_UNICODE should not be specially handled. In unicode mode
- the buffers are not referenced - everything is copied.
- */
} else
-#if MYSQLND_UNICODE == 0
- {
- ZVAL_STRINGL(*current_field, (char *)p, len, 0);
- }
-#else
- /*
- Here we have to convert to UTF16, which means not reusing the buffer.
- Which in turn means that we can free the buffers once we have
- stored the result set, if we use store_result().
-
- Also the destruction of the zvals should not call zval_copy_ctor()
- because then we will leak.
-
- XXX: Keep in mind that up there there is an open `else` in
- #ifdef MYSQLND_STRING_TO_INT_CONVERSION
- which will make with this `if` an `else if`.
- */
- if ((perm_bind.is_possibly_blob == TRUE &&
- fields_metadata[i].charsetnr == MYSQLND_BINARY_CHARSET_NR) ||
- (!as_unicode && perm_bind.can_ret_as_str_in_uni == TRUE))
- {
- /* BLOB - no conversion please */
- ZVAL_STRINGL(*current_field, (char *)p, len, 0);
- } else {
- ZVAL_UTF8_STRINGL(*current_field, (char *)p, len, 0);
- }
-#endif
+ ZVAL_STRINGL(*current_field, (char *)p, len, 0);
p += len;
last_field_was_string = TRUE;
}
@@ -1744,10 +1698,8 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
static enum_func_status
php_mysqlnd_rowp_read(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
{
- MYSQLND_NET * net = conn->net;
zend_uchar *p;
enum_func_status ret = PASS;
- size_t old_chunk_size = net->stream->chunk_size;
MYSQLND_PACKET_ROW *packet= (MYSQLND_PACKET_ROW *) _packet;
size_t post_alloc_for_bit_fields = 0;
size_t data_size = 0;
@@ -1829,7 +1781,6 @@ php_mysqlnd_rowp_read(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
}
end:
- net->stream->chunk_size = old_chunk_size;
DBG_RETURN(ret);
}
/* }}} */
@@ -2081,6 +2032,89 @@ php_mysqlnd_chg_user_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_
/* }}} */
+/* {{{ php_mysqlnd_sha256_pk_request_write */
+static
+size_t php_mysqlnd_sha256_pk_request_write(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
+{
+ zend_uchar buffer[MYSQLND_HEADER_SIZE + 1];
+ size_t sent;
+
+ DBG_ENTER("php_mysqlnd_sha256_pk_request_write");
+
+ int1store(buffer + MYSQLND_HEADER_SIZE, '\1');
+ sent = conn->net->data->m.send_ex(conn->net, buffer, 1, conn->stats, conn->error_info TSRMLS_CC);
+
+ DBG_RETURN(sent);
+}
+/* }}} */
+
+
+/* {{{ php_mysqlnd_sha256_pk_request_free_mem */
+static
+void php_mysqlnd_sha256_pk_request_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_DC)
+{
+ if (!stack_allocation) {
+ MYSQLND_PACKET_SHA256_PK_REQUEST * p = (MYSQLND_PACKET_SHA256_PK_REQUEST *) _packet;
+ mnd_pefree(p, p->header.persistent);
+ }
+}
+/* }}} */
+
+
+#define SHA256_PK_REQUEST_RESP_BUFFER_SIZE 2048
+
+/* {{{ php_mysqlnd_sha256_pk_request_response_read */
+static enum_func_status
+php_mysqlnd_sha256_pk_request_response_read(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC)
+{
+ zend_uchar buf[SHA256_PK_REQUEST_RESP_BUFFER_SIZE];
+ zend_uchar *p = buf;
+ zend_uchar *begin = buf;
+ MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE * packet= (MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE *) _packet;
+
+ DBG_ENTER("php_mysqlnd_sha256_pk_request_response_read");
+
+ /* leave space for terminating safety \0 */
+ PACKET_READ_HEADER_AND_BODY(packet, conn, buf, sizeof(buf), "SHA256_PK_REQUEST_RESPONSE", PROT_SHA256_PK_REQUEST_RESPONSE_PACKET);
+ BAIL_IF_NO_MORE_DATA;
+
+ p++;
+ BAIL_IF_NO_MORE_DATA;
+
+ packet->public_key_len = packet->header.size - (p - buf);
+ packet->public_key = mnd_emalloc(packet->public_key_len + 1);
+ memcpy(packet->public_key, p, packet->public_key_len);
+ packet->public_key[packet->public_key_len] = '\0';
+
+ DBG_RETURN(PASS);
+
+premature_end:
+ DBG_ERR_FMT("OK packet %d bytes shorter than expected", p - begin - packet->header.size);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "SHA256_PK_REQUEST_RESPONSE packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected",
+ p - begin - packet->header.size);
+ DBG_RETURN(FAIL);
+}
+/* }}} */
+
+
+/* {{{ php_mysqlnd_sha256_pk_request_response_free_mem */
+static void
+php_mysqlnd_sha256_pk_request_response_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_DC)
+{
+ MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE * p = (MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE *) _packet;
+ if (p->public_key) {
+ mnd_efree(p->public_key);
+ p->public_key = NULL;
+ }
+ p->public_key_len = 0;
+
+ if (!stack_allocation) {
+ mnd_pefree(p, p->header.persistent);
+ }
+}
+/* }}} */
+
+
/* {{{ packet_methods */
static
mysqlnd_packet_methods packet_methods[PROT_LAST] =
@@ -2162,7 +2196,19 @@ mysqlnd_packet_methods packet_methods[PROT_LAST] =
php_mysqlnd_chg_user_read, /* read */
NULL, /* write */
php_mysqlnd_chg_user_free_mem,
- } /* PROT_CHG_USER_RESP_PACKET */
+ }, /* PROT_CHG_USER_RESP_PACKET */
+ {
+ sizeof(MYSQLND_PACKET_SHA256_PK_REQUEST),
+ NULL, /* read */
+ php_mysqlnd_sha256_pk_request_write,
+ php_mysqlnd_sha256_pk_request_free_mem,
+ }, /* PROT_SHA256_PK_REQUEST_PACKET */
+ {
+ sizeof(MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE),
+ php_mysqlnd_sha256_pk_request_response_read,
+ NULL, /* write */
+ php_mysqlnd_sha256_pk_request_response_free_mem,
+ } /* PROT_SHA256_PK_REQUEST_RESPONSE_PACKET */
};
/* }}} */
@@ -2362,6 +2408,37 @@ MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOC
/* }}} */
+/* {{{ mysqlnd_protocol::get_sha256_pk_request_packet */
+static struct st_mysqlnd_packet_sha256_pk_request *
+MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC)
+{
+ struct st_mysqlnd_packet_sha256_pk_request * packet = mnd_pecalloc(1, packet_methods[PROT_SHA256_PK_REQUEST_PACKET].struct_size, persistent);
+ DBG_ENTER("mysqlnd_protocol::get_sha256_pk_request_packet");
+ if (packet) {
+ packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_PACKET];
+ packet->header.persistent = persistent;
+ }
+ DBG_RETURN(packet);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_protocol::get_sha256_pk_request_response_packet */
+static struct st_mysqlnd_packet_sha256_pk_request_response *
+MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC)
+{
+ struct st_mysqlnd_packet_sha256_pk_request_response * packet = mnd_pecalloc(1, packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET].struct_size, persistent);
+ DBG_ENTER("mysqlnd_protocol::get_sha256_pk_request_response_packet");
+ if (packet) {
+ packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET];
+ packet->header.persistent = persistent;
+ }
+ DBG_RETURN(packet);
+}
+/* }}} */
+
+
+
MYSQLND_CLASS_METHODS_START(mysqlnd_protocol)
MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet),
@@ -2375,7 +2452,9 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_protocol)
MYSQLND_METHOD(mysqlnd_protocol, get_row_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet),
- MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)
+ MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet),
+ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet),
+ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)
MYSQLND_CLASS_METHODS_END;
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h
index 96322d706..92c8e502d 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.h
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.h
@@ -286,6 +286,18 @@ typedef struct st_mysqlnd_packet_chg_user_resp {
} MYSQLND_PACKET_CHG_USER_RESPONSE;
+/* Command packet */
+typedef struct st_mysqlnd_packet_sha256_pk_request {
+ MYSQLND_PACKET_HEADER header;
+} MYSQLND_PACKET_SHA256_PK_REQUEST;
+
+typedef struct st_mysqlnd_packet_sha256_pk_request_response {
+ MYSQLND_PACKET_HEADER header;
+ zend_uchar *public_key;
+ size_t public_key_len;
+} MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE;
+
+
PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, size_t pass_len);
unsigned long php_mysqlnd_net_field_length(zend_uchar **packet);
@@ -295,15 +307,13 @@ PHPAPI const extern char * const mysqlnd_empty_string;
enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
- unsigned int field_count, MYSQLND_FIELD *fields_metadata,
- zend_bool as_unicode, zend_bool as_int_or_float,
- MYSQLND_STATS * stats TSRMLS_DC);
+ unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
+ zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC);
enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields,
- unsigned int field_count, MYSQLND_FIELD *fields_metadata,
- zend_bool as_unicode, zend_bool as_int_or_float,
- MYSQLND_STATS * stats TSRMLS_DC);
+ unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
+ zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC);
PHPAPI MYSQLND_PROTOCOL * mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC);
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c
index 20fcc5e7a..9bc6b8fb5 100644
--- a/ext/mysqlnd/php_mysqlnd.c
+++ b/ext/mysqlnd/php_mysqlnd.c
@@ -40,39 +40,8 @@ static zend_function_entry mysqlnd_functions[] = {
/* {{{ mysqlnd_minfo_print_hash */
-#if MYSQLND_UNICODE
-PHPAPI void mysqlnd_minfo_print_hash(zval *values)
-{
- zval **values_entry;
- HashPosition pos_values;
-
- zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values);
- while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values),
- (void **)&values_entry, &pos_values) == SUCCESS) {
- zstr string_key;
- uint string_key_len;
- ulong num_key;
- int s_len;
- char *s = NULL;
-
- TSRMLS_FETCH();
- zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, &string_key_len, &num_key, 0, &pos_values);
-
- convert_to_string(*values_entry);
-
- if (zend_unicode_to_string(ZEND_U_CONVERTER(UG(runtime_encoding_conv)),
- &s, &s_len, string_key.u, string_key_len TSRMLS_CC) == SUCCESS) {
- php_info_print_table_row(2, s, Z_STRVAL_PP(values_entry));
- }
- if (s) {
- mnd_efree(s);
- }
-
- zend_hash_move_forward_ex(Z_ARRVAL_P(values), &pos_values);
- }
-}
-#else
-PHPAPI void mysqlnd_minfo_print_hash(zval *values)
+PHPAPI void
+mysqlnd_minfo_print_hash(zval *values)
{
zval **values_entry;
HashPosition pos_values;
@@ -91,7 +60,6 @@ PHPAPI void mysqlnd_minfo_print_hash(zval *values)
zend_hash_move_forward_ex(Z_ARRVAL_P(values), &pos_values);
}
}
-#endif
/* }}} */
@@ -170,12 +138,18 @@ PHP_MINFO_FUNCTION(mysqlnd)
#else
"not supported");
#endif
- php_info_print_table_row(2, "SSL",
+ php_info_print_table_row(2, "core SSL",
#ifdef MYSQLND_SSL_SUPPORTED
"supported");
#else
"not supported");
#endif
+ php_info_print_table_row(2, "extended SSL",
+#ifdef MYSQLND_HAVE_SSL
+ "supported");
+#else
+ "not supported");
+#endif
snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_cmd_buffer_size));
php_info_print_table_row(2, "Command buffer size", buf);
snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_read_buffer_size));
@@ -221,6 +195,8 @@ static PHP_GINIT_FUNCTION(mysqlnd)
mysqlnd_globals->collect_memory_statistics = FALSE;
mysqlnd_globals->debug = NULL; /* The actual string */
mysqlnd_globals->dbg = NULL; /* The DBG object*/
+ mysqlnd_globals->trace_alloc_settings = NULL;
+ mysqlnd_globals->trace_alloc = NULL;
mysqlnd_globals->net_cmd_buffer_size = MYSQLND_NET_CMD_BUFFER_MIN_SIZE;
mysqlnd_globals->net_read_buffer_size = 32768;
mysqlnd_globals->net_read_timeout = 31536000;
@@ -232,6 +208,7 @@ static PHP_GINIT_FUNCTION(mysqlnd)
mysqlnd_globals->debug_malloc_fail_threshold = -1;
mysqlnd_globals->debug_calloc_fail_threshold = -1;
mysqlnd_globals->debug_realloc_fail_threshold = -1;
+ mysqlnd_globals->sha256_server_public_key = NULL;
}
/* }}} */
@@ -253,11 +230,13 @@ PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("mysqlnd.collect_statistics", "1", PHP_INI_ALL, OnUpdateBool, collect_statistics, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_BOOLEAN("mysqlnd.collect_memory_statistics", "0", PHP_INI_SYSTEM, OnUpdateBool, collect_memory_statistics, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_ENTRY("mysqlnd.debug", NULL, PHP_INI_SYSTEM, OnUpdateString, debug, zend_mysqlnd_globals, mysqlnd_globals)
+ STD_PHP_INI_ENTRY("mysqlnd.trace_alloc", NULL, PHP_INI_SYSTEM, OnUpdateString, trace_alloc_settings, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_ENTRY("mysqlnd.net_cmd_buffer_size", MYSQLND_NET_CMD_BUFFER_MIN_SIZE_STR, PHP_INI_ALL, OnUpdateNetCmdBufferSize, net_cmd_buffer_size, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_ENTRY("mysqlnd.net_read_buffer_size", "32768",PHP_INI_ALL, OnUpdateLong, net_read_buffer_size, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_ENTRY("mysqlnd.net_read_timeout", "31536000", PHP_INI_SYSTEM, OnUpdateLong, net_read_timeout, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_ENTRY("mysqlnd.log_mask", "0", PHP_INI_ALL, OnUpdateLong, log_mask, zend_mysqlnd_globals, mysqlnd_globals)
STD_PHP_INI_ENTRY("mysqlnd.mempool_default_size","16000", PHP_INI_ALL, OnUpdateLong, mempool_default_size, zend_mysqlnd_globals, mysqlnd_globals)
+ STD_PHP_INI_ENTRY("mysqlnd.sha256_server_public_key",NULL, PHP_INI_PERDIR, OnUpdateString, sha256_server_public_key, zend_mysqlnd_globals, mysqlnd_globals)
#if PHP_DEBUG
STD_PHP_INI_ENTRY("mysqlnd.debug_emalloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_emalloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals)
@@ -306,11 +285,14 @@ static PHP_RINIT_FUNCTION(mysqlnd)
MYSQLND_G(dbg) = NULL;
if (trace_log_plugin) {
MYSQLND_DEBUG * dbg = trace_log_plugin->methods.trace_instance_init(mysqlnd_debug_std_no_trace_funcs TSRMLS_CC);
- if (!dbg) {
+ MYSQLND_DEBUG * trace_alloc = trace_log_plugin->methods.trace_instance_init(NULL TSRMLS_CC);
+ if (!dbg || !trace_alloc) {
return FAILURE;
}
dbg->m->set_mode(dbg, MYSQLND_G(debug));
+ trace_alloc->m->set_mode(trace_alloc, MYSQLND_G(trace_alloc_settings));
MYSQLND_G(dbg) = dbg;
+ MYSQLND_G(trace_alloc) = trace_alloc;
}
}
return SUCCESS;
@@ -324,13 +306,19 @@ static PHP_RINIT_FUNCTION(mysqlnd)
*/
static PHP_RSHUTDOWN_FUNCTION(mysqlnd)
{
- MYSQLND_DEBUG *dbg = MYSQLND_G(dbg);
+ MYSQLND_DEBUG * dbg = MYSQLND_G(dbg);
+ MYSQLND_DEBUG * trace_alloc = MYSQLND_G(trace_alloc);
DBG_ENTER("RSHUTDOWN");
if (dbg) {
dbg->m->close(dbg);
dbg->m->free_handle(dbg);
MYSQLND_G(dbg) = NULL;
}
+ if (trace_alloc) {
+ trace_alloc->m->close(trace_alloc);
+ trace_alloc->m->free_handle(trace_alloc);
+ MYSQLND_G(trace_alloc) = NULL;
+ }
return SUCCESS;
}
/* }}} */
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index 976eb9e84..34ae76c44 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -8,6 +8,13 @@ else
PHP_OCI8_SED="$SED";
fi
+PHP_OCI8_TAIL1=`echo a | tail -n1 2>/dev/null`
+if test "$PHP_OCI8_TAIL1" = "a"; then
+ PHP_OCI8_TAIL1="tail -n1"
+else
+ PHP_OCI8_TAIL1="tail -1"
+fi
+
AC_DEFUN([PHP_OCI_IF_DEFINED],[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=$3
@@ -49,8 +56,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[
AC_DEFUN([AC_OCI8IC_VERSION],[
AC_MSG_CHECKING([Oracle Instant Client library version compatibility])
OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
- OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail -n1`
+ OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc
+ OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | $PHP_OCI8_TAIL1`
if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then
if test ! -f "$OCI8_LCS_BASE"; then
AC_MSG_ERROR([Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found])
@@ -65,7 +72,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[
AC_DEFUN([AC_OCI8_ORACLE_VERSION],[
AC_MSG_CHECKING([Oracle library version compatibility])
OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
- OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
+ OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3
@@ -278,7 +285,7 @@ if test "$PHP_OCI8" != "no"; then
dnl user must pass in the library directory. But on Linux we default
dnl to the most recent version in /usr/lib which is where the Oracle
dnl Instant Client RPM gets installed.
- PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -n1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | $PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR])
fi
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index bf2eaf558..e2241cffb 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -3197,7 +3197,7 @@ static int php_oci_create_session(php_oci_connection *connection, php_oci_spool
PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIAttrGet, ((dvoid *)actual_spool->poolh, OCI_HTYPE_SPOOL, (dvoid *)&numopen, (ub4 *)0, OCI_ATTR_SPOOL_OPEN_COUNT, OCI_G(err)));
PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIAttrGet, ((dvoid *)actual_spool->poolh, OCI_HTYPE_SPOOL, (dvoid *)&numbusy, (ub4 *)0, OCI_ATTR_SPOOL_BUSY_COUNT, OCI_G(err)));
numfree = numopen - numbusy; /* number of free connections in the pool */
- php_printf ("OCI8 DEBUG L1: (numopen=%d)(numbusy=%d) at (%s:%d) \n", numopen, numbusy, __FILE__, __LINE__);
+ php_printf ("OCI8 DEBUG L1: (numopen=%d)(numbusy=%d)(numfree=%d) at (%s:%d) \n", numopen, numbusy, numfree, __FILE__, __LINE__);
} /* }}} */
/* Ping loop: Ping and loop till we get a good connection. When a database instance goes
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index eac3f0655..00566b1b6 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -33,12 +33,12 @@ http://pear.php.net/dtd/package-2.0.xsd">
<active>no</active>
</lead>
- <date>2011-11-18</date>
+ <date>2012-10-21</date>
<time>12:00:00</time>
<version>
- <release>1.4.8</release>
- <api>1.4.8</api>
+ <release>1.4.9</release>
+ <api>1.4.9</api>
</version>
<stability>
<release>stable</release>
@@ -46,7 +46,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Fixed bug #60901 (Improve "tail" syntax for AIX installation)
+ Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
</notes>
<contents>
<dir name="/">
@@ -412,6 +412,23 @@ http://pear.php.net/dtd/package-2.0.xsd">
<release>
<version>
+ <release>1.4.8</release>
+ <api>1.4.8</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+ Fixed bug #63307 (Unused variable in oci8.c)
+ Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro)
+ Fixed bug #60901 (Improve "tail" syntax for AIX installation)
+ </notes>
+</release>
+
+<release>
+ <version>
<release>1.4.7</release>
<api>1.4.7</api>
</version>
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index 6363aea13..4ee8e8e97 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -46,7 +46,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "1.4.7"
+#define PHP_OCI8_VERSION "1.4.9"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index 724e8bae5..b0d65164c 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -289,6 +289,7 @@ typedef struct { /* php_oci_out_column {{{ */
zend_bailout(); \
break; \
case 22: \
+ case 28: \
case 378: \
case 602: \
case 603: \
diff --git a/ext/openssl/CREDITS b/ext/openssl/CREDITS
index c2f50d630..b685ce13e 100644
--- a/ext/openssl/CREDITS
+++ b/ext/openssl/CREDITS
@@ -1,2 +1,2 @@
OpenSSL
-Stig Venaas, Wez Furlong, Sascha Kettler
+Stig Venaas, Wez Furlong, Sascha Kettler, Scott MacVicar
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 2b8cfd571..99735b154 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -16,7 +16,7 @@
| Wez Furlong <wez@thebrainroom.com> |
| Sascha Kettler <kettler@gmx.net> |
| Pierre-Alain Joye <pierre@php.net> |
- | Marc Delling <delling@silpion.de> (PKCS12 functions) |
+ | Marc Delling <delling@silpion.de> (PKCS12 functions) |
+----------------------------------------------------------------------+
*/
@@ -36,10 +36,6 @@
#include "ext/standard/md5.h"
#include "ext/standard/base64.h"
-#if PHP_WIN32
-# include "win32/winutil.h"
-#endif
-
/* OpenSSL includes */
#include <openssl/evp.h>
#include <openssl/x509.h>
@@ -248,6 +244,16 @@ ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkey_get_details, 0)
ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pbkdf2, 0, 0, 4)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, salt)
+ ZEND_ARG_INFO(0, key_length)
+ ZEND_ARG_INFO(0, iterations)
+ ZEND_ARG_INFO(0, digest_algorithm)
+ZEND_END_ARG_INFO()
+#endif
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_verify, 0, 0, 2)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, flags)
@@ -434,6 +440,10 @@ const zend_function_entry openssl_functions[] = {
PHP_FE(openssl_seal, arginfo_openssl_seal)
PHP_FE(openssl_open, arginfo_openssl_open)
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ PHP_FE(openssl_pbkdf2, arginfo_openssl_pbkdf2)
+#endif
+
/* for S/MIME handling */
PHP_FE(openssl_pkcs7_verify, arginfo_openssl_pkcs7_verify)
PHP_FE(openssl_pkcs7_decrypt, arginfo_openssl_pkcs7_decrypt)
@@ -516,7 +526,7 @@ inline static int php_openssl_open_base_dir_chk(char *filename TSRMLS_DC)
if (php_check_open_basedir(filename TSRMLS_CC)) {
return -1;
}
-
+
return 0;
}
/* }}} */
@@ -575,7 +585,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
} else {
subitem = val;
}
-
+
for (i = 0; i < X509_NAME_entry_count(name); i++) {
unsigned char *to_add;
int to_add_len;
@@ -618,7 +628,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
last = j;
}
i = last;
-
+
if (obj_cnt > 1) {
add_assoc_zval_ex(subitem, sname, strlen(sname) + 1, subentries);
} else {
@@ -718,7 +728,7 @@ static inline int php_openssl_config_check_syntax(const char * section_label, co
#endif
{
X509V3_CTX ctx;
-
+
X509V3_set_ctx_test(&ctx);
X509V3_set_conf_lhash(&ctx, config);
if (!X509V3_EXT_add_conf(config, &ctx, (char *)section, NULL)) {
@@ -846,7 +856,7 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
}
-
+
/* digest alg */
if (req->digest_name == NULL) {
req->digest_name = CONF_get_string(req->req_config, req->section_name, "default_md");
@@ -868,7 +878,7 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
}
PHP_SSL_CONFIG_SYNTAX_CHECK(request_extensions_section);
-
+
return SUCCESS;
}
/* }}} */
@@ -1048,10 +1058,10 @@ PHP_MINIT_FUNCTION(openssl)
/* register a resource id number with OpenSSL so that we can map SSL -> stream structures in
* OpenSSL callbacks */
ssl_stream_data_index = SSL_get_ex_new_index(0, "PHP stream index", NULL, NULL, NULL);
-
+
REGISTER_STRING_CONSTANT("OPENSSL_VERSION_TEXT", OPENSSL_VERSION_TEXT, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("OPENSSL_VERSION_NUMBER", OPENSSL_VERSION_NUMBER, CONST_CS|CONST_PERSISTENT);
-
+
/* purposes for cert purpose checking */
REGISTER_LONG_CONSTANT("X509_PURPOSE_SSL_CLIENT", X509_PURPOSE_SSL_CLIENT, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("X509_PURPOSE_SSL_SERVER", X509_PURPOSE_SSL_SERVER, CONST_CS|CONST_PERSISTENT);
@@ -1110,7 +1120,7 @@ PHP_MINIT_FUNCTION(openssl)
REGISTER_LONG_CONSTANT("OPENSSL_CIPHER_AES_192_CBC", PHP_OPENSSL_CIPHER_AES_192_CBC, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("OPENSSL_CIPHER_AES_256_CBC", PHP_OPENSSL_CIPHER_AES_256_CBC, CONST_CS|CONST_PERSISTENT);
#endif
-
+
/* Values for key types */
REGISTER_LONG_CONSTANT("OPENSSL_KEYTYPE_RSA", OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT);
#ifndef NO_DSA
@@ -1156,7 +1166,7 @@ PHP_MINIT_FUNCTION(openssl)
php_register_url_stream_wrapper("https", &php_stream_http_wrapper TSRMLS_CC);
php_register_url_stream_wrapper("ftps", &php_stream_ftp_wrapper TSRMLS_CC);
-
+
return SUCCESS;
}
/* }}} */
@@ -1376,14 +1386,14 @@ PHP_FUNCTION(openssl_x509_check_private_key)
long certresource = -1, keyresource = -1;
RETVAL_FALSE;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ", &zcert, &zkey) == FAILURE) {
return;
}
cert = php_openssl_x509_from_zval(zcert, 0, &certresource TSRMLS_CC);
if (cert == NULL) {
RETURN_FALSE;
- }
+ }
key = php_openssl_evp_from_zval(zkey, 0, "", 1, &keyresource TSRMLS_CC);
if (key) {
RETVAL_BOOL(X509_check_private_key(cert, key));
@@ -1436,11 +1446,11 @@ PHP_FUNCTION(openssl_x509_parse)
snprintf(buf, sizeof(buf), "%08lx", X509_subject_name_hash(cert));
add_assoc_string(return_value, "hash", buf, 1);
}
-
+
add_assoc_name_entry(return_value, "issuer", X509_get_issuer_name(cert), useshortnames TSRMLS_CC);
add_assoc_long(return_value, "version", X509_get_version(cert));
- add_assoc_string(return_value, "serialNumber", i2s_ASN1_INTEGER(NULL, X509_get_serialNumber(cert)), 1);
+ add_assoc_string(return_value, "serialNumber", i2s_ASN1_INTEGER(NULL, X509_get_serialNumber(cert)), 1);
add_assoc_asn1_string(return_value, "validFrom", X509_get_notBefore(cert));
add_assoc_asn1_string(return_value, "validTo", X509_get_notAfter(cert));
@@ -1642,8 +1652,8 @@ clean_exit:
if (certresource == 1 && cert) {
X509_free(cert);
}
- if (cainfo) {
- X509_STORE_free(cainfo);
+ if (cainfo) {
+ X509_STORE_free(cainfo);
}
if (untrustedchain) {
sk_X509_pop_free(untrustedchain, X509_free);
@@ -1696,7 +1706,7 @@ static X509_STORE * setup_verify(zval * calist TSRMLS_DC)
dir_lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir());
if (dir_lookup == NULL || !X509_LOOKUP_add_dir(dir_lookup, Z_STRVAL_PP(item), X509_FILETYPE_PEM)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "error loading directory %s", Z_STRVAL_PP(item));
- } else {
+ } else {
ndirs++;
}
dir_lookup = NULL;
@@ -1790,11 +1800,11 @@ static STACK_OF(X509) * php_array_to_X509_sk(zval ** zcerts TSRMLS_DC) /* {{{ */
if (certresource != -1) {
cert = X509_dup(cert);
-
+
if (cert == NULL) {
goto clean_exit;
}
-
+
}
sk_X509_push(sk, cert);
@@ -1803,7 +1813,7 @@ static STACK_OF(X509) * php_array_to_X509_sk(zval ** zcerts TSRMLS_DC) /* {{{ */
} else {
/* a single certificate */
cert = php_openssl_x509_from_zval(zcerts, 0, &certresource TSRMLS_CC);
-
+
if (cert == NULL) {
goto clean_exit;
}
@@ -1844,7 +1854,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
return;
RETVAL_FALSE;
-
+
cert = php_openssl_x509_from_zval(zcert, 0, &certresource TSRMLS_CC);
if (cert == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot get cert from parameter 1");
@@ -1880,9 +1890,9 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
p12 = PKCS12_create(pass, friendly_name, priv_key, cert, ca, 0, 0, 0, 0, 0);
- bio_out = BIO_new_file(filename, "w");
+ bio_out = BIO_new_file(filename, "w");
if (bio_out) {
-
+
i2d_PKCS12_bio(bio_out, p12);
RETVAL_TRUE;
@@ -1893,13 +1903,13 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
BIO_free(bio_out);
PKCS12_free(p12);
php_sk_X509_free(ca);
-
+
cleanup:
if (keyresource == -1 && priv_key) {
EVP_PKEY_free(priv_key);
}
- if (certresource == -1 && cert) {
+ if (certresource == -1 && cert) {
X509_free(cert);
}
}
@@ -1925,7 +1935,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
return;
RETVAL_FALSE;
-
+
cert = php_openssl_x509_from_zval(&zcert, 0, &certresource TSRMLS_CC);
if (cert == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot get cert from parameter 1");
@@ -1948,7 +1958,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
if (args && zend_hash_find(Z_ARRVAL_P(args), "extracerts", sizeof("extracerts"), (void**)&item) == SUCCESS)
ca = php_array_to_X509_sk(item TSRMLS_CC);
/* end parse extra config */
-
+
p12 = PKCS12_create(pass, friendly_name, priv_key, cert, ca, 0, 0, 0, 0, 0);
bio_out = BIO_new(BIO_s_mem());
@@ -1965,13 +1975,13 @@ PHP_FUNCTION(openssl_pkcs12_export)
BIO_free(bio_out);
PKCS12_free(p12);
php_sk_X509_free(ca);
-
+
cleanup:
if (keyresource == -1 && priv_key) {
EVP_PKEY_free(priv_key);
}
- if (certresource == -1 && cert) {
+ if (certresource == -1 && cert) {
X509_free(cert);
}
}
@@ -1995,12 +2005,12 @@ PHP_FUNCTION(openssl_pkcs12_read)
return;
RETVAL_FALSE;
-
+
bio_in = BIO_new(BIO_s_mem());
-
+
if(!BIO_write(bio_in, zp12, zp12_len))
goto cleanup;
-
+
if(d2i_PKCS12_bio(bio_in, &p12)) {
if(PKCS12_parse(p12, pass, &pkey, &cert, &ca)) {
BIO * bio_out;
@@ -2030,12 +2040,12 @@ PHP_FUNCTION(openssl_pkcs12_read)
MAKE_STD_ZVAL(zextracerts);
array_init(zextracerts);
-
+
for (i=0;;i++) {
zval * zextracert;
X509* aCA = sk_X509_pop(ca);
if (!aCA) break;
-
+
bio_out = BIO_new(BIO_s_mem());
if (PEM_write_bio_X509(bio_out, aCA)) {
BUF_MEM *bio_buf;
@@ -2043,7 +2053,7 @@ PHP_FUNCTION(openssl_pkcs12_read)
MAKE_STD_ZVAL(zextracert);
ZVAL_STRINGL(zextracert, bio_buf->data, bio_buf->length, 1);
add_index_zval(zextracerts, i, zextracert);
-
+
}
BIO_free(bio_out);
@@ -2055,13 +2065,13 @@ PHP_FUNCTION(openssl_pkcs12_read)
} else {
zval_dtor(zextracerts);
}
-
+
RETVAL_TRUE;
-
+
PKCS12_free(p12);
}
}
-
+
cleanup:
if (bio_in) {
BIO_free(bio_in);
@@ -2069,7 +2079,7 @@ PHP_FUNCTION(openssl_pkcs12_read)
if (pkey) {
EVP_PKEY_free(pkey);
}
- if (cert) {
+ if (cert) {
X509_free(cert);
}
}
@@ -2088,7 +2098,7 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
return FAILURE;
}
dn_sk = CONF_get_section(req->req_config, dn_sect);
- if (dn_sk == NULL) {
+ if (dn_sk == NULL) {
return FAILURE;
}
attr_sect = CONF_get_string(req->req_config, req->section_name, "attributes");
@@ -2108,15 +2118,15 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
X509_NAME * subj;
HashPosition hpos;
zval ** item;
-
+
subj = X509_REQ_get_subject_name(csr);
/* apply values from the dn hash */
zend_hash_internal_pointer_reset_ex(HASH_OF(dn), &hpos);
while(zend_hash_get_current_data_ex(HASH_OF(dn), (void**)&item, &hpos) == SUCCESS) {
- char * strindex = NULL;
+ char * strindex = NULL;
uint strindexlen = 0;
ulong intindex;
-
+
zend_hash_get_current_key_ex(HASH_OF(dn), &strindex, &strindexlen, &intindex, 0, &hpos);
convert_to_string_ex(item);
@@ -2126,7 +2136,7 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
nid = OBJ_txt2nid(strindex);
if (nid != NID_undef) {
- if (!X509_NAME_add_entry_by_NID(subj, nid, MBSTRING_UTF8,
+ if (!X509_NAME_add_entry_by_NID(subj, nid, MBSTRING_UTF8,
(unsigned char*)Z_STRVAL_PP(item), -1, -1, 0))
{
php_error_docref(NULL TSRMLS_CC, E_WARNING,
@@ -2147,10 +2157,10 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
for(i = 0; i < sk_CONF_VALUE_num(dn_sk); i++) {
int len;
char buffer[200 + 1]; /*200 + \0 !*/
-
+
v = sk_CONF_VALUE_value(dn_sk, i);
type = v->name;
-
+
len = strlen(type);
if (len < sizeof("_default")) {
continue;
@@ -2165,7 +2175,7 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
memcpy(buffer, type, len);
buffer[len] = '\0';
type = buffer;
-
+
/* Skip past any leading X. X: X, etc to allow for multiple
* instances */
for (str = type; *str; str++) {
@@ -2246,7 +2256,7 @@ static X509_REQ * php_openssl_csr_from_zval(zval ** val, int makeresource, long
X509_REQ * csr = NULL;
char * filename = NULL;
BIO * in;
-
+
if (resourceval) {
*resourceval = -1;
}
@@ -2387,13 +2397,13 @@ PHP_FUNCTION(openssl_csr_sign)
long csr_resource, certresource = 0, keyresource = -1;
int i;
struct php_x509_request req;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ!Zl|a!l", &zcsr, &zcert, &zpkey, &num_days, &args, &serial) == FAILURE)
return;
RETVAL_FALSE;
PHP_SSL_REQ_INIT(&req);
-
+
csr = php_openssl_csr_from_zval(zcsr, 0, &csr_resource TSRMLS_CC);
if (csr == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot get CSR from parameter 1");
@@ -2415,7 +2425,7 @@ PHP_FUNCTION(openssl_csr_sign)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "private key does not correspond to signing cert");
goto cleanup;
}
-
+
if (PHP_SSL_REQ_PARSE(&req, args) == FAILURE) {
goto cleanup;
}
@@ -2435,9 +2445,9 @@ PHP_FUNCTION(openssl_csr_sign)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Signature did not match the certificate request");
goto cleanup;
}
-
+
/* Now we can get on with it */
-
+
new_cert = X509_new();
if (new_cert == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No memory");
@@ -2448,7 +2458,7 @@ PHP_FUNCTION(openssl_csr_sign)
goto cleanup;
ASN1_INTEGER_set(X509_get_serialNumber(new_cert), serial);
-
+
X509_set_subject_name(new_cert, X509_REQ_get_subject_name(csr));
if (cert == NULL) {
@@ -2465,7 +2475,7 @@ PHP_FUNCTION(openssl_csr_sign)
}
if (req.extensions_section) {
X509V3_CTX ctx;
-
+
X509V3_set_ctx(&ctx, cert, new_cert, csr, NULL, 0);
X509V3_set_conf_lhash(&ctx, req.req_config);
if (!X509V3_EXT_add_conf(req.req_config, &ctx, req.extensions_section, new_cert)) {
@@ -2478,11 +2488,11 @@ PHP_FUNCTION(openssl_csr_sign)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to sign it");
goto cleanup;
}
-
+
/* Succeeded; lets return the cert */
RETVAL_RESOURCE(zend_list_insert(new_cert, le_x509 TSRMLS_CC));
new_cert = NULL;
-
+
cleanup:
if (cert == new_cert) {
@@ -2499,7 +2509,7 @@ cleanup:
if (csr_resource == -1 && csr) {
X509_REQ_free(csr);
}
- if (certresource == -1 && cert) {
+ if (certresource == -1 && cert) {
X509_free(cert);
}
if (new_cert) {
@@ -2518,12 +2528,12 @@ PHP_FUNCTION(openssl_csr_new)
X509_REQ * csr = NULL;
int we_made_the_key = 1;
long key_resource;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "az|a!a!", &dn, &out_pkey, &args, &attribs) == FAILURE) {
return;
}
RETVAL_FALSE;
-
+
PHP_SSL_REQ_INIT(&req);
if (PHP_SSL_REQ_PARSE(&req, args) == SUCCESS) {
@@ -2555,10 +2565,10 @@ PHP_FUNCTION(openssl_csr_new)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error loading extension section %s", req.request_extensions_section);
} else {
RETVAL_TRUE;
-
+
if (X509_REQ_sign(csr, req.priv_key, req.digest)) {
RETVAL_RESOURCE(zend_list_insert(csr, le_csr TSRMLS_CC));
- csr = NULL;
+ csr = NULL;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error signing request");
}
@@ -2683,14 +2693,14 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char *
}
if (Z_TYPE_PP(val) == IS_ARRAY) {
zval ** zphrase;
-
+
/* get passphrase */
if (zend_hash_index_find(HASH_OF(*val), 1, (void **)&zphrase) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "key array must be of the form array(0 => key, 1 => phrase)");
return NULL;
}
-
+
if (Z_TYPE_PP(zphrase) == IS_STRING) {
passphrase = Z_STRVAL_PP(zphrase);
} else {
@@ -2715,7 +2725,7 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char *
if (!what) {
TMP_CLEAN;
}
- if (resourceval) {
+ if (resourceval) {
*resourceval = Z_LVAL_PP(val);
}
if (type == le_x509) {
@@ -2749,8 +2759,8 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char *
}
} else {
/* force it to be a string and check if it refers to a file */
- /* passing non string values leaks, object uses toString, it returns NULL
- * See bug38255.phpt
+ /* passing non string values leaks, object uses toString, it returns NULL
+ * See bug38255.phpt
*/
if (!(Z_TYPE_PP(val) == IS_STRING || Z_TYPE_PP(val) == IS_OBJECT)) {
TMP_CLEAN;
@@ -2824,7 +2834,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
char * randfile = NULL;
int egdsocket, seeded;
EVP_PKEY * return_val = NULL;
-
+
if (req->priv_key_bits < MIN_KEY_LENGTH) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "private key length is too short; it needs to be at least %d bits, not %d",
MIN_KEY_LENGTH, req->priv_key_bits);
@@ -2833,7 +2843,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
randfile = CONF_get_string(req->req_config, req->section_name, "RANDFILE");
php_openssl_load_rand_file(randfile, &egdsocket, &seeded TSRMLS_CC);
-
+
if ((req->priv_key = EVP_PKEY_new()) != NULL) {
switch(req->priv_key_type) {
case OPENSSL_KEYTYPE_RSA:
@@ -2883,13 +2893,13 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
}
php_openssl_write_rand_file(randfile, egdsocket, seeded);
-
+
if (return_val == NULL) {
EVP_PKEY_free(req->priv_key);
req->priv_key = NULL;
return NULL;
}
-
+
return return_val;
}
/* }}} */
@@ -2918,7 +2928,7 @@ static int php_openssl_is_private_key(EVP_PKEY* pkey TSRMLS_DC)
case EVP_PKEY_DSA4:
assert(pkey->pkey.dsa != NULL);
- if (NULL == pkey->pkey.dsa->p || NULL == pkey->pkey.dsa->q || NULL == pkey->pkey.dsa->priv_key){
+ if (NULL == pkey->pkey.dsa->p || NULL == pkey->pkey.dsa->q || NULL == pkey->pkey.dsa->priv_key){
return 0;
}
break;
@@ -3049,7 +3059,7 @@ PHP_FUNCTION(openssl_pkey_new)
}
RETURN_FALSE;
}
- }
+ }
PHP_SSL_REQ_INIT(&req);
@@ -3078,7 +3088,7 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
EVP_PKEY * key;
BIO * bio_out = NULL;
const EVP_CIPHER * cipher;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zp|s!a!", &zpkey, &filename, &filename_len, &passphrase, &passphrase_len, &args) == FAILURE) {
return;
}
@@ -3090,11 +3100,11 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot get key from parameter 1");
RETURN_FALSE;
}
-
+
if (php_openssl_open_base_dir_chk(filename TSRMLS_CC)) {
RETURN_FALSE;
}
-
+
PHP_SSL_REQ_INIT(&req);
if (PHP_SSL_REQ_PARSE(&req, args) == SUCCESS) {
@@ -3137,7 +3147,7 @@ PHP_FUNCTION(openssl_pkey_export)
EVP_PKEY * key;
BIO * bio_out = NULL;
const EVP_CIPHER * cipher;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zz|s!a!", &zpkey, &out, &passphrase, &passphrase_len, &args) == FAILURE) {
return;
}
@@ -3149,7 +3159,7 @@ PHP_FUNCTION(openssl_pkey_export)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot get key from parameter 1");
RETURN_FALSE;
}
-
+
PHP_SSL_REQ_INIT(&req);
if (PHP_SSL_REQ_PARSE(&req, args) == SUCCESS) {
@@ -3269,7 +3279,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
array_init(return_value);
add_assoc_long(return_value, "bits", EVP_PKEY_bits(pkey));
add_assoc_stringl(return_value, "key", pbio, pbio_len, 1);
- /*TODO: Use the real values once the openssl constants are used
+ /*TODO: Use the real values once the openssl constants are used
* See the enum at the top of this file
*/
switch (EVP_PKEY_type(pkey->type)) {
@@ -3293,7 +3303,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
add_assoc_zval(return_value, "rsa", rsa);
}
- break;
+ break;
case EVP_PKEY_DSA:
case EVP_PKEY_DSA2:
case EVP_PKEY_DSA3:
@@ -3314,7 +3324,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
}
break;
case EVP_PKEY_DH:
-
+
ktype = OPENSSL_KEYTYPE_DH;
if (pkey->pkey.dh != NULL) {
@@ -3330,7 +3340,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
}
break;
-#ifdef EVP_PKEY_EC
+#ifdef EVP_PKEY_EC
case EVP_PKEY_EC:
ktype = OPENSSL_KEYTYPE_EC;
break;
@@ -3347,6 +3357,57 @@ PHP_FUNCTION(openssl_pkey_get_details)
/* }}} */
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+
+/* {{{ proto string openssl_pbkdf2(string password, string salt, long key_length, long iterations [, string digest_method = "sha1"])
+ Generates a PKCS5 v2 PBKDF2 string, defaults to sha1 */
+PHP_FUNCTION(openssl_pbkdf2)
+{
+ long key_length = 0, iterations = 0;
+ char *password; int password_len;
+ char *salt; int salt_len;
+ char *method; int method_len = 0;
+ unsigned char *out_buffer;
+
+ const EVP_MD *digest;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssll|s",
+ &password, &password_len,
+ &salt, &salt_len,
+ &key_length, &iterations,
+ &method, &method_len) == FAILURE) {
+ return;
+ }
+
+ if (key_length <= 0) {
+ RETURN_FALSE;
+ }
+
+ if (method_len) {
+ digest = EVP_get_digestbyname(method);
+ } else {
+ digest = EVP_sha1();
+ }
+
+ if (!digest) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown signature algorithm");
+ RETURN_FALSE;
+ }
+
+ out_buffer = emalloc(key_length + 1);
+ out_buffer[key_length] = '\0';
+
+ if (PKCS5_PBKDF2_HMAC(password, password_len, (unsigned char *)salt, salt_len, iterations, digest, key_length, out_buffer) == 1) {
+ RETVAL_STRINGL((char *)out_buffer, key_length, 0);
+ } else {
+ efree(out_buffer);
+ RETURN_FALSE;
+ }
+}
+/* }}} */
+
+#endif
+
/* {{{ PKCS7 S/MIME functions */
/* {{{ proto bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])
@@ -3364,7 +3425,7 @@ PHP_FUNCTION(openssl_pkcs7_verify)
char * extracerts = NULL; int extracerts_len = 0;
char * signersfilename = NULL; int signersfilename_len = 0;
char * datafilename = NULL; int datafilename_len = 0;
-
+
RETVAL_LONG(-1);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pl|papp", &filename, &filename_len,
@@ -3372,7 +3433,7 @@ PHP_FUNCTION(openssl_pkcs7_verify)
&extracerts, &extracerts_len, &datafilename, &datafilename_len) == FAILURE) {
return;
}
-
+
if (extracerts) {
others = load_all_certs_from_file(extracerts);
if (others == NULL) {
@@ -3424,11 +3485,11 @@ PHP_FUNCTION(openssl_pkcs7_verify)
if (signersfilename) {
BIO *certout;
-
+
if (php_openssl_open_base_dir_chk(signersfilename TSRMLS_CC)) {
goto clean_exit;
}
-
+
certout = BIO_new_file(signersfilename, "w");
if (certout) {
int i;
@@ -3477,14 +3538,14 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
char * strindex;
char * infilename = NULL; int infilename_len;
char * outfilename = NULL; int outfilename_len;
-
+
RETVAL_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ppZa!|ll", &infilename, &infilename_len,
&outfilename, &outfilename_len, &zrecipcerts, &zheaders, &flags, &cipherid) == FAILURE)
return;
-
+
if (php_openssl_open_base_dir_chk(infilename TSRMLS_CC) || php_openssl_open_base_dir_chk(outfilename TSRMLS_CC)) {
return;
}
@@ -3495,7 +3556,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
}
outfile = BIO_new_file(outfilename, "w");
- if (outfile == NULL) {
+ if (outfile == NULL) {
goto clean_exit;
}
@@ -3622,12 +3683,12 @@ PHP_FUNCTION(openssl_pkcs7_sign)
&extracertsfilename_len) == FAILURE) {
return;
}
-
+
RETVAL_FALSE;
if (extracertsfilename) {
others = load_all_certs_from_file(extracertsfilename);
- if (others == NULL) {
+ if (others == NULL) {
goto clean_exit;
}
}
@@ -3738,7 +3799,7 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to get private key");
goto clean_exit;
}
-
+
if (php_openssl_open_base_dir_chk(infilename TSRMLS_CC) || php_openssl_open_base_dir_chk(outfilename TSRMLS_CC)) {
goto clean_exit;
}
@@ -3757,7 +3818,7 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
if (p7 == NULL) {
goto clean_exit;
}
- if (PKCS7_decrypt(p7, key, cert, out, PKCS7_DETACHED)) {
+ if (PKCS7_decrypt(p7, key, cert, out, PKCS7_DETACHED)) {
RETVAL_TRUE;
}
clean_exit:
@@ -3790,7 +3851,7 @@ PHP_FUNCTION(openssl_private_encrypt)
int data_len;
long padding = RSA_PKCS1_PADDING;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szZ|l", &data, &data_len, &crypted, &key, &padding) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szZ|l", &data, &data_len, &crypted, &key, &padding) == FAILURE) {
return;
}
RETVAL_FALSE;
@@ -3808,10 +3869,10 @@ PHP_FUNCTION(openssl_private_encrypt)
switch (pkey->type) {
case EVP_PKEY_RSA:
case EVP_PKEY_RSA2:
- successful = (RSA_private_encrypt(data_len,
- (unsigned char *)data,
- cryptedbuf,
- pkey->pkey.rsa,
+ successful = (RSA_private_encrypt(data_len,
+ (unsigned char *)data,
+ cryptedbuf,
+ pkey->pkey.rsa,
padding) == cryptedlen);
break;
default:
@@ -3828,7 +3889,7 @@ PHP_FUNCTION(openssl_private_encrypt)
if (cryptedbuf) {
efree(cryptedbuf);
}
- if (keyresource == -1) {
+ if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
}
@@ -3866,10 +3927,10 @@ PHP_FUNCTION(openssl_private_decrypt)
switch (pkey->type) {
case EVP_PKEY_RSA:
case EVP_PKEY_RSA2:
- cryptedlen = RSA_private_decrypt(data_len,
- (unsigned char *)data,
- crypttemp,
- pkey->pkey.rsa,
+ cryptedlen = RSA_private_decrypt(data_len,
+ (unsigned char *)data,
+ crypttemp,
+ pkey->pkey.rsa,
padding);
if (cryptedlen != -1) {
cryptedbuf = emalloc(cryptedlen + 1);
@@ -3894,7 +3955,7 @@ PHP_FUNCTION(openssl_private_decrypt)
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
- if (cryptedbuf) {
+ if (cryptedbuf) {
efree(cryptedbuf);
}
}
@@ -3918,7 +3979,7 @@ PHP_FUNCTION(openssl_public_encrypt)
return;
RETVAL_FALSE;
-
+
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, &keyresource TSRMLS_CC);
if (pkey == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "key parameter is not a valid public key");
@@ -3931,10 +3992,10 @@ PHP_FUNCTION(openssl_public_encrypt)
switch (pkey->type) {
case EVP_PKEY_RSA:
case EVP_PKEY_RSA2:
- successful = (RSA_public_encrypt(data_len,
- (unsigned char *)data,
- cryptedbuf,
- pkey->pkey.rsa,
+ successful = (RSA_public_encrypt(data_len,
+ (unsigned char *)data,
+ cryptedbuf,
+ pkey->pkey.rsa,
padding) == cryptedlen);
break;
default:
@@ -3977,7 +4038,7 @@ PHP_FUNCTION(openssl_public_decrypt)
return;
}
RETVAL_FALSE;
-
+
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, &keyresource TSRMLS_CC);
if (pkey == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "key parameter is not a valid public key");
@@ -3990,10 +4051,10 @@ PHP_FUNCTION(openssl_public_decrypt)
switch (pkey->type) {
case EVP_PKEY_RSA:
case EVP_PKEY_RSA2:
- cryptedlen = RSA_public_decrypt(data_len,
- (unsigned char *)data,
- crypttemp,
- pkey->pkey.rsa,
+ cryptedlen = RSA_public_decrypt(data_len,
+ (unsigned char *)data,
+ crypttemp,
+ pkey->pkey.rsa,
padding);
if (cryptedlen != -1) {
cryptedbuf = emalloc(cryptedlen + 1);
@@ -4001,10 +4062,10 @@ PHP_FUNCTION(openssl_public_decrypt)
successful = 1;
}
break;
-
+
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "key type not supported in this PHP build!");
-
+
}
efree(crypttemp);
@@ -4122,7 +4183,7 @@ PHP_FUNCTION(openssl_verify)
char * signature; int signature_len;
zval *method = NULL;
long signature_algo = OPENSSL_ALGO_SHA1;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssZ|z", &data, &data_len, &signature, &signature_len, &key, &method) == FAILURE) {
return;
}
@@ -4181,7 +4242,7 @@ PHP_FUNCTION(openssl_seal)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szza/|s", &data, &data_len, &sealdata, &ekeys, &pubkeys, &method, &method_len) == FAILURE) {
return;
}
-
+
pubkeysht = HASH_OF(pubkeys);
nkeys = pubkeysht ? zend_hash_num_elements(pubkeysht) : 0;
if (!nkeys) {
@@ -4276,7 +4337,7 @@ clean_exit:
if (key_resources[i] == -1) {
EVP_PKEY_free(pkeys[i]);
}
- if (eks[i]) {
+ if (eks[i]) {
efree(eks[i]);
}
}
@@ -4322,13 +4383,13 @@ PHP_FUNCTION(openssl_open)
} else {
cipher = EVP_rc4();
}
-
+
buf = emalloc(data_len + 1);
if (EVP_OpenInit(&ctx, cipher, (unsigned char *)ekey, ekey_len, NULL, pkey) && EVP_OpenUpdate(&ctx, buf, &len1, (unsigned char *)data, data_len)) {
if (!EVP_OpenFinal(&ctx, buf + len1, &len2) || (len1 + len2 == 0)) {
efree(buf);
- if (keyresource == -1) {
+ if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
RETURN_FALSE;
@@ -4565,7 +4626,7 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
if (SSL_CTX_use_PrivateKey_file(ctx, resolved_path_buff, SSL_FILETYPE_PEM) != 1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff);
return NULL;
- }
+ }
}
tmpssl = SSL_new(ctx);
@@ -4622,7 +4683,7 @@ PHP_FUNCTION(openssl_get_md_methods)
}
array_init(return_value);
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_MD_METH,
- aliases ? openssl_add_method_or_alias: openssl_add_method,
+ aliases ? openssl_add_method_or_alias: openssl_add_method,
return_value);
}
/* }}} */
@@ -4638,7 +4699,7 @@ PHP_FUNCTION(openssl_get_cipher_methods)
}
array_init(return_value);
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
- aliases ? openssl_add_method_or_alias: openssl_add_method,
+ aliases ? openssl_add_method_or_alias: openssl_add_method,
return_value);
}
/* }}} */
@@ -4977,7 +5038,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
#ifdef PHP_WIN32
strong_result = 1;
/* random/urandom equivalent on Windows */
- if (php_win32_get_random_bytes(buffer, (size_t) buffer_length) == FAILURE) {
+ if (php_win32_get_random_bytes(buffer, (size_t) buffer_length) == FAILURE){
efree(buffer);
if (zstrong_result_returned) {
ZVAL_BOOL(zstrong_result_returned, 0);
diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h
index fc118dba1..2de211a64 100644
--- a/ext/openssl/php_openssl.h
+++ b/ext/openssl/php_openssl.h
@@ -52,6 +52,8 @@ PHP_FUNCTION(openssl_private_decrypt);
PHP_FUNCTION(openssl_public_encrypt);
PHP_FUNCTION(openssl_public_decrypt);
+PHP_FUNCTION(openssl_pbkdf2);
+
PHP_FUNCTION(openssl_pkcs7_verify);
PHP_FUNCTION(openssl_pkcs7_decrypt);
PHP_FUNCTION(openssl_pkcs7_sign);
diff --git a/ext/openssl/tests/openssl_pbkdf2.phpt b/ext/openssl/tests/openssl_pbkdf2.phpt
new file mode 100644
index 000000000..3ec4dce23
--- /dev/null
+++ b/ext/openssl/tests/openssl_pbkdf2.phpt
@@ -0,0 +1,26 @@
+--TEST--
+openssl_pbkdf2() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl") || !function_exists("openssl_pbkdf2")) print "skip"; ?>
+--FILE--
+<?php
+// official test vectors
+var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 1)));
+var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 2)));
+var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 4096)));
+
+/* really slow but should be:
+string(40) "eefe3d61cd4da4e4e9945b3d6ba2158c2634e984"
+var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 16777216)));
+*/
+
+var_dump(bin2hex(openssl_pbkdf2('passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 25, 4096)));
+var_dump(bin2hex(openssl_pbkdf2("pass\0word", "sa\0lt", 16, 4096)));
+
+?>
+--EXPECTF--
+string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6"
+string(40) "ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957"
+string(40) "4b007901b765489abead49d926f721d065a429c1"
+string(50) "3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038"
+string(32) "56fa6aa75548099dcc37d7f03425e0c3"
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index d03eb3ee8..e9f89f781 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -410,8 +410,8 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
if (cparam->inputs.session) {
if (cparam->inputs.session->ops != &php_openssl_socket_ops) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "supplied session stream must be an SSL enabled stream");
- } else if (((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "supplied SSL session stream is not initialized");
+ } else if (((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "supplied SSL session stream is not initialized");
} else {
SSL_copy_session_id(sslsock->ssl_handle, ((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle);
}
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 8647e105e..108119a0b 100755..100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -868,7 +868,7 @@ PHP_FUNCTION(pcntl_signal)
}
/* Special long value case for SIG_DFL and SIG_IGN */
- if (Z_TYPE_P(handle)==IS_LONG) {
+ if (Z_TYPE_P(handle) == IS_LONG) {
if (Z_LVAL_P(handle) != (long) SIG_DFL && Z_LVAL_P(handle) != (long) SIG_IGN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value for handle argument specified");
RETURN_FALSE;
diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c
index 35a2df174..9f907b765 100644
--- a/ext/pcntl/php_signal.c
+++ b/ext/pcntl/php_signal.c
@@ -32,7 +32,6 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all)
TSRMLS_FETCH();
#endif
act.sa_handler = func;
-
if (mask_all) {
sigfillset(&act.sa_mask);
} else {
@@ -56,7 +55,7 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all)
{
return SIG_ERR;
}
-
+
return oact.sa_handler;
}
diff --git a/ext/pcntl/tests/signal_closure_handler.phpt b/ext/pcntl/tests/signal_closure_handler.phpt
index 438e05159..438e05159 100755..100644
--- a/ext/pcntl/tests/signal_closure_handler.phpt
+++ b/ext/pcntl/tests/signal_closure_handler.phpt
diff --git a/ext/pcre/config.w32 b/ext/pcre/config.w32
index 5d6fa9059..52673f5d5 100644
--- a/ext/pcre/config.w32
+++ b/ext/pcre/config.w32
@@ -3,7 +3,7 @@
EXTENSION("pcre", "php_pcre.c", false /* never shared */,
"-Iext/pcre/pcrelib");
-ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucd.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre");
+ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucd.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre");
ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library');
diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4
index 644ebbd32..f1ce0661e 100644
--- a/ext/pcre/config0.m4
+++ b/ext/pcre/config0.m4
@@ -55,9 +55,9 @@ PHP_ARG_WITH(pcre-regex,,
pcrelib_sources="pcrelib/pcre_chartables.c pcrelib/pcre_ucd.c \
pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c \
pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c \
- pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \
+ pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \
pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c \
- pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \
+ pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-I@ext_srcdir@/pcrelib)
PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
diff --git a/ext/pcre/pcrelib/AUTHORS b/ext/pcre/pcrelib/AUTHORS
index 88db849d4..ba4753d85 100644
--- a/ext/pcre/pcrelib/AUTHORS
+++ b/ext/pcre/pcrelib/AUTHORS
@@ -8,16 +8,38 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2010 University of Cambridge
+Copyright (c) 1997-2012 University of Cambridge
All rights reserved
+PCRE JUST-IN-TIME COMPILATION SUPPORT
+-------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2010-2012 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2009-2012 Zoltan Herczeg
+All rights reserved.
+
+
THE C++ WRAPPER LIBRARY
-----------------------
Written by: Google Inc.
-Copyright (c) 2007-2010 Google Inc
+Copyright (c) 2007-2012 Google Inc
All rights reserved
####
diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog
index 8a3014036..fe85d671d 100644
--- a/ext/pcre/pcrelib/ChangeLog
+++ b/ext/pcre/pcrelib/ChangeLog
@@ -1,6 +1,699 @@
ChangeLog for PCRE
------------------
+Version 8.31 06-July-2012
+-------------------------
+
+1. Fixing a wrong JIT test case and some compiler warnings.
+
+2. Removed a bashism from the RunTest script.
+
+3. Add a cast to pcre_exec.c to fix the warning "unary minus operator applied
+ to unsigned type, result still unsigned" that was given by an MS compiler
+ on encountering the code "-sizeof(xxx)".
+
+4. Partial matching support is added to the JIT compiler.
+
+5. Fixed several bugs concerned with partial matching of items that consist
+ of more than one character:
+
+ (a) /^(..)\1/ did not partially match "aba" because checking references was
+ done on an "all or nothing" basis. This also applied to repeated
+ references.
+
+ (b) \R did not give a hard partial match if \r was found at the end of the
+ subject.
+
+ (c) \X did not give a hard partial match after matching one or more
+ characters at the end of the subject.
+
+ (d) When newline was set to CRLF, a pattern such as /a$/ did not recognize
+ a partial match for the string "\r".
+
+ (e) When newline was set to CRLF, the metacharacter "." did not recognize
+ a partial match for a CR character at the end of the subject string.
+
+6. If JIT is requested using /S++ or -s++ (instead of just /S+ or -s+) when
+ running pcretest, the text "(JIT)" added to the output whenever JIT is
+ actually used to run the match.
+
+7. Individual JIT compile options can be set in pcretest by following -s+[+]
+ or /S+[+] with a digit between 1 and 7.
+
+8. OP_NOT now supports any UTF character not just single-byte ones.
+
+9. (*MARK) control verb is now supported by the JIT compiler.
+
+10. The command "./RunTest list" lists the available tests without actually
+ running any of them. (Because I keep forgetting what they all are.)
+
+11. Add PCRE_INFO_MAXLOOKBEHIND.
+
+12. Applied a (slightly modified) user-supplied patch that improves performance
+ when the heap is used for recursion (compiled with --disable-stack-for-
+ recursion). Instead of malloc and free for each heap frame each time a
+ logical recursion happens, frames are retained on a chain and re-used where
+ possible. This sometimes gives as much as 30% improvement.
+
+13. As documented, (*COMMIT) is now confined to within a recursive subpattern
+ call.
+
+14. As documented, (*COMMIT) is now confined to within a positive assertion.
+
+15. It is now possible to link pcretest with libedit as an alternative to
+ libreadline.
+
+16. (*COMMIT) control verb is now supported by the JIT compiler.
+
+17. The Unicode data tables have been updated to Unicode 6.1.0.
+
+18. Added --file-list option to pcregrep.
+
+19. Added binary file support to pcregrep, including the -a, --binary-files,
+ -I, and --text options.
+
+20. The madvise function is renamed for posix_madvise for QNX compatibility
+ reasons. Fixed by Giuseppe D'Angelo.
+
+21. Fixed a bug for backward assertions with REVERSE 0 in the JIT compiler.
+
+22. Changed the option for creating symbolic links for 16-bit man pages from
+ -s to -sf so that re-installing does not cause issues.
+
+23. Support PCRE_NO_START_OPTIMIZE in JIT as (*MARK) support requires it.
+
+24. Fixed a very old bug in pcretest that caused errors with restarted DFA
+ matches in certain environments (the workspace was not being correctly
+ retained). Also added to pcre_dfa_exec() a simple plausibility check on
+ some of the workspace data at the beginning of a restart.
+
+25. \s*\R was auto-possessifying the \s* when it should not, whereas \S*\R
+ was not doing so when it should - probably a typo introduced by SVN 528
+ (change 8.10/14).
+
+26. When PCRE_UCP was not set, \w+\x{c4} was incorrectly auto-possessifying the
+ \w+ when the character tables indicated that \x{c4} was a word character.
+ There were several related cases, all because the tests for doing a table
+ lookup were testing for characters less than 127 instead of 255.
+
+27. If a pattern contains capturing parentheses that are not used in a match,
+ their slots in the ovector are set to -1. For those that are higher than
+ any matched groups, this happens at the end of processing. In the case when
+ there were back references that the ovector was too small to contain
+ (causing temporary malloc'd memory to be used during matching), and the
+ highest capturing number was not used, memory off the end of the ovector
+ was incorrectly being set to -1. (It was using the size of the temporary
+ memory instead of the true size.)
+
+28. To catch bugs like 27 using valgrind, when pcretest is asked to specify an
+ ovector size, it uses memory at the end of the block that it has got.
+
+29. Check for an overlong MARK name and give an error at compile time. The
+ limit is 255 for the 8-bit library and 65535 for the 16-bit library.
+
+30. JIT compiler update.
+
+31. JIT is now supported on jailbroken iOS devices. Thanks for Ruiger
+ Rill for the patch.
+
+32. Put spaces around SLJIT_PRINT_D in the JIT compiler. Required by CXX11.
+
+33. Variable renamings in the PCRE-JIT compiler. No functionality change.
+
+34. Fixed typos in pcregrep: in two places there was SUPPORT_LIBZ2 instead of
+ SUPPORT_LIBBZ2. This caused a build problem when bzip2 but not gzip (zlib)
+ was enabled.
+
+35. Improve JIT code generation for greedy plus quantifier.
+
+36. When /((?:a?)*)*c/ or /((?>a?)*)*c/ was matched against "aac", it set group
+ 1 to "aa" instead of to an empty string. The bug affected repeated groups
+ that could potentially match an empty string.
+
+37. Optimizing single character iterators in JIT.
+
+38. Wide characters specified with \uxxxx in JavaScript mode are now subject to
+ the same checks as \x{...} characters in non-JavaScript mode. Specifically,
+ codepoints that are too big for the mode are faulted, and in a UTF mode,
+ disallowed codepoints are also faulted.
+
+39. If PCRE was compiled with UTF support, in three places in the DFA
+ matcher there was code that should only have been obeyed in UTF mode, but
+ was being obeyed unconditionally. In 8-bit mode this could cause incorrect
+ processing when bytes with values greater than 127 were present. In 16-bit
+ mode the bug would be provoked by values in the range 0xfc00 to 0xdc00. In
+ both cases the values are those that cannot be the first data item in a UTF
+ character. The three items that might have provoked this were recursions,
+ possessively repeated groups, and atomic groups.
+
+40. Ensure that libpcre is explicitly listed in the link commands for pcretest
+ and pcregrep, because some OS require shared objects to be explicitly
+ passed to ld, causing the link step to fail if they are not.
+
+41. There were two incorrect #ifdefs in pcre_study.c, meaning that, in 16-bit
+ mode, patterns that started with \h* or \R* might be incorrectly matched.
+
+
+Version 8.30 04-February-2012
+-----------------------------
+
+1. Renamed "isnumber" as "is_a_number" because in some Mac environments this
+ name is defined in ctype.h.
+
+2. Fixed a bug in fixed-length calculation for lookbehinds that would show up
+ only in quite long subpatterns.
+
+3. Removed the function pcre_info(), which has been obsolete and deprecated
+ since it was replaced by pcre_fullinfo() in February 2000.
+
+4. For a non-anchored pattern, if (*SKIP) was given with a name that did not
+ match a (*MARK), and the match failed at the start of the subject, a
+ reference to memory before the start of the subject could occur. This bug
+ was introduced by fix 17 of release 8.21.
+
+5. A reference to an unset group with zero minimum repetition was giving
+ totally wrong answers (in non-JavaScript-compatibility mode). For example,
+ /(another)?(\1?)test/ matched against "hello world test". This bug was
+ introduced in release 8.13.
+
+6. Add support for 16-bit character strings (a large amount of work involving
+ many changes and refactorings).
+
+7. RunGrepTest failed on msys because \r\n was replaced by whitespace when the
+ command "pattern=`printf 'xxx\r\njkl'`" was run. The pattern is now taken
+ from a file.
+
+8. Ovector size of 2 is also supported by JIT based pcre_exec (the ovector size
+ rounding is not applied in this particular case).
+
+9. The invalid Unicode surrogate codepoints U+D800 to U+DFFF are now rejected
+ if they appear, or are escaped, in patterns.
+
+10. Get rid of a number of -Wunused-but-set-variable warnings.
+
+11. The pattern /(?=(*:x))(q|)/ matches an empty string, and returns the mark
+ "x". The similar pattern /(?=(*:x))((*:y)q|)/ did not return a mark at all.
+ Oddly, Perl behaves the same way. PCRE has been fixed so that this pattern
+ also returns the mark "x". This bug applied to capturing parentheses,
+ non-capturing parentheses, and atomic parentheses. It also applied to some
+ assertions.
+
+12. Stephen Kelly's patch to CMakeLists.txt allows it to parse the version
+ information out of configure.ac instead of relying on pcre.h.generic, which
+ is not stored in the repository.
+
+13. Applied Dmitry V. Levin's patch for a more portable method for linking with
+ -lreadline.
+
+14. ZH added PCRE_CONFIG_JITTARGET; added its output to pcretest -C.
+
+15. Applied Graycode's patch to put the top-level frame on the stack rather
+ than the heap when not using the stack for recursion. This gives a
+ performance improvement in many cases when recursion is not deep.
+
+16. Experimental code added to "pcretest -C" to output the stack frame size.
+
+
+Version 8.21 12-Dec-2011
+------------------------
+
+1. Updating the JIT compiler.
+
+2. JIT compiler now supports OP_NCREF, OP_RREF and OP_NRREF. New test cases
+ are added as well.
+
+3. Fix cache-flush issue on PowerPC (It is still an experimental JIT port).
+ PCRE_EXTRA_TABLES is not suported by JIT, and should be checked before
+ calling _pcre_jit_exec. Some extra comments are added.
+
+4. (*MARK) settings inside atomic groups that do not contain any capturing
+ parentheses, for example, (?>a(*:m)), were not being passed out. This bug
+ was introduced by change 18 for 8.20.
+
+5. Supporting of \x, \U and \u in JavaScript compatibility mode based on the
+ ECMA-262 standard.
+
+6. Lookbehinds such as (?<=a{2}b) that contained a fixed repetition were
+ erroneously being rejected as "not fixed length" if PCRE_CASELESS was set.
+ This bug was probably introduced by change 9 of 8.13.
+
+7. While fixing 6 above, I noticed that a number of other items were being
+ incorrectly rejected as "not fixed length". This arose partly because newer
+ opcodes had not been added to the fixed-length checking code. I have (a)
+ corrected the bug and added tests for these items, and (b) arranged for an
+ error to occur if an unknown opcode is encountered while checking for fixed
+ length instead of just assuming "not fixed length". The items that were
+ rejected were: (*ACCEPT), (*COMMIT), (*FAIL), (*MARK), (*PRUNE), (*SKIP),
+ (*THEN), \h, \H, \v, \V, and single character negative classes with fixed
+ repetitions, e.g. [^a]{3}, with and without PCRE_CASELESS.
+
+8. A possessively repeated conditional subpattern such as (?(?=c)c|d)++ was
+ being incorrectly compiled and would have given unpredicatble results.
+
+9. A possessively repeated subpattern with minimum repeat count greater than
+ one behaved incorrectly. For example, (A){2,}+ behaved as if it was
+ (A)(A)++ which meant that, after a subsequent mismatch, backtracking into
+ the first (A) could occur when it should not.
+
+10. Add a cast and remove a redundant test from the code.
+
+11. JIT should use pcre_malloc/pcre_free for allocation.
+
+12. Updated pcre-config so that it no longer shows -L/usr/lib, which seems
+ best practice nowadays, and helps with cross-compiling. (If the exec_prefix
+ is anything other than /usr, -L is still shown).
+
+13. In non-UTF-8 mode, \C is now supported in lookbehinds and DFA matching.
+
+14. Perl does not support \N without a following name in a [] class; PCRE now
+ also gives an error.
+
+15. If a forward reference was repeated with an upper limit of around 2000,
+ it caused the error "internal error: overran compiling workspace". The
+ maximum number of forward references (including repeats) was limited by the
+ internal workspace, and dependent on the LINK_SIZE. The code has been
+ rewritten so that the workspace expands (via pcre_malloc) if necessary, and
+ the default depends on LINK_SIZE. There is a new upper limit (for safety)
+ of around 200,000 forward references. While doing this, I also speeded up
+ the filling in of repeated forward references.
+
+16. A repeated forward reference in a pattern such as (a)(?2){2}(.) was
+ incorrectly expecting the subject to contain another "a" after the start.
+
+17. When (*SKIP:name) is activated without a corresponding (*MARK:name) earlier
+ in the match, the SKIP should be ignored. This was not happening; instead
+ the SKIP was being treated as NOMATCH. For patterns such as
+ /A(*MARK:A)A+(*SKIP:B)Z|AAC/ this meant that the AAC branch was never
+ tested.
+
+18. The behaviour of (*MARK), (*PRUNE), and (*THEN) has been reworked and is
+ now much more compatible with Perl, in particular in cases where the result
+ is a non-match for a non-anchored pattern. For example, if
+ /b(*:m)f|a(*:n)w/ is matched against "abc", the non-match returns the name
+ "m", where previously it did not return a name. A side effect of this
+ change is that for partial matches, the last encountered mark name is
+ returned, as for non matches. A number of tests that were previously not
+ Perl-compatible have been moved into the Perl-compatible test files. The
+ refactoring has had the pleasing side effect of removing one argument from
+ the match() function, thus reducing its stack requirements.
+
+19. If the /S+ option was used in pcretest to study a pattern using JIT,
+ subsequent uses of /S (without +) incorrectly behaved like /S+.
+
+21. Retrieve executable code size support for the JIT compiler and fixing
+ some warnings.
+
+22. A caseless match of a UTF-8 character whose other case uses fewer bytes did
+ not work when the shorter character appeared right at the end of the
+ subject string.
+
+23. Added some (int) casts to non-JIT modules to reduce warnings on 64-bit
+ systems.
+
+24. Added PCRE_INFO_JITSIZE to pass on the value from (21) above, and also
+ output it when the /M option is used in pcretest.
+
+25. The CheckMan script was not being included in the distribution. Also, added
+ an explicit "perl" to run Perl scripts from the PrepareRelease script
+ because this is reportedly needed in Windows.
+
+26. If study data was being save in a file and studying had not found a set of
+ "starts with" bytes for the pattern, the data written to the file (though
+ never used) was taken from uninitialized memory and so caused valgrind to
+ complain.
+
+27. Updated RunTest.bat as provided by Sheri Pierce.
+
+28. Fixed a possible uninitialized memory bug in pcre_jit_compile.c.
+
+29. Computation of memory usage for the table of capturing group names was
+ giving an unnecessarily large value.
+
+
+Version 8.20 21-Oct-2011
+------------------------
+
+1. Change 37 of 8.13 broke patterns like [:a]...[b:] because it thought it had
+ a POSIX class. After further experiments with Perl, which convinced me that
+ Perl has bugs and confusions, a closing square bracket is no longer allowed
+ in a POSIX name. This bug also affected patterns with classes that started
+ with full stops.
+
+2. If a pattern such as /(a)b|ac/ is matched against "ac", there is no
+ captured substring, but while checking the failing first alternative,
+ substring 1 is temporarily captured. If the output vector supplied to
+ pcre_exec() was not big enough for this capture, the yield of the function
+ was still zero ("insufficient space for captured substrings"). This cannot
+ be totally fixed without adding another stack variable, which seems a lot
+ of expense for a edge case. However, I have improved the situation in cases
+ such as /(a)(b)x|abc/ matched against "abc", where the return code
+ indicates that fewer than the maximum number of slots in the ovector have
+ been set.
+
+3. Related to (2) above: when there are more back references in a pattern than
+ slots in the output vector, pcre_exec() uses temporary memory during
+ matching, and copies in the captures as far as possible afterwards. It was
+ using the entire output vector, but this conflicts with the specification
+ that only 2/3 is used for passing back captured substrings. Now it uses
+ only the first 2/3, for compatibility. This is, of course, another edge
+ case.
+
+4. Zoltan Herczeg's just-in-time compiler support has been integrated into the
+ main code base, and can be used by building with --enable-jit. When this is
+ done, pcregrep automatically uses it unless --disable-pcregrep-jit or the
+ runtime --no-jit option is given.
+
+5. When the number of matches in a pcre_dfa_exec() run exactly filled the
+ ovector, the return from the function was zero, implying that there were
+ other matches that did not fit. The correct "exactly full" value is now
+ returned.
+
+6. If a subpattern that was called recursively or as a subroutine contained
+ (*PRUNE) or any other control that caused it to give a non-standard return,
+ invalid errors such as "Error -26 (nested recursion at the same subject
+ position)" or even infinite loops could occur.
+
+7. If a pattern such as /a(*SKIP)c|b(*ACCEPT)|/ was studied, it stopped
+ computing the minimum length on reaching *ACCEPT, and so ended up with the
+ wrong value of 1 rather than 0. Further investigation indicates that
+ computing a minimum subject length in the presence of *ACCEPT is difficult
+ (think back references, subroutine calls), and so I have changed the code
+ so that no minimum is registered for a pattern that contains *ACCEPT.
+
+8. If (*THEN) was present in the first (true) branch of a conditional group,
+ it was not handled as intended. [But see 16 below.]
+
+9. Replaced RunTest.bat and CMakeLists.txt with improved versions provided by
+ Sheri Pierce.
+
+10. A pathological pattern such as /(*ACCEPT)a/ was miscompiled, thinking that
+ the first byte in a match must be "a".
+
+11. Change 17 for 8.13 increased the recursion depth for patterns like
+ /a(?:.)*?a/ drastically. I've improved things by remembering whether a
+ pattern contains any instances of (*THEN). If it does not, the old
+ optimizations are restored. It would be nice to do this on a per-group
+ basis, but at the moment that is not feasible.
+
+12. In some environments, the output of pcretest -C is CRLF terminated. This
+ broke RunTest's code that checks for the link size. A single white space
+ character after the value is now allowed for.
+
+13. RunTest now checks for the "fr" locale as well as for "fr_FR" and "french".
+ For "fr", it uses the Windows-specific input and output files.
+
+14. If (*THEN) appeared in a group that was called recursively or as a
+ subroutine, it did not work as intended. [But see next item.]
+
+15. Consider the pattern /A (B(*THEN)C) | D/ where A, B, C, and D are complex
+ pattern fragments (but not containing any | characters). If A and B are
+ matched, but there is a failure in C so that it backtracks to (*THEN), PCRE
+ was behaving differently to Perl. PCRE backtracked into A, but Perl goes to
+ D. In other words, Perl considers parentheses that do not contain any |
+ characters to be part of a surrounding alternative, whereas PCRE was
+ treading (B(*THEN)C) the same as (B(*THEN)C|(*FAIL)) -- which Perl handles
+ differently. PCRE now behaves in the same way as Perl, except in the case
+ of subroutine/recursion calls such as (?1) which have in any case always
+ been different (but PCRE had them first :-).
+
+16. Related to 15 above: Perl does not treat the | in a conditional group as
+ creating alternatives. Such a group is treated in the same way as an
+ ordinary group without any | characters when processing (*THEN). PCRE has
+ been changed to match Perl's behaviour.
+
+17. If a user had set PCREGREP_COLO(U)R to something other than 1:31, the
+ RunGrepTest script failed.
+
+18. Change 22 for version 13 caused atomic groups to use more stack. This is
+ inevitable for groups that contain captures, but it can lead to a lot of
+ stack use in large patterns. The old behaviour has been restored for atomic
+ groups that do not contain any capturing parentheses.
+
+19. If the PCRE_NO_START_OPTIMIZE option was set for pcre_compile(), it did not
+ suppress the check for a minimum subject length at run time. (If it was
+ given to pcre_exec() or pcre_dfa_exec() it did work.)
+
+20. Fixed an ASCII-dependent infelicity in pcretest that would have made it
+ fail to work when decoding hex characters in data strings in EBCDIC
+ environments.
+
+21. It appears that in at least one Mac OS environment, the isxdigit() function
+ is implemented as a macro that evaluates to its argument more than once,
+ contravening the C 90 Standard (I haven't checked a later standard). There
+ was an instance in pcretest which caused it to go wrong when processing
+ \x{...} escapes in subject strings. The has been rewritten to avoid using
+ things like p++ in the argument of isxdigit().
+
+
+Version 8.13 16-Aug-2011
+------------------------
+
+1. The Unicode data tables have been updated to Unicode 6.0.0.
+
+2. Two minor typos in pcre_internal.h have been fixed.
+
+3. Added #include <string.h> to pcre_scanner_unittest.cc, pcrecpp.cc, and
+ pcrecpp_unittest.cc. They are needed for strcmp(), memset(), and strchr()
+ in some environments (e.g. Solaris 10/SPARC using Sun Studio 12U2).
+
+4. There were a number of related bugs in the code for matching backrefences
+ caselessly in UTF-8 mode when codes for the characters concerned were
+ different numbers of bytes. For example, U+023A and U+2C65 are an upper
+ and lower case pair, using 2 and 3 bytes, respectively. The main bugs were:
+ (a) A reference to 3 copies of a 2-byte code matched only 2 of a 3-byte
+ code. (b) A reference to 2 copies of a 3-byte code would not match 2 of a
+ 2-byte code at the end of the subject (it thought there wasn't enough data
+ left).
+
+5. Comprehensive information about what went wrong is now returned by
+ pcre_exec() and pcre_dfa_exec() when the UTF-8 string check fails, as long
+ as the output vector has at least 2 elements. The offset of the start of
+ the failing character and a reason code are placed in the vector.
+
+6. When the UTF-8 string check fails for pcre_compile(), the offset that is
+ now returned is for the first byte of the failing character, instead of the
+ last byte inspected. This is an incompatible change, but I hope it is small
+ enough not to be a problem. It makes the returned offset consistent with
+ pcre_exec() and pcre_dfa_exec().
+
+7. pcretest now gives a text phrase as well as the error number when
+ pcre_exec() or pcre_dfa_exec() fails; if the error is a UTF-8 check
+ failure, the offset and reason code are output.
+
+8. When \R was used with a maximizing quantifier it failed to skip backwards
+ over a \r\n pair if the subsequent match failed. Instead, it just skipped
+ back over a single character (\n). This seems wrong (because it treated the
+ two characters as a single entity when going forwards), conflicts with the
+ documentation that \R is equivalent to (?>\r\n|\n|...etc), and makes the
+ behaviour of \R* different to (\R)*, which also seems wrong. The behaviour
+ has been changed.
+
+9. Some internal refactoring has changed the processing so that the handling
+ of the PCRE_CASELESS and PCRE_MULTILINE options is done entirely at compile
+ time (the PCRE_DOTALL option was changed this way some time ago: version
+ 7.7 change 16). This has made it possible to abolish the OP_OPT op code,
+ which was always a bit of a fudge. It also means that there is one less
+ argument for the match() function, which reduces its stack requirements
+ slightly. This change also fixes an incompatibility with Perl: the pattern
+ (?i:([^b]))(?1) should not match "ab", but previously PCRE gave a match.
+
+10. More internal refactoring has drastically reduced the number of recursive
+ calls to match() for possessively repeated groups such as (abc)++ when
+ using pcre_exec().
+
+11. While implementing 10, a number of bugs in the handling of groups were
+ discovered and fixed:
+
+ (?<=(a)+) was not diagnosed as invalid (non-fixed-length lookbehind).
+ (a|)*(?1) gave a compile-time internal error.
+ ((a|)+)+ did not notice that the outer group could match an empty string.
+ (^a|^)+ was not marked as anchored.
+ (.*a|.*)+ was not marked as matching at start or after a newline.
+
+12. Yet more internal refactoring has removed another argument from the match()
+ function. Special calls to this function are now indicated by setting a
+ value in a variable in the "match data" data block.
+
+13. Be more explicit in pcre_study() instead of relying on "default" for
+ opcodes that mean there is no starting character; this means that when new
+ ones are added and accidentally left out of pcre_study(), testing should
+ pick them up.
+
+14. The -s option of pcretest has been documented for ages as being an old
+ synonym of -m (show memory usage). I have changed it to mean "force study
+ for every regex", that is, assume /S for every regex. This is similar to -i
+ and -d etc. It's slightly incompatible, but I'm hoping nobody is still
+ using it. It makes it easier to run collections of tests with and without
+ study enabled, and thereby test pcre_study() more easily. All the standard
+ tests are now run with and without -s (but some patterns can be marked as
+ "never study" - see 20 below).
+
+15. When (*ACCEPT) was used in a subpattern that was called recursively, the
+ restoration of the capturing data to the outer values was not happening
+ correctly.
+
+16. If a recursively called subpattern ended with (*ACCEPT) and matched an
+ empty string, and PCRE_NOTEMPTY was set, pcre_exec() thought the whole
+ pattern had matched an empty string, and so incorrectly returned a no
+ match.
+
+17. There was optimizing code for the last branch of non-capturing parentheses,
+ and also for the obeyed branch of a conditional subexpression, which used
+ tail recursion to cut down on stack usage. Unfortunately, now that there is
+ the possibility of (*THEN) occurring in these branches, tail recursion is
+ no longer possible because the return has to be checked for (*THEN). These
+ two optimizations have therefore been removed. [But see 8.20/11 above.]
+
+18. If a pattern containing \R was studied, it was assumed that \R always
+ matched two bytes, thus causing the minimum subject length to be
+ incorrectly computed because \R can also match just one byte.
+
+19. If a pattern containing (*ACCEPT) was studied, the minimum subject length
+ was incorrectly computed.
+
+20. If /S is present twice on a test pattern in pcretest input, it now
+ *disables* studying, thereby overriding the use of -s on the command line
+ (see 14 above). This is necessary for one or two tests to keep the output
+ identical in both cases.
+
+21. When (*ACCEPT) was used in an assertion that matched an empty string and
+ PCRE_NOTEMPTY was set, PCRE applied the non-empty test to the assertion.
+
+22. When an atomic group that contained a capturing parenthesis was
+ successfully matched, but the branch in which it appeared failed, the
+ capturing was not being forgotten if a higher numbered group was later
+ captured. For example, /(?>(a))b|(a)c/ when matching "ac" set capturing
+ group 1 to "a", when in fact it should be unset. This applied to multi-
+ branched capturing and non-capturing groups, repeated or not, and also to
+ positive assertions (capturing in negative assertions does not happen
+ in PCRE) and also to nested atomic groups.
+
+23. Add the ++ qualifier feature to pcretest, to show the remainder of the
+ subject after a captured substring, to make it easier to tell which of a
+ number of identical substrings has been captured.
+
+24. The way atomic groups are processed by pcre_exec() has been changed so that
+ if they are repeated, backtracking one repetition now resets captured
+ values correctly. For example, if ((?>(a+)b)+aabab) is matched against
+ "aaaabaaabaabab" the value of captured group 2 is now correctly recorded as
+ "aaa". Previously, it would have been "a". As part of this code
+ refactoring, the way recursive calls are handled has also been changed.
+
+25. If an assertion condition captured any substrings, they were not passed
+ back unless some other capturing happened later. For example, if
+ (?(?=(a))a) was matched against "a", no capturing was returned.
+
+26. When studying a pattern that contained subroutine calls or assertions,
+ the code for finding the minimum length of a possible match was handling
+ direct recursions such as (xxx(?1)|yyy) but not mutual recursions (where
+ group 1 called group 2 while simultaneously a separate group 2 called group
+ 1). A stack overflow occurred in this case. I have fixed this by limiting
+ the recursion depth to 10.
+
+27. Updated RunTest.bat in the distribution to the version supplied by Tom
+ Fortmann. This supports explicit test numbers on the command line, and has
+ argument validation and error reporting.
+
+28. An instance of \X with an unlimited repeat could fail if at any point the
+ first character it looked at was a mark character.
+
+29. Some minor code refactoring concerning Unicode properties and scripts
+ should reduce the stack requirement of match() slightly.
+
+30. Added the '=' option to pcretest to check the setting of unused capturing
+ slots at the end of the pattern, which are documented as being -1, but are
+ not included in the return count.
+
+31. If \k was not followed by a braced, angle-bracketed, or quoted name, PCRE
+ compiled something random. Now it gives a compile-time error (as does
+ Perl).
+
+32. A *MARK encountered during the processing of a positive assertion is now
+ recorded and passed back (compatible with Perl).
+
+33. If --only-matching or --colour was set on a pcregrep call whose pattern
+ had alternative anchored branches, the search for a second match in a line
+ was done as if at the line start. Thus, for example, /^01|^02/ incorrectly
+ matched the line "0102" twice. The same bug affected patterns that started
+ with a backwards assertion. For example /\b01|\b02/ also matched "0102"
+ twice.
+
+34. Previously, PCRE did not allow quantification of assertions. However, Perl
+ does, and because of capturing effects, quantifying parenthesized
+ assertions may at times be useful. Quantifiers are now allowed for
+ parenthesized assertions.
+
+35. A minor code tidy in pcre_compile() when checking options for \R usage.
+
+36. \g was being checked for fancy things in a character class, when it should
+ just be a literal "g".
+
+37. PCRE was rejecting [:a[:digit:]] whereas Perl was not. It seems that the
+ appearance of a nested POSIX class supersedes an apparent external class.
+ For example, [:a[:digit:]b:] matches "a", "b", ":", or a digit. Also,
+ unescaped square brackets may also appear as part of class names. For
+ example, [:a[:abc]b:] gives unknown class "[:abc]b:]". PCRE now behaves
+ more like Perl. (But see 8.20/1 above.)
+
+38. PCRE was giving an error for \N with a braced quantifier such as {1,} (this
+ was because it thought it was \N{name}, which is not supported).
+
+39. Add minix to OS list not supporting the -S option in pcretest.
+
+40. PCRE tries to detect cases of infinite recursion at compile time, but it
+ cannot analyze patterns in sufficient detail to catch mutual recursions
+ such as ((?1))((?2)). There is now a runtime test that gives an error if a
+ subgroup is called recursively as a subpattern for a second time at the
+ same position in the subject string. In previous releases this might have
+ been caught by the recursion limit, or it might have run out of stack.
+
+41. A pattern such as /(?(R)a+|(?R)b)/ is quite safe, as the recursion can
+ happen only once. PCRE was, however incorrectly giving a compile time error
+ "recursive call could loop indefinitely" because it cannot analyze the
+ pattern in sufficient detail. The compile time test no longer happens when
+ PCRE is compiling a conditional subpattern, but actual runaway loops are
+ now caught at runtime (see 40 above).
+
+42. It seems that Perl allows any characters other than a closing parenthesis
+ to be part of the NAME in (*MARK:NAME) and other backtracking verbs. PCRE
+ has been changed to be the same.
+
+43. Updated configure.ac to put in more quoting round AC_LANG_PROGRAM etc. so
+ as not to get warnings when autogen.sh is called. Also changed
+ AC_PROG_LIBTOOL (deprecated) to LT_INIT (the current macro).
+
+44. To help people who use pcregrep to scan files containing exceedingly long
+ lines, the following changes have been made:
+
+ (a) The default value of the buffer size parameter has been increased from
+ 8K to 20K. (The actual buffer used is three times this size.)
+
+ (b) The default can be changed by ./configure --with-pcregrep-bufsize when
+ PCRE is built.
+
+ (c) A --buffer-size=n option has been added to pcregrep, to allow the size
+ to be set at run time.
+
+ (d) Numerical values in pcregrep options can be followed by K or M, for
+ example --buffer-size=50K.
+
+ (e) If a line being scanned overflows pcregrep's buffer, an error is now
+ given and the return code is set to 2.
+
+45. Add a pointer to the latest mark to the callout data block.
+
+46. The pattern /.(*F)/, when applied to "abc" with PCRE_PARTIAL_HARD, gave a
+ partial match of an empty string instead of no match. This was specific to
+ the use of ".".
+
+47. The pattern /f.*/8s, when applied to "for" with PCRE_PARTIAL_HARD, gave a
+ complete match instead of a partial match. This bug was dependent on both
+ the PCRE_UTF8 and PCRE_DOTALL options being set.
+
+48. For a pattern such as /\babc|\bdef/ pcre_study() was failing to set up the
+ starting byte set, because \b was not being ignored.
+
+
Version 8.12 15-Jan-2011
------------------------
diff --git a/ext/pcre/pcrelib/HACKING b/ext/pcre/pcrelib/HACKING
index ee0913214..87b88191a 100644
--- a/ext/pcre/pcrelib/HACKING
+++ b/ext/pcre/pcrelib/HACKING
@@ -2,7 +2,8 @@ Technical Notes about PCRE
--------------------------
These are very rough technical notes that record potentially useful information
-about PCRE internals.
+about PCRE internals. For information about testing PCRE, see the pcretest
+documentation and the comment at the head of the RunTest file.
Historical note 1
@@ -48,6 +49,18 @@ complexity in Perl regular expressions, I couldn't do this. In any case, a
first pass through the pattern is helpful for other reasons.
+Support for 16-bit data strings
+-------------------------------
+
+From release 8.30, PCRE supports 16-bit as well as 8-bit data strings, by being
+compilable in either 8-bit or 16-bit modes, or both. Thus, two different
+libraries can be created. In the description that follows, the word "short" is
+used for a 16-bit data quantity, and the word "unit" is used for a quantity
+that is a byte in 8-bit mode and a short in 16-bit mode. However, so as not to
+over-complicate the text, the names of PCRE functions are given in 8-bit form
+only.
+
+
Computing the memory requirement: how it was
--------------------------------------------
@@ -68,7 +81,7 @@ things I did for 6.8 was to fix Yet Another Bug in the memory computation. Then
I had a flash of inspiration as to how I could run the real compile function in
a "fake" mode that enables it to compute how much memory it would need, while
actually only ever using a few hundred bytes of working memory, and without too
-many tests of the mode that might slow it down. So I re-factored the compiling
+many tests of the mode that might slow it down. So I refactored the compiling
functions to work this way. This got rid of about 600 lines of source. It
should make future maintenance and development easier. As this was such a major
change, I never released 6.8, instead upping the number to 7.0 (other quite
@@ -88,7 +101,10 @@ The "traditional", and original, matching function is called pcre_exec(), and
it implements an NFA algorithm, similar to the original Henry Spencer algorithm
and the way that Perl works. This is not surprising, since it is intended to be
as compatible with Perl as possible. This is the function most users of PCRE
-will use most of the time.
+will use most of the time. From release 8.20, if PCRE is compiled with
+just-in-time (JIT) support, and studying a compiled pattern with JIT is
+successful, the JIT code is run instead of the normal pcre_exec() code, but the
+result is the same.
Supplementary matching function
@@ -108,28 +124,38 @@ needed at compile time to produce a traditional FSM where only one state is
ever active at once. I believe some other regex matchers work this way.
-Format of compiled patterns
----------------------------
+Changeable options
+------------------
+
+The /i, /m, or /s options (PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL) may
+change in the middle of patterns. From PCRE 8.13, their processing is handled
+entirely at compile time by generating different opcodes for the different
+settings. The runtime functions do not need to keep track of an options state
+any more.
-The compiled form of a pattern is a vector of bytes, containing items of
-variable length. The first byte in an item is an opcode, and the length of the
-item is either implicit in the opcode or contained in the data bytes that
-follow it.
-In many cases below LINK_SIZE data values are specified for offsets within the
-compiled pattern. The default value for LINK_SIZE is 2, but PCRE can be
-compiled to use 3-byte or 4-byte values for these offsets (impairing the
-performance). This is necessary only when patterns whose compiled length is
-greater than 64K are going to be processed. In this description, we assume the
-"normal" compilation options. Data values that are counts (e.g. for
-quantifiers) are always just two bytes long.
+Format of compiled patterns
+---------------------------
-A list of the opcodes follows:
+The compiled form of a pattern is a vector of units (bytes in 8-bit mode, or
+shorts in 16-bit mode), containing items of variable length. The first unit in
+an item contains an opcode, and the length of the item is either implicit in
+the opcode or contained in the data that follows it.
+
+In many cases listed below, LINK_SIZE data values are specified for offsets
+within the compiled pattern. LINK_SIZE always specifies a number of bytes. The
+default value for LINK_SIZE is 2, but PCRE can be compiled to use 3-byte or
+4-byte values for these offsets, although this impairs the performance. (3-byte
+LINK_SIZE values are available only in 8-bit mode.) Specifing a LINK_SIZE
+larger than 2 is necessary only when patterns whose compiled length is greater
+than 64K are going to be processed. In this description, we assume the "normal"
+compilation options. Data values that are counts (e.g. for quantifiers) are
+always just two bytes long (one short in 16-bit mode).
Opcodes with no following data
------------------------------
-These items are all just one byte long
+These items are all just one unit long
OP_END end of pattern
OP_ANY match any one character other than newline
@@ -138,7 +164,8 @@ These items are all just one byte long
OP_SOD match start of data: \A
OP_SOM, start of match (subject + offset): \G
OP_SET_SOM, set start of match (\K)
- OP_CIRC ^ (start of data, or after \n in multiline)
+ OP_CIRC ^ (start of data)
+ OP_CIRCM ^ multiline mode (start of data or after newline)
OP_NOT_WORD_BOUNDARY \W
OP_WORD_BOUNDARY \w
OP_NOT_DIGIT \D
@@ -153,7 +180,8 @@ These items are all just one byte long
OP_WORDCHAR \w
OP_EODN match end of data or \n at end: \Z
OP_EOD match end of data: \z
- OP_DOLL $ (end of data, or before \n in multiline)
+ OP_DOLL $ (end of data, or before final newline)
+ OP_DOLLM $ multiline mode (end of data or before newline)
OP_EXTUNI match an extended Unicode character
OP_ANYNL match any Unicode newline sequence
@@ -164,49 +192,57 @@ These items are all just one byte long
OP_SKIP ) indicating which parentheses must be closed.
-Backtracking control verbs with data
-------------------------------------
-
-OP_THEN is followed by a LINK_SIZE offset, which is the distance back to the
-start of the current branch.
-
-OP_MARK is followed by the mark name, preceded by a one-byte length, and
-followed by a binary zero. For (*PRUNE), (*SKIP), and (*THEN) with arguments,
-the opcodes OP_PRUNE_ARG, OP_SKIP_ARG, and OP_THEN_ARG are used. For the first
-two, the name follows immediately; for OP_THEN_ARG, it follows the LINK_SIZE
-offset value.
+Backtracking control verbs with (optional) data
+-----------------------------------------------
+
+(*THEN) without an argument generates the opcode OP_THEN and no following data.
+OP_MARK is followed by the mark name, preceded by a one-unit length, and
+followed by a binary zero. For (*PRUNE), (*SKIP), and (*THEN) with arguments,
+the opcodes OP_PRUNE_ARG, OP_SKIP_ARG, and OP_THEN_ARG are used, with the name
+following in the same format.
-Repeating single characters
+Matching literal characters
---------------------------
-The common repeats (*, +, ?) when applied to a single character use the
-following opcodes:
-
- OP_STAR
- OP_MINSTAR
- OP_POSSTAR
- OP_PLUS
- OP_MINPLUS
- OP_POSPLUS
- OP_QUERY
- OP_MINQUERY
- OP_POSQUERY
+The OP_CHAR opcode is followed by a single character that is to be matched
+casefully. For caseless matching, OP_CHARI is used. In UTF-8 or UTF-16 modes,
+the character may be more than one unit long.
-In ASCII mode, these are two-byte items; in UTF-8 mode, the length is variable.
-Those with "MIN" in their name are the minimizing versions. Those with "POS" in
-their names are possessive versions. Each is followed by the character that is
-to be repeated. Other repeats make use of
- OP_UPTO
- OP_MINUPTO
- OP_POSUPTO
- OP_EXACT
+Repeating single characters
+---------------------------
-which are followed by a two-byte count (most significant first) and the
-repeated character. OP_UPTO matches from 0 to the given number. A repeat with a
-non-zero minimum and a fixed maximum is coded as an OP_EXACT followed by an
-OP_UPTO (or OP_MINUPTO or OPT_POSUPTO).
+The common repeats (*, +, ?), when applied to a single character, use the
+following opcodes, which come in caseful and caseless versions:
+
+ Caseful Caseless
+ OP_STAR OP_STARI
+ OP_MINSTAR OP_MINSTARI
+ OP_POSSTAR OP_POSSTARI
+ OP_PLUS OP_PLUSI
+ OP_MINPLUS OP_MINPLUSI
+ OP_POSPLUS OP_POSPLUSI
+ OP_QUERY OP_QUERYI
+ OP_MINQUERY OP_MINQUERYI
+ OP_POSQUERY OP_POSQUERYI
+
+Each opcode is followed by the character that is to be repeated. In ASCII mode,
+these are two-unit items; in UTF-8 or UTF-16 modes, the length is variable.
+Those with "MIN" in their names are the minimizing versions. Those with "POS"
+in their names are possessive versions. Other repeats make use of these
+opcodes:
+
+ Caseful Caseless
+ OP_UPTO OP_UPTOI
+ OP_MINUPTO OP_MINUPTOI
+ OP_POSUPTO OP_POSUPTOI
+ OP_EXACT OP_EXACTI
+
+Each of these is followed by a two-byte (one short) count (most significant
+byte first in 8-bit mode) and then the repeated character. OP_UPTO matches from
+0 to the given number. A repeat with a non-zero minimum and a fixed maximum is
+coded as an OP_EXACT followed by an OP_UPTO (or OP_MINUPTO or OPT_POSUPTO).
Repeating character types
@@ -214,7 +250,7 @@ Repeating character types
Repeats of things like \d are done exactly as for single characters, except
that instead of a character, the opcode for the type is stored in the data
-byte. The opcodes are:
+unit. The opcodes are:
OP_TYPESTAR
OP_TYPEMINSTAR
@@ -236,65 +272,58 @@ Match by Unicode property
OP_PROP and OP_NOTPROP are used for positive and negative matches of a
character by testing its Unicode property (the \p and \P escape sequences).
-Each is followed by two bytes that encode the desired property as a type and a
+Each is followed by two units that encode the desired property as a type and a
value.
-Repeats of these items use the OP_TYPESTAR etc. set of opcodes, followed by
-three bytes: OP_PROP or OP_NOTPROP and then the desired property type and
+Repeats of these items use the OP_TYPESTAR etc. set of opcodes, followed by
+three units: OP_PROP or OP_NOTPROP, and then the desired property type and
value.
-Matching literal characters
----------------------------
-
-The OP_CHAR opcode is followed by a single character that is to be matched
-casefully. For caseless matching, OP_CHARNC is used. In UTF-8 mode, the
-character may be more than one byte long. (Earlier versions of PCRE used
-multi-character strings, but this was changed to allow some new features to be
-added.)
-
-
Character classes
-----------------
-If there is only one character, OP_CHAR or OP_CHARNC is used for a positive
-class, and OP_NOT for a negative one (that is, for something like [^a]).
-However, in UTF-8 mode, the use of OP_NOT applies only to characters with
-values < 128, because OP_NOT is confined to single bytes.
+If there is only one character in the class, OP_CHAR or OP_CHARI is used for a
+positive class, and OP_NOT or OP_NOTI for a negative one (that is, for
+something like [^a]).
-Another set of repeating opcodes (OP_NOTSTAR etc.) are used for a repeated,
-negated, single-character class. The normal ones (OP_STAR etc.) are used for a
-repeated positive single-character class.
+Another set of 13 repeating opcodes (called OP_NOTSTAR etc.) are used for
+repeated, negated, single-character classes. The normal single-character
+opcodes (OP_STAR, etc.) are used for repeated positive single-character
+classes.
-When there's more than one character in a class and all the characters are less
-than 256, OP_CLASS is used for a positive class, and OP_NCLASS for a negative
-one. In either case, the opcode is followed by a 32-byte bit map containing a 1
-bit for every character that is acceptable. The bits are counted from the least
-significant end of each byte.
+When there is more than one character in a class and all the characters are
+less than 256, OP_CLASS is used for a positive class, and OP_NCLASS for a
+negative one. In either case, the opcode is followed by a 32-byte (16-short)
+bit map containing a 1 bit for every character that is acceptable. The bits are
+counted from the least significant end of each unit. In caseless mode, bits for
+both cases are set.
-The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8 mode,
-subject characters with values greater than 256 can be handled correctly. For
-OP_CLASS they don't match, whereas for OP_NCLASS they do.
+The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8/16 mode,
+subject characters with values greater than 255 can be handled correctly. For
+OP_CLASS they do not match, whereas for OP_NCLASS they do.
-For classes containing characters with values > 255, OP_XCLASS is used. It
-optionally uses a bit map (if any characters lie within it), followed by a list
-of pairs and single characters. There is a flag character than indicates
-whether it's a positive or a negative class.
+For classes containing characters with values greater than 255, OP_XCLASS is
+used. It optionally uses a bit map (if any characters lie within it), followed
+by a list of pairs (for a range) and single characters. In caseless mode, both
+cases are explicitly listed. There is a flag character than indicates whether
+it is a positive or a negative class.
Back references
---------------
-OP_REF is followed by two bytes containing the reference number.
+OP_REF (caseful) or OP_REFI (caseless) is followed by two bytes (one short)
+containing the reference number.
Repeating character classes and back references
-----------------------------------------------
Single-character classes are handled specially (see above). This section
-applies to OP_CLASS and OP_REF. In both cases, the repeat information follows
-the base item. The matching code looks at the following opcode to see if it is
-one of
+applies to OP_CLASS and OP_REF[I]. In both cases, the repeat information
+follows the base item. The matching code looks at the following opcode to see
+if it is one of
OP_CRSTAR
OP_CRMINSTAR
@@ -305,10 +334,10 @@ one of
OP_CRRANGE
OP_CRMINRANGE
-All but the last two are just single-byte items. The others are followed by
-four bytes of data, comprising the minimum and maximum repeat counts. There are
-no special possessive opcodes for these repeats; a possessive repeat is
-compiled into an atomic group.
+All but the last two are just single-unit items. The others are followed by
+four bytes (two shorts) of data, comprising the minimum and maximum repeat
+counts. There are no special possessive opcodes for these repeats; a possessive
+repeat is compiled into an atomic group.
Brackets and alternation
@@ -318,7 +347,8 @@ A pair of non-capturing (round) brackets is wrapped round each expression at
compile time, so alternation always happens in the context of brackets.
[Note for North Americans: "bracket" to some English speakers, including
-myself, can be round, square, curly, or pointy. Hence this usage.]
+myself, can be round, square, curly, or pointy. Hence this usage rather than
+"parentheses".]
Non-capturing brackets use the opcode OP_BRA. Originally PCRE was limited to 99
capturing brackets and it used a different opcode for each one. From release
@@ -330,16 +360,17 @@ A bracket opcode is followed by LINK_SIZE bytes which give the offset to the
next alternative OP_ALT or, if there aren't any branches, to the matching
OP_KET opcode. Each OP_ALT is followed by LINK_SIZE bytes giving the offset to
the next one, or to the OP_KET opcode. For capturing brackets, the bracket
-number immediately follows the offset, always as a 2-byte item.
+number immediately follows the offset, always as a 2-byte (one short) item.
-OP_KET is used for subpatterns that do not repeat indefinitely, while
+OP_KET is used for subpatterns that do not repeat indefinitely, and
OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or
-maximally respectively. All three are followed by LINK_SIZE bytes giving (as a
-positive number) the offset back to the matching bracket opcode.
+maximally respectively (see below for possessive repetitions). All three are
+followed by LINK_SIZE bytes giving (as a positive number) the offset back to
+the matching bracket opcode.
If a subpattern is quantified such that it is permitted to match zero times, it
is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are
-single-byte opcodes that tell the matcher that skipping the following
+single-unit opcodes that tell the matcher that skipping the following
subpattern entirely is a valid branch. In the case of the first two, not
skipping the pattern is also valid (greedy and non-greedy). The third is used
when a pattern has the quantifier {0,0}. It cannot be entirely discarded,
@@ -362,6 +393,15 @@ final replication is changed to OP_SBRA or OP_SCBRA. This tells the matcher
that it needs to check for matching an empty string when it hits OP_KETRMIN or
OP_KETRMAX, and if so, to break the loop.
+Possessive brackets
+-------------------
+
+When a repeated group (capturing or non-capturing) is marked as possessive by
+the "+" notation, e.g. (abc)++, different opcodes are used. Their names all
+have POS on the end, e.g. OP_BRAPOS instead of OP_BRA and OP_SCPBRPOS instead
+of OP_SCBRA. The end of such a group is marked by OP_KETRPOS. If the minimum
+repetition is zero, the group is preceded by OP_BRAPOSZERO.
+
Assertions
----------
@@ -369,11 +409,11 @@ Assertions
Forward assertions are just like other subpatterns, but starting with one of
the opcodes OP_ASSERT or OP_ASSERT_NOT. Backward assertions use the opcodes
OP_ASSERTBACK and OP_ASSERTBACK_NOT, and the first opcode inside the assertion
-is OP_REVERSE, followed by a two byte count of the number of characters to move
-back the pointer in the subject string. When operating in UTF-8 mode, the count
-is a character count rather than a byte count. A separate count is present in
-each alternative of a lookbehind assertion, allowing them to have different
-fixed lengths.
+is OP_REVERSE, followed by a two byte (one short) count of the number of
+characters to move back the pointer in the subject string. In ASCII mode, the
+count is a number of units, but in UTF-8/16 mode each character may occupy more
+than one unit. A separate count is present in each alternative of a lookbehind
+assertion, allowing them to have different fixed lengths.
Once-only (atomic) subpatterns
@@ -390,14 +430,15 @@ Conditional subpatterns
These are like other subpatterns, but they start with the opcode OP_COND, or
OP_SCOND for one that might match an empty string in an unbounded repeat. If
the condition is a back reference, this is stored at the start of the
-subpattern using the opcode OP_CREF followed by two bytes containing the
-reference number. OP_NCREF is used instead if the reference was generated by
-name (so that the runtime code knows to check for duplicate names).
+subpattern using the opcode OP_CREF followed by two bytes (one short)
+containing the reference number. OP_NCREF is used instead if the reference was
+generated by name (so that the runtime code knows to check for duplicate
+names).
If the condition is "in recursion" (coded as "(?(R)"), or "in recursion of
group x" (coded as "(?(Rx)"), the group number is stored at the start of the
subpattern using the opcode OP_RREF or OP_NRREF (cf OP_NCREF), and a value of
-zero for "the whole pattern". For a DEFINE condition, just the single byte
+zero for "the whole pattern". For a DEFINE condition, just the single unit
OP_DEF is used (it has no associated data). Otherwise, a conditional subpattern
always starts with one of the assertions.
@@ -416,25 +457,12 @@ are not strictly a recursion.
Callout
-------
-OP_CALLOUT is followed by one byte of data that holds a callout number in the
+OP_CALLOUT is followed by one unit of data that holds a callout number in the
range 0 to 254 for manual callouts, or 255 for an automatic callout. In both
-cases there follows a two-byte value giving the offset in the pattern to the
-start of the following item, and another two-byte item giving the length of the
-next item.
-
-
-Changing options
-----------------
+cases there follows a two-byte (one short) value giving the offset in the
+pattern to the start of the following item, and another two-byte (one short)
+item giving the length of the next item.
-If any of the /i, /m, or /s options are changed within a pattern, an OP_OPT
-opcode is compiled, followed by one byte containing the new settings of these
-flags. If there are several alternatives, there is an occurrence of OP_OPT at
-the start of all those following the first options change, to set appropriate
-options for the start of the alternative. Immediately after the end of the
-group there is another such item to reset the flags to their previous values. A
-change of flag right at the very start of the pattern can be handled entirely
-at compile time, and so does not cause anything to be put into the compiled
-data.
Philip Hazel
-October 2010
+February 2012
diff --git a/ext/pcre/pcrelib/LICENCE b/ext/pcre/pcrelib/LICENCE
index 0dd22571a..5ce31a828 100644
--- a/ext/pcre/pcrelib/LICENCE
+++ b/ext/pcre/pcrelib/LICENCE
@@ -9,7 +9,9 @@ specified below. The documentation for PCRE, supplied in the "doc"
directory, is distributed under the same terms as the software itself.
The basic library functions are written in C and are freestanding. Also
-included in the distribution is a set of C++ wrapper functions.
+included in the distribution is a set of C++ wrapper functions, and a
+just-in-time compiler that can be used to optimize pattern matching. These
+are both optional features that can be omitted when the library is built.
THE BASIC LIBRARY FUNCTIONS
@@ -22,7 +24,29 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2010 University of Cambridge
+Copyright (c) 1997-2012 University of Cambridge
+All rights reserved.
+
+
+PCRE JUST-IN-TIME COMPILATION SUPPORT
+-------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2010-2012 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2009-2012 Zoltan Herczeg
All rights reserved.
@@ -31,7 +55,7 @@ THE C++ WRAPPER FUNCTIONS
Contributed by: Google Inc.
-Copyright (c) 2007-2010, Google Inc.
+Copyright (c) 2007-2012, Google Inc.
All rights reserved.
diff --git a/ext/pcre/pcrelib/NEWS b/ext/pcre/pcrelib/NEWS
index 5f2b29bd2..3c932a464 100644
--- a/ext/pcre/pcrelib/NEWS
+++ b/ext/pcre/pcrelib/NEWS
@@ -1,6 +1,82 @@
News about PCRE releases
------------------------
+Release 8.31 06-July-2012
+-------------------------
+
+This is mainly a bug-fixing release, with a small number of developments:
+
+. The JIT compiler now supports partial matching and the (*MARK) and
+ (*COMMIT) verbs.
+
+. PCRE_INFO_MAXLOOKBEHIND can be used to find the longest lookbehing in a
+ pattern.
+
+. There should be a performance improvement when using the heap instead of the
+ stack for recursion.
+
+. pcregrep can now be linked with libedit as an alternative to libreadline.
+
+. pcregrep now has a --file-list option where the list of files to scan is
+ given as a file.
+
+. pcregrep now recognizes binary files and there are related options.
+
+. The Unicode tables have been updated to 6.1.0.
+
+As always, the full list of changes is in the ChangeLog file.
+
+
+Release 8.30 04-February-2012
+-----------------------------
+
+Release 8.30 introduces a major new feature: support for 16-bit character
+strings, compiled as a separate library. There are a few changes to the
+8-bit library, in addition to some bug fixes.
+
+. The pcre_info() function, which has been obsolete for over 10 years, has
+ been removed.
+
+. When a compiled pattern was saved to a file and later reloaded on a host
+ with different endianness, PCRE used automatically to swap the bytes in some
+ of the data fields. With the advent of the 16-bit library, where more of this
+ swapping is needed, it is no longer done automatically. Instead, the bad
+ endianness is detected and a specific error is given. The user can then call
+ a new function called pcre_pattern_to_host_byte_order() (or an equivalent
+ 16-bit function) to do the swap.
+
+. In UTF-8 mode, the values 0xd800 to 0xdfff are not legal Unicode
+ code points and are now faulted. (They are the so-called "surrogates"
+ that are reserved for coding high values in UTF-16.)
+
+
+Release 8.21 12-Dec-2011
+------------------------
+
+This is almost entirely a bug-fix release. The only new feature is the ability
+to obtain the size of the memory used by the JIT compiler.
+
+
+Release 8.20 21-Oct-2011
+------------------------
+
+The main change in this release is the inclusion of Zoltan Herczeg's
+just-in-time compiler support, which can be accessed by building PCRE with
+--enable-jit. Large performance benefits can be had in many situations. 8.20
+also fixes an unfortunate bug that was introduced in 8.13 as well as tidying up
+a number of infelicities and differences from Perl.
+
+
+Release 8.13 16-Aug-2011
+------------------------
+
+This is mainly a bug-fix release. There has been a lot of internal refactoring.
+The Unicode tables have been updated. The only new feature in the library is
+the passing of *MARK information to callouts. Some additions have been made to
+pcretest to make testing easier and more comprehensive. There is a new option
+for pcregrep to adjust its internal buffer size.
+
+
Release 8.12 15-Jan-2011
------------------------
diff --git a/ext/pcre/pcrelib/NON-UNIX-USE b/ext/pcre/pcrelib/NON-UNIX-USE
index 8619b5846..a25546b6f 100644
--- a/ext/pcre/pcrelib/NON-UNIX-USE
+++ b/ext/pcre/pcrelib/NON-UNIX-USE
@@ -1,501 +1,7 @@
Compiling PCRE on non-Unix systems
----------------------------------
-This document contains the following sections:
+This has been renamed to better reflect its contents. Please see the file
+NON-AUTOTOOLS-BUILD for details of how to build PCRE without using autotools.
- General
- Generic instructions for the PCRE C library
- The C++ wrapper functions
- Building for virtual Pascal
- Stack size in Windows environments
- Linking programs in Windows environments
- Comments about Win32 builds
- Building PCRE on Windows with CMake
- Use of relative paths with CMake on Windows
- Testing with RunTest.bat
- Building under Windows with BCC5.5
- Building PCRE on OpenVMS
- Building PCRE on Stratus OpenVOS
-
-
-GENERAL
-
-I (Philip Hazel) have no experience of Windows or VMS sytems and how their
-libraries work. The items in the PCRE distribution and Makefile that relate to
-anything other than Unix-like systems are untested by me.
-
-There are some other comments and files (including some documentation in CHM
-format) in the Contrib directory on the FTP site:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
-
-If you want to compile PCRE for a non-Unix system (especially for a system that
-does not support "configure" and "make" files), note that the basic PCRE
-library consists entirely of code written in Standard C, and so should compile
-successfully on any system that has a Standard C compiler and library. The C++
-wrapper functions are a separate issue (see below).
-
-The PCRE distribution includes a "configure" file for use by the Configure/Make
-build system, as found in many Unix-like environments. There is also support
-support for CMake, which some users prefer, especially in Windows environments.
-There are some instructions for CMake under Windows in the section entitled
-"Building PCRE with CMake" below. CMake can also be used to build PCRE in
-Unix-like systems.
-
-
-GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
-
-The following are generic comments about building the PCRE C library "by hand".
-
- (1) Copy or rename the file config.h.generic as config.h, and edit the macro
- settings that it contains to whatever is appropriate for your environment.
- In particular, if you want to force a specific value for newline, you can
- define the NEWLINE macro. When you compile any of the PCRE modules, you
- must specify -DHAVE_CONFIG_H to your compiler so that config.h is included
- in the sources.
-
- An alternative approach is not to edit config.h, but to use -D on the
- compiler command line to make any changes that you need to the
- configuration options. In this case -DHAVE_CONFIG_H must not be set.
-
- NOTE: There have been occasions when the way in which certain parameters
- in config.h are used has changed between releases. (In the configure/make
- world, this is handled automatically.) When upgrading to a new release,
- you are strongly advised to review config.h.generic before re-using what
- you had previously.
-
- (2) Copy or rename the file pcre.h.generic as pcre.h.
-
- (3) EITHER:
- Copy or rename file pcre_chartables.c.dist as pcre_chartables.c.
-
- OR:
- Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if
- you have set up config.h), and then run it with the single argument
- "pcre_chartables.c". This generates a set of standard character tables
- and writes them to that file. The tables are generated using the default
- C locale for your system. If you want to use a locale that is specified
- by LC_xxx environment variables, add the -L option to the dftables
- command. You must use this method if you are building on a system that
- uses EBCDIC code.
-
- The tables in pcre_chartables.c are defaults. The caller of PCRE can
- specify alternative tables at run time.
-
- (4) Ensure that you have the following header files:
-
- pcre_internal.h
- ucp.h
-
- (5) Also ensure that you have the following file, which is #included as source
- when building a debugging version of PCRE, and is also used by pcretest.
-
- pcre_printint.src
-
- (6) Compile the following source files, setting -DHAVE_CONFIG_H as a compiler
- option if you have set up config.h with your configuration, or else use
- other -D settings to change the configuration as required.
-
- pcre_chartables.c
- pcre_compile.c
- pcre_config.c
- pcre_dfa_exec.c
- pcre_exec.c
- pcre_fullinfo.c
- pcre_get.c
- pcre_globals.c
- pcre_info.c
- pcre_maketables.c
- pcre_newline.c
- pcre_ord2utf8.c
- pcre_refcount.c
- pcre_study.c
- pcre_tables.c
- pcre_try_flipped.c
- pcre_ucd.c
- pcre_valid_utf8.c
- pcre_version.c
- pcre_xclass.c
-
- Make sure that you include -I. in the compiler command (or equivalent for
- an unusual compiler) so that all included PCRE header files are first
- sought in the current directory. Otherwise you run the risk of picking up
- a previously-installed file from somewhere else.
-
- (7) Now link all the compiled code into an object library in whichever form
- your system keeps such libraries. This is the basic PCRE C library. If
- your system has static and shared libraries, you may have to do this once
- for each type.
-
- (8) Similarly, if you want to build the POSIX wrapper functions, ensure that
- you have the pcreposix.h file and then compile pcreposix.c (remembering
- -DHAVE_CONFIG_H if necessary). Link the result (on its own) as the
- pcreposix library.
-
- (9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H).
- This needs the functions in the PCRE library when linking. It also needs
- the pcreposix wrapper functions unless you compile it with -DNOPOSIX. The
- pcretest.c program also needs the pcre_printint.src source file, which it
- #includes.
-
-(10) Run pcretest on the testinput files in the testdata directory, and check
- that the output matches the corresponding testoutput files. Note that the
- supplied files are in Unix format, with just LF characters as line
- terminators. You may need to edit them to change this if your system uses
- a different convention. If you are using Windows, you probably should use
- the wintestinput3 file instead of testinput3 (and the corresponding output
- file). This is a locale test; wintestinput3 sets the locale to "french"
- rather than "fr_FR", and there some minor output differences.
-
-(11) If you want to use the pcregrep command, compile and link pcregrep.c; it
- uses only the basic PCRE library (it does not need the pcreposix library).
-
-
-THE C++ WRAPPER FUNCTIONS
-
-The PCRE distribution also contains some C++ wrapper functions and tests,
-contributed by Google Inc. On a system that can use "configure" and "make",
-the functions are automatically built into a library called pcrecpp. It should
-be straightforward to compile the .cc files manually on other systems. The
-files called xxx_unittest.cc are test programs for each of the corresponding
-xxx.cc files.
-
-
-BUILDING FOR VIRTUAL PASCAL
-
-A script for building PCRE using Borland's C++ compiler for use with VPASCAL
-was contributed by Alexander Tokarev. Stefan Weber updated the script and added
-additional files. The following files in the distribution are for building PCRE
-for use with VP/Borland: makevp_c.txt, makevp_l.txt, makevp.bat, pcregexp.pas.
-
-
-STACK SIZE IN WINDOWS ENVIRONMENTS
-
-The default processor stack size of 1Mb in some Windows environments is too
-small for matching patterns that need much recursion. In particular, test 2 may
-fail because of this. Normally, running out of stack causes a crash, but there
-have been cases where the test program has just died silently. See your linker
-documentation for how to increase stack size if you experience problems. The
-Linux default of 8Mb is a reasonable choice for the stack, though even that can
-be too small for some pattern/subject combinations.
-
-PCRE has a compile configuration option to disable the use of stack for
-recursion so that heap is used instead. However, pattern matching is
-significantly slower when this is done. There is more about stack usage in the
-"pcrestack" documentation.
-
-
-LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
-
-If you want to statically link a program against a PCRE library in the form of
-a non-dll .a file, you must define PCRE_STATIC before including pcre.h or
-pcrecpp.h, otherwise the pcre_malloc() and pcre_free() exported functions will
-be declared __declspec(dllimport), with unwanted results.
-
-
-CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
-
-It is possible to compile programs to use different calling conventions using
-MSVC. Search the web for "calling conventions" for more information. To make it
-easier to change the calling convention for the exported functions in the
-PCRE library, the macro PCRE_CALL_CONVENTION is present in all the external
-definitions. It can be set externally when compiling (e.g. in CFLAGS). If it is
-not set, it defaults to empty; the default calling convention is then used
-(which is what is wanted most of the time).
-
-
-COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below)
-
-There are two ways of building PCRE using the "configure, make, make install"
-paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
-the same thing; they are completely different from each other. There is also
-support for building using CMake, which some users find a more straightforward
-way of building PCRE under Windows. However, the tests are not run
-automatically when CMake is used.
-
-The MinGW home page (http://www.mingw.org/) says this:
-
- MinGW: A collection of freely available and freely distributable Windows
- specific header files and import libraries combined with GNU toolsets that
- allow one to produce native Windows programs that do not rely on any
- 3rd-party C runtime DLLs.
-
-The Cygwin home page (http://www.cygwin.com/) says this:
-
- Cygwin is a Linux-like environment for Windows. It consists of two parts:
-
- . A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing
- substantial Linux API functionality
-
- . A collection of tools which provide Linux look and feel.
-
- The Cygwin DLL currently works with all recent, commercially released x86 32
- bit and 64 bit versions of Windows, with the exception of Windows CE.
-
-On both MinGW and Cygwin, PCRE should build correctly using:
-
- ./configure && make && make install
-
-This should create two libraries called libpcre and libpcreposix, and, if you
-have enabled building the C++ wrapper, a third one called libpcrecpp. These are
-independent libraries: when you like with libpcreposix or libpcrecpp you must
-also link with libpcre, which contains the basic functions. (Some earlier
-releases of PCRE included the basic libpcre functions in libpcreposix. This no
-longer happens.)
-
-A user submitted a special-purpose patch that makes it easy to create
-"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll"
-as a special target. If you use this target, no other files are built, and in
-particular, the pcretest and pcregrep programs are not built. An example of how
-this might be used is:
-
- ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll
-
-Using Cygwin's compiler generates libraries and executables that depend on
-cygwin1.dll. If a library that is generated this way is distributed,
-cygwin1.dll has to be distributed as well. Since cygwin1.dll is under the GPL
-licence, this forces not only PCRE to be under the GPL, but also the entire
-application. A distributor who wants to keep their own code proprietary must
-purchase an appropriate Cygwin licence.
-
-MinGW has no such restrictions. The MinGW compiler generates a library or
-executable that can run standalone on Windows without any third party dll or
-licensing issues.
-
-But there is more complication:
-
-If a Cygwin user uses the -mno-cygwin Cygwin gcc flag, what that really does is
-to tell Cygwin's gcc to use the MinGW gcc. Cygwin's gcc is only acting as a
-front end to MinGW's gcc (if you install Cygwin's gcc, you get both Cygwin's
-gcc and MinGW's gcc). So, a user can:
-
-. Build native binaries by using MinGW or by getting Cygwin and using
- -mno-cygwin.
-
-. Build binaries that depend on cygwin1.dll by using Cygwin with the normal
- compiler flags.
-
-The test files that are supplied with PCRE are in Unix format, with LF
-characters as line terminators. It may be necessary to change the line
-terminators in order to get some of the tests to work.
-
-
-BUILDING PCRE ON WINDOWS WITH CMAKE
-
-CMake is an alternative configuration facility that can be used instead of the
-traditional Unix "configure". CMake creates project files (make files, solution
-files, etc.) tailored to numerous development environments, including Visual
-Studio, Borland, Msys, MinGW, NMake, and Unix. The following instructions
-were contributed by a PCRE user.
-
-1. Install the latest CMake version available from http://www.cmake.org/, and
- ensure that cmake\bin is on your path.
-
-2. Unzip (retaining folder structure) the PCRE source tree into a source
- directory such as C:\pcre.
-
-3. Create a new, empty build directory, for example C:\pcre\build\
-
-4. Run cmake-gui from the Shell envirornment of your build tool, for example,
- Msys for Msys/MinGW or Visual Studio Command Prompt for VC/VC++.
-
-5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build
- directories, respectively.
-
-6. Hit the "Configure" button.
-
-7. Select the particular IDE / build tool that you are using (Visual
- Studio, MSYS makefiles, MinGW makefiles, etc.)
-
-8. The GUI will then list several configuration options. This is where
- you can enable UTF-8 support or other PCRE optional features.
-
-9. Hit "Configure" again. The adjacent "Generate" button should now be
- active.
-
-10. Hit "Generate".
-
-11. The build directory should now contain a usable build system, be it a
- solution file for Visual Studio, makefiles for MinGW, etc. Exit from
- cmake-gui and use the generated build system with your compiler or IDE.
-
-
-USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
-
-A PCRE user comments as follows:
-
-I thought that others may want to know the current state of
-CMAKE_USE_RELATIVE_PATHS support on Windows.
-
-Here it is:
--- AdditionalIncludeDirectories is only partially modified (only the
-first path - see below)
--- Only some of the contained file paths are modified - shown below for
-pcre.vcproj
--- It properly modifies
-
-I am sure CMake people can fix that if they want to. Until then one will
-need to replace existing absolute paths in project files with relative
-paths manually (e.g. from VS) - relative to project file location. I did
-just that before being told to try CMAKE_USE_RELATIVE_PATHS. Not a big
-deal.
-
-AdditionalIncludeDirectories="E:\builds\pcre\build;E:\builds\pcre\pcre-7.5;"
-AdditionalIncludeDirectories=".;E:\builds\pcre\pcre-7.5;"
-
-RelativePath="pcre.h">
-RelativePath="pcre_chartables.c">
-RelativePath="pcre_chartables.c.rule">
-
-
-TESTING WITH RUNTEST.BAT
-
-1. Copy RunTest.bat into the directory where pcretest.exe has been created.
-
-2. Edit RunTest.bat and insert a line that indentifies the relative location of
- the pcre source, e.g.:
-
- set srcdir=..\pcre-7.4-RC3
-
-3. Run RunTest.bat from a command shell environment. Test outputs will
- automatically be compared to expected results, and discrepancies will
- identified in the console output.
-
-4. To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
- pcre_scanner_unittest.exe.
-
-
-BUILDING UNDER WINDOWS WITH BCC5.5
-
-Michael Roy sent these comments about building PCRE under Windows with BCC5.5:
-
- Some of the core BCC libraries have a version of PCRE from 1998 built in,
- which can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a
- version mismatch. I'm including an easy workaround below, if you'd like to
- include it in the non-unix instructions:
-
- When linking a project with BCC5.5, pcre.lib must be included before any of
- the libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command
- line.
-
-
-BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x
-
-Vincent Richomme sent a zip archive of files to help with this process. They
-can be found in the file "pcre-vsbuild.zip" in the Contrib directory of the FTP
-site.
-
-
-BUILDING PCRE ON OPENVMS
-
-Dan Mooney sent the following comments about building PCRE on OpenVMS. They
-relate to an older version of PCRE that used fewer source files, so the exact
-commands will need changing. See the current list of source files above.
-
-"It was quite easy to compile and link the library. I don't have a formal
-make file but the attached file [reproduced below] contains the OpenVMS DCL
-commands I used to build the library. I had to add #define
-POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.
-
-The library was built on:
-O/S: HP OpenVMS v7.3-1
-Compiler: Compaq C v6.5-001-48BCD
-Linker: vA13-01
-
-The test results did not match 100% due to the issues you mention in your
-documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I
-modified some of the character tables temporarily and was able to get the
-results to match. Tests using the fr locale did not match since I don't have
-that locale loaded. The study size was always reported to be 3 less than the
-value in the standard test output files."
-
-=========================
-$! This DCL procedure builds PCRE on OpenVMS
-$!
-$! I followed the instructions in the non-unix-use file in the distribution.
-$!
-$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
-$ COMPILE DFTABLES.C
-$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ
-$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C
-$ COMPILE MAKETABLES.C
-$ COMPILE GET.C
-$ COMPILE STUDY.C
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.
-$ COMPILE PCRE.C
-$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$ COMPILE PCREPOSIX.C
-$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ
-$ COMPILE PCRETEST.C
-$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB
-$! C programs that want access to command line arguments must be
-$! defined as a symbol
-$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"
-$! Arguments must be enclosed in quotes.
-$ PCRETEST "-C"
-$! Test results:
-$!
-$! The test results did not match 100%. The functions isprint(), iscntrl(),
-$! isgraph() and ispunct() on OpenVMS must not produce the same results
-$! as the system that built the test output files provided with the
-$! distribution.
-$!
-$! The study size did not match and was always 3 less on OpenVMS.
-$!
-$! Locale could not be set to fr
-$!
-=========================
-
-
-BUILDING PCRE ON STRATUS OPENVOS
-
-These notes on the port of PCRE to VOS (lightly edited) were supplied by
-Ashutosh Warikoo, whose email address has the local part awarikoo and the
-domain nse.co.in. The port was for version 7.9 in August 2009.
-
-1. Building PCRE
-
-I built pcre on OpenVOS Release 17.0.1at using GNU Tools 3.4a without any
-problems. I used the following packages to build PCRE:
-
- ftp://ftp.stratus.com/pub/vos/posix/ga/posix.save.evf.gz
-
-Please read and follow the instructions that come with these packages. To start
-the build of pcre, from the root of the package type:
-
- ./build.sh
-
-2. Installing PCRE
-
-Once you have successfully built PCRE, login to the SysAdmin group, switch to
-the root user, and type
-
- [ !create_dir (master_disk)>usr --if needed ]
- [ !create_dir (master_disk)>usr>local --if needed ]
- !gmake install
-
-This installs PCRE and its man pages into /usr/local. You can add
-(master_disk)>usr>local>bin to your command search paths, or if you are in
-BASH, add /usr/local/bin to the PATH environment variable.
-
-4. Restrictions
-
-This port requires readline library optionally. However during the build I
-faced some yet unexplored errors while linking with readline. As it was an
-optional component I chose to disable it.
-
-5. Known Problems
-
-I ran a the test suite, but you will have to be your own judge of whether this
-command, and this port, suits your purposes. If you find any problems that
-appear to be related to the port itself, please let me know. Please see the
-build.log file in the root of the package also.
-
-
-=========================
-Last Updated: 26 May 2010
-****
+####
diff --git a/ext/pcre/pcrelib/README b/ext/pcre/pcrelib/README
index 2f3e92694..8b67f1001 100644
--- a/ext/pcre/pcrelib/README
+++ b/ext/pcre/pcrelib/README
@@ -18,11 +18,12 @@ The contents of this README file are:
The PCRE APIs
Documentation for PCRE
Contributions by users of PCRE
- Building PCRE on non-Unix systems
- Building PCRE on Unix-like systems
- Retrieving configuration information on Unix-like systems
- Shared libraries on Unix-like systems
- Cross-compiling on Unix-like systems
+ Building PCRE on non-Unix-like systems
+ Building PCRE without using autotools
+ Building PCRE using autotools
+ Retrieving configuration information
+ Shared libraries
+ Cross-compiling using autotools
Using HP's ANSI C++ compiler (aCC)
Using PCRE from MySQL
Making new tarballs
@@ -34,16 +35,19 @@ The contents of this README file are:
The PCRE APIs
-------------
-PCRE is written in C, and it has its own API. The distribution also includes a
-set of C++ wrapper functions (see the pcrecpp man page for details), courtesy
-of Google Inc.
+PCRE is written in C, and it has its own API. There are two sets of functions,
+one for the 8-bit library, which processes strings of bytes, and one for the
+16-bit library, which processes strings of 16-bit values. The distribution also
+includes a set of C++ wrapper functions (see the pcrecpp man page for details),
+courtesy of Google Inc., which can be used to call the 8-bit PCRE library from
+C++.
-In addition, there is a set of C wrapper functions that are based on the POSIX
-regular expression API (see the pcreposix man page). These end up in the
-library called libpcreposix. Note that this just provides a POSIX calling
-interface to PCRE; the regular expressions themselves still follow Perl syntax
-and semantics. The POSIX API is restricted, and does not give full access to
-all of PCRE's facilities.
+In addition, there is a set of C wrapper functions (again, just for the 8-bit
+library) that are based on the POSIX regular expression API (see the pcreposix
+man page). These end up in the library called libpcreposix. Note that this just
+provides a POSIX calling interface to PCRE; the regular expressions themselves
+still follow Perl syntax and semantics. The POSIX API is restricted, and does
+not give full access to all of PCRE's facilities.
The header file for the POSIX-style functions is called pcreposix.h. The
official POSIX name is regex.h, but I did not want to risk possible problems
@@ -106,36 +110,45 @@ Windows (I myself do not use Windows). Nowadays there is more Windows support
in the standard distribution, so these contibutions have been archived.
-Building PCRE on non-Unix systems
----------------------------------
+Building PCRE on non-Unix-like systems
+--------------------------------------
+
+For a non-Unix-like system, please read the comments in the file
+NON-AUTOTOOLS-BUILD, though if your system supports the use of "configure" and
+"make" you may be able to build PCRE using autotools in the same way as for
+many Unix-like systems.
-For a non-Unix system, please read the comments in the file NON-UNIX-USE,
-though if your system supports the use of "configure" and "make" you may be
-able to build PCRE in the same way as for Unix-like systems. PCRE can also be
-configured in many platform environments using the GUI facility provided by
-CMake's cmake-gui command. This creates Makefiles, solution files, etc.
+PCRE can also be configured using the GUI facility provided by CMake's
+cmake-gui command. This creates Makefiles, solution files, etc. The file
+NON-AUTOTOOLS-BUILD has information about CMake.
PCRE has been compiled on many different operating systems. It should be
straightforward to build PCRE on any system that has a Standard C compiler and
library, because it uses only Standard C functions.
-Building PCRE on Unix-like systems
-----------------------------------
+Building PCRE without using autotools
+-------------------------------------
+
+The use of autotools (in particular, libtool) is problematic in some
+environments, even some that are Unix or Unix-like. See the NON-AUTOTOOLS-BUILD
+file for ways of building PCRE without using autotools.
+
+
+Building PCRE using autotools
+-----------------------------
If you are using HP's ANSI C++ compiler (aCC), please see the special note
in the section entitled "Using HP's ANSI C++ compiler (aCC)" below.
-The following instructions assume the use of the widely used "configure, make,
-make install" process. There is also support for CMake in the PCRE
-distribution; there are some comments about using CMake in the NON-UNIX-USE
-file, though it can also be used in Unix-like systems.
+The following instructions assume the use of the widely used "configure; make;
+make install" (autotools) process.
-To build PCRE on a Unix-like system, first run the "configure" command from the
-PCRE distribution directory, with your current directory set to the directory
-where you want the files to be created. This command is a standard GNU
-"autoconf" configuration script, for which generic instructions are supplied in
-the file INSTALL.
+To build PCRE on system that supports autotools, first run the "configure"
+command from the PCRE distribution directory, with your current directory set
+to the directory where you want the files to be created. This command is a
+standard GNU "autoconf" configuration script, for which generic instructions
+are supplied in the file INSTALL.
Most commonly, people build PCRE within its own distribution directory, and in
this case, on many systems, just running "./configure" is sufficient. However,
@@ -143,9 +156,9 @@ the usual methods of changing standard defaults are available. For example:
CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local
-specifies that the C compiler should be run with the flags '-O2 -Wall' instead
-of the default, and that "make install" should install PCRE under /opt/local
-instead of the default /usr/local.
+This command specifies that the C compiler should be run with the flags '-O2
+-Wall' instead of the default, and that "make install" should install PCRE
+under /opt/local instead of the default /usr/local.
If you want to build in a different directory, just run "configure" with that
directory as current. For example, suppose you have unpacked the PCRE source
@@ -159,27 +172,59 @@ possible to build it as a C++ library, though the provided building apparatus
does not have any features to support this.
There are some optional features that can be included or omitted from the PCRE
-library. You can read more about them in the pcrebuild man page.
+library. They are also documented in the pcrebuild man page.
-. If you want to suppress the building of the C++ wrapper library, you can add
- --disable-cpp to the "configure" command. Otherwise, when "configure" is run,
- it will try to find a C++ compiler and C++ header files, and if it succeeds,
- it will try to build the C++ wrapper.
+. By default, both shared and static libraries are built. You can change this
+ by adding one of these options to the "configure" command:
+
+ --disable-shared
+ --disable-static
+
+ (See also "Shared libraries on Unix-like systems" below.)
+
+. By default, only the 8-bit library is built. If you add --enable-pcre16 to
+ the "configure" command, the 16-bit library is also built. If you want only
+ the 16-bit library, use "./configure --enable-pcre16 --disable-pcre8".
+
+. If you are building the 8-bit library and want to suppress the building of
+ the C++ wrapper library, you can add --disable-cpp to the "configure"
+ command. Otherwise, when "configure" is run without --disable-pcre8, it will
+ try to find a C++ compiler and C++ header files, and if it succeeds, it will
+ try to build the C++ wrapper.
+
+. If you want to include support for just-in-time compiling, which can give
+ large performance improvements on certain platforms, add --enable-jit to the
+ "configure" command. This support is available only for certain hardware
+ architectures. If you try to enable it on an unsupported architecture, there
+ will be a compile time error.
+
+. When JIT support is enabled, pcregrep automatically makes use of it, unless
+ you add --disable-pcregrep-jit to the "configure" command.
. If you want to make use of the support for UTF-8 Unicode character strings in
- PCRE, you must add --enable-utf8 to the "configure" command. Without it, the
- code for handling UTF-8 is not included in the library. Even when included,
- it still has to be enabled by an option at run time. When PCRE is compiled
- with this option, its input can only either be ASCII or UTF-8, even when
- running on EBCDIC platforms. It is not possible to use both --enable-utf8 and
- --enable-ebcdic at the same time.
-
-. If, in addition to support for UTF-8 character strings, you want to include
- support for the \P, \p, and \X sequences that recognize Unicode character
- properties, you must add --enable-unicode-properties to the "configure"
- command. This adds about 30K to the size of the library (in the form of a
- property table); only the basic two-letter properties such as Lu are
- supported.
+ the 8-bit library, or UTF-16 Unicode character strings in the 16-bit library,
+ you must add --enable-utf to the "configure" command. Without it, the code
+ for handling UTF-8 and UTF-16 is not included in the relevant library. Even
+ when --enable-utf is included, the use of a UTF encoding still has to be
+ enabled by an option at run time. When PCRE is compiled with this option, its
+ input can only either be ASCII or UTF-8/16, even when running on EBCDIC
+ platforms. It is not possible to use both --enable-utf and --enable-ebcdic at
+ the same time.
+
+. There are no separate options for enabling UTF-8 and UTF-16 independently
+ because that would allow ridiculous settings such as requesting UTF-16
+ support while building only the 8-bit library. However, the option
+ --enable-utf8 is retained for backwards compatibility with earlier releases
+ that did not support 16-bit character strings. It is synonymous with
+ --enable-utf. It is not possible to configure one library with UTF support
+ and the other without in the same configuration.
+
+. If, in addition to support for UTF-8/16 character strings, you want to
+ include support for the \P, \p, and \X sequences that recognize Unicode
+ character properties, you must add --enable-unicode-properties to the
+ "configure" command. This adds about 30K to the size of the library (in the
+ form of a property table); only the basic two-letter properties such as Lu
+ are supported.
. You can build PCRE to recognize either CR or LF or the sequence CRLF or any
of the preceding, or any of the Unicode newline sequences as indicating the
@@ -232,10 +277,11 @@ library. You can read more about them in the pcrebuild man page.
sizes in the pcrestack man page.
. The default maximum compiled pattern size is around 64K. You can increase
- this by adding --with-link-size=3 to the "configure" command. You can
- increase it even more by setting --with-link-size=4, but this is unlikely
- ever to be necessary. Increasing the internal link size will reduce
- performance.
+ this by adding --with-link-size=3 to the "configure" command. In the 8-bit
+ library, PCRE then uses three bytes instead of two for offsets to different
+ parts of the compiled pattern. In the 16-bit library, --with-link-size=3 is
+ the same as --with-link-size=4, which (in both libraries) uses four-byte
+ offsets. Increasing the internal link size reduces performance.
. You can build PCRE so that its internal match() function that is called from
pcre_exec() does not call itself recursively. Instead, it uses memory blocks
@@ -247,9 +293,10 @@ library. You can read more about them in the pcrebuild man page.
on the "configure" command. PCRE runs more slowly in this mode, but it may be
necessary in environments with limited stack sizes. This applies only to the
- pcre_exec() function; it does not apply to pcre_dfa_exec(), which does not
- use deeply nested recursion. There is a discussion about stack sizes in the
- pcrestack man page.
+ normal execution of the pcre_exec() function; if JIT support is being
+ successfully used, it is not relevant. Equally, it does not apply to
+ pcre_dfa_exec(), which does not use deeply nested recursion. There is a
+ discussion about stack sizes in the pcrestack man page.
. For speed, PCRE uses four tables for manipulating and identifying characters
whose code point values are less than 256. By default, it uses a set of
@@ -269,27 +316,37 @@ library. You can read more about them in the pcrebuild man page.
This automatically implies --enable-rebuild-chartables (see above). However,
when PCRE is built this way, it always operates in EBCDIC. It cannot support
- both EBCDIC and UTF-8.
+ both EBCDIC and UTF-8/16.
-. It is possible to compile pcregrep to use libz and/or libbz2, in order to
- read .gz and .bz2 files (respectively), by specifying one or both of
+. The pcregrep program currently supports only 8-bit data files, and so
+ requires the 8-bit PCRE library. It is possible to compile pcregrep to use
+ libz and/or libbz2, in order to read .gz and .bz2 files (respectively), by
+ specifying one or both of
--enable-pcregrep-libz
--enable-pcregrep-libbz2
Of course, the relevant libraries must be installed on your system.
+. The default size of internal buffer used by pcregrep can be set by, for
+ example:
+
+ --with-pcregrep-bufsize=50K
+
+ The default value is 20K.
+
. It is possible to compile pcretest so that it links with the libreadline
- library, by specifying
+ or libedit libraries, by specifying, respectively,
- --enable-pcretest-libreadline
+ --enable-pcretest-libreadline or --enable-pcretest-libedit
If this is done, when pcretest's input is from a terminal, it reads it using
the readline() function. This provides line-editing and history facilities.
Note that libreadline is GPL-licenced, so if you distribute a binary of
- pcretest linked in this way, there may be licensing issues.
+ pcretest linked in this way, there may be licensing issues. These can be
+ avoided by linking with libedit (which has a BSD licence) instead.
- Setting this option causes the -lreadline option to be added to the pcretest
+ Enabling libreadline causes the -lreadline option to be added to the pcretest
build. In many operating environments with a sytem-installed readline
library this is sufficient. However, in some environments (e.g. if an
unmodified distribution version of readline is in use), it may be necessary
@@ -302,37 +359,42 @@ library. You can read more about them in the pcrebuild man page.
The "configure" script builds the following files for the basic C library:
-. Makefile is the makefile that builds the library
-. config.h contains build-time configuration options for the library
-. pcre.h is the public PCRE header file
-. pcre-config is a script that shows the settings of "configure" options
-. libpcre.pc is data for the pkg-config command
-. libtool is a script that builds shared and/or static libraries
-. RunTest is a script for running tests on the basic C library
-. RunGrepTest is a script for running tests on the pcregrep command
+. Makefile the makefile that builds the library
+. config.h build-time configuration options for the library
+. pcre.h the public PCRE header file
+. pcre-config script that shows the building settings such as CFLAGS
+ that were set for "configure"
+. libpcre.pc ) data for the pkg-config command
+. libpcre16.pc )
+. libpcreposix.pc )
+. libtool script that builds shared and/or static libraries
Versions of config.h and pcre.h are distributed in the PCRE tarballs under the
names config.h.generic and pcre.h.generic. These are provided for those who
have to built PCRE without using "configure" or CMake. If you use "configure"
or CMake, the .generic versions are not used.
-If a C++ compiler is found, the following files are also built:
+When building the 8-bit library, if a C++ compiler is found, the following
+files are also built:
-. libpcrecpp.pc is data for the pkg-config command
-. pcrecpparg.h is a header file for programs that call PCRE via the C++ wrapper
-. pcre_stringpiece.h is the header for the C++ "stringpiece" functions
+. libpcrecpp.pc data for the pkg-config command
+. pcrecpparg.h header file for calling PCRE via the C++ wrapper
+. pcre_stringpiece.h header for the C++ "stringpiece" functions
The "configure" script also creates config.status, which is an executable
script that can be run to recreate the configuration, and config.log, which
contains compiler output from tests that "configure" runs.
-Once "configure" has run, you can run "make". It builds two libraries, called
-libpcre and libpcreposix, a test program called pcretest, and the pcregrep
-command. If a C++ compiler was found on your system, "make" also builds the C++
-wrapper library, which is called libpcrecpp, and some test programs called
-pcrecpp_unittest, pcre_scanner_unittest, and pcre_stringpiece_unittest.
-Building the C++ wrapper can be disabled by adding --disable-cpp to the
-"configure" command.
+Once "configure" has run, you can run "make". This builds either or both of the
+libraries libpcre and libpcre16, and a test program called pcretest. If you
+enabled JIT support with --enable-jit, a test program called pcre_jit_test is
+built as well.
+
+If the 8-bit library is built, libpcreposix and the pcregrep command are also
+built, and if a C++ compiler was found on your system, and you did not disable
+it with --disable-cpp, "make" builds the C++ wrapper library, which is called
+libpcrecpp, as well as some test programs called pcrecpp_unittest,
+pcre_scanner_unittest, and pcre_stringpiece_unittest.
The command "make check" runs all the appropriate tests. Details of the PCRE
tests are given below in a separate section of this document.
@@ -343,16 +405,19 @@ system. The following are installed (file names are all relative to the
Commands (bin):
pcretest
- pcregrep
+ pcregrep (if 8-bit support is enabled)
pcre-config
Libraries (lib):
- libpcre
- libpcreposix
- libpcrecpp (if C++ support is enabled)
+ libpcre16 (if 16-bit support is enabled)
+ libpcre (if 8-bit support is enabled)
+ libpcreposix (if 8-bit support is enabled)
+ libpcrecpp (if 8-bit and C++ support is enabled)
Configuration information (lib/pkgconfig):
+ libpcre16.pc
libpcre.pc
+ libpcreposix.pc
libpcrecpp.pc (if C++ support is enabled)
Header files (include):
@@ -366,6 +431,7 @@ system. The following are installed (file names are all relative to the
Man pages (share/man/man{1,3}):
pcregrep.1
pcretest.1
+ pcre-config.1
pcre.3
pcre*.3 (lots more pages, all starting "pcre")
@@ -380,17 +446,18 @@ system. The following are installed (file names are all relative to the
LICENCE
NEWS
README
- pcre.txt (a concatenation of the man(3) pages)
- pcretest.txt the pcretest man page
- pcregrep.txt the pcregrep man page
+ pcre.txt (a concatenation of the man(3) pages)
+ pcretest.txt the pcretest man page
+ pcregrep.txt the pcregrep man page
+ pcre-config.txt the pcre-config man page
If you want to remove PCRE from your system, you can run "make uninstall".
This removes all the files that "make install" installed. However, it does not
remove any directories, because these are often shared with other programs.
-Retrieving configuration information on Unix-like systems
----------------------------------------------------------
+Retrieving configuration information
+------------------------------------
Running "make install" installs the command pcre-config, which can be used to
recall information about the PCRE configuration and installation. For example:
@@ -415,8 +482,8 @@ The data is held in *.pc files that are installed in a directory called
<prefix>/lib/pkgconfig.
-Shared libraries on Unix-like systems
--------------------------------------
+Shared libraries
+----------------
The default distribution builds PCRE as shared libraries and static libraries,
as long as the operating system supports shared libraries. Shared library
@@ -441,8 +508,8 @@ Then run "make" in the usual way. Similarly, you can use --disable-static to
build only shared libraries.
-Cross-compiling on Unix-like systems
-------------------------------------
+Cross-compiling using autotools
+-------------------------------
You can specify CC and CFLAGS in the normal way to the "configure" command, in
order to cross-compile PCRE for some other host. However, you should NOT
@@ -514,30 +581,49 @@ script creates the .txt and HTML forms of the documentation from the man pages.
Testing PCRE
------------
-To test the basic PCRE library on a Unix system, run the RunTest script that is
-created by the configuring process. There is also a script called RunGrepTest
-that tests the options of the pcregrep command. If the C++ wrapper library is
-built, three test programs called pcrecpp_unittest, pcre_scanner_unittest, and
-pcre_stringpiece_unittest are also built.
+To test the basic PCRE library on a Unix-like system, run the RunTest script.
+There is another script called RunGrepTest that tests the options of the
+pcregrep command. If the C++ wrapper library is built, three test programs
+called pcrecpp_unittest, pcre_scanner_unittest, and pcre_stringpiece_unittest
+are also built. When JIT support is enabled, another test program called
+pcre_jit_test is built.
Both the scripts and all the program tests are run if you obey "make check" or
-"make test". For other systems, see the instructions in NON-UNIX-USE.
+"make test". For other environments, see the instructions in
+NON-AUTOTOOLS-BUILD.
The RunTest script runs the pcretest test program (which is documented in its
-own man page) on each of the testinput files in the testdata directory in
-turn, and compares the output with the contents of the corresponding testoutput
-files. A file called testtry is used to hold the main output from pcretest
-(testsavedregex is also used as a working file). To run pcretest on just one of
-the test files, give its number as an argument to RunTest, for example:
+own man page) on each of the relevant testinput files in the testdata
+directory, and compares the output with the contents of the corresponding
+testoutput files. Some tests are relevant only when certain build-time options
+were selected. For example, the tests for UTF-8/16 support are run only if
+--enable-utf was used. RunTest outputs a comment when it skips a test.
- RunTest 2
+Many of the tests that are not skipped are run up to three times. The second
+run forces pcre_study() to be called for all patterns except for a few in some
+tests that are marked "never study" (see the pcretest program for how this is
+done). If JIT support is available, the non-DFA tests are run a third time,
+this time with a forced pcre_study() with the PCRE_STUDY_JIT_COMPILE option.
-The first test file can also be fed directly into the perltest.pl script to
-check that Perl gives the same results. The only difference you should see is
-in the first few lines, where the Perl version is given instead of the PCRE
-version.
+When both 8-bit and 16-bit support is enabled, the entire set of tests is run
+twice, once for each library. If you want to run just one set of tests, call
+RunTest with either the -8 or -16 option.
-The second set of tests check pcre_fullinfo(), pcre_info(), pcre_study(),
+RunTest uses a file called testtry to hold the main output from pcretest.
+Other files whose names begin with "test" are used as working files in some
+tests. To run pcretest on just one or more specific test files, give their
+numbers as arguments to RunTest, for example:
+
+ RunTest 2 7 11
+
+You can also call RunTest with the single argument "list" to cause it to output
+a list of tests.
+
+The first test file can be fed directly into the perltest.pl script to check
+that Perl gives the same results. The only difference you should see is in the
+first few lines, where the Perl version is given instead of the PCRE version.
+
+The second set of tests check pcre_fullinfo(), pcre_study(),
pcre_copy_substring(), pcre_get_substring(), pcre_get_substring_list(), error
detection, and run-time flags that are specific to PCRE, as well as the POSIX
wrapper API. It also uses the debugging flags to check some of the internals of
@@ -572,33 +658,32 @@ RunTest.bat. The version of RunTest.bat included with PCRE 7.4 and above uses
Windows versions of test 2. More info on using RunTest.bat is included in the
document entitled NON-UNIX-USE.]
-The fourth test checks the UTF-8 support. It is not run automatically unless
-PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when
-running "configure". This file can be also fed directly to the perltest.pl
-script, provided you are running Perl 5.8 or higher.
+The fourth and fifth tests check the UTF-8/16 support and error handling and
+internal UTF features of PCRE that are not relevant to Perl, respectively. The
+sixth and seventh tests do the same for Unicode character properties support.
-The fifth test checks error handling with UTF-8 encoding, and internal UTF-8
-features of PCRE that are not relevant to Perl.
+The eighth, ninth, and tenth tests check the pcre_dfa_exec() alternative
+matching function, in non-UTF-8/16 mode, UTF-8/16 mode, and UTF-8/16 mode with
+Unicode property support, respectively.
-The sixth test (which is Perl-5.10 compatible) checks the support for Unicode
-character properties. It it not run automatically unless PCRE is built with
-Unicode property support. To to this you must set --enable-unicode-properties
-when running "configure".
+The eleventh test checks some internal offsets and code size features; it is
+run only when the default "link size" of 2 is set (in other cases the sizes
+change) and when Unicode property support is enabled.
-The seventh, eighth, and ninth tests check the pcre_dfa_exec() alternative
-matching function, in non-UTF-8 mode, UTF-8 mode, and UTF-8 mode with Unicode
-property support, respectively. The eighth and ninth tests are not run
-automatically unless PCRE is build with the relevant support.
+The twelfth test is run only when JIT support is available, and the thirteenth
+test is run only when JIT support is not available. They test some JIT-specific
+features such as information output from pcretest about JIT compilation.
-The tenth test checks some internal offsets and code size features; it is run
-only when the default "link size" of 2 is set (in other cases the sizes
-change).
+The fourteenth, fifteenth, and sixteenth tests are run only in 8-bit mode, and
+the seventeenth, eighteenth, and nineteenth tests are run only in 16-bit mode.
+These are tests that generate different output in the two modes. They are for
+general cases, UTF-8/16 support, and Unicode property support, respectively.
-The eleventh test checks out features that are new in Perl 5.10, and the
-twelfth test checks a number internals and non-Perl features concerned with
-Unicode property support. It it not run automatically unless PCRE is built with
-Unicode property support. To to this you must set --enable-unicode-properties
-when running "configure".
+The twentieth test is run only in 16-bit mode. It tests some specific 16-bit
+features of the DFA matching engine.
+
+The twenty-first and twenty-second tests are run only in 16-bit mode, when the
+link size is set to 2. They test reloading pre-compiled patterns.
Character tables
@@ -658,7 +743,9 @@ will cause PCRE to malfunction.
File manifest
-------------
-The distribution should contain the following files:
+The distribution should contain the files listed below. Where a file name is
+given as pcre[16]_xxx it means that there are two files, one with the name
+pcre_xxx and the other with the name pcre16_xxx.
(A) Source files of the PCRE library functions and their headers:
@@ -667,33 +754,40 @@ The distribution should contain the following files:
pcre_chartables.c.dist a default set of character tables that assume ASCII
coding; used, unless --enable-rebuild-chartables is
- specified, by copying to pcre_chartables.c
+ specified, by copying to pcre[16]_chartables.c
pcreposix.c )
- pcre_compile.c )
- pcre_config.c )
- pcre_dfa_exec.c )
- pcre_exec.c )
- pcre_fullinfo.c )
- pcre_get.c ) sources for the functions in the library,
- pcre_globals.c ) and some internal functions that they use
- pcre_info.c )
- pcre_maketables.c )
- pcre_newline.c )
+ pcre[16]_byte_order.c )
+ pcre[16]_compile.c )
+ pcre[16]_config.c )
+ pcre[16]_dfa_exec.c )
+ pcre[16]_exec.c )
+ pcre[16]_fullinfo.c )
+ pcre[16]_get.c ) sources for the functions in the library,
+ pcre[16]_globals.c ) and some internal functions that they use
+ pcre[16]_jit_compile.c )
+ pcre[16]_maketables.c )
+ pcre[16]_newline.c )
+ pcre[16]_refcount.c )
+ pcre[16]_string_utils.c )
+ pcre[16]_study.c )
+ pcre[16]_tables.c )
+ pcre[16]_ucd.c )
+ pcre[16]_version.c )
+ pcre[16]_xclass.c )
pcre_ord2utf8.c )
- pcre_refcount.c )
- pcre_study.c )
- pcre_tables.c )
- pcre_try_flipped.c )
- pcre_ucd.c )
pcre_valid_utf8.c )
- pcre_version.c )
- pcre_xclass.c )
- pcre_printint.src ) debugging function that is #included in pcretest,
+ pcre16_ord2utf16.c )
+ pcre16_utf16_utils.c )
+ pcre16_valid_utf16.c )
+
+ pcre[16]_printint.c ) debugging function that is used by pcretest,
) and can also be #included in pcre_compile()
+
pcre.h.in template for pcre.h when built by "configure"
pcreposix.h header for the external POSIX wrapper API
pcre_internal.h header for internal use
+ sljit/* 16 files that make up the JIT compiler
ucp.h header for Unicode property handling
config.h.in template for config.h, which is built by "configure"
@@ -730,7 +824,8 @@ The distribution should contain the following files:
Makefile.am ) the automake input that was used to create
) Makefile.in
NEWS important changes in this release
- NON-UNIX-USE notes on building PCRE on non-Unix systems
+ NON-UNIX-USE the previous name for NON-AUTOTOOLS-BUILD
+ NON-AUTOTOOLS-BUILD notes on building PCRE without using autotools
PrepareRelease script to make preparations for "make dist"
README this file
RunTest a Unix shell script for running tests
@@ -751,6 +846,7 @@ The distribution should contain the following files:
doc/pcretest.txt plain text documentation of test program
doc/perltest.txt plain text documentation of Perl test program
install-sh a shell script for installing files
+ libpcre16.pc.in template for libpcre16.pc for pkg-config
libpcre.pc.in template for libpcre.pc for pkg-config
libpcreposix.pc.in template for libpcreposix.pc for pkg-config
libpcrecpp.pc.in template for libpcrecpp.pc for pkg-config
@@ -760,17 +856,20 @@ The distribution should contain the following files:
mkinstalldirs script for making install directories
perltest.pl Perl test program
pcre-config.in source of script which retains PCRE information
+ pcre_jit_test.c test program for the JIT compiler
pcrecpp_unittest.cc )
pcre_scanner_unittest.cc ) test programs for the C++ wrapper
pcre_stringpiece_unittest.cc )
testdata/testinput* test data for main library tests
testdata/testoutput* expected test results
testdata/grep* input and output for pcregrep tests
+ testdata/* other supporting test files
(D) Auxiliary files for cmake support
cmake/COPYING-CMAKE-SCRIPTS
cmake/FindPackageHandleStandardArgs.cmake
+ cmake/FindEditline.cmake
cmake/FindReadline.cmake
CMakeLists.txt
config-cmake.h.in
@@ -796,4 +895,4 @@ The distribution should contain the following files:
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
-Last updated: 19 January 2010
+Last updated: 18 June 2012
diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h
index 46e0625fa..64e155784 100644
--- a/ext/pcre/pcrelib/config.h
+++ b/ext/pcre/pcrelib/config.h
@@ -282,7 +282,7 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.12"
+#define PACKAGE_STRING "PCRE 8.31"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre"
@@ -291,7 +291,7 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.12"
+#define PACKAGE_VERSION "8.31"
/* If you are compiling for a system other than a Unix-like system or
@@ -347,7 +347,7 @@ them both to 0; an emulation function will be used. */
/* Version number of package */
#ifndef VERSION
-#define VERSION "8.12"
+#define VERSION "8.31"
#endif
/* Define to empty if `const' does not conform to ANSI C. */
diff --git a/ext/pcre/pcrelib/dftables.c b/ext/pcre/pcrelib/dftables.c
index 63fc7074e..763ac8c64 100644
--- a/ext/pcre/pcrelib/dftables.c
+++ b/ext/pcre/pcrelib/dftables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -112,7 +112,7 @@ fprintf(f,
"#endif\n\n"
"#include \"pcre_internal.h\"\n\n");
fprintf(f,
- "const unsigned char _pcre_default_tables[] = {\n\n"
+ "const pcre_uint8 PRIV(default_tables)[] = {\n\n"
"/* This table is a lower casing table. */\n\n");
fprintf(f, " ");
diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt
index ac4254ec9..19f04f275 100644
--- a/ext/pcre/pcrelib/doc/pcre.txt
+++ b/ext/pcre/pcrelib/doc/pcre.txt
@@ -25,11 +25,27 @@ INTRODUCTION
items, and there is an option for requesting some minor changes that
give better JavaScript compatibility.
+ Starting with release 8.30, it is possible to compile two separate PCRE
+ libraries: the original, which supports 8-bit character strings
+ (including UTF-8 strings), and a second library that supports 16-bit
+ character strings (including UTF-16 strings). The build process allows
+ either one or both to be built. The majority of the work to make this
+ possible was done by Zoltan Herczeg.
+
+ The two libraries contain identical sets of functions, except that the
+ names in the 16-bit library start with pcre16_ instead of pcre_. To
+ avoid over-complication and reduce the documentation maintenance load,
+ most of the documentation describes the 8-bit library, with the differ-
+ ences for the 16-bit library described separately in the pcre16 page.
+ References to functions or structures of the form pcre[16]_xxx should
+ be read as meaning "pcre_xxx when using the 8-bit library and
+ pcre16_xxx when using the 16-bit library".
+
The current implementation of PCRE corresponds approximately with Perl
- 5.12, including support for UTF-8 encoded strings and Unicode general
- category properties. However, UTF-8 and Unicode support has to be
- explicitly enabled; it is not the default. The Unicode tables corre-
- spond to Unicode release 5.2.0.
+ 5.12, including support for UTF-8/16 encoded strings and Unicode gen-
+ eral category properties. However, UTF-8/16 and Unicode support has to
+ be explicitly enabled; it is not the default. The Unicode tables corre-
+ spond to Unicode release 6.0.0.
In addition to the Perl-compatible matching function, PCRE contains an
alternative function that matches the same compiled patterns in a dif-
@@ -39,218 +55,401 @@ INTRODUCTION
PCRE is written in C and released as a C library. A number of people
have written wrappers and interfaces of various kinds. In particular,
- Google Inc. have provided a comprehensive C++ wrapper. This is now
- included as part of the PCRE distribution. The pcrecpp page has details
- of this interface. Other people's contributions can be found in the
- Contrib directory at the primary FTP site, which is:
+ Google Inc. have provided a comprehensive C++ wrapper for the 8-bit
+ library. This is now included as part of the PCRE distribution. The
+ pcrecpp page has details of this interface. Other people's contribu-
+ tions can be found in the Contrib directory at the primary FTP site,
+ which is:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
- Details of exactly which Perl regular expression features are and are
+ Details of exactly which Perl regular expression features are and are
not supported by PCRE are given in separate documents. See the pcrepat-
- tern and pcrecompat pages. There is a syntax summary in the pcresyntax
+ tern and pcrecompat pages. There is a syntax summary in the pcresyntax
page.
- Some features of PCRE can be included, excluded, or changed when the
- library is built. The pcre_config() function makes it possible for a
- client to discover which features are available. The features them-
- selves are described in the pcrebuild page. Documentation about build-
- ing PCRE for various operating systems can be found in the README and
+ Some features of PCRE can be included, excluded, or changed when the
+ library is built. The pcre_config() function makes it possible for a
+ client to discover which features are available. The features them-
+ selves are described in the pcrebuild page. Documentation about build-
+ ing PCRE for various operating systems can be found in the README and
NON-UNIX-USE files in the source distribution.
- The library contains a number of undocumented internal functions and
- data tables that are used by more than one of the exported external
- functions, but which are not intended for use by external callers.
- Their names all begin with "_pcre_", which hopefully will not provoke
- any name clashes. In some environments, it is possible to control which
- external symbols are exported when a shared library is built, and in
- these cases the undocumented symbols are not exported.
+ The libraries contains a number of undocumented internal functions and
+ data tables that are used by more than one of the exported external
+ functions, but which are not intended for use by external callers.
+ Their names all begin with "_pcre_" or "_pcre16_", which hopefully will
+ not provoke any name clashes. In some environments, it is possible to
+ control which external symbols are exported when a shared library is
+ built, and in these cases the undocumented symbols are not exported.
USER DOCUMENTATION
- The user documentation for PCRE comprises a number of different sec-
- tions. In the "man" format, each of these is a separate "man page". In
- the HTML format, each is a separate page, linked from the index page.
- In the plain text format, all the sections, except the pcredemo sec-
+ The user documentation for PCRE comprises a number of different sec-
+ tions. In the "man" format, each of these is a separate "man page". In
+ the HTML format, each is a separate page, linked from the index page.
+ In the plain text format, all the sections, except the pcredemo sec-
tion, are concatenated, for ease of searching. The sections are as fol-
lows:
pcre this document
+ pcre16 details of the 16-bit library
pcre-config show PCRE installation configuration information
pcreapi details of PCRE's native C API
pcrebuild options for building PCRE
pcrecallout details of the callout feature
pcrecompat discussion of Perl compatibility
- pcrecpp details of the C++ wrapper
+ pcrecpp details of the C++ wrapper for the 8-bit library
pcredemo a demonstration C program that uses PCRE
- pcregrep description of the pcregrep command
+ pcregrep description of the pcregrep command (8-bit only)
+ pcrejit discussion of the just-in-time optimization support
+ pcrelimits details of size and other limits
pcrematching discussion of the two matching algorithms
pcrepartial details of the partial matching facility
pcrepattern syntax and semantics of supported
regular expressions
pcreperform discussion of performance issues
- pcreposix the POSIX-compatible C API
+ pcreposix the POSIX-compatible C API for the 8-bit library
pcreprecompile details of saving and re-using precompiled patterns
pcresample discussion of the pcredemo program
pcrestack discussion of stack usage
pcresyntax quick syntax reference
pcretest description of the pcretest testing command
+ pcreunicode discussion of Unicode and UTF-8/16 support
- In addition, in the "man" and HTML formats, there is a short page for
- each C library function, listing its arguments and results.
+ In addition, in the "man" and HTML formats, there is a short page for
+ each 8-bit C library function, listing its arguments and results.
-LIMITATIONS
+AUTHOR
- There are some size limitations in PCRE but it is hoped that they will
- never in practice be relevant.
+ Philip Hazel
+ University Computing Service
+ Cambridge CB2 3QH, England.
- The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE
- is compiled with the default internal linkage size of 2. If you want to
- process regular expressions that are truly enormous, you can compile
- PCRE with an internal linkage size of 3 or 4 (see the README file in
- the source distribution and the pcrebuild documentation for details).
- In these cases the limit is substantially larger. However, the speed
- of execution is slower.
+ Putting an actual email address here seems to have been a spam magnet,
+ so I've taken it away. If you want to email me, use my two initials,
+ followed by the two digits 10, at the domain cam.ac.uk.
- All values in repeating quantifiers must be less than 65536.
- There is no limit to the number of parenthesized subpatterns, but there
- can be no more than 65535 capturing subpatterns.
+REVISION
- The maximum length of name for a named subpattern is 32 characters, and
- the maximum number of named subpatterns is 10000.
+ Last updated: 10 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
+------------------------------------------------------------------------------
- The maximum length of a subject string is the largest positive number
- that an integer variable can hold. However, when using the traditional
- matching function, PCRE uses recursion to handle subpatterns and indef-
- inite repetition. This means that the available stack space may limit
- the size of a subject string that can be processed by certain patterns.
- For a discussion of stack issues, see the pcrestack documentation.
+PCRE(3) PCRE(3)
-UTF-8 AND UNICODE PROPERTY SUPPORT
- From release 3.3, PCRE has had some support for character strings
- encoded in the UTF-8 format. For release 4.0 this was greatly extended
- to cover most common requirements, and in release 5.0 additional sup-
- port for Unicode general category properties was added.
+NAME
+ PCRE - Perl-compatible regular expressions
- In order process UTF-8 strings, you must build PCRE to include UTF-8
- support in the code, and, in addition, you must call pcre_compile()
- with the PCRE_UTF8 option flag, or the pattern must start with the
- sequence (*UTF8). When either of these is the case, both the pattern
- and any subject strings that are matched against it are treated as
- UTF-8 strings instead of strings of 1-byte characters.
+ #include <pcre.h>
- If you compile PCRE with UTF-8 support, but do not use it at run time,
- the library will be a bit bigger, but the additional run time overhead
- is limited to testing the PCRE_UTF8 flag occasionally, so should not be
- very big.
- If PCRE is built with Unicode character property support (which implies
- UTF-8 support), the escape sequences \p{..}, \P{..}, and \X are sup-
- ported. The available properties that can be tested are limited to the
- general category properties such as Lu for an upper case letter or Nd
- for a decimal number, the Unicode script names such as Arabic or Han,
- and the derived properties Any and L&. A full list is given in the
- pcrepattern documentation. Only the short names for properties are sup-
- ported. For example, \p{L} matches a letter. Its Perl synonym, \p{Let-
- ter}, is not supported. Furthermore, in Perl, many properties may
- optionally be prefixed by "Is", for compatibility with Perl 5.6. PCRE
- does not support this.
+PCRE 16-BIT API BASIC FUNCTIONS
- Validity of UTF-8 strings
+ pcre16 *pcre16_compile(PCRE_SPTR16 pattern, int options,
+ const char **errptr, int *erroffset,
+ const unsigned char *tableptr);
- When you set the PCRE_UTF8 flag, the strings passed as patterns and
- subjects are (by default) checked for validity on entry to the relevant
- functions. From release 7.3 of PCRE, the check is according the rules
- of RFC 3629, which are themselves derived from the Unicode specifica-
- tion. Earlier releases of PCRE followed the rules of RFC 2279, which
- allows the full range of 31-bit values (0 to 0x7FFFFFFF). The current
- check allows only values in the range U+0 to U+10FFFF, excluding U+D800
- to U+DFFF.
-
- The excluded code points are the "Low Surrogate Area" of Unicode, of
- which the Unicode Standard says this: "The Low Surrogate Area does not
- contain any character assignments, consequently no character code
- charts or namelists are provided for this area. Surrogates are reserved
- for use with UTF-16 and then must be used in pairs." The code points
- that are encoded by UTF-16 pairs are available as independent code
- points in the UTF-8 encoding. (In other words, the whole surrogate
- thing is a fudge for UTF-16 which unfortunately messes up UTF-8.)
-
- If an invalid UTF-8 string is passed to PCRE, an error return
- (PCRE_ERROR_BADUTF8) is given. In some situations, you may already know
- that your strings are valid, and therefore want to skip these checks in
- order to improve performance. If you set the PCRE_NO_UTF8_CHECK flag at
- compile time or at run time, PCRE assumes that the pattern or subject
- it is given (respectively) contains only valid UTF-8 codes. In this
- case, it does not diagnose an invalid UTF-8 string.
+ pcre16 *pcre16_compile2(PCRE_SPTR16 pattern, int options,
+ int *errorcodeptr,
+ const char **errptr, int *erroffset,
+ const unsigned char *tableptr);
- If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set,
- what happens depends on why the string is invalid. If the string con-
- forms to the "old" definition of UTF-8 (RFC 2279), it is processed as a
- string of characters in the range 0 to 0x7FFFFFFF. In other words,
- apart from the initial validity test, PCRE (when in UTF-8 mode) handles
- strings according to the more liberal rules of RFC 2279. However, if
- the string does not even conform to RFC 2279, the result is undefined.
- Your program may crash.
+ pcre16_extra *pcre16_study(const pcre16 *code, int options,
+ const char **errptr);
- If you want to process strings of values in the full range 0 to
- 0x7FFFFFFF, encoded in a UTF-8-like manner as per the old RFC, you can
- set PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in
- this situation, you will have to apply your own validity check.
+ void pcre16_free_study(pcre16_extra *extra);
- General comments about UTF-8 mode
+ int pcre16_exec(const pcre16 *code, const pcre16_extra *extra,
+ PCRE_SPTR16 subject, int length, int startoffset,
+ int options, int *ovector, int ovecsize);
- 1. An unbraced hexadecimal escape sequence (such as \xb3) matches a
- two-byte UTF-8 character if the value is greater than 127.
+ int pcre16_dfa_exec(const pcre16 *code, const pcre16_extra *extra,
+ PCRE_SPTR16 subject, int length, int startoffset,
+ int options, int *ovector, int ovecsize,
+ int *workspace, int wscount);
- 2. Octal numbers up to \777 are recognized, and match two-byte UTF-8
- characters for values greater than \177.
- 3. Repeat quantifiers apply to complete UTF-8 characters, not to indi-
- vidual bytes, for example: \x{100}{3}.
+PCRE 16-BIT API STRING EXTRACTION FUNCTIONS
- 4. The dot metacharacter matches one UTF-8 character instead of a sin-
- gle byte.
+ int pcre16_copy_named_substring(const pcre16 *code,
+ PCRE_SPTR16 subject, int *ovector,
+ int stringcount, PCRE_SPTR16 stringname,
+ PCRE_UCHAR16 *buffer, int buffersize);
- 5. The escape sequence \C can be used to match a single byte in UTF-8
- mode, but its use can lead to some strange effects. This facility is
- not available in the alternative matching function, pcre_dfa_exec().
+ int pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector,
+ int stringcount, int stringnumber, PCRE_UCHAR16 *buffer,
+ int buffersize);
- 6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly
- test characters of any code value, but, by default, the characters that
- PCRE recognizes as digits, spaces, or word characters remain the same
- set as before, all with values less than 256. This remains true even
- when PCRE is built to include Unicode property support, because to do
- otherwise would slow down PCRE in many common cases. Note in particular
- that this applies to \b and \B, because they are defined in terms of \w
- and \W. If you really want to test for a wider sense of, say, "digit",
- you can use explicit Unicode property tests such as \p{Nd}. Alterna-
- tively, if you set the PCRE_UCP option, the way that the character
- escapes work is changed so that Unicode properties are used to deter-
- mine which characters match. There are more details in the section on
- generic character types in the pcrepattern documentation.
+ int pcre16_get_named_substring(const pcre16 *code,
+ PCRE_SPTR16 subject, int *ovector,
+ int stringcount, PCRE_SPTR16 stringname,
+ PCRE_SPTR16 *stringptr);
- 7. Similarly, characters that match the POSIX named character classes
- are all low-valued characters, unless the PCRE_UCP option is set.
+ int pcre16_get_stringnumber(const pcre16 *code,
+ PCRE_SPTR16 name);
- 8. However, the horizontal and vertical whitespace matching escapes
- (\h, \H, \v, and \V) do match all the appropriate Unicode characters,
- whether or not PCRE_UCP is set.
+ int pcre16_get_stringtable_entries(const pcre16 *code,
+ PCRE_SPTR16 name, PCRE_UCHAR16 **first, PCRE_UCHAR16 **last);
- 9. Case-insensitive matching applies only to characters whose values
- are less than 128, unless PCRE is built with Unicode property support.
- Even when Unicode property support is available, PCRE still uses its
- own character tables when checking the case of low-valued characters,
- so as not to degrade performance. The Unicode property information is
- used only for characters with higher values. Furthermore, PCRE supports
- case-insensitive matching only when there is a one-to-one mapping
- between a letter's cases. There are a small number of many-to-one map-
- pings in Unicode; these are not supported by PCRE.
+ int pcre16_get_substring(PCRE_SPTR16 subject, int *ovector,
+ int stringcount, int stringnumber,
+ PCRE_SPTR16 *stringptr);
+
+ int pcre16_get_substring_list(PCRE_SPTR16 subject,
+ int *ovector, int stringcount, PCRE_SPTR16 **listptr);
+
+ void pcre16_free_substring(PCRE_SPTR16 stringptr);
+
+ void pcre16_free_substring_list(PCRE_SPTR16 *stringptr);
+
+
+PCRE 16-BIT API AUXILIARY FUNCTIONS
+
+ pcre16_jit_stack *pcre16_jit_stack_alloc(int startsize, int maxsize);
+
+ void pcre16_jit_stack_free(pcre16_jit_stack *stack);
+
+ void pcre16_assign_jit_stack(pcre16_extra *extra,
+ pcre16_jit_callback callback, void *data);
+
+ const unsigned char *pcre16_maketables(void);
+
+ int pcre16_fullinfo(const pcre16 *code, const pcre16_extra *extra,
+ int what, void *where);
+
+ int pcre16_refcount(pcre16 *code, int adjust);
+
+ int pcre16_config(int what, void *where);
+
+ const char *pcre16_version(void);
+
+ int pcre16_pattern_to_host_byte_order(pcre16 *code,
+ pcre16_extra *extra, const unsigned char *tables);
+
+
+PCRE 16-BIT API INDIRECTED FUNCTIONS
+
+ void *(*pcre16_malloc)(size_t);
+
+ void (*pcre16_free)(void *);
+
+ void *(*pcre16_stack_malloc)(size_t);
+
+ void (*pcre16_stack_free)(void *);
+
+ int (*pcre16_callout)(pcre16_callout_block *);
+
+
+PCRE 16-BIT API 16-BIT-ONLY FUNCTION
+
+ int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *output,
+ PCRE_SPTR16 input, int length, int *byte_order,
+ int keep_boms);
+
+
+THE PCRE 16-BIT LIBRARY
+
+ Starting with release 8.30, it is possible to compile a PCRE library
+ that supports 16-bit character strings, including UTF-16 strings, as
+ well as or instead of the original 8-bit library. The majority of the
+ work to make this possible was done by Zoltan Herczeg. The two
+ libraries contain identical sets of functions, used in exactly the same
+ way. Only the names of the functions and the data types of their argu-
+ ments and results are different. To avoid over-complication and reduce
+ the documentation maintenance load, most of the PCRE documentation
+ describes the 8-bit library, with only occasional references to the
+ 16-bit library. This page describes what is different when you use the
+ 16-bit library.
+
+ WARNING: A single application can be linked with both libraries, but
+ you must take care when processing any particular pattern to use func-
+ tions from just one library. For example, if you want to study a pat-
+ tern that was compiled with pcre16_compile(), you must do so with
+ pcre16_study(), not pcre_study(), and you must free the study data with
+ pcre16_free_study().
+
+
+THE HEADER FILE
+
+ There is only one header file, pcre.h. It contains prototypes for all
+ the functions in both libraries, as well as definitions of flags,
+ structures, error codes, etc.
+
+
+THE LIBRARY NAME
+
+ In Unix-like systems, the 16-bit library is called libpcre16, and can
+ normally be accesss by adding -lpcre16 to the command for linking an
+ application that uses PCRE.
+
+
+STRING TYPES
+
+ In the 8-bit library, strings are passed to PCRE library functions as
+ vectors of bytes with the C type "char *". In the 16-bit library,
+ strings are passed as vectors of unsigned 16-bit quantities. The macro
+ PCRE_UCHAR16 specifies an appropriate data type, and PCRE_SPTR16 is
+ defined as "const PCRE_UCHAR16 *". In very many environments, "short
+ int" is a 16-bit data type. When PCRE is built, it defines PCRE_UCHAR16
+ as "short int", but checks that it really is a 16-bit data type. If it
+ is not, the build fails with an error message telling the maintainer to
+ modify the definition appropriately.
+
+
+STRUCTURE TYPES
+
+ The types of the opaque structures that are used for compiled 16-bit
+ patterns and JIT stacks are pcre16 and pcre16_jit_stack respectively.
+ The type of the user-accessible structure that is returned by
+ pcre16_study() is pcre16_extra, and the type of the structure that is
+ used for passing data to a callout function is pcre16_callout_block.
+ These structures contain the same fields, with the same names, as their
+ 8-bit counterparts. The only difference is that pointers to character
+ strings are 16-bit instead of 8-bit types.
+
+
+16-BIT FUNCTIONS
+
+ For every function in the 8-bit library there is a corresponding func-
+ tion in the 16-bit library with a name that starts with pcre16_ instead
+ of pcre_. The prototypes are listed above. In addition, there is one
+ extra function, pcre16_utf16_to_host_byte_order(). This is a utility
+ function that converts a UTF-16 character string to host byte order if
+ necessary. The other 16-bit functions expect the strings they are
+ passed to be in host byte order.
+
+ The input and output arguments of pcre16_utf16_to_host_byte_order() may
+ point to the same address, that is, conversion in place is supported.
+ The output buffer must be at least as long as the input.
+
+ The length argument specifies the number of 16-bit data units in the
+ input string; a negative value specifies a zero-terminated string.
+
+ If byte_order is NULL, it is assumed that the string starts off in host
+ byte order. This may be changed by byte-order marks (BOMs) anywhere in
+ the string (commonly as the first character).
+
+ If byte_order is not NULL, a non-zero value of the integer to which it
+ points means that the input starts off in host byte order, otherwise
+ the opposite order is assumed. Again, BOMs in the string can change
+ this. The final byte order is passed back at the end of processing.
+
+ If keep_boms is not zero, byte-order mark characters (0xfeff) are
+ copied into the output string. Otherwise they are discarded.
+
+ The result of the function is the number of 16-bit units placed into
+ the output buffer, including the zero terminator if the string was
+ zero-terminated.
+
+
+SUBJECT STRING OFFSETS
+
+ The offsets within subject strings that are returned by the matching
+ functions are in 16-bit units rather than bytes.
+
+
+NAMED SUBPATTERNS
+
+ The name-to-number translation table that is maintained for named sub-
+ patterns uses 16-bit characters. The pcre16_get_stringtable_entries()
+ function returns the length of each entry in the table as the number of
+ 16-bit data units.
+
+
+OPTION NAMES
+
+ There are two new general option names, PCRE_UTF16 and
+ PCRE_NO_UTF16_CHECK, which correspond to PCRE_UTF8 and
+ PCRE_NO_UTF8_CHECK in the 8-bit library. In fact, these new options
+ define the same bits in the options word. There is a discussion about
+ the validity of UTF-16 strings in the pcreunicode page.
+
+ For the pcre16_config() function there is an option PCRE_CONFIG_UTF16
+ that returns 1 if UTF-16 support is configured, otherwise 0. If this
+ option is given to pcre_config(), or if the PCRE_CONFIG_UTF8 option is
+ given to pcre16_config(), the result is the PCRE_ERROR_BADOPTION error.
+
+
+CHARACTER CODES
+
+ In 16-bit mode, when PCRE_UTF16 is not set, character values are
+ treated in the same way as in 8-bit, non UTF-8 mode, except, of course,
+ that they can range from 0 to 0xffff instead of 0 to 0xff. Character
+ types for characters less than 0xff can therefore be influenced by the
+ locale in the same way as before. Characters greater than 0xff have
+ only one case, and no "type" (such as letter or digit).
+
+ In UTF-16 mode, the character code is Unicode, in the range 0 to
+ 0x10ffff, with the exception of values in the range 0xd800 to 0xdfff
+ because those are "surrogate" values that are used in pairs to encode
+ values greater than 0xffff.
+
+ A UTF-16 string can indicate its endianness by special code knows as a
+ byte-order mark (BOM). The PCRE functions do not handle this, expecting
+ strings to be in host byte order. A utility function called
+ pcre16_utf16_to_host_byte_order() is provided to help with this (see
+ above).
+
+
+ERROR NAMES
+
+ The errors PCRE_ERROR_BADUTF16_OFFSET and PCRE_ERROR_SHORTUTF16 corre-
+ spond to their 8-bit counterparts. The error PCRE_ERROR_BADMODE is
+ given when a compiled pattern is passed to a function that processes
+ patterns in the other mode, for example, if a pattern compiled with
+ pcre_compile() is passed to pcre16_exec().
+
+ There are new error codes whose names begin with PCRE_UTF16_ERR for
+ invalid UTF-16 strings, corresponding to the PCRE_UTF8_ERR codes for
+ UTF-8 strings that are described in the section entitled "Reason codes
+ for invalid UTF-8 strings" in the main pcreapi page. The UTF-16 errors
+ are:
+
+ PCRE_UTF16_ERR1 Missing low surrogate at end of string
+ PCRE_UTF16_ERR2 Invalid low surrogate follows high surrogate
+ PCRE_UTF16_ERR3 Isolated low surrogate
+ PCRE_UTF16_ERR4 Invalid character 0xfffe
+
+
+ERROR TEXTS
+
+ If there is an error while compiling a pattern, the error text that is
+ passed back by pcre16_compile() or pcre16_compile2() is still an 8-bit
+ character string, zero-terminated.
+
+
+CALLOUTS
+
+ The subject and mark fields in the callout block that is passed to a
+ callout function point to 16-bit vectors.
+
+
+TESTING
+
+ The pcretest program continues to operate with 8-bit input and output
+ files, but it can be used for testing the 16-bit library. If it is run
+ with the command line option -16, patterns and subject strings are con-
+ verted from 8-bit to 16-bit before being passed to PCRE, and the 16-bit
+ library functions are used instead of the 8-bit ones. Returned 16-bit
+ strings are converted to 8-bit for output. If the 8-bit library was not
+ compiled, pcretest defaults to 16-bit and the -16 option is ignored.
+
+ When PCRE is being built, the RunTest script that is called by "make
+ check" uses the pcretest -C option to discover which of the 8-bit and
+ 16-bit libraries has been built, and runs the tests appropriately.
+
+
+NOT SUPPORTED IN 16-BIT MODE
+
+ Not all the features of the 8-bit library are available with the 16-bit
+ library. The C++ and POSIX wrapper functions support only the 8-bit
+ library, and the pcregrep program is at present 8-bit only.
AUTHOR
@@ -259,15 +458,11 @@ AUTHOR
University Computing Service
Cambridge CB2 3QH, England.
- Putting an actual email address here seems to have been a spam magnet,
- so I've taken it away. If you want to email me, use my two initials,
- followed by the two digits 10, at the domain cam.ac.uk.
-
REVISION
- Last updated: 13 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 14 April 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -307,46 +502,89 @@ PCRE BUILD-TIME OPTIONS
is not described.
+BUILDING 8-BIT and 16-BIT LIBRARIES
+
+ By default, a library called libpcre is built, containing functions
+ that take string arguments contained in vectors of bytes, either as
+ single-byte characters, or interpreted as UTF-8 strings. You can also
+ build a separate library, called libpcre16, in which strings are con-
+ tained in vectors of 16-bit data units and interpreted either as sin-
+ gle-unit characters or UTF-16 strings, by adding
+
+ --enable-pcre16
+
+ to the configure command. If you do not want the 8-bit library, add
+
+ --disable-pcre8
+
+ as well. At least one of the two libraries must be built. Note that the
+ C++ and POSIX wrappers are for the 8-bit library only, and that pcre-
+ grep is an 8-bit program. None of these are built if you select only
+ the 16-bit library.
+
+
+BUILDING SHARED AND STATIC LIBRARIES
+
+ The PCRE building process uses libtool to build both shared and static
+ Unix libraries by default. You can suppress one of these by adding one
+ of
+
+ --disable-shared
+ --disable-static
+
+ to the configure command, as required.
+
+
C++ SUPPORT
- By default, the configure script will search for a C++ compiler and C++
- header files. If it finds them, it automatically builds the C++ wrapper
- library for PCRE. You can disable this by adding
+ By default, if the 8-bit library is being built, the configure script
+ will search for a C++ compiler and C++ header files. If it finds them,
+ it automatically builds the C++ wrapper library (which supports only
+ 8-bit strings). You can disable this by adding
--disable-cpp
to the configure command.
-UTF-8 SUPPORT
+UTF-8 and UTF-16 SUPPORT
+
+ To build PCRE with support for UTF Unicode character strings, add
- To build PCRE with support for UTF-8 Unicode character strings, add
+ --enable-utf
- --enable-utf8
+ to the configure command. This setting applies to both libraries,
+ adding support for UTF-8 to the 8-bit library and support for UTF-16 to
+ the 16-bit library. There are no separate options for enabling UTF-8
+ and UTF-16 independently because that would allow ridiculous settings
+ such as requesting UTF-16 support while building only the 8-bit
+ library. It is not possible to build one library with UTF support and
+ the other without in the same configuration. (For backwards compatibil-
+ ity, --enable-utf8 is a synonym of --enable-utf.)
- to the configure command. Of itself, this does not make PCRE treat
- strings as UTF-8. As well as compiling PCRE with this option, you also
- have have to set the PCRE_UTF8 option when you call the pcre_compile()
- or pcre_compile2() functions.
+ Of itself, this setting does not make PCRE treat strings as UTF-8 or
+ UTF-16. As well as compiling PCRE with this option, you also have have
+ to set the PCRE_UTF8 or PCRE_UTF16 option when you call one of the pat-
+ tern compiling functions.
- If you set --enable-utf8 when compiling in an EBCDIC environment, PCRE
- expects its input to be either ASCII or UTF-8 (depending on the runtime
- option). It is not possible to support both EBCDIC and UTF-8 codes in
- the same version of the library. Consequently, --enable-utf8 and
+ If you set --enable-utf when compiling in an EBCDIC environment, PCRE
+ expects its input to be either ASCII or UTF-8 (depending on the run-
+ time option). It is not possible to support both EBCDIC and UTF-8 codes
+ in the same version of the library. Consequently, --enable-utf and
--enable-ebcdic are mutually exclusive.
UNICODE CHARACTER PROPERTY SUPPORT
- UTF-8 support allows PCRE to process character values greater than 255
- in the strings that it handles. On its own, however, it does not pro-
- vide any facilities for accessing the properties of such characters. If
- you want to be able to use the pattern escapes \P, \p, and \X, which
- refer to Unicode character properties, you must add
+ UTF support allows the libraries to process character codepoints up to
+ 0x10ffff in the strings that they handle. On its own, however, it does
+ not provide any facilities for accessing the properties of such charac-
+ ters. If you want to be able to use the pattern escapes \P, \p, and \X,
+ which refer to Unicode character properties, you must add
--enable-unicode-properties
- to the configure command. This implies UTF-8 support, even if you have
+ to the configure command. This implies UTF support, even if you have
not explicitly requested it.
Including Unicode property support adds around 30K of tables to the
@@ -354,6 +592,23 @@ UNICODE CHARACTER PROPERTY SUPPORT
are supported. Details are given in the pcrepattern documentation.
+JUST-IN-TIME COMPILER SUPPORT
+
+ Just-in-time compiler support is included in the build by specifying
+
+ --enable-jit
+
+ This support is available only for certain hardware architectures. If
+ this option is set for an unsupported architecture, a compile time
+ error occurs. See the pcrejit documentation for a discussion of JIT
+ usage. When JIT support is enabled, pcregrep automatically makes use of
+ it, unless you add
+
+ --disable-pcregrep-jit
+
+ to the "configure" command.
+
+
CODE VALUE OF NEWLINE
By default, PCRE interprets the linefeed (LF) character as indicating
@@ -400,28 +655,16 @@ WHAT \R MATCHES
functions are called.
-BUILDING SHARED AND STATIC LIBRARIES
-
- The PCRE building process uses libtool to build both shared and static
- Unix libraries by default. You can suppress one of these by adding one
- of
-
- --disable-shared
- --disable-static
-
- to the configure command, as required.
-
-
POSIX MALLOC USAGE
- When PCRE is called through the POSIX interface (see the pcreposix doc-
- umentation), additional working storage is required for holding the
- pointers to capturing substrings, because PCRE requires three integers
- per substring, whereas the POSIX interface provides only two. If the
- number of expected substrings is small, the wrapper function uses space
- on the stack, because this is faster than using malloc() for each call.
- The default threshold above which the stack is no longer used is 10; it
- can be changed by adding a setting such as
+ When the 8-bit library is called through the POSIX interface (see the
+ pcreposix documentation), additional working storage is required for
+ holding the pointers to capturing substrings, because PCRE requires
+ three integers per substring, whereas the POSIX interface provides only
+ two. If the number of expected substrings is small, the wrapper func-
+ tion uses space on the stack, because this is faster than using mal-
+ loc() for each call. The default threshold above which the stack is no
+ longer used is 10; it can be changed by adding a setting such as
--with-posix-malloc-threshold=20
@@ -435,107 +678,108 @@ HANDLING VERY LARGE PATTERNS
nation metacharacter). By default, two-byte values are used for these
offsets, leading to a maximum size for a compiled pattern of around
64K. This is sufficient to handle all but the most gigantic patterns.
- Nevertheless, some people do want to process truyl enormous patterns,
+ Nevertheless, some people do want to process truly enormous patterns,
so it is possible to compile PCRE to use three-byte or four-byte off-
sets by adding a setting such as
--with-link-size=3
- to the configure command. The value given must be 2, 3, or 4. Using
- longer offsets slows down the operation of PCRE because it has to load
- additional bytes when handling them.
+ to the configure command. The value given must be 2, 3, or 4. For the
+ 16-bit library, a value of 3 is rounded up to 4. Using longer offsets
+ slows down the operation of PCRE because it has to load additional data
+ when handling them.
AVOIDING EXCESSIVE STACK USAGE
When matching with the pcre_exec() function, PCRE implements backtrack-
- ing by making recursive calls to an internal function called match().
- In environments where the size of the stack is limited, this can se-
- verely limit PCRE's operation. (The Unix environment does not usually
+ ing by making recursive calls to an internal function called match().
+ In environments where the size of the stack is limited, this can se-
+ verely limit PCRE's operation. (The Unix environment does not usually
suffer from this problem, but it may sometimes be necessary to increase
- the maximum stack size. There is a discussion in the pcrestack docu-
- mentation.) An alternative approach to recursion that uses memory from
- the heap to remember data, instead of using recursive function calls,
- has been implemented to work round the problem of limited stack size.
+ the maximum stack size. There is a discussion in the pcrestack docu-
+ mentation.) An alternative approach to recursion that uses memory from
+ the heap to remember data, instead of using recursive function calls,
+ has been implemented to work round the problem of limited stack size.
If you want to build a version of PCRE that works this way, add
--disable-stack-for-recursion
- to the configure command. With this configuration, PCRE will use the
- pcre_stack_malloc and pcre_stack_free variables to call memory manage-
- ment functions. By default these point to malloc() and free(), but you
+ to the configure command. With this configuration, PCRE will use the
+ pcre_stack_malloc and pcre_stack_free variables to call memory manage-
+ ment functions. By default these point to malloc() and free(), but you
can replace the pointers so that your own functions are used instead.
- Separate functions are provided rather than using pcre_malloc and
- pcre_free because the usage is very predictable: the block sizes
- requested are always the same, and the blocks are always freed in
- reverse order. A calling program might be able to implement optimized
- functions that perform better than malloc() and free(). PCRE runs
+ Separate functions are provided rather than using pcre_malloc and
+ pcre_free because the usage is very predictable: the block sizes
+ requested are always the same, and the blocks are always freed in
+ reverse order. A calling program might be able to implement optimized
+ functions that perform better than malloc() and free(). PCRE runs
noticeably more slowly when built in this way. This option affects only
the pcre_exec() function; it is not relevant for pcre_dfa_exec().
LIMITING PCRE RESOURCE USAGE
- Internally, PCRE has a function called match(), which it calls repeat-
- edly (sometimes recursively) when matching a pattern with the
- pcre_exec() function. By controlling the maximum number of times this
- function may be called during a single matching operation, a limit can
- be placed on the resources used by a single call to pcre_exec(). The
- limit can be changed at run time, as described in the pcreapi documen-
- tation. The default is 10 million, but this can be changed by adding a
+ Internally, PCRE has a function called match(), which it calls repeat-
+ edly (sometimes recursively) when matching a pattern with the
+ pcre_exec() function. By controlling the maximum number of times this
+ function may be called during a single matching operation, a limit can
+ be placed on the resources used by a single call to pcre_exec(). The
+ limit can be changed at run time, as described in the pcreapi documen-
+ tation. The default is 10 million, but this can be changed by adding a
setting such as
--with-match-limit=500000
- to the configure command. This setting has no effect on the
+ to the configure command. This setting has no effect on the
pcre_dfa_exec() matching function.
- In some environments it is desirable to limit the depth of recursive
+ In some environments it is desirable to limit the depth of recursive
calls of match() more strictly than the total number of calls, in order
- to restrict the maximum amount of stack (or heap, if --disable-stack-
+ to restrict the maximum amount of stack (or heap, if --disable-stack-
for-recursion is specified) that is used. A second limit controls this;
- it defaults to the value that is set for --with-match-limit, which
- imposes no additional constraints. However, you can set a lower limit
+ it defaults to the value that is set for --with-match-limit, which
+ imposes no additional constraints. However, you can set a lower limit
by adding, for example,
--with-match-limit-recursion=10000
- to the configure command. This value can also be overridden at run
+ to the configure command. This value can also be overridden at run
time.
CREATING CHARACTER TABLES AT BUILD TIME
- PCRE uses fixed tables for processing characters whose code values are
- less than 256. By default, PCRE is built with a set of tables that are
- distributed in the file pcre_chartables.c.dist. These tables are for
+ PCRE uses fixed tables for processing characters whose code values are
+ less than 256. By default, PCRE is built with a set of tables that are
+ distributed in the file pcre_chartables.c.dist. These tables are for
ASCII codes only. If you add
--enable-rebuild-chartables
- to the configure command, the distributed tables are no longer used.
- Instead, a program called dftables is compiled and run. This outputs
+ to the configure command, the distributed tables are no longer used.
+ Instead, a program called dftables is compiled and run. This outputs
the source for new set of tables, created in the default locale of your
- C runtime system. (This method of replacing the tables does not work if
- you are cross compiling, because dftables is run on the local host. If
- you need to create alternative tables when cross compiling, you will
+ C run-time system. (This method of replacing the tables does not work
+ if you are cross compiling, because dftables is run on the local host.
+ If you need to create alternative tables when cross compiling, you will
have to do so "by hand".)
USING EBCDIC CODE
- PCRE assumes by default that it will run in an environment where the
- character code is ASCII (or Unicode, which is a superset of ASCII).
- This is the case for most computer operating systems. PCRE can, how-
+ PCRE assumes by default that it will run in an environment where the
+ character code is ASCII (or Unicode, which is a superset of ASCII).
+ This is the case for most computer operating systems. PCRE can, how-
ever, be compiled to run in an EBCDIC environment by adding
--enable-ebcdic
to the configure command. This setting implies --enable-rebuild-charta-
- bles. You should only use it if you know that you are in an EBCDIC
- environment (for example, an IBM mainframe operating system). The
- --enable-ebcdic option is incompatible with --enable-utf8.
+ bles. You should only use it if you know that you are in an EBCDIC
+ environment (for example, an IBM mainframe operating system). The
+ --enable-ebcdic option is incompatible with --enable-utf.
PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT
@@ -548,10 +792,26 @@ PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT
--enable-pcregrep-libbz2
to the configure command. These options naturally require that the rel-
- evant libraries are installed on your system. Configuration will fail
+ evant libraries are installed on your system. Configuration will fail
if they are not.
+PCREGREP BUFFER SIZE
+
+ pcregrep uses an internal buffer to hold a "window" on the file it is
+ scanning, in order to be able to output "before" and "after" lines when
+ it finds a match. The size of the buffer is controlled by a parameter
+ whose default value is 20K. The buffer itself is three times this size,
+ but because of the way it is used for holding "before" lines, the long-
+ est line that is guaranteed to be processable is the parameter size.
+ You can change the default parameter value by adding, for example,
+
+ --with-pcregrep-bufsize=50K
+
+ to the configure command. The caller of pcregrep can, however, override
+ this value by specifying a run-time option.
+
+
PCRETEST OPTION FOR LIBREADLINE SUPPORT
If you add
@@ -585,7 +845,7 @@ PCRETEST OPTION FOR LIBREADLINE SUPPORT
SEE ALSO
- pcreapi(3), pcre_config(3).
+ pcreapi(3), pcre16, pcre_config(3).
AUTHOR
@@ -597,8 +857,8 @@ AUTHOR
REVISION
- Last updated: 29 September 2009
- Copyright (c) 1997-2009 University of Cambridge.
+ Last updated: 07 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -614,13 +874,15 @@ PCRE MATCHING ALGORITHMS
This document describes the two different algorithms that are available
in PCRE for matching a compiled regular expression against a given sub-
ject string. The "standard" algorithm is the one provided by the
- pcre_exec() function. This works in the same was as Perl's matching
- function, and provides a Perl-compatible matching operation.
+ pcre_exec() and pcre16_exec() functions. These work in the same was as
+ Perl's matching function, and provide a Perl-compatible matching opera-
+ tion. The just-in-time (JIT) optimization that is described in the
+ pcrejit documentation is compatible with these functions.
- An alternative algorithm is provided by the pcre_dfa_exec() function;
- this operates in a different way, and is not Perl-compatible. It has
- advantages and disadvantages compared with the standard algorithm, and
- these are described below.
+ An alternative algorithm is provided by the pcre_dfa_exec() and
+ pcre16_dfa_exec() functions; they operate in a different way, and are
+ not Perl-compatible. This alternative has advantages and disadvantages
+ compared with the standard algorithm, and these are described below.
When there is only one possible way in which a given subject string can
match a pattern, the two algorithms give the same answer. A difference
@@ -748,42 +1010,43 @@ THE ALTERNATIVE MATCHING ALGORITHM
6. Callouts are supported, but the value of the capture_top field is
always 1, and the value of the capture_last field is always -1.
- 7. The \C escape sequence, which (in the standard algorithm) matches a
- single byte, even in UTF-8 mode, is not supported because the alterna-
- tive algorithm moves through the subject string one character at a
- time, for all active paths through the tree.
+ 7. The \C escape sequence, which (in the standard algorithm) always
+ matches a single data unit, even in UTF-8 or UTF-16 modes, is not sup-
+ ported in these modes, because the alternative algorithm moves through
+ the subject string one character (not data unit) at a time, for all
+ active paths through the tree.
- 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE)
- are not supported. (*FAIL) is supported, and behaves like a failing
+ 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE)
+ are not supported. (*FAIL) is supported, and behaves like a failing
negative assertion.
ADVANTAGES OF THE ALTERNATIVE ALGORITHM
- Using the alternative matching algorithm provides the following advan-
+ Using the alternative matching algorithm provides the following advan-
tages:
1. All possible matches (at a single point in the subject) are automat-
- ically found, and in particular, the longest match is found. To find
+ ically found, and in particular, the longest match is found. To find
more than one match using the standard algorithm, you have to do kludgy
things with callouts.
- 2. Because the alternative algorithm scans the subject string just
- once, and never needs to backtrack, it is possible to pass very long
- subject strings to the matching function in several pieces, checking
- for partial matching each time. Although it is possible to do multi-
- segment matching using the standard algorithm (pcre_exec()), by retain-
- ing partially matched substrings, it is more complicated. The pcrepar-
- tial documentation gives details of partial matching and discusses
- multi-segment matching.
+ 2. Because the alternative algorithm scans the subject string just
+ once, and never needs to backtrack (except for lookbehinds), it is pos-
+ sible to pass very long subject strings to the matching function in
+ several pieces, checking for partial matching each time. Although it is
+ possible to do multi-segment matching using the standard algorithm by
+ retaining partially matched substrings, it is more complicated. The
+ pcrepartial documentation gives details of partial matching and dis-
+ cusses multi-segment matching.
DISADVANTAGES OF THE ALTERNATIVE ALGORITHM
The alternative algorithm suffers from a number of disadvantages:
- 1. It is substantially slower than the standard algorithm. This is
- partly because it has to search for all possible matches, but is also
+ 1. It is substantially slower than the standard algorithm. This is
+ partly because it has to search for all possible matches, but is also
because it is less susceptible to optimization.
2. Capturing parentheses and back references are not supported.
@@ -801,8 +1064,8 @@ AUTHOR
REVISION
- Last updated: 17 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 08 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -812,10 +1075,10 @@ PCREAPI(3) PCREAPI(3)
NAME
PCRE - Perl-compatible regular expressions
+ #include <pcre.h>
-PCRE NATIVE API
- #include <pcre.h>
+PCRE NATIVE API BASIC FUNCTIONS
pcre *pcre_compile(const char *pattern, int options,
const char **errptr, int *erroffset,
@@ -829,6 +1092,8 @@ PCRE NATIVE API
pcre_extra *pcre_study(const pcre *code, int options,
const char **errptr);
+ void pcre_free_study(pcre_extra *extra);
+
int pcre_exec(const pcre *code, const pcre_extra *extra,
const char *subject, int length, int startoffset,
int options, int *ovector, int ovecsize);
@@ -838,6 +1103,9 @@ PCRE NATIVE API
int options, int *ovector, int ovecsize,
int *workspace, int wscount);
+
+PCRE NATIVE API STRING EXTRACTION FUNCTIONS
+
int pcre_copy_named_substring(const pcre *code,
const char *subject, int *ovector,
int stringcount, const char *stringname,
@@ -869,18 +1137,32 @@ PCRE NATIVE API
void pcre_free_substring_list(const char **stringptr);
+
+PCRE NATIVE API AUXILIARY FUNCTIONS
+
+ pcre_jit_stack *pcre_jit_stack_alloc(int startsize, int maxsize);
+
+ void pcre_jit_stack_free(pcre_jit_stack *stack);
+
+ void pcre_assign_jit_stack(pcre_extra *extra,
+ pcre_jit_callback callback, void *data);
+
const unsigned char *pcre_maketables(void);
int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
int what, void *where);
- int pcre_info(const pcre *code, int *optptr, int *firstcharptr);
-
int pcre_refcount(pcre *code, int adjust);
int pcre_config(int what, void *where);
- char *pcre_version(void);
+ const char *pcre_version(void);
+
+ int pcre_pattern_to_host_byte_order(pcre *code,
+ pcre_extra *extra, const unsigned char *tables);
+
+
+PCRE NATIVE API INDIRECTED FUNCTIONS
void *(*pcre_malloc)(size_t);
@@ -893,46 +1175,80 @@ PCRE NATIVE API
int (*pcre_callout)(pcre_callout_block *);
+PCRE 8-BIT AND 16-BIT LIBRARIES
+
+ From release 8.30, PCRE can be compiled as a library for handling
+ 16-bit character strings as well as, or instead of, the original
+ library that handles 8-bit character strings. To avoid too much compli-
+ cation, this document describes the 8-bit versions of the functions,
+ with only occasional references to the 16-bit library.
+
+ The 16-bit functions operate in the same way as their 8-bit counter-
+ parts; they just use different data types for their arguments and
+ results, and their names start with pcre16_ instead of pcre_. For every
+ option that has UTF8 in its name (for example, PCRE_UTF8), there is a
+ corresponding 16-bit name with UTF8 replaced by UTF16. This facility is
+ in fact just cosmetic; the 16-bit option names define the same bit val-
+ ues.
+
+ References to bytes and UTF-8 in this document should be read as refer-
+ ences to 16-bit data quantities and UTF-16 when using the 16-bit
+ library, unless specified otherwise. More details of the specific dif-
+ ferences for the 16-bit library are given in the pcre16 page.
+
+
PCRE API OVERVIEW
PCRE has its own native API, which is described in this document. There
- are also some wrapper functions that correspond to the POSIX regular
- expression API. These are described in the pcreposix documentation.
- Both of these APIs define a set of C function calls. A C++ wrapper is
- distributed with PCRE. It is documented in the pcrecpp page.
-
- The native API C function prototypes are defined in the header file
- pcre.h, and on Unix systems the library itself is called libpcre. It
- can normally be accessed by adding -lpcre to the command for linking an
- application that uses PCRE. The header file defines the macros
- PCRE_MAJOR and PCRE_MINOR to contain the major and minor release num-
- bers for the library. Applications can use these to include support
+ are also some wrapper functions (for the 8-bit library only) that cor-
+ respond to the POSIX regular expression API, but they do not give
+ access to all the functionality. They are described in the pcreposix
+ documentation. Both of these APIs define a set of C function calls. A
+ C++ wrapper (again for the 8-bit library only) is also distributed with
+ PCRE. It is documented in the pcrecpp page.
+
+ The native API C function prototypes are defined in the header file
+ pcre.h, and on Unix-like systems the (8-bit) library itself is called
+ libpcre. It can normally be accessed by adding -lpcre to the command
+ for linking an application that uses PCRE. The header file defines the
+ macros PCRE_MAJOR and PCRE_MINOR to contain the major and minor release
+ numbers for the library. Applications can use these to include support
for different releases of PCRE.
In a Windows environment, if you want to statically link an application
- program against a non-dll pcre.a file, you must define PCRE_STATIC
- before including pcre.h or pcrecpp.h, because otherwise the pcre_mal-
+ program against a non-dll pcre.a file, you must define PCRE_STATIC
+ before including pcre.h or pcrecpp.h, because otherwise the pcre_mal-
loc() and pcre_free() exported functions will be declared
__declspec(dllimport), with unwanted results.
- The functions pcre_compile(), pcre_compile2(), pcre_study(), and
- pcre_exec() are used for compiling and matching regular expressions in
- a Perl-compatible manner. A sample program that demonstrates the sim-
- plest way of using them is provided in the file called pcredemo.c in
+ The functions pcre_compile(), pcre_compile2(), pcre_study(), and
+ pcre_exec() are used for compiling and matching regular expressions in
+ a Perl-compatible manner. A sample program that demonstrates the sim-
+ plest way of using them is provided in the file called pcredemo.c in
the PCRE source distribution. A listing of this program is given in the
- pcredemo documentation, and the pcresample documentation describes how
+ pcredemo documentation, and the pcresample documentation describes how
to compile and run it.
+ Just-in-time compiler support is an optional feature of PCRE that can
+ be built in appropriate hardware environments. It greatly speeds up the
+ matching performance of many patterns. Simple programs can easily
+ request that it be used if available, by setting an option that is
+ ignored when it is not relevant. More complicated programs might need
+ to make use of the functions pcre_jit_stack_alloc(),
+ pcre_jit_stack_free(), and pcre_assign_jit_stack() in order to control
+ the JIT code's memory usage. These functions are discussed in the
+ pcrejit documentation.
+
A second matching function, pcre_dfa_exec(), which is not Perl-compati-
- ble, is also provided. This uses a different algorithm for the match-
- ing. The alternative algorithm finds all possible matches (at a given
- point in the subject), and scans the subject just once (unless there
- are lookbehind assertions). However, this algorithm does not return
- captured substrings. A description of the two matching algorithms and
- their advantages and disadvantages is given in the pcrematching docu-
+ ble, is also provided. This uses a different algorithm for the match-
+ ing. The alternative algorithm finds all possible matches (at a given
+ point in the subject), and scans the subject just once (unless there
+ are lookbehind assertions). However, this algorithm does not return
+ captured substrings. A description of the two matching algorithms and
+ their advantages and disadvantages is given in the pcrematching docu-
mentation.
- In addition to the main compiling and matching functions, there are
+ In addition to the main compiling and matching functions, there are
convenience functions for extracting captured substrings from a subject
string that is matched by pcre_exec(). They are:
@@ -947,103 +1263,106 @@ PCRE API OVERVIEW
pcre_free_substring() and pcre_free_substring_list() are also provided,
to free the memory used for extracted strings.
- The function pcre_maketables() is used to build a set of character
- tables in the current locale for passing to pcre_compile(),
- pcre_exec(), or pcre_dfa_exec(). This is an optional facility that is
- provided for specialist use. Most commonly, no special tables are
- passed, in which case internal tables that are generated when PCRE is
+ The function pcre_maketables() is used to build a set of character
+ tables in the current locale for passing to pcre_compile(),
+ pcre_exec(), or pcre_dfa_exec(). This is an optional facility that is
+ provided for specialist use. Most commonly, no special tables are
+ passed, in which case internal tables that are generated when PCRE is
built are used.
- The function pcre_fullinfo() is used to find out information about a
- compiled pattern; pcre_info() is an obsolete version that returns only
- some of the available information, but is retained for backwards com-
- patibility. The function pcre_version() returns a pointer to a string
- containing the version of PCRE and its date of release.
+ The function pcre_fullinfo() is used to find out information about a
+ compiled pattern. The function pcre_version() returns a pointer to a
+ string containing the version of PCRE and its date of release.
- The function pcre_refcount() maintains a reference count in a data
- block containing a compiled pattern. This is provided for the benefit
+ The function pcre_refcount() maintains a reference count in a data
+ block containing a compiled pattern. This is provided for the benefit
of object-oriented applications.
- The global variables pcre_malloc and pcre_free initially contain the
- entry points of the standard malloc() and free() functions, respec-
+ The global variables pcre_malloc and pcre_free initially contain the
+ entry points of the standard malloc() and free() functions, respec-
tively. PCRE calls the memory management functions via these variables,
- so a calling program can replace them if it wishes to intercept the
+ so a calling program can replace them if it wishes to intercept the
calls. This should be done before calling any PCRE functions.
- The global variables pcre_stack_malloc and pcre_stack_free are also
- indirections to memory management functions. These special functions
- are used only when PCRE is compiled to use the heap for remembering
+ The global variables pcre_stack_malloc and pcre_stack_free are also
+ indirections to memory management functions. These special functions
+ are used only when PCRE is compiled to use the heap for remembering
data, instead of recursive function calls, when running the pcre_exec()
- function. See the pcrebuild documentation for details of how to do
- this. It is a non-standard way of building PCRE, for use in environ-
- ments that have limited stacks. Because of the greater use of memory
- management, it runs more slowly. Separate functions are provided so
- that special-purpose external code can be used for this case. When
- used, these functions are always called in a stack-like manner (last
- obtained, first freed), and always for memory blocks of the same size.
- There is a discussion about PCRE's stack usage in the pcrestack docu-
+ function. See the pcrebuild documentation for details of how to do
+ this. It is a non-standard way of building PCRE, for use in environ-
+ ments that have limited stacks. Because of the greater use of memory
+ management, it runs more slowly. Separate functions are provided so
+ that special-purpose external code can be used for this case. When
+ used, these functions are always called in a stack-like manner (last
+ obtained, first freed), and always for memory blocks of the same size.
+ There is a discussion about PCRE's stack usage in the pcrestack docu-
mentation.
The global variable pcre_callout initially contains NULL. It can be set
- by the caller to a "callout" function, which PCRE will then call at
- specified points during a matching operation. Details are given in the
+ by the caller to a "callout" function, which PCRE will then call at
+ specified points during a matching operation. Details are given in the
pcrecallout documentation.
NEWLINES
- PCRE supports five different conventions for indicating line breaks in
- strings: a single CR (carriage return) character, a single LF (line-
+ PCRE supports five different conventions for indicating line breaks in
+ strings: a single CR (carriage return) character, a single LF (line-
feed) character, the two-character sequence CRLF, any of the three pre-
- ceding, or any Unicode newline sequence. The Unicode newline sequences
- are the three just mentioned, plus the single characters VT (vertical
- tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line
+ ceding, or any Unicode newline sequence. The Unicode newline sequences
+ are the three just mentioned, plus the single characters VT (vertical
+ tab, U+000B), FF (form feed, U+000C), NEL (next line, U+0085), LS (line
separator, U+2028), and PS (paragraph separator, U+2029).
- Each of the first three conventions is used by at least one operating
- system as its standard newline sequence. When PCRE is built, a default
- can be specified. The default default is LF, which is the Unix stan-
- dard. When PCRE is run, the default can be overridden, either when a
+ Each of the first three conventions is used by at least one operating
+ system as its standard newline sequence. When PCRE is built, a default
+ can be specified. The default default is LF, which is the Unix stan-
+ dard. When PCRE is run, the default can be overridden, either when a
pattern is compiled, or when it is matched.
At compile time, the newline convention can be specified by the options
- argument of pcre_compile(), or it can be specified by special text at
+ argument of pcre_compile(), or it can be specified by special text at
the start of the pattern itself; this overrides any other settings. See
the pcrepattern page for details of the special character sequences.
In the PCRE documentation the word "newline" is used to mean "the char-
- acter or pair of characters that indicate a line break". The choice of
- newline convention affects the handling of the dot, circumflex, and
+ acter or pair of characters that indicate a line break". The choice of
+ newline convention affects the handling of the dot, circumflex, and
dollar metacharacters, the handling of #-comments in /x mode, and, when
- CRLF is a recognized line ending sequence, the match position advance-
+ CRLF is a recognized line ending sequence, the match position advance-
ment for a non-anchored pattern. There is more detail about this in the
section on pcre_exec() options below.
- The choice of newline convention does not affect the interpretation of
- the \n or \r escape sequences, nor does it affect what \R matches,
+ The choice of newline convention does not affect the interpretation of
+ the \n or \r escape sequences, nor does it affect what \R matches,
which is controlled in a similar way, but by separate options.
MULTITHREADING
- The PCRE functions can be used in multi-threading applications, with
+ The PCRE functions can be used in multi-threading applications, with
the proviso that the memory management functions pointed to by
pcre_malloc, pcre_free, pcre_stack_malloc, and pcre_stack_free, and the
callout function pointed to by pcre_callout, are shared by all threads.
- The compiled form of a regular expression is not altered during match-
+ The compiled form of a regular expression is not altered during match-
ing, so the same compiled pattern can safely be used by several threads
at once.
+ If the just-in-time optimization feature is being used, it needs sepa-
+ rate memory stack areas for each thread. See the pcrejit documentation
+ for more details.
+
SAVING PRECOMPILED PATTERNS FOR LATER USE
The compiled form of a regular expression can be saved and re-used at a
- later time, possibly by a different program, and even on a host other
- than the one on which it was compiled. Details are given in the
- pcreprecompile documentation. However, compiling a regular expression
- with one version of PCRE for use with a different version is not guar-
- anteed to work and may cause crashes.
+ later time, possibly by a different program, and even on a host other
+ than the one on which it was compiled. Details are given in the
+ pcreprecompile documentation, which includes a description of the
+ pcre_pattern_to_host_byte_order() function. However, compiling a regu-
+ lar expression with one version of PCRE for use with a different ver-
+ sion is not guaranteed to work and may cause crashes.
CHECKING BUILD-TIME OPTIONS
@@ -1057,72 +1376,99 @@ CHECKING BUILD-TIME OPTIONS
The first argument for pcre_config() is an integer, specifying which
information is required; the second argument is a pointer to a variable
- into which the information is placed. The following information is
+ into which the information is placed. The returned value is zero on
+ success, or the negative error code PCRE_ERROR_BADOPTION if the value
+ in the first argument is not recognized. The following information is
available:
PCRE_CONFIG_UTF8
The output is an integer that is set to one if UTF-8 support is avail-
- able; otherwise it is set to zero.
+ able; otherwise it is set to zero. If this option is given to the
+ 16-bit version of this function, pcre16_config(), the result is
+ PCRE_ERROR_BADOPTION.
+
+ PCRE_CONFIG_UTF16
+
+ The output is an integer that is set to one if UTF-16 support is avail-
+ able; otherwise it is set to zero. This value should normally be given
+ to the 16-bit version of this function, pcre16_config(). If it is given
+ to the 8-bit version of this function, the result is PCRE_ERROR_BADOP-
+ TION.
PCRE_CONFIG_UNICODE_PROPERTIES
The output is an integer that is set to one if support for Unicode
character properties is available; otherwise it is set to zero.
+ PCRE_CONFIG_JIT
+
+ The output is an integer that is set to one if support for just-in-time
+ compiling is available; otherwise it is set to zero.
+
+ PCRE_CONFIG_JITTARGET
+
+ The output is a pointer to a zero-terminated "const char *" string. If
+ JIT support is available, the string contains the name of the architec-
+ ture for which the JIT compiler is configured, for example "x86 32bit
+ (little endian + unaligned)". If JIT support is not available, the
+ result is NULL.
+
PCRE_CONFIG_NEWLINE
- The output is an integer whose value specifies the default character
- sequence that is recognized as meaning "newline". The four values that
+ The output is an integer whose value specifies the default character
+ sequence that is recognized as meaning "newline". The four values that
are supported are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF,
- and -1 for ANY. Though they are derived from ASCII, the same values
+ and -1 for ANY. Though they are derived from ASCII, the same values
are returned in EBCDIC environments. The default should normally corre-
spond to the standard sequence for your operating system.
PCRE_CONFIG_BSR
The output is an integer whose value indicates what character sequences
- the \R escape sequence matches by default. A value of 0 means that \R
- matches any Unicode line ending sequence; a value of 1 means that \R
+ the \R escape sequence matches by default. A value of 0 means that \R
+ matches any Unicode line ending sequence; a value of 1 means that \R
matches only CR, LF, or CRLF. The default can be overridden when a pat-
tern is compiled or matched.
PCRE_CONFIG_LINK_SIZE
- The output is an integer that contains the number of bytes used for
- internal linkage in compiled regular expressions. The value is 2, 3, or
- 4. Larger values allow larger regular expressions to be compiled, at
- the expense of slower matching. The default value of 2 is sufficient
- for all but the most massive patterns, since it allows the compiled
- pattern to be up to 64K in size.
+ The output is an integer that contains the number of bytes used for
+ internal linkage in compiled regular expressions. For the 8-bit
+ library, the value can be 2, 3, or 4. For the 16-bit library, the value
+ is either 2 or 4 and is still a number of bytes. The default value of 2
+ is sufficient for all but the most massive patterns, since it allows
+ the compiled pattern to be up to 64K in size. Larger values allow
+ larger regular expressions to be compiled, at the expense of slower
+ matching.
PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
- The output is an integer that contains the threshold above which the
- POSIX interface uses malloc() for output vectors. Further details are
+ The output is an integer that contains the threshold above which the
+ POSIX interface uses malloc() for output vectors. Further details are
given in the pcreposix documentation.
PCRE_CONFIG_MATCH_LIMIT
- The output is a long integer that gives the default limit for the num-
- ber of internal matching function calls in a pcre_exec() execution.
+ The output is a long integer that gives the default limit for the num-
+ ber of internal matching function calls in a pcre_exec() execution.
Further details are given with pcre_exec() below.
PCRE_CONFIG_MATCH_LIMIT_RECURSION
The output is a long integer that gives the default limit for the depth
- of recursion when calling the internal matching function in a
- pcre_exec() execution. Further details are given with pcre_exec()
+ of recursion when calling the internal matching function in a
+ pcre_exec() execution. Further details are given with pcre_exec()
below.
PCRE_CONFIG_STACKRECURSE
- The output is an integer that is set to one if internal recursion when
+ The output is an integer that is set to one if internal recursion when
running pcre_exec() is implemented by recursive function calls that use
- the stack to remember their state. This is the usual way that PCRE is
+ the stack to remember their state. This is the usual way that PCRE is
compiled. The output is zero if PCRE was compiled to use blocks of data
- on the heap instead of recursive function calls. In this case,
- pcre_stack_malloc and pcre_stack_free are called to manage memory
+ on the heap instead of recursive function calls. In this case,
+ pcre_stack_malloc and pcre_stack_free are called to manage memory
blocks on the heap, thus avoiding the use of the stack.
@@ -1139,65 +1485,65 @@ COMPILING A PATTERN
Either of the functions pcre_compile() or pcre_compile2() can be called
to compile a pattern into an internal form. The only difference between
- the two interfaces is that pcre_compile2() has an additional argument,
- errorcodeptr, via which a numerical error code can be returned. To
- avoid too much repetition, we refer just to pcre_compile() below, but
+ the two interfaces is that pcre_compile2() has an additional argument,
+ errorcodeptr, via which a numerical error code can be returned. To
+ avoid too much repetition, we refer just to pcre_compile() below, but
the information applies equally to pcre_compile2().
The pattern is a C string terminated by a binary zero, and is passed in
- the pattern argument. A pointer to a single block of memory that is
- obtained via pcre_malloc is returned. This contains the compiled code
+ the pattern argument. A pointer to a single block of memory that is
+ obtained via pcre_malloc is returned. This contains the compiled code
and related data. The pcre type is defined for the returned block; this
is a typedef for a structure whose contents are not externally defined.
It is up to the caller to free the memory (via pcre_free) when it is no
longer required.
- Although the compiled code of a PCRE regex is relocatable, that is, it
+ Although the compiled code of a PCRE regex is relocatable, that is, it
does not depend on memory location, the complete pcre data block is not
- fully relocatable, because it may contain a copy of the tableptr argu-
+ fully relocatable, because it may contain a copy of the tableptr argu-
ment, which is an address (see below).
The options argument contains various bit settings that affect the com-
- pilation. It should be zero if no options are required. The available
- options are described below. Some of them (in particular, those that
- are compatible with Perl, but some others as well) can also be set and
- unset from within the pattern (see the detailed description in the
- pcrepattern documentation). For those options that can be different in
- different parts of the pattern, the contents of the options argument
+ pilation. It should be zero if no options are required. The available
+ options are described below. Some of them (in particular, those that
+ are compatible with Perl, but some others as well) can also be set and
+ unset from within the pattern (see the detailed description in the
+ pcrepattern documentation). For those options that can be different in
+ different parts of the pattern, the contents of the options argument
specifies their settings at the start of compilation and execution. The
- PCRE_ANCHORED, PCRE_BSR_xxx, PCRE_NEWLINE_xxx, PCRE_NO_UTF8_CHECK, and
- PCRE_NO_START_OPT options can be set at the time of matching as well as
- at compile time.
+ PCRE_ANCHORED, PCRE_BSR_xxx, PCRE_NEWLINE_xxx, PCRE_NO_UTF8_CHECK, and
+ PCRE_NO_START_OPTIMIZE options can be set at the time of matching as
+ well as at compile time.
If errptr is NULL, pcre_compile() returns NULL immediately. Otherwise,
- if compilation of a pattern fails, pcre_compile() returns NULL, and
+ if compilation of a pattern fails, pcre_compile() returns NULL, and
sets the variable pointed to by errptr to point to a textual error mes-
sage. This is a static string that is part of the library. You must not
- try to free it. The offset from the start of the pattern to the byte
- that was being processed when the error was discovered is placed in the
- variable pointed to by erroffset, which must not be NULL. If it is, an
- immediate error is given. Some errors are not detected until checks are
- carried out when the whole pattern has been scanned; in this case the
- offset is set to the end of the pattern.
-
+ try to free it. Normally, the offset from the start of the pattern to
+ the byte that was being processed when the error was discovered is
+ placed in the variable pointed to by erroffset, which must not be NULL
+ (if it is, an immediate error is given). However, for an invalid UTF-8
+ string, the offset is that of the first byte of the failing character.
+
+ Some errors are not detected until the whole pattern has been scanned;
+ in these cases, the offset passed back is the length of the pattern.
Note that the offset is in bytes, not characters, even in UTF-8 mode.
- It may point into the middle of a UTF-8 character (for example, when
- PCRE_ERROR_BADUTF8 is returned for an invalid UTF-8 string).
+ It may sometimes point into the middle of a UTF-8 character.
- If pcre_compile2() is used instead of pcre_compile(), and the error-
- codeptr argument is not NULL, a non-zero error code number is returned
- via this argument in the event of an error. This is in addition to the
+ If pcre_compile2() is used instead of pcre_compile(), and the error-
+ codeptr argument is not NULL, a non-zero error code number is returned
+ via this argument in the event of an error. This is in addition to the
textual error message. Error codes and messages are listed below.
- If the final argument, tableptr, is NULL, PCRE uses a default set of
- character tables that are built when PCRE is compiled, using the
- default C locale. Otherwise, tableptr must be an address that is the
- result of a call to pcre_maketables(). This value is stored with the
- compiled pattern, and used again by pcre_exec(), unless another table
+ If the final argument, tableptr, is NULL, PCRE uses a default set of
+ character tables that are built when PCRE is compiled, using the
+ default C locale. Otherwise, tableptr must be an address that is the
+ result of a call to pcre_maketables(). This value is stored with the
+ compiled pattern, and used again by pcre_exec(), unless another table
pointer is passed to it. For more discussion, see the section on locale
support below.
- This code fragment shows a typical straightforward call to pcre_com-
+ This code fragment shows a typical straightforward call to pcre_com-
pile():
pcre *re;
@@ -1210,147 +1556,161 @@ COMPILING A PATTERN
&erroffset, /* for error offset */
NULL); /* use default character tables */
- The following names for option bits are defined in the pcre.h header
+ The following names for option bits are defined in the pcre.h header
file:
PCRE_ANCHORED
If this bit is set, the pattern is forced to be "anchored", that is, it
- is constrained to match only at the first matching point in the string
- that is being searched (the "subject string"). This effect can also be
- achieved by appropriate constructs in the pattern itself, which is the
+ is constrained to match only at the first matching point in the string
+ that is being searched (the "subject string"). This effect can also be
+ achieved by appropriate constructs in the pattern itself, which is the
only way to do it in Perl.
PCRE_AUTO_CALLOUT
If this bit is set, pcre_compile() automatically inserts callout items,
- all with number 255, before each pattern item. For discussion of the
+ all with number 255, before each pattern item. For discussion of the
callout facility, see the pcrecallout documentation.
PCRE_BSR_ANYCRLF
PCRE_BSR_UNICODE
These options (which are mutually exclusive) control what the \R escape
- sequence matches. The choice is either to match only CR, LF, or CRLF,
+ sequence matches. The choice is either to match only CR, LF, or CRLF,
or to match any Unicode newline sequence. The default is specified when
PCRE is built. It can be overridden from within the pattern, or by set-
ting an option when a compiled pattern is matched.
PCRE_CASELESS
- If this bit is set, letters in the pattern match both upper and lower
- case letters. It is equivalent to Perl's /i option, and it can be
- changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE
- always understands the concept of case for characters whose values are
- less than 128, so caseless matching is always possible. For characters
- with higher values, the concept of case is supported if PCRE is com-
- piled with Unicode property support, but not otherwise. If you want to
- use caseless matching for characters 128 and above, you must ensure
- that PCRE is compiled with Unicode property support as well as with
+ If this bit is set, letters in the pattern match both upper and lower
+ case letters. It is equivalent to Perl's /i option, and it can be
+ changed within a pattern by a (?i) option setting. In UTF-8 mode, PCRE
+ always understands the concept of case for characters whose values are
+ less than 128, so caseless matching is always possible. For characters
+ with higher values, the concept of case is supported if PCRE is com-
+ piled with Unicode property support, but not otherwise. If you want to
+ use caseless matching for characters 128 and above, you must ensure
+ that PCRE is compiled with Unicode property support as well as with
UTF-8 support.
PCRE_DOLLAR_ENDONLY
- If this bit is set, a dollar metacharacter in the pattern matches only
- at the end of the subject string. Without this option, a dollar also
- matches immediately before a newline at the end of the string (but not
- before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored
- if PCRE_MULTILINE is set. There is no equivalent to this option in
+ If this bit is set, a dollar metacharacter in the pattern matches only
+ at the end of the subject string. Without this option, a dollar also
+ matches immediately before a newline at the end of the string (but not
+ before any other newlines). The PCRE_DOLLAR_ENDONLY option is ignored
+ if PCRE_MULTILINE is set. There is no equivalent to this option in
Perl, and no way to set it within a pattern.
PCRE_DOTALL
- If this bit is set, a dot metacharacter in the pattern matches a char-
+ If this bit is set, a dot metacharacter in the pattern matches a char-
acter of any value, including one that indicates a newline. However, it
- only ever matches one character, even if newlines are coded as CRLF.
- Without this option, a dot does not match when the current position is
+ only ever matches one character, even if newlines are coded as CRLF.
+ Without this option, a dot does not match when the current position is
at a newline. This option is equivalent to Perl's /s option, and it can
- be changed within a pattern by a (?s) option setting. A negative class
+ be changed within a pattern by a (?s) option setting. A negative class
such as [^a] always matches newline characters, independent of the set-
ting of this option.
PCRE_DUPNAMES
- If this bit is set, names used to identify capturing subpatterns need
+ If this bit is set, names used to identify capturing subpatterns need
not be unique. This can be helpful for certain types of pattern when it
- is known that only one instance of the named subpattern can ever be
- matched. There are more details of named subpatterns below; see also
+ is known that only one instance of the named subpattern can ever be
+ matched. There are more details of named subpatterns below; see also
the pcrepattern documentation.
PCRE_EXTENDED
- If this bit is set, whitespace data characters in the pattern are
- totally ignored except when escaped or inside a character class. White-
+ If this bit is set, white space data characters in the pattern are
+ totally ignored except when escaped or inside a character class. White
space does not include the VT character (code 11). In addition, charac-
ters between an unescaped # outside a character class and the next new-
- line, inclusive, are also ignored. This is equivalent to Perl's /x
- option, and it can be changed within a pattern by a (?x) option set-
+ line, inclusive, are also ignored. This is equivalent to Perl's /x
+ option, and it can be changed within a pattern by a (?x) option set-
ting.
- Which characters are interpreted as newlines is controlled by the
- options passed to pcre_compile() or by a special sequence at the start
- of the pattern, as described in the section entitled "Newline conven-
+ Which characters are interpreted as newlines is controlled by the
+ options passed to pcre_compile() or by a special sequence at the start
+ of the pattern, as described in the section entitled "Newline conven-
tions" in the pcrepattern documentation. Note that the end of this type
- of comment is a literal newline sequence in the pattern; escape
+ of comment is a literal newline sequence in the pattern; escape
sequences that happen to represent a newline do not count.
- This option makes it possible to include comments inside complicated
- patterns. Note, however, that this applies only to data characters.
- Whitespace characters may never appear within special character
+ This option makes it possible to include comments inside complicated
+ patterns. Note, however, that this applies only to data characters.
+ White space characters may never appear within special character
sequences in a pattern, for example within the sequence (?( that intro-
duces a conditional subpattern.
PCRE_EXTRA
- This option was invented in order to turn on additional functionality
- of PCRE that is incompatible with Perl, but it is currently of very
- little use. When set, any backslash in a pattern that is followed by a
- letter that has no special meaning causes an error, thus reserving
- these combinations for future expansion. By default, as in Perl, a
- backslash followed by a letter with no special meaning is treated as a
+ This option was invented in order to turn on additional functionality
+ of PCRE that is incompatible with Perl, but it is currently of very
+ little use. When set, any backslash in a pattern that is followed by a
+ letter that has no special meaning causes an error, thus reserving
+ these combinations for future expansion. By default, as in Perl, a
+ backslash followed by a letter with no special meaning is treated as a
literal. (Perl can, however, be persuaded to give an error for this, by
- running it with the -w option.) There are at present no other features
- controlled by this option. It can also be set by a (?X) option setting
+ running it with the -w option.) There are at present no other features
+ controlled by this option. It can also be set by a (?X) option setting
within a pattern.
PCRE_FIRSTLINE
- If this option is set, an unanchored pattern is required to match
- before or at the first newline in the subject string, though the
+ If this option is set, an unanchored pattern is required to match
+ before or at the first newline in the subject string, though the
matched text may continue over the newline.
PCRE_JAVASCRIPT_COMPAT
If this option is set, PCRE's behaviour is changed in some ways so that
- it is compatible with JavaScript rather than Perl. The changes are as
+ it is compatible with JavaScript rather than Perl. The changes are as
follows:
- (1) A lone closing square bracket in a pattern causes a compile-time
- error, because this is illegal in JavaScript (by default it is treated
+ (1) A lone closing square bracket in a pattern causes a compile-time
+ error, because this is illegal in JavaScript (by default it is treated
as a data character). Thus, the pattern AB]CD becomes illegal when this
option is set.
- (2) At run time, a back reference to an unset subpattern group matches
- an empty string (by default this causes the current matching alterna-
- tive to fail). A pattern such as (\1)(a) succeeds when this option is
- set (assuming it can find an "a" in the subject), whereas it fails by
+ (2) At run time, a back reference to an unset subpattern group matches
+ an empty string (by default this causes the current matching alterna-
+ tive to fail). A pattern such as (\1)(a) succeeds when this option is
+ set (assuming it can find an "a" in the subject), whereas it fails by
default, for Perl compatibility.
+ (3) \U matches an upper case "U" character; by default \U causes a com-
+ pile time error (Perl uses \U to upper case subsequent characters).
+
+ (4) \u matches a lower case "u" character unless it is followed by four
+ hexadecimal digits, in which case the hexadecimal number defines the
+ code point to match. By default, \u causes a compile time error (Perl
+ uses it to upper case the following character).
+
+ (5) \x matches a lower case "x" character unless it is followed by two
+ hexadecimal digits, in which case the hexadecimal number defines the
+ code point to match. By default, as in Perl, a hexadecimal number is
+ always expected after \x, but it may have zero, one, or two digits (so,
+ for example, \xz matches a binary zero character followed by z).
+
PCRE_MULTILINE
- By default, PCRE treats the subject string as consisting of a single
- line of characters (even if it actually contains newlines). The "start
- of line" metacharacter (^) matches only at the start of the string,
- while the "end of line" metacharacter ($) matches only at the end of
+ By default, PCRE treats the subject string as consisting of a single
+ line of characters (even if it actually contains newlines). The "start
+ of line" metacharacter (^) matches only at the start of the string,
+ while the "end of line" metacharacter ($) matches only at the end of
the string, or before a terminating newline (unless PCRE_DOLLAR_ENDONLY
is set). This is the same as Perl.
- When PCRE_MULTILINE it is set, the "start of line" and "end of line"
- constructs match immediately following or immediately before internal
- newlines in the subject string, respectively, as well as at the very
- start and end. This is equivalent to Perl's /m option, and it can be
+ When PCRE_MULTILINE it is set, the "start of line" and "end of line"
+ constructs match immediately following or immediately before internal
+ newlines in the subject string, respectively, as well as at the very
+ start and end. This is equivalent to Perl's /m option, and it can be
changed within a pattern by a (?m) option setting. If there are no new-
- lines in a subject string, or no occurrences of ^ or $ in a pattern,
+ lines in a subject string, or no occurrences of ^ or $ in a pattern,
setting PCRE_MULTILINE has no effect.
PCRE_NEWLINE_CR
@@ -1359,32 +1719,32 @@ COMPILING A PATTERN
PCRE_NEWLINE_ANYCRLF
PCRE_NEWLINE_ANY
- These options override the default newline definition that was chosen
- when PCRE was built. Setting the first or the second specifies that a
- newline is indicated by a single character (CR or LF, respectively).
- Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the
- two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies
+ These options override the default newline definition that was chosen
+ when PCRE was built. Setting the first or the second specifies that a
+ newline is indicated by a single character (CR or LF, respectively).
+ Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the
+ two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies
that any of the three preceding sequences should be recognized. Setting
- PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be
+ PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be
recognized. The Unicode newline sequences are the three just mentioned,
- plus the single characters VT (vertical tab, U+000B), FF (formfeed,
- U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
- (paragraph separator, U+2029). The last two are recognized only in
- UTF-8 mode.
+ plus the single characters VT (vertical tab, U+000B), FF (form feed,
+ U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS
+ (paragraph separator, U+2029). For the 8-bit library, the last two are
+ recognized only in UTF-8 mode.
- The newline setting in the options word uses three bits that are
+ The newline setting in the options word uses three bits that are
treated as a number, giving eight possibilities. Currently only six are
- used (default plus the five values above). This means that if you set
- more than one newline option, the combination may or may not be sensi-
+ used (default plus the five values above). This means that if you set
+ more than one newline option, the combination may or may not be sensi-
ble. For example, PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to
- PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and
+ PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and
cause an error.
- The only time that a line break in a pattern is specially recognized
- when compiling is when PCRE_EXTENDED is set. CR and LF are whitespace
- characters, and so are ignored in this mode. Also, an unescaped # out-
- side a character class indicates a comment that lasts until after the
- next line break sequence. In other circumstances, line break sequences
+ The only time that a line break in a pattern is specially recognized
+ when compiling is when PCRE_EXTENDED is set. CR and LF are white space
+ characters, and so are ignored in this mode. Also, an unescaped # out-
+ side a character class indicates a comment that lasts until after the
+ next line break sequence. In other circumstances, line break sequences
in patterns are treated as literal data.
The newline option that is set at compile time becomes the default that
@@ -1393,66 +1753,67 @@ COMPILING A PATTERN
PCRE_NO_AUTO_CAPTURE
If this option is set, it disables the use of numbered capturing paren-
- theses in the pattern. Any opening parenthesis that is not followed by
- ? behaves as if it were followed by ?: but named parentheses can still
- be used for capturing (and they acquire numbers in the usual way).
+ theses in the pattern. Any opening parenthesis that is not followed by
+ ? behaves as if it were followed by ?: but named parentheses can still
+ be used for capturing (and they acquire numbers in the usual way).
There is no equivalent of this option in Perl.
NO_START_OPTIMIZE
- This is an option that acts at matching time; that is, it is really an
- option for pcre_exec() or pcre_dfa_exec(). If it is set at compile
- time, it is remembered with the compiled pattern and assumed at match-
- ing time. For details see the discussion of PCRE_NO_START_OPTIMIZE
+ This is an option that acts at matching time; that is, it is really an
+ option for pcre_exec() or pcre_dfa_exec(). If it is set at compile
+ time, it is remembered with the compiled pattern and assumed at match-
+ ing time. For details see the discussion of PCRE_NO_START_OPTIMIZE
below.
PCRE_UCP
- This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W,
- \w, and some of the POSIX character classes. By default, only ASCII
- characters are recognized, but if PCRE_UCP is set, Unicode properties
- are used instead to classify characters. More details are given in the
- section on generic character types in the pcrepattern page. If you set
- PCRE_UCP, matching one of the items it affects takes much longer. The
- option is available only if PCRE has been compiled with Unicode prop-
+ This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W,
+ \w, and some of the POSIX character classes. By default, only ASCII
+ characters are recognized, but if PCRE_UCP is set, Unicode properties
+ are used instead to classify characters. More details are given in the
+ section on generic character types in the pcrepattern page. If you set
+ PCRE_UCP, matching one of the items it affects takes much longer. The
+ option is available only if PCRE has been compiled with Unicode prop-
erty support.
PCRE_UNGREEDY
- This option inverts the "greediness" of the quantifiers so that they
- are not greedy by default, but become greedy if followed by "?". It is
- not compatible with Perl. It can also be set by a (?U) option setting
+ This option inverts the "greediness" of the quantifiers so that they
+ are not greedy by default, but become greedy if followed by "?". It is
+ not compatible with Perl. It can also be set by a (?U) option setting
within the pattern.
PCRE_UTF8
- This option causes PCRE to regard both the pattern and the subject as
- strings of UTF-8 characters instead of single-byte character strings.
- However, it is available only when PCRE is built to include UTF-8 sup-
- port. If not, the use of this option provokes an error. Details of how
- this option changes the behaviour of PCRE are given in the section on
- UTF-8 support in the main pcre page.
+ This option causes PCRE to regard both the pattern and the subject as
+ strings of UTF-8 characters instead of single-byte strings. However, it
+ is available only when PCRE is built to include UTF support. If not,
+ the use of this option provokes an error. Details of how this option
+ changes the behaviour of PCRE are given in the pcreunicode page.
PCRE_NO_UTF8_CHECK
When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
automatically checked. There is a discussion about the validity of
- UTF-8 strings in the main pcre page. If an invalid UTF-8 sequence of
- bytes is found, pcre_compile() returns an error. If you already know
- that your pattern is valid, and you want to skip this check for perfor-
- mance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is
- set, the effect of passing an invalid UTF-8 string as a pattern is
- undefined. It may cause your program to crash. Note that this option
- can also be passed to pcre_exec() and pcre_dfa_exec(), to suppress the
- UTF-8 validity checking of subject strings.
+ UTF-8 strings in the pcreunicode page. If an invalid UTF-8 sequence is
+ found, pcre_compile() returns an error. If you already know that your
+ pattern is valid, and you want to skip this check for performance rea-
+ sons, you can set the PCRE_NO_UTF8_CHECK option. When it is set, the
+ effect of passing an invalid UTF-8 string as a pattern is undefined. It
+ may cause your program to crash. Note that this option can also be
+ passed to pcre_exec() and pcre_dfa_exec(), to suppress the validity
+ checking of subject strings.
COMPILATION ERROR CODES
The following table lists the error codes than may be returned by
pcre_compile2(), along with the error messages that may be returned by
- both compiling functions. As PCRE has developed, some error codes have
- fallen out of use. To avoid confusion, they have not been re-used.
+ both compiling functions. Note that error messages are always 8-bit
+ ASCII strings, even in 16-bit mode. As PCRE has developed, some error
+ codes have fallen out of use. To avoid confusion, they have not been
+ re-used.
0 no error
1 \ at end of pattern
@@ -1486,26 +1847,26 @@ COMPILATION ERROR CODES
29 (?R or (?[+-]digits must be followed by )
30 unknown POSIX class name
31 POSIX collating elements are not supported
- 32 this version of PCRE is not compiled with PCRE_UTF8 support
+ 32 this version of PCRE is compiled without UTF support
33 [this code is not in use]
34 character value in \x{...} sequence is too large
35 invalid condition (?(0)
36 \C not allowed in lookbehind assertion
- 37 PCRE does not support \L, \l, \N, \U, or \u
+ 37 PCRE does not support \L, \l, \N{name}, \U, or \u
38 number after (?C is > 255
39 closing ) for (?C expected
40 recursive call could loop indefinitely
41 unrecognized character after (?P
42 syntax error in subpattern name (missing terminator)
43 two named subpatterns have the same name
- 44 invalid UTF-8 string
+ 44 invalid UTF-8 string (specifically UTF-8)
45 support for \P, \p, and \X has not been compiled
46 malformed \P or \p sequence
47 unknown property name after \P or \p
48 subpattern name is too long (maximum 32 characters)
49 too many named subpatterns (maximum 10000)
50 [this code is not in use]
- 51 octal value is greater than \377 (not in UTF-8 mode)
+ 51 octal value is greater than \377 in 8-bit non-UTF-8 mode
52 internal error: overran compiling workspace
53 internal error: previously-checked referenced subpattern
not found
@@ -1524,7 +1885,17 @@ COMPILATION ERROR CODES
65 different names for subpatterns of the same number are
not allowed
66 (*MARK) must have an argument
- 67 this version of PCRE is not compiled with PCRE_UCP support
+ 67 this version of PCRE is not compiled with Unicode property
+ support
+ 68 \c must be followed by an ASCII character
+ 69 \k is not followed by a braced, angle-bracketed, or quoted name
+ 70 internal error: unknown opcode in find_fixedlength()
+ 71 \N is not supported in a class
+ 72 too many forward references
+ 73 disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
+ 74 invalid UTF-16 string (specifically UTF-16)
+ 75 name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
+ 76 character value in \u.... sequence is too large
The numbers 32 and 10000 in errors 48 and 49 are defaults; different
values may be used if the limits were changed when PCRE was built.
@@ -1553,8 +1924,26 @@ STUDYING A PATTERN
wants to pass any of the other fields to pcre_exec() or
pcre_dfa_exec(), it must set up its own pcre_extra block.
- The second argument of pcre_study() contains option bits. At present,
- no options are defined, and this argument should always be zero.
+ The second argument of pcre_study() contains option bits. There are
+ three options:
+
+ PCRE_STUDY_JIT_COMPILE
+ PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
+ PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
+
+ If any of these are set, and the just-in-time compiler is available,
+ the pattern is further compiled into machine code that executes much
+ faster than the pcre_exec() interpretive matching function. If the
+ just-in-time compiler is not available, these options are ignored. All
+ other bits in the options argument must be zero.
+
+ JIT compilation is a heavyweight optimization. It can take some time
+ for patterns to be analyzed, and for one-off matches and simple pat-
+ terns the benefit of faster execution might be offset by a much slower
+ study time. Not all patterns can be optimized by the JIT compiler. For
+ those that cannot be handled, matching automatically falls back to the
+ pcre_exec() interpreter. For more details, see the pcrejit documenta-
+ tion.
The third argument for pcre_study() is a pointer for an error message.
If studying succeeds (even if no data is returned), the variable it
@@ -1563,13 +1952,29 @@ STUDYING A PATTERN
must not try to free it. You should test the error pointer for NULL
after calling pcre_study(), to be sure that it has run successfully.
- This is a typical call to pcre_study():
+ When you are finished with a pattern, you can free the memory used for
+ the study data by calling pcre_free_study(). This function was added to
+ the API for release 8.20. For earlier versions, the memory could be
+ freed with pcre_free(), just like the pattern itself. This will still
+ work in cases where JIT optimization is not used, but it is advisable
+ to change to the new function when convenient.
- pcre_extra *pe;
- pe = pcre_study(
+ This is a typical way in which pcre_study() is used (except that in a
+ real application there should be tests for errors):
+
+ int rc;
+ pcre *re;
+ pcre_extra *sd;
+ re = pcre_compile("pattern", 0, &error, &erroroffset, NULL);
+ sd = pcre_study(
re, /* result of pcre_compile() */
- 0, /* no options exist */
+ 0, /* no options */
&error); /* set to NULL or points to a message */
+ rc = pcre_exec( /* see below for details of pcre_exec() options */
+ re, sd, "subject", 7, 0, 0, ovector, 30);
+ ...
+ pcre_free_study(sd);
+ pcre_free(re);
Studying a pattern does two things: first, a lower bound for the length
of subject string that is needed to match the pattern is computed. This
@@ -1582,70 +1987,73 @@ STUDYING A PATTERN
Studying a pattern is also useful for non-anchored patterns that do not
have a single fixed starting character. A bitmap of possible starting
bytes is created. This speeds up finding a position in the subject at
- which to start matching.
+ which to start matching. (In 16-bit mode, the bitmap is used for 16-bit
+ values less than 256.)
- The two optimizations just described can be disabled by setting the
- PCRE_NO_START_OPTIMIZE option when calling pcre_exec() or
- pcre_dfa_exec(). You might want to do this if your pattern contains
- callouts or (*MARK), and you want to make use of these facilities in
- cases where matching fails. See the discussion of PCRE_NO_START_OPTI-
- MIZE below.
+ These two optimizations apply to both pcre_exec() and pcre_dfa_exec(),
+ and the information is also used by the JIT compiler. The optimiza-
+ tions can be disabled by setting the PCRE_NO_START_OPTIMIZE option when
+ calling pcre_exec() or pcre_dfa_exec(), but if this is done, JIT execu-
+ tion is also disabled. You might want to do this if your pattern con-
+ tains callouts or (*MARK) and you want to make use of these facilities
+ in cases where matching fails. See the discussion of
+ PCRE_NO_START_OPTIMIZE below.
LOCALE SUPPORT
- PCRE handles caseless matching, and determines whether characters are
- letters, digits, or whatever, by reference to a set of tables, indexed
- by character value. When running in UTF-8 mode, this applies only to
- characters with codes less than 128. By default, higher-valued codes
+ PCRE handles caseless matching, and determines whether characters are
+ letters, digits, or whatever, by reference to a set of tables, indexed
+ by character value. When running in UTF-8 mode, this applies only to
+ characters with codes less than 128. By default, higher-valued codes
never match escapes such as \w or \d, but they can be tested with \p if
- PCRE is built with Unicode character property support. Alternatively,
- the PCRE_UCP option can be set at compile time; this causes \w and
+ PCRE is built with Unicode character property support. Alternatively,
+ the PCRE_UCP option can be set at compile time; this causes \w and
friends to use Unicode property support instead of built-in tables. The
use of locales with Unicode is discouraged. If you are handling charac-
- ters with codes greater than 128, you should either use UTF-8 and Uni-
+ ters with codes greater than 128, you should either use UTF-8 and Uni-
code, or use locales, but not try to mix the two.
- PCRE contains an internal set of tables that are used when the final
- argument of pcre_compile() is NULL. These are sufficient for many
+ PCRE contains an internal set of tables that are used when the final
+ argument of pcre_compile() is NULL. These are sufficient for many
applications. Normally, the internal tables recognize only ASCII char-
acters. However, when PCRE is built, it is possible to cause the inter-
nal tables to be rebuilt in the default "C" locale of the local system,
which may cause them to be different.
- The internal tables can always be overridden by tables supplied by the
+ The internal tables can always be overridden by tables supplied by the
application that calls PCRE. These may be created in a different locale
- from the default. As more and more applications change to using Uni-
+ from the default. As more and more applications change to using Uni-
code, the need for this locale support is expected to die away.
- External tables are built by calling the pcre_maketables() function,
- which has no arguments, in the relevant locale. The result can then be
- passed to pcre_compile() or pcre_exec() as often as necessary. For
- example, to build and use tables that are appropriate for the French
- locale (where accented characters with values greater than 128 are
+ External tables are built by calling the pcre_maketables() function,
+ which has no arguments, in the relevant locale. The result can then be
+ passed to pcre_compile() or pcre_exec() as often as necessary. For
+ example, to build and use tables that are appropriate for the French
+ locale (where accented characters with values greater than 128 are
treated as letters), the following code could be used:
setlocale(LC_CTYPE, "fr_FR");
tables = pcre_maketables();
re = pcre_compile(..., tables);
- The locale name "fr_FR" is used on Linux and other Unix-like systems;
+ The locale name "fr_FR" is used on Linux and other Unix-like systems;
if you are using Windows, the name for the French locale is "french".
- When pcre_maketables() runs, the tables are built in memory that is
- obtained via pcre_malloc. It is the caller's responsibility to ensure
- that the memory containing the tables remains available for as long as
+ When pcre_maketables() runs, the tables are built in memory that is
+ obtained via pcre_malloc. It is the caller's responsibility to ensure
+ that the memory containing the tables remains available for as long as
it is needed.
The pointer that is passed to pcre_compile() is saved with the compiled
- pattern, and the same tables are used via this pointer by pcre_study()
+ pattern, and the same tables are used via this pointer by pcre_study()
and normally also by pcre_exec(). Thus, by default, for any single pat-
tern, compilation, studying and matching all happen in the same locale,
but different patterns can be compiled in different locales.
- It is possible to pass a table pointer or NULL (indicating the use of
- the internal tables) to pcre_exec(). Although not intended for this
- purpose, this facility could be used to match a pattern in a different
+ It is possible to pass a table pointer or NULL (indicating the use of
+ the internal tables) to pcre_exec(). Although not intended for this
+ purpose, this facility could be used to match a pattern in a different
locale from the one in which it was compiled. Passing table pointers at
run time is discussed below in the section on matching a pattern.
@@ -1655,32 +2063,35 @@ INFORMATION ABOUT A PATTERN
int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
int what, void *where);
- The pcre_fullinfo() function returns information about a compiled pat-
- tern. It replaces the obsolete pcre_info() function, which is neverthe-
- less retained for backwards compability (and is documented below).
+ The pcre_fullinfo() function returns information about a compiled pat-
+ tern. It replaces the pcre_info() function, which was removed from the
+ library at version 8.30, after more than 10 years of obsolescence.
- The first argument for pcre_fullinfo() is a pointer to the compiled
- pattern. The second argument is the result of pcre_study(), or NULL if
- the pattern was not studied. The third argument specifies which piece
- of information is required, and the fourth argument is a pointer to a
- variable to receive the data. The yield of the function is zero for
+ The first argument for pcre_fullinfo() is a pointer to the compiled
+ pattern. The second argument is the result of pcre_study(), or NULL if
+ the pattern was not studied. The third argument specifies which piece
+ of information is required, and the fourth argument is a pointer to a
+ variable to receive the data. The yield of the function is zero for
success, or one of the following negative numbers:
- PCRE_ERROR_NULL the argument code was NULL
- the argument where was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of what was invalid
+ PCRE_ERROR_NULL the argument code was NULL
+ the argument where was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+ PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
+ endianness
+ PCRE_ERROR_BADOPTION the value of what was invalid
- The "magic number" is placed at the start of each compiled pattern as
- an simple check against passing an arbitrary memory pointer. Here is a
- typical call of pcre_fullinfo(), to obtain the length of the compiled
- pattern:
+ The "magic number" is placed at the start of each compiled pattern as
+ an simple check against passing an arbitrary memory pointer. The endi-
+ anness error can occur if a compiled pattern is saved and reloaded on a
+ different host. Here is a typical call of pcre_fullinfo(), to obtain
+ the length of the compiled pattern:
int rc;
size_t length;
rc = pcre_fullinfo(
re, /* result of pcre_compile() */
- pe, /* result of pcre_study(), or NULL */
+ sd, /* result of pcre_study(), or NULL */
PCRE_INFO_SIZE, /* what is required */
&length); /* where to put the data */
@@ -1708,13 +2119,17 @@ INFORMATION ABOUT A PATTERN
PCRE_INFO_FIRSTBYTE
- Return information about the first byte of any matched string, for a
- non-anchored pattern. The fourth argument should point to an int vari-
- able. (This option used to be called PCRE_INFO_FIRSTCHAR; the old name
- is still recognized for backwards compatibility.)
+ Return information about the first data unit of any matched string, for
+ a non-anchored pattern. (The name of this option refers to the 8-bit
+ library, where data units are bytes.) The fourth argument should point
+ to an int variable.
- If there is a fixed first byte, for example, from a pattern such as
- (cat|cow|coyote), its value is returned. Otherwise, if either
+ If there is a fixed first value, for example, the letter "c" from a
+ pattern such as (cat|cow|coyote), its value is returned. In the 8-bit
+ library, the value is always less than 256; in the 16-bit library the
+ value can be up to 0xffff.
+
+ If there is no fixed first value, and if either
(a) the pattern was compiled with the PCRE_MULTILINE option, and every
branch starts with "^", or
@@ -1729,10 +2144,10 @@ INFORMATION ABOUT A PATTERN
PCRE_INFO_FIRSTTABLE
If the pattern was studied, and this resulted in the construction of a
- 256-bit table indicating a fixed set of bytes for the first byte in any
- matching string, a pointer to the table is returned. Otherwise NULL is
- returned. The fourth argument should point to an unsigned char * vari-
- able.
+ 256-bit table indicating a fixed set of values for the first data unit
+ in any matching string, a pointer to the table is returned. Otherwise
+ NULL is returned. The fourth argument should point to an unsigned char
+ * variable.
PCRE_INFO_HASCRORLF
@@ -1747,25 +2162,49 @@ INFORMATION ABOUT A PATTERN
otherwise 0. The fourth argument should point to an int variable. (?J)
and (?-J) set and unset the local PCRE_DUPNAMES option, respectively.
+ PCRE_INFO_JIT
+
+ Return 1 if the pattern was studied with one of the JIT options, and
+ just-in-time compiling was successful. The fourth argument should point
+ to an int variable. A return value of 0 means that JIT support is not
+ available in this version of PCRE, or that the pattern was not studied
+ with a JIT option, or that the JIT compiler could not handle this par-
+ ticular pattern. See the pcrejit documentation for details of what can
+ and cannot be handled.
+
+ PCRE_INFO_JITSIZE
+
+ If the pattern was successfully studied with a JIT option, return the
+ size of the JIT compiled code, otherwise return zero. The fourth argu-
+ ment should point to a size_t variable.
+
PCRE_INFO_LASTLITERAL
- Return the value of the rightmost literal byte that must exist in any
- matched string, other than at its start, if such a byte has been
+ Return the value of the rightmost literal data unit that must exist in
+ any matched string, other than at its start, if such a value has been
recorded. The fourth argument should point to an int variable. If there
- is no such byte, -1 is returned. For anchored patterns, a last literal
- byte is recorded only if it follows something of variable length. For
+ is no such value, -1 is returned. For anchored patterns, a last literal
+ value is recorded only if it follows something of variable length. For
example, for the pattern /^a\d+z\d+/ the returned value is "z", but for
/^a\dz\d/ the returned value is -1.
+ PCRE_INFO_MAXLOOKBEHIND
+
+ Return the number of characters (NB not bytes) in the longest lookbe-
+ hind assertion in the pattern. Note that the simple assertions \b and
+ \B require a one-character lookbehind. This information is useful when
+ doing multi-segment matching using the partial matching facilities.
+
PCRE_INFO_MINLENGTH
- If the pattern was studied and a minimum length for matching subject
- strings was computed, its value is returned. Otherwise the returned
- value is -1. The value is a number of characters, not bytes (this may
- be relevant in UTF-8 mode). The fourth argument should point to an int
- variable. A non-negative value is a lower bound to the length of any
- matching string. There may not be any strings of that length that do
- actually match, but every string that does match is at least that long.
+ If the pattern was studied and a minimum length for matching subject
+ strings was computed, its value is returned. Otherwise the returned
+ value is -1. The value is a number of characters, which in UTF-8 mode
+ may be different from the number of bytes. The fourth argument should
+ point to an int variable. A non-negative value is a lower bound to the
+ length of any matching string. There may not be any strings of that
+ length that do actually match, but every string that does match is at
+ least that long.
PCRE_INFO_NAMECOUNT
PCRE_INFO_NAMEENTRYSIZE
@@ -1785,10 +2224,12 @@ INFORMATION ABOUT A PATTERN
gives the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size
of each entry; both of these return an int value. The entry size
depends on the length of the longest name. PCRE_INFO_NAMETABLE returns
- a pointer to the first entry of the table (a pointer to char). The
- first two bytes of each entry are the number of the capturing parenthe-
- sis, most significant byte first. The rest of the entry is the corre-
- sponding name, zero terminated.
+ a pointer to the first entry of the table. This is a pointer to char in
+ the 8-bit library, where the first two bytes of each entry are the num-
+ ber of the capturing parenthesis, most significant byte first. In the
+ 16-bit library, the pointer points to 16-bit data units, the first of
+ which contains the parenthesis number. The rest of the entry is the
+ corresponding name, zero terminated.
The names are in alphabetical order. Duplicate names may appear if (?|
is used to create multiple groups with the same number, as described in
@@ -1801,8 +2242,8 @@ INFORMATION ABOUT A PATTERN
terns may have lower numbers.
As a simple example of the name/number table, consider the following
- pattern (assume PCRE_EXTENDED is set, so white space - including new-
- lines - is ignored):
+ pattern after compilation by the 8-bit library (assume PCRE_EXTENDED is
+ set, so white space - including newlines - is ignored):
(?<date> (?<year>(\d\d)?\d\d) -
(?<month>\d\d) - (?<day>\d\d) )
@@ -1855,62 +2296,47 @@ INFORMATION ABOUT A PATTERN
PCRE_INFO_SIZE
- Return the size of the compiled pattern, that is, the value that was
- passed as the argument to pcre_malloc() when PCRE was getting memory in
- which to place the compiled data. The fourth argument should point to a
- size_t variable.
+ Return the size of the compiled pattern in bytes (for both libraries).
+ The fourth argument should point to a size_t variable. This value does
+ not include the size of the pcre structure that is returned by
+ pcre_compile(). The value that is passed as the argument to pcre_mal-
+ loc() when pcre_compile() is getting memory in which to place the com-
+ piled data is the value returned by this option plus the size of the
+ pcre structure. Studying a compiled pattern, with or without JIT, does
+ not alter the value returned by this option.
PCRE_INFO_STUDYSIZE
- Return the size of the data block pointed to by the study_data field in
- a pcre_extra block. That is, it is the value that was passed to
- pcre_malloc() when PCRE was getting memory into which to place the data
- created by pcre_study(). If pcre_extra is NULL, or there is no study
- data, zero is returned. The fourth argument should point to a size_t
- variable.
-
-
-OBSOLETE INFO FUNCTION
-
- int pcre_info(const pcre *code, int *optptr, int *firstcharptr);
-
- The pcre_info() function is now obsolete because its interface is too
- restrictive to return all the available data about a compiled pattern.
- New programs should use pcre_fullinfo() instead. The yield of
- pcre_info() is the number of capturing subpatterns, or one of the fol-
- lowing negative numbers:
-
- PCRE_ERROR_NULL the argument code was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
-
- If the optptr argument is not NULL, a copy of the options with which
- the pattern was compiled is placed in the integer it points to (see
- PCRE_INFO_OPTIONS above).
-
- If the pattern is not anchored and the firstcharptr argument is not
- NULL, it is used to pass back information about the first character of
- any matched string (see PCRE_INFO_FIRSTBYTE above).
+ Return the size in bytes of the data block pointed to by the study_data
+ field in a pcre_extra block. If pcre_extra is NULL, or there is no
+ study data, zero is returned. The fourth argument should point to a
+ size_t variable. The study_data field is set by pcre_study() to record
+ information that will speed up matching (see the section entitled
+ "Studying a pattern" above). The format of the study_data block is pri-
+ vate, but its length is made available via this option so that it can
+ be saved and restored (see the pcreprecompile documentation for
+ details).
REFERENCE COUNTS
int pcre_refcount(pcre *code, int adjust);
- The pcre_refcount() function is used to maintain a reference count in
+ The pcre_refcount() function is used to maintain a reference count in
the data block that contains a compiled pattern. It is provided for the
- benefit of applications that operate in an object-oriented manner,
+ benefit of applications that operate in an object-oriented manner,
where different parts of the application may be using the same compiled
pattern, but you want to free the block when they are all done.
When a pattern is compiled, the reference count field is initialized to
- zero. It is changed only by calling this function, whose action is to
- add the adjust value (which may be positive or negative) to it. The
+ zero. It is changed only by calling this function, whose action is to
+ add the adjust value (which may be positive or negative) to it. The
yield of the function is the new value. However, the value of the count
- is constrained to lie between 0 and 65535, inclusive. If the new value
+ is constrained to lie between 0 and 65535, inclusive. If the new value
is outside these limits, it is forced to the appropriate limit value.
- Except when it is zero, the reference count is not correctly preserved
- if a pattern is compiled on one host and then transferred to a host
+ Except when it is zero, the reference count is not correctly preserved
+ if a pattern is compiled on one host and then transferred to a host
whose byte-order is different. (This seems a highly unlikely scenario.)
@@ -1920,18 +2346,22 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
const char *subject, int length, int startoffset,
int options, int *ovector, int ovecsize);
- The function pcre_exec() is called to match a subject string against a
- compiled pattern, which is passed in the code argument. If the pattern
- was studied, the result of the study should be passed in the extra
- argument. This function is the main matching facility of the library,
- and it operates in a Perl-like manner. For specialist use there is also
- an alternative matching function, which is described below in the sec-
- tion about the pcre_dfa_exec() function.
+ The function pcre_exec() is called to match a subject string against a
+ compiled pattern, which is passed in the code argument. If the pattern
+ was studied, the result of the study should be passed in the extra
+ argument. You can call pcre_exec() with the same code and extra argu-
+ ments as many times as you like, in order to match different subject
+ strings with the same pattern.
+
+ This function is the main matching facility of the library, and it
+ operates in a Perl-like manner. For specialist use there is also an
+ alternative matching function, which is described below in the section
+ about the pcre_dfa_exec() function.
- In most applications, the pattern will have been compiled (and option-
- ally studied) in the same process that calls pcre_exec(). However, it
+ In most applications, the pattern will have been compiled (and option-
+ ally studied) in the same process that calls pcre_exec(). However, it
is possible to save compiled patterns and study data, and then use them
- later in different processes, possibly even on different hosts. For a
+ later in different processes, possibly even on different hosts. For a
discussion about this, see the pcreprecompile documentation.
Here is an example of a simple call to pcre_exec():
@@ -1950,35 +2380,40 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
Extra data for pcre_exec()
- If the extra argument is not NULL, it must point to a pcre_extra data
- block. The pcre_study() function returns such a block (when it doesn't
- return NULL), but you can also create one for yourself, and pass addi-
- tional information in it. The pcre_extra block contains the following
+ If the extra argument is not NULL, it must point to a pcre_extra data
+ block. The pcre_study() function returns such a block (when it doesn't
+ return NULL), but you can also create one for yourself, and pass addi-
+ tional information in it. The pcre_extra block contains the following
fields (not necessarily in this order):
unsigned long int flags;
void *study_data;
+ void *executable_jit;
unsigned long int match_limit;
unsigned long int match_limit_recursion;
void *callout_data;
const unsigned char *tables;
unsigned char **mark;
- The flags field is a bitmap that specifies which of the other fields
- are set. The flag bits are:
+ In the 16-bit version of this structure, the mark field has type
+ "PCRE_UCHAR16 **".
- PCRE_EXTRA_STUDY_DATA
+ The flags field is used to specify which of the other fields are set.
+ The flag bits are:
+
+ PCRE_EXTRA_CALLOUT_DATA
+ PCRE_EXTRA_EXECUTABLE_JIT
+ PCRE_EXTRA_MARK
PCRE_EXTRA_MATCH_LIMIT
PCRE_EXTRA_MATCH_LIMIT_RECURSION
- PCRE_EXTRA_CALLOUT_DATA
+ PCRE_EXTRA_STUDY_DATA
PCRE_EXTRA_TABLES
- PCRE_EXTRA_MARK
- Other flag bits should be set to zero. The study_data field is set in
- the pcre_extra block that is returned by pcre_study(), together with
- the appropriate flag bit. You should not set this yourself, but you may
- add to the block by setting the other fields and their corresponding
- flag bits.
+ Other flag bits should be set to zero. The study_data field and some-
+ times the executable_jit field are set in the pcre_extra block that is
+ returned by pcre_study(), together with the appropriate flag bits. You
+ should not set these yourself, but you may add to the block by setting
+ other fields and their corresponding flag bits.
The match_limit field provides a means of preventing PCRE from using up
a vast amount of resources when running patterns that are not going to
@@ -1986,70 +2421,86 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
search trees. The classic example is a pattern that uses nested unlim-
ited repeats.
- Internally, PCRE uses a function called match() which it calls repeat-
- edly (sometimes recursively). The limit set by match_limit is imposed
- on the number of times this function is called during a match, which
- has the effect of limiting the amount of backtracking that can take
- place. For patterns that are not anchored, the count restarts from zero
- for each position in the subject string.
-
- The default value for the limit can be set when PCRE is built; the
- default default is 10 million, which handles all but the most extreme
- cases. You can override the default by suppling pcre_exec() with a
- pcre_extra block in which match_limit is set, and
- PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
+ Internally, pcre_exec() uses a function called match(), which it calls
+ repeatedly (sometimes recursively). The limit set by match_limit is
+ imposed on the number of times this function is called during a match,
+ which has the effect of limiting the amount of backtracking that can
+ take place. For patterns that are not anchored, the count restarts from
+ zero for each position in the subject string.
+
+ When pcre_exec() is called with a pattern that was successfully studied
+ with a JIT option, the way that the matching is executed is entirely
+ different. However, there is still the possibility of runaway matching
+ that goes on for a very long time, and so the match_limit value is also
+ used in this case (but in a different way) to limit how long the match-
+ ing can continue.
+
+ The default value for the limit can be set when PCRE is built; the
+ default default is 10 million, which handles all but the most extreme
+ cases. You can override the default by suppling pcre_exec() with a
+ pcre_extra block in which match_limit is set, and
+ PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
- The match_limit_recursion field is similar to match_limit, but instead
+ The match_limit_recursion field is similar to match_limit, but instead
of limiting the total number of times that match() is called, it limits
- the depth of recursion. The recursion depth is a smaller number than
- the total number of calls, because not all calls to match() are recur-
+ the depth of recursion. The recursion depth is a smaller number than
+ the total number of calls, because not all calls to match() are recur-
sive. This limit is of use only if it is set smaller than match_limit.
- Limiting the recursion depth limits the amount of stack that can be
- used, or, when PCRE has been compiled to use memory on the heap instead
- of the stack, the amount of heap memory that can be used.
-
- The default value for match_limit_recursion can be set when PCRE is
- built; the default default is the same value as the default for
- match_limit. You can override the default by suppling pcre_exec() with
- a pcre_extra block in which match_limit_recursion is set, and
- PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the
+ Limiting the recursion depth limits the amount of machine stack that
+ can be used, or, when PCRE has been compiled to use memory on the heap
+ instead of the stack, the amount of heap memory that can be used. This
+ limit is not relevant, and is ignored, when matching is done using JIT
+ compiled code.
+
+ The default value for match_limit_recursion can be set when PCRE is
+ built; the default default is the same value as the default for
+ match_limit. You can override the default by suppling pcre_exec() with
+ a pcre_extra block in which match_limit_recursion is set, and
+ PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the
limit is exceeded, pcre_exec() returns PCRE_ERROR_RECURSIONLIMIT.
- The callout_data field is used in conjunction with the "callout" fea-
+ The callout_data field is used in conjunction with the "callout" fea-
ture, and is described in the pcrecallout documentation.
- The tables field is used to pass a character tables pointer to
- pcre_exec(); this overrides the value that is stored with the compiled
- pattern. A non-NULL value is stored with the compiled pattern only if
- custom tables were supplied to pcre_compile() via its tableptr argu-
+ The tables field is used to pass a character tables pointer to
+ pcre_exec(); this overrides the value that is stored with the compiled
+ pattern. A non-NULL value is stored with the compiled pattern only if
+ custom tables were supplied to pcre_compile() via its tableptr argu-
ment. If NULL is passed to pcre_exec() using this mechanism, it forces
- PCRE's internal tables to be used. This facility is helpful when re-
- using patterns that have been saved after compiling with an external
- set of tables, because the external tables might be at a different
- address when pcre_exec() is called. See the pcreprecompile documenta-
+ PCRE's internal tables to be used. This facility is helpful when re-
+ using patterns that have been saved after compiling with an external
+ set of tables, because the external tables might be at a different
+ address when pcre_exec() is called. See the pcreprecompile documenta-
tion for a discussion of saving compiled patterns for later use.
- If PCRE_EXTRA_MARK is set in the flags field, the mark field must be
- set to point to a char * variable. If the pattern contains any back-
- tracking control verbs such as (*MARK:NAME), and the execution ends up
- with a name to pass back, a pointer to the name string (zero termi-
- nated) is placed in the variable pointed to by the mark field. The
- names are within the compiled pattern; if you wish to retain such a
- name you must copy it before freeing the memory of a compiled pattern.
- If there is no name to pass back, the variable pointed to by the mark
- field set to NULL. For details of the backtracking control verbs, see
- the section entitled "Backtracking control" in the pcrepattern documen-
- tation.
+ If PCRE_EXTRA_MARK is set in the flags field, the mark field must be
+ set to point to a suitable variable. If the pattern contains any back-
+ tracking control verbs such as (*MARK:NAME), and the execution ends up
+ with a name to pass back, a pointer to the name string (zero termi-
+ nated) is placed in the variable pointed to by the mark field. The
+ names are within the compiled pattern; if you wish to retain such a
+ name you must copy it before freeing the memory of a compiled pattern.
+ If there is no name to pass back, the variable pointed to by the mark
+ field is set to NULL. For details of the backtracking control verbs,
+ see the section entitled "Backtracking control" in the pcrepattern doc-
+ umentation.
Option bits for pcre_exec()
- The unused bits of the options argument for pcre_exec() must be zero.
- The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx,
- PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
- PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and
- PCRE_PARTIAL_HARD.
+ The unused bits of the options argument for pcre_exec() must be zero.
+ The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx,
+ PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
+ PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, and
+ PCRE_PARTIAL_SOFT.
+
+ If the pattern was successfully studied with one of the just-in-time
+ (JIT) compile options, the only supported options for JIT execution are
+ PCRE_NO_UTF8_CHECK, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
+ PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and PCRE_PARTIAL_SOFT. If an
+ unsupported option is used, JIT execution is disabled and the normal
+ interpretive code in pcre_exec() is run.
PCRE_ANCHORED
@@ -2172,7 +2623,9 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
where the result is "no match", the callouts do occur, and that items
such as (*COMMIT) and (*MARK) are considered at every possible starting
position in the subject string. If PCRE_NO_START_OPTIMIZE is set at
- compile time, it cannot be unset at matching time.
+ compile time, it cannot be unset at matching time. The use of
+ PCRE_NO_START_OPTIMIZE disables JIT execution; when it is set, matching
+ is always done using interpretively.
Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching
operation. Consider the pattern
@@ -2206,182 +2659,201 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
When PCRE_UTF8 is set at compile time, the validity of the subject as a
UTF-8 string is automatically checked when pcre_exec() is subsequently
- called. The value of startoffset is also checked to ensure that it
- points to the start of a UTF-8 character. There is a discussion about
- the validity of UTF-8 strings in the section on UTF-8 support in the
- main pcre page. If an invalid UTF-8 sequence of bytes is found,
- pcre_exec() returns the error PCRE_ERROR_BADUTF8 or, if PCRE_PAR-
- TIAL_HARD is set and the problem is a truncated UTF-8 character at the
- end of the subject, PCRE_ERROR_SHORTUTF8. If startoffset contains a
- value that does not point to the start of a UTF-8 character (or to the
- end of the subject), PCRE_ERROR_BADUTF8_OFFSET is returned.
-
- If you already know that your subject is valid, and you want to skip
- these checks for performance reasons, you can set the
- PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
- do this for the second and subsequent calls to pcre_exec() if you are
- making repeated calls to find all the matches in a single subject
- string. However, you should be sure that the value of startoffset
- points to the start of a UTF-8 character (or the end of the subject).
- When PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid UTF-8
- string as a subject or an invalid value of startoffset is undefined.
- Your program may crash.
+ called. The entire string is checked before any other processing takes
+ place. The value of startoffset is also checked to ensure that it
+ points to the start of a UTF-8 character. There is a discussion about
+ the validity of UTF-8 strings in the pcreunicode page. If an invalid
+ sequence of bytes is found, pcre_exec() returns the error
+ PCRE_ERROR_BADUTF8 or, if PCRE_PARTIAL_HARD is set and the problem is a
+ truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In
+ both cases, information about the precise nature of the error may also
+ be returned (see the descriptions of these errors in the section enti-
+ tled Error return values from pcre_exec() below). If startoffset con-
+ tains a value that does not point to the start of a UTF-8 character (or
+ to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is returned.
+
+ If you already know that your subject is valid, and you want to skip
+ these checks for performance reasons, you can set the
+ PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
+ do this for the second and subsequent calls to pcre_exec() if you are
+ making repeated calls to find all the matches in a single subject
+ string. However, you should be sure that the value of startoffset
+ points to the start of a character (or the end of the subject). When
+ PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid string as a
+ subject or an invalid value of startoffset is undefined. Your program
+ may crash.
PCRE_PARTIAL_HARD
PCRE_PARTIAL_SOFT
- These options turn on the partial matching feature. For backwards com-
- patibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial
- match occurs if the end of the subject string is reached successfully,
- but there are not enough subject characters to complete the match. If
+ These options turn on the partial matching feature. For backwards com-
+ patibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial
+ match occurs if the end of the subject string is reached successfully,
+ but there are not enough subject characters to complete the match. If
this happens when PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set,
- matching continues by testing any remaining alternatives. Only if no
- complete match can be found is PCRE_ERROR_PARTIAL returned instead of
- PCRE_ERROR_NOMATCH. In other words, PCRE_PARTIAL_SOFT says that the
- caller is prepared to handle a partial match, but only if no complete
+ matching continues by testing any remaining alternatives. Only if no
+ complete match can be found is PCRE_ERROR_PARTIAL returned instead of
+ PCRE_ERROR_NOMATCH. In other words, PCRE_PARTIAL_SOFT says that the
+ caller is prepared to handle a partial match, but only if no complete
match can be found.
- If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this
- case, if a partial match is found, pcre_exec() immediately returns
- PCRE_ERROR_PARTIAL, without considering any other alternatives. In
- other words, when PCRE_PARTIAL_HARD is set, a partial match is consid-
+ If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this
+ case, if a partial match is found, pcre_exec() immediately returns
+ PCRE_ERROR_PARTIAL, without considering any other alternatives. In
+ other words, when PCRE_PARTIAL_HARD is set, a partial match is consid-
ered to be more important that an alternative complete match.
- In both cases, the portion of the string that was inspected when the
+ In both cases, the portion of the string that was inspected when the
partial match was found is set as the first matching string. There is a
- more detailed discussion of partial and multi-segment matching, with
+ more detailed discussion of partial and multi-segment matching, with
examples, in the pcrepartial documentation.
The string to be matched by pcre_exec()
- The subject string is passed to pcre_exec() as a pointer in subject, a
- length (in bytes) in length, and a starting byte offset in startoffset.
- If this is negative or greater than the length of the subject,
- pcre_exec() returns PCRE_ERROR_BADOFFSET. When the starting offset is
- zero, the search for a match starts at the beginning of the subject,
+ The subject string is passed to pcre_exec() as a pointer in subject, a
+ length in bytes in length, and a starting byte offset in startoffset.
+ If this is negative or greater than the length of the subject,
+ pcre_exec() returns PCRE_ERROR_BADOFFSET. When the starting offset is
+ zero, the search for a match starts at the beginning of the subject,
and this is by far the most common case. In UTF-8 mode, the byte offset
- must point to the start of a UTF-8 character (or the end of the sub-
- ject). Unlike the pattern string, the subject may contain binary zero
+ must point to the start of a UTF-8 character (or the end of the sub-
+ ject). Unlike the pattern string, the subject may contain binary zero
bytes.
- A non-zero starting offset is useful when searching for another match
- in the same subject by calling pcre_exec() again after a previous suc-
- cess. Setting startoffset differs from just passing over a shortened
- string and setting PCRE_NOTBOL in the case of a pattern that begins
+ A non-zero starting offset is useful when searching for another match
+ in the same subject by calling pcre_exec() again after a previous suc-
+ cess. Setting startoffset differs from just passing over a shortened
+ string and setting PCRE_NOTBOL in the case of a pattern that begins
with any kind of lookbehind. For example, consider the pattern
\Biss\B
- which finds occurrences of "iss" in the middle of words. (\B matches
- only if the current position in the subject is not a word boundary.)
- When applied to the string "Mississipi" the first call to pcre_exec()
- finds the first occurrence. If pcre_exec() is called again with just
- the remainder of the subject, namely "issipi", it does not match,
+ which finds occurrences of "iss" in the middle of words. (\B matches
+ only if the current position in the subject is not a word boundary.)
+ When applied to the string "Mississipi" the first call to pcre_exec()
+ finds the first occurrence. If pcre_exec() is called again with just
+ the remainder of the subject, namely "issipi", it does not match,
because \B is always false at the start of the subject, which is deemed
- to be a word boundary. However, if pcre_exec() is passed the entire
+ to be a word boundary. However, if pcre_exec() is passed the entire
string again, but with startoffset set to 4, it finds the second occur-
- rence of "iss" because it is able to look behind the starting point to
+ rence of "iss" because it is able to look behind the starting point to
discover that it is preceded by a letter.
- Finding all the matches in a subject is tricky when the pattern can
+ Finding all the matches in a subject is tricky when the pattern can
match an empty string. It is possible to emulate Perl's /g behaviour by
- first trying the match again at the same offset, with the
- PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED options, and then if that
- fails, advancing the starting offset and trying an ordinary match
+ first trying the match again at the same offset, with the
+ PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED options, and then if that
+ fails, advancing the starting offset and trying an ordinary match
again. There is some code that demonstrates how to do this in the pcre-
demo sample program. In the most general case, you have to check to see
- if the newline convention recognizes CRLF as a newline, and if so, and
+ if the newline convention recognizes CRLF as a newline, and if so, and
the current character is CR followed by LF, advance the starting offset
by two characters instead of one.
- If a non-zero starting offset is passed when the pattern is anchored,
+ If a non-zero starting offset is passed when the pattern is anchored,
one attempt to match at the given offset is made. This can only succeed
- if the pattern does not require the match to be at the start of the
+ if the pattern does not require the match to be at the start of the
subject.
How pcre_exec() returns captured substrings
- In general, a pattern matches a certain portion of the subject, and in
- addition, further substrings from the subject may be picked out by
- parts of the pattern. Following the usage in Jeffrey Friedl's book,
- this is called "capturing" in what follows, and the phrase "capturing
- subpattern" is used for a fragment of a pattern that picks out a sub-
- string. PCRE supports several other kinds of parenthesized subpattern
+ In general, a pattern matches a certain portion of the subject, and in
+ addition, further substrings from the subject may be picked out by
+ parts of the pattern. Following the usage in Jeffrey Friedl's book,
+ this is called "capturing" in what follows, and the phrase "capturing
+ subpattern" is used for a fragment of a pattern that picks out a sub-
+ string. PCRE supports several other kinds of parenthesized subpattern
that do not cause substrings to be captured.
Captured substrings are returned to the caller via a vector of integers
- whose address is passed in ovector. The number of elements in the vec-
- tor is passed in ovecsize, which must be a non-negative number. Note:
+ whose address is passed in ovector. The number of elements in the vec-
+ tor is passed in ovecsize, which must be a non-negative number. Note:
this argument is NOT the size of ovector in bytes.
- The first two-thirds of the vector is used to pass back captured sub-
- strings, each substring using a pair of integers. The remaining third
- of the vector is used as workspace by pcre_exec() while matching cap-
- turing subpatterns, and is not available for passing back information.
- The number passed in ovecsize should always be a multiple of three. If
+ The first two-thirds of the vector is used to pass back captured sub-
+ strings, each substring using a pair of integers. The remaining third
+ of the vector is used as workspace by pcre_exec() while matching cap-
+ turing subpatterns, and is not available for passing back information.
+ The number passed in ovecsize should always be a multiple of three. If
it is not, it is rounded down.
- When a match is successful, information about captured substrings is
- returned in pairs of integers, starting at the beginning of ovector,
- and continuing up to two-thirds of its length at the most. The first
- element of each pair is set to the byte offset of the first character
- in a substring, and the second is set to the byte offset of the first
- character after the end of a substring. Note: these values are always
+ When a match is successful, information about captured substrings is
+ returned in pairs of integers, starting at the beginning of ovector,
+ and continuing up to two-thirds of its length at the most. The first
+ element of each pair is set to the byte offset of the first character
+ in a substring, and the second is set to the byte offset of the first
+ character after the end of a substring. Note: these values are always
byte offsets, even in UTF-8 mode. They are not character counts.
- The first pair of integers, ovector[0] and ovector[1], identify the
- portion of the subject string matched by the entire pattern. The next
- pair is used for the first capturing subpattern, and so on. The value
+ The first pair of integers, ovector[0] and ovector[1], identify the
+ portion of the subject string matched by the entire pattern. The next
+ pair is used for the first capturing subpattern, and so on. The value
returned by pcre_exec() is one more than the highest numbered pair that
- has been set. For example, if two substrings have been captured, the
- returned value is 3. If there are no capturing subpatterns, the return
+ has been set. For example, if two substrings have been captured, the
+ returned value is 3. If there are no capturing subpatterns, the return
value from a successful match is 1, indicating that just the first pair
of offsets has been set.
If a capturing subpattern is matched repeatedly, it is the last portion
of the string that it matched that is returned.
- If the vector is too small to hold all the captured substring offsets,
+ If the vector is too small to hold all the captured substring offsets,
it is used as far as possible (up to two-thirds of its length), and the
- function returns a value of zero. If the substring offsets are not of
- interest, pcre_exec() may be called with ovector passed as NULL and
- ovecsize as zero. However, if the pattern contains back references and
- the ovector is not big enough to remember the related substrings, PCRE
- has to get additional memory for use during matching. Thus it is usu-
- ally advisable to supply an ovector.
+ function returns a value of zero. If neither the actual string matched
+ nor any captured substrings are of interest, pcre_exec() may be called
+ with ovector passed as NULL and ovecsize as zero. However, if the pat-
+ tern contains back references and the ovector is not big enough to
+ remember the related substrings, PCRE has to get additional memory for
+ use during matching. Thus it is usually advisable to supply an ovector
+ of reasonable size.
+
+ There are some cases where zero is returned (indicating vector over-
+ flow) when in fact the vector is exactly the right size for the final
+ match. For example, consider the pattern
+
+ (a)(?:(b)c|bd)
+
+ If a vector of 6 elements (allowing for only 1 captured substring) is
+ given with subject string "abd", pcre_exec() will try to set the second
+ captured string, thereby recording a vector overflow, before failing to
+ match "c" and backing up to try the second alternative. The zero
+ return, however, does correctly indicate that the maximum number of
+ slots (namely 2) have been filled. In similar cases where there is tem-
+ porary overflow, but the final number of used slots is actually less
+ than the maximum, a non-zero value is returned.
The pcre_fullinfo() function can be used to find out how many capturing
- subpatterns there are in a compiled pattern. The smallest size for
- ovector that will allow for n captured substrings, in addition to the
+ subpatterns there are in a compiled pattern. The smallest size for
+ ovector that will allow for n captured substrings, in addition to the
offsets of the substring matched by the whole pattern, is (n+1)*3.
- It is possible for capturing subpattern number n+1 to match some part
+ It is possible for capturing subpattern number n+1 to match some part
of the subject when subpattern n has not been used at all. For example,
- if the string "abc" is matched against the pattern (a|(z))(bc) the
+ if the string "abc" is matched against the pattern (a|(z))(bc) the
return from the function is 4, and subpatterns 1 and 3 are matched, but
- 2 is not. When this happens, both values in the offset pairs corre-
+ 2 is not. When this happens, both values in the offset pairs corre-
sponding to unused subpatterns are set to -1.
- Offset values that correspond to unused subpatterns at the end of the
- expression are also set to -1. For example, if the string "abc" is
- matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not
- matched. The return from the function is 2, because the highest used
- capturing subpattern number is 1, and the offsets for for the second
- and third capturing subpatterns (assuming the vector is large enough,
+ Offset values that correspond to unused subpatterns at the end of the
+ expression are also set to -1. For example, if the string "abc" is
+ matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not
+ matched. The return from the function is 2, because the highest used
+ capturing subpattern number is 1, and the offsets for for the second
+ and third capturing subpatterns (assuming the vector is large enough,
of course) are set to -1.
- Note: Elements of ovector that do not correspond to capturing parenthe-
- ses in the pattern are never changed. That is, if a pattern contains n
- capturing parentheses, no more than ovector[0] to ovector[2n+1] are set
- by pcre_exec(). The other elements retain whatever values they previ-
- ously had.
+ Note: Elements in the first two-thirds of ovector that do not corre-
+ spond to capturing parentheses in the pattern are never changed. That
+ is, if a pattern contains n capturing parentheses, no more than ovec-
+ tor[0] to ovector[2n+1] are set by pcre_exec(). The other elements (in
+ the first two-thirds) retain whatever values they previously had.
- Some convenience functions are provided for extracting the captured
+ Some convenience functions are provided for extracting the captured
substrings as separate strings. These are described below.
Error return values from pcre_exec()
- If pcre_exec() fails, it returns a negative number. The following are
+ If pcre_exec() fails, it returns a negative number. The following are
defined in the header file:
PCRE_ERROR_NOMATCH (-1)
@@ -2390,7 +2862,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_ERROR_NULL (-2)
- Either code or subject was passed as NULL, or ovector was NULL and
+ Either code or subject was passed as NULL, or ovector was NULL and
ovecsize was not zero.
PCRE_ERROR_BADOPTION (-3)
@@ -2399,76 +2871,82 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_ERROR_BADMAGIC (-4)
- PCRE stores a 4-byte "magic number" at the start of the compiled code,
+ PCRE stores a 4-byte "magic number" at the start of the compiled code,
to catch the case when it is passed a junk pointer and to detect when a
pattern that was compiled in an environment of one endianness is run in
- an environment with the other endianness. This is the error that PCRE
+ an environment with the other endianness. This is the error that PCRE
gives when the magic number is not present.
PCRE_ERROR_UNKNOWN_OPCODE (-5)
While running the pattern match, an unknown item was encountered in the
- compiled pattern. This error could be caused by a bug in PCRE or by
+ compiled pattern. This error could be caused by a bug in PCRE or by
overwriting of the compiled pattern.
PCRE_ERROR_NOMEMORY (-6)
- If a pattern contains back references, but the ovector that is passed
+ If a pattern contains back references, but the ovector that is passed
to pcre_exec() is not big enough to remember the referenced substrings,
- PCRE gets a block of memory at the start of matching to use for this
- purpose. If the call via pcre_malloc() fails, this error is given. The
+ PCRE gets a block of memory at the start of matching to use for this
+ purpose. If the call via pcre_malloc() fails, this error is given. The
memory is automatically freed at the end of matching.
- This error is also given if pcre_stack_malloc() fails in pcre_exec().
- This can happen only when PCRE has been compiled with --disable-stack-
+ This error is also given if pcre_stack_malloc() fails in pcre_exec().
+ This can happen only when PCRE has been compiled with --disable-stack-
for-recursion.
PCRE_ERROR_NOSUBSTRING (-7)
- This error is used by the pcre_copy_substring(), pcre_get_substring(),
+ This error is used by the pcre_copy_substring(), pcre_get_substring(),
and pcre_get_substring_list() functions (see below). It is never
returned by pcre_exec().
PCRE_ERROR_MATCHLIMIT (-8)
- The backtracking limit, as specified by the match_limit field in a
- pcre_extra structure (or defaulted) was reached. See the description
+ The backtracking limit, as specified by the match_limit field in a
+ pcre_extra structure (or defaulted) was reached. See the description
above.
PCRE_ERROR_CALLOUT (-9)
This error is never generated by pcre_exec() itself. It is provided for
- use by callout functions that want to yield a distinctive error code.
+ use by callout functions that want to yield a distinctive error code.
See the pcrecallout documentation for details.
PCRE_ERROR_BADUTF8 (-10)
- A string that contains an invalid UTF-8 byte sequence was passed as a
- subject. However, if PCRE_PARTIAL_HARD is set and the problem is a
- truncated UTF-8 character at the end of the subject, PCRE_ERROR_SHORT-
- UTF8 is used instead.
+ A string that contains an invalid UTF-8 byte sequence was passed as a
+ subject, and the PCRE_NO_UTF8_CHECK option was not set. If the size of
+ the output vector (ovecsize) is at least 2, the byte offset to the
+ start of the the invalid UTF-8 character is placed in the first ele-
+ ment, and a reason code is placed in the second element. The reason
+ codes are listed in the following section. For backward compatibility,
+ if PCRE_PARTIAL_HARD is set and the problem is a truncated UTF-8 char-
+ acter at the end of the subject (reason codes 1 to 5),
+ PCRE_ERROR_SHORTUTF8 is returned instead of PCRE_ERROR_BADUTF8.
PCRE_ERROR_BADUTF8_OFFSET (-11)
- The UTF-8 byte sequence that was passed as a subject was valid, but the
- value of startoffset did not point to the beginning of a UTF-8 charac-
+ The UTF-8 byte sequence that was passed as a subject was checked and
+ found to be valid (the PCRE_NO_UTF8_CHECK option was not set), but the
+ value of startoffset did not point to the beginning of a UTF-8 charac-
ter or the end of the subject.
PCRE_ERROR_PARTIAL (-12)
- The subject string did not match, but it did match partially. See the
+ The subject string did not match, but it did match partially. See the
pcrepartial documentation for details of partial matching.
PCRE_ERROR_BADPARTIAL (-13)
- This code is no longer in use. It was formerly returned when the
- PCRE_PARTIAL option was used with a compiled pattern containing items
- that were not supported for partial matching. From release 8.00
+ This code is no longer in use. It was formerly returned when the
+ PCRE_PARTIAL option was used with a compiled pattern containing items
+ that were not supported for partial matching. From release 8.00
onwards, there are no restrictions on partial matching.
PCRE_ERROR_INTERNAL (-14)
- An unexpected internal error has occurred. This error could be caused
+ An unexpected internal error has occurred. This error could be caused
by a bug in PCRE or by overwriting of the compiled pattern.
PCRE_ERROR_BADCOUNT (-15)
@@ -2478,7 +2956,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_ERROR_RECURSIONLIMIT (-21)
The internal recursion limit, as specified by the match_limit_recursion
- field in a pcre_extra structure (or defaulted) was reached. See the
+ field in a pcre_extra structure (or defaulted) was reached. See the
description above.
PCRE_ERROR_BADNEWLINE (-23)
@@ -2492,11 +2970,118 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
PCRE_ERROR_SHORTUTF8 (-25)
- The subject string ended with an incomplete (truncated) UTF-8 charac-
- ter, and the PCRE_PARTIAL_HARD option was set. Without this option,
- PCRE_ERROR_BADUTF8 is returned in this situation.
+ This error is returned instead of PCRE_ERROR_BADUTF8 when the subject
+ string ends with a truncated UTF-8 character and the PCRE_PARTIAL_HARD
+ option is set. Information about the failure is returned as for
+ PCRE_ERROR_BADUTF8. It is in fact sufficient to detect this case, but
+ this special error code for PCRE_PARTIAL_HARD precedes the implementa-
+ tion of returned information; it is retained for backwards compatibil-
+ ity.
+
+ PCRE_ERROR_RECURSELOOP (-26)
+
+ This error is returned when pcre_exec() detects a recursion loop within
+ the pattern. Specifically, it means that either the whole pattern or a
+ subpattern has been called recursively for the second time at the same
+ position in the subject string. Some simple patterns that might do this
+ are detected and faulted at compile time, but more complicated cases,
+ in particular mutual recursions between two different subpatterns, can-
+ not be detected until run time.
+
+ PCRE_ERROR_JIT_STACKLIMIT (-27)
+
+ This error is returned when a pattern that was successfully studied
+ using a JIT compile option is being matched, but the memory available
+ for the just-in-time processing stack is not large enough. See the
+ pcrejit documentation for more details.
+
+ PCRE_ERROR_BADMODE (-28)
+
+ This error is given if a pattern that was compiled by the 8-bit library
+ is passed to a 16-bit library function, or vice versa.
+
+ PCRE_ERROR_BADENDIANNESS (-29)
+
+ This error is given if a pattern that was compiled and saved is
+ reloaded on a host with different endianness. The utility function
+ pcre_pattern_to_host_byte_order() can be used to convert such a pattern
+ so that it runs on the new host.
+
+ Error numbers -16 to -20, -22, and -30 are not used by pcre_exec().
+
+ Reason codes for invalid UTF-8 strings
+
+ This section applies only to the 8-bit library. The corresponding
+ information for the 16-bit library is given in the pcre16 page.
+
+ When pcre_exec() returns either PCRE_ERROR_BADUTF8 or PCRE_ERROR_SHORT-
+ UTF8, and the size of the output vector (ovecsize) is at least 2, the
+ offset of the start of the invalid UTF-8 character is placed in the
+ first output vector element (ovector[0]) and a reason code is placed in
+ the second element (ovector[1]). The reason codes are given names in
+ the pcre.h header file:
+
+ PCRE_UTF8_ERR1
+ PCRE_UTF8_ERR2
+ PCRE_UTF8_ERR3
+ PCRE_UTF8_ERR4
+ PCRE_UTF8_ERR5
+
+ The string ends with a truncated UTF-8 character; the code specifies
+ how many bytes are missing (1 to 5). Although RFC 3629 restricts UTF-8
+ characters to be no longer than 4 bytes, the encoding scheme (origi-
+ nally defined by RFC 2279) allows for up to 6 bytes, and this is
+ checked first; hence the possibility of 4 or 5 missing bytes.
+
+ PCRE_UTF8_ERR6
+ PCRE_UTF8_ERR7
+ PCRE_UTF8_ERR8
+ PCRE_UTF8_ERR9
+ PCRE_UTF8_ERR10
+
+ The two most significant bits of the 2nd, 3rd, 4th, 5th, or 6th byte of
+ the character do not have the binary value 0b10 (that is, either the
+ most significant bit is 0, or the next bit is 1).
- Error numbers -16 to -20 and -22 are not used by pcre_exec().
+ PCRE_UTF8_ERR11
+ PCRE_UTF8_ERR12
+
+ A character that is valid by the RFC 2279 rules is either 5 or 6 bytes
+ long; these code points are excluded by RFC 3629.
+
+ PCRE_UTF8_ERR13
+
+ A 4-byte character has a value greater than 0x10fff; these code points
+ are excluded by RFC 3629.
+
+ PCRE_UTF8_ERR14
+
+ A 3-byte character has a value in the range 0xd800 to 0xdfff; this
+ range of code points are reserved by RFC 3629 for use with UTF-16, and
+ so are excluded from UTF-8.
+
+ PCRE_UTF8_ERR15
+ PCRE_UTF8_ERR16
+ PCRE_UTF8_ERR17
+ PCRE_UTF8_ERR18
+ PCRE_UTF8_ERR19
+
+ A 2-, 3-, 4-, 5-, or 6-byte character is "overlong", that is, it codes
+ for a value that can be represented by fewer bytes, which is invalid.
+ For example, the two bytes 0xc0, 0xae give the value 0x2e, whose cor-
+ rect coding uses just one byte.
+
+ PCRE_UTF8_ERR20
+
+ The two most significant bits of the first byte of a character have the
+ binary value 0b10 (that is, the most significant bit is 1 and the sec-
+ ond is 0). Such a byte can only validly occur as the second or subse-
+ quent byte of a multi-byte character.
+
+ PCRE_UTF8_ERR21
+
+ The first byte of a character has the value 0xfe or 0xff. These values
+ can never occur in a valid UTF-8 string.
EXTRACTING CAPTURED SUBSTRINGS BY NUMBER
@@ -2512,78 +3097,78 @@ EXTRACTING CAPTURED SUBSTRINGS BY NUMBER
int pcre_get_substring_list(const char *subject,
int *ovector, int stringcount, const char ***listptr);
- Captured substrings can be accessed directly by using the offsets
- returned by pcre_exec() in ovector. For convenience, the functions
+ Captured substrings can be accessed directly by using the offsets
+ returned by pcre_exec() in ovector. For convenience, the functions
pcre_copy_substring(), pcre_get_substring(), and pcre_get_sub-
- string_list() are provided for extracting captured substrings as new,
- separate, zero-terminated strings. These functions identify substrings
- by number. The next section describes functions for extracting named
+ string_list() are provided for extracting captured substrings as new,
+ separate, zero-terminated strings. These functions identify substrings
+ by number. The next section describes functions for extracting named
substrings.
- A substring that contains a binary zero is correctly extracted and has
- a further zero added on the end, but the result is not, of course, a C
- string. However, you can process such a string by referring to the
- length that is returned by pcre_copy_substring() and pcre_get_sub-
+ A substring that contains a binary zero is correctly extracted and has
+ a further zero added on the end, but the result is not, of course, a C
+ string. However, you can process such a string by referring to the
+ length that is returned by pcre_copy_substring() and pcre_get_sub-
string(). Unfortunately, the interface to pcre_get_substring_list() is
- not adequate for handling strings containing binary zeros, because the
+ not adequate for handling strings containing binary zeros, because the
end of the final string is not independently indicated.
- The first three arguments are the same for all three of these func-
- tions: subject is the subject string that has just been successfully
+ The first three arguments are the same for all three of these func-
+ tions: subject is the subject string that has just been successfully
matched, ovector is a pointer to the vector of integer offsets that was
passed to pcre_exec(), and stringcount is the number of substrings that
- were captured by the match, including the substring that matched the
+ were captured by the match, including the substring that matched the
entire regular expression. This is the value returned by pcre_exec() if
- it is greater than zero. If pcre_exec() returned zero, indicating that
- it ran out of space in ovector, the value passed as stringcount should
+ it is greater than zero. If pcre_exec() returned zero, indicating that
+ it ran out of space in ovector, the value passed as stringcount should
be the number of elements in the vector divided by three.
- The functions pcre_copy_substring() and pcre_get_substring() extract a
- single substring, whose number is given as stringnumber. A value of
- zero extracts the substring that matched the entire pattern, whereas
- higher values extract the captured substrings. For pcre_copy_sub-
- string(), the string is placed in buffer, whose length is given by
- buffersize, while for pcre_get_substring() a new block of memory is
- obtained via pcre_malloc, and its address is returned via stringptr.
- The yield of the function is the length of the string, not including
+ The functions pcre_copy_substring() and pcre_get_substring() extract a
+ single substring, whose number is given as stringnumber. A value of
+ zero extracts the substring that matched the entire pattern, whereas
+ higher values extract the captured substrings. For pcre_copy_sub-
+ string(), the string is placed in buffer, whose length is given by
+ buffersize, while for pcre_get_substring() a new block of memory is
+ obtained via pcre_malloc, and its address is returned via stringptr.
+ The yield of the function is the length of the string, not including
the terminating zero, or one of these error codes:
PCRE_ERROR_NOMEMORY (-6)
- The buffer was too small for pcre_copy_substring(), or the attempt to
+ The buffer was too small for pcre_copy_substring(), or the attempt to
get memory failed for pcre_get_substring().
PCRE_ERROR_NOSUBSTRING (-7)
There is no substring whose number is stringnumber.
- The pcre_get_substring_list() function extracts all available sub-
- strings and builds a list of pointers to them. All this is done in a
+ The pcre_get_substring_list() function extracts all available sub-
+ strings and builds a list of pointers to them. All this is done in a
single block of memory that is obtained via pcre_malloc. The address of
- the memory block is returned via listptr, which is also the start of
- the list of string pointers. The end of the list is marked by a NULL
- pointer. The yield of the function is zero if all went well, or the
+ the memory block is returned via listptr, which is also the start of
+ the list of string pointers. The end of the list is marked by a NULL
+ pointer. The yield of the function is zero if all went well, or the
error code
PCRE_ERROR_NOMEMORY (-6)
if the attempt to get the memory block failed.
- When any of these functions encounter a substring that is unset, which
- can happen when capturing subpattern number n+1 matches some part of
- the subject, but subpattern n has not been used at all, they return an
+ When any of these functions encounter a substring that is unset, which
+ can happen when capturing subpattern number n+1 matches some part of
+ the subject, but subpattern n has not been used at all, they return an
empty string. This can be distinguished from a genuine zero-length sub-
- string by inspecting the appropriate offset in ovector, which is nega-
+ string by inspecting the appropriate offset in ovector, which is nega-
tive for unset substrings.
- The two convenience functions pcre_free_substring() and pcre_free_sub-
- string_list() can be used to free the memory returned by a previous
+ The two convenience functions pcre_free_substring() and pcre_free_sub-
+ string_list() can be used to free the memory returned by a previous
call of pcre_get_substring() or pcre_get_substring_list(), respec-
- tively. They do nothing more than call the function pointed to by
- pcre_free, which of course could be called directly from a C program.
- However, PCRE is used in some situations where it is linked via a spe-
- cial interface to another programming language that cannot use
- pcre_free directly; it is for these cases that the functions are pro-
+ tively. They do nothing more than call the function pointed to by
+ pcre_free, which of course could be called directly from a C program.
+ However, PCRE is used in some situations where it is linked via a spe-
+ cial interface to another programming language that cannot use
+ pcre_free directly; it is for these cases that the functions are pro-
vided.
@@ -2602,7 +3187,7 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME
int stringcount, const char *stringname,
const char **stringptr);
- To extract a substring by name, you first have to find associated num-
+ To extract a substring by name, you first have to find associated num-
ber. For example, for this pattern
(a+)b(?<xxx>\d+)...
@@ -2611,35 +3196,35 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME
be unique (PCRE_DUPNAMES was not set), you can find the number from the
name by calling pcre_get_stringnumber(). The first argument is the com-
piled pattern, and the second is the name. The yield of the function is
- the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no
+ the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no
subpattern of that name.
Given the number, you can extract the substring directly, or use one of
the functions described in the previous section. For convenience, there
are also two functions that do the whole job.
- Most of the arguments of pcre_copy_named_substring() and
- pcre_get_named_substring() are the same as those for the similarly
- named functions that extract by number. As these are described in the
- previous section, they are not re-described here. There are just two
+ Most of the arguments of pcre_copy_named_substring() and
+ pcre_get_named_substring() are the same as those for the similarly
+ named functions that extract by number. As these are described in the
+ previous section, they are not re-described here. There are just two
differences:
- First, instead of a substring number, a substring name is given. Sec-
+ First, instead of a substring number, a substring name is given. Sec-
ond, there is an extra argument, given at the start, which is a pointer
- to the compiled pattern. This is needed in order to gain access to the
+ to the compiled pattern. This is needed in order to gain access to the
name-to-number translation table.
- These functions call pcre_get_stringnumber(), and if it succeeds, they
- then call pcre_copy_substring() or pcre_get_substring(), as appropri-
- ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the
+ These functions call pcre_get_stringnumber(), and if it succeeds, they
+ then call pcre_copy_substring() or pcre_get_substring(), as appropri-
+ ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the
behaviour may not be what you want (see the next section).
Warning: If the pattern uses the (?| feature to set up multiple subpat-
- terns with the same number, as described in the section on duplicate
- subpattern numbers in the pcrepattern page, you cannot use names to
- distinguish the different subpatterns, because names are not included
- in the compiled code. The matching process uses only numbers. For this
- reason, the use of different names for subpatterns of the same number
+ terns with the same number, as described in the section on duplicate
+ subpattern numbers in the pcrepattern page, you cannot use names to
+ distinguish the different subpatterns, because names are not included
+ in the compiled code. The matching process uses only numbers. For this
+ reason, the use of different names for subpatterns of the same number
causes an error at compile time.
@@ -2648,54 +3233,79 @@ DUPLICATE SUBPATTERN NAMES
int pcre_get_stringtable_entries(const pcre *code,
const char *name, char **first, char **last);
- When a pattern is compiled with the PCRE_DUPNAMES option, names for
- subpatterns are not required to be unique. (Duplicate names are always
- allowed for subpatterns with the same number, created by using the (?|
- feature. Indeed, if such subpatterns are named, they are required to
+ When a pattern is compiled with the PCRE_DUPNAMES option, names for
+ subpatterns are not required to be unique. (Duplicate names are always
+ allowed for subpatterns with the same number, created by using the (?|
+ feature. Indeed, if such subpatterns are named, they are required to
use the same names.)
Normally, patterns with duplicate names are such that in any one match,
- only one of the named subpatterns participates. An example is shown in
+ only one of the named subpatterns participates. An example is shown in
the pcrepattern documentation.
- When duplicates are present, pcre_copy_named_substring() and
- pcre_get_named_substring() return the first substring corresponding to
- the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING
- (-7) is returned; no data is returned. The pcre_get_stringnumber()
- function returns one of the numbers that are associated with the name,
+ When duplicates are present, pcre_copy_named_substring() and
+ pcre_get_named_substring() return the first substring corresponding to
+ the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING
+ (-7) is returned; no data is returned. The pcre_get_stringnumber()
+ function returns one of the numbers that are associated with the name,
but it is not defined which it is.
- If you want to get full details of all captured substrings for a given
- name, you must use the pcre_get_stringtable_entries() function. The
+ If you want to get full details of all captured substrings for a given
+ name, you must use the pcre_get_stringtable_entries() function. The
first argument is the compiled pattern, and the second is the name. The
- third and fourth are pointers to variables which are updated by the
+ third and fourth are pointers to variables which are updated by the
function. After it has run, they point to the first and last entries in
- the name-to-number table for the given name. The function itself
- returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if
- there are none. The format of the table is described above in the sec-
- tion entitled Information about a pattern. Given all the relevant
- entries for the name, you can extract each of their numbers, and hence
- the captured data, if any.
+ the name-to-number table for the given name. The function itself
+ returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if
+ there are none. The format of the table is described above in the sec-
+ tion entitled Information about a pattern above. Given all the rele-
+ vant entries for the name, you can extract each of their numbers, and
+ hence the captured data, if any.
FINDING ALL POSSIBLE MATCHES
- The traditional matching function uses a similar algorithm to Perl,
+ The traditional matching function uses a similar algorithm to Perl,
which stops when it finds the first match, starting at a given point in
- the subject. If you want to find all possible matches, or the longest
- possible match, consider using the alternative matching function (see
- below) instead. If you cannot use the alternative function, but still
- need to find all possible matches, you can kludge it up by making use
+ the subject. If you want to find all possible matches, or the longest
+ possible match, consider using the alternative matching function (see
+ below) instead. If you cannot use the alternative function, but still
+ need to find all possible matches, you can kludge it up by making use
of the callout facility, which is described in the pcrecallout documen-
tation.
What you have to do is to insert a callout right at the end of the pat-
- tern. When your callout function is called, extract and save the cur-
- rent matched substring. Then return 1, which forces pcre_exec() to
- backtrack and try other alternatives. Ultimately, when it runs out of
+ tern. When your callout function is called, extract and save the cur-
+ rent matched substring. Then return 1, which forces pcre_exec() to
+ backtrack and try other alternatives. Ultimately, when it runs out of
matches, pcre_exec() will yield PCRE_ERROR_NOMATCH.
+OBTAINING AN ESTIMATE OF STACK USAGE
+
+ Matching certain patterns using pcre_exec() can use a lot of process
+ stack, which in certain environments can be rather limited in size.
+ Some users find it helpful to have an estimate of the amount of stack
+ that is used by pcre_exec(), to help them set recursion limits, as
+ described in the pcrestack documentation. The estimate that is output
+ by pcretest when called with the -m and -C options is obtained by call-
+ ing pcre_exec with the values NULL, NULL, NULL, -999, and -999 for its
+ first five arguments.
+
+ Normally, if its first argument is NULL, pcre_exec() immediately
+ returns the negative error code PCRE_ERROR_NULL, but with this special
+ combination of arguments, it returns instead a negative number whose
+ absolute value is the approximate stack frame size in bytes. (A nega-
+ tive number is used so that it is clear that no match has happened.)
+ The value is approximate because in some cases, recursive calls to
+ pcre_exec() occur when there are one or two additional variables on the
+ stack.
+
+ If PCRE has been compiled to use the heap instead of the stack for
+ recursion, the value returned is the size of each block that is
+ obtained from the heap.
+
+
MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
int pcre_dfa_exec(const pcre *code, const pcre_extra *extra,
@@ -2703,26 +3313,26 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
int options, int *ovector, int ovecsize,
int *workspace, int wscount);
- The function pcre_dfa_exec() is called to match a subject string
- against a compiled pattern, using a matching algorithm that scans the
- subject string just once, and does not backtrack. This has different
- characteristics to the normal algorithm, and is not compatible with
- Perl. Some of the features of PCRE patterns are not supported. Never-
- theless, there are times when this kind of matching can be useful. For
- a discussion of the two matching algorithms, and a list of features
- that pcre_dfa_exec() does not support, see the pcrematching documenta-
+ The function pcre_dfa_exec() is called to match a subject string
+ against a compiled pattern, using a matching algorithm that scans the
+ subject string just once, and does not backtrack. This has different
+ characteristics to the normal algorithm, and is not compatible with
+ Perl. Some of the features of PCRE patterns are not supported. Never-
+ theless, there are times when this kind of matching can be useful. For
+ a discussion of the two matching algorithms, and a list of features
+ that pcre_dfa_exec() does not support, see the pcrematching documenta-
tion.
- The arguments for the pcre_dfa_exec() function are the same as for
+ The arguments for the pcre_dfa_exec() function are the same as for
pcre_exec(), plus two extras. The ovector argument is used in a differ-
- ent way, and this is described below. The other common arguments are
- used in the same way as for pcre_exec(), so their description is not
+ ent way, and this is described below. The other common arguments are
+ used in the same way as for pcre_exec(), so their description is not
repeated here.
- The two additional arguments provide workspace for the function. The
- workspace vector should contain at least 20 elements. It is used for
+ The two additional arguments provide workspace for the function. The
+ workspace vector should contain at least 20 elements. It is used for
keeping track of multiple paths through the pattern tree. More
- workspace will be needed for patterns and subjects where there are a
+ workspace will be needed for patterns and subjects where there are a
lot of potential matches.
Here is an example of a simple call to pcre_dfa_exec():
@@ -2744,55 +3354,55 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
Option bits for pcre_dfa_exec()
- The unused bits of the options argument for pcre_dfa_exec() must be
- zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW-
+ The unused bits of the options argument for pcre_dfa_exec() must be
+ zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW-
LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY,
- PCRE_NOTEMPTY_ATSTART, PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF,
- PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, PCRE_PARTIAL_HARD, PCRE_PAR-
- TIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last
- four of these are exactly the same as for pcre_exec(), so their
+ PCRE_NOTEMPTY_ATSTART, PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF,
+ PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, PCRE_PARTIAL_HARD, PCRE_PAR-
+ TIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last
+ four of these are exactly the same as for pcre_exec(), so their
description is not repeated here.
PCRE_PARTIAL_HARD
PCRE_PARTIAL_SOFT
- These have the same general effect as they do for pcre_exec(), but the
- details are slightly different. When PCRE_PARTIAL_HARD is set for
- pcre_dfa_exec(), it returns PCRE_ERROR_PARTIAL if the end of the sub-
- ject is reached and there is still at least one matching possibility
+ These have the same general effect as they do for pcre_exec(), but the
+ details are slightly different. When PCRE_PARTIAL_HARD is set for
+ pcre_dfa_exec(), it returns PCRE_ERROR_PARTIAL if the end of the sub-
+ ject is reached and there is still at least one matching possibility
that requires additional characters. This happens even if some complete
matches have also been found. When PCRE_PARTIAL_SOFT is set, the return
code PCRE_ERROR_NOMATCH is converted into PCRE_ERROR_PARTIAL if the end
- of the subject is reached, there have been no complete matches, but
- there is still at least one matching possibility. The portion of the
- string that was inspected when the longest partial match was found is
- set as the first matching string in both cases. There is a more
- detailed discussion of partial and multi-segment matching, with exam-
+ of the subject is reached, there have been no complete matches, but
+ there is still at least one matching possibility. The portion of the
+ string that was inspected when the longest partial match was found is
+ set as the first matching string in both cases. There is a more
+ detailed discussion of partial and multi-segment matching, with exam-
ples, in the pcrepartial documentation.
PCRE_DFA_SHORTEST
- Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to
+ Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to
stop as soon as it has found one match. Because of the way the alterna-
- tive algorithm works, this is necessarily the shortest possible match
+ tive algorithm works, this is necessarily the shortest possible match
at the first possible matching point in the subject string.
PCRE_DFA_RESTART
When pcre_dfa_exec() returns a partial match, it is possible to call it
- again, with additional subject characters, and have it continue with
- the same match. The PCRE_DFA_RESTART option requests this action; when
- it is set, the workspace and wscount options must reference the same
- vector as before because data about the match so far is left in them
+ again, with additional subject characters, and have it continue with
+ the same match. The PCRE_DFA_RESTART option requests this action; when
+ it is set, the workspace and wscount options must reference the same
+ vector as before because data about the match so far is left in them
after a partial match. There is more discussion of this facility in the
pcrepartial documentation.
Successful returns from pcre_dfa_exec()
- When pcre_dfa_exec() succeeds, it may have matched more than one sub-
+ When pcre_dfa_exec() succeeds, it may have matched more than one sub-
string in the subject. Note, however, that all the matches from one run
- of the function start at the same point in the subject. The shorter
- matches are all initial substrings of the longer matches. For example,
+ of the function start at the same point in the subject. The shorter
+ matches are all initial substrings of the longer matches. For example,
if the pattern
<.*>
@@ -2807,19 +3417,20 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
<something> <something else>
<something> <something else> <something further>
- On success, the yield of the function is a number greater than zero,
- which is the number of matched substrings. The substrings themselves
- are returned in ovector. Each string uses two elements; the first is
- the offset to the start, and the second is the offset to the end. In
- fact, all the strings have the same start offset. (Space could have
- been saved by giving this only once, but it was decided to retain some
- compatibility with the way pcre_exec() returns data, even though the
+ On success, the yield of the function is a number greater than zero,
+ which is the number of matched substrings. The substrings themselves
+ are returned in ovector. Each string uses two elements; the first is
+ the offset to the start, and the second is the offset to the end. In
+ fact, all the strings have the same start offset. (Space could have
+ been saved by giving this only once, but it was decided to retain some
+ compatibility with the way pcre_exec() returns data, even though the
meaning of the strings is different.)
The strings are returned in reverse order of length; that is, the long-
- est matching string is given first. If there were too many matches to
- fit into ovector, the yield of the function is zero, and the vector is
- filled with the longest matches.
+ est matching string is given first. If there were too many matches to
+ fit into ovector, the yield of the function is zero, and the vector is
+ filled with the longest matches. Unlike pcre_exec(), pcre_dfa_exec()
+ can use the entire ovector for returning matched strings.
Error returns from pcre_dfa_exec()
@@ -2843,26 +3454,35 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION
PCRE_ERROR_DFA_UMLIMIT (-18)
This return is given if pcre_dfa_exec() is called with an extra block
- that contains a setting of the match_limit field. This is not supported
- (it is meaningless).
+ that contains a setting of the match_limit or match_limit_recursion
+ fields. This is not supported (these fields are meaningless for DFA
+ matching).
PCRE_ERROR_DFA_WSSIZE (-19)
- This return is given if pcre_dfa_exec() runs out of space in the
+ This return is given if pcre_dfa_exec() runs out of space in the
workspace vector.
PCRE_ERROR_DFA_RECURSE (-20)
- When a recursive subpattern is processed, the matching function calls
- itself recursively, using private vectors for ovector and workspace.
- This error is given if the output vector is not large enough. This
+ When a recursive subpattern is processed, the matching function calls
+ itself recursively, using private vectors for ovector and workspace.
+ This error is given if the output vector is not large enough. This
should be extremely rare, as a vector of size 1000 is used.
+ PCRE_ERROR_DFA_BADRESTART (-30)
+
+ When pcre_dfa_exec() is called with the PCRE_DFA_RESTART option, some
+ plausibility checks are made on the contents of the workspace, which
+ should contain data about the previous partial match. If any of these
+ checks fail, this error is given.
+
SEE ALSO
- pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepar-
- tial(3), pcreposix(3), pcreprecompile(3), pcresample(3), pcrestack(3).
+ pcre16(3), pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematch-
+ ing(3), pcrepartial(3), pcreposix(3), pcreprecompile(3), pcresample(3),
+ pcrestack(3).
AUTHOR
@@ -2874,8 +3494,8 @@ AUTHOR
REVISION
- Last updated: 21 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 17 June 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -2890,24 +3510,27 @@ PCRE CALLOUTS
int (*pcre_callout)(pcre_callout_block *);
+ int (*pcre16_callout)(pcre16_callout_block *);
+
PCRE provides a feature called "callout", which is a means of temporar-
ily passing control to the caller of PCRE in the middle of pattern
matching. The caller of PCRE provides an external function by putting
- its entry point in the global variable pcre_callout. By default, this
- variable contains NULL, which disables all calling out.
-
- Within a regular expression, (?C) indicates the points at which the
- external function is to be called. Different callout points can be
- identified by putting a number less than 256 after the letter C. The
- default value is zero. For example, this pattern has two callout
+ its entry point in the global variable pcre_callout (pcre16_callout for
+ the 16-bit library). By default, this variable contains NULL, which
+ disables all calling out.
+
+ Within a regular expression, (?C) indicates the points at which the
+ external function is to be called. Different callout points can be
+ identified by putting a number less than 256 after the letter C. The
+ default value is zero. For example, this pattern has two callout
points:
(?C1)abc(?C2)def
- If the PCRE_AUTO_CALLOUT option bit is set when pcre_compile() or
- pcre_compile2() is called, PCRE automatically inserts callouts, all
- with number 255, before each item in the pattern. For example, if
- PCRE_AUTO_CALLOUT is used with the pattern
+ If the PCRE_AUTO_CALLOUT option bit is set when a pattern is compiled,
+ PCRE automatically inserts callouts, all with number 255, before each
+ item in the pattern. For example, if PCRE_AUTO_CALLOUT is used with the
+ pattern
A(\d{2}|--)
@@ -2915,62 +3538,68 @@ PCRE CALLOUTS
(?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
- Notice that there is a callout before and after each parenthesis and
- alternation bar. Automatic callouts can be used for tracking the
- progress of pattern matching. The pcretest command has an option that
- sets automatic callouts; when it is used, the output indicates how the
- pattern is matched. This is useful information when you are trying to
+ Notice that there is a callout before and after each parenthesis and
+ alternation bar. Automatic callouts can be used for tracking the
+ progress of pattern matching. The pcretest command has an option that
+ sets automatic callouts; when it is used, the output indicates how the
+ pattern is matched. This is useful information when you are trying to
optimize the performance of a particular pattern.
+ The use of callouts in a pattern makes it ineligible for optimization
+ by the just-in-time compiler. Studying such a pattern with the
+ PCRE_STUDY_JIT_COMPILE option always fails.
+
MISSING CALLOUTS
- You should be aware that, because of optimizations in the way PCRE
- matches patterns by default, callouts sometimes do not happen. For
+ You should be aware that, because of optimizations in the way PCRE
+ matches patterns by default, callouts sometimes do not happen. For
example, if the pattern is
ab(?C4)cd
PCRE knows that any matching string must contain the letter "d". If the
- subject string is "abyz", the lack of "d" means that matching doesn't
- ever start, and the callout is never reached. However, with "abyd",
+ subject string is "abyz", the lack of "d" means that matching doesn't
+ ever start, and the callout is never reached. However, with "abyd",
though the result is still no match, the callout is obeyed.
- If the pattern is studied, PCRE knows the minimum length of a matching
- string, and will immediately give a "no match" return without actually
- running a match if the subject is not long enough, or, for unanchored
+ If the pattern is studied, PCRE knows the minimum length of a matching
+ string, and will immediately give a "no match" return without actually
+ running a match if the subject is not long enough, or, for unanchored
patterns, if it has been scanned far enough.
- You can disable these optimizations by passing the PCRE_NO_START_OPTI-
- MIZE option to pcre_compile(), pcre_exec(), or pcre_dfa_exec(), or by
- starting the pattern with (*NO_START_OPT). This slows down the matching
- process, but does ensure that callouts such as the example above are
- obeyed.
+ You can disable these optimizations by passing the PCRE_NO_START_OPTI-
+ MIZE option to the matching function, or by starting the pattern with
+ (*NO_START_OPT). This slows down the matching process, but does ensure
+ that callouts such as the example above are obeyed.
THE CALLOUT INTERFACE
During matching, when PCRE reaches a callout point, the external func-
- tion defined by pcre_callout is called (if it is set). This applies to
- both the pcre_exec() and the pcre_dfa_exec() matching functions. The
- only argument to the callout function is a pointer to a pcre_callout
- block. This structure contains the following fields:
-
- int version;
- int callout_number;
- int *offset_vector;
- const char *subject;
- int subject_length;
- int start_match;
- int current_position;
- int capture_top;
- int capture_last;
- void *callout_data;
- int pattern_position;
- int next_item_length;
+ tion defined by pcre_callout or pcre16_callout is called (if it is
+ set). This applies to both normal and DFA matching. The only argument
+ to the callout function is a pointer to a pcre_callout or pcre16_call-
+ out block. These structures contains the following fields:
+
+ int version;
+ int callout_number;
+ int *offset_vector;
+ const char *subject; (8-bit version)
+ PCRE_SPTR16 subject; (16-bit version)
+ int subject_length;
+ int start_match;
+ int current_position;
+ int capture_top;
+ int capture_last;
+ void *callout_data;
+ int pattern_position;
+ int next_item_length;
+ const unsigned char *mark; (8-bit version)
+ const PCRE_UCHAR16 *mark; (16-bit version)
The version field is an integer containing the version number of the
- block format. The initial version was 0; the current version is 1. The
+ block format. The initial version was 0; the current version is 2. The
version number will change again in future if additional fields are
added, but the intention is never to remove any of the existing fields.
@@ -2979,14 +3608,14 @@ THE CALLOUT INTERFACE
outs, and 255 for automatically generated callouts).
The offset_vector field is a pointer to the vector of offsets that was
- passed by the caller to pcre_exec() or pcre_dfa_exec(). When
- pcre_exec() is used, the contents can be inspected in order to extract
- substrings that have been matched so far, in the same way as for
- extracting substrings after a match has completed. For pcre_dfa_exec()
- this field is not useful.
+ passed by the caller to the matching function. When pcre_exec() or
+ pcre16_exec() is used, the contents can be inspected, in order to
+ extract substrings that have been matched so far, in the same way as
+ for extracting substrings after a match has completed. For the DFA
+ matching functions, this field is not useful.
The subject and subject_length fields contain copies of the values that
- were passed to pcre_exec().
+ were passed to the matching function.
The start_match field normally contains the offset within the subject
at which the current match attempt started. However, if the escape
@@ -2998,38 +3627,46 @@ THE CALLOUT INTERFACE
The current_position field contains the offset within the subject of
the current match pointer.
- When the pcre_exec() function is used, the capture_top field contains
- one more than the number of the highest numbered captured substring so
- far. If no substrings have been captured, the value of capture_top is
- one. This is always the case when pcre_dfa_exec() is used, because it
- does not support captured substrings.
+ When the pcre_exec() or pcre16_exec() is used, the capture_top field
+ contains one more than the number of the highest numbered captured sub-
+ string so far. If no substrings have been captured, the value of cap-
+ ture_top is one. This is always the case when the DFA functions are
+ used, because they do not support captured substrings.
The capture_last field contains the number of the most recently cap-
tured substring. If no substrings have been captured, its value is -1.
- This is always the case when pcre_dfa_exec() is used.
+ This is always the case for the DFA matching functions.
- The callout_data field contains a value that is passed to pcre_exec()
- or pcre_dfa_exec() specifically so that it can be passed back in call-
- outs. It is passed in the pcre_callout field of the pcre_extra data
+ The callout_data field contains a value that is passed to a matching
+ function specifically so that it can be passed back in callouts. It is
+ passed in the callout_data field of a pcre_extra or pcre16_extra data
structure. If no such data was passed, the value of callout_data in a
- pcre_callout block is NULL. There is a description of the pcre_extra
- structure in the pcreapi documentation.
+ callout block is NULL. There is a description of the pcre_extra struc-
+ ture in the pcreapi documentation.
- The pattern_position field is present from version 1 of the pcre_call-
- out structure. It contains the offset to the next item to be matched in
- the pattern string.
+ The pattern_position field is present from version 1 of the callout
+ structure. It contains the offset to the next item to be matched in the
+ pattern string.
- The next_item_length field is present from version 1 of the pcre_call-
- out structure. It contains the length of the next item to be matched in
- the pattern string. When the callout immediately precedes an alterna-
- tion bar, a closing parenthesis, or the end of the pattern, the length
- is zero. When the callout precedes an opening parenthesis, the length
- is that of the entire subpattern.
+ The next_item_length field is present from version 1 of the callout
+ structure. It contains the length of the next item to be matched in the
+ pattern string. When the callout immediately precedes an alternation
+ bar, a closing parenthesis, or the end of the pattern, the length is
+ zero. When the callout precedes an opening parenthesis, the length is
+ that of the entire subpattern.
The pattern_position and next_item_length fields are intended to help
in distinguishing between different automatic callouts, which all have
the same callout number. However, they are set for all callouts.
+ The mark field is present from version 2 of the callout structure. In
+ callouts from pcre_exec() or pcre16_exec() it contains a pointer to the
+ zero-terminated name of the most recently passed (*MARK), (*PRUNE), or
+ (*THEN) item in the match, or NULL if no such items have been passed.
+ Instances of (*PRUNE) or (*THEN) without a name do not obliterate a
+ previous (*MARK). In callouts from the DFA matching functions this
+ field always contains NULL.
+
RETURN VALUES
@@ -3037,8 +3674,8 @@ RETURN VALUES
is zero, matching proceeds as normal. If the value is greater than
zero, matching fails at the current point, but the testing of other
matching possibilities goes ahead, just as if a lookahead assertion had
- failed. If the value is less than zero, the match is abandoned, and
- pcre_exec() or pcre_dfa_exec() returns the negative value.
+ failed. If the value is less than zero, the match is abandoned, the
+ matching function returns the negative value.
Negative values should normally be chosen from the set of
PCRE_ERROR_xxx values. In particular, PCRE_ERROR_NOMATCH forces a stan-
@@ -3056,8 +3693,8 @@ AUTHOR
REVISION
- Last updated: 21 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 08 Janurary 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -3074,43 +3711,53 @@ DIFFERENCES BETWEEN PCRE AND PERL
handle regular expressions. The differences described here are with
respect to Perl versions 5.10 and above.
- 1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details
- of what it does have are given in the section on UTF-8 support in the
- main pcre page.
+ 1. PCRE has only a subset of Perl's Unicode support. Details of what it
+ does have are given in the pcreunicode page.
- 2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl
- permits them, but they do not mean what you might think. For example,
- (?!a){3} does not assert that the next three characters are not "a". It
- just asserts that the next character is not "a" three times.
+ 2. PCRE allows repeat quantifiers only on parenthesized assertions, but
+ they do not mean what you might think. For example, (?!a){3} does not
+ assert that the next three characters are not "a". It just asserts that
+ the next character is not "a" three times (in principle: PCRE optimizes
+ this to run the assertion just once). Perl allows repeat quantifiers on
+ other assertions such as \b, but these do not seem to have any use.
- 3. Capturing subpatterns that occur inside negative lookahead asser-
- tions are counted, but their entries in the offsets vector are never
- set. Perl sets its numerical variables from any such patterns that are
+ 3. Capturing subpatterns that occur inside negative lookahead asser-
+ tions are counted, but their entries in the offsets vector are never
+ set. Perl sets its numerical variables from any such patterns that are
matched before the assertion fails to match something (thereby succeed-
- ing), but only if the negative lookahead assertion contains just one
+ ing), but only if the negative lookahead assertion contains just one
branch.
- 4. Though binary zero characters are supported in the subject string,
+ 4. Though binary zero characters are supported in the subject string,
they are not allowed in a pattern string because it is passed as a nor-
mal C string, terminated by zero. The escape sequence \0 can be used in
the pattern to represent a binary zero.
- 5. The following Perl escape sequences are not supported: \l, \u, \L,
- \U, and \N. In fact these are implemented by Perl's general string-han-
- dling and are not part of its pattern matching engine. If any of these
- are encountered by PCRE, an error is generated.
-
- 6. The Perl escape sequences \p, \P, and \X are supported only if PCRE
- is built with Unicode character property support. The properties that
- can be tested with \p and \P are limited to the general category prop-
- erties such as Lu and Nd, script names such as Greek or Han, and the
- derived properties Any and L&. PCRE does support the Cs (surrogate)
- property, which Perl does not; the Perl documentation says "Because
+ 5. The following Perl escape sequences are not supported: \l, \u, \L,
+ \U, and \N when followed by a character name or Unicode value. (\N on
+ its own, matching a non-newline character, is supported.) In fact these
+ are implemented by Perl's general string-handling and are not part of
+ its pattern matching engine. If any of these are encountered by PCRE,
+ an error is generated by default. However, if the PCRE_JAVASCRIPT_COM-
+ PAT option is set, \U and \u are interpreted as JavaScript interprets
+ them.
+
+ 6. The Perl escape sequences \p, \P, and \X are supported only if PCRE
+ is built with Unicode character property support. The properties that
+ can be tested with \p and \P are limited to the general category prop-
+ erties such as Lu and Nd, script names such as Greek or Han, and the
+ derived properties Any and L&. PCRE does support the Cs (surrogate)
+ property, which Perl does not; the Perl documentation says "Because
Perl hides the need for the user to understand the internal representa-
- tion of Unicode characters, there is no need to implement the somewhat
+ tion of Unicode characters, there is no need to implement the somewhat
messy concept of surrogates."
- 7. PCRE does support the \Q...\E escape for quoting substrings. Charac-
+ 7. PCRE implements a simpler version of \X than Perl, which changed to
+ make \X match what Unicode calls an "extended grapheme cluster". This
+ is more complicated than an extended Unicode sequence, which is what
+ PCRE matches.
+
+ 8. PCRE does support the \Q...\E escape for quoting substrings. Charac-
ters in between are treated as literals. This is slightly different
from Perl in that $ and @ are also handled as literals inside the
quotes. In Perl, they cause variable interpolation (but of course PCRE
@@ -3126,55 +3773,70 @@ DIFFERENCES BETWEEN PCRE AND PERL
The \Q...\E sequence is recognized both inside and outside character
classes.
- 8. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
+ 9. Fairly obviously, PCRE does not support the (?{code}) and (??{code})
constructions. However, there is support for recursive patterns. This
is not available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE
"callout" feature allows an external function to be called during pat-
tern matching. See the pcrecallout documentation for details.
- 9. Subpatterns that are called recursively or as "subroutines" are
- always treated as atomic groups in PCRE. This is like Python, but
- unlike Perl. There is a discussion of an example that explains this in
- more detail in the section on recursion differences from Perl in the
- pcrepattern page.
-
- 10. There are some differences that are concerned with the settings of
- captured strings when part of a pattern is repeated. For example,
- matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2
+ 10. Subpatterns that are called as subroutines (whether or not recur-
+ sively) are always treated as atomic groups in PCRE. This is like
+ Python, but unlike Perl. Captured values that are set outside a sub-
+ routine call can be reference from inside in PCRE, but not in Perl.
+ There is a discussion that explains these differences in more detail in
+ the section on recursion differences from Perl in the pcrepattern page.
+
+ 11. If any of the backtracking control verbs are used in an assertion
+ or in a subpattern that is called as a subroutine (whether or not
+ recursively), their effect is confined to that subpattern; it does not
+ extend to the surrounding pattern. This is not always the case in Perl.
+ In particular, if (*THEN) is present in a group that is called as a
+ subroutine, its action is limited to that group, even if the group does
+ not contain any | characters. There is one exception to this: the name
+ from a *(MARK), (*PRUNE), or (*THEN) that is encountered in a success-
+ ful positive assertion is passed back when a match succeeds (compare
+ capturing parentheses in assertions). Note that such subpatterns are
+ processed as anchored at the point where they are tested.
+
+ 12. There are some differences that are concerned with the settings of
+ captured strings when part of a pattern is repeated. For example,
+ matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2
unset, but in PCRE it is set to "b".
- 11. PCRE's handling of duplicate subpattern numbers and duplicate sub-
+ 13. PCRE's handling of duplicate subpattern numbers and duplicate sub-
pattern names is not as general as Perl's. This is a consequence of the
fact the PCRE works internally just with numbers, using an external ta-
- ble to translate between numbers and names. In particular, a pattern
- such as (?|(?<a>A)|(?<b)B), where the two capturing parentheses have
- the same number but different names, is not supported, and causes an
- error at compile time. If it were allowed, it would not be possible to
- distinguish which parentheses matched, because both names map to cap-
+ ble to translate between numbers and names. In particular, a pattern
+ such as (?|(?<a>A)|(?<b)B), where the two capturing parentheses have
+ the same number but different names, is not supported, and causes an
+ error at compile time. If it were allowed, it would not be possible to
+ distinguish which parentheses matched, because both names map to cap-
turing subpattern number 1. To avoid this confusing situation, an error
is given at compile time.
- 12. Perl recognizes comments in some places that PCRE doesn't, for
- example, between the ( and ? at the start of a subpattern.
+ 14. Perl recognizes comments in some places that PCRE does not, for
+ example, between the ( and ? at the start of a subpattern. If the /x
+ modifier is set, Perl allows white space between ( and ? but PCRE never
+ does, even if the PCRE_EXTENDED option is set.
- 13. PCRE provides some extensions to the Perl regular expression facil-
- ities. Perl 5.10 includes new features that are not in earlier ver-
- sions of Perl, some of which (such as named parentheses) have been in
+ 15. PCRE provides some extensions to the Perl regular expression facil-
+ ities. Perl 5.10 includes new features that are not in earlier ver-
+ sions of Perl, some of which (such as named parentheses) have been in
PCRE for some time. This list is with respect to Perl 5.10:
- (a) Although lookbehind assertions in PCRE must match fixed length
- strings, each alternative branch of a lookbehind assertion can match a
- different length of string. Perl requires them all to have the same
+ (a) Although lookbehind assertions in PCRE must match fixed length
+ strings, each alternative branch of a lookbehind assertion can match a
+ different length of string. Perl requires them all to have the same
length.
- (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
+ (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
meta-character matches only at the very end of the string.
(c) If PCRE_EXTRA is set, a backslash followed by a letter with no spe-
cial meaning is faulted. Otherwise, like Perl, the backslash is quietly
ignored. (Perl can be made to issue a warning.)
- (d) If PCRE_UNGREEDY is set, the greediness of the repetition quanti-
+ (d) If PCRE_UNGREEDY is set, the greediness of the repetition quanti-
fiers is inverted, that is, by default they are not greedy, but if fol-
lowed by a question mark they are.
@@ -3182,10 +3844,10 @@ DIFFERENCES BETWEEN PCRE AND PERL
tried only at the first matching position in the subject string.
(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
- and PCRE_NO_AUTO_CAPTURE options for pcre_exec() have no Perl equiva-
+ and PCRE_NO_AUTO_CAPTURE options for pcre_exec() have no Perl equiva-
lents.
- (g) The \R escape sequence can be restricted to match only CR, LF, or
+ (g) The \R escape sequence can be restricted to match only CR, LF, or
CRLF by the PCRE_BSR_ANYCRLF option.
(h) The callout facility is PCRE-specific.
@@ -3193,12 +3855,14 @@ DIFFERENCES BETWEEN PCRE AND PERL
(i) The partial matching facility is PCRE-specific.
(j) Patterns compiled by PCRE can be saved and re-used at a later time,
- even on different hosts that have the other endianness.
+ even on different hosts that have the other endianness. However, this
+ does not apply to optimized data created by the just-in-time compiler.
- (k) The alternative matching function (pcre_dfa_exec()) matches in a
- different way and is not Perl-compatible.
+ (k) The alternative matching functions (pcre_dfa_exec() and
+ pcre16_dfa_exec()) match in a different way and are not Perl-compati-
+ ble.
- (l) PCRE recognizes some special sequences such as (*CR) at the start
+ (l) PCRE recognizes some special sequences such as (*CR) at the start
of a pattern that set overall options that cannot be changed within the
pattern.
@@ -3212,8 +3876,8 @@ AUTHOR
REVISION
- Last updated: 31 October 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 01 June 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -3242,42 +3906,45 @@ PCRE REGULAR EXPRESSION DETAILS
intended as reference material.
The original operation of PCRE was on strings of one-byte characters.
- However, there is now also support for UTF-8 character strings. To use
- this, PCRE must be built to include UTF-8 support, and you must call
- pcre_compile() or pcre_compile2() with the PCRE_UTF8 option. There is
- also a special sequence that can be given at the start of a pattern:
+ However, there is now also support for UTF-8 strings in the original
+ library, and a second library that supports 16-bit and UTF-16 character
+ strings. To use these features, PCRE must be built to include appropri-
+ ate support. When using UTF strings you must either call the compiling
+ function with the PCRE_UTF8 or PCRE_UTF16 option, or the pattern must
+ start with one of these special sequences:
(*UTF8)
+ (*UTF16)
- Starting a pattern with this sequence is equivalent to setting the
- PCRE_UTF8 option. This feature is not Perl-compatible. How setting
- UTF-8 mode affects pattern matching is mentioned in several places
- below. There is also a summary of UTF-8 features in the section on
- UTF-8 support in the main pcre page.
+ Starting a pattern with such a sequence is equivalent to setting the
+ relevant option. This feature is not Perl-compatible. How setting a UTF
+ mode affects pattern matching is mentioned in several places below.
+ There is also a summary of features in the pcreunicode page.
- Another special sequence that may appear at the start of a pattern or
- in combination with (*UTF8) is:
+ Another special sequence that may appear at the start of a pattern or
+ in combination with (*UTF8) or (*UTF16) is:
(*UCP)
- This has the same effect as setting the PCRE_UCP option: it causes
- sequences such as \d and \w to use Unicode properties to determine
+ This has the same effect as setting the PCRE_UCP option: it causes
+ sequences such as \d and \w to use Unicode properties to determine
character types, instead of recognizing only characters with codes less
than 128 via a lookup table.
- If a pattern starts with (*NO_START_OPT), it has the same effect as
+ If a pattern starts with (*NO_START_OPT), it has the same effect as
setting the PCRE_NO_START_OPTIMIZE option either at compile or matching
time. There are also some more of these special sequences that are con-
cerned with the handling of newlines; they are described below.
- The remainder of this document discusses the patterns that are sup-
- ported by PCRE when its main matching function, pcre_exec(), is used.
- From release 6.0, PCRE offers a second matching function,
- pcre_dfa_exec(), which matches using a different algorithm that is not
- Perl-compatible. Some of the features discussed below are not available
- when pcre_dfa_exec() is used. The advantages and disadvantages of the
- alternative function, and how it differs from the normal function, are
- discussed in the pcrematching page.
+ The remainder of this document discusses the patterns that are sup-
+ ported by PCRE when one its main matching functions, pcre_exec()
+ (8-bit) or pcre16_exec() (16-bit), is used. PCRE also has alternative
+ matching functions, pcre_dfa_exec() and pcre16_dfa_exec(), which match
+ using a different algorithm that is not Perl-compatible. Some of the
+ features discussed below are not available when DFA matching is used.
+ The advantages and disadvantages of the alternative functions, and how
+ they differ from the normal functions, are discussed in the pcrematch-
+ ing page.
NEWLINE CONVENTIONS
@@ -3298,9 +3965,9 @@ NEWLINE CONVENTIONS
(*ANYCRLF) any of the three above
(*ANY) all Unicode newline sequences
- These override the default and the options given to pcre_compile() or
- pcre_compile2(). For example, on a Unix system where LF is the default
- newline sequence, the pattern
+ These override the default and the options given to the compiling func-
+ tion. For example, on a Unix system where LF is the default newline
+ sequence, the pattern
(*CR)a.b
@@ -3330,13 +3997,13 @@ CHARACTERS AND METACHARACTERS
matches a portion of a subject string that is identical to itself. When
caseless matching is specified (the PCRE_CASELESS option), letters are
- matched independently of case. In UTF-8 mode, PCRE always understands
+ matched independently of case. In a UTF mode, PCRE always understands
the concept of case for characters whose values are less than 128, so
caseless matching is always possible. For characters with higher val-
ues, the concept of case is supported if PCRE is compiled with Unicode
property support, but not otherwise. If you want to use caseless
matching for characters 128 and above, you must ensure that PCRE is
- compiled with Unicode property support as well as with UTF-8 support.
+ compiled with Unicode property support as well as with UTF support.
The power of regular expressions comes from the ability to include
alternatives and repetitions in the pattern. These are encoded in the
@@ -3391,14 +4058,14 @@ BACKSLASH
that it stands for itself. In particular, if you want to match a back-
slash, you write \\.
- In UTF-8 mode, only ASCII numbers and letters have any special meaning
+ In a UTF mode, only ASCII numbers and letters have any special meaning
after a backslash. All other characters (in particular, those whose
codepoints are greater than 127) are treated as literals.
- If a pattern is compiled with the PCRE_EXTENDED option, whitespace in
+ If a pattern is compiled with the PCRE_EXTENDED option, white space in
the pattern (other than in a character class) and characters between a
# outside a character class and the next newline are ignored. An escap-
- ing backslash can be used to include a whitespace or # character as
+ ing backslash can be used to include a white space or # character as
part of the pattern.
If you want to remove the special meaning from a sequence of charac-
@@ -3415,7 +4082,11 @@ BACKSLASH
\Qabc\E\$\Qxyz\E abc$xyz abc$xyz
The \Q...\E sequence is recognized both inside and outside character
- classes. An isolated \E that is not preceded by \Q is ignored.
+ classes. An isolated \E that is not preceded by \Q is ignored. If \Q
+ is not followed by \E later in the pattern, the literal interpretation
+ continues to the end of the pattern (that is, \E is assumed at the
+ end). If the isolated \Q is inside a character class, this causes an
+ error, because the character class is not terminated.
Non-printing characters
@@ -3429,61 +4100,77 @@ BACKSLASH
\a alarm, that is, the BEL character (hex 07)
\cx "control-x", where x is any ASCII character
\e escape (hex 1B)
- \f formfeed (hex 0C)
+ \f form feed (hex 0C)
\n linefeed (hex 0A)
\r carriage return (hex 0D)
\t tab (hex 09)
\ddd character with octal code ddd, or back reference
\xhh character with hex code hh
- \x{hhh..} character with hex code hhh..
+ \x{hhh..} character with hex code hhh.. (non-JavaScript mode)
+ \uhhhh character with hex code hhhh (JavaScript mode only)
The precise effect of \cx is as follows: if x is a lower case letter,
it is converted to upper case. Then bit 6 of the character (hex 40) is
inverted. Thus \cz becomes hex 1A (z is 7A), but \c{ becomes hex 3B ({
is 7B), while \c; becomes hex 7B (; is 3B). If the byte following \c
has a value greater than 127, a compile-time error occurs. This locks
- out non-ASCII characters in both byte mode and UTF-8 mode. (When PCRE
- is compiled in EBCDIC mode, all byte values are valid. A lower case
- letter is converted to upper case, and then the 0xc0 bits are flipped.)
-
- After \x, from zero to two hexadecimal digits are read (letters can be
- in upper or lower case). Any number of hexadecimal digits may appear
- between \x{ and }, but the value of the character code must be less
- than 256 in non-UTF-8 mode, and less than 2**31 in UTF-8 mode. That is,
- the maximum value in hexadecimal is 7FFFFFFF. Note that this is bigger
- than the largest Unicode code point, which is 10FFFF.
-
- If characters other than hexadecimal digits appear between \x{ and },
+ out non-ASCII characters in all modes. (When PCRE is compiled in EBCDIC
+ mode, all byte values are valid. A lower case letter is converted to
+ upper case, and then the 0xc0 bits are flipped.)
+
+ By default, after \x, from zero to two hexadecimal digits are read
+ (letters can be in upper or lower case). Any number of hexadecimal dig-
+ its may appear between \x{ and }, but the character code is constrained
+ as follows:
+
+ 8-bit non-UTF mode less than 0x100
+ 8-bit UTF-8 mode less than 0x10ffff and a valid codepoint
+ 16-bit non-UTF mode less than 0x10000
+ 16-bit UTF-16 mode less than 0x10ffff and a valid codepoint
+
+ Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-
+ called "surrogate" codepoints).
+
+ If characters other than hexadecimal digits appear between \x{ and },
or if there is no terminating }, this form of escape is not recognized.
- Instead, the initial \x will be interpreted as a basic hexadecimal
- escape, with no following digits, giving a character whose value is
+ Instead, the initial \x will be interpreted as a basic hexadecimal
+ escape, with no following digits, giving a character whose value is
zero.
+ If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x
+ is as just described only when it is followed by two hexadecimal dig-
+ its. Otherwise, it matches a literal "x" character. In JavaScript
+ mode, support for code points greater than 256 is provided by \u, which
+ must be followed by four hexadecimal digits; otherwise it matches a
+ literal "u" character. Character codes specified by \u in JavaScript
+ mode are constrained in the same was as those specified by \x in non-
+ JavaScript mode.
+
Characters whose value is less than 256 can be defined by either of the
- two syntaxes for \x. There is no difference in the way they are han-
- dled. For example, \xdc is exactly the same as \x{dc}.
+ two syntaxes for \x (or by \u in JavaScript mode). There is no differ-
+ ence in the way they are handled. For example, \xdc is exactly the same
+ as \x{dc} (or \u00dc in JavaScript mode).
- After \0 up to two further octal digits are read. If there are fewer
- than two digits, just those that are present are used. Thus the
+ After \0 up to two further octal digits are read. If there are fewer
+ than two digits, just those that are present are used. Thus the
sequence \0\x\07 specifies two binary zeros followed by a BEL character
- (code value 7). Make sure you supply two digits after the initial zero
+ (code value 7). Make sure you supply two digits after the initial zero
if the pattern character that follows is itself an octal digit.
The handling of a backslash followed by a digit other than 0 is compli-
cated. Outside a character class, PCRE reads it and any following dig-
- its as a decimal number. If the number is less than 10, or if there
+ its as a decimal number. If the number is less than 10, or if there
have been at least that many previous capturing left parentheses in the
- expression, the entire sequence is taken as a back reference. A
- description of how this works is given later, following the discussion
+ expression, the entire sequence is taken as a back reference. A
+ description of how this works is given later, following the discussion
of parenthesized subpatterns.
- Inside a character class, or if the decimal number is greater than 9
- and there have not been that many capturing subpatterns, PCRE re-reads
+ Inside a character class, or if the decimal number is greater than 9
+ and there have not been that many capturing subpatterns, PCRE re-reads
up to three octal digits following the backslash, and uses them to gen-
- erate a data character. Any subsequent digits stand for themselves. In
- non-UTF-8 mode, the value of a character specified in octal must be
- less than \400. In UTF-8 mode, values up to \777 are permitted. For
- example:
+ erate a data character. Any subsequent digits stand for themselves. The
+ value of the character is constrained in the same way as characters
+ specified in hexadecimal. For example:
\040 is another way of writing a space
\40 is the same, provided there are fewer than 40
@@ -3496,7 +4183,7 @@ BACKSLASH
\113 might be a back reference, otherwise the
character with octal code 113
\377 might be a back reference, otherwise
- the byte consisting entirely of 1 bits
+ the value 255 (decimal)
\81 is either a back reference, or a binary zero
followed by the two characters "8" and "1"
@@ -3505,12 +4192,22 @@ BACKSLASH
All the sequences that define a single character value can be used both
inside and outside character classes. In addition, inside a character
- class, the sequence \b is interpreted as the backspace character (hex
- 08). The sequences \B, \N, \R, and \X are not special inside a charac-
- ter class. Like any other unrecognized escape sequences, they are
- treated as the literal characters "B", "N", "R", and "X" by default,
- but cause an error if the PCRE_EXTRA option is set. Outside a character
- class, these sequences have different meanings.
+ class, \b is interpreted as the backspace character (hex 08).
+
+ \N is not allowed in a character class. \B, \R, and \X are not special
+ inside a character class. Like other unrecognized escape sequences,
+ they are treated as the literal characters "B", "R", and "X" by
+ default, but cause an error if the PCRE_EXTRA option is set. Outside a
+ character class, these sequences have different meanings.
+
+ Unsupported escape sequences
+
+ In Perl, the sequences \l, \L, \u, and \U are recognized by its string
+ handler and used to modify the case of following characters. By
+ default, PCRE does not support these escape sequences. However, if the
+ PCRE_JAVASCRIPT_COMPAT option is set, \U matches a "U" character, and
+ \u can be used to define a character by code point, as described in the
+ previous section.
Absolute and relative back references
@@ -3534,65 +4231,66 @@ BACKSLASH
\d any decimal digit
\D any character that is not a decimal digit
- \h any horizontal whitespace character
- \H any character that is not a horizontal whitespace character
- \s any whitespace character
- \S any character that is not a whitespace character
- \v any vertical whitespace character
- \V any character that is not a vertical whitespace character
+ \h any horizontal white space character
+ \H any character that is not a horizontal white space character
+ \s any white space character
+ \S any character that is not a white space character
+ \v any vertical white space character
+ \V any character that is not a vertical white space character
\w any "word" character
\W any "non-word" character
There is also the single sequence \N, which matches a non-newline char-
acter. This is the same as the "." metacharacter when PCRE_DOTALL is
- not set.
-
- Each pair of lower and upper case escape sequences partitions the com-
- plete set of characters into two disjoint sets. Any given character
- matches one, and only one, of each pair. The sequences can appear both
- inside and outside character classes. They each match one character of
- the appropriate type. If the current matching point is at the end of
- the subject string, all of them fail, because there is no character to
+ not set. Perl also uses \N to match characters by name; PCRE does not
+ support this.
+
+ Each pair of lower and upper case escape sequences partitions the com-
+ plete set of characters into two disjoint sets. Any given character
+ matches one, and only one, of each pair. The sequences can appear both
+ inside and outside character classes. They each match one character of
+ the appropriate type. If the current matching point is at the end of
+ the subject string, all of them fail, because there is no character to
match.
- For compatibility with Perl, \s does not match the VT character (code
- 11). This makes it different from the the POSIX "space" class. The \s
- characters are HT (9), LF (10), FF (12), CR (13), and space (32). If
+ For compatibility with Perl, \s does not match the VT character (code
+ 11). This makes it different from the the POSIX "space" class. The \s
+ characters are HT (9), LF (10), FF (12), CR (13), and space (32). If
"use locale;" is included in a Perl script, \s may match the VT charac-
ter. In PCRE, it never does.
- A "word" character is an underscore or any character that is a letter
- or digit. By default, the definition of letters and digits is con-
- trolled by PCRE's low-valued character tables, and may vary if locale-
- specific matching is taking place (see "Locale support" in the pcreapi
- page). For example, in a French locale such as "fr_FR" in Unix-like
- systems, or "french" in Windows, some character codes greater than 128
- are used for accented letters, and these are then matched by \w. The
+ A "word" character is an underscore or any character that is a letter
+ or digit. By default, the definition of letters and digits is con-
+ trolled by PCRE's low-valued character tables, and may vary if locale-
+ specific matching is taking place (see "Locale support" in the pcreapi
+ page). For example, in a French locale such as "fr_FR" in Unix-like
+ systems, or "french" in Windows, some character codes greater than 128
+ are used for accented letters, and these are then matched by \w. The
use of locales with Unicode is discouraged.
- By default, in UTF-8 mode, characters with values greater than 128
- never match \d, \s, or \w, and always match \D, \S, and \W. These
- sequences retain their original meanings from before UTF-8 support was
- available, mainly for efficiency reasons. However, if PCRE is compiled
- with Unicode property support, and the PCRE_UCP option is set, the be-
- haviour is changed so that Unicode properties are used to determine
+ By default, in a UTF mode, characters with values greater than 128
+ never match \d, \s, or \w, and always match \D, \S, and \W. These
+ sequences retain their original meanings from before UTF support was
+ available, mainly for efficiency reasons. However, if PCRE is compiled
+ with Unicode property support, and the PCRE_UCP option is set, the be-
+ haviour is changed so that Unicode properties are used to determine
character types, as follows:
\d any character that \p{Nd} matches (decimal digit)
\s any character that \p{Z} matches, plus HT, LF, FF, CR
\w any character that \p{L} or \p{N} matches, plus underscore
- The upper case escapes match the inverse sets of characters. Note that
- \d matches only decimal digits, whereas \w matches any Unicode digit,
- as well as any Unicode letter, and underscore. Note also that PCRE_UCP
- affects \b, and \B because they are defined in terms of \w and \W.
+ The upper case escapes match the inverse sets of characters. Note that
+ \d matches only decimal digits, whereas \w matches any Unicode digit,
+ as well as any Unicode letter, and underscore. Note also that PCRE_UCP
+ affects \b, and \B because they are defined in terms of \w and \W.
Matching these sequences is noticeably slower when PCRE_UCP is set.
- The sequences \h, \H, \v, and \V are features that were added to Perl
- at release 5.10. In contrast to the other sequences, which match only
- ASCII characters by default, these always match certain high-valued
- codepoints in UTF-8 mode, whether or not PCRE_UCP is set. The horizon-
- tal space characters are:
+ The sequences \h, \H, \v, and \V are features that were added to Perl
+ at release 5.10. In contrast to the other sequences, which match only
+ ASCII characters by default, these always match certain high-valued
+ codepoints, whether or not PCRE_UCP is set. The horizontal space char-
+ acters are:
U+0009 Horizontal tab
U+0020 Space
@@ -3618,28 +4316,31 @@ BACKSLASH
U+000A Linefeed
U+000B Vertical tab
- U+000C Formfeed
+ U+000C Form feed
U+000D Carriage return
U+0085 Next line
U+2028 Line separator
U+2029 Paragraph separator
+ In 8-bit, non-UTF-8 mode, only the characters with codepoints less than
+ 256 are relevant.
+
Newline sequences
Outside a character class, by default, the escape sequence \R matches
- any Unicode newline sequence. In non-UTF-8 mode \R is equivalent to the
- following:
+ any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent
+ to the following:
(?>\r\n|\n|\x0b|\f|\r|\x85)
This is an example of an "atomic group", details of which are given
below. This particular group matches either the two-character sequence
CR followed by LF, or one of the single characters LF (linefeed,
- U+000A), VT (vertical tab, U+000B), FF (formfeed, U+000C), CR (carriage
- return, U+000D), or NEL (next line, U+0085). The two-character sequence
- is treated as a single unit that cannot be split.
+ U+000A), VT (vertical tab, U+000B), FF (form feed, U+000C), CR (car-
+ riage return, U+000D), or NEL (next line, U+0085). The two-character
+ sequence is treated as a single unit that cannot be split.
- In UTF-8 mode, two additional characters whose codepoints are greater
+ In other modes, two additional characters whose codepoints are greater
than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa-
rator, U+2029). Unicode character property support is not needed for
these characters to be recognized.
@@ -3656,28 +4357,28 @@ BACKSLASH
(*BSR_ANYCRLF) CR, LF, or CRLF only
(*BSR_UNICODE) any Unicode newline sequence
- These override the default and the options given to pcre_compile() or
- pcre_compile2(), but they can be overridden by options given to
- pcre_exec() or pcre_dfa_exec(). Note that these special settings, which
- are not Perl-compatible, are recognized only at the very start of a
- pattern, and that they must be in upper case. If more than one of them
- is present, the last one is used. They can be combined with a change of
+ These override the default and the options given to the compiling func-
+ tion, but they can themselves be overridden by options given to a
+ matching function. Note that these special settings, which are not
+ Perl-compatible, are recognized only at the very start of a pattern,
+ and that they must be in upper case. If more than one of them is
+ present, the last one is used. They can be combined with a change of
newline convention; for example, a pattern can start with:
(*ANY)(*BSR_ANYCRLF)
- They can also be combined with the (*UTF8) or (*UCP) special sequences.
- Inside a character class, \R is treated as an unrecognized escape
- sequence, and so matches the letter "R" by default, but causes an error
- if PCRE_EXTRA is set.
+ They can also be combined with the (*UTF8), (*UTF16), or (*UCP) special
+ sequences. Inside a character class, \R is treated as an unrecognized
+ escape sequence, and so matches the letter "R" by default, but causes
+ an error if PCRE_EXTRA is set.
Unicode character properties
When PCRE is built with Unicode character property support, three addi-
tional escape sequences that match characters with specific properties
- are available. When not in UTF-8 mode, these sequences are of course
- limited to testing characters whose codepoints are less than 256, but
- they do work in this mode. The extra escape sequences are:
+ are available. When in 8-bit non-UTF-8 mode, these sequences are of
+ course limited to testing characters whose codepoints are less than
+ 256, but they do work in this mode. The extra escape sequences are:
\p{xx} a character with the xx property
\P{xx} a character without the xx property
@@ -3700,20 +4401,22 @@ BACKSLASH
Those that are not part of an identified script are lumped together as
"Common". The current list of scripts is:
- Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille,
- Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common,
- Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp-
- tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek,
- Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe-
- rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian,
- Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao,
- Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam,
- Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic,
- Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya,
- Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian,
- Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le,
- Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh,
- Ugaritic, Vai, Yi.
+ Arabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo,
+ Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma,
+ Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret,
+ Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic,
+ Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira-
+ gana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip-
+ tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li,
+ Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian,
+ Lydian, Malayalam, Mandaic, Meetei_Mayek, Meroitic_Cursive,
+ Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko,
+ Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic,
+ Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samari-
+ tan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese,
+ Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet,
+ Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai,
+ Yi.
Each character has exactly one Unicode general category property, spec-
ified by a two-letter abbreviation. For compatibility with Perl, nega-
@@ -3780,45 +4483,50 @@ BACKSLASH
classified as a modifier or "other".
The Cs (Surrogate) property applies only to characters in the range
- U+D800 to U+DFFF. Such characters are not valid in UTF-8 strings (see
- RFC 3629) and so cannot be tested by PCRE, unless UTF-8 validity check-
- ing has been turned off (see the discussion of PCRE_NO_UTF8_CHECK in
- the pcreapi page). Perl does not support the Cs property.
-
- The long synonyms for property names that Perl supports (such as
- \p{Letter}) are not supported by PCRE, nor is it permitted to prefix
+ U+D800 to U+DFFF. Such characters are not valid in Unicode strings and
+ so cannot be tested by PCRE, unless UTF validity checking has been
+ turned off (see the discussion of PCRE_NO_UTF8_CHECK and
+ PCRE_NO_UTF16_CHECK in the pcreapi page). Perl does not support the Cs
+ property.
+
+ The long synonyms for property names that Perl supports (such as
+ \p{Letter}) are not supported by PCRE, nor is it permitted to prefix
any of these properties with "Is".
No character that is in the Unicode table has the Cn (unassigned) prop-
erty. Instead, this property is assumed for any code point that is not
in the Unicode table.
- Specifying caseless matching does not affect these escape sequences.
+ Specifying caseless matching does not affect these escape sequences.
For example, \p{Lu} always matches only upper case letters.
- The \X escape matches any number of Unicode characters that form an
+ The \X escape matches any number of Unicode characters that form an
extended Unicode sequence. \X is equivalent to
(?>\PM\pM*)
- That is, it matches a character without the "mark" property, followed
- by zero or more characters with the "mark" property, and treats the
- sequence as an atomic group (see below). Characters with the "mark"
- property are typically accents that affect the preceding character.
- None of them have codepoints less than 256, so in non-UTF-8 mode \X
- matches any one character.
+ That is, it matches a character without the "mark" property, followed
+ by zero or more characters with the "mark" property, and treats the
+ sequence as an atomic group (see below). Characters with the "mark"
+ property are typically accents that affect the preceding character.
+ None of them have codepoints less than 256, so in 8-bit non-UTF-8 mode
+ \X matches any one character.
- Matching characters by Unicode property is not fast, because PCRE has
- to search a structure that contains data for over fifteen thousand
+ Note that recent versions of Perl have changed \X to match what Unicode
+ calls an "extended grapheme cluster", which has a more complicated def-
+ inition.
+
+ Matching characters by Unicode property is not fast, because PCRE has
+ to search a structure that contains data for over fifteen thousand
characters. That is why the traditional escape sequences such as \d and
- \w do not use Unicode properties in PCRE by default, though you can
- make them do so by setting the PCRE_UCP option for pcre_compile() or by
- starting the pattern with (*UCP).
+ \w do not use Unicode properties in PCRE by default, though you can
+ make them do so by setting the PCRE_UCP option or by starting the pat-
+ tern with (*UCP).
PCRE's additional properties
- As well as the standard Unicode properties described in the previous
- section, PCRE supports four more that make it possible to convert tra-
+ As well as the standard Unicode properties described in the previous
+ section, PCRE supports four more that make it possible to convert tra-
ditional escape sequences such as \w and \s and POSIX character classes
to use Unicode properties. PCRE uses these non-standard, non-Perl prop-
erties internally when PCRE_UCP is set. They are:
@@ -3828,40 +4536,40 @@ BACKSLASH
Xsp Any Perl space character
Xwd Any Perl "word" character
- Xan matches characters that have either the L (letter) or the N (num-
- ber) property. Xps matches the characters tab, linefeed, vertical tab,
- formfeed, or carriage return, and any other character that has the Z
+ Xan matches characters that have either the L (letter) or the N (num-
+ ber) property. Xps matches the characters tab, linefeed, vertical tab,
+ form feed, or carriage return, and any other character that has the Z
(separator) property. Xsp is the same as Xps, except that vertical tab
is excluded. Xwd matches the same characters as Xan, plus underscore.
Resetting the match start
- The escape sequence \K causes any previously matched characters not to
+ The escape sequence \K causes any previously matched characters not to
be included in the final matched sequence. For example, the pattern:
foo\Kbar
- matches "foobar", but reports that it has matched "bar". This feature
- is similar to a lookbehind assertion (described below). However, in
- this case, the part of the subject before the real match does not have
- to be of fixed length, as lookbehind assertions do. The use of \K does
- not interfere with the setting of captured substrings. For example,
+ matches "foobar", but reports that it has matched "bar". This feature
+ is similar to a lookbehind assertion (described below). However, in
+ this case, the part of the subject before the real match does not have
+ to be of fixed length, as lookbehind assertions do. The use of \K does
+ not interfere with the setting of captured substrings. For example,
when the pattern
(foo)\Kbar
matches "foobar", the first substring is still set to "foo".
- Perl documents that the use of \K within assertions is "not well
- defined". In PCRE, \K is acted upon when it occurs inside positive
+ Perl documents that the use of \K within assertions is "not well
+ defined". In PCRE, \K is acted upon when it occurs inside positive
assertions, but is ignored in negative assertions.
Simple assertions
- The final use of backslash is for certain simple assertions. An asser-
- tion specifies a condition that has to be met at a particular point in
- a match, without consuming any characters from the subject string. The
- use of subpatterns for more complicated assertions is described below.
+ The final use of backslash is for certain simple assertions. An asser-
+ tion specifies a condition that has to be met at a particular point in
+ a match, without consuming any characters from the subject string. The
+ use of subpatterns for more complicated assertions is described below.
The backslashed assertions are:
\b matches at a word boundary
@@ -3872,49 +4580,49 @@ BACKSLASH
\z matches only at the end of the subject
\G matches at the first matching position in the subject
- Inside a character class, \b has a different meaning; it matches the
- backspace character. If any other of these assertions appears in a
- character class, by default it matches the corresponding literal char-
+ Inside a character class, \b has a different meaning; it matches the
+ backspace character. If any other of these assertions appears in a
+ character class, by default it matches the corresponding literal char-
acter (for example, \B matches the letter B). However, if the
- PCRE_EXTRA option is set, an "invalid escape sequence" error is gener-
+ PCRE_EXTRA option is set, an "invalid escape sequence" error is gener-
ated instead.
- A word boundary is a position in the subject string where the current
- character and the previous character do not both match \w or \W (i.e.
- one matches \w and the other matches \W), or the start or end of the
- string if the first or last character matches \w, respectively. In
- UTF-8 mode, the meanings of \w and \W can be changed by setting the
- PCRE_UCP option. When this is done, it also affects \b and \B. Neither
- PCRE nor Perl has a separate "start of word" or "end of word" metase-
- quence. However, whatever follows \b normally determines which it is.
+ A word boundary is a position in the subject string where the current
+ character and the previous character do not both match \w or \W (i.e.
+ one matches \w and the other matches \W), or the start or end of the
+ string if the first or last character matches \w, respectively. In a
+ UTF mode, the meanings of \w and \W can be changed by setting the
+ PCRE_UCP option. When this is done, it also affects \b and \B. Neither
+ PCRE nor Perl has a separate "start of word" or "end of word" metase-
+ quence. However, whatever follows \b normally determines which it is.
For example, the fragment \ba matches "a" at the start of a word.
- The \A, \Z, and \z assertions differ from the traditional circumflex
+ The \A, \Z, and \z assertions differ from the traditional circumflex
and dollar (described in the next section) in that they only ever match
- at the very start and end of the subject string, whatever options are
- set. Thus, they are independent of multiline mode. These three asser-
+ at the very start and end of the subject string, whatever options are
+ set. Thus, they are independent of multiline mode. These three asser-
tions are not affected by the PCRE_NOTBOL or PCRE_NOTEOL options, which
- affect only the behaviour of the circumflex and dollar metacharacters.
- However, if the startoffset argument of pcre_exec() is non-zero, indi-
+ affect only the behaviour of the circumflex and dollar metacharacters.
+ However, if the startoffset argument of pcre_exec() is non-zero, indi-
cating that matching is to start at a point other than the beginning of
- the subject, \A can never match. The difference between \Z and \z is
+ the subject, \A can never match. The difference between \Z and \z is
that \Z matches before a newline at the end of the string as well as at
the very end, whereas \z matches only at the end.
- The \G assertion is true only when the current matching position is at
- the start point of the match, as specified by the startoffset argument
- of pcre_exec(). It differs from \A when the value of startoffset is
- non-zero. By calling pcre_exec() multiple times with appropriate argu-
+ The \G assertion is true only when the current matching position is at
+ the start point of the match, as specified by the startoffset argument
+ of pcre_exec(). It differs from \A when the value of startoffset is
+ non-zero. By calling pcre_exec() multiple times with appropriate argu-
ments, you can mimic Perl's /g option, and it is in this kind of imple-
mentation where \G can be useful.
- Note, however, that PCRE's interpretation of \G, as the start of the
+ Note, however, that PCRE's interpretation of \G, as the start of the
current match, is subtly different from Perl's, which defines it as the
- end of the previous match. In Perl, these can be different when the
- previously matched string was empty. Because PCRE does just one match
+ end of the previous match. In Perl, these can be different when the
+ previously matched string was empty. Because PCRE does just one match
at a time, it cannot reproduce this behaviour.
- If all the alternatives of a pattern begin with \G, the expression is
+ If all the alternatives of a pattern begin with \G, the expression is
anchored to the starting match position, and the "anchored" flag is set
in the compiled regular expression.
@@ -3922,60 +4630,59 @@ BACKSLASH
CIRCUMFLEX AND DOLLAR
Outside a character class, in the default matching mode, the circumflex
- character is an assertion that is true only if the current matching
- point is at the start of the subject string. If the startoffset argu-
- ment of pcre_exec() is non-zero, circumflex can never match if the
- PCRE_MULTILINE option is unset. Inside a character class, circumflex
+ character is an assertion that is true only if the current matching
+ point is at the start of the subject string. If the startoffset argu-
+ ment of pcre_exec() is non-zero, circumflex can never match if the
+ PCRE_MULTILINE option is unset. Inside a character class, circumflex
has an entirely different meaning (see below).
- Circumflex need not be the first character of the pattern if a number
- of alternatives are involved, but it should be the first thing in each
- alternative in which it appears if the pattern is ever to match that
- branch. If all possible alternatives start with a circumflex, that is,
- if the pattern is constrained to match only at the start of the sub-
- ject, it is said to be an "anchored" pattern. (There are also other
+ Circumflex need not be the first character of the pattern if a number
+ of alternatives are involved, but it should be the first thing in each
+ alternative in which it appears if the pattern is ever to match that
+ branch. If all possible alternatives start with a circumflex, that is,
+ if the pattern is constrained to match only at the start of the sub-
+ ject, it is said to be an "anchored" pattern. (There are also other
constructs that can cause a pattern to be anchored.)
- A dollar character is an assertion that is true only if the current
- matching point is at the end of the subject string, or immediately
+ A dollar character is an assertion that is true only if the current
+ matching point is at the end of the subject string, or immediately
before a newline at the end of the string (by default). Dollar need not
- be the last character of the pattern if a number of alternatives are
- involved, but it should be the last item in any branch in which it
+ be the last character of the pattern if a number of alternatives are
+ involved, but it should be the last item in any branch in which it
appears. Dollar has no special meaning in a character class.
- The meaning of dollar can be changed so that it matches only at the
- very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at
+ The meaning of dollar can be changed so that it matches only at the
+ very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at
compile time. This does not affect the \Z assertion.
The meanings of the circumflex and dollar characters are changed if the
- PCRE_MULTILINE option is set. When this is the case, a circumflex
- matches immediately after internal newlines as well as at the start of
- the subject string. It does not match after a newline that ends the
- string. A dollar matches before any newlines in the string, as well as
- at the very end, when PCRE_MULTILINE is set. When newline is specified
- as the two-character sequence CRLF, isolated CR and LF characters do
+ PCRE_MULTILINE option is set. When this is the case, a circumflex
+ matches immediately after internal newlines as well as at the start of
+ the subject string. It does not match after a newline that ends the
+ string. A dollar matches before any newlines in the string, as well as
+ at the very end, when PCRE_MULTILINE is set. When newline is specified
+ as the two-character sequence CRLF, isolated CR and LF characters do
not indicate newlines.
- For example, the pattern /^abc$/ matches the subject string "def\nabc"
- (where \n represents a newline) in multiline mode, but not otherwise.
- Consequently, patterns that are anchored in single line mode because
- all branches start with ^ are not anchored in multiline mode, and a
- match for circumflex is possible when the startoffset argument of
- pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if
+ For example, the pattern /^abc$/ matches the subject string "def\nabc"
+ (where \n represents a newline) in multiline mode, but not otherwise.
+ Consequently, patterns that are anchored in single line mode because
+ all branches start with ^ are not anchored in multiline mode, and a
+ match for circumflex is possible when the startoffset argument of
+ pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if
PCRE_MULTILINE is set.
- Note that the sequences \A, \Z, and \z can be used to match the start
- and end of the subject in both modes, and if all branches of a pattern
- start with \A it is always anchored, whether or not PCRE_MULTILINE is
+ Note that the sequences \A, \Z, and \z can be used to match the start
+ and end of the subject in both modes, and if all branches of a pattern
+ start with \A it is always anchored, whether or not PCRE_MULTILINE is
set.
FULL STOP (PERIOD, DOT) AND \N
Outside a character class, a dot in the pattern matches any one charac-
- ter in the subject string except (by default) a character that signi-
- fies the end of a line. In UTF-8 mode, the matched character may be
- more than one byte long.
+ ter in the subject string except (by default) a character that signi-
+ fies the end of a line.
When a line ending is defined as a single character, dot never matches
that character; when the two-character sequence CRLF is used, dot does
@@ -3995,23 +4702,47 @@ FULL STOP (PERIOD, DOT) AND \N
The escape sequence \N behaves like a dot, except that it is not
affected by the PCRE_DOTALL option. In other words, it matches any
- character except one that signifies the end of a line.
+ character except one that signifies the end of a line. Perl also uses
+ \N to match characters by name; PCRE does not support this.
-MATCHING A SINGLE BYTE
+MATCHING A SINGLE DATA UNIT
- Outside a character class, the escape sequence \C matches any one byte,
- both in and out of UTF-8 mode. Unlike a dot, it always matches any
- line-ending characters. The feature is provided in Perl in order to
- match individual bytes in UTF-8 mode. Because it breaks up UTF-8 char-
- acters into individual bytes, the rest of the string may start with a
- malformed UTF-8 character. For this reason, the \C escape sequence is
- best avoided.
+ Outside a character class, the escape sequence \C matches any one data
+ unit, whether or not a UTF mode is set. In the 8-bit library, one data
+ unit is one byte; in the 16-bit library it is a 16-bit unit. Unlike a
+ dot, \C always matches line-ending characters. The feature is provided
+ in Perl in order to match individual bytes in UTF-8 mode, but it is
+ unclear how it can usefully be used. Because \C breaks up characters
+ into individual data units, matching one unit with \C in a UTF mode
+ means that the rest of the string may start with a malformed UTF char-
+ acter. This has undefined results, because PCRE assumes that it is
+ dealing with valid UTF strings (and by default it checks this at the
+ start of processing unless the PCRE_NO_UTF8_CHECK or
+ PCRE_NO_UTF16_CHECK option is used).
PCRE does not allow \C to appear in lookbehind assertions (described
- below), because in UTF-8 mode this would make it impossible to calcu-
+ below) in a UTF mode, because this would make it impossible to calcu-
late the length of the lookbehind.
+ In general, the \C escape sequence is best avoided. However, one way of
+ using it that avoids the problem of malformed UTF characters is to use
+ a lookahead to check the length of the next character, as in this pat-
+ tern, which could be used with a UTF-8 string (ignore white space and
+ line breaks):
+
+ (?| (?=[\x00-\x7f])(\C) |
+ (?=[\x80-\x{7ff}])(\C)(\C) |
+ (?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
+ (?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))
+
+ A group that starts with (?| resets the capturing parentheses numbers
+ in each alternative (see "Duplicate Subpattern Numbers" below). The
+ assertions at the start of each branch check the next UTF-8 character
+ for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
+ character's individual bytes are then captured by the appropriate num-
+ ber of groups.
+
SQUARE BRACKETS AND CHARACTER CLASSES
@@ -4019,109 +4750,109 @@ SQUARE BRACKETS AND CHARACTER CLASSES
closing square bracket. A closing square bracket on its own is not spe-
cial by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
a lone closing square bracket causes a compile-time error. If a closing
- square bracket is required as a member of the class, it should be the
- first data character in the class (after an initial circumflex, if
+ square bracket is required as a member of the class, it should be the
+ first data character in the class (after an initial circumflex, if
present) or escaped with a backslash.
- A character class matches a single character in the subject. In UTF-8
- mode, the character may be more than one byte long. A matched character
- must be in the set of characters defined by the class, unless the first
- character in the class definition is a circumflex, in which case the
- subject character must not be in the set defined by the class. If a
- circumflex is actually required as a member of the class, ensure it is
- not the first character, or escape it with a backslash.
+ A character class matches a single character in the subject. In a UTF
+ mode, the character may be more than one data unit long. A matched
+ character must be in the set of characters defined by the class, unless
+ the first character in the class definition is a circumflex, in which
+ case the subject character must not be in the set defined by the class.
+ If a circumflex is actually required as a member of the class, ensure
+ it is not the first character, or escape it with a backslash.
- For example, the character class [aeiou] matches any lower case vowel,
- while [^aeiou] matches any character that is not a lower case vowel.
+ For example, the character class [aeiou] matches any lower case vowel,
+ while [^aeiou] matches any character that is not a lower case vowel.
Note that a circumflex is just a convenient notation for specifying the
- characters that are in the class by enumerating those that are not. A
- class that starts with a circumflex is not an assertion; it still con-
- sumes a character from the subject string, and therefore it fails if
+ characters that are in the class by enumerating those that are not. A
+ class that starts with a circumflex is not an assertion; it still con-
+ sumes a character from the subject string, and therefore it fails if
the current pointer is at the end of the string.
- In UTF-8 mode, characters with values greater than 255 can be included
- in a class as a literal string of bytes, or by using the \x{ escaping
- mechanism.
-
- When caseless matching is set, any letters in a class represent both
- their upper case and lower case versions, so for example, a caseless
- [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
- match "A", whereas a caseful version would. In UTF-8 mode, PCRE always
- understands the concept of case for characters whose values are less
- than 128, so caseless matching is always possible. For characters with
- higher values, the concept of case is supported if PCRE is compiled
- with Unicode property support, but not otherwise. If you want to use
- caseless matching in UTF8-mode for characters 128 and above, you must
- ensure that PCRE is compiled with Unicode property support as well as
- with UTF-8 support.
-
- Characters that might indicate line breaks are never treated in any
- special way when matching character classes, whatever line-ending
- sequence is in use, and whatever setting of the PCRE_DOTALL and
+ In UTF-8 (UTF-16) mode, characters with values greater than 255
+ (0xffff) can be included in a class as a literal string of data units,
+ or by using the \x{ escaping mechanism.
+
+ When caseless matching is set, any letters in a class represent both
+ their upper case and lower case versions, so for example, a caseless
+ [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
+ match "A", whereas a caseful version would. In a UTF mode, PCRE always
+ understands the concept of case for characters whose values are less
+ than 128, so caseless matching is always possible. For characters with
+ higher values, the concept of case is supported if PCRE is compiled
+ with Unicode property support, but not otherwise. If you want to use
+ caseless matching in a UTF mode for characters 128 and above, you must
+ ensure that PCRE is compiled with Unicode property support as well as
+ with UTF support.
+
+ Characters that might indicate line breaks are never treated in any
+ special way when matching character classes, whatever line-ending
+ sequence is in use, and whatever setting of the PCRE_DOTALL and
PCRE_MULTILINE options is used. A class such as [^a] always matches one
of these characters.
- The minus (hyphen) character can be used to specify a range of charac-
- ters in a character class. For example, [d-m] matches any letter
- between d and m, inclusive. If a minus character is required in a
- class, it must be escaped with a backslash or appear in a position
- where it cannot be interpreted as indicating a range, typically as the
+ The minus (hyphen) character can be used to specify a range of charac-
+ ters in a character class. For example, [d-m] matches any letter
+ between d and m, inclusive. If a minus character is required in a
+ class, it must be escaped with a backslash or appear in a position
+ where it cannot be interpreted as indicating a range, typically as the
first or last character in the class.
It is not possible to have the literal character "]" as the end charac-
- ter of a range. A pattern such as [W-]46] is interpreted as a class of
- two characters ("W" and "-") followed by a literal string "46]", so it
- would match "W46]" or "-46]". However, if the "]" is escaped with a
- backslash it is interpreted as the end of range, so [W-\]46] is inter-
- preted as a class containing a range followed by two other characters.
- The octal or hexadecimal representation of "]" can also be used to end
+ ter of a range. A pattern such as [W-]46] is interpreted as a class of
+ two characters ("W" and "-") followed by a literal string "46]", so it
+ would match "W46]" or "-46]". However, if the "]" is escaped with a
+ backslash it is interpreted as the end of range, so [W-\]46] is inter-
+ preted as a class containing a range followed by two other characters.
+ The octal or hexadecimal representation of "]" can also be used to end
a range.
- Ranges operate in the collating sequence of character values. They can
- also be used for characters specified numerically, for example
- [\000-\037]. In UTF-8 mode, ranges can include characters whose values
- are greater than 255, for example [\x{100}-\x{2ff}].
+ Ranges operate in the collating sequence of character values. They can
+ also be used for characters specified numerically, for example
+ [\000-\037]. Ranges can include any characters that are valid for the
+ current mode.
If a range that includes letters is used when caseless matching is set,
it matches the letters in either case. For example, [W-c] is equivalent
- to [][\\^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if
- character tables for a French locale are in use, [\xc8-\xcb] matches
- accented E characters in both cases. In UTF-8 mode, PCRE supports the
- concept of case for characters with values greater than 128 only when
+ to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if
+ character tables for a French locale are in use, [\xc8-\xcb] matches
+ accented E characters in both cases. In UTF modes, PCRE supports the
+ concept of case for characters with values greater than 128 only when
it is compiled with Unicode property support.
- The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V,
+ The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V,
\w, and \W may appear in a character class, and add the characters that
- they match to the class. For example, [\dABCDEF] matches any hexadeci-
- mal digit. In UTF-8 mode, the PCRE_UCP option affects the meanings of
- \d, \s, \w and their upper case partners, just as it does when they
- appear outside a character class, as described in the section entitled
+ they match to the class. For example, [\dABCDEF] matches any hexadeci-
+ mal digit. In UTF modes, the PCRE_UCP option affects the meanings of
+ \d, \s, \w and their upper case partners, just as it does when they
+ appear outside a character class, as described in the section entitled
"Generic character types" above. The escape sequence \b has a different
- meaning inside a character class; it matches the backspace character.
- The sequences \B, \N, \R, and \X are not special inside a character
- class. Like any other unrecognized escape sequences, they are treated
- as the literal characters "B", "N", "R", and "X" by default, but cause
+ meaning inside a character class; it matches the backspace character.
+ The sequences \B, \N, \R, and \X are not special inside a character
+ class. Like any other unrecognized escape sequences, they are treated
+ as the literal characters "B", "N", "R", and "X" by default, but cause
an error if the PCRE_EXTRA option is set.
- A circumflex can conveniently be used with the upper case character
- types to specify a more restricted set of characters than the matching
- lower case type. For example, the class [^\W_] matches any letter or
+ A circumflex can conveniently be used with the upper case character
+ types to specify a more restricted set of characters than the matching
+ lower case type. For example, the class [^\W_] matches any letter or
digit, but not underscore, whereas [\w] includes underscore. A positive
character class should be read as "something OR something OR ..." and a
negative class as "NOT something AND NOT something AND NOT ...".
- The only metacharacters that are recognized in character classes are
- backslash, hyphen (only where it can be interpreted as specifying a
- range), circumflex (only at the start), opening square bracket (only
- when it can be interpreted as introducing a POSIX class name - see the
- next section), and the terminating closing square bracket. However,
+ The only metacharacters that are recognized in character classes are
+ backslash, hyphen (only where it can be interpreted as specifying a
+ range), circumflex (only at the start), opening square bracket (only
+ when it can be interpreted as introducing a POSIX class name - see the
+ next section), and the terminating closing square bracket. However,
escaping other non-alphanumeric characters does no harm.
POSIX CHARACTER CLASSES
Perl supports the POSIX notation for character classes. This uses names
- enclosed by [: and :] within the enclosing square brackets. PCRE also
+ enclosed by [: and :] within the enclosing square brackets. PCRE also
supports this notation. For example,
[01[:alpha:]%]
@@ -4144,24 +4875,24 @@ POSIX CHARACTER CLASSES
word "word" characters (same as \w)
xdigit hexadecimal digits
- The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13),
- and space (32). Notice that this list includes the VT character (code
+ The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13),
+ and space (32). Notice that this list includes the VT character (code
11). This makes "space" different to \s, which does not include VT (for
Perl compatibility).
- The name "word" is a Perl extension, and "blank" is a GNU extension
- from Perl 5.8. Another Perl extension is negation, which is indicated
+ The name "word" is a Perl extension, and "blank" is a GNU extension
+ from Perl 5.8. Another Perl extension is negation, which is indicated
by a ^ character after the colon. For example,
[12[:^digit:]]
- matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
+ matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but
these are not supported, and an error is given if they are encountered.
- By default, in UTF-8 mode, characters with values greater than 128 do
- not match any of the POSIX character classes. However, if the PCRE_UCP
- option is passed to pcre_compile(), some of the classes are changed so
+ By default, in UTF modes, characters with values greater than 128 do
+ not match any of the POSIX character classes. However, if the PCRE_UCP
+ option is passed to pcre_compile(), some of the classes are changed so
that Unicode character properties are used. This is achieved by replac-
ing the POSIX classes by other sequences, as follows:
@@ -4174,31 +4905,31 @@ POSIX CHARACTER CLASSES
[:upper:] becomes \p{Lu}
[:word:] becomes \p{Xwd}
- Negated versions, such as [:^alpha:] use \P instead of \p. The other
+ Negated versions, such as [:^alpha:] use \P instead of \p. The other
POSIX classes are unchanged, and match only characters with code points
less than 128.
VERTICAL BAR
- Vertical bar characters are used to separate alternative patterns. For
+ Vertical bar characters are used to separate alternative patterns. For
example, the pattern
gilbert|sullivan
- matches either "gilbert" or "sullivan". Any number of alternatives may
- appear, and an empty alternative is permitted (matching the empty
+ matches either "gilbert" or "sullivan". Any number of alternatives may
+ appear, and an empty alternative is permitted (matching the empty
string). The matching process tries each alternative in turn, from left
- to right, and the first one that succeeds is used. If the alternatives
- are within a subpattern (defined below), "succeeds" means matching the
+ to right, and the first one that succeeds is used. If the alternatives
+ are within a subpattern (defined below), "succeeds" means matching the
rest of the main pattern as well as the alternative in the subpattern.
INTERNAL OPTION SETTING
- The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
- PCRE_EXTENDED options (which are Perl-compatible) can be changed from
- within the pattern by a sequence of Perl option letters enclosed
+ The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
+ PCRE_EXTENDED options (which are Perl-compatible) can be changed from
+ within the pattern by a sequence of Perl option letters enclosed
between "(?" and ")". The option letters are
i for PCRE_CASELESS
@@ -4208,48 +4939,49 @@ INTERNAL OPTION SETTING
For example, (?im) sets caseless, multiline matching. It is also possi-
ble to unset these options by preceding the letter with a hyphen, and a
- combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
- LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
- is also permitted. If a letter appears both before and after the
+ combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
+ LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
+ is also permitted. If a letter appears both before and after the
hyphen, the option is unset.
- The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
- can be changed in the same way as the Perl-compatible options by using
+ The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
+ can be changed in the same way as the Perl-compatible options by using
the characters J, U and X respectively.
- When one of these option changes occurs at top level (that is, not
- inside subpattern parentheses), the change applies to the remainder of
+ When one of these option changes occurs at top level (that is, not
+ inside subpattern parentheses), the change applies to the remainder of
the pattern that follows. If the change is placed right at the start of
a pattern, PCRE extracts it into the global options (and it will there-
fore show up in data extracted by the pcre_fullinfo() function).
- An option change within a subpattern (see below for a description of
- subpatterns) affects only that part of the subpattern that follows it,
+ An option change within a subpattern (see below for a description of
+ subpatterns) affects only that part of the subpattern that follows it,
so
(a(?i)b)c
matches abc and aBc and no other strings (assuming PCRE_CASELESS is not
- used). By this means, options can be made to have different settings
- in different parts of the pattern. Any changes made in one alternative
- do carry on into subsequent branches within the same subpattern. For
+ used). By this means, options can be made to have different settings
+ in different parts of the pattern. Any changes made in one alternative
+ do carry on into subsequent branches within the same subpattern. For
example,
(a(?i)b|c)
- matches "ab", "aB", "c", and "C", even though when matching "C" the
- first branch is abandoned before the option setting. This is because
- the effects of option settings happen at compile time. There would be
+ matches "ab", "aB", "c", and "C", even though when matching "C" the
+ first branch is abandoned before the option setting. This is because
+ the effects of option settings happen at compile time. There would be
some very weird behaviour otherwise.
- Note: There are other PCRE-specific options that can be set by the
- application when the compile or match functions are called. In some
- cases the pattern can contain special leading sequences such as (*CRLF)
- to override what the application has set or what has been defaulted.
- Details are given in the section entitled "Newline sequences" above.
- There are also the (*UTF8) and (*UCP) leading sequences that can be
- used to set UTF-8 and Unicode property modes; they are equivalent to
- setting the PCRE_UTF8 and the PCRE_UCP options, respectively.
+ Note: There are other PCRE-specific options that can be set by the
+ application when the compiling or matching functions are called. In
+ some cases the pattern can contain special leading sequences such as
+ (*CRLF) to override what the application has set or what has been
+ defaulted. Details are given in the section entitled "Newline
+ sequences" above. There are also the (*UTF8), (*UTF16), and (*UCP)
+ leading sequences that can be used to set UTF and Unicode property
+ modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16, and
+ the PCRE_UCP options, respectively.
SUBPATTERNS
@@ -4267,22 +4999,25 @@ SUBPATTERNS
2. It sets up the subpattern as a capturing subpattern. This means
that, when the whole pattern matches, that portion of the subject
string that matched the subpattern is passed back to the caller via the
- ovector argument of pcre_exec(). Opening parentheses are counted from
- left to right (starting from 1) to obtain numbers for the capturing
- subpatterns. For example, if the string "the red king" is matched
- against the pattern
+ ovector argument of the matching function. (This applies only to the
+ traditional matching functions; the DFA matching functions do not sup-
+ port capturing.)
+
+ Opening parentheses are counted from left to right (starting from 1) to
+ obtain numbers for the capturing subpatterns. For example, if the
+ string "the red king" is matched against the pattern
the ((red|white) (king|queen))
the captured substrings are "red king", "red", and "king", and are num-
bered 1, 2, and 3, respectively.
- The fact that plain parentheses fulfil two functions is not always
- helpful. There are often times when a grouping subpattern is required
- without a capturing requirement. If an opening parenthesis is followed
- by a question mark and a colon, the subpattern does not do any captur-
- ing, and is not counted when computing the number of any subsequent
- capturing subpatterns. For example, if the string "the white queen" is
+ The fact that plain parentheses fulfil two functions is not always
+ helpful. There are often times when a grouping subpattern is required
+ without a capturing requirement. If an opening parenthesis is followed
+ by a question mark and a colon, the subpattern does not do any captur-
+ ing, and is not counted when computing the number of any subsequent
+ capturing subpatterns. For example, if the string "the white queen" is
matched against the pattern
the ((?:red|white) (king|queen))
@@ -4290,37 +5025,37 @@ SUBPATTERNS
the captured substrings are "white queen" and "queen", and are numbered
1 and 2. The maximum number of capturing subpatterns is 65535.
- As a convenient shorthand, if any option settings are required at the
- start of a non-capturing subpattern, the option letters may appear
+ As a convenient shorthand, if any option settings are required at the
+ start of a non-capturing subpattern, the option letters may appear
between the "?" and the ":". Thus the two patterns
(?i:saturday|sunday)
(?:(?i)saturday|sunday)
match exactly the same set of strings. Because alternative branches are
- tried from left to right, and options are not reset until the end of
- the subpattern is reached, an option setting in one branch does affect
- subsequent branches, so the above patterns match "SUNDAY" as well as
+ tried from left to right, and options are not reset until the end of
+ the subpattern is reached, an option setting in one branch does affect
+ subsequent branches, so the above patterns match "SUNDAY" as well as
"Saturday".
DUPLICATE SUBPATTERN NUMBERS
Perl 5.10 introduced a feature whereby each alternative in a subpattern
- uses the same numbers for its capturing parentheses. Such a subpattern
- starts with (?| and is itself a non-capturing subpattern. For example,
+ uses the same numbers for its capturing parentheses. Such a subpattern
+ starts with (?| and is itself a non-capturing subpattern. For example,
consider this pattern:
(?|(Sat)ur|(Sun))day
- Because the two alternatives are inside a (?| group, both sets of cap-
- turing parentheses are numbered one. Thus, when the pattern matches,
- you can look at captured substring number one, whichever alternative
- matched. This construct is useful when you want to capture part, but
+ Because the two alternatives are inside a (?| group, both sets of cap-
+ turing parentheses are numbered one. Thus, when the pattern matches,
+ you can look at captured substring number one, whichever alternative
+ matched. This construct is useful when you want to capture part, but
not all, of one of a number of alternatives. Inside a (?| group, paren-
- theses are numbered as usual, but the number is reset at the start of
- each branch. The numbers of any capturing parentheses that follow the
- subpattern start after the highest number used in any branch. The fol-
+ theses are numbered as usual, but the number is reset at the start of
+ each branch. The numbers of any capturing parentheses that follow the
+ subpattern start after the highest number used in any branch. The fol-
lowing example is taken from the Perl documentation. The numbers under-
neath show in which buffer the captured content will be stored.
@@ -4328,58 +5063,58 @@ DUPLICATE SUBPATTERN NUMBERS
/ ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
# 1 2 2 3 2 3 4
- A back reference to a numbered subpattern uses the most recent value
- that is set for that number by any subpattern. The following pattern
+ A back reference to a numbered subpattern uses the most recent value
+ that is set for that number by any subpattern. The following pattern
matches "abcabc" or "defdef":
/(?|(abc)|(def))\1/
- In contrast, a recursive or "subroutine" call to a numbered subpattern
- always refers to the first one in the pattern with the given number.
- The following pattern matches "abcabc" or "defabc":
+ In contrast, a subroutine call to a numbered subpattern always refers
+ to the first one in the pattern with the given number. The following
+ pattern matches "abcabc" or "defabc":
/(?|(abc)|(def))(?1)/
- If a condition test for a subpattern's having matched refers to a non-
- unique number, the test is true if any of the subpatterns of that num-
+ If a condition test for a subpattern's having matched refers to a non-
+ unique number, the test is true if any of the subpatterns of that num-
ber have matched.
- An alternative approach to using this "branch reset" feature is to use
+ An alternative approach to using this "branch reset" feature is to use
duplicate named subpatterns, as described in the next section.
NAMED SUBPATTERNS
- Identifying capturing parentheses by number is simple, but it can be
- very hard to keep track of the numbers in complicated regular expres-
- sions. Furthermore, if an expression is modified, the numbers may
- change. To help with this difficulty, PCRE supports the naming of sub-
+ Identifying capturing parentheses by number is simple, but it can be
+ very hard to keep track of the numbers in complicated regular expres-
+ sions. Furthermore, if an expression is modified, the numbers may
+ change. To help with this difficulty, PCRE supports the naming of sub-
patterns. This feature was not added to Perl until release 5.10. Python
- had the feature earlier, and PCRE introduced it at release 4.0, using
- the Python syntax. PCRE now supports both the Perl and the Python syn-
- tax. Perl allows identically numbered subpatterns to have different
+ had the feature earlier, and PCRE introduced it at release 4.0, using
+ the Python syntax. PCRE now supports both the Perl and the Python syn-
+ tax. Perl allows identically numbered subpatterns to have different
names, but PCRE does not.
- In PCRE, a subpattern can be named in one of three ways: (?<name>...)
- or (?'name'...) as in Perl, or (?P<name>...) as in Python. References
- to capturing parentheses from other parts of the pattern, such as back
- references, recursion, and conditions, can be made by name as well as
+ In PCRE, a subpattern can be named in one of three ways: (?<name>...)
+ or (?'name'...) as in Perl, or (?P<name>...) as in Python. References
+ to capturing parentheses from other parts of the pattern, such as back
+ references, recursion, and conditions, can be made by name as well as
by number.
- Names consist of up to 32 alphanumeric characters and underscores.
- Named capturing parentheses are still allocated numbers as well as
- names, exactly as if the names were not present. The PCRE API provides
+ Names consist of up to 32 alphanumeric characters and underscores.
+ Named capturing parentheses are still allocated numbers as well as
+ names, exactly as if the names were not present. The PCRE API provides
function calls for extracting the name-to-number translation table from
a compiled pattern. There is also a convenience function for extracting
a captured substring by name.
- By default, a name must be unique within a pattern, but it is possible
+ By default, a name must be unique within a pattern, but it is possible
to relax this constraint by setting the PCRE_DUPNAMES option at compile
- time. (Duplicate names are also always permitted for subpatterns with
- the same number, set up as described in the previous section.) Dupli-
- cate names can be useful for patterns where only one instance of the
- named parentheses can match. Suppose you want to match the name of a
- weekday, either as a 3-letter abbreviation or as the full name, and in
+ time. (Duplicate names are also always permitted for subpatterns with
+ the same number, set up as described in the previous section.) Dupli-
+ cate names can be useful for patterns where only one instance of the
+ named parentheses can match. Suppose you want to match the name of a
+ weekday, either as a 3-letter abbreviation or as the full name, and in
both cases you want to extract the abbreviation. This pattern (ignoring
the line breaks) does the job:
@@ -4389,62 +5124,62 @@ NAMED SUBPATTERNS
(?<DN>Thu)(?:rsday)?|
(?<DN>Sat)(?:urday)?
- There are five capturing substrings, but only one is ever set after a
+ There are five capturing substrings, but only one is ever set after a
match. (An alternative way of solving this problem is to use a "branch
reset" subpattern, as described in the previous section.)
- The convenience function for extracting the data by name returns the
- substring for the first (and in this example, the only) subpattern of
- that name that matched. This saves searching to find which numbered
+ The convenience function for extracting the data by name returns the
+ substring for the first (and in this example, the only) subpattern of
+ that name that matched. This saves searching to find which numbered
subpattern it was.
- If you make a back reference to a non-unique named subpattern from
- elsewhere in the pattern, the one that corresponds to the first occur-
+ If you make a back reference to a non-unique named subpattern from
+ elsewhere in the pattern, the one that corresponds to the first occur-
rence of the name is used. In the absence of duplicate numbers (see the
- previous section) this is the one with the lowest number. If you use a
- named reference in a condition test (see the section about conditions
- below), either to check whether a subpattern has matched, or to check
- for recursion, all subpatterns with the same name are tested. If the
- condition is true for any one of them, the overall condition is true.
+ previous section) this is the one with the lowest number. If you use a
+ named reference in a condition test (see the section about conditions
+ below), either to check whether a subpattern has matched, or to check
+ for recursion, all subpatterns with the same name are tested. If the
+ condition is true for any one of them, the overall condition is true.
This is the same behaviour as testing by number. For further details of
the interfaces for handling named subpatterns, see the pcreapi documen-
tation.
Warning: You cannot use different names to distinguish between two sub-
- patterns with the same number because PCRE uses only the numbers when
+ patterns with the same number because PCRE uses only the numbers when
matching. For this reason, an error is given at compile time if differ-
- ent names are given to subpatterns with the same number. However, you
- can give the same name to subpatterns with the same number, even when
+ ent names are given to subpatterns with the same number. However, you
+ can give the same name to subpatterns with the same number, even when
PCRE_DUPNAMES is not set.
REPETITION
- Repetition is specified by quantifiers, which can follow any of the
+ Repetition is specified by quantifiers, which can follow any of the
following items:
a literal data character
the dot metacharacter
the \C escape sequence
- the \X escape sequence (in UTF-8 mode with Unicode properties)
+ the \X escape sequence
the \R escape sequence
an escape such as \d or \pL that matches a single character
a character class
a back reference (see next section)
- a parenthesized subpattern (unless it is an assertion)
- a recursive or "subroutine" call to a subpattern
+ a parenthesized subpattern (including assertions)
+ a subroutine call to a subpattern (recursive or otherwise)
- The general repetition quantifier specifies a minimum and maximum num-
- ber of permitted matches, by giving the two numbers in curly brackets
- (braces), separated by a comma. The numbers must be less than 65536,
+ The general repetition quantifier specifies a minimum and maximum num-
+ ber of permitted matches, by giving the two numbers in curly brackets
+ (braces), separated by a comma. The numbers must be less than 65536,
and the first must be less than or equal to the second. For example:
z{2,4}
- matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
- special character. If the second number is omitted, but the comma is
- present, there is no upper limit; if the second number and the comma
- are both omitted, the quantifier specifies an exact number of required
+ matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
+ special character. If the second number is omitted, but the comma is
+ present, there is no upper limit; if the second number and the comma
+ are both omitted, the quantifier specifies an exact number of required
matches. Thus
[aeiou]{3,}
@@ -4453,17 +5188,16 @@ REPETITION
\d{8}
- matches exactly 8 digits. An opening curly bracket that appears in a
- position where a quantifier is not allowed, or one that does not match
- the syntax of a quantifier, is taken as a literal character. For exam-
+ matches exactly 8 digits. An opening curly bracket that appears in a
+ position where a quantifier is not allowed, or one that does not match
+ the syntax of a quantifier, is taken as a literal character. For exam-
ple, {,6} is not a quantifier, but a literal string of four characters.
- In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to
- individual bytes. Thus, for example, \x{100}{2} matches two UTF-8 char-
- acters, each of which is represented by a two-byte sequence. Similarly,
- when Unicode property support is available, \X{3} matches three Unicode
- extended sequences, each of which may be several bytes long (and they
- may be of different lengths).
+ In UTF modes, quantifiers apply to characters rather than to individual
+ data units. Thus, for example, \x{100}{2} matches two characters, each
+ of which is represented by a two-byte sequence in a UTF-8 string. Simi-
+ larly, \X{3} matches three Unicode extended sequences, each of which
+ may be several data units long (and they may be of different lengths).
The quantifier {0} is permitted, causing the expression to behave as if
the previous item and the quantifier were not present. This may be use-
@@ -4769,8 +5503,8 @@ BACK REFERENCES
its following a backslash are taken as part of a potential back refer-
ence number. If the pattern continues with a digit character, some
delimiter must be used to terminate the back reference. If the
- PCRE_EXTENDED option is set, this can be whitespace. Otherwise, the \g{
- syntax or an empty comment (see "Comments" below) can be used.
+ PCRE_EXTENDED option is set, this can be white space. Otherwise, the
+ \g{ syntax or an empty comment (see "Comments" below) can be used.
Recursive back references
@@ -4807,13 +5541,29 @@ ASSERTIONS
matched in the normal way, except that it does not cause the current
matching position to be changed.
- Assertion subpatterns are not capturing subpatterns, and may not be
- repeated, because it makes no sense to assert the same thing several
- times. If any kind of assertion contains capturing subpatterns within
- it, these are counted for the purposes of numbering the capturing sub-
- patterns in the whole pattern. However, substring capturing is carried
- out only for positive assertions, because it does not make sense for
- negative assertions.
+ Assertion subpatterns are not capturing subpatterns. If such an asser-
+ tion contains capturing subpatterns within it, these are counted for
+ the purposes of numbering the capturing subpatterns in the whole pat-
+ tern. However, substring capturing is carried out only for positive
+ assertions, because it does not make sense for negative assertions.
+
+ For compatibility with Perl, assertion subpatterns may be repeated;
+ though it makes no sense to assert the same thing several times, the
+ side effect of capturing parentheses may occasionally be useful. In
+ practice, there only three cases:
+
+ (1) If the quantifier is {0}, the assertion is never obeyed during
+ matching. However, it may contain internal capturing parenthesized
+ groups that are called from elsewhere via the subroutine mechanism.
+
+ (2) If quantifier is {0,n} where n is greater than zero, it is treated
+ as if it were {0,1}. At run time, the rest of the pattern match is
+ tried with and without the assertion, the order depending on the greed-
+ iness of the quantifier.
+
+ (3) If the minimum repetition is greater than zero, the quantifier is
+ ignored. The assertion is obeyed just once when encountered during
+ matching.
Lookahead assertions
@@ -4883,40 +5633,41 @@ ASSERTIONS
then try to match. If there are insufficient characters before the cur-
rent position, the assertion fails.
- PCRE does not allow the \C escape (which matches a single byte in UTF-8
- mode) to appear in lookbehind assertions, because it makes it impossi-
- ble to calculate the length of the lookbehind. The \X and \R escapes,
- which can match different numbers of bytes, are also not permitted.
+ In a UTF mode, PCRE does not allow the \C escape (which matches a sin-
+ gle data unit even in a UTF mode) to appear in lookbehind assertions,
+ because it makes it impossible to calculate the length of the lookbe-
+ hind. The \X and \R escapes, which can match different numbers of data
+ units, are also not permitted.
- "Subroutine" calls (see below) such as (?2) or (?&X) are permitted in
- lookbehinds, as long as the subpattern matches a fixed-length string.
+ "Subroutine" calls (see below) such as (?2) or (?&X) are permitted in
+ lookbehinds, as long as the subpattern matches a fixed-length string.
Recursion, however, is not supported.
- Possessive quantifiers can be used in conjunction with lookbehind
+ Possessive quantifiers can be used in conjunction with lookbehind
assertions to specify efficient matching of fixed-length strings at the
end of subject strings. Consider a simple pattern such as
abcd$
- when applied to a long string that does not match. Because matching
+ when applied to a long string that does not match. Because matching
proceeds from left to right, PCRE will look for each "a" in the subject
- and then see if what follows matches the rest of the pattern. If the
+ and then see if what follows matches the rest of the pattern. If the
pattern is specified as
^.*abcd$
- the initial .* matches the entire string at first, but when this fails
+ the initial .* matches the entire string at first, but when this fails
(because there is no following "a"), it backtracks to match all but the
- last character, then all but the last two characters, and so on. Once
- again the search for "a" covers the entire string, from right to left,
+ last character, then all but the last two characters, and so on. Once
+ again the search for "a" covers the entire string, from right to left,
so we are no better off. However, if the pattern is written as
^.*+(?<=abcd)
- there can be no backtracking for the .*+ item; it can match only the
- entire string. The subsequent lookbehind assertion does a single test
- on the last four characters. If it fails, the match fails immediately.
- For long strings, this approach makes a significant difference to the
+ there can be no backtracking for the .*+ item; it can match only the
+ entire string. The subsequent lookbehind assertion does a single test
+ on the last four characters. If it fails, the match fails immediately.
+ For long strings, this approach makes a significant difference to the
processing time.
Using multiple assertions
@@ -4925,18 +5676,18 @@ ASSERTIONS
(?<=\d{3})(?<!999)foo
- matches "foo" preceded by three digits that are not "999". Notice that
- each of the assertions is applied independently at the same point in
- the subject string. First there is a check that the previous three
- characters are all digits, and then there is a check that the same
+ matches "foo" preceded by three digits that are not "999". Notice that
+ each of the assertions is applied independently at the same point in
+ the subject string. First there is a check that the previous three
+ characters are all digits, and then there is a check that the same
three characters are not "999". This pattern does not match "foo" pre-
- ceded by six characters, the first of which are digits and the last
- three of which are not "999". For example, it doesn't match "123abc-
+ ceded by six characters, the first of which are digits and the last
+ three of which are not "999". For example, it doesn't match "123abc-
foo". A pattern to do that is
(?<=\d{3}...)(?<!999)foo
- This time the first assertion looks at the preceding six characters,
+ This time the first assertion looks at the preceding six characters,
checking that the first three are digits, and then the second assertion
checks that the preceding three characters are not "999".
@@ -4944,29 +5695,29 @@ ASSERTIONS
(?<=(?<!foo)bar)baz
- matches an occurrence of "baz" that is preceded by "bar" which in turn
+ matches an occurrence of "baz" that is preceded by "bar" which in turn
is not preceded by "foo", while
(?<=\d{3}(?!999)...)foo
- is another pattern that matches "foo" preceded by three digits and any
+ is another pattern that matches "foo" preceded by three digits and any
three characters that are not "999".
CONDITIONAL SUBPATTERNS
- It is possible to cause the matching process to obey a subpattern con-
- ditionally or to choose between two alternative subpatterns, depending
- on the result of an assertion, or whether a specific capturing subpat-
- tern has already been matched. The two possible forms of conditional
+ It is possible to cause the matching process to obey a subpattern con-
+ ditionally or to choose between two alternative subpatterns, depending
+ on the result of an assertion, or whether a specific capturing subpat-
+ tern has already been matched. The two possible forms of conditional
subpattern are:
(?(condition)yes-pattern)
(?(condition)yes-pattern|no-pattern)
- If the condition is satisfied, the yes-pattern is used; otherwise the
- no-pattern (if present) is used. If there are more than two alterna-
- tives in the subpattern, a compile-time error occurs. Each of the two
+ If the condition is satisfied, the yes-pattern is used; otherwise the
+ no-pattern (if present) is used. If there are more than two alterna-
+ tives in the subpattern, a compile-time error occurs. Each of the two
alternatives may itself contain nested subpatterns of any form, includ-
ing conditional subpatterns; the restriction to two alternatives
applies only at the level of the condition. This pattern fragment is an
@@ -4975,73 +5726,73 @@ CONDITIONAL SUBPATTERNS
(?(1) (A|B|C) | (D | (?(2)E|F) | E) )
- There are four kinds of condition: references to subpatterns, refer-
+ There are four kinds of condition: references to subpatterns, refer-
ences to recursion, a pseudo-condition called DEFINE, and assertions.
Checking for a used subpattern by number
- If the text between the parentheses consists of a sequence of digits,
+ If the text between the parentheses consists of a sequence of digits,
the condition is true if a capturing subpattern of that number has pre-
- viously matched. If there is more than one capturing subpattern with
- the same number (see the earlier section about duplicate subpattern
- numbers), the condition is true if any of them have matched. An alter-
- native notation is to precede the digits with a plus or minus sign. In
- this case, the subpattern number is relative rather than absolute. The
- most recently opened parentheses can be referenced by (?(-1), the next
- most recent by (?(-2), and so on. Inside loops it can also make sense
+ viously matched. If there is more than one capturing subpattern with
+ the same number (see the earlier section about duplicate subpattern
+ numbers), the condition is true if any of them have matched. An alter-
+ native notation is to precede the digits with a plus or minus sign. In
+ this case, the subpattern number is relative rather than absolute. The
+ most recently opened parentheses can be referenced by (?(-1), the next
+ most recent by (?(-2), and so on. Inside loops it can also make sense
to refer to subsequent groups. The next parentheses to be opened can be
- referenced as (?(+1), and so on. (The value zero in any of these forms
+ referenced as (?(+1), and so on. (The value zero in any of these forms
is not used; it provokes a compile-time error.)
- Consider the following pattern, which contains non-significant white
+ Consider the following pattern, which contains non-significant white
space to make it more readable (assume the PCRE_EXTENDED option) and to
divide it into three parts for ease of discussion:
( \( )? [^()]+ (?(1) \) )
- The first part matches an optional opening parenthesis, and if that
+ The first part matches an optional opening parenthesis, and if that
character is present, sets it as the first captured substring. The sec-
- ond part matches one or more characters that are not parentheses. The
- third part is a conditional subpattern that tests whether or not the
- first set of parentheses matched. If they did, that is, if subject
- started with an opening parenthesis, the condition is true, and so the
- yes-pattern is executed and a closing parenthesis is required. Other-
- wise, since no-pattern is not present, the subpattern matches nothing.
- In other words, this pattern matches a sequence of non-parentheses,
+ ond part matches one or more characters that are not parentheses. The
+ third part is a conditional subpattern that tests whether or not the
+ first set of parentheses matched. If they did, that is, if subject
+ started with an opening parenthesis, the condition is true, and so the
+ yes-pattern is executed and a closing parenthesis is required. Other-
+ wise, since no-pattern is not present, the subpattern matches nothing.
+ In other words, this pattern matches a sequence of non-parentheses,
optionally enclosed in parentheses.
- If you were embedding this pattern in a larger one, you could use a
+ If you were embedding this pattern in a larger one, you could use a
relative reference:
...other stuff... ( \( )? [^()]+ (?(-1) \) ) ...
- This makes the fragment independent of the parentheses in the larger
+ This makes the fragment independent of the parentheses in the larger
pattern.
Checking for a used subpattern by name
- Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a
- used subpattern by name. For compatibility with earlier versions of
- PCRE, which had this facility before Perl, the syntax (?(name)...) is
- also recognized. However, there is a possible ambiguity with this syn-
- tax, because subpattern names may consist entirely of digits. PCRE
- looks first for a named subpattern; if it cannot find one and the name
- consists entirely of digits, PCRE looks for a subpattern of that num-
- ber, which must be greater than zero. Using subpattern names that con-
+ Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a
+ used subpattern by name. For compatibility with earlier versions of
+ PCRE, which had this facility before Perl, the syntax (?(name)...) is
+ also recognized. However, there is a possible ambiguity with this syn-
+ tax, because subpattern names may consist entirely of digits. PCRE
+ looks first for a named subpattern; if it cannot find one and the name
+ consists entirely of digits, PCRE looks for a subpattern of that num-
+ ber, which must be greater than zero. Using subpattern names that con-
sist entirely of digits is not recommended.
Rewriting the above example to use a named subpattern gives this:
(?<OPEN> \( )? [^()]+ (?(<OPEN>) \) )
- If the name used in a condition of this kind is a duplicate, the test
- is applied to all subpatterns of the same name, and is true if any one
+ If the name used in a condition of this kind is a duplicate, the test
+ is applied to all subpatterns of the same name, and is true if any one
of them has matched.
Checking for pattern recursion
If the condition is the string (R), and there is no subpattern with the
- name R, the condition is true if a recursive call to the whole pattern
+ name R, the condition is true if a recursive call to the whole pattern
or any subpattern has been made. If digits or a name preceded by amper-
sand follow the letter R, for example:
@@ -5049,24 +5800,23 @@ CONDITIONAL SUBPATTERNS
the condition is true if the most recent recursion is into a subpattern
whose number or name is given. This condition does not check the entire
- recursion stack. If the name used in a condition of this kind is a
+ recursion stack. If the name used in a condition of this kind is a
duplicate, the test is applied to all subpatterns of the same name, and
is true if any one of them is the most recent recursion.
- At "top level", all these recursion test conditions are false. The
+ At "top level", all these recursion test conditions are false. The
syntax for recursive patterns is described below.
Defining subpatterns for use by reference only
- If the condition is the string (DEFINE), and there is no subpattern
- with the name DEFINE, the condition is always false. In this case,
- there may be only one alternative in the subpattern. It is always
- skipped if control reaches this point in the pattern; the idea of
- DEFINE is that it can be used to define "subroutines" that can be ref-
- erenced from elsewhere. (The use of "subroutines" is described below.)
- For example, a pattern to match an IPv4 address such as
- "192.168.23.245" could be written like this (ignore whitespace and line
- breaks):
+ If the condition is the string (DEFINE), and there is no subpattern
+ with the name DEFINE, the condition is always false. In this case,
+ there may be only one alternative in the subpattern. It is always
+ skipped if control reaches this point in the pattern; the idea of
+ DEFINE is that it can be used to define subroutines that can be refer-
+ enced from elsewhere. (The use of subroutines is described below.) For
+ example, a pattern to match an IPv4 address such as "192.168.23.245"
+ could be written like this (ignore white space and line breaks):
(?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
\b (?&byte) (\.(?&byte)){3} \b
@@ -5112,12 +5862,12 @@ COMMENTS
comment, which in this case continues to immediately after the next
newline character or character sequence in the pattern. Which charac-
ters are interpreted as newlines is controlled by the options passed to
- pcre_compile() or by a special sequence at the start of the pattern, as
- described in the section entitled "Newline conventions" above. Note
- that the end of this type of comment is a literal newline sequence in
- the pattern; escape sequences that happen to represent a newline do not
- count. For example, consider this pattern when PCRE_EXTENDED is set,
- and the default newline convention is in force:
+ a compiling function or by a special sequence at the start of the pat-
+ tern, as described in the section entitled "Newline conventions" above.
+ Note that the end of this type of comment is a literal newline sequence
+ in the pattern; escape sequences that happen to represent a newline do
+ not count. For example, consider this pattern when PCRE_EXTENDED is
+ set, and the default newline convention is in force:
abc #comment \n still comment
@@ -5153,11 +5903,11 @@ RECURSIVE PATTERNS
into Perl at release 5.10.
A special item that consists of (? followed by a number greater than
- zero and a closing parenthesis is a recursive call of the subpattern of
- the given number, provided that it occurs inside that subpattern. (If
- not, it is a "subroutine" call, which is described in the next sec-
- tion.) The special item (?R) or (?0) is a recursive call of the entire
- regular expression.
+ zero and a closing parenthesis is a recursive subroutine call of the
+ subpattern of the given number, provided that it occurs inside that
+ subpattern. (If not, it is a non-recursive subroutine call, which is
+ described in the next section.) The special item (?R) or (?0) is a
+ recursive call of the entire regular expression.
This PCRE pattern solves the nested parentheses problem (assume the
PCRE_EXTENDED option is set so that white space is ignored):
@@ -5189,8 +5939,8 @@ RECURSIVE PATTERNS
It is also possible to refer to subsequently opened parentheses, by
writing references such as (?+2). However, these cannot be recursive
because the reference is not inside the parentheses that are refer-
- enced. They are always "subroutine" calls, as described in the next
- section.
+ enced. They are always non-recursive subroutine calls, as described in
+ the next section.
An alternative approach is to use named parentheses instead. The Perl
syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also
@@ -5223,28 +5973,30 @@ RECURSIVE PATTERNS
the value for the inner capturing parentheses (numbered 2) is "ef",
which is the last value taken on at the top level. If a capturing sub-
- pattern is not matched at the top level, its final value is unset, even
- if it is (temporarily) set at a deeper level.
+ pattern is not matched at the top level, its final captured value is
+ unset, even if it was (temporarily) set at a deeper level during the
+ matching process.
- If there are more than 15 capturing parentheses in a pattern, PCRE has
- to obtain extra memory to store data during a recursion, which it does
+ If there are more than 15 capturing parentheses in a pattern, PCRE has
+ to obtain extra memory to store data during a recursion, which it does
by using pcre_malloc, freeing it via pcre_free afterwards. If no memory
can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
- Do not confuse the (?R) item with the condition (R), which tests for
- recursion. Consider this pattern, which matches text in angle brack-
- ets, allowing for arbitrary nesting. Only digits are allowed in nested
- brackets (that is, when recursing), whereas any characters are permit-
+ Do not confuse the (?R) item with the condition (R), which tests for
+ recursion. Consider this pattern, which matches text in angle brack-
+ ets, allowing for arbitrary nesting. Only digits are allowed in nested
+ brackets (that is, when recursing), whereas any characters are permit-
ted at the outer level.
< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >
- In this pattern, (?(R) is the start of a conditional subpattern, with
- two different alternatives for the recursive and non-recursive cases.
+ In this pattern, (?(R) is the start of a conditional subpattern, with
+ two different alternatives for the recursive and non-recursive cases.
The (?R) item is the actual recursive call.
- Recursion difference from Perl
+ Differences in recursion processing between PCRE and Perl
+ Recursion processing in PCRE differs from Perl in two important ways.
In PCRE (like Python, but unlike Perl), a recursive subpattern call is
always treated as an atomic group. That is, once it has matched some of
the subject string, it is never re-entered, even if it contains untried
@@ -5317,14 +6069,30 @@ RECURSIVE PATTERNS
Once again, it cannot jump back into the recursion to try other alter-
natives, so the entire match fails.
+ The second way in which PCRE and Perl differ in their recursion pro-
+ cessing is in the handling of captured values. In Perl, when a subpat-
+ tern is called recursively or as a subpattern (see the next section),
+ it has no access to any values that were captured outside the recur-
+ sion, whereas in PCRE these values can be referenced. Consider this
+ pattern:
+
+ ^(.)(\1|a(?2))
+
+ In PCRE, this pattern matches "bab". The first capturing parentheses
+ match "b", then in the second group, when the back reference \1 fails
+ to match "b", the second alternative matches "a" and then recurses. In
+ the recursion, \1 does now match "b" and so the whole match succeeds.
+ In Perl, the pattern fails to match because inside the recursive call
+ \1 cannot access the externally set value.
+
SUBPATTERNS AS SUBROUTINES
- If the syntax for a recursive subpattern reference (either by number or
- by name) is used outside the parentheses to which it refers, it oper-
- ates like a subroutine in a programming language. The "called" subpat-
- tern may be defined before or after the reference. A numbered reference
- can be absolute or relative, as in these examples:
+ If the syntax for a recursive subpattern call (either by number or by
+ name) is used outside the parentheses to which it refers, it operates
+ like a subroutine in a programming language. The called subpattern may
+ be defined before or after the reference. A numbered reference can be
+ absolute or relative, as in these examples:
(...(absolute)...)...(?2)...
(...(relative)...)...(?-1)...
@@ -5343,15 +6111,15 @@ SUBPATTERNS AS SUBROUTINES
two strings. Another example is given in the discussion of DEFINE
above.
- Like recursive subpatterns, a subroutine call is always treated as an
- atomic group. That is, once it has matched some of the subject string,
- it is never re-entered, even if it contains untried alternatives and
- there is a subsequent matching failure. Any capturing parentheses that
- are set during the subroutine call revert to their previous values
- afterwards.
+ All subroutine calls, whether recursive or not, are always treated as
+ atomic groups. That is, once a subroutine has matched some of the sub-
+ ject string, it is never re-entered, even if it contains untried alter-
+ natives and there is a subsequent matching failure. Any capturing
+ parentheses that are set during the subroutine call revert to their
+ previous values afterwards.
- When a subpattern is used as a subroutine, processing options such as
- case-independence are fixed when the subpattern is defined. They cannot
+ Processing options such as case-independence are fixed when a subpat-
+ tern is defined, so if it is used as a subroutine, such options cannot
be changed for different calls. For example, consider this pattern:
(abc)(?i:(?-1))
@@ -5392,8 +6160,8 @@ CALLOUTS
PCRE provides a similar feature, but of course it cannot obey arbitrary
Perl code. The feature is called "callout". The caller of PCRE provides
an external function by putting its entry point in the global variable
- pcre_callout. By default, this variable contains NULL, which disables
- all calling out.
+ pcre_callout (8-bit library) or pcre16_callout (16-bit library). By
+ default, this variable contains NULL, which disables all calling out.
Within a regular expression, (?C) indicates the points at which the
external function is to be called. If you want to identify different
@@ -5403,17 +6171,17 @@ CALLOUTS
(?C1)abc(?C2)def
- If the PCRE_AUTO_CALLOUT flag is passed to pcre_compile(), callouts are
- automatically installed before each item in the pattern. They are all
- numbered 255.
+ If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call-
+ outs are automatically installed before each item in the pattern. They
+ are all numbered 255.
- During matching, when PCRE reaches a callout point (and pcre_callout is
- set), the external function is called. It is provided with the number
- of the callout, the position in the pattern, and, optionally, one item
- of data originally supplied by the caller of pcre_exec(). The callout
- function may cause matching to proceed, to backtrack, or to fail alto-
- gether. A complete description of the interface to the callout function
- is given in the pcrecallout documentation.
+ During matching, when PCRE reaches a callout point, the external func-
+ tion is called. It is provided with the number of the callout, the
+ position in the pattern, and, optionally, one item of data originally
+ supplied by the caller of the matching function. The callout function
+ may cause matching to proceed, to backtrack, or to fail altogether. A
+ complete description of the interface to the callout function is given
+ in the pcrecallout documentation.
BACKTRACKING CONTROL
@@ -5426,25 +6194,33 @@ BACKTRACKING CONTROL
in this section.
Since these verbs are specifically related to backtracking, most of
- them can be used only when the pattern is to be matched using
- pcre_exec(), which uses a backtracking algorithm. With the exception of
- (*FAIL), which behaves like a failing negative assertion, they cause an
- error if encountered by pcre_dfa_exec().
-
- If any of these verbs are used in an assertion or subroutine subpattern
- (including recursive subpatterns), their effect is confined to that
- subpattern; it does not extend to the surrounding pattern. Note that
- such subpatterns are processed as anchored at the point where they are
- tested.
-
- The new verbs make use of what was previously invalid syntax: an open-
+ them can be used only when the pattern is to be matched using one of
+ the traditional matching functions, which use a backtracking algorithm.
+ With the exception of (*FAIL), which behaves like a failing negative
+ assertion, they cause an error if encountered by a DFA matching func-
+ tion.
+
+ If any of these verbs are used in an assertion or in a subpattern that
+ is called as a subroutine (whether or not recursively), their effect is
+ confined to that subpattern; it does not extend to the surrounding pat-
+ tern, with one exception: the name from a *(MARK), (*PRUNE), or (*THEN)
+ that is encountered in a successful positive assertion is passed back
+ when a match succeeds (compare capturing parentheses in assertions).
+ Note that such subpatterns are processed as anchored at the point where
+ they are tested. Note also that Perl's treatment of subroutines and
+ assertions is different in some cases.
+
+ The new verbs make use of what was previously invalid syntax: an open-
ing parenthesis followed by an asterisk. They are generally of the form
- (*VERB) or (*VERB:NAME). Some may take either form, with differing be-
- haviour, depending on whether or not an argument is present. An name is
- a sequence of letters, digits, and underscores. If the name is empty,
- that is, if the closing parenthesis immediately follows the colon, the
- effect is as if the colon were not there. Any number of these verbs may
- occur in a pattern.
+ (*VERB) or (*VERB:NAME). Some may take either form, with differing be-
+ haviour, depending on whether or not an argument is present. A name is
+ any sequence of characters that does not include a closing parenthesis.
+ The maximum length of name is 255 in the 8-bit library and 65535 in the
+ 16-bit library. If the name is empty, that is, if the closing parenthe-
+ sis immediately follows the colon, the effect is as if the colon were
+ not there. Any number of these verbs may occur in a pattern.
+
+ Optimizations that affect backtracking verbs
PCRE contains some optimizations that are used to speed up matching by
running some checks at the start of each match attempt. For example, it
@@ -5454,60 +6230,64 @@ BACKTRACKING CONTROL
course, be processed. You can suppress the start-of-match optimizations
by setting the PCRE_NO_START_OPTIMIZE option when calling pcre_com-
pile() or pcre_exec(), or by starting the pattern with (*NO_START_OPT).
+ There is more discussion of this option in the section entitled "Option
+ bits for pcre_exec()" in the pcreapi documentation.
+
+ Experiments with Perl suggest that it too has similar optimizations,
+ sometimes leading to anomalous results.
Verbs that act immediately
- The following verbs act as soon as they are encountered. They may not
+ The following verbs act as soon as they are encountered. They may not
be followed by a name.
(*ACCEPT)
- This verb causes the match to end successfully, skipping the remainder
- of the pattern. When inside a recursion, only the innermost pattern is
- ended immediately. If (*ACCEPT) is inside capturing parentheses, the
- data so far is captured. (This feature was added to PCRE at release
- 8.00.) For example:
+ This verb causes the match to end successfully, skipping the remainder
+ of the pattern. However, when it is inside a subpattern that is called
+ as a subroutine, only that subpattern is ended successfully. Matching
+ then continues at the outer level. If (*ACCEPT) is inside capturing
+ parentheses, the data so far is captured. For example:
A((?:A|B(*ACCEPT)|C)D)
- This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
+ This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
tured by the outer parentheses.
(*FAIL) or (*F)
- This verb causes the match to fail, forcing backtracking to occur. It
- is equivalent to (?!) but easier to read. The Perl documentation notes
- that it is probably useful only when combined with (?{}) or (??{}).
- Those are, of course, Perl features that are not present in PCRE. The
- nearest equivalent is the callout feature, as for example in this pat-
+ This verb causes a matching failure, forcing backtracking to occur. It
+ is equivalent to (?!) but easier to read. The Perl documentation notes
+ that it is probably useful only when combined with (?{}) or (??{}).
+ Those are, of course, Perl features that are not present in PCRE. The
+ nearest equivalent is the callout feature, as for example in this pat-
tern:
a+(?C)(*FAIL)
- A match with the string "aaaa" always fails, but the callout is taken
+ A match with the string "aaaa" always fails, but the callout is taken
before each backtrack happens (in this example, 10 times).
Recording which path was taken
- There is one verb whose main purpose is to track how a match was
- arrived at, though it also has a secondary use in conjunction with
+ There is one verb whose main purpose is to track how a match was
+ arrived at, though it also has a secondary use in conjunction with
advancing the match starting point (see (*SKIP) below).
(*MARK:NAME) or (*:NAME)
- A name is always required with this verb. There may be as many
- instances of (*MARK) as you like in a pattern, and their names do not
+ A name is always required with this verb. There may be as many
+ instances of (*MARK) as you like in a pattern, and their names do not
have to be unique.
- When a match succeeds, the name of the last-encountered (*MARK) is
- passed back to the caller via the pcre_extra data structure, as
- described in the section on pcre_extra in the pcreapi documentation. No
- data is returned for a partial match. Here is an example of pcretest
- output, where the /K modifier requests the retrieval and outputting of
- (*MARK) data:
+ When a match succeeds, the name of the last-encountered (*MARK) on the
+ matching path is passed back to the caller as described in the section
+ entitled "Extra data for pcre_exec()" in the pcreapi documentation.
+ Here is an example of pcretest output, where the /K modifier requests
+ the retrieval and outputting of (*MARK) data:
- /X(*MARK:A)Y|X(*MARK:B)Z/K
- XY
+ re> /X(*MARK:A)Y|X(*MARK:B)Z/K
+ data> XY
0: XY
MK: A
XZ
@@ -5519,98 +6299,86 @@ BACKTRACKING CONTROL
efficient way of obtaining this information than putting each alterna-
tive in its own capturing parentheses.
- A name may also be returned after a failed match if the final path
- through the pattern involves (*MARK). However, unless (*MARK) used in
- conjunction with (*COMMIT), this is unlikely to happen for an unan-
- chored pattern because, as the starting point for matching is advanced,
- the final check is often with an empty string, causing a failure before
- (*MARK) is reached. For example:
-
- /X(*MARK:A)Y|X(*MARK:B)Z/K
- XP
- No match
+ If (*MARK) is encountered in a positive assertion, its name is recorded
+ and passed back if it is the last-encountered. This does not happen for
+ negative assertions.
- There are three potential starting points for this match (starting with
- X, starting with P, and with an empty string). If the pattern is
- anchored, the result is different:
+ After a partial match or a failed match, the name of the last encoun-
+ tered (*MARK) in the entire match process is returned. For example:
- /^X(*MARK:A)Y|^X(*MARK:B)Z/K
- XP
+ re> /X(*MARK:A)Y|X(*MARK:B)Z/K
+ data> XP
No match, mark = B
- PCRE's start-of-match optimizations can also interfere with this. For
- example, if, as a result of a call to pcre_study(), it knows the mini-
- mum subject length for a match, a shorter subject will not be scanned
- at all.
+ Note that in this unanchored example the mark is retained from the
+ match attempt that started at the letter "X" in the subject. Subsequent
+ match attempts starting at "P" and then with an empty string do not get
+ as far as the (*MARK) item, but nevertheless do not reset it.
- Note that similar anomalies (though different in detail) exist in Perl,
- no doubt for the same reasons. The use of (*MARK) data after a failed
- match of an unanchored pattern is not recommended, unless (*COMMIT) is
- involved.
+ If you are interested in (*MARK) values after failed matches, you
+ should probably set the PCRE_NO_START_OPTIMIZE option (see above) to
+ ensure that the match is always attempted.
Verbs that act after backtracking
The following verbs do nothing when they are encountered. Matching con-
- tinues with what follows, but if there is no subsequent match, causing
- a backtrack to the verb, a failure is forced. That is, backtracking
- cannot pass to the left of the verb. However, when one of these verbs
- appears inside an atomic group, its effect is confined to that group,
- because once the group has been matched, there is never any backtrack-
- ing into it. In this situation, backtracking can "jump back" to the
- left of the entire atomic group. (Remember also, as stated above, that
+ tinues with what follows, but if there is no subsequent match, causing
+ a backtrack to the verb, a failure is forced. That is, backtracking
+ cannot pass to the left of the verb. However, when one of these verbs
+ appears inside an atomic group, its effect is confined to that group,
+ because once the group has been matched, there is never any backtrack-
+ ing into it. In this situation, backtracking can "jump back" to the
+ left of the entire atomic group. (Remember also, as stated above, that
this localization also applies in subroutine calls and assertions.)
- These verbs differ in exactly what kind of failure occurs when back-
+ These verbs differ in exactly what kind of failure occurs when back-
tracking reaches them.
(*COMMIT)
- This verb, which may not be followed by a name, causes the whole match
+ This verb, which may not be followed by a name, causes the whole match
to fail outright if the rest of the pattern does not match. Even if the
pattern is unanchored, no further attempts to find a match by advancing
the starting point take place. Once (*COMMIT) has been passed,
- pcre_exec() is committed to finding a match at the current starting
+ pcre_exec() is committed to finding a match at the current starting
point, or not at all. For example:
a+(*COMMIT)b
- This matches "xxaab" but not "aacaab". It can be thought of as a kind
+ This matches "xxaab" but not "aacaab". It can be thought of as a kind
of dynamic anchor, or "I've started, so I must finish." The name of the
- most recently passed (*MARK) in the path is passed back when (*COMMIT)
+ most recently passed (*MARK) in the path is passed back when (*COMMIT)
forces a match failure.
- Note that (*COMMIT) at the start of a pattern is not the same as an
- anchor, unless PCRE's start-of-match optimizations are turned off, as
+ Note that (*COMMIT) at the start of a pattern is not the same as an
+ anchor, unless PCRE's start-of-match optimizations are turned off, as
shown in this pcretest example:
- /(*COMMIT)abc/
- xyzabc
+ re> /(*COMMIT)abc/
+ data> xyzabc
0: abc
xyzabc\Y
No match
- PCRE knows that any match must start with "a", so the optimization
- skips along the subject to "a" before running the first match attempt,
- which succeeds. When the optimization is disabled by the \Y escape in
+ PCRE knows that any match must start with "a", so the optimization
+ skips along the subject to "a" before running the first match attempt,
+ which succeeds. When the optimization is disabled by the \Y escape in
the second subject, the match starts at "x" and so the (*COMMIT) causes
it to fail without trying any other starting points.
(*PRUNE) or (*PRUNE:NAME)
- This verb causes the match to fail at the current starting position in
- the subject if the rest of the pattern does not match. If the pattern
- is unanchored, the normal "bumpalong" advance to the next starting
- character then happens. Backtracking can occur as usual to the left of
- (*PRUNE), before it is reached, or when matching to the right of
- (*PRUNE), but if there is no match to the right, backtracking cannot
- cross (*PRUNE). In simple cases, the use of (*PRUNE) is just an alter-
- native to an atomic group or possessive quantifier, but there are some
+ This verb causes the match to fail at the current starting position in
+ the subject if the rest of the pattern does not match. If the pattern
+ is unanchored, the normal "bumpalong" advance to the next starting
+ character then happens. Backtracking can occur as usual to the left of
+ (*PRUNE), before it is reached, or when matching to the right of
+ (*PRUNE), but if there is no match to the right, backtracking cannot
+ cross (*PRUNE). In simple cases, the use of (*PRUNE) is just an alter-
+ native to an atomic group or possessive quantifier, but there are some
uses of (*PRUNE) that cannot be expressed in any other way. The behav-
- iour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE) when the
- match fails completely; the name is passed back if this is the final
- attempt. (*PRUNE:NAME) does not pass back a name if the match suc-
- ceeds. In an anchored pattern (*PRUNE) has the same effect as (*COM-
- MIT).
+ iour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE). In an
+ anchored pattern (*PRUNE) has the same effect as (*COMMIT).
(*SKIP)
@@ -5637,49 +6405,85 @@ BACKTRACKING CONTROL
is searched for the most recent (*MARK) that has the same name. If one
is found, the "bumpalong" advance is to the subject position that cor-
responds to that (*MARK) instead of to where (*SKIP) was encountered.
- If no (*MARK) with a matching name is found, normal "bumpalong" of one
- character happens (the (*SKIP) is ignored).
+ If no (*MARK) with a matching name is found, the (*SKIP) is ignored.
(*THEN) or (*THEN:NAME)
- This verb causes a skip to the next alternation in the innermost
- enclosing group if the rest of the pattern does not match. That is, it
- cancels pending backtracking, but only within the current alternation.
- Its name comes from the observation that it can be used for a pattern-
- based if-then-else block:
+ This verb causes a skip to the next innermost alternative if the rest
+ of the pattern does not match. That is, it cancels pending backtrack-
+ ing, but only within the current alternative. Its name comes from the
+ observation that it can be used for a pattern-based if-then-else block:
( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
If the COND1 pattern matches, FOO is tried (and possibly further items
- after the end of the group if FOO succeeds); on failure the matcher
+ after the end of the group if FOO succeeds); on failure, the matcher
skips to the second alternative and tries COND2, without backtracking
into COND1. The behaviour of (*THEN:NAME) is exactly the same as
- (*MARK:NAME)(*THEN) if the overall match fails. If (*THEN) is not
- directly inside an alternation, it acts like (*PRUNE).
-
- The above verbs provide four different "strengths" of control when sub-
- sequent matching fails. (*THEN) is the weakest, carrying on the match
- at the next alternation. (*PRUNE) comes next, failing the match at the
- current starting position, but allowing an advance to the next charac-
- ter (for an unanchored pattern). (*SKIP) is similar, except that the
- advance may be more than one character. (*COMMIT) is the strongest,
+ (*MARK:NAME)(*THEN). If (*THEN) is not inside an alternation, it acts
+ like (*PRUNE).
+
+ Note that a subpattern that does not contain a | character is just a
+ part of the enclosing alternative; it is not a nested alternation with
+ only one alternative. The effect of (*THEN) extends beyond such a sub-
+ pattern to the enclosing alternative. Consider this pattern, where A,
+ B, etc. are complex pattern fragments that do not contain any | charac-
+ ters at this level:
+
+ A (B(*THEN)C) | D
+
+ If A and B are matched, but there is a failure in C, matching does not
+ backtrack into A; instead it moves to the next alternative, that is, D.
+ However, if the subpattern containing (*THEN) is given an alternative,
+ it behaves differently:
+
+ A (B(*THEN)C | (*FAIL)) | D
+
+ The effect of (*THEN) is now confined to the inner subpattern. After a
+ failure in C, matching moves to (*FAIL), which causes the whole subpat-
+ tern to fail because there are no more alternatives to try. In this
+ case, matching does now backtrack into A.
+
+ Note also that a conditional subpattern is not considered as having two
+ alternatives, because only one is ever used. In other words, the |
+ character in a conditional subpattern has a different meaning. Ignoring
+ white space, consider:
+
+ ^.*? (?(?=a) a | b(*THEN)c )
+
+ If the subject is "ba", this pattern does not match. Because .*? is
+ ungreedy, it initially matches zero characters. The condition (?=a)
+ then fails, the character "b" is matched, but "c" is not. At this
+ point, matching does not backtrack to .*? as might perhaps be expected
+ from the presence of the | character. The conditional subpattern is
+ part of the single alternative that comprises the whole pattern, and so
+ the match fails. (If there was a backtrack into .*?, allowing it to
+ match "b", the match would succeed.)
+
+ The verbs just described provide four different "strengths" of control
+ when subsequent matching fails. (*THEN) is the weakest, carrying on the
+ match at the next alternative. (*PRUNE) comes next, failing the match
+ at the current starting position, but allowing an advance to the next
+ character (for an unanchored pattern). (*SKIP) is similar, except that
+ the advance may be more than one character. (*COMMIT) is the strongest,
causing the entire match to fail.
- If more than one is present in a pattern, the "stongest" one wins. For
- example, consider this pattern, where A, B, etc. are complex pattern
- fragments:
+ If more than one such verb is present in a pattern, the "strongest" one
+ wins. For example, consider this pattern, where A, B, etc. are complex
+ pattern fragments:
(A(*COMMIT)B(*THEN)C|D)
- Once A has matched, PCRE is committed to this match, at the current
- starting position. If subsequently B matches, but C does not, the nor-
- mal (*THEN) action of trying the next alternation (that is, D) does not
+ Once A has matched, PCRE is committed to this match, at the current
+ starting position. If subsequently B matches, but C does not, the nor-
+ mal (*THEN) action of trying the next alternative (that is, D) does not
happen because (*COMMIT) overrides.
SEE ALSO
- pcreapi(3), pcrecallout(3), pcrematching(3), pcresyntax(3), pcre(3).
+ pcreapi(3), pcrecallout(3), pcrematching(3), pcresyntax(3), pcre(3),
+ pcre16(3).
AUTHOR
@@ -5691,8 +6495,8 @@ AUTHOR
REVISION
- Last updated: 21 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 17 June 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -5707,7 +6511,7 @@ PCRE REGULAR EXPRESSION SYNTAX SUMMARY
The full syntax and semantics of the regular expressions that are sup-
ported by PCRE are described in the pcrepattern documentation. This
- document contains just a quick-reference summary of the syntax.
+ document contains a quick-reference summary of the syntax.
QUOTING
@@ -5721,7 +6525,7 @@ CHARACTERS
\a alarm, that is, the BEL character (hex 07)
\cx "control-x", where x is any ASCII character
\e escape (hex 1B)
- \f formfeed (hex 0C)
+ \f form feed (hex 0C)
\n newline (hex 0A)
\r carriage return (hex 0D)
\t tab (hex 09)
@@ -5734,25 +6538,25 @@ CHARACTER TYPES
. any character except newline;
in dotall mode, any character whatsoever
- \C one byte, even in UTF-8 mode (best avoided)
+ \C one data unit, even in UTF mode (best avoided)
\d a decimal digit
\D a character that is not a decimal digit
- \h a horizontal whitespace character
- \H a character that is not a horizontal whitespace character
+ \h a horizontal white space character
+ \H a character that is not a horizontal white space character
\N a character that is not a newline
\p{xx} a character with the xx property
\P{xx} a character without the xx property
\R a newline sequence
- \s a whitespace character
- \S a character that is not a whitespace character
- \v a vertical whitespace character
- \V a character that is not a vertical whitespace character
+ \s a white space character
+ \S a character that is not a white space character
+ \v a vertical white space character
+ \V a character that is not a vertical white space character
\w a "word" character
\W a "non-word" character
\X an extended Unicode sequence
In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII
- characters, even in UTF-8 mode. However, this can be changed by setting
+ characters, even in a UTF mode. However, this can be changed by setting
the PCRE_UCP option.
@@ -5814,20 +6618,22 @@ PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P
SCRIPT NAMES FOR \p AND \P
- Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille,
- Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common,
- Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp-
- tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek,
- Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe-
- rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian,
- Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao,
- Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam,
- Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic,
- Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya,
- Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian,
- Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le,
- Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh,
- Ugaritic, Vai, Yi.
+ Arabic, Armenian, Avestan, Balinese, Bamum, Batak, Bengali, Bopomofo,
+ Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Carian, Chakma,
+ Cham, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret,
+ Devanagari, Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic,
+ Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira-
+ gana, Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip-
+ tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li,
+ Kharoshthi, Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian,
+ Lydian, Malayalam, Mandaic, Meetei_Mayek, Meroitic_Cursive,
+ Meroitic_Hieroglyphs, Miao, Mongolian, Myanmar, New_Tai_Lue, Nko,
+ Ogham, Old_Italic, Old_Persian, Old_South_Arabian, Old_Turkic,
+ Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Samari-
+ tan, Saurashtra, Sharada, Shavian, Sinhala, Sora_Sompeng, Sundanese,
+ Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet,
+ Takri, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai,
+ Yi.
CHARACTER CLASSES
@@ -5848,7 +6654,7 @@ CHARACTER CLASSES
lower lower case letter
print printing, including space
punct printing, excluding alphanumeric
- space whitespace
+ space white space
upper upper case letter
word same as \w
xdigit hexadecimal digit
@@ -5939,7 +6745,8 @@ OPTION SETTING
one of the newline-setting options with similar syntax:
(*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
- (*UTF8) set UTF-8 mode (PCRE_UTF8)
+ (*UTF8) set UTF-8 mode: 8-bit library (PCRE_UTF8)
+ (*UTF16) set UTF-16 mode: 16-bit library (PCRE_UTF16)
(*UCP) set PCRE_UCP (use Unicode properties for \d etc)
@@ -6008,6 +6815,7 @@ BACKTRACKING CONTROL
(*ACCEPT) force successful match
(*FAIL) force backtrack; synonym (*F)
+ (*MARK:NAME) set name to be passed back; synonym (*:NAME)
The following act only when a subsequent match failure causes a back-
track to reach them. They all force a match failure, but they differ in
@@ -6016,14 +6824,18 @@ BACKTRACKING CONTROL
(*COMMIT) overall failure, no advance of starting point
(*PRUNE) advance to next starting character
- (*SKIP) advance start to current matching position
+ (*PRUNE:NAME) equivalent to (*MARK:NAME)(*PRUNE)
+ (*SKIP) advance to current matching position
+ (*SKIP:NAME) advance to position corresponding to an earlier
+ (*MARK:NAME); if not found, the (*SKIP) is ignored
(*THEN) local failure, backtrack to next alternation
+ (*THEN:NAME) equivalent to (*MARK:NAME)(*THEN)
NEWLINE CONVENTIONS
These are recognized only at the very start of the pattern or after a
- (*BSR_...) or (*UTF8) or (*UCP) option.
+ (*BSR_...), (*UTF8), (*UTF16) or (*UCP) option.
(*CR) carriage return only
(*LF) linefeed only
@@ -6035,7 +6847,7 @@ NEWLINE CONVENTIONS
WHAT \R MATCHES
These are recognized only at the very start of the pattern or after a
- (*...) option that sets the newline convention or UTF-8 or UCP mode.
+ (*...) option that sets the newline convention or a UTF or UCP mode.
(*BSR_ANYCRLF) CR, LF, or CRLF
(*BSR_UNICODE) any Unicode newline sequence
@@ -6061,8 +6873,594 @@ AUTHOR
REVISION
- Last updated: 21 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 10 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
+------------------------------------------------------------------------------
+
+
+PCREUNICODE(3) PCREUNICODE(3)
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+
+UTF-8, UTF-16, AND UNICODE PROPERTY SUPPORT
+
+ From Release 8.30, in addition to its previous UTF-8 support, PCRE also
+ supports UTF-16 by means of a separate 16-bit library. This can be
+ built as well as, or instead of, the 8-bit library.
+
+
+UTF-8 SUPPORT
+
+ In order process UTF-8 strings, you must build PCRE's 8-bit library
+ with UTF support, and, in addition, you must call pcre_compile() with
+ the PCRE_UTF8 option flag, or the pattern must start with the sequence
+ (*UTF8). When either of these is the case, both the pattern and any
+ subject strings that are matched against it are treated as UTF-8
+ strings instead of strings of 1-byte characters.
+
+
+UTF-16 SUPPORT
+
+ In order process UTF-16 strings, you must build PCRE's 16-bit library
+ with UTF support, and, in addition, you must call pcre16_compile() with
+ the PCRE_UTF16 option flag, or the pattern must start with the sequence
+ (*UTF16). When either of these is the case, both the pattern and any
+ subject strings that are matched against it are treated as UTF-16
+ strings instead of strings of 16-bit characters.
+
+
+UTF SUPPORT OVERHEAD
+
+ If you compile PCRE with UTF support, but do not use it at run time,
+ the library will be a bit bigger, but the additional run time overhead
+ is limited to testing the PCRE_UTF8/16 flag occasionally, so should not
+ be very big.
+
+
+UNICODE PROPERTY SUPPORT
+
+ If PCRE is built with Unicode character property support (which implies
+ UTF support), the escape sequences \p{..}, \P{..}, and \X can be used.
+ The available properties that can be tested are limited to the general
+ category properties such as Lu for an upper case letter or Nd for a
+ decimal number, the Unicode script names such as Arabic or Han, and the
+ derived properties Any and L&. A full list is given in the pcrepattern
+ documentation. Only the short names for properties are supported. For
+ example, \p{L} matches a letter. Its Perl synonym, \p{Letter}, is not
+ supported. Furthermore, in Perl, many properties may optionally be
+ prefixed by "Is", for compatibility with Perl 5.6. PCRE does not sup-
+ port this.
+
+ Validity of UTF-8 strings
+
+ When you set the PCRE_UTF8 flag, the byte strings passed as patterns
+ and subjects are (by default) checked for validity on entry to the rel-
+ evant functions. The entire string is checked before any other process-
+ ing takes place. From release 7.3 of PCRE, the check is according the
+ rules of RFC 3629, which are themselves derived from the Unicode speci-
+ fication. Earlier releases of PCRE followed the rules of RFC 2279,
+ which allows the full range of 31-bit values (0 to 0x7FFFFFFF). The
+ current check allows only values in the range U+0 to U+10FFFF, exclud-
+ ing U+D800 to U+DFFF.
+
+ The excluded code points are the "Surrogate Area" of Unicode. They are
+ reserved for use by UTF-16, where they are used in pairs to encode
+ codepoints with values greater than 0xFFFF. The code points that are
+ encoded by UTF-16 pairs are available independently in the UTF-8 encod-
+ ing. (In other words, the whole surrogate thing is a fudge for UTF-16
+ which unfortunately messes up UTF-8.)
+
+ If an invalid UTF-8 string is passed to PCRE, an error return is given.
+ At compile time, the only additional information is the offset to the
+ first byte of the failing character. The run-time functions pcre_exec()
+ and pcre_dfa_exec() also pass back this information, as well as a more
+ detailed reason code if the caller has provided memory in which to do
+ this.
+
+ In some situations, you may already know that your strings are valid,
+ and therefore want to skip these checks in order to improve perfor-
+ mance, for example in the case of a long subject string that is being
+ scanned repeatedly with different patterns. If you set the
+ PCRE_NO_UTF8_CHECK flag at compile time or at run time, PCRE assumes
+ that the pattern or subject it is given (respectively) contains only
+ valid UTF-8 codes. In this case, it does not diagnose an invalid UTF-8
+ string.
+
+ If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set,
+ what happens depends on why the string is invalid. If the string con-
+ forms to the "old" definition of UTF-8 (RFC 2279), it is processed as a
+ string of characters in the range 0 to 0x7FFFFFFF by pcre_dfa_exec()
+ and the interpreted version of pcre_exec(). In other words, apart from
+ the initial validity test, these functions (when in UTF-8 mode) handle
+ strings according to the more liberal rules of RFC 2279. However, the
+ just-in-time (JIT) optimization for pcre_exec() supports only RFC 3629.
+ If you are using JIT optimization, or if the string does not even con-
+ form to RFC 2279, the result is undefined. Your program may crash.
+
+ If you want to process strings of values in the full range 0 to
+ 0x7FFFFFFF, encoded in a UTF-8-like manner as per the old RFC, you can
+ set PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in
+ this situation, you will have to apply your own validity check, and
+ avoid the use of JIT optimization.
+
+ Validity of UTF-16 strings
+
+ When you set the PCRE_UTF16 flag, the strings of 16-bit data units that
+ are passed as patterns and subjects are (by default) checked for valid-
+ ity on entry to the relevant functions. Values other than those in the
+ surrogate range U+D800 to U+DFFF are independent code points. Values in
+ the surrogate range must be used in pairs in the correct manner.
+
+ If an invalid UTF-16 string is passed to PCRE, an error return is
+ given. At compile time, the only additional information is the offset
+ to the first data unit of the failing character. The run-time functions
+ pcre16_exec() and pcre16_dfa_exec() also pass back this information, as
+ well as a more detailed reason code if the caller has provided memory
+ in which to do this.
+
+ In some situations, you may already know that your strings are valid,
+ and therefore want to skip these checks in order to improve perfor-
+ mance. If you set the PCRE_NO_UTF16_CHECK flag at compile time or at
+ run time, PCRE assumes that the pattern or subject it is given (respec-
+ tively) contains only valid UTF-16 sequences. In this case, it does not
+ diagnose an invalid UTF-16 string.
+
+ General comments about UTF modes
+
+ 1. Codepoints less than 256 can be specified by either braced or
+ unbraced hexadecimal escape sequences (for example, \x{b3} or \xb3).
+ Larger values have to use braced sequences.
+
+ 2. Octal numbers up to \777 are recognized, and in UTF-8 mode, they
+ match two-byte characters for values greater than \177.
+
+ 3. Repeat quantifiers apply to complete UTF characters, not to individ-
+ ual data units, for example: \x{100}{3}.
+
+ 4. The dot metacharacter matches one UTF character instead of a single
+ data unit.
+
+ 5. The escape sequence \C can be used to match a single byte in UTF-8
+ mode, or a single 16-bit data unit in UTF-16 mode, but its use can lead
+ to some strange effects because it breaks up multi-unit characters (see
+ the description of \C in the pcrepattern documentation). The use of \C
+ is not supported in the alternative matching function
+ pcre[16]_dfa_exec(), nor is it supported in UTF mode by the JIT opti-
+ mization of pcre[16]_exec(). If JIT optimization is requested for a UTF
+ pattern that contains \C, it will not succeed, and so the matching will
+ be carried out by the normal interpretive function.
+
+ 6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly
+ test characters of any code value, but, by default, the characters that
+ PCRE recognizes as digits, spaces, or word characters remain the same
+ set as in non-UTF mode, all with values less than 256. This remains
+ true even when PCRE is built to include Unicode property support,
+ because to do otherwise would slow down PCRE in many common cases. Note
+ in particular that this applies to \b and \B, because they are defined
+ in terms of \w and \W. If you really want to test for a wider sense of,
+ say, "digit", you can use explicit Unicode property tests such as
+ \p{Nd}. Alternatively, if you set the PCRE_UCP option, the way that the
+ character escapes work is changed so that Unicode properties are used
+ to determine which characters match. There are more details in the sec-
+ tion on generic character types in the pcrepattern documentation.
+
+ 7. Similarly, characters that match the POSIX named character classes
+ are all low-valued characters, unless the PCRE_UCP option is set.
+
+ 8. However, the horizontal and vertical white space matching escapes
+ (\h, \H, \v, and \V) do match all the appropriate Unicode characters,
+ whether or not PCRE_UCP is set.
+
+ 9. Case-insensitive matching applies only to characters whose values
+ are less than 128, unless PCRE is built with Unicode property support.
+ Even when Unicode property support is available, PCRE still uses its
+ own character tables when checking the case of low-valued characters,
+ so as not to degrade performance. The Unicode property information is
+ used only for characters with higher values. Furthermore, PCRE supports
+ case-insensitive matching only when there is a one-to-one mapping
+ between a letter's cases. There are a small number of many-to-one map-
+ pings in Unicode; these are not supported by PCRE.
+
+
+AUTHOR
+
+ Philip Hazel
+ University Computing Service
+ Cambridge CB2 3QH, England.
+
+
+REVISION
+
+ Last updated: 14 April 2012
+ Copyright (c) 1997-2012 University of Cambridge.
+------------------------------------------------------------------------------
+
+
+PCREJIT(3) PCREJIT(3)
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+
+PCRE JUST-IN-TIME COMPILER SUPPORT
+
+ Just-in-time compiling is a heavyweight optimization that can greatly
+ speed up pattern matching. However, it comes at the cost of extra pro-
+ cessing before the match is performed. Therefore, it is of most benefit
+ when the same pattern is going to be matched many times. This does not
+ necessarily mean many calls of a matching function; if the pattern is
+ not anchored, matching attempts may take place many times at various
+ positions in the subject, even for a single call. Therefore, if the
+ subject string is very long, it may still pay to use JIT for one-off
+ matches.
+
+ JIT support applies only to the traditional Perl-compatible matching
+ function. It does not apply when the DFA matching function is being
+ used. The code for this support was written by Zoltan Herczeg.
+
+
+8-BIT and 16-BIT SUPPORT
+
+ JIT support is available for both the 8-bit and 16-bit PCRE libraries.
+ To keep this documentation simple, only the 8-bit interface is
+ described in what follows. If you are using the 16-bit library, substi-
+ tute the 16-bit functions and 16-bit structures (for example,
+ pcre16_jit_stack instead of pcre_jit_stack).
+
+
+AVAILABILITY OF JIT SUPPORT
+
+ JIT support is an optional feature of PCRE. The "configure" option
+ --enable-jit (or equivalent CMake option) must be set when PCRE is
+ built if you want to use JIT. The support is limited to the following
+ hardware platforms:
+
+ ARM v5, v7, and Thumb2
+ Intel x86 32-bit and 64-bit
+ MIPS 32-bit
+ Power PC 32-bit and 64-bit
+
+ If --enable-jit is set on an unsupported platform, compilation fails.
+
+ A program that is linked with PCRE 8.20 or later can tell if JIT sup-
+ port is available by calling pcre_config() with the PCRE_CONFIG_JIT
+ option. The result is 1 when JIT is available, and 0 otherwise. How-
+ ever, a simple program does not need to check this in order to use JIT.
+ The API is implemented in a way that falls back to the interpretive
+ code if JIT is not available.
+
+ If your program may sometimes be linked with versions of PCRE that are
+ older than 8.20, but you want to use JIT when it is available, you can
+ test the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT
+ macro such as PCRE_CONFIG_JIT, for compile-time control of your code.
+
+
+SIMPLE USE OF JIT
+
+ You have to do two things to make use of the JIT support in the sim-
+ plest way:
+
+ (1) Call pcre_study() with the PCRE_STUDY_JIT_COMPILE option for
+ each compiled pattern, and pass the resulting pcre_extra block to
+ pcre_exec().
+
+ (2) Use pcre_free_study() to free the pcre_extra block when it is
+ no longer needed, instead of just freeing it yourself. This
+ ensures that any JIT data is also freed.
+
+ For a program that may be linked with pre-8.20 versions of PCRE, you
+ can insert
+
+ #ifndef PCRE_STUDY_JIT_COMPILE
+ #define PCRE_STUDY_JIT_COMPILE 0
+ #endif
+
+ so that no option is passed to pcre_study(), and then use something
+ like this to free the study data:
+
+ #ifdef PCRE_CONFIG_JIT
+ pcre_free_study(study_ptr);
+ #else
+ pcre_free(study_ptr);
+ #endif
+
+ PCRE_STUDY_JIT_COMPILE requests the JIT compiler to generate code for
+ complete matches. If you want to run partial matches using the
+ PCRE_PARTIAL_HARD or PCRE_PARTIAL_SOFT options of pcre_exec(), you
+ should set one or both of the following options in addition to, or
+ instead of, PCRE_STUDY_JIT_COMPILE when you call pcre_study():
+
+ PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
+ PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
+
+ The JIT compiler generates different optimized code for each of the
+ three modes (normal, soft partial, hard partial). When pcre_exec() is
+ called, the appropriate code is run if it is available. Otherwise, the
+ pattern is matched using interpretive code.
+
+ In some circumstances you may need to call additional functions. These
+ are described in the section entitled "Controlling the JIT stack"
+ below.
+
+ If JIT support is not available, PCRE_STUDY_JIT_COMPILE etc. are
+ ignored, and no JIT data is created. Otherwise, the compiled pattern is
+ passed to the JIT compiler, which turns it into machine code that exe-
+ cutes much faster than the normal interpretive code. When pcre_exec()
+ is passed a pcre_extra block containing a pointer to JIT code of the
+ appropriate mode (normal or hard/soft partial), it obeys that code
+ instead of running the interpreter. The result is identical, but the
+ compiled JIT code runs much faster.
+
+ There are some pcre_exec() options that are not supported for JIT exe-
+ cution. There are also some pattern items that JIT cannot handle.
+ Details are given below. In both cases, execution automatically falls
+ back to the interpretive code. If you want to know whether JIT was
+ actually used for a particular match, you should arrange for a JIT
+ callback function to be set up as described in the section entitled
+ "Controlling the JIT stack" below, even if you do not need to supply a
+ non-default JIT stack. Such a callback function is called whenever JIT
+ code is about to be obeyed. If the execution options are not right for
+ JIT execution, the callback function is not obeyed.
+
+ If the JIT compiler finds an unsupported item, no JIT data is gener-
+ ated. You can find out if JIT execution is available after studying a
+ pattern by calling pcre_fullinfo() with the PCRE_INFO_JIT option. A
+ result of 1 means that JIT compilation was successful. A result of 0
+ means that JIT support is not available, or the pattern was not studied
+ with PCRE_STUDY_JIT_COMPILE etc., or the JIT compiler was not able to
+ handle the pattern.
+
+ Once a pattern has been studied, with or without JIT, it can be used as
+ many times as you like for matching different subject strings.
+
+
+UNSUPPORTED OPTIONS AND PATTERN ITEMS
+
+ The only pcre_exec() options that are supported for JIT execution are
+ PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK, PCRE_NOTBOL, PCRE_NOTEOL,
+ PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, PCRE_PARTIAL_HARD, and PCRE_PAR-
+ TIAL_SOFT.
+
+ The unsupported pattern items are:
+
+ \C match a single byte; not supported in UTF-8 mode
+ (?Cn) callouts
+ (*PRUNE) )
+ (*SKIP) ) backtracking control verbs
+ (*THEN) )
+
+ Support for some of these may be added in future.
+
+
+RETURN VALUES FROM JIT EXECUTION
+
+ When a pattern is matched using JIT execution, the return values are
+ the same as those given by the interpretive pcre_exec() code, with the
+ addition of one new error code: PCRE_ERROR_JIT_STACKLIMIT. This means
+ that the memory used for the JIT stack was insufficient. See "Control-
+ ling the JIT stack" below for a discussion of JIT stack usage. For com-
+ patibility with the interpretive pcre_exec() code, no more than two-
+ thirds of the ovector argument is used for passing back captured sub-
+ strings.
+
+ The error code PCRE_ERROR_MATCHLIMIT is returned by the JIT code if
+ searching a very large pattern tree goes on for too long, as it is in
+ the same circumstance when JIT is not used, but the details of exactly
+ what is counted are not the same. The PCRE_ERROR_RECURSIONLIMIT error
+ code is never returned by JIT execution.
+
+
+SAVING AND RESTORING COMPILED PATTERNS
+
+ The code that is generated by the JIT compiler is architecture-spe-
+ cific, and is also position dependent. For those reasons it cannot be
+ saved (in a file or database) and restored later like the bytecode and
+ other data of a compiled pattern. Saving and restoring compiled pat-
+ terns is not something many people do. More detail about this facility
+ is given in the pcreprecompile documentation. It should be possible to
+ run pcre_study() on a saved and restored pattern, and thereby recreate
+ the JIT data, but because JIT compilation uses significant resources,
+ it is probably not worth doing this; you might as well recompile the
+ original pattern.
+
+
+CONTROLLING THE JIT STACK
+
+ When the compiled JIT code runs, it needs a block of memory to use as a
+ stack. By default, it uses 32K on the machine stack. However, some
+ large or complicated patterns need more than this. The error
+ PCRE_ERROR_JIT_STACKLIMIT is given when there is not enough stack.
+ Three functions are provided for managing blocks of memory for use as
+ JIT stacks. There is further discussion about the use of JIT stacks in
+ the section entitled "JIT stack FAQ" below.
+
+ The pcre_jit_stack_alloc() function creates a JIT stack. Its arguments
+ are a starting size and a maximum size, and it returns a pointer to an
+ opaque structure of type pcre_jit_stack, or NULL if there is an error.
+ The pcre_jit_stack_free() function can be used to free a stack that is
+ no longer needed. (For the technically minded: the address space is
+ allocated by mmap or VirtualAlloc.)
+
+ JIT uses far less memory for recursion than the interpretive code, and
+ a maximum stack size of 512K to 1M should be more than enough for any
+ pattern.
+
+ The pcre_assign_jit_stack() function specifies which stack JIT code
+ should use. Its arguments are as follows:
+
+ pcre_extra *extra
+ pcre_jit_callback callback
+ void *data
+
+ The extra argument must be the result of studying a pattern with
+ PCRE_STUDY_JIT_COMPILE etc. There are three cases for the values of the
+ other two options:
+
+ (1) If callback is NULL and data is NULL, an internal 32K block
+ on the machine stack is used.
+
+ (2) If callback is NULL and data is not NULL, data must be
+ a valid JIT stack, the result of calling pcre_jit_stack_alloc().
+
+ (3) If callback is not NULL, it must point to a function that is
+ called with data as an argument at the start of matching, in
+ order to set up a JIT stack. If the return from the callback
+ function is NULL, the internal 32K stack is used; otherwise the
+ return value must be a valid JIT stack, the result of calling
+ pcre_jit_stack_alloc().
+
+ A callback function is obeyed whenever JIT code is about to be run; it
+ is not obeyed when pcre_exec() is called with options that are incom-
+ patible for JIT execution. A callback function can therefore be used to
+ determine whether a match operation was executed by JIT or by the
+ interpreter.
+
+ You may safely use the same JIT stack for more than one pattern (either
+ by assigning directly or by callback), as long as the patterns are all
+ matched sequentially in the same thread. In a multithread application,
+ if you do not specify a JIT stack, or if you assign or pass back NULL
+ from a callback, that is thread-safe, because each thread has its own
+ machine stack. However, if you assign or pass back a non-NULL JIT
+ stack, this must be a different stack for each thread so that the
+ application is thread-safe.
+
+ Strictly speaking, even more is allowed. You can assign the same non-
+ NULL stack to any number of patterns as long as they are not used for
+ matching by multiple threads at the same time. For example, you can
+ assign the same stack to all compiled patterns, and use a global mutex
+ in the callback to wait until the stack is available for use. However,
+ this is an inefficient solution, and not recommended.
+
+ This is a suggestion for how a multithreaded program that needs to set
+ up non-default JIT stacks might operate:
+
+ During thread initalization
+ thread_local_var = pcre_jit_stack_alloc(...)
+
+ During thread exit
+ pcre_jit_stack_free(thread_local_var)
+
+ Use a one-line callback function
+ return thread_local_var
+
+ All the functions described in this section do nothing if JIT is not
+ available, and pcre_assign_jit_stack() does nothing unless the extra
+ argument is non-NULL and points to a pcre_extra block that is the
+ result of a successful study with PCRE_STUDY_JIT_COMPILE etc.
+
+
+JIT STACK FAQ
+
+ (1) Why do we need JIT stacks?
+
+ PCRE (and JIT) is a recursive, depth-first engine, so it needs a stack
+ where the local data of the current node is pushed before checking its
+ child nodes. Allocating real machine stack on some platforms is diffi-
+ cult. For example, the stack chain needs to be updated every time if we
+ extend the stack on PowerPC. Although it is possible, its updating
+ time overhead decreases performance. So we do the recursion in memory.
+
+ (2) Why don't we simply allocate blocks of memory with malloc()?
+
+ Modern operating systems have a nice feature: they can reserve an
+ address space instead of allocating memory. We can safely allocate mem-
+ ory pages inside this address space, so the stack could grow without
+ moving memory data (this is important because of pointers). Thus we can
+ allocate 1M address space, and use only a single memory page (usually
+ 4K) if that is enough. However, we can still grow up to 1M anytime if
+ needed.
+
+ (3) Who "owns" a JIT stack?
+
+ The owner of the stack is the user program, not the JIT studied pattern
+ or anything else. The user program must ensure that if a stack is used
+ by pcre_exec(), (that is, it is assigned to the pattern currently run-
+ ning), that stack must not be used by any other threads (to avoid over-
+ writing the same memory area). The best practice for multithreaded pro-
+ grams is to allocate a stack for each thread, and return this stack
+ through the JIT callback function.
+
+ (4) When should a JIT stack be freed?
+
+ You can free a JIT stack at any time, as long as it will not be used by
+ pcre_exec() again. When you assign the stack to a pattern, only a
+ pointer is set. There is no reference counting or any other magic. You
+ can free the patterns and stacks in any order, anytime. Just do not
+ call pcre_exec() with a pattern pointing to an already freed stack, as
+ that will cause SEGFAULT. (Also, do not free a stack currently used by
+ pcre_exec() in another thread). You can also replace the stack for a
+ pattern at any time. You can even free the previous stack before
+ assigning a replacement.
+
+ (5) Should I allocate/free a stack every time before/after calling
+ pcre_exec()?
+
+ No, because this is too costly in terms of resources. However, you
+ could implement some clever idea which release the stack if it is not
+ used in let's say two minutes. The JIT callback can help to achive this
+ without keeping a list of the currently JIT studied patterns.
+
+ (6) OK, the stack is for long term memory allocation. But what happens
+ if a pattern causes stack overflow with a stack of 1M? Is that 1M kept
+ until the stack is freed?
+
+ Especially on embedded sytems, it might be a good idea to release mem-
+ ory sometimes without freeing the stack. There is no API for this at
+ the moment. Probably a function call which returns with the currently
+ allocated memory for any stack and another which allows releasing mem-
+ ory (shrinking the stack) would be a good idea if someone needs this.
+
+ (7) This is too much of a headache. Isn't there any better solution for
+ JIT stack handling?
+
+ No, thanks to Windows. If POSIX threads were used everywhere, we could
+ throw out this complicated API.
+
+
+EXAMPLE CODE
+
+ This is a single-threaded example that specifies a JIT stack without
+ using a callback.
+
+ int rc;
+ int ovector[30];
+ pcre *re;
+ pcre_extra *extra;
+ pcre_jit_stack *jit_stack;
+
+ re = pcre_compile(pattern, 0, &error, &erroffset, NULL);
+ /* Check for errors */
+ extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
+ jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024);
+ /* Check for error (NULL) */
+ pcre_assign_jit_stack(extra, NULL, jit_stack);
+ rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
+ /* Check results */
+ pcre_free(re);
+ pcre_free_study(extra);
+ pcre_jit_stack_free(jit_stack);
+
+
+SEE ALSO
+
+ pcreapi(3)
+
+
+AUTHOR
+
+ Philip Hazel (FAQ by Zoltan Herczeg)
+ University Computing Service
+ Cambridge CB2 3QH, England.
+
+
+REVISION
+
+ Last updated: 04 May 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -6075,11 +7473,11 @@ NAME
PARTIAL MATCHING IN PCRE
- In normal use of PCRE, if the subject string that is passed to
- pcre_exec() or pcre_dfa_exec() matches as far as it goes, but is too
- short to match the entire pattern, PCRE_ERROR_NOMATCH is returned.
- There are circumstances where it might be helpful to distinguish this
- case from other cases in which there is no match.
+ In normal use of PCRE, if the subject string that is passed to a match-
+ ing function matches as far as it goes, but is too short to match the
+ entire pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances
+ where it might be helpful to distinguish this case from other cases in
+ which there is no match.
Consider, for example, an application where a human is required to type
in data for a field with specific formatting requirements. An example
@@ -6097,41 +7495,52 @@ PARTIAL MATCHING IN PCRE
available at once.
PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
- PCRE_PARTIAL_HARD options, which can be set when calling pcre_exec() or
- pcre_dfa_exec(). For backwards compatibility, PCRE_PARTIAL is a synonym
- for PCRE_PARTIAL_SOFT. The essential difference between the two options
- is whether or not a partial match is preferred to an alternative com-
- plete match, though the details differ between the two matching func-
- tions. If both options are set, PCRE_PARTIAL_HARD takes precedence.
-
- Setting a partial matching option disables two of PCRE's optimizations.
- PCRE remembers the last literal byte in a pattern, and abandons match-
- ing immediately if such a byte is not present in the subject string.
- This optimization cannot be used for a subject string that might match
- only partially. If the pattern was studied, PCRE knows the minimum
- length of a matching string, and does not bother to run the matching
- function on shorter strings. This optimization is also disabled for
- partial matching.
-
-
-PARTIAL MATCHING USING pcre_exec()
-
- A partial match occurs during a call to pcre_exec() when the end of the
- subject string is reached successfully, but matching cannot continue
- because more characters are needed. However, at least one character in
- the subject must have been inspected. This character need not form part
- of the final matched string; lookbehind assertions and the \K escape
- sequence provide ways of inspecting characters before the start of a
- matched substring. The requirement for inspecting at least one charac-
- ter exists because an empty string can always be matched; without such
- a restriction there would always be a partial match of an empty string
- at the end of the subject.
-
- If there are at least two slots in the offsets vector when pcre_exec()
- returns with a partial match, the first slot is set to the offset of
- the earliest character that was inspected when the partial match was
- found. For convenience, the second offset points to the end of the sub-
- ject so that a substring can easily be identified.
+ PCRE_PARTIAL_HARD options, which can be set when calling any of the
+ matching functions. For backwards compatibility, PCRE_PARTIAL is a syn-
+ onym for PCRE_PARTIAL_SOFT. The essential difference between the two
+ options is whether or not a partial match is preferred to an alterna-
+ tive complete match, though the details differ between the two types of
+ matching function. If both options are set, PCRE_PARTIAL_HARD takes
+ precedence.
+
+ If you want to use partial matching with just-in-time optimized code,
+ you must call pcre_study() or pcre16_study() with one or both of these
+ options:
+
+ PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
+ PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
+
+ PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-
+ partial matches on the same pattern. If the appropriate JIT study mode
+ has not been set for a match, the interpretive matching code is used.
+
+ Setting a partial matching option disables two of PCRE's standard opti-
+ mizations. PCRE remembers the last literal data unit in a pattern, and
+ abandons matching immediately if it is not present in the subject
+ string. This optimization cannot be used for a subject string that
+ might match only partially. If the pattern was studied, PCRE knows the
+ minimum length of a matching string, and does not bother to run the
+ matching function on shorter strings. This optimization is also dis-
+ abled for partial matching.
+
+
+PARTIAL MATCHING USING pcre_exec() OR pcre16_exec()
+
+ A partial match occurs during a call to pcre_exec() or pcre16_exec()
+ when the end of the subject string is reached successfully, but match-
+ ing cannot continue because more characters are needed. However, at
+ least one character in the subject must have been inspected. This char-
+ acter need not form part of the final matched string; lookbehind asser-
+ tions and the \K escape sequence provide ways of inspecting characters
+ before the start of a matched substring. The requirement for inspecting
+ at least one character exists because an empty string can always be
+ matched; without such a restriction there would always be a partial
+ match of an empty string at the end of the subject.
+
+ If there are at least two slots in the offsets vector when a partial
+ match is returned, the first slot is set to the offset of the earliest
+ character that was inspected. For convenience, the second offset points
+ to the end of the subject so that a substring can easily be identified.
For the majority of patterns, the first offset identifies the start of
the partially matched string. However, for patterns that contain look-
@@ -6148,13 +7557,13 @@ PARTIAL MATCHING USING pcre_exec()
What happens when a partial match is identified depends on which of the
two partial matching options are set.
- PCRE_PARTIAL_SOFT with pcre_exec()
+ PCRE_PARTIAL_SOFT WITH pcre_exec() OR pcre16_exec()
- If PCRE_PARTIAL_SOFT is set when pcre_exec() identifies a partial
- match, the partial match is remembered, but matching continues as nor-
- mal, and other alternatives in the pattern are tried. If no complete
- match can be found, pcre_exec() returns PCRE_ERROR_PARTIAL instead of
- PCRE_ERROR_NOMATCH.
+ If PCRE_PARTIAL_SOFT is set when pcre_exec() or pcre16_exec() identi-
+ fies a partial match, the partial match is remembered, but matching
+ continues as normal, and other alternatives in the pattern are tried.
+ If no complete match can be found, PCRE_ERROR_PARTIAL is returned
+ instead of PCRE_ERROR_NOMATCH.
This option is "soft" because it prefers a complete match over a par-
tial match. All the various matching items in a pattern behave as if
@@ -6174,22 +7583,24 @@ PARTIAL MATCHING USING pcre_exec()
(In this example, there are two partial matches, because "dog" on its
own partially matches the second alternative.)
- PCRE_PARTIAL_HARD with pcre_exec()
-
- If PCRE_PARTIAL_HARD is set for pcre_exec(), it returns PCRE_ERROR_PAR-
- TIAL as soon as a partial match is found, without continuing to search
- for possible complete matches. This option is "hard" because it prefers
- an earlier partial match over a later complete match. For this reason,
- the assumption is made that the end of the supplied subject string may
- not be the true end of the available data, and so, if \z, \Z, \b, \B,
- or $ are encountered at the end of the subject, the result is
- PCRE_ERROR_PARTIAL.
-
- Setting PCRE_PARTIAL_HARD also affects the way pcre_exec() checks UTF-8
- subject strings for validity. Normally, an invalid UTF-8 sequence
- causes the error PCRE_ERROR_BADUTF8. However, in the special case of a
- truncated UTF-8 character at the end of the subject, PCRE_ERROR_SHORT-
- UTF8 is returned when PCRE_PARTIAL_HARD is set.
+ PCRE_PARTIAL_HARD WITH pcre_exec() OR pcre16_exec()
+
+ If PCRE_PARTIAL_HARD is set for pcre_exec() or pcre16_exec(),
+ PCRE_ERROR_PARTIAL is returned as soon as a partial match is found,
+ without continuing to search for possible complete matches. This option
+ is "hard" because it prefers an earlier partial match over a later com-
+ plete match. For this reason, the assumption is made that the end of
+ the supplied subject string may not be the true end of the available
+ data, and so, if \z, \Z, \b, \B, or $ are encountered at the end of the
+ subject, the result is PCRE_ERROR_PARTIAL, provided that at least one
+ character in the subject has been inspected.
+
+ Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16 subject
+ strings are checked for validity. Normally, an invalid sequence causes
+ the error PCRE_ERROR_BADUTF8 or PCRE_ERROR_BADUTF16. However, in the
+ special case of a truncated character at the end of the subject,
+ PCRE_ERROR_SHORTUTF8 or PCRE_ERROR_SHORTUTF16 is returned when
+ PCRE_PARTIAL_HARD is set.
Comparing hard and soft partial matching
@@ -6207,25 +7618,25 @@ PARTIAL MATCHING USING pcre_exec()
/dog(sbody)??/
- In this case the result is always a complete match because pcre_exec()
- finds that first, and it never continues after finding a match. It
- might be easier to follow this explanation by thinking of the two pat-
- terns like this:
+ In this case the result is always a complete match because that is
+ found first, and matching never continues after finding a complete
+ match. It might be easier to follow this explanation by thinking of the
+ two patterns like this:
/dog(sbody)?/ is the same as /dogsbody|dog/
/dog(sbody)??/ is the same as /dog|dogsbody/
- The second pattern will never match "dogsbody" when pcre_exec() is
- used, because it will always find the shorter match first.
+ The second pattern will never match "dogsbody", because it will always
+ find the shorter match first.
-PARTIAL MATCHING USING pcre_dfa_exec()
+PARTIAL MATCHING USING pcre_dfa_exec() OR pcre16_dfa_exec()
- The pcre_dfa_exec() function moves along the subject string character
- by character, without backtracking, searching for all possible matches
- simultaneously. If the end of the subject is reached before the end of
- the pattern, there is the possibility of a partial match, again pro-
- vided that at least one character has been inspected.
+ The DFA functions move along the subject string character by character,
+ without backtracking, searching for all possible matches simultane-
+ ously. If the end of the subject is reached before the end of the pat-
+ tern, there is the possibility of a partial match, again provided that
+ at least one character has been inspected.
When PCRE_PARTIAL_SOFT is set, PCRE_ERROR_PARTIAL is returned only if
there have been no complete matches. Otherwise, the complete matches
@@ -6235,17 +7646,17 @@ PARTIAL MATCHING USING pcre_dfa_exec()
the first matching string, provided there are at least two slots in the
offsets vector.
- Because pcre_dfa_exec() always searches for all possible matches, and
- there is no difference between greedy and ungreedy repetition, its be-
- haviour is different from pcre_exec when PCRE_PARTIAL_HARD is set. Con-
- sider the string "dog" matched against the ungreedy pattern shown
- above:
+ Because the DFA functions always search for all possible matches, and
+ there is no difference between greedy and ungreedy repetition, their
+ behaviour is different from the standard functions when PCRE_PAR-
+ TIAL_HARD is set. Consider the string "dog" matched against the
+ ungreedy pattern shown above:
/dog(sbody)??/
- Whereas pcre_exec() stops as soon as it finds the complete match for
- "dog", pcre_dfa_exec() also finds the partial match for "dogsbody", and
- so returns that when PCRE_PARTIAL_HARD is set.
+ Whereas the standard functions stop as soon as they find the complete
+ match for "dog", the DFA functions also find the partial match for
+ "dogsbody", and so return that when PCRE_PARTIAL_HARD is set.
PARTIAL MATCHING AND WORD BOUNDARIES
@@ -6259,37 +7670,34 @@ PARTIAL MATCHING AND WORD BOUNDARIES
This matches "cat", provided there is a word boundary at either end. If
the subject string is "the cat", the comparison of the final "t" with a
following character cannot take place, so a partial match is found.
- However, pcre_exec() carries on with normal matching, which matches \b
- at the end of the subject when the last character is a letter, thus
- finding a complete match. The result, therefore, is not PCRE_ERROR_PAR-
- TIAL. The same thing happens with pcre_dfa_exec(), because it also
- finds the complete match.
-
- Using PCRE_PARTIAL_HARD in this case does yield PCRE_ERROR_PARTIAL,
- because then the partial match takes precedence.
+ However, normal matching carries on, and \b matches at the end of the
+ subject when the last character is a letter, so a complete match is
+ found. The result, therefore, is not PCRE_ERROR_PARTIAL. Using
+ PCRE_PARTIAL_HARD in this case does yield PCRE_ERROR_PARTIAL, because
+ then the partial match takes precedence.
FORMERLY RESTRICTED PATTERNS
For releases of PCRE prior to 8.00, because of the way certain internal
- optimizations were implemented in the pcre_exec() function, the
- PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be
- used with all patterns. From release 8.00 onwards, the restrictions no
- longer apply, and partial matching with pcre_exec() can be requested
- for any pattern.
+ optimizations were implemented in the pcre_exec() function, the
+ PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be
+ used with all patterns. From release 8.00 onwards, the restrictions no
+ longer apply, and partial matching with can be requested for any pat-
+ tern.
Items that were formerly restricted were repeated single characters and
- repeated metasequences. If PCRE_PARTIAL was set for a pattern that did
- not conform to the restrictions, pcre_exec() returned the error code
- PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
- PCRE_INFO_OKPARTIAL call to pcre_fullinfo() to find out if a compiled
+ repeated metasequences. If PCRE_PARTIAL was set for a pattern that did
+ not conform to the restrictions, pcre_exec() returned the error code
+ PCRE_ERROR_BADPARTIAL (-13). This error code is no longer in use. The
+ PCRE_INFO_OKPARTIAL call to pcre_fullinfo() to find out if a compiled
pattern can be used for partial matching now always returns 1.
EXAMPLE OF PARTIAL MATCHING USING PCRETEST
- If the escape sequence \P is present in a pcretest data line, the
- PCRE_PARTIAL_SOFT option is used for the match. Here is a run of
+ If the escape sequence \P is present in a pcretest data line, the
+ PCRE_PARTIAL_SOFT option is used for the match. Here is a run of
pcretest that uses the date example quoted above:
re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
@@ -6305,25 +7713,25 @@ EXAMPLE OF PARTIAL MATCHING USING PCRETEST
data> j\P
No match
- The first data string is matched completely, so pcretest shows the
- matched substrings. The remaining four strings do not match the com-
+ The first data string is matched completely, so pcretest shows the
+ matched substrings. The remaining four strings do not match the com-
plete pattern, but the first two are partial matches. Similar output is
- obtained when pcre_dfa_exec() is used.
+ obtained if DFA matching is used.
- If the escape sequence \P is present more than once in a pcretest data
+ If the escape sequence \P is present more than once in a pcretest data
line, the PCRE_PARTIAL_HARD option is set for the match.
-MULTI-SEGMENT MATCHING WITH pcre_dfa_exec()
+MULTI-SEGMENT MATCHING WITH pcre_dfa_exec() OR pcre16_dfa_exec()
- When a partial match has been found using pcre_dfa_exec(), it is possi-
- ble to continue the match by providing additional subject data and
- calling pcre_dfa_exec() again with the same compiled regular expres-
- sion, this time setting the PCRE_DFA_RESTART option. You must pass the
+ When a partial match has been found using a DFA matching function, it
+ is possible to continue the match by providing additional subject data
+ and calling the function again with the same compiled regular expres-
+ sion, this time setting the PCRE_DFA_RESTART option. You must pass the
same working space as before, because this is where details of the pre-
- vious partial match are stored. Here is an example using pcretest,
- using the \R escape sequence to set the PCRE_DFA_RESTART option (\D
- specifies the use of pcre_dfa_exec()):
+ vious partial match are stored. Here is an example using pcretest,
+ using the \R escape sequence to set the PCRE_DFA_RESTART option (\D
+ specifies the use of the DFA matching function):
re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
data> 23ja\P\D
@@ -6331,46 +7739,49 @@ MULTI-SEGMENT MATCHING WITH pcre_dfa_exec()
data> n05\R\D
0: n05
- The first call has "23ja" as the subject, and requests partial match-
- ing; the second call has "n05" as the subject for the continued
- (restarted) match. Notice that when the match is complete, only the
- last part is shown; PCRE does not retain the previously partially-
- matched string. It is up to the calling program to do that if it needs
+ The first call has "23ja" as the subject, and requests partial match-
+ ing; the second call has "n05" as the subject for the continued
+ (restarted) match. Notice that when the match is complete, only the
+ last part is shown; PCRE does not retain the previously partially-
+ matched string. It is up to the calling program to do that if it needs
to.
- You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
- PCRE_DFA_RESTART to continue partial matching over multiple segments.
- This facility can be used to pass very long subject strings to
- pcre_dfa_exec().
+ You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
+ PCRE_DFA_RESTART to continue partial matching over multiple segments.
+ This facility can be used to pass very long subject strings to the DFA
+ matching functions.
-MULTI-SEGMENT MATCHING WITH pcre_exec()
+MULTI-SEGMENT MATCHING WITH pcre_exec() OR pcre16_exec()
- From release 8.00, pcre_exec() can also be used to do multi-segment
- matching. Unlike pcre_dfa_exec(), it is not possible to restart the
- previous match with a new segment of data. Instead, new data must be
- added to the previous subject string, and the entire match re-run,
- starting from the point where the partial match occurred. Earlier data
- can be discarded. It is best to use PCRE_PARTIAL_HARD in this situa-
- tion, because it does not treat the end of a segment as the end of the
- subject when matching \z, \Z, \b, \B, and $. Consider an unanchored
- pattern that matches dates:
+ From release 8.00, the standard matching functions can also be used to
+ do multi-segment matching. Unlike the DFA functions, it is not possible
+ to restart the previous match with a new segment of data. Instead, new
+ data must be added to the previous subject string, and the entire match
+ re-run, starting from the point where the partial match occurred. Ear-
+ lier data can be discarded.
+
+ It is best to use PCRE_PARTIAL_HARD in this situation, because it does
+ not treat the end of a segment as the end of the subject when matching
+ \z, \Z, \b, \B, and $. Consider an unanchored pattern that matches
+ dates:
re> /\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d/
data> The date is 23ja\P\P
Partial match: 23ja
- At this stage, an application could discard the text preceding "23ja",
- add on text from the next segment, and call pcre_exec() again. Unlike
- pcre_dfa_exec(), the entire matching string must always be available,
- and the complete matching process occurs for each call, so more memory
- and more processing time is needed.
+ At this stage, an application could discard the text preceding "23ja",
+ add on text from the next segment, and call the matching function
+ again. Unlike the DFA matching functions, the entire matching string
+ must always be available, and the complete matching process occurs for
+ each call, so more memory and more processing time is needed.
- Note: If the pattern contains lookbehind assertions, or \K, or starts
- with \b or \B, the string that is returned for a partial match will
- include characters that precede the partially matched string itself,
- because these must be retained when adding on more characters for a
- subsequent matching attempt.
+ Note: If the pattern contains lookbehind assertions, or \K, or starts
+ with \b or \B, the string that is returned for a partial match includes
+ characters that precede the partially matched string itself, because
+ these must be retained when adding on more characters for a subsequent
+ matching attempt. However, in some cases you may need to retain even
+ earlier characters, as discussed in the next section.
ISSUES WITH MULTI-SEGMENT MATCHING
@@ -6384,23 +7795,40 @@ ISSUES WITH MULTI-SEGMENT MATCHING
option, but in practice when doing multi-segment matching you should be
using PCRE_PARTIAL_HARD, which includes the effect of PCRE_NOTEOL.
- 2. Lookbehind assertions at the start of a pattern are catered for in
- the offsets that are returned for a partial match. However, in theory,
- a lookbehind assertion later in the pattern could require even earlier
- characters to be inspected, and it might not have been reached when a
- partial match occurs. This is probably an extremely unlikely case; you
- could guard against it to a certain extent by always including extra
- characters at the start.
-
- 3. Matching a subject string that is split into multiple segments may
- not always produce exactly the same result as matching over one single
- long string, especially when PCRE_PARTIAL_SOFT is used. The section
- "Partial Matching and Word Boundaries" above describes an issue that
- arises if the pattern ends with \b or \B. Another kind of difference
- may occur when there are multiple matching possibilities, because (for
- PCRE_PARTIAL_SOFT) a partial match result is given only when there are
+ 2. Lookbehind assertions that have already been obeyed are catered for
+ in the offsets that are returned for a partial match. However a lookbe-
+ hind assertion later in the pattern could require even earlier charac-
+ ters to be inspected. You can handle this case by using the
+ PCRE_INFO_MAXLOOKBEHIND option of the pcre_fullinfo() or
+ pcre16_fullinfo() functions to obtain the length of the largest lookbe-
+ hind in the pattern. This length is given in characters, not bytes. If
+ you always retain at least that many characters before the partially
+ matched string, all should be well. (Of course, near the start of the
+ subject, fewer characters may be present; in that case all characters
+ should be retained.)
+
+ 3. Because a partial match must always contain at least one character,
+ what might be considered a partial match of an empty string actually
+ gives a "no match" result. For example:
+
+ re> /c(?<=abc)x/
+ data> ab\P
+ No match
+
+ If the next segment begins "cx", a match should be found, but this will
+ only happen if characters from the previous segment are retained. For
+ this reason, a "no match" result should be interpreted as "partial
+ match of an empty string" when the pattern contains lookbehinds.
+
+ 4. Matching a subject string that is split into multiple segments may
+ not always produce exactly the same result as matching over one single
+ long string, especially when PCRE_PARTIAL_SOFT is used. The section
+ "Partial Matching and Word Boundaries" above describes an issue that
+ arises if the pattern ends with \b or \B. Another kind of difference
+ may occur when there are multiple matching possibilities, because (for
+ PCRE_PARTIAL_SOFT) a partial match result is given only when there are
no completed matches. This means that as soon as the shortest match has
- been found, continuation to a new subject segment is no longer possi-
+ been found, continuation to a new subject segment is no longer possi-
ble. Consider again this pcretest example:
re> /dog(sbody)?/
@@ -6414,14 +7842,15 @@ ISSUES WITH MULTI-SEGMENT MATCHING
0: dogsbody
1: dog
- The first data line passes the string "dogsb" to pcre_exec(), setting
- the PCRE_PARTIAL_SOFT option. Although the string is a partial match
- for "dogsbody", the result is not PCRE_ERROR_PARTIAL, because the
- shorter string "dog" is a complete match. Similarly, when the subject
- is presented to pcre_dfa_exec() in several parts ("do" and "gsb" being
- the first two) the match stops when "dog" has been found, and it is not
- possible to continue. On the other hand, if "dogsbody" is presented as
- a single string, pcre_dfa_exec() finds both matches.
+ The first data line passes the string "dogsb" to a standard matching
+ function, setting the PCRE_PARTIAL_SOFT option. Although the string is
+ a partial match for "dogsbody", the result is not PCRE_ERROR_PARTIAL,
+ because the shorter string "dog" is a complete match. Similarly, when
+ the subject is presented to a DFA matching function in several parts
+ ("do" and "gsb" being the first two) the match stops when "dog" has
+ been found, and it is not possible to continue. On the other hand, if
+ "dogsbody" is presented as a single string, a DFA matching function
+ finds both matches.
Because of these problems, it is best to use PCRE_PARTIAL_HARD when
matching multi-segment data. The example above then behaves differ-
@@ -6435,28 +7864,27 @@ ISSUES WITH MULTI-SEGMENT MATCHING
data> gsb\R\P\P\D
Partial match: gsb
- 4. Patterns that contain alternatives at the top level which do not all
+ 5. Patterns that contain alternatives at the top level which do not all
start with the same pattern item may not work as expected when
- PCRE_DFA_RESTART is used with pcre_dfa_exec(). For example, consider
- this pattern:
+ PCRE_DFA_RESTART is used. For example, consider this pattern:
1234|3789
- If the first part of the subject is "ABC123", a partial match of the
- first alternative is found at offset 3. There is no partial match for
+ If the first part of the subject is "ABC123", a partial match of the
+ first alternative is found at offset 3. There is no partial match for
the second alternative, because such a match does not start at the same
- point in the subject string. Attempting to continue with the string
- "7890" does not yield a match because only those alternatives that
- match at one point in the subject are remembered. The problem arises
- because the start of the second alternative matches within the first
- alternative. There is no problem with anchored patterns or patterns
+ point in the subject string. Attempting to continue with the string
+ "7890" does not yield a match because only those alternatives that
+ match at one point in the subject are remembered. The problem arises
+ because the start of the second alternative matches within the first
+ alternative. There is no problem with anchored patterns or patterns
such as:
1234|ABCD
- where no string can be a partial match for both alternatives. This is
- not a problem if pcre_exec() is used, because the entire match has to
- be rerun each time:
+ where no string can be a partial match for both alternatives. This is
+ not a problem if a standard matching function is used, because the
+ entire match has to be rerun each time:
re> /1234|3789/
data> ABC123\P\P
@@ -6465,11 +7893,11 @@ ISSUES WITH MULTI-SEGMENT MATCHING
0: 3789
Of course, instead of using PCRE_DFA_RESTART, the same technique of re-
- running the entire match can also be used with pcre_dfa_exec(). Another
- possibility is to work with two buffers. If a partial match at offset n
- in the first buffer is followed by "no match" when PCRE_DFA_RESTART is
- used on the second buffer, you can then try a new match starting at
- offset n+1 in the first buffer.
+ running the entire match can also be used with the DFA matching func-
+ tions. Another possibility is to work with two buffers. If a partial
+ match at offset n in the first buffer is followed by "no match" when
+ PCRE_DFA_RESTART is used on the second buffer, you can then try a new
+ match starting at offset n+1 in the first buffer.
AUTHOR
@@ -6481,8 +7909,8 @@ AUTHOR
REVISION
- Last updated: 07 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 24 February 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -6500,26 +7928,32 @@ SAVING AND RE-USING PRECOMPILED PCRE PATTERNS
form instead of having to compile them every time the application is
run. If you are not using any private character tables (see the
pcre_maketables() documentation), this is relatively straightforward.
- If you are using private tables, it is a little bit more complicated.
+ If you are using private tables, it is a little bit more complicated.
+ However, if you are using the just-in-time optimization feature, it is
+ not possible to save and reload the JIT data.
If you save compiled patterns to a file, you can copy them to a differ-
- ent host and run them there. This works even if the new host has the
- opposite endianness to the one on which the patterns were compiled.
- There may be a small performance penalty, but it should be insignifi-
- cant. However, compiling regular expressions with one version of PCRE
- for use with a different version is not guaranteed to work and may
- cause crashes.
+ ent host and run them there. If the two hosts have different endianness
+ (byte order), you should run the pcre[16]_pattern_to_host_byte_order()
+ function on the new host before trying to match the pattern. The match-
+ ing functions return PCRE_ERROR_BADENDIANNESS if they detect a pattern
+ with the wrong endianness.
+
+ Compiling regular expressions with one version of PCRE for use with a
+ different version is not guaranteed to work and may cause crashes, and
+ saving and restoring a compiled pattern loses any JIT optimization
+ data.
SAVING A COMPILED PATTERN
- The value returned by pcre_compile() points to a single block of memory
- that holds the compiled pattern and associated data. You can find the
- length of this block in bytes by calling pcre_fullinfo() with an argu-
- ment of PCRE_INFO_SIZE. You can then save the data in any appropriate
- manner. Here is sample code that compiles a pattern and writes it to a
- file. It assumes that the variable fd refers to a file that is open for
- output:
+ The value returned by pcre[16]_compile() points to a single block of
+ memory that holds the compiled pattern and associated data. You can
+ find the length of this block in bytes by calling pcre[16]_fullinfo()
+ with an argument of PCRE_INFO_SIZE. You can then save the data in any
+ appropriate manner. Here is sample code for the 8-bit library that com-
+ piles a pattern and writes it to a file. It assumes that the variable
+ fd refers to a file that is open for output:
int erroroffset, rc, size;
char *error;
@@ -6549,45 +7983,49 @@ SAVING A COMPILED PATTERN
in the memory of some daemon process that passes them via sockets to
the processes that want them.
- If the pattern has been studied, it is also possible to save the study
- data in a similar way to the compiled pattern itself. When studying
- generates additional information, pcre_study() returns a pointer to a
- pcre_extra data block. Its format is defined in the section on matching
- a pattern in the pcreapi documentation. The study_data field points to
- the binary study data, and this is what you must save (not the
- pcre_extra block itself). The length of the study data can be obtained
- by calling pcre_fullinfo() with an argument of PCRE_INFO_STUDYSIZE.
- Remember to check that pcre_study() did return a non-NULL value before
- trying to save the study data.
+ If the pattern has been studied, it is also possible to save the normal
+ study data in a similar way to the compiled pattern itself. However, if
+ the PCRE_STUDY_JIT_COMPILE was used, the just-in-time data that is cre-
+ ated cannot be saved because it is too dependent on the current envi-
+ ronment. When studying generates additional information,
+ pcre[16]_study() returns a pointer to a pcre[16]_extra data block. Its
+ format is defined in the section on matching a pattern in the pcreapi
+ documentation. The study_data field points to the binary study data,
+ and this is what you must save (not the pcre[16]_extra block itself).
+ The length of the study data can be obtained by calling
+ pcre[16]_fullinfo() with an argument of PCRE_INFO_STUDYSIZE. Remember
+ to check that pcre[16]_study() did return a non-NULL value before try-
+ ing to save the study data.
RE-USING A PRECOMPILED PATTERN
- Re-using a precompiled pattern is straightforward. Having reloaded it
- into main memory, you pass its pointer to pcre_exec() or
- pcre_dfa_exec() in the usual way. This should work even on another
- host, and even if that host has the opposite endianness to the one
- where the pattern was compiled.
+ Re-using a precompiled pattern is straightforward. Having reloaded it
+ into main memory, called pcre[16]_pattern_to_host_byte_order() if nec-
+ essary, you pass its pointer to pcre[16]_exec() or pcre[16]_dfa_exec()
+ in the usual way.
However, if you passed a pointer to custom character tables when the
- pattern was compiled (the tableptr argument of pcre_compile()), you
- must now pass a similar pointer to pcre_exec() or pcre_dfa_exec(),
- because the value saved with the compiled pattern will obviously be
- nonsense. A field in a pcre_extra() block is used to pass this data, as
- described in the section on matching a pattern in the pcreapi documen-
- tation.
+ pattern was compiled (the tableptr argument of pcre[16]_compile()), you
+ must now pass a similar pointer to pcre[16]_exec() or
+ pcre[16]_dfa_exec(), because the value saved with the compiled pattern
+ will obviously be nonsense. A field in a pcre[16]_extra() block is used
+ to pass this data, as described in the section on matching a pattern in
+ the pcreapi documentation.
If you did not provide custom character tables when the pattern was
- compiled, the pointer in the compiled pattern is NULL, which causes
- pcre_exec() to use PCRE's internal tables. Thus, you do not need to
- take any special action at run time in this case.
+ compiled, the pointer in the compiled pattern is NULL, which causes the
+ matching functions to use PCRE's internal tables. Thus, you do not need
+ to take any special action at run time in this case.
If you saved study data with the compiled pattern, you need to create
- your own pcre_extra data block and set the study_data field to point to
- the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA
- bit in the flags field to indicate that study data is present. Then
- pass the pcre_extra block to pcre_exec() or pcre_dfa_exec() in the
- usual way.
+ your own pcre[16]_extra data block and set the study_data field to
+ point to the reloaded study data. You must also set the
+ PCRE_EXTRA_STUDY_DATA bit in the flags field to indicate that study
+ data is present. Then pass the pcre[16]_extra block to the matching
+ function in the usual way. If the pattern was studied for just-in-time
+ optimization, that data cannot be saved, and so is lost by a
+ save/restore cycle.
COMPATIBILITY WITH DIFFERENT PCRE RELEASES
@@ -6606,8 +8044,8 @@ AUTHOR
REVISION
- Last updated: 17 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 10 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -6627,12 +8065,12 @@ PCRE PERFORMANCE
COMPILED PATTERN MEMORY USAGE
- Patterns are compiled by PCRE into a reasonably efficient byte code, so
- that most simple patterns do not use much memory. However, there is one
- case where the memory usage of a compiled pattern can be unexpectedly
- large. If a parenthesized subpattern has a quantifier with a minimum
- greater than 1 and/or a limited maximum, the whole subpattern is
- repeated in the compiled code. For example, the pattern
+ Patterns are compiled by PCRE into a reasonably efficient interpretive
+ code, so that most simple patterns do not use much memory. However,
+ there is one case where the memory usage of a compiled pattern can be
+ unexpectedly large. If a parenthesized subpattern has a quantifier with
+ a minimum greater than 1 and/or a limited maximum, the whole subpattern
+ is repeated in the compiled code. For example, the pattern
(abc|def){2,4}
@@ -6650,64 +8088,66 @@ COMPILED PATTERN MEMORY USAGE
((ab){1,1000}c){1,3}
- uses 51K bytes when compiled. When PCRE is compiled with its default
- internal pointer size of two bytes, the size limit on a compiled pat-
- tern is 64K, and this is reached with the above pattern if the outer
- repetition is increased from 3 to 4. PCRE can be compiled to use larger
- internal pointers and thus handle larger compiled patterns, but it is
- better to try to rewrite your pattern to use less memory if you can.
+ uses 51K bytes when compiled using the 8-bit library. When PCRE is com-
+ piled with its default internal pointer size of two bytes, the size
+ limit on a compiled pattern is 64K data units, and this is reached with
+ the above pattern if the outer repetition is increased from 3 to 4.
+ PCRE can be compiled to use larger internal pointers and thus handle
+ larger compiled patterns, but it is better to try to rewrite your pat-
+ tern to use less memory if you can.
- One way of reducing the memory usage for such patterns is to make use
+ One way of reducing the memory usage for such patterns is to make use
of PCRE's "subroutine" facility. Re-writing the above pattern as
((ab)(?2){0,999}c)(?1){0,2}
reduces the memory requirements to 18K, and indeed it remains under 20K
- even with the outer repetition increased to 100. However, this pattern
- is not exactly equivalent, because the "subroutine" calls are treated
- as atomic groups into which there can be no backtracking if there is a
- subsequent matching failure. Therefore, PCRE cannot do this kind of
- rewriting automatically. Furthermore, there is a noticeable loss of
- speed when executing the modified pattern. Nevertheless, if the atomic
- grouping is not a problem and the loss of speed is acceptable, this
- kind of rewriting will allow you to process patterns that PCRE cannot
+ even with the outer repetition increased to 100. However, this pattern
+ is not exactly equivalent, because the "subroutine" calls are treated
+ as atomic groups into which there can be no backtracking if there is a
+ subsequent matching failure. Therefore, PCRE cannot do this kind of
+ rewriting automatically. Furthermore, there is a noticeable loss of
+ speed when executing the modified pattern. Nevertheless, if the atomic
+ grouping is not a problem and the loss of speed is acceptable, this
+ kind of rewriting will allow you to process patterns that PCRE cannot
otherwise handle.
STACK USAGE AT RUN TIME
- When pcre_exec() is used for matching, certain kinds of pattern can
- cause it to use large amounts of the process stack. In some environ-
- ments the default process stack is quite small, and if it runs out the
- result is often SIGSEGV. This issue is probably the most frequently
- raised problem with PCRE. Rewriting your pattern can often help. The
- pcrestack documentation discusses this issue in detail.
+ When pcre_exec() or pcre16_exec() is used for matching, certain kinds
+ of pattern can cause it to use large amounts of the process stack. In
+ some environments the default process stack is quite small, and if it
+ runs out the result is often SIGSEGV. This issue is probably the most
+ frequently raised problem with PCRE. Rewriting your pattern can often
+ help. The pcrestack documentation discusses this issue in detail.
PROCESSING TIME
- Certain items in regular expression patterns are processed more effi-
+ Certain items in regular expression patterns are processed more effi-
ciently than others. It is more efficient to use a character class like
- [aeiou] than a set of single-character alternatives such as
- (a|e|i|o|u). In general, the simplest construction that provides the
+ [aeiou] than a set of single-character alternatives such as
+ (a|e|i|o|u). In general, the simplest construction that provides the
required behaviour is usually the most efficient. Jeffrey Friedl's book
- contains a lot of useful general discussion about optimizing regular
- expressions for efficient performance. This document contains a few
+ contains a lot of useful general discussion about optimizing regular
+ expressions for efficient performance. This document contains a few
observations about PCRE.
- Using Unicode character properties (the \p, \P, and \X escapes) is
- slow, because PCRE has to scan a structure that contains data for over
- fifteen thousand characters whenever it needs a character's property.
- If you can find an alternative pattern that does not use character
+ Using Unicode character properties (the \p, \P, and \X escapes) is
+ slow, because PCRE has to scan a structure that contains data for over
+ fifteen thousand characters whenever it needs a character's property.
+ If you can find an alternative pattern that does not use character
properties, it will probably be faster.
- By default, the escape sequences \b, \d, \s, and \w, and the POSIX
- character classes such as [:alpha:] do not use Unicode properties,
+ By default, the escape sequences \b, \d, \s, and \w, and the POSIX
+ character classes such as [:alpha:] do not use Unicode properties,
partly for backwards compatibility, and partly for performance reasons.
- However, you can set PCRE_UCP if you want Unicode character properties
- to be used. This can double the matching time for items such as \d,
- when matched with pcre_exec(); the performance loss is less with
- pcre_dfa_exec(), and in both cases there is not much difference for \b.
+ However, you can set PCRE_UCP if you want Unicode character properties
+ to be used. This can double the matching time for items such as \d,
+ when matched with a traditional matching function; the performance loss
+ is less with a DFA matching function, and in both cases there is not
+ much difference for \b.
When a pattern begins with .* not in parentheses, or in parentheses
that are not the subject of a backreference, and the PCRE_DOTALL option
@@ -6774,8 +8214,8 @@ AUTHOR
REVISION
- Last updated: 16 May 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 09 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -6804,51 +8244,52 @@ SYNOPSIS OF POSIX API
DESCRIPTION
- This set of functions provides a POSIX-style API to the PCRE regular
- expression package. See the pcreapi documentation for a description of
- PCRE's native API, which contains much additional functionality.
+ This set of functions provides a POSIX-style API for the PCRE regular
+ expression 8-bit library. See the pcreapi documentation for a descrip-
+ tion of PCRE's native API, which contains much additional functional-
+ ity. There is no POSIX-style wrapper for PCRE's 16-bit library.
The functions described here are just wrapper functions that ultimately
call the PCRE native API. Their prototypes are defined in the
- pcreposix.h header file, and on Unix systems the library itself is
- called pcreposix.a, so can be accessed by adding -lpcreposix to the
- command for linking an application that uses them. Because the POSIX
+ pcreposix.h header file, and on Unix systems the library itself is
+ called pcreposix.a, so can be accessed by adding -lpcreposix to the
+ command for linking an application that uses them. Because the POSIX
functions call the native ones, it is also necessary to add -lpcre.
- I have implemented only those POSIX option bits that can be reasonably
- mapped to PCRE native options. In addition, the option REG_EXTENDED is
- defined with the value zero. This has no effect, but since programs
- that are written to the POSIX interface often use it, this makes it
- easier to slot in PCRE as a replacement library. Other POSIX options
+ I have implemented only those POSIX option bits that can be reasonably
+ mapped to PCRE native options. In addition, the option REG_EXTENDED is
+ defined with the value zero. This has no effect, but since programs
+ that are written to the POSIX interface often use it, this makes it
+ easier to slot in PCRE as a replacement library. Other POSIX options
are not even defined.
- There are also some other options that are not defined by POSIX. These
+ There are also some other options that are not defined by POSIX. These
have been added at the request of users who want to make use of certain
PCRE-specific features via the POSIX calling interface.
- When PCRE is called via these functions, it is only the API that is
- POSIX-like in style. The syntax and semantics of the regular expres-
- sions themselves are still those of Perl, subject to the setting of
- various PCRE options, as described below. "POSIX-like in style" means
- that the API approximates to the POSIX definition; it is not fully
- POSIX-compatible, and in multi-byte encoding domains it is probably
+ When PCRE is called via these functions, it is only the API that is
+ POSIX-like in style. The syntax and semantics of the regular expres-
+ sions themselves are still those of Perl, subject to the setting of
+ various PCRE options, as described below. "POSIX-like in style" means
+ that the API approximates to the POSIX definition; it is not fully
+ POSIX-compatible, and in multi-byte encoding domains it is probably
even less compatible.
- The header for these functions is supplied as pcreposix.h to avoid any
- potential clash with other POSIX libraries. It can, of course, be
+ The header for these functions is supplied as pcreposix.h to avoid any
+ potential clash with other POSIX libraries. It can, of course, be
renamed or aliased as regex.h, which is the "correct" name. It provides
- two structure types, regex_t for compiled internal forms, and reg-
- match_t for returning captured substrings. It also defines some con-
- stants whose names start with "REG_"; these are used for setting
+ two structure types, regex_t for compiled internal forms, and reg-
+ match_t for returning captured substrings. It also defines some con-
+ stants whose names start with "REG_"; these are used for setting
options and identifying error codes.
COMPILING A PATTERN
- The function regcomp() is called to compile a pattern into an internal
- form. The pattern is a C string terminated by a binary zero, and is
- passed in the argument pattern. The preg argument is a pointer to a
- regex_t structure that is used as a base for storing information about
+ The function regcomp() is called to compile a pattern into an internal
+ form. The pattern is a C string terminated by a binary zero, and is
+ passed in the argument pattern. The preg argument is a pointer to a
+ regex_t structure that is used as a base for storing information about
the compiled regular expression.
The argument cflags is either zero, or contains one or more of the bits
@@ -6862,58 +8303,58 @@ COMPILING A PATTERN
REG_ICASE
- The PCRE_CASELESS option is set when the regular expression is passed
+ The PCRE_CASELESS option is set when the regular expression is passed
for compilation to the native function.
REG_NEWLINE
- The PCRE_MULTILINE option is set when the regular expression is passed
- for compilation to the native function. Note that this does not mimic
- the defined POSIX behaviour for REG_NEWLINE (see the following sec-
+ The PCRE_MULTILINE option is set when the regular expression is passed
+ for compilation to the native function. Note that this does not mimic
+ the defined POSIX behaviour for REG_NEWLINE (see the following sec-
tion).
REG_NOSUB
- The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is
+ The PCRE_NO_AUTO_CAPTURE option is set when the regular expression is
passed for compilation to the native function. In addition, when a pat-
- tern that is compiled with this flag is passed to regexec() for match-
- ing, the nmatch and pmatch arguments are ignored, and no captured
+ tern that is compiled with this flag is passed to regexec() for match-
+ ing, the nmatch and pmatch arguments are ignored, and no captured
strings are returned.
REG_UCP
- The PCRE_UCP option is set when the regular expression is passed for
- compilation to the native function. This causes PCRE to use Unicode
- properties when matchine \d, \w, etc., instead of just recognizing
+ The PCRE_UCP option is set when the regular expression is passed for
+ compilation to the native function. This causes PCRE to use Unicode
+ properties when matchine \d, \w, etc., instead of just recognizing
ASCII values. Note that REG_UTF8 is not part of the POSIX standard.
REG_UNGREEDY
- The PCRE_UNGREEDY option is set when the regular expression is passed
- for compilation to the native function. Note that REG_UNGREEDY is not
+ The PCRE_UNGREEDY option is set when the regular expression is passed
+ for compilation to the native function. Note that REG_UNGREEDY is not
part of the POSIX standard.
REG_UTF8
- The PCRE_UTF8 option is set when the regular expression is passed for
- compilation to the native function. This causes the pattern itself and
- all data strings used for matching it to be treated as UTF-8 strings.
+ The PCRE_UTF8 option is set when the regular expression is passed for
+ compilation to the native function. This causes the pattern itself and
+ all data strings used for matching it to be treated as UTF-8 strings.
Note that REG_UTF8 is not part of the POSIX standard.
- In the absence of these flags, no options are passed to the native
- function. This means the the regex is compiled with PCRE default
- semantics. In particular, the way it handles newline characters in the
- subject string is the Perl way, not the POSIX way. Note that setting
- PCRE_MULTILINE has only some of the effects specified for REG_NEWLINE.
- It does not affect the way newlines are matched by . (they are not) or
+ In the absence of these flags, no options are passed to the native
+ function. This means the the regex is compiled with PCRE default
+ semantics. In particular, the way it handles newline characters in the
+ subject string is the Perl way, not the POSIX way. Note that setting
+ PCRE_MULTILINE has only some of the effects specified for REG_NEWLINE.
+ It does not affect the way newlines are matched by . (they are not) or
by a negative class such as [^a] (they are).
- The yield of regcomp() is zero on success, and non-zero otherwise. The
+ The yield of regcomp() is zero on success, and non-zero otherwise. The
preg structure is filled in on success, and one member of the structure
- is public: re_nsub contains the number of capturing subpatterns in the
+ is public: re_nsub contains the number of capturing subpatterns in the
regular expression. Various error codes are defined in the header file.
- NOTE: If the yield of regcomp() is non-zero, you must not attempt to
+ NOTE: If the yield of regcomp() is non-zero, you must not attempt to
use the contents of the preg structure. If, for example, you pass it to
regexec(), the result is undefined and your program is likely to crash.
@@ -6921,9 +8362,9 @@ COMPILING A PATTERN
MATCHING NEWLINE CHARACTERS
This area is not simple, because POSIX and Perl take different views of
- things. It is not possible to get PCRE to obey POSIX semantics, but
- then PCRE was never intended to be a POSIX engine. The following table
- lists the different possibilities for matching newline characters in
+ things. It is not possible to get PCRE to obey POSIX semantics, but
+ then PCRE was never intended to be a POSIX engine. The following table
+ lists the different possibilities for matching newline characters in
PCRE:
Default Change with
@@ -6945,19 +8386,19 @@ MATCHING NEWLINE CHARACTERS
^ matches \n in middle no REG_NEWLINE
PCRE's behaviour is the same as Perl's, except that there is no equiva-
- lent for PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is
+ lent for PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is
no way to stop newline from matching [^a].
- The default POSIX newline handling can be obtained by setting
- PCRE_DOTALL and PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE
+ The default POSIX newline handling can be obtained by setting
+ PCRE_DOTALL and PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE
behave exactly as for the REG_NEWLINE action.
MATCHING A PATTERN
- The function regexec() is called to match a compiled pattern preg
- against a given string, which is by default terminated by a zero byte
- (but see REG_STARTEND below), subject to the options in eflags. These
+ The function regexec() is called to match a compiled pattern preg
+ against a given string, which is by default terminated by a zero byte
+ (but see REG_STARTEND below), subject to the options in eflags. These
can be:
REG_NOTBOL
@@ -6979,17 +8420,17 @@ MATCHING A PATTERN
REG_STARTEND
- The string is considered to start at string + pmatch[0].rm_so and to
- have a terminating NUL located at string + pmatch[0].rm_eo (there need
- not actually be a NUL at that location), regardless of the value of
- nmatch. This is a BSD extension, compatible with but not specified by
- IEEE Standard 1003.2 (POSIX.2), and should be used with caution in
+ The string is considered to start at string + pmatch[0].rm_so and to
+ have a terminating NUL located at string + pmatch[0].rm_eo (there need
+ not actually be a NUL at that location), regardless of the value of
+ nmatch. This is a BSD extension, compatible with but not specified by
+ IEEE Standard 1003.2 (POSIX.2), and should be used with caution in
software intended to be portable to other systems. Note that a non-zero
rm_so does not imply REG_NOTBOL; REG_STARTEND affects only the location
of the string, not how it is matched.
- If the pattern was compiled with the REG_NOSUB flag, no data about any
- matched strings is returned. The nmatch and pmatch arguments of
+ If the pattern was compiled with the REG_NOSUB flag, no data about any
+ matched strings is returned. The nmatch and pmatch arguments of
regexec() are ignored.
If the value of nmatch is zero, or if the value pmatch is NULL, no data
@@ -6997,34 +8438,34 @@ MATCHING A PATTERN
Otherwise,the portion of the string that was matched, and also any cap-
tured substrings, are returned via the pmatch argument, which points to
- an array of nmatch structures of type regmatch_t, containing the mem-
- bers rm_so and rm_eo. These contain the offset to the first character
- of each substring and the offset to the first character after the end
- of each substring, respectively. The 0th element of the vector relates
- to the entire portion of string that was matched; subsequent elements
- relate to the capturing subpatterns of the regular expression. Unused
+ an array of nmatch structures of type regmatch_t, containing the mem-
+ bers rm_so and rm_eo. These contain the offset to the first character
+ of each substring and the offset to the first character after the end
+ of each substring, respectively. The 0th element of the vector relates
+ to the entire portion of string that was matched; subsequent elements
+ relate to the capturing subpatterns of the regular expression. Unused
entries in the array have both structure members set to -1.
- A successful match yields a zero return; various error codes are
- defined in the header file, of which REG_NOMATCH is the "expected"
+ A successful match yields a zero return; various error codes are
+ defined in the header file, of which REG_NOMATCH is the "expected"
failure code.
ERROR MESSAGES
The regerror() function maps a non-zero errorcode from either regcomp()
- or regexec() to a printable message. If preg is not NULL, the error
+ or regexec() to a printable message. If preg is not NULL, the error
should have arisen from the use of that structure. A message terminated
- by a binary zero is placed in errbuf. The length of the message,
- including the zero, is limited to errbuf_size. The yield of the func-
+ by a binary zero is placed in errbuf. The length of the message,
+ including the zero, is limited to errbuf_size. The yield of the func-
tion is the size of buffer needed to hold the whole message.
MEMORY USAGE
- Compiling a regular expression causes memory to be allocated and asso-
- ciated with the preg structure. The function regfree() frees all such
- memory, after which preg may no longer be used as a compiled expres-
+ Compiling a regular expression causes memory to be allocated and asso-
+ ciated with the preg structure. The function regfree() frees all such
+ memory, after which preg may no longer be used as a compiled expres-
sion.
@@ -7037,8 +8478,8 @@ AUTHOR
REVISION
- Last updated: 16 May 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 09 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
@@ -7059,13 +8500,14 @@ DESCRIPTION
The C++ wrapper for PCRE was provided by Google Inc. Some additional
functionality was added by Giuseppe Maxia. This brief man page was con-
structed from the notes in the pcrecpp.h file, which should be con-
- sulted for further details.
+ sulted for further details. Note that the C++ wrapper supports only the
+ original 8-bit PCRE library. There is no 16-bit support at present.
MATCHING INTERFACE
- The "FullMatch" operation checks that supplied text matches a supplied
- pattern exactly. If pointer arguments are supplied, it copies matched
+ The "FullMatch" operation checks that supplied text matches a supplied
+ pattern exactly. If pointer arguments are supplied, it copies matched
sub-strings that match sub-patterns into them.
Example: successful match
@@ -7079,10 +8521,10 @@ MATCHING INTERFACE
Example: creating a temporary RE object:
pcrecpp::RE("h.*o").FullMatch("hello");
- You can pass in a "const char*" or a "string" for "text". The examples
- below tend to use a const char*. You can, as in the different examples
- above, store the RE object explicitly in a variable or use a temporary
- RE object. The examples below use one mode or the other arbitrarily.
+ You can pass in a "const char*" or a "string" for "text". The examples
+ below tend to use a const char*. You can, as in the different examples
+ above, store the RE object explicitly in a variable or use a temporary
+ RE object. The examples below use one mode or the other arbitrarily.
Either could correctly be used for any of these examples.
You must supply extra pointer arguments to extract matched subpieces.
@@ -7108,7 +8550,7 @@ MATCHING INTERFACE
Example: fails because string cannot be stored in integer
!pcrecpp::RE("(.*)").FullMatch("ruby", &i);
- The provided pointer arguments can be pointers to any scalar numeric
+ The provided pointer arguments can be pointers to any scalar numeric
type, or one of:
string (matched piece is copied to string)
@@ -7116,7 +8558,7 @@ MATCHING INTERFACE
T (where "bool T::ParseFrom(const char*, int)" exists)
NULL (the corresponding matched sub-pattern is not copied)
- The function returns true iff all of the following conditions are sat-
+ The function returns true iff all of the following conditions are sat-
isfied:
a. "text" matches "pattern" exactly;
@@ -7131,41 +8573,41 @@ MATCHING INTERFACE
number of sub-patterns, "i"th captured sub-pattern is
ignored.
- CAVEAT: An optional sub-pattern that does not exist in the matched
- string is assigned the empty string. Therefore, the following will
+ CAVEAT: An optional sub-pattern that does not exist in the matched
+ string is assigned the empty string. Therefore, the following will
return false (because the empty string is not a valid number):
int number;
pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
- The matching interface supports at most 16 arguments per call. If you
- need more, consider using the more general interface
+ The matching interface supports at most 16 arguments per call. If you
+ need more, consider using the more general interface
pcrecpp::RE::DoMatch. See pcrecpp.h for the signature for DoMatch.
- NOTE: Do not use no_arg, which is used internally to mark the end of a
- list of optional arguments, as a placeholder for missing arguments, as
+ NOTE: Do not use no_arg, which is used internally to mark the end of a
+ list of optional arguments, as a placeholder for missing arguments, as
this can lead to segfaults.
QUOTING METACHARACTERS
- You can use the "QuoteMeta" operation to insert backslashes before all
- potentially meaningful characters in a string. The returned string,
+ You can use the "QuoteMeta" operation to insert backslashes before all
+ potentially meaningful characters in a string. The returned string,
used as a regular expression, will exactly match the original string.
Example:
string quoted = RE::QuoteMeta(unquoted);
- Note that it's legal to escape a character even if it has no special
- meaning in a regular expression -- so this function does that. (This
- also makes it identical to the perl function of the same name; see
- "perldoc -f quotemeta".) For example, "1.5-2.0?" becomes
+ Note that it's legal to escape a character even if it has no special
+ meaning in a regular expression -- so this function does that. (This
+ also makes it identical to the perl function of the same name; see
+ "perldoc -f quotemeta".) For example, "1.5-2.0?" becomes
"1\.5\-2\.0\?".
PARTIAL MATCHES
- You can use the "PartialMatch" operation when you want the pattern to
+ You can use the "PartialMatch" operation when you want the pattern to
match any substring of the text.
Example: simple search for a string:
@@ -7180,13 +8622,13 @@ PARTIAL MATCHES
UTF-8 AND THE MATCHING INTERFACE
- By default, pattern and text are plain text, one byte per character.
- The UTF8 flag, passed to the constructor, causes both pattern and
+ By default, pattern and text are plain text, one byte per character.
+ The UTF8 flag, passed to the constructor, causes both pattern and
string to be treated as UTF-8 text, still a byte stream but potentially
- multiple bytes per character. In practice, the text is likelier to be
- UTF-8 than the pattern, but the match returned may depend on the UTF8
- flag, so always use it when matching UTF8 text. For example, "." will
- match one byte normally but with UTF8 set may match up to three bytes
+ multiple bytes per character. In practice, the text is likelier to be
+ UTF-8 than the pattern, but the match returned may depend on the UTF8
+ flag, so always use it when matching UTF8 text. For example, "." will
+ match one byte normally but with UTF8 set may match up to three bytes
of a multi-byte character.
Example:
@@ -7205,9 +8647,9 @@ UTF-8 AND THE MATCHING INTERFACE
PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
- PCRE defines some modifiers to change the behavior of the regular
- expression engine. The C++ wrapper defines an auxiliary class,
- RE_Options, as a vehicle to pass such modifiers to a RE class. Cur-
+ PCRE defines some modifiers to change the behavior of the regular
+ expression engine. The C++ wrapper defines an auxiliary class,
+ RE_Options, as a vehicle to pass such modifiers to a RE class. Cur-
rently, the following modifiers are supported:
modifier description Perl corresponding
@@ -7217,20 +8659,20 @@ PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
PCRE_DOTALL dot matches newlines /s
PCRE_DOLLAR_ENDONLY $ matches only at end N/A
PCRE_EXTRA strict escape parsing N/A
- PCRE_EXTENDED ignore whitespaces /x
+ PCRE_EXTENDED ignore white spaces /x
PCRE_UTF8 handles UTF8 chars built-in
PCRE_UNGREEDY reverses * and *? N/A
PCRE_NO_AUTO_CAPTURE disables capturing parens N/A (*)
- (*) Both Perl and PCRE allow non capturing parentheses by means of the
- "?:" modifier within the pattern itself. e.g. (?:ab|cd) does not cap-
+ (*) Both Perl and PCRE allow non capturing parentheses by means of the
+ "?:" modifier within the pattern itself. e.g. (?:ab|cd) does not cap-
ture, while (ab|cd) does.
- For a full account on how each modifier works, please check the PCRE
+ For a full account on how each modifier works, please check the PCRE
API reference page.
- For each modifier, there are two member functions whose name is made
- out of the modifier in lowercase, without the "PCRE_" prefix. For
+ For each modifier, there are two member functions whose name is made
+ out of the modifier in lowercase, without the "PCRE_" prefix. For
instance, PCRE_CASELESS is handled by
bool caseless()
@@ -7240,28 +8682,28 @@ PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
RE_Options & set_caseless(bool)
which sets or unsets the modifier. Moreover, PCRE_EXTRA_MATCH_LIMIT can
- be accessed through the set_match_limit() and match_limit() member
- functions. Setting match_limit to a non-zero value will limit the exe-
- cution of pcre to keep it from doing bad things like blowing the stack
- or taking an eternity to return a result. A value of 5000 is good
- enough to stop stack blowup in a 2MB thread stack. Setting match_limit
- to zero disables match limiting. Alternatively, you can call
- match_limit_recursion() which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to
- limit how much PCRE recurses. match_limit() limits the number of
+ be accessed through the set_match_limit() and match_limit() member
+ functions. Setting match_limit to a non-zero value will limit the exe-
+ cution of pcre to keep it from doing bad things like blowing the stack
+ or taking an eternity to return a result. A value of 5000 is good
+ enough to stop stack blowup in a 2MB thread stack. Setting match_limit
+ to zero disables match limiting. Alternatively, you can call
+ match_limit_recursion() which uses PCRE_EXTRA_MATCH_LIMIT_RECURSION to
+ limit how much PCRE recurses. match_limit() limits the number of
matches PCRE does; match_limit_recursion() limits the depth of internal
recursion, and therefore the amount of stack that is used.
- Normally, to pass one or more modifiers to a RE class, you declare a
+ Normally, to pass one or more modifiers to a RE class, you declare a
RE_Options object, set the appropriate options, and pass this object to
a RE constructor. Example:
- RE_options opt;
+ RE_Options opt;
opt.set_caseless(true);
if (RE("HELLO", opt).PartialMatch("hello world")) ...
RE_options has two constructors. The default constructor takes no argu-
- ments and creates a set of flags that are off by default. The optional
- parameter option_flags is to facilitate transfer of legacy code from C
+ ments and creates a set of flags that are off by default. The optional
+ parameter option_flags is to facilitate transfer of legacy code from C
programs. This lets you do
RE(pattern,
@@ -7275,15 +8717,15 @@ PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
If you are going to pass one of the most used modifiers, there are some
convenience functions that return a RE_Options class with the appropri-
- ate modifier already set: CASELESS(), UTF8(), MULTILINE(), DOTALL(),
+ ate modifier already set: CASELESS(), UTF8(), MULTILINE(), DOTALL(),
and EXTENDED().
- If you need to set several options at once, and you don't want to go
- through the pains of declaring a RE_Options object and setting several
- options, there is a parallel method that give you such ability on the
- fly. You can concatenate several set_xxxxx() member functions, since
- each of them returns a reference to its class object. For example, to
- pass PCRE_CASELESS, PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one
+ If you need to set several options at once, and you don't want to go
+ through the pains of declaring a RE_Options object and setting several
+ options, there is a parallel method that give you such ability on the
+ fly. You can concatenate several set_xxxxx() member functions, since
+ each of them returns a reference to its class object. For example, to
+ pass PCRE_CASELESS, PCRE_EXTENDED, and PCRE_MULTILINE to a RE with one
statement, you may write:
RE(" ^ xyz \\s+ .* blah$",
@@ -7295,10 +8737,10 @@ PASSING MODIFIERS TO THE REGULAR EXPRESSION ENGINE
SCANNING TEXT INCREMENTALLY
- The "Consume" operation may be useful if you want to repeatedly match
+ The "Consume" operation may be useful if you want to repeatedly match
regular expressions at the front of a string and skip over them as they
- match. This requires use of the "StringPiece" type, which represents a
- sub-range of a real string. Like RE, StringPiece is defined in the
+ match. This requires use of the "StringPiece" type, which represents a
+ sub-range of a real string. Like RE, StringPiece is defined in the
pcrecpp namespace.
Example: read lines of the form "var = value" from a string.
@@ -7312,11 +8754,11 @@ SCANNING TEXT INCREMENTALLY
...;
}
- Each successful call to "Consume" will set "var/value", and also
+ Each successful call to "Consume" will set "var/value", and also
advance "input" so it points past the matched text.
- The "FindAndConsume" operation is similar to "Consume" but does not
- anchor your match at the beginning of the string. For example, you
+ The "FindAndConsume" operation is similar to "Consume" but does not
+ anchor your match at the beginning of the string. For example, you
could extract all words from a string by repeatedly calling
pcrecpp::RE("(\\w+)").FindAndConsume(&input, &word)
@@ -7325,10 +8767,10 @@ SCANNING TEXT INCREMENTALLY
PARSING HEX/OCTAL/C-RADIX NUMBERS
By default, if you pass a pointer to a numeric value, the corresponding
- text is interpreted as a base-10 number. You can instead wrap the
+ text is interpreted as a base-10 number. You can instead wrap the
pointer with a call to one of the operators Hex(), Octal(), or CRadix()
- to interpret the text in another base. The CRadix operator interprets
- C-style "0" (base-8) and "0x" (base-16) prefixes, but defaults to
+ to interpret the text in another base. The CRadix operator interprets
+ C-style "0" (base-8) and "0x" (base-16) prefixes, but defaults to
base-10.
Example:
@@ -7343,30 +8785,30 @@ PARSING HEX/OCTAL/C-RADIX NUMBERS
REPLACING PARTS OF STRINGS
- You can replace the first match of "pattern" in "str" with "rewrite".
- Within "rewrite", backslash-escaped digits (\1 to \9) can be used to
- insert text matching corresponding parenthesized group from the pat-
+ You can replace the first match of "pattern" in "str" with "rewrite".
+ Within "rewrite", backslash-escaped digits (\1 to \9) can be used to
+ insert text matching corresponding parenthesized group from the pat-
tern. \0 in "rewrite" refers to the entire matching text. For example:
string s = "yabba dabba doo";
pcrecpp::RE("b+").Replace("d", &s);
- will leave "s" containing "yada dabba doo". The result is true if the
+ will leave "s" containing "yada dabba doo". The result is true if the
pattern matches and a replacement occurs, false otherwise.
- GlobalReplace is like Replace except that it replaces all occurrences
- of the pattern in the string with the rewrite. Replacements are not
+ GlobalReplace is like Replace except that it replaces all occurrences
+ of the pattern in the string with the rewrite. Replacements are not
subject to re-matching. For example:
string s = "yabba dabba doo";
pcrecpp::RE("b+").GlobalReplace("d", &s);
- will leave "s" containing "yada dada doo". It returns the number of
+ will leave "s" containing "yada dada doo". It returns the number of
replacements made.
- Extract is like Replace, except that if the pattern matches, "rewrite"
- is copied into "out" (an additional argument) with substitutions. The
- non-matching portions of "text" are ignored. Returns true iff a match
+ Extract is like Replace, except that if the pattern matches, "rewrite"
+ is copied into "out" (an additional argument) with substitutions. The
+ non-matching portions of "text" are ignored. Returns true iff a match
occurred and the extraction happened successfully; if no match occurs,
the string is left unaffected.
@@ -7379,7 +8821,7 @@ AUTHOR
REVISION
- Last updated: 17 March 2009
+ Last updated: 08 January 2012
------------------------------------------------------------------------------
@@ -7398,57 +8840,58 @@ PCRE SAMPLE PROGRAM
do not have a copy of the PCRE distribution, you can save this listing
to re-create pcredemo.c.
- The program compiles the regular expression that is its first argument,
- and matches it against the subject string in its second argument. No
- PCRE options are set, and default character tables are used. If match-
- ing succeeds, the program outputs the portion of the subject that
- matched, together with the contents of any captured substrings.
+ The demonstration program, which uses the original PCRE 8-bit library,
+ compiles the regular expression that is its first argument, and matches
+ it against the subject string in its second argument. No PCRE options
+ are set, and default character tables are used. If matching succeeds,
+ the program outputs the portion of the subject that matched, together
+ with the contents of any captured substrings.
If the -g option is given on the command line, the program then goes on
to check for further matches of the same regular expression in the same
- subject string. The logic is a little bit tricky because of the possi-
- bility of matching an empty string. Comments in the code explain what
+ subject string. The logic is a little bit tricky because of the possi-
+ bility of matching an empty string. Comments in the code explain what
is going on.
- If PCRE is installed in the standard include and library directories
+ If PCRE is installed in the standard include and library directories
for your operating system, you should be able to compile the demonstra-
tion program using this command:
gcc -o pcredemo pcredemo.c -lpcre
- If PCRE is installed elsewhere, you may need to add additional options
- to the command line. For example, on a Unix-like system that has PCRE
- installed in /usr/local, you can compile the demonstration program
+ If PCRE is installed elsewhere, you may need to add additional options
+ to the command line. For example, on a Unix-like system that has PCRE
+ installed in /usr/local, you can compile the demonstration program
using a command like this:
gcc -o pcredemo -I/usr/local/include pcredemo.c \
-L/usr/local/lib -lpcre
- In a Windows environment, if you want to statically link the program
+ In a Windows environment, if you want to statically link the program
against a non-dll pcre.a file, you must uncomment the line that defines
- PCRE_STATIC before including pcre.h, because otherwise the pcre_mal-
+ PCRE_STATIC before including pcre.h, because otherwise the pcre_mal-
loc() and pcre_free() exported functions will be declared
__declspec(dllimport), with unwanted results.
- Once you have compiled and linked the demonstration program, you can
+ Once you have compiled and linked the demonstration program, you can
run simple tests like this:
./pcredemo 'cat|dog' 'the cat sat on the mat'
./pcredemo -g 'cat|dog' 'the dog sat on the cat'
- Note that there is a much more comprehensive test program, called
- pcretest, which supports many more facilities for testing regular
- expressions and the PCRE library. The pcredemo program is provided as a
- simple coding example.
+ Note that there is a much more comprehensive test program, called
+ pcretest, which supports many more facilities for testing regular
+ expressions and both PCRE libraries. The pcredemo program is provided
+ as a simple coding example.
- If you try to run pcredemo when PCRE is not installed in the standard
- library directory, you may get an error like this on some operating
+ If you try to run pcredemo when PCRE is not installed in the standard
+ library directory, you may get an error like this on some operating
systems (e.g. Solaris):
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
+ ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
directory
- This is caused by the way shared library support works on those sys-
+ This is caused by the way shared library support works on those sys-
tems. You need to add
-R/usr/local/lib
@@ -7465,9 +8908,71 @@ AUTHOR
REVISION
- Last updated: 17 November 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 10 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
+PCRELIMITS(3) PCRELIMITS(3)
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+
+SIZE AND OTHER LIMITATIONS
+
+ There are some size limitations in PCRE but it is hoped that they will
+ never in practice be relevant.
+
+ The maximum length of a compiled pattern is approximately 64K data
+ units (bytes for the 8-bit library, 16-bit units for the 16-bit
+ library) if PCRE is compiled with the default internal linkage size of
+ 2 bytes. If you want to process regular expressions that are truly
+ enormous, you can compile PCRE with an internal linkage size of 3 or 4
+ (when building the 16-bit library, 3 is rounded up to 4). See the
+ README file in the source distribution and the pcrebuild documentation
+ for details. In these cases the limit is substantially larger. How-
+ ever, the speed of execution is slower.
+
+ All values in repeating quantifiers must be less than 65536.
+
+ There is no limit to the number of parenthesized subpatterns, but there
+ can be no more than 65535 capturing subpatterns.
+
+ There is a limit to the number of forward references to subsequent sub-
+ patterns of around 200,000. Repeated forward references with fixed
+ upper limits, for example, (?2){0,100} when subpattern number 2 is to
+ the right, are included in the count. There is no limit to the number
+ of backward references.
+
+ The maximum length of name for a named subpattern is 32 characters, and
+ the maximum number of named subpatterns is 10000.
+
+ The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or
+ (*THEN) verb is 255 for the 8-bit library and 65535 for the 16-bit
+ library.
+
+ The maximum length of a subject string is the largest positive number
+ that an integer variable can hold. However, when using the traditional
+ matching function, PCRE uses recursion to handle subpatterns and indef-
+ inite repetition. This means that the available stack space may limit
+ the size of a subject string that can be processed by certain patterns.
+ For a discussion of stack issues, see the pcrestack documentation.
+
+
+AUTHOR
+
+ Philip Hazel
+ University Computing Service
+ Cambridge CB2 3QH, England.
+
+
+REVISION
+
+ Last updated: 04 May 2012
+ Copyright (c) 1997-2012 University of Cambridge.
+------------------------------------------------------------------------------
+
+
PCRESTACK(3) PCRESTACK(3)
@@ -7477,12 +8982,14 @@ NAME
PCRE DISCUSSION OF STACK USAGE
- When you call pcre_exec(), it makes use of an internal function called
- match(). This calls itself recursively at branch points in the pattern,
- in order to remember the state of the match so that it can back up and
- try a different alternative if the first one fails. As matching pro-
- ceeds deeper and deeper into the tree of possibilities, the recursion
- depth increases.
+ When you call pcre[16]_exec(), it makes use of an internal function
+ called match(). This calls itself recursively at branch points in the
+ pattern, in order to remember the state of the match so that it can
+ back up and try a different alternative if the first one fails. As
+ matching proceeds deeper and deeper into the tree of possibilities, the
+ recursion depth increases. The match() function is also called in other
+ circumstances, for example, whenever a parenthesized sub-pattern is
+ entered, and in certain cases of repetition.
Not all calls of match() increase the recursion depth; for an item such
as a* it may be called several times at the same level, after matching
@@ -7491,20 +8998,28 @@ PCRE DISCUSSION OF STACK USAGE
result of the current call (a "tail recursion"), the function is just
restarted instead.
- The pcre_dfa_exec() function operates in an entirely different way, and
- uses recursion only when there is a regular expression recursion or
+ The above comments apply when pcre[16]_exec() is run in its normal
+ interpretive manner. If the pattern was studied with the
+ PCRE_STUDY_JIT_COMPILE option, and just-in-time compiling was success-
+ ful, and the options passed to pcre[16]_exec() were not incompatible,
+ the matching process uses the JIT-compiled code instead of the match()
+ function. In this case, the memory requirements are handled entirely
+ differently. See the pcrejit documentation for details.
+
+ The pcre[16]_dfa_exec() function operates in an entirely different way,
+ and uses recursion only when there is a regular expression recursion or
subroutine call in the pattern. This includes the processing of asser-
tion and "once-only" subpatterns, which are handled like subroutine
calls. Normally, these are never very deep, and the limit on the com-
- plexity of pcre_dfa_exec() is controlled by the amount of workspace it
- is given. However, it is possible to write patterns with runaway infi-
- nite recursions; such patterns will cause pcre_dfa_exec() to run out of
- stack. At present, there is no protection against this.
+ plexity of pcre[16]_dfa_exec() is controlled by the amount of workspace
+ it is given. However, it is possible to write patterns with runaway
+ infinite recursions; such patterns will cause pcre[16]_dfa_exec() to
+ run out of stack. At present, there is no protection against this.
- The comments that follow do NOT apply to pcre_dfa_exec(); they are rel-
- evant only for pcre_exec().
+ The comments that follow do NOT apply to pcre[16]_dfa_exec(); they are
+ relevant only for pcre[16]_exec() without the JIT optimization.
- Reducing pcre_exec()'s stack usage
+ Reducing pcre[16]_exec()'s stack usage
Each time that match() is actually called recursively, it uses memory
from the process stack. For certain kinds of pattern and data, very
@@ -7537,31 +9052,31 @@ PCRE DISCUSSION OF STACK USAGE
ing long subject strings is to write repeated parenthesized subpatterns
to match more than one character whenever possible.
- Compiling PCRE to use heap instead of stack for pcre_exec()
+ Compiling PCRE to use heap instead of stack for pcre[16]_exec()
In environments where stack memory is constrained, you might want to
compile PCRE to use heap memory instead of stack for remembering back-
- up points when pcre_exec() is running. This makes it run a lot more
+ up points when pcre[16]_exec() is running. This makes it run a lot more
slowly, however. Details of how to do this are given in the pcrebuild
documentation. When built in this way, instead of using the stack, PCRE
obtains and frees memory by calling the functions that are pointed to
- by the pcre_stack_malloc and pcre_stack_free variables. By default,
- these point to malloc() and free(), but you can replace the pointers to
- cause PCRE to use your own functions. Since the block sizes are always
- the same, and are always freed in reverse order, it may be possible to
- implement customized memory handlers that are more efficient than the
- standard functions.
+ by the pcre[16]_stack_malloc and pcre[16]_stack_free variables. By
+ default, these point to malloc() and free(), but you can replace the
+ pointers to cause PCRE to use your own functions. Since the block sizes
+ are always the same, and are always freed in reverse order, it may be
+ possible to implement customized memory handlers that are more effi-
+ cient than the standard functions.
- Limiting pcre_exec()'s stack usage
+ Limiting pcre[16]_exec()'s stack usage
You can set limits on the number of times that match() is called, both
- in total and recursively. If a limit is exceeded, pcre_exec() returns
- an error code. Setting suitable limits should prevent it from running
- out of stack. The default values of the limits are very large, and
- unlikely ever to operate. They can be changed when PCRE is built, and
- they can also be set when pcre_exec() is called. For details of these
- interfaces, see the pcrebuild documentation and the section on extra
- data for pcre_exec() in the pcreapi documentation.
+ in total and recursively. If a limit is exceeded, pcre[16]_exec()
+ returns an error code. Setting suitable limits should prevent it from
+ running out of stack. The default values of the limits are very large,
+ and unlikely ever to operate. They can be changed when PCRE is built,
+ and they can also be set when pcre[16]_exec() is called. For details of
+ these interfaces, see the pcrebuild documentation and the section on
+ extra data for pcre[16]_exec() in the pcreapi documentation.
As a very rough rule of thumb, you should reckon on about 500 bytes per
recursion. Thus, if you want to limit your stack usage to 8Mb, you
@@ -7572,9 +9087,33 @@ PCRE DISCUSSION OF STACK USAGE
option (-S) that can be used to increase the size of its stack. As long
as the stack is large enough, another option (-M) can be used to find
the smallest limits that allow a particular pattern to match a given
- subject string. This is done by calling pcre_exec() repeatedly with
+ subject string. This is done by calling pcre[16]_exec() repeatedly with
different limits.
+ Obtaining an estimate of stack usage
+
+ The actual amount of stack used per recursion can vary quite a lot,
+ depending on the compiler that was used to build PCRE and the optimiza-
+ tion or debugging options that were set for it. The rule of thumb value
+ of 500 bytes mentioned above may be larger or smaller than what is
+ actually needed. A better approximation can be obtained by running this
+ command:
+
+ pcretest -m -C
+
+ The -C option causes pcretest to output information about the options
+ with which PCRE was compiled. When -m is also given (before -C), infor-
+ mation about stack use is given in a line like this:
+
+ Match recursion uses stack: approximate frame size = 640 bytes
+
+ The value is approximate because some recursions need a bit more (up to
+ perhaps 16 more bytes).
+
+ If the above command is given when PCRE is compiled to use the heap
+ instead of the stack for recursion, the value that is output is the
+ size of each block that is obtained from the heap.
+
Changing stack size in Unix-like systems
In Unix-like environments, there is not often a problem with the stack
@@ -7595,7 +9134,7 @@ PCRE DISCUSSION OF STACK USAGE
This reads the current limits (soft and hard) using getrlimit(), then
attempts to increase the soft limit to 100Mb using setrlimit(). You
- must do this before calling pcre_exec().
+ must do this before calling pcre[16]_exec().
Changing stack size in Mac OS X
@@ -7614,8 +9153,8 @@ AUTHOR
REVISION
- Last updated: 03 January 2010
- Copyright (c) 1997-2010 University of Cambridge.
+ Last updated: 21 January 2012
+ Copyright (c) 1997-2012 University of Cambridge.
------------------------------------------------------------------------------
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index 21c467372..b71ead37a 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, to be #included by
applications that call the PCRE functions.
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
-#define PCRE_MINOR 12
+#define PCRE_MINOR 31
#define PCRE_PRERELEASE
-#define PCRE_DATE 2011-01-15
+#define PCRE_DATE 2012-07-06
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
@@ -98,28 +98,37 @@ extern "C" {
/* Options. Some are compile-time only, some are run-time only, and some are
both, so we keep them all distinct. However, almost all the bits in the options
word are now used. In the long run, we may have to re-use some of the
-compile-time only bits for runtime options, or vice versa. */
+compile-time only bits for runtime options, or vice versa. In the comments
+below, "compile", "exec", and "DFA exec" mean that the option is permitted to
+be set for those functions; "used in" means that an option may be set only for
+compile, but is subsequently referenced in exec and/or DFA exec. Any of the
+compile-time options may be inspected during studying (and therefore JIT
+compiling). */
#define PCRE_CASELESS 0x00000001 /* Compile */
#define PCRE_MULTILINE 0x00000002 /* Compile */
#define PCRE_DOTALL 0x00000004 /* Compile */
#define PCRE_EXTENDED 0x00000008 /* Compile */
#define PCRE_ANCHORED 0x00000010 /* Compile, exec, DFA exec */
-#define PCRE_DOLLAR_ENDONLY 0x00000020 /* Compile */
+#define PCRE_DOLLAR_ENDONLY 0x00000020 /* Compile, used in exec, DFA exec */
#define PCRE_EXTRA 0x00000040 /* Compile */
#define PCRE_NOTBOL 0x00000080 /* Exec, DFA exec */
#define PCRE_NOTEOL 0x00000100 /* Exec, DFA exec */
#define PCRE_UNGREEDY 0x00000200 /* Compile */
#define PCRE_NOTEMPTY 0x00000400 /* Exec, DFA exec */
-#define PCRE_UTF8 0x00000800 /* Compile */
+/* The next two are also used in exec and DFA exec */
+#define PCRE_UTF8 0x00000800 /* Compile (same as PCRE_UTF16) */
+#define PCRE_UTF16 0x00000800 /* Compile (same as PCRE_UTF8) */
#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* Compile */
-#define PCRE_NO_UTF8_CHECK 0x00002000 /* Compile, exec, DFA exec */
+/* The next two are also used in exec and DFA exec */
+#define PCRE_NO_UTF8_CHECK 0x00002000 /* Compile (same as PCRE_NO_UTF16_CHECK) */
+#define PCRE_NO_UTF16_CHECK 0x00002000 /* Compile (same as PCRE_NO_UTF8_CHECK) */
#define PCRE_AUTO_CALLOUT 0x00004000 /* Compile */
#define PCRE_PARTIAL_SOFT 0x00008000 /* Exec, DFA exec */
#define PCRE_PARTIAL 0x00008000 /* Backwards compatible synonym */
#define PCRE_DFA_SHORTEST 0x00010000 /* DFA exec */
#define PCRE_DFA_RESTART 0x00020000 /* DFA exec */
-#define PCRE_FIRSTLINE 0x00040000 /* Compile */
+#define PCRE_FIRSTLINE 0x00040000 /* Compile, used in exec, DFA exec */
#define PCRE_DUPNAMES 0x00080000 /* Compile */
#define PCRE_NEWLINE_CR 0x00100000 /* Compile, exec, DFA exec */
#define PCRE_NEWLINE_LF 0x00200000 /* Compile, exec, DFA exec */
@@ -128,41 +137,82 @@ compile-time only bits for runtime options, or vice versa. */
#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* Compile, exec, DFA exec */
#define PCRE_BSR_ANYCRLF 0x00800000 /* Compile, exec, DFA exec */
#define PCRE_BSR_UNICODE 0x01000000 /* Compile, exec, DFA exec */
-#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* Compile */
+#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* Compile, used in exec */
#define PCRE_NO_START_OPTIMIZE 0x04000000 /* Compile, exec, DFA exec */
#define PCRE_NO_START_OPTIMISE 0x04000000 /* Synonym */
#define PCRE_PARTIAL_HARD 0x08000000 /* Exec, DFA exec */
#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* Exec, DFA exec */
-#define PCRE_UCP 0x20000000 /* Compile */
+#define PCRE_UCP 0x20000000 /* Compile, used in exec, DFA exec */
/* Exec-time and get/set-time error codes */
-#define PCRE_ERROR_NOMATCH (-1)
-#define PCRE_ERROR_NULL (-2)
-#define PCRE_ERROR_BADOPTION (-3)
-#define PCRE_ERROR_BADMAGIC (-4)
-#define PCRE_ERROR_UNKNOWN_OPCODE (-5)
-#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
-#define PCRE_ERROR_NOMEMORY (-6)
-#define PCRE_ERROR_NOSUBSTRING (-7)
-#define PCRE_ERROR_MATCHLIMIT (-8)
-#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
-#define PCRE_ERROR_BADUTF8 (-10)
-#define PCRE_ERROR_BADUTF8_OFFSET (-11)
-#define PCRE_ERROR_PARTIAL (-12)
-#define PCRE_ERROR_BADPARTIAL (-13)
-#define PCRE_ERROR_INTERNAL (-14)
-#define PCRE_ERROR_BADCOUNT (-15)
-#define PCRE_ERROR_DFA_UITEM (-16)
-#define PCRE_ERROR_DFA_UCOND (-17)
-#define PCRE_ERROR_DFA_UMLIMIT (-18)
-#define PCRE_ERROR_DFA_WSSIZE (-19)
-#define PCRE_ERROR_DFA_RECURSE (-20)
-#define PCRE_ERROR_RECURSIONLIMIT (-21)
-#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
-#define PCRE_ERROR_BADNEWLINE (-23)
-#define PCRE_ERROR_BADOFFSET (-24)
-#define PCRE_ERROR_SHORTUTF8 (-25)
+#define PCRE_ERROR_NOMATCH (-1)
+#define PCRE_ERROR_NULL (-2)
+#define PCRE_ERROR_BADOPTION (-3)
+#define PCRE_ERROR_BADMAGIC (-4)
+#define PCRE_ERROR_UNKNOWN_OPCODE (-5)
+#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
+#define PCRE_ERROR_NOMEMORY (-6)
+#define PCRE_ERROR_NOSUBSTRING (-7)
+#define PCRE_ERROR_MATCHLIMIT (-8)
+#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
+#define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16 */
+#define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16 */
+#define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */
+#define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */
+#define PCRE_ERROR_PARTIAL (-12)
+#define PCRE_ERROR_BADPARTIAL (-13)
+#define PCRE_ERROR_INTERNAL (-14)
+#define PCRE_ERROR_BADCOUNT (-15)
+#define PCRE_ERROR_DFA_UITEM (-16)
+#define PCRE_ERROR_DFA_UCOND (-17)
+#define PCRE_ERROR_DFA_UMLIMIT (-18)
+#define PCRE_ERROR_DFA_WSSIZE (-19)
+#define PCRE_ERROR_DFA_RECURSE (-20)
+#define PCRE_ERROR_RECURSIONLIMIT (-21)
+#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
+#define PCRE_ERROR_BADNEWLINE (-23)
+#define PCRE_ERROR_BADOFFSET (-24)
+#define PCRE_ERROR_SHORTUTF8 (-25)
+#define PCRE_ERROR_SHORTUTF16 (-25) /* Same for 8/16 */
+#define PCRE_ERROR_RECURSELOOP (-26)
+#define PCRE_ERROR_JIT_STACKLIMIT (-27)
+#define PCRE_ERROR_BADMODE (-28)
+#define PCRE_ERROR_BADENDIANNESS (-29)
+#define PCRE_ERROR_DFA_BADRESTART (-30)
+
+/* Specific error codes for UTF-8 validity checks */
+
+#define PCRE_UTF8_ERR0 0
+#define PCRE_UTF8_ERR1 1
+#define PCRE_UTF8_ERR2 2
+#define PCRE_UTF8_ERR3 3
+#define PCRE_UTF8_ERR4 4
+#define PCRE_UTF8_ERR5 5
+#define PCRE_UTF8_ERR6 6
+#define PCRE_UTF8_ERR7 7
+#define PCRE_UTF8_ERR8 8
+#define PCRE_UTF8_ERR9 9
+#define PCRE_UTF8_ERR10 10
+#define PCRE_UTF8_ERR11 11
+#define PCRE_UTF8_ERR12 12
+#define PCRE_UTF8_ERR13 13
+#define PCRE_UTF8_ERR14 14
+#define PCRE_UTF8_ERR15 15
+#define PCRE_UTF8_ERR16 16
+#define PCRE_UTF8_ERR17 17
+#define PCRE_UTF8_ERR18 18
+#define PCRE_UTF8_ERR19 19
+#define PCRE_UTF8_ERR20 20
+#define PCRE_UTF8_ERR21 21
+
+/* Specific error codes for UTF-16 validity checks */
+
+#define PCRE_UTF16_ERR0 0
+#define PCRE_UTF16_ERR1 1
+#define PCRE_UTF16_ERR2 2
+#define PCRE_UTF16_ERR3 3
+#define PCRE_UTF16_ERR4 4
/* Request types for pcre_fullinfo() */
@@ -183,6 +233,9 @@ compile-time only bits for runtime options, or vice versa. */
#define PCRE_INFO_JCHANGED 13
#define PCRE_INFO_HASCRORLF 14
#define PCRE_INFO_MINLENGTH 15
+#define PCRE_INFO_JIT 16
+#define PCRE_INFO_JITSIZE 17
+#define PCRE_INFO_MAXLOOKBEHIND 18
/* Request types for pcre_config(). Do not re-arrange, in order to remain
compatible. */
@@ -196,8 +249,18 @@ compatible. */
#define PCRE_CONFIG_UNICODE_PROPERTIES 6
#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
#define PCRE_CONFIG_BSR 8
+#define PCRE_CONFIG_JIT 9
+#define PCRE_CONFIG_UTF16 10
+#define PCRE_CONFIG_JITTARGET 11
-/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine
+/* Request types for pcre_study(). Do not re-arrange, in order to remain
+compatible. */
+
+#define PCRE_STUDY_JIT_COMPILE 0x0001
+#define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE 0x0002
+#define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE 0x0004
+
+/* Bit flags for the pcre[16]_extra structure. Do not re-arrange or redefine
these bits, just add new ones on the end, in order to remain compatible. */
#define PCRE_EXTRA_STUDY_DATA 0x0001
@@ -206,12 +269,33 @@ these bits, just add new ones on the end, in order to remain compatible. */
#define PCRE_EXTRA_TABLES 0x0008
#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
#define PCRE_EXTRA_MARK 0x0020
+#define PCRE_EXTRA_EXECUTABLE_JIT 0x0040
/* Types */
struct real_pcre; /* declaration; the definition is private */
typedef struct real_pcre pcre;
+struct real_pcre16; /* declaration; the definition is private */
+typedef struct real_pcre16 pcre16;
+
+struct real_pcre_jit_stack; /* declaration; the definition is private */
+typedef struct real_pcre_jit_stack pcre_jit_stack;
+
+struct real_pcre16_jit_stack; /* declaration; the definition is private */
+typedef struct real_pcre16_jit_stack pcre16_jit_stack;
+
+/* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
+a 16 bit wide signed data type. Otherwise it can be a dummy data type since
+pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
+#ifndef PCRE_UCHAR16
+#define PCRE_UCHAR16 unsigned short
+#endif
+
+#ifndef PCRE_SPTR16
+#define PCRE_SPTR16 const PCRE_UCHAR16 *
+#endif
+
/* When PCRE is compiled as a C++ library, the subject pointer type can be
replaced with a custom type. For conventional use, the public interface is a
const char *. */
@@ -232,8 +316,22 @@ typedef struct pcre_extra {
const unsigned char *tables; /* Pointer to character tables */
unsigned long int match_limit_recursion; /* Max recursive calls to match() */
unsigned char **mark; /* For passing back a mark pointer */
+ void *executable_jit; /* Contains a pointer to a compiled jit code */
} pcre_extra;
+/* Same structure as above, but with 16 bit char pointers. */
+
+typedef struct pcre16_extra {
+ unsigned long int flags; /* Bits for which fields are set */
+ void *study_data; /* Opaque data from pcre_study() */
+ unsigned long int match_limit; /* Maximum number of calls to match() */
+ void *callout_data; /* Data passed back in callouts */
+ const unsigned char *tables; /* Pointer to character tables */
+ unsigned long int match_limit_recursion; /* Max recursive calls to match() */
+ PCRE_UCHAR16 **mark; /* For passing back a mark pointer */
+ void *executable_jit; /* Contains a pointer to a compiled jit code */
+} pcre16_extra;
+
/* The structure for passing out data via the pcre_callout_function. We use a
structure so that new fields can be added on the end in future versions,
without changing the API of the function, thereby allowing old clients to work
@@ -254,9 +352,33 @@ typedef struct pcre_callout_block {
/* ------------------- Added for Version 1 -------------------------- */
int pattern_position; /* Offset to next item in the pattern */
int next_item_length; /* Length of next item in the pattern */
+ /* ------------------- Added for Version 2 -------------------------- */
+ const unsigned char *mark; /* Pointer to current mark or NULL */
/* ------------------------------------------------------------------ */
} pcre_callout_block;
+/* Same structure as above, but with 16 bit char pointers. */
+
+typedef struct pcre16_callout_block {
+ int version; /* Identifies version of block */
+ /* ------------------------ Version 0 ------------------------------- */
+ int callout_number; /* Number compiled into pattern */
+ int *offset_vector; /* The offset vector */
+ PCRE_SPTR16 subject; /* The subject being matched */
+ int subject_length; /* The length of the subject */
+ int start_match; /* Offset to start of this match attempt */
+ int current_position; /* Where we currently are in the subject */
+ int capture_top; /* Max current capture */
+ int capture_last; /* Most recently closed capture */
+ void *callout_data; /* Data passed in with the call */
+ /* ------------------- Added for Version 1 -------------------------- */
+ int pattern_position; /* Offset to next item in the pattern */
+ int next_item_length; /* Length of next item in the pattern */
+ /* ------------------- Added for Version 2 -------------------------- */
+ const PCRE_UCHAR16 *mark; /* Pointer to current mark or NULL */
+ /* ------------------------------------------------------------------ */
+} pcre16_callout_block;
+
/* Indirection for store get and free functions. These can be set to
alternative malloc/free functions if required. Special ones are used in the
non-recursive case for "frames". There is also an optional callout function
@@ -269,47 +391,114 @@ PCRE_EXP_DECL void (*pcre_free)(void *);
PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
PCRE_EXP_DECL void (*pcre_stack_free)(void *);
PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *);
+
+PCRE_EXP_DECL void *(*pcre16_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre16_free)(void *);
+PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre16_stack_free)(void *);
+PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *);
#else /* VPCOMPAT */
PCRE_EXP_DECL void *pcre_malloc(size_t);
PCRE_EXP_DECL void pcre_free(void *);
PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
PCRE_EXP_DECL void pcre_stack_free(void *);
PCRE_EXP_DECL int pcre_callout(pcre_callout_block *);
+
+PCRE_EXP_DECL void *pcre16_malloc(size_t);
+PCRE_EXP_DECL void pcre16_free(void *);
+PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
+PCRE_EXP_DECL void pcre16_stack_free(void *);
+PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *);
#endif /* VPCOMPAT */
+/* User defined callback which provides a stack just before the match starts. */
+
+typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
+typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
+
/* Exported PCRE functions */
PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
const unsigned char *);
+PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
+ const unsigned char *);
PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
int *, const unsigned char *);
+PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
+ int *, const unsigned char *);
PCRE_EXP_DECL int pcre_config(int, void *);
+PCRE_EXP_DECL int pcre16_config(int, void *);
PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
int *, int, const char *, char *, int);
-PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int, char *,
- int);
+PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
+ int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
+PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int,
+ char *, int);
+PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
+ PCRE_UCHAR16 *, int);
PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
const char *, int, int, int, int *, int , int *, int);
+PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
+ PCRE_SPTR16, int, int, int, int *, int , int *, int);
PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
int, int, int, int *, int);
+PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *,
+ PCRE_SPTR16, int, int, int, int *, int);
PCRE_EXP_DECL void pcre_free_substring(const char *);
+PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
PCRE_EXP_DECL void pcre_free_substring_list(const char **);
+PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
void *);
+PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
+ void *);
PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
int *, int, const char *, const char **);
+PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
+ int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
+PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
char **, char **);
+PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
+ PCRE_UCHAR16 **, PCRE_UCHAR16 **);
PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
const char **);
+PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int,
+ PCRE_SPTR16 *);
PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
const char ***);
-PCRE_EXP_DECL int pcre_info(const pcre *, int *, int *);
+PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int,
+ PCRE_SPTR16 **);
PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
+PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
PCRE_EXP_DECL int pcre_refcount(pcre *, int);
+PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int);
PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
+PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
+PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
+PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
PCRE_EXP_DECL const char *pcre_version(void);
+PCRE_EXP_DECL const char *pcre16_version(void);
+
+/* Utility functions for byte order swaps. */
+PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
+ const unsigned char *);
+PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
+ const unsigned char *);
+PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
+ PCRE_SPTR16, int, int *, int);
+
+/* JIT compiler related functions. */
+
+PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
+PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
+PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
+PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
+PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
+ pcre_jit_callback, void *);
+PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
+ pcre16_jit_callback, void *);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c
index b0d81ac94..999ff80b5 100644
--- a/ext/pcre/pcrelib/pcre_compile.c
+++ b/ext/pcre/pcrelib/pcre_compile.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -51,12 +51,16 @@ supporting internal functions that are not used by other modules. */
#include "pcre_internal.h"
-/* When PCRE_DEBUG is defined, we need the pcre_printint() function, which is
-also used by pcretest. PCRE_DEBUG is not defined when building a production
-library. */
+/* When PCRE_DEBUG is defined, we need the pcre(16)_printint() function, which
+is also used by pcretest. PCRE_DEBUG is not defined when building a production
+library. We do not need to select pcre16_printint.c specially, because the
+COMPILE_PCREx macro will already be appropriately set. */
#ifdef PCRE_DEBUG
-#include "pcre_printint.src"
+/* pcre_printint.c should not include any headers */
+#define PCRE_INCLUDED
+#include "pcre_printint.c"
+#undef PCRE_INCLUDED
#endif
@@ -86,15 +90,30 @@ so this number is very generous.
The same workspace is used during the second, actual compile phase for
remembering forward references to groups so that they can be filled in at the
end. Each entry in this list occupies LINK_SIZE bytes, so even when LINK_SIZE
-is 4 there is plenty of room. */
+is 4 there is plenty of room for most patterns. However, the memory can get
+filled up by repetitions of forward references, for example patterns like
+/(?1){0,1999}(b)/, and one user did hit the limit. The code has been changed so
+that the workspace is expanded using malloc() in this situation. The value
+below is therefore a minimum, and we put a maximum on it for safety. The
+minimum is now also defined in terms of LINK_SIZE so that the use of malloc()
+kicks in at the same number of forward references in all cases. */
-#define COMPILE_WORK_SIZE (4096)
+#define COMPILE_WORK_SIZE (2048*LINK_SIZE)
+#define COMPILE_WORK_SIZE_MAX (100*COMPILE_WORK_SIZE)
/* The overrun tests check for a slightly smaller size so that they detect the
overrun before it actually does run off the end of the data block. */
-#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100)
+#define WORK_SIZE_SAFETY_MARGIN (100)
+/* Private flags added to firstchar and reqchar. */
+
+#define REQ_CASELESS 0x10000000l /* Indicates caselessness */
+#define REQ_VARY 0x20000000l /* Reqchar followed non-literal item */
+
+/* Repeated character flags. */
+
+#define UTF_LENGTH 0x10000000l /* The char contains its length. */
/* Table for handling escaped characters in the range '0'-'z'. Positive returns
are simple data values; negative values are for special things like \d and so
@@ -229,7 +248,7 @@ static const char posix_names[] =
STRING_graph0 STRING_print0 STRING_punct0 STRING_space0
STRING_word0 STRING_xdigit;
-static const uschar posix_name_lengths[] = {
+static const pcre_uint8 posix_name_lengths[] = {
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
/* Table of class bit maps for each POSIX class. Each class is formed from a
@@ -264,47 +283,101 @@ substitutes must be in the order of the names, defined above, and there are
both positive and negative cases. NULL means no substitute. */
#ifdef SUPPORT_UCP
-static const uschar *substitutes[] = {
- (uschar *)"\\P{Nd}", /* \D */
- (uschar *)"\\p{Nd}", /* \d */
- (uschar *)"\\P{Xsp}", /* \S */ /* NOTE: Xsp is Perl space */
- (uschar *)"\\p{Xsp}", /* \s */
- (uschar *)"\\P{Xwd}", /* \W */
- (uschar *)"\\p{Xwd}" /* \w */
+static const pcre_uchar string_PNd[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_N, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pNd[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_N, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PXsp[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_s, CHAR_p, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pXsp[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_s, CHAR_p, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PXwd[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_w, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pXwd[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_w, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+
+static const pcre_uchar *substitutes[] = {
+ string_PNd, /* \D */
+ string_pNd, /* \d */
+ string_PXsp, /* \S */ /* NOTE: Xsp is Perl space */
+ string_pXsp, /* \s */
+ string_PXwd, /* \W */
+ string_pXwd /* \w */
};
-static const uschar *posix_substitutes[] = {
- (uschar *)"\\p{L}", /* alpha */
- (uschar *)"\\p{Ll}", /* lower */
- (uschar *)"\\p{Lu}", /* upper */
- (uschar *)"\\p{Xan}", /* alnum */
- NULL, /* ascii */
- (uschar *)"\\h", /* blank */
- NULL, /* cntrl */
- (uschar *)"\\p{Nd}", /* digit */
- NULL, /* graph */
- NULL, /* print */
- NULL, /* punct */
- (uschar *)"\\p{Xps}", /* space */ /* NOTE: Xps is POSIX space */
- (uschar *)"\\p{Xwd}", /* word */
- NULL, /* xdigit */
+static const pcre_uchar string_pL[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pLl[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_l, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pLu[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_u, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pXan[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_a, CHAR_n, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_h[] = {
+ CHAR_BACKSLASH, CHAR_h, '\0' };
+static const pcre_uchar string_pXps[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_p, CHAR_s, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PL[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PLl[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_l, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PLu[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_u, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PXan[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_a, CHAR_n, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_H[] = {
+ CHAR_BACKSLASH, CHAR_H, '\0' };
+static const pcre_uchar string_PXps[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_p, CHAR_s, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+
+static const pcre_uchar *posix_substitutes[] = {
+ string_pL, /* alpha */
+ string_pLl, /* lower */
+ string_pLu, /* upper */
+ string_pXan, /* alnum */
+ NULL, /* ascii */
+ string_h, /* blank */
+ NULL, /* cntrl */
+ string_pNd, /* digit */
+ NULL, /* graph */
+ NULL, /* print */
+ NULL, /* punct */
+ string_pXps, /* space */ /* NOTE: Xps is POSIX space */
+ string_pXwd, /* word */
+ NULL, /* xdigit */
/* Negated cases */
- (uschar *)"\\P{L}", /* ^alpha */
- (uschar *)"\\P{Ll}", /* ^lower */
- (uschar *)"\\P{Lu}", /* ^upper */
- (uschar *)"\\P{Xan}", /* ^alnum */
- NULL, /* ^ascii */
- (uschar *)"\\H", /* ^blank */
- NULL, /* ^cntrl */
- (uschar *)"\\P{Nd}", /* ^digit */
- NULL, /* ^graph */
- NULL, /* ^print */
- NULL, /* ^punct */
- (uschar *)"\\P{Xps}", /* ^space */ /* NOTE: Xps is POSIX space */
- (uschar *)"\\P{Xwd}", /* ^word */
- NULL /* ^xdigit */
+ string_PL, /* ^alpha */
+ string_PLl, /* ^lower */
+ string_PLu, /* ^upper */
+ string_PXan, /* ^alnum */
+ NULL, /* ^ascii */
+ string_H, /* ^blank */
+ NULL, /* ^cntrl */
+ string_PNd, /* ^digit */
+ NULL, /* ^graph */
+ NULL, /* ^print */
+ NULL, /* ^punct */
+ string_PXps, /* ^space */ /* NOTE: Xps is POSIX space */
+ string_PXwd, /* ^word */
+ NULL /* ^xdigit */
};
-#define POSIX_SUBSIZE (sizeof(posix_substitutes)/sizeof(uschar *))
+#define POSIX_SUBSIZE (sizeof(posix_substitutes) / sizeof(pcre_uchar *))
#endif
#define STRING(a) # a
@@ -363,7 +436,7 @@ static const char error_texts[] =
/* 30 */
"unknown POSIX class name\0"
"POSIX collating elements are not supported\0"
- "this version of PCRE is not compiled with PCRE_UTF8 support\0"
+ "this version of PCRE is compiled without UTF support\0"
"spare error\0" /** DEAD **/
"character value in \\x{...} sequence is too large\0"
/* 35 */
@@ -386,12 +459,12 @@ static const char error_texts[] =
"too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")\0"
/* 50 */
"repeated subpattern is too long\0" /** DEAD **/
- "octal value is greater than \\377 (not in UTF-8 mode)\0"
+ "octal value is greater than \\377 in 8-bit non-UTF-8 mode\0"
"internal error: overran compiling workspace\0"
"internal error: previously-checked referenced subpattern not found\0"
"DEFINE group contains more than one branch\0"
/* 55 */
- "repeating a DEFINE group is not allowed\0"
+ "repeating a DEFINE group is not allowed\0" /** DEAD **/
"inconsistent NEWLINE options\0"
"\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0"
"a numbered reference must not be zero\0"
@@ -405,8 +478,18 @@ static const char error_texts[] =
/* 65 */
"different names for subpatterns of the same number are not allowed\0"
"(*MARK) must have an argument\0"
- "this version of PCRE is not compiled with PCRE_UCP support\0"
+ "this version of PCRE is not compiled with Unicode property support\0"
"\\c must be followed by an ASCII character\0"
+ "\\k is not followed by a braced, angle-bracketed, or quoted name\0"
+ /* 70 */
+ "internal error: unknown opcode in find_fixedlength()\0"
+ "\\N is not supported in a class\0"
+ "too many forward references\0"
+ "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"
+ "invalid UTF-16 string\0"
+ /* 75 */
+ "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
+ "character value in \\u.... sequence is too large\0"
;
/* Table to identify digits and hex digits. This is used when compiling
@@ -425,12 +508,18 @@ For convenience, we use the same bit definitions as in chartables:
Then we can use ctype_digit and ctype_xdigit in the code. */
+/* Using a simple comparison for decimal numbers rather than a memory read
+is much faster, and the resulting code is simpler (the compiler turns it
+into a subtraction and unsigned comparison). */
+
+#define IS_DIGIT(x) ((x) >= CHAR_0 && (x) <= CHAR_9)
+
#ifndef EBCDIC
/* This is the "normal" case, for ASCII systems, and EBCDIC systems running in
UTF-8 mode. */
-static const unsigned char digitab[] =
+static const pcre_uint8 digitab[] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */
@@ -469,7 +558,7 @@ static const unsigned char digitab[] =
/* This is the "abnormal" case, for EBCDIC systems not running in UTF-8 mode. */
-static const unsigned char digitab[] =
+static const pcre_uint8 digitab[] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 0 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */
@@ -504,7 +593,7 @@ static const unsigned char digitab[] =
0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /* 0 - 7 F0 */
0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00};/* 8 -255 */
-static const unsigned char ebcdic_chartab[] = { /* chartable partial dup */
+static const pcre_uint8 ebcdic_chartab[] = { /* chartable partial dup */
0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 0- 7 */
0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 16- 23 */
@@ -543,7 +632,7 @@ static const unsigned char ebcdic_chartab[] = { /* chartable partial dup */
/* Definition to allow mutual recursion */
static BOOL
- compile_regex(int, int, uschar **, const uschar **, int *, BOOL, BOOL, int,
+ compile_regex(int, pcre_uchar **, const pcre_uchar **, int *, BOOL, BOOL, int, int,
int *, int *, branch_chain *, compile_data *, int *);
@@ -575,6 +664,78 @@ return s;
/*************************************************
+* Expand the workspace *
+*************************************************/
+
+/* This function is called during the second compiling phase, if the number of
+forward references fills the existing workspace, which is originally a block on
+the stack. A larger block is obtained from malloc() unless the ultimate limit
+has been reached or the increase will be rather small.
+
+Argument: pointer to the compile data block
+Returns: 0 if all went well, else an error number
+*/
+
+static int
+expand_workspace(compile_data *cd)
+{
+pcre_uchar *newspace;
+int newsize = cd->workspace_size * 2;
+
+if (newsize > COMPILE_WORK_SIZE_MAX) newsize = COMPILE_WORK_SIZE_MAX;
+if (cd->workspace_size >= COMPILE_WORK_SIZE_MAX ||
+ newsize - cd->workspace_size < WORK_SIZE_SAFETY_MARGIN)
+ return ERR72;
+
+newspace = (PUBL(malloc))(IN_UCHARS(newsize));
+if (newspace == NULL) return ERR21;
+memcpy(newspace, cd->start_workspace, cd->workspace_size * sizeof(pcre_uchar));
+cd->hwm = (pcre_uchar *)newspace + (cd->hwm - cd->start_workspace);
+if (cd->workspace_size > COMPILE_WORK_SIZE)
+ (PUBL(free))((void *)cd->start_workspace);
+cd->start_workspace = newspace;
+cd->workspace_size = newsize;
+return 0;
+}
+
+
+
+/*************************************************
+* Check for counted repeat *
+*************************************************/
+
+/* This function is called when a '{' is encountered in a place where it might
+start a quantifier. It looks ahead to see if it really is a quantifier or not.
+It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}
+where the ddds are digits.
+
+Arguments:
+ p pointer to the first char after '{'
+
+Returns: TRUE or FALSE
+*/
+
+static BOOL
+is_counted_repeat(const pcre_uchar *p)
+{
+if (!IS_DIGIT(*p)) return FALSE;
+p++;
+while (IS_DIGIT(*p)) p++;
+if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
+
+if (*p++ != CHAR_COMMA) return FALSE;
+if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
+
+if (!IS_DIGIT(*p)) return FALSE;
+p++;
+while (IS_DIGIT(*p)) p++;
+
+return (*p == CHAR_RIGHT_CURLY_BRACKET);
+}
+
+
+
+/*************************************************
* Handle escapes *
*************************************************/
@@ -599,12 +760,14 @@ Returns: zero or positive => a data character
*/
static int
-check_escape(const uschar **ptrptr, int *errorcodeptr, int bracount,
+check_escape(const pcre_uchar **ptrptr, int *errorcodeptr, int bracount,
int options, BOOL isclass)
{
-BOOL utf8 = (options & PCRE_UTF8) != 0;
-const uschar *ptr = *ptrptr + 1;
-int c, i;
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+BOOL utf = (options & PCRE_UTF8) != 0;
+const pcre_uchar *ptr = *ptrptr + 1;
+pcre_int32 c;
+int i;
GETCHARINCTEST(c, ptr); /* Get character value, increment pointer */
ptr--; /* Set pointer back to the last byte */
@@ -618,11 +781,13 @@ in a table. A non-zero result is something that can be returned immediately.
Otherwise further processing may be required. */
#ifndef EBCDIC /* ASCII/UTF-8 coding */
-else if (c < CHAR_0 || c > CHAR_z) {} /* Not alphanumeric */
+/* Not alphanumeric */
+else if (c < CHAR_0 || c > CHAR_z) {}
else if ((i = escapes[c - CHAR_0]) != 0) c = i;
#else /* EBCDIC coding */
-else if (c < 'a' || (ebcdic_chartab[c] & 0x0E) == 0) {} /* Not alphanumeric */
+/* Not alphanumeric */
+else if (c < 'a' || (!MAX_255(c) || (ebcdic_chartab[c] & 0x0E) == 0)) {}
else if ((i = escapes[c - 0x48]) != 0) c = i;
#endif
@@ -630,7 +795,7 @@ else if ((i = escapes[c - 0x48]) != 0) c = i;
else
{
- const uschar *oldptr;
+ const pcre_uchar *oldptr;
BOOL braced, negated;
switch (c)
@@ -640,12 +805,56 @@ else
case CHAR_l:
case CHAR_L:
+ *errorcodeptr = ERR37;
+ break;
+
case CHAR_u:
+ if ((options & PCRE_JAVASCRIPT_COMPAT) != 0)
+ {
+ /* In JavaScript, \u must be followed by four hexadecimal numbers.
+ Otherwise it is a lowercase u letter. */
+ if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
+ && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0
+ && MAX_255(ptr[3]) && (digitab[ptr[3]] & ctype_xdigit) != 0
+ && MAX_255(ptr[4]) && (digitab[ptr[4]] & ctype_xdigit) != 0)
+ {
+ c = 0;
+ for (i = 0; i < 4; ++i)
+ {
+ register int cc = *(++ptr);
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
+#else /* EBCDIC coding */
+ if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
+#endif
+ }
+
+#ifdef COMPILE_PCRE8
+ if (c > (utf ? 0x10ffff : 0xff))
+#else
+#ifdef COMPILE_PCRE16
+ if (c > (utf ? 0x10ffff : 0xffff))
+#endif
+#endif
+ {
+ *errorcodeptr = ERR76;
+ }
+ else if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
+ }
+ }
+ else
+ *errorcodeptr = ERR37;
+ break;
+
case CHAR_U:
- *errorcodeptr = ERR37;
+ /* In JavaScript, \U is an uppercase U letter. */
+ if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) *errorcodeptr = ERR37;
break;
- /* \g must be followed by one of a number of specific things:
+ /* In a character class, \g is just a literal "g". Outside a character
+ class, \g must be followed by one of a number of specific things:
(1) A number, either plain or braced. If positive, it is an absolute
backreference. If negative, it is a relative backreference. This is a Perl
@@ -662,6 +871,7 @@ else
the -ESC_g code (cf \k). */
case CHAR_g:
+ if (isclass) break;
if (ptr[1] == CHAR_LESS_THAN_SIGN || ptr[1] == CHAR_APOSTROPHE)
{
c = -ESC_g;
@@ -672,9 +882,9 @@ else
if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
{
- const uschar *p;
+ const pcre_uchar *p;
for (p = ptr+2; *p != 0 && *p != CHAR_RIGHT_CURLY_BRACKET; p++)
- if (*p != CHAR_MINUS && (digitab[*p] & ctype_digit) == 0) break;
+ if (*p != CHAR_MINUS && !IS_DIGIT(*p)) break;
if (*p != 0 && *p != CHAR_RIGHT_CURLY_BRACKET)
{
c = -ESC_k;
@@ -692,12 +902,21 @@ else
}
else negated = FALSE;
+ /* The integer range is limited by the machine's int representation. */
c = 0;
- while ((digitab[ptr[1]] & ctype_digit) != 0)
+ while (IS_DIGIT(ptr[1]))
+ {
+ if (((unsigned int)c) > INT_MAX / 10) /* Integer overflow */
+ {
+ c = -1;
+ break;
+ }
c = c * 10 + *(++ptr) - CHAR_0;
-
- if (c < 0) /* Integer overflow */
+ }
+ if (((unsigned int)c) > INT_MAX) /* Integer overflow */
{
+ while (IS_DIGIT(ptr[1]))
+ ptr++;
*errorcodeptr = ERR61;
break;
}
@@ -745,11 +964,21 @@ else
if (!isclass)
{
oldptr = ptr;
+ /* The integer range is limited by the machine's int representation. */
c -= CHAR_0;
- while ((digitab[ptr[1]] & ctype_digit) != 0)
+ while (IS_DIGIT(ptr[1]))
+ {
+ if (((unsigned int)c) > INT_MAX / 10) /* Integer overflow */
+ {
+ c = -1;
+ break;
+ }
c = c * 10 + *(++ptr) - CHAR_0;
- if (c < 0) /* Integer overflow */
+ }
+ if (((unsigned int)c) > INT_MAX) /* Integer overflow */
{
+ while (IS_DIGIT(ptr[1]))
+ ptr++;
*errorcodeptr = ERR61;
break;
}
@@ -775,32 +1004,55 @@ else
/* \0 always starts an octal number, but we may drop through to here with a
larger first octal digit. The original code used just to take the least
significant 8 bits of octal numbers (I think this is what early Perls used
- to do). Nowadays we allow for larger numbers in UTF-8 mode, but no more
- than 3 octal digits. */
+ to do). Nowadays we allow for larger numbers in UTF-8 mode and 16-bit mode,
+ but no more than 3 octal digits. */
case CHAR_0:
c -= CHAR_0;
while(i++ < 2 && ptr[1] >= CHAR_0 && ptr[1] <= CHAR_7)
c = c * 8 + *(++ptr) - CHAR_0;
- if (!utf8 && c > 255) *errorcodeptr = ERR51;
+#ifdef COMPILE_PCRE8
+ if (!utf && c > 0xff) *errorcodeptr = ERR51;
+#endif
break;
/* \x is complicated. \x{ddd} is a character number which can be greater
- than 0xff in utf8 mode, but only if the ddd are hex digits. If not, { is
- treated as a data character. */
+ than 0xff in utf or non-8bit mode, but only if the ddd are hex digits.
+ If not, { is treated as a data character. */
case CHAR_x:
+ if ((options & PCRE_JAVASCRIPT_COMPAT) != 0)
+ {
+ /* In JavaScript, \x must be followed by two hexadecimal numbers.
+ Otherwise it is a lowercase x letter. */
+ if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
+ && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0)
+ {
+ c = 0;
+ for (i = 0; i < 2; ++i)
+ {
+ register int cc = *(++ptr);
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
+#else /* EBCDIC coding */
+ if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
+#endif
+ }
+ }
+ break;
+ }
+
if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
{
- const uschar *pt = ptr + 2;
- int count = 0;
+ const pcre_uchar *pt = ptr + 2;
c = 0;
- while ((digitab[*pt] & ctype_xdigit) != 0)
+ while (MAX_255(*pt) && (digitab[*pt] & ctype_xdigit) != 0)
{
register int cc = *pt++;
if (c == 0 && cc == CHAR_0) continue; /* Leading zeroes */
- count++;
#ifndef EBCDIC /* ASCII/UTF-8 coding */
if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
@@ -809,11 +1061,25 @@ else
if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */
c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
#endif
+
+#ifdef COMPILE_PCRE8
+ if (c > (utf ? 0x10ffff : 0xff)) { c = -1; break; }
+#else
+#ifdef COMPILE_PCRE16
+ if (c > (utf ? 0x10ffff : 0xffff)) { c = -1; break; }
+#endif
+#endif
+ }
+
+ if (c < 0)
+ {
+ while (MAX_255(*pt) && (digitab[*pt] & ctype_xdigit) != 0) pt++;
+ *errorcodeptr = ERR34;
}
if (*pt == CHAR_RIGHT_CURLY_BRACKET)
{
- if (c < 0 || count > (utf8? 8 : 2)) *errorcodeptr = ERR34;
+ if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
ptr = pt;
break;
}
@@ -825,7 +1091,7 @@ else
/* Read just a single-byte hex-defined char */
c = 0;
- while (i++ < 2 && (digitab[ptr[1]] & ctype_xdigit) != 0)
+ while (i++ < 2 && MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0)
{
int cc; /* Some compilers don't like */
cc = *(++ptr); /* ++ in initializers */
@@ -883,9 +1149,11 @@ else
}
/* Perl supports \N{name} for character names, as well as plain \N for "not
-newline". PCRE does not support \N{name}. */
+newline". PCRE does not support \N{name}. However, it does support
+quantification such as \N{2,3}. */
-if (c == -ESC_N && ptr[1] == CHAR_LEFT_CURLY_BRACKET)
+if (c == -ESC_N && ptr[1] == CHAR_LEFT_CURLY_BRACKET &&
+ !is_counted_repeat(ptr+2))
*errorcodeptr = ERR37;
/* If PCRE_UCP is set, we change the values for \d etc. */
@@ -921,11 +1189,11 @@ Returns: type value from ucp_type_table, or -1 for an invalid type
*/
static int
-get_ucp(const uschar **ptrptr, BOOL *negptr, int *dptr, int *errorcodeptr)
+get_ucp(const pcre_uchar **ptrptr, BOOL *negptr, int *dptr, int *errorcodeptr)
{
int c, i, bot, top;
-const uschar *ptr = *ptrptr;
-char name[32];
+const pcre_uchar *ptr = *ptrptr;
+pcre_uchar name[32];
c = *(++ptr);
if (c == 0) goto ERROR_RETURN;
@@ -942,7 +1210,7 @@ if (c == CHAR_LEFT_CURLY_BRACKET)
*negptr = TRUE;
ptr++;
}
- for (i = 0; i < (int)sizeof(name) - 1; i++)
+ for (i = 0; i < (int)(sizeof(name) / sizeof(pcre_uchar)) - 1; i++)
{
c = *(++ptr);
if (c == 0) goto ERROR_RETURN;
@@ -966,16 +1234,16 @@ else
/* Search for a recognized property name using binary chop */
bot = 0;
-top = _pcre_utt_size;
+top = PRIV(utt_size);
while (bot < top)
{
i = (bot + top) >> 1;
- c = strcmp(name, _pcre_utt_names + _pcre_utt[i].name_offset);
+ c = STRCMP_UC_C8(name, PRIV(utt_names) + PRIV(utt)[i].name_offset);
if (c == 0)
{
- *dptr = _pcre_utt[i].value;
- return _pcre_utt[i].type;
+ *dptr = PRIV(utt)[i].value;
+ return PRIV(utt)[i].type;
}
if (c > 0) bot = i + 1; else top = i;
}
@@ -995,39 +1263,6 @@ return -1;
/*************************************************
-* Check for counted repeat *
-*************************************************/
-
-/* This function is called when a '{' is encountered in a place where it might
-start a quantifier. It looks ahead to see if it really is a quantifier or not.
-It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}
-where the ddds are digits.
-
-Arguments:
- p pointer to the first char after '{'
-
-Returns: TRUE or FALSE
-*/
-
-static BOOL
-is_counted_repeat(const uschar *p)
-{
-if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
-while ((digitab[*p] & ctype_digit) != 0) p++;
-if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
-
-if (*p++ != CHAR_COMMA) return FALSE;
-if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
-
-if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
-while ((digitab[*p] & ctype_digit) != 0) p++;
-
-return (*p == CHAR_RIGHT_CURLY_BRACKET);
-}
-
-
-
-/*************************************************
* Read repeat counts *
*************************************************/
@@ -1046,8 +1281,8 @@ Returns: pointer to '}' on success;
current ptr on error, with errorcodeptr set non-zero
*/
-static const uschar *
-read_repeat_counts(const uschar *p, int *minp, int *maxp, int *errorcodeptr)
+static const pcre_uchar *
+read_repeat_counts(const pcre_uchar *p, int *minp, int *maxp, int *errorcodeptr)
{
int min = 0;
int max = -1;
@@ -1055,7 +1290,7 @@ int max = -1;
/* Read the minimum value and do a paranoid check: a negative value indicates
an integer overflow. */
-while ((digitab[*p] & ctype_digit) != 0) min = min * 10 + *p++ - CHAR_0;
+while (IS_DIGIT(*p)) min = min * 10 + *p++ - CHAR_0;
if (min < 0 || min > 65535)
{
*errorcodeptr = ERR5;
@@ -1070,7 +1305,7 @@ if (*p == CHAR_RIGHT_CURLY_BRACKET) max = min; else
if (*(++p) != CHAR_RIGHT_CURLY_BRACKET)
{
max = 0;
- while((digitab[*p] & ctype_digit) != 0) max = max * 10 + *p++ - CHAR_0;
+ while(IS_DIGIT(*p)) max = max * 10 + *p++ - CHAR_0;
if (max < 0 || max > 65535)
{
*errorcodeptr = ERR5;
@@ -1125,17 +1360,17 @@ Arguments:
name name to seek, or NULL if seeking a numbered subpattern
lorn name length, or subpattern number if name is NULL
xmode TRUE if we are in /x mode
- utf8 TRUE if we are in UTF-8 mode
+ utf TRUE if we are in UTF-8 / UTF-16 mode
count pointer to the current capturing subpattern number (updated)
Returns: the number of the named subpattern, or -1 if not found
*/
static int
-find_parens_sub(uschar **ptrptr, compile_data *cd, const uschar *name, int lorn,
- BOOL xmode, BOOL utf8, int *count)
+find_parens_sub(pcre_uchar **ptrptr, compile_data *cd, const pcre_uchar *name, int lorn,
+ BOOL xmode, BOOL utf, int *count)
{
-uschar *ptr = *ptrptr;
+pcre_uchar *ptr = *ptrptr;
int start_count = *count;
int hwm_count = start_count;
BOOL dup_parens = FALSE;
@@ -1202,7 +1437,7 @@ if (ptr[0] == CHAR_LEFT_PARENTHESIS)
ptr[1] != CHAR_EQUALS_SIGN) || *ptr == CHAR_APOSTROPHE)
{
int term;
- const uschar *thisname;
+ const pcre_uchar *thisname;
*count += 1;
if (name == NULL && *count == lorn) return *count;
term = *ptr++;
@@ -1210,7 +1445,7 @@ if (ptr[0] == CHAR_LEFT_PARENTHESIS)
thisname = ptr;
while (*ptr != term) ptr++;
if (name != NULL && lorn == ptr - thisname &&
- strncmp((const char *)name, (const char *)thisname, lorn) == 0)
+ STRNCMP_UC_UC(name, thisname, lorn) == 0)
return *count;
term++;
}
@@ -1253,7 +1488,7 @@ for (; ptr < cd->end_pattern; ptr++)
{
if (ptr[2] == CHAR_E)
ptr+= 2;
- else if (strncmp((const char *)ptr+2,
+ else if (STRNCMP_UC_C8(ptr + 2,
STR_Q STR_BACKSLASH STR_E, 3) == 0)
ptr += 4;
else
@@ -1301,8 +1536,8 @@ for (; ptr < cd->end_pattern; ptr++)
{
if (IS_NEWLINE(ptr)) { ptr += cd->nllen - 1; break; }
ptr++;
-#ifdef SUPPORT_UTF8
- if (utf8) while ((*ptr & 0xc0) == 0x80) ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
#endif
}
if (*ptr == 0) goto FAIL_EXIT;
@@ -1313,7 +1548,7 @@ for (; ptr < cd->end_pattern; ptr++)
if (*ptr == CHAR_LEFT_PARENTHESIS)
{
- int rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf8, count);
+ int rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, count);
if (rc > 0) return rc;
if (*ptr == 0) goto FAIL_EXIT;
}
@@ -1359,16 +1594,16 @@ Arguments:
name name to seek, or NULL if seeking a numbered subpattern
lorn name length, or subpattern number if name is NULL
xmode TRUE if we are in /x mode
- utf8 TRUE if we are in UTF-8 mode
+ utf TRUE if we are in UTF-8 / UTF-16 mode
Returns: the number of the found subpattern, or -1 if not found
*/
static int
-find_parens(compile_data *cd, const uschar *name, int lorn, BOOL xmode,
- BOOL utf8)
+find_parens(compile_data *cd, const pcre_uchar *name, int lorn, BOOL xmode,
+ BOOL utf)
{
-uschar *ptr = (uschar *)cd->start_pattern;
+pcre_uchar *ptr = (pcre_uchar *)cd->start_pattern;
int count = 0;
int rc;
@@ -1379,7 +1614,7 @@ matching closing parens. That is why we have to have a loop. */
for (;;)
{
- rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf8, &count);
+ rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, &count);
if (rc > 0 || *ptr++ == 0) break;
}
@@ -1395,40 +1630,30 @@ return rc;
/* This is called by several functions that scan a compiled expression looking
for a fixed first character, or an anchoring op code etc. It skips over things
-that do not influence this. For some calls, a change of option is important.
-For some calls, it makes sense to skip negative forward and all backward
-assertions, and also the \b assertion; for others it does not.
+that do not influence this. For some calls, it makes sense to skip negative
+forward and all backward assertions, and also the \b assertion; for others it
+does not.
Arguments:
code pointer to the start of the group
- options pointer to external options
- optbit the option bit whose changing is significant, or
- zero if none are
skipassert TRUE if certain assertions are to be skipped
Returns: pointer to the first significant opcode
*/
-static const uschar*
-first_significant_code(const uschar *code, int *options, int optbit,
- BOOL skipassert)
+static const pcre_uchar*
+first_significant_code(const pcre_uchar *code, BOOL skipassert)
{
for (;;)
{
switch ((int)*code)
{
- case OP_OPT:
- if (optbit > 0 && ((int)code[1] & optbit) != (*options & optbit))
- *options = (int)code[1];
- code += 2;
- break;
-
case OP_ASSERT_NOT:
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
if (!skipassert) return code;
do code += GET(code, 1); while (*code == OP_ALT);
- code += _pcre_OP_lengths[*code];
+ code += PRIV(OP_lengths)[*code];
break;
case OP_WORD_BOUNDARY:
@@ -1442,7 +1667,7 @@ for (;;)
case OP_RREF:
case OP_NRREF:
case OP_DEF:
- code += _pcre_OP_lengths[*code];
+ code += PRIV(OP_lengths)[*code];
break;
default:
@@ -1472,23 +1697,24 @@ and doing the check at the end; a flag specifies which mode we are running in.
Arguments:
code points to the start of the pattern (the bracket)
- options the compiling options
+ utf TRUE in UTF-8 / UTF-16 mode
atend TRUE if called when the pattern is complete
cd the "compile data" structure
Returns: the fixed length,
or -1 if there is no fixed length,
- or -2 if \C was encountered
+ or -2 if \C was encountered (in UTF-8 mode only)
or -3 if an OP_RECURSE item was encountered and atend is FALSE
+ or -4 if an unknown opcode was encountered (internal error)
*/
static int
-find_fixedlength(uschar *code, int options, BOOL atend, compile_data *cd)
+find_fixedlength(pcre_uchar *code, BOOL utf, BOOL atend, compile_data *cd)
{
int length = -1;
register int branchlength = 0;
-register uschar *cc = code + 1 + LINK_SIZE;
+register pcre_uchar *cc = code + 1 + LINK_SIZE;
/* Scan along the opcodes for this branch. If we get to the end of the
branch, check the length against that of the other branches. */
@@ -1496,30 +1722,39 @@ branch, check the length against that of the other branches. */
for (;;)
{
int d;
- uschar *ce, *cs;
+ pcre_uchar *ce, *cs;
register int op = *cc;
+
switch (op)
{
+ /* We only need to continue for OP_CBRA (normal capturing bracket) and
+ OP_BRA (normal non-capturing bracket) because the other variants of these
+ opcodes are all concerned with unlimited repeated groups, which of course
+ are not of fixed length. */
+
case OP_CBRA:
case OP_BRA:
case OP_ONCE:
+ case OP_ONCE_NC:
case OP_COND:
- d = find_fixedlength(cc + ((op == OP_CBRA)? 2:0), options, atend, cd);
+ d = find_fixedlength(cc + ((op == OP_CBRA)? IMM2_SIZE : 0), utf, atend, cd);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
cc += 1 + LINK_SIZE;
break;
- /* Reached end of a branch; if it's a ket it is the end of a nested
- call. If it's ALT it is an alternation in a nested call. If it is
- END it's the end of the outer call. All can be handled by the same code. */
+ /* Reached end of a branch; if it's a ket it is the end of a nested call.
+ If it's ALT it is an alternation in a nested call. An ACCEPT is effectively
+ an ALT. If it is END it's the end of the outer call. All can be handled by
+ the same code. Note that we must not include the OP_KETRxxx opcodes here,
+ because they all imply an unlimited repeat. */
case OP_ALT:
case OP_KET:
- case OP_KETRMAX:
- case OP_KETRMIN:
case OP_END:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
if (length < 0) length = branchlength;
else if (length != branchlength) return -1;
if (*cc != OP_ALT) return length;
@@ -1533,10 +1768,10 @@ for (;;)
case OP_RECURSE:
if (!atend) return -3;
- cs = ce = (uschar *)cd->start_code + GET(cc, 1); /* Start subpattern */
- do ce += GET(ce, 1); while (*ce == OP_ALT); /* End subpattern */
- if (cc > cs && cc < ce) return -1; /* Recursion */
- d = find_fixedlength(cs + 2, options, atend, cd);
+ cs = ce = (pcre_uchar *)cd->start_code + GET(cc, 1); /* Start subpattern */
+ do ce += GET(ce, 1); while (*ce == OP_ALT); /* End subpattern */
+ if (cc > cs && cc < ce) return -1; /* Recursion */
+ d = find_fixedlength(cs + IMM2_SIZE, utf, atend, cd);
if (d < 0) return d;
branchlength += d;
cc += 1 + LINK_SIZE;
@@ -1549,40 +1784,55 @@ for (;;)
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
do cc += GET(cc, 1); while (*cc == OP_ALT);
- /* Fall through */
+ cc += PRIV(OP_lengths)[*cc];
+ break;
/* Skip over things that don't match chars */
- case OP_REVERSE:
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ cc += cc[1] + PRIV(OP_lengths)[*cc];
+ break;
+
+ case OP_CALLOUT:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_CLOSE:
+ case OP_COMMIT:
case OP_CREF:
- case OP_NCREF:
- case OP_RREF:
- case OP_NRREF:
case OP_DEF:
- case OP_OPT:
- case OP_CALLOUT:
- case OP_SOD:
- case OP_SOM:
- case OP_SET_SOM:
+ case OP_DOLL:
+ case OP_DOLLM:
case OP_EOD:
case OP_EODN:
- case OP_CIRC:
- case OP_DOLL:
+ case OP_FAIL:
+ case OP_NCREF:
+ case OP_NRREF:
case OP_NOT_WORD_BOUNDARY:
+ case OP_PRUNE:
+ case OP_REVERSE:
+ case OP_RREF:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_THEN:
case OP_WORD_BOUNDARY:
- cc += _pcre_OP_lengths[*cc];
+ cc += PRIV(OP_lengths)[*cc];
break;
/* Handle literal characters */
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_NOT:
+ case OP_NOTI:
branchlength++;
cc += 2;
-#ifdef SUPPORT_UTF8
- if ((options & PCRE_UTF8) != 0 && cc[-1] >= 0xc0)
- cc += _pcre_utf8_table4[cc[-1] & 0x3f];
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
@@ -1590,18 +1840,20 @@ for (;;)
need to skip over a multibyte character in UTF8 mode. */
case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
branchlength += GET2(cc,1);
- cc += 4;
-#ifdef SUPPORT_UTF8
- if ((options & PCRE_UTF8) != 0 && cc[-1] >= 0xc0)
- cc += _pcre_utf8_table4[cc[-1] & 0x3f];
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
case OP_TYPEEXACT:
branchlength += GET2(cc,1);
- if (cc[3] == OP_PROP || cc[3] == OP_NOTPROP) cc += 2;
- cc += 4;
+ if (cc[1 + IMM2_SIZE] == OP_PROP || cc[1 + IMM2_SIZE] == OP_NOTPROP) cc += 2;
+ cc += 1 + IMM2_SIZE + 1;
break;
/* Handle single-char matchers */
@@ -1611,6 +1863,10 @@ for (;;)
cc += 2;
/* Fall through */
+ case OP_HSPACE:
+ case OP_VSPACE:
+ case OP_NOT_HSPACE:
+ case OP_NOT_VSPACE:
case OP_NOT_DIGIT:
case OP_DIGIT:
case OP_NOT_WHITESPACE:
@@ -1623,25 +1879,28 @@ for (;;)
cc++;
break;
- /* The single-byte matcher isn't allowed */
+ /* The single-byte matcher isn't allowed. This only happens in UTF-8 mode;
+ otherwise \C is coded as OP_ALLANY. */
case OP_ANYBYTE:
return -2;
/* Check a class for variable quantification */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16
case OP_XCLASS:
- cc += GET(cc, 1) - 33;
+ cc += GET(cc, 1) - PRIV(OP_lengths)[OP_CLASS];
/* Fall through */
#endif
case OP_CLASS:
case OP_NCLASS:
- cc += 33;
+ cc += PRIV(OP_lengths)[OP_CLASS];
switch (*cc)
{
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
case OP_CRSTAR:
case OP_CRMINSTAR:
case OP_CRQUERY:
@@ -1650,9 +1909,9 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
- if (GET2(cc,1) != GET2(cc,3)) return -1;
+ if (GET2(cc,1) != GET2(cc,1+IMM2_SIZE)) return -1;
branchlength += GET2(cc,1);
- cc += 5;
+ cc += 1 + 2 * IMM2_SIZE;
break;
default:
@@ -1662,8 +1921,91 @@ for (;;)
/* Anything else is variable length */
- default:
+ case OP_ANYNL:
+ case OP_BRAMINZERO:
+ case OP_BRAPOS:
+ case OP_BRAPOSZERO:
+ case OP_BRAZERO:
+ case OP_CBRAPOS:
+ case OP_EXTUNI:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_REF:
+ case OP_REFI:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ case OP_SCOND:
+ case OP_SKIPZERO:
+ case OP_STAR:
+ case OP_STARI:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPLUS:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSUPTO:
+ case OP_TYPEQUERY:
+ case OP_TYPESTAR:
+ case OP_TYPEUPTO:
+ case OP_UPTO:
+ case OP_UPTOI:
return -1;
+
+ /* Catch unrecognized opcodes so that when new ones are added they
+ are not forgotten, as has happened in the past. */
+
+ default:
+ return -4;
}
}
/* Control never gets here */
@@ -1684,18 +2026,19 @@ length.
Arguments:
code points to start of expression
- utf8 TRUE in UTF-8 mode
+ utf TRUE in UTF-8 / UTF-16 mode
number the required bracket number or negative to find a lookbehind
Returns: pointer to the opcode for the bracket, or NULL if not found
*/
-const uschar *
-_pcre_find_bracket(const uschar *code, BOOL utf8, int number)
+const pcre_uchar *
+PRIV(find_bracket)(const pcre_uchar *code, BOOL utf, int number)
{
for (;;)
{
register int c = *code;
+
if (c == OP_END) return NULL;
/* XCLASS is used for classes that cannot be represented just by a bit
@@ -1708,17 +2051,18 @@ for (;;)
else if (c == OP_REVERSE)
{
- if (number < 0) return (uschar *)code;
- code += _pcre_OP_lengths[c];
+ if (number < 0) return (pcre_uchar *)code;
+ code += PRIV(OP_lengths)[c];
}
/* Handle capturing bracket */
- else if (c == OP_CBRA)
+ else if (c == OP_CBRA || c == OP_SCBRA ||
+ c == OP_CBRAPOS || c == OP_SCBRAPOS)
{
int n = GET2(code, 1+LINK_SIZE);
- if (n == number) return (uschar *)code;
- code += _pcre_OP_lengths[c];
+ if (n == number) return (pcre_uchar *)code;
+ code += PRIV(OP_lengths)[c];
}
/* Otherwise, we can get the item's length from the table, except that for
@@ -1746,7 +2090,8 @@ for (;;)
case OP_TYPEMINUPTO:
case OP_TYPEEXACT:
case OP_TYPEPOSUPTO:
- if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
+ if (code[1 + IMM2_SIZE] == OP_PROP
+ || code[1 + IMM2_SIZE] == OP_NOTPROP) code += 2;
break;
case OP_MARK:
@@ -1756,41 +2101,54 @@ for (;;)
break;
case OP_THEN_ARG:
- code += code[1+LINK_SIZE];
+ code += code[1];
break;
}
/* Add in the fixed length from the table */
- code += _pcre_OP_lengths[c];
+ code += PRIV(OP_lengths)[c];
/* In UTF-8 mode, opcodes that are followed by a character may be followed by
a multi-byte character. The length in the table is a minimum, so we have to
arrange to skip the extra bytes. */
-#ifdef SUPPORT_UTF8
- if (utf8) switch(c)
+#ifdef SUPPORT_UTF
+ if (utf) switch(c)
{
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_EXACT:
+ case OP_EXACTI:
case OP_UPTO:
+ case OP_UPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
case OP_POSUPTO:
+ case OP_POSUPTOI:
case OP_STAR:
+ case OP_STARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
case OP_PLUS:
+ case OP_PLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
case OP_POSPLUS:
+ case OP_POSPLUSI:
case OP_QUERY:
+ case OP_QUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
case OP_POSQUERY:
- if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f];
+ case OP_POSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
break;
}
#else
- (void)(utf8); /* Keep compiler happy by referencing function argument */
+ (void)(utf); /* Keep compiler happy by referencing function argument */
#endif
}
}
@@ -1807,13 +2165,13 @@ instance of OP_RECURSE.
Arguments:
code points to start of expression
- utf8 TRUE in UTF-8 mode
+ utf TRUE in UTF-8 / UTF-16 mode
Returns: pointer to the opcode for OP_RECURSE, or NULL if not found
*/
-static const uschar *
-find_recurse(const uschar *code, BOOL utf8)
+static const pcre_uchar *
+find_recurse(const pcre_uchar *code, BOOL utf)
{
for (;;)
{
@@ -1852,7 +2210,8 @@ for (;;)
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEEXACT:
- if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
+ if (code[1 + IMM2_SIZE] == OP_PROP
+ || code[1 + IMM2_SIZE] == OP_NOTPROP) code += 2;
break;
case OP_MARK:
@@ -1862,41 +2221,82 @@ for (;;)
break;
case OP_THEN_ARG:
- code += code[1+LINK_SIZE];
+ code += code[1];
break;
}
/* Add in the fixed length from the table */
- code += _pcre_OP_lengths[c];
+ code += PRIV(OP_lengths)[c];
/* In UTF-8 mode, opcodes that are followed by a character may be followed
by a multi-byte character. The length in the table is a minimum, so we have
to arrange to skip the extra bytes. */
-#ifdef SUPPORT_UTF8
- if (utf8) switch(c)
+#ifdef SUPPORT_UTF
+ if (utf) switch(c)
{
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
case OP_PLUS:
+ case OP_PLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
case OP_POSQUERY:
- if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f];
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
break;
}
#else
- (void)(utf8); /* Keep compiler happy by referencing function argument */
+ (void)(utf); /* Keep compiler happy by referencing function argument */
#endif
}
}
@@ -1919,22 +2319,22 @@ bracket whose current branch will already have been scanned.
Arguments:
code points to start of search
endcode points to where to stop
- utf8 TRUE if in UTF8 mode
+ utf TRUE if in UTF-8 / UTF-16 mode
cd contains pointers to tables etc.
Returns: TRUE if what is matched could be empty
*/
static BOOL
-could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8,
- compile_data *cd)
+could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode,
+ BOOL utf, compile_data *cd)
{
register int c;
-for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE);
+for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
code < endcode;
- code = first_significant_code(code + _pcre_OP_lengths[c], NULL, 0, TRUE))
+ code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE))
{
- const uschar *ccode;
+ const pcre_uchar *ccode;
c = *code;
@@ -1948,27 +2348,34 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
continue;
}
- /* Groups with zero repeats can of course be empty; skip them. */
-
- if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO)
- {
- code += _pcre_OP_lengths[c];
- do code += GET(code, 1); while (*code == OP_ALT);
- c = *code;
- continue;
- }
-
/* For a recursion/subroutine call, if its end has been reached, which
- implies a subroutine call, we can scan it. */
+ implies a backward reference subroutine call, we can scan it. If it's a
+ forward reference subroutine call, we can't. To detect forward reference
+ we have to scan up the list that is kept in the workspace. This function is
+ called only when doing the real compile, not during the pre-compile that
+ measures the size of the compiled pattern. */
if (c == OP_RECURSE)
{
- BOOL empty_branch = FALSE;
- const uschar *scode = cd->start_code + GET(code, 1);
+ const pcre_uchar *scode;
+ BOOL empty_branch;
+
+ /* Test for forward reference */
+
+ for (scode = cd->start_workspace; scode < cd->hwm; scode += LINK_SIZE)
+ if (GET(scode, 0) == code + 1 - cd->start_code) return TRUE;
+
+ /* Not a forward reference, test for completed backward reference */
+
+ empty_branch = FALSE;
+ scode = cd->start_code + GET(code, 1);
if (GET(scode, 1) == 0) return TRUE; /* Unclosed */
+
+ /* Completed backwards reference */
+
do
{
- if (could_be_empty_branch(scode, endcode, utf8, cd))
+ if (could_be_empty_branch(scode, endcode, utf, cd))
{
empty_branch = TRUE;
break;
@@ -1976,13 +2383,39 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
scode += GET(scode, 1);
}
while (*scode == OP_ALT);
+
if (!empty_branch) return FALSE; /* All branches are non-empty */
continue;
}
+ /* Groups with zero repeats can of course be empty; skip them. */
+
+ if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO ||
+ c == OP_BRAPOSZERO)
+ {
+ code += PRIV(OP_lengths)[c];
+ do code += GET(code, 1); while (*code == OP_ALT);
+ c = *code;
+ continue;
+ }
+
+ /* A nested group that is already marked as "could be empty" can just be
+ skipped. */
+
+ if (c == OP_SBRA || c == OP_SBRAPOS ||
+ c == OP_SCBRA || c == OP_SCBRAPOS)
+ {
+ do code += GET(code, 1); while (*code == OP_ALT);
+ c = *code;
+ continue;
+ }
+
/* For other groups, scan the branches. */
- if (c == OP_BRA || c == OP_CBRA || c == OP_ONCE || c == OP_COND)
+ if (c == OP_BRA || c == OP_BRAPOS ||
+ c == OP_CBRA || c == OP_CBRAPOS ||
+ c == OP_ONCE || c == OP_ONCE_NC ||
+ c == OP_COND)
{
BOOL empty_branch;
if (GET(code, 1) == 0) return TRUE; /* Hit unclosed bracket */
@@ -1998,7 +2431,7 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
empty_branch = FALSE;
do
{
- if (!empty_branch && could_be_empty_branch(code, endcode, utf8, cd))
+ if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd))
empty_branch = TRUE;
code += GET(code, 1);
}
@@ -2016,11 +2449,11 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
{
/* Check for quantifiers after a class. XCLASS is used for classes that
cannot be represented just by a bit map. This includes negated single
- high-valued characters. The length in _pcre_OP_lengths[] is zero; the
+ high-valued characters. The length in PRIV(OP_lengths)[] is zero; the
actual length is stored in the compiled code, so we must update "code"
here. */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
case OP_XCLASS:
ccode = code += GET(code, 1);
goto CHECK_CLASS_REPEAT;
@@ -2028,9 +2461,9 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
case OP_CLASS:
case OP_NCLASS:
- ccode = code + 33;
+ ccode = code + PRIV(OP_lengths)[OP_CLASS];
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
CHECK_CLASS_REPEAT:
#endif
@@ -2069,8 +2502,9 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
case OP_ALLANY:
case OP_ANYBYTE:
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_NOT:
+ case OP_NOTI:
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
@@ -2102,7 +2536,8 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEPOSUPTO:
- if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
+ if (code[1 + IMM2_SIZE] == OP_PROP
+ || code[1 + IMM2_SIZE] == OP_NOTPROP) code += 2;
break;
/* End of branch */
@@ -2110,26 +2545,36 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
case OP_KET:
case OP_KETRMAX:
case OP_KETRMIN:
+ case OP_KETRPOS:
case OP_ALT:
return TRUE;
/* In UTF-8 mode, STAR, MINSTAR, POSSTAR, QUERY, MINQUERY, POSQUERY, UPTO,
MINUPTO, and POSUPTO may be followed by a multibyte character */
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
case OP_STAR:
+ case OP_STARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
case OP_QUERY:
+ case OP_QUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
case OP_POSQUERY:
- if (utf8 && code[1] >= 0xc0) code += _pcre_utf8_table4[code[1] & 0x3f];
+ case OP_POSQUERYI:
+ if (utf && HAS_EXTRALEN(code[1])) code += GET_EXTRALEN(code[1]);
break;
case OP_UPTO:
+ case OP_UPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
case OP_POSUPTO:
- if (utf8 && code[3] >= 0xc0) code += _pcre_utf8_table4[code[3] & 0x3f];
+ case OP_POSUPTOI:
+ if (utf && HAS_EXTRALEN(code[1 + IMM2_SIZE])) code += GET_EXTRALEN(code[1 + IMM2_SIZE]);
break;
#endif
@@ -2143,7 +2588,7 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE
break;
case OP_THEN_ARG:
- code += code[1+LINK_SIZE];
+ code += code[1];
break;
/* None of the remaining opcodes are required to match a character. */
@@ -2166,24 +2611,26 @@ return TRUE;
the current branch of the current pattern to see if it could match the empty
string. If it could, we must look outwards for branches at other levels,
stopping when we pass beyond the bracket which is the subject of the recursion.
+This function is called only during the real compile, not during the
+pre-compile.
Arguments:
code points to start of the recursion
endcode points to where to stop (current RECURSE item)
bcptr points to the chain of current (unclosed) branch starts
- utf8 TRUE if in UTF-8 mode
+ utf TRUE if in UTF-8 / UTF-16 mode
cd pointers to tables etc
Returns: TRUE if what is matched could be empty
*/
static BOOL
-could_be_empty(const uschar *code, const uschar *endcode, branch_chain *bcptr,
- BOOL utf8, compile_data *cd)
+could_be_empty(const pcre_uchar *code, const pcre_uchar *endcode,
+ branch_chain *bcptr, BOOL utf, compile_data *cd)
{
while (bcptr != NULL && bcptr->current_branch >= code)
{
- if (!could_be_empty_branch(bcptr->current_branch, endcode, utf8, cd))
+ if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cd))
return FALSE;
bcptr = bcptr->outer;
}
@@ -2216,6 +2663,17 @@ where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize
"l\ower". This is a lesser evil that not diagnosing bad classes when Perl does,
I think.
+A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
+It seems that the appearance of a nested POSIX class supersedes an apparent
+external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
+a digit.
+
+In Perl, unescaped square brackets may also appear as part of class names. For
+example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
+[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not
+seem right at all. PCRE does not allow closing square brackets in POSIX class
+names.
+
Arguments:
ptr pointer to the initial [
endptr where to return the end pointer
@@ -2224,20 +2682,27 @@ Returns: TRUE or FALSE
*/
static BOOL
-check_posix_syntax(const uschar *ptr, const uschar **endptr)
+check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr)
{
int terminator; /* Don't combine these lines; the Solaris cc */
terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
for (++ptr; *ptr != 0; ptr++)
{
- if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET) ptr++; else
+ if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ ptr++;
+ else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
+ else
{
- if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
*endptr = ptr;
return TRUE;
}
+ if (*ptr == CHAR_LEFT_SQUARE_BRACKET &&
+ (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
+ ptr[1] == CHAR_EQUALS_SIGN) &&
+ check_posix_syntax(ptr, endptr))
+ return FALSE;
}
}
return FALSE;
@@ -2261,14 +2726,14 @@ Returns: a value representing the name, or -1 if unknown
*/
static int
-check_posix_name(const uschar *ptr, int len)
+check_posix_name(const pcre_uchar *ptr, int len)
{
const char *pn = posix_names;
register int yield = 0;
while (posix_name_lengths[yield] != 0)
{
if (len == posix_name_lengths[yield] &&
- strncmp((const char *)ptr, pn, len) == 0) return yield;
+ STRNCMP_UC_C8(ptr, pn, len) == 0) return yield;
pn += posix_name_lengths[yield] + 1;
yield++;
}
@@ -2300,7 +2765,7 @@ value in the reference (which is a group number).
Arguments:
group points to the start of the group
adjust the amount by which the group is to be moved
- utf8 TRUE in UTF-8 mode
+ utf TRUE in UTF-8 / UTF-16 mode
cd contains pointers to tables etc.
save_hwm the hwm forward reference pointer at the start of the group
@@ -2308,15 +2773,15 @@ Returns: nothing
*/
static void
-adjust_recurse(uschar *group, int adjust, BOOL utf8, compile_data *cd,
- uschar *save_hwm)
+adjust_recurse(pcre_uchar *group, int adjust, BOOL utf, compile_data *cd,
+ pcre_uchar *save_hwm)
{
-uschar *ptr = group;
+pcre_uchar *ptr = group;
-while ((ptr = (uschar *)find_recurse(ptr, utf8)) != NULL)
+while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
{
int offset;
- uschar *hc;
+ pcre_uchar *hc;
/* See if this recursion is on the forward reference list. If so, adjust the
reference. */
@@ -2361,14 +2826,14 @@ Arguments:
Returns: new code pointer
*/
-static uschar *
-auto_callout(uschar *code, const uschar *ptr, compile_data *cd)
+static pcre_uchar *
+auto_callout(pcre_uchar *code, const pcre_uchar *ptr, compile_data *cd)
{
*code++ = OP_CALLOUT;
*code++ = 255;
PUT(code, 0, (int)(ptr - cd->start_pattern)); /* Pattern offset */
PUT(code, LINK_SIZE, 0); /* Default length */
-return code + 2*LINK_SIZE;
+return code + 2 * LINK_SIZE;
}
@@ -2390,7 +2855,7 @@ Returns: nothing
*/
static void
-complete_callout(uschar *previous_callout, const uschar *ptr, compile_data *cd)
+complete_callout(pcre_uchar *previous_callout, const pcre_uchar *ptr, compile_data *cd)
{
int length = (int)(ptr - cd->start_pattern - GET(previous_callout, 2));
PUT(previous_callout, 2 + LINK_SIZE, length);
@@ -2473,7 +2938,7 @@ switch(ptype)
prop->chartype == ucp_Lt) == negated;
case PT_GC:
- return (pdata == _pcre_ucp_gentype[prop->chartype]) == negated;
+ return (pdata == PRIV(ucp_gentype)[prop->chartype]) == negated;
case PT_PC:
return (pdata == prop->chartype) == negated;
@@ -2484,23 +2949,23 @@ switch(ptype)
/* These are specials */
case PT_ALNUM:
- return (_pcre_ucp_gentype[prop->chartype] == ucp_L ||
- _pcre_ucp_gentype[prop->chartype] == ucp_N) == negated;
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == negated;
case PT_SPACE: /* Perl space */
- return (_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
== negated;
case PT_PXSPACE: /* POSIX space */
- return (_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
c == CHAR_FF || c == CHAR_CR)
== negated;
case PT_WORD:
- return (_pcre_ucp_gentype[prop->chartype] == ucp_L ||
- _pcre_ucp_gentype[prop->chartype] == ucp_N ||
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
c == CHAR_UNDERSCORE) == negated;
}
return FALSE;
@@ -2519,7 +2984,7 @@ sense to automatically possessify the repeated item.
Arguments:
previous pointer to the repeated opcode
- utf8 TRUE in UTF-8 mode
+ utf TRUE in UTF-8 / UTF-16 mode
ptr next character in pattern
options options bits
cd contains pointers to tables etc.
@@ -2528,10 +2993,10 @@ Returns: TRUE if possessifying is wanted
*/
static BOOL
-check_auto_possessive(const uschar *previous, BOOL utf8, const uschar *ptr,
- int options, compile_data *cd)
+check_auto_possessive(const pcre_uchar *previous, BOOL utf,
+ const pcre_uchar *ptr, int options, compile_data *cd)
{
-int c, next;
+pcre_int32 c, next;
int op_code = *previous++;
/* Skip whitespace and comments in extended mode */
@@ -2540,7 +3005,7 @@ if ((options & PCRE_EXTENDED) != 0)
{
for (;;)
{
- while ((cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
if (*ptr == CHAR_NUMBER_SIGN)
{
ptr++;
@@ -2548,8 +3013,8 @@ if ((options & PCRE_EXTENDED) != 0)
{
if (IS_NEWLINE(ptr)) { ptr += cd->nllen; break; }
ptr++;
-#ifdef SUPPORT_UTF8
- if (utf8) while ((*ptr & 0xc0) == 0x80) ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
#endif
}
}
@@ -2567,15 +3032,13 @@ if (*ptr == CHAR_BACKSLASH)
if (temperrorcode != 0) return FALSE;
ptr++; /* Point after the escape sequence */
}
-
-else if ((cd->ctypes[*ptr] & ctype_meta) == 0)
+else if (!MAX_255(*ptr) || (cd->ctypes[*ptr] & ctype_meta) == 0)
{
-#ifdef SUPPORT_UTF8
- if (utf8) { GETCHARINC(next, ptr); } else
+#ifdef SUPPORT_UTF
+ if (utf) { GETCHARINC(next, ptr); } else
#endif
next = *ptr++;
}
-
else return FALSE;
/* Skip whitespace and comments in extended mode */
@@ -2584,7 +3047,7 @@ if ((options & PCRE_EXTENDED) != 0)
{
for (;;)
{
- while ((cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
if (*ptr == CHAR_NUMBER_SIGN)
{
ptr++;
@@ -2592,8 +3055,8 @@ if ((options & PCRE_EXTENDED) != 0)
{
if (IS_NEWLINE(ptr)) { ptr += cd->nllen; break; }
ptr++;
-#ifdef SUPPORT_UTF8
- if (utf8) while ((*ptr & 0xc0) == 0x80) ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
#endif
}
}
@@ -2604,7 +3067,7 @@ if ((options & PCRE_EXTENDED) != 0)
/* If the next thing is itself optional, we have to give up. */
if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK ||
- strncmp((char *)ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0)
+ STRNCMP_UC_C8(ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0)
return FALSE;
/* Now compare the next item with the previous opcode. First, handle cases when
@@ -2613,26 +3076,26 @@ the next item is a character. */
if (next >= 0) switch(op_code)
{
case OP_CHAR:
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
GETCHARTEST(c, previous);
#else
c = *previous;
#endif
return c != next;
- /* For CHARNC (caseless character) we must check the other case. If we have
+ /* For CHARI (caseless character) we must check the other case. If we have
Unicode property support, we can use it to test the other case of
high-valued characters. */
- case OP_CHARNC:
-#ifdef SUPPORT_UTF8
+ case OP_CHARI:
+#ifdef SUPPORT_UTF
GETCHARTEST(c, previous);
#else
c = *previous;
#endif
if (c == next) return FALSE;
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
unsigned int othercase;
if (next < 128) othercase = cd->fcc[next]; else
@@ -2644,50 +3107,60 @@ if (next >= 0) switch(op_code)
return (unsigned int)c != othercase;
}
else
-#endif /* SUPPORT_UTF8 */
- return (c != cd->fcc[next]); /* Non-UTF-8 mode */
-
- /* For OP_NOT, its data is always a single-byte character. */
+#endif /* SUPPORT_UTF */
+ return (c != TABLE_GET((unsigned int)next, cd->fcc, next)); /* Non-UTF-8 mode */
case OP_NOT:
- if ((c = *previous) == next) return TRUE;
- if ((options & PCRE_CASELESS) == 0) return FALSE;
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ GETCHARTEST(c, previous);
+#else
+ c = *previous;
+#endif
+ return c == next;
+
+ case OP_NOTI:
+#ifdef SUPPORT_UTF
+ GETCHARTEST(c, previous);
+#else
+ c = *previous;
+#endif
+ if (c == next) return TRUE;
+#ifdef SUPPORT_UTF
+ if (utf)
{
unsigned int othercase;
if (next < 128) othercase = cd->fcc[next]; else
#ifdef SUPPORT_UCP
- othercase = UCD_OTHERCASE(next);
+ othercase = UCD_OTHERCASE((unsigned int)next);
#else
othercase = NOTACHAR;
#endif
return (unsigned int)c == othercase;
}
else
-#endif /* SUPPORT_UTF8 */
- return (c == cd->fcc[next]); /* Non-UTF-8 mode */
+#endif /* SUPPORT_UTF */
+ return (c == TABLE_GET((unsigned int)next, cd->fcc, next)); /* Non-UTF-8 mode */
/* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set.
When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
case OP_DIGIT:
- return next > 127 || (cd->ctypes[next] & ctype_digit) == 0;
+ return next > 255 || (cd->ctypes[next] & ctype_digit) == 0;
case OP_NOT_DIGIT:
- return next <= 127 && (cd->ctypes[next] & ctype_digit) != 0;
+ return next <= 255 && (cd->ctypes[next] & ctype_digit) != 0;
case OP_WHITESPACE:
- return next > 127 || (cd->ctypes[next] & ctype_space) == 0;
+ return next > 255 || (cd->ctypes[next] & ctype_space) == 0;
case OP_NOT_WHITESPACE:
- return next <= 127 && (cd->ctypes[next] & ctype_space) != 0;
+ return next <= 255 && (cd->ctypes[next] & ctype_space) != 0;
case OP_WORDCHAR:
- return next > 127 || (cd->ctypes[next] & ctype_word) == 0;
+ return next > 255 || (cd->ctypes[next] & ctype_word) == 0;
case OP_NOT_WORDCHAR:
- return next <= 127 && (cd->ctypes[next] & ctype_word) != 0;
+ return next <= 255 && (cd->ctypes[next] & ctype_word) != 0;
case OP_HSPACE:
case OP_NOT_HSPACE:
@@ -2756,8 +3229,8 @@ replaced by OP_PROP codes when PCRE_UCP is set. */
switch(op_code)
{
case OP_CHAR:
- case OP_CHARNC:
-#ifdef SUPPORT_UTF8
+ case OP_CHARI:
+#ifdef SUPPORT_UTF
GETCHARTEST(c, previous);
#else
c = *previous;
@@ -2765,22 +3238,22 @@ switch(op_code)
switch(-next)
{
case ESC_d:
- return c > 127 || (cd->ctypes[c] & ctype_digit) == 0;
+ return c > 255 || (cd->ctypes[c] & ctype_digit) == 0;
case ESC_D:
- return c <= 127 && (cd->ctypes[c] & ctype_digit) != 0;
+ return c <= 255 && (cd->ctypes[c] & ctype_digit) != 0;
case ESC_s:
- return c > 127 || (cd->ctypes[c] & ctype_space) == 0;
+ return c > 255 || (cd->ctypes[c] & ctype_space) == 0;
case ESC_S:
- return c <= 127 && (cd->ctypes[c] & ctype_space) != 0;
+ return c <= 255 && (cd->ctypes[c] & ctype_space) != 0;
case ESC_w:
- return c > 127 || (cd->ctypes[c] & ctype_word) == 0;
+ return c > 255 || (cd->ctypes[c] & ctype_word) == 0;
case ESC_W:
- return c <= 127 && (cd->ctypes[c] & ctype_word) != 0;
+ return c <= 255 && (cd->ctypes[c] & ctype_word) != 0;
case ESC_h:
case ESC_H:
@@ -2862,7 +3335,7 @@ switch(op_code)
to the original \d etc. At this point, ptr will point to a zero byte. */
if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK ||
- strncmp((char *)ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0)
+ STRNCMP_UC_C8(ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0)
return FALSE;
/* Do the property check. */
@@ -2889,10 +3362,10 @@ switch(op_code)
return next == -ESC_d;
case OP_WHITESPACE:
- return next == -ESC_S || next == -ESC_d || next == -ESC_w || next == -ESC_R;
+ return next == -ESC_S || next == -ESC_d || next == -ESC_w;
case OP_NOT_WHITESPACE:
- return next == -ESC_s || next == -ESC_h || next == -ESC_v;
+ return next == -ESC_s || next == -ESC_h || next == -ESC_v || next == -ESC_R;
case OP_HSPACE:
return next == -ESC_S || next == -ESC_H || next == -ESC_d ||
@@ -2940,9 +3413,10 @@ Arguments:
codeptr points to the pointer to the current code point
ptrptr points to the current pattern pointer
errorcodeptr points to error code variable
- firstbyteptr set to initial literal character, or < 0 (REQ_UNSET, REQ_NONE)
- reqbyteptr set to the last literal character required, else < 0
+ firstcharptr set to initial literal character, or < 0 (REQ_UNSET, REQ_NONE)
+ reqcharptr set to the last literal character required, else < 0
bcptr points to current branch chain
+ cond_depth conditional nesting depth
cd contains pointers to tables etc.
lengthptr NULL during the real compile phase
points to length accumulator during pre-compile phase
@@ -2952,44 +3426,54 @@ Returns: TRUE on success
*/
static BOOL
-compile_branch(int *optionsptr, uschar **codeptr, const uschar **ptrptr,
- int *errorcodeptr, int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr,
+compile_branch(int *optionsptr, pcre_uchar **codeptr,
+ const pcre_uchar **ptrptr, int *errorcodeptr, pcre_int32 *firstcharptr,
+ pcre_int32 *reqcharptr, branch_chain *bcptr, int cond_depth,
compile_data *cd, int *lengthptr)
{
int repeat_type, op_type;
int repeat_min = 0, repeat_max = 0; /* To please picky compilers */
int bravalue = 0;
int greedy_default, greedy_non_default;
-int firstbyte, reqbyte;
-int zeroreqbyte, zerofirstbyte;
-int req_caseopt, reqvary, tempreqvary;
-int options = *optionsptr;
+pcre_int32 firstchar, reqchar;
+pcre_int32 zeroreqchar, zerofirstchar;
+pcre_int32 req_caseopt, reqvary, tempreqvary;
+int options = *optionsptr; /* May change dynamically */
int after_manual_callout = 0;
int length_prevgroup = 0;
register int c;
-register uschar *code = *codeptr;
-uschar *last_code = code;
-uschar *orig_code = code;
-uschar *tempcode;
+register pcre_uchar *code = *codeptr;
+pcre_uchar *last_code = code;
+pcre_uchar *orig_code = code;
+pcre_uchar *tempcode;
BOOL inescq = FALSE;
-BOOL groupsetfirstbyte = FALSE;
-const uschar *ptr = *ptrptr;
-const uschar *tempptr;
-const uschar *nestptr = NULL;
-uschar *previous = NULL;
-uschar *previous_callout = NULL;
-uschar *save_hwm = NULL;
-uschar classbits[32];
-
-#ifdef SUPPORT_UTF8
-BOOL class_utf8;
-BOOL utf8 = (options & PCRE_UTF8) != 0;
-uschar *class_utf8data;
-uschar *class_utf8data_base;
-uschar utf8_char[6];
+BOOL groupsetfirstchar = FALSE;
+const pcre_uchar *ptr = *ptrptr;
+const pcre_uchar *tempptr;
+const pcre_uchar *nestptr = NULL;
+pcre_uchar *previous = NULL;
+pcre_uchar *previous_callout = NULL;
+pcre_uchar *save_hwm = NULL;
+pcre_uint8 classbits[32];
+
+/* We can fish out the UTF-8 setting once and for all into a BOOL, but we
+must not do this for other options (e.g. PCRE_EXTENDED) because they may change
+dynamically as we process the pattern. */
+
+#ifdef SUPPORT_UTF
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+BOOL utf = (options & PCRE_UTF8) != 0;
+pcre_uchar utf_chars[6];
#else
-BOOL utf8 = FALSE;
-uschar *utf8_char = NULL;
+BOOL utf = FALSE;
+#endif
+
+/* Helper variables for OP_XCLASS opcode (for characters > 255). */
+
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+BOOL xclass;
+pcre_uchar *class_uchardata;
+pcre_uchar *class_uchardata_base;
#endif
#ifdef PCRE_DEBUG
@@ -3003,22 +3487,23 @@ greedy_non_default = greedy_default ^ 1;
/* Initialize no first byte, no required byte. REQ_UNSET means "no char
matching encountered yet". It gets changed to REQ_NONE if we hit something that
-matches a non-fixed char first char; reqbyte just remains unset if we never
+matches a non-fixed char first char; reqchar just remains unset if we never
find one.
When we hit a repeat whose minimum is zero, we may have to adjust these values
to take the zero repeat into account. This is implemented by setting them to
-zerofirstbyte and zeroreqbyte when such a repeat is encountered. The individual
+zerofirstbyte and zeroreqchar when such a repeat is encountered. The individual
item types that can be repeated set these backoff variables appropriately. */
-firstbyte = reqbyte = zerofirstbyte = zeroreqbyte = REQ_UNSET;
+firstchar = reqchar = zerofirstchar = zeroreqchar = REQ_UNSET;
-/* The variable req_caseopt contains either the REQ_CASELESS value or zero,
-according to the current setting of the caseless flag. REQ_CASELESS is a bit
-value > 255. It is added into the firstbyte or reqbyte variables to record the
-case status of the value. This is used only for ASCII characters. */
+/* The variable req_caseopt contains either the REQ_CASELESS value
+or zero, according to the current setting of the caseless flag. The
+REQ_CASELESS leaves the lower 28 bit empty. It is added into the
+firstchar or reqchar variables to record the case status of the
+value. This is used only for ASCII characters. */
-req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
+req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
/* Switch on next character until the end of the branch */
@@ -3030,19 +3515,20 @@ for (;; ptr++)
BOOL is_quantifier;
BOOL is_recurse;
BOOL reset_bracount;
- int class_charcount;
- int class_lastchar;
+ int class_has_8bitchar;
+ int class_single_char;
int newoptions;
int recno;
int refsign;
int skipbytes;
- int subreqbyte;
- int subfirstbyte;
+ int subreqchar;
+ int subfirstchar;
int terminator;
int mclength;
- uschar mcbuffer[8];
+ int tempbracount;
+ pcre_uchar mcbuffer[8];
- /* Get next byte in the pattern */
+ /* Get next character in the pattern */
c = *ptr;
@@ -3064,7 +3550,8 @@ for (;; ptr++)
#ifdef PCRE_DEBUG
if (code > cd->hwm) cd->hwm = code; /* High water info */
#endif
- if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */
+ if (code > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN) /* Check for overrun */
{
*errorcodeptr = ERR52;
goto FAILED;
@@ -3087,7 +3574,8 @@ for (;; ptr++)
}
*lengthptr += (int)(code - last_code);
- DPRINTF(("length=%d added %d c=%c\n", *lengthptr, code - last_code, c));
+ DPRINTF(("length=%d added %d c=%c (0x%x)\n", *lengthptr,
+ (int)(code - last_code), c, c));
/* If "previous" is set and it is not at the start of the work space, move
it back to there, in order to avoid filling up the work space. Otherwise,
@@ -3097,7 +3585,7 @@ for (;; ptr++)
{
if (previous > orig_code)
{
- memmove(orig_code, previous, code - previous);
+ memmove(orig_code, previous, IN_UCHARS(code - previous));
code -= previous - orig_code;
previous = orig_code;
}
@@ -3113,7 +3601,8 @@ for (;; ptr++)
/* In the real compile phase, just check the workspace used by the forward
reference list. */
- else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK)
+ else if (cd->hwm > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN)
{
*errorcodeptr = ERR52;
goto FAILED;
@@ -3161,11 +3650,11 @@ for (;; ptr++)
previous_callout = NULL;
}
- /* In extended mode, skip white space and comments */
+ /* In extended mode, skip white space and comments. */
if ((options & PCRE_EXTENDED) != 0)
{
- if ((cd->ctypes[c] & ctype_space) != 0) continue;
+ if (MAX_255(*ptr) && (cd->ctypes[c] & ctype_space) != 0) continue;
if (c == CHAR_NUMBER_SIGN)
{
ptr++;
@@ -3173,8 +3662,8 @@ for (;; ptr++)
{
if (IS_NEWLINE(ptr)) { ptr += cd->nllen - 1; break; }
ptr++;
-#ifdef SUPPORT_UTF8
- if (utf8) while ((*ptr & 0xc0) == 0x80) ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
#endif
}
if (*ptr != 0) continue;
@@ -3198,8 +3687,8 @@ for (;; ptr++)
case 0: /* The branch terminates at string end */
case CHAR_VERTICAL_LINE: /* or | or ) */
case CHAR_RIGHT_PARENTHESIS:
- *firstbyteptr = firstbyte;
- *reqbyteptr = reqbyte;
+ *firstcharptr = firstchar;
+ *reqcharptr = reqchar;
*codeptr = code;
*ptrptr = ptr;
if (lengthptr != NULL)
@@ -3220,26 +3709,27 @@ for (;; ptr++)
the setting of any following char as a first character. */
case CHAR_CIRCUMFLEX_ACCENT:
+ previous = NULL;
if ((options & PCRE_MULTILINE) != 0)
{
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
+ *code++ = OP_CIRCM;
}
- previous = NULL;
- *code++ = OP_CIRC;
+ else *code++ = OP_CIRC;
break;
case CHAR_DOLLAR_SIGN:
previous = NULL;
- *code++ = OP_DOLL;
+ *code++ = ((options & PCRE_MULTILINE) != 0)? OP_DOLLM : OP_DOLL;
break;
/* There can never be a first char if '.' is first, whatever happens about
- repeats. The value of reqbyte doesn't change either. */
+ repeats. The value of reqchar doesn't change either. */
case CHAR_DOT:
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
+ zerofirstchar = firstchar;
+ zeroreqchar = reqchar;
previous = code;
*code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY;
break;
@@ -3294,8 +3784,7 @@ for (;; ptr++)
{
if (ptr[1] == CHAR_E)
ptr++;
- else if (strncmp((const char *)ptr+1,
- STR_Q STR_BACKSLASH STR_E, 3) == 0)
+ else if (STRNCMP_UC_C8(ptr + 1, STR_Q STR_BACKSLASH STR_E, 3) == 0)
ptr += 3;
else
break;
@@ -3314,8 +3803,8 @@ for (;; ptr++)
(cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
{
*code++ = negate_class? OP_ALLANY : OP_FAIL;
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
+ zerofirstchar = firstchar;
break;
}
@@ -3325,24 +3814,25 @@ for (;; ptr++)
should_flip_negation = FALSE;
- /* Keep a count of chars with values < 256 so that we can optimize the case
- of just a single character (as long as it's < 256). However, For higher
- valued UTF-8 characters, we don't yet do any optimization. */
+ /* For optimization purposes, we track some properties of the class.
+ class_has_8bitchar will be non-zero, if the class contains at least one
+ < 256 character. class_single_char will be 1 if the class contains only
+ a single character. */
- class_charcount = 0;
- class_lastchar = -1;
+ class_has_8bitchar = 0;
+ class_single_char = 0;
/* Initialize the 32-char bit map to all zeros. We build the map in a
temporary bit of memory, in case the class contains only 1 character (less
than 256), because in that case the compiled code doesn't use the bit map.
*/
- memset(classbits, 0, 32 * sizeof(uschar));
+ memset(classbits, 0, 32 * sizeof(pcre_uint8));
-#ifdef SUPPORT_UTF8
- class_utf8 = FALSE; /* No chars >= 256 */
- class_utf8data = code + LINK_SIZE + 2; /* For UTF-8 items */
- class_utf8data_base = class_utf8data; /* For resetting in pass 1 */
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ xclass = FALSE; /* No chars >= 256 */
+ class_uchardata = code + LINK_SIZE + 2; /* For UTF-8 items */
+ class_uchardata_base = class_uchardata; /* For resetting in pass 1 */
#endif
/* Process characters until ] is reached. By writing this as a "do" it
@@ -3351,25 +3841,26 @@ for (;; ptr++)
if (c != 0) do
{
- const uschar *oldptr;
+ const pcre_uchar *oldptr;
-#ifdef SUPPORT_UTF8
- if (utf8 && c > 127)
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(c))
{ /* Braces are required because the */
GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */
}
+#endif
- /* In the pre-compile phase, accumulate the length of any UTF-8 extra
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ /* In the pre-compile phase, accumulate the length of any extra
data and reset the pointer. This is so that very large classes that
- contain a zillion UTF-8 characters no longer overwrite the work space
+ contain a zillion > 255 characters no longer overwrite the work space
(which is on the stack). */
if (lengthptr != NULL)
{
- *lengthptr += class_utf8data - class_utf8data_base;
- class_utf8data = class_utf8data_base;
+ *lengthptr += class_uchardata - class_uchardata_base;
+ class_uchardata = class_uchardata_base;
}
-
#endif
/* Inside \Q...\E everything is literal except \E */
@@ -3397,8 +3888,8 @@ for (;; ptr++)
{
BOOL local_negate = FALSE;
int posix_class, taboffset, tabopt;
- register const uschar *cbits = cd->cbits;
- uschar pbits[32];
+ register const pcre_uint8 *cbits = cd->cbits;
+ pcre_uint8 pbits[32];
if (ptr[1] != CHAR_COLON)
{
@@ -3453,7 +3944,7 @@ for (;; ptr++)
/* Copy in the first table (always present) */
memcpy(pbits, cbits + posix_class_maps[posix_class],
- 32 * sizeof(uschar));
+ 32 * sizeof(pcre_uint8));
/* If there is a second table, add or remove it as required. */
@@ -3484,16 +3975,20 @@ for (;; ptr++)
for (c = 0; c < 32; c++) classbits[c] |= pbits[c];
ptr = tempptr + 1;
- class_charcount = 10; /* Set > 1; assumes more than 1 per class */
+ /* Every class contains at least one < 256 characters. */
+ class_has_8bitchar = 1;
+ /* Every class contains at least two characters. */
+ class_single_char = 2;
continue; /* End of POSIX syntax handling */
}
/* Backslash may introduce a single character, or it may introduce one
of the specials, which just set a flag. The sequence \b is a special
case. Inside a class (and only there) it is treated as backspace. We
- assume that other escapes have more than one character in them, so set
- class_charcount bigger than one. Unrecognized escapes fall through and
- are either treated as literal characters (by default), or are faulted if
+ assume that other escapes have more than one character in them, so
+ speculatively set both class_has_8bitchar and class_single_char bigger
+ than one. Unrecognized escapes fall through and are either treated
+ as literal characters (by default), or are faulted if
PCRE_EXTRA is set. */
if (c == CHAR_BACKSLASH)
@@ -3502,6 +3997,11 @@ for (;; ptr++)
if (*errorcodeptr != 0) goto FAILED;
if (-c == ESC_b) c = CHAR_BS; /* \b is backspace in a class */
+ else if (-c == ESC_N) /* \N is not supported in a class */
+ {
+ *errorcodeptr = ERR71;
+ goto FAILED;
+ }
else if (-c == ESC_Q) /* Handle start of quoted string */
{
if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
@@ -3515,8 +4015,11 @@ for (;; ptr++)
if (c < 0)
{
- register const uschar *cbits = cd->cbits;
- class_charcount += 2; /* Greater than 1 is what matters */
+ register const pcre_uint8 *cbits = cd->cbits;
+ /* Every class contains at least two < 256 characters. */
+ class_has_8bitchar++;
+ /* Every class contains at least two characters. */
+ class_single_char += 2;
switch (-c)
{
@@ -3529,7 +4032,7 @@ for (;; ptr++)
case ESC_SU:
nestptr = ptr;
ptr = substitutes[-c - ESC_DU] - 1; /* Just before substitute */
- class_charcount -= 2; /* Undo! */
+ class_has_8bitchar--; /* Undo! */
continue;
#endif
case ESC_d:
@@ -3570,23 +4073,38 @@ for (;; ptr++)
SETBIT(classbits, 0x09); /* VT */
SETBIT(classbits, 0x20); /* SPACE */
SETBIT(classbits, 0xa0); /* NSBP */
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifndef COMPILE_PCRE8
+ xclass = TRUE;
+ *class_uchardata++ = XCL_SINGLE;
+ *class_uchardata++ = 0x1680;
+ *class_uchardata++ = XCL_SINGLE;
+ *class_uchardata++ = 0x180e;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x2000;
+ *class_uchardata++ = 0x200a;
+ *class_uchardata++ = XCL_SINGLE;
+ *class_uchardata++ = 0x202f;
+ *class_uchardata++ = XCL_SINGLE;
+ *class_uchardata++ = 0x205f;
+ *class_uchardata++ = XCL_SINGLE;
+ *class_uchardata++ = 0x3000;
+#elif defined SUPPORT_UTF
+ if (utf)
{
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(0x1680, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(0x180e, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x2000, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x200A, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(0x202f, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(0x205f, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(0x3000, class_utf8data);
+ xclass = TRUE;
+ *class_uchardata++ = XCL_SINGLE;
+ class_uchardata += PRIV(ord2utf)(0x1680, class_uchardata);
+ *class_uchardata++ = XCL_SINGLE;
+ class_uchardata += PRIV(ord2utf)(0x180e, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x2000, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x200a, class_uchardata);
+ *class_uchardata++ = XCL_SINGLE;
+ class_uchardata += PRIV(ord2utf)(0x202f, class_uchardata);
+ *class_uchardata++ = XCL_SINGLE;
+ class_uchardata += PRIV(ord2utf)(0x205f, class_uchardata);
+ *class_uchardata++ = XCL_SINGLE;
+ class_uchardata += PRIV(ord2utf)(0x3000, class_uchardata);
}
#endif
continue;
@@ -3604,32 +4122,59 @@ for (;; ptr++)
}
classbits[c] |= x;
}
-
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifndef COMPILE_PCRE8
+ xclass = TRUE;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x0100;
+ *class_uchardata++ = 0x167f;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x1681;
+ *class_uchardata++ = 0x180d;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x180f;
+ *class_uchardata++ = 0x1fff;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x200b;
+ *class_uchardata++ = 0x202e;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x2030;
+ *class_uchardata++ = 0x205e;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x2060;
+ *class_uchardata++ = 0x2fff;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x3001;
+#ifdef SUPPORT_UTF
+ if (utf)
+ class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
+ else
+#endif
+ *class_uchardata++ = 0xffff;
+#elif defined SUPPORT_UTF
+ if (utf)
{
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x0100, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x167f, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x1681, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x180d, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x180f, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x1fff, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x200B, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x202e, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x2030, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x205e, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x2060, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x2fff, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x3001, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x7fffffff, class_utf8data);
+ xclass = TRUE;
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x0100, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x167f, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x1681, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x180d, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x180f, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x1fff, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x200b, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x202e, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x2030, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x205e, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x2060, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x2fff, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x3001, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
}
#endif
continue;
@@ -3640,13 +4185,18 @@ for (;; ptr++)
SETBIT(classbits, 0x0c); /* FF */
SETBIT(classbits, 0x0d); /* CR */
SETBIT(classbits, 0x85); /* NEL */
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifndef COMPILE_PCRE8
+ xclass = TRUE;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x2028;
+ *class_uchardata++ = 0x2029;
+#elif defined SUPPORT_UTF
+ if (utf)
{
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x2028, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x2029, class_utf8data);
+ xclass = TRUE;
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x2028, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x2029, class_uchardata);
}
#endif
continue;
@@ -3668,16 +4218,29 @@ for (;; ptr++)
classbits[c] |= x;
}
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifndef COMPILE_PCRE8
+ xclass = TRUE;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x0100;
+ *class_uchardata++ = 0x2027;
+ *class_uchardata++ = XCL_RANGE;
+ *class_uchardata++ = 0x202a;
+#ifdef SUPPORT_UTF
+ if (utf)
+ class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
+ else
+#endif
+ *class_uchardata++ = 0xffff;
+#elif defined SUPPORT_UTF
+ if (utf)
{
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x0100, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x2027, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(0x2029, class_utf8data);
- class_utf8data += _pcre_ord2utf8(0x7fffffff, class_utf8data);
+ xclass = TRUE;
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x0100, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x2027, class_uchardata);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x202a, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
}
#endif
continue;
@@ -3690,12 +4253,12 @@ for (;; ptr++)
int pdata;
int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr);
if (ptype < 0) goto FAILED;
- class_utf8 = TRUE;
- *class_utf8data++ = ((-c == ESC_p) != negated)?
+ xclass = TRUE;
+ *class_uchardata++ = ((-c == ESC_p) != negated)?
XCL_PROP : XCL_NOTPROP;
- *class_utf8data++ = ptype;
- *class_utf8data++ = pdata;
- class_charcount -= 2; /* Not a < 256 character */
+ *class_uchardata++ = ptype;
+ *class_uchardata++ = pdata;
+ class_has_8bitchar--; /* Undo! */
continue;
}
#endif
@@ -3709,14 +4272,15 @@ for (;; ptr++)
*errorcodeptr = ERR7;
goto FAILED;
}
- class_charcount -= 2; /* Undo the default count from above */
- c = *ptr; /* Get the final character and fall through */
+ class_has_8bitchar--; /* Undo the speculative increase. */
+ class_single_char -= 2; /* Undo the speculative increase. */
+ c = *ptr; /* Get the final character and fall through */
break;
}
}
/* Fall through if we have a single character (c >= 0). This may be
- greater than 256 in UTF-8 mode. */
+ greater than 256. */
} /* End of backslash handling */
@@ -3764,8 +4328,8 @@ for (;; ptr++)
goto LONE_SINGLE_CHARACTER;
}
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{ /* Braces are required because the */
GETCHARLEN(d, ptr, ptr); /* macro generates multiple statements */
}
@@ -3809,22 +4373,36 @@ for (;; ptr++)
if (d == CHAR_CR || d == CHAR_NL) cd->external_flags |= PCRE_HASCRORLF;
+ /* Since we found a character range, single character optimizations
+ cannot be done anymore. */
+ class_single_char = 2;
+
/* In UTF-8 mode, if the upper limit is > 255, or > 127 for caseless
matching, we have to use an XCLASS with extra data items. Caseless
matching for characters > 127 is available only if UCP support is
available. */
-#ifdef SUPPORT_UTF8
- if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))
+#if defined SUPPORT_UTF && !(defined COMPILE_PCRE8)
+ if ((d > 255) || (utf && ((options & PCRE_CASELESS) != 0 && d > 127)))
+#elif defined SUPPORT_UTF
+ if (utf && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))
+#elif !(defined COMPILE_PCRE8)
+ if (d > 255)
+#endif
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
{
- class_utf8 = TRUE;
+ xclass = TRUE;
/* With UCP support, we can find the other case equivalents of
the relevant characters. There may be several ranges. Optimize how
they fit with the basic range. */
#ifdef SUPPORT_UCP
+#ifndef COMPILE_PCRE8
+ if (utf && (options & PCRE_CASELESS) != 0)
+#else
if ((options & PCRE_CASELESS) != 0)
+#endif
{
unsigned int occ, ocd;
unsigned int cc = c;
@@ -3850,14 +4428,14 @@ for (;; ptr++)
if (occ == ocd)
{
- *class_utf8data++ = XCL_SINGLE;
+ *class_uchardata++ = XCL_SINGLE;
}
else
{
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(occ, class_utf8data);
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(occ, class_uchardata);
}
- class_utf8data += _pcre_ord2utf8(ocd, class_utf8data);
+ class_uchardata += PRIV(ord2utf)(ocd, class_uchardata);
}
}
#endif /* SUPPORT_UCP */
@@ -3865,33 +4443,69 @@ for (;; ptr++)
/* Now record the original range, possibly modified for UCP caseless
overlapping ranges. */
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _pcre_ord2utf8(c, class_utf8data);
- class_utf8data += _pcre_ord2utf8(d, class_utf8data);
+ *class_uchardata++ = XCL_RANGE;
+#ifdef SUPPORT_UTF
+#ifndef COMPILE_PCRE8
+ if (utf)
+ {
+ class_uchardata += PRIV(ord2utf)(c, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(d, class_uchardata);
+ }
+ else
+ {
+ *class_uchardata++ = c;
+ *class_uchardata++ = d;
+ }
+#else
+ class_uchardata += PRIV(ord2utf)(c, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(d, class_uchardata);
+#endif
+#else /* SUPPORT_UTF */
+ *class_uchardata++ = c;
+ *class_uchardata++ = d;
+#endif /* SUPPORT_UTF */
/* With UCP support, we are done. Without UCP support, there is no
- caseless matching for UTF-8 characters > 127; we can use the bit map
- for the smaller ones. */
+ caseless matching for UTF characters > 127; we can use the bit map
+ for the smaller ones. As for 16 bit characters without UTF, we
+ can still use */
#ifdef SUPPORT_UCP
- continue; /* With next character in the class */
-#else
- if ((options & PCRE_CASELESS) == 0 || c > 127) continue;
+#ifndef COMPILE_PCRE8
+ if (utf)
+#endif
+ continue; /* With next character in the class */
+#endif /* SUPPORT_UCP */
+#if defined SUPPORT_UTF && !defined(SUPPORT_UCP) && !(defined COMPILE_PCRE8)
+ if (utf)
+ {
+ if ((options & PCRE_CASELESS) == 0 || c > 127) continue;
+ /* Adjust upper limit and fall through to set up the map */
+ d = 127;
+ }
+ else
+ {
+ if (c > 255) continue;
+ /* Adjust upper limit and fall through to set up the map */
+ d = 255;
+ }
+#elif defined SUPPORT_UTF && !defined(SUPPORT_UCP)
+ if ((options & PCRE_CASELESS) == 0 || c > 127) continue;
/* Adjust upper limit and fall through to set up the map */
-
d = 127;
-
-#endif /* SUPPORT_UCP */
+#else
+ if (c > 255) continue;
+ /* Adjust upper limit and fall through to set up the map */
+ d = 255;
+#endif /* SUPPORT_UTF && !SUPPORT_UCP && !COMPILE_PCRE8 */
}
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF || !COMPILE_PCRE8 */
- /* We use the bit map for all cases when not in UTF-8 mode; else
- ranges that lie entirely within 0-127 when there is UCP support; else
- for partial ranges without UCP support. */
+ /* We use the bit map for 8 bit mode, or when the characters fall
+ partially or entirely to [0-255] ([0-127] for UCP) ranges. */
- class_charcount += d - c + 1;
- class_lastchar = d;
+ class_has_8bitchar = 1;
/* We can save a bit of time by skipping this in the pre-compile. */
@@ -3900,7 +4514,7 @@ for (;; ptr++)
classbits[c/8] |= (1 << (c&7));
if ((options & PCRE_CASELESS) != 0)
{
- int uc = cd->fcc[c]; /* flip case */
+ int uc = cd->fcc[c]; /* flip case */
classbits[uc/8] |= (1 << (uc&7));
}
}
@@ -3914,41 +4528,110 @@ for (;; ptr++)
LONE_SINGLE_CHARACTER:
- /* Handle a character that cannot go in the bit map */
+ /* Only the value of 1 matters for class_single_char. */
+
+ if (class_single_char < 2) class_single_char++;
+
+ /* If class_charcount is 1, we saw precisely one character. As long as
+ there was no use of \p or \P, in other words, no use of any XCLASS
+ features, we can optimize.
+
+ The optimization throws away the bit map. We turn the item into a
+ 1-character OP_CHAR[I] if it's positive, or OP_NOT[I] if it's negative.
+ In the positive case, it can cause firstchar to be set. Otherwise, there
+ can be no first char if this item is first, whatever repeat count may
+ follow. In the case of reqchar, save the previous value for reinstating. */
+
+ if (class_single_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ {
+ ptr++;
+ zeroreqchar = reqchar;
+
+ if (negate_class)
+ {
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
+ zerofirstchar = firstchar;
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_NOTI: OP_NOT;
+#ifdef SUPPORT_UTF
+ if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
+ code += PRIV(ord2utf)(c, code);
+ else
+#endif
+ *code++ = c;
+ goto NOT_CHAR;
+ }
+
+ /* For a single, positive character, get the value into mcbuffer, and
+ then we can handle this with the normal one-character code. */
-#ifdef SUPPORT_UTF8
- if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))
+#ifdef SUPPORT_UTF
+ if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
+ mclength = PRIV(ord2utf)(c, mcbuffer);
+ else
+#endif
+ {
+ mcbuffer[0] = c;
+ mclength = 1;
+ }
+ goto ONE_CHAR;
+ } /* End of 1-char optimization */
+
+ /* Handle a character that cannot go in the bit map. */
+
+#if defined SUPPORT_UTF && !(defined COMPILE_PCRE8)
+ if ((c > 255) || (utf && ((options & PCRE_CASELESS) != 0 && c > 127)))
+#elif defined SUPPORT_UTF
+ if (utf && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))
+#elif !(defined COMPILE_PCRE8)
+ if (c > 255)
+#endif
+
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
{
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(c, class_utf8data);
+ xclass = TRUE;
+ *class_uchardata++ = XCL_SINGLE;
+#ifdef SUPPORT_UTF
+#ifndef COMPILE_PCRE8
+ /* In non 8 bit mode, we can get here even if we are not in UTF mode. */
+ if (!utf)
+ *class_uchardata++ = c;
+ else
+#endif
+ class_uchardata += PRIV(ord2utf)(c, class_uchardata);
+#else /* SUPPORT_UTF */
+ *class_uchardata++ = c;
+#endif /* SUPPORT_UTF */
#ifdef SUPPORT_UCP
+#ifdef COMPILE_PCRE8
if ((options & PCRE_CASELESS) != 0)
+#else
+ /* In non 8 bit mode, we can get here even if we are not in UTF mode. */
+ if (utf && (options & PCRE_CASELESS) != 0)
+#endif
{
unsigned int othercase;
- if ((othercase = UCD_OTHERCASE(c)) != c)
+ if ((int)(othercase = UCD_OTHERCASE(c)) != c)
{
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _pcre_ord2utf8(othercase, class_utf8data);
+ *class_uchardata++ = XCL_SINGLE;
+ class_uchardata += PRIV(ord2utf)(othercase, class_uchardata);
}
}
#endif /* SUPPORT_UCP */
}
else
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF || COMPILE_PCRE16 */
/* Handle a single-byte character */
{
+ class_has_8bitchar = 1;
classbits[c/8] |= (1 << (c&7));
if ((options & PCRE_CASELESS) != 0)
{
- c = cd->fcc[c]; /* flip case */
+ c = cd->fcc[c]; /* flip case */
classbits[c/8] |= (1 << (c&7));
}
- class_charcount++;
- class_lastchar = c;
}
}
@@ -3969,66 +4652,13 @@ for (;; ptr++)
goto FAILED;
}
- /* If class_charcount is 1, we saw precisely one character whose value is
- less than 256. As long as there were no characters >= 128 and there was no
- use of \p or \P, in other words, no use of any XCLASS features, we can
- optimize.
-
- In UTF-8 mode, we can optimize the negative case only if there were no
- characters >= 128 because OP_NOT and the related opcodes like OP_NOTSTAR
- operate on single-bytes only. This is an historical hangover. Maybe one day
- we can tidy these opcodes to handle multi-byte characters.
-
- The optimization throws away the bit map. We turn the item into a
- 1-character OP_CHAR[NC] if it's positive, or OP_NOT if it's negative. Note
- that OP_NOT does not support multibyte characters. In the positive case, it
- can cause firstbyte to be set. Otherwise, there can be no first char if
- this item is first, whatever repeat count may follow. In the case of
- reqbyte, save the previous value for reinstating. */
-
-#ifdef SUPPORT_UTF8
- if (class_charcount == 1 && !class_utf8 &&
- (!utf8 || !negate_class || class_lastchar < 128))
-#else
- if (class_charcount == 1)
-#endif
- {
- zeroreqbyte = reqbyte;
-
- /* The OP_NOT opcode works on one-byte characters only. */
-
- if (negate_class)
- {
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- *code++ = OP_NOT;
- *code++ = class_lastchar;
- break;
- }
-
- /* For a single, positive character, get the value into mcbuffer, and
- then we can handle this with the normal one-character code. */
+ /* If this is the first thing in the branch, there can be no first char
+ setting, whatever the repeat count. Any reqchar setting must remain
+ unchanged after any kind of repeat. */
-#ifdef SUPPORT_UTF8
- if (utf8 && class_lastchar > 127)
- mclength = _pcre_ord2utf8(class_lastchar, mcbuffer);
- else
-#endif
- {
- mcbuffer[0] = class_lastchar;
- mclength = 1;
- }
- goto ONE_CHAR;
- } /* End of 1-char optimization */
-
- /* The general case - not the one-char optimization. If this is the first
- thing in the branch, there can be no first char setting, whatever the
- repeat count. Any reqbyte setting must remain unchanged after any kind of
- repeat. */
-
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
+ zerofirstchar = firstchar;
+ zeroreqchar = reqchar;
/* If there are characters with values > 255, we have to compile an
extended class, with its own opcode, unless there was a negated special
@@ -4038,29 +4668,34 @@ for (;; ptr++)
be listed) there are no characters < 256, we can omit the bitmap in the
actual compiled code. */
-#ifdef SUPPORT_UTF8
- if (class_utf8 && (!should_flip_negation || (options & PCRE_UCP) != 0))
+#ifdef SUPPORT_UTF
+ if (xclass && (!should_flip_negation || (options & PCRE_UCP) != 0))
+#elif !defined COMPILE_PCRE8
+ if (xclass && !should_flip_negation)
+#endif
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
{
- *class_utf8data++ = XCL_END; /* Marks the end of extra data */
+ *class_uchardata++ = XCL_END; /* Marks the end of extra data */
*code++ = OP_XCLASS;
code += LINK_SIZE;
- *code = negate_class? XCL_NOT : 0;
+ *code = negate_class? XCL_NOT:0;
/* If the map is required, move up the extra data to make room for it;
otherwise just move the code pointer to the end of the extra data. */
- if (class_charcount > 0)
+ if (class_has_8bitchar > 0)
{
*code++ |= XCL_MAP;
- memmove(code + 32, code, class_utf8data - code);
+ memmove(code + (32 / sizeof(pcre_uchar)), code,
+ IN_UCHARS(class_uchardata - code));
memcpy(code, classbits, 32);
- code = class_utf8data + 32;
+ code = class_uchardata + (32 / sizeof(pcre_uchar));
}
- else code = class_utf8data;
+ else code = class_uchardata;
/* Now fill in the complete length of the item */
- PUT(previous, 1, code - previous);
+ PUT(previous, 1, (int)(code - previous));
break; /* End of class handling */
}
#endif
@@ -4072,16 +4707,14 @@ for (;; ptr++)
negating it if necessary. */
*code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS;
- if (negate_class)
- {
- if (lengthptr == NULL) /* Save time in the pre-compile phase */
- for (c = 0; c < 32; c++) code[c] = ~classbits[c];
- }
- else
+ if (lengthptr == NULL) /* Save time in the pre-compile phase */
{
+ if (negate_class)
+ for (c = 0; c < 32; c++) classbits[c] = ~classbits[c];
memcpy(code, classbits, 32);
}
- code += 32;
+ code += 32 / sizeof(pcre_uchar);
+ NOT_CHAR:
break;
@@ -4118,8 +4751,8 @@ for (;; ptr++)
if (repeat_min == 0)
{
- firstbyte = zerofirstbyte; /* Adjust for zero repeat */
- reqbyte = zeroreqbyte; /* Ditto */
+ firstchar = zerofirstchar; /* Adjust for zero repeat */
+ reqchar = zeroreqchar; /* Ditto */
}
/* Remember whether this is a variable length repeat */
@@ -4129,8 +4762,8 @@ for (;; ptr++)
op_type = 0; /* Default single-char op codes */
possessive_quantifier = FALSE; /* Default not possessive quantifier */
- /* Save start of previous item, in case we have to move it up to make space
- for an inserted OP_ONCE for the additional '+' extension. */
+ /* Save start of previous item, in case we have to move it up in order to
+ insert something before it. */
tempcode = previous;
@@ -4153,37 +4786,76 @@ for (;; ptr++)
}
else repeat_type = greedy_default;
- /* If previous was a character match, abolish the item and generate a
- repeat item instead. If a char item has a minumum of more than one, ensure
- that it is set in reqbyte - it might not be if a sequence such as x{3} is
- the first thing in a branch because the x will have gone into firstbyte
- instead. */
+ /* If previous was a recursion call, wrap it in atomic brackets so that
+ previous becomes the atomic group. All recursions were so wrapped in the
+ past, but it no longer happens for non-repeated recursions. In fact, the
+ repeated ones could be re-implemented independently so as not to need this,
+ but for the moment we rely on the code for repeating groups. */
- if (*previous == OP_CHAR || *previous == OP_CHARNC)
+ if (*previous == OP_RECURSE)
{
- /* Deal with UTF-8 characters that take up more than one byte. It's
+ memmove(previous + 1 + LINK_SIZE, previous, IN_UCHARS(1 + LINK_SIZE));
+ *previous = OP_ONCE;
+ PUT(previous, 1, 2 + 2*LINK_SIZE);
+ previous[2 + 2*LINK_SIZE] = OP_KET;
+ PUT(previous, 3 + 2*LINK_SIZE, 2 + 2*LINK_SIZE);
+ code += 2 + 2 * LINK_SIZE;
+ length_prevgroup = 3 + 3*LINK_SIZE;
+
+ /* When actually compiling, we need to check whether this was a forward
+ reference, and if so, adjust the offset. */
+
+ if (lengthptr == NULL && cd->hwm >= cd->start_workspace + LINK_SIZE)
+ {
+ int offset = GET(cd->hwm, -LINK_SIZE);
+ if (offset == previous + 1 - cd->start_code)
+ PUT(cd->hwm, -LINK_SIZE, offset + 1 + LINK_SIZE);
+ }
+ }
+
+ /* Now handle repetition for the different types of item. */
+
+ /* If previous was a character or negated character match, abolish the item
+ and generate a repeat item instead. If a char item has a minimum of more
+ than one, ensure that it is set in reqchar - it might not be if a sequence
+ such as x{3} is the first thing in a branch because the x will have gone
+ into firstchar instead. */
+
+ if (*previous == OP_CHAR || *previous == OP_CHARI
+ || *previous == OP_NOT || *previous == OP_NOTI)
+ {
+ switch (*previous)
+ {
+ default: /* Make compiler happy. */
+ case OP_CHAR: op_type = OP_STAR - OP_STAR; break;
+ case OP_CHARI: op_type = OP_STARI - OP_STAR; break;
+ case OP_NOT: op_type = OP_NOTSTAR - OP_STAR; break;
+ case OP_NOTI: op_type = OP_NOTSTARI - OP_STAR; break;
+ }
+
+ /* Deal with UTF characters that take up more than one character. It's
easier to write this out separately than try to macrify it. Use c to
- hold the length of the character in bytes, plus 0x80 to flag that it's a
- length rather than a small character. */
+ hold the length of the character in bytes, plus UTF_LENGTH to flag that
+ it's a length rather than a small character. */
-#ifdef SUPPORT_UTF8
- if (utf8 && (code[-1] & 0x80) != 0)
+#ifdef SUPPORT_UTF
+ if (utf && NOT_FIRSTCHAR(code[-1]))
{
- uschar *lastchar = code - 1;
- while((*lastchar & 0xc0) == 0x80) lastchar--;
- c = code - lastchar; /* Length of UTF-8 character */
- memcpy(utf8_char, lastchar, c); /* Save the char */
- c |= 0x80; /* Flag c as a length */
+ pcre_uchar *lastchar = code - 1;
+ BACKCHAR(lastchar);
+ c = (int)(code - lastchar); /* Length of UTF-8 character */
+ memcpy(utf_chars, lastchar, IN_UCHARS(c)); /* Save the char */
+ c |= UTF_LENGTH; /* Flag c as a length */
}
else
-#endif
-
- /* Handle the case of a single byte - either with no UTF8 support, or
- with UTF-8 disabled, or for a UTF-8 character < 128. */
+#endif /* SUPPORT_UTF */
+ /* Handle the case of a single charater - either with no UTF support, or
+ with UTF disabled, or for a single character UTF character. */
{
c = code[-1];
- if (repeat_min > 1) reqbyte = c | req_caseopt | cd->req_varyopt;
+ if (*previous <= OP_CHARI && repeat_min > 1)
+ reqchar = c | req_caseopt | cd->req_varyopt;
}
/* If the repetition is unlimited, it pays to see if the next thing on
@@ -4193,7 +4865,7 @@ for (;; ptr++)
if (!possessive_quantifier &&
repeat_max < 0 &&
- check_auto_possessive(previous, utf8, ptr + 1, options, cd))
+ check_auto_possessive(previous, utf, ptr + 1, options, cd))
{
repeat_type = 0; /* Force greedy */
possessive_quantifier = TRUE;
@@ -4202,26 +4874,6 @@ for (;; ptr++)
goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */
}
- /* If previous was a single negated character ([^a] or similar), we use
- one of the special opcodes, replacing it. The code is shared with single-
- character repeats by setting opt_type to add a suitable offset into
- repeat_type. We can also test for auto-possessification. OP_NOT is
- currently used only for single-byte chars. */
-
- else if (*previous == OP_NOT)
- {
- op_type = OP_NOTSTAR - OP_STAR; /* Use "not" opcodes */
- c = previous[1];
- if (!possessive_quantifier &&
- repeat_max < 0 &&
- check_auto_possessive(previous, utf8, ptr + 1, options, cd))
- {
- repeat_type = 0; /* Force greedy */
- possessive_quantifier = TRUE;
- }
- goto OUTPUT_SINGLE_REPEAT;
- }
-
/* If previous was a character type match (\d or similar), abolish it and
create a suitable repeat item. The code is shared with single-character
repeats by setting op_type to add a suitable offset into repeat_type. Note
@@ -4231,14 +4883,14 @@ for (;; ptr++)
else if (*previous < OP_EODN)
{
- uschar *oldcode;
+ pcre_uchar *oldcode;
int prop_type, prop_value;
op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */
c = *previous;
if (!possessive_quantifier &&
repeat_max < 0 &&
- check_auto_possessive(previous, utf8, ptr + 1, options, cd))
+ check_auto_possessive(previous, utf, ptr + 1, options, cd))
{
repeat_type = 0; /* Force greedy */
possessive_quantifier = TRUE;
@@ -4318,14 +4970,14 @@ for (;; ptr++)
we have to insert the character for the previous code. For a repeated
Unicode property match, there are two extra bytes that define the
required property. In UTF-8 mode, long characters have their length in
- c, with the 0x80 bit as a flag. */
+ c, with the UTF_LENGTH bit as a flag. */
if (repeat_max < 0)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && (c & UTF_LENGTH) != 0)
{
- memcpy(code, utf8_char, c & 7);
+ memcpy(code, utf_chars, IN_UCHARS(c & 7));
code += c & 7;
}
else
@@ -4347,10 +4999,10 @@ for (;; ptr++)
else if (repeat_max != repeat_min)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && (c & UTF_LENGTH) != 0)
{
- memcpy(code, utf8_char, c & 7);
+ memcpy(code, utf_chars, IN_UCHARS(c & 7));
code += c & 7;
}
else
@@ -4377,10 +5029,10 @@ for (;; ptr++)
/* The character or character type itself comes last in all cases. */
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && (c & UTF_LENGTH) != 0)
{
- memcpy(code, utf8_char, c & 7);
+ memcpy(code, utf_chars, IN_UCHARS(c & 7));
code += c & 7;
}
else
@@ -4404,10 +5056,11 @@ for (;; ptr++)
else if (*previous == OP_CLASS ||
*previous == OP_NCLASS ||
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
*previous == OP_XCLASS ||
#endif
- *previous == OP_REF)
+ *previous == OP_REF ||
+ *previous == OP_REFI)
{
if (repeat_max == 0)
{
@@ -4441,35 +5094,35 @@ for (;; ptr++)
}
/* If previous was a bracket group, we may have to replicate it in certain
- cases. */
-
- else if (*previous == OP_BRA || *previous == OP_CBRA ||
- *previous == OP_ONCE || *previous == OP_COND)
+ cases. Note that at this point we can encounter only the "basic" bracket
+ opcodes such as BRA and CBRA, as this is the place where they get converted
+ into the more special varieties such as BRAPOS and SBRA. A test for >=
+ OP_ASSERT and <= OP_COND includes ASSERT, ASSERT_NOT, ASSERTBACK,
+ ASSERTBACK_NOT, ONCE, BRA, CBRA, and COND. Originally, PCRE did not allow
+ repetition of assertions, but now it does, for Perl compatibility. */
+
+ else if (*previous >= OP_ASSERT && *previous <= OP_COND)
{
register int i;
- int ketoffset = 0;
int len = (int)(code - previous);
- uschar *bralink = NULL;
+ pcre_uchar *bralink = NULL;
+ pcre_uchar *brazeroptr = NULL;
- /* Repeating a DEFINE group is pointless */
+ /* Repeating a DEFINE group is pointless, but Perl allows the syntax, so
+ we just ignore the repeat. */
if (*previous == OP_COND && previous[LINK_SIZE+1] == OP_DEF)
- {
- *errorcodeptr = ERR55;
- goto FAILED;
- }
+ goto END_REPEAT;
- /* If the maximum repeat count is unlimited, find the end of the bracket
- by scanning through from the start, and compute the offset back to it
- from the current code pointer. There may be an OP_OPT setting following
- the final KET, so we can't find the end just by going back from the code
- pointer. */
+ /* There is no sense in actually repeating assertions. The only potential
+ use of repetition is in cases when the assertion is optional. Therefore,
+ if the minimum is greater than zero, just ignore the repeat. If the
+ maximum is not not zero or one, set it to 1. */
- if (repeat_max == -1)
+ if (*previous < OP_ONCE) /* Assertion */
{
- register uschar *ket = previous;
- do ket += GET(ket, 1); while (*ket != OP_KET);
- ketoffset = (int)(code - ket);
+ if (repeat_min > 0) goto END_REPEAT;
+ if (repeat_max < 0 || repeat_max > 1) repeat_max = 1;
}
/* The case of a zero minimum is special because of the need to stick
@@ -4490,10 +5143,11 @@ for (;; ptr++)
** goto END_REPEAT;
** }
- However, that fails when a group is referenced as a subroutine from
- elsewhere in the pattern, so now we stick in OP_SKIPZERO in front of it
- so that it is skipped on execution. As we don't have a list of which
- groups are referenced, we cannot do this selectively.
+ However, that fails when a group or a subgroup within it is referenced
+ as a subroutine from elsewhere in the pattern, so now we stick in
+ OP_SKIPZERO in front of it so that it is skipped on execution. As we
+ don't have a list of which groups are referenced, we cannot do this
+ selectively.
If the maximum is 1 or unlimited, we just have to stick in the BRAZERO
and do no more at this point. However, we do need to adjust any
@@ -4505,14 +5159,15 @@ for (;; ptr++)
if (repeat_max <= 1) /* Covers 0, 1, and unlimited */
{
*code = OP_END;
- adjust_recurse(previous, 1, utf8, cd, save_hwm);
- memmove(previous+1, previous, len);
+ adjust_recurse(previous, 1, utf, cd, save_hwm);
+ memmove(previous + 1, previous, IN_UCHARS(len));
code++;
if (repeat_max == 0)
{
*previous++ = OP_SKIPZERO;
goto END_REPEAT;
}
+ brazeroptr = previous; /* Save for possessive optimizing */
*previous++ = OP_BRAZERO + repeat_type;
}
@@ -4528,8 +5183,8 @@ for (;; ptr++)
{
int offset;
*code = OP_END;
- adjust_recurse(previous, 2 + LINK_SIZE, utf8, cd, save_hwm);
- memmove(previous + 2 + LINK_SIZE, previous, len);
+ adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, save_hwm);
+ memmove(previous + 2 + LINK_SIZE, previous, IN_UCHARS(len));
code += 2 + LINK_SIZE;
*previous++ = OP_BRAZERO + repeat_type;
*previous++ = OP_BRA;
@@ -4575,16 +5230,32 @@ for (;; ptr++)
*lengthptr += delta;
}
- /* This is compiling for real */
+ /* This is compiling for real. If there is a set first byte for
+ the group, and we have not yet set a "required byte", set it. Make
+ sure there is enough workspace for copying forward references before
+ doing the copy. */
else
{
- if (groupsetfirstbyte && reqbyte < 0) reqbyte = firstbyte;
+ if (groupsetfirstchar && reqchar < 0) reqchar = firstchar;
+
for (i = 1; i < repeat_min; i++)
{
- uschar *hc;
- uschar *this_hwm = cd->hwm;
- memcpy(code, previous, len);
+ pcre_uchar *hc;
+ pcre_uchar *this_hwm = cd->hwm;
+ memcpy(code, previous, IN_UCHARS(len));
+
+ while (cd->hwm > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN - (this_hwm - save_hwm))
+ {
+ int save_offset = save_hwm - cd->start_workspace;
+ int this_offset = this_hwm - cd->start_workspace;
+ *errorcodeptr = expand_workspace(cd);
+ if (*errorcodeptr != 0) goto FAILED;
+ save_hwm = (pcre_uchar *)cd->start_workspace + save_offset;
+ this_hwm = (pcre_uchar *)cd->start_workspace + this_offset;
+ }
+
for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
{
PUT(cd->hwm, 0, GET(hc, 0) + len);
@@ -4634,8 +5305,8 @@ for (;; ptr++)
else for (i = repeat_max - 1; i >= 0; i--)
{
- uschar *hc;
- uschar *this_hwm = cd->hwm;
+ pcre_uchar *hc;
+ pcre_uchar *this_hwm = cd->hwm;
*code++ = OP_BRAZERO + repeat_type;
@@ -4651,7 +5322,22 @@ for (;; ptr++)
PUTINC(code, 0, offset);
}
- memcpy(code, previous, len);
+ memcpy(code, previous, IN_UCHARS(len));
+
+ /* Ensure there is enough workspace for forward references before
+ copying them. */
+
+ while (cd->hwm > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN - (this_hwm - save_hwm))
+ {
+ int save_offset = save_hwm - cd->start_workspace;
+ int this_offset = this_hwm - cd->start_workspace;
+ *errorcodeptr = expand_workspace(cd);
+ if (*errorcodeptr != 0) goto FAILED;
+ save_hwm = (pcre_uchar *)cd->start_workspace + save_offset;
+ this_hwm = (pcre_uchar *)cd->start_workspace + this_offset;
+ }
+
for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
{
PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));
@@ -4668,7 +5354,7 @@ for (;; ptr++)
{
int oldlinkoffset;
int offset = (int)(code - bralink + 1);
- uschar *bra = code - offset;
+ pcre_uchar *bra = code - offset;
oldlinkoffset = GET(bra, 1);
bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset;
*code++ = OP_KET;
@@ -4677,35 +5363,110 @@ for (;; ptr++)
}
}
- /* If the maximum is unlimited, set a repeater in the final copy. We
- can't just offset backwards from the current code point, because we
- don't know if there's been an options resetting after the ket. The
- correct offset was computed above.
+ /* If the maximum is unlimited, set a repeater in the final copy. For
+ ONCE brackets, that's all we need to do. However, possessively repeated
+ ONCE brackets can be converted into non-capturing brackets, as the
+ behaviour of (?:xx)++ is the same as (?>xx)++ and this saves having to
+ deal with possessive ONCEs specially.
- Then, when we are doing the actual compile phase, check to see whether
- this group is a non-atomic one that could match an empty string. If so,
+ Otherwise, when we are doing the actual compile phase, check to see
+ whether this group is one that could match an empty string. If so,
convert the initial operator to the S form (e.g. OP_BRA -> OP_SBRA) so
- that runtime checking can be done. [This check is also applied to
- atomic groups at runtime, but in a different way.] */
+ that runtime checking can be done. [This check is also applied to ONCE
+ groups at runtime, but in a different way.]
+
+ Then, if the quantifier was possessive and the bracket is not a
+ conditional, we convert the BRA code to the POS form, and the KET code to
+ KETRPOS. (It turns out to be convenient at runtime to detect this kind of
+ subpattern at both the start and at the end.) The use of special opcodes
+ makes it possible to reduce greatly the stack usage in pcre_exec(). If
+ the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO.
+
+ Then, if the minimum number of matches is 1 or 0, cancel the possessive
+ flag so that the default action below, of wrapping everything inside
+ atomic brackets, does not happen. When the minimum is greater than 1,
+ there will be earlier copies of the group, and so we still have to wrap
+ the whole thing. */
else
{
- uschar *ketcode = code - ketoffset;
- uschar *bracode = ketcode - GET(ketcode, 1);
- *ketcode = OP_KETRMAX + repeat_type;
- if (lengthptr == NULL && *bracode != OP_ONCE)
+ pcre_uchar *ketcode = code - 1 - LINK_SIZE;
+ pcre_uchar *bracode = ketcode - GET(ketcode, 1);
+
+ /* Convert possessive ONCE brackets to non-capturing */
+
+ if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) &&
+ possessive_quantifier) *bracode = OP_BRA;
+
+ /* For non-possessive ONCE brackets, all we need to do is to
+ set the KET. */
+
+ if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC)
+ *ketcode = OP_KETRMAX + repeat_type;
+
+ /* Handle non-ONCE brackets and possessive ONCEs (which have been
+ converted to non-capturing above). */
+
+ else
{
- uschar *scode = bracode;
- do
+ /* In the compile phase, check for empty string matching. */
+
+ if (lengthptr == NULL)
{
- if (could_be_empty_branch(scode, ketcode, utf8, cd))
+ pcre_uchar *scode = bracode;
+ do
{
- *bracode += OP_SBRA - OP_BRA;
- break;
+ if (could_be_empty_branch(scode, ketcode, utf, cd))
+ {
+ *bracode += OP_SBRA - OP_BRA;
+ break;
+ }
+ scode += GET(scode, 1);
}
- scode += GET(scode, 1);
+ while (*scode == OP_ALT);
}
- while (*scode == OP_ALT);
+
+ /* Handle possessive quantifiers. */
+
+ if (possessive_quantifier)
+ {
+ /* For COND brackets, we wrap the whole thing in a possessively
+ repeated non-capturing bracket, because we have not invented POS
+ versions of the COND opcodes. Because we are moving code along, we
+ must ensure that any pending recursive references are updated. */
+
+ if (*bracode == OP_COND || *bracode == OP_SCOND)
+ {
+ int nlen = (int)(code - bracode);
+ *code = OP_END;
+ adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, save_hwm);
+ memmove(bracode + 1 + LINK_SIZE, bracode, IN_UCHARS(nlen));
+ code += 1 + LINK_SIZE;
+ nlen += 1 + LINK_SIZE;
+ *bracode = OP_BRAPOS;
+ *code++ = OP_KETRPOS;
+ PUTINC(code, 0, nlen);
+ PUT(bracode, 1, nlen);
+ }
+
+ /* For non-COND brackets, we modify the BRA code and use KETRPOS. */
+
+ else
+ {
+ *bracode += 1; /* Switch to xxxPOS opcodes */
+ *ketcode = OP_KETRPOS;
+ }
+
+ /* If the minimum is zero, mark it as possessive, then unset the
+ possessive flag when the minimum is 0 or 1. */
+
+ if (brazeroptr != NULL) *brazeroptr = OP_BRAPOSZERO;
+ if (repeat_min < 2) possessive_quantifier = FALSE;
+ }
+
+ /* Non-possessive quantifier */
+
+ else *ketcode = OP_KETRMAX + repeat_type;
}
}
}
@@ -4726,13 +5487,18 @@ for (;; ptr++)
}
/* If the character following a repeat is '+', or if certain optimization
- tests above succeeded, possessive_quantifier is TRUE. For some of the
- simpler opcodes, there is an special alternative opcode for this. For
- anything else, we wrap the entire repeated item inside OP_ONCE brackets.
- The '+' notation is just syntactic sugar, taken from Sun's Java package,
- but the special opcodes can optimize it a bit. The repeated item starts at
- tempcode, not at previous, which might be the first part of a string whose
- (former) last char we repeated.
+ tests above succeeded, possessive_quantifier is TRUE. For some opcodes,
+ there are special alternative opcodes for this case. For anything else, we
+ wrap the entire repeated item inside OP_ONCE brackets. Logically, the '+'
+ notation is just syntactic sugar, taken from Sun's Java package, but the
+ special opcodes can optimize it.
+
+ Some (but not all) possessively repeated subpatterns have already been
+ completely handled in the code just above. For them, possessive_quantifier
+ is always FALSE at this stage.
+
+ Note that the repeated item starts at tempcode, not at previous, which
+ might be the first part of a string whose (former) last char we repeated.
Possessifying an 'exact' quantifier has no effect, so we can ignore it. But
an 'upto' may follow. We skip over an 'exact' item, and then test the
@@ -4743,15 +5509,16 @@ for (;; ptr++)
int len;
if (*tempcode == OP_TYPEEXACT)
- tempcode += _pcre_OP_lengths[*tempcode] +
- ((tempcode[3] == OP_PROP || tempcode[3] == OP_NOTPROP)? 2 : 0);
+ tempcode += PRIV(OP_lengths)[*tempcode] +
+ ((tempcode[1 + IMM2_SIZE] == OP_PROP
+ || tempcode[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
else if (*tempcode == OP_EXACT || *tempcode == OP_NOTEXACT)
{
- tempcode += _pcre_OP_lengths[*tempcode];
-#ifdef SUPPORT_UTF8
- if (utf8 && tempcode[-1] >= 0xc0)
- tempcode += _pcre_utf8_table4[tempcode[-1] & 0x3f];
+ tempcode += PRIV(OP_lengths)[*tempcode];
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(tempcode[-1]))
+ tempcode += GET_EXTRALEN(tempcode[-1]);
#endif
}
@@ -4763,23 +5530,33 @@ for (;; ptr++)
case OP_QUERY: *tempcode = OP_POSQUERY; break;
case OP_UPTO: *tempcode = OP_POSUPTO; break;
- case OP_TYPESTAR: *tempcode = OP_TYPEPOSSTAR; break;
- case OP_TYPEPLUS: *tempcode = OP_TYPEPOSPLUS; break;
- case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break;
- case OP_TYPEUPTO: *tempcode = OP_TYPEPOSUPTO; break;
+ case OP_STARI: *tempcode = OP_POSSTARI; break;
+ case OP_PLUSI: *tempcode = OP_POSPLUSI; break;
+ case OP_QUERYI: *tempcode = OP_POSQUERYI; break;
+ case OP_UPTOI: *tempcode = OP_POSUPTOI; break;
case OP_NOTSTAR: *tempcode = OP_NOTPOSSTAR; break;
case OP_NOTPLUS: *tempcode = OP_NOTPOSPLUS; break;
case OP_NOTQUERY: *tempcode = OP_NOTPOSQUERY; break;
case OP_NOTUPTO: *tempcode = OP_NOTPOSUPTO; break;
+ case OP_NOTSTARI: *tempcode = OP_NOTPOSSTARI; break;
+ case OP_NOTPLUSI: *tempcode = OP_NOTPOSPLUSI; break;
+ case OP_NOTQUERYI: *tempcode = OP_NOTPOSQUERYI; break;
+ case OP_NOTUPTOI: *tempcode = OP_NOTPOSUPTOI; break;
+
+ case OP_TYPESTAR: *tempcode = OP_TYPEPOSSTAR; break;
+ case OP_TYPEPLUS: *tempcode = OP_TYPEPOSPLUS; break;
+ case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break;
+ case OP_TYPEUPTO: *tempcode = OP_TYPEPOSUPTO; break;
+
/* Because we are moving code along, we must ensure that any
pending recursive references are updated. */
default:
*code = OP_END;
- adjust_recurse(tempcode, 1 + LINK_SIZE, utf8, cd, save_hwm);
- memmove(tempcode + 1+LINK_SIZE, tempcode, len);
+ adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm);
+ memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
code += 1 + LINK_SIZE;
len += 1 + LINK_SIZE;
tempcode[0] = OP_ONCE;
@@ -4791,7 +5568,7 @@ for (;; ptr++)
}
/* In all case we no longer have a previous item. We also set the
- "follows varying string" flag for subsequently encountered reqbytes if
+ "follows varying string" flag for subsequently encountered reqchars if
it isn't already set and we have just passed a varying length item. */
END_REPEAT:
@@ -4814,24 +5591,34 @@ for (;; ptr++)
/* First deal with various "verbs" that can be introduced by '*'. */
- if (*(++ptr) == CHAR_ASTERISK &&
- ((cd->ctypes[ptr[1]] & ctype_letter) != 0 || ptr[1] == ':'))
+ ptr++;
+ if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
+ || (MAX_255(ptr[1]) && ((cd->ctypes[ptr[1]] & ctype_letter) != 0))))
{
int i, namelen;
int arglen = 0;
const char *vn = verbnames;
- const uschar *name = ptr + 1;
- const uschar *arg = NULL;
+ const pcre_uchar *name = ptr + 1;
+ const pcre_uchar *arg = NULL;
previous = NULL;
- while ((cd->ctypes[*++ptr] & ctype_letter) != 0) {};
+ ptr++;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;
namelen = (int)(ptr - name);
+ /* It appears that Perl allows any characters whatsoever, other than
+ a closing parenthesis, to appear in arguments, so we no longer insist on
+ letters, digits, and underscores. */
+
if (*ptr == CHAR_COLON)
{
arg = ++ptr;
- while ((cd->ctypes[*ptr] & (ctype_letter|ctype_digit)) != 0
- || *ptr == '_') ptr++;
+ while (*ptr != 0 && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
arglen = (int)(ptr - arg);
+ if (arglen > (int)MAX_MARK)
+ {
+ *errorcodeptr = ERR75;
+ goto FAILED;
+ }
}
if (*ptr != CHAR_RIGHT_PARENTHESIS)
@@ -4845,24 +5632,34 @@ for (;; ptr++)
for (i = 0; i < verbcount; i++)
{
if (namelen == verbs[i].len &&
- strncmp((char *)name, vn, namelen) == 0)
+ STRNCMP_UC_C8(name, vn, namelen) == 0)
{
- /* Check for open captures before ACCEPT */
+ /* Check for open captures before ACCEPT and convert it to
+ ASSERT_ACCEPT if in an assertion. */
if (verbs[i].op == OP_ACCEPT)
{
open_capitem *oc;
+ if (arglen != 0)
+ {
+ *errorcodeptr = ERR59;
+ goto FAILED;
+ }
cd->had_accept = TRUE;
for (oc = cd->open_caps; oc != NULL; oc = oc->next)
{
*code++ = OP_CLOSE;
PUT2INC(code, 0, oc->number);
}
+ *code++ = (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
+
+ /* Do not set firstchar after *ACCEPT */
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
}
- /* Handle the cases with/without an argument */
+ /* Handle other cases with/without an argument */
- if (arglen == 0)
+ else if (arglen == 0)
{
if (verbs[i].op < 0) /* Argument is mandatory */
{
@@ -4870,11 +5667,7 @@ for (;; ptr++)
goto FAILED;
}
*code = verbs[i].op;
- if (*code++ == OP_THEN)
- {
- PUT(code, 0, code - bcptr->current_branch - 1);
- code += LINK_SIZE;
- }
+ if (*code++ == OP_THEN) cd->external_flags |= PCRE_HASTHEN;
}
else
@@ -4885,13 +5678,9 @@ for (;; ptr++)
goto FAILED;
}
*code = verbs[i].op_arg;
- if (*code++ == OP_THEN_ARG)
- {
- PUT(code, 0, code - bcptr->current_branch - 1);
- code += LINK_SIZE;
- }
+ if (*code++ == OP_THEN_ARG) cd->external_flags |= PCRE_HASTHEN;
*code++ = arglen;
- memcpy(code, arg, arglen);
+ memcpy(code, arg, IN_UCHARS(arglen));
code += arglen;
*code++ = 0;
}
@@ -4914,8 +5703,8 @@ for (;; ptr++)
{
int i, set, unset, namelen;
int *optset;
- const uschar *name;
- uschar *slot;
+ const pcre_uchar *name;
+ pcre_uchar *slot;
switch (*(++ptr))
{
@@ -4968,10 +5757,10 @@ for (;; ptr++)
break;
/* Most other conditions use OP_CREF (a couple change to OP_RREF
- below), and all need to skip 3 bytes at the start of the group. */
+ below), and all need to skip 1+IMM2_SIZE bytes at the start of the group. */
code[1+LINK_SIZE] = OP_CREF;
- skipbytes = 3;
+ skipbytes = 1+IMM2_SIZE;
refsign = -1;
/* Check for a test for recursion in a named group. */
@@ -5004,7 +5793,7 @@ for (;; ptr++)
/* We now expect to read a name; any thing else is an error */
- if ((cd->ctypes[ptr[1]] & ctype_word) == 0)
+ if (!MAX_255(ptr[1]) || (cd->ctypes[ptr[1]] & ctype_word) == 0)
{
ptr += 1; /* To get the right offset */
*errorcodeptr = ERR28;
@@ -5015,11 +5804,10 @@ for (;; ptr++)
recno = 0;
name = ++ptr;
- while ((cd->ctypes[*ptr] & ctype_word) != 0)
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0)
{
if (recno >= 0)
- recno = ((digitab[*ptr] & ctype_digit) != 0)?
- recno * 10 + *ptr - CHAR_0 : -1;
+ recno = (IS_DIGIT(*ptr))? recno * 10 + *ptr - CHAR_0 : -1;
ptr++;
}
namelen = (int)(ptr - name);
@@ -5067,7 +5855,7 @@ for (;; ptr++)
slot = cd->name_table;
for (i = 0; i < cd->names_found; i++)
{
- if (strncmp((char *)name, (char *)slot+2, namelen) == 0) break;
+ if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0) break;
slot += cd->name_entry_size;
}
@@ -5083,7 +5871,7 @@ for (;; ptr++)
/* Search the pattern for a forward reference */
else if ((i = find_parens(cd, name, namelen,
- (options & PCRE_EXTENDED) != 0, utf8)) > 0)
+ (options & PCRE_EXTENDED) != 0, utf)) > 0)
{
PUT2(code, 2+LINK_SIZE, i);
code[1+LINK_SIZE]++;
@@ -5109,7 +5897,7 @@ for (;; ptr++)
recno = 0;
for (i = 1; i < namelen; i++)
{
- if ((digitab[name[i]] & ctype_digit) == 0)
+ if (!IS_DIGIT(name[i]))
{
*errorcodeptr = ERR15;
goto FAILED;
@@ -5124,7 +5912,7 @@ for (;; ptr++)
/* Similarly, check for the (?(DEFINE) "condition", which is always
false. */
- else if (namelen == 6 && strncmp((char *)name, STRING_DEFINE, 6) == 0)
+ else if (namelen == 6 && STRNCMP_UC_C8(name, STRING_DEFINE, 6) == 0)
{
code[1+LINK_SIZE] = OP_DEF;
skipbytes = 1;
@@ -5151,6 +5939,7 @@ for (;; ptr++)
/* ------------------------------------------------------------ */
case CHAR_EQUALS_SIGN: /* Positive lookahead */
bravalue = OP_ASSERT;
+ cd->assert_depth += 1;
ptr++;
break;
@@ -5165,6 +5954,7 @@ for (;; ptr++)
continue;
}
bravalue = OP_ASSERT_NOT;
+ cd->assert_depth += 1;
break;
@@ -5174,16 +5964,19 @@ for (;; ptr++)
{
case CHAR_EQUALS_SIGN: /* Positive lookbehind */
bravalue = OP_ASSERTBACK;
+ cd->assert_depth += 1;
ptr += 2;
break;
case CHAR_EXCLAMATION_MARK: /* Negative lookbehind */
bravalue = OP_ASSERTBACK_NOT;
+ cd->assert_depth += 1;
ptr += 2;
break;
default: /* Could be name define, else bad */
- if ((cd->ctypes[ptr[1]] & ctype_word) != 0) goto DEFINE_NAME;
+ if (MAX_255(ptr[1]) && (cd->ctypes[ptr[1]] & ctype_word) != 0)
+ goto DEFINE_NAME;
ptr++; /* Correct offset for error */
*errorcodeptr = ERR24;
goto FAILED;
@@ -5200,13 +5993,14 @@ for (;; ptr++)
/* ------------------------------------------------------------ */
case CHAR_C: /* Callout - may be followed by digits; */
- previous_callout = code; /* Save for later completion */
- after_manual_callout = 1; /* Skip one item before completing */
+ previous_callout = code; /* Save for later completion */
+ after_manual_callout = 1; /* Skip one item before completing */
*code++ = OP_CALLOUT;
{
int n = 0;
- while ((digitab[*(++ptr)] & ctype_digit) != 0)
- n = n * 10 + *ptr - CHAR_0;
+ ptr++;
+ while(IS_DIGIT(*ptr))
+ n = n * 10 + *ptr++ - CHAR_0;
if (*ptr != CHAR_RIGHT_PARENTHESIS)
{
*errorcodeptr = ERR39;
@@ -5251,7 +6045,7 @@ for (;; ptr++)
CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
name = ++ptr;
- while ((cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
namelen = (int)(ptr - name);
/* In the pre-compile phase, just do a syntax check. */
@@ -5268,9 +6062,9 @@ for (;; ptr++)
*errorcodeptr = ERR49;
goto FAILED;
}
- if (namelen + 3 > cd->name_entry_size)
+ if (namelen + IMM2_SIZE + 1 > cd->name_entry_size)
{
- cd->name_entry_size = namelen + 3;
+ cd->name_entry_size = namelen + IMM2_SIZE + 1;
if (namelen > MAX_NAME_SIZE)
{
*errorcodeptr = ERR48;
@@ -5299,10 +6093,10 @@ for (;; ptr++)
for (i = 0; i < cd->names_found; i++)
{
- int crc = memcmp(name, slot+2, namelen);
+ int crc = memcmp(name, slot+IMM2_SIZE, IN_UCHARS(namelen));
if (crc == 0)
{
- if (slot[2+namelen] == 0)
+ if (slot[IMM2_SIZE+namelen] == 0)
{
if (GET2(slot, 0) != cd->bracount + 1 &&
(options & PCRE_DUPNAMES) == 0)
@@ -5323,7 +6117,7 @@ for (;; ptr++)
if (crc < 0)
{
memmove(slot + cd->name_entry_size, slot,
- (cd->names_found - i) * cd->name_entry_size);
+ IN_UCHARS((cd->names_found - i) * cd->name_entry_size));
break;
}
@@ -5337,7 +6131,7 @@ for (;; ptr++)
if (!dupname)
{
- uschar *cslot = cd->name_table;
+ pcre_uchar *cslot = cd->name_table;
for (i = 0; i < cd->names_found; i++)
{
if (cslot != slot)
@@ -5354,8 +6148,8 @@ for (;; ptr++)
}
PUT2(slot, 0, cd->bracount + 1);
- memcpy(slot + 2, name, namelen);
- slot[2+namelen] = 0;
+ memcpy(slot + IMM2_SIZE, name, IN_UCHARS(namelen));
+ slot[IMM2_SIZE + namelen] = 0;
}
}
@@ -5381,7 +6175,7 @@ for (;; ptr++)
NAMED_REF_OR_RECURSE:
name = ++ptr;
- while ((cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
namelen = (int)(ptr - name);
/* In the pre-compile phase, do a syntax check. We used to just set
@@ -5393,7 +6187,7 @@ for (;; ptr++)
if (lengthptr != NULL)
{
- const uschar *temp;
+ const pcre_uchar *temp;
if (namelen == 0)
{
@@ -5423,7 +6217,7 @@ for (;; ptr++)
temp = cd->end_pattern;
cd->end_pattern = ptr;
recno = find_parens(cd, name, namelen,
- (options & PCRE_EXTENDED) != 0, utf8);
+ (options & PCRE_EXTENDED) != 0, utf);
cd->end_pattern = temp;
if (recno < 0) recno = 0; /* Forward ref; set dummy number */
}
@@ -5438,8 +6232,8 @@ for (;; ptr++)
slot = cd->name_table;
for (i = 0; i < cd->names_found; i++)
{
- if (strncmp((char *)name, (char *)slot+2, namelen) == 0 &&
- slot[2+namelen] == 0)
+ if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0 &&
+ slot[IMM2_SIZE+namelen] == 0)
break;
slot += cd->name_entry_size;
}
@@ -5450,7 +6244,7 @@ for (;; ptr++)
}
else if ((recno = /* Forward back reference */
find_parens(cd, name, namelen,
- (options & PCRE_EXTENDED) != 0, utf8)) <= 0)
+ (options & PCRE_EXTENDED) != 0, utf)) <= 0)
{
*errorcodeptr = ERR15;
goto FAILED;
@@ -5475,7 +6269,7 @@ for (;; ptr++)
case CHAR_0: case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4:
case CHAR_5: case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
{
- const uschar *called;
+ const pcre_uchar *called;
terminator = CHAR_RIGHT_PARENTHESIS;
/* Come here from the \g<...> and \g'...' code (Oniguruma
@@ -5489,7 +6283,7 @@ for (;; ptr++)
if ((refsign = *ptr) == CHAR_PLUS)
{
ptr++;
- if ((digitab[*ptr] & ctype_digit) == 0)
+ if (!IS_DIGIT(*ptr))
{
*errorcodeptr = ERR63;
goto FAILED;
@@ -5497,13 +6291,13 @@ for (;; ptr++)
}
else if (refsign == CHAR_MINUS)
{
- if ((digitab[ptr[1]] & ctype_digit) == 0)
+ if (!IS_DIGIT(ptr[1]))
goto OTHER_CHAR_AFTER_QUERY;
ptr++;
}
recno = 0;
- while((digitab[*ptr] & ctype_digit) != 0)
+ while(IS_DIGIT(*ptr))
recno = recno * 10 + *ptr++ - CHAR_0;
if (*ptr != terminator)
@@ -5554,14 +6348,14 @@ for (;; ptr++)
{
*code = OP_END;
if (recno != 0)
- called = _pcre_find_bracket(cd->start_code, utf8, recno);
+ called = PRIV(find_bracket)(cd->start_code, utf, recno);
/* Forward reference */
if (called == NULL)
{
if (find_parens(cd, NULL, recno,
- (options & PCRE_EXTENDED) != 0, utf8) < 0)
+ (options & PCRE_EXTENDED) != 0, utf) < 0)
{
*errorcodeptr = ERR15;
goto FAILED;
@@ -5569,46 +6363,48 @@ for (;; ptr++)
/* Fudge the value of "called" so that when it is inserted as an
offset below, what it actually inserted is the reference number
- of the group. */
+ of the group. Then remember the forward reference. */
called = cd->start_code + recno;
- PUTINC(cd->hwm, 0, (int)(code + 2 + LINK_SIZE - cd->start_code));
+ if (cd->hwm >= cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN)
+ {
+ *errorcodeptr = expand_workspace(cd);
+ if (*errorcodeptr != 0) goto FAILED;
+ }
+ PUTINC(cd->hwm, 0, (int)(code + 1 - cd->start_code));
}
/* If not a forward reference, and the subpattern is still open,
this is a recursive call. We check to see if this is a left
- recursion that could loop for ever, and diagnose that case. */
-
- else if (GET(called, 1) == 0 &&
- could_be_empty(called, code, bcptr, utf8, cd))
+ recursion that could loop for ever, and diagnose that case. We
+ must not, however, do this check if we are in a conditional
+ subpattern because the condition might be testing for recursion in
+ a pattern such as /(?(R)a+|(?R)b)/, which is perfectly valid.
+ Forever loops are also detected at runtime, so those that occur in
+ conditional subpatterns will be picked up then. */
+
+ else if (GET(called, 1) == 0 && cond_depth <= 0 &&
+ could_be_empty(called, code, bcptr, utf, cd))
{
*errorcodeptr = ERR40;
goto FAILED;
}
}
- /* Insert the recursion/subroutine item, automatically wrapped inside
- "once" brackets. Set up a "previous group" length so that a
- subsequent quantifier will work. */
-
- *code = OP_ONCE;
- PUT(code, 1, 2 + 2*LINK_SIZE);
- code += 1 + LINK_SIZE;
+ /* Insert the recursion/subroutine item. It does not have a set first
+ character (relevant if it is repeated, because it will then be
+ wrapped with ONCE brackets). */
*code = OP_RECURSE;
PUT(code, 1, (int)(called - cd->start_code));
code += 1 + LINK_SIZE;
-
- *code = OP_KET;
- PUT(code, 1, 2 + 2*LINK_SIZE);
- code += 1 + LINK_SIZE;
-
- length_prevgroup = 3 + 3*LINK_SIZE;
+ groupsetfirstchar = FALSE;
}
/* Can't determine a first byte now */
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
continue;
@@ -5664,9 +6460,8 @@ for (;; ptr++)
is necessary to ensure we correctly detect the start of the pattern in
both phases.
- If we are not at the pattern start, compile code to change the ims
- options if this setting actually changes any of them, and reset the
- greedy defaults and the case value for firstbyte and reqbyte. */
+ If we are not at the pattern start, reset the greedy defaults and the
+ case value for firstchar and reqchar. */
if (*ptr == CHAR_RIGHT_PARENTHESIS)
{
@@ -5677,20 +6472,13 @@ for (;; ptr++)
}
else
{
- if ((options & PCRE_IMS) != (newoptions & PCRE_IMS))
- {
- *code++ = OP_OPT;
- *code++ = newoptions & PCRE_IMS;
- }
greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
greedy_non_default = greedy_default ^ 1;
- req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
+ req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
}
/* Change options at this level, and pass them back for use
- in subsequent branches. When not at the start of the pattern, this
- information is also necessary so that a resetting item can be
- compiled at the end of a group (if we are in a group). */
+ in subsequent branches. */
*optionsptr = options = newoptions;
previous = NULL; /* This item can't be repeated */
@@ -5723,53 +6511,62 @@ for (;; ptr++)
NUMBERED_GROUP:
cd->bracount += 1;
PUT2(code, 1+LINK_SIZE, cd->bracount);
- skipbytes = 2;
+ skipbytes = IMM2_SIZE;
}
- /* Process nested bracketed regex. Assertions may not be repeated, but
- other kinds can be. All their opcodes are >= OP_ONCE. We copy code into a
- non-register variable in order to be able to pass its address because some
- compilers complain otherwise. Pass in a new setting for the ims options if
- they have changed. */
+ /* Process nested bracketed regex. Assertions used not to be repeatable,
+ but this was changed for Perl compatibility, so all kinds can now be
+ repeated. We copy code into a non-register variable (tempcode) in order to
+ be able to pass its address because some compilers complain otherwise. */
- previous = (bravalue >= OP_ONCE)? code : NULL;
+ previous = code; /* For handling repetition */
*code = bravalue;
tempcode = code;
- tempreqvary = cd->req_varyopt; /* Save value before bracket */
- length_prevgroup = 0; /* Initialize for pre-compile phase */
+ tempreqvary = cd->req_varyopt; /* Save value before bracket */
+ tempbracount = cd->bracount; /* Save value before bracket */
+ length_prevgroup = 0; /* Initialize for pre-compile phase */
if (!compile_regex(
- newoptions, /* The complete new option state */
- options & PCRE_IMS, /* The previous ims option state */
- &tempcode, /* Where to put code (updated) */
- &ptr, /* Input pointer (updated) */
- errorcodeptr, /* Where to put an error message */
+ newoptions, /* The complete new option state */
+ &tempcode, /* Where to put code (updated) */
+ &ptr, /* Input pointer (updated) */
+ errorcodeptr, /* Where to put an error message */
(bravalue == OP_ASSERTBACK ||
bravalue == OP_ASSERTBACK_NOT), /* TRUE if back assert */
- reset_bracount, /* True if (?| group */
- skipbytes, /* Skip over bracket number */
- &subfirstbyte, /* For possible first char */
- &subreqbyte, /* For possible last char */
- bcptr, /* Current branch chain */
- cd, /* Tables block */
- (lengthptr == NULL)? NULL : /* Actual compile phase */
- &length_prevgroup /* Pre-compile phase */
+ reset_bracount, /* True if (?| group */
+ skipbytes, /* Skip over bracket number */
+ cond_depth +
+ ((bravalue == OP_COND)?1:0), /* Depth of condition subpatterns */
+ &subfirstchar, /* For possible first char */
+ &subreqchar, /* For possible last char */
+ bcptr, /* Current branch chain */
+ cd, /* Tables block */
+ (lengthptr == NULL)? NULL : /* Actual compile phase */
+ &length_prevgroup /* Pre-compile phase */
))
goto FAILED;
+ /* If this was an atomic group and there are no capturing groups within it,
+ generate OP_ONCE_NC instead of OP_ONCE. */
+
+ if (bravalue == OP_ONCE && cd->bracount <= tempbracount)
+ *code = OP_ONCE_NC;
+
+ if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)
+ cd->assert_depth -= 1;
+
/* At the end of compiling, code is still pointing to the start of the
- group, while tempcode has been updated to point past the end of the group
- and any option resetting that may follow it. The pattern pointer (ptr)
- is on the bracket. */
+ group, while tempcode has been updated to point past the end of the group.
+ The pattern pointer (ptr) is on the bracket.
- /* If this is a conditional bracket, check that there are no more than
+ If this is a conditional bracket, check that there are no more than
two branches in the group, or just one if it's a DEFINE group. We do this
in the real compile phase, not in the pre-pass, where the whole group may
not be available. */
if (bravalue == OP_COND && lengthptr == NULL)
{
- uschar *tc = code;
+ pcre_uchar *tc = code;
int condcount = 0;
do {
@@ -5792,7 +6589,7 @@ for (;; ptr++)
}
/* A "normal" conditional group. If there is just one branch, we must not
- make use of its firstbyte or reqbyte, because this is equivalent to an
+ make use of its firstchar or reqchar, because this is equivalent to an
empty second branch. */
else
@@ -5802,7 +6599,7 @@ for (;; ptr++)
*errorcodeptr = ERR27;
goto FAILED;
}
- if (condcount == 1) subfirstbyte = subreqbyte = REQ_NONE;
+ if (condcount == 1) subfirstchar = subreqchar = REQ_NONE;
}
}
@@ -5827,7 +6624,7 @@ for (;; ptr++)
goto FAILED;
}
*lengthptr += length_prevgroup - 2 - 2*LINK_SIZE;
- *code++ = OP_BRA;
+ code++; /* This already contains bravalue */
PUTINC(code, 0, 1 + LINK_SIZE);
*code++ = OP_KET;
PUTINC(code, 0, 1 + LINK_SIZE);
@@ -5846,55 +6643,55 @@ for (;; ptr++)
/* Handle updating of the required and first characters for other types of
group. Update for normal brackets of all kinds, and conditions with two
branches (see code above). If the bracket is followed by a quantifier with
- zero repeat, we have to back off. Hence the definition of zeroreqbyte and
- zerofirstbyte outside the main loop so that they can be accessed for the
+ zero repeat, we have to back off. Hence the definition of zeroreqchar and
+ zerofirstchar outside the main loop so that they can be accessed for the
back off. */
- zeroreqbyte = reqbyte;
- zerofirstbyte = firstbyte;
- groupsetfirstbyte = FALSE;
+ zeroreqchar = reqchar;
+ zerofirstchar = firstchar;
+ groupsetfirstchar = FALSE;
if (bravalue >= OP_ONCE)
{
- /* If we have not yet set a firstbyte in this branch, take it from the
+ /* If we have not yet set a firstchar in this branch, take it from the
subpattern, remembering that it was set here so that a repeat of more
- than one can replicate it as reqbyte if necessary. If the subpattern has
- no firstbyte, set "none" for the whole branch. In both cases, a zero
- repeat forces firstbyte to "none". */
+ than one can replicate it as reqchar if necessary. If the subpattern has
+ no firstchar, set "none" for the whole branch. In both cases, a zero
+ repeat forces firstchar to "none". */
- if (firstbyte == REQ_UNSET)
+ if (firstchar == REQ_UNSET)
{
- if (subfirstbyte >= 0)
+ if (subfirstchar >= 0)
{
- firstbyte = subfirstbyte;
- groupsetfirstbyte = TRUE;
+ firstchar = subfirstchar;
+ groupsetfirstchar = TRUE;
}
- else firstbyte = REQ_NONE;
- zerofirstbyte = REQ_NONE;
+ else firstchar = REQ_NONE;
+ zerofirstchar = REQ_NONE;
}
- /* If firstbyte was previously set, convert the subpattern's firstbyte
- into reqbyte if there wasn't one, using the vary flag that was in
+ /* If firstchar was previously set, convert the subpattern's firstchar
+ into reqchar if there wasn't one, using the vary flag that was in
existence beforehand. */
- else if (subfirstbyte >= 0 && subreqbyte < 0)
- subreqbyte = subfirstbyte | tempreqvary;
+ else if (subfirstchar >= 0 && subreqchar < 0)
+ subreqchar = subfirstchar | tempreqvary;
/* If the subpattern set a required byte (or set a first byte that isn't
really the first byte - see above), set it. */
- if (subreqbyte >= 0) reqbyte = subreqbyte;
+ if (subreqchar >= 0) reqchar = subreqchar;
}
- /* For a forward assertion, we take the reqbyte, if set. This can be
+ /* For a forward assertion, we take the reqchar, if set. This can be
helpful if the pattern that follows the assertion doesn't set a different
- char. For example, it's useful for /(?=abcde).+/. We can't set firstbyte
+ char. For example, it's useful for /(?=abcde).+/. We can't set firstchar
for an assertion, however because it leads to incorrect effect for patterns
- such as /(?=a)a.+/ when the "real" "a" would then become a reqbyte instead
- of a firstbyte. This is overcome by a scan at the end if there's no
- firstbyte, looking for an asserted first char. */
+ such as /(?=a)a.+/ when the "real" "a" would then become a reqchar instead
+ of a firstchar. This is overcome by a scan at the end if there's no
+ firstchar, looking for an asserted first char. */
- else if (bravalue == OP_ASSERT && subreqbyte >= 0) reqbyte = subreqbyte;
+ else if (bravalue == OP_ASSERT && subreqchar >= 0) reqchar = subreqchar;
break; /* End of processing '(' */
@@ -5927,13 +6724,13 @@ for (;; ptr++)
/* For metasequences that actually match a character, we disable the
setting of a first character if it hasn't already been set. */
- if (firstbyte == REQ_UNSET && -c > ESC_b && -c < ESC_Z)
- firstbyte = REQ_NONE;
+ if (firstchar == REQ_UNSET && -c > ESC_b && -c < ESC_Z)
+ firstchar = REQ_NONE;
/* Set values to reset to if this is followed by a zero repeat. */
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ zerofirstchar = firstchar;
+ zeroreqchar = reqchar;
/* \g<name> or \g'name' is a subroutine call by name and \g<n> or \g'n'
is a subroutine call by number (Oniguruma syntax). In fact, the value
@@ -5944,7 +6741,7 @@ for (;; ptr++)
if (-c == ESC_g)
{
- const uschar *p;
+ const pcre_uchar *p;
save_hwm = cd->hwm; /* Normally this is set when '(' is read */
terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
@@ -5961,10 +6758,11 @@ for (;; ptr++)
if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS)
{
- BOOL isnumber = TRUE;
+ BOOL is_a_number = TRUE;
for (p = ptr + 1; *p != 0 && *p != terminator; p++)
{
- if ((cd->ctypes[*p] & ctype_digit) == 0) isnumber = FALSE;
+ if (!MAX_255(*p)) { is_a_number = FALSE; break; }
+ if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE;
if ((cd->ctypes[*p] & ctype_word) == 0) break;
}
if (*p != terminator)
@@ -5972,7 +6770,7 @@ for (;; ptr++)
*errorcodeptr = ERR57;
break;
}
- if (isnumber)
+ if (is_a_number)
{
ptr++;
goto HANDLE_NUMERICAL_RECURSION;
@@ -5984,7 +6782,7 @@ for (;; ptr++)
/* Test a signed number in angle brackets or quotes. */
p = ptr + 2;
- while ((digitab[*p] & ctype_digit) != 0) p++;
+ while (IS_DIGIT(*p)) p++;
if (*p != terminator)
{
*errorcodeptr = ERR57;
@@ -5995,11 +6793,16 @@ for (;; ptr++)
}
/* \k<name> or \k'name' is a back reference by name (Perl syntax).
- We also support \k{name} (.NET syntax) */
+ We also support \k{name} (.NET syntax). */
- if (-c == ESC_k && (ptr[1] == CHAR_LESS_THAN_SIGN ||
- ptr[1] == CHAR_APOSTROPHE || ptr[1] == CHAR_LEFT_CURLY_BRACKET))
+ if (-c == ESC_k)
{
+ if ((ptr[1] != CHAR_LESS_THAN_SIGN &&
+ ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
+ {
+ *errorcodeptr = ERR69;
+ break;
+ }
is_recurse = FALSE;
terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?
@@ -6007,7 +6810,7 @@ for (;; ptr++)
goto NAMED_REF_OR_RECURSE;
}
- /* Back references are handled specially; must disable firstbyte if
+ /* Back references are handled specially; must disable firstchar if
not set to cope with cases like (?=(\w+))\1: which would otherwise set
':' later. */
@@ -6017,9 +6820,9 @@ for (;; ptr++)
recno = -c - ESC_REF;
HANDLE_REFERENCE: /* Come here from named backref handling */
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ if (firstchar == REQ_UNSET) firstchar = REQ_NONE;
previous = code;
- *code++ = OP_REF;
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
PUT2INC(code, 0, recno);
cd->backref_map |= (recno < 32)? (1 << recno) : 1;
if (recno > cd->top_backref) cd->top_backref = recno;
@@ -6067,10 +6870,13 @@ for (;; ptr++)
/* For the rest (including \X when Unicode properties are supported), we
can obtain the OP value by negating the escape value in the default
situation when PCRE_UCP is not set. When it *is* set, we substitute
- Unicode property tests. */
+ Unicode property tests. Note that \b and \B do a one-character
+ lookbehind. */
else
{
+ if ((-c == ESC_b || -c == ESC_B) && cd->max_lookbehind == 0)
+ cd->max_lookbehind = 1;
#ifdef SUPPORT_UCP
if (-c >= ESC_DU && -c <= ESC_wu)
{
@@ -6079,9 +6885,12 @@ for (;; ptr++)
}
else
#endif
+ /* In non-UTF-8 mode, we turn \C into OP_ALLANY instead of OP_ANYBYTE
+ so that it works in DFA mode and in lookbehinds. */
+
{
previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;
- *code++ = -c;
+ *code++ = (!utf && c == -ESC_C)? OP_ALLANY : -c;
}
}
continue;
@@ -6091,9 +6900,9 @@ for (;; ptr++)
a value > 127. We set its representation in the length/buffer, and then
handle it as a data character. */
-#ifdef SUPPORT_UTF8
- if (utf8 && c > 127)
- mclength = _pcre_ord2utf8(c, mcbuffer);
+#ifdef SUPPORT_UTF
+ if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
+ mclength = PRIV(ord2utf)(c, mcbuffer);
else
#endif
@@ -6114,12 +6923,9 @@ for (;; ptr++)
mclength = 1;
mcbuffer[0] = c;
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 0xc0)
- {
- while ((ptr[1] & 0xc0) == 0x80)
- mcbuffer[mclength++] = *(++ptr);
- }
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(c))
+ ACROSSCHAR(TRUE, ptr[1], mcbuffer[mclength++] = *(++ptr));
#endif
/* At this point we have the character's bytes in mcbuffer, and the length
@@ -6127,7 +6933,7 @@ for (;; ptr++)
ONE_CHAR:
previous = code;
- *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARNC : OP_CHAR;
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARI : OP_CHAR;
for (c = 0; c < mclength; c++) *code++ = mcbuffer[c];
/* Remember if \r or \n were seen */
@@ -6137,34 +6943,34 @@ for (;; ptr++)
/* Set the first and required bytes appropriately. If no previous first
byte, set it from this character, but revert to none on a zero repeat.
- Otherwise, leave the firstbyte value alone, and don't change it on a zero
+ Otherwise, leave the firstchar value alone, and don't change it on a zero
repeat. */
- if (firstbyte == REQ_UNSET)
+ if (firstchar == REQ_UNSET)
{
- zerofirstbyte = REQ_NONE;
- zeroreqbyte = reqbyte;
+ zerofirstchar = REQ_NONE;
+ zeroreqchar = reqchar;
- /* If the character is more than one byte long, we can set firstbyte
+ /* If the character is more than one byte long, we can set firstchar
only if it is not to be matched caselessly. */
if (mclength == 1 || req_caseopt == 0)
{
- firstbyte = mcbuffer[0] | req_caseopt;
- if (mclength != 1) reqbyte = code[-1] | cd->req_varyopt;
+ firstchar = mcbuffer[0] | req_caseopt;
+ if (mclength != 1) reqchar = code[-1] | cd->req_varyopt;
}
- else firstbyte = reqbyte = REQ_NONE;
+ else firstchar = reqchar = REQ_NONE;
}
- /* firstbyte was previously set; we can set reqbyte only the length is
+ /* firstchar was previously set; we can set reqchar only if the length is
1 or the matching is caseful. */
else
{
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ zerofirstchar = firstchar;
+ zeroreqchar = reqchar;
if (mclength == 1 || req_caseopt == 0)
- reqbyte = code[-1] | req_caseopt | cd->req_varyopt;
+ reqchar = code[-1] | req_caseopt | cd->req_varyopt;
}
break; /* End of literal character handling */
@@ -6191,26 +6997,21 @@ return FALSE;
/* On entry, ptr is pointing past the bracket character, but on return it
points to the closing bracket, or vertical bar, or end of string. The code
variable is pointing at the byte into which the BRA operator has been stored.
-If the ims options are changed at the start (for a (?ims: group) or during any
-branch, we need to insert an OP_OPT item at the start of every following branch
-to ensure they get set correctly at run time, and also pass the new options
-into every subsequent branch compile.
-
This function is used during the pre-compile phase when we are trying to find
out the amount of memory needed, as well as during the real compile phase. The
value of lengthptr distinguishes the two phases.
Arguments:
options option bits, including any changes for this subpattern
- oldims previous settings of ims option bits
codeptr -> the address of the current code pointer
ptrptr -> the address of the current pattern pointer
errorcodeptr -> pointer to error code variable
lookbehind TRUE if this is a lookbehind assertion
reset_bracount TRUE to reset the count for each branch
skipbytes skip this many bytes at start (for brackets and OP_COND)
- firstbyteptr place to put the first required character, or a negative number
- reqbyteptr place to put the last required character, or a negative number
+ cond_depth depth of nesting for conditional subpatterns
+ firstcharptr place to put the first required character, or a negative number
+ reqcharptr place to put the last required character, or a negative number
bcptr pointer to the chain of currently open branches
cd points to the data block with tables pointers etc.
lengthptr NULL during the real compile phase
@@ -6220,30 +7021,29 @@ Returns: TRUE on success
*/
static BOOL
-compile_regex(int options, int oldims, uschar **codeptr, const uschar **ptrptr,
+compile_regex(int options, pcre_uchar **codeptr, const pcre_uchar **ptrptr,
int *errorcodeptr, BOOL lookbehind, BOOL reset_bracount, int skipbytes,
- int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr, compile_data *cd,
- int *lengthptr)
+ int cond_depth, pcre_int32 *firstcharptr, pcre_int32 *reqcharptr,
+ branch_chain *bcptr, compile_data *cd, int *lengthptr)
{
-const uschar *ptr = *ptrptr;
-uschar *code = *codeptr;
-uschar *last_branch = code;
-uschar *start_bracket = code;
-uschar *reverse_count = NULL;
+const pcre_uchar *ptr = *ptrptr;
+pcre_uchar *code = *codeptr;
+pcre_uchar *last_branch = code;
+pcre_uchar *start_bracket = code;
+pcre_uchar *reverse_count = NULL;
open_capitem capitem;
int capnumber = 0;
-int firstbyte, reqbyte;
-int branchfirstbyte, branchreqbyte;
+pcre_int32 firstchar, reqchar;
+pcre_int32 branchfirstchar, branchreqchar;
int length;
int orig_bracount;
int max_bracount;
-int old_external_options = cd->external_options;
branch_chain bc;
bc.outer = bcptr;
bc.current_branch = code;
-firstbyte = reqbyte = REQ_UNSET;
+firstchar = reqchar = REQ_UNSET;
/* Accumulate the length for use in the pre-compile phase. Start with the
length of the BRA and KET and any extra bytes that are required at the
@@ -6261,7 +7061,9 @@ pre-compile phase to find out whether anything has yet been compiled or not. */
/* If this is a capturing subpattern, add to the chain of open capturing items
so that we can detect them if (*ACCEPT) is encountered. This is also used to
-detect groups that contain recursive back references to themselves. */
+detect groups that contain recursive back references to themselves. Note that
+only OP_CBRA need be tested here; changing this opcode to one of its variants,
+e.g. OP_SCBRAPOS, happens later, after the group has been compiled. */
if (*code == OP_CBRA)
{
@@ -6287,15 +7089,6 @@ for (;;)
if (reset_bracount) cd->bracount = orig_bracount;
- /* Handle a change of ims options at the start of the branch */
-
- if ((options & PCRE_IMS) != oldims)
- {
- *code++ = OP_OPT;
- *code++ = options & PCRE_IMS;
- length += 2;
- }
-
/* Set up dummy OP_REVERSE if lookbehind assertion */
if (lookbehind)
@@ -6309,22 +7102,14 @@ for (;;)
/* Now compile the branch; in the pre-compile phase its length gets added
into the length. */
- if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstbyte,
- &branchreqbyte, &bc, cd, (lengthptr == NULL)? NULL : &length))
+ if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstchar,
+ &branchreqchar, &bc, cond_depth, cd,
+ (lengthptr == NULL)? NULL : &length))
{
*ptrptr = ptr;
return FALSE;
}
- /* If the external options have changed during this branch, it means that we
- are at the top level, and a leading option setting has been encountered. We
- need to re-set the original option values to take account of this so that,
- during the pre-compile phase, we know to allow for a re-set at the start of
- subsequent branches. */
-
- if (old_external_options != cd->external_options)
- oldims = cd->external_options & PCRE_IMS;
-
/* Keep the highest bracket count in case (?| was used and some branch
has fewer than the rest. */
@@ -6334,43 +7119,43 @@ for (;;)
if (lengthptr == NULL)
{
- /* If this is the first branch, the firstbyte and reqbyte values for the
+ /* If this is the first branch, the firstchar and reqchar values for the
branch become the values for the regex. */
if (*last_branch != OP_ALT)
{
- firstbyte = branchfirstbyte;
- reqbyte = branchreqbyte;
+ firstchar = branchfirstchar;
+ reqchar = branchreqchar;
}
- /* If this is not the first branch, the first char and reqbyte have to
+ /* If this is not the first branch, the first char and reqchar have to
match the values from all the previous branches, except that if the
- previous value for reqbyte didn't have REQ_VARY set, it can still match,
+ previous value for reqchar didn't have REQ_VARY set, it can still match,
and we set REQ_VARY for the regex. */
else
{
- /* If we previously had a firstbyte, but it doesn't match the new branch,
- we have to abandon the firstbyte for the regex, but if there was
- previously no reqbyte, it takes on the value of the old firstbyte. */
+ /* If we previously had a firstchar, but it doesn't match the new branch,
+ we have to abandon the firstchar for the regex, but if there was
+ previously no reqchar, it takes on the value of the old firstchar. */
- if (firstbyte >= 0 && firstbyte != branchfirstbyte)
+ if (firstchar >= 0 && firstchar != branchfirstchar)
{
- if (reqbyte < 0) reqbyte = firstbyte;
- firstbyte = REQ_NONE;
+ if (reqchar < 0) reqchar = firstchar;
+ firstchar = REQ_NONE;
}
- /* If we (now or from before) have no firstbyte, a firstbyte from the
- branch becomes a reqbyte if there isn't a branch reqbyte. */
+ /* If we (now or from before) have no firstchar, a firstchar from the
+ branch becomes a reqchar if there isn't a branch reqchar. */
- if (firstbyte < 0 && branchfirstbyte >= 0 && branchreqbyte < 0)
- branchreqbyte = branchfirstbyte;
+ if (firstchar < 0 && branchfirstchar >= 0 && branchreqchar < 0)
+ branchreqchar = branchfirstchar;
- /* Now ensure that the reqbytes match */
+ /* Now ensure that the reqchars match */
- if ((reqbyte & ~REQ_VARY) != (branchreqbyte & ~REQ_VARY))
- reqbyte = REQ_NONE;
- else reqbyte |= branchreqbyte; /* To "or" REQ_VARY */
+ if ((reqchar & ~REQ_VARY) != (branchreqchar & ~REQ_VARY))
+ reqchar = REQ_NONE;
+ else reqchar |= branchreqchar; /* To "or" REQ_VARY */
}
/* If lookbehind, check that this branch matches a fixed-length string, and
@@ -6385,7 +7170,8 @@ for (;;)
{
int fixed_length;
*code = OP_END;
- fixed_length = find_fixedlength(last_branch, options, FALSE, cd);
+ fixed_length = find_fixedlength(last_branch, (options & PCRE_UTF8) != 0,
+ FALSE, cd);
DPRINTF(("fixed length = %d\n", fixed_length));
if (fixed_length == -3)
{
@@ -6393,11 +7179,17 @@ for (;;)
}
else if (fixed_length < 0)
{
- *errorcodeptr = (fixed_length == -2)? ERR36 : ERR25;
+ *errorcodeptr = (fixed_length == -2)? ERR36 :
+ (fixed_length == -4)? ERR70: ERR25;
*ptrptr = ptr;
return FALSE;
}
- else { PUT(reverse_count, 0, fixed_length); }
+ else
+ {
+ if (fixed_length > cd->max_lookbehind)
+ cd->max_lookbehind = fixed_length;
+ PUT(reverse_count, 0, fixed_length);
+ }
}
}
@@ -6406,9 +7198,7 @@ for (;;)
of offsets, with the field in the BRA item now becoming an offset to the
first alternative. If there are no alternatives, it points to the end of the
group. The length in the terminating ket is always the length of the whole
- bracketed item. If any of the ims options were changed inside the group,
- compile a resetting op-code following, except at the very end of the pattern.
- Return leaving the pointer at the terminating char. */
+ bracketed item. Return leaving the pointer at the terminating char. */
if (*ptr != CHAR_VERTICAL_LINE)
{
@@ -6440,7 +7230,7 @@ for (;;)
if (cd->open_caps->flag)
{
memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
- code - start_bracket);
+ IN_UCHARS(code - start_bracket));
*start_bracket = OP_ONCE;
code += 1 + LINK_SIZE;
PUT(start_bracket, 1, (int)(code - start_bracket));
@@ -6452,15 +7242,6 @@ for (;;)
cd->open_caps = cd->open_caps->next;
}
- /* Reset options if needed. */
-
- if ((options & PCRE_IMS) != oldims && *ptr == CHAR_RIGHT_PARENTHESIS)
- {
- *code++ = OP_OPT;
- *code++ = oldims;
- length += 2;
- }
-
/* Retain the highest bracket number, in case resetting was used. */
cd->bracount = max_bracount;
@@ -6469,8 +7250,8 @@ for (;;)
*codeptr = code;
*ptrptr = ptr;
- *firstbyteptr = firstbyte;
- *reqbyteptr = reqbyte;
+ *firstcharptr = firstchar;
+ *reqcharptr = reqchar;
if (lengthptr != NULL)
{
if (OFLOW_MAX - *lengthptr < length)
@@ -6520,8 +7301,8 @@ for (;;)
/* Try to find out if this is an anchored regular expression. Consider each
alternative branch. If they all start with OP_SOD or OP_CIRC, or with a bracket
all of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then
-it's anchored. However, if this is a multiline pattern, then only OP_SOD
-counts, since OP_CIRC can match in the middle.
+it's anchored. However, if this is a multiline pattern, then only OP_SOD will
+be found, because ^ generates OP_CIRCM in that mode.
We can also consider a regex to be anchored if OP_SOM starts all its branches.
This is the code for \G, which means "match at start of match position, taking
@@ -6542,7 +7323,6 @@ of the more common cases more precisely.
Arguments:
code points to start of expression (the bracket)
- options points to the options setting
bracket_map a bitmap of which brackets we are inside while testing; this
handles up to substring 31; after that we just have to take
the less precise approach
@@ -6552,35 +7332,38 @@ Returns: TRUE or FALSE
*/
static BOOL
-is_anchored(register const uschar *code, int *options, unsigned int bracket_map,
+is_anchored(register const pcre_uchar *code, unsigned int bracket_map,
unsigned int backref_map)
{
do {
- const uschar *scode = first_significant_code(code + _pcre_OP_lengths[*code],
- options, PCRE_MULTILINE, FALSE);
+ const pcre_uchar *scode = first_significant_code(
+ code + PRIV(OP_lengths)[*code], FALSE);
register int op = *scode;
/* Non-capturing brackets */
- if (op == OP_BRA)
+ if (op == OP_BRA || op == OP_BRAPOS ||
+ op == OP_SBRA || op == OP_SBRAPOS)
{
- if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE;
+ if (!is_anchored(scode, bracket_map, backref_map)) return FALSE;
}
/* Capturing brackets */
- else if (op == OP_CBRA)
+ else if (op == OP_CBRA || op == OP_CBRAPOS ||
+ op == OP_SCBRA || op == OP_SCBRAPOS)
{
int n = GET2(scode, 1+LINK_SIZE);
int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
- if (!is_anchored(scode, options, new_map, backref_map)) return FALSE;
+ if (!is_anchored(scode, new_map, backref_map)) return FALSE;
}
/* Other brackets */
- else if (op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
+ else if (op == OP_ASSERT || op == OP_ONCE || op == OP_ONCE_NC ||
+ op == OP_COND)
{
- if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE;
+ if (!is_anchored(scode, bracket_map, backref_map)) return FALSE;
}
/* .* is not anchored unless DOTALL is set (which generates OP_ALLANY) and
@@ -6595,9 +7378,7 @@ do {
/* Check for explicit anchoring */
- else if (op != OP_SOD && op != OP_SOM &&
- ((*options & PCRE_MULTILINE) != 0 || op != OP_CIRC))
- return FALSE;
+ else if (op != OP_SOD && op != OP_SOM && op != OP_CIRC) return FALSE;
code += GET(code, 1);
}
while (*code == OP_ALT); /* Loop for each alternative */
@@ -6628,12 +7409,12 @@ Returns: TRUE or FALSE
*/
static BOOL
-is_startline(const uschar *code, unsigned int bracket_map,
+is_startline(const pcre_uchar *code, unsigned int bracket_map,
unsigned int backref_map)
{
do {
- const uschar *scode = first_significant_code(code + _pcre_OP_lengths[*code],
- NULL, 0, FALSE);
+ const pcre_uchar *scode = first_significant_code(
+ code + PRIV(OP_lengths)[*code], FALSE);
register int op = *scode;
/* If we are at the start of a conditional assertion group, *both* the
@@ -6644,7 +7425,7 @@ do {
if (op == OP_COND)
{
scode += 1 + LINK_SIZE;
- if (*scode == OP_CALLOUT) scode += _pcre_OP_lengths[OP_CALLOUT];
+ if (*scode == OP_CALLOUT) scode += PRIV(OP_lengths)[OP_CALLOUT];
switch (*scode)
{
case OP_CREF:
@@ -6660,20 +7441,22 @@ do {
scode += 1 + LINK_SIZE;
break;
}
- scode = first_significant_code(scode, NULL, 0, FALSE);
+ scode = first_significant_code(scode, FALSE);
op = *scode;
}
/* Non-capturing brackets */
- if (op == OP_BRA)
+ if (op == OP_BRA || op == OP_BRAPOS ||
+ op == OP_SBRA || op == OP_SBRAPOS)
{
if (!is_startline(scode, bracket_map, backref_map)) return FALSE;
}
/* Capturing brackets */
- else if (op == OP_CBRA)
+ else if (op == OP_CBRA || op == OP_CBRAPOS ||
+ op == OP_SCBRA || op == OP_SCBRAPOS)
{
int n = GET2(scode, 1+LINK_SIZE);
int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
@@ -6682,7 +7465,7 @@ do {
/* Other brackets */
- else if (op == OP_ASSERT || op == OP_ONCE)
+ else if (op == OP_ASSERT || op == OP_ONCE || op == OP_ONCE_NC)
{
if (!is_startline(scode, bracket_map, backref_map)) return FALSE;
}
@@ -6697,7 +7480,7 @@ do {
/* Check for explicit circumflex */
- else if (op != OP_CIRC) return FALSE;
+ else if (op != OP_CIRC && op != OP_CIRCM) return FALSE;
/* Move on to the next alternative */
@@ -6723,20 +7506,21 @@ we return that char, otherwise -1.
Arguments:
code points to start of expression (the bracket)
- options pointer to the options (used to check casing changes)
inassert TRUE if in an assertion
Returns: -1 or the fixed first char
*/
static int
-find_firstassertedchar(const uschar *code, int *options, BOOL inassert)
+find_firstassertedchar(const pcre_uchar *code, BOOL inassert)
{
register int c = -1;
do {
int d;
- const uschar *scode =
- first_significant_code(code + 1+LINK_SIZE, options, PCRE_CASELESS, TRUE);
+ int xl = (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS)? IMM2_SIZE:0;
+ const pcre_uchar *scode = first_significant_code(code + 1+LINK_SIZE + xl,
+ TRUE);
register int op = *scode;
switch(op)
@@ -6745,30 +7529,44 @@ do {
return -1;
case OP_BRA:
+ case OP_BRAPOS:
case OP_CBRA:
+ case OP_SCBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
case OP_ASSERT:
case OP_ONCE:
+ case OP_ONCE_NC:
case OP_COND:
- if ((d = find_firstassertedchar(scode, options, op == OP_ASSERT)) < 0)
+ if ((d = find_firstassertedchar(scode, op == OP_ASSERT)) < 0)
return -1;
if (c < 0) c = d; else if (c != d) return -1;
break;
- case OP_EXACT: /* Fall through */
- scode += 2;
+ case OP_EXACT:
+ scode += IMM2_SIZE;
+ /* Fall through */
case OP_CHAR:
- case OP_CHARNC:
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
if (!inassert) return -1;
- if (c < 0)
- {
- c = scode[1];
- if ((*options & PCRE_CASELESS) != 0) c |= REQ_CASELESS;
- }
- else if (c != scode[1]) return -1;
+ if (c < 0) c = scode[1];
+ else if (c != scode[1]) return -1;
+ break;
+
+ case OP_EXACTI:
+ scode += IMM2_SIZE;
+ /* Fall through */
+
+ case OP_CHARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ if (!inassert) return -1;
+ if (c < 0) c = scode[1] | REQ_CASELESS;
+ else if (c != scode[1]) return -1;
break;
}
@@ -6802,28 +7600,45 @@ Returns: pointer to compiled data block, or NULL on error,
with errorptr and erroroffset set
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
pcre_compile(const char *pattern, int options, const char **errorptr,
int *erroroffset, const unsigned char *tables)
+#else
+PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
+pcre16_compile(PCRE_SPTR16 pattern, int options, const char **errorptr,
+ int *erroroffset, const unsigned char *tables)
+#endif
{
+#ifdef COMPILE_PCRE8
return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
+#else
+return pcre16_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
+#endif
}
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
pcre_compile2(const char *pattern, int options, int *errorcodeptr,
const char **errorptr, int *erroroffset, const unsigned char *tables)
+#else
+PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
+pcre16_compile2(PCRE_SPTR16 pattern, int options, int *errorcodeptr,
+ const char **errorptr, int *erroroffset, const unsigned char *tables)
+#endif
{
-real_pcre *re;
+REAL_PCRE *re;
int length = 1; /* For final END opcode */
-int firstbyte, reqbyte, newline;
+pcre_int32 firstchar, reqchar;
+int newline;
int errorcode = 0;
int skipatstart = 0;
-BOOL utf8;
+BOOL utf;
size_t size;
-uschar *code;
-const uschar *codestart;
-const uschar *ptr;
+pcre_uchar *code;
+const pcre_uchar *codestart;
+const pcre_uchar *ptr;
compile_data compile_block;
compile_data *cd = &compile_block;
@@ -6831,13 +7646,14 @@ compile_data *cd = &compile_block;
computing the amount of memory that is needed. Compiled items are thrown away
as soon as possible, so that a fairly large buffer should be sufficient for
this purpose. The same space is used in the second phase for remembering where
-to fill in forward references to subpatterns. */
+to fill in forward references to subpatterns. That may overflow, in which case
+new memory is obtained from malloc(). */
-uschar cworkspace[COMPILE_WORK_SIZE];
+pcre_uchar cworkspace[COMPILE_WORK_SIZE];
/* Set this early so that early errors get offset 0. */
-ptr = (const uschar *)pattern;
+ptr = (const pcre_uchar *)pattern;
/* We can't pass back an error message if errorptr is NULL; I guess the best we
can do is just return NULL, but we can set a code value if there is a code
@@ -6864,7 +7680,7 @@ if (erroroffset == NULL)
/* Set up pointers to the individual character tables */
-if (tables == NULL) tables = _pcre_default_tables;
+if (tables == NULL) tables = PRIV(default_tables);
cd->lcc = tables + lcc_offset;
cd->fcc = tables + fcc_offset;
cd->cbits = tables + cbits_offset;
@@ -6887,27 +7703,33 @@ while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
int newnl = 0;
int newbsr = 0;
- if (strncmp((char *)(ptr+skipatstart+2), STRING_UTF8_RIGHTPAR, 5) == 0)
+#ifdef COMPILE_PCRE8
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 5) == 0)
{ skipatstart += 7; options |= PCRE_UTF8; continue; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_UCP_RIGHTPAR, 4) == 0)
+#endif
+#ifdef COMPILE_PCRE16
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 6) == 0)
+ { skipatstart += 8; options |= PCRE_UTF16; continue; }
+#endif
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0)
{ skipatstart += 6; options |= PCRE_UCP; continue; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_NO_START_OPT_RIGHTPAR, 13) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0)
{ skipatstart += 15; options |= PCRE_NO_START_OPTIMIZE; continue; }
- if (strncmp((char *)(ptr+skipatstart+2), STRING_CR_RIGHTPAR, 3) == 0)
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CR_RIGHTPAR, 3) == 0)
{ skipatstart += 5; newnl = PCRE_NEWLINE_CR; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_LF_RIGHTPAR, 3) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LF_RIGHTPAR, 3) == 0)
{ skipatstart += 5; newnl = PCRE_NEWLINE_LF; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_CRLF_RIGHTPAR, 5) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CRLF_RIGHTPAR, 5) == 0)
{ skipatstart += 7; newnl = PCRE_NEWLINE_CR + PCRE_NEWLINE_LF; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_ANY_RIGHTPAR, 4) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANY_RIGHTPAR, 4) == 0)
{ skipatstart += 6; newnl = PCRE_NEWLINE_ANY; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_ANYCRLF_RIGHTPAR, 8) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANYCRLF_RIGHTPAR, 8) == 0)
{ skipatstart += 10; newnl = PCRE_NEWLINE_ANYCRLF; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_BSR_ANYCRLF_RIGHTPAR, 12) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_ANYCRLF_RIGHTPAR, 12) == 0)
{ skipatstart += 14; newbsr = PCRE_BSR_ANYCRLF; }
- else if (strncmp((char *)(ptr+skipatstart+2), STRING_BSR_UNICODE_RIGHTPAR, 12) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_UNICODE_RIGHTPAR, 12) == 0)
{ skipatstart += 14; newbsr = PCRE_BSR_UNICODE; }
if (newnl != 0)
@@ -6917,19 +7739,27 @@ while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
else break;
}
-utf8 = (options & PCRE_UTF8) != 0;
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+utf = (options & PCRE_UTF8) != 0;
-/* Can't support UTF8 unless PCRE has been compiled to include the code. */
+/* Can't support UTF unless PCRE has been compiled to include the code. The
+return of an error code from PRIV(valid_utf)() is a new feature, introduced in
+release 8.13. It is passed back from pcre_[dfa_]exec(), but at the moment is
+not used here. */
-#ifdef SUPPORT_UTF8
-if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 &&
- (*erroroffset = _pcre_valid_utf8((USPTR)pattern, -1)) >= 0)
+#ifdef SUPPORT_UTF
+if (utf && (options & PCRE_NO_UTF8_CHECK) == 0 &&
+ (errorcode = PRIV(valid_utf)((PCRE_PUCHAR)pattern, -1, erroroffset)) != 0)
{
+#ifdef COMPILE_PCRE8
errorcode = ERR44;
+#else
+ errorcode = ERR74;
+#endif
goto PCRE_EARLY_ERROR_RETURN2;
}
#else
-if (utf8)
+if (utf)
{
errorcode = ERR32;
goto PCRE_EARLY_ERROR_RETURN;
@@ -6948,13 +7778,11 @@ if ((options & PCRE_UCP) != 0)
/* Check validity of \R options. */
-switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
+if ((options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) ==
+ (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
{
- case 0:
- case PCRE_BSR_ANYCRLF:
- case PCRE_BSR_UNICODE:
- break;
- default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
+ errorcode = ERR56;
+ goto PCRE_EARLY_ERROR_RETURN;
}
/* Handle different types of newline. The three bits give seven cases. The
@@ -7007,7 +7835,10 @@ cd->backref_map = 0;
/* Reflect pattern for debugging output */
DPRINTF(("------------------------------------------------------------------\n"));
-DPRINTF(("%s\n", pattern));
+#ifdef PCRE_DEBUG
+print_puchar(stdout, (PCRE_PUCHAR)pattern);
+#endif
+DPRINTF(("\n"));
/* Pretend to compile the pattern while actually just accumulating the length
of memory required. This behaviour is triggered by passing a non-NULL final
@@ -7020,12 +7851,15 @@ cd->bracount = cd->final_bracount = 0;
cd->names_found = 0;
cd->name_entry_size = 0;
cd->name_table = NULL;
-cd->start_workspace = cworkspace;
cd->start_code = cworkspace;
cd->hwm = cworkspace;
-cd->start_pattern = (const uschar *)pattern;
-cd->end_pattern = (const uschar *)(pattern + strlen(pattern));
+cd->start_workspace = cworkspace;
+cd->workspace_size = COMPILE_WORK_SIZE;
+cd->start_pattern = (const pcre_uchar *)pattern;
+cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));
cd->req_varyopt = 0;
+cd->assert_depth = 0;
+cd->max_lookbehind = 0;
cd->external_options = options;
cd->external_flags = 0;
cd->open_caps = NULL;
@@ -7039,13 +7873,12 @@ outside can help speed up starting point checks. */
ptr += skipatstart;
code = cworkspace;
*code = OP_BRA;
-(void)compile_regex(cd->external_options, cd->external_options & PCRE_IMS,
- &code, &ptr, &errorcode, FALSE, FALSE, 0, &firstbyte, &reqbyte, NULL, cd,
- &length);
+(void)compile_regex(cd->external_options, &code, &ptr, &errorcode, FALSE,
+ FALSE, 0, 0, &firstchar, &reqchar, NULL, cd, &length);
if (errorcode != 0) goto PCRE_EARLY_ERROR_RETURN;
DPRINTF(("end pre-compile: length=%d workspace=%d\n", length,
- cd->hwm - cworkspace));
+ (int)(cd->hwm - cworkspace)));
if (length > MAX_PATTERN_SIZE)
{
@@ -7058,8 +7891,8 @@ externally provided function. Integer overflow should no longer be possible
because nowadays we limit the maximum value of cd->names_found and
cd->name_entry_size. */
-size = length + sizeof(real_pcre) + cd->names_found * (cd->name_entry_size + 3);
-re = (real_pcre *)(pcre_malloc)(size);
+size = sizeof(REAL_PCRE) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar);
+re = (REAL_PCRE *)(PUBL(malloc))(size);
if (re == NULL)
{
@@ -7077,14 +7910,13 @@ re->magic_number = MAGIC_NUMBER;
re->size = (int)size;
re->options = cd->external_options;
re->flags = cd->external_flags;
-re->dummy1 = 0;
-re->first_byte = 0;
-re->req_byte = 0;
-re->name_table_offset = sizeof(real_pcre);
+re->first_char = 0;
+re->req_char = 0;
+re->name_table_offset = sizeof(REAL_PCRE) / sizeof(pcre_uchar);
re->name_entry_size = cd->name_entry_size;
re->name_count = cd->names_found;
re->ref_count = 0;
-re->tables = (tables == _pcre_default_tables)? NULL : tables;
+re->tables = (tables == PRIV(default_tables))? NULL : tables;
re->nullpad = NULL;
/* The starting points of the name/number translation table and of the code are
@@ -7095,12 +7927,14 @@ field; this time it's used for remembering forward references to subpatterns.
*/
cd->final_bracount = cd->bracount; /* Save for checking forward references */
+cd->assert_depth = 0;
cd->bracount = 0;
+cd->max_lookbehind = 0;
cd->names_found = 0;
-cd->name_table = (uschar *)re + re->name_table_offset;
+cd->name_table = (pcre_uchar *)re + re->name_table_offset;
codestart = cd->name_table + re->name_entry_size * re->name_count;
cd->start_code = codestart;
-cd->hwm = cworkspace;
+cd->hwm = (pcre_uchar *)(cd->start_workspace);
cd->req_varyopt = 0;
cd->had_accept = FALSE;
cd->check_lookbehind = FALSE;
@@ -7110,16 +7944,17 @@ cd->open_caps = NULL;
error, errorcode will be set non-zero, so we don't need to look at the result
of the function here. */
-ptr = (const uschar *)pattern + skipatstart;
-code = (uschar *)codestart;
+ptr = (const pcre_uchar *)pattern + skipatstart;
+code = (pcre_uchar *)codestart;
*code = OP_BRA;
-(void)compile_regex(re->options, re->options & PCRE_IMS, &code, &ptr,
- &errorcode, FALSE, FALSE, 0, &firstbyte, &reqbyte, NULL, cd, NULL);
+(void)compile_regex(re->options, &code, &ptr, &errorcode, FALSE, FALSE, 0, 0,
+ &firstchar, &reqchar, NULL, cd, NULL);
re->top_bracket = cd->bracount;
re->top_backref = cd->top_backref;
-re->flags = cd->external_flags;
+re->max_lookbehind = cd->max_lookbehind;
+re->flags = cd->external_flags | PCRE_MODE;
-if (cd->had_accept) reqbyte = -1; /* Must disable after (*ACCEPT) */
+if (cd->had_accept) reqchar = REQ_NONE; /* Must disable after (*ACCEPT) */
/* If not reached end of pattern on success, there's an excess bracket. */
@@ -7134,20 +7969,34 @@ if debugging, leave the test till after things are printed out. */
if (code - codestart > length) errorcode = ERR23;
#endif
-/* Fill in any forward references that are required. */
+/* Fill in any forward references that are required. There may be repeated
+references; optimize for them, as searching a large regex takes time. */
-while (errorcode == 0 && cd->hwm > cworkspace)
+if (cd->hwm > cd->start_workspace)
{
- int offset, recno;
- const uschar *groupptr;
- cd->hwm -= LINK_SIZE;
- offset = GET(cd->hwm, 0);
- recno = GET(codestart, offset);
- groupptr = _pcre_find_bracket(codestart, utf8, recno);
- if (groupptr == NULL) errorcode = ERR53;
- else PUT(((uschar *)codestart), offset, (int)(groupptr - codestart));
+ int prev_recno = -1;
+ const pcre_uchar *groupptr = NULL;
+ while (errorcode == 0 && cd->hwm > cd->start_workspace)
+ {
+ int offset, recno;
+ cd->hwm -= LINK_SIZE;
+ offset = GET(cd->hwm, 0);
+ recno = GET(codestart, offset);
+ if (recno != prev_recno)
+ {
+ groupptr = PRIV(find_bracket)(codestart, utf, recno);
+ prev_recno = recno;
+ }
+ if (groupptr == NULL) errorcode = ERR53;
+ else PUT(((pcre_uchar *)codestart), offset, (int)(groupptr - codestart));
+ }
}
+/* If the workspace had to be expanded, free the new memory. */
+
+if (cd->workspace_size > COMPILE_WORK_SIZE)
+ (PUBL(free))((void *)cd->start_workspace);
+
/* Give an error if there's back reference to a non-existent capturing
subpattern. */
@@ -7163,31 +8012,34 @@ length, and set their lengths. */
if (cd->check_lookbehind)
{
- uschar *cc = (uschar *)codestart;
+ pcre_uchar *cc = (pcre_uchar *)codestart;
/* Loop, searching for OP_REVERSE items, and process those that do not have
their length set. (Actually, it will also re-process any that have a length
of zero, but that is a pathological case, and it does no harm.) When we find
one, we temporarily terminate the branch it is in while we scan it. */
- for (cc = (uschar *)_pcre_find_bracket(codestart, utf8, -1);
+ for (cc = (pcre_uchar *)PRIV(find_bracket)(codestart, utf, -1);
cc != NULL;
- cc = (uschar *)_pcre_find_bracket(cc, utf8, -1))
+ cc = (pcre_uchar *)PRIV(find_bracket)(cc, utf, -1))
{
if (GET(cc, 1) == 0)
{
int fixed_length;
- uschar *be = cc - 1 - LINK_SIZE + GET(cc, -LINK_SIZE);
+ pcre_uchar *be = cc - 1 - LINK_SIZE + GET(cc, -LINK_SIZE);
int end_op = *be;
*be = OP_END;
- fixed_length = find_fixedlength(cc, re->options, TRUE, cd);
+ fixed_length = find_fixedlength(cc, (re->options & PCRE_UTF8) != 0, TRUE,
+ cd);
*be = end_op;
DPRINTF(("fixed length = %d\n", fixed_length));
if (fixed_length < 0)
{
- errorcode = (fixed_length == -2)? ERR36 : ERR25;
+ errorcode = (fixed_length == -2)? ERR36 :
+ (fixed_length == -4)? ERR70 : ERR25;
break;
}
+ if (fixed_length > cd->max_lookbehind) cd->max_lookbehind = fixed_length;
PUT(cc, 1, fixed_length);
}
cc += 1 + LINK_SIZE;
@@ -7198,9 +8050,9 @@ if (cd->check_lookbehind)
if (errorcode != 0)
{
- (pcre_free)(re);
+ (PUBL(free))(re);
PCRE_EARLY_ERROR_RETURN:
- *erroroffset = (int)(ptr - (const uschar *)pattern);
+ *erroroffset = (int)(ptr - (const pcre_uchar *)pattern);
PCRE_EARLY_ERROR_RETURN2:
*errorptr = find_error_text(errorcode);
if (errorcodeptr != NULL) *errorcodeptr = errorcode;
@@ -7219,18 +8071,42 @@ start with ^. and also when all branches start with .* for non-DOTALL matches.
if ((re->options & PCRE_ANCHORED) == 0)
{
- int temp_options = re->options; /* May get changed during these scans */
- if (is_anchored(codestart, &temp_options, 0, cd->backref_map))
+ if (is_anchored(codestart, 0, cd->backref_map))
re->options |= PCRE_ANCHORED;
else
{
- if (firstbyte < 0)
- firstbyte = find_firstassertedchar(codestart, &temp_options, FALSE);
- if (firstbyte >= 0) /* Remove caseless flag for non-caseable chars */
+ if (firstchar < 0)
+ firstchar = find_firstassertedchar(codestart, FALSE);
+ if (firstchar >= 0) /* Remove caseless flag for non-caseable chars */
{
- int ch = firstbyte & 255;
- re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&
- cd->fcc[ch] == ch)? ch : firstbyte;
+#ifdef COMPILE_PCRE8
+ re->first_char = firstchar & 0xff;
+#else
+#ifdef COMPILE_PCRE16
+ re->first_char = firstchar & 0xffff;
+#endif
+#endif
+ if ((firstchar & REQ_CASELESS) != 0)
+ {
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ /* We ignore non-ASCII first chars in 8 bit mode. */
+ if (utf)
+ {
+ if (re->first_char < 128)
+ {
+ if (cd->fcc[re->first_char] != re->first_char)
+ re->flags |= PCRE_FCH_CASELESS;
+ }
+ else if (UCD_OTHERCASE(re->first_char) != re->first_char)
+ re->flags |= PCRE_FCH_CASELESS;
+ }
+ else
+#endif
+ if (MAX_255(re->first_char)
+ && cd->fcc[re->first_char] != re->first_char)
+ re->flags |= PCRE_FCH_CASELESS;
+ }
+
re->flags |= PCRE_FIRSTSET;
}
else if (is_startline(codestart, 0, cd->backref_map))
@@ -7242,12 +8118,36 @@ if ((re->options & PCRE_ANCHORED) == 0)
variable length item in the regex. Remove the caseless flag for non-caseable
bytes. */
-if (reqbyte >= 0 &&
- ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0))
+if (reqchar >= 0 &&
+ ((re->options & PCRE_ANCHORED) == 0 || (reqchar & REQ_VARY) != 0))
{
- int ch = reqbyte & 255;
- re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&
- cd->fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;
+#ifdef COMPILE_PCRE8
+ re->req_char = reqchar & 0xff;
+#else
+#ifdef COMPILE_PCRE16
+ re->req_char = reqchar & 0xffff;
+#endif
+#endif
+ if ((reqchar & REQ_CASELESS) != 0)
+ {
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ /* We ignore non-ASCII first chars in 8 bit mode. */
+ if (utf)
+ {
+ if (re->req_char < 128)
+ {
+ if (cd->fcc[re->req_char] != re->req_char)
+ re->flags |= PCRE_RCH_CASELESS;
+ }
+ else if (UCD_OTHERCASE(re->req_char) != re->req_char)
+ re->flags |= PCRE_RCH_CASELESS;
+ }
+ else
+#endif
+ if (MAX_255(re->req_char) && cd->fcc[re->req_char] != re->req_char)
+ re->flags |= PCRE_RCH_CASELESS;
+ }
+
re->flags |= PCRE_REQCHSET;
}
@@ -7262,38 +8162,46 @@ printf("Options=%08x\n", re->options);
if ((re->flags & PCRE_FIRSTSET) != 0)
{
- int ch = re->first_byte & 255;
- const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)?
- "" : " (caseless)";
- if (isprint(ch)) printf("First char = %c%s\n", ch, caseless);
+ pcre_uchar ch = re->first_char;
+ const char *caseless =
+ ((re->flags & PCRE_FCH_CASELESS) == 0)? "" : " (caseless)";
+ if (PRINTABLE(ch)) printf("First char = %c%s\n", ch, caseless);
else printf("First char = \\x%02x%s\n", ch, caseless);
}
if ((re->flags & PCRE_REQCHSET) != 0)
{
- int ch = re->req_byte & 255;
- const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)?
- "" : " (caseless)";
- if (isprint(ch)) printf("Req char = %c%s\n", ch, caseless);
+ pcre_uchar ch = re->req_char;
+ const char *caseless =
+ ((re->flags & PCRE_RCH_CASELESS) == 0)? "" : " (caseless)";
+ if (PRINTABLE(ch)) printf("Req char = %c%s\n", ch, caseless);
else printf("Req char = \\x%02x%s\n", ch, caseless);
}
-pcre_printint(re, stdout, TRUE);
+#ifdef COMPILE_PCRE8
+pcre_printint((pcre *)re, stdout, TRUE);
+#else
+pcre16_printint((pcre *)re, stdout, TRUE);
+#endif
/* This check is done here in the debugging case so that the code that
was compiled can be seen. */
if (code - codestart > length)
{
- (pcre_free)(re);
+ (PUBL(free))(re);
*errorptr = find_error_text(ERR23);
- *erroroffset = ptr - (uschar *)pattern;
+ *erroroffset = ptr - (pcre_uchar *)pattern;
if (errorcodeptr != NULL) *errorcodeptr = ERR23;
return NULL;
}
#endif /* PCRE_DEBUG */
+#ifdef COMPILE_PCRE8
return (pcre *)re;
+#else
+return (pcre16 *)re;
+#endif
}
/* End of pcre_compile.c */
diff --git a/ext/pcre/pcrelib/pcre_config.c b/ext/pcre/pcrelib/pcre_config.c
index 3e7421577..34719591f 100644
--- a/ext/pcre/pcrelib/pcre_config.c
+++ b/ext/pcre/pcrelib/pcre_config.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,9 @@ POSSIBILITY OF SUCH DAMAGE.
#include "config.h"
+/* Keep the original link size. */
+static int real_link_size = LINK_SIZE;
+
#include "pcre_internal.h"
@@ -60,18 +63,41 @@ Arguments:
Returns: 0 if data returned, negative on error
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_config(int what, void *where)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_config(int what, void *where)
+#endif
{
switch (what)
{
case PCRE_CONFIG_UTF8:
-#ifdef SUPPORT_UTF8
+#if defined COMPILE_PCRE16
+ *((int *)where) = 0;
+ return PCRE_ERROR_BADOPTION;
+#else
+#if defined SUPPORT_UTF
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+#endif
+
+ case PCRE_CONFIG_UTF16:
+#if defined COMPILE_PCRE8
+ *((int *)where) = 0;
+ return PCRE_ERROR_BADOPTION;
+#else
+#if defined SUPPORT_UTF
*((int *)where) = 1;
#else
*((int *)where) = 0;
#endif
break;
+#endif
case PCRE_CONFIG_UNICODE_PROPERTIES:
#ifdef SUPPORT_UCP
@@ -81,6 +107,22 @@ switch (what)
#endif
break;
+ case PCRE_CONFIG_JIT:
+#ifdef SUPPORT_JIT
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+
+ case PCRE_CONFIG_JITTARGET:
+#ifdef SUPPORT_JIT
+ *((const char **)where) = PRIV(jit_get_target)();
+#else
+ *((const char **)where) = NULL;
+#endif
+ break;
+
case PCRE_CONFIG_NEWLINE:
*((int *)where) = NEWLINE;
break;
@@ -94,7 +136,7 @@ switch (what)
break;
case PCRE_CONFIG_LINK_SIZE:
- *((int *)where) = LINK_SIZE;
+ *((int *)where) = real_link_size;
break;
case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD:
diff --git a/ext/pcre/pcrelib/pcre_exec.c b/ext/pcre/pcrelib/pcre_exec.c
index a007786de..4a8f1c268 100644
--- a/ext/pcre/pcrelib/pcre_exec.c
+++ b/ext/pcre/pcrelib/pcre_exec.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,6 @@ POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
-
/* This module contains pcre_exec(), the externally visible function that does
pattern matching using an NFA algorithm, trying to mimic Perl as closely as
possible. There are also some static supporting functions. */
@@ -55,10 +54,12 @@ possible. There are also some static supporting functions. */
#undef min
#undef max
-/* Flag bits for the match() function */
+/* Values for setting in md->match_function_type to indicate two special types
+of call to match(). We do it this way to save on using another stack variable,
+as stack usage is to be discouraged. */
-#define match_condassert 0x01 /* Called to check a condition assertion */
-#define match_cbegroup 0x02 /* Could-be-empty unlimited repeat group */
+#define MATCH_CONDASSERT 1 /* Called to check a condition assertion */
+#define MATCH_CBEGROUP 2 /* Could-be-empty unlimited repeat group */
/* Non-error returns from the match() function. Error returns are externally
defined PCRE_ERROR_xxx codes, which are all negative. */
@@ -71,18 +72,12 @@ negative to avoid the external error codes. */
#define MATCH_ACCEPT (-999)
#define MATCH_COMMIT (-998)
-#define MATCH_PRUNE (-997)
-#define MATCH_SKIP (-996)
-#define MATCH_SKIP_ARG (-995)
-#define MATCH_THEN (-994)
-
-/* This is a convenience macro for code that occurs many times. */
-
-#define MRRETURN(ra) \
- { \
- md->mark = markptr; \
- RRETURN(ra); \
- }
+#define MATCH_KETRPOS (-997)
+#define MATCH_ONCE (-996)
+#define MATCH_PRUNE (-995)
+#define MATCH_SKIP (-994)
+#define MATCH_SKIP_ARG (-993)
+#define MATCH_THEN (-992)
/* Maximum number of ints of offset to save on the stack for recursive calls.
If the offset vector is bigger, malloc is used. This should be a multiple of 3,
@@ -115,7 +110,7 @@ Returns: nothing
*/
static void
-pchars(const uschar *p, int length, BOOL is_subject, match_data *md)
+pchars(const pcre_uchar *p, int length, BOOL is_subject, match_data *md)
{
unsigned int c;
if (is_subject && length > md->end_subject - p) length = md->end_subject - p;
@@ -130,24 +125,29 @@ while (length-- > 0)
* Match a back-reference *
*************************************************/
-/* If a back reference hasn't been set, the length that is passed is greater
-than the number of characters left in the string, so the match fails.
+/* Normally, if a back reference hasn't been set, the length that is passed is
+negative, so the match always fails. However, in JavaScript compatibility mode,
+the length passed is zero. Note that in caseless UTF-8 mode, the number of
+subject bytes matched may be different to the number of reference bytes.
Arguments:
offset index into the offset vector
- eptr points into the subject
- length length to be matched
+ eptr pointer into the subject
+ length length of reference to be matched (number of bytes)
md points to match data block
- ims the ims flags
+ caseless TRUE if caseless
-Returns: TRUE if matched
+Returns: >= 0 the number of subject bytes matched
+ -1 no match
+ -2 partial match; always given if at end subject
*/
-static BOOL
-match_ref(int offset, register USPTR eptr, int length, match_data *md,
- unsigned long int ims)
+static int
+match_ref(int offset, register PCRE_PUCHAR eptr, int length, match_data *md,
+ BOOL caseless)
{
-USPTR p = md->start_subject + md->offset_vector[offset];
+PCRE_PUCHAR eptr_start = eptr;
+register PCRE_PUCHAR p = md->start_subject + md->offset_vector[offset];
#ifdef PCRE_DEBUG
if (eptr >= md->end_subject)
@@ -162,27 +162,37 @@ pchars(p, length, FALSE, md);
printf("\n");
#endif
-/* Always fail if not enough characters left */
+/* Always fail if reference not set (and not JavaScript compatible - in that
+case the length is passed as zero). */
-if (length > md->end_subject - eptr) return FALSE;
+if (length < 0) return -1;
/* Separate the caseless case for speed. In UTF-8 mode we can only do this
properly if Unicode properties are supported. Otherwise, we can check only
ASCII characters. */
-if ((ims & PCRE_CASELESS) != 0)
+if (caseless)
{
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
#ifdef SUPPORT_UCP
- if (md->utf8)
+ if (md->utf)
{
- USPTR endptr = eptr + length;
- while (eptr < endptr)
+ /* Match characters up to the end of the reference. NOTE: the number of
+ bytes matched may differ, because there are some characters whose upper and
+ lower case versions code as different numbers of bytes. For example, U+023A
+ (2 bytes in UTF-8) is the upper case version of U+2C65 (3 bytes in UTF-8);
+ a sequence of 3 of the former uses 6 bytes, as does a sequence of two of
+ the latter. It is important, therefore, to check the length along the
+ reference, not along the subject (earlier code did this wrong). */
+
+ PCRE_PUCHAR endptr = p + length;
+ while (p < endptr)
{
int c, d;
+ if (eptr >= md->end_subject) return -2; /* Partial match */
GETCHARINC(c, eptr);
GETCHARINC(d, p);
- if (c != d && c != UCD_OTHERCASE(d)) return FALSE;
+ if (c != d && c != UCD_OTHERCASE(d)) return -1;
}
}
else
@@ -191,18 +201,30 @@ if ((ims & PCRE_CASELESS) != 0)
/* The same code works when not in UTF-8 mode and in UTF-8 mode when there
is no UCP support. */
-
- while (length-- > 0)
- { if (md->lcc[*p++] != md->lcc[*eptr++]) return FALSE; }
+ {
+ while (length-- > 0)
+ {
+ if (eptr >= md->end_subject) return -2; /* Partial match */
+ if (TABLE_GET(*p, md->lcc, *p) != TABLE_GET(*eptr, md->lcc, *eptr)) return -1;
+ p++;
+ eptr++;
+ }
+ }
}
/* In the caseful case, we can just compare the bytes, whether or not we
are in UTF-8 mode. */
else
- { while (length-- > 0) if (*p++ != *eptr++) return FALSE; }
+ {
+ while (length-- > 0)
+ {
+ if (eptr >= md->end_subject) return -2; /* Partial match */
+ if (*p++ != *eptr++) return -1;
+ }
+ }
-return TRUE;
+return (int)(eptr - eptr_start);
}
@@ -254,7 +276,7 @@ enum { RM1=1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, RM10,
RM31, RM32, RM33, RM34, RM35, RM36, RM37, RM38, RM39, RM40,
RM41, RM42, RM43, RM44, RM45, RM46, RM47, RM48, RM49, RM50,
RM51, RM52, RM53, RM54, RM55, RM56, RM57, RM58, RM59, RM60,
- RM61, RM62 };
+ RM61, RM62, RM63, RM64, RM65, RM66 };
/* These versions of the macros use the stack, as normal. There are debugging
versions and production versions. Note that the "rw" argument of RMATCH isn't
@@ -264,10 +286,10 @@ actually used in this definition. */
#define REGISTER register
#ifdef PCRE_DEBUG
-#define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \
+#define RMATCH(ra,rb,rc,rd,re,rw) \
{ \
printf("match() called in line %d\n", __LINE__); \
- rrc = match(ra,rb,mstart,markptr,rc,rd,re,rf,rg,rdepth+1); \
+ rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1); \
printf("to line %d\n", __LINE__); \
}
#define RRETURN(ra) \
@@ -276,8 +298,8 @@ actually used in this definition. */
return ra; \
}
#else
-#define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \
- rrc = match(ra,rb,mstart,markptr,rc,rd,re,rf,rg,rdepth+1)
+#define RMATCH(ra,rb,rc,rd,re,rw) \
+ rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1)
#define RRETURN(ra) return ra
#endif
@@ -290,19 +312,22 @@ argument of match(), which never changes. */
#define REGISTER
-#define RMATCH(ra,rb,rc,rd,re,rf,rg,rw)\
+#define RMATCH(ra,rb,rc,rd,re,rw)\
{\
- heapframe *newframe = (heapframe *)(pcre_stack_malloc)(sizeof(heapframe));\
- if (newframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);\
- frame->Xwhere = rw; \
+ heapframe *newframe = frame->Xnextframe;\
+ if (newframe == NULL)\
+ {\
+ newframe = (heapframe *)(PUBL(stack_malloc))(sizeof(heapframe));\
+ if (newframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);\
+ newframe->Xnextframe = NULL;\
+ frame->Xnextframe = newframe;\
+ }\
+ frame->Xwhere = rw;\
newframe->Xeptr = ra;\
newframe->Xecode = rb;\
newframe->Xmstart = mstart;\
- newframe->Xmarkptr = markptr;\
newframe->Xoffset_top = rc;\
- newframe->Xims = re;\
- newframe->Xeptrb = rf;\
- newframe->Xflags = rg;\
+ newframe->Xeptrb = re;\
newframe->Xrdepth = frame->Xrdepth + 1;\
newframe->Xprevframe = frame;\
frame = newframe;\
@@ -316,7 +341,6 @@ argument of match(), which never changes. */
{\
heapframe *oldframe = frame;\
frame = oldframe->Xprevframe;\
- (pcre_stack_free)(oldframe);\
if (frame != NULL)\
{\
rrc = ra;\
@@ -330,30 +354,28 @@ argument of match(), which never changes. */
typedef struct heapframe {
struct heapframe *Xprevframe;
+ struct heapframe *Xnextframe;
/* Function arguments that may change */
- USPTR Xeptr;
- const uschar *Xecode;
- USPTR Xmstart;
- USPTR Xmarkptr;
+ PCRE_PUCHAR Xeptr;
+ const pcre_uchar *Xecode;
+ PCRE_PUCHAR Xmstart;
int Xoffset_top;
- long int Xims;
eptrblock *Xeptrb;
- int Xflags;
unsigned int Xrdepth;
/* Function local variables */
- USPTR Xcallpat;
-#ifdef SUPPORT_UTF8
- USPTR Xcharptr;
+ PCRE_PUCHAR Xcallpat;
+#ifdef SUPPORT_UTF
+ PCRE_PUCHAR Xcharptr;
#endif
- USPTR Xdata;
- USPTR Xnext;
- USPTR Xpp;
- USPTR Xprev;
- USPTR Xsaved_eptr;
+ PCRE_PUCHAR Xdata;
+ PCRE_PUCHAR Xnext;
+ PCRE_PUCHAR Xpp;
+ PCRE_PUCHAR Xprev;
+ PCRE_PUCHAR Xsaved_eptr;
recursion_info Xnew_recursive;
@@ -361,17 +383,12 @@ typedef struct heapframe {
BOOL Xcondition;
BOOL Xprev_is_word;
- unsigned long int Xoriginal_ims;
-
#ifdef SUPPORT_UCP
int Xprop_type;
int Xprop_value;
int Xprop_fail_result;
- int Xprop_category;
- int Xprop_chartype;
- int Xprop_script;
int Xoclength;
- uschar Xocchars[8];
+ pcre_uchar Xocchars[6];
#endif
int Xcodelink;
@@ -413,7 +430,7 @@ returns a negative (error) response, the outer incarnation must also return the
same response. */
/* These macros pack up tests that are used for partial matching, and which
-appears several times in the code. We set the "hit end" flag if the pointer is
+appear several times in the code. We set the "hit end" flag if the pointer is
at the end of the subject and also past the start of the subject (i.e.
something has been matched). For hard partial matching, we then return
immediately. The second one is used when we already know we are past the end of
@@ -424,19 +441,19 @@ the subject. */
eptr > md->start_used_ptr) \
{ \
md->hitend = TRUE; \
- if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL); \
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
}
#define SCHECK_PARTIAL()\
if (md->partial != 0 && eptr > md->start_used_ptr) \
{ \
md->hitend = TRUE; \
- if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL); \
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
}
/* Performance note: It might be tempting to extract commonly used fields from
-the md structure (e.g. utf8, end_subject) into individual variables to improve
+the md structure (e.g. utf, end_subject) into individual variables to improve
performance. Tests using gcc on a SPARC disproved this; in the first case, it
made performance worse.
@@ -445,16 +462,10 @@ Arguments:
ecode pointer to current position in compiled code
mstart pointer to the current match start position (can be modified
by encountering \K)
- markptr pointer to the most recent MARK name, or NULL
offset_top current top pointer
md pointer to "static" info for the match
- ims current /i, /m, and /s options
eptrb pointer to chain of blocks containing eptr at start of
brackets - for testing for empty matches
- flags can contain
- match_condassert - this is an assertion condition
- match_cbegroup - this is the start of an unlimited repeat
- group that can match an empty string
rdepth the recursion depth
Returns: MATCH_MATCH if matched ) these values are >= 0
@@ -465,9 +476,9 @@ Returns: MATCH_MATCH if matched ) these values are >= 0
*/
static int
-match(REGISTER USPTR eptr, REGISTER const uschar *ecode, USPTR mstart,
- const uschar *markptr, int offset_top, match_data *md, unsigned long int ims,
- eptrblock *eptrb, int flags, unsigned int rdepth)
+match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
+ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
+ unsigned int rdepth)
{
/* These variables do not need to be preserved over recursion in this function,
so they can be ordinary variables in all cases. Mark some of them with
@@ -476,31 +487,29 @@ so they can be ordinary variables in all cases. Mark some of them with
register int rrc; /* Returns from recursive calls */
register int i; /* Used for loops not involving calls to RMATCH() */
register unsigned int c; /* Character values not kept over RMATCH() calls */
-register BOOL utf8; /* Local copy of UTF-8 flag for speed */
+register BOOL utf; /* Local copy of UTF flag for speed */
BOOL minimize, possessive; /* Quantifier options */
+BOOL caseless;
int condcode;
/* When recursion is not being used, all "local" variables that have to be
-preserved over calls to RMATCH() are part of a "frame" which is obtained from
-heap storage. Set up the top-level frame here; others are obtained from the
-heap whenever RMATCH() does a "recursion". See the macro definitions above. */
+preserved over calls to RMATCH() are part of a "frame". We set up the top-level
+frame on the stack here; subsequent instantiations are obtained from the heap
+whenever RMATCH() does a "recursion". See the macro definitions above. Putting
+the top-level on the stack rather than malloc-ing them all gives a performance
+boost in many cases where there is not much "recursion". */
#ifdef NO_RECURSE
-heapframe *frame = (heapframe *)(pcre_stack_malloc)(sizeof(heapframe));
-if (frame == NULL) RRETURN(PCRE_ERROR_NOMEMORY);
-frame->Xprevframe = NULL; /* Marks the top level */
+heapframe *frame = (heapframe *)md->match_frames_base;
/* Copy in the original argument variables */
frame->Xeptr = eptr;
frame->Xecode = ecode;
frame->Xmstart = mstart;
-frame->Xmarkptr = markptr;
frame->Xoffset_top = offset_top;
-frame->Xims = ims;
frame->Xeptrb = eptrb;
-frame->Xflags = flags;
frame->Xrdepth = rdepth;
/* This is where control jumps back to to effect "recursion" */
@@ -512,16 +521,13 @@ HEAP_RECURSE:
#define eptr frame->Xeptr
#define ecode frame->Xecode
#define mstart frame->Xmstart
-#define markptr frame->Xmarkptr
#define offset_top frame->Xoffset_top
-#define ims frame->Xims
#define eptrb frame->Xeptrb
-#define flags frame->Xflags
#define rdepth frame->Xrdepth
/* Ditto for the local variables */
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
#define charptr frame->Xcharptr
#endif
#define callpat frame->Xcallpat
@@ -538,15 +544,10 @@ HEAP_RECURSE:
#define condition frame->Xcondition
#define prev_is_word frame->Xprev_is_word
-#define original_ims frame->Xoriginal_ims
-
#ifdef SUPPORT_UCP
#define prop_type frame->Xprop_type
#define prop_value frame->Xprop_value
#define prop_fail_result frame->Xprop_fail_result
-#define prop_category frame->Xprop_category
-#define prop_chartype frame->Xprop_chartype
-#define prop_script frame->Xprop_script
#define oclength frame->Xoclength
#define occhars frame->Xocchars
#endif
@@ -576,34 +577,36 @@ i, and fc and c, can be the same variables. */
#define fi i
#define fc c
+/* Many of the following variables are used only in small blocks of the code.
+My normal style of coding would have declared them within each of those blocks.
+However, in order to accommodate the version of this code that uses an external
+"stack" implemented on the heap, it is easier to declare them all here, so the
+declarations can be cut out in a block. The only declarations within blocks
+below are for variables that do not have to be preserved over a recursive call
+to RMATCH(). */
-#ifdef SUPPORT_UTF8 /* Many of these variables are used only */
-const uschar *charptr; /* in small blocks of the code. My normal */
-#endif /* style of coding would have declared */
-const uschar *callpat; /* them within each of those blocks. */
-const uschar *data; /* However, in order to accommodate the */
-const uschar *next; /* version of this code that uses an */
-USPTR pp; /* external "stack" implemented on the */
-const uschar *prev; /* heap, it is easier to declare them all */
-USPTR saved_eptr; /* here, so the declarations can be cut */
- /* out in a block. The only declarations */
-recursion_info new_recursive; /* within blocks below are for variables */
- /* that do not have to be preserved over */
-BOOL cur_is_word; /* a recursive call to RMATCH(). */
+#ifdef SUPPORT_UTF
+const pcre_uchar *charptr;
+#endif
+const pcre_uchar *callpat;
+const pcre_uchar *data;
+const pcre_uchar *next;
+PCRE_PUCHAR pp;
+const pcre_uchar *prev;
+PCRE_PUCHAR saved_eptr;
+
+recursion_info new_recursive;
+
+BOOL cur_is_word;
BOOL condition;
BOOL prev_is_word;
-unsigned long int original_ims;
-
#ifdef SUPPORT_UCP
int prop_type;
int prop_value;
int prop_fail_result;
-int prop_category;
-int prop_chartype;
-int prop_script;
int oclength;
-uschar occhars[8];
+pcre_uchar occhars[6];
#endif
int codelink;
@@ -619,8 +622,38 @@ int save_offset1, save_offset2, save_offset3;
int stacksave[REC_STACK_SAVE_MAX];
eptrblock newptrb;
+
+/* There is a special fudge for calling match() in a way that causes it to
+measure the size of its basic stack frame when the stack is being used for
+recursion. The second argument (ecode) being NULL triggers this behaviour. It
+cannot normally ever be NULL. The return is the negated value of the frame
+size. */
+
+if (ecode == NULL)
+ {
+ if (rdepth == 0)
+ return match((PCRE_PUCHAR)&rdepth, NULL, NULL, 0, NULL, NULL, 1);
+ else
+ {
+ int len = (char *)&rdepth - (char *)eptr;
+ return (len > 0)? -len : len;
+ }
+ }
#endif /* NO_RECURSE */
+/* To save space on the stack and in the heap frame, I have doubled up on some
+of the local variables that are used only in localised parts of the code, but
+still need to be preserved over recursive calls of match(). These macros define
+the alternative names that are used. */
+
+#define allow_zero cur_is_word
+#define cbegroup condition
+#define code_offset codelink
+#define condassert condition
+#define matched_once prev_is_word
+#define foc number
+#define save_mark data
+
/* These statements are here to stop the compiler complaining about unitialized
variables. */
@@ -645,10 +678,10 @@ defined). However, RMATCH isn't like a function call because it's quite a
complicated macro. It has to be used in one particular way. This shouldn't,
however, impact performance when true recursion is being used. */
-#ifdef SUPPORT_UTF8
-utf8 = md->utf8; /* Local copy of the flag */
+#ifdef SUPPORT_UTF
+utf = md->utf; /* Local copy of the flag */
#else
-utf8 = FALSE;
+utf = FALSE;
#endif
/* First check that we haven't called match() too many times, or that we
@@ -657,22 +690,24 @@ haven't exceeded the recursive call limit. */
if (md->match_call_count++ >= md->match_limit) RRETURN(PCRE_ERROR_MATCHLIMIT);
if (rdepth >= md->match_limit_recursion) RRETURN(PCRE_ERROR_RECURSIONLIMIT);
-original_ims = ims; /* Save for resetting on ')' */
-
/* At the start of a group with an unlimited repeat that may match an empty
-string, the match_cbegroup flag is set. When this is the case, add the current
-subject pointer to the chain of such remembered pointers, to be checked when we
-hit the closing ket, in order to break infinite loops that match no characters.
-When match() is called in other circumstances, don't add to the chain. The
-match_cbegroup flag must NOT be used with tail recursion, because the memory
-block that is used is on the stack, so a new one may be required for each
-match(). */
-
-if ((flags & match_cbegroup) != 0)
+string, the variable md->match_function_type is set to MATCH_CBEGROUP. It is
+done this way to save having to use another function argument, which would take
+up space on the stack. See also MATCH_CONDASSERT below.
+
+When MATCH_CBEGROUP is set, add the current subject pointer to the chain of
+such remembered pointers, to be checked when we hit the closing ket, in order
+to break infinite loops that match no characters. When match() is called in
+other circumstances, don't add to the chain. The MATCH_CBEGROUP feature must
+NOT be used with tail recursion, because the memory block that is used is on
+the stack, so a new one may be required for each match(). */
+
+if (md->match_function_type == MATCH_CBEGROUP)
{
newptrb.epb_saved_eptr = eptr;
newptrb.epb_prev = eptrb;
eptrb = &newptrb;
+ md->match_function_type = 0;
}
/* Now start processing the opcodes. */
@@ -685,9 +720,12 @@ for (;;)
switch(op)
{
case OP_MARK:
- markptr = ecode + 2;
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md,
- ims, eptrb, flags, RM55);
+ md->nomatch_mark = ecode + 2;
+ md->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
+ eptrb, RM55);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ md->mark == NULL) md->mark = ecode + 2;
/* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an
argument, and we must check whether that argument matches this MARK's
@@ -696,98 +734,192 @@ for (;;)
position and return MATCH_SKIP. Otherwise, pass back the return code
unaltered. */
- if (rrc == MATCH_SKIP_ARG &&
- strcmp((char *)markptr, (char *)(md->start_match_ptr)) == 0)
+ else if (rrc == MATCH_SKIP_ARG &&
+ STRCMP_UC_UC(ecode + 2, md->start_match_ptr) == 0)
{
md->start_match_ptr = eptr;
RRETURN(MATCH_SKIP);
}
-
- if (md->mark == NULL) md->mark = markptr;
RRETURN(rrc);
case OP_FAIL:
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
/* COMMIT overrides PRUNE, SKIP, and THEN */
case OP_COMMIT:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM52);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM52);
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE &&
rrc != MATCH_SKIP && rrc != MATCH_SKIP_ARG &&
rrc != MATCH_THEN)
RRETURN(rrc);
- MRRETURN(MATCH_COMMIT);
+ RRETURN(MATCH_COMMIT);
/* PRUNE overrides THEN */
case OP_PRUNE:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM51);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM51);
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
- MRRETURN(MATCH_PRUNE);
+ RRETURN(MATCH_PRUNE);
case OP_PRUNE_ARG:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md,
- ims, eptrb, flags, RM56);
+ md->nomatch_mark = ecode + 2;
+ md->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
+ eptrb, RM56);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ md->mark == NULL) md->mark = ecode + 2;
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
- md->mark = ecode + 2;
RRETURN(MATCH_PRUNE);
/* SKIP overrides PRUNE and THEN */
case OP_SKIP:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM53);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM53);
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN)
RRETURN(rrc);
md->start_match_ptr = eptr; /* Pass back current position */
- MRRETURN(MATCH_SKIP);
+ RRETURN(MATCH_SKIP);
+
+ /* Note that, for Perl compatibility, SKIP with an argument does NOT set
+ nomatch_mark. There is a flag that disables this opcode when re-matching a
+ pattern that ended with a SKIP for which there was not a matching MARK. */
case OP_SKIP_ARG:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md,
- ims, eptrb, flags, RM57);
+ if (md->ignore_skip_arg)
+ {
+ ecode += PRIV(OP_lengths)[*ecode] + ecode[1];
+ break;
+ }
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
+ eptrb, RM57);
if (rrc != MATCH_NOMATCH && rrc != MATCH_PRUNE && rrc != MATCH_THEN)
RRETURN(rrc);
/* Pass back the current skip name by overloading md->start_match_ptr and
returning the special MATCH_SKIP_ARG return code. This will either be
- caught by a matching MARK, or get to the top, where it is treated the same
- as PRUNE. */
+ caught by a matching MARK, or get to the top, where it causes a rematch
+ with the md->ignore_skip_arg flag set. */
md->start_match_ptr = ecode + 2;
RRETURN(MATCH_SKIP_ARG);
- /* For THEN (and THEN_ARG) we pass back the address of the bracket or
- the alt that is at the start of the current branch. This makes it possible
- to skip back past alternatives that precede the THEN within the current
- branch. */
+ /* For THEN (and THEN_ARG) we pass back the address of the opcode, so that
+ the branch in which it occurs can be determined. Overload the start of
+ match pointer to do this. */
case OP_THEN:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM54);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM54);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- md->start_match_ptr = ecode - GET(ecode, 1);
- MRRETURN(MATCH_THEN);
+ md->start_match_ptr = ecode;
+ RRETURN(MATCH_THEN);
case OP_THEN_ARG:
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1+LINK_SIZE],
- offset_top, md, ims, eptrb, flags, RM58);
+ md->nomatch_mark = ecode + 2;
+ md->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top,
+ md, eptrb, RM58);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ md->mark == NULL) md->mark = ecode + 2;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- md->start_match_ptr = ecode - GET(ecode, 1);
- md->mark = ecode + LINK_SIZE + 2;
+ md->start_match_ptr = ecode;
RRETURN(MATCH_THEN);
- /* Handle a capturing bracket. If there is space in the offset vector, save
- the current subject position in the working slot at the top of the vector.
- We mustn't change the current values of the data slot, because they may be
- set from a previous iteration of this group, and be referred to by a
- reference inside the group.
+ /* Handle an atomic group that does not contain any capturing parentheses.
+ This can be handled like an assertion. Prior to 8.13, all atomic groups
+ were handled this way. In 8.13, the code was changed as below for ONCE, so
+ that backups pass through the group and thereby reset captured values.
+ However, this uses a lot more stack, so in 8.20, atomic groups that do not
+ contain any captures generate OP_ONCE_NC, which can be handled in the old,
+ less stack intensive way.
+
+ Check the alternative branches in turn - the matching won't pass the KET
+ for this kind of subpattern. If any one branch matches, we carry on as at
+ the end of a normal bracket, leaving the subject pointer, but resetting
+ the start-of-match value in case it was changed by \K. */
+
+ case OP_ONCE_NC:
+ prev = ecode;
+ saved_eptr = eptr;
+ save_mark = md->mark;
+ do
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM64);
+ if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */
+ {
+ mstart = md->start_match_ptr;
+ break;
+ }
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode,1);
+ md->mark = save_mark;
+ }
+ while (*ecode == OP_ALT);
+
+ /* If hit the end of the group (which could be repeated), fail */
+
+ if (*ecode != OP_ONCE_NC && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
+
+ /* Continue as from after the group, updating the offsets high water
+ mark, since extracts may have been taken. */
+
+ do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
+
+ offset_top = md->end_offset_top;
+ eptr = md->end_match_ptr;
+
+ /* For a non-repeating ket, just continue at this level. This also
+ happens for a repeating ket if no characters were matched in the group.
+ This is the forcible breaking of infinite loops as implemented in Perl
+ 5.005. */
+
+ if (*ecode == OP_KET || eptr == saved_eptr)
+ {
+ ecode += 1+LINK_SIZE;
+ break;
+ }
+
+ /* The repeating kets try the rest of the pattern or restart from the
+ preceding bracket, in the appropriate order. The second "call" of match()
+ uses tail recursion, to avoid using another stack frame. */
- If the bracket fails to match, we need to restore this value and also the
- values of the final offsets, in case they were set by a previous iteration
- of the same bracket.
+ if (*ecode == OP_KETRMIN)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM65);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode = prev;
+ goto TAIL_RECURSE;
+ }
+ else /* OP_KETRMAX */
+ {
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM66);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += 1 + LINK_SIZE;
+ goto TAIL_RECURSE;
+ }
+ /* Control never gets here */
+
+ /* Handle a capturing bracket, other than those that are possessive with an
+ unlimited repeat. If there is space in the offset vector, save the current
+ subject position in the working slot at the top of the vector. We mustn't
+ change the current values of the data slot, because they may be set from a
+ previous iteration of this group, and be referred to by a reference inside
+ the group. A failure to match might occur after the group has succeeded,
+ if something later on doesn't match. For this reason, we need to restore
+ the working value and also the values of the final offsets, in case they
+ were set by a previous iteration of the same bracket.
If there isn't enough space in the offset vector, treat this as if it were
a non-capturing bracket. Don't worry about setting the flag for the error
@@ -811,32 +943,55 @@ for (;;)
save_offset2 = md->offset_vector[offset+1];
save_offset3 = md->offset_vector[md->offset_end - number];
save_capture_last = md->capture_last;
+ save_mark = md->mark;
DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
md->offset_vector[md->offset_end - number] =
(int)(eptr - md->start_subject);
- flags = (op == OP_SCBRA)? match_cbegroup : 0;
- do
+ for (;;)
{
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM1);
- if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
- RRETURN(rrc);
+ if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM1);
+ if (rrc == MATCH_ONCE) break; /* Backing up through an atomic group */
+
+ /* If we backed up to a THEN, check whether it is within the current
+ branch by comparing the address of the THEN that is passed back with
+ the end of the branch. If it is within the current branch, and the
+ branch is one of two or more alternatives (it either starts or ends
+ with OP_ALT), we have reached the limit of THEN's action, so convert
+ the return code to NOMATCH, which will cause normal backtracking to
+ happen from now on. Otherwise, THEN is passed back to an outer
+ alternative. This implements Perl's treatment of parenthesized groups,
+ where a group not containing | does not affect the current alternative,
+ that is, (X) is NOT the same as (X|(*F)). */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ /* Anything other than NOMATCH is passed back. */
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
md->capture_last = save_capture_last;
ecode += GET(ecode, 1);
+ md->mark = save_mark;
+ if (*ecode != OP_ALT) break;
}
- while (*ecode == OP_ALT);
DPRINTF(("bracket %d failed\n", number));
-
md->offset_vector[offset] = save_offset1;
md->offset_vector[offset+1] = save_offset2;
md->offset_vector[md->offset_end - number] = save_offset3;
- if (rrc != MATCH_THEN) md->mark = markptr;
- RRETURN(MATCH_NOMATCH);
+ /* At this point, rrc will be one of MATCH_ONCE or MATCH_NOMATCH. */
+
+ RRETURN(rrc);
}
/* FALL THROUGH ... Insufficient room for saving captured contents. Treat
@@ -850,69 +1005,266 @@ for (;;)
/* VVVVVVVVVVVVVVVVVVVVVVVVV */
/* VVVVVVVVVVVVVVVVVVVVVVVVV */
- /* Non-capturing bracket. Loop for all the alternatives. When we get to the
- final alternative within the brackets, we would return the result of a
- recursive call to match() whatever happened. We can reduce stack usage by
- turning this into a tail recursion, except in the case when match_cbegroup
- is set.*/
+ /* Non-capturing or atomic group, except for possessive with unlimited
+ repeat and ONCE group with no captures. Loop for all the alternatives.
+
+ When we get to the final alternative within the brackets, we used to return
+ the result of a recursive call to match() whatever happened so it was
+ possible to reduce stack usage by turning this into a tail recursion,
+ except in the case of a possibly empty group. However, now that there is
+ the possiblity of (*THEN) occurring in the final alternative, this
+ optimization is no longer always possible.
+ We can optimize if we know there are no (*THEN)s in the pattern; at present
+ this is the best that can be done.
+
+ MATCH_ONCE is returned when the end of an atomic group is successfully
+ reached, but subsequent matching fails. It passes back up the tree (causing
+ captured values to be reset) until the original atomic group level is
+ reached. This is tested by comparing md->once_target with the start of the
+ group. At this point, the return is converted into MATCH_NOMATCH so that
+ previous backup points can be taken. */
+
+ case OP_ONCE:
case OP_BRA:
case OP_SBRA:
DPRINTF(("start non-capturing bracket\n"));
- flags = (op >= OP_SBRA)? match_cbegroup : 0;
+
for (;;)
{
- if (ecode[GET(ecode, 1)] != OP_ALT) /* Final alternative */
+ if (op >= OP_SBRA || op == OP_ONCE)
+ md->match_function_type = MATCH_CBEGROUP;
+
+ /* If this is not a possibly empty group, and there are no (*THEN)s in
+ the pattern, and this is the final alternative, optimize as described
+ above. */
+
+ else if (!md->hasthen && ecode[GET(ecode, 1)] != OP_ALT)
{
- if (flags == 0) /* Not a possibly empty group */
+ ecode += PRIV(OP_lengths)[*ecode];
+ goto TAIL_RECURSE;
+ }
+
+ /* In all other cases, we have to make another call to match(). */
+
+ save_mark = md->mark;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, eptrb,
+ RM2);
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH)
+ {
+ if (rrc == MATCH_ONCE)
{
- ecode += _pcre_OP_lengths[*ecode];
- DPRINTF(("bracket 0 tail recursion\n"));
- goto TAIL_RECURSE;
+ const pcre_uchar *scode = ecode;
+ if (*scode != OP_ONCE) /* If not at start, find it */
+ {
+ while (*scode == OP_ALT) scode += GET(scode, 1);
+ scode -= GET(scode, 1);
+ }
+ if (md->once_target == scode) rrc = MATCH_NOMATCH;
}
+ RRETURN(rrc);
+ }
+ ecode += GET(ecode, 1);
+ md->mark = save_mark;
+ if (*ecode != OP_ALT) break;
+ }
- /* Possibly empty group; can't use tail recursion. */
+ RRETURN(MATCH_NOMATCH);
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, ims,
- eptrb, flags, RM48);
- if (rrc == MATCH_NOMATCH) md->mark = markptr;
- RRETURN(rrc);
+ /* Handle possessive capturing brackets with an unlimited repeat. We come
+ here from BRAZERO with allow_zero set TRUE. The offset_vector values are
+ handled similarly to the normal case above. However, the matching is
+ different. The end of these brackets will always be OP_KETRPOS, which
+ returns MATCH_KETRPOS without going further in the pattern. By this means
+ we can handle the group by iteration rather than recursion, thereby
+ reducing the amount of stack needed. */
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ allow_zero = FALSE;
+
+ POSSESSIVE_CAPTURE:
+ number = GET2(ecode, 1+LINK_SIZE);
+ offset = number << 1;
+
+#ifdef PCRE_DEBUG
+ printf("start possessive bracket %d\n", number);
+ printf("subject=");
+ pchars(eptr, 16, TRUE, md);
+ printf("\n");
+#endif
+
+ if (offset < md->offset_max)
+ {
+ matched_once = FALSE;
+ code_offset = (int)(ecode - md->start_code);
+
+ save_offset1 = md->offset_vector[offset];
+ save_offset2 = md->offset_vector[offset+1];
+ save_offset3 = md->offset_vector[md->offset_end - number];
+ save_capture_last = md->capture_last;
+
+ DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
+
+ /* Each time round the loop, save the current subject position for use
+ when the group matches. For MATCH_MATCH, the group has matched, so we
+ restart it with a new subject starting position, remembering that we had
+ at least one match. For MATCH_NOMATCH, carry on with the alternatives, as
+ usual. If we haven't matched any alternatives in any iteration, check to
+ see if a previous iteration matched. If so, the group has matched;
+ continue from afterwards. Otherwise it has failed; restore the previous
+ capture values before returning NOMATCH. */
+
+ for (;;)
+ {
+ md->offset_vector[md->offset_end - number] =
+ (int)(eptr - md->start_subject);
+ if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM63);
+ if (rrc == MATCH_KETRPOS)
+ {
+ offset_top = md->end_offset_top;
+ eptr = md->end_match_ptr;
+ ecode = md->start_code + code_offset;
+ save_capture_last = md->capture_last;
+ matched_once = TRUE;
+ continue;
+ }
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->capture_last = save_capture_last;
+ ecode += GET(ecode, 1);
+ if (*ecode != OP_ALT) break;
+ }
+
+ if (!matched_once)
+ {
+ md->offset_vector[offset] = save_offset1;
+ md->offset_vector[offset+1] = save_offset2;
+ md->offset_vector[md->offset_end - number] = save_offset3;
}
- /* For non-final alternatives, continue the loop for a NOMATCH result;
- otherwise return. */
+ if (allow_zero || matched_once)
+ {
+ ecode += 1 + LINK_SIZE;
+ break;
+ }
- RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, ims,
- eptrb, flags, RM2);
- if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
- RRETURN(rrc);
+ RRETURN(MATCH_NOMATCH);
+ }
+
+ /* FALL THROUGH ... Insufficient room for saving captured contents. Treat
+ as a non-capturing bracket. */
+
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+
+ DPRINTF(("insufficient capture room: treat as non-capturing\n"));
+
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+
+ /* Non-capturing possessive bracket with unlimited repeat. We come here
+ from BRAZERO with allow_zero = TRUE. The code is similar to the above,
+ without the capturing complication. It is written out separately for speed
+ and cleanliness. */
+
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ allow_zero = FALSE;
+
+ POSSESSIVE_NON_CAPTURE:
+ matched_once = FALSE;
+ code_offset = (int)(ecode - md->start_code);
+
+ for (;;)
+ {
+ if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM48);
+ if (rrc == MATCH_KETRPOS)
+ {
+ offset_top = md->end_offset_top;
+ eptr = md->end_match_ptr;
+ ecode = md->start_code + code_offset;
+ matched_once = TRUE;
+ continue;
+ }
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
ecode += GET(ecode, 1);
+ if (*ecode != OP_ALT) break;
+ }
+
+ if (matched_once || allow_zero)
+ {
+ ecode += 1 + LINK_SIZE;
+ break;
}
+ RRETURN(MATCH_NOMATCH);
+
/* Control never reaches here. */
/* Conditional group: compilation checked that there are no more than
two branches. If the condition is false, skipping the first branch takes us
past the end if there is only one branch, but that's OK because that is
- exactly what going to the ket would do. As there is only one branch to be
- obeyed, we can use tail recursion to avoid using another stack frame. */
+ exactly what going to the ket would do. */
case OP_COND:
case OP_SCOND:
- codelink= GET(ecode, 1);
+ codelink = GET(ecode, 1);
/* Because of the way auto-callout works during compile, a callout item is
inserted between OP_COND and an assertion condition. */
if (ecode[LINK_SIZE+1] == OP_CALLOUT)
{
- if (pcre_callout != NULL)
+ if (PUBL(callout) != NULL)
{
- pcre_callout_block cb;
- cb.version = 1; /* Version 1 of the callout block */
+ PUBL(callout_block) cb;
+ cb.version = 2; /* Version 1 of the callout block */
cb.callout_number = ecode[LINK_SIZE+2];
cb.offset_vector = md->offset_vector;
+#ifdef COMPILE_PCRE8
cb.subject = (PCRE_SPTR)md->start_subject;
+#else
+ cb.subject = (PCRE_SPTR16)md->start_subject;
+#endif
cb.subject_length = (int)(md->end_subject - md->start_subject);
cb.start_match = (int)(mstart - md->start_subject);
cb.current_position = (int)(eptr - md->start_subject);
@@ -921,10 +1273,11 @@ for (;;)
cb.capture_top = offset_top/2;
cb.capture_last = md->capture_last;
cb.callout_data = md->callout_data;
- if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH);
+ cb.mark = md->nomatch_mark;
+ if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH);
if (rrc < 0) RRETURN(rrc);
}
- ecode += _pcre_OP_lengths[OP_CALLOUT];
+ ecode += PRIV(OP_lengths)[OP_CALLOUT];
}
condcode = ecode[LINK_SIZE+1];
@@ -941,16 +1294,16 @@ for (;;)
else
{
int recno = GET2(ecode, LINK_SIZE + 2); /* Recursion group number*/
- condition = (recno == RREF_ANY || recno == md->recursive->group_num);
+ condition = (recno == RREF_ANY || recno == md->recursive->group_num);
/* If the test is for recursion into a specific subpattern, and it is
false, but the test was set up by name, scan the table to see if the
name refers to any other numbers, and test them. The condition is true
if any one is set. */
- if (!condition && condcode == OP_NRREF && recno != RREF_ANY)
+ if (!condition && condcode == OP_NRREF)
{
- uschar *slotA = md->name_table;
+ pcre_uchar *slotA = md->name_table;
for (i = 0; i < md->name_count; i++)
{
if (GET2(slotA, 0) == recno) break;
@@ -963,11 +1316,11 @@ for (;;)
if (i < md->name_count)
{
- uschar *slotB = slotA;
+ pcre_uchar *slotB = slotA;
while (slotB > md->name_table)
{
slotB -= md->name_entry_size;
- if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
{
condition = GET2(slotB, 0) == md->recursive->group_num;
if (condition) break;
@@ -983,7 +1336,7 @@ for (;;)
for (i++; i < md->name_count; i++)
{
slotB += md->name_entry_size;
- if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
{
condition = GET2(slotB, 0) == md->recursive->group_num;
if (condition) break;
@@ -996,7 +1349,7 @@ for (;;)
/* Chose branch according to the condition */
- ecode += condition? 3 : GET(ecode, 1);
+ ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1);
}
}
@@ -1013,7 +1366,7 @@ for (;;)
if (!condition && condcode == OP_NCREF)
{
int refno = offset >> 1;
- uschar *slotA = md->name_table;
+ pcre_uchar *slotA = md->name_table;
for (i = 0; i < md->name_count; i++)
{
@@ -1027,11 +1380,11 @@ for (;;)
if (i < md->name_count)
{
- uschar *slotB = slotA;
+ pcre_uchar *slotB = slotA;
while (slotB > md->name_table)
{
slotB -= md->name_entry_size;
- if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
{
offset = GET2(slotB, 0) << 1;
condition = offset < offset_top &&
@@ -1049,7 +1402,7 @@ for (;;)
for (i++; i < md->name_count; i++)
{
slotB += md->name_entry_size;
- if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
{
offset = GET2(slotB, 0) << 1;
condition = offset < offset_top &&
@@ -1064,7 +1417,7 @@ for (;;)
/* Chose branch according to the condition */
- ecode += condition? 3 : GET(ecode, 1);
+ ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1);
}
else if (condcode == OP_DEF) /* DEFINE - always false */
@@ -1074,21 +1427,26 @@ for (;;)
}
/* The condition is an assertion. Call match() to evaluate it - setting
- the final argument match_condassert causes it to stop at the end of an
- assertion. */
+ md->match_function_type to MATCH_CONDASSERT causes it to stop at the end of
+ an assertion. */
else
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL,
- match_condassert, RM3);
+ md->match_function_type = MATCH_CONDASSERT;
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM3);
if (rrc == MATCH_MATCH)
{
+ if (md->end_offset_top > offset_top)
+ offset_top = md->end_offset_top; /* Captures may have happened */
condition = TRUE;
ecode += 1 + LINK_SIZE + GET(ecode, LINK_SIZE + 2);
while (*ecode == OP_ALT) ecode += GET(ecode, 1);
}
- else if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
+
+ /* PCRE doesn't allow the effect of (*THEN) to escape beyond an
+ assertion; it is therefore treated as NOMATCH. */
+
+ else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)
{
RRETURN(rrc); /* Need braces because of following else */
}
@@ -1099,26 +1457,32 @@ for (;;)
}
}
- /* We are now at the branch that is to be obeyed. As there is only one,
- we can use tail recursion to avoid using another stack frame, except when
- match_cbegroup is required for an unlimited repeat of a possibly empty
- group. If the second alternative doesn't exist, we can just plough on. */
+ /* We are now at the branch that is to be obeyed. As there is only one, can
+ use tail recursion to avoid using another stack frame, except when there is
+ unlimited repeat of a possibly empty group. In the latter case, a recursive
+ call to match() is always required, unless the second alternative doesn't
+ exist, in which case we can just plough on. Note that, for compatibility
+ with Perl, the | in a conditional group is NOT treated as creating two
+ alternatives. If a THEN is encountered in the branch, it propagates out to
+ the enclosing alternative (unless nested in a deeper set of alternatives,
+ of course). */
if (condition || *ecode == OP_ALT)
{
- ecode += 1 + LINK_SIZE;
- if (op == OP_SCOND) /* Possibly empty group */
- {
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, match_cbegroup, RM49);
- RRETURN(rrc);
- }
- else /* Group must match something */
+ if (op != OP_SCOND)
{
- flags = 0;
+ ecode += 1 + LINK_SIZE;
goto TAIL_RECURSE;
}
+
+ md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49);
+ RRETURN(rrc);
}
- else /* Condition false & no alternative */
+
+ /* Condition false & no alternative; continue after the group. */
+
+ else
{
ecode += 1 + LINK_SIZE;
}
@@ -1145,39 +1509,27 @@ for (;;)
md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
if (offset_top <= offset) offset_top = offset + 2;
}
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
break;
- /* End of the pattern, either real or forced. If we are in a top-level
- recursion, we should restore the offsets appropriately and continue from
- after the call. */
+ /* End of the pattern, either real or forced. */
- case OP_ACCEPT:
case OP_END:
- if (md->recursive != NULL && md->recursive->group_num == 0)
- {
- recursion_info *rec = md->recursive;
- DPRINTF(("End of pattern in a (?0) recursion\n"));
- md->recursive = rec->prevrec;
- memmove(md->offset_vector, rec->offset_save,
- rec->saved_max * sizeof(int));
- offset_top = rec->save_offset_top;
- ims = original_ims;
- ecode = rec->after_call;
- break;
- }
-
- /* Otherwise, if we have matched an empty string, fail if PCRE_NOTEMPTY is
- set, or if PCRE_NOTEMPTY_ATSTART is set and we have matched at the start of
- the subject. In both cases, backtracking will then try other alternatives,
- if any. */
-
- if (eptr == mstart &&
- (md->notempty ||
- (md->notempty_atstart &&
- mstart == md->start_subject + md->start_offset)))
- MRRETURN(MATCH_NOMATCH);
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+
+ /* If we have matched an empty string, fail if not in an assertion and not
+ in a recursion if either PCRE_NOTEMPTY is set, or if PCRE_NOTEMPTY_ATSTART
+ is set and we have matched at the start of the subject. In both cases,
+ backtracking will then try other alternatives, if any. */
+
+ if (eptr == mstart && op != OP_ASSERT_ACCEPT &&
+ md->recursive == NULL &&
+ (md->notempty ||
+ (md->notempty_atstart &&
+ mstart == md->start_subject + md->start_offset)))
+ RRETURN(MATCH_NOMATCH);
/* Otherwise, we have a match. */
@@ -1186,47 +1538,60 @@ for (;;)
md->start_match_ptr = mstart; /* and the start (\K can modify) */
/* For some reason, the macros don't work properly if an expression is
- given as the argument to MRRETURN when the heap is in use. */
+ given as the argument to RRETURN when the heap is in use. */
rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT;
- MRRETURN(rrc);
-
- /* Change option settings */
-
- case OP_OPT:
- ims = ecode[1];
- ecode += 2;
- DPRINTF(("ims set to %02lx\n", ims));
- break;
+ RRETURN(rrc);
/* Assertion brackets. Check the alternative branches in turn - the
matching won't pass the KET for an assertion. If any one branch matches,
the assertion is true. Lookbehind assertions have an OP_REVERSE item at the
start of each branch to move the current point backwards, so the code at
- this level is identical to the lookahead case. */
+ this level is identical to the lookahead case. When the assertion is part
+ of a condition, we want to return immediately afterwards. The caller of
+ this incarnation of the match() function will have set MATCH_CONDASSERT in
+ md->match_function type, and one of these opcodes will be the first opcode
+ that is processed. We use a local variable that is preserved over calls to
+ match() to remember this case. */
case OP_ASSERT:
case OP_ASSERTBACK:
+ save_mark = md->mark;
+ if (md->match_function_type == MATCH_CONDASSERT)
+ {
+ condassert = TRUE;
+ md->match_function_type = 0;
+ }
+ else condassert = FALSE;
+
do
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,
- RM4);
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM4);
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
{
mstart = md->start_match_ptr; /* In case \K reset it */
break;
}
- if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
- RRETURN(rrc);
+ md->mark = save_mark;
+
+ /* A COMMIT failure must fail the entire assertion, without trying any
+ subsequent branches. */
+
+ if (rrc == MATCH_COMMIT) RRETURN(MATCH_NOMATCH);
+
+ /* PCRE does not allow THEN to escape beyond an assertion; it
+ is treated as NOMATCH. */
+
+ if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
ecode += GET(ecode, 1);
}
while (*ecode == OP_ALT);
- if (*ecode == OP_KET) MRRETURN(MATCH_NOMATCH);
+
+ if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH);
/* If checking an assertion for a condition, return MATCH_MATCH. */
- if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH);
+ if (condassert) RRETURN(MATCH_MATCH);
/* Continue from after the assertion, updating the offsets high water
mark, since extracts may have been taken during the assertion. */
@@ -1242,24 +1607,34 @@ for (;;)
case OP_ASSERT_NOT:
case OP_ASSERTBACK_NOT:
+ save_mark = md->mark;
+ if (md->match_function_type == MATCH_CONDASSERT)
+ {
+ condassert = TRUE;
+ md->match_function_type = 0;
+ }
+ else condassert = FALSE;
+
do
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,
- RM5);
- if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) MRRETURN(MATCH_NOMATCH);
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5);
+ md->mark = save_mark;
+ if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) RRETURN(MATCH_NOMATCH);
if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT)
{
do ecode += GET(ecode,1); while (*ecode == OP_ALT);
break;
}
- if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
- RRETURN(rrc);
+
+ /* PCRE does not allow THEN to escape beyond an assertion; it is treated
+ as NOMATCH. */
+
+ if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
ecode += GET(ecode,1);
}
while (*ecode == OP_ALT);
- if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH);
+ if (condassert) RRETURN(MATCH_MATCH); /* Condition assertion */
ecode += 1 + LINK_SIZE;
continue;
@@ -1270,14 +1645,14 @@ for (;;)
back a number of characters, not bytes. */
case OP_REVERSE:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
i = GET(ecode, 1);
while (i-- > 0)
{
eptr--;
- if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH);
+ if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
BACKCHAR(eptr);
}
}
@@ -1288,7 +1663,7 @@ for (;;)
{
eptr -= GET(ecode, 1);
- if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH);
+ if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
}
/* Save the earliest consulted character, then skip to next op code */
@@ -1302,13 +1677,17 @@ for (;;)
function is able to force a failure. */
case OP_CALLOUT:
- if (pcre_callout != NULL)
+ if (PUBL(callout) != NULL)
{
- pcre_callout_block cb;
- cb.version = 1; /* Version 1 of the callout block */
+ PUBL(callout_block) cb;
+ cb.version = 2; /* Version 1 of the callout block */
cb.callout_number = ecode[1];
cb.offset_vector = md->offset_vector;
+#ifdef COMPILE_PCRE8
cb.subject = (PCRE_SPTR)md->start_subject;
+#else
+ cb.subject = (PCRE_SPTR16)md->start_subject;
+#endif
cb.subject_length = (int)(md->end_subject - md->start_subject);
cb.start_match = (int)(mstart - md->start_subject);
cb.current_position = (int)(eptr - md->start_subject);
@@ -1317,7 +1696,8 @@ for (;;)
cb.capture_top = offset_top/2;
cb.capture_last = md->capture_last;
cb.callout_data = md->callout_data;
- if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH);
+ cb.mark = md->nomatch_mark;
+ if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH);
if (rrc < 0) RRETURN(rrc);
}
ecode += 2 + 2*LINK_SIZE;
@@ -1327,38 +1707,48 @@ for (;;)
offset data is the offset to the starting bracket from the start of the
whole pattern. (This is so that it works from duplicated subpatterns.)
- If there are any capturing brackets started but not finished, we have to
- save their starting points and reinstate them after the recursion. However,
- we don't know how many such there are (offset_top records the completed
- total) so we just have to save all the potential data. There may be up to
- 65535 such values, which is too large to put on the stack, but using malloc
- for small numbers seems expensive. As a compromise, the stack is used when
- there are no more than REC_STACK_SAVE_MAX values to store; otherwise malloc
- is used. A problem is what to do if the malloc fails ... there is no way of
- returning to the top level with an error. Save the top REC_STACK_SAVE_MAX
- values on the stack, and accept that the rest may be wrong.
+ The state of the capturing groups is preserved over recursion, and
+ re-instated afterwards. We don't know how many are started and not yet
+ finished (offset_top records the completed total) so we just have to save
+ all the potential data. There may be up to 65535 such values, which is too
+ large to put on the stack, but using malloc for small numbers seems
+ expensive. As a compromise, the stack is used when there are no more than
+ REC_STACK_SAVE_MAX values to store; otherwise malloc is used.
There are also other values that have to be saved. We use a chained
sequence of blocks that actually live on the stack. Thanks to Robin Houston
- for the original version of this logic. */
+ for the original version of this logic. It has, however, been hacked around
+ a lot, so he is not to blame for the current way it works. */
case OP_RECURSE:
{
+ recursion_info *ri;
+ int recno;
+
callpat = md->start_code + GET(ecode, 1);
- new_recursive.group_num = (callpat == md->start_code)? 0 :
+ recno = (callpat == md->start_code)? 0 :
GET2(callpat, 1 + LINK_SIZE);
+ /* Check for repeating a recursion without advancing the subject pointer.
+ This should catch convoluted mutual recursions. (Some simple cases are
+ caught at compile time.) */
+
+ for (ri = md->recursive; ri != NULL; ri = ri->prevrec)
+ if (recno == ri->group_num && eptr == ri->subject_position)
+ RRETURN(PCRE_ERROR_RECURSELOOP);
+
/* Add to "recursing stack" */
+ new_recursive.group_num = recno;
+ new_recursive.subject_position = eptr;
new_recursive.prevrec = md->recursive;
md->recursive = &new_recursive;
- /* Find where to continue from afterwards */
+ /* Where to continue from afterwards */
ecode += 1 + LINK_SIZE;
- new_recursive.after_call = ecode;
- /* Now save the offset data. */
+ /* Now save the offset data */
new_recursive.saved_max = md->offset_end;
if (new_recursive.saved_max <= REC_STACK_SAVE_MAX)
@@ -1366,43 +1756,54 @@ for (;;)
else
{
new_recursive.offset_save =
- (int *)(pcre_malloc)(new_recursive.saved_max * sizeof(int));
+ (int *)(PUBL(malloc))(new_recursive.saved_max * sizeof(int));
if (new_recursive.offset_save == NULL) RRETURN(PCRE_ERROR_NOMEMORY);
}
-
memcpy(new_recursive.offset_save, md->offset_vector,
new_recursive.saved_max * sizeof(int));
- new_recursive.save_offset_top = offset_top;
- /* OK, now we can do the recursion. For each top-level alternative we
- restore the offset and recursion data. */
+ /* OK, now we can do the recursion. After processing each alternative,
+ restore the offset data. If there were nested recursions, md->recursive
+ might be changed, so reset it before looping. */
DPRINTF(("Recursing into group %d\n", new_recursive.group_num));
- flags = (*callpat >= OP_SBRA)? match_cbegroup : 0;
+ cbegroup = (*callpat >= OP_SBRA);
do
{
- RMATCH(eptr, callpat + _pcre_OP_lengths[*callpat], offset_top,
- md, ims, eptrb, flags, RM6);
+ if (cbegroup) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, callpat + PRIV(OP_lengths)[*callpat], offset_top,
+ md, eptrb, RM6);
+ memcpy(md->offset_vector, new_recursive.offset_save,
+ new_recursive.saved_max * sizeof(int));
+ md->recursive = new_recursive.prevrec;
if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
{
DPRINTF(("Recursion matched\n"));
- md->recursive = new_recursive.prevrec;
if (new_recursive.offset_save != stacksave)
- (pcre_free)(new_recursive.offset_save);
- MRRETURN(MATCH_MATCH);
+ (PUBL(free))(new_recursive.offset_save);
+
+ /* Set where we got to in the subject, and reset the start in case
+ it was changed by \K. This *is* propagated back out of a recursion,
+ for Perl compatibility. */
+
+ eptr = md->end_match_ptr;
+ mstart = md->start_match_ptr;
+ goto RECURSION_MATCHED; /* Exit loop; end processing */
}
- else if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
+
+ /* PCRE does not allow THEN or COMMIT to escape beyond a recursion; it
+ is treated as NOMATCH. */
+
+ else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN &&
+ rrc != MATCH_COMMIT)
{
DPRINTF(("Recursion gave error %d\n", rrc));
if (new_recursive.offset_save != stacksave)
- (pcre_free)(new_recursive.offset_save);
+ (PUBL(free))(new_recursive.offset_save);
RRETURN(rrc);
}
md->recursive = &new_recursive;
- memcpy(md->offset_vector, new_recursive.offset_save,
- new_recursive.saved_max * sizeof(int));
callpat += GET(callpat, 1);
}
while (*callpat == OP_ALT);
@@ -1410,91 +1811,12 @@ for (;;)
DPRINTF(("Recursion didn't match\n"));
md->recursive = new_recursive.prevrec;
if (new_recursive.offset_save != stacksave)
- (pcre_free)(new_recursive.offset_save);
- MRRETURN(MATCH_NOMATCH);
- }
- /* Control never reaches here */
-
- /* "Once" brackets are like assertion brackets except that after a match,
- the point in the subject string is not moved back. Thus there can never be
- a move back into the brackets. Friedl calls these "atomic" subpatterns.
- Check the alternative branches in turn - the matching won't pass the KET
- for this kind of subpattern. If any one branch matches, we carry on as at
- the end of a normal bracket, leaving the subject pointer, but resetting
- the start-of-match value in case it was changed by \K. */
-
- case OP_ONCE:
- prev = ecode;
- saved_eptr = eptr;
-
- do
- {
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM7);
- if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */
- {
- mstart = md->start_match_ptr;
- break;
- }
- if (rrc != MATCH_NOMATCH &&
- (rrc != MATCH_THEN || md->start_match_ptr != ecode))
- RRETURN(rrc);
- ecode += GET(ecode,1);
- }
- while (*ecode == OP_ALT);
-
- /* If hit the end of the group (which could be repeated), fail */
-
- if (*ecode != OP_ONCE && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
-
- /* Continue as from after the assertion, updating the offsets high water
- mark, since extracts may have been taken. */
-
- do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
-
- offset_top = md->end_offset_top;
- eptr = md->end_match_ptr;
-
- /* For a non-repeating ket, just continue at this level. This also
- happens for a repeating ket if no characters were matched in the group.
- This is the forcible breaking of infinite loops as implemented in Perl
- 5.005. If there is an options reset, it will get obeyed in the normal
- course of events. */
-
- if (*ecode == OP_KET || eptr == saved_eptr)
- {
- ecode += 1+LINK_SIZE;
- break;
- }
-
- /* The repeating kets try the rest of the pattern or restart from the
- preceding bracket, in the appropriate order. The second "call" of match()
- uses tail recursion, to avoid using another stack frame. We need to reset
- any options that changed within the bracket before re-running it, so
- check the next opcode. */
-
- if (ecode[1+LINK_SIZE] == OP_OPT)
- {
- ims = (ims & ~PCRE_IMS) | ecode[4];
- DPRINTF(("ims set to %02lx at group repeat\n", ims));
+ (PUBL(free))(new_recursive.offset_save);
+ RRETURN(MATCH_NOMATCH);
}
- if (*ecode == OP_KETRMIN)
- {
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM8);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- ecode = prev;
- flags = 0;
- goto TAIL_RECURSE;
- }
- else /* OP_KETRMAX */
- {
- RMATCH(eptr, prev, offset_top, md, ims, eptrb, match_cbegroup, RM9);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- ecode += 1 + LINK_SIZE;
- flags = 0;
- goto TAIL_RECURSE;
- }
- /* Control never gets here */
+ RECURSION_MATCHED:
+ break;
/* An alternation is the end of a branch; scan along to find the end of the
bracketed group and go to there. */
@@ -1510,73 +1832,79 @@ for (;;)
optional ones preceded by BRAZERO or BRAMINZERO. */
case OP_BRAZERO:
- {
- next = ecode+1;
- RMATCH(eptr, next, offset_top, md, ims, eptrb, 0, RM10);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- do next += GET(next,1); while (*next == OP_ALT);
- ecode = next + 1 + LINK_SIZE;
- }
+ next = ecode + 1;
+ RMATCH(eptr, next, offset_top, md, eptrb, RM10);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ do next += GET(next, 1); while (*next == OP_ALT);
+ ecode = next + 1 + LINK_SIZE;
break;
case OP_BRAMINZERO:
- {
- next = ecode+1;
- do next += GET(next, 1); while (*next == OP_ALT);
- RMATCH(eptr, next + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0, RM11);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- ecode++;
- }
+ next = ecode + 1;
+ do next += GET(next, 1); while (*next == OP_ALT);
+ RMATCH(eptr, next + 1+LINK_SIZE, offset_top, md, eptrb, RM11);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode++;
break;
case OP_SKIPZERO:
- {
- next = ecode+1;
- do next += GET(next,1); while (*next == OP_ALT);
- ecode = next + 1 + LINK_SIZE;
- }
+ next = ecode+1;
+ do next += GET(next,1); while (*next == OP_ALT);
+ ecode = next + 1 + LINK_SIZE;
break;
+ /* BRAPOSZERO occurs before a possessive bracket group. Don't do anything
+ here; just jump to the group, with allow_zero set TRUE. */
+
+ case OP_BRAPOSZERO:
+ op = *(++ecode);
+ allow_zero = TRUE;
+ if (op == OP_CBRAPOS || op == OP_SCBRAPOS) goto POSSESSIVE_CAPTURE;
+ goto POSSESSIVE_NON_CAPTURE;
+
/* End of a group, repeated or non-repeating. */
case OP_KET:
case OP_KETRMIN:
case OP_KETRMAX:
+ case OP_KETRPOS:
prev = ecode - GET(ecode, 1);
/* If this was a group that remembered the subject start, in order to break
infinite repeats of empty string matches, retrieve the subject start from
the chain. Otherwise, set it NULL. */
- if (*prev >= OP_SBRA)
+ if (*prev >= OP_SBRA || *prev == OP_ONCE)
{
saved_eptr = eptrb->epb_saved_eptr; /* Value at start of group */
eptrb = eptrb->epb_prev; /* Backup to previous group */
}
else saved_eptr = NULL;
- /* If we are at the end of an assertion group or an atomic group, stop
- matching and return MATCH_MATCH, but record the current high water mark for
- use by positive assertions. We also need to record the match start in case
- it was changed by \K. */
+ /* If we are at the end of an assertion group or a non-capturing atomic
+ group, stop matching and return MATCH_MATCH, but record the current high
+ water mark for use by positive assertions. We also need to record the match
+ start in case it was changed by \K. */
- if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT ||
- *prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT ||
- *prev == OP_ONCE)
+ if ((*prev >= OP_ASSERT && *prev <= OP_ASSERTBACK_NOT) ||
+ *prev == OP_ONCE_NC)
{
- md->end_match_ptr = eptr; /* For ONCE */
+ md->end_match_ptr = eptr; /* For ONCE_NC */
md->end_offset_top = offset_top;
md->start_match_ptr = mstart;
- MRRETURN(MATCH_MATCH);
+ RRETURN(MATCH_MATCH); /* Sets md->mark */
}
/* For capturing groups we have to check the group number back at the start
and if necessary complete handling an extraction by setting the offsets and
- bumping the high water mark. Note that whole-pattern recursion is coded as
- a recurse into group 0, so it won't be picked up here. Instead, we catch it
- when the OP_END is reached. Other recursion is handled here. */
-
- if (*prev == OP_CBRA || *prev == OP_SCBRA)
+ bumping the high water mark. Whole-pattern recursion is coded as a recurse
+ into group 0, so it won't be picked up here. Instead, we catch it when the
+ OP_END is reached. Other recursion is handled here. We just have to record
+ the current subject position and start match pointer and give a MATCH
+ return. */
+
+ if (*prev == OP_CBRA || *prev == OP_SCBRA ||
+ *prev == OP_CBRAPOS || *prev == OP_SCBRAPOS)
{
number = GET2(prev, 1+LINK_SIZE);
offset = number << 1;
@@ -1586,64 +1914,99 @@ for (;;)
printf("\n");
#endif
+ /* Handle a recursively called group. */
+
+ if (md->recursive != NULL && md->recursive->group_num == number)
+ {
+ md->end_match_ptr = eptr;
+ md->start_match_ptr = mstart;
+ RRETURN(MATCH_MATCH);
+ }
+
+ /* Deal with capturing */
+
md->capture_last = number;
if (offset >= md->offset_max) md->offset_overflow = TRUE; else
{
+ /* If offset is greater than offset_top, it means that we are
+ "skipping" a capturing group, and that group's offsets must be marked
+ unset. In earlier versions of PCRE, all the offsets were unset at the
+ start of matching, but this doesn't work because atomic groups and
+ assertions can cause a value to be set that should later be unset.
+ Example: matching /(?>(a))b|(a)c/ against "ac". This sets group 1 as
+ part of the atomic group, but this is not on the final matching path,
+ so must be unset when 2 is set. (If there is no group 2, there is no
+ problem, because offset_top will then be 2, indicating no capture.) */
+
+ if (offset > offset_top)
+ {
+ register int *iptr = md->offset_vector + offset_top;
+ register int *iend = md->offset_vector + offset;
+ while (iptr < iend) *iptr++ = -1;
+ }
+
+ /* Now make the extraction */
+
md->offset_vector[offset] =
md->offset_vector[md->offset_end - number];
md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
if (offset_top <= offset) offset_top = offset + 2;
}
+ }
- /* Handle a recursively called group. Restore the offsets
- appropriately and continue from after the call. */
+ /* For an ordinary non-repeating ket, just continue at this level. This
+ also happens for a repeating ket if no characters were matched in the
+ group. This is the forcible breaking of infinite loops as implemented in
+ Perl 5.005. For a non-repeating atomic group that includes captures,
+ establish a backup point by processing the rest of the pattern at a lower
+ level. If this results in a NOMATCH return, pass MATCH_ONCE back to the
+ original OP_ONCE level, thereby bypassing intermediate backup points, but
+ resetting any captures that happened along the way. */
- if (md->recursive != NULL && md->recursive->group_num == number)
+ if (*ecode == OP_KET || eptr == saved_eptr)
+ {
+ if (*prev == OP_ONCE)
{
- recursion_info *rec = md->recursive;
- DPRINTF(("Recursion (%d) succeeded - continuing\n", number));
- md->recursive = rec->prevrec;
- memcpy(md->offset_vector, rec->offset_save,
- rec->saved_max * sizeof(int));
- offset_top = rec->save_offset_top;
- ecode = rec->after_call;
- ims = original_ims;
- break;
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM12);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->once_target = prev; /* Level at which to change to MATCH_NOMATCH */
+ RRETURN(MATCH_ONCE);
}
+ ecode += 1 + LINK_SIZE; /* Carry on at this level */
+ break;
}
- /* For both capturing and non-capturing groups, reset the value of the ims
- flags, in case they got changed during the group. */
-
- ims = original_ims;
- DPRINTF(("ims reset to %02lx\n", ims));
-
- /* For a non-repeating ket, just continue at this level. This also
- happens for a repeating ket if no characters were matched in the group.
- This is the forcible breaking of infinite loops as implemented in Perl
- 5.005. If there is an options reset, it will get obeyed in the normal
- course of events. */
+ /* OP_KETRPOS is a possessive repeating ket. Remember the current position,
+ and return the MATCH_KETRPOS. This makes it possible to do the repeats one
+ at a time from the outer level, thus saving stack. */
- if (*ecode == OP_KET || eptr == saved_eptr)
+ if (*ecode == OP_KETRPOS)
{
- ecode += 1 + LINK_SIZE;
- break;
+ md->end_match_ptr = eptr;
+ md->end_offset_top = offset_top;
+ RRETURN(MATCH_KETRPOS);
}
- /* The repeating kets try the rest of the pattern or restart from the
- preceding bracket, in the appropriate order. In the second case, we can use
- tail recursion to avoid using another stack frame, unless we have an
- unlimited repeat of a group that can match an empty string. */
-
- flags = (*prev >= OP_SBRA)? match_cbegroup : 0;
+ /* The normal repeating kets try the rest of the pattern or restart from
+ the preceding bracket, in the appropriate order. In the second case, we can
+ use tail recursion to avoid using another stack frame, unless we have an
+ an atomic group or an unlimited repeat of a group that can match an empty
+ string. */
if (*ecode == OP_KETRMIN)
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM12);
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM7);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (flags != 0) /* Could match an empty string */
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM8);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->once_target = prev; /* Level at which to change to MATCH_NOMATCH */
+ RRETURN(MATCH_ONCE);
+ }
+ if (*prev >= OP_SBRA) /* Could match an empty string */
{
- RMATCH(eptr, prev, offset_top, md, ims, eptrb, flags, RM50);
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM50);
RRETURN(rrc);
}
ecode = prev;
@@ -1651,39 +2014,47 @@ for (;;)
}
else /* OP_KETRMAX */
{
- RMATCH(eptr, prev, offset_top, md, ims, eptrb, flags, RM13);
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM13);
+ if (rrc == MATCH_ONCE && md->once_target == prev) rrc = MATCH_NOMATCH;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM9);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->once_target = prev;
+ RRETURN(MATCH_ONCE);
+ }
ecode += 1 + LINK_SIZE;
- flags = 0;
goto TAIL_RECURSE;
}
/* Control never gets here */
- /* Start of subject unless notbol, or after internal newline if multiline */
+ /* Not multiline mode: start of subject assertion, unless notbol. */
case OP_CIRC:
- if (md->notbol && eptr == md->start_subject) MRRETURN(MATCH_NOMATCH);
- if ((ims & PCRE_MULTILINE) != 0)
- {
- if (eptr != md->start_subject &&
- (eptr == md->end_subject || !WAS_NEWLINE(eptr)))
- MRRETURN(MATCH_NOMATCH);
- ecode++;
- break;
- }
- /* ... else fall through */
+ if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
/* Start of subject assertion */
case OP_SOD:
- if (eptr != md->start_subject) MRRETURN(MATCH_NOMATCH);
+ if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ /* Multiline mode: start of subject unless notbol, or after any newline. */
+
+ case OP_CIRCM:
+ if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr != md->start_subject &&
+ (eptr == md->end_subject || !WAS_NEWLINE(eptr)))
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
/* Start of match assertion */
case OP_SOM:
- if (eptr != md->start_subject + md->start_offset) MRRETURN(MATCH_NOMATCH);
+ if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1694,34 +2065,47 @@ for (;;)
ecode++;
break;
- /* Assert before internal newline if multiline, or before a terminating
- newline unless endonly is set, else end of subject unless noteol is set. */
+ /* Multiline mode: assert before any newline, or before end of subject
+ unless noteol is set. */
- case OP_DOLL:
- if ((ims & PCRE_MULTILINE) != 0)
+ case OP_DOLLM:
+ if (eptr < md->end_subject)
{
- if (eptr < md->end_subject)
- { if (!IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); }
- else
+ if (!IS_NEWLINE(eptr))
{
- if (md->noteol) MRRETURN(MATCH_NOMATCH);
- SCHECK_PARTIAL();
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ RRETURN(MATCH_NOMATCH);
}
- ecode++;
- break;
}
- else /* Not multiline */
+ else
{
- if (md->noteol) MRRETURN(MATCH_NOMATCH);
- if (!md->endonly) goto ASSERT_NL_OR_EOS;
+ if (md->noteol) RRETURN(MATCH_NOMATCH);
+ SCHECK_PARTIAL();
}
+ ecode++;
+ break;
+
+ /* Not multiline mode: assert before a terminating newline or before end of
+ subject unless noteol is set. */
+
+ case OP_DOLL:
+ if (md->noteol) RRETURN(MATCH_NOMATCH);
+ if (!md->endonly) goto ASSERT_NL_OR_EOS;
/* ... else fall through for endonly */
/* End of subject assertion (\z) */
case OP_EOD:
- if (eptr < md->end_subject) MRRETURN(MATCH_NOMATCH);
+ if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH);
SCHECK_PARTIAL();
ecode++;
break;
@@ -1732,7 +2116,18 @@ for (;;)
ASSERT_NL_OR_EOS:
if (eptr < md->end_subject &&
(!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen))
- MRRETURN(MATCH_NOMATCH);
+ {
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ RRETURN(MATCH_NOMATCH);
+ }
/* Either at end of string or \n before end. */
@@ -1751,15 +2146,15 @@ for (;;)
be "non-word" characters. Remember the earliest consulted character for
partial matching. */
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
/* Get status of previous character */
if (eptr == md->start_subject) prev_is_word = FALSE; else
{
- USPTR lastptr = eptr - 1;
- while((*lastptr & 0xc0) == 0x80) lastptr--;
+ PCRE_PUCHAR lastptr = eptr - 1;
+ BACKCHAR(lastptr);
if (lastptr < md->start_used_ptr) md->start_used_ptr = lastptr;
GETCHAR(c, lastptr);
#ifdef SUPPORT_UCP
@@ -1824,7 +2219,8 @@ for (;;)
}
else
#endif
- prev_is_word = ((md->ctypes[eptr[-1]] & ctype_word) != 0);
+ prev_is_word = MAX_255(eptr[-1])
+ && ((md->ctypes[eptr[-1]] & ctype_word) != 0);
}
/* Get status of next character */
@@ -1847,30 +2243,47 @@ for (;;)
}
else
#endif
- cur_is_word = ((md->ctypes[*eptr] & ctype_word) != 0);
+ cur_is_word = MAX_255(*eptr)
+ && ((md->ctypes[*eptr] & ctype_word) != 0);
}
/* Now see if the situation is what we want */
if ((*ecode++ == OP_WORD_BOUNDARY)?
cur_is_word == prev_is_word : cur_is_word != prev_is_word)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
- /* Match a single character type; inline for speed */
+ /* Match any single character type except newline; have to take care with
+ CRLF newlines and partial matching. */
case OP_ANY:
- if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH);
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+
/* Fall through */
+ /* Match any single character whatsoever. */
+
case OP_ALLANY:
- if (eptr++ >= md->end_subject)
- {
+ if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */
+ { /* not be updated before SCHECK_PARTIAL. */
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ eptr++;
+#ifdef SUPPORT_UTF
+ if (utf) ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
+#endif
ecode++;
break;
@@ -1878,11 +2291,12 @@ for (;;)
any byte, even newline, independent of the setting of PCRE_DOTALL. */
case OP_ANYBYTE:
- if (eptr++ >= md->end_subject)
- {
+ if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */
+ { /* not be updated before SCHECK_PARTIAL. */
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
+ eptr++;
ecode++;
break;
@@ -1890,16 +2304,16 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
c < 256 &&
#endif
(md->ctypes[c] & ctype_digit) != 0
)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1907,16 +2321,16 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
- c >= 256 ||
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
+ c > 255 ||
#endif
(md->ctypes[c] & ctype_digit) == 0
)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1924,16 +2338,16 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
c < 256 &&
#endif
(md->ctypes[c] & ctype_space) != 0
)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1941,16 +2355,16 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
- c >= 256 ||
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
+ c > 255 ||
#endif
(md->ctypes[c] & ctype_space) == 0
)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1958,16 +2372,16 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
c < 256 &&
#endif
(md->ctypes[c] & ctype_word) != 0
)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1975,16 +2389,16 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
- c >= 256 ||
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
+ c > 255 ||
#endif
(md->ctypes[c] & ctype_word) == 0
)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -1992,14 +2406,19 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
+
case 0x000d:
- if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ }
+ else if (*eptr == 0x0a) eptr++;
break;
case 0x000a:
@@ -2010,7 +2429,7 @@ for (;;)
case 0x0085:
case 0x2028:
case 0x2029:
- if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH);
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
ecode++;
@@ -2020,7 +2439,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
switch(c)
@@ -2045,7 +2464,7 @@ for (;;)
case 0x202f: /* NARROW NO-BREAK SPACE */
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
case 0x3000: /* IDEOGRAPHIC SPACE */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
ecode++;
break;
@@ -2054,12 +2473,12 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
@@ -2088,7 +2507,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
switch(c)
@@ -2101,7 +2520,7 @@ for (;;)
case 0x85: /* NEL */
case 0x2028: /* LINE SEPARATOR */
case 0x2029: /* PARAGRAPH SEPARATOR */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
ecode++;
break;
@@ -2110,12 +2529,12 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x0a: /* LF */
case 0x0b: /* VT */
case 0x0c: /* FF */
@@ -2137,7 +2556,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
{
@@ -2146,59 +2565,59 @@ for (;;)
switch(ecode[1])
{
case PT_ANY:
- if (op == OP_NOTPROP) MRRETURN(MATCH_NOMATCH);
+ if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH);
break;
case PT_LAMP:
if ((prop->chartype == ucp_Lu ||
prop->chartype == ucp_Ll ||
prop->chartype == ucp_Lt) == (op == OP_NOTPROP))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case PT_GC:
- if ((ecode[2] != _pcre_ucp_gentype[prop->chartype]) == (op == OP_PROP))
- MRRETURN(MATCH_NOMATCH);
+ if ((ecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
break;
case PT_PC:
if ((ecode[2] != prop->chartype) == (op == OP_PROP))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case PT_SC:
if ((ecode[2] != prop->script) == (op == OP_PROP))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
/* These are specials */
case PT_ALNUM:
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||
- _pcre_ucp_gentype[prop->chartype] == ucp_N) == (op == OP_NOTPROP))
- MRRETURN(MATCH_NOMATCH);
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
break;
case PT_SPACE: /* Perl space */
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
== (op == OP_NOTPROP))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case PT_PXSPACE: /* POSIX space */
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
c == CHAR_FF || c == CHAR_CR)
== (op == OP_NOTPROP))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case PT_WORD:
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||
- _pcre_ucp_gentype[prop->chartype] == ucp_N ||
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
c == CHAR_UNDERSCORE) == (op == OP_NOTPROP))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
/* This should never occur */
@@ -2218,24 +2637,18 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
+ if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH);
+ while (eptr < md->end_subject)
{
- int category = UCD_CATEGORY(c);
- if (category == ucp_M) MRRETURN(MATCH_NOMATCH);
- while (eptr < md->end_subject)
- {
- int len = 1;
- if (!utf8) c = *eptr; else
- {
- GETCHARLEN(c, eptr, len);
- }
- category = UCD_CATEGORY(c);
- if (category != ucp_M) break;
- eptr += len;
- }
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ if (UCD_CATEGORY(c) != ucp_M) break;
+ eptr += len;
}
+ CHECK_PARTIAL();
ecode++;
break;
#endif
@@ -2250,129 +2663,147 @@ for (;;)
loops). */
case OP_REF:
- {
- offset = GET2(ecode, 1) << 1; /* Doubled ref number */
- ecode += 3;
+ case OP_REFI:
+ caseless = op == OP_REFI;
+ offset = GET2(ecode, 1) << 1; /* Doubled ref number */
+ ecode += 1 + IMM2_SIZE;
- /* If the reference is unset, there are two possibilities:
+ /* If the reference is unset, there are two possibilities:
- (a) In the default, Perl-compatible state, set the length to be longer
- than the amount of subject left; this ensures that every attempt at a
- match fails. We can't just fail here, because of the possibility of
- quantifiers with zero minima.
+ (a) In the default, Perl-compatible state, set the length negative;
+ this ensures that every attempt at a match fails. We can't just fail
+ here, because of the possibility of quantifiers with zero minima.
- (b) If the JavaScript compatibility flag is set, set the length to zero
- so that the back reference matches an empty string.
+ (b) If the JavaScript compatibility flag is set, set the length to zero
+ so that the back reference matches an empty string.
- Otherwise, set the length to the length of what was matched by the
- referenced subpattern. */
+ Otherwise, set the length to the length of what was matched by the
+ referenced subpattern. */
- if (offset >= offset_top || md->offset_vector[offset] < 0)
- length = (md->jscript_compat)? 0 : (int)(md->end_subject - eptr + 1);
- else
- length = md->offset_vector[offset+1] - md->offset_vector[offset];
+ if (offset >= offset_top || md->offset_vector[offset] < 0)
+ length = (md->jscript_compat)? 0 : -1;
+ else
+ length = md->offset_vector[offset+1] - md->offset_vector[offset];
- /* Set up for repetition, or handle the non-repeated case */
+ /* Set up for repetition, or handle the non-repeated case */
- switch (*ecode)
- {
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- c = *ecode++ - OP_CRSTAR;
- minimize = (c & 1) != 0;
- min = rep_min[c]; /* Pick up values from tables; */
- max = rep_max[c]; /* zero for max => infinity */
- if (max == 0) max = INT_MAX;
- break;
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ c = *ecode++ - OP_CRSTAR;
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+ break;
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- minimize = (*ecode == OP_CRMINRANGE);
- min = GET2(ecode, 1);
- max = GET2(ecode, 3);
- if (max == 0) max = INT_MAX;
- ecode += 5;
- break;
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ minimize = (*ecode == OP_CRMINRANGE);
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 1 + IMM2_SIZE);
+ if (max == 0) max = INT_MAX;
+ ecode += 1 + 2 * IMM2_SIZE;
+ break;
- default: /* No repeat follows */
- if (!match_ref(offset, eptr, length, md, ims))
- {
- CHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
- }
- eptr += length;
- continue; /* With the main loop */
+ default: /* No repeat follows */
+ if ((length = match_ref(offset, eptr, length, md, caseless)) < 0)
+ {
+ if (length == -2) eptr = md->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
+ eptr += length;
+ continue; /* With the main loop */
+ }
- /* If the length of the reference is zero, just continue with the
- main loop. */
+ /* Handle repeated back references. If the length of the reference is
+ zero, just continue with the main loop. If the length is negative, it
+ means the reference is unset in non-Java-compatible mode. If the minimum is
+ zero, we can continue at the same level without recursion. For any other
+ minimum, carrying on will result in NOMATCH. */
- if (length == 0) continue;
+ if (length == 0) continue;
+ if (length < 0 && min == 0) continue;
- /* First, ensure the minimum number of matches are present. We get back
- the length of the reference string explicitly rather than passing the
- address of eptr, so that eptr can be a register variable. */
+ /* First, ensure the minimum number of matches are present. We get back
+ the length of the reference string explicitly rather than passing the
+ address of eptr, so that eptr can be a register variable. */
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++)
+ {
+ int slength;
+ if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
{
- if (!match_ref(offset, eptr, length, md, ims))
- {
- CHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
- }
- eptr += length;
+ if (slength == -2) eptr = md->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
+ eptr += slength;
+ }
- /* If min = max, continue at the same level without recursion.
- They are not both allowed to be zero. */
+ /* If min = max, continue at the same level without recursion.
+ They are not both allowed to be zero. */
- if (min == max) continue;
+ if (min == max) continue;
- /* If minimizing, keep trying and advancing the pointer */
+ /* If minimizing, keep trying and advancing the pointer */
- if (minimize)
+ if (minimize)
+ {
+ for (fi = min;; fi++)
{
- for (fi = min;; fi++)
+ int slength;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM14);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM14);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
- if (!match_ref(offset, eptr, length, md, ims))
- {
- CHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
- }
- eptr += length;
+ if (slength == -2) eptr = md->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
- /* Control never gets here */
+ eptr += slength;
}
+ /* Control never gets here */
+ }
- /* If maximizing, find the longest string and work backwards */
+ /* If maximizing, find the longest string and work backwards */
- else
+ else
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
{
- pp = eptr;
- for (i = min; i < max; i++)
+ int slength;
+ if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
{
- if (!match_ref(offset, eptr, length, md, ims))
+ /* Can't use CHECK_PARTIAL because we don't want to update eptr in
+ the soft partial matching case. */
+
+ if (slength == -2 && md->partial != 0 &&
+ md->end_subject > md->start_used_ptr)
{
- CHECK_PARTIAL();
- break;
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
- eptr += length;
- }
- while (eptr >= pp)
- {
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM15);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- eptr -= length;
+ break;
}
- MRRETURN(MATCH_NOMATCH);
+ eptr += slength;
+ }
+
+ while (eptr >= pp)
+ {
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM15);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr -= length;
}
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
@@ -2390,8 +2821,11 @@ for (;;)
case OP_NCLASS:
case OP_CLASS:
{
+ /* The data variable is saved across frames, so the byte map needs to
+ be stored there. */
+#define BYTE_MAP ((pcre_uint8 *)data)
data = ecode + 1; /* Save for matching */
- ecode += 33; /* Advance past the item */
+ ecode += 1 + (32 / sizeof(pcre_uchar)); /* Advance past the item */
switch (*ecode)
{
@@ -2412,9 +2846,9 @@ for (;;)
case OP_CRMINRANGE:
minimize = (*ecode == OP_CRMINRANGE);
min = GET2(ecode, 1);
- max = GET2(ecode, 3);
+ max = GET2(ecode, 1 + IMM2_SIZE);
if (max == 0) max = INT_MAX;
- ecode += 5;
+ ecode += 1 + 2 * IMM2_SIZE;
break;
default: /* No repeat follows */
@@ -2424,41 +2858,45 @@ for (;;)
/* First, ensure the minimum number of matches are present. */
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
if (c > 255)
{
- if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH);
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
}
else
- {
- if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH);
- }
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
c = *eptr++;
- if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH);
+#ifndef COMPILE_PCRE8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
@@ -2472,47 +2910,51 @@ for (;;)
if (minimize)
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM16);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM16);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
if (c > 255)
{
- if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH);
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
}
else
- {
- if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH);
- }
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM17);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM17);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
c = *eptr++;
- if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH);
+#ifndef COMPILE_PCRE8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -2524,9 +2966,8 @@ for (;;)
{
pp = eptr;
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
for (i = min; i < max; i++)
{
@@ -2542,14 +2983,12 @@ for (;;)
if (op == OP_CLASS) break;
}
else
- {
- if ((data[c/8] & (1 << (c&7))) == 0) break;
- }
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
eptr += len;
}
for (;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM18);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM18);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr);
@@ -2557,7 +2996,7 @@ for (;;)
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (i = min; i < max; i++)
{
@@ -2567,19 +3006,27 @@ for (;;)
break;
}
c = *eptr;
- if ((data[c/8] & (1 << (c&7))) == 0) break;
+#ifndef COMPILE_PCRE8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) break;
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
eptr++;
}
while (eptr >= pp)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM19);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM19);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr--;
}
}
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
+#undef BYTE_MAP
}
/* Control never gets here */
@@ -2588,7 +3035,7 @@ for (;;)
when UTF-8 mode mode is supported. Nevertheless, we may not be in UTF-8
mode, because Unicode properties are supported in non-UTF-8 mode. */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
case OP_XCLASS:
{
data = ecode + 1 + LINK_SIZE; /* Save for matching */
@@ -2613,9 +3060,9 @@ for (;;)
case OP_CRMINRANGE:
minimize = (*ecode == OP_CRMINRANGE);
min = GET2(ecode, 1);
- max = GET2(ecode, 3);
+ max = GET2(ecode, 1 + IMM2_SIZE);
if (max == 0) max = INT_MAX;
- ecode += 5;
+ ecode += 1 + 2 * IMM2_SIZE;
break;
default: /* No repeat follows */
@@ -2630,10 +3077,10 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- if (!_pcre_xclass(c, data)) MRRETURN(MATCH_NOMATCH);
+ if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
}
/* If max == min we can continue with the main loop without the
@@ -2648,16 +3095,16 @@ for (;;)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM20);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM20);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- if (!_pcre_xclass(c, data)) MRRETURN(MATCH_NOMATCH);
+ if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -2675,18 +3122,24 @@ for (;;)
SCHECK_PARTIAL();
break;
}
+#ifdef SUPPORT_UTF
GETCHARLENTEST(c, eptr, len);
- if (!_pcre_xclass(c, data)) break;
+#else
+ c = *eptr;
+#endif
+ if (!PRIV(xclass)(c, data, utf)) break;
eptr += len;
}
for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM21);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM21);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
- if (utf8) BACKCHAR(eptr);
+#ifdef SUPPORT_UTF
+ if (utf) BACKCHAR(eptr);
+#endif
}
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
@@ -2696,8 +3149,8 @@ for (;;)
/* Match a single character, casefully */
case OP_CHAR:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
length = 1;
ecode++;
@@ -2705,50 +3158,57 @@ for (;;)
if (length > md->end_subject - eptr)
{
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- while (length-- > 0) if (*ecode++ != *eptr++) MRRETURN(MATCH_NOMATCH);
+ while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH);
}
else
#endif
-
- /* Non-UTF-8 mode */
+ /* Not UTF mode */
{
if (md->end_subject - eptr < 1)
{
SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (ecode[1] != *eptr++) MRRETURN(MATCH_NOMATCH);
+ if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH);
ecode += 2;
}
break;
- /* Match a single character, caselessly */
+ /* Match a single character, caselessly. If we are at the end of the
+ subject, give up immediately. */
+
+ case OP_CHARI:
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
- case OP_CHARNC:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
length = 1;
ecode++;
GETCHARLEN(fc, ecode, length);
- if (length > md->end_subject - eptr)
- {
- CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */
- MRRETURN(MATCH_NOMATCH);
- }
-
/* If the pattern character's value is < 128, we have only one byte, and
- can use the fast lookup table. */
+ we know that its other case must also be one byte long, so we can use the
+ fast lookup table. We know that there is at least one byte left in the
+ subject. */
if (fc < 128)
{
- if (md->lcc[*ecode++] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH);
+ if (md->lcc[fc]
+ != TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ eptr++;
}
- /* Otherwise we must pick up the subject character */
+ /* Otherwise we must pick up the subject character. Note that we cannot
+ use the value of "length" to check for sufficient bytes left, because the
+ other case of the character may have more or fewer bytes. */
else
{
@@ -2764,21 +3224,18 @@ for (;;)
#ifdef SUPPORT_UCP
if (dc != UCD_OTHERCASE(fc))
#endif
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
}
else
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
- /* Non-UTF-8 mode */
+ /* Not UTF mode */
{
- if (md->end_subject - eptr < 1)
- {
- SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */
- MRRETURN(MATCH_NOMATCH);
- }
- if (md->lcc[ecode[1]] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH);
+ if (TABLE_GET(ecode[1], md->lcc, ecode[1])
+ != TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH);
+ eptr++;
ecode += 2;
}
break;
@@ -2786,23 +3243,28 @@ for (;;)
/* Match a single character repeatedly. */
case OP_EXACT:
+ case OP_EXACTI:
min = max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATCHAR;
case OP_POSUPTO:
+ case OP_POSUPTOI:
possessive = TRUE;
/* Fall through */
case OP_UPTO:
+ case OP_UPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
min = 0;
max = GET2(ecode, 1);
- minimize = *ecode == OP_MINUPTO;
- ecode += 3;
+ minimize = *ecode == OP_MINUPTO || *ecode == OP_MINUPTOI;
+ ecode += 1 + IMM2_SIZE;
goto REPEATCHAR;
case OP_POSSTAR:
+ case OP_POSSTARI:
possessive = TRUE;
min = 0;
max = INT_MAX;
@@ -2810,6 +3272,7 @@ for (;;)
goto REPEATCHAR;
case OP_POSPLUS:
+ case OP_POSPLUSI:
possessive = TRUE;
min = 1;
max = INT_MAX;
@@ -2817,6 +3280,7 @@ for (;;)
goto REPEATCHAR;
case OP_POSQUERY:
+ case OP_POSQUERYI:
possessive = TRUE;
min = 0;
max = 1;
@@ -2824,14 +3288,19 @@ for (;;)
goto REPEATCHAR;
case OP_STAR:
+ case OP_STARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_PLUS:
+ case OP_PLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
case OP_QUERY:
+ case OP_QUERYI:
case OP_MINQUERY:
- c = *ecode++ - OP_STAR;
+ case OP_MINQUERYI:
+ c = *ecode++ - ((op < OP_STARI)? OP_STAR : OP_STARI);
minimize = (c & 1) != 0;
-
min = rep_min[c]; /* Pick up values from tables; */
max = rep_max[c]; /* zero for max => infinity */
if (max == 0) max = INT_MAX;
@@ -2839,8 +3308,8 @@ for (;;)
/* Common code for all repeated single-character matches. */
REPEATCHAR:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
length = 1;
charptr = ecode;
@@ -2854,25 +3323,25 @@ for (;;)
{
#ifdef SUPPORT_UCP
unsigned int othercase;
- if ((ims & PCRE_CASELESS) != 0 &&
+ if (op >= OP_STARI && /* Caseless */
(othercase = UCD_OTHERCASE(fc)) != fc)
- oclength = _pcre_ord2utf8(othercase, occhars);
+ oclength = PRIV(ord2utf)(othercase, occhars);
else oclength = 0;
#endif /* SUPPORT_UCP */
for (i = 1; i <= min; i++)
{
if (eptr <= md->end_subject - length &&
- memcmp(eptr, charptr, length) == 0) eptr += length;
+ memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
#ifdef SUPPORT_UCP
else if (oclength > 0 &&
eptr <= md->end_subject - oclength &&
- memcmp(eptr, occhars, oclength) == 0) eptr += oclength;
+ memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
#endif /* SUPPORT_UCP */
else
{
CHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
@@ -2882,20 +3351,20 @@ for (;;)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM22);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM22);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr <= md->end_subject - length &&
- memcmp(eptr, charptr, length) == 0) eptr += length;
+ memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
#ifdef SUPPORT_UCP
else if (oclength > 0 &&
eptr <= md->end_subject - oclength &&
- memcmp(eptr, occhars, oclength) == 0) eptr += oclength;
+ memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
#endif /* SUPPORT_UCP */
else
{
CHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -2907,11 +3376,11 @@ for (;;)
for (i = min; i < max; i++)
{
if (eptr <= md->end_subject - length &&
- memcmp(eptr, charptr, length) == 0) eptr += length;
+ memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
#ifdef SUPPORT_UCP
else if (oclength > 0 &&
eptr <= md->end_subject - oclength &&
- memcmp(eptr, occhars, oclength) == 0) eptr += oclength;
+ memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
#endif /* SUPPORT_UCP */
else
{
@@ -2924,9 +3393,9 @@ for (;;)
for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM23);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM23);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr == pp) { MRRETURN(MATCH_NOMATCH); }
+ if (eptr == pp) { RRETURN(MATCH_NOMATCH); }
#ifdef SUPPORT_UCP
eptr--;
BACKCHAR(eptr);
@@ -2943,14 +3412,12 @@ for (;;)
value of fc will always be < 128. */
}
else
-#endif /* SUPPORT_UTF8 */
-
- /* When not in UTF-8 mode, load a single-byte character. */
-
- fc = *ecode++;
+#endif /* SUPPORT_UTF */
+ /* When not in UTF-8 mode, load a single-byte character. */
+ fc = *ecode++;
- /* The value of fc at this point is always less than 256, though we may or
- may not be in UTF-8 mode. The code is duplicated for the caseless and
+ /* The value of fc at this point is always one character, though we may
+ or may not be in UTF mode. The code is duplicated for the caseless and
caseful cases, for speed, since matching characters is likely to be quite
common. First, ensure the minimum number of matches are present. If min =
max, continue at the same level without recursing. Otherwise, if
@@ -2959,34 +3426,52 @@ for (;;)
maximizing, find the maximum number of characters and work backwards. */
DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max,
- max, eptr));
+ max, (char *)eptr));
- if ((ims & PCRE_CASELESS) != 0)
+ if (op >= OP_STARI) /* Caseless */
{
- fc = md->lcc[fc];
+#ifdef COMPILE_PCRE8
+ /* fc must be < 128 if UTF is enabled. */
+ foc = md->fcc[fc];
+#else
+#ifdef SUPPORT_UTF
+#ifdef SUPPORT_UCP
+ if (utf && fc > 127)
+ foc = UCD_OTHERCASE(fc);
+#else
+ if (utf && fc > 127)
+ foc = fc;
+#endif /* SUPPORT_UCP */
+ else
+#endif /* SUPPORT_UTF */
+ foc = TABLE_GET(fc, md->fcc, fc);
+#endif /* COMPILE_PCRE8 */
+
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH);
+ if (fc != *eptr && foc != *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
}
if (min == max) continue;
if (minimize)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM24);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM24);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH);
+ if (fc != *eptr && foc != *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
}
/* Control never gets here */
}
@@ -3000,7 +3485,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if (fc != md->lcc[*eptr]) break;
+ if (fc != *eptr && foc != *eptr) break;
eptr++;
}
@@ -3008,11 +3493,11 @@ for (;;)
while (eptr >= pp)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM25);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM25);
eptr--;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -3026,9 +3511,9 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc != *eptr++) MRRETURN(MATCH_NOMATCH);
+ if (fc != *eptr++) RRETURN(MATCH_NOMATCH);
}
if (min == max) continue;
@@ -3037,15 +3522,15 @@ for (;;)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM26);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM26);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc != *eptr++) MRRETURN(MATCH_NOMATCH);
+ if (fc != *eptr++) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -3066,11 +3551,11 @@ for (;;)
while (eptr >= pp)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM27);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM27);
eptr--;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -3079,24 +3564,47 @@ for (;;)
checking can be multibyte. */
case OP_NOT:
+ case OP_NOTI:
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- ecode++;
- GETCHARINCTEST(c, eptr);
- if ((ims & PCRE_CASELESS) != 0)
+#ifdef SUPPORT_UTF
+ if (utf)
{
-#ifdef SUPPORT_UTF8
- if (c < 256)
-#endif
- c = md->lcc[c];
- if (md->lcc[*ecode++] == c) MRRETURN(MATCH_NOMATCH);
+ register unsigned int ch, och;
+
+ ecode++;
+ GETCHARINC(ch, ecode);
+ GETCHARINC(c, eptr);
+
+ if (op == OP_NOT)
+ {
+ if (ch == c) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+#ifdef SUPPORT_UCP
+ if (ch > 127)
+ och = UCD_OTHERCASE(ch);
+#else
+ if (ch > 127)
+ och = ch;
+#endif /* SUPPORT_UCP */
+ else
+ och = TABLE_GET(ch, md->fcc, ch);
+ if (ch == c || och == c) RRETURN(MATCH_NOMATCH);
+ }
}
else
+#endif
{
- if (*ecode++ == c) MRRETURN(MATCH_NOMATCH);
+ register unsigned int ch = ecode[1];
+ c = *eptr++;
+ if (ch == c || (op == OP_NOTI && TABLE_GET(ch, md->fcc, ch) == c))
+ RRETURN(MATCH_NOMATCH);
+ ecode += 2;
}
break;
@@ -3108,19 +3616,23 @@ for (;;)
about... */
case OP_NOTEXACT:
+ case OP_NOTEXACTI:
min = max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATNOTCHAR;
case OP_NOTUPTO:
+ case OP_NOTUPTOI:
case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
min = 0;
max = GET2(ecode, 1);
- minimize = *ecode == OP_NOTMINUPTO;
- ecode += 3;
+ minimize = *ecode == OP_NOTMINUPTO || *ecode == OP_NOTMINUPTOI;
+ ecode += 1 + IMM2_SIZE;
goto REPEATNOTCHAR;
case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
possessive = TRUE;
min = 0;
max = INT_MAX;
@@ -3128,6 +3640,7 @@ for (;;)
goto REPEATNOTCHAR;
case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
possessive = TRUE;
min = 1;
max = INT_MAX;
@@ -3135,6 +3648,7 @@ for (;;)
goto REPEATNOTCHAR;
case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
possessive = TRUE;
min = 0;
max = 1;
@@ -3142,19 +3656,26 @@ for (;;)
goto REPEATNOTCHAR;
case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
possessive = TRUE;
min = 0;
max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATNOTCHAR;
case OP_NOTSTAR:
+ case OP_NOTSTARI:
case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
case OP_NOTPLUS:
+ case OP_NOTPLUSI:
case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
case OP_NOTQUERY:
+ case OP_NOTQUERYI:
case OP_NOTMINQUERY:
- c = *ecode++ - OP_NOTSTAR;
+ case OP_NOTMINQUERYI:
+ c = *ecode++ - ((op >= OP_NOTSTARI)? OP_NOTSTARI: OP_NOTSTAR);
minimize = (c & 1) != 0;
min = rep_min[c]; /* Pick up values from tables; */
max = rep_max[c]; /* zero for max => infinity */
@@ -3163,7 +3684,7 @@ for (;;)
/* Common code for all repeated single-byte matches. */
REPEATNOTCHAR:
- fc = *ecode++;
+ GETCHARINCTEST(fc, ecode);
/* The code is duplicated for the caseless and caseful cases, for speed,
since matching characters is likely to be quite common. First, ensure the
@@ -3174,15 +3695,24 @@ for (;;)
characters and work backwards. */
DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max,
- max, eptr));
+ max, (char *)eptr));
- if ((ims & PCRE_CASELESS) != 0)
+ if (op >= OP_NOTSTARI) /* Caseless */
{
- fc = md->lcc[fc];
+#ifdef SUPPORT_UTF
+#ifdef SUPPORT_UCP
+ if (utf && fc > 127)
+ foc = UCD_OTHERCASE(fc);
+#else
+ if (utf && fc > 127)
+ foc = fc;
+#endif /* SUPPORT_UCP */
+ else
+#endif /* SUPPORT_UTF */
+ foc = TABLE_GET(fc, md->fcc, fc);
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
register unsigned int d;
for (i = 1; i <= min; i++)
@@ -3190,26 +3720,25 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(d, eptr);
- if (d < 256) d = md->lcc[d];
- if (fc == d) MRRETURN(MATCH_NOMATCH);
+ if (fc == d || (unsigned int)foc == d) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
-
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc == md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH);
+ if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
}
}
@@ -3217,41 +3746,40 @@ for (;;)
if (minimize)
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
register unsigned int d;
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM28);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM28);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(d, eptr);
- if (d < 256) d = md->lcc[d];
- if (fc == d) MRRETURN(MATCH_NOMATCH);
+ if (fc == d || (unsigned int)foc == d) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM29);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM29);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc == md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH);
+ if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
}
}
/* Control never gets here */
@@ -3263,9 +3791,8 @@ for (;;)
{
pp = eptr;
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
register unsigned int d;
for (i = min; i < max; i++)
@@ -3277,14 +3804,13 @@ for (;;)
break;
}
GETCHARLEN(d, eptr, len);
- if (d < 256) d = md->lcc[d];
- if (fc == d) break;
+ if (fc == d || (unsigned int)foc == d) break;
eptr += len;
}
- if (possessive) continue;
- for(;;)
+ if (possessive) continue;
+ for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM30);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM30);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr);
@@ -3292,7 +3818,7 @@ for (;;)
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (i = min; i < max; i++)
{
@@ -3301,19 +3827,19 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if (fc == md->lcc[*eptr]) break;
+ if (fc == *eptr || foc == *eptr) break;
eptr++;
}
if (possessive) continue;
while (eptr >= pp)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM31);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM31);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr--;
}
}
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -3322,9 +3848,8 @@ for (;;)
else
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
register unsigned int d;
for (i = 1; i <= min; i++)
@@ -3332,24 +3857,24 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(d, eptr);
- if (fc == d) MRRETURN(MATCH_NOMATCH);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc == *eptr++) MRRETURN(MATCH_NOMATCH);
+ if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
}
}
@@ -3357,40 +3882,39 @@ for (;;)
if (minimize)
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
register unsigned int d;
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM32);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM32);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(d, eptr);
- if (fc == d) MRRETURN(MATCH_NOMATCH);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM33);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM33);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (fc == *eptr++) MRRETURN(MATCH_NOMATCH);
+ if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -3402,9 +3926,8 @@ for (;;)
{
pp = eptr;
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
register unsigned int d;
for (i = min; i < max; i++)
@@ -3422,7 +3945,7 @@ for (;;)
if (possessive) continue;
for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM34);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM34);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr);
@@ -3430,7 +3953,7 @@ for (;;)
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (i = min; i < max; i++)
{
@@ -3445,13 +3968,13 @@ for (;;)
if (possessive) continue;
while (eptr >= pp)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM35);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM35);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr--;
}
}
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -3463,7 +3986,7 @@ for (;;)
case OP_TYPEEXACT:
min = max = GET2(ecode, 1);
minimize = TRUE;
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATTYPE;
case OP_TYPEUPTO:
@@ -3471,7 +3994,7 @@ for (;;)
min = 0;
max = GET2(ecode, 1);
minimize = *ecode == OP_TYPEMINUPTO;
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATTYPE;
case OP_TYPEPOSSTAR:
@@ -3499,7 +4022,7 @@ for (;;)
possessive = TRUE;
min = 0;
max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATTYPE;
case OP_TYPESTAR:
@@ -3545,13 +4068,13 @@ for (;;)
switch(prop_type)
{
case PT_ANY:
- if (prop_fail_result) MRRETURN(MATCH_NOMATCH);
+ if (prop_fail_result) RRETURN(MATCH_NOMATCH);
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
}
@@ -3560,17 +4083,18 @@ for (;;)
case PT_LAMP:
for (i = 1; i <= min; i++)
{
+ int chartype;
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_chartype = UCD_CHARTYPE(c);
- if ((prop_chartype == ucp_Lu ||
- prop_chartype == ucp_Ll ||
- prop_chartype == ucp_Lt) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3580,12 +4104,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == prop_value) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3595,12 +4118,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_chartype = UCD_CHARTYPE(c);
- if ((prop_chartype == prop_value) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3610,28 +4132,27 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_script = UCD_SCRIPT(c);
- if ((prop_script == prop_value) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
break;
case PT_ALNUM:
for (i = 1; i <= min; i++)
{
+ int category;
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_L || prop_category == ucp_N)
- == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3641,14 +4162,13 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
c == CHAR_FF || c == CHAR_CR)
== prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3658,31 +4178,30 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR)
== prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
case PT_WORD:
for (i = 1; i <= min; i++)
{
+ int category;
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_L || prop_category == ucp_N ||
- c == CHAR_UNDERSCORE)
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE)
== prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3703,20 +4222,18 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if (prop_category == ucp_M) MRRETURN(MATCH_NOMATCH);
+ if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH);
while (eptr < md->end_subject)
{
int len = 1;
- if (!utf8) c = *eptr;
- else { GETCHARLEN(c, eptr, len); }
- prop_category = UCD_CATEGORY(c);
- if (prop_category != ucp_M) break;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ if (UCD_CATEGORY(c) != ucp_M) break;
eptr += len;
}
+ CHECK_PARTIAL();
}
}
@@ -3725,8 +4242,8 @@ for (;;)
/* Handle all other cases when the coding is UTF-8 */
-#ifdef SUPPORT_UTF8
- if (utf8) switch(ctype)
+#ifdef SUPPORT_UTF
+ if (utf) switch(ctype)
{
case OP_ANY:
for (i = 1; i <= min; i++)
@@ -3734,11 +4251,20 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
- if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH);
eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
@@ -3748,15 +4274,15 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
case OP_ANYBYTE:
- if (eptr > md->end_subject - min) MRRETURN(MATCH_NOMATCH);
+ if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH);
eptr += min;
break;
@@ -3766,12 +4292,13 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
+
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
@@ -3784,7 +4311,7 @@ for (;;)
case 0x0085:
case 0x2028:
case 0x2029:
- if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH);
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
}
@@ -3796,7 +4323,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
switch(c)
@@ -3821,7 +4348,7 @@ for (;;)
case 0x202f: /* NARROW NO-BREAK SPACE */
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
case 0x3000: /* IDEOGRAPHIC SPACE */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
break;
@@ -3832,12 +4359,12 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
@@ -3868,7 +4395,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
switch(c)
@@ -3881,7 +4408,7 @@ for (;;)
case 0x85: /* NEL */
case 0x2028: /* LINE SEPARATOR */
case 0x2029: /* PARAGRAPH SEPARATOR */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
}
break;
@@ -3892,12 +4419,12 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x0a: /* LF */
case 0x0b: /* VT */
case 0x0c: /* FF */
@@ -3916,11 +4443,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINC(c, eptr);
if (c < 128 && (md->ctypes[c] & ctype_digit) != 0)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -3930,10 +4457,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0)
- MRRETURN(MATCH_NOMATCH);
+ if (*eptr >= 128 || (md->ctypes[*eptr] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
/* No need to skip more bytes - we know it's a 1-byte character */
}
break;
@@ -3944,11 +4472,12 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0)
- MRRETURN(MATCH_NOMATCH);
- while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80);
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
@@ -3958,10 +4487,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0)
- MRRETURN(MATCH_NOMATCH);
+ if (*eptr >= 128 || (md->ctypes[*eptr] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
/* No need to skip more bytes - we know it's a 1-byte character */
}
break;
@@ -3972,11 +4502,12 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0)
- MRRETURN(MATCH_NOMATCH);
- while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80);
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
@@ -3986,10 +4517,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0)
- MRRETURN(MATCH_NOMATCH);
+ if (*eptr >= 128 || (md->ctypes[*eptr] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
/* No need to skip more bytes - we know it's a 1-byte character */
}
break;
@@ -3999,7 +4531,7 @@ for (;;)
} /* End switch(ctype) */
else
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
/* Code for the non-UTF-8 case for minimum matching of operators other
than OP_PROP and OP_NOTPROP. */
@@ -4012,9 +4544,18 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
- if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH);
eptr++;
}
break;
@@ -4023,7 +4564,7 @@ for (;;)
if (eptr > md->end_subject - min)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
eptr += min;
break;
@@ -4032,7 +4573,7 @@ for (;;)
if (eptr > md->end_subject - min)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
eptr += min;
break;
@@ -4043,21 +4584,27 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
switch(*eptr++)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
+
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
+
case 0x000a:
break;
case 0x000b:
case 0x000c:
case 0x0085:
- if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE16
+ case 0x2028:
+ case 0x2029:
+#endif
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
}
@@ -4069,7 +4616,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
switch(*eptr++)
{
@@ -4077,7 +4624,25 @@ for (;;)
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
- MRRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE16
+ case 0x1680: /* OGHAM SPACE MARK */
+ case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
+ case 0x2000: /* EN QUAD */
+ case 0x2001: /* EM QUAD */
+ case 0x2002: /* EN SPACE */
+ case 0x2003: /* EM SPACE */
+ case 0x2004: /* THREE-PER-EM SPACE */
+ case 0x2005: /* FOUR-PER-EM SPACE */
+ case 0x2006: /* SIX-PER-EM SPACE */
+ case 0x2007: /* FIGURE SPACE */
+ case 0x2008: /* PUNCTUATION SPACE */
+ case 0x2009: /* THIN SPACE */
+ case 0x200A: /* HAIR SPACE */
+ case 0x202f: /* NARROW NO-BREAK SPACE */
+ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
+ case 0x3000: /* IDEOGRAPHIC SPACE */
+#endif
+ RRETURN(MATCH_NOMATCH);
}
}
break;
@@ -4088,14 +4653,32 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
switch(*eptr++)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
+#ifdef COMPILE_PCRE16
+ case 0x1680: /* OGHAM SPACE MARK */
+ case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
+ case 0x2000: /* EN QUAD */
+ case 0x2001: /* EM QUAD */
+ case 0x2002: /* EN SPACE */
+ case 0x2003: /* EM SPACE */
+ case 0x2004: /* THREE-PER-EM SPACE */
+ case 0x2005: /* FOUR-PER-EM SPACE */
+ case 0x2006: /* SIX-PER-EM SPACE */
+ case 0x2007: /* FIGURE SPACE */
+ case 0x2008: /* PUNCTUATION SPACE */
+ case 0x2009: /* THIN SPACE */
+ case 0x200A: /* HAIR SPACE */
+ case 0x202f: /* NARROW NO-BREAK SPACE */
+ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
+ case 0x3000: /* IDEOGRAPHIC SPACE */
+#endif
break;
}
}
@@ -4107,7 +4690,7 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
switch(*eptr++)
{
@@ -4117,7 +4700,11 @@ for (;;)
case 0x0c: /* FF */
case 0x0d: /* CR */
case 0x85: /* NEL */
- MRRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE16
+ case 0x2028: /* LINE SEPARATOR */
+ case 0x2029: /* PARAGRAPH SEPARATOR */
+#endif
+ RRETURN(MATCH_NOMATCH);
}
}
break;
@@ -4128,16 +4715,20 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
switch(*eptr++)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x0a: /* LF */
case 0x0b: /* VT */
case 0x0c: /* FF */
case 0x0d: /* CR */
case 0x85: /* NEL */
+#ifdef COMPILE_PCRE16
+ case 0x2028: /* LINE SEPARATOR */
+ case 0x2029: /* PARAGRAPH SEPARATOR */
+#endif
break;
}
}
@@ -4149,9 +4740,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if ((md->ctypes[*eptr++] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH);
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
}
break;
@@ -4161,9 +4754,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if ((md->ctypes[*eptr++] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH);
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
}
break;
@@ -4173,9 +4768,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if ((md->ctypes[*eptr++] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH);
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
}
break;
@@ -4185,9 +4782,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if ((md->ctypes[*eptr++] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH);
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
}
break;
@@ -4197,10 +4796,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if ((md->ctypes[*eptr++] & ctype_word) != 0)
- MRRETURN(MATCH_NOMATCH);
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
}
break;
@@ -4210,10 +4810,11 @@ for (;;)
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
- if ((md->ctypes[*eptr++] & ctype_word) == 0)
- MRRETURN(MATCH_NOMATCH);
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
}
break;
@@ -4240,170 +4841,167 @@ for (;;)
case PT_ANY:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM36);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM36);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- if (prop_fail_result) MRRETURN(MATCH_NOMATCH);
+ if (prop_fail_result) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_LAMP:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM37);
+ int chartype;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM37);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_chartype = UCD_CHARTYPE(c);
- if ((prop_chartype == ucp_Lu ||
- prop_chartype == ucp_Ll ||
- prop_chartype == ucp_Lt) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_GC:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM38);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM38);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == prop_value) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_PC:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM39);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM39);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_chartype = UCD_CHARTYPE(c);
- if ((prop_chartype == prop_value) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_SC:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM40);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM40);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_script = UCD_SCRIPT(c);
- if ((prop_script == prop_value) == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_ALNUM:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM59);
+ int category;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM59);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_L || prop_category == ucp_N)
- == prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_SPACE: /* Perl space */
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM60);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM60);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
c == CHAR_FF || c == CHAR_CR)
== prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_PXSPACE: /* POSIX space */
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM61);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM61);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR)
== prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_WORD:
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM62);
+ int category;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM62);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_L ||
- prop_category == ucp_N ||
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L ||
+ category == ucp_N ||
c == CHAR_UNDERSCORE)
== prop_fail_result)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
@@ -4421,52 +5019,59 @@ for (;;)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM41);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM41);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if (prop_category == ucp_M) MRRETURN(MATCH_NOMATCH);
+ if (UCD_CATEGORY(c) == ucp_M) RRETURN(MATCH_NOMATCH);
while (eptr < md->end_subject)
{
int len = 1;
- if (!utf8) c = *eptr;
- else { GETCHARLEN(c, eptr, len); }
- prop_category = UCD_CATEGORY(c);
- if (prop_category != ucp_M) break;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ if (UCD_CATEGORY(c) != ucp_M) break;
eptr += len;
}
+ CHECK_PARTIAL();
}
}
-
else
#endif /* SUPPORT_UCP */
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM42);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM42);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
if (ctype == OP_ANY && IS_NEWLINE(eptr))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
GETCHARINC(c, eptr);
switch(ctype)
{
- case OP_ANY: /* This is the non-NL case */
+ case OP_ANY: /* This is the non-NL case */
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ break;
+
case OP_ALLANY:
case OP_ANYBYTE:
break;
@@ -4474,7 +5079,7 @@ for (;;)
case OP_ANYNL:
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
@@ -4486,7 +5091,7 @@ for (;;)
case 0x0085:
case 0x2028:
case 0x2029:
- if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH);
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
break;
@@ -4514,14 +5119,14 @@ for (;;)
case 0x202f: /* NARROW NO-BREAK SPACE */
case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
case 0x3000: /* IDEOGRAPHIC SPACE */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
case OP_HSPACE:
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
@@ -4556,14 +5161,14 @@ for (;;)
case 0x85: /* NEL */
case 0x2028: /* LINE SEPARATOR */
case 0x2029: /* PARAGRAPH SEPARATOR */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
break;
case OP_VSPACE:
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x0a: /* LF */
case 0x0b: /* VT */
case 0x0c: /* FF */
@@ -4577,32 +5182,32 @@ for (;;)
case OP_NOT_DIGIT:
if (c < 256 && (md->ctypes[c] & ctype_digit) != 0)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case OP_DIGIT:
if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case OP_NOT_WHITESPACE:
if (c < 256 && (md->ctypes[c] & ctype_space) != 0)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case OP_WHITESPACE:
- if (c >= 256 || (md->ctypes[c] & ctype_space) == 0)
- MRRETURN(MATCH_NOMATCH);
+ if (c >= 256 || (md->ctypes[c] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
break;
case OP_NOT_WORDCHAR:
if (c < 256 && (md->ctypes[c] & ctype_word) != 0)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
case OP_WORDCHAR:
if (c >= 256 || (md->ctypes[c] & ctype_word) == 0)
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
break;
default:
@@ -4612,24 +5217,35 @@ for (;;)
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
for (fi = min;; fi++)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM43);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM43);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max) MRRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
if (ctype == OP_ANY && IS_NEWLINE(eptr))
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
c = *eptr++;
switch(ctype)
{
- case OP_ANY: /* This is the non-NL case */
+ case OP_ANY: /* This is the non-NL case */
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ break;
+
case OP_ALLANY:
case OP_ANYBYTE:
break;
@@ -4637,7 +5253,7 @@ for (;;)
case OP_ANYNL:
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x000d:
if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
break;
@@ -4648,7 +5264,11 @@ for (;;)
case 0x000b:
case 0x000c:
case 0x0085:
- if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE16
+ case 0x2028:
+ case 0x2029:
+#endif
+ if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
break;
@@ -4660,17 +5280,53 @@ for (;;)
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
- MRRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE16
+ case 0x1680: /* OGHAM SPACE MARK */
+ case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
+ case 0x2000: /* EN QUAD */
+ case 0x2001: /* EM QUAD */
+ case 0x2002: /* EN SPACE */
+ case 0x2003: /* EM SPACE */
+ case 0x2004: /* THREE-PER-EM SPACE */
+ case 0x2005: /* FOUR-PER-EM SPACE */
+ case 0x2006: /* SIX-PER-EM SPACE */
+ case 0x2007: /* FIGURE SPACE */
+ case 0x2008: /* PUNCTUATION SPACE */
+ case 0x2009: /* THIN SPACE */
+ case 0x200A: /* HAIR SPACE */
+ case 0x202f: /* NARROW NO-BREAK SPACE */
+ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
+ case 0x3000: /* IDEOGRAPHIC SPACE */
+#endif
+ RRETURN(MATCH_NOMATCH);
}
break;
case OP_HSPACE:
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x09: /* HT */
case 0x20: /* SPACE */
case 0xa0: /* NBSP */
+#ifdef COMPILE_PCRE16
+ case 0x1680: /* OGHAM SPACE MARK */
+ case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
+ case 0x2000: /* EN QUAD */
+ case 0x2001: /* EM QUAD */
+ case 0x2002: /* EN SPACE */
+ case 0x2003: /* EM SPACE */
+ case 0x2004: /* THREE-PER-EM SPACE */
+ case 0x2005: /* FOUR-PER-EM SPACE */
+ case 0x2006: /* SIX-PER-EM SPACE */
+ case 0x2007: /* FIGURE SPACE */
+ case 0x2008: /* PUNCTUATION SPACE */
+ case 0x2009: /* THIN SPACE */
+ case 0x200A: /* HAIR SPACE */
+ case 0x202f: /* NARROW NO-BREAK SPACE */
+ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
+ case 0x3000: /* IDEOGRAPHIC SPACE */
+#endif
break;
}
break;
@@ -4684,45 +5340,53 @@ for (;;)
case 0x0c: /* FF */
case 0x0d: /* CR */
case 0x85: /* NEL */
- MRRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE16
+ case 0x2028: /* LINE SEPARATOR */
+ case 0x2029: /* PARAGRAPH SEPARATOR */
+#endif
+ RRETURN(MATCH_NOMATCH);
}
break;
case OP_VSPACE:
switch(c)
{
- default: MRRETURN(MATCH_NOMATCH);
+ default: RRETURN(MATCH_NOMATCH);
case 0x0a: /* LF */
case 0x0b: /* VT */
case 0x0c: /* FF */
case 0x0d: /* CR */
case 0x85: /* NEL */
+#ifdef COMPILE_PCRE16
+ case 0x2028: /* LINE SEPARATOR */
+ case 0x2029: /* PARAGRAPH SEPARATOR */
+#endif
break;
}
break;
case OP_NOT_DIGIT:
- if ((md->ctypes[c] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH);
+ if (MAX_255(c) && (md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
break;
case OP_DIGIT:
- if ((md->ctypes[c] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH);
+ if (!MAX_255(c) || (md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
break;
case OP_NOT_WHITESPACE:
- if ((md->ctypes[c] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH);
+ if (MAX_255(c) && (md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
break;
case OP_WHITESPACE:
- if ((md->ctypes[c] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH);
+ if (!MAX_255(c) || (md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
break;
case OP_NOT_WORDCHAR:
- if ((md->ctypes[c] & ctype_word) != 0) MRRETURN(MATCH_NOMATCH);
+ if (MAX_255(c) && (md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH);
break;
case OP_WORDCHAR:
- if ((md->ctypes[c] & ctype_word) == 0) MRRETURN(MATCH_NOMATCH);
+ if (!MAX_255(c) || (md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH);
break;
default:
@@ -4764,6 +5428,7 @@ for (;;)
case PT_LAMP:
for (i = min; i < max; i++)
{
+ int chartype;
int len = 1;
if (eptr >= md->end_subject)
{
@@ -4771,10 +5436,10 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_chartype = UCD_CHARTYPE(c);
- if ((prop_chartype == ucp_Lu ||
- prop_chartype == ucp_Ll ||
- prop_chartype == ucp_Lt) == prop_fail_result)
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
break;
eptr+= len;
}
@@ -4790,9 +5455,7 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == prop_value) == prop_fail_result)
- break;
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) break;
eptr+= len;
}
break;
@@ -4807,9 +5470,7 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_chartype = UCD_CHARTYPE(c);
- if ((prop_chartype == prop_value) == prop_fail_result)
- break;
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) break;
eptr+= len;
}
break;
@@ -4824,9 +5485,7 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_script = UCD_SCRIPT(c);
- if ((prop_script == prop_value) == prop_fail_result)
- break;
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) break;
eptr+= len;
}
break;
@@ -4834,6 +5493,7 @@ for (;;)
case PT_ALNUM:
for (i = min; i < max; i++)
{
+ int category;
int len = 1;
if (eptr >= md->end_subject)
{
@@ -4841,9 +5501,8 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_L || prop_category == ucp_N)
- == prop_fail_result)
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
break;
eptr+= len;
}
@@ -4859,8 +5518,7 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
c == CHAR_FF || c == CHAR_CR)
== prop_fail_result)
break;
@@ -4878,8 +5536,7 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
c == CHAR_VT || c == CHAR_FF || c == CHAR_CR)
== prop_fail_result)
break;
@@ -4890,6 +5547,7 @@ for (;;)
case PT_WORD:
for (i = min; i < max; i++)
{
+ int category;
int len = 1;
if (eptr >= md->end_subject)
{
@@ -4897,8 +5555,8 @@ for (;;)
break;
}
GETCHARLENTEST(c, eptr, len);
- prop_category = UCD_CATEGORY(c);
- if ((prop_category == ucp_L || prop_category == ucp_N ||
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N ||
c == CHAR_UNDERSCORE) == prop_fail_result)
break;
eptr+= len;
@@ -4914,10 +5572,10 @@ for (;;)
if (possessive) continue;
for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM44);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM44);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
- if (utf8) BACKCHAR(eptr);
+ if (utf) BACKCHAR(eptr);
}
}
@@ -4928,25 +5586,23 @@ for (;;)
{
for (i = min; i < max; i++)
{
+ int len = 1;
if (eptr >= md->end_subject)
{
SCHECK_PARTIAL();
break;
}
- GETCHARINCTEST(c, eptr);
- prop_category = UCD_CATEGORY(c);
- if (prop_category == ucp_M) break;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ if (UCD_CATEGORY(c) == ucp_M) break;
+ eptr += len;
while (eptr < md->end_subject)
{
- int len = 1;
- if (!utf8) c = *eptr; else
- {
- GETCHARLEN(c, eptr, len);
- }
- prop_category = UCD_CATEGORY(c);
- if (prop_category != ucp_M) break;
+ len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ if (UCD_CATEGORY(c) != ucp_M) break;
eptr += len;
}
+ CHECK_PARTIAL();
}
/* eptr is now past the end of the maximum run */
@@ -4955,19 +5611,17 @@ for (;;)
for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM45);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM45);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
for (;;) /* Move back over one extended */
{
- int len = 1;
- if (!utf8) c = *eptr; else
+ if (!utf) c = *eptr; else
{
BACKCHAR(eptr);
- GETCHARLEN(c, eptr, len);
+ GETCHAR(c, eptr);
}
- prop_category = UCD_CATEGORY(c);
- if (prop_category != ucp_M) break;
+ if (UCD_CATEGORY(c) != ucp_M) break;
eptr--;
}
}
@@ -4976,10 +5630,8 @@ for (;;)
else
#endif /* SUPPORT_UCP */
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
-
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
switch(ctype)
{
@@ -4994,8 +5646,17 @@ for (;;)
break;
}
if (IS_NEWLINE(eptr)) break;
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
}
@@ -5011,8 +5672,17 @@ for (;;)
break;
}
if (IS_NEWLINE(eptr)) break;
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
}
break;
@@ -5028,10 +5698,14 @@ for (;;)
break;
}
eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
}
- else eptr = md->end_subject; /* Unlimited UTF-8 repeat */
+ else
+ {
+ eptr = md->end_subject; /* Unlimited UTF-8 repeat */
+ SCHECK_PARTIAL();
+ }
break;
/* The byte case is the same as non-UTF8 */
@@ -5239,21 +5913,26 @@ for (;;)
RRETURN(PCRE_ERROR_INTERNAL);
}
- /* eptr is now past the end of the maximum run */
+ /* eptr is now past the end of the maximum run. If possessive, we are
+ done (no backing up). Otherwise, match at this position; anything other
+ than no match is immediately returned. For nomatch, back up one
+ character, unless we are matching \R and the last thing matched was
+ \r\n, in which case, back up two bytes. */
if (possessive) continue;
for(;;)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM46);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM46);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr);
+ if (ctype == OP_ANYNL && eptr > pp && *eptr == '\n' &&
+ eptr[-1] == '\r') eptr--;
}
}
else
-#endif /* SUPPORT_UTF8 */
-
- /* Not UTF-8 mode */
+#endif /* SUPPORT_UTF */
+ /* Not UTF mode */
{
switch(ctype)
{
@@ -5266,6 +5945,15 @@ for (;;)
break;
}
if (IS_NEWLINE(eptr)) break;
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
eptr++;
}
break;
@@ -5297,10 +5985,12 @@ for (;;)
}
else
{
- if (c != 0x000a &&
- (md->bsr_anycrlf ||
- (c != 0x000b && c != 0x000c && c != 0x0085)))
- break;
+ if (c != 0x000a && (md->bsr_anycrlf ||
+ (c != 0x000b && c != 0x000c && c != 0x0085
+#ifdef COMPILE_PCRE16
+ && c != 0x2028 && c != 0x2029
+#endif
+ ))) break;
eptr++;
}
}
@@ -5315,7 +6005,12 @@ for (;;)
break;
}
c = *eptr;
- if (c == 0x09 || c == 0x20 || c == 0xa0) break;
+ if (c == 0x09 || c == 0x20 || c == 0xa0
+#ifdef COMPILE_PCRE16
+ || c == 0x1680 || c == 0x180e || (c >= 0x2000 && c <= 0x200A)
+ || c == 0x202f || c == 0x205f || c == 0x3000
+#endif
+ ) break;
eptr++;
}
break;
@@ -5329,7 +6024,12 @@ for (;;)
break;
}
c = *eptr;
- if (c != 0x09 && c != 0x20 && c != 0xa0) break;
+ if (c != 0x09 && c != 0x20 && c != 0xa0
+#ifdef COMPILE_PCRE16
+ && c != 0x1680 && c != 0x180e && (c < 0x2000 || c > 0x200A)
+ && c != 0x202f && c != 0x205f && c != 0x3000
+#endif
+ ) break;
eptr++;
}
break;
@@ -5343,8 +6043,11 @@ for (;;)
break;
}
c = *eptr;
- if (c == 0x0a || c == 0x0b || c == 0x0c || c == 0x0d || c == 0x85)
- break;
+ if (c == 0x0a || c == 0x0b || c == 0x0c || c == 0x0d || c == 0x85
+#ifdef COMPILE_PCRE16
+ || c == 0x2028 || c == 0x2029
+#endif
+ ) break;
eptr++;
}
break;
@@ -5358,8 +6061,11 @@ for (;;)
break;
}
c = *eptr;
- if (c != 0x0a && c != 0x0b && c != 0x0c && c != 0x0d && c != 0x85)
- break;
+ if (c != 0x0a && c != 0x0b && c != 0x0c && c != 0x0d && c != 0x85
+#ifdef COMPILE_PCRE16
+ && c != 0x2028 && c != 0x2029
+#endif
+ ) break;
eptr++;
}
break;
@@ -5372,7 +6078,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if ((md->ctypes[*eptr] & ctype_digit) != 0) break;
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0) break;
eptr++;
}
break;
@@ -5385,7 +6091,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if ((md->ctypes[*eptr] & ctype_digit) == 0) break;
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0) break;
eptr++;
}
break;
@@ -5398,7 +6104,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if ((md->ctypes[*eptr] & ctype_space) != 0) break;
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0) break;
eptr++;
}
break;
@@ -5411,7 +6117,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if ((md->ctypes[*eptr] & ctype_space) == 0) break;
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0) break;
eptr++;
}
break;
@@ -5424,7 +6130,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if ((md->ctypes[*eptr] & ctype_word) != 0) break;
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0) break;
eptr++;
}
break;
@@ -5437,7 +6143,7 @@ for (;;)
SCHECK_PARTIAL();
break;
}
- if ((md->ctypes[*eptr] & ctype_word) == 0) break;
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0) break;
eptr++;
}
break;
@@ -5446,20 +6152,26 @@ for (;;)
RRETURN(PCRE_ERROR_INTERNAL);
}
- /* eptr is now past the end of the maximum run */
+ /* eptr is now past the end of the maximum run. If possessive, we are
+ done (no backing up). Otherwise, match at this position; anything other
+ than no match is immediately returned. For nomatch, back up one
+ character (byte), unless we are matching \R and the last thing matched
+ was \r\n, in which case, back up two bytes. */
if (possessive) continue;
while (eptr >= pp)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM47);
- eptr--;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM47);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ if (ctype == OP_ANYNL && eptr > pp && *eptr == '\n' &&
+ eptr[-1] == '\r') eptr--;
}
}
/* Get here if we can't make it match with any permitted repetitions */
- MRRETURN(MATCH_NOMATCH);
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
@@ -5492,17 +6204,25 @@ switch (frame->Xwhere)
LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17)
LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33)
LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52)
- LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58)
-#ifdef SUPPORT_UTF8
- LBL(16) LBL(18) LBL(20) LBL(21) LBL(22) LBL(23) LBL(28) LBL(30)
+ LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64)
+ LBL(65) LBL(66)
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ LBL(21)
+#endif
+#ifdef SUPPORT_UTF
+ LBL(16) LBL(18) LBL(20)
+ LBL(22) LBL(23) LBL(28) LBL(30)
LBL(32) LBL(34) LBL(42) LBL(46)
#ifdef SUPPORT_UCP
LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45)
LBL(59) LBL(60) LBL(61) LBL(62)
#endif /* SUPPORT_UCP */
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
default:
DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
+
+printf("+++jump error in pcre match: label %d non-existent\n", frame->Xwhere);
+
return PCRE_ERROR_INTERNAL;
}
#undef LBL
@@ -5521,7 +6241,6 @@ Undefine all the macros that were defined above to handle this. */
#undef ecode
#undef mstart
#undef offset_top
-#undef ims
#undef eptrb
#undef flags
@@ -5539,8 +6258,6 @@ Undefine all the macros that were defined above to handle this. */
#undef condition
#undef prev_is_word
-#undef original_ims
-
#undef ctype
#undef length
#undef max
@@ -5567,6 +6284,31 @@ Undefine all the macros that were defined above to handle this. */
***************************************************************************/
+#ifdef NO_RECURSE
+/*************************************************
+* Release allocated heap frames *
+*************************************************/
+
+/* This function releases all the allocated frames. The base frame is on the
+machine stack, and so must not be freed.
+
+Argument: the address of the base frame
+Returns: nothing
+*/
+
+static void
+release_match_heapframes (heapframe *frame_base)
+{
+heapframe *nextframe = frame_base->Xnextframe;
+while (nextframe != NULL)
+ {
+ heapframe *oldframe = nextframe;
+ nextframe = nextframe->Xnextframe;
+ (PUBL(stack_free))(oldframe);
+ }
+}
+#endif
+
/*************************************************
* Execute a Regular Expression *
@@ -5592,52 +6334,150 @@ Returns: > 0 => success; value is the number of elements filled in
< -1 => some kind of unexpected problem
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
PCRE_SPTR subject, int length, int start_offset, int options, int *offsets,
int offsetcount)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
+ PCRE_SPTR16 subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount)
+#endif
{
-int rc, resetcount, ocount;
-int first_byte = -1;
-int req_byte = -1;
-int req_byte2 = -1;
+int rc, ocount, arg_offset_max;
int newline;
-unsigned long int ims;
BOOL using_temporary_offsets = FALSE;
BOOL anchored;
BOOL startline;
BOOL firstline;
-BOOL first_byte_caseless = FALSE;
-BOOL req_byte_caseless = FALSE;
-BOOL utf8;
+BOOL utf;
+BOOL has_first_char = FALSE;
+BOOL has_req_char = FALSE;
+pcre_uchar first_char = 0;
+pcre_uchar first_char2 = 0;
+pcre_uchar req_char = 0;
+pcre_uchar req_char2 = 0;
match_data match_block;
match_data *md = &match_block;
-const uschar *tables;
-const uschar *start_bits = NULL;
-USPTR start_match = (USPTR)subject + start_offset;
-USPTR end_subject;
-USPTR start_partial = NULL;
-USPTR req_byte_ptr = start_match - 1;
-
-pcre_study_data internal_study;
+const pcre_uint8 *tables;
+const pcre_uint8 *start_bits = NULL;
+PCRE_PUCHAR start_match = (PCRE_PUCHAR)subject + start_offset;
+PCRE_PUCHAR end_subject;
+PCRE_PUCHAR start_partial = NULL;
+PCRE_PUCHAR req_char_ptr = start_match - 1;
+
const pcre_study_data *study;
+const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
+
+#ifdef NO_RECURSE
+heapframe frame_zero;
+frame_zero.Xprevframe = NULL; /* Marks the top level */
+frame_zero.Xnextframe = NULL; /* None are allocated yet */
+md->match_frames_base = &frame_zero;
+#endif
-real_pcre internal_re;
-const real_pcre *external_re = (const real_pcre *)argument_re;
-const real_pcre *re = external_re;
+/* Check for the special magic call that measures the size of the stack used
+per recursive call of match(). Without the funny casting for sizeof, a Windows
+compiler gave this error: "unary minus operator applied to unsigned type,
+result still unsigned". Hopefully the cast fixes that. */
+
+if (re == NULL && extra_data == NULL && subject == NULL && length == -999 &&
+ start_offset == -999)
+#ifdef NO_RECURSE
+ return -((int)sizeof(heapframe));
+#else
+ return match(NULL, NULL, NULL, 0, NULL, NULL, 0);
+#endif
/* Plausibility checks */
if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;
-if (re == NULL || subject == NULL ||
- (offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL;
+if (re == NULL || subject == NULL || (offsets == NULL && offsetcount > 0))
+ return PCRE_ERROR_NULL;
if (offsetcount < 0) return PCRE_ERROR_BADCOUNT;
if (start_offset < 0 || start_offset > length) return PCRE_ERROR_BADOFFSET;
-/* This information is for finding all the numbers associated with a given
-name, for condition testing. */
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
+REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
+means that the pattern is likely compiled with different endianness. */
+
+if (re->magic_number != MAGIC_NUMBER)
+ return re->magic_number == REVERSED_MAGIC_NUMBER?
+ PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
+
+/* These two settings are used in the code for checking a UTF-8 string that
+follows immediately afterwards. Other values in the md block are used only
+during "normal" pcre_exec() processing, not when the JIT support is in use,
+so they are set up later. */
+
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+utf = md->utf = (re->options & PCRE_UTF8) != 0;
+md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 :
+ ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0;
+
+/* Check a UTF-8 string if required. Pass back the character offset and error
+code for an invalid string if a results vector is available. */
+
+#ifdef SUPPORT_UTF
+if (utf && (options & PCRE_NO_UTF8_CHECK) == 0)
+ {
+ int erroroffset;
+ int errorcode = PRIV(valid_utf)((PCRE_PUCHAR)subject, length, &erroroffset);
+ if (errorcode != 0)
+ {
+ if (offsetcount >= 2)
+ {
+ offsets[0] = erroroffset;
+ offsets[1] = errorcode;
+ }
+#ifdef COMPILE_PCRE16
+ return (errorcode <= PCRE_UTF16_ERR1 && md->partial > 1)?
+ PCRE_ERROR_SHORTUTF16 : PCRE_ERROR_BADUTF16;
+#else
+ return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)?
+ PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
+#endif
+ }
-md->name_table = (uschar *)re + re->name_table_offset;
+ /* Check that a start_offset points to the start of a UTF character. */
+ if (start_offset > 0 && start_offset < length &&
+ NOT_FIRSTCHAR(((PCRE_PUCHAR)subject)[start_offset]))
+ return PCRE_ERROR_BADUTF8_OFFSET;
+ }
+#endif
+
+/* If the pattern was successfully studied with JIT support, run the JIT
+executable instead of the rest of this function. Most options must be set at
+compile time for the JIT code to be usable. Fallback to the normal code path if
+an unsupported flag is set. */
+
+#ifdef SUPPORT_JIT
+if (extra_data != NULL
+ && (extra_data->flags & (PCRE_EXTRA_EXECUTABLE_JIT |
+ PCRE_EXTRA_TABLES)) == PCRE_EXTRA_EXECUTABLE_JIT
+ && extra_data->executable_jit != NULL
+ && (options & ~(PCRE_NO_UTF8_CHECK | PCRE_NOTBOL | PCRE_NOTEOL |
+ PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART |
+ PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD)) == 0)
+ {
+ rc = PRIV(jit_exec)(re, extra_data, (const pcre_uchar *)subject, length,
+ start_offset, options, offsets, offsetcount);
+
+ /* PCRE_ERROR_NULL means that the selected normal or partial matching
+ mode is not compiled. In this case we simply fallback to interpreter. */
+
+ if (rc != PCRE_ERROR_NULL) return rc;
+ }
+#endif
+
+/* Carry on with non-JIT matching. This information is for finding all the
+numbers associated with a given name, for condition testing. */
+
+md->name_table = (pcre_uchar *)re + re->name_table_offset;
md->name_count = re->name_count;
md->name_entry_size = re->name_entry_size;
@@ -5651,7 +6491,7 @@ md->callout_data = NULL;
/* The table pointer is always in native byte order. */
-tables = external_re->tables;
+tables = re->tables;
if (extra_data != NULL)
{
@@ -5671,19 +6511,7 @@ if (extra_data != NULL)
is a feature that makes it possible to save compiled regex and re-use them
in other programs later. */
-if (tables == NULL) tables = _pcre_default_tables;
-
-/* Check that the first field in the block is the magic number. If it is not,
-test for a regex that was compiled on a host of opposite endianness. If this is
-the case, flipped values are put in internal_re and internal_study if there was
-study data too. */
-
-if (re->magic_number != MAGIC_NUMBER)
- {
- re = _pcre_try_flipped(re, &internal_re, study, &internal_study);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- if (study != NULL) study = &internal_study;
- }
+if (tables == NULL) tables = PRIV(default_tables);
/* Set up other data */
@@ -5693,31 +6521,35 @@ firstline = (re->options & PCRE_FIRSTLINE) != 0;
/* The code starts after the real_pcre block and the capture name table. */
-md->start_code = (const uschar *)external_re + re->name_table_offset +
+md->start_code = (const pcre_uchar *)re + re->name_table_offset +
re->name_count * re->name_entry_size;
-md->start_subject = (USPTR)subject;
+md->start_subject = (PCRE_PUCHAR)subject;
md->start_offset = start_offset;
md->end_subject = md->start_subject + length;
end_subject = md->end_subject;
md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
-utf8 = md->utf8 = (re->options & PCRE_UTF8) != 0;
md->use_ucp = (re->options & PCRE_UCP) != 0;
md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
+md->ignore_skip_arg = FALSE;
+
+/* Some options are unpacked into BOOL variables in the hope that testing
+them will be faster than individual option bits. */
md->notbol = (options & PCRE_NOTBOL) != 0;
md->noteol = (options & PCRE_NOTEOL) != 0;
md->notempty = (options & PCRE_NOTEMPTY) != 0;
md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
-md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 :
- ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0;
+
md->hitend = FALSE;
-md->mark = NULL; /* In case never set */
+md->mark = md->nomatch_mark = NULL; /* In case never set */
md->recursive = NULL; /* No recursion at top level */
+md->hasthen = (re->flags & PCRE_HASTHEN) != 0;
md->lcc = tables + lcc_offset;
+md->fcc = tables + fcc_offset;
md->ctypes = tables + ctypes_offset;
/* Handle different \R options. */
@@ -5793,41 +6625,18 @@ defined (though never set). So there's no harm in leaving this code. */
if (md->partial && (re->flags & PCRE_NOPARTIAL) != 0)
return PCRE_ERROR_BADPARTIAL;
-/* Check a UTF-8 string if required. Unfortunately there's no way of passing
-back the character offset. */
-
-#ifdef SUPPORT_UTF8
-if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
- {
- int tb;
- if ((tb = _pcre_valid_utf8((USPTR)subject, length)) >= 0)
- return (tb == length && md->partial > 1)?
- PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
- if (start_offset > 0 && start_offset < length)
- {
- tb = ((USPTR)subject)[start_offset] & 0xc0;
- if (tb == 0x80) return PCRE_ERROR_BADUTF8_OFFSET;
- }
- }
-#endif
-
-/* The ims options can vary during the matching as a result of the presence
-of (?ims) items in the pattern. They are kept in a local variable so that
-restoring at the exit of a group is easy. */
-
-ims = re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL);
-
/* If the expression has got more back references than the offsets supplied can
hold, we get a temporary chunk of working store to use during the matching.
Otherwise, we can use the vector supplied, rounding down its size to a multiple
of 3. */
ocount = offsetcount - (offsetcount % 3);
+arg_offset_max = (2*ocount)/3;
if (re->top_backref > 0 && re->top_backref >= ocount/3)
{
ocount = re->top_backref * 3 + 3;
- md->offset_vector = (int *)(pcre_malloc)(ocount * sizeof(int));
+ md->offset_vector = (int *)(PUBL(malloc))(ocount * sizeof(int));
if (md->offset_vector == NULL) return PCRE_ERROR_NOMEMORY;
using_temporary_offsets = TRUE;
DPRINTF(("Got memory to hold back references\n"));
@@ -5839,25 +6648,22 @@ md->offset_max = (2*ocount)/3;
md->offset_overflow = FALSE;
md->capture_last = -1;
-/* Compute the minimum number of offsets that we need to reset each time. Doing
-this makes a huge difference to execution time when there aren't many brackets
-in the pattern. */
-
-resetcount = 2 + re->top_bracket * 2;
-if (resetcount > offsetcount) resetcount = ocount;
-
/* Reset the working variable associated with each extraction. These should
never be used unless previously set, but they get saved and restored, and so we
-initialize them to avoid reading uninitialized locations. */
+initialize them to avoid reading uninitialized locations. Also, unset the
+offsets for the matched string. This is really just for tidiness with callouts,
+in case they inspect these fields. */
if (md->offset_vector != NULL)
{
register int *iptr = md->offset_vector + ocount;
- register int *iend = iptr - resetcount/2 + 1;
+ register int *iend = iptr - re->top_bracket;
+ if (iend < md->offset_vector + 2) iend = md->offset_vector + 2;
while (--iptr >= iend) *iptr = -1;
+ md->offset_vector[0] = md->offset_vector[1] = -1;
}
-/* Set up the first character to match, if available. The first_byte value is
+/* Set up the first character to match, if available. The first_char value is
never set for an anchored regular expression, but the anchoring may be forced
at run time, so we have to test for anchoring. The first char may be unset for
an unanchored pattern, of course. If there's no first char and the pattern was
@@ -5867,9 +6673,16 @@ if (!anchored)
{
if ((re->flags & PCRE_FIRSTSET) != 0)
{
- first_byte = re->first_byte & 255;
- if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE)
- first_byte = md->lcc[first_byte];
+ has_first_char = TRUE;
+ first_char = first_char2 = (pcre_uchar)(re->first_char);
+ if ((re->flags & PCRE_FCH_CASELESS) != 0)
+ {
+ first_char2 = TABLE_GET(first_char, md->fcc, first_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (utf && first_char > 127)
+ first_char2 = UCD_OTHERCASE(first_char);
+#endif
+ }
}
else
if (!startline && study != NULL &&
@@ -5882,9 +6695,16 @@ character" set. */
if ((re->flags & PCRE_REQCHSET) != 0)
{
- req_byte = re->req_byte & 255;
- req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0;
- req_byte2 = (tables + fcc_offset)[req_byte]; /* case flipped */
+ has_req_char = TRUE;
+ req_char = req_char2 = (pcre_uchar)(re->req_char);
+ if ((re->flags & PCRE_RCH_CASELESS) != 0)
+ {
+ req_char2 = TABLE_GET(req_char, md->fcc, req_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (utf && req_char > 127)
+ req_char2 = UCD_OTHERCASE(req_char);
+#endif
+ }
}
@@ -5895,17 +6715,8 @@ the loop runs just once. */
for(;;)
{
- USPTR save_end_subject = end_subject;
- USPTR new_start_match;
-
- /* Reset the maximum number of extractions we might see. */
-
- if (md->offset_vector != NULL)
- {
- register int *iptr = md->offset_vector;
- register int *iend = iptr + resetcount;
- while (iptr < iend) *iptr++ = -1;
- }
+ PCRE_PUCHAR save_end_subject = end_subject;
+ PCRE_PUCHAR new_start_match;
/* If firstline is TRUE, the start of the match is constrained to the first
line of a multiline string. That is, the match must be before or at the first
@@ -5915,14 +6726,14 @@ for(;;)
if (firstline)
{
- USPTR t = start_match;
-#ifdef SUPPORT_UTF8
- if (utf8)
+ PCRE_PUCHAR t = start_match;
+#ifdef SUPPORT_UTF
+ if (utf)
{
while (t < md->end_subject && !IS_NEWLINE(t))
{
t++;
- while (t < end_subject && (*t & 0xc0) == 0x80) t++;
+ ACROSSCHAR(t < end_subject, *t, t++);
}
}
else
@@ -5939,15 +6750,16 @@ for(;;)
if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0)
{
- /* Advance to a unique first byte if there is one. */
+ /* Advance to a unique first char if there is one. */
- if (first_byte >= 0)
+ if (has_first_char)
{
- if (first_byte_caseless)
- while (start_match < end_subject && md->lcc[*start_match] != first_byte)
+ if (first_char != first_char2)
+ while (start_match < end_subject &&
+ *start_match != first_char && *start_match != first_char2)
start_match++;
else
- while (start_match < end_subject && *start_match != first_byte)
+ while (start_match < end_subject && *start_match != first_char)
start_match++;
}
@@ -5957,14 +6769,14 @@ for(;;)
{
if (start_match > md->start_subject + start_offset)
{
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
while (start_match < end_subject && !WAS_NEWLINE(start_match))
{
start_match++;
- while(start_match < end_subject && (*start_match & 0xc0) == 0x80)
- start_match++;
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
}
}
else
@@ -5991,13 +6803,18 @@ for(;;)
while (start_match < end_subject)
{
register unsigned int c = *start_match;
+#ifndef COMPILE_PCRE8
+ if (c > 255) c = 255;
+#endif
if ((start_bits[c/8] & (1 << (c&7))) == 0)
{
start_match++;
-#ifdef SUPPORT_UTF8
- if (utf8)
- while(start_match < end_subject && (*start_match & 0xc0) == 0x80)
- start_match++;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ /* In non 8-bit mode, the iteration will stop for
+ characters > 255 at the beginning or not stop at all. */
+ if (utf)
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
#endif
}
else break;
@@ -6012,7 +6829,7 @@ for(;;)
/* The following two optimizations are disabled for partial matching or if
disabling is explicitly requested. */
- if ((options & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial)
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial)
{
/* If the pattern was studied, a minimum subject length may be set. This is
a lower bound; no actual string of that length may actually match the
@@ -6026,8 +6843,8 @@ for(;;)
break;
}
- /* If req_byte is set, we know that that character must appear in the
- subject for the match to succeed. If the first character is set, req_byte
+ /* If req_char is set, we know that that character must appear in the
+ subject for the match to succeed. If the first character is set, req_char
must be later in the subject; otherwise the test starts at the match point.
This optimization can save a huge amount of backtracking in patterns with
nested unlimited repeats that aren't going to match. Writing separate code
@@ -6040,28 +6857,28 @@ for(;;)
32-megabyte string... so we don't do this when the string is sufficiently
long. */
- if (req_byte >= 0 && end_subject - start_match < REQ_BYTE_MAX)
+ if (has_req_char && end_subject - start_match < REQ_BYTE_MAX)
{
- register USPTR p = start_match + ((first_byte >= 0)? 1 : 0);
+ register PCRE_PUCHAR p = start_match + (has_first_char? 1:0);
/* We don't need to repeat the search if we haven't yet reached the
place we found it at last time. */
- if (p > req_byte_ptr)
+ if (p > req_char_ptr)
{
- if (req_byte_caseless)
+ if (req_char != req_char2)
{
while (p < end_subject)
{
register int pp = *p++;
- if (pp == req_byte || pp == req_byte2) { p--; break; }
+ if (pp == req_char || pp == req_char2) { p--; break; }
}
}
else
{
while (p < end_subject)
{
- if (*p++ == req_byte) { p--; break; }
+ if (*p++ == req_char) { p--; break; }
}
}
@@ -6078,7 +6895,7 @@ for(;;)
found it, so that we don't search again next time round the loop if
the start hasn't passed this character yet. */
- req_byte_ptr = p;
+ req_char_ptr = p;
}
}
}
@@ -6095,12 +6912,25 @@ for(;;)
md->start_match_ptr = start_match;
md->start_used_ptr = start_match;
md->match_call_count = 0;
- rc = match(start_match, md->start_code, start_match, NULL, 2, md, ims, NULL,
- 0, 0);
+ md->match_function_type = 0;
+ md->end_offset_top = 0;
+ rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0);
if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr;
switch(rc)
{
+ /* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched
+ the SKIP's arg was not found. In this circumstance, Perl ignores the SKIP
+ entirely. The only way we can do that is to re-do the match at the same
+ point, with a flag to force SKIP with an argument to be ignored. Just
+ treating this case as NOMATCH does not work because it does not check other
+ alternatives in patterns such as A(*SKIP:A)B|AC when the subject is AC. */
+
+ case MATCH_SKIP_ARG:
+ new_start_match = start_match;
+ md->ignore_skip_arg = TRUE;
+ break;
+
/* SKIP passes back the next starting point explicitly, but if it is the
same as the match we have just done, treat it as NOMATCH. */
@@ -6112,23 +6942,18 @@ for(;;)
}
/* Fall through */
- /* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched
- the SKIP's arg was not found. We also treat this as NOMATCH. */
-
- case MATCH_SKIP_ARG:
- /* Fall through */
-
/* NOMATCH and PRUNE advance by one character. THEN at this level acts
- exactly like PRUNE. */
+ exactly like PRUNE. Unset the ignore SKIP-with-argument flag. */
case MATCH_NOMATCH:
case MATCH_PRUNE:
case MATCH_THEN:
+ md->ignore_skip_arg = FALSE;
new_start_match = start_match + 1;
-#ifdef SUPPORT_UTF8
- if (utf8)
- while(new_start_match < end_subject && (*new_start_match & 0xc0) == 0x80)
- new_start_match++;
+#ifdef SUPPORT_UTF
+ if (utf)
+ ACROSSCHAR(new_start_match < end_subject, *new_start_match,
+ new_start_match++);
#endif
break;
@@ -6166,9 +6991,13 @@ for(;;)
/* If we have just passed a CR and we are now at a LF, and the pattern does
not contain any explicit matches for \r or \n, and the newline option is CRLF
- or ANY or ANYCRLF, advance the match position by one more character. */
+ or ANY or ANYCRLF, advance the match position by one more character. In
+ normal matching start_match will aways be greater than the first position at
+ this stage, but a failed *SKIP can cause a return at the same point, which is
+ why the first test exists. */
- if (start_match[-1] == CHAR_CR &&
+ if (start_match > (PCRE_PUCHAR)subject + start_offset &&
+ start_match[-1] == CHAR_CR &&
start_match < end_subject &&
*start_match == CHAR_NL &&
(re->flags & PCRE_HASCRORLF) == 0 &&
@@ -6206,21 +7035,41 @@ if (rc == MATCH_MATCH || rc == MATCH_ACCEPT)
{
if (using_temporary_offsets)
{
- if (offsetcount >= 4)
+ if (arg_offset_max >= 4)
{
memcpy(offsets + 2, md->offset_vector + 2,
- (offsetcount - 2) * sizeof(int));
+ (arg_offset_max - 2) * sizeof(int));
DPRINTF(("Copied offsets from temporary memory\n"));
}
- if (md->end_offset_top > offsetcount) md->offset_overflow = TRUE;
+ if (md->end_offset_top > arg_offset_max) md->offset_overflow = TRUE;
DPRINTF(("Freeing temporary memory\n"));
- (pcre_free)(md->offset_vector);
+ (PUBL(free))(md->offset_vector);
}
- /* Set the return code to the number of captured strings, or 0 if there are
+ /* Set the return code to the number of captured strings, or 0 if there were
too many to fit into the vector. */
- rc = md->offset_overflow? 0 : md->end_offset_top/2;
+ rc = (md->offset_overflow && md->end_offset_top >= arg_offset_max)?
+ 0 : md->end_offset_top/2;
+
+ /* If there is space in the offset vector, set any unused pairs at the end of
+ the pattern to -1 for backwards compatibility. It is documented that this
+ happens. In earlier versions, the whole set of potential capturing offsets
+ was set to -1 each time round the loop, but this is handled differently now.
+ "Gaps" are set to -1 dynamically instead (this fixes a bug). Thus, it is only
+ those at the end that need unsetting here. We can't just unset them all at
+ the start of the whole thing because they may get set in one branch that is
+ not the final matching branch. */
+
+ if (md->end_offset_top/2 <= re->top_bracket && offsets != NULL)
+ {
+ register int *iptr, *iend;
+ int resetcount = 2 + re->top_bracket * 2;
+ if (resetcount > offsetcount) resetcount = offsetcount;
+ iptr = offsets + md->end_offset_top;
+ iend = offsets + resetcount;
+ while (iptr < iend) *iptr++ = -1;
+ }
/* If there is space, set up the whole thing as substring 0. The value of
md->start_match_ptr might be modified if \K was encountered on the success
@@ -6232,8 +7081,15 @@ if (rc == MATCH_MATCH || rc == MATCH_ACCEPT)
offsets[1] = (int)(md->end_match_ptr - md->start_subject);
}
+ /* Return MARK data if requested */
+
+ if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0)
+ *(extra_data->mark) = (pcre_uchar *)md->mark;
DPRINTF((">>>> returning %d\n", rc));
- goto RETURN_MARK;
+#ifdef NO_RECURSE
+ release_match_heapframes(&frame_zero);
+#endif
+ return rc;
}
/* Control gets here if there has been an error, or if the overall match
@@ -6242,7 +7098,7 @@ attempt has failed at all permitted starting positions. */
if (using_temporary_offsets)
{
DPRINTF(("Freeing temporary memory\n"));
- (pcre_free)(md->offset_vector);
+ (PUBL(free))(md->offset_vector);
}
/* For anything other than nomatch or partial match, just return the code. */
@@ -6250,6 +7106,9 @@ if (using_temporary_offsets)
if (rc != MATCH_NOMATCH && rc != PCRE_ERROR_PARTIAL)
{
DPRINTF((">>>> error: returning %d\n", rc));
+#ifdef NO_RECURSE
+ release_match_heapframes(&frame_zero);
+#endif
return rc;
}
@@ -6261,8 +7120,8 @@ if (start_partial != NULL)
md->mark = NULL;
if (offsetcount > 1)
{
- offsets[0] = (int)(start_partial - (USPTR)subject);
- offsets[1] = (int)(end_subject - (USPTR)subject);
+ offsets[0] = (int)(start_partial - (PCRE_PUCHAR)subject);
+ offsets[1] = (int)(end_subject - (PCRE_PUCHAR)subject);
}
rc = PCRE_ERROR_PARTIAL;
}
@@ -6277,10 +7136,11 @@ else
/* Return the MARK data if it has been requested. */
-RETURN_MARK:
-
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0)
- *(extra_data->mark) = (unsigned char *)(md->mark);
+ *(extra_data->mark) = (pcre_uchar *)md->nomatch_mark;
+#ifdef NO_RECURSE
+ release_match_heapframes(&frame_zero);
+#endif
return rc;
}
diff --git a/ext/pcre/pcrelib/pcre_fullinfo.c b/ext/pcre/pcrelib/pcre_fullinfo.c
index 6725ad7ba..2fe785a13 100644
--- a/ext/pcre/pcrelib/pcre_fullinfo.c
+++ b/ext/pcre/pcrelib/pcre_fullinfo.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -63,13 +63,17 @@ Arguments:
Returns: 0 if data returned, negative on error
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
- void *where)
+pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data,
+ int what, void *where)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_fullinfo(const pcre16 *argument_re, const pcre16_extra *extra_data,
+ int what, void *where)
+#endif
{
-real_pcre internal_re;
-pcre_study_data internal_study;
-const real_pcre *re = (const real_pcre *)argument_re;
+const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
const pcre_study_data *study = NULL;
if (re == NULL || where == NULL) return PCRE_ERROR_NULL;
@@ -77,12 +81,18 @@ if (re == NULL || where == NULL) return PCRE_ERROR_NULL;
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
study = (const pcre_study_data *)extra_data->study_data;
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
+REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
+means that the pattern is likely compiled with different endianness. */
+
if (re->magic_number != MAGIC_NUMBER)
- {
- re = _pcre_try_flipped(re, &internal_re, study, &internal_study);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- if (study != NULL) study = &internal_study;
- }
+ return re->magic_number == REVERSED_MAGIC_NUMBER?
+ PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
+
+/* Check that this pattern was compiled in the correct bit mode */
+
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
switch (what)
{
@@ -98,6 +108,18 @@ switch (what)
*((size_t *)where) = (study == NULL)? 0 : study->size;
break;
+ case PCRE_INFO_JITSIZE:
+#ifdef SUPPORT_JIT
+ *((size_t *)where) =
+ (extra_data != NULL &&
+ (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra_data->executable_jit != NULL)?
+ PRIV(jit_get_size)(extra_data->executable_jit) : 0;
+#else
+ *((size_t *)where) = 0;
+#endif
+ break;
+
case PCRE_INFO_CAPTURECOUNT:
*((int *)where) = re->top_bracket;
break;
@@ -108,7 +130,7 @@ switch (what)
case PCRE_INFO_FIRSTBYTE:
*((int *)where) =
- ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
+ ((re->flags & PCRE_FIRSTSET) != 0)? re->first_char :
((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
break;
@@ -116,7 +138,7 @@ switch (what)
block, not the internal copy (with flipped integer fields). */
case PCRE_INFO_FIRSTTABLE:
- *((const uschar **)where) =
+ *((const pcre_uint8 **)where) =
(study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)?
((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;
break;
@@ -124,12 +146,18 @@ switch (what)
case PCRE_INFO_MINLENGTH:
*((int *)where) =
(study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0)?
- study->minlength : -1;
+ (int)(study->minlength) : -1;
+ break;
+
+ case PCRE_INFO_JIT:
+ *((int *)where) = extra_data != NULL &&
+ (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra_data->executable_jit != NULL;
break;
case PCRE_INFO_LASTLITERAL:
*((int *)where) =
- ((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1;
+ ((re->flags & PCRE_REQCHSET) != 0)? re->req_char : -1;
break;
case PCRE_INFO_NAMEENTRYSIZE:
@@ -141,11 +169,11 @@ switch (what)
break;
case PCRE_INFO_NAMETABLE:
- *((const uschar **)where) = (const uschar *)re + re->name_table_offset;
+ *((const pcre_uchar **)where) = (const pcre_uchar *)re + re->name_table_offset;
break;
case PCRE_INFO_DEFAULT_TABLES:
- *((const uschar **)where) = (const uschar *)(_pcre_default_tables);
+ *((const pcre_uint8 **)where) = (const pcre_uint8 *)(PRIV(default_tables));
break;
/* From release 8.00 this will always return TRUE because NOPARTIAL is
@@ -163,6 +191,10 @@ switch (what)
*((int *)where) = (re->flags & PCRE_HASCRORLF) != 0;
break;
+ case PCRE_INFO_MAXLOOKBEHIND:
+ *((int *)where) = re->max_lookbehind;
+ break;
+
default: return PCRE_ERROR_BADOPTION;
}
diff --git a/ext/pcre/pcrelib/pcre_get.c b/ext/pcre/pcrelib/pcre_get.c
index 92b380882..61147efe8 100644
--- a/ext/pcre/pcrelib/pcre_get.c
+++ b/ext/pcre/pcrelib/pcre_get.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -63,14 +63,20 @@ Returns: the number of the named parentheses, or a negative number
(PCRE_ERROR_NOSUBSTRING) if not found
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_get_stringnumber(const pcre *code, const char *stringname)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_stringnumber(const pcre16 *code, PCRE_SPTR16 stringname)
+#endif
{
int rc;
int entrysize;
int top, bot;
-uschar *nametable;
+pcre_uchar *nametable;
+#ifdef COMPILE_PCRE8
if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
return rc;
if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
@@ -79,14 +85,26 @@ if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
return rc;
if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
return rc;
+#endif
+#ifdef COMPILE_PCRE16
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
bot = 0;
while (top > bot)
{
int mid = (top + bot) / 2;
- uschar *entry = nametable + entrysize*mid;
- int c = strcmp(stringname, (char *)(entry + 2));
- if (c == 0) return (entry[0] << 8) + entry[1];
+ pcre_uchar *entry = nametable + entrysize*mid;
+ int c = STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(entry + IMM2_SIZE));
+ if (c == 0) return GET2(entry, 0);
if (c > 0) bot = mid + 1; else top = mid;
}
@@ -112,15 +130,22 @@ Returns: the length of each entry, or a negative number
(PCRE_ERROR_NOSUBSTRING) if not found
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_get_stringtable_entries(const pcre *code, const char *stringname,
char **firstptr, char **lastptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_stringtable_entries(const pcre16 *code, PCRE_SPTR16 stringname,
+ PCRE_UCHAR16 **firstptr, PCRE_UCHAR16 **lastptr)
+#endif
{
int rc;
int entrysize;
int top, bot;
-uschar *nametable, *lastentry;
+pcre_uchar *nametable, *lastentry;
+#ifdef COMPILE_PCRE8
if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
return rc;
if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
@@ -129,30 +154,49 @@ if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
return rc;
if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
return rc;
+#endif
+#ifdef COMPILE_PCRE16
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
lastentry = nametable + entrysize * (top - 1);
bot = 0;
while (top > bot)
{
int mid = (top + bot) / 2;
- uschar *entry = nametable + entrysize*mid;
- int c = strcmp(stringname, (char *)(entry + 2));
+ pcre_uchar *entry = nametable + entrysize*mid;
+ int c = STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(entry + IMM2_SIZE));
if (c == 0)
{
- uschar *first = entry;
- uschar *last = entry;
+ pcre_uchar *first = entry;
+ pcre_uchar *last = entry;
while (first > nametable)
{
- if (strcmp(stringname, (char *)(first - entrysize + 2)) != 0) break;
+ if (STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(first - entrysize + IMM2_SIZE)) != 0) break;
first -= entrysize;
}
while (last < lastentry)
{
- if (strcmp(stringname, (char *)(last + entrysize + 2)) != 0) break;
+ if (STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(last + entrysize + IMM2_SIZE)) != 0) break;
last += entrysize;
}
+#ifdef COMPILE_PCRE8
*firstptr = (char *)first;
*lastptr = (char *)last;
+#else
+ *firstptr = (PCRE_UCHAR16 *)first;
+ *lastptr = (PCRE_UCHAR16 *)last;
+#endif
return entrysize;
}
if (c > 0) bot = mid + 1; else top = mid;
@@ -180,23 +224,39 @@ Returns: the number of the first that is set,
or a negative number on error
*/
+#ifdef COMPILE_PCRE8
static int
get_first_set(const pcre *code, const char *stringname, int *ovector)
+#else
+static int
+get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
+#endif
{
-const real_pcre *re = (const real_pcre *)code;
+const REAL_PCRE *re = (const REAL_PCRE *)code;
int entrysize;
+pcre_uchar *entry;
+#ifdef COMPILE_PCRE8
char *first, *last;
-uschar *entry;
+#else
+PCRE_UCHAR16 *first, *last;
+#endif
+
+#ifdef COMPILE_PCRE8
if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
return pcre_get_stringnumber(code, stringname);
entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last);
+#else
+if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
+ return pcre16_get_stringnumber(code, stringname);
+entrysize = pcre16_get_stringtable_entries(code, stringname, &first, &last);
+#endif
if (entrysize <= 0) return entrysize;
-for (entry = (uschar *)first; entry <= (uschar *)last; entry += entrysize)
+for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
{
- int n = (entry[0] << 8) + entry[1];
+ int n = GET2(entry, 0);
if (ovector[n*2] >= 0) return n;
}
-return (first[0] << 8) + first[1];
+return GET2(entry, 0);
}
@@ -229,9 +289,15 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_copy_substring(const char *subject, int *ovector, int stringcount,
int stringnumber, char *buffer, int size)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
+ int stringnumber, PCRE_UCHAR16 *buffer, int size)
+#endif
{
int yield;
if (stringnumber < 0 || stringnumber >= stringcount)
@@ -239,7 +305,7 @@ if (stringnumber < 0 || stringnumber >= stringcount)
stringnumber *= 2;
yield = ovector[stringnumber+1] - ovector[stringnumber];
if (size < yield + 1) return PCRE_ERROR_NOMEMORY;
-memcpy(buffer, subject + ovector[stringnumber], yield);
+memcpy(buffer, subject + ovector[stringnumber], IN_UCHARS(yield));
buffer[yield] = 0;
return yield;
}
@@ -274,13 +340,25 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
*/
+#ifdef COMPILE_PCRE8
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_copy_named_substring(const pcre *code, const char *subject,
+ int *ovector, int stringcount, const char *stringname,
+ char *buffer, int size)
+#else
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector,
- int stringcount, const char *stringname, char *buffer, int size)
+pcre16_copy_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
+ int *ovector, int stringcount, PCRE_SPTR16 stringname,
+ PCRE_UCHAR16 *buffer, int size)
+#endif
{
int n = get_first_set(code, stringname, ovector);
if (n <= 0) return n;
+#ifdef COMPILE_PCRE8
return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
+#else
+return pcre16_copy_substring(subject, ovector, stringcount, n, buffer, size);
+#endif
}
@@ -306,29 +384,39 @@ Returns: if successful: 0
PCRE_ERROR_NOMEMORY (-6) failed to get store
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
const char ***listptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_substring_list(PCRE_SPTR16 subject, int *ovector, int stringcount,
+ PCRE_SPTR16 **listptr)
+#endif
{
int i;
-int size = sizeof(char *);
+int size = sizeof(pcre_uchar *);
int double_count = stringcount * 2;
-char **stringlist;
-char *p;
+pcre_uchar **stringlist;
+pcre_uchar *p;
for (i = 0; i < double_count; i += 2)
- size += sizeof(char *) + ovector[i+1] - ovector[i] + 1;
+ size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1);
-stringlist = (char **)(pcre_malloc)(size);
+stringlist = (pcre_uchar **)(PUBL(malloc))(size);
if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
+#ifdef COMPILE_PCRE8
*listptr = (const char **)stringlist;
-p = (char *)(stringlist + stringcount + 1);
+#else
+*listptr = (PCRE_SPTR16 *)stringlist;
+#endif
+p = (pcre_uchar *)(stringlist + stringcount + 1);
for (i = 0; i < double_count; i += 2)
{
int len = ovector[i+1] - ovector[i];
- memcpy(p, subject + ovector[i], len);
+ memcpy(p, subject + ovector[i], IN_UCHARS(len));
*stringlist++ = p;
p += len;
*p++ = 0;
@@ -345,16 +433,22 @@ return 0;
*************************************************/
/* This function exists for the benefit of people calling PCRE from non-C
-programs that can call its functions, but not free() or (pcre_free)() directly.
+programs that can call its functions, but not free() or (PUBL(free))()
+directly.
Argument: the result of a previous pcre_get_substring_list()
Returns: nothing
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
pcre_free_substring_list(const char **pointer)
+#else
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre16_free_substring_list(PCRE_SPTR16 *pointer)
+#endif
{
-(pcre_free)((void *)pointer);
+(PUBL(free))((void *)pointer);
}
@@ -384,21 +478,31 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) substring not present
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_get_substring(const char *subject, int *ovector, int stringcount,
int stringnumber, const char **stringptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
+ int stringnumber, PCRE_SPTR16 *stringptr)
+#endif
{
int yield;
-char *substring;
+pcre_uchar *substring;
if (stringnumber < 0 || stringnumber >= stringcount)
return PCRE_ERROR_NOSUBSTRING;
stringnumber *= 2;
yield = ovector[stringnumber+1] - ovector[stringnumber];
-substring = (char *)(pcre_malloc)(yield + 1);
+substring = (pcre_uchar *)(PUBL(malloc))(IN_UCHARS(yield + 1));
if (substring == NULL) return PCRE_ERROR_NOMEMORY;
-memcpy(substring, subject + ovector[stringnumber], yield);
+memcpy(substring, subject + ovector[stringnumber], IN_UCHARS(yield));
substring[yield] = 0;
-*stringptr = substring;
+#ifdef COMPILE_PCRE8
+*stringptr = (const char *)substring;
+#else
+*stringptr = (PCRE_SPTR16)substring;
+#endif
return yield;
}
@@ -431,13 +535,25 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_get_named_substring(const pcre *code, const char *subject, int *ovector,
- int stringcount, const char *stringname, const char **stringptr)
+pcre_get_named_substring(const pcre *code, const char *subject,
+ int *ovector, int stringcount, const char *stringname,
+ const char **stringptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
+ int *ovector, int stringcount, PCRE_SPTR16 stringname,
+ PCRE_SPTR16 *stringptr)
+#endif
{
int n = get_first_set(code, stringname, ovector);
if (n <= 0) return n;
+#ifdef COMPILE_PCRE8
return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
+#else
+return pcre16_get_substring(subject, ovector, stringcount, n, stringptr);
+#endif
}
@@ -448,16 +564,22 @@ return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
*************************************************/
/* This function exists for the benefit of people calling PCRE from non-C
-programs that can call its functions, but not free() or (pcre_free)() directly.
+programs that can call its functions, but not free() or (PUBL(free))()
+directly.
Argument: the result of a previous pcre_get_substring()
Returns: nothing
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
pcre_free_substring(const char *pointer)
+#else
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre16_free_substring(PCRE_SPTR16 pointer)
+#endif
{
-(pcre_free)((void *)pointer);
+(PUBL(free))((void *)pointer);
}
/* End of pcre_get.c */
diff --git a/ext/pcre/pcrelib/pcre_globals.c b/ext/pcre/pcrelib/pcre_globals.c
index c633e5132..3dde1f6e7 100644
--- a/ext/pcre/pcrelib/pcre_globals.c
+++ b/ext/pcre/pcrelib/pcre_globals.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -65,18 +65,18 @@ static void LocalPcreFree(void* aPtr)
{
free(aPtr);
}
-PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = LocalPcreMalloc;
-PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = LocalPcreFree;
-PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = LocalPcreMalloc;
-PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = LocalPcreFree;
-PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL;
+PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = LocalPcreMalloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = LocalPcreFree;
+PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = LocalPcreMalloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = LocalPcreFree;
+PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL;
#elif !defined VPCOMPAT
-PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc;
-PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free;
-PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc;
-PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = free;
-PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL;
+PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = free;
+PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = free;
+PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL;
#endif
/* End of pcre_globals.c */
diff --git a/ext/pcre/pcrelib/pcre_info.c b/ext/pcre/pcrelib/pcre_info.c
deleted file mode 100644
index e6d435b16..000000000
--- a/ext/pcre/pcrelib/pcre_info.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_info(), which gives some
-information about a compiled pattern. However, use of this function is now
-deprecated, as it has been superseded by pcre_fullinfo(). */
-
-
-#include "config.h"
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-* (Obsolete) Return info about compiled pattern *
-*************************************************/
-
-/* This is the original "info" function. It picks potentially useful data out
-of the private structure, but its interface was too rigid. It remains for
-backwards compatibility. The public options are passed back in an int - though
-the re->options field has been expanded to a long int, all the public options
-at the low end of it, and so even on 16-bit systems this will still be OK.
-Therefore, I haven't changed the API for pcre_info().
-
-Arguments:
- argument_re points to compiled code
- optptr where to pass back the options
- first_byte where to pass back the first character,
- or -1 if multiline and all branches start ^,
- or -2 otherwise
-
-Returns: number of capturing subpatterns
- or negative values on error
-*/
-
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
-{
-real_pcre internal_re;
-const real_pcre *re = (const real_pcre *)argument_re;
-if (re == NULL) return PCRE_ERROR_NULL;
-if (re->magic_number != MAGIC_NUMBER)
- {
- re = _pcre_try_flipped(re, &internal_re, NULL, NULL);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- }
-if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_COMPILE_OPTIONS);
-if (first_byte != NULL)
- *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
- ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
-return re->top_bracket;
-}
-
-/* End of pcre_info.c */
diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h
index 6ec0b7a54..ed16269b3 100644
--- a/ext/pcre/pcrelib/pcre_internal.h
+++ b/ext/pcre/pcrelib/pcre_internal.h
@@ -7,7 +7,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,8 @@ POSSIBILITY OF SUCH DAMAGE.
/* This header contains definitions that are shared between the different
modules, but which are not relevant to the exported API. This includes some
-functions whose names all begin with "_pcre_". */
+functions whose names all begin with "_pcre_" or "_pcre16_" depending on
+the PRIV macro. */
#ifndef PCRE_INTERNAL_H
#define PCRE_INTERNAL_H
@@ -51,20 +52,39 @@ functions whose names all begin with "_pcre_". */
#define PCRE_DEBUG
#endif
-/* We do not support both EBCDIC and UTF-8 at the same time. The "configure"
-script prevents both being selected, but not everybody uses "configure". */
-
-#if defined EBCDIC && defined SUPPORT_UTF8
-#error The use of both EBCDIC and SUPPORT_UTF8 is not supported.
+/* PCRE is compiled as an 8 bit library if it is not requested otherwise. */
+#ifndef COMPILE_PCRE16
+#define COMPILE_PCRE8
#endif
-/* If SUPPORT_UCP is defined, SUPPORT_UTF8 must also be defined. The
+/* If SUPPORT_UCP is defined, SUPPORT_UTF must also be defined. The
"configure" script ensures this, but not everybody uses "configure". */
-#if defined SUPPORT_UCP && !defined SUPPORT_UTF8
+#if defined SUPPORT_UCP && !(defined SUPPORT_UTF)
+#define SUPPORT_UTF 1
+#endif
+
+/* We define SUPPORT_UTF if SUPPORT_UTF8 is enabled for compatibility
+reasons with existing code. */
+
+#if defined SUPPORT_UTF8 && !(defined SUPPORT_UTF)
+#define SUPPORT_UTF 1
+#endif
+
+/* Fixme: SUPPORT_UTF8 should be eventually disappear from the code.
+Until then we define it if SUPPORT_UTF is defined. */
+
+#if defined SUPPORT_UTF && !(defined SUPPORT_UTF8)
#define SUPPORT_UTF8 1
#endif
+/* We do not support both EBCDIC and UTF-8/16 at the same time. The "configure"
+script prevents both being selected, but not everybody uses "configure". */
+
+#if defined EBCDIC && defined SUPPORT_UTF
+#error The use of both EBCDIC and SUPPORT_UTF8/16 is not supported.
+#endif
+
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
inline, and there are *still* stupid compilers about that don't like indented
pre-processor statements, or at least there were when I first wrote this. After
@@ -158,12 +178,14 @@ set, we ensure here that it has no effect. */
#define PCRE_CALL_CONVENTION
#endif
-/* We need to have types that specify unsigned 16-bit and 32-bit integers. We
+/* We need to have types that specify unsigned 8, 16 and 32-bit integers. We
cannot determine these outside the compilation (e.g. by running a program as
part of "configure") because PCRE is often cross-compiled for use on other
systems. Instead we make use of the maximum sizes that are available at
preprocessor time in standard C environments. */
+typedef unsigned char pcre_uint8;
+
#if USHRT_MAX == 65535
typedef unsigned short pcre_uint16;
typedef short pcre_int16;
@@ -208,12 +230,47 @@ by "configure". */
/* All character handling must be done as unsigned characters. Otherwise there
are problems with top-bit-set characters and functions such as isspace().
-However, we leave the interface to the outside world as char *, because that
-should make things easier for callers. We define a short type for unsigned char
-to save lots of typing. I tried "uchar", but it causes problems on Digital
-Unix, where it is defined in sys/types, so use "uschar" instead. */
+However, we leave the interface to the outside world as char * or short *,
+because that should make things easier for callers. This character type is
+called pcre_uchar.
+
+The IN_UCHARS macro multiply its argument with the byte size of the current
+pcre_uchar type. Useful for memcpy and such operations, whose require the
+byte size of their input/output buffers.
+
+The MAX_255 macro checks whether its pcre_uchar input is less than 256.
+
+The TABLE_GET macro is designed for accessing elements of tables whose contain
+exactly 256 items. When the character is able to contain more than 256
+items, some check is needed before accessing these tables.
+*/
-typedef unsigned char uschar;
+#ifdef COMPILE_PCRE8
+
+typedef unsigned char pcre_uchar;
+#define IN_UCHARS(x) (x)
+#define MAX_255(c) 1
+#define TABLE_GET(c, table, default) ((table)[c])
+
+#else
+
+#ifdef COMPILE_PCRE16
+#if USHRT_MAX != 65535
+/* This is a warning message. Change PCRE_UCHAR16 to a 16 bit data type in
+pcre.h(.in) and disable (comment out) this message. */
+#error Warning: PCRE_UCHAR16 is not a 16 bit data type.
+#endif
+
+typedef pcre_uint16 pcre_uchar;
+#define IN_UCHARS(x) ((x) << 1)
+#define MAX_255(c) ((c) <= 255u)
+#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
+
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE16 */
+
+#endif /* COMPILE_PCRE8 */
/* This is an unsigned int value that no character can ever have. UTF-8
characters only go up to 0x7fffffff (though Unicode doesn't go beyond
@@ -236,8 +293,8 @@ start/end of string field names are. */
#define IS_NEWLINE(p) \
((NLBLOCK->nltype != NLTYPE_FIXED)? \
((p) < NLBLOCK->PSEND && \
- _pcre_is_newline((p), NLBLOCK->nltype, NLBLOCK->PSEND, &(NLBLOCK->nllen),\
- utf8)) \
+ PRIV(is_newline)((p), NLBLOCK->nltype, NLBLOCK->PSEND, \
+ &(NLBLOCK->nllen), utf)) \
: \
((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
(p)[0] == NLBLOCK->nl[0] && \
@@ -250,8 +307,8 @@ start/end of string field names are. */
#define WAS_NEWLINE(p) \
((NLBLOCK->nltype != NLTYPE_FIXED)? \
((p) > NLBLOCK->PSSTART && \
- _pcre_was_newline((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
- &(NLBLOCK->nllen), utf8)) \
+ PRIV(was_newline)((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
+ &(NLBLOCK->nllen), utf)) \
: \
((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
(p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \
@@ -269,15 +326,11 @@ used for the external interface and appears in pcre.h, which is why its name
must begin with PCRE_. */
#ifdef CUSTOM_SUBJECT_PTR
-#define PCRE_SPTR CUSTOM_SUBJECT_PTR
-#define USPTR CUSTOM_SUBJECT_PTR
+#define PCRE_PUCHAR CUSTOM_SUBJECT_PTR
#else
-#define PCRE_SPTR const char *
-#define USPTR const unsigned char *
+#define PCRE_PUCHAR const pcre_uchar *
#endif
-
-
/* Include the public PCRE header and the definitions of UCP character property
values. */
@@ -345,6 +398,8 @@ The macros are controlled by the value of LINK_SIZE. This defaults to 2 in
the config.h file, but can be overridden by using -D on the command line. This
is automated on Unix systems via the "configure" command. */
+#ifdef COMPILE_PCRE8
+
#if LINK_SIZE == 2
#define PUT(a,n,d) \
@@ -381,13 +436,54 @@ is automated on Unix systems via the "configure" command. */
#define GET(a,n) \
(((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3])
-#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
+/* Keep it positive */
+#define MAX_PATTERN_SIZE (1 << 30)
+
+#else
+#error LINK_SIZE must be either 2, 3, or 4
+#endif
+
+#else /* COMPILE_PCRE8 */
+
+#ifdef COMPILE_PCRE16
+
+#if LINK_SIZE == 2
+
+#undef LINK_SIZE
+#define LINK_SIZE 1
+
+#define PUT(a,n,d) \
+ (a[n] = (d))
+
+#define GET(a,n) \
+ (a[n])
+
+#define MAX_PATTERN_SIZE (1 << 16)
+
+#elif LINK_SIZE == 3 || LINK_SIZE == 4
+
+#undef LINK_SIZE
+#define LINK_SIZE 2
+#define PUT(a,n,d) \
+ (a[n] = (d) >> 16), \
+ (a[(n)+1] = (d) & 65535)
+
+#define GET(a,n) \
+ (((a)[n] << 16) | (a)[(n)+1])
+
+/* Keep it positive */
+#define MAX_PATTERN_SIZE (1 << 30)
#else
#error LINK_SIZE must be either 2, 3, or 4
#endif
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE16 */
+
+#endif /* COMPILE_PCRE8 */
/* Convenience macro defined in terms of the others */
@@ -398,6 +494,10 @@ is automated on Unix systems via the "configure" command. */
offsets changes. There are used for repeat counts and for other things such as
capturing parenthesis numbers in back references. */
+#ifdef COMPILE_PCRE8
+
+#define IMM2_SIZE 2
+
#define PUT2(a,n,d) \
a[n] = (d) >> 8; \
a[(n)+1] = (d) & 255
@@ -405,17 +505,44 @@ capturing parenthesis numbers in back references. */
#define GET2(a,n) \
(((a)[n] << 8) | (a)[(n)+1])
-#define PUT2INC(a,n,d) PUT2(a,n,d), a += 2
+#else /* COMPILE_PCRE8 */
+
+#ifdef COMPILE_PCRE16
+
+#define IMM2_SIZE 1
+
+#define PUT2(a,n,d) \
+ a[n] = d
+
+#define GET2(a,n) \
+ a[n]
+
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE16 */
+
+#endif /* COMPILE_PCRE8 */
+
+#define PUT2INC(a,n,d) PUT2(a,n,d), a += IMM2_SIZE
+
+/* The maximum length of a MARK name is currently one data unit; it may be
+changed in future to be a fixed number of bytes or to depend on LINK_SIZE. */
+#define MAX_MARK ((1 << (sizeof(pcre_uchar)*8)) - 1)
-/* When UTF-8 encoding is being used, a character is no longer just a single
-byte. The macros for character handling generate simple sequences when used in
-byte-mode, and more complicated ones for UTF-8 characters. GETCHARLENTEST is
-not used when UTF-8 is not supported, so it is not defined, and BACKCHAR should
-never be called in byte mode. To make sure they can never even appear when
-UTF-8 support is omitted, we don't even define them. */
+/* When UTF encoding is being used, a character is no longer just a single
+character. The macros for character handling generate simple sequences when
+used in character-mode, and more complicated ones for UTF characters.
+GETCHARLENTEST and other macros are not used when UTF is not supported,
+so they are not defined. To make sure they can never even appear when
+UTF support is omitted, we don't even define them. */
-#ifndef SUPPORT_UTF8
+#ifndef SUPPORT_UTF
+
+/* #define MAX_VALUE_FOR_SINGLE_CHAR */
+/* #define HAS_EXTRALEN(c) */
+/* #define GET_EXTRALEN(c) */
+/* #define NOT_FIRSTCHAR(c) */
#define GETCHAR(c, eptr) c = *eptr;
#define GETCHARTEST(c, eptr) c = *eptr;
#define GETCHARINC(c, eptr) c = *eptr++;
@@ -423,14 +550,36 @@ UTF-8 support is omitted, we don't even define them. */
#define GETCHARLEN(c, eptr, len) c = *eptr;
/* #define GETCHARLENTEST(c, eptr, len) */
/* #define BACKCHAR(eptr) */
+/* #define FORWARDCHAR(eptr) */
+/* #define ACROSSCHAR(condition, eptr, action) */
+
+#else /* SUPPORT_UTF */
-#else /* SUPPORT_UTF8 */
+#ifdef COMPILE_PCRE8
/* These macros were originally written in the form of loops that used data
-from the tables whose names start with _pcre_utf8_table. They were rewritten by
+from the tables whose names start with PRIV(utf8_table). They were rewritten by
a user so as not to use loops, because in some environments this gives a
significant performance advantage, and it seems never to do any harm. */
+/* Tells the biggest code point which can be encoded as a single character. */
+
+#define MAX_VALUE_FOR_SINGLE_CHAR 127
+
+/* Tests whether the code point needs extra characters to decode. */
+
+#define HAS_EXTRALEN(c) ((c) >= 0xc0)
+
+/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
+Otherwise it has an undefined behaviour. */
+
+#define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3f])
+
+/* Returns TRUE, if the given character is not the first character
+of a UTF sequence. */
+
+#define NOT_FIRSTCHAR(c) (((c) & 0xc0) == 0x80)
+
/* Base macro to pick up the remaining bytes of a UTF-8 character, not
advancing the pointer. */
@@ -465,7 +614,7 @@ pointer. */
#define GETCHARTEST(c, eptr) \
c = *eptr; \
- if (utf8 && c >= 0xc0) GETUTF8(c, eptr);
+ if (utf && c >= 0xc0) GETUTF8(c, eptr);
/* Base macro to pick up the remaining bytes of a UTF-8 character, advancing
the pointer. */
@@ -513,7 +662,7 @@ This is called when we don't know if we are in UTF-8 mode. */
#define GETCHARINCTEST(c, eptr) \
c = *eptr++; \
- if (utf8 && c >= 0xc0) GETUTF8INC(c, eptr);
+ if (utf && c >= 0xc0) GETUTF8INC(c, eptr);
/* Base macro to pick up the remaining bytes of a UTF-8 character, not
advancing the pointer, incrementing the length. */
@@ -565,7 +714,7 @@ do not know if we are in UTF-8 mode. */
#define GETCHARLENTEST(c, eptr, len) \
c = *eptr; \
- if (utf8 && c >= 0xc0) GETUTF8LEN(c, eptr, len);
+ if (utf && c >= 0xc0) GETUTF8LEN(c, eptr, len);
/* If the pointer is not at the start of a character, move it back until
it is. This is called only in UTF-8 mode - we don't put a test within the macro
@@ -573,7 +722,116 @@ because almost all calls are already within a block of UTF-8 only code. */
#define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--
-#endif /* SUPPORT_UTF8 */
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr++
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) \
+ while((condition) && ((eptr) & 0xc0) == 0x80) action
+
+#else /* COMPILE_PCRE8 */
+
+#ifdef COMPILE_PCRE16
+
+/* Tells the biggest code point which can be encoded as a single character. */
+
+#define MAX_VALUE_FOR_SINGLE_CHAR 65535
+
+/* Tests whether the code point needs extra characters to decode. */
+
+#define HAS_EXTRALEN(c) (((c) & 0xfc00) == 0xd800)
+
+/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
+Otherwise it has an undefined behaviour. */
+
+#define GET_EXTRALEN(c) 1
+
+/* Returns TRUE, if the given character is not the first character
+of a UTF sequence. */
+
+#define NOT_FIRSTCHAR(c) (((c) & 0xfc00) == 0xdc00)
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, not
+advancing the pointer. */
+
+#define GETUTF16(c, eptr) \
+ { c = (((c & 0x3ff) << 10) | (eptr[1] & 0x3ff)) + 0x10000; }
+
+/* Get the next UTF-16 character, not advancing the pointer. This is called when
+we know we are in UTF-16 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *eptr; \
+ if ((c & 0xfc00) == 0xd800) GETUTF16(c, eptr);
+
+/* Get the next UTF-16 character, testing for UTF-16 mode, and not advancing the
+pointer. */
+
+#define GETCHARTEST(c, eptr) \
+ c = *eptr; \
+ if (utf && (c & 0xfc00) == 0xd800) GETUTF16(c, eptr);
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, advancing
+the pointer. */
+
+#define GETUTF16INC(c, eptr) \
+ { c = (((c & 0x3ff) << 10) | (*eptr++ & 0x3ff)) + 0x10000; }
+
+/* Get the next UTF-16 character, advancing the pointer. This is called when we
+know we are in UTF-16 mode. */
+
+#define GETCHARINC(c, eptr) \
+ c = *eptr++; \
+ if ((c & 0xfc00) == 0xd800) GETUTF16INC(c, eptr);
+
+/* Get the next character, testing for UTF-16 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-16 mode. */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *eptr++; \
+ if (utf && (c & 0xfc00) == 0xd800) GETUTF16INC(c, eptr);
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, not
+advancing the pointer, incrementing the length. */
+
+#define GETUTF16LEN(c, eptr, len) \
+ { c = (((c & 0x3ff) << 10) | (eptr[1] & 0x3ff)) + 0x10000; len++; }
+
+/* Get the next UTF-16 character, not advancing the pointer, incrementing
+length if there is a low surrogate. This is called when we know we are in
+UTF-16 mode. */
+
+#define GETCHARLEN(c, eptr, len) \
+ c = *eptr; \
+ if ((c & 0xfc00) == 0xd800) GETUTF16LEN(c, eptr, len);
+
+/* Get the next UTF-816character, testing for UTF-16 mode, not advancing the
+pointer, incrementing length if there is a low surrogate. This is called when
+we do not know if we are in UTF-16 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ c = *eptr; \
+ if (utf && (c & 0xfc00) == 0xd800) GETUTF16LEN(c, eptr, len);
+
+/* If the pointer is not at the start of a character, move it back until
+it is. This is called only in UTF-16 mode - we don't put a test within the
+macro because almost all calls are already within a block of UTF-16 only
+code. */
+
+#define BACKCHAR(eptr) if ((*eptr & 0xfc00) == 0xdc00) eptr--
+
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) if ((*eptr & 0xfc00) == 0xdc00) eptr++
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) \
+ if ((condition) && ((eptr) & 0xfc00) == 0xdc00) action
+
+#endif
+
+#endif /* COMPILE_PCRE8 */
+
+#endif /* SUPPORT_UTF */
/* In case there is no definition of offsetof() provided - though any proper
@@ -584,27 +842,32 @@ Standard C system should have one. */
#endif
-/* These are the public options that can change during matching. */
-
-#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
-
/* Private flags containing information about the compiled regex. They used to
live at the top end of the options word, but that got almost full, so now they
are in a 16-bit flags word. From release 8.00, PCRE_NOPARTIAL is unused, as
the restrictions on partial matching have been lifted. It remains for backwards
compatibility. */
-#define PCRE_NOPARTIAL 0x0001 /* can't use partial with this regex */
-#define PCRE_FIRSTSET 0x0002 /* first_byte is set */
-#define PCRE_REQCHSET 0x0004 /* req_byte is set */
-#define PCRE_STARTLINE 0x0008 /* start after \n for multiline */
-#define PCRE_JCHANGED 0x0010 /* j option used in regex */
-#define PCRE_HASCRORLF 0x0020 /* explicit \r or \n in pattern */
+#ifdef COMPILE_PCRE8
+#define PCRE_MODE 0x0001 /* compiled in 8 bit mode */
+#endif
+#ifdef COMPILE_PCRE16
+#define PCRE_MODE 0x0002 /* compiled in 16 bit mode */
+#endif
+#define PCRE_FIRSTSET 0x0010 /* first_char is set */
+#define PCRE_FCH_CASELESS 0x0020 /* caseless first char */
+#define PCRE_REQCHSET 0x0040 /* req_byte is set */
+#define PCRE_RCH_CASELESS 0x0080 /* caseless requested char */
+#define PCRE_STARTLINE 0x0100 /* start after \n for multiline */
+#define PCRE_NOPARTIAL 0x0200 /* can't use partial with this regex */
+#define PCRE_JCHANGED 0x0400 /* j option used in regex */
+#define PCRE_HASCRORLF 0x0800 /* explicit \r or \n in pattern */
+#define PCRE_HASTHEN 0x1000 /* pattern contains (*THEN) */
-/* Options for the "extra" block produced by pcre_study(). */
+/* Flags for the "extra" block produced by pcre_study(). */
-#define PCRE_STUDY_MAPPED 0x01 /* a map of starting chars exists */
-#define PCRE_STUDY_MINLEN 0x02 /* a minimum length field exists */
+#define PCRE_STUDY_MAPPED 0x0001 /* a map of starting chars exists */
+#define PCRE_STUDY_MINLEN 0x0002 /* a minimum length field exists */
/* Masks for identifying the public options that are permitted at compile
time, run time, or study time, respectively. */
@@ -630,13 +893,19 @@ time, run time, or study time, respectively. */
PCRE_DFA_RESTART|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
PCRE_NO_START_OPTIMIZE)
-#define PUBLIC_STUDY_OPTIONS 0 /* None defined */
+#define PUBLIC_STUDY_OPTIONS \
+ (PCRE_STUDY_JIT_COMPILE|PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE| \
+ PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE)
-/* Magic number to provide a small check against being handed junk. Also used
-to detect whether a pattern was compiled on a host of different endianness. */
+/* Magic number to provide a small check against being handed junk. */
#define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */
+/* This variable is used to detect a loaded regular expression
+in different endianness. */
+
+#define REVERSED_MAGIC_NUMBER 0x45524350UL /* 'ERCP' */
+
/* Negative values for the firstchar and reqchar variables */
#define REQ_UNSET (-2)
@@ -647,12 +916,6 @@ req_byte match. */
#define REQ_BYTE_MAX 1000
-/* Flags added to firstbyte or reqbyte; a "non-literal" item is either a
-variable-length repeat, or a anything other than literal characters. */
-
-#define REQ_CASELESS 0x0100 /* indicates caselessness */
-#define REQ_VARY 0x0200 /* reqbyte followed non-literal item */
-
/* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in
environments where these macros are defined elsewhere. Unfortunately, there
is no way to do the same for the typedef. */
@@ -681,7 +944,7 @@ for) in a minority area (EBCDIC platforms), this is not sensible. Any
application that did need both could compile two versions of the library, using
macros to give the functions distinct names. */
-#ifndef SUPPORT_UTF8
+#ifndef SUPPORT_UTF
/* UTF-8 support is not enabled; use the platform-dependent character literals
so that PCRE works on both ASCII and EBCDIC platforms, in non-UTF-mode only. */
@@ -941,11 +1204,16 @@ so that PCRE works on both ASCII and EBCDIC platforms, in non-UTF-mode only. */
#define STRING_ANYCRLF_RIGHTPAR "ANYCRLF)"
#define STRING_BSR_ANYCRLF_RIGHTPAR "BSR_ANYCRLF)"
#define STRING_BSR_UNICODE_RIGHTPAR "BSR_UNICODE)"
-#define STRING_UTF8_RIGHTPAR "UTF8)"
+#ifdef COMPILE_PCRE8
+#define STRING_UTF_RIGHTPAR "UTF8)"
+#endif
+#ifdef COMPILE_PCRE16
+#define STRING_UTF_RIGHTPAR "UTF16)"
+#endif
#define STRING_UCP_RIGHTPAR "UCP)"
#define STRING_NO_START_OPT_RIGHTPAR "NO_START_OPT)"
-#else /* SUPPORT_UTF8 */
+#else /* SUPPORT_UTF */
/* UTF-8 support is enabled; always use UTF-8 (=ASCII) character codes. This
works in both modes non-EBCDIC platforms, and on EBCDIC platforms in UTF-8 mode
@@ -1196,11 +1464,16 @@ only. */
#define STRING_ANYCRLF_RIGHTPAR STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
#define STRING_BSR_ANYCRLF_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
#define STRING_BSR_UNICODE_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS
-#define STRING_UTF8_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS
+#ifdef COMPILE_PCRE8
+#define STRING_UTF_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS
+#endif
+#ifdef COMPILE_PCRE16
+#define STRING_UTF_RIGHTPAR STR_U STR_T STR_F STR_1 STR_6 STR_RIGHT_PARENTHESIS
+#endif
#define STRING_UCP_RIGHTPAR STR_U STR_C STR_P STR_RIGHT_PARENTHESIS
#define STRING_NO_START_OPT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
/* Escape items that are just an encoding of a particular data value. */
@@ -1240,7 +1513,7 @@ only. */
#define PT_WORD 8 /* Word - L plus N plus underscore */
/* Flag bits and data types for the extended class (OP_XCLASS) for classes that
-contain UTF-8 characters with values greater than 255. */
+contain characters with values greater than 255. */
#define XCL_NOT 0x01 /* Flag: this is a negative class */
#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */
@@ -1256,8 +1529,8 @@ value such as \n. They must have non-zero values, as check_escape() returns
their negation. Also, they must appear in the same order as in the opcode
definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it
corresponds to "." in DOTALL mode rather than an escape sequence. It is also
-used for [^] in JavaScript compatibility mode. In non-DOTALL mode, "." behaves
-like \N.
+used for [^] in JavaScript compatibility mode, and for \C in non-utf mode. In
+non-DOTALL mode, "." behaves like \N.
The special values ESC_DU, ESC_du, etc. are used instead of ESC_D, ESC_d, etc.
when PCRE_UCP is set, when replacement of \d etc by \p sequences is required.
@@ -1301,6 +1574,7 @@ enum {
OP_WHITESPACE, /* 9 \s */
OP_NOT_WORDCHAR, /* 10 \W */
OP_WORDCHAR, /* 11 \w */
+
OP_ANY, /* 12 Match any character except newline */
OP_ALLANY, /* 13 Match any character */
OP_ANYBYTE, /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */
@@ -1315,141 +1589,205 @@ enum {
OP_EODN, /* 23 End of data or \n at end of data: \Z. */
OP_EOD, /* 24 End of data: \z */
- OP_OPT, /* 25 Set runtime options */
- OP_CIRC, /* 26 Start of line - varies with multiline switch */
- OP_DOLL, /* 27 End of line - varies with multiline switch */
- OP_CHAR, /* 28 Match one character, casefully */
- OP_CHARNC, /* 29 Match one character, caselessly */
- OP_NOT, /* 30 Match one character, not the following one */
-
- OP_STAR, /* 31 The maximizing and minimizing versions of */
- OP_MINSTAR, /* 32 these six opcodes must come in pairs, with */
- OP_PLUS, /* 33 the minimizing one second. */
- OP_MINPLUS, /* 34 This first set applies to single characters.*/
- OP_QUERY, /* 35 */
- OP_MINQUERY, /* 36 */
-
- OP_UPTO, /* 37 From 0 to n matches */
- OP_MINUPTO, /* 38 */
- OP_EXACT, /* 39 Exactly n matches */
-
- OP_POSSTAR, /* 40 Possessified star */
- OP_POSPLUS, /* 41 Possessified plus */
- OP_POSQUERY, /* 42 Posesssified query */
- OP_POSUPTO, /* 43 Possessified upto */
-
- OP_NOTSTAR, /* 44 The maximizing and minimizing versions of */
- OP_NOTMINSTAR, /* 45 these six opcodes must come in pairs, with */
- OP_NOTPLUS, /* 46 the minimizing one second. They must be in */
- OP_NOTMINPLUS, /* 47 exactly the same order as those above. */
- OP_NOTQUERY, /* 48 This set applies to "not" single characters. */
- OP_NOTMINQUERY, /* 49 */
-
- OP_NOTUPTO, /* 50 From 0 to n matches */
- OP_NOTMINUPTO, /* 51 */
- OP_NOTEXACT, /* 52 Exactly n matches */
-
- OP_NOTPOSSTAR, /* 53 Possessified versions */
- OP_NOTPOSPLUS, /* 54 */
- OP_NOTPOSQUERY, /* 55 */
- OP_NOTPOSUPTO, /* 56 */
-
- OP_TYPESTAR, /* 57 The maximizing and minimizing versions of */
- OP_TYPEMINSTAR, /* 58 these six opcodes must come in pairs, with */
- OP_TYPEPLUS, /* 59 the minimizing one second. These codes must */
- OP_TYPEMINPLUS, /* 60 be in exactly the same order as those above. */
- OP_TYPEQUERY, /* 61 This set applies to character types such as \d */
- OP_TYPEMINQUERY, /* 62 */
-
- OP_TYPEUPTO, /* 63 From 0 to n matches */
- OP_TYPEMINUPTO, /* 64 */
- OP_TYPEEXACT, /* 65 Exactly n matches */
-
- OP_TYPEPOSSTAR, /* 66 Possessified versions */
- OP_TYPEPOSPLUS, /* 67 */
- OP_TYPEPOSQUERY, /* 68 */
- OP_TYPEPOSUPTO, /* 69 */
-
- OP_CRSTAR, /* 70 The maximizing and minimizing versions of */
- OP_CRMINSTAR, /* 71 all these opcodes must come in pairs, with */
- OP_CRPLUS, /* 72 the minimizing one second. These codes must */
- OP_CRMINPLUS, /* 73 be in exactly the same order as those above. */
- OP_CRQUERY, /* 74 These are for character classes and back refs */
- OP_CRMINQUERY, /* 75 */
- OP_CRRANGE, /* 76 These are different to the three sets above. */
- OP_CRMINRANGE, /* 77 */
-
- OP_CLASS, /* 78 Match a character class, chars < 256 only */
- OP_NCLASS, /* 79 Same, but the bitmap was created from a negative
- class - the difference is relevant only when a UTF-8
- character > 255 is encountered. */
-
- OP_XCLASS, /* 80 Extended class for handling UTF-8 chars within the
- class. This does both positive and negative. */
-
- OP_REF, /* 81 Match a back reference */
- OP_RECURSE, /* 82 Match a numbered subpattern (possibly recursive) */
- OP_CALLOUT, /* 83 Call out to external function if provided */
-
- OP_ALT, /* 84 Start of alternation */
- OP_KET, /* 85 End of group that doesn't have an unbounded repeat */
- OP_KETRMAX, /* 86 These two must remain together and in this */
- OP_KETRMIN, /* 87 order. They are for groups the repeat for ever. */
-
- /* The assertions must come before BRA, CBRA, ONCE, and COND.*/
-
- OP_ASSERT, /* 88 Positive lookahead */
- OP_ASSERT_NOT, /* 89 Negative lookahead */
- OP_ASSERTBACK, /* 90 Positive lookbehind */
- OP_ASSERTBACK_NOT, /* 91 Negative lookbehind */
- OP_REVERSE, /* 92 Move pointer back - used in lookbehind assertions */
-
- /* ONCE, BRA, CBRA, and COND must come after the assertions, with ONCE first,
- as there's a test for >= ONCE for a subpattern that isn't an assertion. */
-
- OP_ONCE, /* 93 Atomic group */
- OP_BRA, /* 94 Start of non-capturing bracket */
- OP_CBRA, /* 95 Start of capturing bracket */
- OP_COND, /* 96 Conditional group */
-
- /* These three must follow the previous three, in the same order. There's a
+ OP_CIRC, /* 25 Start of line - not multiline */
+ OP_CIRCM, /* 26 Start of line - multiline */
+ OP_DOLL, /* 27 End of line - not multiline */
+ OP_DOLLM, /* 28 End of line - multiline */
+ OP_CHAR, /* 29 Match one character, casefully */
+ OP_CHARI, /* 30 Match one character, caselessly */
+ OP_NOT, /* 31 Match one character, not the given one, casefully */
+ OP_NOTI, /* 32 Match one character, not the given one, caselessly */
+
+ /* The following sets of 13 opcodes must always be kept in step because
+ the offset from the first one is used to generate the others. */
+
+ /**** Single characters, caseful, must precede the caseless ones ****/
+
+ OP_STAR, /* 33 The maximizing and minimizing versions of */
+ OP_MINSTAR, /* 34 these six opcodes must come in pairs, with */
+ OP_PLUS, /* 35 the minimizing one second. */
+ OP_MINPLUS, /* 36 */
+ OP_QUERY, /* 37 */
+ OP_MINQUERY, /* 38 */
+
+ OP_UPTO, /* 39 From 0 to n matches of one character, caseful*/
+ OP_MINUPTO, /* 40 */
+ OP_EXACT, /* 41 Exactly n matches */
+
+ OP_POSSTAR, /* 42 Possessified star, caseful */
+ OP_POSPLUS, /* 43 Possessified plus, caseful */
+ OP_POSQUERY, /* 44 Posesssified query, caseful */
+ OP_POSUPTO, /* 45 Possessified upto, caseful */
+
+ /**** Single characters, caseless, must follow the caseful ones */
+
+ OP_STARI, /* 46 */
+ OP_MINSTARI, /* 47 */
+ OP_PLUSI, /* 48 */
+ OP_MINPLUSI, /* 49 */
+ OP_QUERYI, /* 50 */
+ OP_MINQUERYI, /* 51 */
+
+ OP_UPTOI, /* 52 From 0 to n matches of one character, caseless */
+ OP_MINUPTOI, /* 53 */
+ OP_EXACTI, /* 54 */
+
+ OP_POSSTARI, /* 55 Possessified star, caseless */
+ OP_POSPLUSI, /* 56 Possessified plus, caseless */
+ OP_POSQUERYI, /* 57 Posesssified query, caseless */
+ OP_POSUPTOI, /* 58 Possessified upto, caseless */
+
+ /**** The negated ones must follow the non-negated ones, and match them ****/
+ /**** Negated single character, caseful; must precede the caseless ones ****/
+
+ OP_NOTSTAR, /* 59 The maximizing and minimizing versions of */
+ OP_NOTMINSTAR, /* 60 these six opcodes must come in pairs, with */
+ OP_NOTPLUS, /* 61 the minimizing one second. They must be in */
+ OP_NOTMINPLUS, /* 62 exactly the same order as those above. */
+ OP_NOTQUERY, /* 63 */
+ OP_NOTMINQUERY, /* 64 */
+
+ OP_NOTUPTO, /* 65 From 0 to n matches, caseful */
+ OP_NOTMINUPTO, /* 66 */
+ OP_NOTEXACT, /* 67 Exactly n matches */
+
+ OP_NOTPOSSTAR, /* 68 Possessified versions, caseful */
+ OP_NOTPOSPLUS, /* 69 */
+ OP_NOTPOSQUERY, /* 70 */
+ OP_NOTPOSUPTO, /* 71 */
+
+ /**** Negated single character, caseless; must follow the caseful ones ****/
+
+ OP_NOTSTARI, /* 72 */
+ OP_NOTMINSTARI, /* 73 */
+ OP_NOTPLUSI, /* 74 */
+ OP_NOTMINPLUSI, /* 75 */
+ OP_NOTQUERYI, /* 76 */
+ OP_NOTMINQUERYI, /* 77 */
+
+ OP_NOTUPTOI, /* 78 From 0 to n matches, caseless */
+ OP_NOTMINUPTOI, /* 79 */
+ OP_NOTEXACTI, /* 80 Exactly n matches */
+
+ OP_NOTPOSSTARI, /* 81 Possessified versions, caseless */
+ OP_NOTPOSPLUSI, /* 82 */
+ OP_NOTPOSQUERYI, /* 83 */
+ OP_NOTPOSUPTOI, /* 84 */
+
+ /**** Character types ****/
+
+ OP_TYPESTAR, /* 85 The maximizing and minimizing versions of */
+ OP_TYPEMINSTAR, /* 86 these six opcodes must come in pairs, with */
+ OP_TYPEPLUS, /* 87 the minimizing one second. These codes must */
+ OP_TYPEMINPLUS, /* 88 be in exactly the same order as those above. */
+ OP_TYPEQUERY, /* 89 */
+ OP_TYPEMINQUERY, /* 90 */
+
+ OP_TYPEUPTO, /* 91 From 0 to n matches */
+ OP_TYPEMINUPTO, /* 92 */
+ OP_TYPEEXACT, /* 93 Exactly n matches */
+
+ OP_TYPEPOSSTAR, /* 94 Possessified versions */
+ OP_TYPEPOSPLUS, /* 95 */
+ OP_TYPEPOSQUERY, /* 96 */
+ OP_TYPEPOSUPTO, /* 97 */
+
+ /* These are used for character classes and back references; only the
+ first six are the same as the sets above. */
+
+ OP_CRSTAR, /* 98 The maximizing and minimizing versions of */
+ OP_CRMINSTAR, /* 99 all these opcodes must come in pairs, with */
+ OP_CRPLUS, /* 100 the minimizing one second. These codes must */
+ OP_CRMINPLUS, /* 101 be in exactly the same order as those above. */
+ OP_CRQUERY, /* 102 */
+ OP_CRMINQUERY, /* 103 */
+
+ OP_CRRANGE, /* 104 These are different to the three sets above. */
+ OP_CRMINRANGE, /* 105 */
+
+ /* End of quantifier opcodes */
+
+ OP_CLASS, /* 106 Match a character class, chars < 256 only */
+ OP_NCLASS, /* 107 Same, but the bitmap was created from a negative
+ class - the difference is relevant only when a
+ character > 255 is encountered. */
+ OP_XCLASS, /* 108 Extended class for handling > 255 chars within the
+ class. This does both positive and negative. */
+ OP_REF, /* 109 Match a back reference, casefully */
+ OP_REFI, /* 110 Match a back reference, caselessly */
+ OP_RECURSE, /* 111 Match a numbered subpattern (possibly recursive) */
+ OP_CALLOUT, /* 112 Call out to external function if provided */
+
+ OP_ALT, /* 113 Start of alternation */
+ OP_KET, /* 114 End of group that doesn't have an unbounded repeat */
+ OP_KETRMAX, /* 115 These two must remain together and in this */
+ OP_KETRMIN, /* 116 order. They are for groups the repeat for ever. */
+ OP_KETRPOS, /* 117 Possessive unlimited repeat. */
+
+ /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four
+ asserts must remain in order. */
+
+ OP_REVERSE, /* 118 Move pointer back - used in lookbehind assertions */
+ OP_ASSERT, /* 119 Positive lookahead */
+ OP_ASSERT_NOT, /* 120 Negative lookahead */
+ OP_ASSERTBACK, /* 121 Positive lookbehind */
+ OP_ASSERTBACK_NOT, /* 122 Negative lookbehind */
+
+ /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately
+ after the assertions, with ONCE first, as there's a test for >= ONCE for a
+ subpattern that isn't an assertion. The POS versions must immediately follow
+ the non-POS versions in each case. */
+
+ OP_ONCE, /* 123 Atomic group, contains captures */
+ OP_ONCE_NC, /* 124 Atomic group containing no captures */
+ OP_BRA, /* 125 Start of non-capturing bracket */
+ OP_BRAPOS, /* 126 Ditto, with unlimited, possessive repeat */
+ OP_CBRA, /* 127 Start of capturing bracket */
+ OP_CBRAPOS, /* 128 Ditto, with unlimited, possessive repeat */
+ OP_COND, /* 129 Conditional group */
+
+ /* These five must follow the previous five, in the same order. There's a
check for >= SBRA to distinguish the two sets. */
- OP_SBRA, /* 97 Start of non-capturing bracket, check empty */
- OP_SCBRA, /* 98 Start of capturing bracket, check empty */
- OP_SCOND, /* 99 Conditional group, check empty */
+ OP_SBRA, /* 130 Start of non-capturing bracket, check empty */
+ OP_SBRAPOS, /* 131 Ditto, with unlimited, possessive repeat */
+ OP_SCBRA, /* 132 Start of capturing bracket, check empty */
+ OP_SCBRAPOS, /* 133 Ditto, with unlimited, possessive repeat */
+ OP_SCOND, /* 134 Conditional group, check empty */
/* The next two pairs must (respectively) be kept together. */
- OP_CREF, /* 100 Used to hold a capture number as condition */
- OP_NCREF, /* 101 Same, but generaged by a name reference*/
- OP_RREF, /* 102 Used to hold a recursion number as condition */
- OP_NRREF, /* 103 Same, but generaged by a name reference*/
- OP_DEF, /* 104 The DEFINE condition */
+ OP_CREF, /* 135 Used to hold a capture number as condition */
+ OP_NCREF, /* 136 Same, but generated by a name reference*/
+ OP_RREF, /* 137 Used to hold a recursion number as condition */
+ OP_NRREF, /* 138 Same, but generated by a name reference*/
+ OP_DEF, /* 139 The DEFINE condition */
- OP_BRAZERO, /* 105 These two must remain together and in this */
- OP_BRAMINZERO, /* 106 order. */
+ OP_BRAZERO, /* 140 These two must remain together and in this */
+ OP_BRAMINZERO, /* 141 order. */
+ OP_BRAPOSZERO, /* 142 */
/* These are backtracking control verbs */
- OP_MARK, /* 107 always has an argument */
- OP_PRUNE, /* 108 */
- OP_PRUNE_ARG, /* 109 same, but with argument */
- OP_SKIP, /* 110 */
- OP_SKIP_ARG, /* 111 same, but with argument */
- OP_THEN, /* 112 */
- OP_THEN_ARG, /* 113 same, but with argument */
- OP_COMMIT, /* 114 */
+ OP_MARK, /* 143 always has an argument */
+ OP_PRUNE, /* 144 */
+ OP_PRUNE_ARG, /* 145 same, but with argument */
+ OP_SKIP, /* 146 */
+ OP_SKIP_ARG, /* 147 same, but with argument */
+ OP_THEN, /* 148 */
+ OP_THEN_ARG, /* 149 same, but with argument */
+ OP_COMMIT, /* 150 */
/* These are forced failure and success verbs */
- OP_FAIL, /* 115 */
- OP_ACCEPT, /* 116 */
- OP_CLOSE, /* 117 Used before OP_ACCEPT to close open captures */
+ OP_FAIL, /* 151 */
+ OP_ACCEPT, /* 152 */
+ OP_ASSERT_ACCEPT, /* 153 Used inside assertions */
+ OP_CLOSE, /* 154 Used before OP_ACCEPT to close open captures */
/* This is used to skip a subpattern with a {0} quantifier */
- OP_SKIPZERO, /* 118 */
+ OP_SKIPZERO, /* 155 */
/* This is not an opcode, but is used to check that tables indexed by opcode
are the correct length, in order to catch updating errors - there have been
@@ -1464,29 +1802,45 @@ called "coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */
/* This macro defines textual names for all the opcodes. These are used only
-for debugging. The macro is referenced only in pcre_printint.c. */
+for debugging, and some of them are only partial names. The macro is referenced
+only in pcre_printint.c, which fills out the full names in many cases (and in
+some cases doesn't actually use these names at all). */
#define OP_NAME_LIST \
"End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d", \
"\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte", \
"notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v", \
"extuni", "\\Z", "\\z", \
- "Opt", "^", "$", "char", "charnc", "not", \
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "^", "^", "$", "$", "char", "chari", "not", "noti", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
"*+","++", "?+", "{", \
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
"*+","++", "?+", "{", \
"*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
"*+","++", "?+", "{", \
"*", "*?", "+", "+?", "?", "??", "{", "{", \
- "class", "nclass", "xclass", "Ref", "Recurse", "Callout", \
- "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not", \
- "AssertB", "AssertB not", "Reverse", \
- "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond", \
+ "class", "nclass", "xclass", "Ref", "Refi", \
+ "Recurse", "Callout", \
+ "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos", \
+ "Reverse", "Assert", "Assert not", "AssertB", "AssertB not", \
+ "Once", "Once_NC", \
+ "Bra", "BraPos", "CBra", "CBraPos", \
+ "Cond", \
+ "SBra", "SBraPos", "SCBra", "SCBraPos", \
+ "SCond", \
"Cond ref", "Cond nref", "Cond rec", "Cond nrec", "Cond def", \
- "Brazero", "Braminzero", \
+ "Brazero", "Braminzero", "Braposzero", \
"*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \
- "*THEN", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT", \
+ "*THEN", "*THEN", "*COMMIT", "*FAIL", \
+ "*ACCEPT", "*ASSERT_ACCEPT", \
"Close", "Skip zero"
@@ -1507,56 +1861,75 @@ in UTF-8 mode. The code that uses this table must know about such things. */
3, 3, /* \P, \p */ \
1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \
1, /* \X */ \
- 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \
+ 1, 1, 1, 1, 1, 1, /* \Z, \z, ^, ^M, $, $M */ \
2, /* Char - the minimum length */ \
- 2, /* Charnc - the minimum length */ \
+ 2, /* Chari - the minimum length */ \
2, /* not */ \
- /* Positive single-char repeats ** These are */ \
- 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \
- 4, 4, 4, /* upto, minupto, exact ** UTF-8 mode */ \
- 2, 2, 2, 4, /* *+, ++, ?+, upto+ */ \
+ 2, /* noti */ \
+ /* Positive single-char repeats ** These are */ \
+ 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* upto, minupto ** mode */ \
+ 2+IMM2_SIZE, /* exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* *+, ++, ?+, upto+ */ \
+ 2, 2, 2, 2, 2, 2, /* *I, *?I, +I, +?I, ?I, ??I ** UTF-8 */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* upto I, minupto I */ \
+ 2+IMM2_SIZE, /* exact I */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* *+I, ++I, ?+I, upto+I */ \
/* Negative single-char repeats - only for chars < 256 */ \
2, 2, 2, 2, 2, 2, /* NOT *, *?, +, +?, ?, ?? */ \
- 4, 4, 4, /* NOT upto, minupto, exact */ \
- 2, 2, 2, 4, /* Possessive *, +, ?, upto */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* NOT upto, minupto */ \
+ 2+IMM2_SIZE, /* NOT exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive NOT *, +, ?, upto */ \
+ 2, 2, 2, 2, 2, 2, /* NOT *I, *?I, +I, +?I, ?I, ??I */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* NOT upto I, minupto I */ \
+ 2+IMM2_SIZE, /* NOT exact I */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive NOT *I, +I, ?I, upto I */ \
/* Positive type repeats */ \
2, 2, 2, 2, 2, 2, /* Type *, *?, +, +?, ?, ?? */ \
- 4, 4, 4, /* Type upto, minupto, exact */ \
- 2, 2, 2, 4, /* Possessive *+, ++, ?+, upto+ */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* Type upto, minupto */ \
+ 2+IMM2_SIZE, /* Type exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive *+, ++, ?+, upto+ */ \
/* Character class & ref repeats */ \
1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \
- 5, 5, /* CRRANGE, CRMINRANGE */ \
- 33, /* CLASS */ \
- 33, /* NCLASS */ \
+ 1+2*IMM2_SIZE, 1+2*IMM2_SIZE, /* CRRANGE, CRMINRANGE */ \
+ 1+(32/sizeof(pcre_uchar)), /* CLASS */ \
+ 1+(32/sizeof(pcre_uchar)), /* NCLASS */ \
0, /* XCLASS - variable length */ \
- 3, /* REF */ \
+ 1+IMM2_SIZE, /* REF */ \
+ 1+IMM2_SIZE, /* REFI */ \
1+LINK_SIZE, /* RECURSE */ \
2+2*LINK_SIZE, /* CALLOUT */ \
1+LINK_SIZE, /* Alt */ \
1+LINK_SIZE, /* Ket */ \
1+LINK_SIZE, /* KetRmax */ \
1+LINK_SIZE, /* KetRmin */ \
+ 1+LINK_SIZE, /* KetRpos */ \
+ 1+LINK_SIZE, /* Reverse */ \
1+LINK_SIZE, /* Assert */ \
1+LINK_SIZE, /* Assert not */ \
1+LINK_SIZE, /* Assert behind */ \
1+LINK_SIZE, /* Assert behind not */ \
- 1+LINK_SIZE, /* Reverse */ \
1+LINK_SIZE, /* ONCE */ \
+ 1+LINK_SIZE, /* ONCE_NC */ \
1+LINK_SIZE, /* BRA */ \
- 3+LINK_SIZE, /* CBRA */ \
+ 1+LINK_SIZE, /* BRAPOS */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* CBRA */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* CBRAPOS */ \
1+LINK_SIZE, /* COND */ \
1+LINK_SIZE, /* SBRA */ \
- 3+LINK_SIZE, /* SCBRA */ \
+ 1+LINK_SIZE, /* SBRAPOS */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* SCBRA */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* SCBRAPOS */ \
1+LINK_SIZE, /* SCOND */ \
- 3, 3, /* CREF, NCREF */ \
- 3, 3, /* RREF, NRREF */ \
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* CREF, NCREF */ \
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* RREF, NRREF */ \
1, /* DEF */ \
- 1, 1, /* BRAZERO, BRAMINZERO */ \
+ 1, 1, 1, /* BRAZERO, BRAMINZERO, BRAPOSZERO */ \
3, 1, 3, /* MARK, PRUNE, PRUNE_ARG */ \
1, 3, /* SKIP, SKIP_ARG */ \
- 1+LINK_SIZE, 3+LINK_SIZE, /* THEN, THEN_ARG */ \
- 1, 1, 1, 3, 1 /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO */
-
+ 1, 3, /* THEN, THEN_ARG */ \
+ 1, 1, 1, 1, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */ \
+ 1+IMM2_SIZE, 1 /* CLOSE, SKIPZERO */
/* A magic value for OP_RREF and OP_NRREF to indicate the "any recursion"
condition. */
@@ -1573,8 +1946,12 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,
ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
- ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68,
- ERRCOUNT };
+ ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
+ ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERRCOUNT };
+
+/* JIT compiling modes. The function list is indexed by them. */
+enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE,
+ JIT_NUMBER_OF_COMPILE_MODES };
/* The real format of the start of the pcre block; the index of names and the
code vector run on as long as necessary after the end. We store an explicit
@@ -1593,24 +1970,29 @@ fields are present. Currently PCRE always sets the dummy fields to zero.
NOTE NOTE NOTE
*/
-typedef struct real_pcre {
+#ifdef COMPILE_PCRE8
+#define REAL_PCRE real_pcre
+#else
+#define REAL_PCRE real_pcre16
+#endif
+
+typedef struct REAL_PCRE {
pcre_uint32 magic_number;
pcre_uint32 size; /* Total that was malloced */
pcre_uint32 options; /* Public options */
pcre_uint16 flags; /* Private flags */
- pcre_uint16 dummy1; /* For future use */
- pcre_uint16 top_bracket;
- pcre_uint16 top_backref;
- pcre_uint16 first_byte;
- pcre_uint16 req_byte;
+ pcre_uint16 max_lookbehind; /* Longest lookbehind (characters) */
+ pcre_uint16 top_bracket; /* Highest numbered group */
+ pcre_uint16 top_backref; /* Highest numbered back reference */
+ pcre_uint16 first_char; /* Starting character */
+ pcre_uint16 req_char; /* This character must be seen */
pcre_uint16 name_table_offset; /* Offset to name table that follows */
pcre_uint16 name_entry_size; /* Size of any name items */
pcre_uint16 name_count; /* Number of name items */
pcre_uint16 ref_count; /* Reference count */
-
- const unsigned char *tables; /* Pointer to tables or NULL for std */
- const unsigned char *nullpad; /* NULL padding */
-} real_pcre;
+ const pcre_uint8 *tables; /* Pointer to tables or NULL for std */
+ const pcre_uint8 *nullpad; /* NULL padding */
+} REAL_PCRE;
/* The format of the block used to store data from pcre_study(). The same
remark (see NOTE above) about extending this structure applies. */
@@ -1618,7 +2000,7 @@ remark (see NOTE above) about extending this structure applies. */
typedef struct pcre_study_data {
pcre_uint32 size; /* Total that was malloced */
pcre_uint32 flags; /* Private flags */
- uschar start_bits[32]; /* Starting char bits */
+ pcre_uint8 start_bits[32]; /* Starting char bits */
pcre_uint32 minlength; /* Minimum subject length */
} pcre_study_data;
@@ -1637,60 +2019,71 @@ typedef struct open_capitem {
doing the compiling, so that they are thread-safe. */
typedef struct compile_data {
- const uschar *lcc; /* Points to lower casing table */
- const uschar *fcc; /* Points to case-flipping table */
- const uschar *cbits; /* Points to character type table */
- const uschar *ctypes; /* Points to table of type maps */
- const uschar *start_workspace;/* The start of working space */
- const uschar *start_code; /* The start of the compiled code */
- const uschar *start_pattern; /* The start of the pattern */
- const uschar *end_pattern; /* The end of the pattern */
- open_capitem *open_caps; /* Chain of open capture items */
- uschar *hwm; /* High watermark of workspace */
- uschar *name_table; /* The name/number table */
- int names_found; /* Number of entries so far */
- int name_entry_size; /* Size of each entry */
- int bracount; /* Count of capturing parens as we compile */
- int final_bracount; /* Saved value after first pass */
- int top_backref; /* Maximum back reference */
- unsigned int backref_map; /* Bitmap of low back refs */
- int external_options; /* External (initial) options */
- int external_flags; /* External flag bits to be set */
- int req_varyopt; /* "After variable item" flag for reqbyte */
- BOOL had_accept; /* (*ACCEPT) encountered */
- BOOL check_lookbehind; /* Lookbehinds need later checking */
- int nltype; /* Newline type */
- int nllen; /* Newline string length */
- uschar nl[4]; /* Newline string when fixed length */
+ const pcre_uint8 *lcc; /* Points to lower casing table */
+ const pcre_uint8 *fcc; /* Points to case-flipping table */
+ const pcre_uint8 *cbits; /* Points to character type table */
+ const pcre_uint8 *ctypes; /* Points to table of type maps */
+ const pcre_uchar *start_workspace;/* The start of working space */
+ const pcre_uchar *start_code; /* The start of the compiled code */
+ const pcre_uchar *start_pattern; /* The start of the pattern */
+ const pcre_uchar *end_pattern; /* The end of the pattern */
+ open_capitem *open_caps; /* Chain of open capture items */
+ pcre_uchar *hwm; /* High watermark of workspace */
+ pcre_uchar *name_table; /* The name/number table */
+ int names_found; /* Number of entries so far */
+ int name_entry_size; /* Size of each entry */
+ int workspace_size; /* Size of workspace */
+ int bracount; /* Count of capturing parens as we compile */
+ int final_bracount; /* Saved value after first pass */
+ int max_lookbehind; /* Maximum lookbehind (characters) */
+ int top_backref; /* Maximum back reference */
+ unsigned int backref_map; /* Bitmap of low back refs */
+ int assert_depth; /* Depth of nested assertions */
+ int external_options; /* External (initial) options */
+ int external_flags; /* External flag bits to be set */
+ int req_varyopt; /* "After variable item" flag for reqbyte */
+ BOOL had_accept; /* (*ACCEPT) encountered */
+ BOOL check_lookbehind; /* Lookbehinds need later checking */
+ int nltype; /* Newline type */
+ int nllen; /* Newline string length */
+ pcre_uchar nl[4]; /* Newline string when fixed length */
} compile_data;
/* Structure for maintaining a chain of pointers to the currently incomplete
-branches, for testing for left recursion. */
+branches, for testing for left recursion while compiling. */
typedef struct branch_chain {
struct branch_chain *outer;
- uschar *current_branch;
+ pcre_uchar *current_branch;
} branch_chain;
/* Structure for items in a linked list that represents an explicit recursive
-call within the pattern. */
+call within the pattern; used by pcre_exec(). */
typedef struct recursion_info {
struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
- int group_num; /* Number of group that was called */
- const uschar *after_call; /* "Return value": points after the call in the expr */
- int *offset_save; /* Pointer to start of saved offsets */
- int saved_max; /* Number of saved offsets */
- int save_offset_top; /* Current value of offset_top */
+ int group_num; /* Number of group that was called */
+ int *offset_save; /* Pointer to start of saved offsets */
+ int saved_max; /* Number of saved offsets */
+ PCRE_PUCHAR subject_position; /* Position at start of recursion */
} recursion_info;
+/* A similar structure for pcre_dfa_exec(). */
+
+typedef struct dfa_recursion_info {
+ struct dfa_recursion_info *prevrec;
+ int group_num;
+ PCRE_PUCHAR subject_position;
+} dfa_recursion_info;
+
/* Structure for building a chain of data for holding the values of the subject
pointer at the start of each subpattern, so as to detect when an empty string
-has been matched by a subpattern - to break infinite loops. */
+has been matched by a subpattern - to break infinite loops; used by
+pcre_exec(). */
typedef struct eptrblock {
struct eptrblock *epb_prev;
- USPTR epb_saved_eptr;
+ PCRE_PUCHAR epb_saved_eptr;
} eptrblock;
@@ -1701,61 +2094,71 @@ typedef struct match_data {
unsigned long int match_call_count; /* As it says */
unsigned long int match_limit; /* As it says */
unsigned long int match_limit_recursion; /* As it says */
- int *offset_vector; /* Offset vector */
- int offset_end; /* One past the end */
- int offset_max; /* The maximum usable for return data */
- int nltype; /* Newline type */
- int nllen; /* Newline string length */
- int name_count; /* Number of names in name table */
- int name_entry_size; /* Size of entry in names table */
- uschar *name_table; /* Table of names */
- uschar nl[4]; /* Newline string when fixed */
- const uschar *lcc; /* Points to lower casing table */
- const uschar *ctypes; /* Points to table of type maps */
- BOOL offset_overflow; /* Set if too many extractions */
- BOOL notbol; /* NOTBOL flag */
- BOOL noteol; /* NOTEOL flag */
- BOOL utf8; /* UTF8 flag */
- BOOL jscript_compat; /* JAVASCRIPT_COMPAT flag */
- BOOL use_ucp; /* PCRE_UCP flag */
- BOOL endonly; /* Dollar not before final \n */
- BOOL notempty; /* Empty string match not wanted */
- BOOL notempty_atstart; /* Empty string match at start not wanted */
- BOOL hitend; /* Hit the end of the subject at some point */
- BOOL bsr_anycrlf; /* \R is just any CRLF, not full Unicode */
- const uschar *start_code; /* For use when recursing */
- USPTR start_subject; /* Start of the subject string */
- USPTR end_subject; /* End of the subject string */
- USPTR start_match_ptr; /* Start of matched string */
- USPTR end_match_ptr; /* Subject position at end match */
- USPTR start_used_ptr; /* Earliest consulted character */
- int partial; /* PARTIAL options */
- int end_offset_top; /* Highwater mark at end of match */
- int capture_last; /* Most recent capture number */
- int start_offset; /* The start offset value */
- eptrblock *eptrchain; /* Chain of eptrblocks for tail recursions */
- int eptrn; /* Next free eptrblock */
- recursion_info *recursive; /* Linked list of recursion data */
- void *callout_data; /* To pass back to callouts */
- const uschar *mark; /* Mark pointer to pass back */
+ int *offset_vector; /* Offset vector */
+ int offset_end; /* One past the end */
+ int offset_max; /* The maximum usable for return data */
+ int nltype; /* Newline type */
+ int nllen; /* Newline string length */
+ int name_count; /* Number of names in name table */
+ int name_entry_size; /* Size of entry in names table */
+ pcre_uchar *name_table; /* Table of names */
+ pcre_uchar nl[4]; /* Newline string when fixed */
+ const pcre_uint8 *lcc; /* Points to lower casing table */
+ const pcre_uint8 *fcc; /* Points to case-flipping table */
+ const pcre_uint8 *ctypes; /* Points to table of type maps */
+ BOOL offset_overflow; /* Set if too many extractions */
+ BOOL notbol; /* NOTBOL flag */
+ BOOL noteol; /* NOTEOL flag */
+ BOOL utf; /* UTF-8 / UTF-16 flag */
+ BOOL jscript_compat; /* JAVASCRIPT_COMPAT flag */
+ BOOL use_ucp; /* PCRE_UCP flag */
+ BOOL endonly; /* Dollar not before final \n */
+ BOOL notempty; /* Empty string match not wanted */
+ BOOL notempty_atstart; /* Empty string match at start not wanted */
+ BOOL hitend; /* Hit the end of the subject at some point */
+ BOOL bsr_anycrlf; /* \R is just any CRLF, not full Unicode */
+ BOOL hasthen; /* Pattern contains (*THEN) */
+ BOOL ignore_skip_arg; /* For re-run when SKIP name not found */
+ const pcre_uchar *start_code; /* For use when recursing */
+ PCRE_PUCHAR start_subject; /* Start of the subject string */
+ PCRE_PUCHAR end_subject; /* End of the subject string */
+ PCRE_PUCHAR start_match_ptr; /* Start of matched string */
+ PCRE_PUCHAR end_match_ptr; /* Subject position at end match */
+ PCRE_PUCHAR start_used_ptr; /* Earliest consulted character */
+ int partial; /* PARTIAL options */
+ int end_offset_top; /* Highwater mark at end of match */
+ int capture_last; /* Most recent capture number */
+ int start_offset; /* The start offset value */
+ int match_function_type; /* Set for certain special calls of MATCH() */
+ eptrblock *eptrchain; /* Chain of eptrblocks for tail recursions */
+ int eptrn; /* Next free eptrblock */
+ recursion_info *recursive; /* Linked list of recursion data */
+ void *callout_data; /* To pass back to callouts */
+ const pcre_uchar *mark; /* Mark pointer to pass back on success */
+ const pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */
+ const pcre_uchar *once_target; /* Where to back up to for atomic groups */
+#ifdef NO_RECURSE
+ void *match_frames_base; /* For remembering malloc'd frames */
+#endif
} match_data;
/* A similar structure is used for the same purpose by the DFA matching
functions. */
typedef struct dfa_match_data {
- const uschar *start_code; /* Start of the compiled pattern */
- const uschar *start_subject; /* Start of the subject string */
- const uschar *end_subject; /* End of subject string */
- const uschar *start_used_ptr; /* Earliest consulted character */
- const uschar *tables; /* Character tables */
- int start_offset; /* The start offset value */
- int moptions; /* Match options */
- int poptions; /* Pattern options */
- int nltype; /* Newline type */
- int nllen; /* Newline string length */
- uschar nl[4]; /* Newline string when fixed */
- void *callout_data; /* To pass back to callouts */
+ const pcre_uchar *start_code; /* Start of the compiled pattern */
+ const pcre_uchar *start_subject ; /* Start of the subject string */
+ const pcre_uchar *end_subject; /* End of subject string */
+ const pcre_uchar *start_used_ptr; /* Earliest consulted character */
+ const pcre_uint8 *tables; /* Character tables */
+ int start_offset; /* The start offset value */
+ int moptions; /* Match options */
+ int poptions; /* Pattern options */
+ int nltype; /* Newline type */
+ int nllen; /* Newline string length */
+ pcre_uchar nl[4]; /* Newline string when fixed */
+ void *callout_data; /* To pass back to callouts */
+ dfa_recursion_info *recursive; /* Linked list of recursion data */
} dfa_match_data;
/* Bit definitions for entries in the pcre_ctypes table. */
@@ -1791,6 +2194,28 @@ total length. */
#define ctypes_offset (cbits_offset + cbit_length)
#define tables_length (ctypes_offset + 256)
+/* Internal function and data prefixes. */
+
+#ifdef COMPILE_PCRE8
+#ifndef PUBL
+#define PUBL(name) pcre_##name
+#endif
+#ifndef PRIV
+#define PRIV(name) _pcre_##name
+#endif
+#else /* COMPILE_PCRE8 */
+#ifdef COMPILE_PCRE16
+#ifndef PUBL
+#define PUBL(name) pcre16_##name
+#endif
+#ifndef PRIV
+#define PRIV(name) _pcre16_##name
+#endif
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE16 */
+#endif /* COMPILE_PCRE8 */
+
/* Layout of the UCP type table that translates property names into types and
codes. Each entry used to point directly to a name, but to reduce the number of
relocations in shared libraries, it now has an offset into a single string
@@ -1808,62 +2233,116 @@ of the exported public functions. They have to be "external" in the C sense,
but are not part of the PCRE public API. The data for these tables is in the
pcre_tables.c module. */
-extern const int _pcre_utf8_table1[];
-extern const int _pcre_utf8_table2[];
-extern const int _pcre_utf8_table3[];
-extern const uschar _pcre_utf8_table4[];
+#ifdef COMPILE_PCRE8
+
+extern const int PRIV(utf8_table1)[];
+extern const int PRIV(utf8_table1_size);
+extern const int PRIV(utf8_table2)[];
+extern const int PRIV(utf8_table3)[];
+extern const pcre_uint8 PRIV(utf8_table4)[];
-extern const int _pcre_utf8_table1_size;
+#endif /* COMPILE_PCRE8 */
-extern const char _pcre_utt_names[];
-extern const ucp_type_table _pcre_utt[];
-extern const int _pcre_utt_size;
+extern const char PRIV(utt_names)[];
+extern const ucp_type_table PRIV(utt)[];
+extern const int PRIV(utt_size);
-extern const uschar _pcre_default_tables[];
+extern const pcre_uint8 PRIV(default_tables)[];
-extern const uschar _pcre_OP_lengths[];
+extern const pcre_uint8 PRIV(OP_lengths)[];
/* Internal shared functions. These are functions that are used by more than
one of the exported public functions. They have to be "external" in the C
sense, but are not part of the PCRE public API. */
-extern const uschar *_pcre_find_bracket(const uschar *, BOOL, int);
-extern BOOL _pcre_is_newline(USPTR, int, USPTR, int *, BOOL);
-extern int _pcre_ord2utf8(int, uschar *);
-extern real_pcre *_pcre_try_flipped(const real_pcre *, real_pcre *,
- const pcre_study_data *, pcre_study_data *);
-extern int _pcre_valid_utf8(USPTR, int);
-extern BOOL _pcre_was_newline(USPTR, int, USPTR, int *, BOOL);
-extern BOOL _pcre_xclass(int, const uschar *);
+/* String comparison functions. */
+#ifdef COMPILE_PCRE8
+
+#define STRCMP_UC_UC(str1, str2) \
+ strcmp((char *)(str1), (char *)(str2))
+#define STRCMP_UC_C8(str1, str2) \
+ strcmp((char *)(str1), (str2))
+#define STRNCMP_UC_UC(str1, str2, num) \
+ strncmp((char *)(str1), (char *)(str2), (num))
+#define STRNCMP_UC_C8(str1, str2, num) \
+ strncmp((char *)(str1), (str2), (num))
+#define STRLEN_UC(str) strlen((const char *)str)
+
+#else
+extern int PRIV(strcmp_uc_uc)(const pcre_uchar *,
+ const pcre_uchar *);
+extern int PRIV(strcmp_uc_c8)(const pcre_uchar *,
+ const char *);
+extern int PRIV(strncmp_uc_uc)(const pcre_uchar *,
+ const pcre_uchar *, unsigned int num);
+extern int PRIV(strncmp_uc_c8)(const pcre_uchar *,
+ const char *, unsigned int num);
+extern unsigned int PRIV(strlen_uc)(const pcre_uchar *str);
+
+#define STRCMP_UC_UC(str1, str2) \
+ PRIV(strcmp_uc_uc)((str1), (str2))
+#define STRCMP_UC_C8(str1, str2) \
+ PRIV(strcmp_uc_c8)((str1), (str2))
+#define STRNCMP_UC_UC(str1, str2, num) \
+ PRIV(strncmp_uc_uc)((str1), (str2), (num))
+#define STRNCMP_UC_C8(str1, str2, num) \
+ PRIV(strncmp_uc_c8)((str1), (str2), (num))
+#define STRLEN_UC(str) PRIV(strlen_uc)(str)
+
+#endif /* COMPILE_PCRE8 */
+
+extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);
+extern BOOL PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
+ int *, BOOL);
+extern int PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
+extern int PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
+extern BOOL PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
+ int *, BOOL);
+extern BOOL PRIV(xclass)(int, const pcre_uchar *, BOOL);
+
+#ifdef SUPPORT_JIT
+extern void PRIV(jit_compile)(const REAL_PCRE *,
+ PUBL(extra) *, int);
+extern int PRIV(jit_exec)(const REAL_PCRE *, const PUBL(extra) *,
+ const pcre_uchar *, int, int, int, int *, int);
+extern void PRIV(jit_free)(void *);
+extern int PRIV(jit_get_size)(void *);
+extern const char* PRIV(jit_get_target)(void);
+#endif
/* Unicode character database (UCD) */
typedef struct {
- uschar script;
- uschar chartype;
+ pcre_uint8 script;
+ pcre_uint8 chartype;
pcre_int32 other_case;
} ucd_record;
-extern const ucd_record _pcre_ucd_records[];
-extern const uschar _pcre_ucd_stage1[];
-extern const pcre_uint16 _pcre_ucd_stage2[];
-extern const int _pcre_ucp_gentype[];
-
+extern const ucd_record PRIV(ucd_records)[];
+extern const pcre_uint8 PRIV(ucd_stage1)[];
+extern const pcre_uint16 PRIV(ucd_stage2)[];
+extern const int PRIV(ucp_gentype)[];
+#ifdef SUPPORT_JIT
+extern const int PRIV(ucp_typerange)[];
+#endif
+#ifdef SUPPORT_UCP
/* UCD access macros */
#define UCD_BLOCK_SIZE 128
-#define GET_UCD(ch) (_pcre_ucd_records + \
- _pcre_ucd_stage2[_pcre_ucd_stage1[(ch) / UCD_BLOCK_SIZE] * \
- UCD_BLOCK_SIZE + ch % UCD_BLOCK_SIZE])
+#define GET_UCD(ch) (PRIV(ucd_records) + \
+ PRIV(ucd_stage2)[PRIV(ucd_stage1)[(ch) / UCD_BLOCK_SIZE] * \
+ UCD_BLOCK_SIZE + (ch) % UCD_BLOCK_SIZE])
#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype
#define UCD_SCRIPT(ch) GET_UCD(ch)->script
-#define UCD_CATEGORY(ch) _pcre_ucp_gentype[UCD_CHARTYPE(ch)]
+#define UCD_CATEGORY(ch) PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
#define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case)
+#endif /* SUPPORT_UCP */
+
#endif
/* End of pcre_internal.h */
diff --git a/ext/pcre/pcrelib/pcre_maketables.c b/ext/pcre/pcrelib/pcre_maketables.c
index 2ba612cec..5c73b75f7 100644
--- a/ext/pcre/pcrelib/pcre_maketables.c
+++ b/ext/pcre/pcrelib/pcre_maketables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -57,21 +57,26 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */
/* This function builds a set of character tables for use by PCRE and returns
a pointer to them. They are build using the ctype functions, and consequently
their contents will depend upon the current locale setting. When compiled as
-part of the library, the store is obtained via pcre_malloc(), but when compiled
-inside dftables, use malloc().
+part of the library, the store is obtained via PUBL(malloc)(), but when
+compiled inside dftables, use malloc().
Arguments: none
Returns: pointer to the contiguous block of data
*/
+#ifdef COMPILE_PCRE8
const unsigned char *
pcre_maketables(void)
+#else
+const unsigned char *
+pcre16_maketables(void)
+#endif
{
unsigned char *yield, *p;
int i;
#ifndef DFTABLES
-yield = (unsigned char*)(pcre_malloc)(tables_length);
+yield = (unsigned char*)(PUBL(malloc))(tables_length);
#else
yield = (unsigned char*)malloc(tables_length);
#endif
diff --git a/ext/pcre/pcrelib/pcre_newline.c b/ext/pcre/pcrelib/pcre_newline.c
index 3f6160ef2..ddd7708fa 100644
--- a/ext/pcre/pcrelib/pcre_newline.c
+++ b/ext/pcre/pcrelib/pcre_newline.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -65,16 +65,25 @@ Arguments:
type the newline type
endptr pointer to the end of the string
lenptr where to return the length
- utf8 TRUE if in utf8 mode
+ utf TRUE if in utf mode
Returns: TRUE or FALSE
*/
BOOL
-_pcre_is_newline(USPTR ptr, int type, USPTR endptr, int *lenptr, BOOL utf8)
+PRIV(is_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR endptr, int *lenptr,
+ BOOL utf)
{
int c;
-if (utf8) { GETCHAR(c, ptr); } else c = *ptr;
+(void)utf;
+#ifdef SUPPORT_UTF
+if (utf)
+ {
+ GETCHAR(c, ptr);
+ }
+else
+#endif /* SUPPORT_UTF */
+ c = *ptr;
if (type == NLTYPE_ANYCRLF) switch(c)
{
@@ -93,9 +102,15 @@ else switch(c)
case 0x000c: *lenptr = 1; return TRUE; /* FF */
case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1;
return TRUE; /* CR */
- case 0x0085: *lenptr = utf8? 2 : 1; return TRUE; /* NEL */
+#ifdef COMPILE_PCRE8
+ case 0x0085: *lenptr = utf? 2 : 1; return TRUE; /* NEL */
case 0x2028: /* LS */
case 0x2029: *lenptr = 3; return TRUE; /* PS */
+#else
+ case 0x0085: /* NEL */
+ case 0x2028: /* LS */
+ case 0x2029: *lenptr = 1; return TRUE; /* PS */
+#endif /* COMPILE_PCRE8 */
default: return FALSE;
}
}
@@ -114,26 +129,27 @@ Arguments:
type the newline type
startptr pointer to the start of the string
lenptr where to return the length
- utf8 TRUE if in utf8 mode
+ utf TRUE if in utf mode
Returns: TRUE or FALSE
*/
BOOL
-_pcre_was_newline(USPTR ptr, int type, USPTR startptr, int *lenptr, BOOL utf8)
+PRIV(was_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR startptr, int *lenptr,
+ BOOL utf)
{
int c;
+(void)utf;
ptr--;
-#ifdef SUPPORT_UTF8
-if (utf8)
+#ifdef SUPPORT_UTF
+if (utf)
{
BACKCHAR(ptr);
GETCHAR(c, ptr);
}
-else c = *ptr;
-#else /* no UTF-8 support */
-c = *ptr;
-#endif /* SUPPORT_UTF8 */
+else
+#endif /* SUPPORT_UTF */
+ c = *ptr;
if (type == NLTYPE_ANYCRLF) switch(c)
{
@@ -150,9 +166,15 @@ else switch(c)
case 0x000b: /* VT */
case 0x000c: /* FF */
case 0x000d: *lenptr = 1; return TRUE; /* CR */
- case 0x0085: *lenptr = utf8? 2 : 1; return TRUE; /* NEL */
+#ifdef COMPILE_PCRE8
+ case 0x0085: *lenptr = utf? 2 : 1; return TRUE; /* NEL */
case 0x2028: /* LS */
case 0x2029: *lenptr = 3; return TRUE; /* PS */
+#else
+ case 0x0085: /* NEL */
+ case 0x2028: /* LS */
+ case 0x2029: *lenptr = 1; return TRUE; /* PS */
+#endif /* COMPILE_PCRE8 */
default: return FALSE;
}
}
diff --git a/ext/pcre/pcrelib/pcre_ord2utf8.c b/ext/pcre/pcrelib/pcre_ord2utf8.c
index 7931241d6..917d943f0 100644
--- a/ext/pcre/pcrelib/pcre_ord2utf8.c
+++ b/ext/pcre/pcrelib/pcre_ord2utf8.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -50,35 +50,45 @@ character value into a UTF8 string. */
* Convert character value to UTF-8 *
*************************************************/
-/* This function takes an integer value in the range 0 - 0x7fffffff
-and encodes it as a UTF-8 character in 0 to 6 bytes.
+/* This function takes an integer value in the range 0 - 0x10ffff
+and encodes it as a UTF-8 character in 1 to 6 pcre_uchars.
Arguments:
cvalue the character value
- buffer pointer to buffer for result - at least 6 bytes long
+ buffer pointer to buffer for result - at least 6 pcre_uchars long
Returns: number of characters placed in the buffer
*/
int
-_pcre_ord2utf8(int cvalue, uschar *buffer)
+PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
{
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
+
register int i, j;
-for (i = 0; i < _pcre_utf8_table1_size; i++)
- if (cvalue <= _pcre_utf8_table1[i]) break;
+
+/* Checking invalid cvalue character, encoded as invalid UTF-16 character.
+Should never happen in practice. */
+if ((cvalue & 0xf800) == 0xd800 || cvalue >= 0x110000)
+ cvalue = 0xfffe;
+
+for (i = 0; i < PRIV(utf8_table1_size); i++)
+ if ((int)cvalue <= PRIV(utf8_table1)[i]) break;
buffer += i;
for (j = i; j > 0; j--)
{
*buffer-- = 0x80 | (cvalue & 0x3f);
cvalue >>= 6;
}
-*buffer = _pcre_utf8_table2[i] | cvalue;
+*buffer = PRIV(utf8_table2)[i] | cvalue;
return i + 1;
+
#else
+
(void)(cvalue); /* Keep compiler happy; this function won't ever be */
-(void)(buffer); /* called when SUPPORT_UTF8 is not defined. */
+(void)(buffer); /* called when SUPPORT_UTF is not defined. */
return 0;
+
#endif
}
diff --git a/ext/pcre/pcrelib/pcre_refcount.c b/ext/pcre/pcrelib/pcre_refcount.c
index c92d578e6..ec16713f0 100644
--- a/ext/pcre/pcrelib/pcre_refcount.c
+++ b/ext/pcre/pcrelib/pcre_refcount.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -66,11 +66,18 @@ Returns: the (possibly updated) count value (a non-negative number), or
a negative error number
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
pcre_refcount(pcre *argument_re, int adjust)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_refcount(pcre16 *argument_re, int adjust)
+#endif
{
-real_pcre *re = (real_pcre *)argument_re;
+REAL_PCRE *re = (REAL_PCRE *)argument_re;
if (re == NULL) return PCRE_ERROR_NULL;
+if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
re->ref_count = (-adjust > re->ref_count)? 0 :
(adjust + re->ref_count > 65535)? 65535 :
re->ref_count + adjust;
diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c
index 431ad9d0d..9d893d5e2 100644
--- a/ext/pcre/pcrelib/pcre_study.c
+++ b/ext/pcre/pcrelib/pcre_study.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,7 @@ supporting functions. */
/* Returns from set_start_bits() */
-enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE };
+enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE, SSB_UNKNOWN };
@@ -64,25 +64,30 @@ string of that length that matches. In UTF8 mode, the result is in characters
rather than bytes.
Arguments:
- code pointer to start of group (the bracket)
- startcode pointer to start of the whole pattern
- options the compiling options
+ code pointer to start of group (the bracket)
+ startcode pointer to start of the whole pattern
+ options the compiling options
+ int RECURSE depth
Returns: the minimum length
- -1 if \C was encountered
+ -1 if \C in UTF-8 mode or (*ACCEPT) was encountered
-2 internal error (missing capturing bracket)
+ -3 internal error (opcode not listed)
*/
static int
-find_minlength(const uschar *code, const uschar *startcode, int options)
+find_minlength(const pcre_uchar *code, const pcre_uchar *startcode, int options,
+ int recurse_depth)
{
int length = -1;
-BOOL utf8 = (options & PCRE_UTF8) != 0;
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+BOOL utf = (options & PCRE_UTF8) != 0;
BOOL had_recurse = FALSE;
register int branchlength = 0;
-register uschar *cc = (uschar *)code + 1 + LINK_SIZE;
+register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE;
-if (*code == OP_CBRA || *code == OP_SCBRA) cc += 2;
+if (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS) cc += IMM2_SIZE;
/* Scan along the opcodes for this branch. If we get to the end of the
branch, check the length against that of the other branches. */
@@ -90,7 +95,7 @@ branch, check the length against that of the other branches. */
for (;;)
{
int d, min;
- uschar *cs, *ce;
+ pcre_uchar *cs, *ce;
register int op = *cc;
switch (op)
@@ -116,26 +121,40 @@ for (;;)
case OP_SCBRA:
case OP_BRA:
case OP_SBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
case OP_ONCE:
- d = find_minlength(cc, startcode, options);
+ case OP_ONCE_NC:
+ d = find_minlength(cc, startcode, options, recurse_depth);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
cc += 1 + LINK_SIZE;
break;
+ /* ACCEPT makes things far too complicated; we have to give up. */
+
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ return -1;
+
/* Reached end of a branch; if it's a ket it is the end of a nested
- call. If it's ALT it is an alternation in a nested call. If it is
- END it's the end of the outer call. All can be handled by the same code. */
+ call. If it's ALT it is an alternation in a nested call. If it is END it's
+ the end of the outer call. All can be handled by the same code. If an
+ ACCEPT was previously encountered, use the length that was in force at that
+ time, and pass back the shortest ACCEPT length. */
case OP_ALT:
case OP_KET:
case OP_KETRMAX:
case OP_KETRMIN:
+ case OP_KETRPOS:
case OP_END:
if (length < 0 || (!had_recurse && branchlength < length))
length = branchlength;
- if (*cc != OP_ALT) return length;
+ if (op != OP_ALT) return length;
cc += 1 + LINK_SIZE;
branchlength = 0;
had_recurse = FALSE;
@@ -158,25 +177,27 @@ for (;;)
case OP_RREF:
case OP_NRREF:
case OP_DEF:
- case OP_OPT:
case OP_CALLOUT:
case OP_SOD:
case OP_SOM:
case OP_EOD:
case OP_EODN:
case OP_CIRC:
+ case OP_CIRCM:
case OP_DOLL:
+ case OP_DOLLM:
case OP_NOT_WORD_BOUNDARY:
case OP_WORD_BOUNDARY:
- cc += _pcre_OP_lengths[*cc];
+ cc += PRIV(OP_lengths)[*cc];
break;
/* Skip over a subpattern that has a {0} or {0,x} quantifier */
case OP_BRAZERO:
case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
case OP_SKIPZERO:
- cc += _pcre_OP_lengths[*cc];
+ cc += PRIV(OP_lengths)[*cc];
do cc += GET(cc, 1); while (*cc == OP_ALT);
cc += 1 + LINK_SIZE;
break;
@@ -184,18 +205,25 @@ for (;;)
/* Handle literal characters and + repetitions */
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_NOT:
+ case OP_NOTI:
case OP_PLUS:
+ case OP_PLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
case OP_POSPLUS:
+ case OP_POSPLUSI:
case OP_NOTPLUS:
+ case OP_NOTPLUSI:
case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
branchlength++;
cc += 2;
-#ifdef SUPPORT_UTF8
- if (utf8 && cc[-1] >= 0xc0) cc += _pcre_utf8_table4[cc[-1] & 0x3f];
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
@@ -210,17 +238,20 @@ for (;;)
need to skip over a multibyte character in UTF8 mode. */
case OP_EXACT:
+ case OP_EXACTI:
case OP_NOTEXACT:
+ case OP_NOTEXACTI:
branchlength += GET2(cc,1);
- cc += 4;
-#ifdef SUPPORT_UTF8
- if (utf8 && cc[-1] >= 0xc0) cc += _pcre_utf8_table4[cc[-1] & 0x3f];
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
case OP_TYPEEXACT:
branchlength += GET2(cc,1);
- cc += (cc[3] == OP_PROP || cc[3] == OP_NOTPROP)? 6 : 4;
+ cc += 2 + IMM2_SIZE + ((cc[1 + IMM2_SIZE] == OP_PROP
+ || cc[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
break;
/* Handle single-char non-literal matchers */
@@ -247,18 +278,21 @@ for (;;)
cc++;
break;
- /* "Any newline" might match two characters */
+ /* "Any newline" might match two characters, but it also might match just
+ one. */
case OP_ANYNL:
- branchlength += 2;
+ branchlength += 1;
cc++;
break;
- /* The single-byte matcher means we can't proceed in UTF-8 mode */
+ /* The single-byte matcher means we can't proceed in UTF-8 mode. (In
+ non-UTF-8 mode \C will actually be turned into OP_ALLANY, so won't ever
+ appear, but leave the code, just in case.) */
case OP_ANYBYTE:
-#ifdef SUPPORT_UTF8
- if (utf8) return -1;
+#ifdef SUPPORT_UTF
+ if (utf) return -1;
#endif
branchlength++;
cc++;
@@ -274,27 +308,28 @@ for (;;)
case OP_TYPEPOSSTAR:
case OP_TYPEPOSQUERY:
if (cc[1] == OP_PROP || cc[1] == OP_NOTPROP) cc += 2;
- cc += _pcre_OP_lengths[op];
+ cc += PRIV(OP_lengths)[op];
break;
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEPOSUPTO:
- if (cc[3] == OP_PROP || cc[3] == OP_NOTPROP) cc += 2;
- cc += _pcre_OP_lengths[op];
+ if (cc[1 + IMM2_SIZE] == OP_PROP
+ || cc[1 + IMM2_SIZE] == OP_NOTPROP) cc += 2;
+ cc += PRIV(OP_lengths)[op];
break;
/* Check a class for variable quantification */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
case OP_XCLASS:
- cc += GET(cc, 1) - 33;
+ cc += GET(cc, 1) - PRIV(OP_lengths)[OP_CLASS];
/* Fall through */
#endif
case OP_CLASS:
case OP_NCLASS:
- cc += 33;
+ cc += PRIV(OP_lengths)[OP_CLASS];
switch (*cc)
{
@@ -313,7 +348,7 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
branchlength += GET2(cc,1);
- cc += 5;
+ cc += 1 + 2 * IMM2_SIZE;
break;
default:
@@ -335,9 +370,10 @@ for (;;)
that case we must set the minimum length to zero. */
case OP_REF:
+ case OP_REFI:
if ((options & PCRE_JAVASCRIPT_COMPAT) == 0)
{
- ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1));
+ ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
if (cs == NULL) return -2;
do ce += GET(ce, 1); while (*ce == OP_ALT);
if (cc > cs && cc < ce)
@@ -345,10 +381,13 @@ for (;;)
d = 0;
had_recurse = TRUE;
}
- else d = find_minlength(cs, startcode, options);
+ else
+ {
+ d = find_minlength(cs, startcode, options, recurse_depth);
+ }
}
else d = 0;
- cc += 3;
+ cc += 1 + IMM2_SIZE;
/* Handle repeated back references */
@@ -362,10 +401,16 @@ for (;;)
cc++;
break;
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ min = 1;
+ cc++;
+ break;
+
case OP_CRRANGE:
case OP_CRMINRANGE:
min = GET2(cc, 1);
- cc += 5;
+ cc += 1 + 2 * IMM2_SIZE;
break;
default:
@@ -376,39 +421,71 @@ for (;;)
branchlength += min * d;
break;
+ /* We can easily detect direct recursion, but not mutual recursion. This is
+ caught by a recursion depth count. */
+
case OP_RECURSE:
- cs = ce = (uschar *)startcode + GET(cc, 1);
- if (cs == NULL) return -2;
+ cs = ce = (pcre_uchar *)startcode + GET(cc, 1);
do ce += GET(ce, 1); while (*ce == OP_ALT);
- if (cc > cs && cc < ce)
+ if ((cc > cs && cc < ce) || recurse_depth > 10)
had_recurse = TRUE;
else
- branchlength += find_minlength(cs, startcode, options);
+ {
+ branchlength += find_minlength(cs, startcode, options, recurse_depth + 1);
+ }
cc += 1 + LINK_SIZE;
break;
/* Anything else does not or need not match a character. We can get the
item's length from the table, but for those that can match zero occurrences
- of a character, we must take special action for UTF-8 characters. */
+ of a character, we must take special action for UTF-8 characters. As it
+ happens, the "NOT" versions of these opcodes are used at present only for
+ ASCII characters, so they could be omitted from this list. However, in
+ future that may change, so we include them here so as not to leave a
+ gotcha for a future maintainer. */
case OP_UPTO:
+ case OP_UPTOI:
case OP_NOTUPTO:
+ case OP_NOTUPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+
case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+
case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
case OP_POSQUERY:
+ case OP_POSQUERYI:
case OP_NOTPOSQUERY:
- cc += _pcre_OP_lengths[op];
-#ifdef SUPPORT_UTF8
- if (utf8 && cc[-1] >= 0xc0) cc += _pcre_utf8_table4[cc[-1] & 0x3f];
+ case OP_NOTPOSQUERYI:
+
+ cc += PRIV(OP_lengths)[op];
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
@@ -417,20 +494,27 @@ for (;;)
case OP_MARK:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
- cc += _pcre_OP_lengths[op] + cc[1];
+ case OP_THEN_ARG:
+ cc += PRIV(OP_lengths)[op] + cc[1];
break;
- case OP_THEN_ARG:
- cc += _pcre_OP_lengths[op] + cc[1+LINK_SIZE];
+ /* The remaining opcodes are just skipped over. */
+
+ case OP_CLOSE:
+ case OP_COMMIT:
+ case OP_FAIL:
+ case OP_PRUNE:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_THEN:
+ cc += PRIV(OP_lengths)[op];
break;
- /* For the record, these are the opcodes that are matched by "default":
- OP_ACCEPT, OP_CLOSE, OP_COMMIT, OP_FAIL, OP_PRUNE, OP_SET_SOM, OP_SKIP,
- OP_THEN. */
+ /* This should not occur: we list all opcodes explicitly so that when
+ new ones get added they are properly considered. */
default:
- cc += _pcre_OP_lengths[op];
- break;
+ return -3;
}
}
/* Control never gets here */
@@ -452,29 +536,30 @@ Arguments:
p points to the character
caseless the caseless flag
cd the block with char table pointers
- utf8 TRUE for UTF-8 mode
+ utf TRUE for UTF-8 / UTF-16 mode
Returns: pointer after the character
*/
-static const uschar *
-set_table_bit(uschar *start_bits, const uschar *p, BOOL caseless,
- compile_data *cd, BOOL utf8)
+static const pcre_uchar *
+set_table_bit(pcre_uint8 *start_bits, const pcre_uchar *p, BOOL caseless,
+ compile_data *cd, BOOL utf)
{
unsigned int c = *p;
+#ifdef COMPILE_PCRE8
SET_BIT(c);
-#ifdef SUPPORT_UTF8
-if (utf8 && c > 127)
+#ifdef SUPPORT_UTF
+if (utf && c > 127)
{
GETCHARINC(c, p);
#ifdef SUPPORT_UCP
if (caseless)
{
- uschar buff[8];
+ pcre_uchar buff[6];
c = UCD_OTHERCASE(c);
- (void)_pcre_ord2utf8(c, buff);
+ (void)PRIV(ord2utf)(c, buff);
SET_BIT(buff[0]);
}
#endif
@@ -486,6 +571,36 @@ if (utf8 && c > 127)
if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
return p + 1;
+#endif
+
+#ifdef COMPILE_PCRE16
+if (c > 0xff)
+ {
+ c = 0xff;
+ caseless = FALSE;
+ }
+SET_BIT(c);
+
+#ifdef SUPPORT_UTF
+if (utf && c > 127)
+ {
+ GETCHARINC(c, p);
+#ifdef SUPPORT_UCP
+ if (caseless)
+ {
+ c = UCD_OTHERCASE(c);
+ if (c > 0xff)
+ c = 0xff;
+ SET_BIT(c);
+ }
+#endif
+ return p;
+ }
+#endif
+
+if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
+return p + 1;
+#endif
}
@@ -511,21 +626,23 @@ Returns: nothing
*/
static void
-set_type_bits(uschar *start_bits, int cbit_type, int table_limit,
+set_type_bits(pcre_uint8 *start_bits, int cbit_type, int table_limit,
compile_data *cd)
{
register int c;
for (c = 0; c < table_limit; c++) start_bits[c] |= cd->cbits[c+cbit_type];
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
if (table_limit == 32) return;
for (c = 128; c < 256; c++)
{
if ((cd->cbits[c/8] & (1 << (c&7))) != 0)
{
- uschar buff[8];
- (void)_pcre_ord2utf8(c, buff);
+ pcre_uchar buff[6];
+ (void)PRIV(ord2utf)(c, buff);
SET_BIT(buff[0]);
}
}
+#endif
}
@@ -551,12 +668,14 @@ Returns: nothing
*/
static void
-set_nottype_bits(uschar *start_bits, int cbit_type, int table_limit,
+set_nottype_bits(pcre_uint8 *start_bits, int cbit_type, int table_limit,
compile_data *cd)
{
register int c;
for (c = 0; c < table_limit; c++) start_bits[c] |= ~cd->cbits[c+cbit_type];
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
if (table_limit != 32) for (c = 24; c < 32; c++) start_bits[c] = 0xff;
+#endif
}
@@ -576,22 +695,26 @@ function fails unless the result is SSB_DONE.
Arguments:
code points to an expression
start_bits points to a 32-byte table, initialized to 0
- caseless the current state of the caseless flag
- utf8 TRUE if in UTF-8 mode
+ utf TRUE if in UTF-8 / UTF-16 mode
cd the block with char table pointers
Returns: SSB_FAIL => Failed to find any starting bytes
SSB_DONE => Found mandatory starting bytes
SSB_CONTINUE => Found optional starting bytes
+ SSB_UNKNOWN => Hit an unrecognized opcode
*/
static int
-set_start_bits(const uschar *code, uschar *start_bits, BOOL caseless,
- BOOL utf8, compile_data *cd)
+set_start_bits(const pcre_uchar *code, pcre_uint8 *start_bits, BOOL utf,
+ compile_data *cd)
{
register int c;
int yield = SSB_DONE;
-int table_limit = utf8? 16:32;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+int table_limit = utf? 16:32;
+#else
+int table_limit = 32;
+#endif
#if 0
/* ========================================================================= */
@@ -612,19 +735,108 @@ volatile int dummy;
do
{
- const uschar *tcode = code + (((int)*code == OP_CBRA)? 3:1) + LINK_SIZE;
BOOL try_next = TRUE;
+ const pcre_uchar *tcode = code + 1 + LINK_SIZE;
+
+ if (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS) tcode += IMM2_SIZE;
while (try_next) /* Loop for items in this branch */
{
int rc;
+
switch(*tcode)
{
- /* Fail if we reach something we don't understand */
+ /* If we reach something we don't understand, it means a new opcode has
+ been created that hasn't been added to this code. Hopefully this problem
+ will be discovered during testing. */
default:
+ return SSB_UNKNOWN;
+
+ /* Fail for a valid opcode that implies no starting bits. */
+
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ case OP_ALLANY:
+ case OP_ANY:
+ case OP_ANYBYTE:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_CLOSE:
+ case OP_COMMIT:
+ case OP_COND:
+ case OP_CREF:
+ case OP_DEF:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_END:
+ case OP_EOD:
+ case OP_EODN:
+ case OP_EXTUNI:
+ case OP_FAIL:
+ case OP_MARK:
+ case OP_NCREF:
+ case OP_NOT:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ case OP_NOTI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_NOTPROP:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_NOT_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_NRREF:
+ case OP_PROP:
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_RECURSE:
+ case OP_REF:
+ case OP_REFI:
+ case OP_REVERSE:
+ case OP_RREF:
+ case OP_SCOND:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_THEN:
+ case OP_THEN_ARG:
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+#endif
return SSB_FAIL;
+ /* We can ignore word boundary tests. */
+
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ tcode++;
+ break;
+
/* If we hit a bracket or a positive lookahead assertion, recurse to set
bits from within the subpattern. If it can't find anything, we have to
give up. If it finds some mandatory character(s), we are done for this
@@ -634,10 +846,15 @@ do
case OP_SBRA:
case OP_CBRA:
case OP_SCBRA:
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
case OP_ONCE:
+ case OP_ONCE_NC:
case OP_ASSERT:
- rc = set_start_bits(tcode, start_bits, caseless, utf8, cd);
- if (rc == SSB_FAIL) return SSB_FAIL;
+ rc = set_start_bits(tcode, start_bits, utf, cd);
+ if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
if (rc == SSB_DONE) try_next = FALSE; else
{
do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
@@ -660,6 +877,7 @@ do
case OP_KET:
case OP_KETRMAX:
case OP_KETRMIN:
+ case OP_KETRPOS:
return SSB_CONTINUE;
/* Skip over callout */
@@ -677,19 +895,13 @@ do
tcode += 1 + LINK_SIZE;
break;
- /* Skip over an option setting, changing the caseless flag */
-
- case OP_OPT:
- caseless = (tcode[1] & PCRE_CASELESS) != 0;
- tcode += 2;
- break;
-
/* BRAZERO does the bracket, but carries on. */
case OP_BRAZERO:
case OP_BRAMINZERO:
- if (set_start_bits(++tcode, start_bits, caseless, utf8, cd) == SSB_FAIL)
- return SSB_FAIL;
+ case OP_BRAPOSZERO:
+ rc = set_start_bits(++tcode, start_bits, utf, cd);
+ if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
/* =========================================================================
See the comment at the head of this function concerning the next line,
which was an old fudge for the benefit of OS/2.
@@ -715,7 +927,16 @@ do
case OP_QUERY:
case OP_MINQUERY:
case OP_POSQUERY:
- tcode = set_table_bit(start_bits, tcode + 1, caseless, cd, utf8);
+ tcode = set_table_bit(start_bits, tcode + 1, FALSE, cd, utf);
+ break;
+
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_POSSTARI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ tcode = set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
break;
/* Single-char upto sets the bit and tries the next */
@@ -723,20 +944,36 @@ do
case OP_UPTO:
case OP_MINUPTO:
case OP_POSUPTO:
- tcode = set_table_bit(start_bits, tcode + 3, caseless, cd, utf8);
+ tcode = set_table_bit(start_bits, tcode + 1 + IMM2_SIZE, FALSE, cd, utf);
break;
- /* At least one single char sets the bit and stops */
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_POSUPTOI:
+ tcode = set_table_bit(start_bits, tcode + 1 + IMM2_SIZE, TRUE, cd, utf);
+ break;
- case OP_EXACT: /* Fall through */
- tcode += 2;
+ /* At least one single char sets the bit and stops */
+ case OP_EXACT:
+ tcode += IMM2_SIZE;
+ /* Fall through */
case OP_CHAR:
- case OP_CHARNC:
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
- (void)set_table_bit(start_bits, tcode + 1, caseless, cd, utf8);
+ (void)set_table_bit(start_bits, tcode + 1, FALSE, cd, utf);
+ try_next = FALSE;
+ break;
+
+ case OP_EXACTI:
+ tcode += IMM2_SIZE;
+ /* Fall through */
+ case OP_CHARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ (void)set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
try_next = FALSE;
break;
@@ -749,14 +986,28 @@ do
case OP_HSPACE:
SET_BIT(0x09);
SET_BIT(0x20);
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
+#ifdef COMPILE_PCRE8
SET_BIT(0xC2); /* For U+00A0 */
SET_BIT(0xE1); /* For U+1680, U+180E */
SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */
SET_BIT(0xE3); /* For U+3000 */
+#endif
+#ifdef COMPILE_PCRE16
+ SET_BIT(0xA0);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
+ }
+ else
+#endif /* SUPPORT_UTF */
+ {
+ SET_BIT(0xA0);
+#ifdef COMPILE_PCRE16
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
}
- else SET_BIT(0xA0);
try_next = FALSE;
break;
@@ -766,12 +1017,26 @@ do
SET_BIT(0x0B);
SET_BIT(0x0C);
SET_BIT(0x0D);
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
+#ifdef COMPILE_PCRE8
SET_BIT(0xC2); /* For U+0085 */
SET_BIT(0xE2); /* For U+2028, U+2029 */
+#endif
+#ifdef COMPILE_PCRE16
+ SET_BIT(0x85);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
+ }
+ else
+#endif /* SUPPORT_UTF */
+ {
+ SET_BIT(0x85);
+#ifdef COMPILE_PCRE16
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
}
- else SET_BIT(0x85);
try_next = FALSE;
break;
@@ -829,7 +1094,7 @@ do
break;
case OP_TYPEEXACT:
- tcode += 3;
+ tcode += 1 + IMM2_SIZE;
break;
/* Zero or more repeats of character types set the bits and then
@@ -838,7 +1103,7 @@ do
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEPOSUPTO:
- tcode += 2; /* Fall through */
+ tcode += IMM2_SIZE; /* Fall through */
case OP_TYPESTAR:
case OP_TYPEMINSTAR:
@@ -856,14 +1121,23 @@ do
case OP_HSPACE:
SET_BIT(0x09);
SET_BIT(0x20);
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
+#ifdef COMPILE_PCRE8
SET_BIT(0xC2); /* For U+00A0 */
SET_BIT(0xE1); /* For U+1680, U+180E */
SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */
SET_BIT(0xE3); /* For U+3000 */
+#endif
+#ifdef COMPILE_PCRE16
+ SET_BIT(0xA0);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
}
- else SET_BIT(0xA0);
+ else
+#endif /* SUPPORT_UTF */
+ SET_BIT(0xA0);
break;
case OP_ANYNL:
@@ -872,12 +1146,21 @@ do
SET_BIT(0x0B);
SET_BIT(0x0C);
SET_BIT(0x0D);
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
+#ifdef COMPILE_PCRE8
SET_BIT(0xC2); /* For U+0085 */
SET_BIT(0xE2); /* For U+2028, U+2029 */
+#endif
+#ifdef COMPILE_PCRE16
+ SET_BIT(0x85);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
}
- else SET_BIT(0x85);
+ else
+#endif /* SUPPORT_UTF */
+ SET_BIT(0x85);
break;
case OP_NOT_DIGIT:
@@ -924,18 +1207,23 @@ do
character with a value > 255. */
case OP_NCLASS:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ if (utf)
{
start_bits[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */
memset(start_bits+25, 0xff, 7); /* Bits for 0xc9 - 0xff */
}
#endif
+#ifdef COMPILE_PCRE16
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
/* Fall through */
case OP_CLASS:
{
+ pcre_uint8 *map;
tcode++;
+ map = (pcre_uint8 *)tcode;
/* In UTF-8 mode, the bits in a bit map correspond to character
values, not to byte values. However, the bit map we are constructing is
@@ -943,13 +1231,13 @@ do
value is > 127. In fact, there are only two possible starting bytes for
characters in the range 128 - 255. */
-#ifdef SUPPORT_UTF8
- if (utf8)
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ if (utf)
{
- for (c = 0; c < 16; c++) start_bits[c] |= tcode[c];
+ for (c = 0; c < 16; c++) start_bits[c] |= map[c];
for (c = 128; c < 256; c++)
{
- if ((tcode[c/8] && (1 << (c&7))) != 0)
+ if ((map[c/8] && (1 << (c&7))) != 0)
{
int d = (c >> 6) | 0xc0; /* Set bit for this starter */
start_bits[d/8] |= (1 << (d&7)); /* and then skip on to the */
@@ -957,18 +1245,17 @@ do
}
}
}
-
- /* In non-UTF-8 mode, the two bit maps are completely compatible. */
-
else
#endif
{
- for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];
+ /* In non-UTF-8 mode, the two bit maps are completely compatible. */
+ for (c = 0; c < 32; c++) start_bits[c] |= map[c];
}
- /* Advance past the bit map, and act on what follows */
+ /* Advance past the bit map, and act on what follows. For a zero
+ minimum repeat, continue; otherwise stop processing. */
- tcode += 32;
+ tcode += 32 / sizeof(pcre_uchar);
switch (*tcode)
{
case OP_CRSTAR:
@@ -980,7 +1267,7 @@ do
case OP_CRRANGE:
case OP_CRMINRANGE:
- if (((tcode[1] << 8) + tcode[2]) == 0) tcode += 5;
+ if (GET2(tcode, 1) == 0) tcode += 1 + 2 * IMM2_SIZE;
else try_next = FALSE;
break;
@@ -1002,12 +1289,14 @@ return yield;
+
+
/*************************************************
* Study a compiled expression *
*************************************************/
/* This function is handed a compiled expression that it must study to produce
-information that will speed up the matching. It returns a pcre_extra block
+information that will speed up the matching. It returns a pcre[16]_extra block
which then gets handed back to pcre_exec().
Arguments:
@@ -1016,23 +1305,28 @@ Arguments:
errorptr points to where to place error messages;
set NULL unless error
-Returns: pointer to a pcre_extra block, with study_data filled in and the
- appropriate flags set;
+Returns: pointer to a pcre[16]_extra block, with study_data filled in and
+ the appropriate flags set;
NULL on error or if no optimization possible
*/
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN pcre_extra * PCRE_CALL_CONVENTION
pcre_study(const pcre *external_re, int options, const char **errorptr)
+#else
+PCRE_EXP_DEFN pcre16_extra * PCRE_CALL_CONVENTION
+pcre16_study(const pcre16 *external_re, int options, const char **errorptr)
+#endif
{
int min;
BOOL bits_set = FALSE;
-uschar start_bits[32];
-pcre_extra *extra;
+pcre_uint8 start_bits[32];
+PUBL(extra) *extra = NULL;
pcre_study_data *study;
-const uschar *tables;
-uschar *code;
+const pcre_uint8 *tables;
+pcre_uchar *code;
compile_data compile_block;
-const real_pcre *re = (const real_pcre *)external_re;
+const REAL_PCRE *re = (const REAL_PCRE *)external_re;
*errorptr = NULL;
@@ -1042,13 +1336,23 @@ if (re == NULL || re->magic_number != MAGIC_NUMBER)
return NULL;
}
+if ((re->flags & PCRE_MODE) == 0)
+ {
+#ifdef COMPILE_PCRE8
+ *errorptr = "argument is compiled in 16 bit mode";
+#else
+ *errorptr = "argument is compiled in 8 bit mode";
+#endif
+ return NULL;
+ }
+
if ((options & ~PUBLIC_STUDY_OPTIONS) != 0)
{
*errorptr = "unknown or incorrect option bit(s) set";
return NULL;
}
-code = (uschar *)re + re->name_table_offset +
+code = (pcre_uchar *)re + re->name_table_offset +
(re->name_count * re->name_entry_size);
/* For an anchored pattern, or an unanchored pattern that has a first char, or
@@ -1058,12 +1362,21 @@ seeking a list of starting bytes. */
if ((re->options & PCRE_ANCHORED) == 0 &&
(re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) == 0)
{
+ int rc;
+
/* Set the character tables in the block that is passed around */
tables = re->tables;
+
+#ifdef COMPILE_PCRE8
if (tables == NULL)
(void)pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
(void *)(&tables));
+#else
+ if (tables == NULL)
+ (void)pcre16_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
+ (void *)(&tables));
+#endif
compile_block.lcc = tables + lcc_offset;
compile_block.fcc = tables + fcc_offset;
@@ -1072,56 +1385,148 @@ if ((re->options & PCRE_ANCHORED) == 0 &&
/* See if we can find a fixed set of initial characters for the pattern. */
- memset(start_bits, 0, 32 * sizeof(uschar));
- bits_set = set_start_bits(code, start_bits,
- (re->options & PCRE_CASELESS) != 0, (re->options & PCRE_UTF8) != 0,
- &compile_block) == SSB_DONE;
+ memset(start_bits, 0, 32 * sizeof(pcre_uint8));
+ rc = set_start_bits(code, start_bits, (re->options & PCRE_UTF8) != 0,
+ &compile_block);
+ bits_set = rc == SSB_DONE;
+ if (rc == SSB_UNKNOWN)
+ {
+ *errorptr = "internal error: opcode not recognized";
+ return NULL;
+ }
}
/* Find the minimum length of subject string. */
-min = find_minlength(code, code, re->options);
+switch(min = find_minlength(code, code, re->options, 0))
+ {
+ case -2: *errorptr = "internal error: missing capturing bracket"; return NULL;
+ case -3: *errorptr = "internal error: opcode not recognized"; return NULL;
+ default: break;
+ }
-/* Return NULL if no optimization is possible. */
+/* If a set of starting bytes has been identified, or if the minimum length is
+greater than zero, or if JIT optimization has been requested, get a
+pcre[16]_extra block and a pcre_study_data block. The study data is put in the
+latter, which is pointed to by the former, which may also get additional data
+set later by the calling program. At the moment, the size of pcre_study_data
+is fixed. We nevertheless save it in a field for returning via the
+pcre_fullinfo() function so that if it becomes variable in the future,
+we don't have to change that code. */
+
+if (bits_set || min > 0
+#ifdef SUPPORT_JIT
+ || (options & (PCRE_STUDY_JIT_COMPILE | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
+ | PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE)) != 0
+#endif
+ )
+ {
+ extra = (PUBL(extra) *)(PUBL(malloc))
+ (sizeof(PUBL(extra)) + sizeof(pcre_study_data));
+ if (extra == NULL)
+ {
+ *errorptr = "failed to get memory";
+ return NULL;
+ }
-if (!bits_set && min < 0) return NULL;
+ study = (pcre_study_data *)((char *)extra + sizeof(PUBL(extra)));
+ extra->flags = PCRE_EXTRA_STUDY_DATA;
+ extra->study_data = study;
-/* Get a pcre_extra block and a pcre_study_data block. The study data is put in
-the latter, which is pointed to by the former, which may also get additional
-data set later by the calling program. At the moment, the size of
-pcre_study_data is fixed. We nevertheless save it in a field for returning via
-the pcre_fullinfo() function so that if it becomes variable in the future, we
-don't have to change that code. */
+ study->size = sizeof(pcre_study_data);
+ study->flags = 0;
-extra = (pcre_extra *)(pcre_malloc)
- (sizeof(pcre_extra) + sizeof(pcre_study_data));
+ /* Set the start bits always, to avoid unset memory errors if the
+ study data is written to a file, but set the flag only if any of the bits
+ are set, to save time looking when none are. */
-if (extra == NULL)
- {
- *errorptr = "failed to get memory";
- return NULL;
- }
+ if (bits_set)
+ {
+ study->flags |= PCRE_STUDY_MAPPED;
+ memcpy(study->start_bits, start_bits, sizeof(start_bits));
+ }
+ else memset(study->start_bits, 0, 32 * sizeof(pcre_uint8));
-study = (pcre_study_data *)((char *)extra + sizeof(pcre_extra));
-extra->flags = PCRE_EXTRA_STUDY_DATA;
-extra->study_data = study;
+#ifdef PCRE_DEBUG
+ if (bits_set)
+ {
+ pcre_uint8 *ptr = start_bits;
+ int i;
-study->size = sizeof(pcre_study_data);
-study->flags = 0;
+ printf("Start bits:\n");
+ for (i = 0; i < 32; i++)
+ printf("%3d: %02x%s", i * 8, *ptr++, ((i + 1) & 0x7) != 0? " " : "\n");
+ }
+#endif
-if (bits_set)
- {
- study->flags |= PCRE_STUDY_MAPPED;
- memcpy(study->start_bits, start_bits, sizeof(start_bits));
- }
+ /* Always set the minlength value in the block, because the JIT compiler
+ makes use of it. However, don't set the bit unless the length is greater than
+ zero - the interpretive pcre_exec() and pcre_dfa_exec() needn't waste time
+ checking the zero case. */
-if (min >= 0)
- {
- study->flags |= PCRE_STUDY_MINLEN;
- study->minlength = min;
+ if (min > 0)
+ {
+ study->flags |= PCRE_STUDY_MINLEN;
+ study->minlength = min;
+ }
+ else study->minlength = 0;
+
+ /* If JIT support was compiled and requested, attempt the JIT compilation.
+ If no starting bytes were found, and the minimum length is zero, and JIT
+ compilation fails, abandon the extra block and return NULL. */
+
+#ifdef SUPPORT_JIT
+ extra->executable_jit = NULL;
+ if ((options & PCRE_STUDY_JIT_COMPILE) != 0)
+ PRIV(jit_compile)(re, extra, JIT_COMPILE);
+ if ((options & PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE) != 0)
+ PRIV(jit_compile)(re, extra, JIT_PARTIAL_SOFT_COMPILE);
+ if ((options & PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE) != 0)
+ PRIV(jit_compile)(re, extra, JIT_PARTIAL_HARD_COMPILE);
+
+ if (study->flags == 0 && (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) == 0)
+ {
+#ifdef COMPILE_PCRE8
+ pcre_free_study(extra);
+#endif
+#ifdef COMPILE_PCRE16
+ pcre16_free_study(extra);
+#endif
+ extra = NULL;
+ }
+#endif
}
return extra;
}
+
+/*************************************************
+* Free the study data *
+*************************************************/
+
+/* This function frees the memory that was obtained by pcre_study().
+
+Argument: a pointer to the pcre[16]_extra block
+Returns: nothing
+*/
+
+#ifdef COMPILE_PCRE8
+PCRE_EXP_DEFN void
+pcre_free_study(pcre_extra *extra)
+#else
+PCRE_EXP_DEFN void
+pcre16_free_study(pcre16_extra *extra)
+#endif
+{
+if (extra == NULL)
+ return;
+#ifdef SUPPORT_JIT
+if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra->executable_jit != NULL)
+ PRIV(jit_free)(extra->executable_jit);
+#endif
+PUBL(free)(extra);
+}
+
/* End of pcre_study.c */
diff --git a/ext/pcre/pcrelib/pcre_tables.c b/ext/pcre/pcrelib/pcre_tables.c
index 4dfcbc6f9..2f605f5fa 100644
--- a/ext/pcre/pcrelib/pcre_tables.c
+++ b/ext/pcre/pcrelib/pcre_tables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
+#ifndef PCRE_INCLUDED
/* This module contains some fixed tables that are used by more than one of the
PCRE code modules. The tables are also #included by the pcretest program, which
@@ -48,11 +49,12 @@ clashes with the library. */
#include "pcre_internal.h"
+#endif /* PCRE_INCLUDED */
/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
the definition is next to the definition of the opcodes in pcre_internal.h. */
-const uschar _pcre_OP_lengths[] = { OP_LENGTHS };
+const pcre_uint8 PRIV(OP_lengths)[] = { OP_LENGTHS };
@@ -63,31 +65,38 @@ const uschar _pcre_OP_lengths[] = { OP_LENGTHS };
/* These are the breakpoints for different numbers of bytes in a UTF-8
character. */
-#ifdef SUPPORT_UTF8
+#if (defined SUPPORT_UTF && defined COMPILE_PCRE8) \
+ || (defined PCRE_INCLUDED && defined SUPPORT_PCRE16)
-const int _pcre_utf8_table1[] =
+/* These tables are also required by pcretest in 16 bit mode. */
+
+const int PRIV(utf8_table1)[] =
{ 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
-const int _pcre_utf8_table1_size = sizeof(_pcre_utf8_table1)/sizeof(int);
+const int PRIV(utf8_table1_size) = sizeof(PRIV(utf8_table1)) / sizeof(int);
/* These are the indicator bits and the mask for the data bits to set in the
first byte of a character, indexed by the number of additional bytes. */
-const int _pcre_utf8_table2[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
-const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
+const int PRIV(utf8_table2)[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
+const int PRIV(utf8_table3)[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
/* Table of the number of extra bytes, indexed by the first byte masked with
0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */
-const uschar _pcre_utf8_table4[] = {
+const pcre_uint8 PRIV(utf8_table4)[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
+#endif /* (SUPPORT_UTF && COMPILE_PCRE8) || (PCRE_INCLUDED && SUPPORT_PCRE16)*/
+
+#ifdef SUPPORT_UTF
+
/* Table to translate from particular type value to the general value. */
-const int _pcre_ucp_gentype[] = {
+const int PRIV(ucp_gentype)[] = {
ucp_C, ucp_C, ucp_C, ucp_C, ucp_C, /* Cc, Cf, Cn, Co, Cs */
ucp_L, ucp_L, ucp_L, ucp_L, ucp_L, /* Ll, Lu, Lm, Lo, Lt */
ucp_M, ucp_M, ucp_M, /* Mc, Me, Mn */
@@ -98,6 +107,21 @@ const int _pcre_ucp_gentype[] = {
ucp_Z, ucp_Z, ucp_Z /* Zl, Zp, Zs */
};
+#ifdef SUPPORT_JIT
+/* This table reverses PRIV(ucp_gentype). We can save the cost
+of a memory load. */
+
+const int PRIV(ucp_typerange)[] = {
+ ucp_Cc, ucp_Cs,
+ ucp_Ll, ucp_Lu,
+ ucp_Mc, ucp_Mn,
+ ucp_Nd, ucp_No,
+ ucp_Pc, ucp_Ps,
+ ucp_Sc, ucp_So,
+ ucp_Zl, ucp_Zs,
+};
+#endif /* SUPPORT_JIT */
+
/* The pcre_utt[] table below translates Unicode property names into type and
code values. It is searched by binary chop, so must be in collating sequence of
name. Originally, the table contained pointers to the name strings in the first
@@ -108,7 +132,7 @@ table itself. Maintenance is more error-prone, but frequent changes to this
data are unlikely.
July 2008: There is now a script called maint/GenerateUtt.py that can be used
-to generate this data instead of maintaining it entirely by hand.
+to generate this data automatically instead of maintaining it by hand.
The script was updated in March 2009 to generate a new EBCDIC-compliant
version. Like all other character and string literals that are compared against
@@ -121,8 +145,10 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0"
#define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0"
#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0"
+#define STRING_Batak0 STR_B STR_a STR_t STR_a STR_k "\0"
#define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0"
#define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0"
+#define STRING_Brahmi0 STR_B STR_r STR_a STR_h STR_m STR_i "\0"
#define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0"
#define STRING_Buginese0 STR_B STR_u STR_g STR_i STR_n STR_e STR_s STR_e "\0"
#define STRING_Buhid0 STR_B STR_u STR_h STR_i STR_d "\0"
@@ -131,6 +157,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Carian0 STR_C STR_a STR_r STR_i STR_a STR_n "\0"
#define STRING_Cc0 STR_C STR_c "\0"
#define STRING_Cf0 STR_C STR_f "\0"
+#define STRING_Chakma0 STR_C STR_h STR_a STR_k STR_m STR_a "\0"
#define STRING_Cham0 STR_C STR_h STR_a STR_m "\0"
#define STRING_Cherokee0 STR_C STR_h STR_e STR_r STR_o STR_k STR_e STR_e "\0"
#define STRING_Cn0 STR_C STR_n "\0"
@@ -184,9 +211,13 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Lydian0 STR_L STR_y STR_d STR_i STR_a STR_n "\0"
#define STRING_M0 STR_M "\0"
#define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0"
+#define STRING_Mandaic0 STR_M STR_a STR_n STR_d STR_a STR_i STR_c "\0"
#define STRING_Mc0 STR_M STR_c "\0"
#define STRING_Me0 STR_M STR_e "\0"
#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0"
+#define STRING_Meroitic_Cursive0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_C STR_u STR_r STR_s STR_i STR_v STR_e "\0"
+#define STRING_Meroitic_Hieroglyphs0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
+#define STRING_Miao0 STR_M STR_i STR_a STR_o "\0"
#define STRING_Mn0 STR_M STR_n "\0"
#define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0"
#define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0"
@@ -220,11 +251,13 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0"
#define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0"
#define STRING_Sc0 STR_S STR_c "\0"
+#define STRING_Sharada0 STR_S STR_h STR_a STR_r STR_a STR_d STR_a "\0"
#define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0"
#define STRING_Sinhala0 STR_S STR_i STR_n STR_h STR_a STR_l STR_a "\0"
#define STRING_Sk0 STR_S STR_k "\0"
#define STRING_Sm0 STR_S STR_m "\0"
#define STRING_So0 STR_S STR_o "\0"
+#define STRING_Sora_Sompeng0 STR_S STR_o STR_r STR_a STR_UNDERSCORE STR_S STR_o STR_m STR_p STR_e STR_n STR_g "\0"
#define STRING_Sundanese0 STR_S STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0"
#define STRING_Syloti_Nagri0 STR_S STR_y STR_l STR_o STR_t STR_i STR_UNDERSCORE STR_N STR_a STR_g STR_r STR_i "\0"
#define STRING_Syriac0 STR_S STR_y STR_r STR_i STR_a STR_c "\0"
@@ -233,6 +266,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0"
#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0"
#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0"
+#define STRING_Takri0 STR_T STR_a STR_k STR_r STR_i "\0"
#define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0"
#define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0"
#define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0"
@@ -251,15 +285,17 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Zp0 STR_Z STR_p "\0"
#define STRING_Zs0 STR_Z STR_s "\0"
-const char _pcre_utt_names[] =
+const char PRIV(utt_names)[] =
STRING_Any0
STRING_Arabic0
STRING_Armenian0
STRING_Avestan0
STRING_Balinese0
STRING_Bamum0
+ STRING_Batak0
STRING_Bengali0
STRING_Bopomofo0
+ STRING_Brahmi0
STRING_Braille0
STRING_Buginese0
STRING_Buhid0
@@ -268,6 +304,7 @@ const char _pcre_utt_names[] =
STRING_Carian0
STRING_Cc0
STRING_Cf0
+ STRING_Chakma0
STRING_Cham0
STRING_Cherokee0
STRING_Cn0
@@ -321,9 +358,13 @@ const char _pcre_utt_names[] =
STRING_Lydian0
STRING_M0
STRING_Malayalam0
+ STRING_Mandaic0
STRING_Mc0
STRING_Me0
STRING_Meetei_Mayek0
+ STRING_Meroitic_Cursive0
+ STRING_Meroitic_Hieroglyphs0
+ STRING_Miao0
STRING_Mn0
STRING_Mongolian0
STRING_Myanmar0
@@ -357,11 +398,13 @@ const char _pcre_utt_names[] =
STRING_Samaritan0
STRING_Saurashtra0
STRING_Sc0
+ STRING_Sharada0
STRING_Shavian0
STRING_Sinhala0
STRING_Sk0
STRING_Sm0
STRING_So0
+ STRING_Sora_Sompeng0
STRING_Sundanese0
STRING_Syloti_Nagri0
STRING_Syriac0
@@ -370,6 +413,7 @@ const char _pcre_utt_names[] =
STRING_Tai_Le0
STRING_Tai_Tham0
STRING_Tai_Viet0
+ STRING_Takri0
STRING_Tamil0
STRING_Telugu0
STRING_Thaana0
@@ -388,146 +432,156 @@ const char _pcre_utt_names[] =
STRING_Zp0
STRING_Zs0;
-const ucp_type_table _pcre_utt[] = {
+const ucp_type_table PRIV(utt)[] = {
{ 0, PT_ANY, 0 },
{ 4, PT_SC, ucp_Arabic },
{ 11, PT_SC, ucp_Armenian },
{ 20, PT_SC, ucp_Avestan },
{ 28, PT_SC, ucp_Balinese },
{ 37, PT_SC, ucp_Bamum },
- { 43, PT_SC, ucp_Bengali },
- { 51, PT_SC, ucp_Bopomofo },
- { 60, PT_SC, ucp_Braille },
- { 68, PT_SC, ucp_Buginese },
- { 77, PT_SC, ucp_Buhid },
- { 83, PT_GC, ucp_C },
- { 85, PT_SC, ucp_Canadian_Aboriginal },
- { 105, PT_SC, ucp_Carian },
- { 112, PT_PC, ucp_Cc },
- { 115, PT_PC, ucp_Cf },
- { 118, PT_SC, ucp_Cham },
- { 123, PT_SC, ucp_Cherokee },
- { 132, PT_PC, ucp_Cn },
- { 135, PT_PC, ucp_Co },
- { 138, PT_SC, ucp_Common },
- { 145, PT_SC, ucp_Coptic },
- { 152, PT_PC, ucp_Cs },
- { 155, PT_SC, ucp_Cuneiform },
- { 165, PT_SC, ucp_Cypriot },
- { 173, PT_SC, ucp_Cyrillic },
- { 182, PT_SC, ucp_Deseret },
- { 190, PT_SC, ucp_Devanagari },
- { 201, PT_SC, ucp_Egyptian_Hieroglyphs },
- { 222, PT_SC, ucp_Ethiopic },
- { 231, PT_SC, ucp_Georgian },
- { 240, PT_SC, ucp_Glagolitic },
- { 251, PT_SC, ucp_Gothic },
- { 258, PT_SC, ucp_Greek },
- { 264, PT_SC, ucp_Gujarati },
- { 273, PT_SC, ucp_Gurmukhi },
- { 282, PT_SC, ucp_Han },
- { 286, PT_SC, ucp_Hangul },
- { 293, PT_SC, ucp_Hanunoo },
- { 301, PT_SC, ucp_Hebrew },
- { 308, PT_SC, ucp_Hiragana },
- { 317, PT_SC, ucp_Imperial_Aramaic },
- { 334, PT_SC, ucp_Inherited },
- { 344, PT_SC, ucp_Inscriptional_Pahlavi },
- { 366, PT_SC, ucp_Inscriptional_Parthian },
- { 389, PT_SC, ucp_Javanese },
- { 398, PT_SC, ucp_Kaithi },
- { 405, PT_SC, ucp_Kannada },
- { 413, PT_SC, ucp_Katakana },
- { 422, PT_SC, ucp_Kayah_Li },
- { 431, PT_SC, ucp_Kharoshthi },
- { 442, PT_SC, ucp_Khmer },
- { 448, PT_GC, ucp_L },
- { 450, PT_LAMP, 0 },
- { 453, PT_SC, ucp_Lao },
- { 457, PT_SC, ucp_Latin },
- { 463, PT_SC, ucp_Lepcha },
- { 470, PT_SC, ucp_Limbu },
- { 476, PT_SC, ucp_Linear_B },
- { 485, PT_SC, ucp_Lisu },
- { 490, PT_PC, ucp_Ll },
- { 493, PT_PC, ucp_Lm },
- { 496, PT_PC, ucp_Lo },
- { 499, PT_PC, ucp_Lt },
- { 502, PT_PC, ucp_Lu },
- { 505, PT_SC, ucp_Lycian },
- { 512, PT_SC, ucp_Lydian },
- { 519, PT_GC, ucp_M },
- { 521, PT_SC, ucp_Malayalam },
- { 531, PT_PC, ucp_Mc },
- { 534, PT_PC, ucp_Me },
- { 537, PT_SC, ucp_Meetei_Mayek },
- { 550, PT_PC, ucp_Mn },
- { 553, PT_SC, ucp_Mongolian },
- { 563, PT_SC, ucp_Myanmar },
- { 571, PT_GC, ucp_N },
- { 573, PT_PC, ucp_Nd },
- { 576, PT_SC, ucp_New_Tai_Lue },
- { 588, PT_SC, ucp_Nko },
- { 592, PT_PC, ucp_Nl },
- { 595, PT_PC, ucp_No },
- { 598, PT_SC, ucp_Ogham },
- { 604, PT_SC, ucp_Ol_Chiki },
- { 613, PT_SC, ucp_Old_Italic },
- { 624, PT_SC, ucp_Old_Persian },
- { 636, PT_SC, ucp_Old_South_Arabian },
- { 654, PT_SC, ucp_Old_Turkic },
- { 665, PT_SC, ucp_Oriya },
- { 671, PT_SC, ucp_Osmanya },
- { 679, PT_GC, ucp_P },
- { 681, PT_PC, ucp_Pc },
- { 684, PT_PC, ucp_Pd },
- { 687, PT_PC, ucp_Pe },
- { 690, PT_PC, ucp_Pf },
- { 693, PT_SC, ucp_Phags_Pa },
- { 702, PT_SC, ucp_Phoenician },
- { 713, PT_PC, ucp_Pi },
- { 716, PT_PC, ucp_Po },
- { 719, PT_PC, ucp_Ps },
- { 722, PT_SC, ucp_Rejang },
- { 729, PT_SC, ucp_Runic },
- { 735, PT_GC, ucp_S },
- { 737, PT_SC, ucp_Samaritan },
- { 747, PT_SC, ucp_Saurashtra },
- { 758, PT_PC, ucp_Sc },
- { 761, PT_SC, ucp_Shavian },
- { 769, PT_SC, ucp_Sinhala },
- { 777, PT_PC, ucp_Sk },
- { 780, PT_PC, ucp_Sm },
- { 783, PT_PC, ucp_So },
- { 786, PT_SC, ucp_Sundanese },
- { 796, PT_SC, ucp_Syloti_Nagri },
- { 809, PT_SC, ucp_Syriac },
- { 816, PT_SC, ucp_Tagalog },
- { 824, PT_SC, ucp_Tagbanwa },
- { 833, PT_SC, ucp_Tai_Le },
- { 840, PT_SC, ucp_Tai_Tham },
- { 849, PT_SC, ucp_Tai_Viet },
- { 858, PT_SC, ucp_Tamil },
- { 864, PT_SC, ucp_Telugu },
- { 871, PT_SC, ucp_Thaana },
- { 878, PT_SC, ucp_Thai },
- { 883, PT_SC, ucp_Tibetan },
- { 891, PT_SC, ucp_Tifinagh },
- { 900, PT_SC, ucp_Ugaritic },
- { 909, PT_SC, ucp_Vai },
- { 913, PT_ALNUM, 0 },
- { 917, PT_PXSPACE, 0 },
- { 921, PT_SPACE, 0 },
- { 925, PT_WORD, 0 },
- { 929, PT_SC, ucp_Yi },
- { 932, PT_GC, ucp_Z },
- { 934, PT_PC, ucp_Zl },
- { 937, PT_PC, ucp_Zp },
- { 940, PT_PC, ucp_Zs }
+ { 43, PT_SC, ucp_Batak },
+ { 49, PT_SC, ucp_Bengali },
+ { 57, PT_SC, ucp_Bopomofo },
+ { 66, PT_SC, ucp_Brahmi },
+ { 73, PT_SC, ucp_Braille },
+ { 81, PT_SC, ucp_Buginese },
+ { 90, PT_SC, ucp_Buhid },
+ { 96, PT_GC, ucp_C },
+ { 98, PT_SC, ucp_Canadian_Aboriginal },
+ { 118, PT_SC, ucp_Carian },
+ { 125, PT_PC, ucp_Cc },
+ { 128, PT_PC, ucp_Cf },
+ { 131, PT_SC, ucp_Chakma },
+ { 138, PT_SC, ucp_Cham },
+ { 143, PT_SC, ucp_Cherokee },
+ { 152, PT_PC, ucp_Cn },
+ { 155, PT_PC, ucp_Co },
+ { 158, PT_SC, ucp_Common },
+ { 165, PT_SC, ucp_Coptic },
+ { 172, PT_PC, ucp_Cs },
+ { 175, PT_SC, ucp_Cuneiform },
+ { 185, PT_SC, ucp_Cypriot },
+ { 193, PT_SC, ucp_Cyrillic },
+ { 202, PT_SC, ucp_Deseret },
+ { 210, PT_SC, ucp_Devanagari },
+ { 221, PT_SC, ucp_Egyptian_Hieroglyphs },
+ { 242, PT_SC, ucp_Ethiopic },
+ { 251, PT_SC, ucp_Georgian },
+ { 260, PT_SC, ucp_Glagolitic },
+ { 271, PT_SC, ucp_Gothic },
+ { 278, PT_SC, ucp_Greek },
+ { 284, PT_SC, ucp_Gujarati },
+ { 293, PT_SC, ucp_Gurmukhi },
+ { 302, PT_SC, ucp_Han },
+ { 306, PT_SC, ucp_Hangul },
+ { 313, PT_SC, ucp_Hanunoo },
+ { 321, PT_SC, ucp_Hebrew },
+ { 328, PT_SC, ucp_Hiragana },
+ { 337, PT_SC, ucp_Imperial_Aramaic },
+ { 354, PT_SC, ucp_Inherited },
+ { 364, PT_SC, ucp_Inscriptional_Pahlavi },
+ { 386, PT_SC, ucp_Inscriptional_Parthian },
+ { 409, PT_SC, ucp_Javanese },
+ { 418, PT_SC, ucp_Kaithi },
+ { 425, PT_SC, ucp_Kannada },
+ { 433, PT_SC, ucp_Katakana },
+ { 442, PT_SC, ucp_Kayah_Li },
+ { 451, PT_SC, ucp_Kharoshthi },
+ { 462, PT_SC, ucp_Khmer },
+ { 468, PT_GC, ucp_L },
+ { 470, PT_LAMP, 0 },
+ { 473, PT_SC, ucp_Lao },
+ { 477, PT_SC, ucp_Latin },
+ { 483, PT_SC, ucp_Lepcha },
+ { 490, PT_SC, ucp_Limbu },
+ { 496, PT_SC, ucp_Linear_B },
+ { 505, PT_SC, ucp_Lisu },
+ { 510, PT_PC, ucp_Ll },
+ { 513, PT_PC, ucp_Lm },
+ { 516, PT_PC, ucp_Lo },
+ { 519, PT_PC, ucp_Lt },
+ { 522, PT_PC, ucp_Lu },
+ { 525, PT_SC, ucp_Lycian },
+ { 532, PT_SC, ucp_Lydian },
+ { 539, PT_GC, ucp_M },
+ { 541, PT_SC, ucp_Malayalam },
+ { 551, PT_SC, ucp_Mandaic },
+ { 559, PT_PC, ucp_Mc },
+ { 562, PT_PC, ucp_Me },
+ { 565, PT_SC, ucp_Meetei_Mayek },
+ { 578, PT_SC, ucp_Meroitic_Cursive },
+ { 595, PT_SC, ucp_Meroitic_Hieroglyphs },
+ { 616, PT_SC, ucp_Miao },
+ { 621, PT_PC, ucp_Mn },
+ { 624, PT_SC, ucp_Mongolian },
+ { 634, PT_SC, ucp_Myanmar },
+ { 642, PT_GC, ucp_N },
+ { 644, PT_PC, ucp_Nd },
+ { 647, PT_SC, ucp_New_Tai_Lue },
+ { 659, PT_SC, ucp_Nko },
+ { 663, PT_PC, ucp_Nl },
+ { 666, PT_PC, ucp_No },
+ { 669, PT_SC, ucp_Ogham },
+ { 675, PT_SC, ucp_Ol_Chiki },
+ { 684, PT_SC, ucp_Old_Italic },
+ { 695, PT_SC, ucp_Old_Persian },
+ { 707, PT_SC, ucp_Old_South_Arabian },
+ { 725, PT_SC, ucp_Old_Turkic },
+ { 736, PT_SC, ucp_Oriya },
+ { 742, PT_SC, ucp_Osmanya },
+ { 750, PT_GC, ucp_P },
+ { 752, PT_PC, ucp_Pc },
+ { 755, PT_PC, ucp_Pd },
+ { 758, PT_PC, ucp_Pe },
+ { 761, PT_PC, ucp_Pf },
+ { 764, PT_SC, ucp_Phags_Pa },
+ { 773, PT_SC, ucp_Phoenician },
+ { 784, PT_PC, ucp_Pi },
+ { 787, PT_PC, ucp_Po },
+ { 790, PT_PC, ucp_Ps },
+ { 793, PT_SC, ucp_Rejang },
+ { 800, PT_SC, ucp_Runic },
+ { 806, PT_GC, ucp_S },
+ { 808, PT_SC, ucp_Samaritan },
+ { 818, PT_SC, ucp_Saurashtra },
+ { 829, PT_PC, ucp_Sc },
+ { 832, PT_SC, ucp_Sharada },
+ { 840, PT_SC, ucp_Shavian },
+ { 848, PT_SC, ucp_Sinhala },
+ { 856, PT_PC, ucp_Sk },
+ { 859, PT_PC, ucp_Sm },
+ { 862, PT_PC, ucp_So },
+ { 865, PT_SC, ucp_Sora_Sompeng },
+ { 878, PT_SC, ucp_Sundanese },
+ { 888, PT_SC, ucp_Syloti_Nagri },
+ { 901, PT_SC, ucp_Syriac },
+ { 908, PT_SC, ucp_Tagalog },
+ { 916, PT_SC, ucp_Tagbanwa },
+ { 925, PT_SC, ucp_Tai_Le },
+ { 932, PT_SC, ucp_Tai_Tham },
+ { 941, PT_SC, ucp_Tai_Viet },
+ { 950, PT_SC, ucp_Takri },
+ { 956, PT_SC, ucp_Tamil },
+ { 962, PT_SC, ucp_Telugu },
+ { 969, PT_SC, ucp_Thaana },
+ { 976, PT_SC, ucp_Thai },
+ { 981, PT_SC, ucp_Tibetan },
+ { 989, PT_SC, ucp_Tifinagh },
+ { 998, PT_SC, ucp_Ugaritic },
+ { 1007, PT_SC, ucp_Vai },
+ { 1011, PT_ALNUM, 0 },
+ { 1015, PT_PXSPACE, 0 },
+ { 1019, PT_SPACE, 0 },
+ { 1023, PT_WORD, 0 },
+ { 1027, PT_SC, ucp_Yi },
+ { 1030, PT_GC, ucp_Z },
+ { 1032, PT_PC, ucp_Zl },
+ { 1035, PT_PC, ucp_Zp },
+ { 1038, PT_PC, ucp_Zs }
};
-const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);
+const int PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
/* End of pcre_tables.c */
diff --git a/ext/pcre/pcrelib/pcre_try_flipped.c b/ext/pcre/pcrelib/pcre_try_flipped.c
deleted file mode 100644
index 91ec76aae..000000000
--- a/ext/pcre/pcrelib/pcre_try_flipped.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains an internal function that tests a compiled pattern to
-see if it was compiled with the opposite endianness. If so, it uses an
-auxiliary local function to flip the appropriate bytes. */
-
-
-#include "config.h"
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-* Flip bytes in an integer *
-*************************************************/
-
-/* This function is called when the magic number in a regex doesn't match, in
-order to flip its bytes to see if we are dealing with a pattern that was
-compiled on a host of different endianness. If so, this function is used to
-flip other byte values.
-
-Arguments:
- value the number to flip
- n the number of bytes to flip (assumed to be 2 or 4)
-
-Returns: the flipped value
-*/
-
-static unsigned long int
-byteflip(unsigned long int value, int n)
-{
-if (n == 2) return ((value & 0x00ff) << 8) | ((value & 0xff00) >> 8);
-return ((value & 0x000000ff) << 24) |
- ((value & 0x0000ff00) << 8) |
- ((value & 0x00ff0000) >> 8) |
- ((value & 0xff000000) >> 24);
-}
-
-
-
-/*************************************************
-* Test for a byte-flipped compiled regex *
-*************************************************/
-
-/* This function is called from pcre_exec(), pcre_dfa_exec(), and also from
-pcre_fullinfo(). Its job is to test whether the regex is byte-flipped - that
-is, it was compiled on a system of opposite endianness. The function is called
-only when the native MAGIC_NUMBER test fails. If the regex is indeed flipped,
-we flip all the relevant values into a different data block, and return it.
-
-Arguments:
- re points to the regex
- study points to study data, or NULL
- internal_re points to a new regex block
- internal_study points to a new study block
-
-Returns: the new block if is is indeed a byte-flipped regex
- NULL if it is not
-*/
-
-real_pcre *
-_pcre_try_flipped(const real_pcre *re, real_pcre *internal_re,
- const pcre_study_data *study, pcre_study_data *internal_study)
-{
-if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)
- return NULL;
-
-*internal_re = *re; /* To copy other fields */
-internal_re->size = byteflip(re->size, sizeof(re->size));
-internal_re->options = byteflip(re->options, sizeof(re->options));
-internal_re->flags = (pcre_uint16)byteflip(re->flags, sizeof(re->flags));
-internal_re->top_bracket =
- (pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket));
-internal_re->top_backref =
- (pcre_uint16)byteflip(re->top_backref, sizeof(re->top_backref));
-internal_re->first_byte =
- (pcre_uint16)byteflip(re->first_byte, sizeof(re->first_byte));
-internal_re->req_byte =
- (pcre_uint16)byteflip(re->req_byte, sizeof(re->req_byte));
-internal_re->name_table_offset =
- (pcre_uint16)byteflip(re->name_table_offset, sizeof(re->name_table_offset));
-internal_re->name_entry_size =
- (pcre_uint16)byteflip(re->name_entry_size, sizeof(re->name_entry_size));
-internal_re->name_count =
- (pcre_uint16)byteflip(re->name_count, sizeof(re->name_count));
-
-if (study != NULL)
- {
- *internal_study = *study; /* To copy other fields */
- internal_study->size = byteflip(study->size, sizeof(study->size));
- internal_study->flags = byteflip(study->flags, sizeof(study->flags));
- internal_study->minlength = byteflip(study->minlength,
- sizeof(study->minlength));
- }
-
-return internal_re;
-}
-
-/* End of pcre_tryflipped.c */
diff --git a/ext/pcre/pcrelib/pcre_ucd.c b/ext/pcre/pcrelib/pcre_ucd.c
index b1dfc0386..39b59185a 100644
--- a/ext/pcre/pcrelib/pcre_ucd.c
+++ b/ext/pcre/pcrelib/pcre_ucd.c
@@ -4,7 +4,7 @@
/* Unicode character database. */
/* This file was autogenerated by the MultiStage2.py script. */
-/* Total size: 56880 bytes, block size: 128. */
+/* Total size: 62904 bytes, block size: 128. */
/* The tables herein are needed only when UCP support is built */
/* into PCRE. This module should not be referenced otherwise, so */
@@ -16,21 +16,21 @@
/* Instead, just supply small dummy tables. */
#ifndef SUPPORT_UCP
-const ucd_record _pcre_ucd_records[] = {{0,0,0 }};
-const uschar _pcre_ucd_stage1[] = {0};
-const pcre_uint16 _pcre_ucd_stage2[] = {0};
+const ucd_record PRIV(ucd_records)[] = {{0,0,0 }};
+const pcre_uint8 PRIV(ucd_stage1)[] = {0};
+const pcre_uint16 PRIV(ucd_stage2)[] = {0};
#else
/* When recompiling tables with a new Unicode version,
please check types in the structure definition from pcre_internal.h:
typedef struct {
-uschar property_0;
-uschar property_1;
+pcre_uint8 property_0;
+pcre_uint8 property_1;
pcre_int32 property_2;
} ucd_record; */
-const ucd_record _pcre_ucd_records[] = { /* 4144 bytes, record size 8 */
+const ucd_record PRIV(ucd_records)[] = { /* 4536 bytes, record size 8 */
{ 9, 0, 0, }, /* 0 */
{ 9, 29, 0, }, /* 1 */
{ 9, 21, 0, }, /* 2 */
@@ -45,38 +45,38 @@ const ucd_record _pcre_ucd_records[] = { /* 4144 bytes, record size 8 */
{ 9, 16, 0, }, /* 11 */
{ 33, 5, -32, }, /* 12 */
{ 9, 26, 0, }, /* 13 */
- { 33, 5, 0, }, /* 14 */
+ { 33, 7, 0, }, /* 14 */
{ 9, 20, 0, }, /* 15 */
{ 9, 1, 0, }, /* 16 */
{ 9, 15, 0, }, /* 17 */
{ 9, 5, 743, }, /* 18 */
{ 9, 19, 0, }, /* 19 */
- { 33, 5, 121, }, /* 20 */
- { 33, 9, 1, }, /* 21 */
- { 33, 5, -1, }, /* 22 */
- { 33, 9, -199, }, /* 23 */
- { 33, 5, -232, }, /* 24 */
- { 33, 9, -121, }, /* 25 */
- { 33, 5, -300, }, /* 26 */
- { 33, 5, 195, }, /* 27 */
- { 33, 9, 210, }, /* 28 */
- { 33, 9, 206, }, /* 29 */
- { 33, 9, 205, }, /* 30 */
- { 33, 9, 79, }, /* 31 */
- { 33, 9, 202, }, /* 32 */
- { 33, 9, 203, }, /* 33 */
- { 33, 9, 207, }, /* 34 */
- { 33, 5, 97, }, /* 35 */
- { 33, 9, 211, }, /* 36 */
- { 33, 9, 209, }, /* 37 */
- { 33, 5, 163, }, /* 38 */
- { 33, 9, 213, }, /* 39 */
- { 33, 5, 130, }, /* 40 */
- { 33, 9, 214, }, /* 41 */
- { 33, 9, 218, }, /* 42 */
- { 33, 9, 217, }, /* 43 */
- { 33, 9, 219, }, /* 44 */
- { 33, 7, 0, }, /* 45 */
+ { 33, 5, 0, }, /* 20 */
+ { 33, 5, 121, }, /* 21 */
+ { 33, 9, 1, }, /* 22 */
+ { 33, 5, -1, }, /* 23 */
+ { 33, 9, -199, }, /* 24 */
+ { 33, 5, -232, }, /* 25 */
+ { 33, 9, -121, }, /* 26 */
+ { 33, 5, -300, }, /* 27 */
+ { 33, 5, 195, }, /* 28 */
+ { 33, 9, 210, }, /* 29 */
+ { 33, 9, 206, }, /* 30 */
+ { 33, 9, 205, }, /* 31 */
+ { 33, 9, 79, }, /* 32 */
+ { 33, 9, 202, }, /* 33 */
+ { 33, 9, 203, }, /* 34 */
+ { 33, 9, 207, }, /* 35 */
+ { 33, 5, 97, }, /* 36 */
+ { 33, 9, 211, }, /* 37 */
+ { 33, 9, 209, }, /* 38 */
+ { 33, 5, 163, }, /* 39 */
+ { 33, 9, 213, }, /* 40 */
+ { 33, 5, 130, }, /* 41 */
+ { 33, 9, 214, }, /* 42 */
+ { 33, 9, 218, }, /* 43 */
+ { 33, 9, 217, }, /* 44 */
+ { 33, 9, 219, }, /* 45 */
{ 33, 5, 56, }, /* 46 */
{ 33, 9, 2, }, /* 47 */
{ 33, 8, -1, }, /* 48 */
@@ -101,463 +101,512 @@ const ucd_record _pcre_ucd_records[] = { /* 4144 bytes, record size 8 */
{ 33, 5, -202, }, /* 67 */
{ 33, 5, -203, }, /* 68 */
{ 33, 5, -207, }, /* 69 */
- { 33, 5, -209, }, /* 70 */
- { 33, 5, -211, }, /* 71 */
- { 33, 5, 10743, }, /* 72 */
- { 33, 5, 10749, }, /* 73 */
- { 33, 5, -213, }, /* 74 */
- { 33, 5, -214, }, /* 75 */
- { 33, 5, 10727, }, /* 76 */
- { 33, 5, -218, }, /* 77 */
- { 33, 5, -69, }, /* 78 */
- { 33, 5, -217, }, /* 79 */
- { 33, 5, -71, }, /* 80 */
- { 33, 5, -219, }, /* 81 */
- { 33, 6, 0, }, /* 82 */
- { 9, 6, 0, }, /* 83 */
- { 27, 12, 0, }, /* 84 */
- { 27, 12, 84, }, /* 85 */
- { 19, 9, 1, }, /* 86 */
- { 19, 5, -1, }, /* 87 */
- { 19, 24, 0, }, /* 88 */
- { 9, 2, 0, }, /* 89 */
- { 19, 6, 0, }, /* 90 */
- { 19, 5, 130, }, /* 91 */
- { 19, 9, 38, }, /* 92 */
- { 19, 9, 37, }, /* 93 */
- { 19, 9, 64, }, /* 94 */
- { 19, 9, 63, }, /* 95 */
- { 19, 5, 0, }, /* 96 */
- { 19, 9, 32, }, /* 97 */
- { 19, 5, -38, }, /* 98 */
- { 19, 5, -37, }, /* 99 */
- { 19, 5, -32, }, /* 100 */
- { 19, 5, -31, }, /* 101 */
- { 19, 5, -64, }, /* 102 */
- { 19, 5, -63, }, /* 103 */
- { 19, 9, 8, }, /* 104 */
- { 19, 5, -62, }, /* 105 */
- { 19, 5, -57, }, /* 106 */
- { 19, 9, 0, }, /* 107 */
- { 19, 5, -47, }, /* 108 */
- { 19, 5, -54, }, /* 109 */
- { 19, 5, -8, }, /* 110 */
- { 10, 9, 1, }, /* 111 */
- { 10, 5, -1, }, /* 112 */
- { 19, 5, -86, }, /* 113 */
- { 19, 5, -80, }, /* 114 */
- { 19, 5, 7, }, /* 115 */
- { 19, 9, -60, }, /* 116 */
- { 19, 5, -96, }, /* 117 */
- { 19, 25, 0, }, /* 118 */
- { 19, 9, -7, }, /* 119 */
- { 19, 9, -130, }, /* 120 */
- { 12, 9, 80, }, /* 121 */
- { 12, 9, 32, }, /* 122 */
- { 12, 5, -32, }, /* 123 */
- { 12, 5, -80, }, /* 124 */
- { 12, 9, 1, }, /* 125 */
- { 12, 5, -1, }, /* 126 */
- { 12, 26, 0, }, /* 127 */
- { 12, 12, 0, }, /* 128 */
- { 12, 11, 0, }, /* 129 */
- { 12, 9, 15, }, /* 130 */
- { 12, 5, -15, }, /* 131 */
- { 1, 9, 48, }, /* 132 */
- { 1, 6, 0, }, /* 133 */
- { 1, 21, 0, }, /* 134 */
- { 1, 5, -48, }, /* 135 */
- { 1, 5, 0, }, /* 136 */
- { 1, 17, 0, }, /* 137 */
- { 25, 12, 0, }, /* 138 */
- { 25, 17, 0, }, /* 139 */
- { 25, 21, 0, }, /* 140 */
- { 25, 7, 0, }, /* 141 */
- { 0, 25, 0, }, /* 142 */
- { 0, 21, 0, }, /* 143 */
- { 0, 23, 0, }, /* 144 */
- { 0, 26, 0, }, /* 145 */
- { 0, 12, 0, }, /* 146 */
- { 0, 7, 0, }, /* 147 */
- { 0, 11, 0, }, /* 148 */
- { 0, 6, 0, }, /* 149 */
- { 0, 13, 0, }, /* 150 */
- { 49, 21, 0, }, /* 151 */
- { 49, 1, 0, }, /* 152 */
- { 49, 7, 0, }, /* 153 */
- { 49, 12, 0, }, /* 154 */
- { 55, 7, 0, }, /* 155 */
- { 55, 12, 0, }, /* 156 */
- { 63, 13, 0, }, /* 157 */
- { 63, 7, 0, }, /* 158 */
- { 63, 12, 0, }, /* 159 */
- { 63, 6, 0, }, /* 160 */
- { 63, 26, 0, }, /* 161 */
- { 63, 21, 0, }, /* 162 */
- { 89, 7, 0, }, /* 163 */
- { 89, 12, 0, }, /* 164 */
- { 89, 6, 0, }, /* 165 */
- { 89, 21, 0, }, /* 166 */
- { 14, 12, 0, }, /* 167 */
- { 14, 10, 0, }, /* 168 */
- { 14, 7, 0, }, /* 169 */
- { 14, 13, 0, }, /* 170 */
- { 14, 6, 0, }, /* 171 */
- { 2, 12, 0, }, /* 172 */
- { 2, 10, 0, }, /* 173 */
- { 2, 7, 0, }, /* 174 */
- { 2, 13, 0, }, /* 175 */
- { 2, 23, 0, }, /* 176 */
- { 2, 15, 0, }, /* 177 */
- { 2, 26, 0, }, /* 178 */
- { 21, 12, 0, }, /* 179 */
- { 21, 10, 0, }, /* 180 */
- { 21, 7, 0, }, /* 181 */
- { 21, 13, 0, }, /* 182 */
- { 20, 12, 0, }, /* 183 */
- { 20, 10, 0, }, /* 184 */
- { 20, 7, 0, }, /* 185 */
- { 20, 13, 0, }, /* 186 */
- { 20, 23, 0, }, /* 187 */
- { 43, 12, 0, }, /* 188 */
- { 43, 10, 0, }, /* 189 */
- { 43, 7, 0, }, /* 190 */
- { 43, 13, 0, }, /* 191 */
- { 43, 26, 0, }, /* 192 */
- { 53, 12, 0, }, /* 193 */
- { 53, 7, 0, }, /* 194 */
- { 53, 10, 0, }, /* 195 */
- { 53, 13, 0, }, /* 196 */
- { 53, 15, 0, }, /* 197 */
- { 53, 26, 0, }, /* 198 */
- { 53, 23, 0, }, /* 199 */
- { 54, 10, 0, }, /* 200 */
- { 54, 7, 0, }, /* 201 */
- { 54, 12, 0, }, /* 202 */
- { 54, 13, 0, }, /* 203 */
- { 54, 15, 0, }, /* 204 */
- { 54, 26, 0, }, /* 205 */
- { 28, 10, 0, }, /* 206 */
- { 28, 7, 0, }, /* 207 */
- { 28, 12, 0, }, /* 208 */
- { 28, 13, 0, }, /* 209 */
- { 36, 10, 0, }, /* 210 */
- { 36, 7, 0, }, /* 211 */
- { 36, 12, 0, }, /* 212 */
- { 36, 13, 0, }, /* 213 */
- { 36, 15, 0, }, /* 214 */
- { 36, 26, 0, }, /* 215 */
- { 47, 10, 0, }, /* 216 */
- { 47, 7, 0, }, /* 217 */
- { 47, 12, 0, }, /* 218 */
- { 47, 21, 0, }, /* 219 */
- { 56, 7, 0, }, /* 220 */
- { 56, 12, 0, }, /* 221 */
- { 56, 6, 0, }, /* 222 */
- { 56, 21, 0, }, /* 223 */
- { 56, 13, 0, }, /* 224 */
- { 32, 7, 0, }, /* 225 */
- { 32, 12, 0, }, /* 226 */
- { 32, 6, 0, }, /* 227 */
- { 32, 13, 0, }, /* 228 */
- { 57, 7, 0, }, /* 229 */
- { 57, 26, 0, }, /* 230 */
- { 57, 21, 0, }, /* 231 */
- { 57, 12, 0, }, /* 232 */
- { 57, 13, 0, }, /* 233 */
- { 57, 15, 0, }, /* 234 */
- { 57, 22, 0, }, /* 235 */
- { 57, 18, 0, }, /* 236 */
- { 57, 10, 0, }, /* 237 */
- { 38, 7, 0, }, /* 238 */
- { 38, 10, 0, }, /* 239 */
- { 38, 12, 0, }, /* 240 */
- { 38, 13, 0, }, /* 241 */
- { 38, 21, 0, }, /* 242 */
- { 38, 26, 0, }, /* 243 */
- { 16, 9, 7264, }, /* 244 */
- { 16, 7, 0, }, /* 245 */
- { 16, 6, 0, }, /* 246 */
- { 23, 7, 0, }, /* 247 */
- { 15, 7, 0, }, /* 248 */
- { 15, 12, 0, }, /* 249 */
- { 15, 26, 0, }, /* 250 */
- { 15, 21, 0, }, /* 251 */
- { 15, 15, 0, }, /* 252 */
- { 8, 7, 0, }, /* 253 */
- { 7, 17, 0, }, /* 254 */
- { 7, 7, 0, }, /* 255 */
- { 7, 21, 0, }, /* 256 */
- { 40, 29, 0, }, /* 257 */
- { 40, 7, 0, }, /* 258 */
- { 40, 22, 0, }, /* 259 */
- { 40, 18, 0, }, /* 260 */
- { 45, 7, 0, }, /* 261 */
- { 45, 14, 0, }, /* 262 */
- { 50, 7, 0, }, /* 263 */
- { 50, 12, 0, }, /* 264 */
- { 24, 7, 0, }, /* 265 */
- { 24, 12, 0, }, /* 266 */
- { 6, 7, 0, }, /* 267 */
- { 6, 12, 0, }, /* 268 */
- { 51, 7, 0, }, /* 269 */
- { 51, 12, 0, }, /* 270 */
- { 31, 7, 0, }, /* 271 */
- { 31, 1, 0, }, /* 272 */
- { 31, 10, 0, }, /* 273 */
- { 31, 12, 0, }, /* 274 */
- { 31, 21, 0, }, /* 275 */
- { 31, 6, 0, }, /* 276 */
- { 31, 23, 0, }, /* 277 */
- { 31, 13, 0, }, /* 278 */
- { 31, 15, 0, }, /* 279 */
- { 37, 21, 0, }, /* 280 */
- { 37, 17, 0, }, /* 281 */
- { 37, 12, 0, }, /* 282 */
- { 37, 29, 0, }, /* 283 */
- { 37, 13, 0, }, /* 284 */
- { 37, 7, 0, }, /* 285 */
- { 37, 6, 0, }, /* 286 */
- { 34, 7, 0, }, /* 287 */
- { 34, 12, 0, }, /* 288 */
- { 34, 10, 0, }, /* 289 */
- { 34, 26, 0, }, /* 290 */
- { 34, 21, 0, }, /* 291 */
- { 34, 13, 0, }, /* 292 */
- { 52, 7, 0, }, /* 293 */
- { 39, 7, 0, }, /* 294 */
- { 39, 10, 0, }, /* 295 */
- { 39, 13, 0, }, /* 296 */
- { 39, 21, 0, }, /* 297 */
- { 31, 26, 0, }, /* 298 */
- { 5, 7, 0, }, /* 299 */
- { 5, 12, 0, }, /* 300 */
- { 5, 10, 0, }, /* 301 */
- { 5, 21, 0, }, /* 302 */
- { 90, 7, 0, }, /* 303 */
- { 90, 10, 0, }, /* 304 */
- { 90, 12, 0, }, /* 305 */
- { 90, 13, 0, }, /* 306 */
- { 90, 21, 0, }, /* 307 */
- { 90, 6, 0, }, /* 308 */
- { 61, 12, 0, }, /* 309 */
- { 61, 10, 0, }, /* 310 */
- { 61, 7, 0, }, /* 311 */
- { 61, 13, 0, }, /* 312 */
- { 61, 21, 0, }, /* 313 */
- { 61, 26, 0, }, /* 314 */
- { 75, 12, 0, }, /* 315 */
- { 75, 10, 0, }, /* 316 */
- { 75, 7, 0, }, /* 317 */
- { 75, 13, 0, }, /* 318 */
- { 69, 7, 0, }, /* 319 */
- { 69, 10, 0, }, /* 320 */
- { 69, 12, 0, }, /* 321 */
- { 69, 21, 0, }, /* 322 */
- { 69, 13, 0, }, /* 323 */
- { 72, 13, 0, }, /* 324 */
- { 72, 7, 0, }, /* 325 */
- { 72, 6, 0, }, /* 326 */
- { 72, 21, 0, }, /* 327 */
- { 9, 10, 0, }, /* 328 */
- { 9, 7, 0, }, /* 329 */
- { 12, 5, 0, }, /* 330 */
- { 12, 6, 0, }, /* 331 */
- { 33, 5, 35332, }, /* 332 */
- { 33, 5, 3814, }, /* 333 */
- { 33, 5, -59, }, /* 334 */
- { 33, 9, -7615, }, /* 335 */
- { 19, 5, 8, }, /* 336 */
- { 19, 9, -8, }, /* 337 */
- { 19, 5, 74, }, /* 338 */
- { 19, 5, 86, }, /* 339 */
- { 19, 5, 100, }, /* 340 */
- { 19, 5, 128, }, /* 341 */
- { 19, 5, 112, }, /* 342 */
- { 19, 5, 126, }, /* 343 */
- { 19, 8, -8, }, /* 344 */
- { 19, 5, 9, }, /* 345 */
- { 19, 9, -74, }, /* 346 */
- { 19, 8, -9, }, /* 347 */
- { 19, 5, -7205, }, /* 348 */
- { 19, 9, -86, }, /* 349 */
- { 19, 9, -100, }, /* 350 */
- { 19, 9, -112, }, /* 351 */
- { 19, 9, -128, }, /* 352 */
- { 19, 9, -126, }, /* 353 */
- { 27, 1, 0, }, /* 354 */
- { 9, 27, 0, }, /* 355 */
- { 9, 28, 0, }, /* 356 */
- { 27, 11, 0, }, /* 357 */
- { 9, 9, 0, }, /* 358 */
- { 9, 5, 0, }, /* 359 */
- { 19, 9, -7517, }, /* 360 */
- { 33, 9, -8383, }, /* 361 */
- { 33, 9, -8262, }, /* 362 */
- { 33, 9, 28, }, /* 363 */
- { 33, 5, -28, }, /* 364 */
- { 33, 14, 16, }, /* 365 */
- { 33, 14, -16, }, /* 366 */
- { 33, 14, 0, }, /* 367 */
- { 9, 26, 26, }, /* 368 */
- { 9, 26, -26, }, /* 369 */
- { 4, 26, 0, }, /* 370 */
- { 17, 9, 48, }, /* 371 */
- { 17, 5, -48, }, /* 372 */
- { 33, 9, -10743, }, /* 373 */
- { 33, 9, -3814, }, /* 374 */
- { 33, 9, -10727, }, /* 375 */
- { 33, 5, -10795, }, /* 376 */
- { 33, 5, -10792, }, /* 377 */
- { 33, 9, -10780, }, /* 378 */
- { 33, 9, -10749, }, /* 379 */
- { 33, 9, -10783, }, /* 380 */
- { 33, 9, -10782, }, /* 381 */
- { 33, 9, -10815, }, /* 382 */
- { 10, 5, 0, }, /* 383 */
- { 10, 26, 0, }, /* 384 */
- { 10, 12, 0, }, /* 385 */
- { 10, 21, 0, }, /* 386 */
- { 10, 15, 0, }, /* 387 */
- { 16, 5, -7264, }, /* 388 */
- { 58, 7, 0, }, /* 389 */
- { 58, 6, 0, }, /* 390 */
- { 22, 26, 0, }, /* 391 */
- { 22, 6, 0, }, /* 392 */
- { 22, 14, 0, }, /* 393 */
- { 26, 7, 0, }, /* 394 */
- { 26, 6, 0, }, /* 395 */
- { 29, 7, 0, }, /* 396 */
- { 29, 6, 0, }, /* 397 */
- { 3, 7, 0, }, /* 398 */
- { 23, 26, 0, }, /* 399 */
- { 29, 26, 0, }, /* 400 */
- { 22, 7, 0, }, /* 401 */
- { 60, 7, 0, }, /* 402 */
- { 60, 6, 0, }, /* 403 */
- { 60, 26, 0, }, /* 404 */
- { 85, 7, 0, }, /* 405 */
- { 85, 6, 0, }, /* 406 */
- { 85, 21, 0, }, /* 407 */
- { 76, 7, 0, }, /* 408 */
- { 76, 6, 0, }, /* 409 */
- { 76, 21, 0, }, /* 410 */
- { 76, 13, 0, }, /* 411 */
- { 12, 7, 0, }, /* 412 */
- { 12, 21, 0, }, /* 413 */
- { 78, 7, 0, }, /* 414 */
- { 78, 14, 0, }, /* 415 */
- { 78, 12, 0, }, /* 416 */
- { 78, 21, 0, }, /* 417 */
- { 33, 9, -35332, }, /* 418 */
- { 48, 7, 0, }, /* 419 */
- { 48, 12, 0, }, /* 420 */
- { 48, 10, 0, }, /* 421 */
- { 48, 26, 0, }, /* 422 */
- { 64, 7, 0, }, /* 423 */
- { 64, 21, 0, }, /* 424 */
- { 74, 10, 0, }, /* 425 */
- { 74, 7, 0, }, /* 426 */
- { 74, 12, 0, }, /* 427 */
- { 74, 21, 0, }, /* 428 */
- { 74, 13, 0, }, /* 429 */
- { 14, 21, 0, }, /* 430 */
- { 68, 13, 0, }, /* 431 */
- { 68, 7, 0, }, /* 432 */
- { 68, 12, 0, }, /* 433 */
- { 68, 21, 0, }, /* 434 */
- { 73, 7, 0, }, /* 435 */
- { 73, 12, 0, }, /* 436 */
- { 73, 10, 0, }, /* 437 */
- { 73, 21, 0, }, /* 438 */
- { 83, 12, 0, }, /* 439 */
- { 83, 10, 0, }, /* 440 */
- { 83, 7, 0, }, /* 441 */
- { 83, 21, 0, }, /* 442 */
- { 83, 6, 0, }, /* 443 */
- { 83, 13, 0, }, /* 444 */
- { 67, 7, 0, }, /* 445 */
- { 67, 12, 0, }, /* 446 */
- { 67, 10, 0, }, /* 447 */
- { 67, 13, 0, }, /* 448 */
- { 67, 21, 0, }, /* 449 */
- { 38, 6, 0, }, /* 450 */
- { 91, 7, 0, }, /* 451 */
- { 91, 12, 0, }, /* 452 */
- { 91, 6, 0, }, /* 453 */
- { 91, 21, 0, }, /* 454 */
- { 86, 7, 0, }, /* 455 */
- { 86, 10, 0, }, /* 456 */
- { 86, 12, 0, }, /* 457 */
- { 86, 21, 0, }, /* 458 */
- { 86, 13, 0, }, /* 459 */
- { 9, 4, 0, }, /* 460 */
- { 9, 3, 0, }, /* 461 */
- { 25, 25, 0, }, /* 462 */
- { 35, 7, 0, }, /* 463 */
- { 19, 14, 0, }, /* 464 */
- { 19, 15, 0, }, /* 465 */
- { 19, 26, 0, }, /* 466 */
- { 70, 7, 0, }, /* 467 */
- { 66, 7, 0, }, /* 468 */
- { 41, 7, 0, }, /* 469 */
- { 41, 15, 0, }, /* 470 */
- { 18, 7, 0, }, /* 471 */
- { 18, 14, 0, }, /* 472 */
- { 59, 7, 0, }, /* 473 */
- { 59, 21, 0, }, /* 474 */
- { 42, 7, 0, }, /* 475 */
- { 42, 21, 0, }, /* 476 */
- { 42, 14, 0, }, /* 477 */
- { 13, 9, 40, }, /* 478 */
- { 13, 5, -40, }, /* 479 */
- { 46, 7, 0, }, /* 480 */
- { 44, 7, 0, }, /* 481 */
- { 44, 13, 0, }, /* 482 */
- { 11, 7, 0, }, /* 483 */
- { 80, 7, 0, }, /* 484 */
- { 80, 21, 0, }, /* 485 */
- { 80, 15, 0, }, /* 486 */
- { 65, 7, 0, }, /* 487 */
- { 65, 15, 0, }, /* 488 */
- { 65, 21, 0, }, /* 489 */
- { 71, 7, 0, }, /* 490 */
- { 71, 21, 0, }, /* 491 */
- { 30, 7, 0, }, /* 492 */
- { 30, 12, 0, }, /* 493 */
- { 30, 15, 0, }, /* 494 */
- { 30, 21, 0, }, /* 495 */
- { 87, 7, 0, }, /* 496 */
- { 87, 15, 0, }, /* 497 */
- { 87, 21, 0, }, /* 498 */
- { 77, 7, 0, }, /* 499 */
- { 77, 21, 0, }, /* 500 */
- { 82, 7, 0, }, /* 501 */
- { 82, 15, 0, }, /* 502 */
- { 81, 7, 0, }, /* 503 */
- { 81, 15, 0, }, /* 504 */
- { 88, 7, 0, }, /* 505 */
- { 0, 15, 0, }, /* 506 */
- { 84, 12, 0, }, /* 507 */
- { 84, 10, 0, }, /* 508 */
- { 84, 7, 0, }, /* 509 */
- { 84, 21, 0, }, /* 510 */
- { 84, 1, 0, }, /* 511 */
- { 62, 7, 0, }, /* 512 */
- { 62, 14, 0, }, /* 513 */
- { 62, 21, 0, }, /* 514 */
- { 79, 7, 0, }, /* 515 */
- { 19, 12, 0, }, /* 516 */
- { 26, 26, 0, }, /* 517 */
+ { 33, 5, 42280, }, /* 70 */
+ { 33, 5, 42308, }, /* 71 */
+ { 33, 5, -209, }, /* 72 */
+ { 33, 5, -211, }, /* 73 */
+ { 33, 5, 10743, }, /* 74 */
+ { 33, 5, 10749, }, /* 75 */
+ { 33, 5, -213, }, /* 76 */
+ { 33, 5, -214, }, /* 77 */
+ { 33, 5, 10727, }, /* 78 */
+ { 33, 5, -218, }, /* 79 */
+ { 33, 5, -69, }, /* 80 */
+ { 33, 5, -217, }, /* 81 */
+ { 33, 5, -71, }, /* 82 */
+ { 33, 5, -219, }, /* 83 */
+ { 33, 6, 0, }, /* 84 */
+ { 9, 6, 0, }, /* 85 */
+ { 3, 24, 0, }, /* 86 */
+ { 27, 12, 0, }, /* 87 */
+ { 27, 12, 84, }, /* 88 */
+ { 19, 9, 1, }, /* 89 */
+ { 19, 5, -1, }, /* 90 */
+ { 19, 24, 0, }, /* 91 */
+ { 9, 2, 0, }, /* 92 */
+ { 19, 6, 0, }, /* 93 */
+ { 19, 5, 130, }, /* 94 */
+ { 19, 9, 38, }, /* 95 */
+ { 19, 9, 37, }, /* 96 */
+ { 19, 9, 64, }, /* 97 */
+ { 19, 9, 63, }, /* 98 */
+ { 19, 5, 0, }, /* 99 */
+ { 19, 9, 32, }, /* 100 */
+ { 19, 5, -38, }, /* 101 */
+ { 19, 5, -37, }, /* 102 */
+ { 19, 5, -32, }, /* 103 */
+ { 19, 5, -31, }, /* 104 */
+ { 19, 5, -64, }, /* 105 */
+ { 19, 5, -63, }, /* 106 */
+ { 19, 9, 8, }, /* 107 */
+ { 19, 5, -62, }, /* 108 */
+ { 19, 5, -57, }, /* 109 */
+ { 19, 9, 0, }, /* 110 */
+ { 19, 5, -47, }, /* 111 */
+ { 19, 5, -54, }, /* 112 */
+ { 19, 5, -8, }, /* 113 */
+ { 10, 9, 1, }, /* 114 */
+ { 10, 5, -1, }, /* 115 */
+ { 19, 5, -86, }, /* 116 */
+ { 19, 5, -80, }, /* 117 */
+ { 19, 5, 7, }, /* 118 */
+ { 19, 9, -60, }, /* 119 */
+ { 19, 5, -96, }, /* 120 */
+ { 19, 25, 0, }, /* 121 */
+ { 19, 9, -7, }, /* 122 */
+ { 19, 9, -130, }, /* 123 */
+ { 12, 9, 80, }, /* 124 */
+ { 12, 9, 32, }, /* 125 */
+ { 12, 5, -32, }, /* 126 */
+ { 12, 5, -80, }, /* 127 */
+ { 12, 9, 1, }, /* 128 */
+ { 12, 5, -1, }, /* 129 */
+ { 12, 26, 0, }, /* 130 */
+ { 12, 12, 0, }, /* 131 */
+ { 12, 11, 0, }, /* 132 */
+ { 12, 9, 15, }, /* 133 */
+ { 12, 5, -15, }, /* 134 */
+ { 1, 9, 48, }, /* 135 */
+ { 1, 6, 0, }, /* 136 */
+ { 1, 21, 0, }, /* 137 */
+ { 1, 5, -48, }, /* 138 */
+ { 1, 5, 0, }, /* 139 */
+ { 1, 17, 0, }, /* 140 */
+ { 1, 23, 0, }, /* 141 */
+ { 25, 12, 0, }, /* 142 */
+ { 25, 17, 0, }, /* 143 */
+ { 25, 21, 0, }, /* 144 */
+ { 25, 7, 0, }, /* 145 */
+ { 0, 1, 0, }, /* 146 */
+ { 0, 25, 0, }, /* 147 */
+ { 0, 21, 0, }, /* 148 */
+ { 0, 23, 0, }, /* 149 */
+ { 0, 26, 0, }, /* 150 */
+ { 0, 12, 0, }, /* 151 */
+ { 0, 7, 0, }, /* 152 */
+ { 0, 6, 0, }, /* 153 */
+ { 0, 13, 0, }, /* 154 */
+ { 49, 21, 0, }, /* 155 */
+ { 49, 1, 0, }, /* 156 */
+ { 49, 7, 0, }, /* 157 */
+ { 49, 12, 0, }, /* 158 */
+ { 55, 7, 0, }, /* 159 */
+ { 55, 12, 0, }, /* 160 */
+ { 63, 13, 0, }, /* 161 */
+ { 63, 7, 0, }, /* 162 */
+ { 63, 12, 0, }, /* 163 */
+ { 63, 6, 0, }, /* 164 */
+ { 63, 26, 0, }, /* 165 */
+ { 63, 21, 0, }, /* 166 */
+ { 89, 7, 0, }, /* 167 */
+ { 89, 12, 0, }, /* 168 */
+ { 89, 6, 0, }, /* 169 */
+ { 89, 21, 0, }, /* 170 */
+ { 94, 7, 0, }, /* 171 */
+ { 94, 12, 0, }, /* 172 */
+ { 94, 21, 0, }, /* 173 */
+ { 14, 12, 0, }, /* 174 */
+ { 14, 10, 0, }, /* 175 */
+ { 14, 7, 0, }, /* 176 */
+ { 14, 13, 0, }, /* 177 */
+ { 14, 21, 0, }, /* 178 */
+ { 14, 6, 0, }, /* 179 */
+ { 2, 12, 0, }, /* 180 */
+ { 2, 10, 0, }, /* 181 */
+ { 2, 7, 0, }, /* 182 */
+ { 2, 13, 0, }, /* 183 */
+ { 2, 23, 0, }, /* 184 */
+ { 2, 15, 0, }, /* 185 */
+ { 2, 26, 0, }, /* 186 */
+ { 21, 12, 0, }, /* 187 */
+ { 21, 10, 0, }, /* 188 */
+ { 21, 7, 0, }, /* 189 */
+ { 21, 13, 0, }, /* 190 */
+ { 20, 12, 0, }, /* 191 */
+ { 20, 10, 0, }, /* 192 */
+ { 20, 7, 0, }, /* 193 */
+ { 20, 13, 0, }, /* 194 */
+ { 20, 21, 0, }, /* 195 */
+ { 20, 23, 0, }, /* 196 */
+ { 43, 12, 0, }, /* 197 */
+ { 43, 10, 0, }, /* 198 */
+ { 43, 7, 0, }, /* 199 */
+ { 43, 13, 0, }, /* 200 */
+ { 43, 26, 0, }, /* 201 */
+ { 43, 15, 0, }, /* 202 */
+ { 53, 12, 0, }, /* 203 */
+ { 53, 7, 0, }, /* 204 */
+ { 53, 10, 0, }, /* 205 */
+ { 53, 13, 0, }, /* 206 */
+ { 53, 15, 0, }, /* 207 */
+ { 53, 26, 0, }, /* 208 */
+ { 53, 23, 0, }, /* 209 */
+ { 54, 10, 0, }, /* 210 */
+ { 54, 7, 0, }, /* 211 */
+ { 54, 12, 0, }, /* 212 */
+ { 54, 13, 0, }, /* 213 */
+ { 54, 15, 0, }, /* 214 */
+ { 54, 26, 0, }, /* 215 */
+ { 28, 10, 0, }, /* 216 */
+ { 28, 7, 0, }, /* 217 */
+ { 28, 12, 0, }, /* 218 */
+ { 28, 13, 0, }, /* 219 */
+ { 36, 10, 0, }, /* 220 */
+ { 36, 7, 0, }, /* 221 */
+ { 36, 12, 0, }, /* 222 */
+ { 36, 13, 0, }, /* 223 */
+ { 36, 15, 0, }, /* 224 */
+ { 36, 26, 0, }, /* 225 */
+ { 47, 10, 0, }, /* 226 */
+ { 47, 7, 0, }, /* 227 */
+ { 47, 12, 0, }, /* 228 */
+ { 47, 21, 0, }, /* 229 */
+ { 56, 7, 0, }, /* 230 */
+ { 56, 12, 0, }, /* 231 */
+ { 56, 6, 0, }, /* 232 */
+ { 56, 21, 0, }, /* 233 */
+ { 56, 13, 0, }, /* 234 */
+ { 32, 7, 0, }, /* 235 */
+ { 32, 12, 0, }, /* 236 */
+ { 32, 6, 0, }, /* 237 */
+ { 32, 13, 0, }, /* 238 */
+ { 57, 7, 0, }, /* 239 */
+ { 57, 26, 0, }, /* 240 */
+ { 57, 21, 0, }, /* 241 */
+ { 57, 12, 0, }, /* 242 */
+ { 57, 13, 0, }, /* 243 */
+ { 57, 15, 0, }, /* 244 */
+ { 57, 22, 0, }, /* 245 */
+ { 57, 18, 0, }, /* 246 */
+ { 57, 10, 0, }, /* 247 */
+ { 38, 7, 0, }, /* 248 */
+ { 38, 10, 0, }, /* 249 */
+ { 38, 12, 0, }, /* 250 */
+ { 38, 13, 0, }, /* 251 */
+ { 38, 21, 0, }, /* 252 */
+ { 38, 26, 0, }, /* 253 */
+ { 16, 9, 7264, }, /* 254 */
+ { 16, 7, 0, }, /* 255 */
+ { 16, 6, 0, }, /* 256 */
+ { 23, 7, 0, }, /* 257 */
+ { 15, 7, 0, }, /* 258 */
+ { 15, 12, 0, }, /* 259 */
+ { 15, 21, 0, }, /* 260 */
+ { 15, 15, 0, }, /* 261 */
+ { 15, 26, 0, }, /* 262 */
+ { 8, 7, 0, }, /* 263 */
+ { 7, 17, 0, }, /* 264 */
+ { 7, 7, 0, }, /* 265 */
+ { 7, 21, 0, }, /* 266 */
+ { 40, 29, 0, }, /* 267 */
+ { 40, 7, 0, }, /* 268 */
+ { 40, 22, 0, }, /* 269 */
+ { 40, 18, 0, }, /* 270 */
+ { 45, 7, 0, }, /* 271 */
+ { 45, 14, 0, }, /* 272 */
+ { 50, 7, 0, }, /* 273 */
+ { 50, 12, 0, }, /* 274 */
+ { 24, 7, 0, }, /* 275 */
+ { 24, 12, 0, }, /* 276 */
+ { 6, 7, 0, }, /* 277 */
+ { 6, 12, 0, }, /* 278 */
+ { 51, 7, 0, }, /* 279 */
+ { 51, 12, 0, }, /* 280 */
+ { 31, 7, 0, }, /* 281 */
+ { 31, 12, 0, }, /* 282 */
+ { 31, 10, 0, }, /* 283 */
+ { 31, 21, 0, }, /* 284 */
+ { 31, 6, 0, }, /* 285 */
+ { 31, 23, 0, }, /* 286 */
+ { 31, 13, 0, }, /* 287 */
+ { 31, 15, 0, }, /* 288 */
+ { 37, 21, 0, }, /* 289 */
+ { 37, 17, 0, }, /* 290 */
+ { 37, 12, 0, }, /* 291 */
+ { 37, 29, 0, }, /* 292 */
+ { 37, 13, 0, }, /* 293 */
+ { 37, 7, 0, }, /* 294 */
+ { 37, 6, 0, }, /* 295 */
+ { 34, 7, 0, }, /* 296 */
+ { 34, 12, 0, }, /* 297 */
+ { 34, 10, 0, }, /* 298 */
+ { 34, 26, 0, }, /* 299 */
+ { 34, 21, 0, }, /* 300 */
+ { 34, 13, 0, }, /* 301 */
+ { 52, 7, 0, }, /* 302 */
+ { 39, 7, 0, }, /* 303 */
+ { 39, 10, 0, }, /* 304 */
+ { 39, 13, 0, }, /* 305 */
+ { 39, 15, 0, }, /* 306 */
+ { 39, 26, 0, }, /* 307 */
+ { 31, 26, 0, }, /* 308 */
+ { 5, 7, 0, }, /* 309 */
+ { 5, 12, 0, }, /* 310 */
+ { 5, 10, 0, }, /* 311 */
+ { 5, 21, 0, }, /* 312 */
+ { 90, 7, 0, }, /* 313 */
+ { 90, 10, 0, }, /* 314 */
+ { 90, 12, 0, }, /* 315 */
+ { 90, 13, 0, }, /* 316 */
+ { 90, 21, 0, }, /* 317 */
+ { 90, 6, 0, }, /* 318 */
+ { 61, 12, 0, }, /* 319 */
+ { 61, 10, 0, }, /* 320 */
+ { 61, 7, 0, }, /* 321 */
+ { 61, 13, 0, }, /* 322 */
+ { 61, 21, 0, }, /* 323 */
+ { 61, 26, 0, }, /* 324 */
+ { 75, 12, 0, }, /* 325 */
+ { 75, 10, 0, }, /* 326 */
+ { 75, 7, 0, }, /* 327 */
+ { 75, 13, 0, }, /* 328 */
+ { 92, 7, 0, }, /* 329 */
+ { 92, 12, 0, }, /* 330 */
+ { 92, 10, 0, }, /* 331 */
+ { 92, 21, 0, }, /* 332 */
+ { 69, 7, 0, }, /* 333 */
+ { 69, 10, 0, }, /* 334 */
+ { 69, 12, 0, }, /* 335 */
+ { 69, 21, 0, }, /* 336 */
+ { 69, 13, 0, }, /* 337 */
+ { 72, 13, 0, }, /* 338 */
+ { 72, 7, 0, }, /* 339 */
+ { 72, 6, 0, }, /* 340 */
+ { 72, 21, 0, }, /* 341 */
+ { 75, 21, 0, }, /* 342 */
+ { 9, 10, 0, }, /* 343 */
+ { 9, 7, 0, }, /* 344 */
+ { 12, 5, 0, }, /* 345 */
+ { 12, 6, 0, }, /* 346 */
+ { 33, 5, 35332, }, /* 347 */
+ { 33, 5, 3814, }, /* 348 */
+ { 33, 5, -59, }, /* 349 */
+ { 33, 9, -7615, }, /* 350 */
+ { 19, 5, 8, }, /* 351 */
+ { 19, 9, -8, }, /* 352 */
+ { 19, 5, 74, }, /* 353 */
+ { 19, 5, 86, }, /* 354 */
+ { 19, 5, 100, }, /* 355 */
+ { 19, 5, 128, }, /* 356 */
+ { 19, 5, 112, }, /* 357 */
+ { 19, 5, 126, }, /* 358 */
+ { 19, 8, -8, }, /* 359 */
+ { 19, 5, 9, }, /* 360 */
+ { 19, 9, -74, }, /* 361 */
+ { 19, 8, -9, }, /* 362 */
+ { 19, 5, -7205, }, /* 363 */
+ { 19, 9, -86, }, /* 364 */
+ { 19, 9, -100, }, /* 365 */
+ { 19, 9, -112, }, /* 366 */
+ { 19, 9, -128, }, /* 367 */
+ { 19, 9, -126, }, /* 368 */
+ { 27, 1, 0, }, /* 369 */
+ { 9, 27, 0, }, /* 370 */
+ { 9, 28, 0, }, /* 371 */
+ { 27, 11, 0, }, /* 372 */
+ { 9, 9, 0, }, /* 373 */
+ { 9, 5, 0, }, /* 374 */
+ { 19, 9, -7517, }, /* 375 */
+ { 33, 9, -8383, }, /* 376 */
+ { 33, 9, -8262, }, /* 377 */
+ { 33, 9, 28, }, /* 378 */
+ { 33, 5, -28, }, /* 379 */
+ { 33, 14, 16, }, /* 380 */
+ { 33, 14, -16, }, /* 381 */
+ { 33, 14, 0, }, /* 382 */
+ { 9, 26, 26, }, /* 383 */
+ { 9, 26, -26, }, /* 384 */
+ { 4, 26, 0, }, /* 385 */
+ { 17, 9, 48, }, /* 386 */
+ { 17, 5, -48, }, /* 387 */
+ { 33, 9, -10743, }, /* 388 */
+ { 33, 9, -3814, }, /* 389 */
+ { 33, 9, -10727, }, /* 390 */
+ { 33, 5, -10795, }, /* 391 */
+ { 33, 5, -10792, }, /* 392 */
+ { 33, 9, -10780, }, /* 393 */
+ { 33, 9, -10749, }, /* 394 */
+ { 33, 9, -10783, }, /* 395 */
+ { 33, 9, -10782, }, /* 396 */
+ { 33, 9, -10815, }, /* 397 */
+ { 10, 5, 0, }, /* 398 */
+ { 10, 26, 0, }, /* 399 */
+ { 10, 12, 0, }, /* 400 */
+ { 10, 21, 0, }, /* 401 */
+ { 10, 15, 0, }, /* 402 */
+ { 16, 5, -7264, }, /* 403 */
+ { 58, 7, 0, }, /* 404 */
+ { 58, 6, 0, }, /* 405 */
+ { 58, 21, 0, }, /* 406 */
+ { 58, 12, 0, }, /* 407 */
+ { 22, 26, 0, }, /* 408 */
+ { 22, 6, 0, }, /* 409 */
+ { 22, 14, 0, }, /* 410 */
+ { 23, 10, 0, }, /* 411 */
+ { 26, 7, 0, }, /* 412 */
+ { 26, 6, 0, }, /* 413 */
+ { 29, 7, 0, }, /* 414 */
+ { 29, 6, 0, }, /* 415 */
+ { 3, 7, 0, }, /* 416 */
+ { 23, 26, 0, }, /* 417 */
+ { 29, 26, 0, }, /* 418 */
+ { 22, 7, 0, }, /* 419 */
+ { 60, 7, 0, }, /* 420 */
+ { 60, 6, 0, }, /* 421 */
+ { 60, 26, 0, }, /* 422 */
+ { 85, 7, 0, }, /* 423 */
+ { 85, 6, 0, }, /* 424 */
+ { 85, 21, 0, }, /* 425 */
+ { 76, 7, 0, }, /* 426 */
+ { 76, 6, 0, }, /* 427 */
+ { 76, 21, 0, }, /* 428 */
+ { 76, 13, 0, }, /* 429 */
+ { 12, 7, 0, }, /* 430 */
+ { 12, 21, 0, }, /* 431 */
+ { 78, 7, 0, }, /* 432 */
+ { 78, 14, 0, }, /* 433 */
+ { 78, 12, 0, }, /* 434 */
+ { 78, 21, 0, }, /* 435 */
+ { 33, 9, -35332, }, /* 436 */
+ { 33, 9, -42280, }, /* 437 */
+ { 33, 9, -42308, }, /* 438 */
+ { 48, 7, 0, }, /* 439 */
+ { 48, 12, 0, }, /* 440 */
+ { 48, 10, 0, }, /* 441 */
+ { 48, 26, 0, }, /* 442 */
+ { 64, 7, 0, }, /* 443 */
+ { 64, 21, 0, }, /* 444 */
+ { 74, 10, 0, }, /* 445 */
+ { 74, 7, 0, }, /* 446 */
+ { 74, 12, 0, }, /* 447 */
+ { 74, 21, 0, }, /* 448 */
+ { 74, 13, 0, }, /* 449 */
+ { 68, 13, 0, }, /* 450 */
+ { 68, 7, 0, }, /* 451 */
+ { 68, 12, 0, }, /* 452 */
+ { 68, 21, 0, }, /* 453 */
+ { 73, 7, 0, }, /* 454 */
+ { 73, 12, 0, }, /* 455 */
+ { 73, 10, 0, }, /* 456 */
+ { 73, 21, 0, }, /* 457 */
+ { 83, 12, 0, }, /* 458 */
+ { 83, 10, 0, }, /* 459 */
+ { 83, 7, 0, }, /* 460 */
+ { 83, 21, 0, }, /* 461 */
+ { 83, 6, 0, }, /* 462 */
+ { 83, 13, 0, }, /* 463 */
+ { 67, 7, 0, }, /* 464 */
+ { 67, 12, 0, }, /* 465 */
+ { 67, 10, 0, }, /* 466 */
+ { 67, 13, 0, }, /* 467 */
+ { 67, 21, 0, }, /* 468 */
+ { 38, 6, 0, }, /* 469 */
+ { 91, 7, 0, }, /* 470 */
+ { 91, 12, 0, }, /* 471 */
+ { 91, 6, 0, }, /* 472 */
+ { 91, 21, 0, }, /* 473 */
+ { 86, 7, 0, }, /* 474 */
+ { 86, 10, 0, }, /* 475 */
+ { 86, 12, 0, }, /* 476 */
+ { 86, 21, 0, }, /* 477 */
+ { 86, 6, 0, }, /* 478 */
+ { 86, 13, 0, }, /* 479 */
+ { 9, 4, 0, }, /* 480 */
+ { 9, 3, 0, }, /* 481 */
+ { 25, 25, 0, }, /* 482 */
+ { 0, 24, 0, }, /* 483 */
+ { 35, 7, 0, }, /* 484 */
+ { 19, 14, 0, }, /* 485 */
+ { 19, 15, 0, }, /* 486 */
+ { 19, 26, 0, }, /* 487 */
+ { 70, 7, 0, }, /* 488 */
+ { 66, 7, 0, }, /* 489 */
+ { 41, 7, 0, }, /* 490 */
+ { 41, 15, 0, }, /* 491 */
+ { 18, 7, 0, }, /* 492 */
+ { 18, 14, 0, }, /* 493 */
+ { 59, 7, 0, }, /* 494 */
+ { 59, 21, 0, }, /* 495 */
+ { 42, 7, 0, }, /* 496 */
+ { 42, 21, 0, }, /* 497 */
+ { 42, 14, 0, }, /* 498 */
+ { 13, 9, 40, }, /* 499 */
+ { 13, 5, -40, }, /* 500 */
+ { 46, 7, 0, }, /* 501 */
+ { 44, 7, 0, }, /* 502 */
+ { 44, 13, 0, }, /* 503 */
+ { 11, 7, 0, }, /* 504 */
+ { 80, 7, 0, }, /* 505 */
+ { 80, 21, 0, }, /* 506 */
+ { 80, 15, 0, }, /* 507 */
+ { 65, 7, 0, }, /* 508 */
+ { 65, 15, 0, }, /* 509 */
+ { 65, 21, 0, }, /* 510 */
+ { 71, 7, 0, }, /* 511 */
+ { 71, 21, 0, }, /* 512 */
+ { 97, 7, 0, }, /* 513 */
+ { 96, 7, 0, }, /* 514 */
+ { 30, 7, 0, }, /* 515 */
+ { 30, 12, 0, }, /* 516 */
+ { 30, 15, 0, }, /* 517 */
+ { 30, 21, 0, }, /* 518 */
+ { 87, 7, 0, }, /* 519 */
+ { 87, 15, 0, }, /* 520 */
+ { 87, 21, 0, }, /* 521 */
+ { 77, 7, 0, }, /* 522 */
+ { 77, 21, 0, }, /* 523 */
+ { 82, 7, 0, }, /* 524 */
+ { 82, 15, 0, }, /* 525 */
+ { 81, 7, 0, }, /* 526 */
+ { 81, 15, 0, }, /* 527 */
+ { 88, 7, 0, }, /* 528 */
+ { 0, 15, 0, }, /* 529 */
+ { 93, 10, 0, }, /* 530 */
+ { 93, 12, 0, }, /* 531 */
+ { 93, 7, 0, }, /* 532 */
+ { 93, 21, 0, }, /* 533 */
+ { 93, 15, 0, }, /* 534 */
+ { 93, 13, 0, }, /* 535 */
+ { 84, 12, 0, }, /* 536 */
+ { 84, 10, 0, }, /* 537 */
+ { 84, 7, 0, }, /* 538 */
+ { 84, 21, 0, }, /* 539 */
+ { 84, 1, 0, }, /* 540 */
+ { 100, 7, 0, }, /* 541 */
+ { 100, 13, 0, }, /* 542 */
+ { 95, 12, 0, }, /* 543 */
+ { 95, 7, 0, }, /* 544 */
+ { 95, 10, 0, }, /* 545 */
+ { 95, 13, 0, }, /* 546 */
+ { 95, 21, 0, }, /* 547 */
+ { 99, 12, 0, }, /* 548 */
+ { 99, 10, 0, }, /* 549 */
+ { 99, 7, 0, }, /* 550 */
+ { 99, 21, 0, }, /* 551 */
+ { 99, 13, 0, }, /* 552 */
+ { 101, 7, 0, }, /* 553 */
+ { 101, 12, 0, }, /* 554 */
+ { 101, 10, 0, }, /* 555 */
+ { 101, 13, 0, }, /* 556 */
+ { 62, 7, 0, }, /* 557 */
+ { 62, 14, 0, }, /* 558 */
+ { 62, 21, 0, }, /* 559 */
+ { 79, 7, 0, }, /* 560 */
+ { 98, 7, 0, }, /* 561 */
+ { 98, 10, 0, }, /* 562 */
+ { 98, 12, 0, }, /* 563 */
+ { 98, 6, 0, }, /* 564 */
+ { 19, 12, 0, }, /* 565 */
+ { 26, 26, 0, }, /* 566 */
};
-const uschar _pcre_ucd_stage1[] = { /* 8704 bytes */
+const pcre_uint8 PRIV(ucd_stage1)[] = { /* 8704 bytes */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* U+0000 */
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */
32, 33, 34, 34, 35, 36, 37, 38, 39, 40, 40, 40, 41, 42, 43, 44, /* U+1000 */
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, /* U+1800 */
- 61, 62, 63, 64, 65, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, /* U+2000 */
- 76, 76, 65, 77, 65, 65, 78, 17, 79, 80, 81, 82, 83, 84, 85, 86, /* U+2800 */
+ 61, 62, 63, 64, 65, 65, 66, 67, 68, 69, 70, 71, 72, 70, 73, 74, /* U+2000 */
+ 75, 75, 65, 76, 65, 65, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, /* U+2800 */
87, 88, 89, 90, 91, 92, 93, 70, 94, 94, 94, 94, 94, 94, 94, 94, /* U+3000 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+3800 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+4000 */
@@ -573,49 +622,49 @@ const uschar _pcre_ucd_stage1[] = { /* 8704 bytes */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+9000 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 96, /* U+9800 */
97, 98, 98, 98, 98, 98, 98, 98, 98, 99,100,100,101,102,103,104, /* U+A000 */
-105,106,107,108,109,110, 17,111, 34, 34, 34, 34, 34, 34, 34, 34, /* U+A800 */
+105,106,107,108,109,110,111,112, 34, 34, 34, 34, 34, 34, 34, 34, /* U+A800 */
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+B000 */
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+B800 */
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+C000 */
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+C800 */
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,112, /* U+D000 */
-113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, /* U+D800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+E000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+E800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F000 */
-114,114, 94, 94,115,116,117,118,119,119,120,121,122,123,124,125, /* U+F800 */
-126,127,128,129, 17,130,131,132,133,134, 17, 17, 17, 17, 17, 17, /* U+10000 */
-135, 17,136, 17,137, 17,138, 17,139, 17, 17, 17,140, 17, 17, 17, /* U+10800 */
- 17,141, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+11000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+11800 */
-142,142,142,142,142,142,143, 17,144, 17, 17, 17, 17, 17, 17, 17, /* U+12000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+12800 */
-145,145,145,145,145,145,145,145,146, 17, 17, 17, 17, 17, 17, 17, /* U+13000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+13800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+14000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+14800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+15000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+15800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+16000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+16800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+17000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+17800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+18000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+18800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+19000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+19800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1C800 */
- 70,147,148,149,150, 17,151, 17,152,153,154,155,156,157,158,159, /* U+1D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1E800 */
-160,161,162,163,164, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1F800 */
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,113, /* U+D000 */
+114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+D800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+E000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+E800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F000 */
+115,115, 94, 94,116,117,118,119,120,120,121,122,123,124,125,126, /* U+F800 */
+127,128,129,130, 78,131,132,133,134,135, 78, 78, 78, 78, 78, 78, /* U+10000 */
+136, 78,137,138,139, 78,140, 78,141, 78, 78, 78,142, 78, 78, 78, /* U+10800 */
+143,144,145,146, 78, 78, 78, 78, 78, 78, 78, 78, 78,147, 78, 78, /* U+11000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+11800 */
+148,148,148,148,148,148,149, 78,150, 78, 78, 78, 78, 78, 78, 78, /* U+12000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+12800 */
+151,151,151,151,151,151,151,151,152, 78, 78, 78, 78, 78, 78, 78, /* U+13000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+13800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+14000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+14800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+15000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+15800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+16000 */
+153,153,153,153,154, 78, 78, 78, 78, 78, 78, 78, 78, 78,155,156, /* U+16800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+17000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+17800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+18000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+18800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+19000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+19800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1A800 */
+157, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1C800 */
+ 70,158,159,160,161, 78,162, 78,163,164,165,166,167,168,169,170, /* U+1D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,171,172, 78, 78, /* U+1E800 */
+173,174,175,176,177, 78,178,179,180,181,182,183,184,185,186, 78, /* U+1F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+1F800 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+20000 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+20800 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+21000 */
@@ -636,469 +685,469 @@ const uschar _pcre_ucd_stage1[] = { /* 8704 bytes */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+28800 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+29000 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+29800 */
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,165, 94, 94, /* U+2A000 */
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,187, 94, 94, /* U+2A000 */
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+2A800 */
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,166, 17, /* U+2B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2F000 */
- 94, 94, 94, 94,167, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+30000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+30800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+31000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+31800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+32000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+32800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+33000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+33800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+34000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+34800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+35000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+35800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+36000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+36800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+37000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+37800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+38000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+38800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+39000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+39800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+40000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+40800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+41000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+41800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+42000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+42800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+43000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+43800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+44000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+44800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+45000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+45800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+46000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+46800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+47000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+47800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+48000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+48800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+49000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+49800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+50000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+50800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+51000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+51800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+52000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+52800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+53000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+53800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+54000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+54800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+55000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+55800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+56000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+56800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+57000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+57800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+58000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+58800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+59000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+59800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+60000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+60800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+61000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+61800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+62000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+62800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+63000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+63800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+64000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+64800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+65000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+65800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+66000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+66800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+67000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+67800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+68000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+68800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+69000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+69800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+70000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+70800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+71000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+71800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+72000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+72800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+73000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+73800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+74000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+74800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+75000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+75800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+76000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+76800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+77000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+77800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+78000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+78800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+79000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+79800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+80000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+80800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+81000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+81800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+82000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+82800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+83000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+83800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+84000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+84800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+85000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+85800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+86000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+86800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+87000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+87800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+88000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+88800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+89000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+89800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+90000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+90800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+91000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+91800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+92000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+92800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+93000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+93800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+94000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+94800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+95000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+95800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+96000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+96800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+97000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+97800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+98000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+98800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+99000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+99800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9A000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9A800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9B000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9B800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9C000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9C800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9D000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9D800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9E000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9E800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9F000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9F800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A0000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A0800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A1000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A1800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A2000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A2800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A3000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A3800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A4000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A4800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A5000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A5800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A6000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A6800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A7000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A7800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A8000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A8800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A9000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A9800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AA000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AA800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AB000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AB800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AC000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AC800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AD000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AD800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AE000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AE800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AF000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AF800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B0000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B0800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B1000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B1800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B2000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B2800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B3000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B3800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B4000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B4800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B5000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B5800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B6000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B6800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B7000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B7800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B8000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B8800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B9000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B9800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BA000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BA800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BB000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BB800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BC000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BC800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BD000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BD800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BE000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BE800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BF000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BF800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C0000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C0800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C1000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C1800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C2000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C2800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C3000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C3800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C4000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C4800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C5000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C5800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C6000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C6800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C7000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C7800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C8000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C8800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C9000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C9800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CA000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CA800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CB000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CB800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CC000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CC800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CD000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CD800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CE000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CE800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CF000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CF800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D0000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D0800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D1000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D1800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D2000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D2800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D3000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D3800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D4000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D4800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D5000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D5800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D6000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D6800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D7000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D7800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D8000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D8800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D9000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D9800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DA000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DA800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DB000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DB800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DC000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DC800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DD000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DD800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DE000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DE800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DF000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DF800 */
-168, 17,169,170, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E0000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E0800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E1000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E1800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E2000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E2800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E3000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E3800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E4000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E4800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E5000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E5800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E6000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E6800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E7000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E7800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E8000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E8800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E9000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E9800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EA000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EA800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EB000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EB800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EC000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EC800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+ED000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+ED800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EE000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EE800 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EF000 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EF800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F0000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F0800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F1000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F1800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F2000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F2800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F3000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F3800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F4000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F4800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F5000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F5800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F6000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F6800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F7000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F7800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F8000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F8800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F9000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F9800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FA000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FA800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FB000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FB800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FC000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FC800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FD000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FD800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FE000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FE800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FF000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,171, /* U+FF800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+100000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+100800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+101000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+101800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+102000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+102800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+103000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+103800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+104000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+104800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+105000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+105800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+106000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+106800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+107000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+107800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+108000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+108800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+109000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+109800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10A000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10A800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10B000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10B800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10C000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10C800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10D000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10D800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10E000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10E800 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10F000 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,171, /* U+10F800 */
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,188, 94, /* U+2B000 */
+189, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2F000 */
+ 94, 94, 94, 94,189, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+2F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+30000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+30800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+31000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+31800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+32000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+32800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+33000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+33800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+34000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+34800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+35000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+35800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+36000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+36800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+37000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+37800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+38000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+38800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+39000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+39800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+3F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+40000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+40800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+41000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+41800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+42000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+42800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+43000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+43800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+44000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+44800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+45000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+45800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+46000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+46800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+47000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+47800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+48000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+48800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+49000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+49800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+4F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+50000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+50800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+51000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+51800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+52000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+52800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+53000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+53800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+54000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+54800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+55000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+55800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+56000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+56800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+57000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+57800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+58000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+58800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+59000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+59800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+5F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+60000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+60800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+61000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+61800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+62000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+62800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+63000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+63800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+64000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+64800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+65000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+65800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+66000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+66800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+67000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+67800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+68000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+68800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+69000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+69800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+6F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+70000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+70800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+71000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+71800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+72000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+72800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+73000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+73800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+74000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+74800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+75000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+75800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+76000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+76800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+77000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+77800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+78000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+78800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+79000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+79800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+7F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+80000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+80800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+81000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+81800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+82000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+82800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+83000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+83800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+84000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+84800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+85000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+85800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+86000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+86800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+87000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+87800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+88000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+88800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+89000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+89800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+8F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+90000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+90800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+91000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+91800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+92000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+92800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+93000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+93800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+94000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+94800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+95000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+95800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+96000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+96800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+97000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+97800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+98000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+98800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+99000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+99800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9A000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9A800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9B000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9B800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9C000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9C800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9D000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9D800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9E000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9E800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9F000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+9F800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A0000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A0800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A1000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A1800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A2000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A2800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A3000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A3800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A4000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A4800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A5000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A5800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A6000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A6800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A7000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A7800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A8000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A8800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A9000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+A9800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AA000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AA800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AB000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AB800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AC000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AC800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AD000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AD800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AE000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AE800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AF000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+AF800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B0000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B0800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B1000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B1800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B2000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B2800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B3000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B3800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B4000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B4800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B5000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B5800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B6000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B6800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B7000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B7800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B8000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B8800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B9000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+B9800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BA000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BA800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BB000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BB800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BC000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BC800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BD000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BD800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BE000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BE800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BF000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+BF800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C0000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C0800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C1000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C1800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C2000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C2800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C3000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C3800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C4000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C4800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C5000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C5800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C6000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C6800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C7000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C7800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C8000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C8800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C9000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+C9800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CA000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CA800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CB000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CB800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CC000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CC800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CD000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CD800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CE000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CE800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CF000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+CF800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D0000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D0800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D1000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D1800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D2000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D2800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D3000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D3800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D4000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D4800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D5000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D5800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D6000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D6800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D7000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D7800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D8000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D8800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D9000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+D9800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DA000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DA800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DB000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DB800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DC000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DC800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DD000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DD800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DE000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DE800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DF000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+DF800 */
+190, 78,191,192, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E0000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E0800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E1000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E1800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E2000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E2800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E3000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E3800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E4000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E4800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E5000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E5800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E6000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E6800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E7000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E7800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E8000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E8800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E9000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+E9800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EA000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EA800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EB000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EB800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EC000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EC800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+ED000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+ED800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EE000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EE800 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EF000 */
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, /* U+EF800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F0000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F0800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F1000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F1800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F2000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F2800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F3000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F3800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F4000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F4800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F5000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F5800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F6000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F6800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F7000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F7800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F8000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F8800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F9000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+F9800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FA000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FA800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FB000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FB800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FC000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FC800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FD000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FD800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FE000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FE800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+FF000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,193, /* U+FF800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+100000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+100800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+101000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+101800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+102000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+102800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+103000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+103800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+104000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+104800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+105000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+105800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+106000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+106800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+107000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+107800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+108000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+108800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+109000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+109800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10A000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10A800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10B000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10B800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10C000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10C800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10D000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10D800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10E000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10E800 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115, /* U+10F000 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,193, /* U+10F800 */
};
-const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
+const pcre_uint16 PRIV(ucd_stage2)[] = { /* 49664 bytes, block = 128 */
/* block 0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1112,635 +1161,635 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
/* block 1 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 2, 3, 3, 3, 3, 13, 13, 10, 13, 14, 15, 6, 16, 13, 10,
- 13, 6, 17, 17, 10, 18, 13, 2, 10, 17, 14, 19, 17, 17, 17, 2,
+ 1, 2, 3, 3, 3, 3, 13, 2, 10, 13, 14, 15, 6, 16, 13, 10,
+ 13, 6, 17, 17, 10, 18, 2, 2, 10, 17, 14, 19, 17, 17, 17, 2,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 6, 9, 9, 9, 9, 9, 9, 9, 14,
+ 9, 9, 9, 9, 9, 9, 9, 6, 9, 9, 9, 9, 9, 9, 9, 20,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 6, 12, 12, 12, 12, 12, 12, 12, 20,
+ 12, 12, 12, 12, 12, 12, 12, 6, 12, 12, 12, 12, 12, 12, 12, 21,
/* block 2 */
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 23, 24, 21, 22, 21, 22, 21, 22, 14, 21, 22, 21, 22, 21, 22, 21,
- 22, 21, 22, 21, 22, 21, 22, 21, 22, 14, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 25, 21, 22, 21, 22, 21, 22, 26,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 24, 25, 22, 23, 22, 23, 22, 23, 20, 22, 23, 22, 23, 22, 23, 22,
+ 23, 22, 23, 22, 23, 22, 23, 22, 23, 20, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 26, 22, 23, 22, 23, 22, 23, 27,
/* block 3 */
- 27, 28, 21, 22, 21, 22, 29, 21, 22, 30, 30, 21, 22, 14, 31, 32,
- 33, 21, 22, 30, 34, 35, 36, 37, 21, 22, 38, 14, 36, 39, 40, 41,
- 21, 22, 21, 22, 21, 22, 42, 21, 22, 42, 14, 14, 21, 22, 42, 21,
- 22, 43, 43, 21, 22, 21, 22, 44, 21, 22, 14, 45, 21, 22, 14, 46,
- 45, 45, 45, 45, 47, 48, 49, 47, 48, 49, 47, 48, 49, 21, 22, 21,
- 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 50, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 14, 47, 48, 49, 21, 22, 51, 52, 21, 22, 21, 22, 21, 22, 21, 22,
+ 28, 29, 22, 23, 22, 23, 30, 22, 23, 31, 31, 22, 23, 20, 32, 33,
+ 34, 22, 23, 31, 35, 36, 37, 38, 22, 23, 39, 20, 37, 40, 41, 42,
+ 22, 23, 22, 23, 22, 23, 43, 22, 23, 43, 20, 20, 22, 23, 43, 22,
+ 23, 44, 44, 22, 23, 22, 23, 45, 22, 23, 20, 14, 22, 23, 20, 46,
+ 14, 14, 14, 14, 47, 48, 49, 47, 48, 49, 47, 48, 49, 22, 23, 22,
+ 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 50, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 20, 47, 48, 49, 22, 23, 51, 52, 22, 23, 22, 23, 22, 23, 22, 23,
/* block 4 */
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 53, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 14, 14, 14, 14, 14, 14, 54, 21, 22, 55, 56, 57,
- 57, 21, 22, 58, 59, 60, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 61, 62, 63, 64, 65, 14, 66, 66, 14, 67, 14, 68, 14, 14, 14, 14,
- 66, 14, 14, 69, 14, 14, 14, 14, 70, 71, 14, 72, 14, 14, 14, 71,
- 14, 73, 74, 14, 14, 75, 14, 14, 14, 14, 14, 14, 14, 76, 14, 14,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 53, 20, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 20, 20, 20, 20, 20, 20, 54, 22, 23, 55, 56, 57,
+ 57, 22, 23, 58, 59, 60, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 61, 62, 63, 64, 65, 20, 66, 66, 20, 67, 20, 68, 20, 20, 20, 20,
+ 66, 20, 20, 69, 20, 70, 71, 20, 72, 73, 20, 74, 20, 20, 20, 73,
+ 20, 75, 76, 20, 20, 77, 20, 20, 20, 20, 20, 20, 20, 78, 20, 20,
/* block 5 */
- 77, 14, 14, 77, 14, 14, 14, 14, 77, 78, 79, 79, 80, 14, 14, 14,
- 14, 14, 81, 14, 45, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 83,
- 83, 83, 10, 10, 10, 10, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
- 83, 83, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 82, 82, 82, 82, 82, 10, 10, 10, 10, 10, 10, 10, 83, 10, 83, 10,
+ 79, 20, 20, 79, 20, 20, 20, 20, 79, 80, 81, 81, 82, 20, 20, 20,
+ 20, 20, 83, 20, 14, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 10, 10, 10, 10, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 84, 84, 84, 84, 84, 10, 10, 10, 10, 10, 86, 86, 85, 10, 85, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
/* block 6 */
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 85, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 86, 87, 86, 87, 83, 88, 86, 87, 89, 89, 90, 91, 91, 91, 2, 89,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 88, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 89, 90, 89, 90, 85, 91, 89, 90, 92, 92, 93, 94, 94, 94, 2, 92,
/* block 7 */
- 89, 89, 89, 89, 88, 10, 92, 2, 93, 93, 93, 89, 94, 89, 95, 95,
- 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 89, 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, 99, 99, 99,
- 96,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
-100,100,101,100,100,100,100,100,100,100,100,100,102,103,103,104,
-105,106,107,107,107,108,109,110, 86, 87, 86, 87, 86, 87, 86, 87,
- 86, 87,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-113,114,115, 96,116,117,118, 86, 87,119, 86, 87, 96,120,120,120,
+ 92, 92, 92, 92, 91, 10, 95, 2, 96, 96, 96, 92, 97, 92, 98, 98,
+ 99,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
+100,100, 92,100,100,100,100,100,100,100,100,100,101,102,102,102,
+ 99,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
+103,103,104,103,103,103,103,103,103,103,103,103,105,106,106,107,
+108,109,110,110,110,111,112,113, 89, 90, 89, 90, 89, 90, 89, 90,
+ 89, 90,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+116,117,118, 99,119,120,121, 89, 90,122, 89, 90, 99,123,123,123,
/* block 8 */
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
+126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
+126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
+127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
/* block 9 */
-125,126,127,128,128, 84, 84,128,129,129,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-130,125,126,125,126,125,126,125,126,125,126,125,126,125,126,131,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
+128,129,130,131,131, 87, 87,131,132,132,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+133,128,129,128,129,128,129,128,129,128,129,128,129,128,129,134,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
/* block 10 */
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
-132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
-132,132,132,132,132,132,132, 89, 89,133,134,134,134,134,134,134,
- 89,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
+135,135,135,135,135,135,135, 92, 92,136,137,137,137,137,137,137,
+ 92,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,
+138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,
/* block 11 */
-135,135,135,135,135,135,135,136, 89, 2,137, 89, 89, 89, 89, 89,
- 89,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,
-138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,
-138,138,138,138,138,138,138,138,138,138,138,138,138,138,139,138,
-140,138,138,140,138,138,140,138, 89, 89, 89, 89, 89, 89, 89, 89,
-141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
-141,141,141,141,141,141,141,141,141,141,141, 89, 89, 89, 89, 89,
-141,141,141,140,140, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+138,138,138,138,138,138,138,139, 92, 2,140, 92, 92, 92, 92,141,
+ 92,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
+142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
+142,142,142,142,142,142,142,142,142,142,142,142,142,142,143,142,
+144,142,142,144,142,142,144,142, 92, 92, 92, 92, 92, 92, 92, 92,
+145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,
+145,145,145,145,145,145,145,145,145,145,145, 92, 92, 92, 92, 92,
+145,145,145,144,144, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 12 */
- 16, 16, 16, 16, 89, 89,142,142,142,143,143,144, 2,143,145,145,
-146,146,146,146,146,146,146,146,146,146,146, 2, 89, 89,143, 2,
- 89,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
- 83,147,147,147,147,147,147,147,147,147,147, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84,146,146,146,146,146,146,146,146,146, 89,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,143,143,143,143,147,147,
- 84,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
+146,146,146,146,146, 92,147,147,147,148,148,149, 2,148,150,150,
+151,151,151,151,151,151,151,151,151,151,151, 2, 92, 92,148, 2,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+ 85,152,152,152,152,152,152,152,152,152,152, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87,151,151,151,151,151,151,151,151,151, 87,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,148,148,148,148,152,152,
+ 87,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
/* block 13 */
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,143,147,146,146,146,146,146,146,146, 16,148,146,
-146,146,146,146,146,149,149,146,146,145,146,146,146,146,147,147,
-150,150,150,150,150,150,150,150,150,150,147,147,147,145,145,147,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,148,152,151,151,151,151,151,151,151, 16,150,151,
+151,151,151,151,151,153,153,151,151,150,151,151,151,151,152,152,
+154,154,154,154,154,154,154,154,154,154,152,152,152,150,150,152,
/* block 14 */
-151,151,151,151,151,151,151,151,151,151,151,151,151,151, 89,152,
-153,154,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
-153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154, 89, 89,153,153,153,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
+155,155,155,155,155,155,155,155,155,155,155,155,155,155, 92,156,
+157,158,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
+157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
+158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,
+158,158,158,158,158,158,158,158,158,158,158, 92, 92,157,157,157,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
/* block 15 */
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,156,156,156,156,156,156,156,156,156,156,
-156,155, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-157,157,157,157,157,157,157,157,157,157,158,158,158,158,158,158,
-158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,
-158,158,158,158,158,158,158,158,158,158,158,159,159,159,159,159,
-159,159,159,159,160,160,161,162,162,162,160, 89, 89, 89, 89, 89,
+159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
+159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
+159,159,159,159,159,159,160,160,160,160,160,160,160,160,160,160,
+160,159, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+161,161,161,161,161,161,161,161,161,161,162,162,162,162,162,162,
+162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+162,162,162,162,162,162,162,162,162,162,162,163,163,163,163,163,
+163,163,163,163,164,164,165,166,166,166,164, 92, 92, 92, 92, 92,
/* block 16 */
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,164,164,164,164,165,164,164,164,164,164,
-164,164,164,164,165,164,164,164,165,164,164,164,164,164, 89, 89,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+167,167,167,167,167,167,168,168,168,168,169,168,168,168,168,168,
+168,168,168,168,169,168,168,168,169,168,168,168,168,168, 92, 92,
+170,170,170,170,170,170,170,170,170,170,170,170,170,170,170, 92,
+171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+171,171,171,171,171,171,171,171,171,172,172,172, 92, 92,173, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 17 */
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+152, 92,152,152,152,152,152,152,152,152,152,152,152, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92,151,151,151,151,151,151,151,151,151,151,151,151,
+151,151,151,151,151,151,151,151,151,151,151,151,151,151,151, 92,
/* block 18 */
-167,167,167,168,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169, 89, 89,167,169,168,168,
-168,167,167,167,167,167,167,167,167,168,168,168,168,167,168, 89,
-169, 84, 84,167,167,167, 89, 89,169,169,169,169,169,169,169,169,
-169,169,167,167, 2, 2,170,170,170,170,170,170,170,170,170,170,
- 2,171,169, 89, 89, 89, 89, 89, 89,169,169,169,169,169,169,169,
+174,174,174,175,176,176,176,176,176,176,176,176,176,176,176,176,
+176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,
+176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,
+176,176,176,176,176,176,176,176,176,176,174,175,174,176,175,175,
+175,174,174,174,174,174,174,174,174,175,175,175,175,174,175,175,
+176, 87, 87,174,174,174,174,174,176,176,176,176,176,176,176,176,
+176,176,174,174, 2, 2,177,177,177,177,177,177,177,177,177,177,
+178,179,176,176,176,176,176,176, 92,176,176,176,176,176,176,176,
/* block 19 */
- 89,172,173,173, 89,174,174,174,174,174,174,174,174, 89, 89,174,
-174, 89, 89,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174, 89,174,174,174,174,174,174,
-174, 89,174, 89, 89, 89,174,174,174,174, 89, 89,172,174,173,173,
-173,172,172,172,172, 89, 89,173,173, 89, 89,173,173,172,174, 89,
- 89, 89, 89, 89, 89, 89, 89,173, 89, 89, 89, 89,174,174, 89,174,
-174,174,172,172, 89, 89,175,175,175,175,175,175,175,175,175,175,
-174,174,176,176,177,177,177,177,177,177,178,176, 89, 89, 89, 89,
+ 92,180,181,181, 92,182,182,182,182,182,182,182,182, 92, 92,182,
+182, 92, 92,182,182,182,182,182,182,182,182,182,182,182,182,182,
+182,182,182,182,182,182,182,182,182, 92,182,182,182,182,182,182,
+182, 92,182, 92, 92, 92,182,182,182,182, 92, 92,180,182,181,181,
+181,180,180,180,180, 92, 92,181,181, 92, 92,181,181,180,182, 92,
+ 92, 92, 92, 92, 92, 92, 92,181, 92, 92, 92, 92,182,182, 92,182,
+182,182,180,180, 92, 92,183,183,183,183,183,183,183,183,183,183,
+182,182,184,184,185,185,185,185,185,185,186,184, 92, 92, 92, 92,
/* block 20 */
- 89,179,179,180, 89,181,181,181,181,181,181, 89, 89, 89, 89,181,
-181, 89, 89,181,181,181,181,181,181,181,181,181,181,181,181,181,
-181,181,181,181,181,181,181,181,181, 89,181,181,181,181,181,181,
-181, 89,181,181, 89,181,181, 89,181,181, 89, 89,179, 89,180,180,
-180,179,179, 89, 89, 89, 89,179,179, 89, 89,179,179,179, 89, 89,
- 89,179, 89, 89, 89, 89, 89, 89, 89,181,181,181,181, 89,181, 89,
- 89, 89, 89, 89, 89, 89,182,182,182,182,182,182,182,182,182,182,
-179,179,181,181,181,179, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92,187,187,188, 92,189,189,189,189,189,189, 92, 92, 92, 92,189,
+189, 92, 92,189,189,189,189,189,189,189,189,189,189,189,189,189,
+189,189,189,189,189,189,189,189,189, 92,189,189,189,189,189,189,
+189, 92,189,189, 92,189,189, 92,189,189, 92, 92,187, 92,188,188,
+188,187,187, 92, 92, 92, 92,187,187, 92, 92,187,187,187, 92, 92,
+ 92,187, 92, 92, 92, 92, 92, 92, 92,189,189,189,189, 92,189, 92,
+ 92, 92, 92, 92, 92, 92,190,190,190,190,190,190,190,190,190,190,
+187,187,189,189,189,187, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 21 */
- 89,183,183,184, 89,185,185,185,185,185,185,185,185,185, 89,185,
-185,185, 89,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185, 89,185,185,185,185,185,185,
-185, 89,185,185, 89,185,185,185,185,185, 89, 89,183,185,184,184,
-184,183,183,183,183,183, 89,183,183,184, 89,184,184,183, 89, 89,
-185, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-185,185,183,183, 89, 89,186,186,186,186,186,186,186,186,186,186,
- 89,187, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92,191,191,192, 92,193,193,193,193,193,193,193,193,193, 92,193,
+193,193, 92,193,193,193,193,193,193,193,193,193,193,193,193,193,
+193,193,193,193,193,193,193,193,193, 92,193,193,193,193,193,193,
+193, 92,193,193, 92,193,193,193,193,193, 92, 92,191,193,192,192,
+192,191,191,191,191,191, 92,191,191,192, 92,192,192,191, 92, 92,
+193, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+193,193,191,191, 92, 92,194,194,194,194,194,194,194,194,194,194,
+195,196, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 22 */
- 89,188,189,189, 89,190,190,190,190,190,190,190,190, 89, 89,190,
-190, 89, 89,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190, 89,190,190,190,190,190,190,
-190, 89,190,190, 89,190,190,190,190,190, 89, 89,188,190,189,188,
-189,188,188,188,188, 89, 89,189,189, 89, 89,189,189,188, 89, 89,
- 89, 89, 89, 89, 89, 89,188,189, 89, 89, 89, 89,190,190, 89,190,
-190,190,188,188, 89, 89,191,191,191,191,191,191,191,191,191,191,
-192,190, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92,197,198,198, 92,199,199,199,199,199,199,199,199, 92, 92,199,
+199, 92, 92,199,199,199,199,199,199,199,199,199,199,199,199,199,
+199,199,199,199,199,199,199,199,199, 92,199,199,199,199,199,199,
+199, 92,199,199, 92,199,199,199,199,199, 92, 92,197,199,198,197,
+198,197,197,197,197, 92, 92,198,198, 92, 92,198,198,197, 92, 92,
+ 92, 92, 92, 92, 92, 92,197,198, 92, 92, 92, 92,199,199, 92,199,
+199,199,197,197, 92, 92,200,200,200,200,200,200,200,200,200,200,
+201,199,202,202,202,202,202,202, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 23 */
- 89, 89,193,194, 89,194,194,194,194,194,194, 89, 89, 89,194,194,
-194, 89,194,194,194,194, 89, 89, 89,194,194, 89,194, 89,194,194,
- 89, 89, 89,194,194, 89, 89, 89,194,194,194, 89, 89, 89,194,194,
-194,194,194,194,194,194,194,194,194,194, 89, 89, 89, 89,195,195,
-193,195,195, 89, 89, 89,195,195,195, 89,195,195,195,193, 89, 89,
-194, 89, 89, 89, 89, 89, 89,195, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89,196,196,196,196,196,196,196,196,196,196,
-197,197,197,198,198,198,198,198,198,199,198, 89, 89, 89, 89, 89,
+ 92, 92,203,204, 92,204,204,204,204,204,204, 92, 92, 92,204,204,
+204, 92,204,204,204,204, 92, 92, 92,204,204, 92,204, 92,204,204,
+ 92, 92, 92,204,204, 92, 92, 92,204,204,204, 92, 92, 92,204,204,
+204,204,204,204,204,204,204,204,204,204, 92, 92, 92, 92,205,205,
+203,205,205, 92, 92, 92,205,205,205, 92,205,205,205,203, 92, 92,
+204, 92, 92, 92, 92, 92, 92,205, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92,206,206,206,206,206,206,206,206,206,206,
+207,207,207,208,208,208,208,208,208,209,208, 92, 92, 92, 92, 92,
/* block 24 */
- 89,200,200,200, 89,201,201,201,201,201,201,201,201, 89,201,201,
-201, 89,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201, 89,201,201,201,201,201,201,
-201,201,201,201, 89,201,201,201,201,201, 89, 89, 89,201,202,202,
-202,200,200,200,200, 89,202,202,202, 89,202,202,202,202, 89, 89,
- 89, 89, 89, 89, 89,202,202, 89,201,201, 89, 89, 89, 89, 89, 89,
-201,201,202,202, 89, 89,203,203,203,203,203,203,203,203,203,203,
- 89, 89, 89, 89, 89, 89, 89, 89,204,204,204,204,204,204,204,205,
+ 92,210,210,210, 92,211,211,211,211,211,211,211,211, 92,211,211,
+211, 92,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
+211,211,211,211,211,211,211,211,211, 92,211,211,211,211,211,211,
+211,211,211,211, 92,211,211,211,211,211, 92, 92, 92,211,212,212,
+212,210,210,210,210, 92,212,212,212, 92,212,212,212,212, 92, 92,
+ 92, 92, 92, 92, 92,212,212, 92,211,211, 92, 92, 92, 92, 92, 92,
+211,211,212,212, 92, 92,213,213,213,213,213,213,213,213,213,213,
+ 92, 92, 92, 92, 92, 92, 92, 92,214,214,214,214,214,214,214,215,
/* block 25 */
- 89, 89,206,206, 89,207,207,207,207,207,207,207,207, 89,207,207,
-207, 89,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207, 89,207,207,207,207,207,207,
-207,207,207,207, 89,207,207,207,207,207, 89, 89,208,207,206,208,
-206,206,206,206,206, 89,208,206,206, 89,206,206,208,208, 89, 89,
- 89, 89, 89, 89, 89,206,206, 89, 89, 89, 89, 89, 89, 89,207, 89,
-207,207,208,208, 89, 89,209,209,209,209,209,209,209,209,209,209,
- 89, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92, 92,216,216, 92,217,217,217,217,217,217,217,217, 92,217,217,
+217, 92,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217, 92,217,217,217,217,217,217,
+217,217,217,217, 92,217,217,217,217,217, 92, 92,218,217,216,218,
+216,216,216,216,216, 92,218,216,216, 92,216,216,218,218, 92, 92,
+ 92, 92, 92, 92, 92,216,216, 92, 92, 92, 92, 92, 92, 92,217, 92,
+217,217,218,218, 92, 92,219,219,219,219,219,219,219,219,219,219,
+ 92,217,217, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 26 */
- 89, 89,210,210, 89,211,211,211,211,211,211,211,211, 89,211,211,
-211, 89,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211, 89,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211, 89, 89, 89,211,210,210,
-210,212,212,212,212, 89,210,210,210, 89,210,210,210,212, 89, 89,
- 89, 89, 89, 89, 89, 89, 89,210, 89, 89, 89, 89, 89, 89, 89, 89,
-211,211,212,212, 89, 89,213,213,213,213,213,213,213,213,213,213,
-214,214,214,214,214,214, 89, 89, 89,215,211,211,211,211,211,211,
+ 92, 92,220,220, 92,221,221,221,221,221,221,221,221, 92,221,221,
+221, 92,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
+221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
+221,221,221,221,221,221,221,221,221,221,221, 92, 92,221,220,220,
+220,222,222,222,222, 92,220,220,220, 92,220,220,220,222,221, 92,
+ 92, 92, 92, 92, 92, 92, 92,220, 92, 92, 92, 92, 92, 92, 92, 92,
+221,221,222,222, 92, 92,223,223,223,223,223,223,223,223,223,223,
+224,224,224,224,224,224, 92, 92, 92,225,221,221,221,221,221,221,
/* block 27 */
- 89, 89,216,216, 89,217,217,217,217,217,217,217,217,217,217,217,
-217,217,217,217,217,217,217, 89, 89, 89,217,217,217,217,217,217,
-217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
-217,217, 89,217,217,217,217,217,217,217,217,217, 89,217, 89, 89,
-217,217,217,217,217,217,217, 89, 89, 89,218, 89, 89, 89, 89,216,
-216,216,218,218,218, 89,218, 89,216,216,216,216,216,216,216,216,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89,216,216,219, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92, 92,226,226, 92,227,227,227,227,227,227,227,227,227,227,227,
+227,227,227,227,227,227,227, 92, 92, 92,227,227,227,227,227,227,
+227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,
+227,227, 92,227,227,227,227,227,227,227,227,227, 92,227, 92, 92,
+227,227,227,227,227,227,227, 92, 92, 92,228, 92, 92, 92, 92,226,
+226,226,228,228,228, 92,228, 92,226,226,226,226,226,226,226,226,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92,226,226,229, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 28 */
- 89,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,
-220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,
-220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,
-220,221,220,220,221,221,221,221,221,221,221, 89, 89, 89, 89, 3,
-220,220,220,220,220,220,222,221,221,221,221,221,221,221,221,223,
-224,224,224,224,224,224,224,224,224,224,223,223, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,
+230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,
+230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,
+230,231,230,230,231,231,231,231,231,231,231, 92, 92, 92, 92, 3,
+230,230,230,230,230,230,232,231,231,231,231,231,231,231,231,233,
+234,234,234,234,234,234,234,234,234,234,233,233, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 29 */
- 89,225,225, 89,225, 89, 89,225,225, 89,225, 89, 89,225, 89, 89,
- 89, 89, 89, 89,225,225,225,225, 89,225,225,225,225,225,225,225,
- 89,225,225,225, 89,225, 89,225, 89, 89,225,225, 89,225,225,225,
-225,226,225,225,226,226,226,226,226,226, 89,226,226,225, 89, 89,
-225,225,225,225,225, 89,227, 89,226,226,226,226,226,226, 89, 89,
-228,228,228,228,228,228,228,228,228,228, 89, 89,225,225, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92,235,235, 92,235, 92, 92,235,235, 92,235, 92, 92,235, 92, 92,
+ 92, 92, 92, 92,235,235,235,235, 92,235,235,235,235,235,235,235,
+ 92,235,235,235, 92,235, 92,235, 92, 92,235,235, 92,235,235,235,
+235,236,235,235,236,236,236,236,236,236, 92,236,236,235, 92, 92,
+235,235,235,235,235, 92,237, 92,236,236,236,236,236,236, 92, 92,
+238,238,238,238,238,238,238,238,238,238, 92, 92,235,235,235,235,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 30 */
-229,230,230,230,231,231,231,231,231,231,231,231,231,231,231,231,
-231,231,231,230,230,230,230,230,232,232,230,230,230,230,230,230,
-233,233,233,233,233,233,233,233,233,233,234,234,234,234,234,234,
-234,234,234,234,230,232,230,232,230,232,235,236,235,236,237,237,
-229,229,229,229,229,229,229,229, 89,229,229,229,229,229,229,229,
-229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,
-229,229,229,229,229,229,229,229,229,229,229,229,229, 89, 89, 89,
- 89,232,232,232,232,232,232,232,232,232,232,232,232,232,232,237,
+239,240,240,240,241,241,241,241,241,241,241,241,241,241,241,241,
+241,241,241,240,241,240,240,240,242,242,240,240,240,240,240,240,
+243,243,243,243,243,243,243,243,243,243,244,244,244,244,244,244,
+244,244,244,244,240,242,240,242,240,242,245,246,245,246,247,247,
+239,239,239,239,239,239,239,239, 92,239,239,239,239,239,239,239,
+239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,
+239,239,239,239,239,239,239,239,239,239,239,239,239, 92, 92, 92,
+ 92,242,242,242,242,242,242,242,242,242,242,242,242,242,242,247,
/* block 31 */
-232,232,232,232,232,231,232,232,229,229,229,229, 89, 89, 89, 89,
-232,232,232,232,232,232,232,232, 89,232,232,232,232,232,232,232,
-232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,
-232,232,232,232,232,232,232,232,232,232,232,232,232, 89,230,230,
-230,230,230,230,230,230,232,230,230,230,230,230,230, 89,230,230,
-231,231,231,231,231, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+242,242,242,242,242,241,242,242,239,239,239,239,239,242,242,242,
+242,242,242,242,242,242,242,242, 92,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,242,242,242,242, 92,240,240,
+240,240,240,240,240,240,242,240,240,240,240,240,240, 92,240,240,
+241,241,241,241,241, 13, 13, 13, 13,241,241, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 32 */
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,239,239,240,240,240,
-240,239,240,240,240,240,240,240,239,240,240,239,239,240,240,238,
-241,241,241,241,241,241,241,241,241,241,242,242,242,242,242,242,
-238,238,238,238,238,238,239,239,240,240,238,238,238,238,240,240,
-240,238,239,239,239,238,238,239,239,239,239,239,239,239,238,238,
-238,240,240,240,240,238,238,238,238,238,238,238,238,238,238,238,
+248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
+248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
+248,248,248,248,248,248,248,248,248,248,248,249,249,250,250,250,
+250,249,250,250,250,250,250,250,249,250,250,249,249,250,250,248,
+251,251,251,251,251,251,251,251,251,251,252,252,252,252,252,252,
+248,248,248,248,248,248,249,249,250,250,248,248,248,248,250,250,
+250,248,249,249,249,248,248,249,249,249,249,249,249,249,248,248,
+248,250,250,250,250,248,248,248,248,248,248,248,248,248,248,248,
/* block 33 */
-238,238,240,239,239,240,240,239,239,239,239,239,239,240,238,239,
-241,241,241,241,241,241,241,241,241,241,239,239,239,240,243,243,
-244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,
-244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,
-244,244,244,244,244,244, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,
-245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,
-245,245,245,245,245,245,245,245,245,245,245, 2,246, 89, 89, 89,
+248,248,250,249,249,250,250,249,249,249,249,249,249,250,248,249,
+251,251,251,251,251,251,251,251,251,251,249,249,249,250,253,253,
+254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
+254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
+254,254,254,254,254,254, 92,254, 92, 92, 92, 92, 92,254, 92, 92,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+255,255,255,255,255,255,255,255,255,255,255, 2,256,255,255,255,
/* block 34 */
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
/* block 35 */
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248, 89,248,248,248,248, 89, 89,
-248,248,248,248,248,248,248, 89,248, 89,248,248,248,248, 89, 89,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258, 92,258,258,258,258, 92, 92,
+258,258,258,258,258,258,258, 92,258, 92,258,258,258,258, 92, 92,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
/* block 36 */
-248,248,248,248,248,248,248,248,248, 89,248,248,248,248, 89, 89,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248, 89,
-248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
+258,258,258,258,258,258,258,258,258, 92,258,258,258,258, 92, 92,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258, 92,258,258,258,258, 92, 92,258,258,258,258,258,258,258, 92,
+258, 92,258,258,258,258, 92, 92,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258, 92,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
/* block 37 */
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248,248,248,248,248, 89, 89, 89, 89,249,
-250,251,251,251,251,251,251,251,251,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252, 89, 89, 89,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258, 92,258,258,258,258, 92, 92,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258,258,258,258,258, 92, 92,259,259,259,
+260,260,260,260,260,260,260,260,260,261,261,261,261,261,261,261,
+261,261,261,261,261,261,261,261,261,261,261,261,261, 92, 92, 92,
/* block 38 */
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-250,250,250,250,250,250,250,250,250,250, 89, 89, 89, 89, 89, 89,
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-253,253,253,253,253, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+262,262,262,262,262,262,262,262,262,262, 92, 92, 92, 92, 92, 92,
+263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 39 */
-254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+264,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
/* block 40 */
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
/* block 41 */
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,256,256,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,266,266,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
/* block 42 */
-257,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
-258,258,258,258,258,258,258,258,258,258,258,259,260, 89, 89, 89,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261, 2, 2, 2,262,262,
-262, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+267,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,
+268,268,268,268,268,268,268,268,268,268,268,269,270, 92, 92, 92,
+271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
+271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
+271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
+271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
+271,271,271,271,271,271,271,271,271,271,271, 2, 2, 2,272,272,
+272, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 43 */
-263,263,263,263,263,263,263,263,263,263,263,263,263, 89,263,263,
-263,263,264,264,264, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
-265,265,266,266,266, 2, 2, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,
-267,267,268,268, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-269,269,269,269,269,269,269,269,269,269,269,269,269, 89,269,269,
-269, 89,270,270, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+273,273,273,273,273,273,273,273,273,273,273,273,273, 92,273,273,
+273,273,274,274,274, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
+275,275,276,276,276, 2, 2, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,
+277,277,278,278, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+279,279,279,279,279,279,279,279,279,279,279,279,279, 92,279,279,
+279, 92,280,280, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 44 */
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
-271,271,271,271,272,272,273,274,274,274,274,274,274,274,273,273,
-273,273,273,273,273,273,274,273,273,274,274,274,274,274,274,274,
-274,274,274,274,275,275,275,276,275,275,275,277,271,274, 89, 89,
-278,278,278,278,278,278,278,278,278,278, 89, 89, 89, 89, 89, 89,
-279,279,279,279,279,279,279,279,279,279, 89, 89, 89, 89, 89, 89,
+281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
+281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
+281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
+281,281,281,281,282,282,283,282,282,282,282,282,282,282,283,283,
+283,283,283,283,283,283,282,283,283,282,282,282,282,282,282,282,
+282,282,282,282,284,284,284,285,284,284,284,286,281,282, 92, 92,
+287,287,287,287,287,287,287,287,287,287, 92, 92, 92, 92, 92, 92,
+288,288,288,288,288,288,288,288,288,288, 92, 92, 92, 92, 92, 92,
/* block 45 */
-280,280, 2, 2,280, 2,281,280,280,280,280,282,282,282,283, 89,
-284,284,284,284,284,284,284,284,284,284, 89, 89, 89, 89, 89, 89,
-285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,286,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,285,285,285,285,285, 89, 89, 89, 89, 89, 89, 89, 89,
+289,289, 2, 2,289, 2,290,289,289,289,289,291,291,291,292, 92,
+293,293,293,293,293,293,293,293,293,293, 92, 92, 92, 92, 92, 92,
+294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,295,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,294,294,294,294,294, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 46 */
-285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
-285,285,285,285,285,285,285,285,285,282,285, 89, 89, 89, 89, 89,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
+294,294,294,294,294,294,294,294,294,291,294, 92, 92, 92, 92, 92,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
+265,265,265,265,265,265, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 47 */
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287, 89, 89, 89,
-288,288,288,289,289,289,289,288,288,289,289,289, 89, 89, 89, 89,
-289,289,288,289,289,289,289,289,289,288,288,288, 89, 89, 89, 89,
-290, 89, 89, 89,291,291,292,292,292,292,292,292,292,292,292,292,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293, 89, 89,
-293,293,293,293,293, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
+296,296,296,296,296,296,296,296,296,296,296,296,296, 92, 92, 92,
+297,297,297,298,298,298,298,297,297,298,298,298, 92, 92, 92, 92,
+298,298,297,298,298,298,298,298,298,297,297,297, 92, 92, 92, 92,
+299, 92, 92, 92,300,300,301,301,301,301,301,301,301,301,301,301,
+302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
+302,302,302,302,302,302,302,302,302,302,302,302,302,302, 92, 92,
+302,302,302,302,302, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 48 */
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294, 89, 89, 89, 89,
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-295,294,294,294,294,294,294,294,295,295, 89, 89, 89, 89, 89, 89,
-296,296,296,296,296,296,296,296,296,296,296, 89, 89, 89,297,297,
-298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,
-298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,
-
-/* block 49 */
-299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,
-299,299,299,299,299,299,299,300,300,301,301,301, 89, 89,302,302,
-303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
-303,303,303,303,303,304,305,304,305,305,305,305,305,305,305, 89,
-305,304,305,304,304,305,305,305,305,305,305,305,305,304,304,304,
-304,304,304,305,305,305,305,305,305,305,305,305,305, 89, 89,305,
+303,303,303,303,303,303,303,303,303,303,303,303, 92, 92, 92, 92,
+304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
+304,303,303,303,303,303,303,303,304,304, 92, 92, 92, 92, 92, 92,
+305,305,305,305,305,305,305,305,305,305,306, 92, 92, 92,307,307,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+
+/* block 49 */
+309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
+309,309,309,309,309,309,309,310,310,311,311,311, 92, 92,312,312,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,314,315,314,315,315,315,315,315,315,315, 92,
+315,314,315,314,314,315,315,315,315,315,315,315,315,314,314,314,
+314,314,314,315,315,315,315,315,315,315,315,315,315, 92, 92,315,
/* block 50 */
-306,306,306,306,306,306,306,306,306,306, 89, 89, 89, 89, 89, 89,
-306,306,306,306,306,306,306,306,306,306, 89, 89, 89, 89, 89, 89,
-307,307,307,307,307,307,307,308,307,307,307,307,307,307, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+316,316,316,316,316,316,316,316,316,316, 92, 92, 92, 92, 92, 92,
+316,316,316,316,316,316,316,316,316,316, 92, 92, 92, 92, 92, 92,
+317,317,317,317,317,317,317,318,317,317,317,317,317,317, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 51 */
-309,309,309,309,310,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,309,310,309,309,309,309,309,310,309,310,310,310,
-310,310,309,310,310,311,311,311,311,311,311,311, 89, 89, 89, 89,
-312,312,312,312,312,312,312,312,312,312,313,313,313,313,313,313,
-313,314,314,314,314,314,314,314,314,314,314,309,309,309,309,309,
-309,309,309,309,314,314,314,314,314,314,314,314,314, 89, 89, 89,
+319,319,319,319,320,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,319,320,319,319,319,319,319,320,319,320,320,320,
+320,320,319,320,320,321,321,321,321,321,321,321, 92, 92, 92, 92,
+322,322,322,322,322,322,322,322,322,322,323,323,323,323,323,323,
+323,324,324,324,324,324,324,324,324,324,324,319,319,319,319,319,
+319,319,319,319,324,324,324,324,324,324,324,324,324, 92, 92, 92,
/* block 52 */
-315,315,316,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,316,315,315,315,315,316,316,315,315,316, 89, 89, 89,317,317,
-318,318,318,318,318,318,318,318,318,318, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+325,325,326,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,326,325,325,325,325,326,326,325,325,326,325,326,326,327,327,
+328,328,328,328,328,328,328,328,328,328,327,327,327,327,327,327,
+329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,
+329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,
+329,329,329,329,329,329,330,331,330,330,331,331,331,330,331,330,
+330,330,331,331, 92, 92, 92, 92, 92, 92, 92, 92,332,332,332,332,
/* block 53 */
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,320,320,320,320,320,320,320,320,321,321,321,321,
-321,321,321,321,320,320,321,321, 89, 89, 89,322,322,322,322,322,
-323,323,323,323,323,323,323,323,323,323, 89, 89, 89,319,319,319,
-324,324,324,324,324,324,324,324,324,324,325,325,325,325,325,325,
-325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,
-325,325,325,325,325,325,325,325,326,326,326,326,326,326,327,327,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,334,334,334,334,334,334,334,334,335,335,335,335,
+335,335,335,335,334,334,335,335, 92, 92, 92,336,336,336,336,336,
+337,337,337,337,337,337,337,337,337,337, 92, 92, 92,333,333,333,
+338,338,338,338,338,338,338,338,338,338,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,340,340,340,340,340,340,341,341,
/* block 54 */
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 84, 84, 84, 2, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84,328, 84, 84, 84, 84, 84, 84, 84,329,329,329,329, 84,329,329,
-329,329,328, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+342,342,342,342,342,342,342,342, 92, 92, 92, 92, 92, 92, 92, 92,
+ 87, 87, 87, 2, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87,343, 87, 87, 87, 87, 87, 87, 87,344,344,344,344, 87,344,344,
+344,344,343,343, 87,344,344, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 55 */
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 96, 96, 96, 96, 96,330, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 90, 90, 90,
- 90, 90, 14, 14, 14, 14, 96, 96, 96, 96, 96, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14,331,332, 14, 14, 14,333, 14, 14,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 99, 99, 99, 99, 99,345, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 93, 93, 93,
+ 93, 93, 84, 84, 84, 84, 93, 93, 93, 93, 93, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20,346,347, 20, 20, 20,348, 20, 20,
/* block 56 */
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 90,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 84, 84, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 93,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 87, 87, 87, 87,
/* block 57 */
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
/* block 58 */
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 14, 14, 14, 14, 14,334, 14, 14,335, 14,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 20, 20, 20, 20, 20,349, 20, 20,350, 20,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
/* block 59 */
-336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337,
-336,336,336,336,336,336, 89, 89,337,337,337,337,337,337, 89, 89,
-336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337,
-336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337,
-336,336,336,336,336,336, 89, 89,337,337,337,337,337,337, 89, 89,
- 96,336, 96,336, 96,336, 96,336, 89,337, 89,337, 89,337, 89,337,
-336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337,
-338,338,339,339,339,339,340,340,341,341,342,342,343,343, 89, 89,
+351,351,351,351,351,351,351,351,352,352,352,352,352,352,352,352,
+351,351,351,351,351,351, 92, 92,352,352,352,352,352,352, 92, 92,
+351,351,351,351,351,351,351,351,352,352,352,352,352,352,352,352,
+351,351,351,351,351,351,351,351,352,352,352,352,352,352,352,352,
+351,351,351,351,351,351, 92, 92,352,352,352,352,352,352, 92, 92,
+ 99,351, 99,351, 99,351, 99,351, 92,352, 92,352, 92,352, 92,352,
+351,351,351,351,351,351,351,351,352,352,352,352,352,352,352,352,
+353,353,354,354,354,354,355,355,356,356,357,357,358,358, 92, 92,
/* block 60 */
-336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344,
-336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344,
-336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344,
-336,336, 96,345, 96, 89, 96, 96,337,337,346,346,347, 88,348, 88,
- 88, 88, 96,345, 96, 89, 96, 96,349,349,349,349,347, 88, 88, 88,
-336,336, 96, 96, 89, 89, 96, 96,337,337,350,350, 89, 88, 88, 88,
-336,336, 96, 96, 96,115, 96, 96,337,337,351,351,119, 88, 88, 88,
- 89, 89, 96,345, 96, 89, 96, 96,352,352,353,353,347, 88, 88, 89,
+351,351,351,351,351,351,351,351,359,359,359,359,359,359,359,359,
+351,351,351,351,351,351,351,351,359,359,359,359,359,359,359,359,
+351,351,351,351,351,351,351,351,359,359,359,359,359,359,359,359,
+351,351, 99,360, 99, 92, 99, 99,352,352,361,361,362, 91,363, 91,
+ 91, 91, 99,360, 99, 92, 99, 99,364,364,364,364,362, 91, 91, 91,
+351,351, 99, 99, 92, 92, 99, 99,352,352,365,365, 92, 91, 91, 91,
+351,351, 99, 99, 99,118, 99, 99,352,352,366,366,122, 91, 91, 91,
+ 92, 92, 99,360, 99, 92, 99, 99,367,367,368,368,362, 91, 91, 92,
/* block 61 */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,354,354, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,369,369, 16, 16,
7, 7, 7, 7, 7, 7, 2, 2, 15, 19, 4, 15, 15, 19, 4, 15,
- 2, 2, 2, 2, 2, 2, 2, 2,355,356, 16, 16, 16, 16, 16, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2,370,371, 16, 16, 16, 16, 16, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 19, 2, 2, 2, 2, 11,
11, 2, 2, 2, 6, 4, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 6, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
- 16, 16, 16, 16, 16, 89, 89, 89, 89, 89, 16, 16, 16, 16, 16, 16,
- 17, 82, 89, 89, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 82,
+ 16, 16, 16, 16, 16, 92, 92, 92, 92, 92, 16, 16, 16, 16, 16, 16,
+ 17, 84, 92, 92, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 84,
/* block 62 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 89,
- 82, 82, 82, 82, 82, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 92,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 92, 92, 92,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,357,357,357,
-357, 84,357,357,357, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,372,372,372,
+372, 87,372,372,372, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 63 */
- 13, 13,358, 13, 13, 13, 13,358, 13, 13,359,358,358,358,359,359,
-358,358,358,359, 13,358, 13, 13, 13,358,358,358,358,358, 13, 13,
- 13, 13, 13, 13,358, 13,360, 13,358, 13,361,362,358,358, 13,359,
-358,358,363,358,359,329,329,329,329,359, 13, 13,359,359,358,358,
- 6, 6, 6, 6, 6,358,359,359,359,359, 13, 6, 13, 13,364, 13,
+ 13, 13,373, 13, 13, 13, 13,373, 13, 13,374,373,373,373,374,374,
+373,373,373,374, 13,373, 13, 13, 6,373,373,373,373,373, 13, 13,
+ 13, 13, 13, 13,373, 13,375, 13,373, 13,376,377,373,373, 13,374,
+373,373,378,373,374,344,344,344,344,374, 13, 13,374,374,373,373,
+ 6, 6, 6, 6, 6,373,374,374,374,374, 13, 6, 13, 13,379, 13,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
+380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,
+381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,
/* block 64 */
-367,367,367, 21, 22,367,367,367,367, 17, 89, 89, 89, 89, 89, 89,
+382,382,382, 22, 23,382,382,382,382, 17, 92, 92, 92, 92, 92, 92,
6, 6, 6, 6, 6, 13, 13, 13, 13, 13, 6, 6, 13, 13, 13, 13,
6, 13, 13, 6, 13, 13, 6, 13, 13, 13, 13, 13, 13, 13, 6, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
@@ -1776,16 +1825,16 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
6, 6, 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6,
- 6, 6, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 68 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
@@ -1793,10 +1842,10 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13,368,368,368,368,368,368,368,368,368,368,
-368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369, 17, 17, 17, 17, 17, 17,
+ 13, 13, 13, 13, 13, 13,383,383,383,383,383,383,383,383,383,383,
+383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
+384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,384,384,384,384,384,384, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
/* block 70 */
@@ -1830,46 +1879,36 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
/* block 73 */
+ 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 89, 13, 89, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-
-/* block 74 */
- 89, 13, 13, 13, 13, 89, 13, 13, 13, 13, 89, 89, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, 89, 13,
- 13, 13, 13, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89,
- 89, 13, 13, 13, 13, 13, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5,
+ 13, 13, 13, 13, 13, 13, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5,
4, 5, 4, 5, 4, 5, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-/* block 75 */
+/* block 74 */
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 13, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13,
+ 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89,
- 6, 6, 6, 6, 6, 4, 5, 6, 6, 6, 6, 89, 6, 89, 89, 89,
+ 6, 6, 6, 6, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-/* block 76 */
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
+/* block 75 */
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
-/* block 77 */
+/* block 76 */
6, 6, 6, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4,
5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
@@ -1879,145 +1918,155 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, 6,
-/* block 78 */
+/* block 77 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 13, 13, 6, 6, 6, 6, 6, 6, 89, 89, 89,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 6, 6, 6, 6, 6, 13, 13, 6, 6, 6, 6, 6, 6, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 78 */
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 79 */
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, 89,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, 89,
- 21, 22,373,374,375,376,377, 21, 22, 21, 22, 21, 22,378,379,380,
-381, 14, 21, 22, 14, 21, 22, 14, 14, 14, 14, 14, 14, 82,382,382,
+386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,
+386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,
+386,386,386,386,386,386,386,386,386,386,386,386,386,386,386, 92,
+387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,
+387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,
+387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, 92,
+ 22, 23,388,389,390,391,392, 22, 23, 22, 23, 22, 23,393,394,395,
+396, 20, 22, 23, 20, 22, 23, 20, 20, 20, 20, 20, 84, 84,397,397,
/* block 80 */
-111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112,
-111,112,111,112,383,384,384,384,384,384,384,111,112,111,112,385,
-385,385, 89, 89, 89, 89, 89, 89, 89,386,386,386,386,387,386,386,
+114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,
+114,115,114,115,398,399,399,399,399,399,399,114,115,114,115,400,
+400,400,114,115, 92, 92, 92, 92, 92,401,401,401,401,402,401,401,
/* block 81 */
-388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,
-388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,
-388,388,388,388,388,388, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,
-389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,
-389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,
-389,389,389,389,389,389, 89, 89, 89, 89, 89, 89, 89, 89, 89,390,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,
+403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,
+403,403,403,403,403,403, 92,403, 92, 92, 92, 92, 92,403, 92, 92,
+404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
+404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
+404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
+404,404,404,404,404,404,404,404, 92, 92, 92, 92, 92, 92, 92,405,
+406, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,407,
/* block 82 */
-248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
-248,248,248,248,248,248,248, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89,
-248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89,
-248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89,
-248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
+258,258,258,258,258,258,258, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+258,258,258,258,258,258,258, 92,258,258,258,258,258,258,258, 92,
+258,258,258,258,258,258,258, 92,258,258,258,258,258,258,258, 92,
+258,258,258,258,258,258,258, 92,258,258,258,258,258,258,258, 92,
+258,258,258,258,258,258,258, 92,258,258,258,258,258,258,258, 92,
+131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,
+131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,
/* block 83 */
2, 2, 15, 19, 15, 19, 2, 2, 2, 15, 19, 2, 15, 19, 2, 2,
2, 2, 2, 2, 2, 2, 2, 7, 2, 2, 7, 2, 15, 19, 2, 2,
- 15, 19, 4, 5, 4, 5, 4, 5, 4, 5, 2, 2, 2, 2, 2, 83,
- 2, 2, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 15, 19, 4, 5, 4, 5, 4, 5, 4, 5, 2, 2, 2, 2, 2, 85,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 7, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 84 */
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391, 89,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408, 92,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 85 */
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
/* block 86 */
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+408,408,408,408,408,408, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92,
/* block 87 */
- 1, 2, 2, 2, 13,392,329,393, 4, 5, 4, 5, 4, 5, 4, 5,
+ 1, 2, 2, 2, 13,409,344,410, 4, 5, 4, 5, 4, 5, 4, 5,
4, 5, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, 7, 4, 5, 5,
- 13,393,393,393,393,393,393,393,393,393, 84, 84, 84, 84, 84, 84,
- 7, 83, 83, 83, 83, 83, 13, 13,393,393,393,392,329, 2, 13, 13,
- 89,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,
-394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,
-394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,
-394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,
+ 13,410,410,410,410,410,410,410,410,410, 87, 87, 87, 87,411,411,
+ 7, 85, 85, 85, 85, 85, 13, 13,410,410,410,409,344, 2, 13, 13,
+ 92,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
+412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
+412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
+412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
/* block 88 */
-394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,
-394,394,394,394,394,394,394, 89, 89, 84, 84, 10, 10,395,395,394,
- 7,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-396,396,396,396,396,396,396,396,396,396,396, 2, 83,397,397,396,
+412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
+412,412,412,412,412,412,412, 92, 92, 87, 87, 10, 10,413,413,412,
+ 7,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
+414,414,414,414,414,414,414,414,414,414,414, 2, 85,415,415,414,
/* block 89 */
- 89, 89, 89, 89, 89,398,398,398,398,398,398,398,398,398,398,398,
-398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,
-398,398,398,398,398,398,398,398,398,398,398,398,398,398, 89, 89,
- 89,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
+ 92, 92, 92, 92, 92,416,416,416,416,416,416,416,416,416,416,416,
+416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
+416,416,416,416,416,416,416,416,416,416,416,416,416,416, 92, 92,
+ 92,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
/* block 90 */
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 89,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257, 92,
13, 13, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,
-398,398,398,398,398,398,398,398, 89, 89, 89, 89, 89, 89, 89, 89,
+416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
+416,416,416,416,416,416,416,416,416,416,416, 92, 92, 92, 92, 92,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+ 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
/* block 91 */
-399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,
-399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, 89,
+417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,
+417,417,417,417,417,417,417,417,417,417,417,417,417,417,417, 92,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 17,
13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,
-399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, 13,
+417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,
+417,417,417,417,417,417,417,417,417,417,417,417,417,417,417, 13,
/* block 92 */
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13,
@@ -2025,551 +2074,661 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, 89,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418, 92,
/* block 93 */
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
-400,400,400,400,400,400,400,400, 13, 13, 13, 13, 13, 13, 13, 13,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
/* block 94 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
/* block 95 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
/* block 96 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 97 */
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,403,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,421,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
/* block 98 */
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
+420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
/* block 99 */
-402,402,402,402,402,402,402,402,402,402,402,402,402, 89, 89, 89,
-404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
-404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
-404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
-404,404,404,404,404,404,404, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,
-405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,
-405,405,405,405,405,405,405,405,406,406,406,406,406,406,407,407,
+420,420,420,420,420,420,420,420,420,420,420,420,420, 92, 92, 92,
+422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,
+422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,
+422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,
+422,422,422,422,422,422,422, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,
+423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,
+423,423,423,423,423,423,423,423,424,424,424,424,424,424,425,425,
/* block 100 */
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
/* block 101 */
-408,408,408,408,408,408,408,408,408,408,408,408,409,410,410,410,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-411,411,411,411,411,411,411,411,411,411,408,408, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
- 89, 89,125,126,125,126,125,126,125,126,125,126,125,126,412,128,
-129,129,129,413, 89, 89, 89, 89, 89, 89, 89, 89,128,128,413,331,
+426,426,426,426,426,426,426,426,426,426,426,426,427,428,428,428,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+429,429,429,429,429,429,429,429,429,429,426,426, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,430,131,
+132,132,132,431,131,131,131,131,131,131,131,131,131,131,431,346,
/* block 102 */
-125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126,
-125,126,125,126,125,126,125,126, 89, 89, 89, 89, 89, 89, 89, 89,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,415,415,415,415,415,415,415,415,415,415,
-416,416,417,417,417,417,417,417, 89, 89, 89, 89, 89, 89, 89, 89,
+128,129,128,129,128,129,128,129,128,129,128,129,128,129,128,129,
+128,129,128,129,128,129,128,129, 92, 92, 92, 92, 92, 92, 92,131,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,433,433,433,433,433,433,433,433,433,433,
+434,434,435,435,435,435,435,435, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 103 */
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 83, 83, 83, 83, 83, 83, 83, 83, 83,
- 10, 10, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 14, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
- 82, 14, 14, 14, 14, 14, 14, 14, 14, 21, 22, 21, 22,418, 21, 22,
+ 10, 10, 10, 10, 10, 10, 10, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 10, 10, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 20, 20, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,
+ 84, 20, 20, 20, 20, 20, 20, 20, 20, 22, 23, 22, 23,436, 22, 23,
/* block 104 */
- 21, 22, 21, 22, 21, 22, 21, 22, 83, 10, 10, 21, 22, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 45, 45, 45, 45, 45,
+ 22, 23, 22, 23, 22, 23, 22, 23, 85, 10, 10, 22, 23,437, 20, 92,
+ 22, 23, 22, 23, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 22, 23, 22, 23, 22, 23, 22, 23, 22, 23,438, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 84, 84, 20, 14, 14, 14, 14, 14,
/* block 105 */
-419,419,420,419,419,419,420,419,419,419,419,420,419,419,419,419,
-419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
-419,419,419,421,421,420,420,421,422,422,422,422, 89, 89, 89, 89,
- 17, 17, 17, 17, 17, 17, 13, 13, 3, 13, 89, 89, 89, 89, 89, 89,
-423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,
-423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,
-423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,
-423,423,423,423,424,424,424,424, 89, 89, 89, 89, 89, 89, 89, 89,
+439,439,440,439,439,439,440,439,439,439,439,440,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,441,441,440,440,441,442,442,442,442, 92, 92, 92, 92,
+ 17, 17, 17, 17, 17, 17, 13, 13, 3, 13, 92, 92, 92, 92, 92, 92,
+443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,
+443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,
+443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,
+443,443,443,443,444,444,444,444, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 106 */
-425,425,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,425,425,425,425,425,425,425,425,425,425,425,425,
-425,425,425,425,427, 89, 89, 89, 89, 89, 89, 89, 89, 89,428,428,
-429,429,429,429,429,429,429,429,429,429, 89, 89, 89, 89, 89, 89,
-167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
-167,167,169,169,169,169,169,169,430,430,430,169, 89, 89, 89, 89,
+445,445,446,446,446,446,446,446,446,446,446,446,446,446,446,446,
+446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,
+446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,
+446,446,446,446,445,445,445,445,445,445,445,445,445,445,445,445,
+445,445,445,445,447, 92, 92, 92, 92, 92, 92, 92, 92, 92,448,448,
+449,449,449,449,449,449,449,449,449,449, 92, 92, 92, 92, 92, 92,
+174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+174,174,176,176,176,176,176,176,178,178,178,176, 92, 92, 92, 92,
/* block 107 */
-431,431,431,431,431,431,431,431,431,431,432,432,432,432,432,432,
-432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
-432,432,432,432,432,432,433,433,433,433,433,433,433,433,434,434,
-435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,
-435,435,435,435,435,435,435,436,436,436,436,436,436,436,436,436,
-436,436,437,437, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,438,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247, 89, 89, 89,
+450,450,450,450,450,450,450,450,450,450,451,451,451,451,451,451,
+451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
+451,451,451,451,451,451,452,452,452,452,452,452,452,452,453,453,
+454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,
+454,454,454,454,454,454,454,455,455,455,455,455,455,455,455,455,
+455,455,456,456, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,457,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257, 92, 92, 92,
/* block 108 */
-439,439,439,440,441,441,441,441,441,441,441,441,441,441,441,441,
-441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
-441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
-441,441,441,439,440,440,439,439,439,439,440,440,439,440,440,440,
-440,442,442,442,442,442,442,442,442,442,442,442,442,442, 89,443,
-444,444,444,444,444,444,444,444,444,444, 89, 89, 89, 89,442,442,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+458,458,458,459,460,460,460,460,460,460,460,460,460,460,460,460,
+460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
+460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
+460,460,460,458,459,459,458,458,458,458,459,459,458,459,459,459,
+459,461,461,461,461,461,461,461,461,461,461,461,461,461, 92,462,
+463,463,463,463,463,463,463,463,463,463, 92, 92, 92, 92,461,461,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 109 */
-445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,
-445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,
-445,445,445,445,445,445,445,445,445,446,446,446,446,446,446,447,
-447,446,446,447,447,446,446, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-445,445,445,446,445,445,445,445,445,445,445,445,446,447, 89, 89,
-448,448,448,448,448,448,448,448,448,448, 89, 89,449,449,449,449,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-450,238,238,238,238,238,238,243,243,243,238,239, 89, 89, 89, 89,
+464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,
+464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,
+464,464,464,464,464,464,464,464,464,465,465,465,465,465,465,466,
+466,465,465,466,466,465,465, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+464,464,464,465,464,464,464,464,464,464,464,464,465,466, 92, 92,
+467,467,467,467,467,467,467,467,467,467, 92, 92,468,468,468,468,
+248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
+469,248,248,248,248,248,248,253,253,253,248,249, 92, 92, 92, 92,
/* block 110 */
-451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
-451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
-451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
-452,451,452,452,452,451,451,452,452,451,451,451,451,451,452,452,
-451,452,451, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,451,451,453,454,454,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,
+470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,
+470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,
+471,470,471,471,471,470,470,471,471,470,470,470,470,470,471,471,
+470,471,470, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,470,470,472,473,473,
+474,474,474,474,474,474,474,474,474,474,474,475,476,476,475,475,
+477,477,474,478,478,475,476, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 111 */
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,
-455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,
-455,455,455,456,456,457,456,456,457,456,456,458,456,457, 89, 89,
-459,459,459,459,459,459,459,459,459,459, 89, 89, 89, 89, 89, 89,
+ 92,258,258,258,258,258,258, 92, 92,258,258,258,258,258,258, 92,
+ 92,258,258,258,258,258,258, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+258,258,258,258,258,258,258, 92,258,258,258,258,258,258,258, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 112 */
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247, 89, 89, 89, 89,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247, 89, 89, 89, 89,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,475,475,476,475,475,476,475,475,477,475,476, 92, 92,
+479,479,479,479,479,479,479,479,479,479, 92, 92, 92, 92, 92, 92,
/* block 113 */
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
-460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257, 92, 92, 92, 92,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257, 92, 92, 92, 92,
/* block 114 */
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
/* block 115 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401, 89, 89,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401, 89, 89,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
/* block 116 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419, 92, 92,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
/* block 117 */
- 14, 14, 14, 14, 14, 14, 14, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89,136,136,136,136,136, 89, 89, 89, 89, 89,141,138,141,
-141,141,141,141,141,141,141,141,141,462,141,141,141,141,141,141,
-141,141,141,141,141,141,141, 89,141,141,141,141,141, 89,141, 89,
-141,141, 89,141,141, 89,141,141,141,141,141,141,141,141,141,141,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 118 */
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
+ 20, 20, 20, 20, 20, 20, 20, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92,139,139,139,139,139, 92, 92, 92, 92, 92,145,142,145,
+145,145,145,145,145,145,145,145,145,482,145,145,145,145,145,145,
+145,145,145,145,145,145,145, 92,145,145,145,145,145, 92,145, 92,
+145,145, 92,145,145, 92,145,145,145,145,145,145,145,145,145,145,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
/* block 119 */
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
+483,483, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
/* block 120 */
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147, 4, 5,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
/* block 121 */
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
- 89, 89,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-147,147,147,147,147,147,147,147,147,147,147,147,144, 13, 89, 89,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152, 4, 5,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
/* block 122 */
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 2, 2, 2, 2, 2, 2, 2, 4, 5, 2, 89, 89, 89, 89, 89, 89,
- 84, 84, 84, 84, 84, 84, 84, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 2, 7, 7, 11, 11, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4,
- 5, 4, 5, 4, 5, 2, 2, 4, 5, 2, 2, 2, 2, 11, 11, 11,
- 2, 2, 2, 89, 2, 2, 2, 2, 7, 4, 5, 4, 5, 4, 5, 2,
- 2, 2, 6, 7, 6, 6, 6, 89, 2, 3, 2, 2, 89, 89, 89, 89,
-147,147,147,147,147, 89,147,147,147,147,147,147,147,147,147,147,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+ 92, 92,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+152,152,152,152,152,152,152,152,152,152,152,152,149, 13, 92, 92,
/* block 123 */
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,
-147,147,147,147,147,147,147,147,147,147,147,147,147, 89, 89, 16,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 2, 2, 2, 2, 2, 2, 2, 4, 5, 2, 92, 92, 92, 92, 92, 92,
+ 87, 87, 87, 87, 87, 87, 87, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 2, 7, 7, 11, 11, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4,
+ 5, 4, 5, 4, 5, 2, 2, 4, 5, 2, 2, 2, 2, 11, 11, 11,
+ 2, 2, 2, 92, 2, 2, 2, 2, 7, 4, 5, 4, 5, 4, 5, 2,
+ 2, 2, 6, 7, 6, 6, 6, 92, 2, 3, 2, 2, 92, 92, 92, 92,
+152,152,152,152,152, 92,152,152,152,152,152,152,152,152,152,152,
/* block 124 */
- 89, 2, 2, 2, 3, 2, 2, 2, 4, 5, 2, 6, 2, 7, 2, 2,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152, 92, 92, 16,
+
+/* block 125 */
+ 92, 2, 2, 2, 3, 2, 2, 2, 4, 5, 2, 6, 2, 7, 2, 2,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 6, 6, 6, 2,
2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 2, 5, 10, 11,
10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 6, 5, 6, 4,
- 5, 2, 4, 5, 2, 2,396,396,396,396,396,396,396,396,396,396,
- 83,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-
-/* block 125 */
-396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
-396,396,396,396,396,396,396,396,396,396,396,396,396,396, 83, 83,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 89,
- 89, 89,247,247,247,247,247,247, 89, 89,247,247,247,247,247,247,
- 89, 89,247,247,247,247,247,247, 89, 89,247,247,247, 89, 89, 89,
- 3, 3, 6, 10, 13, 3, 3, 89, 13, 6, 6, 6, 6, 13, 13, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 16, 16, 16, 13, 13, 89, 89,
+ 5, 2, 4, 5, 2, 2,414,414,414,414,414,414,414,414,414,414,
+ 85,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
/* block 126 */
-463,463,463,463,463,463,463,463,463,463,463,463, 89,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463, 89,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463, 89,463,463, 89,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463, 89, 89,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
+414,414,414,414,414,414,414,414,414,414,414,414,414,414, 85, 85,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,257,257,257,257,257,257, 92,
+ 92, 92,257,257,257,257,257,257, 92, 92,257,257,257,257,257,257,
+ 92, 92,257,257,257,257,257,257, 92, 92,257,257,257, 92, 92, 92,
+ 3, 3, 6, 10, 13, 3, 3, 92, 13, 6, 6, 6, 6, 13, 13, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 16, 16, 16, 13, 13, 92, 92,
/* block 127 */
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463, 89, 89, 89, 89, 89,
+484,484,484,484,484,484,484,484,484,484,484,484, 92,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484, 92,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484, 92,484,484, 92,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484, 92, 92,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 128 */
- 2, 2, 13, 89, 89, 89, 89, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484, 92, 92, 92, 92, 92,
+
+/* block 129 */
+ 2, 2, 2, 92, 92, 92, 92, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,
-464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,
-464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,
-464,464,464,464,464,465,465,465,465,466,466,466,466,466,466,466,
+ 17, 17, 17, 17, 92, 92, 92, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,486,486,486,486,487,487,487,487,487,487,487,
-/* block 129 */
-466,466,466,466,466,466,466,466,466,466,465, 89, 89, 89, 89, 89,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 130 */
+487,487,487,487,487,487,487,487,487,487,486, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 84, 89, 89,
-
-/* block 130 */
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467, 89, 89, 89,
-468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
-468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
-468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
-468, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 92, 92,
/* block 131 */
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469, 89,
-470,470,470,470, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
-471,472,471,471,471,471,471,471,471,471,472, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488, 92, 92, 92,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 132 */
-473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
-473,473,473,473,473,473,473,473,473,473,473,473,473,473, 89,474,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475, 89, 89, 89, 89,475,475,475,475,475,475,475,475,
-476,477,477,477,477,477, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,
+490,490,490,490,490,490,490,490,490,490,490,490,490,490,490, 92,
+491,491,491,491, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,493,492,492,492,492,492,492,492,492,493, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 133 */
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,479,479,479,479,479,479,479,479,
-479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
-479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,
+494,494,494,494,494,494,494,494,494,494,494,494,494,494, 92,495,
+496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,
+496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,
+496,496,496,496, 92, 92, 92, 92,496,496,496,496,496,496,496,496,
+497,498,498,498,498,498, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 134 */
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481, 89, 89,
-482,482,482,482,482,482,482,482,482,482, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
+499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
+499,499,499,499,499,499,499,499,500,500,500,500,500,500,500,500,
+500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,
+500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,
+501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,
+501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,
+501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,
/* block 135 */
-483,483,483,483,483,483, 89, 89,483, 89,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483, 89,483,483, 89, 89, 89,483, 89, 89,483,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484, 89,485,486,486,486,486,486,486,486,486,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
+502,502,502,502,502,502,502,502,502,502,502,502,502,502, 92, 92,
+503,503,503,503,503,503,503,503,503,503, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 136 */
-487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
-487,487,487,487,487,487,488,488,488,488,488,488, 89, 89, 89,489,
-490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,
-490,490,490,490,490,490,490,490,490,490, 89, 89, 89, 89, 89,491,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+504,504,504,504,504,504, 92, 92,504, 92,504,504,504,504,504,504,
+504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,
+504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,
+504,504,504,504,504,504, 92,504,504, 92, 92, 92,504, 92, 92,504,
+505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
+505,505,505,505,505,505, 92,506,507,507,507,507,507,507,507,507,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 137 */
-492,493,493,493, 89,493,493, 89, 89, 89, 89, 89,493,493,493,493,
-492,492,492,492, 89,492,492,492, 89,492,492,492,492,492,492,492,
-492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
-492,492,492,492, 89, 89, 89, 89,493,493,493, 89, 89, 89, 89,493,
-494,494,494,494,494,494,494,494, 89, 89, 89, 89, 89, 89, 89, 89,
-495,495,495,495,495,495,495,495,495, 89, 89, 89, 89, 89, 89, 89,
-496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,
-496,496,496,496,496,496,496,496,496,496,496,496,496,497,497,498,
+508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,
+508,508,508,508,508,508,509,509,509,509,509,509, 92, 92, 92,510,
+511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,
+511,511,511,511,511,511,511,511,511,511, 92, 92, 92, 92, 92,512,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 138 */
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499, 89, 89, 89,500,500,500,500,500,500,500,
-501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,
-501,501,501,501,501,501, 89, 89,502,502,502,502,502,502,502,502,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503, 89, 89, 89, 89, 89,504,504,504,504,504,504,504,504,
+513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
+513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
+514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
+514,514,514,514,514,514,514,514, 92, 92, 92, 92, 92, 92,514,514,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 139 */
-505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
-505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
-505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
-505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
-505,505,505,505,505,505,505,505,505, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+515,516,516,516, 92,516,516, 92, 92, 92, 92, 92,516,516,516,516,
+515,515,515,515, 92,515,515,515, 92,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515, 92, 92, 92, 92,516,516,516, 92, 92, 92, 92,516,
+517,517,517,517,517,517,517,517, 92, 92, 92, 92, 92, 92, 92, 92,
+518,518,518,518,518,518,518,518,518, 92, 92, 92, 92, 92, 92, 92,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,520,520,521,
/* block 140 */
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,
-506,506,506,506,506,506,506,506,506,506,506,506,506,506,506, 89,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522, 92, 92, 92,523,523,523,523,523,523,523,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524, 92, 92,525,525,525,525,525,525,525,525,
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+526,526,526, 92, 92, 92, 92, 92,527,527,527,527,527,527,527,527,
/* block 141 */
-507,507,508,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-508,508,508,507,507,507,507,508,508,507,507,510,510,511,510,510,
-510,510, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,
+528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,
+528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,
+528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,
+528,528,528,528,528,528,528,528,528, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 142 */
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,
+529,529,529,529,529,529,529,529,529,529,529,529,529,529,529, 92,
/* block 143 */
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+530,531,530,532,532,532,532,532,532,532,532,532,532,532,532,532,
+532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,
+532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,
+532,532,532,532,532,532,532,532,531,531,531,531,531,531,531,531,
+531,531,531,531,531,531,531,533,533,533,533,533,533,533, 92, 92,
+ 92, 92,534,534,534,534,534,534,534,534,534,534,534,534,534,534,
+534,534,534,534,534,534,535,535,535,535,535,535,535,535,535,535,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 144 */
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-514,514,514,514, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+536,536,537,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+537,537,537,536,536,536,536,537,537,536,536,539,539,540,539,539,
+539,539, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,
+541,541,541,541,541,541,541,541,541, 92, 92, 92, 92, 92, 92, 92,
+542,542,542,542,542,542,542,542,542,542, 92, 92, 92, 92, 92, 92,
/* block 145 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+543,543,543,544,544,544,544,544,544,544,544,544,544,544,544,544,
+544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,
+544,544,544,544,544,544,544,543,543,543,543,543,545,543,543,543,
+543,543,543,543,543, 92,546,546,546,546,546,546,546,546,546,546,
+547,547,547,547, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 146 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+548,548,549,550,550,550,550,550,550,550,550,550,550,550,550,550,
+550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
+550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
+550,550,550,549,549,549,548,548,548,548,548,548,548,548,548,549,
+549,550,550,550,550,551,551,551,551, 92, 92, 92, 92, 92, 92, 92,
+552,552,552,552,552,552,552,552,552,552, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
/* block 147 */
+553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,
+553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,
+553,553,553,553,553,553,553,553,553,553,553,554,555,554,555,555,
+554,554,554,554,554,554,555,554, 92, 92, 92, 92, 92, 92, 92, 92,
+556,556,556,556,556,556,556,556,556,556, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 148 */
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+
+/* block 149 */
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 150 */
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+559,559,559,559, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 151 */
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+
+/* block 152 */
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 153 */
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+
+/* block 154 */
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,
+432,432,432,432,432,432,432,432,432, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 155 */
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+561,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562, 92,
+
+/* block 156 */
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,563,
+563,563,563,564,564,564,564,564,564,564,564,564,564,564,564,564,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 157 */
+414,412, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 158 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
@@ -2577,211 +2736,321 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 148 */
+/* block 159 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 89, 89, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 92, 92, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13,328,328, 84, 84, 84, 13, 13, 13,328,328,328,
-328,328,328, 16, 16, 16, 16, 16, 16, 16, 16, 84, 84, 84, 84, 84,
+ 13, 13, 13, 13, 13,343,343, 87, 87, 87, 13, 13, 13,343,343,343,
+343,343,343, 16, 16, 16, 16, 16, 16, 16, 16, 87, 87, 87, 87, 87,
-/* block 149 */
- 84, 84, 84, 13, 13, 84, 84, 84, 84, 84, 84, 84, 13, 13, 13, 13,
+/* block 160 */
+ 87, 87, 87, 13, 13, 87, 87, 87, 87, 87, 87, 87, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 84, 84, 84, 84, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 150 */
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,516,516,516,466, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 161 */
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,565,565,565,487, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 151 */
+/* block 162 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 17, 17, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 152 */
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,359,359,
-359,359,359,359,359, 89,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
+/* block 163 */
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,374,
+374,374,374,374,374, 92,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-/* block 153 */
-358,358,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,358, 89,358,358,
- 89, 89,358, 89, 89,358,358, 89, 89,358,358,358,358, 89,358,358,
-358,358,358,358,358,358,359,359,359,359, 89,359, 89,359,359,359,
-359,359,359,359, 89,359,359,359,359,359,359,359,359,359,359,359,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
+/* block 164 */
+373,373,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,373, 92,373,373,
+ 92, 92,373, 92, 92,373,373, 92, 92,373,373,373,373, 92,373,373,
+373,373,373,373,373,373,374,374,374,374, 92,374, 92,374,374,374,
+374,374,374,374, 92,374,374,374,374,374,374,374,374,374,374,374,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-/* block 154 */
-359,359,359,359,358,358, 89,358,358,358,358, 89, 89,358,358,358,
-358,358,358,358,358, 89,358,358,358,358,358,358,358, 89,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,358,358, 89,358,358,358,358, 89,
-358,358,358,358,358, 89,358, 89, 89, 89,358,358,358,358,358,358,
-358, 89,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
+/* block 165 */
+374,374,374,374,373,373, 92,373,373,373,373, 92, 92,373,373,373,
+373,373,373,373,373, 92,373,373,373,373,373,373,373, 92,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,373,373, 92,373,373,373,373, 92,
+373,373,373,373,373, 92,373, 92, 92, 92,373,373,373,373,373,373,
+373, 92,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-/* block 155 */
-358,358,358,358,358,358,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
+/* block 166 */
+373,373,373,373,373,373,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-/* block 156 */
-359,359,359,359,359,359,359,359,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
+/* block 167 */
+374,374,374,374,374,374,374,374,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-/* block 157 */
-358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359, 89, 89,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358, 6,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359, 6,359,359,359,359,
-359,359,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358, 6,359,359,359,359,
+/* block 168 */
+373,373,373,373,373,373,373,373,373,373,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374, 92, 92,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373, 6,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374, 6,374,374,374,374,
+374,374,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373, 6,374,374,374,374,
-/* block 158 */
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359, 6,359,359,359,359,359,359,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358, 6,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, 6,
-359,359,359,359,359,359,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, 6,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
+/* block 169 */
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374, 6,374,374,374,374,374,374,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373, 6,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, 6,
+374,374,374,374,374,374,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373, 6,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-/* block 159 */
-359,359,359,359,359,359,359,359,359, 6,359,359,359,359,359,359,
-358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
-358,358,358,358,358,358,358,358,358, 6,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359, 6,359,359,359,359,359,359,358,359, 89, 89, 8, 8,
+/* block 170 */
+374,374,374,374,374,374,374,374,374, 6,374,374,374,374,374,374,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373, 6,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374, 6,374,374,374,374,374,374,373,374, 92, 92, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-/* block 160 */
+/* block 171 */
+152,152,152,152, 92,152,152,152,152,152,152,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
+ 92,152,152, 92,152, 92, 92,152, 92,152,152,152,152,152,152,152,
+152,152,152, 92,152,152,152,152, 92,152, 92,152, 92, 92, 92, 92,
+ 92, 92,152, 92, 92, 92, 92,152, 92,152, 92,152, 92,152,152,152,
+ 92,152,152, 92,152, 92, 92,152, 92,152, 92,152, 92,152, 92,152,
+ 92,152,152, 92,152, 92, 92,152,152,152,152, 92,152,152,152,152,
+152,152,152, 92,152,152,152,152, 92,152,152,152,152, 92,152, 92,
+
+/* block 172 */
+152,152,152,152,152,152,152,152,152,152, 92,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152, 92, 92, 92, 92,
+ 92,152,152,152, 92,152,152,152,152,152, 92,152,152,152,152,152,
+152,152,152,152,152,152,152,152,152,152,152,152, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+147,147, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 173 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-/* block 161 */
+/* block 174 */
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92,
+ 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92,
+ 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 162 */
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 89, 89, 89, 89, 89,
+/* block 175 */
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89,
- 89, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 89, 13,
- 89, 89, 13, 89, 89, 89, 13, 89, 89, 89, 13, 13, 13, 13, 13, 89,
- 89, 89, 89, 89, 89, 89, 89, 13, 89, 89, 89, 89, 89, 89, 89, 13,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 89, 13, 13, 89, 89, 13,
-/* block 163 */
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 13, 13, 13, 89, 89,
- 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 176 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-/* block 164 */
-517, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 177 */
+566, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 165 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 178 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 92, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92,
-/* block 166 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 179 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 92, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-/* block 167 */
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 180 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92,
+ 13, 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-/* block 168 */
- 89, 16, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+/* block 181 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 92, 13, 13, 13, 13, 92, 92, 92,
+
+/* block 182 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 92, 92,
+ 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 183 */
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 13, 13, 13, 13, 13,
+
+/* block 184 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 92, 92, 92, 92, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 185 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 186 */
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 187 */
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 188 */
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+
+/* block 189 */
+419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
+419,419,419,419,419,419,419,419,419,419,419,419,419,419, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 190 */
+ 92, 16, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
@@ -2789,35 +3058,35 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-/* block 169 */
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
-
-/* block 170 */
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
-
-/* block 171 */
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,
-461,461,461,461,461,461,461,461,461,461,461,461,461,461, 89, 89,
+/* block 191 */
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+/* block 192 */
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+/* block 193 */
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481, 92, 92,
};
diff --git a/ext/pcre/pcrelib/pcre_valid_utf8.c b/ext/pcre/pcrelib/pcre_valid_utf8.c
index d54d3bd2d..f49832dc5 100644
--- a/ext/pcre/pcrelib/pcre_valid_utf8.c
+++ b/ext/pcre/pcrelib/pcre_valid_utf8.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2009 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -52,127 +52,246 @@ strings. */
*************************************************/
/* This function is called (optionally) at the start of compile or match, to
-validate that a supposed UTF-8 string is actually valid. The early check means
+check that a supposed UTF-8 string is actually valid. The early check means
that subsequent code can assume it is dealing with a valid string. The check
-can be turned off for maximum performance, but the consequences of supplying
-an invalid string are then undefined.
+can be turned off for maximum performance, but the consequences of supplying an
+invalid string are then undefined.
Originally, this function checked according to RFC 2279, allowing for values in
the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were in
the canonical format. Once somebody had pointed out RFC 3629 to me (it
obsoletes 2279), additional restrictions were applied. The values are now
limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the
-subrange 0xd000 to 0xdfff is excluded.
+subrange 0xd000 to 0xdfff is excluded. However, the format of 5-byte and 6-byte
+characters is still checked.
+
+From release 8.13 more information about the details of the error are passed
+back in the returned value:
+
+PCRE_UTF8_ERR0 No error
+PCRE_UTF8_ERR1 Missing 1 byte at the end of the string
+PCRE_UTF8_ERR2 Missing 2 bytes at the end of the string
+PCRE_UTF8_ERR3 Missing 3 bytes at the end of the string
+PCRE_UTF8_ERR4 Missing 4 bytes at the end of the string
+PCRE_UTF8_ERR5 Missing 5 bytes at the end of the string
+PCRE_UTF8_ERR6 2nd-byte's two top bits are not 0x80
+PCRE_UTF8_ERR7 3rd-byte's two top bits are not 0x80
+PCRE_UTF8_ERR8 4th-byte's two top bits are not 0x80
+PCRE_UTF8_ERR9 5th-byte's two top bits are not 0x80
+PCRE_UTF8_ERR10 6th-byte's two top bits are not 0x80
+PCRE_UTF8_ERR11 5-byte character is not permitted by RFC 3629
+PCRE_UTF8_ERR12 6-byte character is not permitted by RFC 3629
+PCRE_UTF8_ERR13 4-byte character with value > 0x10ffff is not permitted
+PCRE_UTF8_ERR14 3-byte character with value 0xd000-0xdfff is not permitted
+PCRE_UTF8_ERR15 Overlong 2-byte sequence
+PCRE_UTF8_ERR16 Overlong 3-byte sequence
+PCRE_UTF8_ERR17 Overlong 4-byte sequence
+PCRE_UTF8_ERR18 Overlong 5-byte sequence (won't ever occur)
+PCRE_UTF8_ERR19 Overlong 6-byte sequence (won't ever occur)
+PCRE_UTF8_ERR20 Isolated 0x80 byte (not within UTF-8 character)
+PCRE_UTF8_ERR21 Byte with the illegal value 0xfe or 0xff
Arguments:
string points to the string
length length of string, or -1 if the string is zero-terminated
+ errp pointer to an error position offset variable
-Returns: < 0 if the string is a valid UTF-8 string
- >= 0 otherwise; the value is the offset of the bad byte
-
-Bad bytes can be:
-
- . An isolated byte whose most significant bits are 0x80, because this
- can only correctly appear within a UTF-8 character;
-
- . A byte whose most significant bits are 0xc0, but whose other bits indicate
- that there are more than 3 additional bytes (i.e. an RFC 2279 starting
- byte, which is no longer valid under RFC 3629);
-
- .
-
-The returned offset may also be equal to the length of the string; this means
-that one or more bytes is missing from the final UTF-8 character.
+Returns: = 0 if the string is a valid UTF-8 string
+ > 0 otherwise, setting the offset of the bad character
*/
int
-_pcre_valid_utf8(USPTR string, int length)
+PRIV(valid_utf)(PCRE_PUCHAR string, int length, int *erroroffset)
{
-#ifdef SUPPORT_UTF8
-register USPTR p;
+#ifdef SUPPORT_UTF
+register PCRE_PUCHAR p;
if (length < 0)
{
for (p = string; *p != 0; p++);
- length = p - string;
+ length = (int)(p - string);
}
for (p = string; length-- > 0; p++)
{
- register int ab;
- register int c = *p;
- if (c < 128) continue;
- if (c < 0xc0) return p - string;
- ab = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */
- if (ab > 3) return p - string; /* Too many for RFC 3629 */
- if (length < ab) return p + 1 + length - string; /* Missing bytes */
- length -= ab;
+ register int ab, c, d;
+
+ c = *p;
+ if (c < 128) continue; /* ASCII character */
+
+ if (c < 0xc0) /* Isolated 10xx xxxx byte */
+ {
+ *erroroffset = (int)(p - string);
+ return PCRE_UTF8_ERR20;
+ }
+
+ if (c >= 0xfe) /* Invalid 0xfe or 0xff bytes */
+ {
+ *erroroffset = (int)(p - string);
+ return PCRE_UTF8_ERR21;
+ }
+
+ ab = PRIV(utf8_table4)[c & 0x3f]; /* Number of additional bytes */
+ if (length < ab)
+ {
+ *erroroffset = (int)(p - string); /* Missing bytes */
+ return ab - length; /* Codes ERR1 to ERR5 */
+ }
+ length -= ab; /* Length remaining */
/* Check top bits in the second byte */
- if ((*(++p) & 0xc0) != 0x80) return p - string;
- /* Check for overlong sequences for each different length, and for the
- excluded range 0xd000 to 0xdfff. */
+ if (((d = *(++p)) & 0xc0) != 0x80)
+ {
+ *erroroffset = (int)(p - string) - 1;
+ return PCRE_UTF8_ERR6;
+ }
+
+ /* For each length, check that the remaining bytes start with the 0x80 bit
+ set and not the 0x40 bit. Then check for an overlong sequence, and for the
+ excluded range 0xd800 to 0xdfff. */
switch (ab)
{
- /* Check for xx00 000x (overlong sequence) */
-
- case 1:
- if ((c & 0x3e) == 0) return p - string;
- continue; /* We know there aren't any more bytes to check */
+ /* 2-byte character. No further bytes to check for 0x80. Check first byte
+ for for xx00 000x (overlong sequence). */
+
+ case 1: if ((c & 0x3e) == 0)
+ {
+ *erroroffset = (int)(p - string) - 1;
+ return PCRE_UTF8_ERR15;
+ }
+ break;
- /* Check for 1110 0000, xx0x xxxx (overlong sequence) or
- 1110 1101, 1010 xxxx (0xd000 - 0xdfff) */
+ /* 3-byte character. Check third byte for 0x80. Then check first 2 bytes
+ for 1110 0000, xx0x xxxx (overlong sequence) or
+ 1110 1101, 1010 xxxx (0xd800 - 0xdfff) */
case 2:
- if ((c == 0xe0 && (*p & 0x20) == 0) ||
- (c == 0xed && *p >= 0xa0))
- return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if (c == 0xe0 && (d & 0x20) == 0)
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR16;
+ }
+ if (c == 0xed && d >= 0xa0)
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR14;
+ }
break;
- /* Check for 1111 0000, xx00 xxxx (overlong sequence) or
- greater than 0x0010ffff (f4 8f bf bf) */
+ /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2
+ bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a
+ character greater than 0x0010ffff (f4 8f bf bf) */
case 3:
- if ((c == 0xf0 && (*p & 0x30) == 0) ||
- (c > 0xf4 ) ||
- (c == 0xf4 && *p > 0x8f))
- return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR8;
+ }
+ if (c == 0xf0 && (d & 0x30) == 0)
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR17;
+ }
+ if (c > 0xf4 || (c == 0xf4 && d > 0x8f))
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR13;
+ }
break;
-#if 0
- /* These cases can no longer occur, as we restrict to a maximum of four
- bytes nowadays. Leave the code here in case we ever want to add an option
- for longer sequences. */
+ /* 5-byte and 6-byte characters are not allowed by RFC 3629, and will be
+ rejected by the length test below. However, we do the appropriate tests
+ here so that overlong sequences get diagnosed, and also in case there is
+ ever an option for handling these larger code points. */
+
+ /* 5-byte character. Check 3rd, 4th, and 5th bytes for 0x80. Then check for
+ 1111 1000, xx00 0xxx */
- /* Check for 1111 1000, xx00 0xxx */
case 4:
- if (c == 0xf8 && (*p & 0x38) == 0) return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR8;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fifth byte */
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE_UTF8_ERR9;
+ }
+ if (c == 0xf8 && (d & 0x38) == 0)
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE_UTF8_ERR18;
+ }
break;
- /* Check for leading 0xfe or 0xff, and then for 1111 1100, xx00 00xx */
+ /* 6-byte character. Check 3rd-6th bytes for 0x80. Then check for
+ 1111 1100, xx00 00xx. */
+
case 5:
- if (c == 0xfe || c == 0xff ||
- (c == 0xfc && (*p & 0x3c) == 0)) return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR8;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fifth byte */
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE_UTF8_ERR9;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Sixth byte */
+ {
+ *erroroffset = (int)(p - string) - 5;
+ return PCRE_UTF8_ERR10;
+ }
+ if (c == 0xfc && (d & 0x3c) == 0)
+ {
+ *erroroffset = (int)(p - string) - 5;
+ return PCRE_UTF8_ERR19;
+ }
break;
-#endif
-
}
- /* Check for valid bytes after the 2nd, if any; all must start 10 */
- while (--ab > 0)
+ /* Character is valid under RFC 2279, but 4-byte and 5-byte characters are
+ excluded by RFC 3629. The pointer p is currently at the last byte of the
+ character. */
+
+ if (ab > 3)
{
- if ((*(++p) & 0xc0) != 0x80) return p - string;
+ *erroroffset = (int)(p - string) - ab;
+ return (ab == 4)? PCRE_UTF8_ERR11 : PCRE_UTF8_ERR12;
}
}
-#else
+
+#else /* SUPPORT_UTF */
(void)(string); /* Keep picky compilers happy */
(void)(length);
#endif
-return -1;
+return PCRE_UTF8_ERR0; /* This indicates success */
}
/* End of pcre_valid_utf8.c */
diff --git a/ext/pcre/pcrelib/pcre_version.c b/ext/pcre/pcrelib/pcre_version.c
index bd63f41e6..3dd60a5bc 100644
--- a/ext/pcre/pcrelib/pcre_version.c
+++ b/ext/pcre/pcrelib/pcre_version.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -77,8 +77,13 @@ I could find no way of detecting that a macro is defined as an empty string at
pre-processor time. This hack uses a standard trick for avoiding calling
the STRING macro with an empty argument when doing the test. */
+#ifdef COMPILE_PCRE8
PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
pcre_version(void)
+#else
+PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
+pcre16_version(void)
+#endif
{
return (XSTRING(Z PCRE_PRERELEASE)[1] == 0)?
XSTRING(PCRE_MAJOR.PCRE_MINOR PCRE_DATE) :
diff --git a/ext/pcre/pcrelib/pcre_xclass.c b/ext/pcre/pcrelib/pcre_xclass.c
index 98841c556..446f85db5 100644
--- a/ext/pcre/pcrelib/pcre_xclass.c
+++ b/ext/pcre/pcrelib/pcre_xclass.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -62,39 +62,63 @@ Returns: TRUE if character matches, else FALSE
*/
BOOL
-_pcre_xclass(int c, const uschar *data)
+PRIV(xclass)(int c, const pcre_uchar *data, BOOL utf)
{
int t;
BOOL negated = (*data & XCL_NOT) != 0;
+(void)utf;
+#ifdef COMPILE_PCRE8
+/* In 8 bit mode, this must always be TRUE. Help the compiler to know that. */
+utf = TRUE;
+#endif
+
/* Character values < 256 are matched against a bitmap, if one is present. If
not, we still carry on, because there may be ranges that start below 256 in the
additional data. */
if (c < 256)
{
- if ((*data & XCL_MAP) != 0 && (data[1 + c/8] & (1 << (c&7))) != 0)
- return !negated; /* char found */
+ if ((*data & XCL_MAP) != 0 &&
+ (((pcre_uint8 *)(data + 1))[c/8] & (1 << (c&7))) != 0)
+ return !negated; /* char found */
}
/* First skip the bit map if present. Then match against the list of Unicode
properties or large chars or ranges that end with a large char. We won't ever
encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */
-if ((*data++ & XCL_MAP) != 0) data += 32;
+if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(pcre_uchar);
while ((t = *data++) != XCL_END)
{
int x, y;
if (t == XCL_SINGLE)
{
- GETCHARINC(x, data);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ GETCHARINC(x, data); /* macro generates multiple statements */
+ }
+ else
+#endif
+ x = *data++;
if (c == x) return !negated;
}
else if (t == XCL_RANGE)
{
- GETCHARINC(x, data);
- GETCHARINC(y, data);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ GETCHARINC(x, data); /* macro generates multiple statements */
+ GETCHARINC(y, data); /* macro generates multiple statements */
+ }
+ else
+#endif
+ {
+ x = *data++;
+ y = *data++;
+ }
if (c >= x && c <= y) return !negated;
}
@@ -115,7 +139,7 @@ while ((t = *data++) != XCL_END)
break;
case PT_GC:
- if ((data[1] == _pcre_ucp_gentype[prop->chartype]) == (t == XCL_PROP))
+ if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == (t == XCL_PROP))
return !negated;
break;
@@ -128,28 +152,28 @@ while ((t = *data++) != XCL_END)
break;
case PT_ALNUM:
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||
- _pcre_ucp_gentype[prop->chartype] == ucp_N) == (t == XCL_PROP))
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (t == XCL_PROP))
return !negated;
break;
case PT_SPACE: /* Perl space */
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
== (t == XCL_PROP))
return !negated;
break;
case PT_PXSPACE: /* POSIX space */
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP))
return !negated;
break;
case PT_WORD:
- if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||
- _pcre_ucp_gentype[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
== (t == XCL_PROP))
return !negated;
break;
diff --git a/ext/pcre/pcrelib/pcredemo.c b/ext/pcre/pcrelib/pcredemo.c
index 3a38ced9b..946aba45c 100644
--- a/ext/pcre/pcrelib/pcredemo.c
+++ b/ext/pcre/pcrelib/pcredemo.c
@@ -248,7 +248,7 @@ if (namecount <= 0) printf("No named substrings\n"); else
* more than one byte. *
* *
* However, there is a complication concerned with newlines. When the *
-* newline convention is such that CRLF is a valid newline, we want must *
+* newline convention is such that CRLF is a valid newline, we must *
* advance by two characters rather than one. The newline convention can *
* be set in the regex by (*CR), etc.; if not, we must find the default. *
*************************************************************************/
diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c
index ec2517c87..d45a15fc6 100644
--- a/ext/pcre/pcrelib/pcreposix.c
+++ b/ext/pcre/pcrelib/pcreposix.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -150,6 +150,16 @@ static const int eint[] = {
REG_BADPAT, /* (*MARK) must have an argument */
REG_INVARG, /* this version of PCRE is not compiled with PCRE_UCP support */
REG_BADPAT, /* \c must be followed by an ASCII character */
+ REG_BADPAT, /* \k is not followed by a braced, angle-bracketed, or quoted name */
+ /* 70 */
+ REG_BADPAT, /* internal error: unknown opcode in find_fixedlength() */
+ REG_BADPAT, /* \N is not supported in a class */
+ REG_BADPAT, /* too many forward references */
+ REG_BADPAT, /* disallowed UTF-8/16 code point (>= 0xd800 && <= 0xdfff) */
+ REG_BADPAT, /* invalid UTF-16 string (should not occur) */
+ /* 75 */
+ REG_BADPAT, /* overlong MARK name */
+ REG_BADPAT /* character value in \u.... sequence is too large */
};
/* Table of texts corresponding to POSIX error codes */
@@ -220,7 +230,7 @@ return length + addlength;
PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION
regfree(regex_t *preg)
{
-(pcre_free)(preg->re_pcre);
+(PUBL(free))(preg->re_pcre);
}
@@ -265,11 +275,12 @@ should not happen, but we all make mistakes), return REG_BADPAT. */
if (preg->re_pcre == NULL)
{
- return (errorcode < sizeof(eint)/sizeof(const int))?
+ return (errorcode < (int)(sizeof(eint)/sizeof(const int)))?
eint[errorcode] : REG_BADPAT;
}
-preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
+(void)pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT,
+ &(preg->re_nsub));
return 0;
}
@@ -395,6 +406,7 @@ switch(rc)
case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;
case PCRE_ERROR_BADUTF8: return REG_INVARG;
case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;
+ case PCRE_ERROR_BADMODE: return REG_INVARG;
default: return REG_ASSERT;
}
}
diff --git a/ext/pcre/pcrelib/pcreposix.h b/ext/pcre/pcrelib/pcreposix.h
index b90e2ec6d..c77c0b052 100644
--- a/ext/pcre/pcrelib/pcreposix.h
+++ b/ext/pcre/pcrelib/pcreposix.h
@@ -9,7 +9,7 @@
Compatible Regular Expression library. It defines the things POSIX says should
be there. I hope.
- Copyright (c) 1997-2009 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/ext/pcre/pcrelib/testdata/grepinput b/ext/pcre/pcrelib/testdata/grepinput
index ed33f86d4..0f00edd93 100644
--- a/ext/pcre/pcrelib/testdata/grepinput
+++ b/ext/pcre/pcrelib/testdata/grepinput
@@ -602,6 +602,8 @@ ABOVE theatre
AB.VE
AB.VE the turtle
+010203040506
+
PUT NEW DATA ABOVE THIS LINE.
=============================
diff --git a/ext/pcre/pcrelib/testdata/grepinput8 b/ext/pcre/pcrelib/testdata/grepinput8
index e8ddc2733..7163aa69d 100644
--- a/ext/pcre/pcrelib/testdata/grepinput8
+++ b/ext/pcre/pcrelib/testdata/grepinput8
@@ -1,6 +1,5 @@
X one
-X two X three X four
-X five
+X two X three X four X five
X six
X seven…X eight
X nine
X ten
diff --git a/ext/pcre/pcrelib/testdata/grepoutput b/ext/pcre/pcrelib/testdata/grepoutput
index a0392509c..e9072bcd6 100644
--- a/ext/pcre/pcrelib/testdata/grepoutput
+++ b/ext/pcre/pcrelib/testdata/grepoutput
@@ -10,7 +10,7 @@ RC=0
7:PATTERN at the start of a line.
8:In the middle of a line, PATTERN appears.
10:This pattern is in lower case.
-608:Check up on PATTERN near the end.
+610:Check up on PATTERN near the end.
RC=0
---------------------------- Test 4 ------------------------------
4
@@ -19,7 +19,7 @@ RC=0
./testdata/grepinput:7:PATTERN at the start of a line.
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
./testdata/grepinput:10:This pattern is in lower case.
-./testdata/grepinput:608:Check up on PATTERN near the end.
+./testdata/grepinput:610:Check up on PATTERN near the end.
./testdata/grepinputx:3:Here is the pattern again.
./testdata/grepinputx:5:Pattern
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
@@ -28,7 +28,7 @@ RC=0
7:PATTERN at the start of a line.
8:In the middle of a line, PATTERN appears.
10:This pattern is in lower case.
-608:Check up on PATTERN near the end.
+610:Check up on PATTERN near the end.
3:Here is the pattern again.
5:Pattern
42:This line contains pattern not on a line by itself.
@@ -323,10 +323,10 @@ RC=0
./testdata/grepinput-9-
./testdata/grepinput:10:This pattern is in lower case.
--
-./testdata/grepinput-605-PUT NEW DATA ABOVE THIS LINE.
-./testdata/grepinput-606-=============================
-./testdata/grepinput-607-
-./testdata/grepinput:608:Check up on PATTERN near the end.
+./testdata/grepinput-607-PUT NEW DATA ABOVE THIS LINE.
+./testdata/grepinput-608-=============================
+./testdata/grepinput-609-
+./testdata/grepinput:610:Check up on PATTERN near the end.
--
./testdata/grepinputx-1-This is a second file of input for the pcregrep tests.
./testdata/grepinputx-2-
@@ -348,8 +348,8 @@ RC=0
./testdata/grepinput-12-Here follows a whole lot of stuff that makes the file over 24K long.
./testdata/grepinput-13-
--
-./testdata/grepinput:608:Check up on PATTERN near the end.
-./testdata/grepinput-609-This is the last line of this file.
+./testdata/grepinput:610:Check up on PATTERN near the end.
+./testdata/grepinput-611-This is the last line of this file.
--
./testdata/grepinputx:3:Here is the pattern again.
./testdata/grepinputx-4-
@@ -380,6 +380,7 @@ RC=0
---------------------------- Test 37 -----------------------------
aaaaa0
aaaaa2
+010203040506
RC=0
======== STDERR ========
pcregrep: pcre_exec() gave error -8 while matching this text:
@@ -390,7 +391,7 @@ pcregrep: pcre_exec() gave error -8 while matching this text:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Error -8, -21 or -27 means that a resource limit was exceeded.
pcregrep: Check your regex for nested unlimited loops.
---------------------------- Test 38 ------------------------------
This line contains a binary zero here >
@@ -514,7 +515,7 @@ This is a file of miscellaneous text that is used as test data for checking
that the pcregrep command is working correctly. The file must be more than 24K
long so that it needs more than a single read
-pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Error -8, -21 or -27 means that a resource limit was exceeded.
pcregrep: Check your regex for nested unlimited loops.
RC=1
---------------------------- Test 63 -----------------------------
@@ -524,7 +525,7 @@ This is a file of miscellaneous text that is used as test data for checking
that the pcregrep command is working correctly. The file must be more than 24K
long so that it needs more than a single read
-pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Error -8, -21 or -27 means that a resource limit was exceeded.
pcregrep: Check your regex for nested unlimited loops.
RC=1
---------------------------- Test 64 ------------------------------
@@ -593,3 +594,77 @@ RC=0
triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
RC=0
+---------------------------- Test 71 -----------------------------
+01
+RC=0
+---------------------------- Test 72 -----------------------------
+010203040506
+RC=0
+---------------------------- Test 73 -----------------------------
+01
+RC=0
+---------------------------- Test 74 -----------------------------
+01
+02
+RC=0
+---------------------------- Test 75 -----------------------------
+010203040506
+RC=0
+---------------------------- Test 76 -----------------------------
+01
+02
+RC=0
+---------------------------- Test 77 -----------------------------
+01
+03
+RC=0
+---------------------------- Test 78 -----------------------------
+010203040506
+RC=0
+---------------------------- Test 79 -----------------------------
+01
+03
+RC=0
+---------------------------- Test 80 -----------------------------
+01
+RC=0
+---------------------------- Test 81 -----------------------------
+010203040506
+RC=0
+---------------------------- Test 82 -----------------------------
+01
+RC=0
+---------------------------- Test 83 -----------------------------
+pcregrep: line 4 of file ./testdata/grepinput3 is too long for the internal buffer
+pcregrep: check the --buffer-size option
+RC=2
+---------------------------- Test 84 -----------------------------
+testdata/grepinputv:fox jumps
+testdata/grepinputx:complete pair
+testdata/grepinputx:That was a complete pair
+testdata/grepinputx:complete pair
+RC=0
+---------------------------- Test 85 -----------------------------
+./testdata/grepinput3:Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+RC=0
+---------------------------- Test 86 -----------------------------
+Binary file ./testdata/grepbinary matches
+RC=0
+---------------------------- Test 87 -----------------------------
+RC=1
+---------------------------- Test 88 -----------------------------
+Binary file ./testdata/grepbinary matches
+RC=0
+---------------------------- Test 89 -----------------------------
+RC=1
+---------------------------- Test 90 -----------------------------
+RC=1
+---------------------------- Test 91 -----------------------------
+The quick brown f
+RC=0
+---------------------------- Test 92 -----------------------------
+The quick brown f
+RC=0
+---------------------------- Test 93 -----------------------------
+The quick brown f
+RC=0
diff --git a/ext/pcre/pcrelib/testdata/grepoutput8 b/ext/pcre/pcrelib/testdata/grepoutput8
index 6317355cc..385266b3c 100644
--- a/ext/pcre/pcrelib/testdata/grepoutput8
+++ b/ext/pcre/pcrelib/testdata/grepoutput8
@@ -1,11 +1,12 @@
---------------------------- Test U1 ------------------------------
1:X one
-2:X two 3:X three 4:X four
-5:X five
+2:X two 3:X three 4:X four 5:X five
6:X six
7:X seven…8:X eight
9:X nine
10:X ten
+RC=0
---------------------------- Test U2 ------------------------------
12-Before 111
13-Before 222
14-Before 333…15:Match
16-After 111
17-After 222
18-After 333
+RC=0
diff --git a/ext/pcre/pcrelib/testdata/grepoutputN b/ext/pcre/pcrelib/testdata/grepoutputN
index 170a4321e..6760314aa 100644
--- a/ext/pcre/pcrelib/testdata/grepoutputN
+++ b/ext/pcre/pcrelib/testdata/grepoutputN
@@ -1,22 +1,16 @@
---------------------------- Test N1 ------------------------------
-1:abc
-2:def
----------------------------- Test N2 ------------------------------
-1:abc
-def
+1:abc 2:def ---------------------------- Test N2 ------------------------------
+1:abc def
2:ghi
jkl---------------------------- Test N3 ------------------------------
-2:def
-3:
+2:def 3:
ghi
jkl---------------------------- Test N4 ------------------------------
2:ghi
jkl---------------------------- Test N5 ------------------------------
-1:abc
-2:def
+1:abc 2:def
3:ghi
4:jkl---------------------------- Test N6 ------------------------------
-1:abc
-2:def
+1:abc 2:def
3:ghi
4:jkl \ No newline at end of file
diff --git a/ext/pcre/pcrelib/testdata/testinput1 b/ext/pcre/pcrelib/testdata/testinput1
index 97e5c366e..1ec7689a1 100644
--- a/ext/pcre/pcrelib/testdata/testinput1
+++ b/ext/pcre/pcrelib/testdata/testinput1
@@ -1,5 +1,6 @@
/-- This set of tests is for features that are compatible with all versions of
- Perl 5, in non-UTF-8 mode. --/
+ Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
+ 16-bit PCRE libraries. --/
/the quick brown fox/
the quick brown fox
@@ -4079,4 +4080,1186 @@
/^\c/
?
+/(abc)\1/i
+ abc
+
+/(abc)\1/
+ abc
+
+/[^a]*/i
+ 12abc
+ 12ABC
+
+/[^a]*+/i
+ 12abc
+ 12ABC
+
+/[^a]*?X/i
+ ** Failers
+ 12abc
+ 12ABC
+
+/[^a]+?X/i
+ ** Failers
+ 12abc
+ 12ABC
+
+/[^a]?X/i
+ 12aXbcX
+ 12AXBCX
+ BCX
+
+/[^a]??X/i
+ 12aXbcX
+ 12AXBCX
+ BCX
+
+/[^a]?+X/i
+ 12aXbcX
+ 12AXBCX
+ BCX
+
+/[^a]{2,3}/i
+ abcdef
+ ABCDEF
+
+/[^a]{2,3}?/i
+ abcdef
+ ABCDEF
+
+/[^a]{2,3}+/i
+ abcdef
+ ABCDEF
+
+/((a|)+)+Z/
+ Z
+
+/(a)b|(a)c/
+ ac
+
+/(?>(a))b|(a)c/
+ ac
+
+/(?=(a))ab|(a)c/
+ ac
+
+/((?>(a))b|(a)c)/
+ ac
+
+/((?>(a))b|(a)c)++/
+ ac
+
+/(?:(?>(a))b|(a)c)++/
+ ac
+
+/(?=(?>(a))b|(a)c)(..)/
+ ac
+
+/(?>(?>(a))b|(a)c)/
+ ac
+
+/(?:(?>([ab])))+a=/+
+ =ba=
+
+/(?>([ab]))+a=/+
+ =ba=
+
+/((?>(a+)b)+(aabab))/
+ aaaabaaabaabab
+
+/(?>a+|ab)+?c/
+ aabc
+
+/(?>a+|ab)+c/
+ aabc
+
+/(?:a+|ab)+c/
+ aabc
+
+/(?(?=(a))a)/
+ a
+
+/(?(?=(a))a)(b)/
+ ab
+
+/^(?:a|ab)++c/
+ aaaabc
+
+/^(?>a|ab)++c/
+ aaaabc
+
+/^(?:a|ab)+c/
+ aaaabc
+
+/(?=abc){3}abc/+
+ abcabcabc
+ ** Failers
+ xyz
+
+/(?=abc)+abc/+
+ abcabcabc
+ ** Failers
+ xyz
+
+/(?=abc)++abc/+
+ abcabcabc
+ ** Failers
+ xyz
+
+/(?=abc){0}xyz/
+ xyz
+
+/(?=abc){1}xyz/
+ ** Failers
+ xyz
+
+/(?=(a))?./
+ ab
+ bc
+
+/(?=(a))??./
+ ab
+ bc
+
+/^(?=(a)){0}b(?1)/
+ backgammon
+
+/^(?=(?1))?[az]([abc])d/
+ abd
+ zcdxx
+
+/^(?!a){0}\w+/
+ aaaaa
+
+/(?<=(abc))?xyz/
+ abcxyz
+ pqrxyz
+
+/^[\g<a>]+/
+ ggg<<<aaa>>>
+ ** Failers
+ \\ga
+
+/^[\ga]+/
+ gggagagaxyz
+
+/^[:a[:digit:]]+/
+ aaaa444:::Z
+
+/^[:a[:digit:]:b]+/
+ aaaa444:::bbbZ
+
+/[:a]xxx[b:]/
+ :xxx:
+
+/(?<=a{2})b/i
+ xaabc
+ ** Failers
+ xabc
+
+/(?<!a{2})b/i
+ xabc
+ ** Failers
+ xaabc
+
+/(?<=a\h)c/
+ xa c
+
+/(?<=[^a]{2})b/
+ axxbc
+ aAAbc
+ ** Failers
+ xaabc
+
+/(?<=[^a]{2})b/i
+ axxbc
+ ** Failers
+ aAAbc
+ xaabc
+
+/(?<=a\H)c/
+ abc
+
+/(?<=a\V)c/
+ abc
+
+/(?<=a\v)c/
+ a\nc
+
+/(?(?=c)c|d)++Y/
+ XcccddYX
+
+/(?(?=c)c|d)*+Y/
+ XcccddYX
+
+/^(a{2,3}){2,}+a/
+ aaaaaaa
+ ** Failers
+ aaaaaa
+ aaaaaaaaa
+
+/^(a{2,3})++a/
+ ** Failers
+ aaaaaa
+
+/^(a{2,3})*+a/
+ ** Failers
+ aaaaaa
+
+/ab\Cde/
+ abXde
+
+/(?<=ab\Cde)X/
+ abZdeX
+
+/a[\CD]b/
+ aCb
+ aDb
+
+/a[\C-X]b/
+ aJb
+
+/\H\h\V\v/
+ X X\x0a
+ X\x09X\x0b
+ ** Failers
+ \xa0 X\x0a
+
+/\H*\h+\V?\v{3,4}/
+ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
+ \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
+ \x09\x20\xa0\x0a\x0b\x0c
+ ** Failers
+ \x09\x20\xa0\x0a\x0b
+
+/\H{3,4}/
+ XY ABCDE
+ XY PQR ST
+
+/.\h{3,4}./
+ XY AB PQRS
+
+/\h*X\h?\H+Y\H?Z/
+ >XNNNYZ
+ > X NYQZ
+ ** Failers
+ >XYZ
+ > X NY Z
+
+/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
+ >XY\x0aZ\x0aA\x0bNN\x0c
+ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+
+/(foo)\Kbar/
+ foobar
+
+/(foo)(\Kbar|baz)/
+ foobar
+ foobaz
+
+/(foo\Kbar)baz/
+ foobarbaz
+
+/abc\K|def\K/g+
+ Xabcdefghi
+
+/ab\Kc|de\Kf/g+
+ Xabcdefghi
+
+/(?=C)/g+
+ ABCDECBA
+
+/^abc\K/+
+ abcdef
+ ** Failers
+ defabcxyz
+
+/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
+ ababababbbabZXXXX
+
+/(?<A>tom|bon)-\g{A}/
+ tom-tom
+ bon-bon
+
+/(^(a|b\g{-1}))/
+ bacxxx
+
+/(?|(abc)|(xyz))\1/
+ abcabc
+ xyzxyz
+ ** Failers
+ abcxyz
+ xyzabc
+
+/(?|(abc)|(xyz))(?1)/
+ abcabc
+ xyzabc
+ ** Failers
+ xyzxyz
+
+/^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
+ XYabcdY
+
+/^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
+ XYabcdY
+
+/^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
+ XYabcdY
+
+/(?'abc'\w+):\k<abc>{2}/
+ a:aaxyz
+ ab:ababxyz
+ ** Failers
+ a:axyz
+ ab:abxyz
+
+/(?'abc'\w+):\g{abc}{2}/
+ a:aaxyz
+ ab:ababxyz
+ ** Failers
+ a:axyz
+ ab:abxyz
+
+/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
+ abd
+ ce
+
+/^(a.)\g-1Z/
+ aXaXZ
+
+/^(a.)\g{-1}Z/
+ aXaXZ
+
+/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
+ abcd
+
+/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\d+)
+ )/x
+ metcalfe 33
+
+/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
+ 1.2.3.4
+ 131.111.10.206
+ 10.0.0.0
+ ** Failers
+ 10.6
+ 455.3.4.5
+
+/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
+ 1.2.3.4
+ 131.111.10.206
+ 10.0.0.0
+ ** Failers
+ 10.6
+ 455.3.4.5
+
+/^(\w++|\s++)*$/
+ now is the time for all good men to come to the aid of the party
+ *** Failers
+ this is not a line with only words and spaces!
+
+/(\d++)(\w)/
+ 12345a
+ *** Failers
+ 12345+
+
+/a++b/
+ aaab
+
+/(a++b)/
+ aaab
+
+/(a++)b/
+ aaab
+
+/([^()]++|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+
+/\(([^()]++|\([^()]+\))+\)/
+ (abc)
+ (abc(def)xyz)
+ *** Failers
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ a(b)c
+ a(b(c))d
+ *** Failers)
+ a(b(c)d
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ >abc>1(2)3<xyz<
+ >abc>(1(2)3)<xyz<
+
+/^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
+ 1221
+ Satanoscillatemymetallicsonatas
+ AmanaplanacanalPanama
+ AblewasIereIsawElba
+ *** Failers
+ Thequickbrownfox
+
+/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
+ 12
+ (((2+2)*-3)-7)
+ -12
+ *** Failers
+ ((2+2)*-3)-7)
+
+/^(x(y|(?1){2})z)/
+ xyz
+ xxyzxyzz
+ *** Failers
+ xxyzz
+ xxyzxyzxyzz
+
+/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
+ <>
+ <abcd>
+ <abc <123> hij>
+ <abc <def> hij>
+ <abc<>def>
+ <abc<>
+ *** Failers
+ <abc
+
+/^a+(*FAIL)/
+ aaaaaa
+
+/a+b?c+(*FAIL)/
+ aaabccc
+
+/a+b?(*PRUNE)c+(*FAIL)/
+ aaabccc
+
+/a+b?(*COMMIT)c+(*FAIL)/
+ aaabccc
+
+/a+b?(*SKIP)c+(*FAIL)/
+ aaabcccaaabccc
+
+/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
+ aaaxxxxxx
+ aaa++++++
+ bbbxxxxx
+ bbb+++++
+ cccxxxx
+ ccc++++
+ dddddddd
+
+/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
+ aaaxxxxxx
+ aaa++++++
+ bbbxxxxx
+ bbb+++++
+ cccxxxx
+ ccc++++
+ dddddddd
+
+/a+b?(*THEN)c+(*FAIL)/
+ aaabccc
+
+/(A (A|B(*ACCEPT)|C) D)(E)/x
+ AB
+ ABX
+ AADE
+ ACDE
+ ** Failers
+ AD
+
+/^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
+ 1221
+ Satan, oscillate my metallic sonatas!
+ A man, a plan, a canal: Panama!
+ Able was I ere I saw Elba.
+ *** Failers
+ The quick brown fox
+
+/^((.)(?1)\2|.)$/
+ a
+ aba
+ aabaa
+ abcdcba
+ pqaabaaqp
+ ablewasiereisawelba
+ rhubarb
+ the quick brown fox
+
+/(a)(?<=b(?1))/
+ baz
+ ** Failers
+ caz
+
+/(?<=b(?1))(a)/
+ zbaaz
+ ** Failers
+ aaa
+
+/(?<X>a)(?<=b(?&X))/
+ baz
+
+/^(?|(abc)|(def))\1/
+ abcabc
+ defdef
+ ** Failers
+ abcdef
+ defabc
+
+/^(?|(abc)|(def))(?1)/
+ abcabc
+ defabc
+ ** Failers
+ defdef
+ abcdef
+
+/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
+ a\"aaaaa
+ b\"aaaaa
+ ** Failers
+ b\"11111
+
+/(?:(?1)|B)(A(*F)|C)/
+ ABCD
+ CCD
+ ** Failers
+ CAD
+
+/^(?:(?1)|B)(A(*F)|C)/
+ CCD
+ BCD
+ ** Failers
+ ABCD
+ CAD
+ BAD
+
+/(?:(?1)|B)(A(*ACCEPT)XX|C)D/
+ AAD
+ ACD
+ BAD
+ BCD
+ BAX
+ ** Failers
+ ACX
+ ABC
+
+/(?(DEFINE)(A))B(?1)C/
+ BAC
+
+/(?(DEFINE)((A)\2))B(?1)C/
+ BAAC
+
+/(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
+ (ab(cd)ef)
+
+/^(?!a(*SKIP)b)/
+ ac
+
+/^(?=a(*SKIP)b|ac)/
+ ** Failers
+ ac
+
+/^(?=a(*THEN)b|ac)/
+ ac
+
+/^(?=a(*PRUNE)b)/
+ ab
+ ** Failers
+ ac
+
+/^(?=a(*ACCEPT)b)/
+ ac
+
+/^(?(?!a(*SKIP)b))/
+ ac
+
+/(?>a\Kb)/
+ ab
+
+/((?>a\Kb))/
+ ab
+
+/(a\Kb)/
+ ab
+
+/^a\Kcz|ac/
+ ac
+
+/(?>a\Kbz|ab)/
+ ab
+
+/^(?&t)(?(DEFINE)(?<t>a\Kb))$/
+ ab
+
+/^([^()]|\((?1)*\))*$/
+ a(b)c
+ a(b(c)d)e
+
+/(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
+ 0
+ 00
+ 0000
+
+/(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
+ 0
+ 00
+ 0000
+
+/--- This one does fail, as expected, in Perl. It needs the complex item at the
+ end of the pattern. A single letter instead of (B|D) makes it not fail,
+ which I think is a Perl bug. --- /
+
+/A(*COMMIT)(B|D)/
+ ACABX
+
+/--- Check the use of names for failure ---/
+
+/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
+ ** Failers
+ AC
+ CB
+
+/--- Force no study, otherwise mark is not seen. The studied version is in
+ test 2 because it isn't Perl-compatible. ---/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KSS
+ C
+ D
+
+/^(A(*THEN:A)B|C(*THEN:B)D)/K
+ ** Failers
+ CB
+
+/^(?:A(*THEN:A)B|C(*THEN:B)D)/K
+ CB
+
+/^(?>A(*THEN:A)B|C(*THEN:B)D)/K
+ CB
+
+/--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
+that we have to have something complicated such as (B|Z) at the end because,
+for Perl, a simple character somehow causes an unwanted optimization to mess
+with the handling of backtracking verbs. ---/
+
+/A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+
+/--- Test skipping over a non-matching mark. ---/
+
+/A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+
+/--- Check shorthand for MARK ---/
+
+/A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+
+/--- Don't loop! Force no study, otherwise mark is not seen. ---/
+
+/(*:A)A+(*SKIP:A)(B|Z)/KSS
+ AAAC
+
+/--- This should succeed, as a non-existent skip name disables the skip ---/
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
+ AAAC
+
+/--- COMMIT at the start of a pattern should act like an anchor. Again,
+however, we need the complication for Perl. ---/
+
+/(*COMMIT)(A|P)(B|P)(C|P)/
+ ABCDEFG
+ ** Failers
+ DEFGABC
+
+/--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
+
+/(\w+)(?>b(*COMMIT))\w{2}/
+ abbb
+
+/(\w+)b(*COMMIT)\w{2}/
+ abbb
+
+/--- Check opening parens in comment when seeking forward reference. ---/
+
+/(?&t)(?#()(?(DEFINE)(?<t>a))/
+ bac
+
+/--- COMMIT should override THEN ---/
+
+/(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
+ yes
+
+/(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
+ yes
+
+/b?(*SKIP)c/
+ bc
+ abc
+
+/(*SKIP)bc/
+ a
+
+/(*SKIP)b/
+ a
+
+/(?P<abn>(?P=abn)xxx|)+/
+ xxx
+
+/(?i:([^b]))(?1)/
+ aa
+ aA
+ ** Failers
+ ab
+ aB
+ Ba
+ ba
+
+/^(?&t)*+(?(DEFINE)(?<t>a))\w$/
+ aaaaaaX
+ ** Failers
+ aaaaaa
+
+/^(?&t)*(?(DEFINE)(?<t>a))\w$/
+ aaaaaaX
+ aaaaaa
+
+/^(a)*+(\w)/
+ aaaaX
+ YZ
+ ** Failers
+ aaaa
+
+/^(?:a)*+(\w)/
+ aaaaX
+ YZ
+ ** Failers
+ aaaa
+
+/^(a)++(\w)/
+ aaaaX
+ ** Failers
+ aaaa
+ YZ
+
+/^(?:a)++(\w)/
+ aaaaX
+ ** Failers
+ aaaa
+ YZ
+
+/^(a)?+(\w)/
+ aaaaX
+ YZ
+
+/^(?:a)?+(\w)/
+ aaaaX
+ YZ
+
+/^(a){2,}+(\w)/
+ aaaaX
+ ** Failers
+ aaa
+ YZ
+
+/^(?:a){2,}+(\w)/
+ aaaaX
+ ** Failers
+ aaa
+ YZ
+
+/(a|)*(?1)b/
+ b
+ ab
+ aab
+
+/(a)++(?1)b/
+ ** Failers
+ ab
+ aab
+
+/(a)*+(?1)b/
+ ** Failers
+ ab
+ aab
+
+/(?1)(?:(b)){0}/
+ b
+
+/(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
+ foo(bar(baz)+baz(bop))
+
+/(A (A|B(*ACCEPT)|C) D)(E)/x
+ AB
+
+/\A.*?(?:a|b(*THEN)c)/
+ ba
+
+/\A.*?(?:a|bc)/
+ ba
+
+/\A.*?(a|b(*THEN)c)/
+ ba
+
+/\A.*?(a|bc)/
+ ba
+
+/\A.*?(?:a|b(*THEN)c)++/
+ ba
+
+/\A.*?(?:a|bc)++/
+ ba
+
+/\A.*?(a|b(*THEN)c)++/
+ ba
+
+/\A.*?(a|bc)++/
+ ba
+
+/\A.*?(?:a|b(*THEN)c|d)/
+ ba
+
+/\A.*?(?:a|bc|d)/
+ ba
+
+/(?:(b))++/
+ beetle
+
+/(?(?=(a(*ACCEPT)z))a)/
+ a
+
+/^(a)(?1)+ab/
+ aaaab
+
+/^(a)(?1)++ab/
+ aaaab
+
+/^(?=a(*:M))aZ/K
+ aZbc
+
+/^(?!(*:M)b)aZ/K
+ aZbc
+
+/(?(DEFINE)(a))?b(?1)/
+ backgammon
+
+/^\N+/
+ abc\ndef
+
+/^\N{1,}/
+ abc\ndef
+
+/(?(R)a+|(?R)b)/
+ aaaabcde
+
+/(?(R)a+|((?R))b)/
+ aaaabcde
+
+/((?(R)a+|(?1)b))/
+ aaaabcde
+
+/((?(R1)a+|(?1)b))/
+ aaaabcde
+
+/a(*:any
+name)/K
+ abc
+
+/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
+ a
+ ba
+ bba
+
+/--- Checking revised (*THEN) handling ---/
+
+/--- Capture ---/
+
+/^.*? (a(*THEN)b) c/x
+ aabc
+
+/^.*? (a(*THEN)b|(*F)) c/x
+ aabc
+
+/^.*? ( (a(*THEN)b) | (*F) ) c/x
+ aabc
+
+/^.*? ( (a(*THEN)b) ) c/x
+ aabc
+
+/--- Non-capture ---/
+
+/^.*? (?:a(*THEN)b) c/x
+ aabc
+
+/^.*? (?:a(*THEN)b|(*F)) c/x
+ aabc
+
+/^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
+ aabc
+
+/^.*? (?: (?:a(*THEN)b) ) c/x
+ aabc
+
+/--- Atomic ---/
+
+/^.*? (?>a(*THEN)b) c/x
+ aabc
+
+/^.*? (?>a(*THEN)b|(*F)) c/x
+ aabc
+
+/^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
+ aabc
+
+/^.*? (?> (?>a(*THEN)b) ) c/x
+ aabc
+
+/--- Possessive capture ---/
+
+/^.*? (a(*THEN)b)++ c/x
+ aabc
+
+/^.*? (a(*THEN)b|(*F))++ c/x
+ aabc
+
+/^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
+ aabc
+
+/^.*? ( (a(*THEN)b)++ )++ c/x
+ aabc
+
+/--- Possessive non-capture ---/
+
+/^.*? (?:a(*THEN)b)++ c/x
+ aabc
+
+/^.*? (?:a(*THEN)b|(*F))++ c/x
+ aabc
+
+/^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
+ aabc
+
+/^.*? (?: (?:a(*THEN)b)++ )++ c/x
+ aabc
+
+/--- Condition assertion ---/
+
+/^(?(?=a(*THEN)b)ab|ac)/
+ ac
+
+/--- Condition ---/
+
+/^.*?(?(?=a)a|b(*THEN)c)/
+ ba
+
+/^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
+ ba
+
+/^.*?(?(?=a)a(*THEN)b|c)/
+ ac
+
+/--- Assertion ---/
+
+/^.*(?=a(*THEN)b)/
+ aabc
+
+/------------------------------/
+
+/(?>a(*:m))/imsxSK
+ a
+
+/(?>(a)(*:m))/imsxSK
+ a
+
+/(?<=a(*ACCEPT)b)c/
+ xacd
+
+/(?<=(a(*ACCEPT)b))c/
+ xacd
+
+/(?<=(a(*COMMIT)b))c/
+ xabcd
+ ** Failers
+ xacd
+
+/(?<!a(*FAIL)b)c/
+ xcd
+ acd
+
+/(?<=a(*:N)b)c/K
+ xabcd
+
+/(?<=a(*PRUNE)b)c/
+ xabcd
+
+/(?<=a(*SKIP)b)c/
+ xabcd
+
+/(?<=a(*THEN)b)c/
+ xabcd
+
+/(a)(?2){2}(.)/
+ abcd
+
+/(*MARK:A)(*PRUNE:B)(C|X)/KS
+ C
+ D
+
+/(*MARK:A)(*PRUNE:B)(C|X)/KSS
+ C
+ D
+
+/(*MARK:A)(*THEN:B)(C|X)/KS
+ C
+ D
+
+/(*MARK:A)(*THEN:B)(C|X)/KSY
+ C
+ D
+
+/(*MARK:A)(*THEN:B)(C|X)/KSS
+ C
+ D
+
+/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
+
+/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
+ AAAC
+
+/--- Same --/
+
+/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+
+/A(*:A)A+(*SKIP)(B|Z) | AC/xK
+ AAAC
+
+/--- This should fail, as a null name is the same as no name ---/
+
+/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
+ AAAC
+
+/--- A check on what happens after hitting a mark and them bumping along to
+something that does not even start. Perl reports tags after the failures here,
+though it does not when the individual letters are made into something
+more complicated. ---/
+
+/A(*:A)B|XX(*:B)Y/K
+ AABC
+ XXYZ
+ ** Failers
+ XAQQ
+ XAQQXZZ
+ AXQQQ
+ AXXQQQ
+
+/^(A(*THEN:A)B|C(*THEN:B)D)/K
+ AB
+ CD
+ ** Failers
+ AC
+ CB
+
+/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
+ AB
+ CD
+ ** Failers
+ AC
+ CB
+
+/--- An empty name does not pass back an empty string. It is the same as if no
+name were given. ---/
+
+/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
+ AB
+ CD
+
+/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
+
+/A(*PRUNE:A)B/K
+ ACAB
+
+/--- Mark names can be duplicated ---/
+
+/A(*:A)B|X(*:A)Y/K
+ AABC
+ XXYZ
+
+/b(*:m)f|a(*:n)w/K
+ aw
+ ** Failers
+ abc
+
+/b(*:m)f|aw/K
+ abaw
+ ** Failers
+ abc
+ abax
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
+ AAAC
+
+/a(*PRUNE:X)bc|qq/KY
+ ** Failers
+ axy
+
+/a(*THEN:X)bc|qq/KY
+ ** Failers
+ axy
+
+/(?=a(*MARK:A)b)..x/K
+ abxy
+ ** Failers
+ abpq
+
+/(?=a(*MARK:A)b)..(*:Y)x/K
+ abxy
+ ** Failers
+ abpq
+
+/(?=a(*PRUNE:A)b)..x/K
+ abxy
+ ** Failers
+ abpq
+
+/(?=a(*PRUNE:A)b)..(*:Y)x/K
+ abxy
+ ** Failers
+ abpq
+
+/(?=a(*THEN:A)b)..x/K
+ abxy
+ ** Failers
+ abpq
+
+/(?=a(*THEN:A)b)..(*:Y)x/K
+ abxy
+ ** Failers
+ abpq
+
+/(another)?(\1?)test/
+ hello world test
+
+/(another)?(\1+)test/
+ hello world test
+
+/(a(*COMMIT)b){0}a(?1)|aac/
+ aac
+
+/(?!a(*COMMIT)b)ac|cd/
+ ac
+
+/((?:a?)*)*c/
+ aac
+
+/((?>a?)*)*c/
+ aac
+
/-- End of testinput1 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput10 b/ext/pcre/pcrelib/testdata/testinput10
index 7210cc5f8..7856518e1 100644
--- a/ext/pcre/pcrelib/testdata/testinput10
+++ b/ext/pcre/pcrelib/testdata/testinput10
@@ -1,137 +1,1029 @@
-/-- These are a few representative patterns whose lengths and offsets are to be
-shown when the link size is 2. This is just a doublecheck test to ensure the
-sizes don't go horribly wrong when something is changed. The pattern contents
-are all themselves checked in other tests. Unicode, including property support,
-is required for these tests. --/
-
-/((?i)b)/BM
-
-/(?s)(.*X|^B)/BM
-
-/(?s:.*X|^B)/BM
-
-/^[[:alnum:]]/BM
-
-/#/IxMD
-
-/a#/IxMD
-
-/x?+/BM
-
-/x++/BM
-
-/x{1,3}+/BM
-
-/(x)*+/BM
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/BM
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-
-/(a(?1)b)/BM
-
-/(a(?1)+b)/BM
-
-/a(?P<name1>b|c)d(?P<longername2>e)/BM
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/BM
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-
-/abc(?C255)de(?C)f/BM
-
-/abcde/CBM
-
-/\x{100}/8BM
-
-/\x{1000}/8BM
-
-/\x{10000}/8BM
-
-/\x{100000}/8BM
-
-/\x{1000000}/8BM
-
-/\x{4000000}/8BM
-
-/\x{7fffFFFF}/8BM
-
-/[\x{ff}]/8BM
-
-/[\x{100}]/8BM
-
-/\x80/8BM
-
-/\xff/8BM
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8M
+/-- This set of tests check Unicode property support with the DFA matching
+ functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest
+ when running it. --/
+
+/\pL\P{Nd}/8
+ AB
+ *** Failers
+ A0
+ 00
+
+/\X./8
+ AB
+ A\x{300}BC
+ A\x{300}\x{301}\x{302}BC
+ *** Failers
+ \x{300}
+
+/\X\X/8
+ ABC
+ A\x{300}B\x{300}\x{301}C
+ A\x{300}\x{301}\x{302}BC
+ *** Failers
+ \x{300}
+
+/^\pL+/8
+ abcd
+ a
+ *** Failers
+
+/^\PL+/8
+ 1234
+ =
+ *** Failers
+ abcd
+
+/^\X+/8
+ abcdA\x{300}\x{301}\x{302}
+ A\x{300}\x{301}\x{302}
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
+ a
+ *** Failers
+ \x{300}\x{301}\x{302}
+
+/\X?abc/8
+ abc
+ A\x{300}abc
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ \x{300}abc
+ *** Failers
+
+/^\X?abc/8
+ abc
+ A\x{300}abc
+ *** Failers
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ \x{300}abc
+
+/\X*abc/8
+ abc
+ A\x{300}abc
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ \x{300}abc
+ *** Failers
+
+/^\X*abc/8
+ abc
+ A\x{300}abc
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ *** Failers
+ \x{300}abc
+
+/^\pL?=./8
+ A=b
+ =c
+ *** Failers
+ 1=2
+ AAAA=b
+
+/^\pL*=./8
+ AAAA=b
+ =c
+ *** Failers
+ 1=2
+
+/^\X{2,3}X/8
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ *** Failers
+ X
+ A\x{300}\x{301}\x{302}X
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+
+/^\pC\pL\pM\pN\pP\pS\pZ</8
+ \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
+ \np\x{300}9!\$ <
+ ** Failers
+ ap\x{300}9!\$ <
+
+/^\PC/8
+ X
+ ** Failers
+ \x7f
+
+/^\PL/8
+ 9
+ ** Failers
+ \x{c0}
+
+/^\PM/8
+ X
+ ** Failers
+ \x{30f}
+
+/^\PN/8
+ X
+ ** Failers
+ \x{660}
+
+/^\PP/8
+ X
+ ** Failers
+ \x{66c}
+
+/^\PS/8
+ X
+ ** Failers
+ \x{f01}
+
+/^\PZ/8
+ X
+ ** Failers
+ \x{1680}
-/\x{D55c}\x{ad6d}\x{C5B4}/D8M
-
-/\x{65e5}\x{672c}\x{8a9e}/D8M
-
-/[\x{100}]/8BM
-
-/[Z\x{100}]/8BM
-
-/^[\x{100}\E-\Q\E\x{150}]/B8M
-
-/^[\QĀ\E-\QŐ\E]/B8M
-
-/^[\QĀ\E-\QŐ\E/B8M
-
-/[\p{L}]/BM
-
-/[\p{^L}]/BM
-
-/[\P{L}]/BM
-
-/[\P{^L}]/BM
-
-/[abc\p{L}\x{0660}]/8BM
-
-/[\p{Nd}]/8BM
-
-/[\p{Nd}+-]+/8BM
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iBM
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8BM
-
-/[\x{105}-\x{109}]/8iBM
-
-/( ( (?(1)0|) )* )/xBM
-
-/( (?(1)0|)* )/xBM
-
-/[a]/BM
-
-/[a]/8BM
-
-/[\xaa]/BM
-
-/[\xaa]/8BM
-
-/[^a]/BM
-
-/[^a]/8BM
-
-/[^\xaa]/BM
-
-/[^\xaa]/8BM
-
-/[^\d]/8WB
-
-/[[:^alpha:][:^cntrl:]]+/8WB
+/^\p{Cc}/8
+ \x{017}
+ \x{09f}
+ ** Failers
+ \x{0600}
+
+/^\p{Cf}/8
+ \x{601}
+ ** Failers
+ \x{09f}
+
+/^\p{Cn}/8
+ ** Failers
+ \x{09f}
+
+/^\p{Co}/8
+ \x{f8ff}
+ ** Failers
+ \x{09f}
+
+/^\p{Cs}/8
+ \?\x{dfff}
+ ** Failers
+ \x{09f}
+
+/^\p{Ll}/8
+ a
+ ** Failers
+ Z
+ \x{e000}
+
+/^\p{Lm}/8
+ \x{2b0}
+ ** Failers
+ a
+
+/^\p{Lo}/8
+ \x{1bb}
+ ** Failers
+ a
+ \x{2b0}
+
+/^\p{Lt}/8
+ \x{1c5}
+ ** Failers
+ a
+ \x{2b0}
+
+/^\p{Lu}/8
+ A
+ ** Failers
+ \x{2b0}
+
+/^\p{Mc}/8
+ \x{903}
+ ** Failers
+ X
+ \x{300}
+
+/^\p{Me}/8
+ \x{488}
+ ** Failers
+ X
+ \x{903}
+ \x{300}
+
+/^\p{Mn}/8
+ \x{300}
+ ** Failers
+ X
+ \x{903}
+
+/^\p{Nd}+/8
+ 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
+ \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
+ \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
+ ** Failers
+ X
+
+/^\p{Nl}/8
+ \x{16ee}
+ ** Failers
+ X
+ \x{966}
+
+/^\p{No}/8
+ \x{b2}
+ \x{b3}
+ ** Failers
+ X
+ \x{16ee}
+
+/^\p{Pc}/8
+ \x5f
+ \x{203f}
+ ** Failers
+ X
+ -
+ \x{58a}
+
+/^\p{Pd}/8
+ -
+ \x{58a}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Pe}/8
+ )
+ ]
+ }
+ \x{f3b}
+ ** Failers
+ X
+ \x{203f}
+ (
+ [
+ {
+ \x{f3c}
+
+/^\p{Pf}/8
+ \x{bb}
+ \x{2019}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Pi}/8
+ \x{ab}
+ \x{2018}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Po}/8
+ !
+ \x{37e}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Ps}/8
+ (
+ [
+ {
+ \x{f3c}
+ ** Failers
+ X
+ )
+ ]
+ }
+ \x{f3b}
+
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ \x{9f2}
+ ** Failers
+ X
+ \x{2c2}
+
+/^\p{Sk}/8
+ \x{2c2}
+ ** Failers
+ X
+ \x{9f2}
+
+/^\p{Sm}+/8
+ +<|~\x{ac}\x{2044}
+ ** Failers
+ X
+ \x{9f2}
+
+/^\p{So}/8
+ \x{a6}
+ \x{482}
+ ** Failers
+ X
+ \x{9f2}
+
+/^\p{Zl}/8
+ \x{2028}
+ ** Failers
+ X
+ \x{2029}
+
+/^\p{Zp}/8
+ \x{2029}
+ ** Failers
+ X
+ \x{2028}
+
+/^\p{Zs}/8
+ \ \
+ \x{a0}
+ \x{1680}
+ \x{180e}
+ \x{2000}
+ \x{2001}
+ ** Failers
+ \x{2028}
+ \x{200d}
+
+/\p{Nd}+(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}+?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,}(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2}(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,3}(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,3}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}??(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(...)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(....)/8
+ ** Failers
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Lu}/8i
+ A
+ a\x{10a0}B
+ ** Failers
+ a
+ \x{1d00}
+
+/\p{^Lu}/8i
+ 1234
+ ** Failers
+ ABC
+
+/\P{Lu}/8i
+ 1234
+ ** Failers
+ ABC
+
+/(?<=A\p{Nd})XYZ/8
+ A2XYZ
+ 123A5XYZPQR
+ ABA\x{660}XYZpqr
+ ** Failers
+ AXYZ
+ XYZ
+
+/(?<!\pL)XYZ/8
+ 1XYZ
+ AB=XYZ..
+ XYZ
+ ** Failers
+ WXYZ
+
+/[\p{Nd}]/8
+ 1234
+
+/[\p{Nd}+-]+/8
+ 1234
+ 12-34
+ 12+\x{661}-34
+ ** Failers
+ abcd
+
+/[\P{Nd}]+/8
+ abcd
+ ** Failers
+ 1234
+
+/\D+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\P{Nd}+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/[\D]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/[\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/[\D\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\pL/8
+ a
+ A
+
+/\pL/8i
+ a
+ A
+
+/\p{Lu}/8
+ A
+ aZ
+ ** Failers
+ abc
+
+/\p{Lu}/8i
+ A
+ aZ
+ ** Failers
+ abc
+
+/\p{Ll}/8
+ a
+ Az
+ ** Failers
+ ABC
+
+/\p{Ll}/8i
+ a
+ Az
+ ** Failers
+ ABC
+
+/^\x{c0}$/8i
+ \x{c0}
+ \x{e0}
+
+/^\x{e0}$/8i
+ \x{c0}
+ \x{e0}
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ ** Failers
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+
+/\x{391}+/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+
+/\x{391}{3,5}(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+
+/\x{391}{3,5}?(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+
+/[\x{391}\x{ff3a}]/8i
+ \x{391}
+ \x{ff3a}
+ \x{3b1}
+ \x{ff5a}
+
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ \x{e0}
+
+/[\x{105}-\x{109}]/8i
+ \x{104}
+ \x{105}
+ \x{109}
+ ** Failers
+ \x{100}
+ \x{10a}
+
+/[z-\x{100}]/8i
+ Z
+ z
+ \x{39c}
+ \x{178}
+ |
+ \x{80}
+ \x{ff}
+ \x{100}
+ \x{101}
+ ** Failers
+ \x{102}
+ Y
+ y
+
+/[z-\x{100}]/8i
+
+/^\X/8
+ A
+ A\x{300}BC
+ A\x{300}\x{301}\x{302}BC
+ *** Failers
+ \x{300}
+
+/^[\X]/8
+ X123
+ *** Failers
+ AXYZ
+
+/^(\X*)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+
+/^(\X*?)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+
+/^(\X*)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+
+/^(\X*?)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+
+/^\X(.)/8
+ *** Failers
+ A\x{300}\x{301}\x{302}
+
+/^\X{2,3}(.)/8
+ A\x{300}\x{301}B\x{300}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+
+/^\X{2,3}?(.)/8
+ A\x{300}\x{301}B\x{300}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+
+/^\pN{2,3}X/
+ 12X
+ 123X
+ *** Failers
+ X
+ 1X
+ 1234X
+
+/\x{100}/i8
+ \x{100}
+ \x{101}
+
+/^\p{Han}+/8
+ \x{2e81}\x{3007}\x{2f804}\x{31a0}
+ ** Failers
+ \x{2e7f}
+
+/^\P{Katakana}+/8
+ \x{3105}
+ ** Failers
+ \x{30ff}
+
+/^[\p{Arabic}]/8
+ \x{06e9}
+ \x{060b}
+ ** Failers
+ X\x{06e9}
+
+/^[\P{Yi}]/8
+ \x{2f800}
+ ** Failers
+ \x{a014}
+ \x{a4c6}
+
+/^\p{Any}X/8
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ X
+
+/^\P{Any}X/8
+ ** Failers
+ AX
+
+/^\p{Any}?X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ ABXYZ
+
+/^\P{Any}?X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ ABXYZ
+
+/^\p{Any}+X/8
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+ XYZ
+
+/^\P{Any}+X/8
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ XYZ
+
+/^\p{Any}*X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+
+/^\P{Any}*X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+
+/^[\p{Any}]X/8
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ X
+
+/^[\P{Any}]X/8
+ ** Failers
+ AX
+
+/^[\p{Any}]?X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ ** Failers
+ ABXYZ
+
+/^[\P{Any}]?X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ ABXYZ
+
+/^[\p{Any}]+X/8
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+ XYZ
+
+/^[\P{Any}]+X/8
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ XYZ
+
+/^[\p{Any}]*X/8
+ XYZ
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+ ** Failers
+
+/^[\P{Any}]*X/8
+ XYZ
+ ** Failers
+ AXYZ
+ \x{1234}XYZ
+ A\x{1234}XYZ
+
+/^\p{Any}{3,5}?/8
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\p{Any}{3,5}/8
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\P{Any}{3,5}?/8
+ ** Failers
+ abcdefgh
+ \x{1234}\n\r\x{3456}xyz
+
+/^\p{L&}X/8
+ AXY
+ aXY
+ \x{1c5}XY
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]X/8
+ AXY
+ aXY
+ \x{1c5}XY
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\p{L&}+X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]+X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\p{L&}+?X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^[\p{L&}]+?X/8
+ AXY
+ aXY
+ AbcdeXyz
+ \x{1c5}AbXY
+ abcDEXypqreXlmn
+ ** Failers
+ \x{1bb}XY
+ \x{2b0}XY
+ !XY
+
+/^\P{L&}X/8
+ !XY
+ \x{1bb}XY
+ \x{2b0}XY
+ ** Failers
+ \x{1c5}XY
+ AXY
+
+/^[\P{L&}]X/8
+ !XY
+ \x{1bb}XY
+ \x{2b0}XY
+ ** Failers
+ \x{1c5}XY
+ AXY
+
+/^\x{023a}+?(\x{0130}+)/8i
+ \x{023a}\x{2c65}\x{0130}
+
+/^\x{023a}+([^X])/8i
+ \x{023a}\x{2c65}X
+
+/\x{c0}+\x{116}+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+
+/[\x{c0}\x{116}]+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+
+/Check property support in non-UTF-8 mode/
+
+/\p{L}{4}/
+ 123abcdefg
+ 123abc\xc4\xc5zz
+
+/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
+ \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
+
+/\x{a77d}\x{1d79}/8i
+ \x{a77d}\x{1d79}
+ \x{1d79}\x{a77d}
+
+/\x{a77d}\x{1d79}/8
+ \x{a77d}\x{1d79}
+ ** Failers
+ \x{1d79}\x{a77d}
+
+/^\p{Xan}/8
+ ABCD
+ 1234
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ ** Failers
+ _ABC
+
+/^\p{Xan}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ ** Failers
+ _ABC
+
+/^\p{Xan}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/^\p{Xan}{2,9}/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/^[\p{Xan}]/8
+ ABCD1234_
+ 1234abcd_
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ ** Failers
+ _ABC
+
+/^[\p{Xan}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ ** Failers
+ _ABC
+
+/^>\p{Xsp}/8
+ >\x{1680}\x{2028}\x{0b}
+ ** Failers
+ \x{0b}
+
+/^>\p{Xsp}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xsp}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xsp}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>[\p{Xsp}]/8
+ >\x{2028}\x{0b}
+
+/^>[\p{Xsp}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xps}/8
+ >\x{1680}\x{2028}\x{0b}
+ >\x{a0}
+ ** Failers
+ \x{0b}
+
+/^>\p{Xps}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xps}+?/8
+ >\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xps}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xps}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>\p{Xps}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^>[\p{Xps}]/8
+ >\x{2028}\x{0b}
+
+/^>[\p{Xps}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+
+/^\p{Xwd}/8
+ ABCD
+ 1234
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ _ABC
+ ** Failers
+ []
+
+/^\p{Xwd}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/^\p{Xwd}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/^\p{Xwd}{2,9}/8
+ A_12\x{6ca}\x{a6c}\x{10a7}
+
+/^[\p{Xwd}]/8
+ ABCD1234_
+ 1234abcd_
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ _ABC
+ ** Failers
+ []
+
+/^[\p{Xwd}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/-- Unicode properties for \b abd \B --/
+
+/\b...\B/8W
+ abc_
+ \x{37e}abc\x{376}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
+
+/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
+
+/\b...\B/8
+ abc_
+ ** Failers
+ \x{37e}abc\x{376}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
+
+/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
+
+/\b...\B/W
+ abc_
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
+
+/-- Caseless single negated characters > 127 need UCP support --/
-/[[:^cntrl:][:^alpha:]]+/8WB
+/[^\x{100}]/8i
+ \x{100}\x{101}X
-/[[:alpha:]]+/8WB
+/[^\x{100}]+/8i
+ \x{100}\x{101}XX
-/[[:^alpha:]\S]+/8WB
+/^\X/8
+ A\P
+ A\P\P
+ A\x{300}\x{301}\P
+ A\x{300}\x{301}\P\P
+ A\x{301}\P
+ A\x{301}\P\P
+
+/^\X{2,3}/8
+ A\P
+ A\P\P
+ AA\P
+ AA\P\P
+ A\x{300}\x{301}\P
+ A\x{300}\x{301}\P\P
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+
+/^\X{2}/8
+ AA\P
+ AA\P\P
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+
+/^\X+/8
+ AA\P
+ AA\P\P
-/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
+/^\X+?Z/8
+ AA\P
+ AA\P\P
-/-- End of testinput10 --/
+/-- End of testinput10 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2
index 7cc876165..883d52e63 100644
--- a/ext/pcre/pcrelib/testdata/testinput2
+++ b/ext/pcre/pcrelib/testdata/testinput2
@@ -3,12 +3,11 @@
It also checks the non-Perl syntax the PCRE supports (Python, .NET,
Oniguruma). Finally, there are some tests where PCRE and Perl differ,
either because PCRE can't be compatible, or there is a possible Perl
- bug. --/
+ bug.
+
+ NOTE: This is a non-UTF set of tests. When UTF support is needed, use
+ test 5, and if Unicode Property Support is needed, use test 7. --/
-/-- Originally, the Perl >= 5.10 things were in here too, but now I have
- separated many (most?) of them out into test 11. However, there may still
- be some that were overlooked. --/
-
/(a)b|/I
/abc/I
@@ -144,40 +143,6 @@
defabc
\Zdefabc
-/abc/P
- abc
- *** Failers
-
-/^abc|def/P
- abcdef
- abcdef\B
-
-/.*((abc)$|(def))/P
- defabc
- \Zdefabc
-
-/the quick brown fox/P
- the quick brown fox
- *** Failers
- The Quick Brown Fox
-
-/the quick brown fox/Pi
- the quick brown fox
- The Quick Brown Fox
-
-/abc.def/P
- *** Failers
- abc\ndef
-
-/abc$/P
- abc
- abc\n
-
-/(abc)\2/P
-
-/(abc\1)/P
- abc
-
/)/
/a[]b/
@@ -442,8 +407,6 @@
/abc/\
-/abc/\P
-
/abc/\i
/(a)bc(d)/I
@@ -491,9 +454,6 @@
/\Biss\B/I+
Mississippi
-/\Biss\B/I+P
- Mississippi
-
/iss/IG+
Mississippi
@@ -629,15 +589,6 @@
*** Failers
\Nabc
-/a*(b+)(z)(z)/P
- aaaabbbbzzzz
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- aaaabbbbzzzz\O2
- aaaabbbbzzzz\O3
- aaaabbbbzzzz\O4
- aaaabbbbzzzz\O5
-
/^.?abcd/IS
/\( # ( at start
@@ -1061,7 +1012,12 @@
/abc(?C)de(?C1)f/I
123abcdef
-/(?C1)\dabc(?C2)def/I
+/(?C1)\dabc(?C2)def/IS
+ 1234abcdef
+ *** Failers
+ abcdef
+
+/(?C1)\dabc(?C2)def/ISS
1234abcdef
*** Failers
abcdef
@@ -1310,7 +1266,12 @@
abcde
abcdfe
-/a*b/ICDZ
+/a*b/ICDZS
+ ab
+ aaaab
+ aaaacb
+
+/a*b/ICDZSS
ab
aaaab
aaaacb
@@ -1320,9 +1281,16 @@
aaaab
aaaacb
-/(abc|def)x/ICDZ
+/(abc|def)x/ICDZS
abcx
defx
+ ** Failers
+ abcdefzx
+
+/(abc|def)x/ICDZSS
+ abcx
+ defx
+ ** Failers
abcdefzx
/(ab|cd){3,4}/IC
@@ -1330,7 +1298,10 @@
abcdabcd
abcdcdcdcdcd
-/([ab]{,4}c|xy)/ICDZ
+/([ab]{,4}c|xy)/ICDZS
+ Note: that { does NOT introduce a quantifier
+
+/([ab]{,4}c|xy)/ICDZSS
Note: that { does NOT introduce a quantifier
/([ab]{1,4}c|xy){4,5}?123/ICDZ
@@ -1404,13 +1375,25 @@
1X
123456\P
-/abc/I>testsavedregex
+/abc/IS>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ bca
+
+/abc/ISS>testsavedregex
<testsavedregex
abc
** Failers
bca
-/abc/IF>testsavedregex
+/abc/IFS>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ bca
+
+/abc/IFSS>testsavedregex
<testsavedregex
abc
** Failers
@@ -1422,14 +1405,26 @@
** Failers
def
+/(a|b)/ISS>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
/(a|b)/ISF>testsavedregex
<testsavedregex
abc
** Failers
def
+/(a|b)/ISSF>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
~<(\w+)/?>(.)*</(\1)>~smgI
- <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
+ \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
/^a/IF
@@ -1447,17 +1442,6 @@
** Failers
line one\nthis is a line\nbreak in the second line
-/ab.cd/P
- ab-cd
- ab=cd
- ** Failers
- ab\ncd
-
-/ab.cd/Ps
- ab-cd
- ab=cd
- ab\ncd
-
/(?i)(?-i)AbCd/I
AbCd
** Failers
@@ -1508,14 +1492,6 @@
(this)
((this))
-/a(b)c/PN
- abc
-
-/a(?P<name>b)c/PN
- abc
-
-/\x{100}/I
-
/\x{0000ff}/I
/^((?P<A>a1)|(?P<A>a2)b)/I
@@ -1593,8 +1569,6 @@ a random value. /Ix
/()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
bXXaYYaY
-/\777/I
-
/\s*,\s*/IS
\x0b,\x0b
\x0c,\x0d
@@ -1976,8 +1950,6 @@ a random value. /Ix
/(?(DEFINE) abc) xyz/xI
-/(?(DEFINE) abc){3} xyz/x
-
/(a|)*\d/
\O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
@@ -2199,22 +2171,6 @@ a random value. /Ix
xabcpqrx
xxyzx
-/[\h]/BZ
- >\x09<
-
-/[\h]+/BZ
- >\x09\x20\xa0<
-
-/[\v]/BZ
-
-/[\H]/BZ
-
-/[^\h]/BZ
-
-/[\V]/BZ
-
-/[\x0a\V]/BZ
-
/\H++X/BZ
** Failers
XXXX
@@ -2255,7 +2211,7 @@ a random value. /Ix
/\V+\v\V+\w/BZ
/\( (?: [^()]* | (?R) )* \)/x
-(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
+\J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
/[\E]AAA/
@@ -2295,7 +2251,7 @@ a random value. /Ix
/\g6666666666/
-/[\g6666666666]/
+/[\g6666666666]/BZ
/(?1)\c[/
@@ -2453,6 +2409,10 @@ a random value. /Ix
/\k{}/
+/\k/
+
+/\kabc/
+
/(?P=)/
/(?P>)/
@@ -2570,11 +2530,6 @@ a random value. /Ix
/(?(?=.*b).*b|^d)/I
-/a?|b?/P
- abc
- ** Failers
- ddd\N
-
/xyz/C
xyz
abcxyz
@@ -2766,12 +2721,6 @@ a random value. /Ix
abc\P
abc\P\P
-/\w+A/P
- CDAAAAB
-
-/\w+A/PU
- CDAAAAB
-
/abc\K123/
xyzabc123pqr
xyzabc12\P
@@ -2915,201 +2864,6 @@ a random value. /Ix
/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/xSI
-
/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
"(?>.*/)foo"SI
@@ -3276,104 +3030,19 @@ a random value. /Ix
/A(*PRUNE)B|A(*PRUNE)C/K
AC
-/--- A whole lot of tests of verbs with arguments are here rather than in test
- 11 because Perl doesn't seem to follow its specification entirely
- correctly. ---/
-
-/--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
- not clear how Perl defines "involved in the failure of the match". ---/
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
-/--- Check the use of names for success and failure. PCRE doesn't show these
-names for success, though Perl does, contrary to its spec. ---/
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
-/--- An empty name does not pass back an empty string. It is the same as if no
-name were given. ---/
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
- AB
- CD
-
-/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
-
-/A(*PRUNE:A)B/K
- ACAB
-
-/(*MARK:A)(*PRUNE:B)(C|X)/K
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/K
- C
- D
-
-/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-
-/--- Same --/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
- AAAC
-
/--- This should fail; the SKIP advances by one, but when we get to AC, the
- PRUNE kills it. ---/
+ PRUNE kills it. Perl behaves differently. ---/
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
AAAC
-/A(*:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-
-/--- This should fail, as a null name is the same as no name ---/
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
- AAAC
-
-/--- This fails in PCRE, and I think that is in accordance with Perl's
- documentation, though in Perl it succeeds. ---/
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
- AAAC
+/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
+though PCRE does. ---/
-/--- Mark names can be duplicated ---/
-
-/A(*:A)B|X(*:A)Y/K
- AABC
- XXYZ
-
/^A(*:A)B|^X(*:A)Y/K
** Failers
XAQQ
-/--- A check on what happens after hitting a mark and them bumping along to
-something that does not even start. Perl reports tags after the failures here,
-though it does not when the individual letters are made into something
-more complicated. ---/
-
-/A(*:A)B|XX(*:B)Y/K
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
optimizations defeat this. So does the PCRE optimization unless we disable it
with \Y. ---/
@@ -3383,78 +3052,6 @@ with \Y. ---/
** Failers
DEFGABC\Y
-/--- Repeat some tests with added studying. ---/
-
-/A(*COMMIT)B/+KS
- ACABX
-
-/A(*THEN)B|A(*THEN)C/KS
- AC
-
-/A(*PRUNE)B|A(*PRUNE)C/KS
- AC
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/KS
- AB
- CD
- ** Failers
- AC
- CB
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
- AB
- CD
- ** Failers
- AC
- CB
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
- AB
- CD
-
-/A(*PRUNE:A)B/KS
- ACAB
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KS
- C
- D
-
-/(*MARK:A)(*THEN:B)(C|X)/KS
- C
- D
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
- AAAC
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
- AAAC
-
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
- AAAC
-
-/A(*:A)A+(*SKIP)(B|Z) | AC/xKS
- AAAC
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
- AAAC
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
- AAAC
-
-/A(*:A)B|XX(*:B)Y/KS
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
-/(*COMMIT)ABC/
- ABCDEFG
- ** Failers
- DEFGABC\Y
-
/^(ab (c+(*THEN)cd) | xyz)/x
abcccd
@@ -3505,6 +3102,24 @@ with \Y. ---/
/\d*\R/BZ
/\s*\R/BZ
+ \x20\x0a
+ \x20\x0d
+ \x20\x0d\x0a
+
+/\S*\R/BZ
+ a\x0a
+
+/X\h*\R/BZ
+ X\x20\x0a
+
+/X\H*\R/BZ
+ X\x0d\x0a
+
+/X\H+\R/BZ
+ X\x0d\x0a
+
+/X\H++\R/BZ
+ X\x0d\x0a
/-- Perl treats this one differently, not failing the second string. I believe
that is a bug in Perl. --/
@@ -3570,4 +3185,588 @@ with \Y. ---/
/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+/-- These tests are here because Perl gets the first one wrong. --/
+
+/(\R*)(.)/s
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
+
+/(\R)*(.)/s
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
+
+/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
+
+/-- --/
+
+/^abc$/BZ
+
+/^abc$/BZm
+
+/^(a)*+(\w)/S
+ aaaaX
+ ** Failers
+ aaaa
+
+/^(?:a)*+(\w)/S
+ aaaaX
+ ** Failers
+ aaaa
+
+/(a)++1234/SDZ
+
+/([abc])++1234/SI
+
+/(?<=(abc)+)X/
+
+/(^ab)/I
+
+/(^ab)++/I
+
+/(^ab|^)+/I
+
+/(^ab|^)++/I
+
+/(?:^ab)/I
+
+/(?:^ab)++/I
+
+/(?:^ab|^)+/I
+
+/(?:^ab|^)++/I
+
+/(.*ab)/I
+
+/(.*ab)++/I
+
+/(.*ab|.*)+/I
+
+/(.*ab|.*)++/I
+
+/(?:.*ab)/I
+
+/(?:.*ab)++/I
+
+/(?:.*ab|.*)+/I
+
+/(?:.*ab|.*)++/I
+
+/(?=a)[bcd]/I
+
+/((?=a))[bcd]/I
+
+/((?=a))+[bcd]/I
+
+/((?=a))++[bcd]/I
+
+/(?=a+)[bcd]/iI
+
+/(?=a+?)[bcd]/iI
+
+/(?=a++)[bcd]/iI
+
+/(?=a{3})[bcd]/iI
+
+/(abc)\1+/S
+
+/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
+
+/(?1)(?:(b(*ACCEPT))){0}/
+ b
+
+/(?1)(?:(b(*ACCEPT))){0}c/
+ bc
+ ** Failers
+ b
+
+/(?1)(?:((*ACCEPT))){0}c/
+ c
+ c\N
+
+/^.*?(?(?=a)a|b(*THEN)c)/
+ ba
+
+/^.*?(?(?=a)a|bc)/
+ ba
+
+/^.*?(?(?=a)a(*THEN)b|c)/
+ ac
+
+/^.*?(?(?=a)a(*THEN)b)c/
+ ac
+
+/^.*?(a(*THEN)b)c/
+ aabc
+
+/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
+ aabc
+
+/^.*?(a(*THEN)b|z)c/
+ aabc
+
+/^.*?(z|a(*THEN)b)c/
+ aabc
+
+/-- --/
+
+/-- These studied versions are here because they are not Perl-compatible; the
+ studying means the mark is not seen. --/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KS
+ C
+ D
+
+/(*:A)A+(*SKIP:A)(B|Z)/KS
+ AAAC
+
+/-- --/
+
+"(?=a*(*ACCEPT)b)c"
+ c
+ c\N
+
+/(?1)c(?(DEFINE)((*ACCEPT)b))/
+ c
+ c\N
+
+/(?>(*ACCEPT)b)c/
+ c
+ c\N
+
+/(?:(?>(a)))+a%/++
+ %aa%
+
+/(a)b|ac/++SS
+ ac\O3
+
+/(a)(b)x|abc/++
+ abc\O6
+
+/(a)bc|(a)(b)\2/
+ \O3abc
+ \O4abc
+
+/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
+
+/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
+
+/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
+
+/(abc)(?1)/SI
+
+/^(?>a)++/
+ aa\M
+ aaaaaaaaa\M
+
+/(a)(?1)++/
+ aa\M
+ aaaaaaaaa\M
+
+/(?:(foo)|(bar)|(baz))X/SS=
+ bazfooX
+ foobazbarX
+ barfooX
+ bazX
+ foobarbazX
+ bazfooX\O0
+ bazfooX\O2
+ bazfooX\O4
+ bazfooX\O6
+ bazfooX\O8
+ bazfooX\O10
+
+/(?=abc){3}abc/BZ
+
+/(?=abc)+abc/BZ
+
+/(?=abc)++abc/BZ
+
+/(?=abc){0}xyz/BZ
+
+/(?=(a))?./BZ
+
+/(?=(a))??./BZ
+
+/^(?=(a)){0}b(?1)/BZ
+
+/(?(DEFINE)(a))?b(?1)/BZ
+
+/^(?=(?1))?[az]([abc])d/BZ
+
+/^(?!a){0}\w+/BZ
+
+/(?<=(abc))?xyz/BZ
+
+/[:a[:abc]b:]/BZ
+
+/((?2))((?1))/SS
+ abc
+
+/((?(R2)a+|(?1)b))/SS
+ aaaabcde
+
+/(?(R)a*(?1)|((?R))b)/SS
+ aaaabcde
+
+/(a+|(?R)b)/
+
+/^(a(*:A)(d|e(*:B))z|aeq)/C
+ adz
+ aez
+ aeqwerty
+
+/.(*F)/
+ \P\Pabc
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
+
+/a(*SKIP)c|b(*ACCEPT)|/+SI
+ a
+
+/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
+ ax
+
+'a*(*ACCEPT)b'+
+ \N\N
+ abc\N\N
+ bbb\N\N
+
+/(*ACCEPT)a/+I
+ bax
+
+/z(*ACCEPT)a/+I
+ baxzbx
+
+/a(?:.)*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN:ABC))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+
+/-- These tests are in agreement with development Perl 5.015, which has fixed
+ some things, but they don't all work with 5.012, so they aren't in the
+ Perl-compatible tests. Those after the first come from Perl's own test
+ files. --/
+
+/^((yes|no)(*THEN)(*F))?/
+ yes
+
+/(A (.*) C? (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*) C? (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+
+/(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*) C? (*THEN) | A D) \s* z/x
+AbcdCBefgBhiBqz
+
+/(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*) (?:C|) (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+
+/(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*) C{0,6} (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+
+/(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCEBefgBhiBqz
+
+/(A (.*) (CE){0,6} (*THEN) | A D) z/x
+AbcdCEBefgBhiBqz
+
+/(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*) (CE*){0,6} (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+
+/-----------------------------------------------/
+
+/^(?>a+)(?>(z+))\w/BZ
+ aaaazzzzb
+ ** Failers
+ aazz
+
+/(.)(\1|a(?2))/
+ bab
+
+/\1|(.)(?R)\1/
+ cbbbc
+
+/(.)((?(1)c|a)|a(?2))/
+ baa
+
+/(?P<abn>(?P=abn)xxx)/BZ
+
+/(a\1z)/BZ
+
+/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
+ \Maabbccddee
+
+/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
+ \Maabbccddee
+
+/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
+ \Maabbccddee
+
+/^a\x41z/<JS>
+ aAz
+ *** Failers
+ ax41z
+
+/^a[m\x41]z/<JS>
+ aAz
+
+/^a\x1z/<JS>
+ ax1z
+
+/^a\u0041z/<JS>
+ aAz
+ *** Failers
+ au0041z
+
+/^a[m\u0041]z/<JS>
+ aAz
+
+/^a\u041z/<JS>
+ au041z
+ *** Failers
+ aAz
+
+/^a\U0041z/<JS>
+ aU0041z
+ *** Failers
+ aAz
+
+/(?(?=c)c|d)++Y/BZ
+
+/(?(?=c)c|d)*+Y/BZ
+
+/a[\NB]c/
+ aNc
+
+/a[B-\Nc]/
+
+/(a)(?2){0,1999}?(b)/
+
+/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
+
+/--- This test, with something more complicated than individual letters, causes
+different behaviour in Perl. Perhaps it disables some optimization; no tag is
+passed back for the failures, whereas in PCRE there is a tag. ---/
+
+/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
+ AABC
+ XXYZ
+ ** Failers
+ XAQQ
+ XAQQXZZ
+ AXQQQ
+ AXXQQQ
+
+/-- Perl doesn't give marks for these, though it does if the alternatives are
+replaced by single letters. --/
+
+/(b|q)(*:m)f|a(*:n)w/K
+ aw
+ ** Failers
+ abc
+
+/(q|b)(*:m)f|a(*:n)w/K
+ aw
+ ** Failers
+ abc
+
+/-- After a partial match, the behaviour is as for a failure. --/
+
+/^a(*:X)bcde/K
+ abc\P
+
+/-- These are here because Perl doesn't return a mark, except for the first --/
+
+/(?=(*:x))(q|)/K+
+ abc
+
+/(?=(*:x))((*:y)q|)/K+
+ abc
+
+/(?=(*:x))(?:(*:y)q|)/K+
+ abc
+
+/(?=(*:x))(?>(*:y)q|)/K+
+ abc
+
+/(?=a(*:x))(?!a(*:y)c)/K+
+ ab
+
+/(?=a(*:x))(?=a(*:y)c|)/K+
+ ab
+
+/(..)\1/
+ ab\P
+ aba\P
+ abab\P
+
+/(..)\1/i
+ ab\P
+ abA\P
+ aBAb\P
+
+/(..)\1{2,}/
+ ab\P
+ aba\P
+ abab\P
+ ababa\P
+ ababab\P
+ ababab\P\P
+ abababa\P
+ abababa\P\P
+
+/(..)\1{2,}/i
+ ab\P
+ aBa\P
+ aBAb\P
+ AbaBA\P
+ abABAb\P
+ aBAbaB\P\P
+ abABabA\P
+ abaBABa\P\P
+
+/(..)\1{2,}?x/i
+ ab\P
+ abA\P
+ aBAb\P
+ abaBA\P
+ abAbaB\P
+ abaBabA\P
+ abAbABaBx\P
+
+/^(..)\1/
+ aba\P
+
+/^(..)\1{2,3}x/
+ aba\P
+ ababa\P
+ ababa\P\P
+ abababx
+ ababababx
+
+/^(..)\1{2,3}?x/
+ aba\P
+ ababa\P
+ ababa\P\P
+ abababx
+ ababababx
+
+/^(..)(\1{2,3})ab/
+ abababab
+
+/^\R/
+ \r\P
+ \r\P\P
+
+/^\R{2,3}x/
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+ \r\rx
+ \r\r\rx
+
+/^\R{2,3}?x/
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+ \r\rx
+ \r\r\rx
+
+/^\R?x/
+ \r\P
+ \r\P\P
+ x
+ \rx
+
+/^\R+x/
+ \r\P
+ \r\P\P
+ \r\n\P
+ \r\n\P\P
+ \rx
+
+/^a$/<CRLF>
+ a\r\P
+ a\r\P\P
+
+/^a$/m<CRLF>
+ a\r\P
+ a\r\P\P
+
+/^(a$|a\r)/<CRLF>
+ a\r\P
+ a\r\P\P
+
+/^(a$|a\r)/m<CRLF>
+ a\r\P
+ a\r\P\P
+
+/./<CRLF>
+ \r\P
+ \r\P\P
+
+/.{2,3}/<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/.{2,3}?/<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/-- These two are here because Perl does not match: it seems to allow the
+COMMIT to escape from the assertion. --/
+
+/(?=a(*COMMIT)b|ac)ac|ac/
+ ac
+
+/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
+ ac
+
+"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
+ ABCDGHI\O03
+
+/-- This one is here because Perl does not confine the *COMMIT to the
+assertion, and therefore fails the entire subroutine call. --/
+
+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+ ac
+
/-- End of testinput2 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput4 b/ext/pcre/pcrelib/testdata/testinput4
index e2bae423b..c7bb370cf 100644
--- a/ext/pcre/pcrelib/testdata/testinput4
+++ b/ext/pcre/pcrelib/testdata/testinput4
@@ -1,5 +1,6 @@
-/-- This set of tests if for UTF-8 support, excluding Unicode properties. It is
- compatible with all versions of Perl 5. --/
+/-- This set of tests is for UTF support, excluding Unicode properties. It is
+ compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit
+ PCRE libraries. --/
/a.b/8
acb
@@ -126,31 +127,6 @@
*** Failers
XYZ
-/X(\C{3})/8
- X\x{1234}
-
-/X(\C{4})/8
- X\x{1234}YZ
-
-/X\C*/8
- XYZabcdce
-
-/X\C*?/8
- XYZabcde
-
-/X\C{3,5}/8
- Xabcdefg
- X\x{1234}
- X\x{1234}YZ
- X\x{1234}\x{512}
- X\x{1234}\x{512}YZ
-
-/X\C{3,5}?/8
- Xabcdefg
- X\x{1234}
- X\x{1234}YZ
- X\x{1234}\x{512}
-
/[^a]+/8g
bcd
\x{100}aY\x{256}Z
@@ -456,17 +432,6 @@
\x{150}X
\x{200}X
-/a\Cb/
- aXb
- a\nb
-
-/a\Cb/8
- aXb
- a\nb
-
-/a\C\Cb/8
- a\x{100}b
-
/[z-\x{100}]/8i
z
Z
@@ -644,4 +609,16 @@
/A*/g8
AAB\x{123}BAA
+/(abc)\1/8i
+ abc
+
+/(abc)\1/8
+ abc
+
+/a(*:a\x{1234}b)/8K
+ abc
+
+/a(*:a£b)/8K
+ abc
+
/-- End of testinput4 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput5 b/ext/pcre/pcrelib/testdata/testinput5
index 5e200b3e3..642749c31 100644
--- a/ext/pcre/pcrelib/testdata/testinput5
+++ b/ext/pcre/pcrelib/testdata/testinput5
@@ -1,72 +1,36 @@
-/-- This set of tests checks the API, internals, and non-Perl stuff for UTF-8
- support, excluding Unicode properties. --/
+/-- This set of tests checks the API, internals, and non-Perl stuff for UTF
+ support, excluding Unicode properties. However, tests that give different
+ results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/
-/\x{100}/8DZ
+/\x{110000}/8DZ
-/\x{1000}/8DZ
-
-/\x{10000}/8DZ
-
-/\x{100000}/8DZ
-
-/\x{1000000}/8DZ
+/\x{ffffffff}/8
-/\x{4000000}/8DZ
+/\x{100000000}/8
-/\x{7fffFFFF}/8DZ
+/\x{d800}/8
-/[\x{ff}]/8DZ
+/\x{dfff}/8
-/[\x{100}]/8DZ
+/\x{d7ff}/8
-/\x{ffffffff}/8
-
-/\x{100000000}/8
+/\x{e000}/8
/^\x{100}a\x{1234}/8
\x{100}a\x{1234}bcd
-/\x80/8DZ
-
-/\xff/8DZ
-
/\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
\x{0041}\x{2262}\x{0391}\x{002e}
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
- \x{D55c}\x{ad6d}\x{C5B4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
- \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-
-/\x{084}/DZ8
-
-/\x{104}/DZ8
-
-/\x{861}/DZ8
-
-/\x{212ab}/DZ8
-
/.{3,5}X/DZ8
\x{212ab}\x{212ab}\x{212ab}\x{861}X
-
/.{3,5}?/DZ8
\x{212ab}\x{212ab}\x{212ab}\x{861}
/(?<=\C)X/8
Should produce an error diagnostic
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- X\nabc
-
/^[ab]/8DZ
bar
*** Failers
@@ -81,26 +45,6 @@ can't tell the difference.) --/
*** Failers
aaa
-/[^ab\xC0-\xF0]/8SDZ
- \x{f1}
- \x{bf}
- \x{100}
- \x{1000}
- *** Failers
- \x{c0}
- \x{f0}
-
-/Ā{3,4}/8SDZ
- \x{100}\x{100}\x{100}\x{100\x{100}
-
-/(\x{100}+|x)/8SDZ
-
-/(\x{100}*a|x)/8SDZ
-
-/(\x{100}{0,2}a|x)/8SDZ
-
-/(\x{100}{1,2}a|x)/8SDZ
-
/\x{100}*(\d+|"(?1)")/8
1234
"1234"
@@ -111,33 +55,17 @@ can't tell the difference.) --/
*** Failers
\x{100}\x{100}abcd
-/\x{100}/8DZ
-
/\x{100}*/8DZ
/a\x{100}*/8DZ
/ab\x{100}*/8DZ
-/a\x{100}\x{101}*/8DZ
-
-/a\x{100}\x{101}+/8DZ
-
/\x{100}*A/8DZ
A
/\x{100}*\d(?R)/8DZ
-/[^\x{c4}]/DZ
-
-/[^\x{c4}]/8DZ
-
-/[\x{100}]/8DZ
- \x{100}
- Z\x{100}
- \x{100}Z
- *** Failers
-
/[Z\x{100}]/8DZ
Z\x{100}
\x{100}
@@ -162,13 +90,8 @@ can't tell the difference.) --/
/[\xFF]/DZ
>\xff<
-/[\xff]/DZ8
- >\x{ff}<
-
/[^\xFF]/DZ
-/[^\xff]/8DZ
-
/[Ä-Ü]/8
Ö # Matches without Study
\x{d6}
@@ -185,45 +108,6 @@ can't tell the difference.) --/
Ö <-- Same with Study
\x{d6}
-/[]/8
-
-//8
-
-/xxx/8
-
-/xxx/8?DZ
-
-/abc/8
- ]
-
-
- \?
-
-/anything/8
- \xc0\x80
- \xc1\x8f
- \xe0\x9f\x80
- \xf0\x8f\x80\x80
- \xf8\x87\x80\x80\x80
- \xfc\x83\x80\x80\x80\x80
- \xfe\x80\x80\x80\x80\x80
- \xff\x80\x80\x80\x80\x80
- \xc3\x8f
- \xe0\xaf\x80
- \xe1\x80\x80
- \xf0\x9f\x80\x80
- \xf1\x8f\x80\x80
- \xf8\x88\x80\x80\x80
- \xf9\x87\x80\x80\x80
- \xfc\x84\x80\x80\x80\x80
- \xfd\x83\x80\x80\x80\x80
- \?\xf8\x88\x80\x80\x80
- \?\xf9\x87\x80\x80\x80
- \?\xfc\x84\x80\x80\x80\x80
- \?\xfd\x83\x80\x80\x80\x80
-
-/\x{100}abc(xyz(?1))/8DZ
-
/[^\x{100}]abc(xyz(?1))/8DZ
/[ab\x{100}]abc(xyz(?1))/8DZ
@@ -243,17 +127,8 @@ can't tell the difference.) --/
/\w/8
\x{100}X
-/a\x{1234}b/P8
- a\x{1234}b
-
/^\ሴ/8DZ
-/\777/I
-
-/\777/8I
- \x{1ff}
- \777
-
/\x{100}*\d/8DZ
/\x{100}*\s/8DZ
@@ -266,12 +141,6 @@ can't tell the difference.) --/
/\x{100}*\W/8DZ
-/\x{100}+\x{200}/8DZ
-
-/\x{100}+X/8DZ
-
-/X+\x{200}/8DZ
-
/()()()()()()()()()()
()()()()()()()()()()
()()()()()()()()()()
@@ -283,8 +152,6 @@ can't tell the difference.) --/
/^[\QĀ\E-\QŐ\E]/BZ8
-/^[\QĀ\E-\QŐ\E/BZ8
-
/^abc./mgx8<any>
abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
@@ -379,23 +246,6 @@ can't tell the difference.) --/
/.*$/8<any>
\x{1ec5}
-/-- This tests the stricter UTF-8 check according to RFC 3629. --/
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
- \x{d800}
- \x{d800}\?
- \x{da00}
- \x{da00}\?
- \x{dfff}
- \x{dfff}\?
- \x{110000}
- \x{110000}\?
- \x{2000000}
- \x{2000000}\?
- \x{7fffffff}
- \x{7fffffff}\?
-
/a\Rb/I8<bsr_anycrlf>
a\rb
a\nb
@@ -454,16 +304,10 @@ can't tell the difference.) --/
/(\x{de})\1/
\x{de}\x{de}
- \x{123}
/X/8f<any>
A\x{1ec5}ABCXYZ
-/(*UTF8)\x{1234}/
- abcd\x{1234}pqr
-
-/(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
-
/Xa{2,4}b/8
X\P
Xa\P
@@ -745,53 +589,184 @@ can't tell the difference.) --/
/X\W{3}X/8
\PX
-/\h/SI
+/\sxxx\s/8T1
+ AB\x{85}xxx\x{a0}XYZ
+ AB\x{a0}xxx\x{85}XYZ
+
+/\S \S/8T1
+ \x{a2} \x{84}
+
+'A#хц'8x<any>BZ
+
+'A#хц
+ PQ'8x<any>BZ
+
+/a+#хaa
+ z#XX?/8x<any>BZ
+
+/a+#хaa
+ z#х?/8x<any>BZ
+
+/\g{A}xxx#bXX(?'A'123) (?'A'456)/8x<any>BZ
-/\h/SI8
- ABC\x{09}
- ABC\x{20}
- ABC\x{a0}
- ABC\x{1680}
- ABC\x{180e}
- ABC\x{2000}
- ABC\x{202f}
- ABC\x{205f}
- ABC\x{3000}
+/\g{A}xxx#bх(?'A'123) (?'A'456)/8x<any>BZ
-/\v/SI
+/^\cģ/8
-/\v/SI8
- ABC\x{0a}
- ABC\x{0b}
- ABC\x{0c}
- ABC\x{0d}
- ABC\x{85}
- ABC\x{2028}
+/(\R*)(.)/s8
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
-/\R/SI
+/(\R)*(.)/s8
+ \r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
-/\R/SI8
+/[^\x{1234}]+/iS8I
-/\h*A/SI8
- CDBABC
+/[^\x{1234}]+?/iS8I
+
+/[^\x{1234}]++/iS8I
+
+/[^\x{1234}]{2}/iS8I
+
+//<bsr_anycrlf><bsr_unicode>
+
+/f.*/
+ \P\Pfor
+
+/f.*/s
+ \P\Pfor
+
+/f.*/8
+ \P\Pfor
+
+/f.*/8s
+ \P\Pfor
-/\v+A/SI8
+/\x{d7ff}\x{e000}/8
-/\s?xxx\s/8SI
+/\x{d800}/8
-/\sxxx\s/8T1
- AB\x{85}xxx\x{a0}XYZ
- AB\x{a0}xxx\x{85}XYZ
+/\x{dfff}/8
-/\sxxx\s/I8ST1
- AB\x{85}xxx\x{a0}XYZ
- AB\x{a0}xxx\x{85}XYZ
+/\h+/8
+ \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
+ \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
-/\S \S/8T1
- \x{a2} \x{84}
+/[\h\x{e000}]+/8BZ
+ \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
+ \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
-/\S \S/I8ST1
- \x{a2} \x{84}
- A Z
+/\H+/8
+ \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
+ \x{2000}\x{200a}\x{1fff}\x{200b}
+ \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
+ \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
+
+/[\H\x{d7ff}]+/8BZ
+ \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
+ \x{2000}\x{200a}\x{1fff}\x{200b}
+ \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
+ \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
+
+/\v+/8
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+
+/[\v\x{e000}]+/8BZ
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+
+/\V+/8
+ \x{2028}\x{2029}\x{2027}\x{2030}
+ \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
+
+/[\V\x{d7ff}]+/8BZ
+ \x{2028}\x{2029}\x{2027}\x{2030}
+ \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
+
+/\R+/8<bsr_unicode>
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+
+/(..)\1/8
+ ab\P
+ aba\P
+ abab\P
+
+/(..)\1/8i
+ ab\P
+ abA\P
+ aBAb\P
+
+/(..)\1{2,}/8
+ ab\P
+ aba\P
+ abab\P
+ ababa\P
+ ababab\P
+ ababab\P\P
+ abababa\P
+ abababa\P\P
+
+/(..)\1{2,}/8i
+ ab\P
+ aBa\P
+ aBAb\P
+ AbaBA\P
+ abABAb\P
+ aBAbaB\P\P
+ abABabA\P
+ abaBABa\P\P
+
+/(..)\1{2,}?x/8i
+ ab\P
+ abA\P
+ aBAb\P
+ abaBA\P
+ abAbaB\P
+ abaBabA\P
+ abAbABaBx\P
+
+/./8<CRLF>
+ \r\P
+ \r\P\P
+
+/.{2,3}/8<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/.{2,3}?/8<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/8BZ
+
+/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/8BZi
+
+/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/8BZ
+
+/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/8BZi
+
+/(?<=\x{1234}\x{1234})\bxy/I8
+
+/(?<!^)ETA/8
+ ETA
+
+/\u0100/<JS>8BZ
+
+/[\u0100-\u0200]/<JS>8BZ
+
+/\ud800/<JS>8
/-- End of testinput5 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6
index 503a5bc76..7010a0d2d 100644
--- a/ext/pcre/pcrelib/testdata/testinput6
+++ b/ext/pcre/pcrelib/testdata/testinput6
@@ -655,6 +655,7 @@
A\x80
/^[\p{Arabic}]/8
+ \x{604}
\x{60e}
\x{656}
\x{657}
@@ -670,7 +671,6 @@
\x{6ef}
\x{6fa}
** Failers
- \x{600}
\x{650}
\x{651}
\x{652}
@@ -688,7 +688,6 @@
\x{61f}
\x{964}
\x{965}
- \x{970}
/^\p{Inherited}/8
\x{64b}
@@ -802,4 +801,18 @@
** Failers
a\xFCb
+/ⱥ/8i
+ ⱥ
+ Ⱥx
+ Ⱥ
+
+/[ⱥ]/8i
+ ⱥ
+ Ⱥx
+ Ⱥ
+
+/Ⱥ/8i
+ Ⱥ
+ ⱥ
+
/-- End of testinput6 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7
index 66748873c..6ef923031 100644
--- a/ext/pcre/pcrelib/testdata/testinput7
+++ b/ext/pcre/pcrelib/testdata/testinput7
@@ -1,4610 +1,625 @@
-/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
- The -dfa flag must be used with pcretest when running it. --/
-
-/abc/
- abc
-
-/ab*c/
- abc
- abbbbc
- ac
-
-/ab+c/
- abc
- abbbbbbc
- *** Failers
- ac
- ab
-
-/a*/
- a
- aaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
-
-/(a|abcd|african)/
- a
- abcd
- african
-
-/^abc/
- abcdef
- *** Failers
- xyzabc
- xyz\nabc
-
-/^abc/m
- abcdef
- xyz\nabc
- *** Failers
- xyzabc
-
-/\Aabc/
- abcdef
- *** Failers
- xyzabc
- xyz\nabc
-
-/\Aabc/m
- abcdef
- *** Failers
- xyzabc
- xyz\nabc
-
-/\Gabc/
- abcdef
- xyzabc\>3
- *** Failers
- xyzabc
- xyzabc\>2
-
-/x\dy\Dz/
- x9yzz
- x0y+z
- *** Failers
- xyz
- xxy0z
-
-/x\sy\Sz/
- x yzz
- x y+z
- *** Failers
- xyz
- xxyyz
-
-/x\wy\Wz/
- xxy+z
- *** Failers
- xxy0z
- x+y+z
-
-/x.y/
- x+y
- x-y
- *** Failers
- x\ny
-
-/x.y/s
- x+y
- x-y
- x\ny
-
-/(a.b(?s)c.d|x.y)p.q/
- a+bc+dp+q
- a+bc\ndp+q
- x\nyp+q
- *** Failers
- a\nbc\ndp+q
- a+bc\ndp\nq
- x\nyp\nq
-
-/a\d\z/
- ba0
- *** Failers
- ba0\n
- ba0\ncd
-
-/a\d\z/m
- ba0
- *** Failers
- ba0\n
- ba0\ncd
-
-/a\d\Z/
- ba0
- ba0\n
- *** Failers
- ba0\ncd
-
-/a\d\Z/m
- ba0
- ba0\n
- *** Failers
- ba0\ncd
-
-/a\d$/
- ba0
- ba0\n
- *** Failers
- ba0\ncd
-
-/a\d$/m
- ba0
- ba0\n
- ba0\ncd
- *** Failers
-
-/abc/i
- abc
- aBc
- ABC
-
-/[^a]/
- abcd
-
-/ab?\w/
- abz
- abbz
- azz
-
-/x{0,3}yz/
- ayzq
- axyzq
- axxyz
- axxxyzq
- axxxxyzq
- *** Failers
- ax
- axx
-
-/x{3}yz/
- axxxyzq
- axxxxyzq
- *** Failers
- ax
- axx
- ayzq
- axyzq
- axxyz
-
-/x{2,3}yz/
- axxyz
- axxxyzq
- axxxxyzq
- *** Failers
- ax
- axx
- ayzq
- axyzq
-
-/[^a]+/
- bac
- bcdefax
- *** Failers
- aaaaa
-
-/[^a]*/
- bac
- bcdefax
- *** Failers
- aaaaa
-
-/[^a]{3,5}/
- xyz
- awxyza
- abcdefa
- abcdefghijk
- *** Failers
- axya
- axa
- aaaaa
-
-/\d*/
- 1234b567
- xyz
-
-/\D*/
- a1234b567
- xyz
-
-/\d+/
- ab1234c56
- *** Failers
- xyz
-
-/\D+/
- ab123c56
- *** Failers
- 789
-
-/\d?A/
- 045ABC
- ABC
- *** Failers
- XYZ
-
-/\D?A/
- ABC
- BAC
- 9ABC
- *** Failers
-
-/a+/
- aaaa
-
-/^.*xyz/
- xyz
- ggggggggxyz
-
-/^.+xyz/
- abcdxyz
- axyz
- *** Failers
- xyz
-
-/^.?xyz/
- xyz
- cxyz
-
-/^\d{2,3}X/
- 12X
- 123X
- *** Failers
- X
- 1X
- 1234X
-
-/^[abcd]\d/
- a45
- b93
- c99z
- d04
- *** Failers
- e45
- abcd
- abcd1234
- 1234
-
-/^[abcd]*\d/
- a45
- b93
- c99z
- d04
- abcd1234
- 1234
- *** Failers
- e45
- abcd
-
-/^[abcd]+\d/
- a45
- b93
- c99z
- d04
- abcd1234
- *** Failers
- 1234
- e45
- abcd
-
-/^a+X/
- aX
- aaX
-
-/^[abcd]?\d/
- a45
- b93
- c99z
- d04
- 1234
- *** Failers
- abcd1234
- e45
-
-/^[abcd]{2,3}\d/
- ab45
- bcd93
- *** Failers
- 1234
- a36
- abcd1234
- ee45
-
-/^(abc)*\d/
- abc45
- abcabcabc45
- 42xyz
- *** Failers
-
-/^(abc)+\d/
- abc45
- abcabcabc45
- *** Failers
- 42xyz
-
-/^(abc)?\d/
- abc45
- 42xyz
- *** Failers
- abcabcabc45
-
-/^(abc){2,3}\d/
- abcabc45
- abcabcabc45
- *** Failers
- abcabcabcabc45
- abc45
- 42xyz
-
-/1(abc|xyz)2(?1)3/
- 1abc2abc3456
- 1abc2xyz3456
-
-/^(a*\w|ab)=(a*\w|ab)/
- ab=ab
-
-/^(a*\w|ab)=(?1)/
- ab=ab
-
-/^([^()]|\((?1)*\))*$/
- abc
- a(b)c
- a(b(c))d
- *** Failers)
- a(b(c)d
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
-
-/^(?>a*)\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
- *** Failers
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- *** Failers
- <abc
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?=abc)\w{5}:$/
- abcde:
- *** Failers
- abc..
- 123
- vwxyz
-
-/^(?!abc)\d\d$/
- 12
- *** Failers
- abcde:
- abc..
- 123
- vwxyz
+/-- These tests for Unicode property support test PCRE's API and show some of
+ the compiled code. They are not Perl-compatible. --/
-/(?<=abc|xy)123/
- abc12345
- wxy123z
- *** Failers
- 123abc
+/[\p{L}]/DZ
-/(?<!abc|xy)123/
- 123abc
- mno123456
- *** Failers
- abc12345
- wxy123z
+/[\p{^L}]/DZ
-/abc(?C1)xyz/
- abcxyz
- 123abcxyz999
+/[\P{L}]/DZ
-/(ab|cd){3,4}/C
- ababab
- abcdabcd
- abcdcdcdcdcd
+/[\P{^L}]/DZ
-/^abc/
- abcdef
- *** Failers
- abcdef\B
+/[abc\p{L}\x{0660}]/8DZ
-/^(a*|xyz)/
- bcd
- aaabcd
- xyz
- xyz\N
- *** Failers
- bcd\N
-
-/xyz$/
- xyz
- xyz\n
- *** Failers
- xyz\Z
- xyz\n\Z
-
-/xyz$/m
- xyz
- xyz\n
- abcxyz\npqr
- abcxyz\npqr\Z
- xyz\n\Z
- *** Failers
- xyz\Z
-
-/\Gabc/
- abcdef
- defabcxyz\>3
- *** Failers
- defabcxyz
+/[\p{Nd}]/8DZ
+ 1234
-/^abcdef/
- ab\P
- abcde\P
- abcdef\P
- *** Failers
- abx\P
+/[\p{Nd}+-]+/8DZ
+ 1234
+ 12-34
+ 12+\x{661}-34
+ ** Failers
+ abcd
-/^a{2,4}\d+z/
- a\P
- aa\P
- aa2\P
- aaa\P
- aaa23\P
- aaaa12345\P
- aa0z\P
- aaaa4444444444444z\P
- *** Failers
- az\P
- aaaaa\P
- a56\P
-
-/^abcdef/
- abc\P
- def\R
-
-/(?<=foo)bar/
- xyzfo\P
- foob\P\>2
- foobar...\R\P\>4
- xyzfo\P
- foobar\>2
- *** Failers
- xyzfo\P
- obar\R
-
-/(ab*(cd|ef))+X/
- adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
- lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
- cdabbbbbbbb\P\R\B\Z
- efabbbbbbbbbbbbbbbb\P\R\B\Z
- bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
-
-/(a|b)/SF>testsavedregex
-<testsavedregex
- abc
+/[\x{105}-\x{109}]/8iDZ
+ \x{104}
+ \x{105}
+ \x{109}
** Failers
- def
+ \x{100}
+ \x{10a}
-/the quick brown fox/
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
-
-/The quick brown fox/i
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- *** Failers
- abxyzpqrrabbxyyyypqAzz
- abxyzpqrrrrabbxyyyypqAzz
- abxyzpqrrrabxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-
-/^(abc){1,2}zz/
- abczz
- abcabczz
- *** Failers
- zz
- abcabcabczz
- >>abczz
-
-/^(b+?|a){1,2}?c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
-
-/^(b+|a){1,2}c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
-
-/^(b+|a){1,2}?bc/
- bbc
-
-/^(b*|ba){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
-
-/^(ba|b*){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
-
-/^[ab\]cde]/
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- *** Failers
- fthing
- [thing
- \\thing
-
-/^[]cde]/
- ]thing
- cthing
- dthing
- ething
- *** Failers
- athing
- fthing
-
-/^[^ab\]cde]/
- fthing
- [thing
- \\thing
- *** Failers
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
-
-/^[^]cde]/
- athing
- fthing
- *** Failers
- ]thing
- cthing
- dthing
- ething
-
-/^\/
-
-
-/^/
-
-
-/^[0-9]+$/
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 100
- *** Failers
- abc
-
-/^.*nter/
- enter
- inter
- uponter
-
-/^xxx[0-9]+$/
- xxx0
- xxx1234
- *** Failers
- xxx
-
-/^.+[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
- !pqr=apquxz.ixr.zzz.ac.uk
- abc!=apquxz.ixr.zzz.ac.uk
- abc!pqr=apquxz:ixr.zzz.ac.uk
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-
-/:/
- Well, we need a colon: somewhere
- *** Fail if we don't
-
-/([\da-f:]+)$/i
- 0abc
- abc
- fed
- E
- ::
- 5f03:12C0::932e
- fed def
- Any old stuff
- *** Failers
- 0zzz
- gzzz
- fed\x20
- Any old rubbish
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- A.12.123.0
- *** Failers
- .1.2.3333
- 1.2.3
- 1234.2.3
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- *** Failers
- 1IN SOA non-sp1 non-sp2(
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- Z.
- 2.
- ab-c.pq-r.
- sxk.zzz.ac.uk.
- x-.y-.
- *** Failers
- -abc.peq.
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- *.b0-a
- *.c3-b.c
- *.c-a.b-c
- *** Failers
- *.0
- *.a-
- *.a-b.c-
- *.c-a.0-c
-
-/^(?=ab(de))(abd)(e)/
- abde
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
-
-/^(?=(ab(cd)))(ab)/
- abcd
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- A.B.C.D
- a.b.c.1.2.3.C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- \"abcd\" ;
- \"\" ; rhubarb
- *** Failers
- \"1234\" : things
-
-/^$/
- \
- *** Failers
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- *** Failers
- abc
- ab cde
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- *** Failers
- abc
- ab cde
-
-/^ a\ b[c ]d $/x
- a bcd
- a b d
- *** Failers
- abcd
- ab d
-
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
-
-/^a*\w/
+/[z-\x{100}]/8iDZ
+ Z
z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
-
-/^a*?\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
-
-/^a+\w/
- az
- aaaz
- aa
- aaaa
- aa+
-
-/^a+?\w/
- az
- aaaz
- aa
- aaaa
- aa+
-
-/^\d{8}\w{2,}/
- 1234567890
- 12345678ab
- 12345678__
- *** Failers
- 1234567
-
-/^[aeiou\d]{4,5}$/
- uoie
- 1234
- 12345
- aaaaa
- *** Failers
- 123456
-
-/^[aeiou\d]{4,5}?/
- uoie
- 1234
- 12345
- aaaaa
- 123456
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- From abcd Mon Sep 1 12:33:02 1997
- *** Failers
- From abcd Sep 01 12:33:02 1997
-
-/^12.34/s
- 12\n34
- 12\r34
-
-/\w+(?=\t)/
- the quick brown\t fox
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- barrel
- 2barrel
- A barrel
+ \x{39c}
+ \x{178}
+ |
+ \x{80}
+ \x{ff}
+ \x{100}
+ \x{101}
+ ** Failers
+ \x{102}
+ Y
+ y
-/^(\D*)(?=\d)(?!123)/
- abc456
- *** Failers
- abc123
+/[z-\x{100}]/8DZi
-/^1234(?# test newlines
- inside)/
- 1234
+/(?:[\PPa*]*){8,}/
-/^1234 #comment in extended re
- /x
- 1234
+/[\P{Any}]/BZ
-/#rhubarb
- abcd/x
- abcd
+/[\P{Any}\E]/BZ
-/^abcd#rhubarb/x
- abcd
+/(\P{Yi}+\277)/
-/(?!^)abc/
- the abc
- *** Failers
- abc
+/(\P{Yi}+\277)?/
-/(?=^)abc/
- abc
- *** Failers
- the abc
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
+/(?<=\P{Yi}{3}A)X/
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
+/\p{Yi}+(\P{Yi}+)(?1)/
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
+/(\P{Yi}{2}\277)?/
-/^[\000-\037]/
- \0A
- \01B
- \037C
+/[\P{Yi}A]/
-/\0*/
- \0\0\0\0
+/[\P{Yi}\P{Yi}\P{Yi}A]/
-/A\x0{2,3}Z/
- The A\x0\x0Z
- An A\0\x0\0Z
- *** Failers
- A\0Z
- A\0\x0\0\x0Z
-
-/^\s/
- \040abc
- \x0cabc
- \nabc
- \rabc
- \tabc
- *** Failers
- abc
+/[^\P{Yi}A]/
-/^a b
- c/x
- abc
+/[^\P{Yi}\P{Yi}\P{Yi}A]/
-/ab{1,3}bc/
- abbbbc
- abbbc
- abbc
- *** Failers
- abc
- abbbbbc
+/(\P{Yi}*\277)*/
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
+/(\P{Yi}*?\277)*/
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
+/(\p{Yi}*+\277)*/
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
+/(\P{Yi}?\277)*/
-/^[W-c]+$/
- WXY_^abc
- *** Failers
- wxy
+/(\P{Yi}??\277)*/
-/^[W-c]+$/i
- WXY_^abc
- wxy_^ABC
+/(\p{Yi}?+\277)*/
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- wxy_^ABC
+/(\P{Yi}{0,3}\277)*/
-/^abc$/m
- abc
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
+/(\P{Yi}{0,3}?\277)*/
-/^abc$/
- abc
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
+/(\p{Yi}{0,3}+\277)*/
-/\Aabc\Z/m
- abc
- abc\n
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
+/\p{Zl}{2,3}+/8BZ
+ \xe2\x80\xa8\xe2\x80\xa8
+ \x{2028}\x{2028}\x{2028}
-/\A(.)*\Z/s
- abc\ndef
-
-/\A(.)*\Z/m
- *** Failers
- abc\ndef
-
-/(?:b)|(?::+)/
- b::c
- c::b
-
-/[-az]+/
- az-
- *** Failers
- b
-
-/[az-]+/
- za-
- *** Failers
- b
-
-/[a\-z]+/
- a-z
- *** Failers
- b
-
-/[a-z]+/
- abcdxyz
-
-/[\d-]+/
- 12-34
- *** Failers
- aaa
-
-/[\d-z]+/
- 12-34z
- *** Failers
- aaa
-
-/\x5c/
- \\
-
-/\x20Z/
- the Zoo
- *** Failers
- Zulu
-
-/ab{3cd/
- ab{3cd
-
-/ab{3,cd/
- ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
-
-/^a.b/<lf>
- a\rb
- *** Failers
- a\nb
-
-/abc$/
- abc
- abc\n
- *** Failers
- abc\ndef
-
-/(abc)\123/
- abc\x53
+/\p{Zl}/8BZ
-/(abc)\223/
- abc\x93
+/\p{Lu}{3}+/8BZ
-/(abc)\323/
- abc\xd3
+/\pL{2}+/8BZ
-/(abc)\100/
- abc\x40
- abc\100
+/\p{Cc}{2}+/8BZ
-/(abc)\1000/
- abc\x400
- abc\x40\x30
- abc\1000
- abc\100\x30
- abc\100\060
- abc\100\60
-
-/abc\81/
- abc\081
- abc\0\x38\x31
-
-/abc\91/
- abc\091
- abc\0\x39\x31
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
-
-/ab\idef/
- abidef
-
-/a{0}bc/
- bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
-
-/abc[\10]de/
- abc\010de
-
-/abc[\1]de/
- abc\1de
-
-/(abc)[\1]de/
- abc\1de
-
-/(?s)a.b/
- a\nb
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- baNOTcccd
- baNOTccd
- bacccd
- *** Failers
- anything
- b\bc
- baccd
-
-/[^a]/
- Abc
+/^\p{Cs}/8
+ \?\x{dfff}
+ ** Failers
+ \x{09f}
-/[^a]/i
- Abc
-
-/[^a]+/
- AAAaAbc
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ \x{9f2}
+ ** Failers
+ X
+ \x{2c2}
-/[^a]+/i
- AAAaAbc
-
-/[^a]+/
- bbb\nccc
-
-/[^k]$/
- abc
- *** Failers
- abk
-
-/[^k]{2,3}$/
- abc
- kbc
- kabc
- *** Failers
- abk
- akb
- akk
-
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 123456789\@x.y.z
- *** Failers
- 12345678\@x.y.uk
- 1234567\@a.b.c.d
-
-/[^a]/
- aaaabcd
- aaAabcd
-
-/[^a]/i
- aaaabcd
- aaAabcd
-
-/[^az]/
- aaaabcd
- aaAabcd
-
-/[^az]/i
- aaaabcd
- aaAabcd
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 1.875000282
- 1.235
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
-/a(?)b/
- ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
-
-/foo(.*)bar/
- The food is under the bar in the barn.
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
-
-/^\D*(?!123)/
- ABC123
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- *** Failers
- ABC123
-
-/^[W-]46]/
- W46]789
- -46]789
- *** Failers
- Wall
- Zebra
- 42
- [abcd]
- ]abcd[
-
-/^[W-\]46]/
- W46]789
- Wall
- Zebra
- Xylophone
- 42
- [abcd]
- ]abcd[
- \\backslash
- *** Failers
- -46]789
- well
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-
-/^(a){0,0}/
- bcd
- abc
- aab
-
-/^(a){0,1}/
- bcd
- abc
- aab
-
-/^(a){0,2}/
- bcd
- abc
- aab
-
-/^(a){0,3}/
- bcd
- abc
- aab
- aaa
-
-/^(a){0,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
-
-/^(a){1,1}/
- bcd
- abc
- aab
-
-/^(a){1,2}/
- bcd
- abc
- aab
-
-/^(a){1,3}/
- bcd
- abc
- aab
- aaa
-
-/^(a){1,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
-
-/.*\.gif/
- borfle\nbib.gif\nno
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
+/^\p{Zs}/8
+ \ \
+ \x{a0}
+ \x{1680}
+ \x{180e}
+ \x{2000}
+ \x{2001}
+ ** Failers
+ \x{2028}
+ \x{200d}
+
+/-- These four are here rather than in test 6 because Perl has problems with
+ the negative versions of the properties. --/
+
+/\p{^Lu}/8i
+ 1234
+ ** Failers
+ ABC
-/.*\.gif/m
- borfle\nbib.gif\nno
+/\P{Lu}/8i
+ 1234
+ ** Failers
+ ABC
-/.*\.gif/s
- borfle\nbib.gif\nno
+/\p{Ll}/8i
+ a
+ Az
+ ** Failers
+ ABC
-/.*\.gif/ms
- borfle\nbib.gif\nno
-
-/.*$/
- borfle\nbib.gif\nno
+/\p{Lu}/8i
+ A
+ a\x{10a0}B
+ ** Failers
+ a
+ \x{1d00}
-/.*$/m
- borfle\nbib.gif\nno
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ \x{e0}
-/.*$/s
- borfle\nbib.gif\nno
+/-- The next two are special cases where the lengths of the different cases of
+the same character differ. The first went wrong with heap frame storage; the
+second was broken in all cases. --/
-/.*$/ms
- borfle\nbib.gif\nno
-
-/.*$/
- borfle\nbib.gif\nno\n
+/^\x{023a}+?(\x{0130}+)/8i
+ \x{023a}\x{2c65}\x{0130}
+
+/^\x{023a}+([^X])/8i
+ \x{023a}\x{2c65}X
-/.*$/m
- borfle\nbib.gif\nno\n
+/\x{c0}+\x{116}+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
-/.*$/s
- borfle\nbib.gif\nno\n
+/[\x{c0}\x{116}]+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
-/.*$/ms
- borfle\nbib.gif\nno\n
-
-/(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
+/(\x{de})\1/8i
+ \x{de}\x{de}
+ \x{de}\x{fe}
+ \x{fe}\x{fe}
+ \x{fe}\x{de}
-/(.*X|^B)/m
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
+/^\x{c0}$/8i
+ \x{c0}
+ \x{e0}
-/(.*X|^B)/s
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
-
-/^.*B/
- **** Failers
- abc\nB
-
-/(?s)^.*B/
- abc\nB
-
-/(?m)^.*B/
- abc\nB
-
-/(?ms)^.*B/
- abc\nB
-
-/(?ms)^B/
- abc\nB
-
-/(?s)B$/
- B\n
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
+/^\x{e0}$/8i
+ \x{c0}
+ \x{e0}
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
+/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
+will match it only with UCP support, because without that it has no notion
+of case for anything other than the ASCII letters. --/
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- *** Failers
- z
+/((?i)[\x{c0}])/8
+ \x{c0}
+ \x{e0}
-/abcde{0,0}/
- abcd
- *** Failers
- abce
+/(?i:[\x{c0}])/8
+ \x{c0}
+ \x{e0}
-/ab[cd]{0,0}e/
- abe
- *** Failers
- abcde
+/-- This should be Perl-compatible but Perl 5.11 gets \x{300} wrong. --/8
-/ab(c){0,0}d/
- abd
- *** Failers
- abcd
-
-/a(b*)/
- a
- ab
- abbbb
- *** Failers
- bbbbb
-
-/ab\d{0}e/
- abe
+/^\X/8
+ A
+ A\x{300}BC
+ A\x{300}\x{301}\x{302}BC
*** Failers
- ab1e
+ \x{300}
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- \"the \\\"quick\\\" brown fox\"
-
-/.*?/g+
- abc
-
-/\b/g+
- abc
+/-- These are PCRE's extra properties to help with Unicodizing \d etc. --/
-/\b/+g
- abc
+/^\p{Xan}/8
+ ABCD
+ 1234
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ ** Failers
+ _ABC
-//g
- abc
+/^\p{Xan}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ ** Failers
+ _ABC
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
+/^\p{Xan}+?/8
+ \x{6ca}\x{a6c}\x{10a7}_
-/a[^a]b/
- acb
- a\nb
-
-/a.b/
- acb
- *** Failers
- a\nb
+/^\p{Xan}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/a[^a]b/s
- acb
- a\nb
+/^\p{Xan}{2,9}/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/a.b/s
- acb
- a\nb
-
-/^(b+?|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
-/^(b+|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
+/^\p{Xan}{2,9}?/8
+ \x{6ca}\x{a6c}\x{10a7}_
-/(?!\A)x/m
- x\nb\n
- a\bx\n
-
-/\x0{ab}/
- \0{ab}
-
-/(A|B)*?CD/
- CD
-
-/(A|B)*CD/
- CD
-
-/(?<!bar)foo/
- foo
- catfood
- arfootle
- rfoosh
- *** Failers
- barfoo
- towbarfoo
-
-/\w{3}(?<!bar)foo/
- catfood
- *** Failers
- foo
- barfoo
- towbarfoo
-
-/(?<=(foo)a)bar/
- fooabar
- *** Failers
- bar
- foobbar
-
-/\Aabc\z/m
- abc
- *** Failers
- abc\n
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
+/^[\p{Xan}]/8
+ ABCD1234_
+ 1234abcd_
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ ** Failers
+ _ABC
+
+/^[\p{Xan}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ ** Failers
+ _ABC
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
+/^>\p{Xsp}/8
+ >\x{1680}\x{2028}\x{0b}
+ >\x{a0}
+ ** Failers
+ \x{0b}
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+/^>\p{Xsp}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
+/^>\p{Xsp}+?/8
+ >\x{1680}\x{2028}\x{0b}
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
+/^>\p{Xsp}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(\d+)(\w)/
- 12345a
- 12345+
-
-/((?>\d+))(\w)/
- 12345a
- *** Failers
- 12345+
-
-/(?>a+)b/
- aaab
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/(?>b)+/
- aaabbbccc
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
+/^>\p{Xsp}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a+|b+|c+)*c/
- aaabbbbccccd
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
+/^>\p{Xsp}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/a(?-i)b/i
- ab
- Ab
- *** Failers
- aB
- AB
-
-/(a (?x)b c)d e/
- a bcd e
- *** Failers
- a b cd e
- abcd e
- a bcde
+/^>[\p{Xsp}]/8
+ >\x{2028}\x{0b}
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- *** Failers
- abcdef
+/^>[\p{Xsp}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a(?i)b)c/
- abc
- aBc
- *** Failers
- abC
- aBC
- Abc
- ABc
- ABC
- AbC
-
-/a(?i:b)c/
- abc
- aBc
- *** Failers
- ABC
- abC
- aBC
-
-/a(?i:b)*c/
- aBc
- aBBc
- *** Failers
- aBC
- aBBC
-
-/a(?=b(?i)c)\w\wd/
- abcd
- abCd
- *** Failers
- aBCd
- abcD
-
-/(?s-i:more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
+/^>\p{Xps}/8
+ >\x{1680}\x{2028}\x{0b}
+ >\x{a0}
+ ** Failers
+ \x{0b}
-/(?:(?s-i)more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?>a(?i)b+)+c/
- abc
- aBbc
- aBBc
- *** Failers
- Abc
- abAb
- abbC
-
-/(?=a(?i)b)\w\wc/
- abc
- aBc
- *** Failers
- Ab
- abC
- aBC
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- aBxxc
- *** Failers
- Abxxc
- ABxxc
- abxxC
+/^>\p{Xps}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
+/^>\p{Xps}+?/8
+ >\x{1680}\x{2028}\x{0b}
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
+/^>\p{Xps}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(?(?<=foo)bar|cat)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
-
-/(?(?<!foo)cat|bar)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
-
-/(?>a*)*/
- a
- aa
- aaaa
+/^>\p{Xps}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(abc|)+/
- abc
- abcabc
- abcabcabc
- xyz
-
-/([a]*)*/
- a
- aaaaa
-
-/([ab]*)*/
- a
- b
- ababab
- aaaabcde
- bbbb
-
-/([^a]*)*/
- b
- bbbb
- aaa
-
-/([^ab]*)*/
- cccc
- abab
-
-/([a]*?)*/
- a
- aaaa
-
-/([ab]*?)*/
- a
- b
- abab
- baba
-
-/([^a]*?)*/
- b
- bbbb
- aaa
-
-/([^ab]*?)*/
- c
- cccc
- baba
-
-/(?>a*)*/
- a
- aaabcde
-
-/((?>a*))*/
- aaaaa
- aabbaa
-
-/((?>a*?))*/
- aaaaa
- aabbaa
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 12-09-98
- *** Failers
- sep-12-98
-
-/(?i:saturday|sunday)/
- saturday
- sunday
- Saturday
- Sunday
- SATURDAY
- SUNDAY
- SunDay
+/^>\p{Xps}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a(?i)bc|BB)x/
- abcx
- aBCx
- bbx
- BBx
- *** Failers
- abcX
- aBCX
- bbX
- BBX
-
-/^([ab](?i)[cd]|[ef])/
- ac
- aC
- bD
- elephant
- Europe
- frog
- France
- *** Failers
- Africa
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- aBd
- xy
- xY
- zebra
- Zambesi
- *** Failers
- aCD
- XY
-
-/(?<=foo\n)^bar/m
- foo\nbar
- *** Failers
- bar
- baz\nbar
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- barbarbaz
- koobarbaz
- *** Failers
- baz
- foobarbaz
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-
-/abc/
- abc
- xabcy
- ababc
- *** Failers
- xbc
- axc
- abx
-
-/ab*c/
- abc
-
-/ab*bc/
- abc
- abbc
- abbbbc
-
-/.{1}/
- abbbbc
-
-/.{3,4}/
- abbbbc
-
-/ab{0,}bc/
- abbbbc
-
-/ab+bc/
- abbc
- *** Failers
- abc
- abq
-
-/ab+bc/
- abbbbc
-
-/ab{1,}bc/
- abbbbc
-
-/ab{1,3}bc/
- abbbbc
-
-/ab{3,4}bc/
- abbbbc
-
-/ab{4,5}bc/
- *** Failers
- abq
- abbbbc
-
-/ab?bc/
- abbc
- abc
-
-/ab{0,1}bc/
- abc
-
-/ab?bc/
-
-/ab?c/
- abc
-
-/ab{0,1}c/
- abc
-
-/^abc$/
- abc
- *** Failers
- abbbbc
- abcc
-
-/^abc/
- abcc
-
-/^abc$/
-
-/abc$/
- aabc
- *** Failers
- aabc
- aabcd
-
-/^/
- abc
-
-/$/
- abc
-
-/a.c/
- abc
- axc
-
-/a.*c/
- axyzc
-
-/a[bc]d/
- abd
- *** Failers
- axyzd
- abc
-
-/a[b-d]e/
- ace
-
-/a[b-d]/
- aac
-
-/a[-b]/
- a-
-
-/a[b-]/
- a-
-
-/a]/
- a]
-
-/a[]]b/
- a]b
-
-/a[^bc]d/
- aed
- *** Failers
- abd
- abd
-
-/a[^-b]c/
- adc
-
-/a[^]b]c/
- adc
- *** Failers
- a-c
- a]c
-
-/\ba\b/
- a-
- -a
- -a-
-
-/\by\b/
- *** Failers
- xy
- yz
- xyz
-
-/\Ba\B/
- *** Failers
- a-
- -a
- -a-
-
-/\By\b/
- xy
-
-/\by\B/
- yz
-
-/\By\B/
- xyz
-
-/\w/
- a
-
-/\W/
- -
- *** Failers
- -
- a
-
-/a\sb/
- a b
-
-/a\Sb/
- a-b
- *** Failers
- a-b
- a b
-
-/\d/
- 1
-
-/\D/
- -
- *** Failers
- -
- 1
-
-/[\w]/
- a
-
-/[\W]/
- -
- *** Failers
- -
- a
-
-/a[\s]b/
- a b
-
-/a[\S]b/
- a-b
- *** Failers
- a-b
- a b
-
-/[\d]/
- 1
-
-/[\D]/
- -
- *** Failers
- -
- 1
-
-/ab|cd/
- abc
- abcd
-
-/()ef/
- def
-
-/$b/
-
-/a\(b/
- a(b
-
-/a\(*b/
- ab
- a((b
-
-/a\\b/
- a\b
-
-/((a))/
- abc
-
-/(a)b(c)/
- abc
-
-/a+b+c/
- aabbabc
-
-/a{1,}b{1,}c/
- aabbabc
-
-/a.+?c/
- abcabc
-
-/(a+|b)*/
- ab
-
-/(a+|b){0,}/
- ab
-
-/(a+|b)+/
- ab
-
-/(a+|b){1,}/
- ab
+/^>[\p{Xps}]/8
+ >\x{2028}\x{0b}
+
+/^>[\p{Xps}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a+|b)?/
- ab
+/^\p{Xwd}/8
+ ABCD
+ 1234
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ _ABC
+ ** Failers
+ []
-/(a+|b){0,1}/
- ab
+/^\p{Xwd}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/[^ab]*/
- cde
+/^\p{Xwd}+?/8
+ \x{6ca}\x{a6c}\x{10a7}_
-/abc/
- *** Failers
- b
+/^\p{Xwd}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/a*/
+/^\p{Xwd}{2,9}/8
+ A_B12\x{6ca}\x{a6c}\x{10a7}
-
-/([abc])*d/
- abbbcd
-
-/([abc])*bcd/
- abcd
-
-/a|b|c|d|e/
- e
-
-/(a|b|c|d|e)f/
- ef
-
-/abcd*efg/
- abcdefg
-
-/ab*/
- xabyabbbz
- xayabbbz
-
-/(ab|cd)e/
- abcde
-
-/[abhgefdc]ij/
- hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
-
-/(a|b)c*d/
- abcd
-
-/(ab|ab*)bc/
- abc
-
-/a([bc]*)c*/
- abc
-
-/a([bc]*)(c*d)/
- abcd
-
-/a([bc]+)(c*d)/
- abcd
-
-/a([bc]*)(c+d)/
- abcd
-
-/a[bcd]*dcdcde/
- adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
- abcde
- adcdcde
-
-/(ab|a)b*c/
- abc
-
-/((a)(b)c)(d)/
- abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
-
-/^a(bc+|b[eh])g|.h$/
- abh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- ij
- reffgz
- *** Failers
- effg
- bcdd
-
-/((((((((((a))))))))))/
- a
-
-/(((((((((a)))))))))/
- a
-
-/multiple words of text/
- *** Failers
- aa
- uh-uh
-
-/multiple words/
- multiple words, yeah
-
-/(.*)c(.*)/
- abcde
-
-/\((.*), (.*)\)/
- (a, b)
-
-/[k]/
-
-/abcd/
- abcd
-
-/a(bc)d/
- abcd
-
-/a[-]?c/
- ac
-
-/abc/i
- ABC
- XABCY
- ABABC
- *** Failers
- aaxabxbaxbbx
- XBC
- AXC
- ABX
-
-/ab*c/i
- ABC
-
-/ab*bc/i
- ABC
- ABBC
-
-/ab*?bc/i
- ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
-
-/ab+?bc/i
- ABBC
-
-/ab+bc/i
- *** Failers
- ABC
- ABQ
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
- ABQ
- ABBBBC
-
-/ab??bc/i
- ABBC
- ABC
-
-/ab{0,1}?bc/i
- ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
-
-/ab{0,1}?c/i
- ABC
-
-/^abc$/i
- ABC
- *** Failers
- ABBBBC
- ABCC
-
-/^abc/i
- ABCC
-
-/^abc$/i
-
-/abc$/i
- AABC
-
-/^/i
- ABC
-
-/$/i
- ABC
-
-/a.c/i
- ABC
- AXC
-
-/a.*?c/i
- AXYZC
-
-/a.*c/i
- *** Failers
- AABC
- AXYZD
-
-/a[bc]d/i
- ABD
-
-/a[b-d]e/i
- ACE
- *** Failers
- ABC
- ABD
-
-/a[b-d]/i
- AAC
-
-/a[-b]/i
- A-
-
-/a[b-]/i
- A-
-
-/a]/i
- A]
-
-/a[]]b/i
- A]B
-
-/a[^bc]d/i
- AED
-
-/a[^-b]c/i
- ADC
- *** Failers
- ABD
- A-C
-
-/a[^]b]c/i
- ADC
-
-/ab|cd/i
- ABC
- ABCD
-
-/()ef/i
- DEF
-
-/$b/i
- *** Failers
- A]C
- B
-
-/a\(b/i
- A(B
-
-/a\(*b/i
- AB
- A((B
-
-/a\\b/i
- A\B
-
-/((a))/i
- ABC
-
-/(a)b(c)/i
- ABC
-
-/a+b+c/i
- AABBABC
-
-/a{1,}b{1,}c/i
- AABBABC
-
-/a.+?c/i
- ABCABC
-
-/a.*?c/i
- ABCABC
-
-/a.{0,5}?c/i
- ABCABC
-
-/(a+|b)*/i
- AB
-
-/(a+|b){0,}/i
- AB
-
-/(a+|b)+/i
- AB
-
-/(a+|b){1,}/i
- AB
-
-/(a+|b)?/i
- AB
-
-/(a+|b){0,1}/i
- AB
-
-/(a+|b){0,1}?/i
- AB
-
-/[^ab]*/i
- CDE
-
-/abc/i
-
-/a*/i
+/^\p{Xwd}{2,9}?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+/^[\p{Xwd}]/8
+ ABCD1234_
+ 1234abcd_
+ \x{6ca}
+ \x{a6c}
+ \x{10a7}
+ _ABC
+ ** Failers
+ []
+
+/^[\p{Xwd}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/([abc])*d/i
- ABBBCD
-
-/([abc])*bcd/i
- ABCD
-
-/a|b|c|d|e/i
- E
-
-/(a|b|c|d|e)f/i
- EF
-
-/abcd*efg/i
- ABCDEFG
-
-/ab*/i
- XABYABBBZ
- XAYABBBZ
-
-/(ab|cd)e/i
- ABCDE
-
-/[abhgefdc]ij/i
- HIJ
-
-/^(ab|cd)e/i
- ABCDE
-
-/(abc|)ef/i
- ABCDEF
-
-/(a|b)c*d/i
- ABCD
-
-/(ab|ab*)bc/i
- ABC
-
-/a([bc]*)c*/i
- ABC
-
-/a([bc]*)(c*d)/i
- ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
-
-/((a)(b)c)(d)/i
- ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- IJ
- REFFGZ
- *** Failers
- ADCDCDE
- EFFG
- BCDD
-
-/((((((((((a))))))))))/i
- A
-
-/(((((((((a)))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
-
-/multiple words of text/i
- *** Failers
- AA
- UH-UH
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
-
-/(.*)c(.*)/i
- ABCDE
-
-/\((.*), (.*)\)/i
- (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
-
-/a(bc)d/i
- ABCD
-
-/a[-]?c/i
- AC
-
-/a(?!b)./
- abad
-
-/a(?=d)./
- abad
-
-/a(?=c|d)./
- abad
-
-/a(?:b|c|d)(.)/
- ace
-
-/a(?:b|c|d)*(.)/
- ace
-
-/a(?:b|c|d)+?(.)/
- ace
- acdbcdbe
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
-
-/((foo)|(bar))*/
- foobar
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
-
-/^(.+)?B/
- AB
-
-/^([^a-z])|(\^)$/
- .
-
-/^[<>]&/
- <&OUT
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
-
-/(?<=a)b/
- ab
- *** Failers
- cb
- b
-
-/(?<!c)b/
- ab
- b
- b
-
-/(?:..)*a/
- aba
-
-/(?:..)*?a/
- aba
-
-/^(){3,5}/
- abc
-
-/^(a+)*ax/
- aax
-
-/^((a|b)+)*ax/
- aax
-
-/^((a|bc)+)*ax/
- aax
-
-/(a|x)*ab/
- cab
-
-/(a)*ab/
- cab
-
-/(?:(?i)a)b/
- ab
-
-/((?i)a)b/
- ab
-
-/(?:(?i)a)b/
- Ab
-
-/((?i)a)b/
- Ab
-
-/(?:(?i)a)b/
- *** Failers
- cb
- aB
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
-
-/((?i:a))b/
- ab
-
-/(?i:a)b/
- Ab
-
-/((?i:a))b/
- Ab
-
-/(?i:a)b/
- *** Failers
- aB
- aB
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
-
-/((?-i)a)b/i
- ab
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- aB
- Ab
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
-
-/((?-i:a))b/i
- ab
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- AB
- Ab
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
- AB
- a\nB
-
-/((?s-i:a.))b/i
- a\nB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/foo\w*\d{4}baz/
- foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
-
-/^a(?#xxx){3}c/
- aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
-
-/(?<![cd])b/
- *** Failers
- B\nB
- dbcb
-
-/(?<![cd])[ab]/
- dbaacb
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
-
-/(?<!cd)[ab]/
- cdaccb
-
-/^(?:a?b?)*$/
- *** Failers
- dbcb
- a--
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
-
-/((?m)^b$)/
- a\nb\nc\n
-
-/(?m)^b/
- a\nb\n
-
-/(?m)^(b)/
- a\nb\n
-
-/((?m)^b)/
- a\nb\n
-
-/\n((?m)^b)/
- a\nb\n
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/^b/
-
-/()^b/
- *** Failers
- a\nb\nc\n
- a\nb\nc\n
-
-/((?m)^b)/
- a\nb\nc\n
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
-
-/(?(?=a)b|a)/
- *** Failers
- a
- a
-
-/(?(?=a)a|b)/
- a
-
-/(\w+:)+/
- one:
-
-/$(?<=^(a))/
- a
+/-- A check not in UTF-8 mode --/
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
+/^[\p{Xwd}]+/
+ ABCD1234_
+
+/-- Some negative checks --/
-/^[^bcd]*(c+)/
- aexycd
+/^[\P{Xwd}]+/8
+ !.+\x{019}\x{35a}AB
-/(a*)b+/
- caab
+/^[\p{^Xwd}]+/8
+ !.+\x{019}\x{35a}AB
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- *** Failers
- abcd:
- abcd:
+/[\D]/WBZ8
+ 1\x{3c8}2
-/^[^bcd]*(c+)/
- aexycd
+/[\d]/WBZ8
+ >\x{6f4}<
-/(>a+)ab/
+/[\S]/WBZ8
+ \x{1680}\x{6f4}\x{1680}
-/(?>a+)b/
- aaab
+/[\s]/WBZ8
+ >\x{1680}<
-/([[:]+)/
- a:[b]:
+/[\W]/WBZ8
+ A\x{1712}B
-/([[=]+)/
- a=[b]=
+/[\w]/WBZ8
+ >\x{1723}<
-/([[.]+)/
- a.[b].
+/\D/WBZ8
+ 1\x{3c8}2
-/((?>a+)b)/
- aaab
+/\d/WBZ8
+ >\x{6f4}<
-/(?>(a+))b/
- aaab
+/\S/WBZ8
+ \x{1680}\x{6f4}\x{1680}
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
+/\s/WBZ8
+ >\x{1680}>
-/a\Z/
- *** Failers
- aaab
- a\nb\n
+/\W/WBZ8
+ A\x{1712}B
-/b\Z/
- a\nb\n
+/\w/WBZ8
+ >\x{1723}<
-/b\z/
+/[[:alpha:]]/WBZ
-/b\Z/
- a\nb
+/[[:lower:]]/WBZ
-/b\z/
- a\nb
- *** Failers
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- endingwxyz
- *** Failers
- a rather long string that doesn't end with one of them
+/[[:upper:]]/WBZ
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+/[[:alnum:]]/WBZ
-/(?<=\d{3}(?!999))foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
+/[[:ascii:]]/WBZ
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
+/[[:cntrl:]]/WBZ
-/((Z)+|A)*/
- ZABCDEFG
+/[[:digit:]]/WBZ
-/(Z()|A)*/
- ZABCDEFG
+/[[:graph:]]/WBZ
-/(Z(())|A)*/
- ZABCDEFG
+/[[:print:]]/WBZ
-/((?>Z)+|A)*/
- ZABCDEFG
+/[[:punct:]]/WBZ
-/((?>)+|A)*/
- ZABCDEFG
+/[[:space:]]/WBZ
-/a*/g
- abbab
+/[[:word:]]/WBZ
-/^[a-\d]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
+/[[:xdigit:]]/WBZ
-/^[\d-a]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
-
-/a b/x
- ab
-
-/(?!\A)x/m
- a\nxb\n
-
-/(?!^)x/m
- a\nxb\n
-
-/abc\Qabc\Eabc/
- abcabcabc
-
-/abc\Q(*+|\Eabc/
- abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- *** Failers
- abcabcabc
-
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
-
-/\Gabc/
- abc
- *** Failers
- xyzabc
+/-- Unicode properties for \b abd \B --/
-/\Gabc./g
- abc1abc2xyzabc3
+/\b...\B/8W
+ abc_
+ \x{37e}abc\x{376}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
-/abc./g
- abc1abc2xyzabc3
+/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
-/a(?x: b c )d/
- XabcdY
- *** Failers
- Xa b c d Y
+/\b...\B/8
+ abc_
+ ** Failers
+ \x{37e}abc\x{376}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
-/((?x)x y z | a b c)/
- XabcY
- AxyzB
+/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-/(?i)AB(?-i)C/
- XabCY
- *** Failers
- XabcY
+/\b...\B/W
+ abc_
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
-/((?i)AB(?-i)C|D)E/
- abCE
- DE
- *** Failers
- abcE
- abCe
- dE
- De
+/-- Some of these are silly, but they check various combinations --/
-/[z\Qa-d]\E]/
- z
- a
- -
- d
- ]
- *** Failers
- b
+/[[:^alpha:][:^cntrl:]]+/8WBZ
+ 123
+ abc
-/[\z\C]/
- z
- C
-
-/\M/
- M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/(?i)reg(?:ul(?:[a]|ae)r|ex)/
- REGular
- regulaer
- Regex
- regulr
-
-/[--]+/
-
-
-
-
-
-/(?<=Z)X./
- \x84XAZXB
-
-/^(?(2)a|(1)(2))+$/
- 123a
-
-/(?<=a|bbbb)c/
- ac
- bbbbc
-
-/abc/>testsavedregex
-<testsavedregex
- abc
- *** Failers
- bca
-
-/abc/F>testsavedregex
-<testsavedregex
- abc
- *** Failers
- bca
+/[[:^cntrl:][:^alpha:]]+/8WBZ
+ 123
+ abc
-/(a|b)/S>testsavedregex
-<testsavedregex
+/[[:alpha:]]+/8WBZ
abc
- *** Failers
- def
-
-/(a|b)/SF>testsavedregex
-<testsavedregex
- abc
- *** Failers
- def
-
-/line\nbreak/
- this is a line\nbreak
- line one\nthis is a line\nbreak in the second line
-
-/line\nbreak/f
- this is a line\nbreak
- ** Failers
- line one\nthis is a line\nbreak in the second line
-/line\nbreak/mf
- this is a line\nbreak
- ** Failers
- line one\nthis is a line\nbreak in the second line
-
-/1234/
- 123\P
- a4\P\R
-
-/1234/
- 123\P
- 4\P\R
-
-/^/mg
- a\nb\nc\n
- \
-
-/(?<=C\n)^/mg
- A\nC\nC\n
-
-/(?s)A?B/
- AB
- aB
-
-/(?s)A*B/
- AB
- aB
+/[[:^alpha:]\S]+/8WBZ
+ 123
+ abc
-/(?m)A?B/
- AB
- aB
+/[^\d]+/8WBZ
+ abc123
+ abc\x{123}
+ \x{660}abc
-/(?m)A*B/
- AB
- aB
+/\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
-/Content-Type\x3A[^\r\n]{6,}/
- Content-Type:xxxxxyyy
+/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/BZ
-/Content-Type\x3A[^\r\n]{6,}z/
- Content-Type:xxxxxyyyz
+/\P{Lu}+9\P{Lu}+B\P{Lu}+b/BZ
-/Content-Type\x3A[^a]{6,}/
- Content-Type:xxxyyy
+/\p{Han}+X\p{Greek}+\x{370}/BZ8
-/Content-Type\x3A[^a]{6,}z/
- Content-Type:xxxyyyz
+/\p{Xan}+!\p{Xan}+A/BZ
-/^abc/m
- xyz\nabc
- xyz\nabc\<lf>
- xyz\r\nabc\<lf>
- xyz\rabc\<cr>
- xyz\r\nabc\<crlf>
- ** Failers
- xyz\nabc\<cr>
- xyz\r\nabc\<cr>
- xyz\nabc\<crlf>
- xyz\rabc\<crlf>
- xyz\rabc\<lf>
-
-/abc$/m<lf>
- xyzabc
- xyzabc\n
- xyzabc\npqr
- xyzabc\r\<cr>
- xyzabc\rpqr\<cr>
- xyzabc\r\n\<crlf>
- xyzabc\r\npqr\<crlf>
- ** Failers
- xyzabc\r
- xyzabc\rpqr
- xyzabc\r\n
- xyzabc\r\npqr
-
-/^abc/m<cr>
- xyz\rabcdef
- xyz\nabcdef\<lf>
- ** Failers
- xyz\nabcdef
-
-/^abc/m<lf>
- xyz\nabcdef
- xyz\rabcdef\<cr>
- ** Failers
- xyz\rabcdef
-
-/^abc/m<crlf>
- xyz\r\nabcdef
- xyz\rabcdef\<cr>
- ** Failers
- xyz\rabcdef
-
-/.*/<lf>
- abc\ndef
- abc\rdef
- abc\r\ndef
- \<cr>abc\ndef
- \<cr>abc\rdef
- \<cr>abc\r\ndef
- \<crlf>abc\ndef
- \<crlf>abc\rdef
- \<crlf>abc\r\ndef
-
-/\w+(.)(.)?def/s
- abc\ndef
- abc\rdef
- abc\r\ndef
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
-
-/^(a()*)*/
- aaaa
-
-/^(?:a(?:(?:))*)*/
- aaaa
-
-/^(a()+)+/
- aaaa
-
-/^(?:a(?:(?:))+)+/
- aaaa
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/^a.b/<lf>
- a\rb
- a\nb\<cr>
- ** Failers
- a\nb
- a\nb\<any>
- a\rb\<cr>
- a\rb\<any>
-
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
-
-/^a\Rb/<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- ** Failers
- a\n\rb
-
-/^a\R*b/<bsr_unicode>
- ab
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
- ** Failers
- ab
-
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- a\n\rb
- a\n\r\x85b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
- a\n\r\n\rb
- a\n\n\r\nb
- ** Failers
- a\n\n\n\rb
- a\r
+/\p{Xsp}+!\p{Xsp}\t/BZ
-/^a[\R]b/<bsr_unicode>
- aRb
- ** Failers
- a\nb
+/\p{Xps}+!\p{Xps}\t/BZ
-/.+foo/
- afoo
- ** Failers
- \r\nfoo
- \nfoo
+/\p{Xwd}+!\p{Xwd}_/BZ
-/.+foo/<crlf>
- afoo
- \nfoo
- ** Failers
- \r\nfoo
+/A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
-/.+foo/<any>
- afoo
- ** Failers
- \nfoo
- \r\nfoo
+/-- These behaved oddly in Perl, so they are kept in this test --/
-/.+foo/s
- afoo
- \r\nfoo
- \nfoo
+/(\x{23a}\x{23a}\x{23a})?\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
-/^$/mg<any>
- abc\r\rxyz
- abc\n\rxyz
- ** Failers
- abc\r\nxyz
+/(ȺȺȺ)?\1/8i
+ ȺȺȺⱥⱥ
-/^X/m
- XABC
- ** Failers
- XABC\B
+/(\x{23a}\x{23a}\x{23a})?\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
-/(?m)^$/<any>g+
- abc\r\n\r\n
+/(ȺȺȺ)?\1/8i
+ ȺȺȺⱥⱥⱥ
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
-
-/(?m)$/<any>g+
- abc\r\n\r\n
+/(\x{23a}\x{23a}\x{23a})\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
-/(?|(abc)|(xyz))/
- >abc<
- >xyz<
+/(ȺȺȺ)\1/8i
+ ȺȺȺⱥⱥ
-/(x)(?|(abc)|(xyz))(x)/
- xabcx
- xxyzx
+/(\x{23a}\x{23a}\x{23a})\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
-/(x)(?|(abc)(pqr)|(xyz))(x)/
- xabcpqrx
- xxyzx
+/(ȺȺȺ)\1/8i
+ ȺȺȺⱥⱥⱥ
-/(?|(abc)|(xyz))(?1)/
- abcabc
- xyzabc
- ** Failers
- xyzxyz
-
-/\H\h\V\v/
- X X\x0a
- X\x09X\x0b
- ** Failers
- \xa0 X\x0a
+/(\x{2c65}\x{2c65})\1/8i
+ \x{2c65}\x{2c65}\x{23a}\x{23a}
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c
- ** Failers
- \x09\x20\xa0\x0a\x0b
-
-/\H{3,4}/
- XY ABCDE
- XY PQR ST
+/(ⱥⱥ)\1/8i
+ ⱥⱥȺȺ
-/.\h{3,4}./
- XY AB PQRS
+/(\x{23a}\x{23a}\x{23a})\1Y/8i
+ X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- > X NYQZ
- ** Failers
- >XYZ
- > X NY Z
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/.+A/<crlf>
- \r\nA
-
-/\nA/<crlf>
- \r\nA
+/(\x{2c65}\x{2c65})\1Y/8i
+ X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
-/[\r\n]A/<crlf>
- \r\nA
+/-- --/
-/(\r|\n)A/<crlf>
- \r\nA
+/-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
-/a\Rb/I<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
+/^[\p{Batak}]/8
+ \x{1bc0}
+ \x{1bff}
** Failers
- a\x85b
- a\x0bb
-
-/a\Rb/I<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
- ** Failers
- a\x85b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
+ \x{1bf4}
-/a\R?b/I<bsr_anycrlf>
- a\rb
- a\nb
- a\r\nb
+/^[\p{Brahmi}]/8
+ \x{11000}
+ \x{1106f}
** Failers
- a\x85b
- a\x0bb
-
-/a\R?b/I<bsr_unicode>
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
- ** Failers
- a\x85b\<bsr_anycrlf>
- a\x0bb\<bsr_anycrlf>
+ \x{1104e}
-/a\R{2,4}b/I<bsr_anycrlf>
- a\r\n\nb
- a\n\r\rb
- a\r\n\r\n\r\n\r\nb
+/^[\p{Mandaic}]/8
+ \x{840}
+ \x{85e}
** Failers
- a\x85\85b
- a\x0b\0bb
-
-/a\R{2,4}b/I<bsr_unicode>
- a\r\rb
- a\n\n\nb
- a\r\n\n\r\rb
- a\x85\85b
- a\x0b\0bb
- ** Failers
- a\r\r\r\r\rb
- a\x85\85b\<bsr_anycrlf>
- a\x0b\0bb\<bsr_anycrlf>
-
-/a(?!)|\wbc/
- abc
-
-/a[]b/<JS>
- ** Failers
- ab
-
-/a[]+b/<JS>
- ** Failers
- ab
-
-/a[]*+b/<JS>
- ** Failers
- ab
-
-/a[^]b/<JS>
- aXb
- a\nb
- ** Failers
- ab
-
-/a[^]+b/<JS>
- aXb
- a\nX\nXb
- ** Failers
- ab
-
-/X$/E
- X
- ** Failers
- X\n
+ \x{85c}
+ \x{85d}
-/X$/
- X
- X\n
-
-/xyz/C
- xyz
- abcxyz
- abcxyz\Y
- ** Failers
- abc
- abc\Y
- abcxypqr
- abcxypqr\Y
-
-/(*NO_START_OPT)xyz/C
- abcxyz
-
-/(?C)ab/
- ab
- \C-ab
-
-/ab/C
- ab
- \C-ab
-
-/^"((?(?=[a])[^"])|b)*"$/C
- "ab"
- \C-"ab"
+/-- --/
-/\d+X|9+Y/
- ++++123999\P
- ++++123999Y\P
+/(\X*)(.)/s8
+ A\x{300}
-/Z(*F)/
- Z\P
- ZA\P
+/^S(\X*)e(\X*)$/8
+ Stéréo
-/Z(?!)/
- Z\P
- ZA\P
-
-/dog(sbody)?/
- dogs\P
- dogs\P\P
-
-/dog(sbody)??/
- dogs\P
- dogs\P\P
-
-/dog|dogsbody/
- dogs\P
- dogs\P\P
-
-/dogsbody|dog/
- dogs\P
- dogs\P\P
+/^\X/8
+ ́réo
-/Z(*F)Q|ZXY/
- Z\P
- ZA\P
- X\P
-
-/\bthe cat\b/
- the cat\P
- the cat\P\P
-
-/dog(sbody)?/
- dogs\D\P
- body\D\R
-
-/dog(sbody)?/
- dogs\D\P\P
- body\D\R
-
-/abc/
- abc\P
- abc\P\P
-
-/abc\K123/
- xyzabc123pqr
-
-/(?<=abc)123/
- xyzabc123pqr
- xyzabc12\P
- xyzabc12\P\P
-
-/\babc\b/
- +++abc+++
- +++ab\P
- +++ab\P\P
-
-/(?=C)/g+
- ABCDECBA
-
-/(abc|def|xyz)/I
- terhjk;abcdaadsfe
- the quick xyz brown fox
- \Yterhjk;abcdaadsfe
- \Ythe quick xyz brown fox
- ** Failers
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-
-/(abc|def|xyz)/SI
- terhjk;abcdaadsfe
- the quick xyz brown fox
- \Yterhjk;abcdaadsfe
- \Ythe quick xyz brown fox
- ** Failers
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-
-/abcd*/+
- xxxxabcd\P
- xxxxabcd\P\P
- dddxxx\R
- xxxxabcd\P\P
- xxx\R
-
-/abcd*/i
- xxxxabcd\P
- xxxxabcd\P\P
- XXXXABCD\P
- XXXXABCD\P\P
-
-/abc\d*/
- xxxxabc1\P
- xxxxabc1\P\P
-
-/abc[de]*/
- xxxxabcde\P
- xxxxabcde\P\P
-
-/(?:(?1)|B)(A(*F)|C)/
- ABCD
- CCD
- ** Failers
- CAD
-
-/^(?:(?1)|B)(A(*F)|C)/
- CCD
- BCD
- ** Failers
- ABCD
- CAD
- BAD
-
-/^(?!a(*SKIP)b)/
- ac
-
-/^(?=a(*SKIP)b|ac)/
- ** Failers
- ac
-
-/^(?=a(*THEN)b|ac)/
- ac
-
-/^(?=a(*PRUNE)b)/
- ab
- ** Failers
- ac
-
-/^(?(?!a(*SKIP)b))/
- ac
+/^a\X41z/<JS>
+ aX41z
+ *** Failers
+ aAz
-/(?<=abc)def/
- abc\P\P
+/(?<=ab\Cde)X/8
-/abc$/
- abc
- abc\P
- abc\P\P
-
-/abc$/m
- abc
- abc\n
- abc\P\P
- abc\n\P\P
- abc\P
- abc\n\P
+/\X/
+ a\P
+ a\P\P
-/abc\z/
- abc
- abc\P
- abc\P\P
+/\Xa/
+ aa\P
+ aa\P\P
-/abc\Z/
- abc
- abc\P
- abc\P\P
+/\X{2}/
+ aa\P
+ aa\P\P
-/abc\b/
- abc
- abc\P
- abc\P\P
+/\X+a/
+ a\P
+ aa\P
+ aa\P\P
-/abc\B/
- abc
- abc\P
- abc\P\P
-
-/.+/
- abc\>0
- abc\>1
- abc\>2
- abc\>3
- abc\>4
- abc\>-4
+/\X+?a/
+ a\P
+ ab\P
+ aa\P
+ aa\P\P
+ aba\P
+
+/-- These Unicode 6.1.0 scripts are not known to Perl. --/
+
+/\p{Chakma}\d/8W
+ \x{11100}\x{1113c}
+
+/\p{Takri}\d/8W
+ \x{11680}\x{116c0}
+
+/^\X/8
+ A\P
+ A\P\P
+ A\x{300}\x{301}\P
+ A\x{300}\x{301}\P\P
+ A\x{301}\P
+ A\x{301}\P\P
+
+/^\X{2,3}/8
+ A\P
+ A\P\P
+ AA\P
+ AA\P\P
+ A\x{300}\x{301}\P
+ A\x{300}\x{301}\P\P
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+
+/^\X{2}/8
+ AA\P
+ AA\P\P
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+
+/^\X+/8
+ AA\P
+ AA\P\P
+
+/^\X+?Z/8
+ AA\P
+ AA\P\P
/-- End of testinput7 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput8 b/ext/pcre/pcrelib/testdata/testinput8
index 55d2fd3c0..e235445e0 100644
--- a/ext/pcre/pcrelib/testdata/testinput8
+++ b/ext/pcre/pcrelib/testdata/testinput8
@@ -1,590 +1,4199 @@
-/-- This set of tests checks UTF-8 support with the DFA matching functionality
- of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
- it. --/
-
-/\x{100}ab/8
- \x{100}ab
-
-/a\x{100}*b/8
- ab
- a\x{100}b
- a\x{100}\x{100}b
+/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
+ The -dfa flag must be used with pcretest when running it. --/
+
+/abc/
+ abc
+
+/ab*c/
+ abc
+ abbbbc
+ ac
-/a\x{100}+b/8
- a\x{100}b
- a\x{100}\x{100}b
+/ab+c/
+ abc
+ abbbbbbc
*** Failers
+ ac
ab
-
-/\bX/8
- Xoanon
- +Xoanon
- \x{300}Xoanon
+
+/a*/
+ a
+ aaaaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
+
+/(a|abcd|african)/
+ a
+ abcd
+ african
+
+/^abc/
+ abcdef
+ *** Failers
+ xyzabc
+ xyz\nabc
+
+/^abc/m
+ abcdef
+ xyz\nabc
+ *** Failers
+ xyzabc
+
+/\Aabc/
+ abcdef
+ *** Failers
+ xyzabc
+ xyz\nabc
+
+/\Aabc/m
+ abcdef
+ *** Failers
+ xyzabc
+ xyz\nabc
+
+/\Gabc/
+ abcdef
+ xyzabc\>3
+ *** Failers
+ xyzabc
+ xyzabc\>2
+
+/x\dy\Dz/
+ x9yzz
+ x0y+z
+ *** Failers
+ xyz
+ xxy0z
+
+/x\sy\Sz/
+ x yzz
+ x y+z
+ *** Failers
+ xyz
+ xxyyz
+
+/x\wy\Wz/
+ xxy+z
+ *** Failers
+ xxy0z
+ x+y+z
+
+/x.y/
+ x+y
+ x-y
+ *** Failers
+ x\ny
+
+/x.y/s
+ x+y
+ x-y
+ x\ny
+
+/(a.b(?s)c.d|x.y)p.q/
+ a+bc+dp+q
+ a+bc\ndp+q
+ x\nyp+q
*** Failers
- YXoanon
+ a\nbc\ndp+q
+ a+bc\ndp\nq
+ x\nyp\nq
+
+/a\d\z/
+ ba0
+ *** Failers
+ ba0\n
+ ba0\ncd
+
+/a\d\z/m
+ ba0
+ *** Failers
+ ba0\n
+ ba0\ncd
+
+/a\d\Z/
+ ba0
+ ba0\n
+ *** Failers
+ ba0\ncd
+
+/a\d\Z/m
+ ba0
+ ba0\n
+ *** Failers
+ ba0\ncd
+
+/a\d$/
+ ba0
+ ba0\n
+ *** Failers
+ ba0\ncd
+
+/a\d$/m
+ ba0
+ ba0\n
+ ba0\ncd
+ *** Failers
+
+/abc/i
+ abc
+ aBc
+ ABC
+
+/[^a]/
+ abcd
+
+/ab?\w/
+ abz
+ abbz
+ azz
+
+/x{0,3}yz/
+ ayzq
+ axyzq
+ axxyz
+ axxxyzq
+ axxxxyzq
+ *** Failers
+ ax
+ axx
+
+/x{3}yz/
+ axxxyzq
+ axxxxyzq
+ *** Failers
+ ax
+ axx
+ ayzq
+ axyzq
+ axxyz
+
+/x{2,3}yz/
+ axxyz
+ axxxyzq
+ axxxxyzq
+ *** Failers
+ ax
+ axx
+ ayzq
+ axyzq
+
+/[^a]+/
+ bac
+ bcdefax
+ *** Failers
+ aaaaa
+
+/[^a]*/
+ bac
+ bcdefax
+ *** Failers
+ aaaaa
+
+/[^a]{3,5}/
+ xyz
+ awxyza
+ abcdefa
+ abcdefghijk
+ *** Failers
+ axya
+ axa
+ aaaaa
+
+/\d*/
+ 1234b567
+ xyz
+
+/\D*/
+ a1234b567
+ xyz
+
+/\d+/
+ ab1234c56
+ *** Failers
+ xyz
+
+/\D+/
+ ab123c56
+ *** Failers
+ 789
-/\BX/8
- YXoanon
+/\d?A/
+ 045ABC
+ ABC
*** Failers
- Xoanon
- +Xoanon
- \x{300}Xoanon
+ XYZ
+
+/\D?A/
+ ABC
+ BAC
+ 9ABC
+ *** Failers
+
+/a+/
+ aaaa
+
+/^.*xyz/
+ xyz
+ ggggggggxyz
+
+/^.+xyz/
+ abcdxyz
+ axyz
+ *** Failers
+ xyz
+
+/^.?xyz/
+ xyz
+ cxyz
-/X\b/8
- X+oanon
- ZX\x{300}oanon
- FAX
+/^\d{2,3}X/
+ 12X
+ 123X
+ *** Failers
+ X
+ 1X
+ 1234X
+
+/^[abcd]\d/
+ a45
+ b93
+ c99z
+ d04
+ *** Failers
+ e45
+ abcd
+ abcd1234
+ 1234
+
+/^[abcd]*\d/
+ a45
+ b93
+ c99z
+ d04
+ abcd1234
+ 1234
+ *** Failers
+ e45
+ abcd
+
+/^[abcd]+\d/
+ a45
+ b93
+ c99z
+ d04
+ abcd1234
+ *** Failers
+ 1234
+ e45
+ abcd
+
+/^a+X/
+ aX
+ aaX
+
+/^[abcd]?\d/
+ a45
+ b93
+ c99z
+ d04
+ 1234
+ *** Failers
+ abcd1234
+ e45
+
+/^[abcd]{2,3}\d/
+ ab45
+ bcd93
+ *** Failers
+ 1234
+ a36
+ abcd1234
+ ee45
+
+/^(abc)*\d/
+ abc45
+ abcabcabc45
+ 42xyz
+ *** Failers
+
+/^(abc)+\d/
+ abc45
+ abcabcabc45
+ *** Failers
+ 42xyz
+
+/^(abc)?\d/
+ abc45
+ 42xyz
+ *** Failers
+ abcabcabc45
+
+/^(abc){2,3}\d/
+ abcabc45
+ abcabcabc45
+ *** Failers
+ abcabcabcabc45
+ abc45
+ 42xyz
+
+/1(abc|xyz)2(?1)3/
+ 1abc2abc3456
+ 1abc2xyz3456
+
+/^(a*\w|ab)=(a*\w|ab)/
+ ab=ab
+
+/^(a*\w|ab)=(?1)/
+ ab=ab
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ a(b)c
+ a(b(c))d
+ *** Failers)
+ a(b(c)d
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ >abc>1(2)3<xyz<
+ >abc>(1(2)3)<xyz<
+
+/^(?>a*)\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
*** Failers
- Xoanon
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
+ <>
+ <abcd>
+ <abc <123> hij>
+ <abc <def> hij>
+ <abc<>def>
+ <abc<>
+ *** Failers
+ <abc
+
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 12
+ *** Failers
+ 123
+ xyz
+
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 12
+ *** Failers
+ 123
+ xyz
+
+/^(?=abc)\w{5}:$/
+ abcde:
+ *** Failers
+ abc..
+ 123
+ vwxyz
+
+/^(?!abc)\d\d$/
+ 12
+ *** Failers
+ abcde:
+ abc..
+ 123
+ vwxyz
+
+/(?<=abc|xy)123/
+ abc12345
+ wxy123z
+ *** Failers
+ 123abc
+
+/(?<!abc|xy)123/
+ 123abc
+ mno123456
+ *** Failers
+ abc12345
+ wxy123z
+
+/abc(?C1)xyz/
+ abcxyz
+ 123abcxyz999
+
+/(ab|cd){3,4}/C
+ ababab
+ abcdabcd
+ abcdcdcdcdcd
+
+/^abc/
+ abcdef
+ *** Failers
+ abcdef\B
+
+/^(a*|xyz)/
+ bcd
+ aaabcd
+ xyz
+ xyz\N
+ *** Failers
+ bcd\N
-/X\B/8
- Xoanon
+/xyz$/
+ xyz
+ xyz\n
*** Failers
- X+oanon
- ZX\x{300}oanon
- FAX
+ xyz\Z
+ xyz\n\Z
-/[^a]/8
+/xyz$/m
+ xyz
+ xyz\n
+ abcxyz\npqr
+ abcxyz\npqr\Z
+ xyz\n\Z
+ *** Failers
+ xyz\Z
+
+/\Gabc/
+ abcdef
+ defabcxyz\>3
+ *** Failers
+ defabcxyz
+
+/^abcdef/
+ ab\P
+ abcde\P
+ abcdef\P
+ *** Failers
+ abx\P
+
+/^a{2,4}\d+z/
+ a\P
+ aa\P
+ aa2\P
+ aaa\P
+ aaa23\P
+ aaaa12345\P
+ aa0z\P
+ aaaa4444444444444z\P
+ *** Failers
+ az\P
+ aaaaa\P
+ a56\P
+
+/^abcdef/
+ abc\P
+ def\R
+
+/(?<=foo)bar/
+ xyzfo\P
+ foob\P\>2
+ foobar...\R\P\>4
+ xyzfo\P
+ foobar\>2
+ *** Failers
+ xyzfo\P
+ obar\R
+
+/(ab*(cd|ef))+X/
+ adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
+ lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
+ cdabbbbbbbb\P\R\B\Z
+ efabbbbbbbbbbbbbbbb\P\R\B\Z
+ bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
+
+/(a|b)/SF>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
+/the quick brown fox/
+ the quick brown fox
+ The quick brown FOX
+ What do you know about the quick brown fox?
+ What do you know about THE QUICK BROWN FOX?
+
+/The quick brown fox/i
+ the quick brown fox
+ The quick brown FOX
+ What do you know about the quick brown fox?
+ What do you know about THE QUICK BROWN FOX?
+
+/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
+ abcd\t\n\r\f\a\e9;\$\\?caxyz
+
+/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
+ abxyzpqrrrabbxyyyypqAzz
+ abxyzpqrrrabbxyyyypqAzz
+ aabxyzpqrrrabbxyyyypqAzz
+ aaabxyzpqrrrabbxyyyypqAzz
+ aaaabxyzpqrrrabbxyyyypqAzz
+ abcxyzpqrrrabbxyyyypqAzz
+ aabcxyzpqrrrabbxyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypAzz
+ aaabcxyzpqrrrabbxyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqqAzz
+ aaaabcxyzpqrrrabbxyyyypqAzz
+ abxyzzpqrrrabbxyyyypqAzz
+ aabxyzzzpqrrrabbxyyyypqAzz
+ aaabxyzzzzpqrrrabbxyyyypqAzz
+ aaaabxyzzzzpqrrrabbxyyyypqAzz
+ abcxyzzpqrrrabbxyyyypqAzz
+ aabcxyzzzpqrrrabbxyyyypqAzz
+ aaabcxyzzzzpqrrrabbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypABzz
+ aaabcxyzpqrrrabbxyyyypABBzz
+ >>>aaabxyzpqrrrabbxyyyypqAzz
+ >aaaabxyzpqrrrabbxyyyypqAzz
+ >>>>abcxyzpqrrrabbxyyyypqAzz
+ *** Failers
+ abxyzpqrrabbxyyyypqAzz
+ abxyzpqrrrrabbxyyyypqAzz
+ abxyzpqrrrabxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyypqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
+
+/^(abc){1,2}zz/
+ abczz
+ abcabczz
+ *** Failers
+ zz
+ abcabcabczz
+ >>abczz
+
+/^(b+?|a){1,2}?c/
+ bc
+ bbc
+ bbbc
+ bac
+ bbac
+ aac
+ abbbbbbbbbbbc
+ bbbbbbbbbbbac
+ *** Failers
+ aaac
+ abbbbbbbbbbbac
+
+/^(b+|a){1,2}c/
+ bc
+ bbc
+ bbbc
+ bac
+ bbac
+ aac
+ abbbbbbbbbbbc
+ bbbbbbbbbbbac
+ *** Failers
+ aaac
+ abbbbbbbbbbbac
+
+/^(b+|a){1,2}?bc/
+ bbc
+
+/^(b*|ba){1,2}?bc/
+ babc
+ bbabc
+ bababc
+ *** Failers
+ bababbc
+ babababc
+
+/^(ba|b*){1,2}?bc/
+ babc
+ bbabc
+ bababc
+ *** Failers
+ bababbc
+ babababc
+
+/^\ca\cA\c[\c{\c:/
+ \x01\x01\e;z
+
+/^[ab\]cde]/
+ athing
+ bthing
+ ]thing
+ cthing
+ dthing
+ ething
+ *** Failers
+ fthing
+ [thing
+ \\thing
+
+/^[]cde]/
+ ]thing
+ cthing
+ dthing
+ ething
+ *** Failers
+ athing
+ fthing
+
+/^[^ab\]cde]/
+ fthing
+ [thing
+ \\thing
+ *** Failers
+ athing
+ bthing
+ ]thing
+ cthing
+ dthing
+ ething
+
+/^[^]cde]/
+ athing
+ fthing
+ *** Failers
+ ]thing
+ cthing
+ dthing
+ ething
+
+/^\/
+
+
+/^/
+
+
+/^[0-9]+$/
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 100
+ *** Failers
+ abc
+
+/^.*nter/
+ enter
+ inter
+ uponter
+
+/^xxx[0-9]+$/
+ xxx0
+ xxx1234
+ *** Failers
+ xxx
+
+/^.+[0-9][0-9][0-9]$/
+ x123
+ xx123
+ 123456
+ *** Failers
+ 123
+ x1234
+
+/^.+?[0-9][0-9][0-9]$/
+ x123
+ xx123
+ 123456
+ *** Failers
+ 123
+ x1234
+
+/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
+ abc!pqr=apquxz.ixr.zzz.ac.uk
+ *** Failers
+ !pqr=apquxz.ixr.zzz.ac.uk
+ abc!=apquxz.ixr.zzz.ac.uk
+ abc!pqr=apquxz:ixr.zzz.ac.uk
+ abc!pqr=apquxz.ixr.zzz.ac.ukk
+
+/:/
+ Well, we need a colon: somewhere
+ *** Fail if we don't
+
+/([\da-f:]+)$/i
+ 0abc
+ abc
+ fed
+ E
+ ::
+ 5f03:12C0::932e
+ fed def
+ Any old stuff
+ *** Failers
+ 0zzz
+ gzzz
+ fed\x20
+ Any old rubbish
+
+/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
+ .1.2.3
+ A.12.123.0
+ *** Failers
+ .1.2.3333
+ 1.2.3
+ 1234.2.3
+
+/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
+ 1 IN SOA non-sp1 non-sp2(
+ 1 IN SOA non-sp1 non-sp2 (
+ *** Failers
+ 1IN SOA non-sp1 non-sp2(
+
+/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
+ a.
+ Z.
+ 2.
+ ab-c.pq-r.
+ sxk.zzz.ac.uk.
+ x-.y-.
+ *** Failers
+ -abc.peq.
+
+/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
+ *.a
+ *.b0-a
+ *.c3-b.c
+ *.c-a.b-c
+ *** Failers
+ *.0
+ *.a-
+ *.a-b.c-
+ *.c-a.0-c
+
+/^(?=ab(de))(abd)(e)/
+ abde
+
+/^(?!(ab)de|x)(abd)(f)/
+ abdf
+
+/^(?=(ab(cd)))(ab)/
abcd
- a\x{100}
-
-/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
- ab99
- \x{123}\x{123}45
- \x{400}\x{401}\x{402}6
- *** Failers
- d99
- \x{123}\x{122}4
- \x{400}\x{403}6
- \x{400}\x{401}\x{402}\x{402}6
-
-/abc/8
- ]
-
-
- \?
- \xe1\x88
- \P\xe1\x88
- \P\P\xe1\x88
-
-/a.b/8
- acb
- a\x7fb
- a\x{100}b
+
+/^[\da-f](\.[\da-f])*$/i
+ a.b.c.d
+ A.B.C.D
+ a.b.c.1.2.3.C
+
+/^\".*\"\s*(;.*)?$/
+ \"1234\"
+ \"abcd\" ;
+ \"\" ; rhubarb
*** Failers
- a\nb
+ \"1234\" : things
-/a(.{3})b/8
- a\x{4000}xyb
- a\x{4000}\x7fyb
- a\x{4000}\x{100}yb
+/^$/
+ \
*** Failers
- a\x{4000}b
- ac\ncb
-/a(.*?)(.)/
- a\xc0\x88b
+/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
+ ab c
+ *** Failers
+ abc
+ ab cde
+
+/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
+ ab c
+ *** Failers
+ abc
+ ab cde
-/a(.*?)(.)/8
- a\x{100}b
+/^ a\ b[c ]d $/x
+ a bcd
+ a b d
+ *** Failers
+ abcd
+ ab d
-/a(.*)(.)/
- a\xc0\x88b
+/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
+ abcdefhijklm
-/a(.*)(.)/8
- a\x{100}b
+/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
+ abcdefhijklm
-/a(.)(.)/
- a\xc0\x92bcd
+/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
+ a+ Z0+\x08\n\x1d\x12
-/a(.)(.)/8
- a\x{240}bcd
+/^[.^$|()*+?{,}]+/
+ .^\$(*+)|{?,?}
-/a(.?)(.)/
- a\xc0\x92bcd
+/^a*\w/
+ z
+ az
+ aaaz
+ a
+ aa
+ aaaa
+ a+
+ aa+
-/a(.?)(.)/8
- a\x{240}bcd
+/^a*?\w/
+ z
+ az
+ aaaz
+ a
+ aa
+ aaaa
+ a+
+ aa+
-/a(.??)(.)/
- a\xc0\x92bcd
+/^a+\w/
+ az
+ aaaz
+ aa
+ aaaa
+ aa+
-/a(.??)(.)/8
- a\x{240}bcd
+/^a+?\w/
+ az
+ aaaz
+ aa
+ aaaa
+ aa+
-/a(.{3})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
+/^\d{8}\w{2,}/
+ 1234567890
+ 12345678ab
+ 12345678__
*** Failers
- a\x{1234}b
- ac\ncb
+ 1234567
-/a(.{3,})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
+/^[aeiou\d]{4,5}$/
+ uoie
+ 1234
+ 12345
+ aaaaa
*** Failers
- a\x{1234}b
+ 123456
-/a(.{3,}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
+/^[aeiou\d]{4,5}?/
+ uoie
+ 1234
+ 12345
+ aaaaa
+ 123456
+
+/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
+ From abcd Mon Sep 01 12:33:02 1997
+
+/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
+ From abcd Mon Sep 01 12:33:02 1997
+ From abcd Mon Sep 1 12:33:02 1997
*** Failers
- a\x{1234}b
+ From abcd Sep 01 12:33:02 1997
+
+/^12.34/s
+ 12\n34
+ 12\r34
+
+/\w+(?=\t)/
+ the quick brown\t fox
-/a(.{3,5})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
+/foo(?!bar)(.*)/
+ foobar is foolish see?
+
+/(?:(?!foo)...|^.{0,2})bar(.*)/
+ foobar crowbar etc
+ barrel
+ 2barrel
+ A barrel
+
+/^(\D*)(?=\d)(?!123)/
+ abc456
*** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
+ abc123
+
+/^1234(?# test newlines
+ inside)/
+ 1234
+
+/^1234 #comment in extended re
+ /x
+ 1234
+
+/#rhubarb
+ abcd/x
+ abcd
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
+/^abcd#rhubarb/x
+ abcd
+
+/(?!^)abc/
+ the abc
+ *** Failers
+ abc
+
+/(?=^)abc/
+ abc
+ *** Failers
+ the abc
+
+/^[ab]{1,3}(ab*|b)/
+ aabbbbb
+
+/^[ab]{1,3}?(ab*|b)/
+ aabbbbb
+
+/^[ab]{1,3}?(ab*?|b)/
+ aabbbbb
+
+/^[ab]{1,3}(ab*?|b)/
+ aabbbbb
+
+/ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # optional leading comment
+(?: (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # initial word
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) )* # further okay, if led by a period
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+# address
+| # or
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # one word, optionally followed by....
+(?:
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
+\(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) | # comments, or...
+
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+# quoted strings
+)*
+< (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # leading <
+(?: @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* , (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+)* # further okay, if led by comma
+: # closing colon
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* )? # optional route
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # initial word
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) )* # further okay, if led by a period
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+# address spec
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* > # trailing >
+# name and address
+) (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # optional trailing comment
+/x
+ Alan Other <user\@dom.ain>
+ <user\@dom.ain>
+ user\@dom.ain
+ \"A. Other\" <user.1234\@dom.ain> (a comment)
+ A. Other <user.1234\@dom.ain> (a comment)
+ \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
+ A missing angle <user\@some.where
+ *** Failers
+ The quick brown fox
+
+/[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional leading comment
+(?:
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# additional words
+)*
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+# address
+| # or
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+# leading word
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
+(?:
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+|
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+) # "special" comment or quoted string
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
+)*
+<
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# <
+(?:
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+(?: ,
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+)* # additional domains
+:
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)? # optional route
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# additional words
+)*
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+# address spec
+> # >
+# name and address
+)
+/x
+ Alan Other <user\@dom.ain>
+ <user\@dom.ain>
+ user\@dom.ain
+ \"A. Other\" <user.1234\@dom.ain> (a comment)
+ A. Other <user.1234\@dom.ain> (a comment)
+ \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
+ A missing angle <user\@some.where
+ *** Failers
+ The quick brown fox
+
+/abc\0def\00pqr\000xyz\0000AB/
+ abc\0def\00pqr\000xyz\0000AB
+ abc456 abc\0def\00pqr\000xyz\0000ABCDE
+
+/abc\x0def\x00pqr\x000xyz\x0000AB/
+ abc\x0def\x00pqr\x000xyz\x0000AB
+ abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
+
+/^[\000-\037]/
+ \0A
+ \01B
+ \037C
+
+/\0*/
+ \0\0\0\0
+
+/A\x0{2,3}Z/
+ The A\x0\x0Z
+ An A\0\x0\0Z
*** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
+ A\0Z
+ A\0\x0\0\x0Z
-/^[a\x{c0}]/8
+/^\s/
+ \040abc
+ \x0cabc
+ \nabc
+ \rabc
+ \tabc
*** Failers
- \x{100}
+ abc
-/(?<=aXb)cd/8
- aXbcd
+/^a b
+ c/x
+ abc
+
+/ab{1,3}bc/
+ abbbbc
+ abbbc
+ abbc
+ *** Failers
+ abc
+ abbbbbc
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
+/([^.]*)\.([^:]*):[T ]+(.*)/
+ track1.title:TBlah blah blah
+
+/([^.]*)\.([^:]*):[T ]+(.*)/i
+ track1.title:TBlah blah blah
+
+/([^.]*)\.([^:]*):[t ]+(.*)/i
+ track1.title:TBlah blah blah
+
+/^[W-c]+$/
+ WXY_^abc
+ *** Failers
+ wxy
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
+/^[W-c]+$/i
+ WXY_^abc
+ wxy_^ABC
+
+/^[\x3f-\x5F]+$/i
+ WXY_^abc
+ wxy_^ABC
+
+/^abc$/m
+ abc
+ qqq\nabc
+ abc\nzzz
+ qqq\nabc\nzzz
+
+/^abc$/
+ abc
+ *** Failers
+ qqq\nabc
+ abc\nzzz
+ qqq\nabc\nzzz
+
+/\Aabc\Z/m
+ abc
+ abc\n
+ *** Failers
+ qqq\nabc
+ abc\nzzz
+ qqq\nabc\nzzz
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- *** Failers
- \x{100}\x{100}b
+/\A(.)*\Z/s
+ abc\ndef
-/\x{ab}/8
- \x{ab}
- \xc2\xab
- *** Failers
- \x00{ab}
+/\A(.)*\Z/m
+ *** Failers
+ abc\ndef
+
+/(?:b)|(?::+)/
+ b::c
+ c::b
-/(?<=(.))X/8
- WXYZ
- \x{256}XYZ
+/[-az]+/
+ az-
*** Failers
- XYZ
+ b
-/[^a]+/8g
- bcd
- \x{100}aY\x{256}Z
+/[az-]+/
+ za-
+ *** Failers
+ b
+
+/[a\-z]+/
+ a-z
+ *** Failers
+ b
+
+/[a-z]+/
+ abcdxyz
+
+/[\d-]+/
+ 12-34
+ *** Failers
+ aaa
+
+/[\d-z]+/
+ 12-34z
+ *** Failers
+ aaa
+
+/\x5c/
+ \\
+
+/\x20Z/
+ the Zoo
+ *** Failers
+ Zulu
+
+/ab{3cd/
+ ab{3cd
+
+/ab{3,cd/
+ ab{3,cd
+
+/ab{3,4a}cd/
+ ab{3,4a}cd
+
+/{4,5a}bc/
+ {4,5a}bc
+
+/^a.b/<lf>
+ a\rb
+ *** Failers
+ a\nb
+
+/abc$/
+ abc
+ abc\n
+ *** Failers
+ abc\ndef
+
+/(abc)\123/
+ abc\x53
+
+/(abc)\223/
+ abc\x93
+
+/(abc)\323/
+ abc\xd3
+
+/(abc)\100/
+ abc\x40
+ abc\100
+
+/(abc)\1000/
+ abc\x400
+ abc\x40\x30
+ abc\1000
+ abc\100\x30
+ abc\100\060
+ abc\100\60
+
+/abc\81/
+ abc\081
+ abc\0\x38\x31
+
+/abc\91/
+ abc\091
+ abc\0\x39\x31
+
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
+ abcdefghijk\12S
+
+/ab\idef/
+ abidef
+
+/a{0}bc/
+ bc
+
+/(a|(bc)){0,0}?xyz/
+ xyz
+
+/abc[\10]de/
+ abc\010de
+
+/abc[\1]de/
+ abc\1de
+
+/(abc)[\1]de/
+ abc\1de
+
+/(?s)a.b/
+ a\nb
+
+/^([^a])([^\b])([^c]*)([^d]{3,4})/
+ baNOTccccd
+ baNOTcccd
+ baNOTccd
+ bacccd
+ *** Failers
+ anything
+ b\bc
+ baccd
+
+/[^a]/
+ Abc
+
+/[^a]/i
+ Abc
+
+/[^a]+/
+ AAAaAbc
+
+/[^a]+/i
+ AAAaAbc
+
+/[^a]+/
+ bbb\nccc
+
+/[^k]$/
+ abc
+ *** Failers
+ abk
+
+/[^k]{2,3}$/
+ abc
+ kbc
+ kabc
+ *** Failers
+ abk
+ akb
+ akk
+
+/^\d{8,}\@.+[^k]$/
+ 12345678\@a.b.c.d
+ 123456789\@x.y.z
+ *** Failers
+ 12345678\@x.y.uk
+ 1234567\@a.b.c.d
+
+/[^a]/
+ aaaabcd
+ aaAabcd
+
+/[^a]/i
+ aaaabcd
+ aaAabcd
+
+/[^az]/
+ aaaabcd
+ aaAabcd
+
+/[^az]/i
+ aaaabcd
+ aaAabcd
+
+/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
+ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
+
+/P[^*]TAIRE[^*]{1,6}?LL/
+ xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
+
+/P[^*]TAIRE[^*]{1,}?LL/
+ xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
+
+/(\.\d\d[1-9]?)\d+/
+ 1.230003938
+ 1.875000282
+ 1.235
+
+/(\.\d\d((?=0)|\d(?=\d)))/
+ 1.230003938
+ 1.875000282
+ *** Failers
+ 1.235
+
+/a(?)b/
+ ab
+
+/\b(foo)\s+(\w+)/i
+ Food is on the foo table
+
+/foo(.*)bar/
+ The food is under the bar in the barn.
-/^[^a]{2}/8
- \x{100}bc
+/foo(.*?)bar/
+ The food is under the bar in the barn.
+
+/(.*)(\d*)/
+ I have 2 numbers: 53147
+
+/(.*)(\d+)/
+ I have 2 numbers: 53147
-/^[^a]{2,}/8
- \x{100}bcAa
+/(.*?)(\d*)/
+ I have 2 numbers: 53147
+
+/(.*?)(\d+)/
+ I have 2 numbers: 53147
+
+/(.*)(\d+)$/
+ I have 2 numbers: 53147
-/^[^a]{2,}?/8
- \x{100}bca
+/(.*?)(\d+)$/
+ I have 2 numbers: 53147
-/[^a]+/8ig
+/(.*)\b(\d+)$/
+ I have 2 numbers: 53147
+
+/(.*\D)(\d+)$/
+ I have 2 numbers: 53147
+
+/^\D*(?!123)/
+ ABC123
+
+/^(\D*)(?=\d)(?!123)/
+ ABC445
+ *** Failers
+ ABC123
+
+/^[W-]46]/
+ W46]789
+ -46]789
+ *** Failers
+ Wall
+ Zebra
+ 42
+ [abcd]
+ ]abcd[
+
+/^[W-\]46]/
+ W46]789
+ Wall
+ Zebra
+ Xylophone
+ 42
+ [abcd]
+ ]abcd[
+ \\backslash
+ *** Failers
+ -46]789
+ well
+
+/\d\d\/\d\d\/\d\d\d\d/
+ 01/01/2000
+
+/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
+
+/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+
+/^(a){0,0}/
+ bcd
+ abc
+ aab
+
+/^(a){0,1}/
+ bcd
+ abc
+ aab
+
+/^(a){0,2}/
+ bcd
+ abc
+ aab
+
+/^(a){0,3}/
bcd
- \x{100}aY\x{256}Z
+ abc
+ aab
+ aaa
+
+/^(a){0,}/
+ bcd
+ abc
+ aab
+ aaa
+ aaaaaaaa
+
+/^(a){1,1}/
+ bcd
+ abc
+ aab
+
+/^(a){1,2}/
+ bcd
+ abc
+ aab
+
+/^(a){1,3}/
+ bcd
+ abc
+ aab
+ aaa
+
+/^(a){1,}/
+ bcd
+ abc
+ aab
+ aaa
+ aaaaaaaa
+
+/.*\.gif/
+ borfle\nbib.gif\nno
+
+/.{0,}\.gif/
+ borfle\nbib.gif\nno
+
+/.*\.gif/m
+ borfle\nbib.gif\nno
+
+/.*\.gif/s
+ borfle\nbib.gif\nno
+
+/.*\.gif/ms
+ borfle\nbib.gif\nno
-/^[^a]{2}/8i
- \x{100}bc
-
-/^[^a]{2,}/8i
- \x{100}bcAa
+/.*$/
+ borfle\nbib.gif\nno
+
+/.*$/m
+ borfle\nbib.gif\nno
-/^[^a]{2,}?/8i
- \x{100}bca
+/.*$/s
+ borfle\nbib.gif\nno
-/\x{100}{0,0}/8
+/.*$/ms
+ borfle\nbib.gif\nno
+
+/.*$/
+ borfle\nbib.gif\nno\n
+
+/.*$/m
+ borfle\nbib.gif\nno\n
+
+/.*$/s
+ borfle\nbib.gif\nno\n
+
+/.*$/ms
+ borfle\nbib.gif\nno\n
+
+/(.*X|^B)/
+ abcde\n1234Xyz
+ BarFoo
+ *** Failers
+ abcde\nBar
+
+/(.*X|^B)/m
+ abcde\n1234Xyz
+ BarFoo
+ abcde\nBar
+
+/(.*X|^B)/s
+ abcde\n1234Xyz
+ BarFoo
+ *** Failers
+ abcde\nBar
+
+/(.*X|^B)/ms
+ abcde\n1234Xyz
+ BarFoo
+ abcde\nBar
+
+/(?s)(.*X|^B)/
+ abcde\n1234Xyz
+ BarFoo
+ *** Failers
+ abcde\nBar
+
+/(?s:.*X|^B)/
+ abcde\n1234Xyz
+ BarFoo
+ *** Failers
+ abcde\nBar
+
+/^.*B/
+ **** Failers
+ abc\nB
+
+/(?s)^.*B/
+ abc\nB
+
+/(?m)^.*B/
+ abc\nB
+
+/(?ms)^.*B/
+ abc\nB
+
+/(?ms)^B/
+ abc\nB
+
+/(?s)B$/
+ B\n
+
+/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
+ 123456654321
+
+/^\d\d\d\d\d\d\d\d\d\d\d\d/
+ 123456654321
+
+/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
+ 123456654321
+
+/^[abc]{12}/
+ abcabcabcabc
+
+/^[a-c]{12}/
+ abcabcabcabc
+
+/^(a|b|c){12}/
+ abcabcabcabc
+
+/^[abcdefghijklmnopqrstuvwxy0123456789]/
+ n
+ *** Failers
+ z
+
+/abcde{0,0}/
abcd
+ *** Failers
+ abce
+
+/ab[cd]{0,0}e/
+ abe
+ *** Failers
+ abcde
+
+/ab(c){0,0}d/
+ abd
+ *** Failers
+ abcd
+
+/a(b*)/
+ a
+ ab
+ abbbb
+ *** Failers
+ bbbbb
+
+/ab\d{0}e/
+ abe
+ *** Failers
+ ab1e
+
+/"([^\\"]+|\\.)*"/
+ the \"quick\" brown fox
+ \"the \\\"quick\\\" brown fox\"
+
+/.*?/g+
+ abc
+
+/\b/g+
+ abc
+
+/\b/+g
+ abc
+
+//g
+ abc
+
+/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
+ <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
+
+/a[^a]b/
+ acb
+ a\nb
+
+/a.b/
+ acb
+ *** Failers
+ a\nb
+
+/a[^a]b/s
+ acb
+ a\nb
+
+/a.b/s
+ acb
+ a\nb
+
+/^(b+?|a){1,2}?c/
+ bac
+ bbac
+ bbbac
+ bbbbac
+ bbbbbac
+
+/^(b+|a){1,2}?c/
+ bac
+ bbac
+ bbbac
+ bbbbac
+ bbbbbac
+
+/(?!\A)x/m
+ x\nb\n
+ a\bx\n
+
+/\x0{ab}/
+ \0{ab}
+
+/(A|B)*?CD/
+ CD
+
+/(A|B)*CD/
+ CD
+
+/(?<!bar)foo/
+ foo
+ catfood
+ arfootle
+ rfoosh
+ *** Failers
+ barfoo
+ towbarfoo
+
+/\w{3}(?<!bar)foo/
+ catfood
+ *** Failers
+ foo
+ barfoo
+ towbarfoo
+
+/(?<=(foo)a)bar/
+ fooabar
+ *** Failers
+ bar
+ foobbar
+
+/\Aabc\z/m
+ abc
+ *** Failers
+ abc\n
+ qqq\nabc
+ abc\nzzz
+ qqq\nabc\nzzz
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+
+/(?>(\.\d\d[1-9]?))\d+/
+ 1.230003938
+ 1.875000282
+ *** Failers
+ 1.235
+
+/^((?>\w+)|(?>\s+))*$/
+ now is the time for all good men to come to the aid of the party
+ *** Failers
+ this is not a line with only words and spaces!
+
+/(\d+)(\w)/
+ 12345a
+ 12345+
+
+/((?>\d+))(\w)/
+ 12345a
+ *** Failers
+ 12345+
+
+/(?>a+)b/
+ aaab
+
+/((?>a+)b)/
+ aaab
+
+/(?>(a+))b/
+ aaab
+
+/(?>b)+/
+ aaabbbccc
+
+/(?>a+|b+|c+)*c/
+ aaabbbbccccd
+
+/(a+|b+|c+)*c/
+ aaabbbbccccd
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+
+/\(((?>[^()]+)|\([^()]+\))+\)/
+ (abc)
+ (abc(def)xyz)
+ *** Failers
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/a(?-i)b/i
+ ab
+ Ab
+ *** Failers
+ aB
+ AB
+
+/(a (?x)b c)d e/
+ a bcd e
+ *** Failers
+ a b cd e
+ abcd e
+ a bcde
-/\x{100}?/8
+/(a b(?x)c d (?-x)e f)/
+ a bcde f
+ *** Failers
+ abcdef
+
+/(a(?i)b)c/
+ abc
+ aBc
+ *** Failers
+ abC
+ aBC
+ Abc
+ ABc
+ ABC
+ AbC
+
+/a(?i:b)c/
+ abc
+ aBc
+ *** Failers
+ ABC
+ abC
+ aBC
+
+/a(?i:b)*c/
+ aBc
+ aBBc
+ *** Failers
+ aBC
+ aBBC
+
+/a(?=b(?i)c)\w\wd/
abcd
- \x{100}\x{100}
+ abCd
+ *** Failers
+ aBCd
+ abcD
+
+/(?s-i:more.*than).*million/i
+ more than million
+ more than MILLION
+ more \n than Million
+ *** Failers
+ MORE THAN MILLION
+ more \n than \n million
-/\x{100}{0,3}/8
- \x{100}\x{100}
- \x{100}\x{100}\x{100}\x{100}
+/(?:(?s-i)more.*than).*million/i
+ more than million
+ more than MILLION
+ more \n than Million
+ *** Failers
+ MORE THAN MILLION
+ more \n than \n million
+
+/(?>a(?i)b+)+c/
+ abc
+ aBbc
+ aBBc
+ *** Failers
+ Abc
+ abAb
+ abbC
-/\x{100}*/8
- abce
- \x{100}\x{100}\x{100}\x{100}
+/(?=a(?i)b)\w\wc/
+ abc
+ aBc
+ *** Failers
+ Ab
+ abC
+ aBC
+
+/(?<=a(?i)b)(\w\w)c/
+ abxxc
+ aBxxc
+ *** Failers
+ Abxxc
+ ABxxc
+ abxxC
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 12
+ *** Failers
+ 123
+ xyz
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 12
+ *** Failers
+ 123
+ xyz
+
+/(?(?<=foo)bar|cat)/
+ foobar
+ cat
+ fcat
+ focat
+ *** Failers
+ foocat
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
+/(?(?<!foo)cat|bar)/
+ foobar
+ cat
+ fcat
+ focat
+ *** Failers
+ foocat
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
+/(?>a*)*/
+ a
+ aa
+ aaaa
+
+/(abc|)+/
+ abc
+ abcabc
+ abcabcabc
+ xyz
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+/([a]*)*/
+ a
+ aaaaa
+
+/([ab]*)*/
+ a
+ b
+ ababab
+ aaaabcde
+ bbbb
+
+/([^a]*)*/
+ b
+ bbbb
+ aaa
+
+/([^ab]*)*/
+ cccc
+ abab
+
+/([a]*?)*/
+ a
+ aaaa
+
+/([ab]*?)*/
+ a
+ b
+ abab
+ baba
+
+/([^a]*?)*/
+ b
+ bbbb
+ aaa
+
+/([^ab]*?)*/
+ c
+ cccc
+ baba
+
+/(?>a*)*/
+ a
+ aaabcde
+
+/((?>a*))*/
+ aaaaa
+ aabbaa
+
+/((?>a*?))*/
+ aaaaa
+ aabbaa
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
+ 12-sep-98
+ 12-09-98
+ *** Failers
+ sep-12-98
+
+/(?i:saturday|sunday)/
+ saturday
+ sunday
+ Saturday
+ Sunday
+ SATURDAY
+ SUNDAY
+ SunDay
+
+/(a(?i)bc|BB)x/
+ abcx
+ aBCx
+ bbx
+ BBx
+ *** Failers
+ abcX
+ aBCX
+ bbX
+ BBX
-/(?<=a\x{100}{2}b)X/8
- Xyyya\x{100}\x{100}bXzzz
+/^([ab](?i)[cd]|[ef])/
+ ac
+ aC
+ bD
+ elephant
+ Europe
+ frog
+ France
+ *** Failers
+ Africa
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
+ ab
+ aBd
+ xy
+ xY
+ zebra
+ Zambesi
+ *** Failers
+ aCD
+ XY
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+/(?<=foo\n)^bar/m
+ foo\nbar
+ *** Failers
+ bar
+ baz\nbar
-/\D/8
- 1X2
- 1\x{100}2
-
-/>\S/8
- > >X Y
- > >\x{100} Y
-
-/\d/8
- \x{100}3
+/(?<=(?<!foo)bar)baz/
+ barbaz
+ barbarbaz
+ koobarbaz
+ *** Failers
+ baz
+ foobarbaz
+
+/The following tests are taken from the Perl 5.005 test suite; some of them/
+/are compatible with 5.004, but I'd rather not have to sort them out./
+
+/abc/
+ abc
+ xabcy
+ ababc
+ *** Failers
+ xbc
+ axc
+ abx
+
+/ab*c/
+ abc
+
+/ab*bc/
+ abc
+ abbc
+ abbbbc
+
+/.{1}/
+ abbbbc
+
+/.{3,4}/
+ abbbbc
+
+/ab{0,}bc/
+ abbbbc
+
+/ab+bc/
+ abbc
+ *** Failers
+ abc
+ abq
+
+/ab+bc/
+ abbbbc
+
+/ab{1,}bc/
+ abbbbc
+
+/ab{1,3}bc/
+ abbbbc
+
+/ab{3,4}bc/
+ abbbbc
+
+/ab{4,5}bc/
+ *** Failers
+ abq
+ abbbbc
+
+/ab?bc/
+ abbc
+ abc
+
+/ab{0,1}bc/
+ abc
+
+/ab?bc/
+
+/ab?c/
+ abc
+
+/ab{0,1}c/
+ abc
+
+/^abc$/
+ abc
+ *** Failers
+ abbbbc
+ abcc
+
+/^abc/
+ abcc
+
+/^abc$/
+
+/abc$/
+ aabc
+ *** Failers
+ aabc
+ aabcd
+
+/^/
+ abc
+
+/$/
+ abc
+
+/a.c/
+ abc
+ axc
+
+/a.*c/
+ axyzc
+
+/a[bc]d/
+ abd
+ *** Failers
+ axyzd
+ abc
+
+/a[b-d]e/
+ ace
+
+/a[b-d]/
+ aac
+
+/a[-b]/
+ a-
+
+/a[b-]/
+ a-
+
+/a]/
+ a]
+
+/a[]]b/
+ a]b
+
+/a[^bc]d/
+ aed
+ *** Failers
+ abd
+ abd
+
+/a[^-b]c/
+ adc
+
+/a[^]b]c/
+ adc
+ *** Failers
+ a-c
+ a]c
+
+/\ba\b/
+ a-
+ -a
+ -a-
+
+/\by\b/
+ *** Failers
+ xy
+ yz
+ xyz
+
+/\Ba\B/
+ *** Failers
+ a-
+ -a
+ -a-
+
+/\By\b/
+ xy
+
+/\by\B/
+ yz
+
+/\By\B/
+ xyz
+
+/\w/
+ a
+
+/\W/
+ -
+ *** Failers
+ -
+ a
+
+/a\sb/
+ a b
+
+/a\Sb/
+ a-b
+ *** Failers
+ a-b
+ a b
+
+/\d/
+ 1
+
+/\D/
+ -
+ *** Failers
+ -
+ 1
+
+/[\w]/
+ a
+
+/[\W]/
+ -
+ *** Failers
+ -
+ a
+
+/a[\s]b/
+ a b
+
+/a[\S]b/
+ a-b
+ *** Failers
+ a-b
+ a b
+
+/[\d]/
+ 1
+
+/[\D]/
+ -
+ *** Failers
+ -
+ 1
+
+/ab|cd/
+ abc
+ abcd
+
+/()ef/
+ def
+
+/$b/
+
+/a\(b/
+ a(b
+
+/a\(*b/
+ ab
+ a((b
+
+/a\\b/
+ a\b
+
+/((a))/
+ abc
+
+/(a)b(c)/
+ abc
+
+/a+b+c/
+ aabbabc
+
+/a{1,}b{1,}c/
+ aabbabc
+
+/a.+?c/
+ abcabc
+
+/(a+|b)*/
+ ab
+
+/(a+|b){0,}/
+ ab
+
+/(a+|b)+/
+ ab
+
+/(a+|b){1,}/
+ ab
+
+/(a+|b)?/
+ ab
+
+/(a+|b){0,1}/
+ ab
+
+/[^ab]*/
+ cde
+
+/abc/
+ *** Failers
+ b
-/\s/8
- \x{100} X
+
+/a*/
-/\D+/8
- 12abcd34
+
+/([abc])*d/
+ abbbcd
+
+/([abc])*bcd/
+ abcd
+
+/a|b|c|d|e/
+ e
+
+/(a|b|c|d|e)f/
+ ef
+
+/abcd*efg/
+ abcdefg
+
+/ab*/
+ xabyabbbz
+ xayabbbz
+
+/(ab|cd)e/
+ abcde
+
+/[abhgefdc]ij/
+ hij
+
+/^(ab|cd)e/
+
+/(abc|)ef/
+ abcdef
+
+/(a|b)c*d/
+ abcd
+
+/(ab|ab*)bc/
+ abc
+
+/a([bc]*)c*/
+ abc
+
+/a([bc]*)(c*d)/
+ abcd
+
+/a([bc]+)(c*d)/
+ abcd
+
+/a([bc]*)(c+d)/
+ abcd
+
+/a[bcd]*dcdcde/
+ adcdcde
+
+/a[bcd]+dcdcde/
*** Failers
- 1234
+ abcde
+ adcdcde
-/\D{2,3}/8
- 12abcd34
- 12ab34
- *** Failers
- 1234
- 12a34
+/(ab|a)b*c/
+ abc
-/\D{2,3}?/8
- 12abcd34
- 12ab34
- *** Failers
- 1234
- 12a34
+/((a)(b)c)(d)/
+ abcd
-/\d+/8
- 12abcd34
+/[a-zA-Z_][a-zA-Z0-9_]*/
+ alpha
+
+/^a(bc+|b[eh])g|.h$/
+ abh
+
+/(bc+d$|ef*g.|h?i(j|k))/
+ effgz
+ ij
+ reffgz
*** Failers
+ effg
+ bcdd
-/\d{2,3}/8
- 12abcd34
- 1234abcd
- *** Failers
- 1.4
+/((((((((((a))))))))))/
+ a
-/\d{2,3}?/8
- 12abcd34
- 1234abcd
- *** Failers
- 1.4
+/(((((((((a)))))))))/
+ a
-/\S+/8
- 12abcd34
+/multiple words of text/
*** Failers
- \ \
+ aa
+ uh-uh
+
+/multiple words/
+ multiple words, yeah
+
+/(.*)c(.*)/
+ abcde
+
+/\((.*), (.*)\)/
+ (a, b)
+
+/[k]/
+
+/abcd/
+ abcd
-/\S{2,3}/8
- 12abcd34
- 1234abcd
+/a(bc)d/
+ abcd
+
+/a[-]?c/
+ ac
+
+/abc/i
+ ABC
+ XABCY
+ ABABC
*** Failers
- \ \
+ aaxabxbaxbbx
+ XBC
+ AXC
+ ABX
+
+/ab*c/i
+ ABC
+
+/ab*bc/i
+ ABC
+ ABBC
-/\S{2,3}?/8
- 12abcd34
- 1234abcd
+/ab*?bc/i
+ ABBBBC
+
+/ab{0,}?bc/i
+ ABBBBC
+
+/ab+?bc/i
+ ABBC
+
+/ab+bc/i
*** Failers
- \ \
+ ABC
+ ABQ
+
+/ab{1,}bc/i
-/>\s+</8
- 12> <34
+/ab+bc/i
+ ABBBBC
+
+/ab{1,}?bc/i
+ ABBBBC
+
+/ab{1,3}?bc/i
+ ABBBBC
+
+/ab{3,4}?bc/i
+ ABBBBC
+
+/ab{4,5}?bc/i
*** Failers
+ ABQ
+ ABBBBC
+
+/ab??bc/i
+ ABBC
+ ABC
+
+/ab{0,1}?bc/i
+ ABC
+
+/ab??bc/i
+
+/ab??c/i
+ ABC
-/>\s{2,3}</8
- ab> <cd
- ab> <ce
+/ab{0,1}?c/i
+ ABC
+
+/^abc$/i
+ ABC
*** Failers
- ab> <cd
+ ABBBBC
+ ABCC
+
+/^abc/i
+ ABCC
+
+/^abc$/i
+
+/abc$/i
+ AABC
+
+/^/i
+ ABC
-/>\s{2,3}?</8
- ab> <cd
- ab> <ce
+/$/i
+ ABC
+
+/a.c/i
+ ABC
+ AXC
+
+/a.*?c/i
+ AXYZC
+
+/a.*c/i
*** Failers
- ab> <cd
+ AABC
+ AXYZD
+
+/a[bc]d/i
+ ABD
-/\w+/8
- 12 34
+/a[b-d]e/i
+ ACE
*** Failers
- +++=*!
+ ABC
+ ABD
-/\w{2,3}/8
- ab cd
- abcd ce
+/a[b-d]/i
+ AAC
+
+/a[-b]/i
+ A-
+
+/a[b-]/i
+ A-
+
+/a]/i
+ A]
+
+/a[]]b/i
+ A]B
+
+/a[^bc]d/i
+ AED
+
+/a[^-b]c/i
+ ADC
*** Failers
- a.b.c
+ ABD
+ A-C
+
+/a[^]b]c/i
+ ADC
+
+/ab|cd/i
+ ABC
+ ABCD
-/\w{2,3}?/8
- ab cd
- abcd ce
+/()ef/i
+ DEF
+
+/$b/i
*** Failers
- a.b.c
+ A]C
+ B
+
+/a\(b/i
+ A(B
+
+/a\(*b/i
+ AB
+ A((B
+
+/a\\b/i
+ A\B
+
+/((a))/i
+ ABC
+
+/(a)b(c)/i
+ ABC
+
+/a+b+c/i
+ AABBABC
+
+/a{1,}b{1,}c/i
+ AABBABC
+
+/a.+?c/i
+ ABCABC
+
+/a.*?c/i
+ ABCABC
+
+/a.{0,5}?c/i
+ ABCABC
+
+/(a+|b)*/i
+ AB
+
+/(a+|b){0,}/i
+ AB
+
+/(a+|b)+/i
+ AB
+
+/(a+|b){1,}/i
+ AB
+
+/(a+|b)?/i
+ AB
+
+/(a+|b){0,1}/i
+ AB
+
+/(a+|b){0,1}?/i
+ AB
+
+/[^ab]*/i
+ CDE
+
+/abc/i
+
+/a*/i
+
+
+/([abc])*d/i
+ ABBBCD
+
+/([abc])*bcd/i
+ ABCD
+
+/a|b|c|d|e/i
+ E
+
+/(a|b|c|d|e)f/i
+ EF
+
+/abcd*efg/i
+ ABCDEFG
+
+/ab*/i
+ XABYABBBZ
+ XAYABBBZ
+
+/(ab|cd)e/i
+ ABCDE
+
+/[abhgefdc]ij/i
+ HIJ
+
+/^(ab|cd)e/i
+ ABCDE
+
+/(abc|)ef/i
+ ABCDEF
+
+/(a|b)c*d/i
+ ABCD
-/\W+/8
- 12====34
+/(ab|ab*)bc/i
+ ABC
+
+/a([bc]*)c*/i
+ ABC
+
+/a([bc]*)(c*d)/i
+ ABCD
+
+/a([bc]+)(c*d)/i
+ ABCD
+
+/a([bc]*)(c+d)/i
+ ABCD
+
+/a[bcd]*dcdcde/i
+ ADCDCDE
+
+/a[bcd]+dcdcde/i
+
+/(ab|a)b*c/i
+ ABC
+
+/((a)(b)c)(d)/i
+ ABCD
+
+/[a-zA-Z_][a-zA-Z0-9_]*/i
+ ALPHA
+
+/^a(bc+|b[eh])g|.h$/i
+ ABH
+
+/(bc+d$|ef*g.|h?i(j|k))/i
+ EFFGZ
+ IJ
+ REFFGZ
*** Failers
- abcd
+ ADCDCDE
+ EFFG
+ BCDD
+
+/((((((((((a))))))))))/i
+ A
+
+/(((((((((a)))))))))/i
+ A
-/\W{2,3}/8
- ab====cd
- ab==cd
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
+ A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
+ C
+
+/multiple words of text/i
*** Failers
- a.b.c
+ AA
+ UH-UH
+
+/multiple words/i
+ MULTIPLE WORDS, YEAH
+
+/(.*)c(.*)/i
+ ABCDE
+
+/\((.*), (.*)\)/i
+ (A, B)
+
+/[k]/i
+
+/abcd/i
+ ABCD
+
+/a(bc)d/i
+ ABCD
+
+/a[-]?c/i
+ AC
+
+/a(?!b)./
+ abad
+
+/a(?=d)./
+ abad
+
+/a(?=c|d)./
+ abad
+
+/a(?:b|c|d)(.)/
+ ace
+
+/a(?:b|c|d)*(.)/
+ ace
+
+/a(?:b|c|d)+?(.)/
+ ace
+ acdbcdbe
+
+/a(?:b|c|d)+(.)/
+ acdbcdbe
+
+/a(?:b|c|d){2}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){4,5}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){4,5}?(.)/
+ acdbcdbe
+
+/((foo)|(bar))*/
+ foobar
+
+/a(?:b|c|d){6,7}(.)/
+ acdbcdbe
-/\W{2,3}?/8
- ab====cd
- ab==cd
+/a(?:b|c|d){6,7}?(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,6}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,6}?(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,7}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,7}?(.)/
+ acdbcdbe
+
+/a(?:b|(c|e){1,2}?|d)+?(.)/
+ ace
+
+/^(.+)?B/
+ AB
+
+/^([^a-z])|(\^)$/
+ .
+
+/^[<>]&/
+ <&OUT
+
+/(?:(f)(o)(o)|(b)(a)(r))*/
+ foobar
+
+/(?<=a)b/
+ ab
*** Failers
- a.b.c
+ cb
+ b
-/[\x{100}]/8
- \x{100}
- Z\x{100}
- \x{100}Z
- *** Failers
+/(?<!c)b/
+ ab
+ b
+ b
+
+/(?:..)*a/
+ aba
+
+/(?:..)*?a/
+ aba
+
+/^(){3,5}/
+ abc
+
+/^(a+)*ax/
+ aax
+
+/^((a|b)+)*ax/
+ aax
+
+/^((a|bc)+)*ax/
+ aax
+
+/(a|x)*ab/
+ cab
+
+/(a)*ab/
+ cab
+
+/(?:(?i)a)b/
+ ab
+
+/((?i)a)b/
+ ab
+
+/(?:(?i)a)b/
+ Ab
+
+/((?i)a)b/
+ Ab
+
+/(?:(?i)a)b/
+ *** Failers
+ cb
+ aB
+
+/((?i)a)b/
+
+/(?i:a)b/
+ ab
+
+/((?i:a))b/
+ ab
+
+/(?i:a)b/
+ Ab
+
+/((?i:a))b/
+ Ab
+
+/(?i:a)b/
+ *** Failers
+ aB
+ aB
+
+/((?i:a))b/
+
+/(?:(?-i)a)b/i
+ ab
+
+/((?-i)a)b/i
+ ab
+
+/(?:(?-i)a)b/i
+ aB
+
+/((?-i)a)b/i
+ aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+ aB
+ Ab
+
+/((?-i)a)b/i
+
+/(?:(?-i)a)b/i
+ aB
+
+/((?-i)a)b/i
+ aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+ Ab
+ AB
+
+/((?-i)a)b/i
+
+/(?-i:a)b/i
+ ab
+
+/((?-i:a))b/i
+ ab
+
+/(?-i:a)b/i
+ aB
+
+/((?-i:a))b/i
+ aB
+
+/(?-i:a)b/i
+ *** Failers
+ AB
+ Ab
+
+/((?-i:a))b/i
+
+/(?-i:a)b/i
+ aB
+
+/((?-i:a))b/i
+ aB
+
+/(?-i:a)b/i
+ *** Failers
+ Ab
+ AB
+
+/((?-i:a))b/i
+
+/((?-i:a.))b/i
+ *** Failers
+ AB
+ a\nB
+
+/((?s-i:a.))b/i
+ a\nB
+
+/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
+ cabbbb
+
+/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
+ caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+
+/foo\w*\d{4}baz/
+ foobar1234baz
+
+/x(~~)*(?:(?:F)?)?/
+ x~~
+
+/^a(?#xxx){3}c/
+ aaac
+
+/^a (?#xxx) (?#yyy) {3}c/x
+ aaac
+
+/(?<![cd])b/
+ *** Failers
+ B\nB
+ dbcb
+
+/(?<![cd])[ab]/
+ dbaacb
+
+/(?<!(c|d))b/
+
+/(?<!(c|d))[ab]/
+ dbaacb
+
+/(?<!cd)[ab]/
+ cdaccb
+
+/^(?:a?b?)*$/
+ *** Failers
+ dbcb
+ a--
+
+/((?s)^a(.))((?m)^b$)/
+ a\nb\nc\n
+
+/((?m)^b$)/
+ a\nb\nc\n
+
+/(?m)^b/
+ a\nb\n
+
+/(?m)^(b)/
+ a\nb\n
+
+/((?m)^b)/
+ a\nb\n
+
+/\n((?m)^b)/
+ a\nb\n
+
+/((?s).)c(?!.)/
+ a\nb\nc\n
+ a\nb\nc\n
+
+/((?s)b.)c(?!.)/
+ a\nb\nc\n
+ a\nb\nc\n
+
+/^b/
+
+/()^b/
+ *** Failers
+ a\nb\nc\n
+ a\nb\nc\n
+
+/((?m)^b)/
+ a\nb\nc\n
+
+/(?(?!a)a|b)/
+
+/(?(?!a)b|a)/
+ a
+
+/(?(?=a)b|a)/
+ *** Failers
+ a
+ a
-/[Z\x{100}]/8
- Z\x{100}
- \x{100}
- \x{100}Z
+/(?(?=a)a|b)/
+ a
+
+/(\w+:)+/
+ one:
+
+/$(?<=^(a))/
+ a
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ xy:z:::abcd
+
+/^[^bcd]*(c+)/
+ aexycd
+
+/(a*)b+/
+ caab
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ xy:z:::abcd
+ *** Failers
+ abcd:
+ abcd:
+
+/^[^bcd]*(c+)/
+ aexycd
+
+/(>a+)ab/
+
+/(?>a+)b/
+ aaab
+
+/([[:]+)/
+ a:[b]:
+
+/([[=]+)/
+ a=[b]=
+
+/([[.]+)/
+ a.[b].
+
+/((?>a+)b)/
+ aaab
+
+/(?>(a+))b/
+ aaab
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+
+/a\Z/
+ *** Failers
+ aaab
+ a\nb\n
+
+/b\Z/
+ a\nb\n
+
+/b\z/
+
+/b\Z/
+ a\nb
+
+/b\z/
+ a\nb
+ *** Failers
+
+/(?>.*)(?<=(abcd|wxyz))/
+ alphabetabcd
+ endingwxyz
+ *** Failers
+ a rather long string that doesn't end with one of them
+
+/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
+
+/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+
+/(?<=\d{3}(?!999))foo/
+ 999foo
+ 123999foo
+ *** Failers
+ 123abcfoo
+
+/(?<=(?!...999)\d{3})foo/
+ 999foo
+ 123999foo
+ *** Failers
+ 123abcfoo
+
+/(?<=\d{3}(?!999)...)foo/
+ 123abcfoo
+ 123456foo
+ *** Failers
+ 123999foo
+
+/(?<=\d{3}...)(?<!999)foo/
+ 123abcfoo
+ 123456foo
+ *** Failers
+ 123999foo
+
+/((Z)+|A)*/
+ ZABCDEFG
+
+/(Z()|A)*/
+ ZABCDEFG
+
+/(Z(())|A)*/
+ ZABCDEFG
+
+/((?>Z)+|A)*/
+ ZABCDEFG
+
+/((?>)+|A)*/
+ ZABCDEFG
+
+/a*/g
+ abbab
+
+/^[a-\d]/
+ abcde
+ -things
+ 0digit
+ *** Failers
+ bcdef
+
+/^[\d-a]/
+ abcde
+ -things
+ 0digit
+ *** Failers
+ bcdef
+
+/[[:space:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/[[:blank:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/[\s]+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/\s+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/a b/x
+ ab
+
+/(?!\A)x/m
+ a\nxb\n
+
+/(?!^)x/m
+ a\nxb\n
+
+/abc\Qabc\Eabc/
+ abcabcabc
+
+/abc\Q(*+|\Eabc/
+ abc(*+|abc
+
+/ abc\Q abc\Eabc/x
+ abc abcabc
+ *** Failers
+ abcabcabc
+
+/abc#comment
+ \Q#not comment
+ literal\E/x
+ abc#not comment\n literal
+
+/abc#comment
+ \Q#not comment
+ literal/x
+ abc#not comment\n literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment
+ /x
+ abc#not comment\n literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment/x
+ abc#not comment\n literal
+
+/\Qabc\$xyz\E/
+ abc\\\$xyz
+
+/\Qabc\E\$\Qxyz\E/
+ abc\$xyz
+
+/\Gabc/
+ abc
+ *** Failers
+ xyzabc
+
+/\Gabc./g
+ abc1abc2xyzabc3
+
+/abc./g
+ abc1abc2xyzabc3
+
+/a(?x: b c )d/
+ XabcdY
*** Failers
+ Xa b c d Y
+
+/((?x)x y z | a b c)/
+ XabcY
+ AxyzB
+
+/(?i)AB(?-i)C/
+ XabCY
+ *** Failers
+ XabcY
+
+/((?i)AB(?-i)C|D)E/
+ abCE
+ DE
+ *** Failers
+ abcE
+ abCe
+ dE
+ De
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- *** Failers
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- *** Failers
-
-/[z-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- abzcd
- ab|cd
- *** Failers
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- Q?
- *** Failers
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- Q?
- *** Failers
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{111}cd
- abzcd
- ab|cd
- Q?
- *** Failers
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- ab\x{200}cd
- ab\x{200}\x{100}\x{200}\x{100}cd
- *** Failers
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- abc\x{100}X
- *** Failers
- X
-
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- abc\x{100}X
- abQX
- *** Failers
- X
-
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- *** Failers
- abc\x{200}X
- X
-
-/[^\x{100}\x{200}]X/8
- AX
- \x{150}X
- \x{500}X
- *** Failers
- \x{100}X
- \x{200}X
-
-/[^Q\x{100}\x{200}]X/8
- AX
- \x{150}X
- \x{500}X
- *** Failers
- \x{100}X
- \x{200}X
- QX
-
-/[^\x{100}-\x{200}]X/8
- AX
- \x{500}X
- *** Failers
- \x{100}X
- \x{150}X
- \x{200}X
-
-/[z-\x{100}]/8i
+/[z\Qa-d]\E]/
z
- Z
- \x{100}
+ a
+ -
+ d
+ ]
*** Failers
- \x{102}
- y
+ b
-/[\xFF]/
- >\xff<
+/[\z\C]/
+ z
+ C
+
+/\M/
+ M
+
+/(a+)*b/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/(?i)reg(?:ul(?:[a]|ae)r|ex)/
+ REGular
+ regulaer
+ Regex
+ regulr
-/[\xff]/8
- >\x{ff}<
+/[--]+/
+
+
+
+
-/[^\xFF]/
- XYZ
+/(?<=Z)X./
+ \x84XAZXB
-/[^\xff]/8
- XYZ
- \x{123}
+/^(?(2)a|(1)(2))+$/
+ 123a
+
+/(?<=a|bbbb)c/
+ ac
+ bbbbc
+
+/abc/SS>testsavedregex
+<testsavedregex
+ abc
+ *** Failers
+ bca
+
+/abc/FSS>testsavedregex
+<testsavedregex
+ abc
+ *** Failers
+ bca
-/^[ac]*b/8
- xb
+/(a|b)/S>testsavedregex
+<testsavedregex
+ abc
+ *** Failers
+ def
+
+/(a|b)/SF>testsavedregex
+<testsavedregex
+ abc
+ *** Failers
+ def
+
+/line\nbreak/
+ this is a line\nbreak
+ line one\nthis is a line\nbreak in the second line
-/^[ac\x{100}]*b/8
- xb
+/line\nbreak/f
+ this is a line\nbreak
+ ** Failers
+ line one\nthis is a line\nbreak in the second line
-/^[^x]*b/8i
- xb
+/line\nbreak/mf
+ this is a line\nbreak
+ ** Failers
+ line one\nthis is a line\nbreak in the second line
-/^[^x]*b/8
- xb
-
-/^\d*b/8
- xb
+/1234/
+ 123\P
+ a4\P\R
+
+/1234/
+ 123\P
+ 4\P\R
+
+/^/mg
+ a\nb\nc\n
+ \
+
+/(?<=C\n)^/mg
+ A\nC\nC\n
+
+/(?s)A?B/
+ AB
+ aB
+
+/(?s)A*B/
+ AB
+ aB
+
+/(?m)A?B/
+ AB
+ aB
+
+/(?m)A*B/
+ AB
+ aB
-/(|a)/g8
- catac
- a\x{256}a
+/Content-Type\x3A[^\r\n]{6,}/
+ Content-Type:xxxxxyyy
-/^\x{85}$/8i
- \x{85}
+/Content-Type\x3A[^\r\n]{6,}z/
+ Content-Type:xxxxxyyyz
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+/Content-Type\x3A[^a]{6,}/
+ Content-Type:xxxyyy
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+/Content-Type\x3A[^a]{6,}z/
+ Content-Type:xxxyyyz
-/^a\Rb/8<bsr_unicode>
+/^abc/m
+ xyz\nabc
+ xyz\nabc\<lf>
+ xyz\r\nabc\<lf>
+ xyz\rabc\<cr>
+ xyz\r\nabc\<crlf>
+ ** Failers
+ xyz\nabc\<cr>
+ xyz\r\nabc\<cr>
+ xyz\nabc\<crlf>
+ xyz\rabc\<crlf>
+ xyz\rabc\<lf>
+
+/abc$/m<lf>
+ xyzabc
+ xyzabc\n
+ xyzabc\npqr
+ xyzabc\r\<cr>
+ xyzabc\rpqr\<cr>
+ xyzabc\r\n\<crlf>
+ xyzabc\r\npqr\<crlf>
+ ** Failers
+ xyzabc\r
+ xyzabc\rpqr
+ xyzabc\r\n
+ xyzabc\r\npqr
+
+/^abc/m<cr>
+ xyz\rabcdef
+ xyz\nabcdef\<lf>
+ ** Failers
+ xyz\nabcdef
+
+/^abc/m<lf>
+ xyz\nabcdef
+ xyz\rabcdef\<cr>
+ ** Failers
+ xyz\rabcdef
+
+/^abc/m<crlf>
+ xyz\r\nabcdef
+ xyz\rabcdef\<cr>
+ ** Failers
+ xyz\rabcdef
+
+/.*/<lf>
+ abc\ndef
+ abc\rdef
+ abc\r\ndef
+ \<cr>abc\ndef
+ \<cr>abc\rdef
+ \<cr>abc\r\ndef
+ \<crlf>abc\ndef
+ \<crlf>abc\rdef
+ \<crlf>abc\r\ndef
+
+/\w+(.)(.)?def/s
+ abc\ndef
+ abc\rdef
+ abc\r\ndef
+
+/^\w+=.*(\\\n.*)*/
+ abc=xyz\\\npqr
+
+/^(a()*)*/
+ aaaa
+
+/^(?:a(?:(?:))*)*/
+ aaaa
+
+/^(a()+)+/
+ aaaa
+
+/^(?:a(?:(?:))+)+/
+ aaaa
+
+/(a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/(?>a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/(?:a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/^a.b/<lf>
+ a\rb
+ a\nb\<cr>
+ ** Failers
+ a\nb
+ a\nb\<any>
+ a\rb\<cr>
+ a\rb\<any>
+
+/^abc./mgx<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
+
+/abc.$/mgx<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
+
+/^a\Rb/<bsr_unicode>
a\nb
a\rb
a\r\nb
a\x0bb
a\x0cb
- a\x{85}b
- a\x{2028}b
- a\x{2029}b
+ a\x85b
** Failers
a\n\rb
-/^a\R*b/8<bsr_unicode>
+/^a\R*b/<bsr_unicode>
ab
a\nb
a\rb
a\r\nb
a\x0bb
- a\x0c\x{2028}\x{2029}b
- a\x{85}b
+ a\x0cb
+ a\x85b
a\n\rb
- a\n\r\x{85}\x0cb
+ a\n\r\x85\x0cb
-/^a\R+b/8<bsr_unicode>
+/^a\R+b/<bsr_unicode>
a\nb
a\rb
a\r\nb
a\x0bb
- a\x0c\x{2028}\x{2029}b
- a\x{85}b
+ a\x0cb
+ a\x85b
a\n\rb
- a\n\r\x{85}\x0cb
+ a\n\r\x85\x0cb
** Failers
ab
-
-/^a\R{1,3}b/8<bsr_unicode>
+
+/^a\R{1,3}b/<bsr_unicode>
a\nb
a\n\rb
- a\n\r\x{85}b
+ a\n\r\x85b
a\r\n\r\nb
a\r\n\r\n\r\nb
a\n\r\n\rb
@@ -593,111 +4202,600 @@
a\n\n\n\rb
a\r
-/\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+/^a[\R]b/<bsr_unicode>
+ aRb
+ ** Failers
+ a\nb
+
+/.+foo/
+ afoo
+ ** Failers
+ \r\nfoo
+ \nfoo
-/\V?\v{3,4}/8
- \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+/.+foo/<crlf>
+ afoo
+ \nfoo
+ ** Failers
+ \r\nfoo
+
+/.+foo/<any>
+ afoo
+ ** Failers
+ \nfoo
+ \r\nfoo
-/\h+\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
+/.+foo/s
+ afoo
+ \r\nfoo
+ \nfoo
-/\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
+/^$/mg<any>
+ abc\r\rxyz
+ abc\n\rxyz
+ ** Failers
+ abc\r\nxyz
-/\H\h\V\v/8
+/^X/m
+ XABC
+ ** Failers
+ XABC\B
+
+/(?m)^$/<any>g+
+ abc\r\n\r\n
+
+/(?m)^$|^\r\n/<any>g+
+ abc\r\n\r\n
+
+/(?m)$/<any>g+
+ abc\r\n\r\n
+
+/(?|(abc)|(xyz))/
+ >abc<
+ >xyz<
+
+/(x)(?|(abc)|(xyz))(x)/
+ xabcx
+ xxyzx
+
+/(x)(?|(abc)(pqr)|(xyz))(x)/
+ xabcpqrx
+ xxyzx
+
+/(?|(abc)|(xyz))(?1)/
+ abcabc
+ xyzabc
+ ** Failers
+ xyzxyz
+
+/\H\h\V\v/
X X\x0a
X\x09X\x0b
** Failers
- \x{a0} X\x0a
+ \xa0 X\x0a
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- \x09\x20\x{a0}\x0a\x0b\x0c
+/\H*\h+\V?\v{3,4}/
+ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
+ \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
+ \x09\x20\xa0\x0a\x0b\x0c
** Failers
- \x09\x20\x{a0}\x0a\x0b
+ \x09\x20\xa0\x0a\x0b
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
+/\H{3,4}/
+ XY ABCDE
+ XY PQR ST
+
+/.\h{3,4}./
+ XY AB PQRS
+
+/\h*X\h?\H+Y\H?Z/
+ >XNNNYZ
+ > X NYQZ
** Failers
- \x{2009} X\x0a
+ >XYZ
+ > X NY Z
+
+/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
+ >XY\x0aZ\x0aA\x0bNN\x0c
+ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+
+/.+A/<crlf>
+ \r\nA
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- \x09\x20\x{202f}\x0a\x0b\x0c
- ** Failers
- \x09\x{200a}\x{a0}\x{2028}\x0b
-
-/a\Rb/I8<bsr_anycrlf>
+/\nA/<crlf>
+ \r\nA
+
+/[\r\n]A/<crlf>
+ \r\nA
+
+/(\r|\n)A/<crlf>
+ \r\nA
+
+/a\Rb/I<bsr_anycrlf>
a\rb
a\nb
a\r\nb
** Failers
- a\x{85}b
+ a\x85b
a\x0bb
-/a\Rb/I8<bsr_unicode>
+/a\Rb/I<bsr_unicode>
a\rb
a\nb
a\r\nb
- a\x{85}b
+ a\x85b
a\x0bb
** Failers
- a\x{85}b\<bsr_anycrlf>
+ a\x85b\<bsr_anycrlf>
a\x0bb\<bsr_anycrlf>
-/a\R?b/I8<bsr_anycrlf>
+/a\R?b/I<bsr_anycrlf>
a\rb
a\nb
a\r\nb
** Failers
- a\x{85}b
+ a\x85b
a\x0bb
-/a\R?b/I8<bsr_unicode>
+/a\R?b/I<bsr_unicode>
a\rb
a\nb
a\r\nb
- a\x{85}b
+ a\x85b
a\x0bb
** Failers
- a\x{85}b\<bsr_anycrlf>
+ a\x85b\<bsr_anycrlf>
a\x0bb\<bsr_anycrlf>
+
+/a\R{2,4}b/I<bsr_anycrlf>
+ a\r\n\nb
+ a\n\r\rb
+ a\r\n\r\n\r\n\r\nb
+ ** Failers
+ a\x85\85b
+ a\x0b\0bb
+
+/a\R{2,4}b/I<bsr_unicode>
+ a\r\rb
+ a\n\n\nb
+ a\r\n\n\r\rb
+ a\x85\85b
+ a\x0b\0bb
+ ** Failers
+ a\r\r\r\r\rb
+ a\x85\85b\<bsr_anycrlf>
+ a\x0b\0bb\<bsr_anycrlf>
+
+/a(?!)|\wbc/
+ abc
+
+/a[]b/<JS>
+ ** Failers
+ ab
+
+/a[]+b/<JS>
+ ** Failers
+ ab
+
+/a[]*+b/<JS>
+ ** Failers
+ ab
+
+/a[^]b/<JS>
+ aXb
+ a\nb
+ ** Failers
+ ab
+
+/a[^]+b/<JS>
+ aXb
+ a\nX\nXb
+ ** Failers
+ ab
+
+/X$/E
+ X
+ ** Failers
+ X\n
+
+/X$/
+ X
+ X\n
+
+/xyz/C
+ xyz
+ abcxyz
+ abcxyz\Y
+ ** Failers
+ abc
+ abc\Y
+ abcxypqr
+ abcxypqr\Y
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+
+/(?C)ab/
+ ab
+ \C-ab
+
+/ab/C
+ ab
+ \C-ab
+
+/^"((?(?=[a])[^"])|b)*"$/C
+ "ab"
+ \C-"ab"
+
+/\d+X|9+Y/
+ ++++123999\P
+ ++++123999Y\P
+
+/Z(*F)/
+ Z\P
+ ZA\P
+
+/Z(?!)/
+ Z\P
+ ZA\P
+
+/dog(sbody)?/
+ dogs\P
+ dogs\P\P
+
+/dog(sbody)??/
+ dogs\P
+ dogs\P\P
+
+/dog|dogsbody/
+ dogs\P
+ dogs\P\P
-/X/8f<any>
- A\x{1ec5}ABCXYZ
+/dogsbody|dog/
+ dogs\P
+ dogs\P\P
-/abcd*/8
+/Z(*F)Q|ZXY/
+ Z\P
+ ZA\P
+ X\P
+
+/\bthe cat\b/
+ the cat\P
+ the cat\P\P
+
+/dog(sbody)?/
+ dogs\D\P
+ body\D\R
+
+/dog(sbody)?/
+ dogs\D\P\P
+ body\D\R
+
+/abc/
+ abc\P
+ abc\P\P
+
+/abc\K123/
+ xyzabc123pqr
+
+/(?<=abc)123/
+ xyzabc123pqr
+ xyzabc12\P
+ xyzabc12\P\P
+
+/\babc\b/
+ +++abc+++
+ +++ab\P
+ +++ab\P\P
+
+/(?=C)/g+
+ ABCDECBA
+
+/(abc|def|xyz)/I
+ terhjk;abcdaadsfe
+ the quick xyz brown fox
+ \Yterhjk;abcdaadsfe
+ \Ythe quick xyz brown fox
+ ** Failers
+ thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+ \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+
+/(abc|def|xyz)/SI
+ terhjk;abcdaadsfe
+ the quick xyz brown fox
+ \Yterhjk;abcdaadsfe
+ \Ythe quick xyz brown fox
+ ** Failers
+ thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+ \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+
+/abcd*/+
xxxxabcd\P
xxxxabcd\P\P
+ dddxxx\R
+ xxxxabcd\P\P
+ xxx\R
-/abcd*/i8
+/abcd*/i
xxxxabcd\P
xxxxabcd\P\P
XXXXABCD\P
XXXXABCD\P\P
-/abc\d*/8
+/abc\d*/
xxxxabc1\P
xxxxabc1\P\P
-/abc[de]*/8
+/abc[de]*/
xxxxabcde\P
xxxxabcde\P\P
-/\bthe cat\b/8
- the cat\P
- the cat\P\P
+/(?:(?1)|B)(A(*F)|C)/
+ ABCD
+ CCD
+ ** Failers
+ CAD
+
+/^(?:(?1)|B)(A(*F)|C)/
+ CCD
+ BCD
+ ** Failers
+ ABCD
+ CAD
+ BAD
+
+/^(?!a(*SKIP)b)/
+ ac
+
+/^(?=a(*SKIP)b|ac)/
+ ** Failers
+ ac
+
+/^(?=a(*THEN)b|ac)/
+ ac
+
+/^(?=a(*PRUNE)b)/
+ ab
+ ** Failers
+ ac
+
+/^(?(?!a(*SKIP)b))/
+ ac
+
+/(?<=abc)def/
+ abc\P\P
+
+/abc$/
+ abc
+ abc\P
+ abc\P\P
+
+/abc$/m
+ abc
+ abc\n
+ abc\P\P
+ abc\n\P\P
+ abc\P
+ abc\n\P
+
+/abc\z/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\Z/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\b/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\B/
+ abc
+ abc\P
+ abc\P\P
+
+/.+/
+ abc\>0
+ abc\>1
+ abc\>2
+ abc\>3
+ abc\>4
+ abc\>-4
+
+/^(?:a)++\w/
+ aaaab
+ ** Failers
+ aaaa
+ bbb
+
+/^(?:aa|(?:a)++\w)/
+ aaaab
+ aaaa
+ ** Failers
+ bbb
+
+/^(?:a)*+\w/
+ aaaab
+ bbb
+ ** Failers
+ aaaa
+
+/^(a)++\w/
+ aaaab
+ ** Failers
+ aaaa
+ bbb
+
+/^(a|)++\w/
+ aaaab
+ ** Failers
+ aaaa
+ bbb
+
+/(?=abc){3}abc/+
+ abcabcabc
+ ** Failers
+ xyz
+
+/(?=abc)+abc/+
+ abcabcabc
+ ** Failers
+ xyz
+
+/(?=abc)++abc/+
+ abcabcabc
+ ** Failers
+ xyz
+
+/(?=abc){0}xyz/
+ xyz
+
+/(?=abc){1}xyz/
+ ** Failers
+ xyz
+
+/(?=(a))?./
+ ab
+ bc
+
+/(?=(a))??./
+ ab
+ bc
+
+/^(?=(a)){0}b(?1)/
+ backgammon
+
+/^(?=(?1))?[az]([abc])d/
+ abd
+ zcdxx
+
+/^(?!a){0}\w+/
+ aaaaa
+
+/(?<=(abc))?xyz/
+ abcxyz
+ pqrxyz
+
+/((?2))((?1))/
+ abc
+
+/(?(R)a+|(?R)b)/
+ aaaabcde
+
+/(?(R)a+|((?R))b)/
+ aaaabcde
+
+/((?(R)a+|(?1)b))/
+ aaaabcde
+
+/((?(R2)a+|(?1)b))/
+ aaaabcde
+
+/(?(R)a*(?1)|((?R))b)/
+ aaaabcde
+
+/(a+)/
+ \O6aaaa
+ \O8aaaa
+
+/ab\Cde/
+ abXde
+
+/(?<=ab\Cde)X/
+ abZdeX
+
+/^\R/
+ \r\P
+ \r\P\P
+
+/^\R{2,3}x/
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+ \r\rx
+ \r\r\rx
+
+/^\R{2,3}?x/
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+ \r\rx
+ \r\r\rx
+
+/^\R?x/
+ \r\P
+ \r\P\P
+ x
+ \rx
+
+/^\R+x/
+ \r\P
+ \r\P\P
+ \r\n\P
+ \r\n\P\P
+ \rx
+
+/^a$/<CRLF>
+ a\r\P
+ a\r\P\P
+
+/^a$/m<CRLF>
+ a\r\P
+ a\r\P\P
+
+/^(a$|a\r)/<CRLF>
+ a\r\P
+ a\r\P\P
+
+/^(a$|a\r)/m<CRLF>
+ a\r\P
+ a\r\P\P
+
+/./<CRLF>
+ \r\P
+ \r\P\P
+
+/.{2,3}/<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/.{2,3}?/<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/-- Test simple validity check for restarts --/
+
+/abcdef/
+ abc\R
+
+/<H((?(?!<H|F>)(.)|(?R))++)*F>/
+ text <H more text <H texting more hexA0-"\xA0" hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text.
+
+/^(?>.{4})abc|^\w\w.xabcd/
+ xxxxabcd
+ xx\xa0xabcd
-/a+/8
- a\x{123}aa\>1
- a\x{123}aa\>2
- a\x{123}aa\>3
- a\x{123}aa\>4
- a\x{123}aa\>5
- a\x{123}aa\>6
+/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
+ xxxxxxxxabcd
+ xx\xa0xxxxxabcd
-/-- End of testinput8 --/
+/-- End of testinput8 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput9 b/ext/pcre/pcrelib/testdata/testinput9
index 8d312e028..766c9c0fb 100644
--- a/ext/pcre/pcrelib/testdata/testinput9
+++ b/ext/pcre/pcrelib/testdata/testinput9
@@ -1,989 +1,717 @@
-/-- This set of tests check Unicode property support with the DFA matching
- functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest
- when running it. --/
+/-- This set of tests checks UTF-8 support with the DFA matching functionality
+ of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
+ it. --/
-/\pL\P{Nd}/8
- AB
- *** Failers
- A0
- 00
-
-/\X./8
- AB
- A\x{300}BC
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
-
-/\X\X/8
- ABC
- A\x{300}B\x{300}\x{301}C
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
-
-/^\pL+/8
- abcd
- a
+/\x{100}ab/8
+ \x{100}ab
+
+/a\x{100}*b/8
+ ab
+ a\x{100}b
+ a\x{100}\x{100}b
+
+/a\x{100}+b/8
+ a\x{100}b
+ a\x{100}\x{100}b
*** Failers
-
-/^\PL+/8
- 1234
- =
+ ab
+
+/\bX/8
+ Xoanon
+ +Xoanon
+ \x{300}Xoanon
*** Failers
- abcd
-
-/^\X+/8
- abcdA\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- a
+ YXoanon
+
+/\BX/8
+ YXoanon
+ *** Failers
+ Xoanon
+ +Xoanon
+ \x{300}Xoanon
+
+/X\b/8
+ X+oanon
+ ZX\x{300}oanon
+ FAX
*** Failers
- \x{300}\x{301}\x{302}
-
-/\X?abc/8
- abc
- A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- \x{300}abc
+ Xoanon
+
+/X\B/8
+ Xoanon
*** Failers
+ X+oanon
+ ZX\x{300}oanon
+ FAX
+
+/[^a]/8
+ abcd
+ a\x{100}
-/^\X?abc/8
- abc
- A\x{300}abc
+/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
+ ab99
+ \x{123}\x{123}45
+ \x{400}\x{401}\x{402}6
*** Failers
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- \x{300}abc
-
-/\X*abc/8
- abc
- A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- \x{300}abc
+ d99
+ \x{123}\x{122}4
+ \x{400}\x{403}6
+ \x{400}\x{401}\x{402}\x{402}6
+
+/a.b/8
+ acb
+ a\x7fb
+ a\x{100}b
*** Failers
+ a\nb
-/^\X*abc/8
- abc
- A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+/a(.{3})b/8
+ a\x{4000}xyb
+ a\x{4000}\x7fyb
+ a\x{4000}\x{100}yb
*** Failers
- \x{300}abc
+ a\x{4000}b
+ ac\ncb
-/^\pL?=./8
- A=b
- =c
- *** Failers
- 1=2
- AAAA=b
+/a(.*?)(.)/
+ a\xc0\x88b
-/^\pL*=./8
- AAAA=b
- =c
- *** Failers
- 1=2
+/a(.*?)(.)/8
+ a\x{100}b
-/^\X{2,3}X/8
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- *** Failers
- X
- A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+/a(.*)(.)/
+ a\xc0\x88b
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- ** Failers
- ap\x{300}9!\$ <
-
-/^\PC/8
- X
- ** Failers
- \x7f
-
-/^\PL/8
- 9
- ** Failers
- \x{c0}
-
-/^\PM/8
- X
- ** Failers
- \x{30f}
-
-/^\PN/8
- X
- ** Failers
- \x{660}
-
-/^\PP/8
- X
- ** Failers
- \x{66c}
-
-/^\PS/8
- X
- ** Failers
- \x{f01}
-
-/^\PZ/8
- X
- ** Failers
- \x{1680}
-
-/^\p{Cc}/8
- \x{017}
- \x{09f}
- ** Failers
- \x{0600}
-
-/^\p{Cf}/8
- \x{601}
- ** Failers
- \x{09f}
-
-/^\p{Cn}/8
- ** Failers
- \x{09f}
-
-/^\p{Co}/8
- \x{f8ff}
- ** Failers
- \x{09f}
-
-/^\p{Cs}/8
- \?\x{dfff}
- ** Failers
- \x{09f}
-
-/^\p{Ll}/8
- a
- ** Failers
- Z
- \x{e000}
-
-/^\p{Lm}/8
- \x{2b0}
- ** Failers
- a
-
-/^\p{Lo}/8
- \x{1bb}
- ** Failers
- a
- \x{2b0}
-
-/^\p{Lt}/8
- \x{1c5}
- ** Failers
- a
- \x{2b0}
-
-/^\p{Lu}/8
- A
- ** Failers
- \x{2b0}
-
-/^\p{Mc}/8
- \x{903}
- ** Failers
- X
- \x{300}
-
-/^\p{Me}/8
- \x{488}
- ** Failers
- X
- \x{903}
- \x{300}
-
-/^\p{Mn}/8
- \x{300}
- ** Failers
- X
- \x{903}
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- ** Failers
- X
-
-/^\p{Nl}/8
- \x{16ee}
- ** Failers
- X
- \x{966}
-
-/^\p{No}/8
- \x{b2}
- \x{b3}
- ** Failers
- X
- \x{16ee}
-
-/^\p{Pc}/8
- \x5f
- \x{203f}
- ** Failers
- X
- -
- \x{58a}
-
-/^\p{Pd}/8
- -
- \x{58a}
- ** Failers
- X
- \x{203f}
-
-/^\p{Pe}/8
- )
- ]
- }
- \x{f3b}
- ** Failers
- X
- \x{203f}
- (
- [
- {
- \x{f3c}
-
-/^\p{Pf}/8
- \x{bb}
- \x{2019}
- ** Failers
- X
- \x{203f}
-
-/^\p{Pi}/8
- \x{ab}
- \x{2018}
- ** Failers
- X
- \x{203f}
-
-/^\p{Po}/8
- !
- \x{37e}
- ** Failers
- X
- \x{203f}
-
-/^\p{Ps}/8
- (
- [
- {
- \x{f3c}
- ** Failers
- X
- )
- ]
- }
- \x{f3b}
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- \x{9f2}
- ** Failers
- X
- \x{2c2}
-
-/^\p{Sk}/8
- \x{2c2}
- ** Failers
- X
- \x{9f2}
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- ** Failers
- X
- \x{9f2}
-
-/^\p{So}/8
- \x{a6}
- \x{482}
- ** Failers
- X
- \x{9f2}
-
-/^\p{Zl}/8
- \x{2028}
- ** Failers
- X
- \x{2029}
-
-/^\p{Zp}/8
- \x{2029}
- ** Failers
- X
- \x{2028}
-
-/^\p{Zs}/8
- \ \
- \x{a0}
- \x{1680}
- \x{180e}
- \x{2000}
- \x{2001}
- ** Failers
- \x{2028}
- \x{200d}
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- \x{660}\x{661}\x{662}ABC
-
-/\p{Lu}/8i
- A
- a\x{10a0}B
- ** Failers
- a
- \x{1d00}
+/a(.*)(.)/8
+ a\x{100}b
-/\p{^Lu}/8i
- 1234
- ** Failers
- ABC
-
-/\P{Lu}/8i
- 1234
- ** Failers
- ABC
+/a(.)(.)/
+ a\xc0\x92bcd
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 123A5XYZPQR
- ABA\x{660}XYZpqr
- ** Failers
- AXYZ
- XYZ
-
-/(?<!\pL)XYZ/8
- 1XYZ
- AB=XYZ..
- XYZ
- ** Failers
- WXYZ
+/a(.)(.)/8
+ a\x{240}bcd
-/[\p{Nd}]/8
- 1234
+/a(.?)(.)/
+ a\xc0\x92bcd
-/[\p{Nd}+-]+/8
- 1234
- 12-34
- 12+\x{661}-34
- ** Failers
- abcd
+/a(.?)(.)/8
+ a\x{240}bcd
-/[\P{Nd}]+/8
- abcd
- ** Failers
- 1234
+/a(.??)(.)/
+ a\xc0\x92bcd
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+/a(.??)(.)/8
+ a\x{240}bcd
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+/a(.{3})b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ *** Failers
+ a\x{1234}b
+ ac\ncb
+
+/a(.{3,})b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
+ a\x{1234}b
+
+/a(.{3,}?)b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
+ a\x{1234}b
+
+/a(.{3,5})b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ axxxxxbcdefghijb
+ *** Failers
+ a\x{1234}b
+ axxxxxxbcdefghijb
+
+/a(.{3,5}?)b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ axxxxxbcdefghijb
+ *** Failers
+ a\x{1234}b
+ axxxxxxbcdefghijb
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+/^[a\x{c0}]/8
+ *** Failers
+ \x{100}
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+/(?<=aXb)cd/8
+ aXbcd
-/\pL/8
- a
- A
+/(?<=a\x{100}b)cd/8
+ a\x{100}bcd
-/\pL/8i
- a
- A
+/(?<=a\x{100000}b)cd/8
+ a\x{100000}bcd
-/\p{Lu}/8
- A
- aZ
- ** Failers
- abc
-
-/\p{Lu}/8i
- A
- aZ
- ** Failers
- abc
+/(?:\x{100}){3}b/8
+ \x{100}\x{100}\x{100}b
+ *** Failers
+ \x{100}\x{100}b
-/\p{Ll}/8
- a
- Az
- ** Failers
- ABC
+/\x{ab}/8
+ \x{ab}
+ \xc2\xab
+ *** Failers
+ \x00{ab}
-/\p{Ll}/8i
- a
- Az
- ** Failers
- ABC
+/(?<=(.))X/8
+ WXYZ
+ \x{256}XYZ
+ *** Failers
+ XYZ
-/^\x{c0}$/8i
- \x{c0}
- \x{e0}
+/[^a]+/8g
+ bcd
+ \x{100}aY\x{256}Z
+
+/^[^a]{2}/8
+ \x{100}bc
+
+/^[^a]{2,}/8
+ \x{100}bcAa
-/^\x{e0}$/8i
- \x{c0}
- \x{e0}
+/^[^a]{2,}?/8
+ \x{100}bca
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- \x{ff3a}
- \x{3b1}
- \x{ff5a}
+/[^a]+/8ig
+ bcd
+ \x{100}aY\x{256}Z
-/[\x{c0}\x{391}]/8i
- \x{c0}
- \x{e0}
-
-/[\x{105}-\x{109}]/8i
- \x{104}
- \x{105}
- \x{109}
- ** Failers
- \x{100}
- \x{10a}
-
-/[z-\x{100}]/8i
- Z
- z
- \x{39c}
- \x{178}
- |
- \x{80}
- \x{ff}
- \x{100}
- \x{101}
- ** Failers
- \x{102}
- Y
- y
+/^[^a]{2}/8i
+ \x{100}bc
+
+/^[^a]{2,}/8i
+ \x{100}bcAa
-/[z-\x{100}]/8i
+/^[^a]{2,}?/8i
+ \x{100}bca
-/^\X/8
- A
- A\x{300}BC
- A\x{300}\x{301}\x{302}BC
- *** Failers
- \x{300}
+/\x{100}{0,0}/8
+ abcd
+
+/\x{100}?/8
+ abcd
+ \x{100}\x{100}
-/^[\X]/8
- X123
- *** Failers
- AXYZ
+/\x{100}{0,3}/8
+ \x{100}\x{100}
+ \x{100}\x{100}\x{100}\x{100}
+
+/\x{100}*/8
+ abce
+ \x{100}\x{100}\x{100}\x{100}
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+/\x{100}{1,1}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+/\x{100}{1,3}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+/\x{100}+/8
+ abcd\x{100}\x{100}\x{100}\x{100}
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+/\x{100}{3}/8
+ abcd\x{100}\x{100}\x{100}XX
-/^\X(.)/8
- *** Failers
- A\x{300}\x{301}\x{302}
+/\x{100}{3,5}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
-
-/^\pN{2,3}X/
- 12X
- 123X
- *** Failers
- X
- 1X
- 1234X
-
-/\x{100}/i8
- \x{100}
- \x{101}
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- ** Failers
- \x{2e7f}
+/\x{100}{3,}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
-/^\P{Katakana}+/8
- \x{3105}
- ** Failers
- \x{30ff}
+/(?<=a\x{100}{2}b)X/8
+ Xyyya\x{100}\x{100}bXzzz
-/^[\p{Arabic}]/8
- \x{06e9}
- \x{060b}
- ** Failers
- X\x{06e9}
+/\D*/8
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/^[\P{Yi}]/8
- \x{2f800}
- ** Failers
- \x{a014}
- \x{a4c6}
+/\D*/8
+ \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-/^\p{Any}X/8
- AXYZ
- \x{1234}XYZ
- ** Failers
- X
+/\D/8
+ 1X2
+ 1\x{100}2
+
+/>\S/8
+ > >X Y
+ > >\x{100} Y
+
+/\d/8
+ \x{100}3
-/^\P{Any}X/8
- ** Failers
- AX
+/\s/8
+ \x{100} X
-/^\p{Any}?X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- ** Failers
- ABXYZ
+/\D+/8
+ 12abcd34
+ *** Failers
+ 1234
-/^\P{Any}?X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- ABXYZ
-
-/^\p{Any}+X/8
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
- XYZ
+/\D{2,3}/8
+ 12abcd34
+ 12ab34
+ *** Failers
+ 1234
+ 12a34
-/^\P{Any}+X/8
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- XYZ
+/\D{2,3}?/8
+ 12abcd34
+ 12ab34
+ *** Failers
+ 1234
+ 12a34
-/^\p{Any}*X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
+/\d+/8
+ 12abcd34
+ *** Failers
-/^\P{Any}*X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
+/\d{2,3}/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ 1.4
-/^[\p{Any}]X/8
- AXYZ
- \x{1234}XYZ
- ** Failers
- X
-
-/^[\P{Any}]X/8
- ** Failers
- AX
-
-/^[\p{Any}]?X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- ** Failers
- ABXYZ
+/\d{2,3}?/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ 1.4
-/^[\P{Any}]?X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- ABXYZ
-
-/^[\p{Any}]+X/8
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
- XYZ
+/\S+/8
+ 12abcd34
+ *** Failers
+ \ \
-/^[\P{Any}]+X/8
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- XYZ
+/\S{2,3}/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ \ \
-/^[\p{Any}]*X/8
- XYZ
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
- ** Failers
+/\S{2,3}?/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ \ \
-/^[\P{Any}]*X/8
- XYZ
- ** Failers
- AXYZ
- \x{1234}XYZ
- A\x{1234}XYZ
+/>\s+</8
+ 12> <34
+ *** Failers
-/^\p{Any}{3,5}?/8
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
+/>\s{2,3}</8
+ ab> <cd
+ ab> <ce
+ *** Failers
+ ab> <cd
-/^\p{Any}{3,5}/8
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
+/>\s{2,3}?</8
+ ab> <cd
+ ab> <ce
+ *** Failers
+ ab> <cd
-/^\P{Any}{3,5}?/8
- ** Failers
- abcdefgh
- \x{1234}\n\r\x{3456}xyz
-
-/^\p{L&}X/8
- AXY
- aXY
- \x{1c5}XY
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]X/8
- AXY
- aXY
- \x{1c5}XY
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\p{L&}+X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]+X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\p{L&}+?X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^[\p{L&}]+?X/8
- AXY
- aXY
- AbcdeXyz
- \x{1c5}AbXY
- abcDEXypqreXlmn
- ** Failers
- \x{1bb}XY
- \x{2b0}XY
- !XY
-
-/^\P{L&}X/8
- !XY
- \x{1bb}XY
- \x{2b0}XY
- ** Failers
- \x{1c5}XY
- AXY
-
-/^[\P{L&}]X/8
- !XY
- \x{1bb}XY
- \x{2b0}XY
- ** Failers
- \x{1c5}XY
- AXY
-
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
-
-/\x{c0}+\x{116}+/8i
- \x{c0}\x{e0}\x{116}\x{117}
+/\w+/8
+ 12 34
+ *** Failers
+ +++=*!
-/[\x{c0}\x{116}]+/8i
- \x{c0}\x{e0}\x{116}\x{117}
+/\w{2,3}/8
+ ab cd
+ abcd ce
+ *** Failers
+ a.b.c
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 123abc\xc4\xc5zz
+/\w{2,3}?/8
+ ab cd
+ abcd ce
+ *** Failers
+ a.b.c
-/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
- \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
+/\W+/8
+ 12====34
+ *** Failers
+ abcd
-/\x{a77d}\x{1d79}/8i
- \x{a77d}\x{1d79}
- \x{1d79}\x{a77d}
+/\W{2,3}/8
+ ab====cd
+ ab==cd
+ *** Failers
+ a.b.c
-/\x{a77d}\x{1d79}/8
- \x{a77d}\x{1d79}
- ** Failers
- \x{1d79}\x{a77d}
+/\W{2,3}?/8
+ ab====cd
+ ab==cd
+ *** Failers
+ a.b.c
-/^\p{Xan}/8
- ABCD
- 1234
- \x{6ca}
- \x{a6c}
- \x{10a7}
- ** Failers
- _ABC
+/[\x{100}]/8
+ \x{100}
+ Z\x{100}
+ \x{100}Z
+ *** Failers
-/^\p{Xan}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- ** Failers
- _ABC
+/[Z\x{100}]/8
+ Z\x{100}
+ \x{100}
+ \x{100}Z
+ *** Failers
-/^\p{Xan}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xan}{2,9}/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^[\p{Xan}]/8
- ABCD1234_
- 1234abcd_
- \x{6ca}
- \x{a6c}
- \x{10a7}
- ** Failers
- _ABC
-
-/^[\p{Xan}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- ** Failers
- _ABC
+/[\x{100}\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ *** Failers
+
+/[\x{100}-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ *** Failers
+
+/[z-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ abzcd
+ ab|cd
+ *** Failers
+
+/[Q\x{100}\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ Q?
+ *** Failers
+
+/[Q\x{100}-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ Q?
+ *** Failers
+
+/[Qz-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ abzcd
+ ab|cd
+ Q?
+ *** Failers
+
+/[\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/[\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/[Q\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/[Q\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/(?<=[\x{100}\x{200}])X/8
+ abc\x{200}X
+ abc\x{100}X
+ *** Failers
+ X
-/^>\p{Xsp}/8
- >\x{1680}\x{2028}\x{0b}
- ** Failers
- \x{0b}
+/(?<=[Q\x{100}\x{200}])X/8
+ abc\x{200}X
+ abc\x{100}X
+ abQX
+ *** Failers
+ X
-/^>\p{Xsp}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+/(?<=[\x{100}\x{200}]{3})X/8
+ abc\x{100}\x{200}\x{100}X
+ *** Failers
+ abc\x{200}X
+ X
-/^>\p{Xsp}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xsp}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>[\p{Xsp}]/8
- >\x{2028}\x{0b}
-
-/^>[\p{Xsp}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+/[^\x{100}\x{200}]X/8
+ AX
+ \x{150}X
+ \x{500}X
+ *** Failers
+ \x{100}X
+ \x{200}X
-/^>\p{Xps}/8
- >\x{1680}\x{2028}\x{0b}
- >\x{a0}
- ** Failers
- \x{0b}
+/[^Q\x{100}\x{200}]X/8
+ AX
+ \x{150}X
+ \x{500}X
+ *** Failers
+ \x{100}X
+ \x{200}X
+ QX
-/^>\p{Xps}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+/[^\x{100}-\x{200}]X/8
+ AX
+ \x{500}X
+ *** Failers
+ \x{100}X
+ \x{150}X
+ \x{200}X
-/^>\p{Xps}+?/8
- >\x{1680}\x{2028}\x{0b}
+/[z-\x{100}]/8i
+ z
+ Z
+ \x{100}
+ *** Failers
+ \x{102}
+ y
-/^>\p{Xps}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>\p{Xps}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
-/^>[\p{Xps}]/8
- >\x{2028}\x{0b}
-
-/^>[\p{Xps}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+/[\xFF]/
+ >\xff<
-/^\p{Xwd}/8
- ABCD
- 1234
- \x{6ca}
- \x{a6c}
- \x{10a7}
- _ABC
- ** Failers
- []
+/[\xff]/8
+ >\x{ff}<
-/^\p{Xwd}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+/[^\xFF]/
+ XYZ
-/^\p{Xwd}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/^\p{Xwd}{2,9}/8
- A_12\x{6ca}\x{a6c}\x{10a7}
+/[^\xff]/8
+ XYZ
+ \x{123}
+
+/^[ac]*b/8
+ xb
+
+/^[ac\x{100}]*b/8
+ xb
+
+/^[^x]*b/8i
+ xb
+
+/^[^x]*b/8
+ xb
+
+/^\d*b/8
+ xb
+
+/(|a)/g8
+ catac
+ a\x{256}a
+
+/^\x{85}$/8i
+ \x{85}
+
+/^abc./mgx8<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+
+/abc.$/mgx8<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+
+/^a\Rb/8<bsr_unicode>
+ a\nb
+ a\rb
+ a\r\nb
+ a\x0bb
+ a\x0cb
+ a\x{85}b
+ a\x{2028}b
+ a\x{2029}b
+ ** Failers
+ a\n\rb
+
+/^a\R*b/8<bsr_unicode>
+ ab
+ a\nb
+ a\rb
+ a\r\nb
+ a\x0bb
+ a\x0c\x{2028}\x{2029}b
+ a\x{85}b
+ a\n\rb
+ a\n\r\x{85}\x0cb
+
+/^a\R+b/8<bsr_unicode>
+ a\nb
+ a\rb
+ a\r\nb
+ a\x0bb
+ a\x0c\x{2028}\x{2029}b
+ a\x{85}b
+ a\n\rb
+ a\n\r\x{85}\x0cb
+ ** Failers
+ ab
+
+/^a\R{1,3}b/8<bsr_unicode>
+ a\nb
+ a\n\rb
+ a\n\r\x{85}b
+ a\r\n\r\nb
+ a\r\n\r\n\r\nb
+ a\n\r\n\rb
+ a\n\n\r\nb
+ ** Failers
+ a\n\n\n\rb
+ a\r
+
+/\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+
+/\V?\v{3,4}/8
+ \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+
+/\h+\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+
+/\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+
+/\H\h\V\v/8
+ X X\x0a
+ X\x09X\x0b
+ ** Failers
+ \x{a0} X\x0a
-/^[\p{Xwd}]/8
- ABCD1234_
- 1234abcd_
- \x{6ca}
- \x{a6c}
- \x{10a7}
- _ABC
+/\H*\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
+ \x09\x20\x{a0}\x0a\x0b\x0c
+ ** Failers
+ \x09\x20\x{a0}\x0a\x0b
+
+/\H\h\V\v/8
+ \x{3001}\x{3000}\x{2030}\x{2028}
+ X\x{180e}X\x{85}
** Failers
- []
-
-/^[\p{Xwd}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
-/-- Unicode properties for \b abd \B --/
-
-/\b...\B/8W
- abc_
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
-
-/\b...\B/8
- abc_
+ \x{2009} X\x0a
+
+/\H*\h+\V?\v{3,4}/8
+ \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
+ \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
+ \x09\x20\x{202f}\x0a\x0b\x0c
** Failers
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
-
-/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-
-/\b...\B/W
- abc_
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
+ \x09\x{200a}\x{a0}\x{2028}\x0b
+
+/a\Rb/I8<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x{85}b
+ a\x0bb
+
+/a\Rb/I8<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x{85}b
+ a\x0bb
+ ** Failers
+ a\x{85}b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/a\R?b/I8<bsr_anycrlf>
+ a\rb
+ a\nb
+ a\r\nb
+ ** Failers
+ a\x{85}b
+ a\x0bb
+
+/a\R?b/I8<bsr_unicode>
+ a\rb
+ a\nb
+ a\r\nb
+ a\x{85}b
+ a\x0bb
+ ** Failers
+ a\x{85}b\<bsr_anycrlf>
+ a\x0bb\<bsr_anycrlf>
+
+/X/8f<any>
+ A\x{1ec5}ABCXYZ
+
+/abcd*/8
+ xxxxabcd\P
+ xxxxabcd\P\P
+
+/abcd*/i8
+ xxxxabcd\P
+ xxxxabcd\P\P
+ XXXXABCD\P
+ XXXXABCD\P\P
+
+/abc\d*/8
+ xxxxabc1\P
+ xxxxabc1\P\P
+
+/abc[de]*/8
+ xxxxabcde\P
+ xxxxabcde\P\P
+
+/\bthe cat\b/8
+ the cat\P
+ the cat\P\P
+
+/ab\Cde/8
+ abXde
+
+/(?<=ab\Cde)X/8
+
+/./8<CRLF>
+ \r\P
+ \r\P\P
+
+/.{2,3}/8<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/.{2,3}?/8<CRLF>
+ \r\P
+ \r\P\P
+ \r\r\P
+ \r\r\P\P
+ \r\r\r\P
+ \r\r\r\P\P
+
+/[^\x{100}]/8
+ \x{100}\x{101}X
+
+/[^\x{100}]+/8
+ \x{100}\x{101}X
/-- End of testinput9 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1
index 6ab67a725..99c0ebbc3 100644
--- a/ext/pcre/pcrelib/testdata/testoutput1
+++ b/ext/pcre/pcrelib/testdata/testoutput1
@@ -1,5 +1,6 @@
/-- This set of tests is for features that are compatible with all versions of
- Perl 5, in non-UTF-8 mode. --/
+ Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
+ 16-bit PCRE libraries. --/
/the quick brown fox/
the quick brown fox
@@ -6666,4 +6667,2070 @@ No match
?
0: ?
+/(abc)\1/i
+ abc
+No match
+
+/(abc)\1/
+ abc
+No match
+
+/[^a]*/i
+ 12abc
+ 0: 12
+ 12ABC
+ 0: 12
+
+/[^a]*+/i
+ 12abc
+ 0: 12
+ 12ABC
+ 0: 12
+
+/[^a]*?X/i
+ ** Failers
+No match
+ 12abc
+No match
+ 12ABC
+No match
+
+/[^a]+?X/i
+ ** Failers
+No match
+ 12abc
+No match
+ 12ABC
+No match
+
+/[^a]?X/i
+ 12aXbcX
+ 0: X
+ 12AXBCX
+ 0: X
+ BCX
+ 0: CX
+
+/[^a]??X/i
+ 12aXbcX
+ 0: X
+ 12AXBCX
+ 0: X
+ BCX
+ 0: CX
+
+/[^a]?+X/i
+ 12aXbcX
+ 0: cX
+ 12AXBCX
+ 0: CX
+ BCX
+ 0: CX
+
+/[^a]{2,3}/i
+ abcdef
+ 0: bcd
+ ABCDEF
+ 0: BCD
+
+/[^a]{2,3}?/i
+ abcdef
+ 0: bc
+ ABCDEF
+ 0: BC
+
+/[^a]{2,3}+/i
+ abcdef
+ 0: bcd
+ ABCDEF
+ 0: BCD
+
+/((a|)+)+Z/
+ Z
+ 0: Z
+ 1:
+ 2:
+
+/(a)b|(a)c/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?>(a))b|(a)c/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?=(a))ab|(a)c/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/((?>(a))b|(a)c)/
+ ac
+ 0: ac
+ 1: ac
+ 2: <unset>
+ 3: a
+
+/((?>(a))b|(a)c)++/
+ ac
+ 0: ac
+ 1: ac
+ 2: <unset>
+ 3: a
+
+/(?:(?>(a))b|(a)c)++/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?=(?>(a))b|(a)c)(..)/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+ 3: ac
+
+/(?>(?>(a))b|(a)c)/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?:(?>([ab])))+a=/+
+ =ba=
+ 0: ba=
+ 0+
+ 1: b
+
+/(?>([ab]))+a=/+
+ =ba=
+ 0: ba=
+ 0+
+ 1: b
+
+/((?>(a+)b)+(aabab))/
+ aaaabaaabaabab
+ 0: aaaabaaabaabab
+ 1: aaaabaaabaabab
+ 2: aaa
+ 3: aabab
+
+/(?>a+|ab)+?c/
+ aabc
+No match
+
+/(?>a+|ab)+c/
+ aabc
+No match
+
+/(?:a+|ab)+c/
+ aabc
+ 0: aabc
+
+/(?(?=(a))a)/
+ a
+ 0: a
+ 1: a
+
+/(?(?=(a))a)(b)/
+ ab
+ 0: ab
+ 1: a
+ 2: b
+
+/^(?:a|ab)++c/
+ aaaabc
+No match
+
+/^(?>a|ab)++c/
+ aaaabc
+No match
+
+/^(?:a|ab)+c/
+ aaaabc
+ 0: aaaabc
+
+/(?=abc){3}abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)+abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)++abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc){0}xyz/
+ xyz
+ 0: xyz
+
+/(?=abc){1}xyz/
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=(a))?./
+ ab
+ 0: a
+ 1: a
+ bc
+ 0: b
+
+/(?=(a))??./
+ ab
+ 0: a
+ bc
+ 0: b
+
+/^(?=(a)){0}b(?1)/
+ backgammon
+ 0: ba
+
+/^(?=(?1))?[az]([abc])d/
+ abd
+ 0: abd
+ 1: b
+ zcdxx
+ 0: zcd
+ 1: c
+
+/^(?!a){0}\w+/
+ aaaaa
+ 0: aaaaa
+
+/(?<=(abc))?xyz/
+ abcxyz
+ 0: xyz
+ 1: abc
+ pqrxyz
+ 0: xyz
+
+/^[\g<a>]+/
+ ggg<<<aaa>>>
+ 0: ggg<<<aaa>>>
+ ** Failers
+No match
+ \\ga
+No match
+
+/^[\ga]+/
+ gggagagaxyz
+ 0: gggagaga
+
+/^[:a[:digit:]]+/
+ aaaa444:::Z
+ 0: aaaa444:::
+
+/^[:a[:digit:]:b]+/
+ aaaa444:::bbbZ
+ 0: aaaa444:::bbb
+
+/[:a]xxx[b:]/
+ :xxx:
+ 0: :xxx:
+
+/(?<=a{2})b/i
+ xaabc
+ 0: b
+ ** Failers
+No match
+ xabc
+No match
+
+/(?<!a{2})b/i
+ xabc
+ 0: b
+ ** Failers
+No match
+ xaabc
+No match
+
+/(?<=a\h)c/
+ xa c
+ 0: c
+
+/(?<=[^a]{2})b/
+ axxbc
+ 0: b
+ aAAbc
+ 0: b
+ ** Failers
+No match
+ xaabc
+No match
+
+/(?<=[^a]{2})b/i
+ axxbc
+ 0: b
+ ** Failers
+No match
+ aAAbc
+No match
+ xaabc
+No match
+
+/(?<=a\H)c/
+ abc
+ 0: c
+
+/(?<=a\V)c/
+ abc
+ 0: c
+
+/(?<=a\v)c/
+ a\nc
+ 0: c
+
+/(?(?=c)c|d)++Y/
+ XcccddYX
+ 0: cccddY
+
+/(?(?=c)c|d)*+Y/
+ XcccddYX
+ 0: cccddY
+
+/^(a{2,3}){2,}+a/
+ aaaaaaa
+ 0: aaaaaaa
+ 1: aaa
+ ** Failers
+No match
+ aaaaaa
+No match
+ aaaaaaaaa
+No match
+
+/^(a{2,3})++a/
+ ** Failers
+No match
+ aaaaaa
+No match
+
+/^(a{2,3})*+a/
+ ** Failers
+No match
+ aaaaaa
+No match
+
+/ab\Cde/
+ abXde
+ 0: abXde
+
+/(?<=ab\Cde)X/
+ abZdeX
+ 0: X
+
+/a[\CD]b/
+ aCb
+ 0: aCb
+ aDb
+ 0: aDb
+
+/a[\C-X]b/
+ aJb
+ 0: aJb
+
+/\H\h\V\v/
+ X X\x0a
+ 0: X X\x0a
+ X\x09X\x0b
+ 0: X\x09X\x0b
+ ** Failers
+No match
+ \xa0 X\x0a
+No match
+
+/\H*\h+\V?\v{3,4}/
+ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0X\x0a\x0b\x0c\x0d
+ \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0\x0a\x0b\x0c\x0d
+ \x09\x20\xa0\x0a\x0b\x0c
+ 0: \x09 \xa0\x0a\x0b\x0c
+ ** Failers
+No match
+ \x09\x20\xa0\x0a\x0b
+No match
+
+/\H{3,4}/
+ XY ABCDE
+ 0: ABCD
+ XY PQR ST
+ 0: PQR
+
+/.\h{3,4}./
+ XY AB PQRS
+ 0: B P
+
+/\h*X\h?\H+Y\H?Z/
+ >XNNNYZ
+ 0: XNNNYZ
+ > X NYQZ
+ 0: X NYQZ
+ ** Failers
+No match
+ >XYZ
+No match
+ > X NY Z
+No match
+
+/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
+ >XY\x0aZ\x0aA\x0bNN\x0c
+ 0: XY\x0aZ\x0aA\x0bNN\x0c
+ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+ 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+
+/(foo)\Kbar/
+ foobar
+ 0: bar
+ 1: foo
+
+/(foo)(\Kbar|baz)/
+ foobar
+ 0: bar
+ 1: foo
+ 2: bar
+ foobaz
+ 0: foobaz
+ 1: foo
+ 2: baz
+
+/(foo\Kbar)baz/
+ foobarbaz
+ 0: barbaz
+ 1: foobar
+
+/abc\K|def\K/g+
+ Xabcdefghi
+ 0:
+ 0+ defghi
+ 0:
+ 0+ ghi
+
+/ab\Kc|de\Kf/g+
+ Xabcdefghi
+ 0: c
+ 0+ defghi
+ 0: f
+ 0+ ghi
+
+/(?=C)/g+
+ ABCDECBA
+ 0:
+ 0+ CDECBA
+ 0:
+ 0+ CBA
+
+/^abc\K/+
+ abcdef
+ 0:
+ 0+ def
+ ** Failers
+No match
+ defabcxyz
+No match
+
+/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
+ ababababbbabZXXXX
+ 0: ababababbbabZ
+ 1: ab
+ 2: b
+
+/(?<A>tom|bon)-\g{A}/
+ tom-tom
+ 0: tom-tom
+ 1: tom
+ bon-bon
+ 0: bon-bon
+ 1: bon
+
+/(^(a|b\g{-1}))/
+ bacxxx
+No match
+
+/(?|(abc)|(xyz))\1/
+ abcabc
+ 0: abcabc
+ 1: abc
+ xyzxyz
+ 0: xyzxyz
+ 1: xyz
+ ** Failers
+No match
+ abcxyz
+No match
+ xyzabc
+No match
+
+/(?|(abc)|(xyz))(?1)/
+ abcabc
+ 0: abcabc
+ 1: abc
+ xyzabc
+ 0: xyzabc
+ 1: xyz
+ ** Failers
+No match
+ xyzxyz
+No match
+
+/^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: c
+ 4: d
+ 5: Y
+
+/^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: <unset>
+ 4: <unset>
+ 5: c
+ 6: d
+ 7: Y
+
+/^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: <unset>
+ 4: <unset>
+ 5: c
+ 6: d
+ 7: Y
+
+/(?'abc'\w+):\k<abc>{2}/
+ a:aaxyz
+ 0: a:aa
+ 1: a
+ ab:ababxyz
+ 0: ab:abab
+ 1: ab
+ ** Failers
+No match
+ a:axyz
+No match
+ ab:abxyz
+No match
+
+/(?'abc'\w+):\g{abc}{2}/
+ a:aaxyz
+ 0: a:aa
+ 1: a
+ ab:ababxyz
+ 0: ab:abab
+ 1: ab
+ ** Failers
+No match
+ a:axyz
+No match
+ ab:abxyz
+No match
+
+/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
+ abd
+ 0: abd
+ 1: a
+ ce
+ 0: ce
+
+/^(a.)\g-1Z/
+ aXaXZ
+ 0: aXaXZ
+ 1: aX
+
+/^(a.)\g{-1}Z/
+ aXaXZ
+ 0: aXaXZ
+ 1: aX
+
+/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
+ abcd
+ 0: ab
+
+/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\d+)
+ )/x
+ metcalfe 33
+ 0: metcalfe 33
+ 1: metcalfe
+ 2: 33
+
+/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
+ 1.2.3.4
+ 0: 1.2.3.4
+ 1: <unset>
+ 2: .4
+ 131.111.10.206
+ 0: 131.111.10.206
+ 1: <unset>
+ 2: .206
+ 10.0.0.0
+ 0: 10.0.0.0
+ 1: <unset>
+ 2: .0
+ ** Failers
+No match
+ 10.6
+No match
+ 455.3.4.5
+No match
+
+/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
+ 1.2.3.4
+ 0: 1.2.3.4
+ 1: .4
+ 131.111.10.206
+ 0: 131.111.10.206
+ 1: .206
+ 10.0.0.0
+ 0: 10.0.0.0
+ 1: .0
+ ** Failers
+No match
+ 10.6
+No match
+ 455.3.4.5
+No match
+
+/^(\w++|\s++)*$/
+ now is the time for all good men to come to the aid of the party
+ 0: now is the time for all good men to come to the aid of the party
+ 1: party
+ *** Failers
+No match
+ this is not a line with only words and spaces!
+No match
+
+/(\d++)(\w)/
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: a
+ *** Failers
+No match
+ 12345+
+No match
+
+/a++b/
+ aaab
+ 0: aaab
+
+/(a++b)/
+ aaab
+ 0: aaab
+ 1: aaab
+
+/(a++)b/
+ aaab
+ 0: aaab
+ 1: aaa
+
+/([^()]++|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: x
+
+/\(([^()]++|\([^()]+\))+\)/
+ (abc)
+ 0: (abc)
+ 1: abc
+ (abc(def)xyz)
+ 0: (abc(def)xyz)
+ 1: xyz
+ *** Failers
+No match
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ 0: abc
+ 1: c
+ a(b)c
+ 0: a(b)c
+ 1: c
+ a(b(c))d
+ 0: a(b(c))d
+ 1: d
+ *** Failers)
+No match
+ a(b(c)d
+No match
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ 0: >abc>123<xyz<
+ 1: 3
+ >abc>1(2)3<xyz<
+ 0: >abc>1(2)3<xyz<
+ 1: 3
+ >abc>(1(2)3)<xyz<
+ 0: >abc>(1(2)3)<xyz<
+ 1: (1(2)3)
+
+/^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
+ 1221
+ 0: 1221
+ 1: 1221
+ 2: 1
+ Satanoscillatemymetallicsonatas
+ 0: Satanoscillatemymetallicsonatas
+ 1: <unset>
+ 2: <unset>
+ 3: Satanoscillatemymetallicsonatas
+ 4: S
+ AmanaplanacanalPanama
+ 0: AmanaplanacanalPanama
+ 1: <unset>
+ 2: <unset>
+ 3: AmanaplanacanalPanama
+ 4: A
+ AblewasIereIsawElba
+ 0: AblewasIereIsawElba
+ 1: <unset>
+ 2: <unset>
+ 3: AblewasIereIsawElba
+ 4: A
+ *** Failers
+No match
+ Thequickbrownfox
+No match
+
+/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
+ 12
+ 0: 12
+ 1: 12
+ (((2+2)*-3)-7)
+ 0: (((2+2)*-3)-7)
+ 1: (((2+2)*-3)-7)
+ 2: -
+ -12
+ 0: -12
+ 1: -12
+ *** Failers
+No match
+ ((2+2)*-3)-7)
+No match
+
+/^(x(y|(?1){2})z)/
+ xyz
+ 0: xyz
+ 1: xyz
+ 2: y
+ xxyzxyzz
+ 0: xxyzxyzz
+ 1: xxyzxyzz
+ 2: xyzxyz
+ *** Failers
+No match
+ xxyzz
+No match
+ xxyzxyzxyzz
+No match
+
+/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
+ <>
+ 0: <>
+ 1: <>
+ 2: <>
+ <abcd>
+ 0: <abcd>
+ 1: <abcd>
+ 2: <abcd>
+ <abc <123> hij>
+ 0: <abc <123> hij>
+ 1: <abc <123> hij>
+ 2: <abc <123> hij>
+ <abc <def> hij>
+ 0: <def>
+ 1: <def>
+ 2: <def>
+ <abc<>def>
+ 0: <abc<>def>
+ 1: <abc<>def>
+ 2: <abc<>def>
+ <abc<>
+ 0: <>
+ 1: <>
+ 2: <>
+ *** Failers
+No match
+ <abc
+No match
+
+/^a+(*FAIL)/
+ aaaaaa
+No match
+
+/a+b?c+(*FAIL)/
+ aaabccc
+No match
+
+/a+b?(*PRUNE)c+(*FAIL)/
+ aaabccc
+No match
+
+/a+b?(*COMMIT)c+(*FAIL)/
+ aaabccc
+No match
+
+/a+b?(*SKIP)c+(*FAIL)/
+ aaabcccaaabccc
+No match
+
+/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
+ aaaxxxxxx
+ 0: aaaxxxxxx
+ aaa++++++
+ 0: aaa
+ bbbxxxxx
+ 0: bbbxxxxx
+ bbb+++++
+ 0: bbb
+ cccxxxx
+ 0: cccxxxx
+ ccc++++
+ 0: ccc
+ dddddddd
+ 0: ddd
+
+/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
+ aaaxxxxxx
+ 0: aaaxxxxxx
+ 1: aaaxxxxxx
+ aaa++++++
+ 0: aaa
+ 1: aaa
+ bbbxxxxx
+ 0: bbbxxxxx
+ 1: bbbxxxxx
+ bbb+++++
+ 0: bbb
+ 1: bbb
+ cccxxxx
+ 0: cccxxxx
+ 1: cccxxxx
+ ccc++++
+ 0: ccc
+ 1: ccc
+ dddddddd
+ 0: ddd
+ 1: ddd
+
+/a+b?(*THEN)c+(*FAIL)/
+ aaabccc
+No match
+
+/(A (A|B(*ACCEPT)|C) D)(E)/x
+ AB
+ 0: AB
+ 1: AB
+ 2: B
+ ABX
+ 0: AB
+ 1: AB
+ 2: B
+ AADE
+ 0: AADE
+ 1: AAD
+ 2: A
+ 3: E
+ ACDE
+ 0: ACDE
+ 1: ACD
+ 2: C
+ 3: E
+ ** Failers
+No match
+ AD
+No match
+
+/^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
+ 1221
+ 0: 1221
+ 1: 1221
+ 2: 1
+ Satan, oscillate my metallic sonatas!
+ 0: Satan, oscillate my metallic sonatas!
+ 1: <unset>
+ 2: <unset>
+ 3: Satan, oscillate my metallic sonatas
+ 4: S
+ A man, a plan, a canal: Panama!
+ 0: A man, a plan, a canal: Panama!
+ 1: <unset>
+ 2: <unset>
+ 3: A man, a plan, a canal: Panama
+ 4: A
+ Able was I ere I saw Elba.
+ 0: Able was I ere I saw Elba.
+ 1: <unset>
+ 2: <unset>
+ 3: Able was I ere I saw Elba
+ 4: A
+ *** Failers
+No match
+ The quick brown fox
+No match
+
+/^((.)(?1)\2|.)$/
+ a
+ 0: a
+ 1: a
+ aba
+ 0: aba
+ 1: aba
+ 2: a
+ aabaa
+ 0: aabaa
+ 1: aabaa
+ 2: a
+ abcdcba
+ 0: abcdcba
+ 1: abcdcba
+ 2: a
+ pqaabaaqp
+ 0: pqaabaaqp
+ 1: pqaabaaqp
+ 2: p
+ ablewasiereisawelba
+ 0: ablewasiereisawelba
+ 1: ablewasiereisawelba
+ 2: a
+ rhubarb
+No match
+ the quick brown fox
+No match
+
+/(a)(?<=b(?1))/
+ baz
+ 0: a
+ 1: a
+ ** Failers
+No match
+ caz
+No match
+
+/(?<=b(?1))(a)/
+ zbaaz
+ 0: a
+ 1: a
+ ** Failers
+No match
+ aaa
+No match
+
+/(?<X>a)(?<=b(?&X))/
+ baz
+ 0: a
+ 1: a
+
+/^(?|(abc)|(def))\1/
+ abcabc
+ 0: abcabc
+ 1: abc
+ defdef
+ 0: defdef
+ 1: def
+ ** Failers
+No match
+ abcdef
+No match
+ defabc
+No match
+
+/^(?|(abc)|(def))(?1)/
+ abcabc
+ 0: abcabc
+ 1: abc
+ defabc
+ 0: defabc
+ 1: def
+ ** Failers
+No match
+ defdef
+No match
+ abcdef
+No match
+
+/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
+ a\"aaaaa
+ 0: a"aaaaa
+ 1: "
+ 2: <unset>
+ 3: "
+ b\"aaaaa
+ 0: b"aaaaa
+ 1: <unset>
+ 2: <unset>
+ 3: <unset>
+ 4: "
+ 5: <unset>
+ 6: "
+ ** Failers
+No match
+ b\"11111
+No match
+
+/(?:(?1)|B)(A(*F)|C)/
+ ABCD
+ 0: BC
+ 1: C
+ CCD
+ 0: CC
+ 1: C
+ ** Failers
+No match
+ CAD
+No match
+
+/^(?:(?1)|B)(A(*F)|C)/
+ CCD
+ 0: CC
+ 1: C
+ BCD
+ 0: BC
+ 1: C
+ ** Failers
+No match
+ ABCD
+No match
+ CAD
+No match
+ BAD
+No match
+
+/(?:(?1)|B)(A(*ACCEPT)XX|C)D/
+ AAD
+ 0: AA
+ 1: A
+ ACD
+ 0: ACD
+ 1: C
+ BAD
+ 0: BA
+ 1: A
+ BCD
+ 0: BCD
+ 1: C
+ BAX
+ 0: BA
+ 1: A
+ ** Failers
+No match
+ ACX
+No match
+ ABC
+No match
+
+/(?(DEFINE)(A))B(?1)C/
+ BAC
+ 0: BAC
+
+/(?(DEFINE)((A)\2))B(?1)C/
+ BAAC
+ 0: BAAC
+
+/(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
+ (ab(cd)ef)
+ 0: (ab(cd)ef)
+ 1: (ab(cd)ef)
+ 2: ef
+
+/^(?!a(*SKIP)b)/
+ ac
+ 0:
+
+/^(?=a(*SKIP)b|ac)/
+ ** Failers
+No match
+ ac
+No match
+
+/^(?=a(*THEN)b|ac)/
+ ac
+ 0:
+
+/^(?=a(*PRUNE)b)/
+ ab
+ 0:
+ ** Failers
+No match
+ ac
+No match
+
+/^(?=a(*ACCEPT)b)/
+ ac
+ 0:
+
+/^(?(?!a(*SKIP)b))/
+ ac
+ 0:
+
+/(?>a\Kb)/
+ ab
+ 0: b
+
+/((?>a\Kb))/
+ ab
+ 0: b
+ 1: ab
+
+/(a\Kb)/
+ ab
+ 0: b
+ 1: ab
+
+/^a\Kcz|ac/
+ ac
+ 0: ac
+
+/(?>a\Kbz|ab)/
+ ab
+ 0: ab
+
+/^(?&t)(?(DEFINE)(?<t>a\Kb))$/
+ ab
+ 0: b
+
+/^([^()]|\((?1)*\))*$/
+ a(b)c
+ 0: a(b)c
+ 1: c
+ a(b(c)d)e
+ 0: a(b(c)d)e
+ 1: e
+
+/(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
+ 0
+ 0: 0
+ 1: 0
+ 00
+ 0: 00
+ 1: 00
+ 2: 0
+ 0000
+ 0: 0000
+ 1: 0000
+ 2: 0
+
+/(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
+ 0
+ 0: 0
+ 1: 0
+ 2: 0
+ 00
+ 0: 0
+ 1: 0
+ 2: 0
+ 0000
+ 0: 0
+ 1: 0
+ 2: 0
+
+/--- This one does fail, as expected, in Perl. It needs the complex item at the
+ end of the pattern. A single letter instead of (B|D) makes it not fail,
+ which I think is a Perl bug. --- /
+
+/A(*COMMIT)(B|D)/
+ ACABX
+No match
+
+/--- Check the use of names for failure ---/
+
+/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
+ ** Failers
+No match
+ AC
+No match, mark = A
+ CB
+No match, mark = B
+
+/--- Force no study, otherwise mark is not seen. The studied version is in
+ test 2 because it isn't Perl-compatible. ---/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KSS
+ C
+ 0: C
+ 1: C
+MK: A
+ D
+No match, mark = A
+
+/^(A(*THEN:A)B|C(*THEN:B)D)/K
+ ** Failers
+No match
+ CB
+No match, mark = B
+
+/^(?:A(*THEN:A)B|C(*THEN:B)D)/K
+ CB
+No match, mark = B
+
+/^(?>A(*THEN:A)B|C(*THEN:B)D)/K
+ CB
+No match, mark = B
+
+/--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
+that we have to have something complicated such as (B|Z) at the end because,
+for Perl, a simple character somehow causes an unwanted optimization to mess
+with the handling of backtracking verbs. ---/
+
+/A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/--- Test skipping over a non-matching mark. ---/
+
+/A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/--- Check shorthand for MARK ---/
+
+/A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/--- Don't loop! Force no study, otherwise mark is not seen. ---/
+
+/(*:A)A+(*SKIP:A)(B|Z)/KSS
+ AAAC
+No match, mark = A
+
+/--- This should succeed, as a non-existent skip name disables the skip ---/
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
+ AAAC
+ 0: AC
+MK: B
+
+/--- COMMIT at the start of a pattern should act like an anchor. Again,
+however, we need the complication for Perl. ---/
+
+/(*COMMIT)(A|P)(B|P)(C|P)/
+ ABCDEFG
+ 0: ABC
+ 1: A
+ 2: B
+ 3: C
+ ** Failers
+No match
+ DEFGABC
+No match
+
+/--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
+
+/(\w+)(?>b(*COMMIT))\w{2}/
+ abbb
+ 0: abbb
+ 1: a
+
+/(\w+)b(*COMMIT)\w{2}/
+ abbb
+No match
+
+/--- Check opening parens in comment when seeking forward reference. ---/
+
+/(?&t)(?#()(?(DEFINE)(?<t>a))/
+ bac
+ 0: a
+
+/--- COMMIT should override THEN ---/
+
+/(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
+ yes
+No match
+
+/(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
+ yes
+No match
+
+/b?(*SKIP)c/
+ bc
+ 0: bc
+ abc
+ 0: bc
+
+/(*SKIP)bc/
+ a
+No match
+
+/(*SKIP)b/
+ a
+No match
+
+/(?P<abn>(?P=abn)xxx|)+/
+ xxx
+ 0:
+ 1:
+
+/(?i:([^b]))(?1)/
+ aa
+ 0: aa
+ 1: a
+ aA
+ 0: aA
+ 1: a
+ ** Failers
+ 0: **
+ 1: *
+ ab
+No match
+ aB
+No match
+ Ba
+No match
+ ba
+No match
+
+/^(?&t)*+(?(DEFINE)(?<t>a))\w$/
+ aaaaaaX
+ 0: aaaaaaX
+ ** Failers
+No match
+ aaaaaa
+No match
+
+/^(?&t)*(?(DEFINE)(?<t>a))\w$/
+ aaaaaaX
+ 0: aaaaaaX
+ aaaaaa
+ 0: aaaaaa
+
+/^(a)*+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ YZ
+ 0: Y
+ 1: <unset>
+ 2: Y
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(?:a)*+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: X
+ YZ
+ 0: Y
+ 1: Y
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(a)++(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ ** Failers
+No match
+ aaaa
+No match
+ YZ
+No match
+
+/^(?:a)++(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: X
+ ** Failers
+No match
+ aaaa
+No match
+ YZ
+No match
+
+/^(a)?+(\w)/
+ aaaaX
+ 0: aa
+ 1: a
+ 2: a
+ YZ
+ 0: Y
+ 1: <unset>
+ 2: Y
+
+/^(?:a)?+(\w)/
+ aaaaX
+ 0: aa
+ 1: a
+ YZ
+ 0: Y
+ 1: Y
+
+/^(a){2,}+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ ** Failers
+No match
+ aaa
+No match
+ YZ
+No match
+
+/^(?:a){2,}+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: X
+ ** Failers
+No match
+ aaa
+No match
+ YZ
+No match
+
+/(a|)*(?1)b/
+ b
+ 0: b
+ 1:
+ ab
+ 0: ab
+ 1:
+ aab
+ 0: aab
+ 1:
+
+/(a)++(?1)b/
+ ** Failers
+No match
+ ab
+No match
+ aab
+No match
+
+/(a)*+(?1)b/
+ ** Failers
+No match
+ ab
+No match
+ aab
+No match
+
+/(?1)(?:(b)){0}/
+ b
+ 0: b
+
+/(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
+ foo(bar(baz)+baz(bop))
+ 0: foo(bar(baz)+baz(bop))
+ 1: foo(bar(baz)+baz(bop))
+ 2: (bar(baz)+baz(bop))
+ 3: bar(baz)+baz(bop)
+
+/(A (A|B(*ACCEPT)|C) D)(E)/x
+ AB
+ 0: AB
+ 1: AB
+ 2: B
+
+/\A.*?(?:a|b(*THEN)c)/
+ ba
+ 0: ba
+
+/\A.*?(?:a|bc)/
+ ba
+ 0: ba
+
+/\A.*?(a|b(*THEN)c)/
+ ba
+ 0: ba
+ 1: a
+
+/\A.*?(a|bc)/
+ ba
+ 0: ba
+ 1: a
+
+/\A.*?(?:a|b(*THEN)c)++/
+ ba
+ 0: ba
+
+/\A.*?(?:a|bc)++/
+ ba
+ 0: ba
+
+/\A.*?(a|b(*THEN)c)++/
+ ba
+ 0: ba
+ 1: a
+
+/\A.*?(a|bc)++/
+ ba
+ 0: ba
+ 1: a
+
+/\A.*?(?:a|b(*THEN)c|d)/
+ ba
+ 0: ba
+
+/\A.*?(?:a|bc|d)/
+ ba
+ 0: ba
+
+/(?:(b))++/
+ beetle
+ 0: b
+ 1: b
+
+/(?(?=(a(*ACCEPT)z))a)/
+ a
+ 0: a
+ 1: a
+
+/^(a)(?1)+ab/
+ aaaab
+ 0: aaaab
+ 1: a
+
+/^(a)(?1)++ab/
+ aaaab
+No match
+
+/^(?=a(*:M))aZ/K
+ aZbc
+ 0: aZ
+MK: M
+
+/^(?!(*:M)b)aZ/K
+ aZbc
+ 0: aZ
+
+/(?(DEFINE)(a))?b(?1)/
+ backgammon
+ 0: ba
+
+/^\N+/
+ abc\ndef
+ 0: abc
+
+/^\N{1,}/
+ abc\ndef
+ 0: abc
+
+/(?(R)a+|(?R)b)/
+ aaaabcde
+ 0: aaaab
+
+/(?(R)a+|((?R))b)/
+ aaaabcde
+ 0: aaaab
+ 1: aaaa
+
+/((?(R)a+|(?1)b))/
+ aaaabcde
+ 0: aaaab
+ 1: aaaab
+
+/((?(R1)a+|(?1)b))/
+ aaaabcde
+ 0: aaaab
+ 1: aaaab
+
+/a(*:any
+name)/K
+ abc
+ 0: a
+MK: any \x0aname
+
+/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
+ a
+ 0: a
+ ba
+ 0: a
+ bba
+ 0: a
+
+/--- Checking revised (*THEN) handling ---/
+
+/--- Capture ---/
+
+/^.*? (a(*THEN)b) c/x
+ aabc
+No match
+
+/^.*? (a(*THEN)b|(*F)) c/x
+ aabc
+ 0: aabc
+ 1: ab
+
+/^.*? ( (a(*THEN)b) | (*F) ) c/x
+ aabc
+ 0: aabc
+ 1: ab
+ 2: ab
+
+/^.*? ( (a(*THEN)b) ) c/x
+ aabc
+No match
+
+/--- Non-capture ---/
+
+/^.*? (?:a(*THEN)b) c/x
+ aabc
+No match
+
+/^.*? (?:a(*THEN)b|(*F)) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b) ) c/x
+ aabc
+No match
+
+/--- Atomic ---/
+
+/^.*? (?>a(*THEN)b) c/x
+ aabc
+No match
+
+/^.*? (?>a(*THEN)b|(*F)) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?> (?>a(*THEN)b) ) c/x
+ aabc
+No match
+
+/--- Possessive capture ---/
+
+/^.*? (a(*THEN)b)++ c/x
+ aabc
+No match
+
+/^.*? (a(*THEN)b|(*F))++ c/x
+ aabc
+ 0: aabc
+ 1: ab
+
+/^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
+ aabc
+ 0: aabc
+ 1: ab
+ 2: ab
+
+/^.*? ( (a(*THEN)b)++ )++ c/x
+ aabc
+No match
+
+/--- Possessive non-capture ---/
+
+/^.*? (?:a(*THEN)b)++ c/x
+ aabc
+No match
+
+/^.*? (?:a(*THEN)b|(*F))++ c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b)++ )++ c/x
+ aabc
+No match
+
+/--- Condition assertion ---/
+
+/^(?(?=a(*THEN)b)ab|ac)/
+ ac
+ 0: ac
+
+/--- Condition ---/
+
+/^.*?(?(?=a)a|b(*THEN)c)/
+ ba
+No match
+
+/^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
+ ba
+ 0: ba
+
+/^.*?(?(?=a)a(*THEN)b|c)/
+ ac
+No match
+
+/--- Assertion ---/
+
+/^.*(?=a(*THEN)b)/
+ aabc
+ 0: a
+
+/------------------------------/
+
+/(?>a(*:m))/imsxSK
+ a
+ 0: a
+MK: m
+
+/(?>(a)(*:m))/imsxSK
+ a
+ 0: a
+ 1: a
+MK: m
+
+/(?<=a(*ACCEPT)b)c/
+ xacd
+ 0: c
+
+/(?<=(a(*ACCEPT)b))c/
+ xacd
+ 0: c
+ 1: a
+
+/(?<=(a(*COMMIT)b))c/
+ xabcd
+ 0: c
+ 1: ab
+ ** Failers
+No match
+ xacd
+No match
+
+/(?<!a(*FAIL)b)c/
+ xcd
+ 0: c
+ acd
+ 0: c
+
+/(?<=a(*:N)b)c/K
+ xabcd
+ 0: c
+MK: N
+
+/(?<=a(*PRUNE)b)c/
+ xabcd
+ 0: c
+
+/(?<=a(*SKIP)b)c/
+ xabcd
+ 0: c
+
+/(?<=a(*THEN)b)c/
+ xabcd
+ 0: c
+
+/(a)(?2){2}(.)/
+ abcd
+ 0: abcd
+ 1: a
+ 2: d
+
+/(*MARK:A)(*PRUNE:B)(C|X)/KS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*PRUNE:B)(C|X)/KSS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*THEN:B)(C|X)/KS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*THEN:B)(C|X)/KSY
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*THEN:B)(C|X)/KSS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
+
+/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/--- Same --/
+
+/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+No match, mark = B
+
+/A(*:A)A+(*SKIP)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/--- This should fail, as a null name is the same as no name ---/
+
+/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/--- A check on what happens after hitting a mark and them bumping along to
+something that does not even start. Perl reports tags after the failures here,
+though it does not when the individual letters are made into something
+more complicated. ---/
+
+/A(*:A)B|XX(*:B)Y/K
+ AABC
+ 0: AB
+MK: A
+ XXYZ
+ 0: XXY
+MK: B
+ ** Failers
+No match
+ XAQQ
+No match, mark = A
+ XAQQXZZ
+No match, mark = A
+ AXQQQ
+No match, mark = A
+ AXXQQQ
+No match, mark = B
+
+/^(A(*THEN:A)B|C(*THEN:B)D)/K
+ AB
+ 0: AB
+ 1: AB
+MK: A
+ CD
+ 0: CD
+ 1: CD
+MK: B
+ ** Failers
+No match
+ AC
+No match, mark = A
+ CB
+No match, mark = B
+
+/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
+ AB
+ 0: AB
+ 1: AB
+MK: A
+ CD
+ 0: CD
+ 1: CD
+MK: B
+ ** Failers
+No match
+ AC
+No match, mark = A
+ CB
+No match, mark = B
+
+/--- An empty name does not pass back an empty string. It is the same as if no
+name were given. ---/
+
+/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
+ AB
+ 0: AB
+ 1: AB
+ CD
+ 0: CD
+ 1: CD
+MK: B
+
+/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
+
+/A(*PRUNE:A)B/K
+ ACAB
+ 0: AB
+MK: A
+
+/--- Mark names can be duplicated ---/
+
+/A(*:A)B|X(*:A)Y/K
+ AABC
+ 0: AB
+MK: A
+ XXYZ
+ 0: XY
+MK: A
+
+/b(*:m)f|a(*:n)w/K
+ aw
+ 0: aw
+MK: n
+ ** Failers
+No match, mark = n
+ abc
+No match, mark = m
+
+/b(*:m)f|aw/K
+ abaw
+ 0: aw
+ ** Failers
+No match
+ abc
+No match, mark = m
+ abax
+No match, mark = m
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
+ AAAC
+ 0: AAC
+
+/a(*PRUNE:X)bc|qq/KY
+ ** Failers
+No match, mark = X
+ axy
+No match, mark = X
+
+/a(*THEN:X)bc|qq/KY
+ ** Failers
+No match, mark = X
+ axy
+No match, mark = X
+
+/(?=a(*MARK:A)b)..x/K
+ abxy
+ 0: abx
+MK: A
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*MARK:A)b)..(*:Y)x/K
+ abxy
+ 0: abx
+MK: Y
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*PRUNE:A)b)..x/K
+ abxy
+ 0: abx
+MK: A
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*PRUNE:A)b)..(*:Y)x/K
+ abxy
+ 0: abx
+MK: Y
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*THEN:A)b)..x/K
+ abxy
+ 0: abx
+MK: A
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*THEN:A)b)..(*:Y)x/K
+ abxy
+ 0: abx
+MK: Y
+ ** Failers
+No match
+ abpq
+No match
+
+/(another)?(\1?)test/
+ hello world test
+ 0: test
+ 1: <unset>
+ 2:
+
+/(another)?(\1+)test/
+ hello world test
+No match
+
+/(a(*COMMIT)b){0}a(?1)|aac/
+ aac
+ 0: aac
+
+/(?!a(*COMMIT)b)ac|cd/
+ ac
+ 0: ac
+
+/((?:a?)*)*c/
+ aac
+ 0: aac
+ 1:
+
+/((?>a?)*)*c/
+ aac
+ 0: aac
+ 1:
+
/-- End of testinput1 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput10 b/ext/pcre/pcrelib/testdata/testoutput10
index b88474c7b..5009d5dfe 100644
--- a/ext/pcre/pcrelib/testdata/testoutput10
+++ b/ext/pcre/pcrelib/testdata/testoutput10
@@ -1,739 +1,2103 @@
-/-- These are a few representative patterns whose lengths and offsets are to be
-shown when the link size is 2. This is just a doublecheck test to ensure the
-sizes don't go horribly wrong when something is changed. The pattern contents
-are all themselves checked in other tests. Unicode, including property support,
-is required for these tests. --/
-
-/((?i)b)/BM
-Memory allocation (code space): 21
-------------------------------------------------------------------
- 0 17 Bra
- 3 9 CBra 1
- 8 01 Opt
- 10 NC b
- 12 9 Ket
- 15 00 Opt
- 17 17 Ket
- 20 End
-------------------------------------------------------------------
-
-/(?s)(.*X|^B)/BM
-Memory allocation (code space): 25
-------------------------------------------------------------------
- 0 21 Bra
- 3 9 CBra 1
- 8 AllAny*
- 10 X
- 12 6 Alt
- 15 ^
- 16 B
- 18 15 Ket
- 21 21 Ket
- 24 End
-------------------------------------------------------------------
-
-/(?s:.*X|^B)/BM
-Memory allocation (code space): 29
-------------------------------------------------------------------
- 0 25 Bra
- 3 9 Bra
- 6 04 Opt
- 8 AllAny*
- 10 X
- 12 8 Alt
- 15 04 Opt
- 17 ^
- 18 B
- 20 17 Ket
- 23 00 Opt
- 25 25 Ket
- 28 End
-------------------------------------------------------------------
-
-/^[[:alnum:]]/BM
-Memory allocation (code space): 41
-------------------------------------------------------------------
- 0 37 Bra
- 3 ^
- 4 [0-9A-Za-z]
- 37 37 Ket
- 40 End
-------------------------------------------------------------------
-
-/#/IxMD
-Memory allocation (code space): 7
-------------------------------------------------------------------
- 0 3 Bra
- 3 3 Ket
- 6 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-No first char
-No need char
-
-/a#/IxMD
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 a
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: extended
-First char = 'a'
-No need char
-
-/x?+/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 x?+
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/x++/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 x++
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/x{1,3}+/BM
-Memory allocation (code space): 19
-------------------------------------------------------------------
- 0 15 Bra
- 3 9 Once
- 6 x
- 8 x{0,2}
- 12 9 Ket
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-
-/(x)*+/BM
-Memory allocation (code space): 24
-------------------------------------------------------------------
- 0 20 Bra
- 3 14 Once
- 6 Brazero
- 7 7 CBra 1
- 12 x
- 14 7 KetRmax
- 17 14 Ket
- 20 20 Ket
- 23 End
-------------------------------------------------------------------
-
-/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/BM
-Memory allocation (code space): 120
-------------------------------------------------------------------
- 0 116 Bra
- 3 ^
- 4 109 CBra 1
- 9 7 CBra 2
- 14 a+
- 16 7 Ket
- 19 39 CBra 3
- 24 [ab]+?
- 58 39 Ket
- 61 39 CBra 4
- 66 [bc]+
-100 39 Ket
-103 7 CBra 5
-108 \w*
-110 7 Ket
-113 109 Ket
-116 116 Ket
-119 End
-------------------------------------------------------------------
-
-|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-Memory allocation (code space): 826
-------------------------------------------------------------------
- 0 822 Bra
- 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
-821 \b
-822 822 Ket
-825 End
-------------------------------------------------------------------
-
-|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|BM
-Memory allocation (code space): 816
-------------------------------------------------------------------
- 0 812 Bra
- 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
-811 \b
-812 812 Ket
-815 End
-------------------------------------------------------------------
-
-/(a(?1)b)/BM
-Memory allocation (code space): 28
-------------------------------------------------------------------
- 0 24 Bra
- 3 18 CBra 1
- 8 a
- 10 6 Once
- 13 3 Recurse
- 16 6 Ket
- 19 b
- 21 18 Ket
- 24 24 Ket
- 27 End
-------------------------------------------------------------------
-
-/(a(?1)+b)/BM
-Memory allocation (code space): 28
-------------------------------------------------------------------
- 0 24 Bra
- 3 18 CBra 1
- 8 a
- 10 6 Once
- 13 3 Recurse
- 16 6 KetRmax
- 19 b
- 21 18 Ket
- 24 24 Ket
- 27 End
-------------------------------------------------------------------
-
-/a(?P<name1>b|c)d(?P<longername2>e)/BM
-Memory allocation (code space): 42
-------------------------------------------------------------------
- 0 32 Bra
- 3 a
- 5 7 CBra 1
- 10 b
- 12 5 Alt
- 15 c
- 17 12 Ket
- 20 d
- 22 7 CBra 2
- 27 e
- 29 7 Ket
- 32 32 Ket
- 35 End
-------------------------------------------------------------------
-
-/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/BM
-Memory allocation (code space): 54
-------------------------------------------------------------------
- 0 41 Bra
- 3 25 Bra
- 6 a
- 8 17 CBra 1
- 13 c
- 15 7 CBra 2
- 20 d
- 22 7 Ket
- 25 17 Ket
- 28 25 Ket
- 31 7 CBra 3
- 36 a
- 38 7 Ket
- 41 41 Ket
- 44 End
-------------------------------------------------------------------
-
-/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 43
-------------------------------------------------------------------
- 0 36 Bra
- 3 7 CBra 1
- 8 a
- 10 7 Ket
- 13 Any
- 14 Any
- 15 Any
- 16 \1
- 19 bbb
- 25 6 Once
- 28 3 Recurse
- 31 6 Ket
- 34 d
- 36 36 Ket
- 39 End
-------------------------------------------------------------------
-
-/abc(?C255)de(?C)f/BM
-Memory allocation (code space): 31
-------------------------------------------------------------------
- 0 27 Bra
- 3 abc
- 9 Callout 255 10 1
- 15 de
- 19 Callout 0 16 1
- 25 f
- 27 27 Ket
- 30 End
-------------------------------------------------------------------
-
-/abcde/CBM
-Memory allocation (code space): 53
-------------------------------------------------------------------
- 0 49 Bra
- 3 Callout 255 0 1
- 9 a
- 11 Callout 255 1 1
- 17 b
- 19 Callout 255 2 1
- 25 c
- 27 Callout 255 3 1
- 33 d
- 35 Callout 255 4 1
- 41 e
- 43 Callout 255 5 0
- 49 49 Ket
- 52 End
-------------------------------------------------------------------
-
-/\x{100}/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{100}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\x{1000}/8BM
-Memory allocation (code space): 11
-------------------------------------------------------------------
- 0 7 Bra
- 3 \x{1000}
- 7 7 Ket
- 10 End
-------------------------------------------------------------------
-
-/\x{10000}/8BM
-Memory allocation (code space): 12
-------------------------------------------------------------------
- 0 8 Bra
- 3 \x{10000}
- 8 8 Ket
- 11 End
-------------------------------------------------------------------
-
-/\x{100000}/8BM
-Memory allocation (code space): 12
-------------------------------------------------------------------
- 0 8 Bra
- 3 \x{100000}
- 8 8 Ket
- 11 End
-------------------------------------------------------------------
-
-/\x{1000000}/8BM
-Memory allocation (code space): 13
-------------------------------------------------------------------
- 0 9 Bra
- 3 \x{1000000}
- 9 9 Ket
- 12 End
-------------------------------------------------------------------
-
-/\x{4000000}/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 10 Bra
- 3 \x{4000000}
- 10 10 Ket
- 13 End
-------------------------------------------------------------------
-
-/\x{7fffFFFF}/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 10 Bra
- 3 \x{7fffffff}
- 10 10 Ket
- 13 End
-------------------------------------------------------------------
-
-/[\x{ff}]/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{ff}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/[\x{100}]/8BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\x{100}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/\x80/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{80}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\xff/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{ff}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8M
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 A\x{2262}\x{391}.
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'A'
-Need char = '.'
+/-- This set of tests check Unicode property support with the DFA matching
+ functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest
+ when running it. --/
+
+/\pL\P{Nd}/8
+ AB
+ 0: AB
+ *** Failers
+ 0: Fa
+ A0
+No match
+ 00
+No match
+
+/\X./8
+ AB
+ 0: AB
+ A\x{300}BC
+ 0: A\x{300}B
+ A\x{300}\x{301}\x{302}BC
+ 0: A\x{300}\x{301}\x{302}B
+ *** Failers
+ 0: **
+ \x{300}
+No match
+
+/\X\X/8
+ ABC
+ 0: AB
+ A\x{300}B\x{300}\x{301}C
+ 0: A\x{300}B\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BC
+ 0: A\x{300}\x{301}\x{302}B
+ *** Failers
+ 0: **
+ \x{300}
+No match
+
+/^\pL+/8
+ abcd
+ 0: abcd
+ 1: abc
+ 2: ab
+ 3: a
+ a
+ 0: a
+ *** Failers
+No match
+
+/^\PL+/8
+ 1234
+ 0: 1234
+ 1: 123
+ 2: 12
+ 3: 1
+ =
+ 0: =
+ *** Failers
+ 0: ***
+ 1: ***
+ 2: **
+ 3: *
+ abcd
+No match
+
+/^\X+/8
+ abcdA\x{300}\x{301}\x{302}
+ 0: abcdA\x{300}\x{301}\x{302}
+ 1: abcd
+ 2: abc
+ 3: ab
+ 4: a
+ A\x{300}\x{301}\x{302}
+ 0: A\x{300}\x{301}\x{302}
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
+ 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
+ 1: A\x{300}\x{301}\x{302}
+ a
+ 0: a
+ *** Failers
+ 0: *** Failers
+ 1: *** Failer
+ 2: *** Faile
+ 3: *** Fail
+ 4: *** Fai
+ 5: *** Fa
+ 6: *** F
+ 7: ***
+ 8: ***
+ 9: **
+10: *
+ \x{300}\x{301}\x{302}
+No match
+
+/\X?abc/8
+ abc
+ 0: abc
+ A\x{300}abc
+ 0: A\x{300}abc
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ 0: A\x{300}abc
+ \x{300}abc
+ 0: abc
+ *** Failers
+No match
+
+/^\X?abc/8
+ abc
+ 0: abc
+ A\x{300}abc
+ 0: A\x{300}abc
+ *** Failers
+No match
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+No match
+ \x{300}abc
+No match
+
+/\X*abc/8
+ abc
+ 0: abc
+ A\x{300}abc
+ 0: A\x{300}abc
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
+ \x{300}abc
+ 0: abc
+ *** Failers
+No match
+
+/^\X*abc/8
+ abc
+ 0: abc
+ A\x{300}abc
+ 0: A\x{300}abc
+ A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
+ *** Failers
+No match
+ \x{300}abc
+No match
+
+/^\pL?=./8
+ A=b
+ 0: A=b
+ =c
+ 0: =c
+ *** Failers
+No match
+ 1=2
+No match
+ AAAA=b
+No match
+
+/^\pL*=./8
+ AAAA=b
+ 0: AAAA=b
+ =c
+ 0: =c
+ *** Failers
+No match
+ 1=2
+No match
+
+/^\X{2,3}X/8
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ *** Failers
+No match
+ X
+No match
+ A\x{300}\x{301}\x{302}X
+No match
+ A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+No match
+
+/^\pC\pL\pM\pN\pP\pS\pZ</8
+ \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
+ 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
+ \np\x{300}9!\$ <
+ 0: \x{0a}p\x{300}9!$ <
+ ** Failers
+No match
+ ap\x{300}9!\$ <
+No match
+
+/^\PC/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x7f
+No match
+
+/^\PL/8
+ 9
+ 0: 9
+ ** Failers
+ 0: *
+ \x{c0}
+No match
+
+/^\PM/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{30f}
+No match
+
+/^\PN/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{660}
+No match
+
+/^\PP/8
+ X
+ 0: X
+ ** Failers
+No match
+ \x{66c}
+No match
+
+/^\PS/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{f01}
+No match
+
+/^\PZ/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{1680}
+No match
-/\x{D55c}\x{ad6d}\x{C5B4}/D8M
-Memory allocation (code space): 19
-------------------------------------------------------------------
- 0 15 Bra
- 3 \x{d55c}\x{ad6d}\x{c5b4}
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 237
-Need char = 180
-
-/\x{65e5}\x{672c}\x{8a9e}/D8M
-Memory allocation (code space): 19
-------------------------------------------------------------------
- 0 15 Bra
- 3 \x{65e5}\x{672c}\x{8a9e}
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 230
-Need char = 158
-
-/[\x{100}]/8BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\x{100}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[Z\x{100}]/8BM
-Memory allocation (code space): 47
-------------------------------------------------------------------
- 0 43 Bra
- 3 [Z\x{100}]
- 43 43 Ket
- 46 End
-------------------------------------------------------------------
-
-/^[\x{100}\E-\Q\E\x{150}]/B8M
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 ^
- 4 [\x{100}-\x{150}]
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E]/B8M
-Memory allocation (code space): 18
-------------------------------------------------------------------
- 0 14 Bra
- 3 ^
- 4 [\x{100}-\x{150}]
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-
-/^[\QĀ\E-\QŐ\E/B8M
-Failed: missing terminating ] for character class at offset 15
-
-/[\p{L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\p{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\p{^L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\P{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\P{L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\P{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\P{^L}]/BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\p{L}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[abc\p{L}\x{0660}]/8BM
-Memory allocation (code space): 50
-------------------------------------------------------------------
- 0 46 Bra
- 3 [a-c\p{L}\x{660}]
- 46 46 Ket
- 49 End
-------------------------------------------------------------------
-
-/[\p{Nd}]/8BM
-Memory allocation (code space): 15
-------------------------------------------------------------------
- 0 11 Bra
- 3 [\p{Nd}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[\p{Nd}+-]+/8BM
-Memory allocation (code space): 48
-------------------------------------------------------------------
- 0 44 Bra
- 3 [+\-\p{Nd}]+
- 44 44 Ket
- 47 End
-------------------------------------------------------------------
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iBM
-Memory allocation (code space): 25
-------------------------------------------------------------------
- 0 21 Bra
- 3 NC A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 21 21 Ket
- 24 End
-------------------------------------------------------------------
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8BM
-Memory allocation (code space): 25
-------------------------------------------------------------------
- 0 21 Bra
- 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 21 21 Ket
- 24 End
-------------------------------------------------------------------
-
-/[\x{105}-\x{109}]/8iBM
-Memory allocation (code space): 17
-------------------------------------------------------------------
- 0 13 Bra
- 3 [\x{104}-\x{109}]
- 13 13 Ket
- 16 End
-------------------------------------------------------------------
-
-/( ( (?(1)0|) )* )/xBM
-Memory allocation (code space): 38
-------------------------------------------------------------------
- 0 34 Bra
- 3 28 CBra 1
- 8 Brazero
- 9 19 SCBra 2
- 14 8 Cond
- 17 1 Cond ref
- 20 0
- 22 3 Alt
- 25 11 Ket
- 28 19 KetRmax
- 31 28 Ket
- 34 34 Ket
- 37 End
-------------------------------------------------------------------
-
-/( (?(1)0|)* )/xBM
-Memory allocation (code space): 30
-------------------------------------------------------------------
- 0 26 Bra
- 3 20 CBra 1
- 8 Brazero
- 9 8 SCond
- 12 1 Cond ref
- 15 0
- 17 3 Alt
- 20 11 KetRmax
- 23 20 Ket
- 26 26 Ket
- 29 End
-------------------------------------------------------------------
-
-/[a]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 a
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[a]/8BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 a
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[\xaa]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 \xaa
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[\xaa]/8BM
-Memory allocation (code space): 10
-------------------------------------------------------------------
- 0 6 Bra
- 3 \x{aa}
- 6 6 Ket
- 9 End
-------------------------------------------------------------------
-
-/[^a]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 [^a]
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[^a]/8BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 [^a]
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[^\xaa]/BM
-Memory allocation (code space): 9
-------------------------------------------------------------------
- 0 5 Bra
- 3 [^\xaa]
- 5 5 Ket
- 8 End
-------------------------------------------------------------------
-
-/[^\xaa]/8BM
-Memory allocation (code space): 40
-------------------------------------------------------------------
- 0 36 Bra
- 3 [\x00-\xa9\xab-\xff] (neg)
- 36 36 Ket
- 39 End
-------------------------------------------------------------------
-
-/[^\d]/8WB
-------------------------------------------------------------------
- 0 11 Bra
- 3 [^\p{Nd}]
- 11 11 Ket
- 14 End
-------------------------------------------------------------------
-
-/[[:^alpha:][:^cntrl:]]+/8WB
-------------------------------------------------------------------
- 0 44 Bra
- 3 [ -~\x80-\xff\P{L}]+
- 44 44 Ket
- 47 End
-------------------------------------------------------------------
-
-/[[:^cntrl:][:^alpha:]]+/8WB
-------------------------------------------------------------------
- 0 44 Bra
- 3 [ -~\x80-\xff\P{L}]+
- 44 44 Ket
- 47 End
-------------------------------------------------------------------
-
-/[[:alpha:]]+/8WB
-------------------------------------------------------------------
- 0 12 Bra
- 3 [\p{L}]+
- 12 12 Ket
- 15 End
-------------------------------------------------------------------
-
-/[[:^alpha:]\S]+/8WB
-------------------------------------------------------------------
- 0 15 Bra
- 3 [\P{L}\P{Xsp}]+
- 15 15 Ket
- 18 End
-------------------------------------------------------------------
-
-/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
-------------------------------------------------------------------
- 0 79 Bra
- 3 abc
- 9 7 CBra 1
- 14 d
- 16 5 Alt
- 19 e
- 21 12 Ket
- 24 *THEN 24
- 27 x
- 29 16 CBra 2
- 34 123
- 40 *THEN 11
- 43 4
- 45 31 Alt
- 48 567
- 54 7 CBra 3
- 59 b
- 61 5 Alt
- 64 q
- 66 12 Ket
- 69 *THEN 24
- 72 xx
- 76 47 Ket
- 79 79 Ket
- 82 End
-------------------------------------------------------------------
-
-/-- End of testinput10 --/
+/^\p{Cc}/8
+ \x{017}
+ 0: \x{17}
+ \x{09f}
+ 0: \x{9f}
+ ** Failers
+No match
+ \x{0600}
+No match
+
+/^\p{Cf}/8
+ \x{601}
+ 0: \x{601}
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Cn}/8
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Co}/8
+ \x{f8ff}
+ 0: \x{f8ff}
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Cs}/8
+ \?\x{dfff}
+ 0: \x{dfff}
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Ll}/8
+ a
+ 0: a
+ ** Failers
+No match
+ Z
+No match
+ \x{e000}
+No match
+
+/^\p{Lm}/8
+ \x{2b0}
+ 0: \x{2b0}
+ ** Failers
+No match
+ a
+No match
+
+/^\p{Lo}/8
+ \x{1bb}
+ 0: \x{1bb}
+ ** Failers
+No match
+ a
+No match
+ \x{2b0}
+No match
+
+/^\p{Lt}/8
+ \x{1c5}
+ 0: \x{1c5}
+ ** Failers
+No match
+ a
+No match
+ \x{2b0}
+No match
+
+/^\p{Lu}/8
+ A
+ 0: A
+ ** Failers
+No match
+ \x{2b0}
+No match
+
+/^\p{Mc}/8
+ \x{903}
+ 0: \x{903}
+ ** Failers
+No match
+ X
+No match
+ \x{300}
+No match
+
+/^\p{Me}/8
+ \x{488}
+ 0: \x{488}
+ ** Failers
+No match
+ X
+No match
+ \x{903}
+No match
+ \x{300}
+No match
+
+/^\p{Mn}/8
+ \x{300}
+ 0: \x{300}
+ ** Failers
+No match
+ X
+No match
+ \x{903}
+No match
+
+/^\p{Nd}+/8
+ 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
+ 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
+ 1: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}
+ 2: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}
+ 3: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}
+ 4: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}
+ 5: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}
+ 6: 0123456789\x{660}\x{661}\x{662}\x{663}
+ 7: 0123456789\x{660}\x{661}\x{662}
+ 8: 0123456789\x{660}\x{661}
+ 9: 0123456789\x{660}
+10: 0123456789
+11: 012345678
+12: 01234567
+13: 0123456
+14: 012345
+15: 01234
+16: 0123
+17: 012
+18: 01
+19: 0
+ \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
+ 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
+ 1: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}
+ 2: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}
+ 3: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}
+ 4: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}
+ 5: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}
+ 6: \x{6f0}\x{6f1}\x{6f2}\x{6f3}
+ 7: \x{6f0}\x{6f1}\x{6f2}
+ 8: \x{6f0}\x{6f1}
+ 9: \x{6f0}
+ \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
+ 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
+ 1: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}
+ 2: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}
+ 3: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}
+ 4: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}
+ 5: \x{966}\x{967}\x{968}\x{969}\x{96a}
+ 6: \x{966}\x{967}\x{968}\x{969}
+ 7: \x{966}\x{967}\x{968}
+ 8: \x{966}\x{967}
+ 9: \x{966}
+ ** Failers
+No match
+ X
+No match
+
+/^\p{Nl}/8
+ \x{16ee}
+ 0: \x{16ee}
+ ** Failers
+No match
+ X
+No match
+ \x{966}
+No match
+
+/^\p{No}/8
+ \x{b2}
+ 0: \x{b2}
+ \x{b3}
+ 0: \x{b3}
+ ** Failers
+No match
+ X
+No match
+ \x{16ee}
+No match
+
+/^\p{Pc}/8
+ \x5f
+ 0: _
+ \x{203f}
+ 0: \x{203f}
+ ** Failers
+No match
+ X
+No match
+ -
+No match
+ \x{58a}
+No match
+
+/^\p{Pd}/8
+ -
+ 0: -
+ \x{58a}
+ 0: \x{58a}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Pe}/8
+ )
+ 0: )
+ ]
+ 0: ]
+ }
+ 0: }
+ \x{f3b}
+ 0: \x{f3b}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+ (
+No match
+ [
+No match
+ {
+No match
+ \x{f3c}
+No match
+
+/^\p{Pf}/8
+ \x{bb}
+ 0: \x{bb}
+ \x{2019}
+ 0: \x{2019}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Pi}/8
+ \x{ab}
+ 0: \x{ab}
+ \x{2018}
+ 0: \x{2018}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Po}/8
+ !
+ 0: !
+ \x{37e}
+ 0: \x{37e}
+ ** Failers
+ 0: *
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Ps}/8
+ (
+ 0: (
+ [
+ 0: [
+ {
+ 0: {
+ \x{f3c}
+ 0: \x{f3c}
+ ** Failers
+No match
+ X
+No match
+ )
+No match
+ ]
+No match
+ }
+No match
+ \x{f3b}
+No match
+
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ 0: $\x{a2}\x{a3}\x{a4}\x{a5}
+ 1: $\x{a2}\x{a3}\x{a4}
+ 2: $\x{a2}\x{a3}
+ 3: $\x{a2}
+ 4: $
+ \x{9f2}
+ 0: \x{9f2}
+ ** Failers
+No match
+ X
+No match
+ \x{2c2}
+No match
+
+/^\p{Sk}/8
+ \x{2c2}
+ 0: \x{2c2}
+ ** Failers
+No match
+ X
+No match
+ \x{9f2}
+No match
+
+/^\p{Sm}+/8
+ +<|~\x{ac}\x{2044}
+ 0: +<|~\x{ac}\x{2044}
+ 1: +<|~\x{ac}
+ 2: +<|~
+ 3: +<|
+ 4: +<
+ 5: +
+ ** Failers
+No match
+ X
+No match
+ \x{9f2}
+No match
+
+/^\p{So}/8
+ \x{a6}
+ 0: \x{a6}
+ \x{482}
+ 0: \x{482}
+ ** Failers
+No match
+ X
+No match
+ \x{9f2}
+No match
+
+/^\p{Zl}/8
+ \x{2028}
+ 0: \x{2028}
+ ** Failers
+No match
+ X
+No match
+ \x{2029}
+No match
+
+/^\p{Zp}/8
+ \x{2029}
+ 0: \x{2029}
+ ** Failers
+No match
+ X
+No match
+ \x{2028}
+No match
+
+/^\p{Zs}/8
+ \ \
+ 0:
+ \x{a0}
+ 0: \x{a0}
+ \x{1680}
+ 0: \x{1680}
+ \x{180e}
+ 0: \x{180e}
+ \x{2000}
+ 0: \x{2000}
+ \x{2001}
+ 0: \x{2001}
+ ** Failers
+No match
+ \x{2028}
+No match
+ \x{200d}
+No match
+
+/\p{Nd}+(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+ 2: \x{660}\x{661}\x{662}
+
+/\p{Nd}+?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+ 2: \x{660}\x{661}\x{662}
+
+/\p{Nd}{2,}(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+
+/\p{Nd}{2,}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+
+/\p{Nd}*(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+ 2: \x{660}\x{661}\x{662}
+ 3: \x{660}\x{661}
+
+/\p{Nd}*?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+ 2: \x{660}\x{661}\x{662}
+ 3: \x{660}\x{661}
+
+/\p{Nd}{2}(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}A
+
+/\p{Nd}{2,3}(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+
+/\p{Nd}{2,3}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: \x{660}\x{661}\x{662}A
+
+/\p{Nd}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}
+ 1: \x{660}\x{661}
+
+/\p{Nd}??(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}
+ 1: \x{660}\x{661}
+
+/\p{Nd}*+(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+
+/\p{Nd}*+(...)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(....)/8
+ ** Failers
+ 0: ** F
+ \x{660}\x{661}\x{662}ABC
+No match
+
+/\p{Lu}/8i
+ A
+ 0: A
+ a\x{10a0}B
+ 0: \x{10a0}
+ ** Failers
+ 0: F
+ a
+No match
+ \x{1d00}
+No match
+
+/\p{^Lu}/8i
+ 1234
+ 0: 1
+ ** Failers
+ 0: *
+ ABC
+No match
+
+/\P{Lu}/8i
+ 1234
+ 0: 1
+ ** Failers
+ 0: *
+ ABC
+No match
+
+/(?<=A\p{Nd})XYZ/8
+ A2XYZ
+ 0: XYZ
+ 123A5XYZPQR
+ 0: XYZ
+ ABA\x{660}XYZpqr
+ 0: XYZ
+ ** Failers
+No match
+ AXYZ
+No match
+ XYZ
+No match
+
+/(?<!\pL)XYZ/8
+ 1XYZ
+ 0: XYZ
+ AB=XYZ..
+ 0: XYZ
+ XYZ
+ 0: XYZ
+ ** Failers
+No match
+ WXYZ
+No match
+
+/[\p{Nd}]/8
+ 1234
+ 0: 1
+
+/[\p{Nd}+-]+/8
+ 1234
+ 0: 1234
+ 1: 123
+ 2: 12
+ 3: 1
+ 12-34
+ 0: 12-34
+ 1: 12-3
+ 2: 12-
+ 3: 12
+ 4: 1
+ 12+\x{661}-34
+ 0: 12+\x{661}-34
+ 1: 12+\x{661}-3
+ 2: 12+\x{661}-
+ 3: 12+\x{661}
+ 4: 12+
+ 5: 12
+ 6: 1
+ ** Failers
+No match
+ abcd
+No match
+
+/[\P{Nd}]+/8
+ abcd
+ 0: abcd
+ 1: abc
+ 2: ab
+ 3: a
+ ** Failers
+ 0: ** Failers
+ 1: ** Failer
+ 2: ** Faile
+ 3: ** Fail
+ 4: ** Fai
+ 5: ** Fa
+ 6: ** F
+ 7: **
+ 8: **
+ 9: *
+ 1234
+No match
+
+/\D+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\P{Nd}+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/[\D]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/[\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/[\D\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\pL/8
+ a
+ 0: a
+ A
+ 0: A
+
+/\pL/8i
+ a
+ 0: a
+ A
+ 0: A
+
+/\p{Lu}/8
+ A
+ 0: A
+ aZ
+ 0: Z
+ ** Failers
+ 0: F
+ abc
+No match
+
+/\p{Lu}/8i
+ A
+ 0: A
+ aZ
+ 0: Z
+ ** Failers
+ 0: F
+ abc
+No match
+
+/\p{Ll}/8
+ a
+ 0: a
+ Az
+ 0: z
+ ** Failers
+ 0: a
+ ABC
+No match
+
+/\p{Ll}/8i
+ a
+ 0: a
+ Az
+ 0: z
+ ** Failers
+ 0: a
+ ABC
+No match
+
+/^\x{c0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/^\x{e0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ ** Failers
+No match
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+No match
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+No match
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+No match
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+No match
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+No match
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+ 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+ 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+
+/\x{391}+/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+ 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+ 1: \x{391}\x{3b1}\x{3b1}\x{3b1}
+ 2: \x{391}\x{3b1}\x{3b1}
+ 3: \x{391}\x{3b1}
+ 4: \x{391}
+
+/\x{391}{3,5}(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+ 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
+
+/\x{391}{3,5}?(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+ 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
+
+/[\x{391}\x{ff3a}]/8i
+ \x{391}
+ 0: \x{391}
+ \x{ff3a}
+ 0: \x{ff3a}
+ \x{3b1}
+ 0: \x{3b1}
+ \x{ff5a}
+ 0: \x{ff5a}
+
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/[\x{105}-\x{109}]/8i
+ \x{104}
+ 0: \x{104}
+ \x{105}
+ 0: \x{105}
+ \x{109}
+ 0: \x{109}
+ ** Failers
+No match
+ \x{100}
+No match
+ \x{10a}
+No match
+
+/[z-\x{100}]/8i
+ Z
+ 0: Z
+ z
+ 0: z
+ \x{39c}
+ 0: \x{39c}
+ \x{178}
+ 0: \x{178}
+ |
+ 0: |
+ \x{80}
+ 0: \x{80}
+ \x{ff}
+ 0: \x{ff}
+ \x{100}
+ 0: \x{100}
+ \x{101}
+ 0: \x{101}
+ ** Failers
+No match
+ \x{102}
+No match
+ Y
+No match
+ y
+No match
+
+/[z-\x{100}]/8i
+
+/^\X/8
+ A
+ 0: A
+ A\x{300}BC
+ 0: A\x{300}
+ A\x{300}\x{301}\x{302}BC
+ 0: A\x{300}\x{301}\x{302}
+ *** Failers
+ 0: *
+ \x{300}
+No match
+
+/^[\X]/8
+ X123
+ 0: X
+ *** Failers
+No match
+ AXYZ
+No match
+
+/^(\X*)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BC
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 1: A\x{300}\x{301}\x{302}BC
+
+/^(\X*?)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BC
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 1: A\x{300}\x{301}\x{302}BC
+
+/^(\X*)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BCA
+ 1: A\x{300}\x{301}\x{302}BC
+ 2: A\x{300}\x{301}\x{302}B
+ 3: A
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 1: A\x{300}\x{301}\x{302}BCA
+ 2: A\x{300}\x{301}\x{302}BC
+ 3: A\x{300}\x{301}\x{302}B
+ 4: A
+
+/^(\X*?)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BCA
+ 1: A\x{300}\x{301}\x{302}BC
+ 2: A\x{300}\x{301}\x{302}B
+ 3: A
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 1: A\x{300}\x{301}\x{302}BCA
+ 2: A\x{300}\x{301}\x{302}BC
+ 3: A\x{300}\x{301}\x{302}B
+ 4: A
+
+/^\X(.)/8
+ *** Failers
+ 0: **
+ A\x{300}\x{301}\x{302}
+No match
+
+/^\X{2,3}(.)/8
+ A\x{300}\x{301}B\x{300}X
+ 0: A\x{300}\x{301}B\x{300}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ 0: A\x{300}\x{301}B\x{300}C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 1: A\x{300}\x{301}B\x{300}C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+ 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
+ 1: A\x{300}\x{301}B\x{300}C
+
+/^\X{2,3}?(.)/8
+ A\x{300}\x{301}B\x{300}X
+ 0: A\x{300}\x{301}B\x{300}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ 0: A\x{300}\x{301}B\x{300}C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 1: A\x{300}\x{301}B\x{300}C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+ 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
+ 1: A\x{300}\x{301}B\x{300}C
+
+/^\pN{2,3}X/
+ 12X
+ 0: 12X
+ 123X
+ 0: 123X
+ *** Failers
+No match
+ X
+No match
+ 1X
+No match
+ 1234X
+No match
+
+/\x{100}/i8
+ \x{100}
+ 0: \x{100}
+ \x{101}
+ 0: \x{101}
+
+/^\p{Han}+/8
+ \x{2e81}\x{3007}\x{2f804}\x{31a0}
+ 0: \x{2e81}\x{3007}\x{2f804}
+ 1: \x{2e81}\x{3007}
+ 2: \x{2e81}
+ ** Failers
+No match
+ \x{2e7f}
+No match
+
+/^\P{Katakana}+/8
+ \x{3105}
+ 0: \x{3105}
+ ** Failers
+ 0: ** Failers
+ 1: ** Failer
+ 2: ** Faile
+ 3: ** Fail
+ 4: ** Fai
+ 5: ** Fa
+ 6: ** F
+ 7: **
+ 8: **
+ 9: *
+ \x{30ff}
+No match
+
+/^[\p{Arabic}]/8
+ \x{06e9}
+ 0: \x{6e9}
+ \x{060b}
+ 0: \x{60b}
+ ** Failers
+No match
+ X\x{06e9}
+No match
+
+/^[\P{Yi}]/8
+ \x{2f800}
+ 0: \x{2f800}
+ ** Failers
+ 0: *
+ \x{a014}
+No match
+ \x{a4c6}
+No match
+
+/^\p{Any}X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ X
+No match
+
+/^\P{Any}X/8
+ ** Failers
+No match
+ AX
+No match
+
+/^\p{Any}?X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ ABXYZ
+No match
+
+/^\P{Any}?X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ ABXYZ
+No match
+
+/^\p{Any}+X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+ XYZ
+No match
+
+/^\P{Any}+X/8
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+ XYZ
+No match
+
+/^\p{Any}*X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+
+/^\P{Any}*X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+
+/^[\p{Any}]X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ X
+No match
+
+/^[\P{Any}]X/8
+ ** Failers
+No match
+ AX
+No match
+
+/^[\p{Any}]?X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ ** Failers
+No match
+ ABXYZ
+No match
+
+/^[\P{Any}]?X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ ABXYZ
+No match
+
+/^[\p{Any}]+X/8
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+ XYZ
+No match
+
+/^[\P{Any}]+X/8
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+ XYZ
+No match
+
+/^[\p{Any}]*X/8
+ XYZ
+ 0: X
+ AXYZ
+ 0: AX
+ \x{1234}XYZ
+ 0: \x{1234}X
+ A\x{1234}XYZ
+ 0: A\x{1234}X
+ ** Failers
+No match
+
+/^[\P{Any}]*X/8
+ XYZ
+ 0: X
+ ** Failers
+No match
+ AXYZ
+No match
+ \x{1234}XYZ
+No match
+ A\x{1234}XYZ
+No match
+
+/^\p{Any}{3,5}?/8
+ abcdefgh
+ 0: abcde
+ 1: abcd
+ 2: abc
+ \x{1234}\n\r\x{3456}xyz
+ 0: \x{1234}\x{0a}\x{0d}\x{3456}x
+ 1: \x{1234}\x{0a}\x{0d}\x{3456}
+ 2: \x{1234}\x{0a}\x{0d}
+
+/^\p{Any}{3,5}/8
+ abcdefgh
+ 0: abcde
+ 1: abcd
+ 2: abc
+ \x{1234}\n\r\x{3456}xyz
+ 0: \x{1234}\x{0a}\x{0d}\x{3456}x
+ 1: \x{1234}\x{0a}\x{0d}\x{3456}
+ 2: \x{1234}\x{0a}\x{0d}
+
+/^\P{Any}{3,5}?/8
+ ** Failers
+No match
+ abcdefgh
+No match
+ \x{1234}\n\r\x{3456}xyz
+No match
+
+/^\p{L&}X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ \x{1c5}XY
+ 0: \x{1c5}X
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ \x{1c5}XY
+ 0: \x{1c5}X
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\p{L&}+X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]+X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\p{L&}+?X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^[\p{L&}]+?X/8
+ AXY
+ 0: AX
+ aXY
+ 0: aX
+ AbcdeXyz
+ 0: AbcdeX
+ \x{1c5}AbXY
+ 0: \x{1c5}AbX
+ abcDEXypqreXlmn
+ 0: abcDEXypqreX
+ 1: abcDEX
+ ** Failers
+No match
+ \x{1bb}XY
+No match
+ \x{2b0}XY
+No match
+ !XY
+No match
+
+/^\P{L&}X/8
+ !XY
+ 0: !X
+ \x{1bb}XY
+ 0: \x{1bb}X
+ \x{2b0}XY
+ 0: \x{2b0}X
+ ** Failers
+No match
+ \x{1c5}XY
+No match
+ AXY
+No match
+
+/^[\P{L&}]X/8
+ !XY
+ 0: !X
+ \x{1bb}XY
+ 0: \x{1bb}X
+ \x{2b0}XY
+ 0: \x{2b0}X
+ ** Failers
+No match
+ \x{1c5}XY
+No match
+ AXY
+No match
+
+/^\x{023a}+?(\x{0130}+)/8i
+ \x{023a}\x{2c65}\x{0130}
+ 0: \x{23a}\x{2c65}\x{130}
+
+/^\x{023a}+([^X])/8i
+ \x{023a}\x{2c65}X
+ 0: \x{23a}\x{2c65}
+
+/\x{c0}+\x{116}+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+ 0: \x{c0}\x{e0}\x{116}\x{117}
+ 1: \x{c0}\x{e0}\x{116}
+
+/[\x{c0}\x{116}]+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+ 0: \x{c0}\x{e0}\x{116}\x{117}
+ 1: \x{c0}\x{e0}\x{116}
+ 2: \x{c0}\x{e0}
+ 3: \x{c0}
+
+/Check property support in non-UTF-8 mode/
+
+/\p{L}{4}/
+ 123abcdefg
+ 0: abcd
+ 123abc\xc4\xc5zz
+ 0: abc\xc4
+
+/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
+ \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
+ 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
+
+/\x{a77d}\x{1d79}/8i
+ \x{a77d}\x{1d79}
+ 0: \x{a77d}\x{1d79}
+ \x{1d79}\x{a77d}
+ 0: \x{1d79}\x{a77d}
+
+/\x{a77d}\x{1d79}/8
+ \x{a77d}\x{1d79}
+ 0: \x{a77d}\x{1d79}
+ ** Failers
+No match
+ \x{1d79}\x{a77d}
+No match
+
+/^\p{Xan}/8
+ ABCD
+ 0: A
+ 1234
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ ** Failers
+No match
+ _ABC
+No match
+
+/^\p{Xan}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ 1: ABCD1234\x{6ca}\x{a6c}
+ 2: ABCD1234\x{6ca}
+ 3: ABCD1234
+ 4: ABCD123
+ 5: ABCD12
+ 6: ABCD1
+ 7: ABCD
+ 8: ABC
+ 9: AB
+10: A
+ ** Failers
+No match
+ _ABC
+No match
+
+/^\p{Xan}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ 1: ABCD1234\x{6ca}\x{a6c}
+ 2: ABCD1234\x{6ca}
+ 3: ABCD1234
+ 4: ABCD123
+ 5: ABCD12
+ 6: ABCD1
+ 7: ABCD
+ 8: ABC
+ 9: AB
+10: A
+11:
+
+/^\p{Xan}{2,9}/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}
+ 1: ABCD1234
+ 2: ABCD123
+ 3: ABCD12
+ 4: ABCD1
+ 5: ABCD
+ 6: ABC
+ 7: AB
+
+/^[\p{Xan}]/8
+ ABCD1234_
+ 0: A
+ 1234abcd_
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ ** Failers
+No match
+ _ABC
+No match
+
+/^[\p{Xan}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ 1: ABCD1234\x{6ca}\x{a6c}
+ 2: ABCD1234\x{6ca}
+ 3: ABCD1234
+ 4: ABCD123
+ 5: ABCD12
+ 6: ABCD1
+ 7: ABCD
+ 8: ABC
+ 9: AB
+10: A
+ ** Failers
+No match
+ _ABC
+No match
+
+/^>\p{Xsp}/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
+ ** Failers
+No match
+ \x{0b}
+No match
+
+/^>\p{Xsp}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}
+ 4: > \x{09}\x{0a}\x{0c}
+ 5: > \x{09}\x{0a}
+ 6: > \x{09}
+ 7: >
+
+/^>\p{Xsp}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}
+ 4: > \x{09}\x{0a}\x{0c}
+ 5: > \x{09}\x{0a}
+ 6: > \x{09}
+ 7: >
+ 8: >
+
+/^>\p{Xsp}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}
+ 4: > \x{09}\x{0a}\x{0c}
+ 5: > \x{09}\x{0a}
+ 6: > \x{09}
+
+/^>[\p{Xsp}]/8
+ >\x{2028}\x{0b}
+ 0: >\x{2028}
+
+/^>[\p{Xsp}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}
+ 4: > \x{09}\x{0a}\x{0c}
+ 5: > \x{09}\x{0a}
+ 6: > \x{09}
+ 7: >
+
+/^>\p{Xps}/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
+ >\x{a0}
+ 0: >\x{a0}
+ ** Failers
+No match
+ \x{0b}
+No match
+
+/^>\p{Xps}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 4: > \x{09}\x{0a}\x{0c}\x{0d}
+ 5: > \x{09}\x{0a}\x{0c}
+ 6: > \x{09}\x{0a}
+ 7: > \x{09}
+ 8: >
+
+/^>\p{Xps}+?/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}\x{2028}\x{0b}
+ 1: >\x{1680}\x{2028}
+ 2: >\x{1680}
+
+/^>\p{Xps}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 4: > \x{09}\x{0a}\x{0c}\x{0d}
+ 5: > \x{09}\x{0a}\x{0c}
+ 6: > \x{09}\x{0a}
+ 7: > \x{09}
+ 8: >
+ 9: >
+
+/^>\p{Xps}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 4: > \x{09}\x{0a}\x{0c}\x{0d}
+ 5: > \x{09}\x{0a}\x{0c}
+ 6: > \x{09}\x{0a}
+ 7: > \x{09}
+
+/^>\p{Xps}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 4: > \x{09}\x{0a}\x{0c}\x{0d}
+ 5: > \x{09}\x{0a}\x{0c}
+ 6: > \x{09}\x{0a}
+ 7: > \x{09}
+
+/^>[\p{Xps}]/8
+ >\x{2028}\x{0b}
+ 0: >\x{2028}
+
+/^>[\p{Xps}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+ 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
+ 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
+ 4: > \x{09}\x{0a}\x{0c}\x{0d}
+ 5: > \x{09}\x{0a}\x{0c}
+ 6: > \x{09}\x{0a}
+ 7: > \x{09}
+ 8: >
+
+/^\p{Xwd}/8
+ ABCD
+ 0: A
+ 1234
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ _ABC
+ 0: _
+ ** Failers
+No match
+ []
+No match
+
+/^\p{Xwd}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ 2: ABCD1234\x{6ca}\x{a6c}
+ 3: ABCD1234\x{6ca}
+ 4: ABCD1234
+ 5: ABCD123
+ 6: ABCD12
+ 7: ABCD1
+ 8: ABCD
+ 9: ABC
+10: AB
+11: A
+
+/^\p{Xwd}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ 2: ABCD1234\x{6ca}\x{a6c}
+ 3: ABCD1234\x{6ca}
+ 4: ABCD1234
+ 5: ABCD123
+ 6: ABCD12
+ 7: ABCD1
+ 8: ABCD
+ 9: ABC
+10: AB
+11: A
+12:
+
+/^\p{Xwd}{2,9}/8
+ A_12\x{6ca}\x{a6c}\x{10a7}
+ 0: A_12\x{6ca}\x{a6c}\x{10a7}
+ 1: A_12\x{6ca}\x{a6c}
+ 2: A_12\x{6ca}
+ 3: A_12
+ 4: A_1
+ 5: A_
+
+/^[\p{Xwd}]/8
+ ABCD1234_
+ 0: A
+ 1234abcd_
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ _ABC
+ 0: _
+ ** Failers
+No match
+ []
+No match
+
+/^[\p{Xwd}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ 2: ABCD1234\x{6ca}\x{a6c}
+ 3: ABCD1234\x{6ca}
+ 4: ABCD1234
+ 5: ABCD123
+ 6: ABCD12
+ 7: ABCD1
+ 8: ABCD
+ 9: ABC
+10: AB
+11: A
+
+/-- Unicode properties for \b abd \B --/
+
+/\b...\B/8W
+ abc_
+ 0: abc
+ \x{37e}abc\x{376}
+ 0: abc
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ 0: \x{376}\x{371}\x{393}
+ !\x{c0}++\x{c1}\x{c2}
+ 0: ++\x{c1}
+ !\x{c0}+++++
+ 0: \x{c0}++
+
+/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
+
+/\b...\B/8
+ abc_
+ 0: abc
+ ** Failers
+ 0: Fai
+ \x{37e}abc\x{376}
+No match
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+No match
+ !\x{c0}++\x{c1}\x{c2}
+No match
+ !\x{c0}+++++
+No match
+
+/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
+
+/\b...\B/W
+ abc_
+ 0: abc
+ !\x{c0}++\x{c1}\x{c2}
+ 0: ++\xc1
+ !\x{c0}+++++
+ 0: \xc0++
+
+/-- Caseless single negated characters > 127 need UCP support --/
+
+/[^\x{100}]/8i
+ \x{100}\x{101}X
+ 0: X
+
+/[^\x{100}]+/8i
+ \x{100}\x{101}XX
+ 0: XX
+ 1: X
+
+/^\X/8
+ A\P
+ 0: A
+ A\P\P
+Partial match: A
+ A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}
+ A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}
+ A\x{301}\P
+ 0: A\x{301}
+ A\x{301}\P\P
+Partial match: A\x{301}
+
+/^\X{2,3}/8
+ A\P
+Partial match: A
+ A\P\P
+Partial match: A
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+ A\x{300}\x{301}\P
+Partial match: A\x{300}\x{301}
+ A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}A\x{300}\x{301}
+
+/^\X{2}/8
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}A\x{300}\x{301}
+
+/^\X+/8
+ AA\P
+ 0: AA
+ 1: A
+ AA\P\P
+Partial match: AA
+
+/^\X+?Z/8
+ AA\P
+Partial match: AA
+ AA\P\P
+Partial match: AA
+
+/-- End of testinput10 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2
index 531d617f0..77b108c80 100644
--- a/ext/pcre/pcrelib/testdata/testoutput2
+++ b/ext/pcre/pcrelib/testdata/testoutput2
@@ -3,12 +3,11 @@
It also checks the non-Perl syntax the PCRE supports (Python, .NET,
Oniguruma). Finally, there are some tests where PCRE and Perl differ,
either because PCRE can't be compatible, or there is a possible Perl
- bug. --/
+ bug.
+
+ NOTE: This is a non-UTF set of tests. When UTF support is needed, use
+ test 5, and if Unicode Property Support is needed, use test 7. --/
-/-- Originally, the Perl >= 5.10 things were in here too, but now I have
- separated many (most?) of them out into test 11. However, there may still
- be some that were overlooked. --/
-
/(a)b|/I
Capturing subpattern count = 1
No options
@@ -377,61 +376,6 @@ No need char
2: <unset>
3: def
-/abc/P
- abc
- 0: abc
- *** Failers
-No match: POSIX code 17: match failed
-
-/^abc|def/P
- abcdef
- 0: abc
- abcdef\B
- 0: def
-
-/.*((abc)$|(def))/P
- defabc
- 0: defabc
- 1: abc
- 2: abc
- \Zdefabc
- 0: def
- 1: def
- 3: def
-
-/the quick brown fox/P
- the quick brown fox
- 0: the quick brown fox
- *** Failers
-No match: POSIX code 17: match failed
- The Quick Brown Fox
-No match: POSIX code 17: match failed
-
-/the quick brown fox/Pi
- the quick brown fox
- 0: the quick brown fox
- The Quick Brown Fox
- 0: The Quick Brown Fox
-
-/abc.def/P
- *** Failers
-No match: POSIX code 17: match failed
- abc\ndef
-No match: POSIX code 17: match failed
-
-/abc$/P
- abc
- 0: abc
- abc\n
- 0: abc
-
-/(abc)\2/P
-Failed: POSIX code 15: bad back reference at offset 7
-
-/(abc\1)/P
- abc
-No match: POSIX code 17: match failed
-
/)/
Failed: unmatched parentheses at offset 0
@@ -507,6 +451,7 @@ Capturing subpattern count = 0
No options
First char = 'f'
Need char = 'o'
+Max lookbehind = 6
foo
0: foo
catfoo
@@ -632,10 +577,8 @@ Need char = 'h' (caseless)
------------------------------------------------------------------
Bra
CBra 1
- 01 Opt
- NC b
+ /i b
Ket
- 00 Opt
Ket
End
------------------------------------------------------------------
@@ -716,6 +659,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Max lookbehind = 3
Subject length lower bound = 1
Starting byte set: a b
@@ -724,6 +668,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'a'
+Max lookbehind = 3
Subject length lower bound = 5
Starting byte set: a o
@@ -741,6 +686,7 @@ Contains explicit CR or LF match
Options: multiline
No first char
Need char = 'r'
+Max lookbehind = 4
foo\nbarbar
0: bar
***Failers
@@ -758,6 +704,7 @@ Contains explicit CR or LF match
Options: multiline
First char at start or follows newline
Need char = 'r'
+Max lookbehind = 4
foo\nbarbar
0: bar
***Failers
@@ -799,6 +746,7 @@ Capturing subpattern count = 0
No options
First char = '-'
Need char = 't'
+Max lookbehind = 7
the bullock-cart
0: -cart
a donkey-cart race
@@ -815,12 +763,14 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Max lookbehind = 3
/(?>.*)(?<=(abcd)|(xyz))/I
Capturing subpattern count = 2
No options
First char at start or follows newline
No need char
+Max lookbehind = 4
alphabetabcd
0: alphabetabcd
1: abcd
@@ -834,6 +784,7 @@ Capturing subpattern count = 0
No options
First char = 'Z'
Need char = 'Z'
+Max lookbehind = 4
abxyZZ
0: ZZ
abXyZZ
@@ -862,6 +813,7 @@ Capturing subpattern count = 1
No options
First char = 'b'
Need char = 'r'
+Max lookbehind = 4
bar
0: bar
foobbar
@@ -1033,9 +985,6 @@ Failed: numbers out of order in {} quantifier at offset 7
/abc/\
Failed: \ at end of pattern at offset 4
-/abc/\P
-Failed: POSIX code 9: bad escape sequence at offset 4
-
/abc/\i
Failed: \ at end of pattern at offset 4
@@ -1151,7 +1100,7 @@ No first char
No need char
abc\00def\L\C0
0: abc\x00def
- 0C abc (7)
+ 0C abc\x00def (7)
0L abc
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
@@ -1247,15 +1196,12 @@ No need char
------------------------------------------------------------------
Bra
Bra
- 04 Opt
AllAny*
X
Alt
- 04 Opt
^
B
Ket
- 00 Opt
Ket
End
------------------------------------------------------------------
@@ -1269,11 +1215,7 @@ Capturing subpattern count = 0
No options
First char = 'i'
Need char = 's'
- Mississippi
- 0: iss
- 0+ issippi
-
-/\Biss\B/I+P
+Max lookbehind = 1
Mississippi
0: iss
0+ issippi
@@ -1294,6 +1236,7 @@ Capturing subpattern count = 0
No options
First char = 'i'
Need char = 's'
+Max lookbehind = 1
Mississippi
0: iss
0+ issippi
@@ -1303,6 +1246,7 @@ Capturing subpattern count = 0
No options
First char = 'i'
Need char = 's'
+Max lookbehind = 1
Mississippi
0: iss
0+ issippi
@@ -1318,6 +1262,7 @@ Capturing subpattern count = 0
No options
First char = 'i'
Need char = 's'
+Max lookbehind = 1
Mississippi
0: iss
0+ issippi
@@ -1329,6 +1274,7 @@ Capturing subpattern count = 0
No options
First char = 'i'
Need char = 's'
+Max lookbehind = 1
Mississippi
0: iss
0+ issippi
@@ -1407,7 +1353,7 @@ Capturing subpattern count = 0
Contains explicit CR or LF match
Options: multiline
First char at start or follows newline
-Need char = 10
+Need char = \x0a
ab\nab\ncd
0: ab\x0a
0+ ab\x0acd
@@ -1509,6 +1455,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Max lookbehind = 3
/abc(?!pqr)/I
Capturing subpattern count = 0
@@ -1694,33 +1641,6 @@ No need char
\Nabc
No match
-/a*(b+)(z)(z)/P
- aaaabbbbzzzz
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- 0: aaaabbbbzz
- aaaabbbbzzzz\O2
- 0: aaaabbbbzz
- 1: bbbb
- aaaabbbbzzzz\O3
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- aaaabbbbzzzz\O4
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
- aaaabbbbzzzz\O5
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
-
/^.?abcd/IS
Capturing subpattern count = 0
Options: anchored
@@ -2764,8 +2684,7 @@ No need char
------------------------------------------------------------------
Bra
a
- 01 Opt
- NC b
+ /i b
Ket
End
------------------------------------------------------------------
@@ -2787,10 +2706,8 @@ No match
Bra
CBra 1
a
- 01 Opt
- NC b
+ /i b
Ket
- 00 Opt
Ket
End
------------------------------------------------------------------
@@ -2812,7 +2729,7 @@ No match
/ (?i)abc/IxDZ
------------------------------------------------------------------
Bra
- NC abc
+ /i abc
Ket
End
------------------------------------------------------------------
@@ -2825,7 +2742,7 @@ Need char = 'c' (caseless)
(?i)abc/IxDZ
------------------------------------------------------------------
Bra
- NC abc
+ /i abc
Ket
End
------------------------------------------------------------------
@@ -2998,12 +2915,10 @@ No need char
/(x)*+/DZ
------------------------------------------------------------------
Bra
- Once
- Brazero
- CBra 1
+ Braposzero
+ CBraPos 1
x
- KetRmax
- Ket
+ KetRpos
Ket
End
------------------------------------------------------------------
@@ -3321,6 +3236,7 @@ Capturing subpattern count = 0
No options
First char = '8'
Need char = 'X'
+Max lookbehind = 1
|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
------------------------------------------------------------------
@@ -3334,6 +3250,7 @@ Capturing subpattern count = 0
No options
First char = '$'
Need char = 'X'
+Max lookbehind = 1
/(.*)\d+\1/I
Capturing subpattern count = 1
@@ -3590,7 +3507,27 @@ Need char = 'f'
1 ^ ^ f
0: abcdef
-/(?C1)\dabc(?C2)def/I
+/(?C1)\dabc(?C2)def/IS
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'f'
+Subject length lower bound = 7
+Starting byte set: 0 1 2 3 4 5 6 7 8 9
+ 1234abcdef
+--->1234abcdef
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 2 ^ ^ d
+ 0: 4abcdef
+ *** Failers
+No match
+ abcdef
+No match
+
+/(?C1)\dabc(?C2)def/ISS
Capturing subpattern count = 0
No options
No first char
@@ -3829,6 +3766,7 @@ Capturing subpattern count = 1
No options
First char = 'x'
Need char = 'z'
+Max lookbehind = 3
abcxyz\C+
Callout 0: last capture = 1
0: <unset>
@@ -3994,9 +3932,7 @@ Need char = '<'
Bra
CBra 1
a
- Once
Recurse
- Ket
b
Ket
Ket
@@ -4217,9 +4153,7 @@ Need char = 'a'
Any
\1
bbb
- Once
Recurse
- Ket
d
Ket
End
@@ -4591,9 +4525,7 @@ Need char = ']'
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -4613,9 +4545,7 @@ No need char
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
KetRmax
@@ -4636,9 +4566,7 @@ No need char
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -4647,9 +4575,7 @@ No need char
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -4788,7 +4714,51 @@ Need char = 'e'
+4 ^ ^ e
No match
-/a*b/ICDZ
+/a*b/ICDZS
+------------------------------------------------------------------
+ Bra
+ Callout 255 0 2
+ a*+
+ Callout 255 2 1
+ b
+ Callout 255 3 0
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options:
+No first char
+Need char = 'b'
+Subject length lower bound = 1
+Starting byte set: a b
+ ab
+--->ab
+ +0 ^ a*
+ +2 ^^ b
+ +3 ^ ^
+ 0: ab
+ aaaab
+--->aaaab
+ +0 ^ a*
+ +2 ^ ^ b
+ +3 ^ ^
+ 0: aaaab
+ aaaacb
+--->aaaacb
+ +0 ^ a*
+ +2 ^ ^ b
+ +0 ^ a*
+ +2 ^ ^ b
+ +0 ^ a*
+ +2 ^ ^ b
+ +0 ^ a*
+ +2 ^^ b
+ +0 ^ a*
+ +2 ^ b
+ +3 ^^
+ 0: b
+
+/a*b/ICDZSS
------------------------------------------------------------------
Bra
Callout 255 0 2
@@ -4871,7 +4841,7 @@ Need char = 'b'
+2 ^^ b
No match
-/(abc|def)x/ICDZ
+/(abc|def)x/ICDZS
------------------------------------------------------------------
Bra
Callout 255 0 9
@@ -4902,6 +4872,8 @@ Capturing subpattern count = 1
Options:
No first char
Need char = 'x'
+Subject length lower bound = 4
+Starting byte set: a d
abcx
--->abcx
+0 ^ (abc|def)
@@ -4925,6 +4897,82 @@ Need char = 'x'
+10 ^ ^
0: defx
1: def
+ ** Failers
+No match
+ abcdefzx
+--->abcdefzx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ c
+ +4 ^ ^ |
+ +9 ^ ^ x
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +6 ^^ e
+ +7 ^ ^ f
+ +8 ^ ^ )
+ +9 ^ ^ x
+No match
+
+/(abc|def)x/ICDZSS
+------------------------------------------------------------------
+ Bra
+ Callout 255 0 9
+ CBra 1
+ Callout 255 1 1
+ a
+ Callout 255 2 1
+ b
+ Callout 255 3 1
+ c
+ Callout 255 4 0
+ Alt
+ Callout 255 5 1
+ d
+ Callout 255 6 1
+ e
+ Callout 255 7 1
+ f
+ Callout 255 8 0
+ Ket
+ Callout 255 9 1
+ x
+ Callout 255 10 0
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options:
+No first char
+Need char = 'x'
+ abcx
+--->abcx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ c
+ +4 ^ ^ |
+ +9 ^ ^ x
++10 ^ ^
+ 0: abcx
+ 1: abc
+ defx
+--->defx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +6 ^^ e
+ +7 ^ ^ f
+ +8 ^ ^ )
+ +9 ^ ^ x
++10 ^ ^
+ 0: defx
+ 1: def
+ ** Failers
+No match
abcdefzx
--->abcdefzx
+0 ^ (abc|def)
@@ -5025,7 +5073,58 @@ No need char
0: abcdcdcd
1: cd
-/([ab]{,4}c|xy)/ICDZ
+/([ab]{,4}c|xy)/ICDZS
+------------------------------------------------------------------
+ Bra
+ Callout 255 0 14
+ CBra 1
+ Callout 255 1 4
+ [ab]
+ Callout 255 5 1
+ {
+ Callout 255 6 1
+ ,
+ Callout 255 7 1
+ 4
+ Callout 255 8 1
+ }
+ Callout 255 9 1
+ c
+ Callout 255 10 0
+ Alt
+ Callout 255 11 1
+ x
+ Callout 255 12 1
+ y
+ Callout 255 13 0
+ Ket
+ Callout 255 14 0
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options:
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b x
+ Note: that { does NOT introduce a quantifier
+--->Note: that { does NOT introduce a quantifier
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+No match
+
+/([ab]{,4}c|xy)/ICDZSS
------------------------------------------------------------------
Bra
Callout 255 0 14
@@ -5315,6 +5414,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Max lookbehind = 1
ab cd\>1
0: cd
@@ -5323,6 +5423,7 @@ Capturing subpattern count = 0
Options: dotall
No first char
No need char
+Max lookbehind = 1
ab cd\>1
0: cd
@@ -5477,14 +5578,33 @@ No match
123456\P
No match
-/abc/I>testsavedregex
+/abc/IS>testsavedregex
Capturing subpattern count = 0
No options
First char = 'a'
Need char = 'c'
-Compiled regex written to testsavedregex
+Subject length lower bound = 3
+No set of starting bytes
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
<testsavedregex
-Compiled regex loaded from testsavedregex
+Compiled pattern loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: abc
+ ** Failers
+No match
+ bca
+No match
+
+/abc/ISS>testsavedregex
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
No study data
abc
0: abc
@@ -5493,14 +5613,33 @@ No match
bca
No match
-/abc/IF>testsavedregex
+/abc/IFS>testsavedregex
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+Subject length lower bound = 3
+No set of starting bytes
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: abc
+ ** Failers
+No match
+ bca
+No match
+
+/abc/IFSS>testsavedregex
Capturing subpattern count = 0
No options
First char = 'a'
Need char = 'c'
-Compiled regex written to testsavedregex
+Compiled pattern written to testsavedregex
<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
No study data
abc
0: abc
@@ -5516,10 +5655,10 @@ No first char
No need char
Subject length lower bound = 1
Starting byte set: a b
-Compiled regex written to testsavedregex
+Compiled pattern written to testsavedregex
Study data written to testsavedregex
<testsavedregex
-Compiled regex loaded from testsavedregex
+Compiled pattern loaded from testsavedregex
Study data loaded from testsavedregex
abc
0: a
@@ -5530,6 +5669,24 @@ Study data loaded from testsavedregex
def
No match
+/(a|b)/ISS>testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
+No study data
+ abc
+ 0: a
+ 1: a
+ ** Failers
+ 0: a
+ 1: a
+ def
+No match
+
/(a|b)/ISF>testsavedregex
Capturing subpattern count = 1
No options
@@ -5537,10 +5694,10 @@ No first char
No need char
Subject length lower bound = 1
Starting byte set: a b
-Compiled regex written to testsavedregex
+Compiled pattern written to testsavedregex
Study data written to testsavedregex
<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
Study data loaded from testsavedregex
abc
0: a
@@ -5551,13 +5708,31 @@ Study data loaded from testsavedregex
def
No match
+/(a|b)/ISSF>testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+No study data
+ abc
+ 0: a
+ 1: a
+ ** Failers
+ 0: a
+ 1: a
+ def
+No match
+
~<(\w+)/?>(.)*</(\1)>~smgI
Capturing subpattern count = 3
Max back reference = 1
Options: multiline dotall
First char = '<'
Need char = '>'
- <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
+ \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
0: <seite>\x0a<dokumenteninformation>\x0a<seitentitel>Partner der LCO</seitentitel>\x0a<sprache>de</sprache>\x0a<seitenbeschreibung>Partner der LINEAS Consulting\x0aGmbH</seitenbeschreibung>\x0a<schluesselworte>LINEAS Consulting GmbH Hamburg\x0aPartnerfirmen</schluesselworte>\x0a<revisit>30 days</revisit>\x0a<robots>index,follow</robots>\x0a<menueinformation>\x0a<aktiv>ja</aktiv>\x0a<menueposition>3</menueposition>\x0a<menuetext>Partner</menuetext>\x0a</menueinformation>\x0a<lastedited>\x0a<autor>LCO</autor>\x0a<firma>LINEAS Consulting</firma>\x0a<datum>15.10.2003</datum>\x0a</lastedited>\x0a</dokumenteninformation>\x0a<inhalt>\x0a\x0a<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\x0aGmbH</absatzueberschrift>\x0a\x0a<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\x0a<bild name="logo_ca.gif" rahmen="no"/></link> <link\x0aziel="http://www.ey.com/" zielfenster="_blank"><bild\x0aname="logo_euy.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\x0a<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.atelion.de/"\x0azielfenster="_blank"><bild\x0aname="logo_atelion.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.line-information.de/"\x0azielfenster="_blank">\x0a<bild name="logo_line_information.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\x0a\x0a<absatz><link ziel="http://www.incognis.de/"\x0azielfenster="_blank"><bild\x0aname="logo_incognis.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.addcraft.com/"\x0azielfenster="_blank"><bild\x0aname="logo_addcraft.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.comendo.com/"\x0azielfenster="_blank"><bild\x0aname="logo_comendo.gif" rahmen="no"/></link></absatz>\x0a\x0a</inhalt>\x0a</seite>
1: seite
2: \x0a
@@ -5606,24 +5781,6 @@ No match
line one\nthis is a line\nbreak in the second line
No match
-/ab.cd/P
- ab-cd
- 0: ab-cd
- ab=cd
- 0: ab=cd
- ** Failers
-No match: POSIX code 17: match failed
- ab\ncd
-No match: POSIX code 17: match failed
-
-/ab.cd/Ps
- ab-cd
- 0: ab-cd
- ab=cd
- 0: ab=cd
- ab\ncd
- 0: ab\x0acd
-
/(?i)(?-i)AbCd/I
Capturing subpattern count = 0
No options
@@ -5916,21 +6073,10 @@ No need char
((this))
0: ((this))
-/a(b)c/PN
- abc
-Matched with REG_NOSUB
-
-/a(?P<name>b)c/PN
- abc
-Matched with REG_NOSUB
-
-/\x{100}/I
-Failed: character value in \x{...} sequence is too large at offset 6
-
/\x{0000ff}/I
Capturing subpattern count = 0
No options
-First char = 255
+First char = \xff
No need char
/^((?P<A>a1)|(?P<A>a2)b)/I
@@ -6040,7 +6186,7 @@ no parentheses with name "Z"
0: a1
1: a1
2: a1
-copy substring Z failed -7
+get substring Z failed -7
G a1 (2) A
/^(?P<A>a)(?P<A>b)/IJ
@@ -6072,7 +6218,7 @@ No need char
G a (1) A
cd\GA
0: cd
-copy substring A failed -7
+get substring A failed -7
/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
Capturing subpattern count = 4
@@ -6240,9 +6386,6 @@ No need char
9:
10: Y
-/\777/I
-Failed: octal value is greater than \377 (not in UTF-8 mode) at offset 3
-
/\s*,\s*/IS
Capturing subpattern count = 0
No options
@@ -6674,8 +6817,8 @@ No match
------------------------------------------------------------------
Bra
^
- a*
- NC A
+ /i a*
+ /i A
\d
Ket
End
@@ -7303,8 +7446,8 @@ Matched, but too many substrings
/[^a]+a/BZi
------------------------------------------------------------------
Bra
- [^A]++
- NC a
+ /i [^a]++
+ /i a
Ket
End
------------------------------------------------------------------
@@ -7312,8 +7455,8 @@ Matched, but too many substrings
/[^a]+A/BZi
------------------------------------------------------------------
Bra
- [^A]++
- NC A
+ /i [^a]++
+ /i A
Ket
End
------------------------------------------------------------------
@@ -7508,9 +7651,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
[()]
CBra 1
Ket
@@ -7544,9 +7685,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
()
CBra 1
Ket
@@ -7558,9 +7697,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
[(\]a]
CBra 1
Ket
@@ -7573,9 +7710,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
CBra 1
Ket
Ket
@@ -7707,9 +7842,6 @@ Options: extended
First char = 'x'
Need char = 'z'
-/(?(DEFINE) abc){3} xyz/x
-Failed: repeating a DEFINE group is not allowed at offset 17
-
/(a|)*\d/
\O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
No match
@@ -8027,10 +8159,8 @@ No match
Alt
c
Ket
- Once
Recurse
Ket
- Ket
End
------------------------------------------------------------------
abc
@@ -8041,9 +8171,7 @@ No match
------------------------------------------------------------------
Bra
xy
- Once
Recurse
- Ket
CBra 1
abc
Ket
@@ -8273,66 +8401,6 @@ Failed: syntax error in subpattern name (missing terminator) at offset 4
3: <unset>
4: x
-/[\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]
- Ket
- End
-------------------------------------------------------------------
- >\x09<
- 0: \x09
-
-/[\h]+/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]+
- Ket
- End
-------------------------------------------------------------------
- >\x09\x20\xa0<
- 0: \x09 \xa0
-
-/[\v]/BZ
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85]
- Ket
- End
-------------------------------------------------------------------
-
-/[\H]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/[^\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-
-/[\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/[\x0a\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x0a\x0e-\x84\x86-\xff]
- Ket
- End
-------------------------------------------------------------------
-
/\H++X/BZ
------------------------------------------------------------------
Bra
@@ -8524,7 +8592,7 @@ No match
------------------------------------------------------------------
/\( (?: [^()]* | (?R) )* \)/x
-(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
+\J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
0: (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
/[\E]AAA/
@@ -8706,8 +8774,13 @@ Failed: number is too big at offset 19
/\g6666666666/
Failed: number is too big at offset 11
-/[\g6666666666]/
-Failed: number is too big at offset 12
+/[\g6666666666]/BZ
+------------------------------------------------------------------
+ Bra
+ [6g]
+ Ket
+ End
+------------------------------------------------------------------
/(?1)\c[/
Failed: reference to non-existent subpattern at offset 3
@@ -9013,6 +9086,12 @@ Failed: subpattern name expected at offset 3
/\k{}/
Failed: subpattern name expected at offset 3
+/\k/
+Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2
+
+/\kabc/
+Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5
+
/(?P=)/
Failed: subpattern name expected at offset 4
@@ -9234,14 +9313,6 @@ No options
First char at start or follows newline
No need char
-/a?|b?/P
- abc
- 0: a
- ** Failers
- 0:
- ddd\N
-No match: POSIX code 17: match failed
-
/xyz/C
xyz
--->xyz
@@ -9636,14 +9707,6 @@ Partial match: the cat
abc\P\P
0: abc
-/\w+A/P
- CDAAAAB
- 0: CDAAAA
-
-/\w+A/PU
- CDAAAAB
- 0: CDA
-
/abc\K123/
xyzabc123pqr
0: 123
@@ -9671,12 +9734,8 @@ Partial match: +ab
/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
------------------------------------------------------------------
Bra
- Once
Recurse
- Ket
- Once
Recurse
- Ket
Cond
Cond def
CBra 1
@@ -9697,12 +9756,8 @@ Partial match: +ab
/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
------------------------------------------------------------------
Bra
- Once
Recurse
- Ket
- Once
Recurse
- Ket
Cond
Cond def
CBra 1
@@ -10044,210 +10099,6 @@ Need char = ':'
Subject length lower bound = 22
No set of starting bytes
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/xSI
-Capturing subpattern count = 0
-Contains explicit CR or LF match
-Options: extended
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
- 9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e
- f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
-
/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
Capturing subpattern count = 11
Options: caseless dotall
@@ -10443,12 +10294,10 @@ No match
Cond nrecurse 1
$
Alt
- Once
Recurse
Ket
Ket
Ket
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 4
@@ -10586,11 +10435,9 @@ Starting byte set: i
/(?i)a(?-i)b|c/BZ
------------------------------------------------------------------
Bra
- NC a
- 00 Opt
+ /i a
b
Alt
- 00 Opt
c
Ket
End
@@ -10609,12 +10456,9 @@ No match
/(?i)a(?s)b|c/BZ
------------------------------------------------------------------
Bra
- NC a
- 05 Opt
- NC b
+ /i ab
Alt
- 05 Opt
- NC c
+ /i c
Ket
End
------------------------------------------------------------------
@@ -10622,11 +10466,9 @@ No match
/(?i)a(?s-i)b|c/BZ
------------------------------------------------------------------
Bra
- NC a
- 04 Opt
+ /i a
b
Alt
- 04 Opt
c
Ket
End
@@ -10673,12 +10515,10 @@ No match
------------------------------------------------------------------
Bra
^
- Once
- Brazero
- Once
+ Braposzero
+ SBraPos
Recurse
- KetRmax
- Ket
+ KetRpos
Cond
Cond def
CBra 1
@@ -10767,152 +10607,22 @@ No match
AC
No match
-/--- A whole lot of tests of verbs with arguments are here rather than in test
- 11 because Perl doesn't seem to follow its specification entirely
- correctly. ---/
-
-/--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
- not clear how Perl defines "involved in the failure of the match". ---/
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/K
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
- ** Failers
-No match
- AC
-No match
- CB
-No match, mark = B
-
-/--- Check the use of names for success and failure. PCRE doesn't show these
-names for success, though Perl does, contrary to its spec. ---/
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
- ** Failers
-No match
- AC
-No match, mark = A
- CB
-No match, mark = B
-
-/--- An empty name does not pass back an empty string. It is the same as if no
-name were given. ---/
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
-
-/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
-
-/A(*PRUNE:A)B/K
- ACAB
- 0: AB
-
-/(*MARK:A)(*PRUNE:B)(C|X)/K
- C
- 0: C
- 1: C
-MK: A
- D
-No match, mark = B
-
-/(*MARK:A)(*THEN:B)(C|X)/K
- C
- 0: C
- 1: C
-MK: A
- D
-No match, mark = B
-
-/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-No match
-
-/--- Same --/
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
- AAAC
-No match
-
/--- This should fail; the SKIP advances by one, but when we get to AC, the
- PRUNE kills it. ---/
+ PRUNE kills it. Perl behaves differently. ---/
/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
AAAC
-No match
-
-/A(*:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
-No match
-
-/--- This should fail, as a null name is the same as no name ---/
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
- AAAC
-No match
-
-/--- This fails in PCRE, and I think that is in accordance with Perl's
- documentation, though in Perl it succeeds. ---/
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
- AAAC
-No match
+No match, mark = A
-/--- Mark names can be duplicated ---/
+/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
+though PCRE does. ---/
-/A(*:A)B|X(*:A)Y/K
- AABC
- 0: AB
-MK: A
- XXYZ
- 0: XY
-MK: A
-
/^A(*:A)B|^X(*:A)Y/K
** Failers
No match
XAQQ
No match, mark = A
-/--- A check on what happens after hitting a mark and them bumping along to
-something that does not even start. Perl reports tags after the failures here,
-though it does not when the individual letters are made into something
-more complicated. ---/
-
-/A(*:A)B|XX(*:B)Y/K
- AABC
- 0: AB
-MK: A
- XXYZ
- 0: XXY
-MK: B
- ** Failers
-No match
- XAQQ
-No match
- XAQQXZZ
-No match
- AXQQQ
-No match
- AXXQQQ
-No match
-
/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
optimizations defeat this. So does the PCRE optimization unless we disable it
with \Y. ---/
@@ -10925,126 +10635,6 @@ No match
DEFGABC\Y
No match
-/--- Repeat some tests with added studying. ---/
-
-/A(*COMMIT)B/+KS
- ACABX
-No match
-
-/A(*THEN)B|A(*THEN)C/KS
- AC
- 0: AC
-
-/A(*PRUNE)B|A(*PRUNE)C/KS
- AC
-No match
-
-/^(A(*THEN:A)B|C(*THEN:B)D)/KS
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
- ** Failers
-No match
- AC
-No match
- CB
-No match, mark = B
-
-/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
- ** Failers
-No match
- AC
-No match, mark = A
- CB
-No match, mark = B
-
-/^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
- AB
- 0: AB
- 1: AB
- CD
- 0: CD
- 1: CD
-
-/A(*PRUNE:A)B/KS
- ACAB
- 0: AB
-
-/(*MARK:A)(*PRUNE:B)(C|X)/KS
- C
- 0: C
- 1: C
-MK: A
- D
-No match
-
-/(*MARK:A)(*THEN:B)(C|X)/KS
- C
- 0: C
- 1: C
-MK: A
- D
-No match
-
-/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
- AAAC
-No match
-
-/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
- AAAC
-No match
-
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
- AAAC
-No match
-
-/A(*:A)A+(*SKIP)(B|Z) | AC/xKS
- AAAC
-No match
-
-/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
- AAAC
-No match
-
-/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
- AAAC
-No match
-
-/A(*:A)B|XX(*:B)Y/KS
- AABC
- 0: AB
-MK: A
- XXYZ
- 0: XXY
-MK: B
- ** Failers
-No match
- XAQQ
-No match
- XAQQXZZ
-No match
- AXQQQ
-No match
- AXXQQQ
-No match
-
-/(*COMMIT)ABC/
- ABCDEFG
- 0: ABC
- ** Failers
-No match
- DEFGABC\Y
-No match
-
/^(ab (c+(*THEN)cd) | xyz)/x
abcccd
No match
@@ -11165,11 +10755,76 @@ No match
/\s*\R/BZ
------------------------------------------------------------------
Bra
- \s*+
+ \s*
\R
Ket
End
------------------------------------------------------------------
+ \x20\x0a
+ 0: \x0a
+ \x20\x0d
+ 0: \x0d
+ \x20\x0d\x0a
+ 0: \x0d\x0a
+
+/\S*\R/BZ
+------------------------------------------------------------------
+ Bra
+ \S*+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ a\x0a
+ 0: a\x0a
+
+/X\h*\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \h*+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x20\x0a
+ 0: X \x0a
+
+/X\H*\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \H*
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x0d\x0a
+ 0: X\x0d\x0a
+
+/X\H+\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \H+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x0d\x0a
+ 0: X\x0d\x0a
+
+/X\H++\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \H++
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x0d\x0a
+No match
/-- Perl treats this one differently, not failing the second string. I believe
that is a bug in Perl. --/
@@ -11251,9 +10906,9 @@ Partial match: abc
abc\>3
No match
abc\>4
-Error -24
+Error -24 (bad offset value)
abc\>-4
-Error -24
+Error -24 (bad offset value)
/^\cģ/
Failed: \c must be followed by an ASCII character at offset 3
@@ -11305,4 +10960,1405 @@ Failed: reference to non-existent subpattern at offset 15
End
------------------------------------------------------------------
+/-- These tests are here because Perl gets the first one wrong. --/
+
+/(\R*)(.)/s
+ \r\n
+ 0: \x0d
+ 1:
+ 2: \x0d
+ \r\r\n\n\r
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+ \r\r\n\n\r\n
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+
+/(\R)*(.)/s
+ \r\n
+ 0: \x0d
+ 1: <unset>
+ 2: \x0d
+ \r\r\n\n\r
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0a
+ 2: \x0d
+ \r\r\n\n\r\n
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0a
+ 2: \x0d
+
+/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
+ \r\n
+ 0: \x0d
+ 1:
+ 2: \x0d
+ \r\r\n\n\r
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+ \r\r\n\n\r\n
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+
+/-- --/
+
+/^abc$/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ abc
+ $
+ Ket
+ End
+------------------------------------------------------------------
+
+/^abc$/BZm
+------------------------------------------------------------------
+ Bra
+ /m ^
+ abc
+ /m $
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(a)*+(\w)/S
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(?:a)*+(\w)/S
+ aaaaX
+ 0: aaaaX
+ 1: X
+ ** Failers
+No match
+ aaaa
+No match
+
+/(a)++1234/SDZ
+------------------------------------------------------------------
+ Bra
+ CBraPos 1
+ a
+ KetRpos
+ 1234
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = '4'
+Subject length lower bound = 5
+No set of starting bytes
+
+/([abc])++1234/SI
+Capturing subpattern count = 1
+No options
+No first char
+Need char = '4'
+Subject length lower bound = 5
+Starting byte set: a b c
+
+/(?<=(abc)+)X/
+Failed: lookbehind assertion is not fixed length at offset 10
+
+/(^ab)/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(^ab)++/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(^ab|^)+/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(^ab|^)++/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(?:^ab)/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?:^ab)++/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?:^ab|^)+/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?:^ab|^)++/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(.*ab)/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(.*ab)++/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(.*ab|.*)+/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+No need char
+
+/(.*ab|.*)++/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+No need char
+
+/(?:.*ab)/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(?:.*ab)++/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(?:.*ab|.*)+/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+No need char
+
+/(?:.*ab|.*)++/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+No need char
+
+/(?=a)[bcd]/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+
+/((?=a))[bcd]/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/((?=a))+[bcd]/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/((?=a))++[bcd]/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/(?=a+)[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+No need char
+
+/(?=a+?)[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+No need char
+
+/(?=a++)[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+No need char
+
+/(?=a{3})[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+Need char = 'a' (caseless)
+
+/(abc)\1+/S
+
+/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
+
+/(?1)(?:(b(*ACCEPT))){0}/
+ b
+ 0: b
+
+/(?1)(?:(b(*ACCEPT))){0}c/
+ bc
+ 0: bc
+ ** Failers
+No match
+ b
+No match
+
+/(?1)(?:((*ACCEPT))){0}c/
+ c
+ 0: c
+ c\N
+ 0: c
+
+/^.*?(?(?=a)a|b(*THEN)c)/
+ ba
+No match
+
+/^.*?(?(?=a)a|bc)/
+ ba
+ 0: ba
+
+/^.*?(?(?=a)a(*THEN)b|c)/
+ ac
+No match
+
+/^.*?(?(?=a)a(*THEN)b)c/
+ ac
+No match
+
+/^.*?(a(*THEN)b)c/
+ aabc
+No match
+
+/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
+ aabc
+ 0: aabc
+
+/^.*?(a(*THEN)b|z)c/
+ aabc
+ 0: aabc
+ 1: ab
+
+/^.*?(z|a(*THEN)b)c/
+ aabc
+ 0: aabc
+ 1: ab
+
+/-- --/
+
+/-- These studied versions are here because they are not Perl-compatible; the
+ studying means the mark is not seen. --/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KS
+ C
+ 0: C
+ 1: C
+MK: A
+ D
+No match, mark = A
+
+/(*:A)A+(*SKIP:A)(B|Z)/KS
+ AAAC
+No match, mark = A
+
+/-- --/
+
+"(?=a*(*ACCEPT)b)c"
+ c
+ 0: c
+ c\N
+ 0: c
+
+/(?1)c(?(DEFINE)((*ACCEPT)b))/
+ c
+ 0: c
+ c\N
+ 0: c
+
+/(?>(*ACCEPT)b)c/
+ c
+ 0:
+ c\N
+No match
+
+/(?:(?>(a)))+a%/++
+ %aa%
+ 0: aa%
+ 0+
+ 1: a
+ 1+ a%
+
+/(a)b|ac/++SS
+ ac\O3
+Matched, but too many substrings
+ 0: ac
+ 0+
+
+/(a)(b)x|abc/++
+ abc\O6
+ 0: abc
+ 0+
+
+/(a)bc|(a)(b)\2/
+ \O3abc
+Matched, but too many substrings
+ 0: abc
+ \O4abc
+Matched, but too many substrings
+ 0: abc
+
+/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+Subject length lower bound = 1
+No set of starting bytes
+
+/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+Subject length lower bound = 3
+Starting byte set: a b
+
+/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+Subject length lower bound = 4
+Starting byte set: a b
+
+/(abc)(?1)/SI
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'c'
+Subject length lower bound = 6
+No set of starting bytes
+
+/^(?>a)++/
+ aa\M
+Minimum match() limit = 5
+Minimum match() recursion limit = 2
+ 0: aa
+ aaaaaaaaa\M
+Minimum match() limit = 12
+Minimum match() recursion limit = 2
+ 0: aaaaaaaaa
+
+/(a)(?1)++/
+ aa\M
+Minimum match() limit = 7
+Minimum match() recursion limit = 4
+ 0: aa
+ 1: a
+ aaaaaaaaa\M
+Minimum match() limit = 21
+Minimum match() recursion limit = 4
+ 0: aaaaaaaaa
+ 1: a
+
+/(?:(foo)|(bar)|(baz))X/SS=
+ bazfooX
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+ foobazbarX
+ 0: barX
+ 1: <unset>
+ 2: bar
+ 3: <unset>
+ barfooX
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+ bazX
+ 0: bazX
+ 1: <unset>
+ 2: <unset>
+ 3: baz
+ foobarbazX
+ 0: bazX
+ 1: <unset>
+ 2: <unset>
+ 3: baz
+ bazfooX\O0
+Matched, but too many substrings
+ bazfooX\O2
+Matched, but too many substrings
+ 0: fooX
+ bazfooX\O4
+Matched, but too many substrings
+ 0: fooX
+ 1: <unset>
+ bazfooX\O6
+Matched, but too many substrings
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ bazfooX\O8
+Matched, but too many substrings
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+ bazfooX\O10
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+
+/(?=abc){3}abc/BZ
+------------------------------------------------------------------
+ Bra
+ Assert
+ abc
+ Ket
+ abc
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=abc)+abc/BZ
+------------------------------------------------------------------
+ Bra
+ Assert
+ abc
+ Ket
+ abc
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=abc)++abc/BZ
+------------------------------------------------------------------
+ Bra
+ Assert
+ abc
+ Ket
+ abc
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=abc){0}xyz/BZ
+------------------------------------------------------------------
+ Bra
+ Skip zero
+ Assert
+ abc
+ Ket
+ xyz
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=(a))?./BZ
+------------------------------------------------------------------
+ Bra
+ Brazero
+ Assert
+ CBra 1
+ a
+ Ket
+ Ket
+ Any
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=(a))??./BZ
+------------------------------------------------------------------
+ Bra
+ Braminzero
+ Assert
+ CBra 1
+ a
+ Ket
+ Ket
+ Any
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?=(a)){0}b(?1)/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Skip zero
+ Assert
+ CBra 1
+ a
+ Ket
+ Ket
+ b
+ Recurse
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?(DEFINE)(a))?b(?1)/BZ
+------------------------------------------------------------------
+ Bra
+ Cond
+ Cond def
+ CBra 1
+ a
+ Ket
+ Ket
+ b
+ Recurse
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?=(?1))?[az]([abc])d/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Brazero
+ Assert
+ Recurse
+ Ket
+ [az]
+ CBra 1
+ [a-c]
+ Ket
+ d
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?!a){0}\w+/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Skip zero
+ Assert not
+ a
+ Ket
+ \w+
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?<=(abc))?xyz/BZ
+------------------------------------------------------------------
+ Bra
+ Brazero
+ AssertB
+ Reverse
+ CBra 1
+ abc
+ Ket
+ Ket
+ xyz
+ Ket
+ End
+------------------------------------------------------------------
+
+/[:a[:abc]b:]/BZ
+------------------------------------------------------------------
+ Bra
+ [:[a-c]
+ b:]
+ Ket
+ End
+------------------------------------------------------------------
+
+/((?2))((?1))/SS
+ abc
+Error -26 (nested recursion at the same subject position)
+
+/((?(R2)a+|(?1)b))/SS
+ aaaabcde
+Error -26 (nested recursion at the same subject position)
+
+/(?(R)a*(?1)|((?R))b)/SS
+ aaaabcde
+Error -26 (nested recursion at the same subject position)
+
+/(a+|(?R)b)/
+Failed: recursive call could loop indefinitely at offset 7
+
+/^(a(*:A)(d|e(*:B))z|aeq)/C
+ adz
+--->adz
+ +0 ^ ^
+ +1 ^ (a(*:A)(d|e(*:B))z|aeq)
+ +2 ^ a
+ +3 ^^ (*:A)
+ +8 ^^ (d|e(*:B))
+Latest Mark: A
+ +9 ^^ d
++10 ^ ^ |
++18 ^ ^ z
++19 ^ ^ |
++24 ^ ^
+ 0: adz
+ 1: adz
+ 2: d
+ aez
+--->aez
+ +0 ^ ^
+ +1 ^ (a(*:A)(d|e(*:B))z|aeq)
+ +2 ^ a
+ +3 ^^ (*:A)
+ +8 ^^ (d|e(*:B))
+Latest Mark: A
+ +9 ^^ d
++11 ^^ e
++12 ^ ^ (*:B)
++17 ^ ^ )
+Latest Mark: B
++18 ^ ^ z
++19 ^ ^ |
++24 ^ ^
+ 0: aez
+ 1: aez
+ 2: e
+ aeqwerty
+--->aeqwerty
+ +0 ^ ^
+ +1 ^ (a(*:A)(d|e(*:B))z|aeq)
+ +2 ^ a
+ +3 ^^ (*:A)
+ +8 ^^ (d|e(*:B))
+Latest Mark: A
+ +9 ^^ d
++11 ^^ e
++12 ^ ^ (*:B)
++17 ^ ^ )
+Latest Mark: B
++18 ^ ^ z
++20 ^ a
++21 ^^ e
++22 ^ ^ q
++23 ^ ^ )
++24 ^ ^
+ 0: aeq
+ 1: aeq
+
+/.(*F)/
+ \P\Pabc
+No match
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
+Capturing subpattern count = 0
+No options
+First char = 't'
+Need char = 't'
+Max lookbehind = 1
+Subject length lower bound = 18
+No set of starting bytes
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Max lookbehind = 1
+Subject length lower bound = 8
+Starting byte set: < o t u
+
+/a(*SKIP)c|b(*ACCEPT)|/+SI
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Study returned NULL
+ a
+ 0:
+ 0+
+
+/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Subject length lower bound = -1
+Starting byte set: a b x
+ ax
+ 0: x
+
+'a*(*ACCEPT)b'+
+ \N\N
+No match
+ abc\N\N
+ 0: a
+ 0+ bc
+ bbb\N\N
+ 0:
+ 0+ bb
+
+/(*ACCEPT)a/+I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+ bax
+ 0:
+ 0+ bax
+
+/z(*ACCEPT)a/+I
+Capturing subpattern count = 0
+No options
+First char = 'z'
+No need char
+ baxzbx
+ 0: z
+ 0+ bx
+
+/a(?:.)*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+Minimum match() limit = 65
+Minimum match() recursion limit = 2
+ 0: abbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+Minimum match() limit = 86
+Minimum match() recursion limit = 45
+ 0: abbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN:ABC))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+Minimum match() limit = 86
+Minimum match() recursion limit = 45
+ 0: abbbbbbbbbbbbbbbbbbbbba
+
+/-- These tests are in agreement with development Perl 5.015, which has fixed
+ some things, but they don't all work with 5.012, so they aren't in the
+ Perl-compatible tests. Those after the first come from Perl's own test
+ files. --/
+
+/^((yes|no)(*THEN)(*F))?/
+ yes
+No match
+
+/(A (.*) C? (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C? (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C? (*THEN) | A D) \s* z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (?:C|) (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C{0,6} (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCEBefgBhiBqz
+No match
+
+/(A (.*) (CE){0,6} (*THEN) | A D) z/x
+AbcdCEBefgBhiBqz
+No match
+
+/(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (CE*){0,6} (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/-----------------------------------------------/
+
+/^(?>a+)(?>(z+))\w/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Once_NC
+ a+
+ Ket
+ Once
+ CBra 1
+ z+
+ Ket
+ Ket
+ \w
+ Ket
+ End
+------------------------------------------------------------------
+ aaaazzzzb
+ 0: aaaazzzzb
+ 1: zzzz
+ ** Failers
+No match
+ aazz
+No match
+
+/(.)(\1|a(?2))/
+ bab
+ 0: bab
+ 1: b
+ 2: ab
+
+/\1|(.)(?R)\1/
+ cbbbc
+ 0: cbbbc
+ 1: c
+
+/(.)((?(1)c|a)|a(?2))/
+ baa
+No match
+
+/(?P<abn>(?P=abn)xxx)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ \1
+ xxx
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(a\1z)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ a
+ \1
+ z
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
+ \Maabbccddee
+Minimum match() limit = 12
+Minimum match() recursion limit = 3
+ 0: aabbccddee
+
+/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
+ \Maabbccddee
+Minimum match() limit = 22
+Minimum match() recursion limit = 21
+ 0: aabbccddee
+ 1: aa
+ 2: bb
+ 3: cc
+ 4: dd
+ 5: ee
+
+/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
+ \Maabbccddee
+Minimum match() limit = 18
+Minimum match() recursion limit = 13
+ 0: aabbccddee
+ 1: aa
+ 2: cc
+ 3: ee
+
+/^a\x41z/<JS>
+ aAz
+ 0: aAz
+ *** Failers
+No match
+ ax41z
+No match
+
+/^a[m\x41]z/<JS>
+ aAz
+ 0: aAz
+
+/^a\x1z/<JS>
+ ax1z
+ 0: ax1z
+
+/^a\u0041z/<JS>
+ aAz
+ 0: aAz
+ *** Failers
+No match
+ au0041z
+No match
+
+/^a[m\u0041]z/<JS>
+ aAz
+ 0: aAz
+
+/^a\u041z/<JS>
+ au041z
+ 0: au041z
+ *** Failers
+No match
+ aAz
+No match
+
+/^a\U0041z/<JS>
+ aU0041z
+ 0: aU0041z
+ *** Failers
+No match
+ aAz
+No match
+
+/(?(?=c)c|d)++Y/BZ
+------------------------------------------------------------------
+ Bra
+ BraPos
+ Cond
+ Assert
+ c
+ Ket
+ c
+ Alt
+ d
+ Ket
+ KetRpos
+ Y
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?(?=c)c|d)*+Y/BZ
+------------------------------------------------------------------
+ Bra
+ Braposzero
+ BraPos
+ Cond
+ Assert
+ c
+ Ket
+ c
+ Alt
+ d
+ Ket
+ KetRpos
+ Y
+ Ket
+ End
+------------------------------------------------------------------
+
+/a[\NB]c/
+Failed: \N is not supported in a class at offset 3
+
+/a[B-\Nc]/
+Failed: \N is not supported in a class at offset 5
+
+/(a)(?2){0,1999}?(b)/
+
+/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
+
+/--- This test, with something more complicated than individual letters, causes
+different behaviour in Perl. Perhaps it disables some optimization; no tag is
+passed back for the failures, whereas in PCRE there is a tag. ---/
+
+/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
+ AABC
+ 0: AB
+ 1: A
+ 2: B
+MK: A
+ XXYZ
+ 0: XXY
+ 1: <unset>
+ 2: <unset>
+ 3: X
+ 4: X
+ 5: Y
+MK: B
+ ** Failers
+No match
+ XAQQ
+No match, mark = A
+ XAQQXZZ
+No match, mark = A
+ AXQQQ
+No match, mark = A
+ AXXQQQ
+No match, mark = B
+
+/-- Perl doesn't give marks for these, though it does if the alternatives are
+replaced by single letters. --/
+
+/(b|q)(*:m)f|a(*:n)w/K
+ aw
+ 0: aw
+MK: n
+ ** Failers
+No match, mark = n
+ abc
+No match, mark = m
+
+/(q|b)(*:m)f|a(*:n)w/K
+ aw
+ 0: aw
+MK: n
+ ** Failers
+No match, mark = n
+ abc
+No match, mark = m
+
+/-- After a partial match, the behaviour is as for a failure. --/
+
+/^a(*:X)bcde/K
+ abc\P
+Partial match, mark=X: abc
+
+/-- These are here because Perl doesn't return a mark, except for the first --/
+
+/(?=(*:x))(q|)/K+
+ abc
+ 0:
+ 0+ abc
+ 1:
+MK: x
+
+/(?=(*:x))((*:y)q|)/K+
+ abc
+ 0:
+ 0+ abc
+ 1:
+MK: x
+
+/(?=(*:x))(?:(*:y)q|)/K+
+ abc
+ 0:
+ 0+ abc
+MK: x
+
+/(?=(*:x))(?>(*:y)q|)/K+
+ abc
+ 0:
+ 0+ abc
+MK: x
+
+/(?=a(*:x))(?!a(*:y)c)/K+
+ ab
+ 0:
+ 0+ ab
+MK: x
+
+/(?=a(*:x))(?=a(*:y)c|)/K+
+ ab
+ 0:
+ 0+ ab
+MK: x
+
+/(..)\1/
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+ 0: abab
+ 1: ab
+
+/(..)\1/i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+ 0: aBAb
+ 1: aB
+
+/(..)\1{2,}/
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+Partial match: abab
+ ababa\P
+Partial match: ababa
+ ababab\P
+ 0: ababab
+ 1: ab
+ ababab\P\P
+Partial match: ababab
+ abababa\P
+ 0: ababab
+ 1: ab
+ abababa\P\P
+Partial match: abababa
+
+/(..)\1{2,}/i
+ ab\P
+Partial match: ab
+ aBa\P
+Partial match: aBa
+ aBAb\P
+Partial match: aBAb
+ AbaBA\P
+Partial match: AbaBA
+ abABAb\P
+ 0: abABAb
+ 1: ab
+ aBAbaB\P\P
+Partial match: aBAbaB
+ abABabA\P
+ 0: abABab
+ 1: ab
+ abaBABa\P\P
+Partial match: abaBABa
+
+/(..)\1{2,}?x/i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+Partial match: aBAb
+ abaBA\P
+Partial match: abaBA
+ abAbaB\P
+Partial match: abAbaB
+ abaBabA\P
+Partial match: abaBabA
+ abAbABaBx\P
+ 0: abAbABaBx
+ 1: ab
+
+/^(..)\1/
+ aba\P
+Partial match: aba
+
+/^(..)\1{2,3}x/
+ aba\P
+Partial match: aba
+ ababa\P
+Partial match: ababa
+ ababa\P\P
+Partial match: ababa
+ abababx
+ 0: abababx
+ 1: ab
+ ababababx
+ 0: ababababx
+ 1: ab
+
+/^(..)\1{2,3}?x/
+ aba\P
+Partial match: aba
+ ababa\P
+Partial match: ababa
+ ababa\P\P
+Partial match: ababa
+ abababx
+ 0: abababx
+ 1: ab
+ ababababx
+ 0: ababababx
+ 1: ab
+
+/^(..)(\1{2,3})ab/
+ abababab
+ 0: abababab
+ 1: ab
+ 2: abab
+
+/^\R/
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/^\R{2,3}x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R{2,3}?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ x
+ 0: x
+ \rx
+ 0: \x0dx
+
+/^\R+x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\n\P
+Partial match: \x0d\x0a
+ \r\n\P\P
+Partial match: \x0d\x0a
+ \rx
+ 0: \x0dx
+
+/^a$/<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^a$/m<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/<CRLF>
+ a\r\P
+ 0: a\x0d
+ 1: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/m<CRLF>
+ a\r\P
+ 0: a\x0d
+ 1: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/./<CRLF>
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/.{2,3}/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+
+/.{2,3}?/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d
+ \r\r\r\P\P
+ 0: \x0d\x0d
+
+/-- These two are here because Perl does not match: it seems to allow the
+COMMIT to escape from the assertion. --/
+
+/(?=a(*COMMIT)b|ac)ac|ac/
+ ac
+ 0: ac
+
+/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
+ ABCDGHI\O03
+Matched, but too many substrings
+ 0: ABCD
+
+/-- This one is here because Perl does not confine the *COMMIT to the
+assertion, and therefore fails the entire subroutine call. --/
+
+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+ ac
+ 0: ac
+
/-- End of testinput2 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput4 b/ext/pcre/pcrelib/testdata/testoutput4
index 4591026d4..2082721c5 100644
--- a/ext/pcre/pcrelib/testdata/testoutput4
+++ b/ext/pcre/pcrelib/testdata/testoutput4
@@ -1,5 +1,6 @@
-/-- This set of tests if for UTF-8 support, excluding Unicode properties. It is
- compatible with all versions of Perl 5. --/
+/-- This set of tests is for UTF support, excluding Unicode properties. It is
+ compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit
+ PCRE libraries. --/
/a.b/8
acb
@@ -255,46 +256,6 @@ No match
XYZ
No match
-/X(\C{3})/8
- X\x{1234}
- 0: X\x{1234}
- 1: \x{1234}
-
-/X(\C{4})/8
- X\x{1234}YZ
- 0: X\x{1234}Y
- 1: \x{1234}Y
-
-/X\C*/8
- XYZabcdce
- 0: XYZabcdce
-
-/X\C*?/8
- XYZabcde
- 0: X
-
-/X\C{3,5}/8
- Xabcdefg
- 0: Xabcde
- X\x{1234}
- 0: X\x{1234}
- X\x{1234}YZ
- 0: X\x{1234}YZ
- X\x{1234}\x{512}
- 0: X\x{1234}\x{512}
- X\x{1234}\x{512}YZ
- 0: X\x{1234}\x{512}
-
-/X\C{3,5}?/8
- Xabcdefg
- 0: Xabc
- X\x{1234}
- 0: X\x{1234}
- X\x{1234}YZ
- 0: X\x{1234}
- X\x{1234}\x{512}
- 0: X\x{1234}
-
/[^a]+/8g
bcd
0: bcd
@@ -791,22 +752,6 @@ No match
\x{200}X
No match
-/a\Cb/
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
-
-/a\Cb/8
- aXb
- 0: aXb
- a\nb
- 0: a\x{0a}b
-
-/a\C\Cb/8
- a\x{100}b
- 0: a\x{100}b
-
/[z-\x{100}]/8i
z
0: z
@@ -1128,4 +1073,22 @@ No match
0: AA
0:
+/(abc)\1/8i
+ abc
+No match
+
+/(abc)\1/8
+ abc
+No match
+
+/a(*:a\x{1234}b)/8K
+ abc
+ 0: a
+MK: a\x{1234}b
+
+/a(*:a£b)/8K
+ abc
+ 0: a
+MK: a\x{a3}b
+
/-- End of testinput4 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput5 b/ext/pcre/pcrelib/testdata/testoutput5
index b3ce48a0d..c4f9a0c9a 100644
--- a/ext/pcre/pcrelib/testdata/testoutput5
+++ b/ext/pcre/pcrelib/testdata/testoutput5
@@ -1,113 +1,9 @@
-/-- This set of tests checks the API, internals, and non-Perl stuff for UTF-8
- support, excluding Unicode properties. --/
+/-- This set of tests checks the API, internals, and non-Perl stuff for UTF
+ support, excluding Unicode properties. However, tests that give different
+ results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
-
-/\x{1000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{1000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 225
-Need char = 128
-
-/\x{10000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 240
-Need char = 128
-
-/\x{100000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 244
-Need char = 128
-
-/\x{1000000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{1000000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 249
-Need char = 128
-
-/\x{4000000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{4000000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 252
-Need char = 128
-
-/\x{7fffFFFF}/8DZ
-------------------------------------------------------------------
- Bra
- \x{7fffffff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 253
-Need char = 191
-
-/[\x{ff}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x{100}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
+/\x{110000}/8DZ
+Failed: character value in \x{...} sequence is too large at offset 9
/\x{ffffffff}/8
Failed: character value in \x{...} sequence is too large at offset 11
@@ -115,34 +11,20 @@ Failed: character value in \x{...} sequence is too large at offset 11
/\x{100000000}/8
Failed: character value in \x{...} sequence is too large at offset 12
+/\x{d800}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
+
+/\x{dfff}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
+
+/\x{d7ff}/8
+
+/\x{e000}/8
+
/^\x{100}a\x{1234}/8
\x{100}a\x{1234}bcd
0: \x{100}a\x{1234}
-/\x80/8DZ
-------------------------------------------------------------------
- Bra
- \x{80}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 128
-
-/\xff/8DZ
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
-
/\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
------------------------------------------------------------------
Bra
@@ -151,100 +33,12 @@ Need char = 191
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
First char = 'A'
Need char = '.'
\x{0041}\x{2262}\x{0391}\x{002e}
0: A\x{2262}\x{391}.
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
-------------------------------------------------------------------
- Bra
- \x{d55c}\x{ad6d}\x{c5b4}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 237
-Need char = 180
- \x{D55c}\x{ad6d}\x{C5B4}
- 0: \x{d55c}\x{ad6d}\x{c5b4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
-------------------------------------------------------------------
- Bra
- \x{65e5}\x{672c}\x{8a9e}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 230
-Need char = 158
- \x{65e5}\x{672c}\x{8a9e}
- 0: \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-------------------------------------------------------------------
- Bra
- \x{80}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 128
-
-/\x{084}/DZ8
-------------------------------------------------------------------
- Bra
- \x{84}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 132
-
-/\x{104}/DZ8
-------------------------------------------------------------------
- Bra
- \x{104}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 132
-
-/\x{861}/DZ8
-------------------------------------------------------------------
- Bra
- \x{861}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 224
-Need char = 161
-
-/\x{212ab}/DZ8
-------------------------------------------------------------------
- Bra
- \x{212ab}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 240
-Need char = 171
-
/.{3,5}X/DZ8
------------------------------------------------------------------
Bra
@@ -255,13 +49,12 @@ Need char = 171
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
Need char = 'X'
\x{212ab}\x{212ab}\x{212ab}\x{861}X
0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
-
/.{3,5}?/DZ8
------------------------------------------------------------------
Bra
@@ -271,7 +64,7 @@ Need char = 'X'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
\x{212ab}\x{212ab}\x{212ab}\x{861}
@@ -280,20 +73,6 @@ No need char
/(?<=\C)X/8
Failed: \C not allowed in lookbehind assertion at offset 6
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- 0: X\x{1234}
- 1: \xe1
- 2: \x88\xb4
- X\nabc
- 0: X\x{0a}abc
- 1: \x{0a}
- 2: abc
-
/^[ab]/8DZ
------------------------------------------------------------------
Bra
@@ -303,7 +82,7 @@ can't tell the difference.) --/
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: anchored utf8
+Options: anchored utf
No first char
No need char
bar
@@ -326,7 +105,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: anchored utf8
+Options: anchored utf
No first char
No need char
c
@@ -340,136 +119,6 @@ No need char
aaa
No match
-/[^ab\xC0-\xF0]/8SDZ
-------------------------------------------------------------------
- Bra
- [\x00-`c-\xbf\xf1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
- \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
- \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
- 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y
- Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
- \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
- \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
- \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
- \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
- \xfe \xff
- \x{f1}
- 0: \x{f1}
- \x{bf}
- 0: \x{bf}
- \x{100}
- 0: \x{100}
- \x{1000}
- 0: \x{1000}
- *** Failers
- 0: *
- \x{c0}
-No match
- \x{f0}
-No match
-
-/Ā{3,4}/8SDZ
-------------------------------------------------------------------
- Bra
- \x{100}{3}
- \x{100}?
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
-Subject length lower bound = 3
-No set of starting bytes
- \x{100}\x{100}\x{100}\x{100\x{100}
- 0: \x{100}\x{100}\x{100}
-
-/(\x{100}+|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}+
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf8
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x \xc4
-
-/(\x{100}*a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}*+
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf8
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a x \xc4
-
-/(\x{100}{0,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}{0,2}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf8
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: a x \xc4
-
-/(\x{100}{1,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}
- \x{100}{0,1}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf8
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: x \xc4
-
/\x{100}*(\d+|"(?1)")/8
1234
0: 1234
@@ -494,18 +143,6 @@ No match
\x{100}\x{100}abcd
No match
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
-
/\x{100}*/8DZ
------------------------------------------------------------------
Bra
@@ -514,7 +151,7 @@ Need char = 128
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -527,7 +164,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
First char = 'a'
No need char
@@ -540,36 +177,10 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
First char = 'a'
Need char = 'b'
-/a\x{100}\x{101}*/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'a'
-Need char = 128
-
-/a\x{100}\x{101}+/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'a'
-Need char = 129
-
/\x{100}*A/8DZ
------------------------------------------------------------------
Bra
@@ -579,7 +190,7 @@ Need char = 129
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
Need char = 'A'
A
@@ -590,61 +201,15 @@ Need char = 'A'
Bra
\x{100}*+
\d
- Once
Recurse
Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-
-/[^\x{c4}]/DZ
-------------------------------------------------------------------
- Bra
- [^\xc4]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[^\x{c4}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x00-\xc3\xc5-\xff] (neg)
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x{100}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
-
/[Z\x{100}]/8DZ
------------------------------------------------------------------
Bra
@@ -653,7 +218,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
Z\x{100}
@@ -688,7 +253,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -700,7 +265,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
\x{100}
@@ -717,25 +282,11 @@ No need char
------------------------------------------------------------------
Capturing subpattern count = 0
No options
-First char = 255
+First char = \xff
No need char
>\xff<
0: \xff
-/[\xff]/DZ8
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
- >\x{ff}<
- 0: \x{ff}
-
/[^\xFF]/DZ
------------------------------------------------------------------
Bra
@@ -748,18 +299,6 @@ No options
No first char
No need char
-/[^\xff]/8DZ
-------------------------------------------------------------------
- Bra
- [\x00-\xfe] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-
/[Ä-Ü]/8
Ö # Matches without Study
0: \x{d6}
@@ -784,99 +323,6 @@ No need char
\x{d6}
0: \x{d6}
-/[]/8
-Failed: invalid UTF-8 string at offset 2
-
-//8
-Failed: invalid UTF-8 string at offset 0
-
-/xxx/8
-Failed: invalid UTF-8 string at offset 1
-
-/xxx/8?DZ
-------------------------------------------------------------------
- Bra
- \X{c0}\X{c0}\X{c0}xxx
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8 no_utf8_check
-First char = 195
-Need char = 'x'
-
-/abc/8
- ]
-Error -10
-
-Error -10
-
-Error -10
- \?
-No match
-
-/anything/8
- \xc0\x80
-Error -10
- \xc1\x8f
-Error -10
- \xe0\x9f\x80
-Error -10
- \xf0\x8f\x80\x80
-Error -10
- \xf8\x87\x80\x80\x80
-Error -10
- \xfc\x83\x80\x80\x80\x80
-Error -10
- \xfe\x80\x80\x80\x80\x80
-Error -10
- \xff\x80\x80\x80\x80\x80
-Error -10
- \xc3\x8f
-No match
- \xe0\xaf\x80
-No match
- \xe1\x80\x80
-No match
- \xf0\x9f\x80\x80
-No match
- \xf1\x8f\x80\x80
-No match
- \xf8\x88\x80\x80\x80
-Error -10
- \xf9\x87\x80\x80\x80
-Error -10
- \xfc\x84\x80\x80\x80\x80
-Error -10
- \xfd\x83\x80\x80\x80\x80
-Error -10
- \?\xf8\x88\x80\x80\x80
-No match
- \?\xf9\x87\x80\x80\x80
-No match
- \?\xfc\x84\x80\x80\x80\x80
-No match
- \?\xfd\x83\x80\x80\x80\x80
-No match
-
-/\x{100}abc(xyz(?1))/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}abc
- CBra 1
- xyz
- Once
- Recurse
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf8
-First char = 196
-Need char = 'z'
-
/[^\x{100}]abc(xyz(?1))/8DZ
------------------------------------------------------------------
Bra
@@ -884,15 +330,13 @@ Need char = 'z'
abc
CBra 1
xyz
- Once
Recurse
Ket
Ket
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Options: utf8
+Options: utf
No first char
Need char = 'z'
@@ -903,15 +347,13 @@ Need char = 'z'
abc
CBra 1
xyz
- Once
Recurse
Ket
Ket
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Options: utf8
+Options: utf
No first char
Need char = 'z'
@@ -923,9 +365,7 @@ Need char = 'z'
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -933,7 +373,7 @@ Need char = 'z'
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -946,9 +386,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -957,9 +395,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -968,7 +404,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -980,9 +416,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -990,7 +424,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -1003,9 +437,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1014,9 +446,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1025,7 +455,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -1039,10 +469,6 @@ No need char
\x{100}X
0: X
-/a\x{1234}b/P8
- a\x{1234}b
- 0: a\x{1234}b
-
/^\ሴ/8DZ
------------------------------------------------------------------
Bra
@@ -1052,23 +478,10 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: anchored utf8
+Options: anchored utf
No first char
No need char
-/\777/I
-Failed: octal value is greater than \377 (not in UTF-8 mode) at offset 3
-
-/\777/8I
-Capturing subpattern count = 0
-Options: utf8
-First char = 199
-Need char = 191
- \x{1ff}
- 0: \x{1ff}
- \777
- 0: \x{1ff}
-
/\x{100}*\d/8DZ
------------------------------------------------------------------
Bra
@@ -1078,7 +491,7 @@ Need char = 191
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -1091,7 +504,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -1104,7 +517,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -1117,7 +530,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -1130,7 +543,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -1143,49 +556,10 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
-/\x{100}+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
-
-/\x{100}+X/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 'X'
-
-/X+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- X++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'X'
-Need char = 128
-
/()()()()()()()()()()
()()()()()()()()()()
()()()()()()()()()()
@@ -1227,9 +601,6 @@ Matched, but too many substrings
End
------------------------------------------------------------------
-/^[\QĀ\E-\QŐ\E/BZ8
-Failed: missing terminating ] for character class at offset 15
-
/^abc./mgx8<any>
abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
0: abc1
@@ -1415,7 +786,7 @@ No match
/[\H]/8BZ
------------------------------------------------------------------
Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{7fffffff}]
+ [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}]
Ket
End
------------------------------------------------------------------
@@ -1423,7 +794,7 @@ No match
/[\V]/8BZ
------------------------------------------------------------------
Bra
- [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{2029}-\x{7fffffff}]
+ [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}]
Ket
End
------------------------------------------------------------------
@@ -1432,39 +803,9 @@ No match
\x{1ec5}
0: \x{1ec5}
-/-- This tests the stricter UTF-8 check according to RFC 3629. --/
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
-No match
- \x{d800}
-Error -10
- \x{d800}\?
-No match
- \x{da00}
-Error -10
- \x{da00}\?
-No match
- \x{dfff}
-Error -10
- \x{dfff}\?
-No match
- \x{110000}
-Error -10
- \x{110000}\?
-No match
- \x{2000000}
-Error -10
- \x{2000000}\?
-No match
- \x{7fffffff}
-Error -10
- \x{7fffffff}\?
-No match
-
/a\Rb/I8<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1482,7 +823,7 @@ No match
/a\Rb/I8<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1504,7 +845,7 @@ No match
/a\R?b/I8<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1522,7 +863,7 @@ No match
/a\R?b/I8<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1579,26 +920,11 @@ No match
\x{de}\x{de}
0: \xde\xde
1: \xde
- \x{123}
-** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
-** Truncation will probably give the wrong result.
-No match
/X/8f<any>
A\x{1ec5}ABCXYZ
0: X
-/(*UTF8)\x{1234}/
- abcd\x{1234}pqr
- 0: \x{1234}
-
-/(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
-Capturing subpattern count = 0
-Options: bsr_unicode utf8
-Forced newline sequence: CRLF
-First char = 'a'
-Need char = 'b'
-
/Xa{2,4}b/8
X\P
Partial match: X
@@ -2076,150 +1402,448 @@ Partial match: abcde
\PX
Partial match: X
-/\h/SI
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xa0
+/\sxxx\s/8T1
+ AB\x{85}xxx\x{a0}XYZ
+ 0: \x{85}xxx\x{a0}
+ AB\x{a0}xxx\x{85}XYZ
+ 0: \x{a0}xxx\x{85}
-/\h/SI8
+/\S \S/8T1
+ \x{a2} \x{84}
+ 0: \x{a2} \x{84}
+
+'A#хц'8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ A
+ Ket
+ End
+------------------------------------------------------------------
+
+'A#хц
+ PQ'8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ APQ
+ Ket
+ End
+------------------------------------------------------------------
+
+/a+#хaa
+ z#XX?/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ a++
+ z
+ Ket
+ End
+------------------------------------------------------------------
+
+/a+#хaa
+ z#х?/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ a++
+ z
+ Ket
+ End
+------------------------------------------------------------------
+
+/\g{A}xxx#bXX(?'A'123) (?'A'456)/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ \1
+ xxx
+ CBra 1
+ 456
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/\g{A}xxx#bх(?'A'123) (?'A'456)/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ \1
+ xxx
+ CBra 1
+ 456
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/^\cģ/8
+Failed: \c must be followed by an ASCII character at offset 3
+
+/(\R*)(.)/s8
+ \r\n
+ 0: \x{0d}
+ 1:
+ 2: \x{0d}
+ \r\r\n\n\r
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0d}\x{0d}\x{0a}\x{0a}
+ 2: \x{0d}
+ \r\r\n\n\r\n
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0d}\x{0d}\x{0a}\x{0a}
+ 2: \x{0d}
+
+/(\R)*(.)/s8
+ \r\n
+ 0: \x{0d}
+ 1: <unset>
+ 2: \x{0d}
+ \r\r\n\n\r
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0a}
+ 2: \x{0d}
+ \r\r\n\n\r\n
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0a}
+ 2: \x{0d}
+
+/[^\x{1234}]+/iS8I
Capturing subpattern count = 0
-Options: utf8
+Options: caseless utf
No first char
No need char
Subject length lower bound = 1
-Starting byte set: \x09 \x20 \xc2 \xe1 \xe2 \xe3
- ABC\x{09}
- 0: \x{09}
- ABC\x{20}
- 0:
- ABC\x{a0}
- 0: \x{a0}
- ABC\x{1680}
- 0: \x{1680}
- ABC\x{180e}
- 0: \x{180e}
- ABC\x{2000}
- 0: \x{2000}
- ABC\x{202f}
- 0: \x{202f}
- ABC\x{205f}
- 0: \x{205f}
- ABC\x{3000}
- 0: \x{3000}
-
-/\v/SI
+No set of starting bytes
+
+/[^\x{1234}]+?/iS8I
Capturing subpattern count = 0
-No options
+Options: caseless utf
No first char
No need char
Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \x85
+No set of starting bytes
-/\v/SI8
+/[^\x{1234}]++/iS8I
Capturing subpattern count = 0
-Options: utf8
+Options: caseless utf
No first char
No need char
Subject length lower bound = 1
-Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
- ABC\x{0a}
- 0: \x{0a}
- ABC\x{0b}
- 0: \x{0b}
- ABC\x{0c}
- 0: \x{0c}
- ABC\x{0d}
- 0: \x{0d}
- ABC\x{85}
- 0: \x{85}
- ABC\x{2028}
- 0: \x{2028}
+No set of starting bytes
-/\R/SI
+/[^\x{1234}]{2}/iS8I
Capturing subpattern count = 0
-No options
+Options: caseless utf
No first char
No need char
Subject length lower bound = 2
-Starting byte set: \x0a \x0b \x0c \x0d \x85
+No set of starting bytes
-/\R/SI8
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-Subject length lower bound = 2
-Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
+//<bsr_anycrlf><bsr_unicode>
+Failed: inconsistent NEWLINE options at offset 0
-/\h*A/SI8
-Capturing subpattern count = 0
-Options: utf8
-No first char
-Need char = 'A'
-Subject length lower bound = 1
-Starting byte set: \x09 \x20 A \xc2 \xe1 \xe2 \xe3
- CDBABC
- 0: A
+/f.*/
+ \P\Pfor
+Partial match: for
+
+/f.*/s
+ \P\Pfor
+Partial match: for
+
+/f.*/8
+ \P\Pfor
+Partial match: for
+
+/f.*/8s
+ \P\Pfor
+Partial match: for
-/\v+A/SI8
-Capturing subpattern count = 0
-Options: utf8
-No first char
-Need char = 'A'
-Subject length lower bound = 2
-Starting byte set: \x0a \x0b \x0c \x0d \xc2 \xe2
+/\x{d7ff}\x{e000}/8
-/\s?xxx\s/8SI
-Capturing subpattern count = 0
-Options: utf8
-No first char
-Need char = 'x'
-Subject length lower bound = 4
-Starting byte set: \x09 \x0a \x0c \x0d \x20 x
+/\x{d800}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
-/\sxxx\s/8T1
- AB\x{85}xxx\x{a0}XYZ
- 0: \x{85}xxx\x{a0}
- AB\x{a0}xxx\x{85}XYZ
- 0: \x{a0}xxx\x{85}
+/\x{dfff}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
-/\sxxx\s/I8ST1
-Capturing subpattern count = 0
-Options: utf8
-No first char
-Need char = 'x'
-Subject length lower bound = 5
-Starting byte set: \x09 \x0a \x0c \x0d \x20 \xc2
- AB\x{85}xxx\x{a0}XYZ
- 0: \x{85}xxx\x{a0}
- AB\x{a0}xxx\x{85}XYZ
- 0: \x{a0}xxx\x{85}
+/\h+/8
+ \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
+ 0: \x{1680}\x{2000}\x{202f}\x{3000}
+ \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
+ 0: \x{200a}\x{a0}\x{2000}
-/\S \S/8T1
- \x{a2} \x{84}
- 0: \x{a2} \x{84}
+/[\h\x{e000}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
+ 0: \x{1680}\x{2000}\x{202f}\x{3000}
+ \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
+ 0: \x{200a}\x{a0}\x{2000}
+
+/\H+/8
+ \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
+ 0: \x{167f}\x{1681}\x{180d}\x{180f}
+ \x{2000}\x{200a}\x{1fff}\x{200b}
+ 0: \x{1fff}\x{200b}
+ \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
+ 0: \x{202e}\x{2030}\x{205e}\x{2060}
+ \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
+ 0: \x{9f}\x{a1}\x{2fff}\x{3001}
+
+/[\H\x{d7ff}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}\x{d7ff}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
+ 0: \x{167f}\x{1681}\x{180d}\x{180f}
+ \x{2000}\x{200a}\x{1fff}\x{200b}
+ 0: \x{1fff}\x{200b}
+ \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
+ 0: \x{202e}\x{2030}\x{205e}\x{2060}
+ \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
+ 0: \x{9f}\x{a1}\x{2fff}\x{3001}
+
+/\v+/8
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ 0: \x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+ 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
+
+/[\v\x{e000}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ 0: \x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+ 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
+
+/\V+/8
+ \x{2028}\x{2029}\x{2027}\x{2030}
+ 0: \x{2027}\x{2030}
+ \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
+ 0: \x{09}\x{0e}\x{84}\x{86}
+
+/[\V\x{d7ff}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{2028}\x{2029}\x{2027}\x{2030}
+ 0: \x{2027}\x{2030}
+ \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
+ 0: \x{09}\x{0e}\x{84}\x{86}
+
+/\R+/8<bsr_unicode>
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ 0: \x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+ 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
+
+/(..)\1/8
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+ 0: abab
+ 1: ab
+
+/(..)\1/8i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+ 0: aBAb
+ 1: aB
+
+/(..)\1{2,}/8
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+Partial match: abab
+ ababa\P
+Partial match: ababa
+ ababab\P
+ 0: ababab
+ 1: ab
+ ababab\P\P
+Partial match: ababab
+ abababa\P
+ 0: ababab
+ 1: ab
+ abababa\P\P
+Partial match: abababa
+
+/(..)\1{2,}/8i
+ ab\P
+Partial match: ab
+ aBa\P
+Partial match: aBa
+ aBAb\P
+Partial match: aBAb
+ AbaBA\P
+Partial match: AbaBA
+ abABAb\P
+ 0: abABAb
+ 1: ab
+ aBAbaB\P\P
+Partial match: aBAbaB
+ abABabA\P
+ 0: abABab
+ 1: ab
+ abaBABa\P\P
+Partial match: abaBABa
+
+/(..)\1{2,}?x/8i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+Partial match: aBAb
+ abaBA\P
+Partial match: abaBA
+ abAbaB\P
+Partial match: abAbaB
+ abaBabA\P
+Partial match: abaBabA
+ abAbABaBx\P
+ 0: abAbABaBx
+ 1: ab
+
+/./8<CRLF>
+ \r\P
+ 0: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+
+/.{2,3}/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}\x{0d}
+ \r\r\r\P\P
+Partial match: \x{0d}\x{0d}\x{0d}
+
+/.{2,3}?/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\r\P\P
+ 0: \x{0d}\x{0d}
+
+/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/8BZ
+------------------------------------------------------------------
+ Bra
+ [^\x{100}]
+ [^\x{1234}]
+ [^\x{ffff}]
+ [^\x{10000}]
+ [^\x{10ffff}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/8BZi
+------------------------------------------------------------------
+ Bra
+ /i [^\x{100}]
+ /i [^\x{1234}]
+ /i [^\x{ffff}]
+ /i [^\x{10000}]
+ /i [^\x{10ffff}]
+ Ket
+ End
+------------------------------------------------------------------
-/\S \S/I8ST1
+/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/8BZ
+------------------------------------------------------------------
+ Bra
+ [^\x{100}]*
+ [^\x{10000}]+
+ [^\x{10ffff}]??
+ [^\x{8000}]{4}
+ [^\x{8000}]*
+ [^\x{7fff}]{2}
+ [^\x{7fff}]{0,7}?
+ [^\x{fffff}]{5}
+ [^\x{fffff}]?+
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/8BZi
+------------------------------------------------------------------
+ Bra
+ /i [^\x{100}]*
+ /i [^\x{10000}]+
+ /i [^\x{10ffff}]??
+ /i [^\x{8000}]{4}
+ /i [^\x{8000}]*
+ /i [^\x{7fff}]{2}
+ /i [^\x{7fff}]{0,7}?
+ Once
+ /i [^\x{fffff}]{5}
+ /i [^\x{fffff}]?
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?<=\x{1234}\x{1234})\bxy/I8
Capturing subpattern count = 0
-Options: utf8
-No first char
-Need char = ' '
-Subject length lower bound = 3
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0b \x0e
- \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d
- \x1e \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e
- f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \xc0 \xc1 \xc2 \xc3
- \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2
- \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1
- \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0
- \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff
- \x{a2} \x{84}
- 0: \x{a2} \x{84}
- A Z
- 0: A Z
+Options: utf
+First char = 'x'
+Need char = 'y'
+Max lookbehind = 2
+
+/(?<!^)ETA/8
+ ETA
+No match
+
+/\u0100/<JS>8BZ
+------------------------------------------------------------------
+ Bra
+ \x{100}
+ Ket
+ End
+------------------------------------------------------------------
+
+/[\u0100-\u0200]/<JS>8BZ
+------------------------------------------------------------------
+ Bra
+ [\x{100}-\x{200}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/\ud800/<JS>8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 5
/-- End of testinput5 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6
index 6a9ec839d..e88fc091b 100644
--- a/ext/pcre/pcrelib/testdata/testoutput6
+++ b/ext/pcre/pcrelib/testdata/testoutput6
@@ -1114,6 +1114,8 @@ No match
0: A\x80
/^[\p{Arabic}]/8
+ \x{604}
+ 0: \x{604}
\x{60e}
0: \x{60e}
\x{656}
@@ -1144,8 +1146,6 @@ No match
0: \x{6fa}
** Failers
No match
- \x{600}
-No match
\x{650}
No match
\x{651}
@@ -1176,8 +1176,6 @@ No match
0: \x{964}
\x{965}
0: \x{965}
- \x{970}
- 0: \x{970}
/^\p{Inherited}/8
\x{64b}
@@ -1353,4 +1351,26 @@ No match
a\xFCb
No match
+/ⱥ/8i
+ ⱥ
+ 0: \x{2c65}
+ Ⱥx
+ 0: \x{23a}
+ Ⱥ
+ 0: \x{23a}
+
+/[ⱥ]/8i
+ ⱥ
+ 0: \x{2c65}
+ Ⱥx
+ 0: \x{23a}
+ Ⱥ
+ 0: \x{23a}
+
+/Ⱥ/8i
+ Ⱥ
+ 0: \x{23a}
+ ⱥ
+ 0: \x{2c65}
+
/-- End of testinput6 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7
index 123ba82c4..ccfdad965 100644
--- a/ext/pcre/pcrelib/testdata/testoutput7
+++ b/ext/pcre/pcrelib/testdata/testoutput7
@@ -1,7700 +1,1316 @@
-/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
- The -dfa flag must be used with pcretest when running it. --/
-
-/abc/
- abc
- 0: abc
-
-/ab*c/
- abc
- 0: abc
- abbbbc
- 0: abbbbc
- ac
- 0: ac
-
-/ab+c/
- abc
- 0: abc
- abbbbbbc
- 0: abbbbbbc
- *** Failers
-No match
- ac
-No match
- ab
-No match
-
-/a*/
- a
- 0: a
- 1:
- aaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaa
- 5: aaaaaaaaaaaa
- 6: aaaaaaaaaaa
- 7: aaaaaaaaaa
- 8: aaaaaaaaa
- 9: aaaaaaaa
-10: aaaaaaa
-11: aaaaaa
-12: aaaaa
-13: aaaa
-14: aaa
-15: aa
-16: a
-17:
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaa
-17: aaaaaaaaaaaaa
-18: aaaaaaaaaaaa
-19: aaaaaaaaaaa
-20: aaaaaaaaaa
-21: aaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
- 0:
-
-/(a|abcd|african)/
- a
- 0: a
- abcd
- 0: abcd
- 1: a
- african
- 0: african
- 1: a
-
-/^abc/
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/^abc/m
- abcdef
- 0: abc
- xyz\nabc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Aabc/
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/\Aabc/m
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/\Gabc/
- abcdef
- 0: abc
- xyzabc\>3
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyzabc\>2
-No match
-
-/x\dy\Dz/
- x9yzz
- 0: x9yzz
- x0y+z
- 0: x0y+z
- *** Failers
-No match
- xyz
-No match
- xxy0z
-No match
-
-/x\sy\Sz/
- x yzz
- 0: x yzz
- x y+z
- 0: x y+z
- *** Failers
-No match
- xyz
-No match
- xxyyz
-No match
-
-/x\wy\Wz/
- xxy+z
- 0: xxy+z
- *** Failers
-No match
- xxy0z
-No match
- x+y+z
-No match
-
-/x.y/
- x+y
- 0: x+y
- x-y
- 0: x-y
- *** Failers
-No match
- x\ny
-No match
-
-/x.y/s
- x+y
- 0: x+y
- x-y
- 0: x-y
- x\ny
- 0: x\x0ay
-
-/(a.b(?s)c.d|x.y)p.q/
- a+bc+dp+q
- 0: a+bc+dp+q
- a+bc\ndp+q
- 0: a+bc\x0adp+q
- x\nyp+q
- 0: x\x0ayp+q
- *** Failers
-No match
- a\nbc\ndp+q
-No match
- a+bc\ndp\nq
-No match
- x\nyp\nq
-No match
-
-/a\d\z/
- ba0
- 0: a0
- *** Failers
-No match
- ba0\n
-No match
- ba0\ncd
-No match
-
-/a\d\z/m
- ba0
- 0: a0
- *** Failers
-No match
- ba0\n
-No match
- ba0\ncd
-No match
-
-/a\d\Z/
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
-
-/a\d\Z/m
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
-
-/a\d$/
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
-
-/a\d$/m
- ba0
- 0: a0
- ba0\n
- 0: a0
- ba0\ncd
- 0: a0
- *** Failers
-No match
-
-/abc/i
- abc
- 0: abc
- aBc
- 0: aBc
- ABC
- 0: ABC
-
-/[^a]/
- abcd
- 0: b
-
-/ab?\w/
- abz
- 0: abz
- 1: ab
- abbz
- 0: abb
- 1: ab
- azz
- 0: az
-
-/x{0,3}yz/
- ayzq
- 0: yz
- axyzq
- 0: xyz
- axxyz
- 0: xxyz
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
-
-/x{3}yz/
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
- ayzq
-No match
- axyzq
-No match
- axxyz
-No match
-
-/x{2,3}yz/
- axxyz
- 0: xxyz
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
- ayzq
-No match
- axyzq
-No match
-
-/[^a]+/
- bac
- 0: b
- bcdefax
- 0: bcdef
- 1: bcde
- 2: bcd
- 3: bc
- 4: b
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- 3: **
- 4: *
- aaaaa
-No match
-
-/[^a]*/
- bac
- 0: b
- 1:
- bcdefax
- 0: bcdef
- 1: bcde
- 2: bcd
- 3: bc
- 4: b
- 5:
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- 3: **
- 4: *
- 5:
- aaaaa
- 0:
-
-/[^a]{3,5}/
- xyz
- 0: xyz
- awxyza
- 0: wxyz
- 1: wxy
- abcdefa
- 0: bcdef
- 1: bcde
- 2: bcd
- abcdefghijk
- 0: bcdef
- 1: bcde
- 2: bcd
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- axya
-No match
- axa
-No match
- aaaaa
-No match
-
-/\d*/
- 1234b567
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- 4:
- xyz
- 0:
-
-/\D*/
- a1234b567
- 0: a
- 1:
- xyz
- 0: xyz
- 1: xy
- 2: x
- 3:
-
-/\d+/
- ab1234c56
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- *** Failers
-No match
- xyz
-No match
-
-/\D+/
- ab123c56
- 0: ab
- 1: a
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- 789
-No match
-
-/\d?A/
- 045ABC
- 0: 5A
- ABC
- 0: A
- *** Failers
-No match
- XYZ
-No match
-
-/\D?A/
- ABC
- 0: A
- BAC
- 0: BA
- 9ABC
- 0: A
- *** Failers
-No match
-
-/a+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/^.*xyz/
- xyz
- 0: xyz
- ggggggggxyz
- 0: ggggggggxyz
-
-/^.+xyz/
- abcdxyz
- 0: abcdxyz
- axyz
- 0: axyz
- *** Failers
-No match
- xyz
-No match
-
-/^.?xyz/
- xyz
- 0: xyz
- cxyz
- 0: cxyz
-
-/^\d{2,3}X/
- 12X
- 0: 12X
- 123X
- 0: 123X
- *** Failers
-No match
- X
-No match
- 1X
-No match
- 1234X
-No match
-
-/^[abcd]\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- *** Failers
-No match
- e45
-No match
- abcd
-No match
- abcd1234
-No match
- 1234
-No match
-
-/^[abcd]*\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- abcd1234
- 0: abcd1
- 1234
- 0: 1
- *** Failers
-No match
- e45
-No match
- abcd
-No match
-
-/^[abcd]+\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- abcd1234
- 0: abcd1
- *** Failers
-No match
- 1234
-No match
- e45
-No match
- abcd
-No match
-
-/^a+X/
- aX
- 0: aX
- aaX
- 0: aaX
-
-/^[abcd]?\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- 1234
- 0: 1
- *** Failers
-No match
- abcd1234
-No match
- e45
-No match
-
-/^[abcd]{2,3}\d/
- ab45
- 0: ab4
- bcd93
- 0: bcd9
- *** Failers
-No match
- 1234
-No match
- a36
-No match
- abcd1234
-No match
- ee45
-No match
-
-/^(abc)*\d/
- abc45
- 0: abc4
- abcabcabc45
- 0: abcabcabc4
- 42xyz
- 0: 4
- *** Failers
-No match
-
-/^(abc)+\d/
- abc45
- 0: abc4
- abcabcabc45
- 0: abcabcabc4
- *** Failers
-No match
- 42xyz
-No match
-
-/^(abc)?\d/
- abc45
- 0: abc4
- 42xyz
- 0: 4
- *** Failers
-No match
- abcabcabc45
-No match
-
-/^(abc){2,3}\d/
- abcabc45
- 0: abcabc4
- abcabcabc45
- 0: abcabcabc4
- *** Failers
-No match
- abcabcabcabc45
-No match
- abc45
-No match
- 42xyz
-No match
-
-/1(abc|xyz)2(?1)3/
- 1abc2abc3456
- 0: 1abc2abc3
- 1abc2xyz3456
- 0: 1abc2xyz3
-
-/^(a*\w|ab)=(a*\w|ab)/
- ab=ab
- 0: ab=ab
- 1: ab=a
-
-/^(a*\w|ab)=(?1)/
- ab=ab
- 0: ab=ab
-
-/^([^()]|\((?1)*\))*$/
- abc
- 0: abc
- a(b)c
- 0: a(b)c
- a(b(c))d
- 0: a(b(c))d
- *** Failers)
-No match
- a(b(c)d
-No match
-
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- 0: >abc>123<xyz<
- >abc>1(2)3<xyz<
- 0: >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
- 0: >abc>(1(2)3)<xyz<
-
-/^(?>a*)\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
- *** Failers
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
- <>
- 0: <>
- <abcd>
- 0: <abcd>
- <abc <123> hij>
- 0: <abc <123> hij>
- <abc <def> hij>
- 0: <def>
- <abc<>def>
- 0: <abc<>def>
- <abc<>
- 0: <>
- *** Failers
-No match
- <abc
-No match
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?=abc)\w{5}:$/
- abcde:
- 0: abcde:
- *** Failers
-No match
- abc..
-No match
- 123
-No match
- vwxyz
-No match
-
-/^(?!abc)\d\d$/
- 12
- 0: 12
- *** Failers
-No match
- abcde:
-No match
- abc..
-No match
- 123
-No match
- vwxyz
-No match
-
-/(?<=abc|xy)123/
- abc12345
- 0: 123
- wxy123z
- 0: 123
- *** Failers
-No match
- 123abc
-No match
-
-/(?<!abc|xy)123/
- 123abc
- 0: 123
- mno123456
- 0: 123
- *** Failers
-No match
- abc12345
-No match
- wxy123z
-No match
-
-/abc(?C1)xyz/
- abcxyz
---->abcxyz
- 1 ^ ^ x
- 0: abcxyz
- 123abcxyz999
---->123abcxyz999
- 1 ^ ^ x
- 0: abcxyz
-
-/(ab|cd){3,4}/C
- ababab
---->ababab
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- 0: ababab
- abcdabcd
---->abcdabcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdabcd
- 1: abcdab
- abcdcdcdcdcd
---->abcdcdcdcdcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdcdcd
- 1: abcdcd
-
-/^abc/
- abcdef
- 0: abc
- *** Failers
-No match
- abcdef\B
-No match
-
-/^(a*|xyz)/
- bcd
- 0:
- aaabcd
- 0: aaa
- 1: aa
- 2: a
- 3:
- xyz
- 0: xyz
- 1:
- xyz\N
- 0: xyz
- *** Failers
- 0:
- bcd\N
-No match
-
-/xyz$/
- xyz
- 0: xyz
- xyz\n
- 0: xyz
- *** Failers
-No match
- xyz\Z
-No match
- xyz\n\Z
-No match
-
-/xyz$/m
- xyz
- 0: xyz
- xyz\n
- 0: xyz
- abcxyz\npqr
- 0: xyz
- abcxyz\npqr\Z
- 0: xyz
- xyz\n\Z
- 0: xyz
- *** Failers
-No match
- xyz\Z
-No match
-
-/\Gabc/
- abcdef
- 0: abc
- defabcxyz\>3
- 0: abc
- *** Failers
-No match
- defabcxyz
-No match
-
-/^abcdef/
- ab\P
-Partial match: ab
- abcde\P
-Partial match: abcde
- abcdef\P
- 0: abcdef
- *** Failers
-No match
- abx\P
-No match
-
-/^a{2,4}\d+z/
- a\P
-Partial match: a
- aa\P
-Partial match: aa
- aa2\P
-Partial match: aa2
- aaa\P
-Partial match: aaa
- aaa23\P
-Partial match: aaa23
- aaaa12345\P
-Partial match: aaaa12345
- aa0z\P
- 0: aa0z
- aaaa4444444444444z\P
- 0: aaaa4444444444444z
- *** Failers
-No match
- az\P
-No match
- aaaaa\P
-No match
- a56\P
-No match
-
-/^abcdef/
- abc\P
-Partial match: abc
- def\R
- 0: def
-
-/(?<=foo)bar/
- xyzfo\P
-No match
- foob\P\>2
-Partial match: foob
- foobar...\R\P\>4
- 0: ar
- xyzfo\P
-No match
- foobar\>2
- 0: bar
- *** Failers
-No match
- xyzfo\P
-No match
- obar\R
-No match
-
-/(ab*(cd|ef))+X/
- adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
-No match
- lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
-Partial match: abbbbbbcdaefabbbbbbbefa
- cdabbbbbbbb\P\R\B\Z
-Partial match: cdabbbbbbbb
- efabbbbbbbbbbbbbbbb\P\R\B\Z
-Partial match: efabbbbbbbbbbbbbbbb
- bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
- 0: bbbbbbbbbbbbcdX
-
-/(a|b)/SF>testsavedregex
-Compiled regex written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- ** Failers
- 0: a
- def
-No match
-
-/the quick brown fox/
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
-No match
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
-No match
-
-/The quick brown fox/i
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
- 0: The quick brown FOX
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
- 0: THE QUICK BROWN FOX
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
- 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- 0: aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- 0: aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- 0: aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- 0: aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- 0: abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- 0: aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- 0: abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- 0: aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- 0: aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- 0: aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- *** Failers
-No match
- abxyzpqrrabbxyyyypqAzz
-No match
- abxyzpqrrrrabbxyyyypqAzz
-No match
- abxyzpqrrrabxyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
-No match
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-No match
-
-/^(abc){1,2}zz/
- abczz
- 0: abczz
- abcabczz
- 0: abcabczz
- *** Failers
-No match
- zz
-No match
- abcabcabczz
-No match
- >>abczz
-No match
-
-/^(b+?|a){1,2}?c/
- bc
- 0: bc
- bbc
- 0: bbc
- bbbc
- 0: bbbc
- bac
- 0: bac
- bbac
- 0: bbac
- aac
- 0: aac
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}c/
- bc
- 0: bc
- bbc
- 0: bbc
- bbbc
- 0: bbbc
- bac
- 0: bac
- bbac
- 0: bbac
- aac
- 0: aac
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}?bc/
- bbc
- 0: bbc
-
-/^(b*|ba){1,2}?bc/
- babc
- 0: babc
- bbabc
- 0: bbabc
- bababc
- 0: bababc
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^(ba|b*){1,2}?bc/
- babc
- 0: babc
- bbabc
- 0: bbabc
- bababc
- 0: bababc
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
- 0: \x01\x01\x1b;z
-
-/^[ab\]cde]/
- athing
- 0: a
- bthing
- 0: b
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- fthing
-No match
- [thing
-No match
- \\thing
-No match
-
-/^[]cde]/
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- athing
-No match
- fthing
-No match
-
-/^[^ab\]cde]/
- fthing
- 0: f
- [thing
- 0: [
- \\thing
- 0: \
- *** Failers
- 0: *
- athing
-No match
- bthing
-No match
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
-No match
-
-/^[^]cde]/
- athing
- 0: a
- fthing
- 0: f
- *** Failers
- 0: *
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
-No match
-
-/^\/
-
- 0: \x81
-
-/^/
-
- 0: \xff
-
-/^[0-9]+$/
- 0
- 0: 0
- 1
- 0: 1
- 2
- 0: 2
- 3
- 0: 3
- 4
- 0: 4
- 5
- 0: 5
- 6
- 0: 6
- 7
- 0: 7
- 8
- 0: 8
- 9
- 0: 9
- 10
- 0: 10
- 100
- 0: 100
- *** Failers
-No match
- abc
-No match
-
-/^.*nter/
- enter
- 0: enter
- inter
- 0: inter
- uponter
- 0: uponter
-
-/^xxx[0-9]+$/
- xxx0
- 0: xxx0
- xxx1234
- 0: xxx1234
- *** Failers
-No match
- xxx
-No match
-
-/^.+[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- 0: abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
-No match
- !pqr=apquxz.ixr.zzz.ac.uk
-No match
- abc!=apquxz.ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz:ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-No match
-
-/:/
- Well, we need a colon: somewhere
- 0: :
- *** Fail if we don't
-No match
-
-/([\da-f:]+)$/i
- 0abc
- 0: 0abc
- abc
- 0: abc
- fed
- 0: fed
- E
- 0: E
- ::
- 0: ::
- 5f03:12C0::932e
- 0: 5f03:12C0::932e
- fed def
- 0: def
- Any old stuff
- 0: ff
- *** Failers
-No match
- 0zzz
-No match
- gzzz
-No match
- fed\x20
-No match
- Any old rubbish
-No match
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- 0: .1.2.3
- A.12.123.0
- 0: A.12.123.0
- *** Failers
-No match
- .1.2.3333
-No match
- 1.2.3
-No match
- 1234.2.3
-No match
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 0: 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- 0: 1 IN SOA non-sp1 non-sp2 (
- *** Failers
-No match
- 1IN SOA non-sp1 non-sp2(
-No match
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- 0: a.
- Z.
- 0: Z.
- 2.
- 0: 2.
- ab-c.pq-r.
- 0: ab-c.pq-r.
- sxk.zzz.ac.uk.
- 0: sxk.zzz.ac.uk.
- x-.y-.
- 0: x-.y-.
- *** Failers
-No match
- -abc.peq.
-No match
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- 0: *.a
- *.b0-a
- 0: *.b0-a
- *.c3-b.c
- 0: *.c3-b.c
- *.c-a.b-c
- 0: *.c-a.b-c
- *** Failers
-No match
- *.0
-No match
- *.a-
-No match
- *.a-b.c-
-No match
- *.c-a.0-c
-No match
-
-/^(?=ab(de))(abd)(e)/
- abde
- 0: abde
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
- 0: abdf
-
-/^(?=(ab(cd)))(ab)/
- abcd
- 0: ab
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- 0: a.b.c.d
- A.B.C.D
- 0: A.B.C.D
- a.b.c.1.2.3.C
- 0: a.b.c.1.2.3.C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- 0: "1234"
- \"abcd\" ;
- 0: "abcd" ;
- \"\" ; rhubarb
- 0: "" ; rhubarb
- *** Failers
-No match
- \"1234\" : things
-No match
-
-/^$/
- \
- 0:
- *** Failers
-No match
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/^ a\ b[c ]d $/x
- a bcd
- 0: a bcd
- a b d
- 0: a b d
- *** Failers
-No match
- abcd
-No match
- ab d
-No match
-
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
- 0: a+ Z0+\x08\x0a\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
- 0: .^$(*+)|{?,?}
- 1: .^$(*+)|{?,?
- 2: .^$(*+)|{?,
- 3: .^$(*+)|{?
- 4: .^$(*+)|{
- 5: .^$(*+)|
- 6: .^$(*+)
- 7: .^$(*+
- 8: .^$(*
- 9: .^$(
-10: .^$
-11: .^
-12: .
-
-/^a*\w/
- z
- 0: z
- az
- 0: az
- 1: a
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- 3: a
- a
- 0: a
- aa
- 0: aa
- 1: a
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- a+
- 0: a
- aa+
- 0: aa
- 1: a
-
-/^a*?\w/
- z
- 0: z
- az
- 0: az
- 1: a
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- 3: a
- a
- 0: a
- aa
- 0: aa
- 1: a
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- a+
- 0: a
- aa+
- 0: aa
- 1: a
-
-/^a+\w/
- az
- 0: az
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- aa
- 0: aa
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- aa+
- 0: aa
-
-/^a+?\w/
- az
- 0: az
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- aa
- 0: aa
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- aa+
- 0: aa
+/-- These tests for Unicode property support test PCRE's API and show some of
+ the compiled code. They are not Perl-compatible. --/
+
+/[\p{L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
-/^\d{8}\w{2,}/
- 1234567890
- 0: 1234567890
- 12345678ab
- 0: 12345678ab
- 12345678__
- 0: 12345678__
- *** Failers
-No match
- 1234567
-No match
+/[\p{^L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\P{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
-/^[aeiou\d]{4,5}$/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- aaaaa
- 0: aaaaa
- *** Failers
-No match
- 123456
-No match
+/[\P{L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\P{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
-/^[aeiou\d]{4,5}?/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- 1: 1234
- aaaaa
- 0: aaaaa
- 1: aaaa
- 123456
- 0: 12345
- 1: 1234
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
- From abcd Mon Sep 1 12:33:02 1997
- 0: From abcd Mon Sep 1 12:33
- *** Failers
-No match
- From abcd Sep 01 12:33:02 1997
-No match
+/[\P{^L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
-/^12.34/s
- 12\n34
- 0: 12\x0a34
- 12\r34
- 0: 12\x0d34
-
-/\w+(?=\t)/
- the quick brown\t fox
- 0: brown
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
- 0: foolish see?
- 1: foolish see
- 2: foolish se
- 3: foolish s
- 4: foolish
- 5: foolish
- 6: foolis
- 7: fooli
- 8: fool
- 9: foo
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- 0: rowbar etc
- 1: rowbar et
- 2: rowbar e
- 3: rowbar
- 4: rowbar
- barrel
- 0: barrel
- 1: barre
- 2: barr
- 3: bar
- 2barrel
- 0: 2barrel
- 1: 2barre
- 2: 2barr
- 3: 2bar
- A barrel
- 0: A barrel
- 1: A barre
- 2: A barr
- 3: A bar
-
-/^(\D*)(?=\d)(?!123)/
- abc456
- 0: abc
- *** Failers
-No match
- abc123
-No match
+/[abc\p{L}\x{0660}]/8DZ
+------------------------------------------------------------------
+ Bra
+ [a-c\p{L}\x{660}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+No first char
+No need char
-/^1234(?# test newlines
- inside)/
+/[\p{Nd}]/8DZ
+------------------------------------------------------------------
+ Bra
+ [\p{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+No first char
+No need char
1234
- 0: 1234
+ 0: 1
-/^1234 #comment in extended re
- /x
+/[\p{Nd}+-]+/8DZ
+------------------------------------------------------------------
+ Bra
+ [+\-\p{Nd}]+
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+No first char
+No need char
1234
0: 1234
-
-/#rhubarb
- abcd/x
- abcd
- 0: abcd
-
-/^abcd#rhubarb/x
- abcd
- 0: abcd
-
-/(?!^)abc/
- the abc
- 0: abc
- *** Failers
-No match
- abc
-No match
-
-/(?=^)abc/
- abc
- 0: abc
- *** Failers
-No match
- the abc
-No match
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <user@dom.ain>
- <user\@dom.ain>
- 0: user@dom.ain
- 1: user@dom
- user\@dom.ain
- 0: user@dom.ain
- 1: user@dom
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <user.1234@dom.ain> (a comment)
- 1: "A. Other" <user.1234@dom.ain>
- 2: "A. Other" <user.1234@dom.ain>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <user.1234@dom.ain> (a comment)
- 1: Other <user.1234@dom.ain>
- 2: Other <user.1234@dom.ain>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
- A missing angle <user\@some.where
- 0: user@some.where
- 1: user@some
- *** Failers
-No match
- The quick brown fox
-No match
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <user@dom.ain>
- <user\@dom.ain>
- 0: user@dom.ain
- 1: user@dom
- user\@dom.ain
- 0: user@dom.ain
- 1: user@dom
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <user.1234@dom.ain>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <user.1234@dom.ain>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
- A missing angle <user\@some.where
- 0: user@some.where
- 1: user@some
- *** Failers
-No match
- The quick brown fox
-No match
-
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- 0: abc\x00def\x00pqr\x00xyz\x000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
- 0: abc\x00def\x00pqr\x00xyz\x000AB
-
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
-
-/^[\000-\037]/
- \0A
- 0: \x00
- \01B
- 0: \x01
- \037C
- 0: \x1f
-
-/\0*/
- \0\0\0\0
- 0: \x00\x00\x00\x00
- 1: \x00\x00\x00
- 2: \x00\x00
- 3: \x00
- 4:
-
-/A\x0{2,3}Z/
- The A\x0\x0Z
- 0: A\x00\x00Z
- An A\0\x0\0Z
- 0: A\x00\x00\x00Z
- *** Failers
-No match
- A\0Z
-No match
- A\0\x0\0\x0Z
-No match
-
-/^\s/
- \040abc
- 0:
- \x0cabc
- 0: \x0c
- \nabc
- 0: \x0a
- \rabc
- 0: \x0d
- \tabc
- 0: \x09
- *** Failers
-No match
- abc
-No match
-
-/^a b
- c/x
- abc
- 0: abc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
- abbbc
- 0: abbbc
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abbbbbc
-No match
-
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/^[W-c]+$/
- WXY_^abc
- 0: WXY_^abc
- *** Failers
-No match
- wxy
-No match
-
-/^[W-c]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^abc$/m
- abc
- 0: abc
- qqq\nabc
- 0: abc
- abc\nzzz
- 0: abc
- qqq\nabc\nzzz
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\Aabc\Z/m
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\A(.)*\Z/s
- abc\ndef
- 0: abc\x0adef
-
-/\A(.)*\Z/m
- *** Failers
- 0: *** Failers
- abc\ndef
-No match
-
-/(?:b)|(?::+)/
- b::c
- 0: b
- c::b
- 0: ::
- 1: :
-
-/[-az]+/
- az-
- 0: az-
- 1: az
- 2: a
- *** Failers
- 0: a
- b
-No match
-
-/[az-]+/
- za-
- 0: za-
- 1: za
- 2: z
- *** Failers
- 0: a
- b
-No match
-
-/[a\-z]+/
- a-z
- 0: a-z
- 1: a-
- 2: a
- *** Failers
- 0: a
- b
-No match
-
-/[a-z]+/
- abcdxyz
- 0: abcdxyz
- 1: abcdxy
- 2: abcdx
- 3: abcd
- 4: abc
- 5: ab
- 6: a
-
-/[\d-]+/
12-34
0: 12-34
- 1: 12-3
- 2: 12-
- 3: 12
- 4: 1
- *** Failers
-No match
- aaa
-No match
-
-/[\d-z]+/
- 12-34z
- 0: 12-34z
- 1: 12-34
- 2: 12-3
- 3: 12-
- 4: 12
- 5: 1
- *** Failers
-No match
- aaa
-No match
-
-/\x5c/
- \\
- 0: \
-
-/\x20Z/
- the Zoo
- 0: Z
- *** Failers
-No match
- Zulu
-No match
-
-/ab{3cd/
- ab{3cd
- 0: ab{3cd
-
-/ab{3,cd/
- ab{3,cd
- 0: ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
- 0: ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
- 0: {4,5a}bc
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- *** Failers
-No match
- a\nb
-No match
-
-/abc$/
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- abc\ndef
-No match
-
-/(abc)\123/
- abc\x53
- 0: abcS
-
-/(abc)\223/
- abc\x93
- 0: abc\x93
-
-/(abc)\323/
- abc\xd3
- 0: abc\xd3
-
-/(abc)\100/
- abc\x40
- 0: abc@
- abc\100
- 0: abc@
-
-/(abc)\1000/
- abc\x400
- 0: abc@0
- abc\x40\x30
- 0: abc@0
- abc\1000
- 0: abc@0
- abc\100\x30
- 0: abc@0
- abc\100\060
- 0: abc@0
- abc\100\60
- 0: abc@0
-
-/abc\81/
- abc\081
- 0: abc\x0081
- abc\0\x38\x31
- 0: abc\x0081
-
-/abc\91/
- abc\091
- 0: abc\x0091
- abc\0\x39\x31
- 0: abc\x0091
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
- 0: abcdefghijk\x0aS
-
-/ab\idef/
- abidef
- 0: abidef
-
-/a{0}bc/
- bc
- 0: bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
- 0: xyz
-
-/abc[\10]de/
- abc\010de
- 0: abc\x08de
-
-/abc[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(abc)[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(?s)a.b/
- a\nb
- 0: a\x0ab
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- 0: baNOTcccc
- 1: baNOTccc
- 2: baNOTcc
- 3: baNOTc
- 4: baNOT
- baNOTcccd
- 0: baNOTccc
- 1: baNOTcc
- 2: baNOTc
- 3: baNOT
- baNOTccd
- 0: baNOTcc
- 1: baNOTc
- 2: baNOT
- bacccd
- 0: baccc
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- anything
-No match
- b\bc
-No match
- baccd
-No match
-
-/[^a]/
- Abc
- 0: A
-
-/[^a]/i
- Abc
- 0: b
-
-/[^a]+/
- AAAaAbc
- 0: AAA
- 1: AA
- 2: A
-
-/[^a]+/i
- AAAaAbc
- 0: bc
- 1: b
-
-/[^a]+/
- bbb\nccc
- 0: bbb\x0accc
- 1: bbb\x0acc
- 2: bbb\x0ac
- 3: bbb\x0a
- 4: bbb
- 5: bb
- 6: b
-
-/[^k]$/
- abc
- 0: c
- *** Failers
- 0: s
- abk
-No match
-
-/[^k]{2,3}$/
- abc
- 0: abc
- kbc
- 0: bc
- kabc
- 0: abc
- *** Failers
- 0: ers
- abk
-No match
- akb
+ 12+\x{661}-34
+ 0: 12+\x{661}-34
+ ** Failers
No match
- akk
+ abcd
No match
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 0: 12345678@a.b.c.d
- 123456789\@x.y.z
- 0: 123456789@x.y.z
- *** Failers
-No match
- 12345678\@x.y.uk
-No match
- 1234567\@a.b.c.d
+/[\x{105}-\x{109}]/8iDZ
+------------------------------------------------------------------
+ Bra
+ [\x{104}-\x{109}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+ \x{104}
+ 0: \x{104}
+ \x{105}
+ 0: \x{105}
+ \x{109}
+ 0: \x{109}
+ ** Failers
No match
-
-/[^a]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
-
-/[^a]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/[^az]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
-
-/[^az]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
- 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 0: .230003938
- 1: .23000393
- 2: .2300039
- 3: .230003
- 4: .23000
- 5: .2300
- 6: .230
- 1.875000282
- 0: .875000282
- 1: .87500028
- 2: .8750002
- 3: .875000
- 4: .87500
- 5: .8750
- 6: .875
- 1.235
- 0: .235
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 0: .230
- 1: .23
- 1.875000282
- 0: .875
- *** Failers
+ \x{100}
No match
- 1.235
+ \x{10a}
No match
-/a(?)b/
- ab
- 0: ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
- 0: foo table
- 1: foo tabl
- 2: foo tab
- 3: foo ta
- 4: foo t
-
-/foo(.*)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: food is under the bar
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: food is under the bar
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
-Matched, but too many subsidiary matches
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2 numbers:
- 6: I have 2 numbers:
- 7: I have 2 numbers
- 8: I have 2 number
- 9: I have 2 numbe
-10: I have 2 numb
-11: I have 2 num
-12: I have 2 nu
-13: I have 2 n
-14: I have 2
-15: I have 2
-16: I have
-17: I have
-18: I hav
-19: I ha
-20: I h
-21: I
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
-Matched, but too many subsidiary matches
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2 numbers:
- 6: I have 2 numbers:
- 7: I have 2 numbers
- 8: I have 2 number
- 9: I have 2 numbe
-10: I have 2 numb
-11: I have 2 num
-12: I have 2 nu
-13: I have 2 n
-14: I have 2
-15: I have 2
-16: I have
-17: I have
-18: I hav
-19: I ha
-20: I h
-21: I
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/^\D*(?!123)/
- ABC123
- 0: AB
- 1: A
- 2:
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- 0: ABC
- *** Failers
-No match
- ABC123
-No match
-
-/^[W-]46]/
- W46]789
- 0: W46]
- -46]789
- 0: -46]
- *** Failers
-No match
- Wall
-No match
- Zebra
-No match
- 42
-No match
- [abcd]
-No match
- ]abcd[
-No match
-
-/^[W-\]46]/
- W46]789
- 0: W
- Wall
- 0: W
- Zebra
+/[z-\x{100}]/8iDZ
+------------------------------------------------------------------
+ Bra
+ [Z\x{39c}\x{178}z-\x{101}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+ Z
0: Z
- Xylophone
- 0: X
- 42
- 0: 4
- [abcd]
- 0: [
- ]abcd[
- 0: ]
- \\backslash
- 0: \
- *** Failers
-No match
- -46]789
-No match
- well
-No match
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
- 0: 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/^(a){0,0}/
- bcd
- 0:
- abc
- 0:
- aab
- 0:
-
-/^(a){0,1}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: a
- 1:
-
-/^(a){0,2}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
-
-/^(a){0,3}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
- aaa
- 0: aaa
- 1: aa
- 2: a
- 3:
-
-/^(a){0,}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
- aaa
- 0: aaa
- 1: aa
- 2: a
- 3:
- aaaaaaaa
- 0: aaaaaaaa
- 1: aaaaaaa
- 2: aaaaaa
- 3: aaaaa
- 4: aaaa
- 5: aaa
- 6: aa
- 7: a
- 8:
-
-/^(a){1,1}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: a
-
-/^(a){1,2}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
-
-/^(a){1,3}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: aa
- 2: a
-
-/^(a){1,}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: aa
- 2: a
- aaaaaaaa
- 0: aaaaaaaa
- 1: aaaaaaa
- 2: aaaaaa
- 3: aaaaa
- 4: aaaa
- 5: aaa
- 6: aa
- 7: a
-
-/.*\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/m
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*\.gif/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*$/
- borfle\nbib.gif\nno
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
- 1: borfle\x0abib.gif
- 2: borfle
-
-/.*$/
- borfle\nbib.gif\nno\n
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno\n
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
- 1: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
- 1: borfle\x0abib.gif\x0ano
- 2: borfle\x0abib.gif
- 3: borfle
-
-/(.*X|^B)/
- abcde\n1234Xyz
- 0: 1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/m
- abcde\n1234Xyz
- 0: 1234X
- BarFoo
- 0: B
- abcde\nBar
- 0: B
-
-/(.*X|^B)/s
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- abcde\nBar
- 0: B
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/^.*B/
- **** Failers
-No match
- abc\nB
-No match
-
-/(?s)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?m)^.*B/
- abc\nB
- 0: B
-
-/(?ms)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?ms)^B/
- abc\nB
- 0: B
-
-/(?s)B$/
- B\n
- 0: B
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
- 0: 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
- 0: 123456654321
-
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
- 0: 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- 0: n
- *** Failers
-No match
- z
-No match
-
-/abcde{0,0}/
- abcd
- 0: abcd
- *** Failers
-No match
- abce
-No match
-
-/ab[cd]{0,0}e/
- abe
- 0: abe
- *** Failers
-No match
- abcde
-No match
-
-/ab(c){0,0}d/
- abd
- 0: abd
- *** Failers
-No match
- abcd
-No match
-
-/a(b*)/
- a
- 0: a
- ab
- 0: ab
- 1: a
- abbbb
- 0: abbbb
- 1: abbb
- 2: abb
- 3: ab
- 4: a
- *** Failers
- 0: a
- bbbbb
-No match
-
-/ab\d{0}e/
- abe
- 0: abe
- *** Failers
-No match
- ab1e
-No match
-
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- 0: "quick"
- \"the \\\"quick\\\" brown fox\"
- 0: "the \"quick\" brown fox"
-
-/.*?/g+
- abc
- 0: abc
- 0+
- 1: ab
- 2: a
- 3:
- 0:
- 0+
-
-/\b/g+
- abc
- 0:
- 0+ abc
- 0:
- 0+
-
-/\b/+g
- abc
- 0:
- 0+ abc
- 0:
- 0+
-
-//g
- abc
- 0:
- 0:
- 0:
- 0:
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
-
-/a[^a]b/
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/
- acb
- 0: acb
- *** Failers
-No match
- a\nb
-No match
-
-/a[^a]b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/^(b+?|a){1,2}?c/
- bac
- 0: bac
- bbac
- 0: bbac
- bbbac
- 0: bbbac
- bbbbac
- 0: bbbbac
- bbbbbac
- 0: bbbbbac
-
-/^(b+|a){1,2}?c/
- bac
- 0: bac
- bbac
- 0: bbac
- bbbac
- 0: bbbac
- bbbbac
- 0: bbbbac
- bbbbbac
- 0: bbbbbac
-
-/(?!\A)x/m
- x\nb\n
-No match
- a\bx\n
- 0: x
-
-/\x0{ab}/
- \0{ab}
- 0: \x00{ab}
-
-/(A|B)*?CD/
- CD
- 0: CD
-
-/(A|B)*CD/
- CD
- 0: CD
-
-/(?<!bar)foo/
- foo
- 0: foo
- catfood
- 0: foo
- arfootle
- 0: foo
- rfoosh
- 0: foo
- *** Failers
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/\w{3}(?<!bar)foo/
- catfood
- 0: catfoo
- *** Failers
-No match
- foo
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/(?<=(foo)a)bar/
- fooabar
- 0: bar
- *** Failers
-No match
- bar
-No match
- foobbar
-No match
-
-/\Aabc\z/m
- abc
- 0: abc
- *** Failers
-No match
- abc\n
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 0: .230003938
- 1: .23000393
- 2: .2300039
- 3: .230003
- 4: .23000
- 5: .2300
- 6: .230
- 1.875000282
- 0: .875000282
- 1: .87500028
- 2: .8750002
- 3: .875000
- 4: .87500
- 5: .8750
- *** Failers
-No match
- 1.235
-No match
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
-
-/(\d+)(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: 1234
- 3: 123
- 4: 12
- 12345+
- 0: 12345
- 1: 1234
- 2: 123
- 3: 12
-
-/((?>\d+))(\w)/
- 12345a
- 0: 12345a
- *** Failers
-No match
- 12345+
-No match
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/((?>a+)b)/
- aaab
- 0: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
-
-/(?>b)+/
- aaabbbccc
- 0: bbb
- 1: bb
- 2: b
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbcccc
- 1: aaabbbbc
-
-/(a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbcccc
- 1: aaabbbbccc
- 2: aaabbbbcc
- 3: aaabbbbc
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: abc(ade)ufh()()
- 2: abc(ade)ufh()
- 3: abc(ade)ufh
- 4: abc(ade)
- 5: abc
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- 0: (abc)
- (abc(def)xyz)
- 0: (abc(def)xyz)
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/a(?-i)b/i
- ab
- 0: ab
- Ab
- 0: Ab
- *** Failers
-No match
- aB
-No match
- AB
-No match
-
-/(a (?x)b c)d e/
- a bcd e
- 0: a bcd e
- *** Failers
-No match
- a b cd e
-No match
- abcd e
-No match
- a bcde
-No match
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- 0: a bcde f
- *** Failers
-No match
- abcdef
-No match
-
-/(a(?i)b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- abC
-No match
- aBC
-No match
- Abc
-No match
- ABc
-No match
- ABC
-No match
- AbC
-No match
-
-/a(?i:b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- ABC
-No match
- abC
-No match
- aBC
-No match
-
-/a(?i:b)*c/
- aBc
- 0: aBc
- aBBc
- 0: aBBc
- *** Failers
-No match
- aBC
-No match
- aBBC
-No match
-
-/a(?=b(?i)c)\w\wd/
- abcd
- 0: abcd
- abCd
- 0: abCd
- *** Failers
-No match
- aBCd
-No match
- abcD
-No match
-
-/(?s-i:more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?>a(?i)b+)+c/
- abc
- 0: abc
- aBbc
- 0: aBbc
- aBBc
- 0: aBBc
- *** Failers
-No match
- Abc
-No match
- abAb
-No match
- abbC
-No match
-
-/(?=a(?i)b)\w\wc/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- Ab
-No match
- abC
-No match
- aBC
-No match
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- 0: xxc
- aBxxc
- 0: xxc
- *** Failers
-No match
- Abxxc
-No match
- ABxxc
-No match
- abxxC
-No match
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/(?(?<=foo)bar|cat)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?(?<!foo)cat|bar)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?>a*)*/
- a
- 0: a
- 1:
- aa
- 0: aa
- 1:
- aaaa
- 0: aaaa
- 1:
-
-/(abc|)+/
- abc
- 0: abc
- 1:
- abcabc
- 0: abcabc
- 1: abc
- 2:
- abcabcabc
- 0: abcabcabc
- 1: abcabc
- 2: abc
- 3:
- xyz
- 0:
-
-/([a]*)*/
- a
- 0: a
- 1:
- aaaaa
- 0: aaaaa
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
- 5:
-
-/([ab]*)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- ababab
- 0: ababab
- 1: ababa
- 2: abab
- 3: aba
- 4: ab
- 5: a
- 6:
- aaaabcde
- 0: aaaab
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
- 5:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
-
-/([^a]*)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
- aaa
- 0:
-
-/([^ab]*)*/
- cccc
- 0: cccc
- 1: ccc
- 2: cc
- 3: c
- 4:
- abab
- 0:
-
-/([a]*?)*/
- a
- 0: a
- 1:
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/([ab]*?)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- abab
- 0: abab
- 1: aba
- 2: ab
- 3: a
- 4:
- baba
- 0: baba
- 1: bab
- 2: ba
- 3: b
- 4:
-
-/([^a]*?)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
- aaa
- 0:
-
-/([^ab]*?)*/
- c
- 0: c
- 1:
- cccc
- 0: cccc
- 1: ccc
- 2: cc
- 3: c
- 4:
- baba
- 0:
-
-/(?>a*)*/
- a
- 0: a
- 1:
- aaabcde
- 0: aaa
- 1:
-
-/((?>a*))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/((?>a*?))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 0: 12-sep-98
- 12-09-98
- 0: 12-09-98
- *** Failers
-No match
- sep-12-98
-No match
-
-/(?i:saturday|sunday)/
- saturday
- 0: saturday
- sunday
- 0: sunday
- Saturday
- 0: Saturday
- Sunday
- 0: Sunday
- SATURDAY
- 0: SATURDAY
- SUNDAY
- 0: SUNDAY
- SunDay
- 0: SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- 0: abcx
- aBCx
- 0: aBCx
- bbx
- 0: bbx
- BBx
- 0: BBx
- *** Failers
-No match
- abcX
-No match
- aBCX
-No match
- bbX
-No match
- BBX
-No match
-
-/^([ab](?i)[cd]|[ef])/
- ac
- 0: ac
- aC
- 0: aC
- bD
- 0: bD
- elephant
- 0: e
- Europe
- 0: E
- frog
- 0: f
- France
- 0: F
- *** Failers
-No match
- Africa
-No match
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- 0: ab
- aBd
- 0: aBd
- xy
- 0: xy
- xY
- 0: xY
- zebra
+ z
0: z
- Zambesi
- 0: Z
- *** Failers
-No match
- aCD
-No match
- XY
-No match
-
-/(?<=foo\n)^bar/m
- foo\nbar
- 0: bar
- *** Failers
-No match
- bar
-No match
- baz\nbar
-No match
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- 0: baz
- barbarbaz
- 0: baz
- koobarbaz
- 0: baz
- *** Failers
-No match
- baz
-No match
- foobarbaz
-No match
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-No match
-
-/abc/
- abc
- 0: abc
- xabcy
- 0: abc
- ababc
- 0: abc
- *** Failers
-No match
- xbc
-No match
- axc
+ \x{39c}
+ 0: \x{39c}
+ \x{178}
+ 0: \x{178}
+ |
+ 0: |
+ \x{80}
+ 0: \x{80}
+ \x{ff}
+ 0: \x{ff}
+ \x{100}
+ 0: \x{100}
+ \x{101}
+ 0: \x{101}
+ ** Failers
No match
- abx
+ \x{102}
No match
-
-/ab*c/
- abc
- 0: abc
-
-/ab*bc/
- abc
- 0: abc
- abbc
- 0: abbc
- abbbbc
- 0: abbbbc
-
-/.{1}/
- abbbbc
- 0: a
-
-/.{3,4}/
- abbbbc
- 0: abbb
- 1: abb
-
-/ab{0,}bc/
- abbbbc
- 0: abbbbc
-
-/ab+bc/
- abbc
- 0: abbc
- *** Failers
-No match
- abc
+ Y
No match
- abq
+ y
No match
-/ab+bc/
- abbbbc
- 0: abbbbc
+/[z-\x{100}]/8DZi
+------------------------------------------------------------------
+ Bra
+ [Z\x{39c}\x{178}z-\x{101}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
-/ab{1,}bc/
- abbbbc
- 0: abbbbc
+/(?:[\PPa*]*){8,}/
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
+/[\P{Any}]/BZ
+------------------------------------------------------------------
+ Bra
+ [\P{Any}]
+ Ket
+ End
+------------------------------------------------------------------
-/ab{3,4}bc/
- abbbbc
- 0: abbbbc
+/[\P{Any}\E]/BZ
+------------------------------------------------------------------
+ Bra
+ [\P{Any}]
+ Ket
+ End
+------------------------------------------------------------------
-/ab{4,5}bc/
- *** Failers
-No match
- abq
-No match
- abbbbc
-No match
+/(\P{Yi}+\277)/
-/ab?bc/
- abbc
- 0: abbc
- abc
- 0: abc
-
-/ab{0,1}bc/
- abc
- 0: abc
-
-/ab?bc/
-
-/ab?c/
- abc
- 0: abc
+/(\P{Yi}+\277)?/
-/ab{0,1}c/
- abc
- 0: abc
+/(?<=\P{Yi}{3}A)X/
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- abbbbc
-No match
- abcc
-No match
+/\p{Yi}+(\P{Yi}+)(?1)/
-/^abc/
- abcc
- 0: abc
+/(\P{Yi}{2}\277)?/
-/^abc$/
+/[\P{Yi}A]/
-/abc$/
- aabc
- 0: abc
- *** Failers
-No match
- aabc
- 0: abc
- aabcd
-No match
+/[\P{Yi}\P{Yi}\P{Yi}A]/
-/^/
- abc
- 0:
+/[^\P{Yi}A]/
-/$/
- abc
- 0:
+/[^\P{Yi}\P{Yi}\P{Yi}A]/
-/a.c/
- abc
- 0: abc
- axc
- 0: axc
+/(\P{Yi}*\277)*/
-/a.*c/
- axyzc
- 0: axyzc
+/(\P{Yi}*?\277)*/
-/a[bc]d/
- abd
- 0: abd
- *** Failers
-No match
- axyzd
-No match
- abc
-No match
+/(\p{Yi}*+\277)*/
-/a[b-d]e/
- ace
- 0: ace
+/(\P{Yi}?\277)*/
-/a[b-d]/
- aac
- 0: ac
+/(\P{Yi}??\277)*/
-/a[-b]/
- a-
- 0: a-
+/(\p{Yi}?+\277)*/
-/a[b-]/
- a-
- 0: a-
+/(\P{Yi}{0,3}\277)*/
-/a]/
- a]
- 0: a]
+/(\P{Yi}{0,3}?\277)*/
-/a[]]b/
- a]b
- 0: a]b
+/(\p{Yi}{0,3}+\277)*/
-/a[^bc]d/
- aed
- 0: aed
- *** Failers
-No match
- abd
-No match
- abd
-No match
+/\p{Zl}{2,3}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Zl {2}
+ prop Zl ?+
+ Ket
+ End
+------------------------------------------------------------------
+ \xe2\x80\xa8\xe2\x80\xa8
+ 0: \x{2028}\x{2028}
+ \x{2028}\x{2028}\x{2028}
+ 0: \x{2028}\x{2028}\x{2028}
+
+/\p{Zl}/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Zl
+ Ket
+ End
+------------------------------------------------------------------
-/a[^-b]c/
- adc
- 0: adc
+/\p{Lu}{3}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Lu {3}
+ Ket
+ End
+------------------------------------------------------------------
-/a[^]b]c/
- adc
- 0: adc
- *** Failers
-No match
- a-c
- 0: a-c
- a]c
-No match
+/\pL{2}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop L {2}
+ Ket
+ End
+------------------------------------------------------------------
-/\ba\b/
- a-
- 0: a
- -a
- 0: a
- -a-
- 0: a
+/\p{Cc}{2}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Cc {2}
+ Ket
+ End
+------------------------------------------------------------------
-/\by\b/
- *** Failers
-No match
- xy
-No match
- yz
+/^\p{Cs}/8
+ \?\x{dfff}
+ 0: \x{dfff}
+ ** Failers
No match
- xyz
+ \x{09f}
No match
-
-/\Ba\B/
- *** Failers
- 0: a
- a-
+
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ 0: $\x{a2}\x{a3}\x{a4}\x{a5}
+ \x{9f2}
+ 0: \x{9f2}
+ ** Failers
No match
- -a
+ X
No match
- -a-
+ \x{2c2}
No match
-
-/\By\b/
- xy
- 0: y
-
-/\by\B/
- yz
- 0: y
-
-/\By\B/
- xyz
- 0: y
-
-/\w/
- a
- 0: a
-
-/\W/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
+
+/^\p{Zs}/8
+ \ \
+ 0:
+ \x{a0}
+ 0: \x{a0}
+ \x{1680}
+ 0: \x{1680}
+ \x{180e}
+ 0: \x{180e}
+ \x{2000}
+ 0: \x{2000}
+ \x{2001}
+ 0: \x{2001}
+ ** Failers
No match
-
-/a\sb/
- a b
- 0: a b
-
-/a\Sb/
- a-b
- 0: a-b
- *** Failers
+ \x{2028}
No match
- a-b
- 0: a-b
- a b
+ \x{200d}
No match
-
-/\d/
- 1
+
+/-- These four are here rather than in test 6 because Perl has problems with
+ the negative versions of the properties. --/
+
+/\p{^Lu}/8i
+ 1234
0: 1
-
-/\D/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/[\w]/
- a
- 0: a
-
-/[\W]/
- -
- 0: -
- *** Failers
+ ** Failers
0: *
- -
- 0: -
- a
-No match
-
-/a[\s]b/
- a b
- 0: a b
-
-/a[\S]b/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
+ ABC
No match
-/[\d]/
- 1
+/\P{Lu}/8i
+ 1234
0: 1
-
-/[\D]/
- -
- 0: -
- *** Failers
+ ** Failers
0: *
- -
- 0: -
- 1
-No match
-
-/ab|cd/
- abc
- 0: ab
- abcd
- 0: ab
-
-/()ef/
- def
- 0: ef
-
-/$b/
-
-/a\(b/
- a(b
- 0: a(b
-
-/a\(*b/
- ab
- 0: ab
- a((b
- 0: a((b
-
-/a\\b/
- a\b
-No match
-
-/((a))/
- abc
- 0: a
-
-/(a)b(c)/
- abc
- 0: abc
-
-/a+b+c/
- aabbabc
- 0: abc
-
-/a{1,}b{1,}c/
- aabbabc
- 0: abc
-
-/a.+?c/
- abcabc
- 0: abcabc
- 1: abc
-
-/(a+|b)*/
- ab
- 0: ab
- 1: a
- 2:
-
-/(a+|b){0,}/
- ab
- 0: ab
- 1: a
- 2:
-
-/(a+|b)+/
- ab
- 0: ab
- 1: a
-
-/(a+|b){1,}/
- ab
- 0: ab
- 1: a
-
-/(a+|b)?/
- ab
- 0: a
- 1:
-
-/(a+|b){0,1}/
- ab
- 0: a
- 1:
-
-/[^ab]*/
- cde
- 0: cde
- 1: cd
- 2: c
- 3:
-
-/abc/
- *** Failers
+ ABC
No match
- b
-No match
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
- 0: abbbcd
-
-/([abc])*bcd/
- abcd
- 0: abcd
-
-/a|b|c|d|e/
- e
- 0: e
-/(a|b|c|d|e)f/
- ef
- 0: ef
-
-/abcd*efg/
- abcdefg
- 0: abcdefg
-
-/ab*/
- xabyabbbz
- 0: ab
- 1: a
- xayabbbz
- 0: a
-
-/(ab|cd)e/
- abcde
- 0: cde
-
-/[abhgefdc]ij/
- hij
- 0: hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
- 0: ef
-
-/(a|b)c*d/
- abcd
- 0: bcd
-
-/(ab|ab*)bc/
- abc
- 0: abc
-
-/a([bc]*)c*/
- abc
- 0: abc
- 1: ab
- 2: a
-
-/a([bc]*)(c*d)/
- abcd
- 0: abcd
-
-/a([bc]+)(c*d)/
- abcd
- 0: abcd
-
-/a([bc]*)(c+d)/
- abcd
- 0: abcd
-
-/a[bcd]*dcdcde/
- adcdcde
- 0: adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
-No match
- abcde
-No match
- adcdcde
-No match
-
-/(ab|a)b*c/
- abc
- 0: abc
-
-/((a)(b)c)(d)/
- abcd
- 0: abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- 0: alpha
- 1: alph
- 2: alp
- 3: al
- 4: a
-
-/^a(bc+|b[eh])g|.h$/
- abh
- 0: bh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- 0: effgz
- ij
- 0: ij
- reffgz
- 0: effgz
- *** Failers
-No match
- effg
-No match
- bcdd
-No match
-
-/((((((((((a))))))))))/
+/\p{Ll}/8i
a
0: a
-
-/(((((((((a)))))))))/
- a
+ Az
+ 0: z
+ ** Failers
0: a
-
-/multiple words of text/
- *** Failers
-No match
- aa
-No match
- uh-uh
-No match
-
-/multiple words/
- multiple words, yeah
- 0: multiple words
-
-/(.*)c(.*)/
- abcde
- 0: abcde
- 1: abcd
- 2: abc
-
-/\((.*), (.*)\)/
- (a, b)
- 0: (a, b)
-
-/[k]/
-
-/abcd/
- abcd
- 0: abcd
-
-/a(bc)d/
- abcd
- 0: abcd
-
-/a[-]?c/
- ac
- 0: ac
-
-/abc/i
- ABC
- 0: ABC
- XABCY
- 0: ABC
- ABABC
- 0: ABC
- *** Failers
-No match
- aaxabxbaxbbx
-No match
- XBC
-No match
- AXC
-No match
- ABX
-No match
-
-/ab*c/i
- ABC
- 0: ABC
-
-/ab*bc/i
- ABC
- 0: ABC
- ABBC
- 0: ABBC
-
-/ab*?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab+?bc/i
- ABBC
- 0: ABBC
-
-/ab+bc/i
- *** Failers
-No match
- ABC
-No match
- ABQ
-No match
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
-No match
- ABQ
-No match
- ABBBBC
-No match
-
-/ab??bc/i
- ABBC
- 0: ABBC
- ABC
- 0: ABC
-
-/ab{0,1}?bc/i
- ABC
- 0: ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
- 0: ABC
-
-/ab{0,1}?c/i
- ABC
- 0: ABC
-
-/^abc$/i
- ABC
- 0: ABC
- *** Failers
-No match
- ABBBBC
-No match
- ABCC
-No match
-
-/^abc/i
- ABCC
- 0: ABC
-
-/^abc$/i
-
-/abc$/i
- AABC
- 0: ABC
-
-/^/i
- ABC
- 0:
-
-/$/i
- ABC
- 0:
-
-/a.c/i
- ABC
- 0: ABC
- AXC
- 0: AXC
-
-/a.*?c/i
- AXYZC
- 0: AXYZC
-
-/a.*c/i
- *** Failers
-No match
- AABC
- 0: AABC
- AXYZD
-No match
-
-/a[bc]d/i
- ABD
- 0: ABD
-
-/a[b-d]e/i
- ACE
- 0: ACE
- *** Failers
-No match
- ABC
-No match
- ABD
-No match
-
-/a[b-d]/i
- AAC
- 0: AC
-
-/a[-b]/i
- A-
- 0: A-
-
-/a[b-]/i
- A-
- 0: A-
-
-/a]/i
- A]
- 0: A]
-
-/a[]]b/i
- A]B
- 0: A]B
-
-/a[^bc]d/i
- AED
- 0: AED
-
-/a[^-b]c/i
- ADC
- 0: ADC
- *** Failers
-No match
- ABD
-No match
- A-C
+ ABC
No match
-/a[^]b]c/i
- ADC
- 0: ADC
-
-/ab|cd/i
- ABC
- 0: AB
- ABCD
- 0: AB
-
-/()ef/i
- DEF
- 0: EF
-
-/$b/i
- *** Failers
-No match
- A]C
-No match
- B
-No match
-
-/a\(b/i
- A(B
- 0: A(B
-
-/a\(*b/i
- AB
- 0: AB
- A((B
- 0: A((B
-
-/a\\b/i
- A\B
-No match
-
-/((a))/i
- ABC
- 0: A
-
-/(a)b(c)/i
- ABC
- 0: ABC
-
-/a+b+c/i
- AABBABC
- 0: ABC
-
-/a{1,}b{1,}c/i
- AABBABC
- 0: ABC
-
-/a.+?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a.*?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a.{0,5}?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/(a+|b)*/i
- AB
- 0: AB
- 1: A
- 2:
-
-/(a+|b){0,}/i
- AB
- 0: AB
- 1: A
- 2:
-
-/(a+|b)+/i
- AB
- 0: AB
- 1: A
-
-/(a+|b){1,}/i
- AB
- 0: AB
- 1: A
-
-/(a+|b)?/i
- AB
- 0: A
- 1:
-
-/(a+|b){0,1}/i
- AB
- 0: A
- 1:
-
-/(a+|b){0,1}?/i
- AB
- 0: A
- 1:
-
-/[^ab]*/i
- CDE
- 0: CDE
- 1: CD
- 2: C
- 3:
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
- 0: ABBBCD
-
-/([abc])*bcd/i
- ABCD
- 0: ABCD
-
-/a|b|c|d|e/i
- E
- 0: E
-
-/(a|b|c|d|e)f/i
- EF
- 0: EF
-
-/abcd*efg/i
- ABCDEFG
- 0: ABCDEFG
-
-/ab*/i
- XABYABBBZ
- 0: AB
- 1: A
- XAYABBBZ
+/\p{Lu}/8i
+ A
0: A
-
-/(ab|cd)e/i
- ABCDE
- 0: CDE
-
-/[abhgefdc]ij/i
- HIJ
- 0: HIJ
-
-/^(ab|cd)e/i
- ABCDE
-No match
-
-/(abc|)ef/i
- ABCDEF
- 0: EF
-
-/(a|b)c*d/i
- ABCD
- 0: BCD
-
-/(ab|ab*)bc/i
- ABC
- 0: ABC
-
-/a([bc]*)c*/i
- ABC
- 0: ABC
- 1: AB
- 2: A
-
-/a([bc]*)(c*d)/i
- ABCD
- 0: ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
- 0: ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
- 0: ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
- 0: ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
- 0: ABC
-
-/((a)(b)c)(d)/i
- ABCD
- 0: ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- 0: ALPHA
- 1: ALPH
- 2: ALP
- 3: AL
- 4: A
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
- 0: BH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- 0: EFFGZ
- IJ
- 0: IJ
- REFFGZ
- 0: EFFGZ
- *** Failers
-No match
- ADCDCDE
-No match
- EFFG
+ a\x{10a0}B
+ 0: \x{10a0}
+ ** Failers
+ 0: F
+ a
No match
- BCDD
+ \x{1d00}
No match
-/((((((((((a))))))))))/i
- A
- 0: A
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
-/(((((((((a)))))))))/i
- A
- 0: A
+/-- The next two are special cases where the lengths of the different cases of
+the same character differ. The first went wrong with heap frame storage; the
+second was broken in all cases. --/
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
+/^\x{023a}+?(\x{0130}+)/8i
+ \x{023a}\x{2c65}\x{0130}
+ 0: \x{23a}\x{2c65}\x{130}
+ 1: \x{130}
+
+/^\x{023a}+([^X])/8i
+ \x{023a}\x{2c65}X
+ 0: \x{23a}\x{2c65}
+ 1: \x{2c65}
+
+/\x{c0}+\x{116}+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+ 0: \x{c0}\x{e0}\x{116}\x{117}
+
+/[\x{c0}\x{116}]+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+ 0: \x{c0}\x{e0}\x{116}\x{117}
+
+/(\x{de})\1/8i
+ \x{de}\x{de}
+ 0: \x{de}\x{de}
+ 1: \x{de}
+ \x{de}\x{fe}
+ 0: \x{de}\x{fe}
+ 1: \x{de}
+ \x{fe}\x{fe}
+ 0: \x{fe}\x{fe}
+ 1: \x{fe}
+ \x{fe}\x{de}
+ 0: \x{fe}\x{de}
+ 1: \x{fe}
+
+/^\x{c0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/^\x{e0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
+will match it only with UCP support, because without that it has no notion
+of case for anything other than the ASCII letters. --/
+
+/((?i)[\x{c0}])/8
+ \x{c0}
+ 0: \x{c0}
+ 1: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+ 1: \x{e0}
+
+/(?i:[\x{c0}])/8
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/-- This should be Perl-compatible but Perl 5.11 gets \x{300} wrong. --/8
+
+/^\X/8
A
0: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- 0: C
-
-/multiple words of text/i
+ A\x{300}BC
+ 0: A\x{300}
+ A\x{300}\x{301}\x{302}BC
+ 0: A\x{300}\x{301}\x{302}
*** Failers
+ 0: *
+ \x{300}
No match
- AA
-No match
- UH-UH
-No match
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
- 0: MULTIPLE WORDS
-
-/(.*)c(.*)/i
- ABCDE
- 0: ABCDE
- 1: ABCD
- 2: ABC
-
-/\((.*), (.*)\)/i
- (A, B)
- 0: (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
- 0: ABCD
+
+/-- These are PCRE's extra properties to help with Unicodizing \d etc. --/
-/a(bc)d/i
+/^\p{Xan}/8
ABCD
- 0: ABCD
-
-/a[-]?c/i
- AC
- 0: AC
-
-/a(?!b)./
- abad
- 0: ad
-
-/a(?=d)./
- abad
- 0: ad
-
-/a(?=c|d)./
- abad
- 0: ad
-
-/a(?:b|c|d)(.)/
- ace
- 0: ace
-
-/a(?:b|c|d)*(.)/
- ace
- 0: ace
- 1: ac
-
-/a(?:b|c|d)+?(.)/
- ace
- 0: ace
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
- 2: acdbcd
- 3: acdbc
- 4: acdb
- 5: acd
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
- 2: acdbcd
- 3: acdbc
- 4: acdb
- 5: acd
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
- 0: acdb
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
- 0: acdbcdb
- 1: acdbcd
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: acdbcd
-
-/((foo)|(bar))*/
- foobar
- 0: foobar
- 1: foo
- 2:
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
- 0: acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- 0: ace
-
-/^(.+)?B/
- AB
- 0: AB
-
-/^([^a-z])|(\^)$/
- .
- 0: .
-
-/^[<>]&/
- <&OUT
- 0: <&
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- 0: foobar
- 1: foo
- 2:
-
-/(?<=a)b/
- ab
- 0: b
- *** Failers
-No match
- cb
-No match
- b
-No match
-
-/(?<!c)b/
- ab
- 0: b
- b
- 0: b
- b
- 0: b
-
-/(?:..)*a/
- aba
- 0: aba
- 1: a
-
-/(?:..)*?a/
- aba
- 0: aba
- 1: a
-
-/^(){3,5}/
- abc
- 0:
-
-/^(a+)*ax/
- aax
- 0: aax
-
-/^((a|b)+)*ax/
- aax
- 0: aax
-
-/^((a|bc)+)*ax/
- aax
- 0: aax
-
-/(a|x)*ab/
- cab
- 0: ab
-
-/(a)*ab/
- cab
- 0: ab
-
-/(?:(?i)a)b/
- ab
- 0: ab
-
-/((?i)a)b/
- ab
- 0: ab
-
-/(?:(?i)a)b/
- Ab
- 0: Ab
-
-/((?i)a)b/
- Ab
- 0: Ab
-
-/(?:(?i)a)b/
- *** Failers
-No match
- cb
-No match
- aB
-No match
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
- 0: ab
-
-/((?i:a))b/
- ab
- 0: ab
-
-/(?i:a)b/
- Ab
- 0: Ab
-
-/((?i:a))b/
- Ab
- 0: Ab
-
-/(?i:a)b/
- *** Failers
-No match
- aB
-No match
- aB
-No match
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
- 0: ab
-
-/((?-i)a)b/i
- ab
- 0: ab
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- aB
- 0: aB
- Ab
-No match
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
- 0: ab
-
-/((?-i:a))b/i
- ab
- 0: ab
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
-
-/(?-i:a)b/i
- *** Failers
-No match
- AB
-No match
- Ab
-No match
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
-
-/(?-i:a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
-No match
- AB
-No match
- a\nB
-No match
-
-/((?s-i:a.))b/i
- a\nB
- 0: a\x0aB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- 0: cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/foo\w*\d{4}baz/
- foobar1234baz
- 0: foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
- 0: x~~
- 1: x
-
-/^a(?#xxx){3}c/
- aaac
- 0: aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
- 0: aaac
-
-/(?<![cd])b/
- *** Failers
-No match
- B\nB
-No match
- dbcb
-No match
-
-/(?<![cd])[ab]/
- dbaacb
- 0: a
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
- 0: a
-
-/(?<!cd)[ab]/
- cdaccb
- 0: b
-
-/^(?:a?b?)*$/
- *** Failers
-No match
- dbcb
-No match
- a--
-No match
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- 0: a\x0ab
-
-/((?m)^b$)/
- a\nb\nc\n
- 0: b
-
-/(?m)^b/
- a\nb\n
- 0: b
-
-/(?m)^(b)/
- a\nb\n
- 0: b
-
-/((?m)^b)/
- a\nb\n
- 0: b
-
-/\n((?m)^b)/
- a\nb\n
- 0: \x0ab
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- 0: \x0ac
- a\nb\nc\n
- 0: \x0ac
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- 0: b\x0ac
- a\nb\nc\n
- 0: b\x0ac
-
-/^b/
-
-/()^b/
- *** Failers
-No match
- a\nb\nc\n
-No match
- a\nb\nc\n
-No match
-
-/((?m)^b)/
- a\nb\nc\n
- 0: b
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
- 0: a
-
-/(?(?=a)b|a)/
- *** Failers
-No match
- a
-No match
- a
-No match
-
-/(?(?=a)a|b)/
- a
- 0: a
-
-/(\w+:)+/
- one:
- 0: one:
-
-/$(?<=^(a))/
- a
- 0:
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
-
-/(a*)b+/
- caab
- 0: aab
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- *** Failers
- 0: Failers
- abcd:
+ 0: A
+ 1234
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ ** Failers
No match
- abcd:
+ _ABC
No match
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/([[:]+)/
- a:[b]:
- 0: :[
- 1: :
-
-/([[=]+)/
- a=[b]=
- 0: =[
- 1: =
-
-/([[.]+)/
- a.[b].
- 0: .[
- 1: .
-
-/((?>a+)b)/
- aaab
- 0: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: abc(ade)ufh()()
- 2: abc(ade)ufh()
- 3: abc(ade)ufh
- 4: abc(ade)
- 5: abc
-
-/a\Z/
- *** Failers
-No match
- aaab
+/^\p{Xan}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ ** Failers
No match
- a\nb\n
+ _ABC
No match
-/b\Z/
- a\nb\n
- 0: b
-
-/b\z/
+/^\p{Xan}+?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}
-/b\Z/
- a\nb
- 0: b
-
-/b\z/
- a\nb
- 0: b
- *** Failers
-No match
+/^\p{Xan}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- 0: alphabetabcd
- endingwxyz
- 0: endingwxyz
- *** Failers
-No match
- a rather long string that doesn't end with one of them
-No match
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
+/^\p{Xan}{2,9}/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
+/^\p{Xan}{2,9}?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}\x{a6c}
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
+/^[\p{Xan}]/8
+ ABCD1234_
+ 0: A
+ 1234abcd_
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ ** Failers
No match
- 123999foo
+ _ABC
No match
-
-/((Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/(Z()|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/(Z(())|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/((?>Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/((?>)+|A)*/
- ZABCDEFG
- 0:
-
-/a*/g
- abbab
- 0: a
- 1:
- 0:
- 0:
- 0: a
- 1:
- 0:
- 0:
-
-/^[a-\d]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
+
+/^[\p{Xan}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ ** Failers
No match
- bcdef
+ _ABC
No match
-/^[\d-a]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
+/^>\p{Xsp}/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
+ >\x{a0}
+ 0: >\x{a0}
+ ** Failers
No match
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d\x0b
- 1: \x09\x0a\x0c\x0d
- 2: \x09\x0a\x0c
- 3: \x09\x0a
- 4: \x09
- 5:
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09
- 1:
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
- 1: \x09\x0a\x0c
- 2: \x09\x0a
- 3: \x09
- 4:
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
- 1: \x09\x0a\x0c
- 2: \x09\x0a
- 3: \x09
- 4:
-
-/a b/x
- ab
+ \x{0b}
No match
-/(?!\A)x/m
- a\nxb\n
- 0: x
+/^>\p{Xsp}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-/(?!^)x/m
- a\nxb\n
-No match
+/^>\p{Xsp}+?/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
-/abc\Qabc\Eabc/
- abcabcabc
- 0: abcabcabc
+/^>\p{Xsp}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-/abc\Q(*+|\Eabc/
- abc(*+|abc
- 0: abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- 0: abc abcabc
- *** Failers
-No match
- abcabcabc
-No match
+/^>\p{Xsp}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
- 0: abc\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
- 0: abc$xyz
-
-/\Gabc/
- abc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Gabc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
-
-/abc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
- 0: abc3
-
-/a(?x: b c )d/
- XabcdY
- 0: abcd
- *** Failers
-No match
- Xa b c d Y
-No match
-
-/((?x)x y z | a b c)/
- XabcY
- 0: abc
- AxyzB
- 0: xyz
-
-/(?i)AB(?-i)C/
- XabCY
- 0: abC
- *** Failers
+/^>\p{Xsp}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}
+
+/^>[\p{Xsp}]/8
+ >\x{2028}\x{0b}
+ 0: >\x{2028}
+
+/^>[\p{Xsp}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+
+/^>\p{Xps}/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
+ >\x{a0}
+ 0: >\x{a0}
+ ** Failers
No match
- XabcY
+ \x{0b}
No match
-/((?i)AB(?-i)C|D)E/
- abCE
- 0: abCE
- DE
- 0: DE
- *** Failers
-No match
- abcE
-No match
- abCe
-No match
- dE
-No match
- De
-No match
+/^>\p{Xps}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/[z\Qa-d]\E]/
- z
- 0: z
- a
- 0: a
- -
- 0: -
- d
- 0: d
- ]
- 0: ]
- *** Failers
- 0: a
- b
-No match
+/^>\p{Xps}+?/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
-/[\z\C]/
- z
- 0: z
- C
- 0: C
+/^>\p{Xps}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/\M/
- M
- 0: M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
+/^>\p{Xps}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(?i)reg(?:ul(?:[a]|ae)r|ex)/
- REGular
- 0: REGular
- regulaer
- 0: regulaer
- Regex
- 0: Regex
- regulr
- 0: regul\xe4r
-
-/[--]+/
-
- 0: \xc5\xe6\xe5\xe4\xe0
-
- 0: \xc5\xe6\xe5\xe4\xff
-
- 0: \xc5\xe6\xe5\xe4\xc0
-
- 0: \xc5\xe6\xe5\xe4\xdf
-
-/(?<=Z)X./
- \x84XAZXB
- 0: XB
-
-/^(?(2)a|(1)(2))+$/
- 123a
-Error -17
-
-/(?<=a|bbbb)c/
- ac
- 0: c
- bbbbc
- 0: c
-
-/abc/>testsavedregex
-Compiled regex written to testsavedregex
-<testsavedregex
-Compiled regex loaded from testsavedregex
-No study data
- abc
- 0: abc
- *** Failers
-No match
- bca
-No match
+/^>\p{Xps}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}
-/abc/F>testsavedregex
-Compiled regex written to testsavedregex
-<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
-No study data
- abc
- 0: abc
- *** Failers
-No match
- bca
-No match
+/^>[\p{Xps}]/8
+ >\x{2028}\x{0b}
+ 0: >\x{2028}
+
+/^>[\p{Xps}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a|b)/S>testsavedregex
-Compiled regex written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled regex loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- *** Failers
- 0: a
- def
-No match
-
-/(a|b)/SF>testsavedregex
-Compiled regex written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- *** Failers
- 0: a
- def
-No match
-
-/line\nbreak/
- this is a line\nbreak
- 0: line\x0abreak
- line one\nthis is a line\nbreak in the second line
- 0: line\x0abreak
-
-/line\nbreak/f
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
+/^\p{Xwd}/8
+ ABCD
+ 0: A
+ 1234
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ _ABC
+ 0: _
+ ** Failers
No match
- line one\nthis is a line\nbreak in the second line
+ []
No match
-/line\nbreak/mf
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
+/^\p{Xwd}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/1234/
- 123\P
-Partial match: 123
- a4\P\R
-No match
+/^\p{Xwd}+?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}
-/1234/
- 123\P
-Partial match: 123
- 4\P\R
- 0: 4
-
-/^/mg
- a\nb\nc\n
- 0:
- 0:
- 0:
- \
- 0:
+/^\p{Xwd}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/(?<=C\n)^/mg
- A\nC\nC\n
- 0:
-
-/(?s)A?B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?s)A*B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?m)A?B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?m)A*B/
- AB
- 0: AB
- aB
- 0: B
-
-/Content-Type\x3A[^\r\n]{6,}/
- Content-Type:xxxxxyyy
- 0: Content-Type:xxxxxyyy
- 1: Content-Type:xxxxxyy
- 2: Content-Type:xxxxxy
-
-/Content-Type\x3A[^\r\n]{6,}z/
- Content-Type:xxxxxyyyz
- 0: Content-Type:xxxxxyyyz
-
-/Content-Type\x3A[^a]{6,}/
- Content-Type:xxxyyy
- 0: Content-Type:xxxyyy
-
-/Content-Type\x3A[^a]{6,}z/
- Content-Type:xxxyyyz
- 0: Content-Type:xxxyyyz
-
-/^abc/m
- xyz\nabc
- 0: abc
- xyz\nabc\<lf>
- 0: abc
- xyz\r\nabc\<lf>
- 0: abc
- xyz\rabc\<cr>
- 0: abc
- xyz\r\nabc\<crlf>
- 0: abc
- ** Failers
-No match
- xyz\nabc\<cr>
-No match
- xyz\r\nabc\<cr>
-No match
- xyz\nabc\<crlf>
-No match
- xyz\rabc\<crlf>
-No match
- xyz\rabc\<lf>
-No match
+/^\p{Xwd}{2,9}/8
+ A_B12\x{6ca}\x{a6c}\x{10a7}
+ 0: A_B12\x{6ca}\x{a6c}\x{10a7}
-/abc$/m<lf>
- xyzabc
- 0: abc
- xyzabc\n
- 0: abc
- xyzabc\npqr
- 0: abc
- xyzabc\r\<cr>
- 0: abc
- xyzabc\rpqr\<cr>
- 0: abc
- xyzabc\r\n\<crlf>
- 0: abc
- xyzabc\r\npqr\<crlf>
- 0: abc
- ** Failers
-No match
- xyzabc\r
-No match
- xyzabc\rpqr
-No match
- xyzabc\r\n
-No match
- xyzabc\r\npqr
-No match
-
-/^abc/m<cr>
- xyz\rabcdef
- 0: abc
- xyz\nabcdef\<lf>
- 0: abc
- ** Failers
-No match
- xyz\nabcdef
-No match
-
-/^abc/m<lf>
- xyz\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/^abc/m<crlf>
- xyz\r\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/.*/<lf>
- abc\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
- abc\rdef
- 0: abc\x0ddef
- 1: abc\x0dde
- 2: abc\x0dd
- 3: abc\x0d
- 4: abc
- 5: ab
- 6: a
- 7:
- abc\r\ndef
- 0: abc\x0d
- 1: abc
- 2: ab
- 3: a
- 4:
- \<cr>abc\ndef
- 0: abc\x0adef
- 1: abc\x0ade
- 2: abc\x0ad
- 3: abc\x0a
- 4: abc
- 5: ab
- 6: a
- 7:
- \<cr>abc\rdef
- 0: abc
- 1: ab
- 2: a
- 3:
- \<cr>abc\r\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
- \<crlf>abc\ndef
- 0: abc\x0adef
- 1: abc\x0ade
- 2: abc\x0ad
- 3: abc\x0a
- 4: abc
- 5: ab
- 6: a
- 7:
- \<crlf>abc\rdef
- 0: abc\x0ddef
- 1: abc\x0dde
- 2: abc\x0dd
- 3: abc\x0d
- 4: abc
- 5: ab
- 6: a
- 7:
- \<crlf>abc\r\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
-
-/\w+(.)(.)?def/s
- abc\ndef
- 0: abc\x0adef
- abc\rdef
- 0: abc\x0ddef
- abc\r\ndef
- 0: abc\x0d\x0adef
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
- 0: abc=xyz\\x0apqr
- 1: abc=xyz\\x0apq
- 2: abc=xyz\\x0ap
- 3: abc=xyz\\x0a
- 4: abc=xyz\
- 5: abc=xyz
- 6: abc=xy
- 7: abc=x
- 8: abc=
-
-/^(a()*)*/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/^(?:a(?:(?:))*)*/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/^(a()+)+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/^(?:a(?:(?:))+)+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- a\nb\<cr>
- 0: a\x0ab
- ** Failers
-No match
- a\nb
-No match
- a\nb\<any>
-No match
- a\rb\<cr>
-No match
- a\rb\<any>
-No match
-
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc9
-
-/^a\Rb/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- ** Failers
-No match
- a\n\rb
-No match
-
-/^a\R*b/<bsr_unicode>
- ab
- 0: ab
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
- ** Failers
-No match
- ab
-No match
+/^\p{Xwd}{2,9}?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}\x{a6c}
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85b
- 0: a\x0a\x0d\x85b
- a\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0ab
- a\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
- a\n\r\n\rb
- 0: a\x0a\x0d\x0a\x0db
- a\n\n\r\nb
- 0: a\x0a\x0a\x0d\x0ab
- ** Failers
-No match
- a\n\n\n\rb
-No match
- a\r
-No match
-
-/^a[\R]b/<bsr_unicode>
- aRb
- 0: aRb
+/^[\p{Xwd}]/8
+ ABCD1234_
+ 0: A
+ 1234abcd_
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ _ABC
+ 0: _
** Failers
No match
- a\nb
-No match
-
-/.+foo/
- afoo
- 0: afoo
- ** Failers
-No match
- \r\nfoo
-No match
- \nfoo
-No match
-
-/.+foo/<crlf>
- afoo
- 0: afoo
- \nfoo
- 0: \x0afoo
- ** Failers
-No match
- \r\nfoo
-No match
-
-/.+foo/<any>
- afoo
- 0: afoo
- ** Failers
-No match
- \nfoo
-No match
- \r\nfoo
-No match
-
-/.+foo/s
- afoo
- 0: afoo
- \r\nfoo
- 0: \x0d\x0afoo
- \nfoo
- 0: \x0afoo
-
-/^$/mg<any>
- abc\r\rxyz
- 0:
- abc\n\rxyz
- 0:
- ** Failers
-No match
- abc\r\nxyz
-No match
-
-/^X/m
- XABC
- 0: X
- ** Failers
-No match
- XABC\B
-No match
-
-/(?m)^$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a
-
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
- 0: \x0d\x0a
- 0+
- 1:
-
-/(?m)$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a\x0d\x0a
- 0:
- 0+ \x0d\x0a
- 0:
- 0+
-
-/(?|(abc)|(xyz))/
- >abc<
- 0: abc
- >xyz<
- 0: xyz
-
-/(x)(?|(abc)|(xyz))(x)/
- xabcx
- 0: xabcx
- xxyzx
- 0: xxyzx
-
-/(x)(?|(abc)(pqr)|(xyz))(x)/
- xabcpqrx
- 0: xabcpqrx
- xxyzx
- 0: xxyzx
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- 0: abcabc
- xyzabc
- 0: xyzabc
- ** Failers
-No match
- xyzxyz
+ []
No match
-/\H\h\V\v/
- X X\x0a
- 0: X X\x0a
- X\x09X\x0b
- 0: X\x09X\x0b
- ** Failers
-No match
- \xa0 X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0X\x0a\x0b\x0c\x0d
- 1: \x09 \xa0X\x0a\x0b\x0c
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0\x0a\x0b\x0c\x0d
- 1: \x09 \xa0\x0a\x0b\x0c
- \x09\x20\xa0\x0a\x0b\x0c
- 0: \x09 \xa0\x0a\x0b\x0c
+/^[\p{Xwd}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/-- A check not in UTF-8 mode --/
+
+/^[\p{Xwd}]+/
+ ABCD1234_
+ 0: ABCD1234_
+
+/-- Some negative checks --/
+
+/^[\P{Xwd}]+/8
+ !.+\x{019}\x{35a}AB
+ 0: !.+\x{19}\x{35a}
+
+/^[\p{^Xwd}]+/8
+ !.+\x{019}\x{35a}AB
+ 0: !.+\x{19}\x{35a}
+
+/[\D]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\P{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+ 1\x{3c8}2
+ 0: \x{3c8}
+
+/[\d]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\p{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{6f4}<
+ 0: \x{6f4}
+
+/[\S]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\P{Xsp}]
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1680}\x{6f4}\x{1680}
+ 0: \x{6f4}
+
+/[\s]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\p{Xsp}]
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1680}<
+ 0: \x{1680}
+
+/[\W]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\P{Xwd}]
+ Ket
+ End
+------------------------------------------------------------------
+ A\x{1712}B
+ 0: \x{1712}
+
+/[\w]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\p{Xwd}]
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1723}<
+ 0: \x{1723}
+
+/\D/WBZ8
+------------------------------------------------------------------
+ Bra
+ notprop Nd
+ Ket
+ End
+------------------------------------------------------------------
+ 1\x{3c8}2
+ 0: \x{3c8}
+
+/\d/WBZ8
+------------------------------------------------------------------
+ Bra
+ prop Nd
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{6f4}<
+ 0: \x{6f4}
+
+/\S/WBZ8
+------------------------------------------------------------------
+ Bra
+ notprop Xsp
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1680}\x{6f4}\x{1680}
+ 0: \x{6f4}
+
+/\s/WBZ8
+------------------------------------------------------------------
+ Bra
+ prop Xsp
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1680}>
+ 0: \x{1680}
+
+/\W/WBZ8
+------------------------------------------------------------------
+ Bra
+ notprop Xwd
+ Ket
+ End
+------------------------------------------------------------------
+ A\x{1712}B
+ 0: \x{1712}
+
+/\w/WBZ8
+------------------------------------------------------------------
+ Bra
+ prop Xwd
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1723}<
+ 0: \x{1723}
+
+/[[:alpha:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:lower:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Ll}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:upper:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Lu}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:alnum:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Xan}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:ascii:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x7f]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:cntrl:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x1f\x7f]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:digit:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:graph:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [!-~]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:print:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [ -~]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:punct:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [!-/:-@[-`{-~]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:space:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Xps}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:word:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Xwd}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:xdigit:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [0-9A-Fa-f]
+ Ket
+ End
+------------------------------------------------------------------
+
+/-- Unicode properties for \b abd \B --/
+
+/\b...\B/8W
+ abc_
+ 0: abc
+ \x{37e}abc\x{376}
+ 0: abc
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ 0: \x{376}\x{371}\x{393}
+ !\x{c0}++\x{c1}\x{c2}
+ 0: ++\x{c1}
+ !\x{c0}+++++
+ 0: \x{c0}++
+
+/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
+
+/\b...\B/8
+ abc_
+ 0: abc
** Failers
+ 0: Fai
+ \x{37e}abc\x{376}
No match
- \x09\x20\xa0\x0a\x0b
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
No match
-
-/\H{3,4}/
- XY ABCDE
- 0: ABCD
- 1: ABC
- XY PQR ST
- 0: PQR
-
-/.\h{3,4}./
- XY AB PQRS
- 0: B P
- 1: B
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- 0: XNNNYZ
- > X NYQZ
- 0: X NYQZ
- ** Failers
-No match
- >XYZ
-No match
- > X NY Z
+ !\x{c0}++\x{c1}\x{c2}
No match
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- 0: XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/.+A/<crlf>
- \r\nA
+ !\x{c0}+++++
No match
-
-/\nA/<crlf>
- \r\nA
- 0: \x0aA
-
-/[\r\n]A/<crlf>
- \r\nA
- 0: \x0aA
-/(\r|\n)A/<crlf>
- \r\nA
- 0: \x0aA
+/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-/a\Rb/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- ** Failers
-No match
- a\x85b
-No match
- a\x0bb
-No match
-
-/a\Rb/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R?b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- ** Failers
-No match
- a\x85b
-No match
- a\x0bb
-No match
+/\b...\B/W
+ abc_
+ 0: abc
+ !\x{c0}++\x{c1}\x{c2}
+ 0: ++\xc1
+ !\x{c0}+++++
+ 0: \xc0++
-/a\R?b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R{2,4}b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\r\n\nb
- 0: a\x0d\x0a\x0ab
- a\n\r\rb
- 0: a\x0a\x0d\x0db
- a\r\n\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
- ** Failers
-No match
- a\x85\85b
-No match
- a\x0b\0bb
-No match
+/-- Some of these are silly, but they check various combinations --/
-/a\R{2,4}b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\r\rb
- 0: a\x0d\x0db
- a\n\n\nb
- 0: a\x0a\x0a\x0ab
- a\r\n\n\r\rb
- 0: a\x0d\x0a\x0a\x0d\x0db
- a\x85\85b
-No match
- a\x0b\0bb
-No match
- ** Failers
-No match
- a\r\r\r\r\rb
-No match
- a\x85\85b\<bsr_anycrlf>
-No match
- a\x0b\0bb\<bsr_anycrlf>
-No match
-
-/a(?!)|\wbc/
+/[[:^alpha:][:^cntrl:]]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [ -~\x80-\xff\P{L}]+
+ Ket
+ End
+------------------------------------------------------------------
+ 123
+ 0: 123
abc
0: abc
-/a[]b/<JS>
- ** Failers
-No match
- ab
-No match
+/[[:^cntrl:][:^alpha:]]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [ -~\x80-\xff\P{L}]+
+ Ket
+ End
+------------------------------------------------------------------
+ 123
+ 0: 123
+ abc
+ 0: abc
-/a[]+b/<JS>
- ** Failers
-No match
- ab
-No match
+/[[:alpha:]]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]+
+ Ket
+ End
+------------------------------------------------------------------
+ abc
+ 0: abc
-/a[]*+b/<JS>
- ** Failers
-No match
- ab
-No match
+/[[:^alpha:]\S]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [\P{L}\P{Xsp}]+
+ Ket
+ End
+------------------------------------------------------------------
+ 123
+ 0: 123
+ abc
+ 0: abc
-/a[^]b/<JS>
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
+/[^\d]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [^\p{Nd}]+
+ Ket
+ End
+------------------------------------------------------------------
+ abc123
+ 0: abc
+ abc\x{123}
+ 0: abc\x{123}
+ \x{660}abc
+ 0: abc
+
+/\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
+------------------------------------------------------------------
+ Bra
+ prop Lu ++
+ 9
+ prop Lu +
+ B
+ prop Lu ++
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/BZ
+------------------------------------------------------------------
+ Bra
+ notprop Lu +
+ 9
+ notprop Lu ++
+ B
+ notprop Lu +
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\P{Lu}+9\P{Lu}+B\P{Lu}+b/BZ
+------------------------------------------------------------------
+ Bra
+ notprop Lu +
+ 9
+ notprop Lu ++
+ B
+ notprop Lu +
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Han}+X\p{Greek}+\x{370}/BZ8
+------------------------------------------------------------------
+ Bra
+ prop Han ++
+ X
+ prop Greek +
+ \x{370}
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xan}+!\p{Xan}+A/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xan ++
+ !
+ prop Xan +
+ A
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xsp}+!\p{Xsp}\t/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xsp ++
+ !
+ prop Xsp
+ \x09
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xps}+!\p{Xps}\t/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xps ++
+ !
+ prop Xps
+ \x09
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xwd}+!\p{Xwd}_/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xwd ++
+ !
+ prop Xwd
+ _
+ Ket
+ End
+------------------------------------------------------------------
+
+/A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
+------------------------------------------------------------------
+ Bra
+ A++
+ prop N
+ A++
+ prop Nd
+ B+
+ prop N *+
+ B+
+ prop Nd *
+ Ket
+ End
+------------------------------------------------------------------
+
+/-- These behaved oddly in Perl, so they are kept in this test --/
+
+/(\x{23a}\x{23a}\x{23a})?\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
+No match
+
+/(ȺȺȺ)?\1/8i
+ ȺȺȺⱥⱥ
+No match
+
+/(\x{23a}\x{23a}\x{23a})?\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(ȺȺȺ)?\1/8i
+ ȺȺȺⱥⱥⱥ
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(\x{23a}\x{23a}\x{23a})\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
+No match
+
+/(ȺȺȺ)\1/8i
+ ȺȺȺⱥⱥ
+No match
+
+/(\x{23a}\x{23a}\x{23a})\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(ȺȺȺ)\1/8i
+ ȺȺȺⱥⱥⱥ
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(\x{2c65}\x{2c65})\1/8i
+ \x{2c65}\x{2c65}\x{23a}\x{23a}
+ 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
+ 1: \x{2c65}\x{2c65}
+
+/(ⱥⱥ)\1/8i
+ ⱥⱥȺȺ
+ 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
+ 1: \x{2c65}\x{2c65}
+
+/(\x{23a}\x{23a}\x{23a})\1Y/8i
+ X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(\x{2c65}\x{2c65})\1Y/8i
+ X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
+ 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
+ 1: \x{2c65}\x{2c65}
+
+/-- --/
+
+/-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
+
+/^[\p{Batak}]/8
+ \x{1bc0}
+ 0: \x{1bc0}
+ \x{1bff}
+ 0: \x{1bff}
** Failers
No match
- ab
+ \x{1bf4}
No match
-/a[^]+b/<JS>
- aXb
- 0: aXb
- a\nX\nXb
- 0: a\x0aX\x0aXb
+/^[\p{Brahmi}]/8
+ \x{11000}
+ 0: \x{11000}
+ \x{1106f}
+ 0: \x{1106f}
** Failers
No match
- ab
-No match
-
-/X$/E
- X
- 0: X
- ** Failers
-No match
- X\n
-No match
-
-/X$/
- X
- 0: X
- X\n
- 0: X
-
-/xyz/C
- xyz
---->xyz
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- abcxyz
---->abcxyz
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- abcxyz\Y
---->abcxyz
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +3 ^ ^
- 0: xyz
- ** Failers
-No match
- abc
-No match
- abc\Y
---->abc
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
-No match
- abcxypqr
-No match
- abcxypqr\Y
---->abcxypqr
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +1 ^^ y
- +2 ^ ^ z
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
- +0 ^ x
-No match
-
-/(*NO_START_OPT)xyz/C
- abcxyz
---->abcxyz
-+15 ^ x
-+15 ^ x
-+15 ^ x
-+15 ^ x
-+16 ^^ y
-+17 ^ ^ z
-+18 ^ ^
- 0: xyz
-
-/(?C)ab/
- ab
---->ab
- 0 ^ a
- 0: ab
- \C-ab
- 0: ab
-
-/ab/C
- ab
---->ab
- +0 ^ a
- +1 ^^ b
- +2 ^ ^
- 0: ab
- \C-ab
- 0: ab
-
-/^"((?(?=[a])[^"])|b)*"$/C
- "ab"
---->"ab"
- +0 ^ ^
- +1 ^ "
- +2 ^^ ((?(?=[a])[^"])|b)*
-+21 ^^ "
- +3 ^^ (?(?=[a])[^"])
-+18 ^^ b
- +5 ^^ (?=[a])
- +8 ^ [a]
-+11 ^^ )
-+12 ^^ [^"]
-+16 ^ ^ )
-+17 ^ ^ |
-+21 ^ ^ "
- +3 ^ ^ (?(?=[a])[^"])
-+18 ^ ^ b
- +5 ^ ^ (?=[a])
- +8 ^ [a]
-+19 ^ ^ )
-+21 ^ ^ "
- +3 ^ ^ (?(?=[a])[^"])
-+18 ^ ^ b
- +5 ^ ^ (?=[a])
- +8 ^ [a]
-+17 ^ ^ |
-+22 ^ ^ $
-+23 ^ ^
- 0: "ab"
- \C-"ab"
- 0: "ab"
-
-/\d+X|9+Y/
- ++++123999\P
-Partial match: 123999
- ++++123999Y\P
- 0: 999Y
-
-/Z(*F)/
- Z\P
-No match
- ZA\P
-No match
-
-/Z(?!)/
- Z\P
-No match
- ZA\P
-No match
-
-/dog(sbody)?/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dog(sbody)??/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dog|dogsbody/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/dogsbody|dog/
- dogs\P
- 0: dog
- dogs\P\P
-Partial match: dogs
-
-/Z(*F)Q|ZXY/
- Z\P
-Partial match: Z
- ZA\P
-No match
- X\P
+ \x{1104e}
No match
-
-/\bthe cat\b/
- the cat\P
- 0: the cat
- the cat\P\P
-Partial match: the cat
-
-/dog(sbody)?/
- dogs\D\P
- 0: dog
- body\D\R
- 0: body
-
-/dog(sbody)?/
- dogs\D\P\P
-Partial match: dogs
- body\D\R
- 0: body
-
-/abc/
- abc\P
- 0: abc
- abc\P\P
- 0: abc
-
-/abc\K123/
- xyzabc123pqr
-Error -16
-/(?<=abc)123/
- xyzabc123pqr
- 0: 123
- xyzabc12\P
-Partial match: abc12
- xyzabc12\P\P
-Partial match: abc12
-
-/\babc\b/
- +++abc+++
- 0: abc
- +++ab\P
-Partial match: +ab
- +++ab\P\P
-Partial match: +ab
-
-/(?=C)/g+
- ABCDECBA
- 0:
- 0+ CDECBA
- 0:
- 0+ CBA
-
-/(abc|def|xyz)/I
-Capturing subpattern count = 1
-No options
-No first char
-No need char
- terhjk;abcdaadsfe
- 0: abc
- the quick xyz brown fox
- 0: xyz
- \Yterhjk;abcdaadsfe
- 0: abc
- \Ythe quick xyz brown fox
- 0: xyz
+/^[\p{Mandaic}]/8
+ \x{840}
+ 0: \x{840}
+ \x{85e}
+ 0: \x{85e}
** Failers
No match
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+ \x{85c}
No match
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+ \x{85d}
No match
-/(abc|def|xyz)/SI
-Capturing subpattern count = 1
-No options
-No first char
-No need char
-Subject length lower bound = 3
-Starting byte set: a d x
- terhjk;abcdaadsfe
- 0: abc
- the quick xyz brown fox
- 0: xyz
- \Yterhjk;abcdaadsfe
- 0: abc
- \Ythe quick xyz brown fox
- 0: xyz
- ** Failers
-No match
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-No match
- \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
-No match
+/-- --/
-/abcd*/+
- xxxxabcd\P
- 0: abcd
- 0+
- 1: abc
- xxxxabcd\P\P
-Partial match: abcd
- dddxxx\R
- 0: ddd
- 0+ xxx
- 1: dd
- 2: d
- 3:
- xxxxabcd\P\P
-Partial match: abcd
- xxx\R
- 0:
- 0+ xxx
-
-/abcd*/i
- xxxxabcd\P
- 0: abcd
- 1: abc
- xxxxabcd\P\P
-Partial match: abcd
- XXXXABCD\P
- 0: ABCD
- 1: ABC
- XXXXABCD\P\P
-Partial match: ABCD
-
-/abc\d*/
- xxxxabc1\P
- 0: abc1
- 1: abc
- xxxxabc1\P\P
-Partial match: abc1
-
-/abc[de]*/
- xxxxabcde\P
- 0: abcde
- 1: abcd
- 2: abc
- xxxxabcde\P\P
-Partial match: abcde
-
-/(?:(?1)|B)(A(*F)|C)/
- ABCD
- 0: BC
- CCD
- 0: CC
- ** Failers
-No match
- CAD
-No match
+/(\X*)(.)/s8
+ A\x{300}
+ 0: A
+ 1:
+ 2: A
-/^(?:(?1)|B)(A(*F)|C)/
- CCD
- 0: CC
- BCD
- 0: BC
- ** Failers
-No match
- ABCD
-No match
- CAD
+/^S(\X*)e(\X*)$/8
+ Stéréo
No match
- BAD
+
+/^\X/8
+ ́réo
No match
-/^(?!a(*SKIP)b)/
- ac
-Error -16
-
-/^(?=a(*SKIP)b|ac)/
- ** Failers
+/^a\X41z/<JS>
+ aX41z
+ 0: aX41z
+ *** Failers
No match
- ac
-Error -16
-
-/^(?=a(*THEN)b|ac)/
- ac
-Error -16
-
-/^(?=a(*PRUNE)b)/
- ab
-Error -16
- ** Failers
+ aAz
No match
- ac
-Error -16
-/^(?(?!a(*SKIP)b))/
- ac
-Error -16
+/(?<=ab\Cde)X/8
+Failed: \C not allowed in lookbehind assertion at offset 10
-/(?<=abc)def/
- abc\P\P
-Partial match: abc
+/\X/
+ a\P
+ 0: a
+ a\P\P
+Partial match: a
-/abc$/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
+/\Xa/
+ aa\P
+ 0: aa
+ aa\P\P
+ 0: aa
-/abc$/m
- abc
- 0: abc
- abc\n
- 0: abc
- abc\P\P
-Partial match: abc
- abc\n\P\P
- 0: abc
- abc\P
- 0: abc
- abc\n\P
- 0: abc
+/\X{2}/
+ aa\P
+ 0: aa
+ aa\P\P
+Partial match: aa
-/abc\z/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
+/\X+a/
+ a\P
+Partial match: a
+ aa\P
+ 0: aa
+ aa\P\P
+Partial match: aa
-/abc\Z/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
+/\X+?a/
+ a\P
+Partial match: a
+ ab\P
+Partial match: ab
+ aa\P
+ 0: aa
+ aa\P\P
+ 0: aa
+ aba\P
+ 0: aba
+
+/-- These Unicode 6.1.0 scripts are not known to Perl. --/
-/abc\b/
- abc
- 0: abc
- abc\P
- 0: abc
- abc\P\P
-Partial match: abc
+/\p{Chakma}\d/8W
+ \x{11100}\x{1113c}
+ 0: \x{11100}\x{1113c}
-/abc\B/
- abc
-No match
- abc\P
-Partial match: abc
- abc\P\P
-Partial match: abc
+/\p{Takri}\d/8W
+ \x{11680}\x{116c0}
+ 0: \x{11680}\x{116c0}
-/.+/
- abc\>0
- 0: abc
- 1: ab
- 2: a
- abc\>1
- 0: bc
- 1: b
- abc\>2
- 0: c
- abc\>3
-No match
- abc\>4
-Error -24
- abc\>-4
-Error -24
+/^\X/8
+ A\P
+ 0: A
+ A\P\P
+Partial match: A
+ A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}
+ A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}
+ A\x{301}\P
+ 0: A\x{301}
+ A\x{301}\P\P
+Partial match: A\x{301}
+
+/^\X{2,3}/8
+ A\P
+Partial match: A
+ A\P\P
+Partial match: A
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+ A\x{300}\x{301}\P
+Partial match: A\x{300}\x{301}
+ A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}A\x{300}\x{301}
+
+/^\X{2}/8
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}A\x{300}\x{301}
+
+/^\X+/8
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+
+/^\X+?Z/8
+ AA\P
+Partial match: AA
+ AA\P\P
+Partial match: AA
/-- End of testinput7 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput8 b/ext/pcre/pcrelib/testdata/testoutput8
index f4f5343ef..73e0eae87 100644
--- a/ext/pcre/pcrelib/testdata/testoutput8
+++ b/ext/pcre/pcrelib/testdata/testoutput8
@@ -1,531 +1,3094 @@
-/-- This set of tests checks UTF-8 support with the DFA matching functionality
- of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
- it. --/
-
-/\x{100}ab/8
- \x{100}ab
- 0: \x{100}ab
-
-/a\x{100}*b/8
- ab
- 0: ab
- a\x{100}b
- 0: a\x{100}b
- a\x{100}\x{100}b
- 0: a\x{100}\x{100}b
-
-/a\x{100}+b/8
- a\x{100}b
- 0: a\x{100}b
- a\x{100}\x{100}b
- 0: a\x{100}\x{100}b
+/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
+ The -dfa flag must be used with pcretest when running it. --/
+
+/abc/
+ abc
+ 0: abc
+
+/ab*c/
+ abc
+ 0: abc
+ abbbbc
+ 0: abbbbc
+ ac
+ 0: ac
+
+/ab+c/
+ abc
+ 0: abc
+ abbbbbbc
+ 0: abbbbbbc
*** Failers
No match
+ ac
+No match
ab
No match
-
-/\bX/8
- Xoanon
- 0: X
- +Xoanon
- 0: X
- \x{300}Xoanon
- 0: X
- *** Failers
+
+/a*/
+ a
+ 0: a
+ 1:
+ aaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaa
+ 5: aaaaaaaaaaaa
+ 6: aaaaaaaaaaa
+ 7: aaaaaaaaaa
+ 8: aaaaaaaaa
+ 9: aaaaaaaa
+10: aaaaaaa
+11: aaaaaa
+12: aaaaa
+13: aaaa
+14: aaa
+15: aa
+16: a
+17:
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaa
+17: aaaaaaaaaaaaa
+18: aaaaaaaaaaaa
+19: aaaaaaaaaaa
+20: aaaaaaaaaa
+21: aaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
+ 0:
+
+/(a|abcd|african)/
+ a
+ 0: a
+ abcd
+ 0: abcd
+ 1: a
+ african
+ 0: african
+ 1: a
+
+/^abc/
+ abcdef
+ 0: abc
+ *** Failers
No match
- YXoanon
+ xyzabc
+No match
+ xyz\nabc
No match
-/\BX/8
- YXoanon
- 0: X
+/^abc/m
+ abcdef
+ 0: abc
+ xyz\nabc
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+
+/\Aabc/
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyz\nabc
+No match
+
+/\Aabc/m
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyz\nabc
+No match
+
+/\Gabc/
+ abcdef
+ 0: abc
+ xyzabc\>3
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyzabc\>2
+No match
+
+/x\dy\Dz/
+ x9yzz
+ 0: x9yzz
+ x0y+z
+ 0: x0y+z
+ *** Failers
+No match
+ xyz
+No match
+ xxy0z
+No match
+
+/x\sy\Sz/
+ x yzz
+ 0: x yzz
+ x y+z
+ 0: x y+z
+ *** Failers
+No match
+ xyz
+No match
+ xxyyz
+No match
+
+/x\wy\Wz/
+ xxy+z
+ 0: xxy+z
*** Failers
No match
- Xoanon
+ xxy0z
No match
- +Xoanon
+ x+y+z
No match
- \x{300}Xoanon
+
+/x.y/
+ x+y
+ 0: x+y
+ x-y
+ 0: x-y
+ *** Failers
+No match
+ x\ny
No match
+
+/x.y/s
+ x+y
+ 0: x+y
+ x-y
+ 0: x-y
+ x\ny
+ 0: x\x0ay
-/X\b/8
- X+oanon
- 0: X
- ZX\x{300}oanon
- 0: X
- FAX
- 0: X
+/(a.b(?s)c.d|x.y)p.q/
+ a+bc+dp+q
+ 0: a+bc+dp+q
+ a+bc\ndp+q
+ 0: a+bc\x0adp+q
+ x\nyp+q
+ 0: x\x0ayp+q
*** Failers
No match
- Xoanon
+ a\nbc\ndp+q
No match
-
-/X\B/8
- Xoanon
- 0: X
+ a+bc\ndp\nq
+No match
+ x\nyp\nq
+No match
+
+/a\d\z/
+ ba0
+ 0: a0
+ *** Failers
+No match
+ ba0\n
+No match
+ ba0\ncd
+No match
+
+/a\d\z/m
+ ba0
+ 0: a0
+ *** Failers
+No match
+ ba0\n
+No match
+ ba0\ncd
+No match
+
+/a\d\Z/
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ *** Failers
+No match
+ ba0\ncd
+No match
+
+/a\d\Z/m
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
*** Failers
No match
- X+oanon
+ ba0\ncd
No match
- ZX\x{300}oanon
+
+/a\d$/
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ *** Failers
No match
- FAX
+ ba0\ncd
No match
+
+/a\d$/m
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ ba0\ncd
+ 0: a0
+ *** Failers
+No match
+
+/abc/i
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ ABC
+ 0: ABC
-/[^a]/8
+/[^a]/
abcd
0: b
- a\x{100}
- 0: \x{100}
+
+/ab?\w/
+ abz
+ 0: abz
+ 1: ab
+ abbz
+ 0: abb
+ 1: ab
+ azz
+ 0: az
-/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
- ab99
- 0: ab9
- \x{123}\x{123}45
- 0: \x{123}\x{123}4
- \x{400}\x{401}\x{402}6
- 0: \x{400}\x{401}\x{402}6
+/x{0,3}yz/
+ ayzq
+ 0: yz
+ axyzq
+ 0: xyz
+ axxyz
+ 0: xxyz
+ axxxyzq
+ 0: xxxyz
+ axxxxyzq
+ 0: xxxyz
*** Failers
No match
- d99
+ ax
+No match
+ axx
+No match
+
+/x{3}yz/
+ axxxyzq
+ 0: xxxyz
+ axxxxyzq
+ 0: xxxyz
+ *** Failers
+No match
+ ax
+No match
+ axx
No match
- \x{123}\x{122}4
+ ayzq
No match
- \x{400}\x{403}6
+ axyzq
No match
- \x{400}\x{401}\x{402}\x{402}6
+ axxyz
+No match
+
+/x{2,3}yz/
+ axxyz
+ 0: xxyz
+ axxxyzq
+ 0: xxxyz
+ axxxxyzq
+ 0: xxxyz
+ *** Failers
+No match
+ ax
+No match
+ axx
+No match
+ ayzq
+No match
+ axyzq
+No match
+
+/[^a]+/
+ bac
+ 0: b
+ bcdefax
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ 3: bc
+ 4: b
+ *** Failers
+ 0: *** F
+ 1: ***
+ 2: ***
+ 3: **
+ 4: *
+ aaaaa
No match
-/abc/8
- ]
-Error -10
-
-Error -10
-
-Error -10
- \?
+/[^a]*/
+ bac
+ 0: b
+ 1:
+ bcdefax
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ 3: bc
+ 4: b
+ 5:
+ *** Failers
+ 0: *** F
+ 1: ***
+ 2: ***
+ 3: **
+ 4: *
+ 5:
+ aaaaa
+ 0:
+
+/[^a]{3,5}/
+ xyz
+ 0: xyz
+ awxyza
+ 0: wxyz
+ 1: wxy
+ abcdefa
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ abcdefghijk
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ *** Failers
+ 0: *** F
+ 1: ***
+ 2: ***
+ axya
+No match
+ axa
+No match
+ aaaaa
No match
- \xe1\x88
-Error -10
- \P\xe1\x88
-Error -10
- \P\P\xe1\x88
-Error -25
-/a.b/8
- acb
- 0: acb
- a\x7fb
- 0: a\x{7f}b
- a\x{100}b
- 0: a\x{100}b
+/\d*/
+ 1234b567
+ 0: 1234
+ 1: 123
+ 2: 12
+ 3: 1
+ 4:
+ xyz
+ 0:
+
+/\D*/
+ a1234b567
+ 0: a
+ 1:
+ xyz
+ 0: xyz
+ 1: xy
+ 2: x
+ 3:
+
+/\d+/
+ ab1234c56
+ 0: 1234
+ 1: 123
+ 2: 12
+ 3: 1
*** Failers
No match
- a\nb
+ xyz
No match
+
+/\D+/
+ ab123c56
+ 0: ab
+ 1: a
+ *** Failers
+ 0: *** Failers
+ 1: *** Failer
+ 2: *** Faile
+ 3: *** Fail
+ 4: *** Fai
+ 5: *** Fa
+ 6: *** F
+ 7: ***
+ 8: ***
+ 9: **
+10: *
+ 789
+No match
+
+/\d?A/
+ 045ABC
+ 0: 5A
+ ABC
+ 0: A
+ *** Failers
+No match
+ XYZ
+No match
+
+/\D?A/
+ ABC
+ 0: A
+ BAC
+ 0: BA
+ 9ABC
+ 0: A
+ *** Failers
+No match
+
+/a+/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
-/a(.{3})b/8
- a\x{4000}xyb
- 0: a\x{4000}xyb
- a\x{4000}\x7fyb
- 0: a\x{4000}\x{7f}yb
- a\x{4000}\x{100}yb
- 0: a\x{4000}\x{100}yb
+/^.*xyz/
+ xyz
+ 0: xyz
+ ggggggggxyz
+ 0: ggggggggxyz
+
+/^.+xyz/
+ abcdxyz
+ 0: abcdxyz
+ axyz
+ 0: axyz
*** Failers
No match
- a\x{4000}b
+ xyz
+No match
+
+/^.?xyz/
+ xyz
+ 0: xyz
+ cxyz
+ 0: cxyz
+
+/^\d{2,3}X/
+ 12X
+ 0: 12X
+ 123X
+ 0: 123X
+ *** Failers
No match
- ac\ncb
+ X
+No match
+ 1X
+No match
+ 1234X
No match
-/a(.*?)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: a\xc0\x88
- 2: a\xc0
+/^[abcd]\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ *** Failers
+No match
+ e45
+No match
+ abcd
+No match
+ abcd1234
+No match
+ 1234
+No match
-/a(.*?)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: a\x{100}
-
-/a(.*)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: a\xc0\x88
- 2: a\xc0
+/^[abcd]*\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ abcd1234
+ 0: abcd1
+ 1234
+ 0: 1
+ *** Failers
+No match
+ e45
+No match
+ abcd
+No match
-/a(.*)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: a\x{100}
+/^[abcd]+\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ abcd1234
+ 0: abcd1
+ *** Failers
+No match
+ 1234
+No match
+ e45
+No match
+ abcd
+No match
-/a(.)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
+/^a+X/
+ aX
+ 0: aX
+ aaX
+ 0: aaX
-/a(.)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
-
-/a(.?)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: a\xc0
-
-/a(.?)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: a\x{240}
-
-/a(.??)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: a\xc0
+/^[abcd]?\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ 1234
+ 0: 1
+ *** Failers
+No match
+ abcd1234
+No match
+ e45
+No match
-/a(.??)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: a\x{240}
+/^[abcd]{2,3}\d/
+ ab45
+ 0: ab4
+ bcd93
+ 0: bcd9
+ *** Failers
+No match
+ 1234
+No match
+ a36
+No match
+ abcd1234
+No match
+ ee45
+No match
-/a(.{3})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
+/^(abc)*\d/
+ abc45
+ 0: abc4
+ abcabcabc45
+ 0: abcabcabc4
+ 42xyz
+ 0: 4
+ *** Failers
+No match
+
+/^(abc)+\d/
+ abc45
+ 0: abc4
+ abcabcabc45
+ 0: abcabcabc4
*** Failers
No match
- a\x{1234}b
+ 42xyz
+No match
+
+/^(abc)?\d/
+ abc45
+ 0: abc4
+ 42xyz
+ 0: 4
+ *** Failers
No match
- ac\ncb
+ abcabcabc45
No match
-/a(.{3,})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+/^(abc){2,3}\d/
+ abcabc45
+ 0: abcabc4
+ abcabcabc45
+ 0: abcabcabc4
*** Failers
No match
- a\x{1234}b
+ abcabcabcabc45
+No match
+ abc45
+No match
+ 42xyz
+No match
+
+/1(abc|xyz)2(?1)3/
+ 1abc2abc3456
+ 0: 1abc2abc3
+ 1abc2xyz3456
+ 0: 1abc2xyz3
+
+/^(a*\w|ab)=(a*\w|ab)/
+ ab=ab
+ 0: ab=ab
+ 1: ab=a
+
+/^(a*\w|ab)=(?1)/
+ ab=ab
+ 0: ab=ab
+ 1: ab=a
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ 0: abc
+ a(b)c
+ 0: a(b)c
+ a(b(c))d
+ 0: a(b(c))d
+ *** Failers)
+No match
+ a(b(c)d
No match
-/a(.{3,}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ 0: >abc>123<xyz<
+ >abc>1(2)3<xyz<
+ 0: >abc>1(2)3<xyz<
+ >abc>(1(2)3)<xyz<
+ 0: >abc>(1(2)3)<xyz<
+
+/^(?>a*)\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
+ *** Failers
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
+ <>
+ 0: <>
+ <abcd>
+ 0: <abcd>
+ <abc <123> hij>
+ 0: <abc <123> hij>
+ <abc <def> hij>
+ 0: <def>
+ <abc<>def>
+ 0: <abc<>def>
+ <abc<>
+ 0: <>
*** Failers
No match
- a\x{1234}b
+ <abc
No match
-/a(.{3,5})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- 0: axbxxb
- axxxxxbcdefghijb
- 0: axxxxxb
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 0: abc:
+ 12
+ 0: 12
+ *** Failers
+No match
+ 123
+No match
+ xyz
+No match
+
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 0: abc:
+ 12
+ 0: 12
*** Failers
No match
- a\x{1234}b
+ 123
No match
- axxxxxxbcdefghijb
+ xyz
No match
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- 0: axbxxb
- axxxxxbcdefghijb
- 0: axxxxxb
+/^(?=abc)\w{5}:$/
+ abcde:
+ 0: abcde:
+ *** Failers
+No match
+ abc..
+No match
+ 123
+No match
+ vwxyz
+No match
+
+/^(?!abc)\d\d$/
+ 12
+ 0: 12
*** Failers
No match
- a\x{1234}b
+ abcde:
+No match
+ abc..
+No match
+ 123
No match
- axxxxxxbcdefghijb
+ vwxyz
No match
-/^[a\x{c0}]/8
+/(?<=abc|xy)123/
+ abc12345
+ 0: 123
+ wxy123z
+ 0: 123
*** Failers
No match
- \x{100}
+ 123abc
+No match
+
+/(?<!abc|xy)123/
+ 123abc
+ 0: 123
+ mno123456
+ 0: 123
+ *** Failers
+No match
+ abc12345
+No match
+ wxy123z
No match
-/(?<=aXb)cd/8
- aXbcd
- 0: cd
+/abc(?C1)xyz/
+ abcxyz
+--->abcxyz
+ 1 ^ ^ x
+ 0: abcxyz
+ 123abcxyz999
+--->123abcxyz999
+ 1 ^ ^ x
+ 0: abcxyz
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
- 0: cd
+/(ab|cd){3,4}/C
+ ababab
+--->ababab
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +4 ^ c
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +2 ^ ^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +2 ^ ^ b
+ +3 ^ ^ |
++12 ^ ^
+ +1 ^ ^ a
+ +4 ^ ^ c
+ 0: ababab
+ abcdabcd
+--->abcdabcd
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +4 ^ c
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +2 ^ ^ b
+ +3 ^ ^ |
++12 ^ ^
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ 0: abcdabcd
+ 1: abcdab
+ abcdcdcdcdcd
+--->abcdcdcdcdcd
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +4 ^ c
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ 0: abcdcdcd
+ 1: abcdcd
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
- 0: cd
+/^abc/
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ abcdef\B
+No match
+
+/^(a*|xyz)/
+ bcd
+ 0:
+ aaabcd
+ 0: aaa
+ 1: aa
+ 2: a
+ 3:
+ xyz
+ 0: xyz
+ 1:
+ xyz\N
+ 0: xyz
+ *** Failers
+ 0:
+ bcd\N
+No match
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- 0: \x{100}\x{100}\x{100}b
- *** Failers
+/xyz$/
+ xyz
+ 0: xyz
+ xyz\n
+ 0: xyz
+ *** Failers
+No match
+ xyz\Z
+No match
+ xyz\n\Z
+No match
+
+/xyz$/m
+ xyz
+ 0: xyz
+ xyz\n
+ 0: xyz
+ abcxyz\npqr
+ 0: xyz
+ abcxyz\npqr\Z
+ 0: xyz
+ xyz\n\Z
+ 0: xyz
+ *** Failers
No match
- \x{100}\x{100}b
+ xyz\Z
No match
-/\x{ab}/8
- \x{ab}
- 0: \x{ab}
- \xc2\xab
- 0: \x{ab}
+/\Gabc/
+ abcdef
+ 0: abc
+ defabcxyz\>3
+ 0: abc
*** Failers
No match
- \x00{ab}
+ defabcxyz
No match
-/(?<=(.))X/8
- WXYZ
- 0: X
- \x{256}XYZ
- 0: X
+/^abcdef/
+ ab\P
+Partial match: ab
+ abcde\P
+Partial match: abcde
+ abcdef\P
+ 0: abcdef
*** Failers
No match
- XYZ
+ abx\P
No match
-/[^a]+/8g
- bcd
- 0: bcd
- 1: bc
- 2: b
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
- 1: Y\x{256}
- 2: Y
-
-/^[^a]{2}/8
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8
- \x{100}bcAa
- 0: \x{100}bcA
- 1: \x{100}bc
- 2: \x{100}b
-
-/^[^a]{2,}?/8
- \x{100}bca
- 0: \x{100}bc
- 1: \x{100}b
-
-/[^a]+/8ig
- bcd
- 0: bcd
- 1: bc
- 2: b
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
- 1: Y\x{256}
- 2: Y
-
-/^[^a]{2}/8i
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8i
- \x{100}bcAa
- 0: \x{100}bc
- 1: \x{100}b
+/^a{2,4}\d+z/
+ a\P
+Partial match: a
+ aa\P
+Partial match: aa
+ aa2\P
+Partial match: aa2
+ aaa\P
+Partial match: aaa
+ aaa23\P
+Partial match: aaa23
+ aaaa12345\P
+Partial match: aaaa12345
+ aa0z\P
+ 0: aa0z
+ aaaa4444444444444z\P
+ 0: aaaa4444444444444z
+ *** Failers
+No match
+ az\P
+No match
+ aaaaa\P
+No match
+ a56\P
+No match
+
+/^abcdef/
+ abc\P
+Partial match: abc
+ def\R
+ 0: def
+
+/(?<=foo)bar/
+ xyzfo\P
+No match
+ foob\P\>2
+Partial match: foob
+ foobar...\R\P\>4
+ 0: ar
+ xyzfo\P
+No match
+ foobar\>2
+ 0: bar
+ *** Failers
+No match
+ xyzfo\P
+No match
+ obar\R
+No match
+
+/(ab*(cd|ef))+X/
+ adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
+No match
+ lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
+Partial match: abbbbbbcdaefabbbbbbbefa
+ cdabbbbbbbb\P\R\B\Z
+Partial match: cdabbbbbbbb
+ efabbbbbbbbbbbbbbbb\P\R\B\Z
+Partial match: efabbbbbbbbbbbbbbbb
+ bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
+ 0: bbbbbbbbbbbbcdX
-/^[^a]{2,}?/8i
- \x{100}bca
- 0: \x{100}bc
- 1: \x{100}b
+/(a|b)/SF>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: a
+ ** Failers
+ 0: a
+ def
+No match
+
+/the quick brown fox/
+ the quick brown fox
+ 0: the quick brown fox
+ The quick brown FOX
+No match
+ What do you know about the quick brown fox?
+ 0: the quick brown fox
+ What do you know about THE QUICK BROWN FOX?
+No match
+
+/The quick brown fox/i
+ the quick brown fox
+ 0: the quick brown fox
+ The quick brown FOX
+ 0: The quick brown FOX
+ What do you know about the quick brown fox?
+ 0: the quick brown fox
+ What do you know about THE QUICK BROWN FOX?
+ 0: THE QUICK BROWN FOX
+
+/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
+ abcd\t\n\r\f\a\e9;\$\\?caxyz
+ 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
+
+/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
+ abxyzpqrrrabbxyyyypqAzz
+ 0: abxyzpqrrrabbxyyyypqAzz
+ abxyzpqrrrabbxyyyypqAzz
+ 0: abxyzpqrrrabbxyyyypqAzz
+ aabxyzpqrrrabbxyyyypqAzz
+ 0: aabxyzpqrrrabbxyyyypqAzz
+ aaabxyzpqrrrabbxyyyypqAzz
+ 0: aaabxyzpqrrrabbxyyyypqAzz
+ aaaabxyzpqrrrabbxyyyypqAzz
+ 0: aaaabxyzpqrrrabbxyyyypqAzz
+ abcxyzpqrrrabbxyyyypqAzz
+ 0: abcxyzpqrrrabbxyyyypqAzz
+ aabcxyzpqrrrabbxyyyypqAzz
+ 0: aabcxyzpqrrrabbxyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypAzz
+ 0: aaabcxyzpqrrrabbxyyyypAzz
+ aaabcxyzpqrrrabbxyyyypqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
+ aaaabcxyzpqrrrabbxyyyypqAzz
+ 0: aaaabcxyzpqrrrabbxyyyypqAzz
+ abxyzzpqrrrabbxyyyypqAzz
+ 0: abxyzzpqrrrabbxyyyypqAzz
+ aabxyzzzpqrrrabbxyyyypqAzz
+ 0: aabxyzzzpqrrrabbxyyyypqAzz
+ aaabxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaabxyzzzzpqrrrabbxyyyypqAzz
+ aaaabxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
+ abcxyzzpqrrrabbxyyyypqAzz
+ 0: abcxyzzpqrrrabbxyyyypqAzz
+ aabcxyzzzpqrrrabbxyyyypqAzz
+ 0: aabcxyzzzpqrrrabbxyyyypqAzz
+ aaabcxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyypqAzz
+ 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
+ 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypABzz
+ 0: aaabcxyzpqrrrabbxyyyypABzz
+ aaabcxyzpqrrrabbxyyyypABBzz
+ 0: aaabcxyzpqrrrabbxyyyypABBzz
+ >>>aaabxyzpqrrrabbxyyyypqAzz
+ 0: aaabxyzpqrrrabbxyyyypqAzz
+ >aaaabxyzpqrrrabbxyyyypqAzz
+ 0: aaaabxyzpqrrrabbxyyyypqAzz
+ >>>>abcxyzpqrrrabbxyyyypqAzz
+ 0: abcxyzpqrrrabbxyyyypqAzz
+ *** Failers
+No match
+ abxyzpqrrabbxyyyypqAzz
+No match
+ abxyzpqrrrrabbxyyyypqAzz
+No match
+ abxyzpqrrrabxyyyypqAzz
+No match
+ aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
+No match
+ aaaabcxyzzzzpqrrrabbbxyyypqAzz
+No match
+ aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
+No match
+
+/^(abc){1,2}zz/
+ abczz
+ 0: abczz
+ abcabczz
+ 0: abcabczz
+ *** Failers
+No match
+ zz
+No match
+ abcabcabczz
+No match
+ >>abczz
+No match
+
+/^(b+?|a){1,2}?c/
+ bc
+ 0: bc
+ bbc
+ 0: bbc
+ bbbc
+ 0: bbbc
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ aac
+ 0: aac
+ abbbbbbbbbbbc
+ 0: abbbbbbbbbbbc
+ bbbbbbbbbbbac
+ 0: bbbbbbbbbbbac
+ *** Failers
+No match
+ aaac
+No match
+ abbbbbbbbbbbac
+No match
+
+/^(b+|a){1,2}c/
+ bc
+ 0: bc
+ bbc
+ 0: bbc
+ bbbc
+ 0: bbbc
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ aac
+ 0: aac
+ abbbbbbbbbbbc
+ 0: abbbbbbbbbbbc
+ bbbbbbbbbbbac
+ 0: bbbbbbbbbbbac
+ *** Failers
+No match
+ aaac
+No match
+ abbbbbbbbbbbac
+No match
+
+/^(b+|a){1,2}?bc/
+ bbc
+ 0: bbc
+
+/^(b*|ba){1,2}?bc/
+ babc
+ 0: babc
+ bbabc
+ 0: bbabc
+ bababc
+ 0: bababc
+ *** Failers
+No match
+ bababbc
+No match
+ babababc
+No match
+
+/^(ba|b*){1,2}?bc/
+ babc
+ 0: babc
+ bbabc
+ 0: bbabc
+ bababc
+ 0: bababc
+ *** Failers
+No match
+ bababbc
+No match
+ babababc
+No match
+
+/^\ca\cA\c[\c{\c:/
+ \x01\x01\e;z
+ 0: \x01\x01\x1b;z
+
+/^[ab\]cde]/
+ athing
+ 0: a
+ bthing
+ 0: b
+ ]thing
+ 0: ]
+ cthing
+ 0: c
+ dthing
+ 0: d
+ ething
+ 0: e
+ *** Failers
+No match
+ fthing
+No match
+ [thing
+No match
+ \\thing
+No match
-/\x{100}{0,0}/8
+/^[]cde]/
+ ]thing
+ 0: ]
+ cthing
+ 0: c
+ dthing
+ 0: d
+ ething
+ 0: e
+ *** Failers
+No match
+ athing
+No match
+ fthing
+No match
+
+/^[^ab\]cde]/
+ fthing
+ 0: f
+ [thing
+ 0: [
+ \\thing
+ 0: \
+ *** Failers
+ 0: *
+ athing
+No match
+ bthing
+No match
+ ]thing
+No match
+ cthing
+No match
+ dthing
+No match
+ ething
+No match
+
+/^[^]cde]/
+ athing
+ 0: a
+ fthing
+ 0: f
+ *** Failers
+ 0: *
+ ]thing
+No match
+ cthing
+No match
+ dthing
+No match
+ ething
+No match
+
+/^\/
+
+ 0: \x81
+
+/^/
+
+ 0: \xff
+
+/^[0-9]+$/
+ 0
+ 0: 0
+ 1
+ 0: 1
+ 2
+ 0: 2
+ 3
+ 0: 3
+ 4
+ 0: 4
+ 5
+ 0: 5
+ 6
+ 0: 6
+ 7
+ 0: 7
+ 8
+ 0: 8
+ 9
+ 0: 9
+ 10
+ 0: 10
+ 100
+ 0: 100
+ *** Failers
+No match
+ abc
+No match
+
+/^.*nter/
+ enter
+ 0: enter
+ inter
+ 0: inter
+ uponter
+ 0: uponter
+
+/^xxx[0-9]+$/
+ xxx0
+ 0: xxx0
+ xxx1234
+ 0: xxx1234
+ *** Failers
+No match
+ xxx
+No match
+
+/^.+[0-9][0-9][0-9]$/
+ x123
+ 0: x123
+ xx123
+ 0: xx123
+ 123456
+ 0: 123456
+ *** Failers
+No match
+ 123
+No match
+ x1234
+ 0: x1234
+
+/^.+?[0-9][0-9][0-9]$/
+ x123
+ 0: x123
+ xx123
+ 0: xx123
+ 123456
+ 0: 123456
+ *** Failers
+No match
+ 123
+No match
+ x1234
+ 0: x1234
+
+/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
+ abc!pqr=apquxz.ixr.zzz.ac.uk
+ 0: abc!pqr=apquxz.ixr.zzz.ac.uk
+ *** Failers
+No match
+ !pqr=apquxz.ixr.zzz.ac.uk
+No match
+ abc!=apquxz.ixr.zzz.ac.uk
+No match
+ abc!pqr=apquxz:ixr.zzz.ac.uk
+No match
+ abc!pqr=apquxz.ixr.zzz.ac.ukk
+No match
+
+/:/
+ Well, we need a colon: somewhere
+ 0: :
+ *** Fail if we don't
+No match
+
+/([\da-f:]+)$/i
+ 0abc
+ 0: 0abc
+ abc
+ 0: abc
+ fed
+ 0: fed
+ E
+ 0: E
+ ::
+ 0: ::
+ 5f03:12C0::932e
+ 0: 5f03:12C0::932e
+ fed def
+ 0: def
+ Any old stuff
+ 0: ff
+ *** Failers
+No match
+ 0zzz
+No match
+ gzzz
+No match
+ fed\x20
+No match
+ Any old rubbish
+No match
+
+/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
+ .1.2.3
+ 0: .1.2.3
+ A.12.123.0
+ 0: A.12.123.0
+ *** Failers
+No match
+ .1.2.3333
+No match
+ 1.2.3
+No match
+ 1234.2.3
+No match
+
+/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
+ 1 IN SOA non-sp1 non-sp2(
+ 0: 1 IN SOA non-sp1 non-sp2(
+ 1 IN SOA non-sp1 non-sp2 (
+ 0: 1 IN SOA non-sp1 non-sp2 (
+ *** Failers
+No match
+ 1IN SOA non-sp1 non-sp2(
+No match
+
+/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
+ a.
+ 0: a.
+ Z.
+ 0: Z.
+ 2.
+ 0: 2.
+ ab-c.pq-r.
+ 0: ab-c.pq-r.
+ sxk.zzz.ac.uk.
+ 0: sxk.zzz.ac.uk.
+ x-.y-.
+ 0: x-.y-.
+ *** Failers
+No match
+ -abc.peq.
+No match
+
+/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
+ *.a
+ 0: *.a
+ *.b0-a
+ 0: *.b0-a
+ *.c3-b.c
+ 0: *.c3-b.c
+ *.c-a.b-c
+ 0: *.c-a.b-c
+ *** Failers
+No match
+ *.0
+No match
+ *.a-
+No match
+ *.a-b.c-
+No match
+ *.c-a.0-c
+No match
+
+/^(?=ab(de))(abd)(e)/
+ abde
+ 0: abde
+
+/^(?!(ab)de|x)(abd)(f)/
+ abdf
+ 0: abdf
+
+/^(?=(ab(cd)))(ab)/
abcd
+ 0: ab
+
+/^[\da-f](\.[\da-f])*$/i
+ a.b.c.d
+ 0: a.b.c.d
+ A.B.C.D
+ 0: A.B.C.D
+ a.b.c.1.2.3.C
+ 0: a.b.c.1.2.3.C
+
+/^\".*\"\s*(;.*)?$/
+ \"1234\"
+ 0: "1234"
+ \"abcd\" ;
+ 0: "abcd" ;
+ \"\" ; rhubarb
+ 0: "" ; rhubarb
+ *** Failers
+No match
+ \"1234\" : things
+No match
+
+/^$/
+ \
0:
-
-/\x{100}?/8
+ *** Failers
+No match
+
+/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
+ ab c
+ 0: ab c
+ *** Failers
+No match
+ abc
+No match
+ ab cde
+No match
+
+/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
+ ab c
+ 0: ab c
+ *** Failers
+No match
+ abc
+No match
+ ab cde
+No match
+
+/^ a\ b[c ]d $/x
+ a bcd
+ 0: a bcd
+ a b d
+ 0: a b d
+ *** Failers
+No match
abcd
- 0:
- \x{100}\x{100}
- 0: \x{100}
- 1:
+No match
+ ab d
+No match
-/\x{100}{0,3}/8
- \x{100}\x{100}
- 0: \x{100}\x{100}
- 1: \x{100}
- 2:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
- 1: \x{100}\x{100}
- 2: \x{100}
- 3:
-
-/\x{100}*/8
- abce
- 0:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}
- 2: \x{100}\x{100}
- 3: \x{100}
+/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
+ abcdefhijklm
+ 0: abcdefhijklm
+
+/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
+ abcdefhijklm
+ 0: abcdefhijklm
+
+/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
+ a+ Z0+\x08\n\x1d\x12
+ 0: a+ Z0+\x08\x0a\x1d\x12
+
+/^[.^$|()*+?{,}]+/
+ .^\$(*+)|{?,?}
+ 0: .^$(*+)|{?,?}
+ 1: .^$(*+)|{?,?
+ 2: .^$(*+)|{?,
+ 3: .^$(*+)|{?
+ 4: .^$(*+)|{
+ 5: .^$(*+)|
+ 6: .^$(*+)
+ 7: .^$(*+
+ 8: .^$(*
+ 9: .^$(
+10: .^$
+11: .^
+12: .
+
+/^a*\w/
+ z
+ 0: z
+ az
+ 0: az
+ 1: a
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ 3: a
+ a
+ 0: a
+ aa
+ 0: aa
+ 1: a
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ a+
+ 0: a
+ aa+
+ 0: aa
+ 1: a
+
+/^a*?\w/
+ z
+ 0: z
+ az
+ 0: az
+ 1: a
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ 3: a
+ a
+ 0: a
+ aa
+ 0: aa
+ 1: a
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ a+
+ 0: a
+ aa+
+ 0: aa
+ 1: a
+
+/^a+\w/
+ az
+ 0: az
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ aa
+ 0: aa
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ aa+
+ 0: aa
+
+/^a+?\w/
+ az
+ 0: az
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ aa
+ 0: aa
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ aa+
+ 0: aa
+
+/^\d{8}\w{2,}/
+ 1234567890
+ 0: 1234567890
+ 12345678ab
+ 0: 12345678ab
+ 12345678__
+ 0: 12345678__
+ *** Failers
+No match
+ 1234567
+No match
+
+/^[aeiou\d]{4,5}$/
+ uoie
+ 0: uoie
+ 1234
+ 0: 1234
+ 12345
+ 0: 12345
+ aaaaa
+ 0: aaaaa
+ *** Failers
+No match
+ 123456
+No match
+
+/^[aeiou\d]{4,5}?/
+ uoie
+ 0: uoie
+ 1234
+ 0: 1234
+ 12345
+ 0: 12345
+ 1: 1234
+ aaaaa
+ 0: aaaaa
+ 1: aaaa
+ 123456
+ 0: 12345
+ 1: 1234
+
+/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
+ From abcd Mon Sep 01 12:33:02 1997
+ 0: From abcd Mon Sep 01 12:33
+
+/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
+ From abcd Mon Sep 01 12:33:02 1997
+ 0: From abcd Mon Sep 01 12:33
+ From abcd Mon Sep 1 12:33:02 1997
+ 0: From abcd Mon Sep 1 12:33
+ *** Failers
+No match
+ From abcd Sep 01 12:33:02 1997
+No match
+
+/^12.34/s
+ 12\n34
+ 0: 12\x0a34
+ 12\r34
+ 0: 12\x0d34
+
+/\w+(?=\t)/
+ the quick brown\t fox
+ 0: brown
+
+/foo(?!bar)(.*)/
+ foobar is foolish see?
+ 0: foolish see?
+ 1: foolish see
+ 2: foolish se
+ 3: foolish s
+ 4: foolish
+ 5: foolish
+ 6: foolis
+ 7: fooli
+ 8: fool
+ 9: foo
+
+/(?:(?!foo)...|^.{0,2})bar(.*)/
+ foobar crowbar etc
+ 0: rowbar etc
+ 1: rowbar et
+ 2: rowbar e
+ 3: rowbar
+ 4: rowbar
+ barrel
+ 0: barrel
+ 1: barre
+ 2: barr
+ 3: bar
+ 2barrel
+ 0: 2barrel
+ 1: 2barre
+ 2: 2barr
+ 3: 2bar
+ A barrel
+ 0: A barrel
+ 1: A barre
+ 2: A barr
+ 3: A bar
+
+/^(\D*)(?=\d)(?!123)/
+ abc456
+ 0: abc
+ *** Failers
+No match
+ abc123
+No match
+
+/^1234(?# test newlines
+ inside)/
+ 1234
+ 0: 1234
+
+/^1234 #comment in extended re
+ /x
+ 1234
+ 0: 1234
+
+/#rhubarb
+ abcd/x
+ abcd
+ 0: abcd
+
+/^abcd#rhubarb/x
+ abcd
+ 0: abcd
+
+/(?!^)abc/
+ the abc
+ 0: abc
+ *** Failers
+No match
+ abc
+No match
+
+/(?=^)abc/
+ abc
+ 0: abc
+ *** Failers
+No match
+ the abc
+No match
+
+/^[ab]{1,3}(ab*|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/^[ab]{1,3}?(ab*|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/^[ab]{1,3}?(ab*?|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/^[ab]{1,3}(ab*?|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # optional leading comment
+(?: (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # initial word
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) )* # further okay, if led by a period
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+# address
+| # or
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # one word, optionally followed by....
+(?:
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
+\(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) | # comments, or...
+
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+# quoted strings
+)*
+< (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # leading <
+(?: @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* , (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+)* # further okay, if led by comma
+: # closing colon
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* )? # optional route
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # initial word
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) )* # further okay, if led by a period
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+# address spec
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* > # trailing >
+# name and address
+) (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # optional trailing comment
+/x
+ Alan Other <user\@dom.ain>
+ 0: Alan Other <user@dom.ain>
+ <user\@dom.ain>
+ 0: user@dom.ain
+ 1: user@dom
+ user\@dom.ain
+ 0: user@dom.ain
+ 1: user@dom
+ \"A. Other\" <user.1234\@dom.ain> (a comment)
+ 0: "A. Other" <user.1234@dom.ain> (a comment)
+ 1: "A. Other" <user.1234@dom.ain>
+ 2: "A. Other" <user.1234@dom.ain>
+ A. Other <user.1234\@dom.ain> (a comment)
+ 0: Other <user.1234@dom.ain> (a comment)
+ 1: Other <user.1234@dom.ain>
+ 2: Other <user.1234@dom.ain>
+ \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
+ 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
+ 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
+ A missing angle <user\@some.where
+ 0: user@some.where
+ 1: user@some
+ *** Failers
+No match
+ The quick brown fox
+No match
+
+/[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional leading comment
+(?:
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# additional words
+)*
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+# address
+| # or
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+# leading word
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
+(?:
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+|
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+) # "special" comment or quoted string
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
+)*
+<
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# <
+(?:
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+(?: ,
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+)* # additional domains
+:
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)? # optional route
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# additional words
+)*
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+# address spec
+> # >
+# name and address
+)
+/x
+ Alan Other <user\@dom.ain>
+ 0: Alan Other <user@dom.ain>
+ <user\@dom.ain>
+ 0: user@dom.ain
+ 1: user@dom
+ user\@dom.ain
+ 0: user@dom.ain
+ 1: user@dom
+ \"A. Other\" <user.1234\@dom.ain> (a comment)
+ 0: "A. Other" <user.1234@dom.ain>
+ A. Other <user.1234\@dom.ain> (a comment)
+ 0: Other <user.1234@dom.ain>
+ \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
+ 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
+ 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
+ A missing angle <user\@some.where
+ 0: user@some.where
+ 1: user@some
+ *** Failers
+No match
+ The quick brown fox
+No match
+
+/abc\0def\00pqr\000xyz\0000AB/
+ abc\0def\00pqr\000xyz\0000AB
+ 0: abc\x00def\x00pqr\x00xyz\x000AB
+ abc456 abc\0def\00pqr\000xyz\0000ABCDE
+ 0: abc\x00def\x00pqr\x00xyz\x000AB
+
+/abc\x0def\x00pqr\x000xyz\x0000AB/
+ abc\x0def\x00pqr\x000xyz\x0000AB
+ 0: abc\x0def\x00pqr\x000xyz\x0000AB
+ abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
+ 0: abc\x0def\x00pqr\x000xyz\x0000AB
+
+/^[\000-\037]/
+ \0A
+ 0: \x00
+ \01B
+ 0: \x01
+ \037C
+ 0: \x1f
+
+/\0*/
+ \0\0\0\0
+ 0: \x00\x00\x00\x00
+ 1: \x00\x00\x00
+ 2: \x00\x00
+ 3: \x00
4:
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}
-
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
- 1: \x{100}\x{100}
- 2: \x{100}
-
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}
- 2: \x{100}\x{100}
- 3: \x{100}
-
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}
-
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}
-
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}\x{100}\x{100}
- 3: \x{100}\x{100}\x{100}\x{100}
- 4: \x{100}\x{100}\x{100}
-
-/(?<=a\x{100}{2}b)X/8
- Xyyya\x{100}\x{100}bXzzz
- 0: X
+/A\x0{2,3}Z/
+ The A\x0\x0Z
+ 0: A\x00\x00Z
+ An A\0\x0\0Z
+ 0: A\x00\x00\x00Z
+ *** Failers
+No match
+ A\0Z
+No match
+ A\0\x0\0\x0Z
+No match
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-Matched, but too many subsidiary matches
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 3: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 4: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 5: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 6: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 7: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 8: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 9: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-10: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-11: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-12: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-13: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-14: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-15: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-16: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-17: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-18: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-19: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-20: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-21: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\D/8
- 1X2
- 0: X
- 1\x{100}2
- 0: \x{100}
-
-/>\S/8
- > >X Y
- 0: >X
- > >\x{100} Y
- 0: >\x{100}
-
-/\d/8
- \x{100}3
- 0: 3
-
-/\s/8
- \x{100} X
+/^\s/
+ \040abc
0:
+ \x0cabc
+ 0: \x0c
+ \nabc
+ 0: \x0a
+ \rabc
+ 0: \x0d
+ \tabc
+ 0: \x09
+ *** Failers
+No match
+ abc
+No match
+
+/^a b
+ c/x
+ abc
+ 0: abc
+
+/ab{1,3}bc/
+ abbbbc
+ 0: abbbbc
+ abbbc
+ 0: abbbc
+ abbc
+ 0: abbc
+ *** Failers
+No match
+ abc
+No match
+ abbbbbc
+No match
+
+/([^.]*)\.([^:]*):[T ]+(.*)/
+ track1.title:TBlah blah blah
+ 0: track1.title:TBlah blah blah
+ 1: track1.title:TBlah blah bla
+ 2: track1.title:TBlah blah bl
+ 3: track1.title:TBlah blah b
+ 4: track1.title:TBlah blah
+ 5: track1.title:TBlah blah
+ 6: track1.title:TBlah bla
+ 7: track1.title:TBlah bl
+ 8: track1.title:TBlah b
+ 9: track1.title:TBlah
+10: track1.title:TBlah
+11: track1.title:TBla
+12: track1.title:TBl
+13: track1.title:TB
+14: track1.title:T
+
+/([^.]*)\.([^:]*):[T ]+(.*)/i
+ track1.title:TBlah blah blah
+ 0: track1.title:TBlah blah blah
+ 1: track1.title:TBlah blah bla
+ 2: track1.title:TBlah blah bl
+ 3: track1.title:TBlah blah b
+ 4: track1.title:TBlah blah
+ 5: track1.title:TBlah blah
+ 6: track1.title:TBlah bla
+ 7: track1.title:TBlah bl
+ 8: track1.title:TBlah b
+ 9: track1.title:TBlah
+10: track1.title:TBlah
+11: track1.title:TBla
+12: track1.title:TBl
+13: track1.title:TB
+14: track1.title:T
+
+/([^.]*)\.([^:]*):[t ]+(.*)/i
+ track1.title:TBlah blah blah
+ 0: track1.title:TBlah blah blah
+ 1: track1.title:TBlah blah bla
+ 2: track1.title:TBlah blah bl
+ 3: track1.title:TBlah blah b
+ 4: track1.title:TBlah blah
+ 5: track1.title:TBlah blah
+ 6: track1.title:TBlah bla
+ 7: track1.title:TBlah bl
+ 8: track1.title:TBlah b
+ 9: track1.title:TBlah
+10: track1.title:TBlah
+11: track1.title:TBla
+12: track1.title:TBl
+13: track1.title:TB
+14: track1.title:T
+
+/^[W-c]+$/
+ WXY_^abc
+ 0: WXY_^abc
+ *** Failers
+No match
+ wxy
+No match
+
+/^[W-c]+$/i
+ WXY_^abc
+ 0: WXY_^abc
+ wxy_^ABC
+ 0: wxy_^ABC
+
+/^[\x3f-\x5F]+$/i
+ WXY_^abc
+ 0: WXY_^abc
+ wxy_^ABC
+ 0: wxy_^ABC
+
+/^abc$/m
+ abc
+ 0: abc
+ qqq\nabc
+ 0: abc
+ abc\nzzz
+ 0: abc
+ qqq\nabc\nzzz
+ 0: abc
+
+/^abc$/
+ abc
+ 0: abc
+ *** Failers
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
+
+/\Aabc\Z/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ *** Failers
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
-/\D+/8
- 12abcd34
- 0: abcd
- 1: abc
- 2: ab
- 3: a
+/\A(.)*\Z/s
+ abc\ndef
+ 0: abc\x0adef
+
+/\A(.)*\Z/m
+ *** Failers
+ 0: *** Failers
+ abc\ndef
+No match
+
+/(?:b)|(?::+)/
+ b::c
+ 0: b
+ c::b
+ 0: ::
+ 1: :
+
+/[-az]+/
+ az-
+ 0: az-
+ 1: az
+ 2: a
+ *** Failers
+ 0: a
+ b
+No match
+
+/[az-]+/
+ za-
+ 0: za-
+ 1: za
+ 2: z
+ *** Failers
+ 0: a
+ b
+No match
+
+/[a\-z]+/
+ a-z
+ 0: a-z
+ 1: a-
+ 2: a
+ *** Failers
+ 0: a
+ b
+No match
+
+/[a-z]+/
+ abcdxyz
+ 0: abcdxyz
+ 1: abcdxy
+ 2: abcdx
+ 3: abcd
+ 4: abc
+ 5: ab
+ 6: a
+
+/[\d-]+/
+ 12-34
+ 0: 12-34
+ 1: 12-3
+ 2: 12-
+ 3: 12
+ 4: 1
+ *** Failers
+No match
+ aaa
+No match
+
+/[\d-z]+/
+ 12-34z
+ 0: 12-34z
+ 1: 12-34
+ 2: 12-3
+ 3: 12-
+ 4: 12
+ 5: 1
+ *** Failers
+No match
+ aaa
+No match
+
+/\x5c/
+ \\
+ 0: \
+
+/\x20Z/
+ the Zoo
+ 0: Z
+ *** Failers
+No match
+ Zulu
+No match
+
+/ab{3cd/
+ ab{3cd
+ 0: ab{3cd
+
+/ab{3,cd/
+ ab{3,cd
+ 0: ab{3,cd
+
+/ab{3,4a}cd/
+ ab{3,4a}cd
+ 0: ab{3,4a}cd
+
+/{4,5a}bc/
+ {4,5a}bc
+ 0: {4,5a}bc
+
+/^a.b/<lf>
+ a\rb
+ 0: a\x0db
+ *** Failers
+No match
+ a\nb
+No match
+
+/abc$/
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ *** Failers
+No match
+ abc\ndef
+No match
+
+/(abc)\123/
+ abc\x53
+ 0: abcS
+
+/(abc)\223/
+ abc\x93
+ 0: abc\x93
+
+/(abc)\323/
+ abc\xd3
+ 0: abc\xd3
+
+/(abc)\100/
+ abc\x40
+ 0: abc@
+ abc\100
+ 0: abc@
+
+/(abc)\1000/
+ abc\x400
+ 0: abc@0
+ abc\x40\x30
+ 0: abc@0
+ abc\1000
+ 0: abc@0
+ abc\100\x30
+ 0: abc@0
+ abc\100\060
+ 0: abc@0
+ abc\100\60
+ 0: abc@0
+
+/abc\81/
+ abc\081
+ 0: abc\x0081
+ abc\0\x38\x31
+ 0: abc\x0081
+
+/abc\91/
+ abc\091
+ 0: abc\x0091
+ abc\0\x39\x31
+ 0: abc\x0091
+
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
+ abcdefghijk\12S
+ 0: abcdefghijk\x0aS
+
+/ab\idef/
+ abidef
+ 0: abidef
+
+/a{0}bc/
+ bc
+ 0: bc
+
+/(a|(bc)){0,0}?xyz/
+ xyz
+ 0: xyz
+
+/abc[\10]de/
+ abc\010de
+ 0: abc\x08de
+
+/abc[\1]de/
+ abc\1de
+ 0: abc\x01de
+
+/(abc)[\1]de/
+ abc\1de
+ 0: abc\x01de
+
+/(?s)a.b/
+ a\nb
+ 0: a\x0ab
+
+/^([^a])([^\b])([^c]*)([^d]{3,4})/
+ baNOTccccd
+ 0: baNOTcccc
+ 1: baNOTccc
+ 2: baNOTcc
+ 3: baNOTc
+ 4: baNOT
+ baNOTcccd
+ 0: baNOTccc
+ 1: baNOTcc
+ 2: baNOTc
+ 3: baNOT
+ baNOTccd
+ 0: baNOTcc
+ 1: baNOTc
+ 2: baNOT
+ bacccd
+ 0: baccc
*** Failers
0: *** Failers
1: *** Failer
@@ -534,506 +3097,3717 @@ Matched, but too many subsidiary matches
4: *** Fai
5: *** Fa
6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- 1234
+ anything
+No match
+ b\bc
+No match
+ baccd
No match
-/\D{2,3}/8
- 12abcd34
+/[^a]/
+ Abc
+ 0: A
+
+/[^a]/i
+ Abc
+ 0: b
+
+/[^a]+/
+ AAAaAbc
+ 0: AAA
+ 1: AA
+ 2: A
+
+/[^a]+/i
+ AAAaAbc
+ 0: bc
+ 1: b
+
+/[^a]+/
+ bbb\nccc
+ 0: bbb\x0accc
+ 1: bbb\x0acc
+ 2: bbb\x0ac
+ 3: bbb\x0a
+ 4: bbb
+ 5: bb
+ 6: b
+
+/[^k]$/
+ abc
+ 0: c
+ *** Failers
+ 0: s
+ abk
+No match
+
+/[^k]{2,3}$/
+ abc
0: abc
- 1: ab
- 12ab34
+ kbc
+ 0: bc
+ kabc
+ 0: abc
+ *** Failers
+ 0: ers
+ abk
+No match
+ akb
+No match
+ akk
+No match
+
+/^\d{8,}\@.+[^k]$/
+ 12345678\@a.b.c.d
+ 0: 12345678@a.b.c.d
+ 123456789\@x.y.z
+ 0: 123456789@x.y.z
+ *** Failers
+No match
+ 12345678\@x.y.uk
+No match
+ 1234567\@a.b.c.d
+No match
+
+/[^a]/
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: A
+
+/[^a]/i
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: b
+
+/[^az]/
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: A
+
+/[^az]/i
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: b
+
+/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
+ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
+ 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
+
+/P[^*]TAIRE[^*]{1,6}?LL/
+ xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
+ 0: PSTAIREISLL
+
+/P[^*]TAIRE[^*]{1,}?LL/
+ xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
+ 0: PSTAIREISLL
+
+/(\.\d\d[1-9]?)\d+/
+ 1.230003938
+ 0: .230003938
+ 1: .23000393
+ 2: .2300039
+ 3: .230003
+ 4: .23000
+ 5: .2300
+ 6: .230
+ 1.875000282
+ 0: .875000282
+ 1: .87500028
+ 2: .8750002
+ 3: .875000
+ 4: .87500
+ 5: .8750
+ 6: .875
+ 1.235
+ 0: .235
+
+/(\.\d\d((?=0)|\d(?=\d)))/
+ 1.230003938
+ 0: .230
+ 1: .23
+ 1.875000282
+ 0: .875
+ *** Failers
+No match
+ 1.235
+No match
+
+/a(?)b/
+ ab
0: ab
- *** Failers
- 0: ***
- 1: **
- 1234
+
+/\b(foo)\s+(\w+)/i
+ Food is on the foo table
+ 0: foo table
+ 1: foo tabl
+ 2: foo tab
+ 3: foo ta
+ 4: foo t
+
+/foo(.*)bar/
+ The food is under the bar in the barn.
+ 0: food is under the bar in the bar
+ 1: food is under the bar
+
+/foo(.*?)bar/
+ The food is under the bar in the barn.
+ 0: food is under the bar in the bar
+ 1: food is under the bar
+
+/(.*)(\d*)/
+ I have 2 numbers: 53147
+Matched, but too many subsidiary matches
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2 numbers:
+ 6: I have 2 numbers:
+ 7: I have 2 numbers
+ 8: I have 2 number
+ 9: I have 2 numbe
+10: I have 2 numb
+11: I have 2 num
+12: I have 2 nu
+13: I have 2 n
+14: I have 2
+15: I have 2
+16: I have
+17: I have
+18: I hav
+19: I ha
+20: I h
+21: I
+
+/(.*)(\d+)/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2
+
+/(.*?)(\d*)/
+ I have 2 numbers: 53147
+Matched, but too many subsidiary matches
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2 numbers:
+ 6: I have 2 numbers:
+ 7: I have 2 numbers
+ 8: I have 2 number
+ 9: I have 2 numbe
+10: I have 2 numb
+11: I have 2 num
+12: I have 2 nu
+13: I have 2 n
+14: I have 2
+15: I have 2
+16: I have
+17: I have
+18: I hav
+19: I ha
+20: I h
+21: I
+
+/(.*?)(\d+)/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2
+
+/(.*)(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/(.*?)(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/(.*)\b(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/(.*\D)(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/^\D*(?!123)/
+ ABC123
+ 0: AB
+ 1: A
+ 2:
+
+/^(\D*)(?=\d)(?!123)/
+ ABC445
+ 0: ABC
+ *** Failers
+No match
+ ABC123
+No match
+
+/^[W-]46]/
+ W46]789
+ 0: W46]
+ -46]789
+ 0: -46]
+ *** Failers
+No match
+ Wall
+No match
+ Zebra
+No match
+ 42
+No match
+ [abcd]
+No match
+ ]abcd[
+No match
+
+/^[W-\]46]/
+ W46]789
+ 0: W
+ Wall
+ 0: W
+ Zebra
+ 0: Z
+ Xylophone
+ 0: X
+ 42
+ 0: 4
+ [abcd]
+ 0: [
+ ]abcd[
+ 0: ]
+ \\backslash
+ 0: \
+ *** Failers
+No match
+ -46]789
+No match
+ well
+No match
+
+/\d\d\/\d\d\/\d\d\d\d/
+ 01/01/2000
+ 0: 01/01/2000
+
+/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
+No match
+
+/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+No match
+
+/^(a){0,0}/
+ bcd
+ 0:
+ abc
+ 0:
+ aab
+ 0:
+
+/^(a){0,1}/
+ bcd
+ 0:
+ abc
+ 0: a
+ 1:
+ aab
+ 0: a
+ 1:
+
+/^(a){0,2}/
+ bcd
+ 0:
+ abc
+ 0: a
+ 1:
+ aab
+ 0: aa
+ 1: a
+ 2:
+
+/^(a){0,3}/
+ bcd
+ 0:
+ abc
+ 0: a
+ 1:
+ aab
+ 0: aa
+ 1: a
+ 2:
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+ 3:
+
+/^(a){0,}/
+ bcd
+ 0:
+ abc
+ 0: a
+ 1:
+ aab
+ 0: aa
+ 1: a
+ 2:
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+ 3:
+ aaaaaaaa
+ 0: aaaaaaaa
+ 1: aaaaaaa
+ 2: aaaaaa
+ 3: aaaaa
+ 4: aaaa
+ 5: aaa
+ 6: aa
+ 7: a
+ 8:
+
+/^(a){1,1}/
+ bcd
+No match
+ abc
+ 0: a
+ aab
+ 0: a
+
+/^(a){1,2}/
+ bcd
No match
- 12a34
+ abc
+ 0: a
+ aab
+ 0: aa
+ 1: a
+
+/^(a){1,3}/
+ bcd
+No match
+ abc
+ 0: a
+ aab
+ 0: aa
+ 1: a
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+
+/^(a){1,}/
+ bcd
No match
+ abc
+ 0: a
+ aab
+ 0: aa
+ 1: a
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+ aaaaaaaa
+ 0: aaaaaaaa
+ 1: aaaaaaa
+ 2: aaaaaa
+ 3: aaaaa
+ 4: aaaa
+ 5: aaa
+ 6: aa
+ 7: a
+
+/.*\.gif/
+ borfle\nbib.gif\nno
+ 0: bib.gif
+
+/.{0,}\.gif/
+ borfle\nbib.gif\nno
+ 0: bib.gif
+
+/.*\.gif/m
+ borfle\nbib.gif\nno
+ 0: bib.gif
+
+/.*\.gif/s
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif
+
+/.*\.gif/ms
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif
+
+/.*$/
+ borfle\nbib.gif\nno
+ 0: no
+
+/.*$/m
+ borfle\nbib.gif\nno
+ 0: borfle
+
+/.*$/s
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif\x0ano
+
+/.*$/ms
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif\x0ano
+ 1: borfle\x0abib.gif
+ 2: borfle
+
+/.*$/
+ borfle\nbib.gif\nno\n
+ 0: no
+
+/.*$/m
+ borfle\nbib.gif\nno\n
+ 0: borfle
+
+/.*$/s
+ borfle\nbib.gif\nno\n
+ 0: borfle\x0abib.gif\x0ano\x0a
+ 1: borfle\x0abib.gif\x0ano
-/\D{2,3}?/8
- 12abcd34
+/.*$/ms
+ borfle\nbib.gif\nno\n
+ 0: borfle\x0abib.gif\x0ano\x0a
+ 1: borfle\x0abib.gif\x0ano
+ 2: borfle\x0abib.gif
+ 3: borfle
+
+/(.*X|^B)/
+ abcde\n1234Xyz
+ 0: 1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/(.*X|^B)/m
+ abcde\n1234Xyz
+ 0: 1234X
+ BarFoo
+ 0: B
+ abcde\nBar
+ 0: B
+
+/(.*X|^B)/s
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/(.*X|^B)/ms
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ abcde\nBar
+ 0: B
+
+/(?s)(.*X|^B)/
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/(?s:.*X|^B)/
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/^.*B/
+ **** Failers
+No match
+ abc\nB
+No match
+
+/(?s)^.*B/
+ abc\nB
+ 0: abc\x0aB
+
+/(?m)^.*B/
+ abc\nB
+ 0: B
+
+/(?ms)^.*B/
+ abc\nB
+ 0: abc\x0aB
+
+/(?ms)^B/
+ abc\nB
+ 0: B
+
+/(?s)B$/
+ B\n
+ 0: B
+
+/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
+ 123456654321
+ 0: 123456654321
+
+/^\d\d\d\d\d\d\d\d\d\d\d\d/
+ 123456654321
+ 0: 123456654321
+
+/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
+ 123456654321
+ 0: 123456654321
+
+/^[abc]{12}/
+ abcabcabcabc
+ 0: abcabcabcabc
+
+/^[a-c]{12}/
+ abcabcabcabc
+ 0: abcabcabcabc
+
+/^(a|b|c){12}/
+ abcabcabcabc
+ 0: abcabcabcabc
+
+/^[abcdefghijklmnopqrstuvwxy0123456789]/
+ n
+ 0: n
+ *** Failers
+No match
+ z
+No match
+
+/abcde{0,0}/
+ abcd
+ 0: abcd
+ *** Failers
+No match
+ abce
+No match
+
+/ab[cd]{0,0}e/
+ abe
+ 0: abe
+ *** Failers
+No match
+ abcde
+No match
+
+/ab(c){0,0}d/
+ abd
+ 0: abd
+ *** Failers
+No match
+ abcd
+No match
+
+/a(b*)/
+ a
+ 0: a
+ ab
+ 0: ab
+ 1: a
+ abbbb
+ 0: abbbb
+ 1: abbb
+ 2: abb
+ 3: ab
+ 4: a
+ *** Failers
+ 0: a
+ bbbbb
+No match
+
+/ab\d{0}e/
+ abe
+ 0: abe
+ *** Failers
+No match
+ ab1e
+No match
+
+/"([^\\"]+|\\.)*"/
+ the \"quick\" brown fox
+ 0: "quick"
+ \"the \\\"quick\\\" brown fox\"
+ 0: "the \"quick\" brown fox"
+
+/.*?/g+
+ abc
0: abc
+ 0+
1: ab
- 12ab34
+ 2: a
+ 3:
+ 0:
+ 0+
+
+/\b/g+
+ abc
+ 0:
+ 0+ abc
+ 0:
+ 0+
+
+/\b/+g
+ abc
+ 0:
+ 0+ abc
+ 0:
+ 0+
+
+//g
+ abc
+ 0:
+ 0:
+ 0:
+ 0:
+
+/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
+ <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
+ 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
+
+/a[^a]b/
+ acb
+ 0: acb
+ a\nb
+ 0: a\x0ab
+
+/a.b/
+ acb
+ 0: acb
+ *** Failers
+No match
+ a\nb
+No match
+
+/a[^a]b/s
+ acb
+ 0: acb
+ a\nb
+ 0: a\x0ab
+
+/a.b/s
+ acb
+ 0: acb
+ a\nb
+ 0: a\x0ab
+
+/^(b+?|a){1,2}?c/
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ bbbac
+ 0: bbbac
+ bbbbac
+ 0: bbbbac
+ bbbbbac
+ 0: bbbbbac
+
+/^(b+|a){1,2}?c/
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ bbbac
+ 0: bbbac
+ bbbbac
+ 0: bbbbac
+ bbbbbac
+ 0: bbbbbac
+
+/(?!\A)x/m
+ x\nb\n
+No match
+ a\bx\n
+ 0: x
+
+/\x0{ab}/
+ \0{ab}
+ 0: \x00{ab}
+
+/(A|B)*?CD/
+ CD
+ 0: CD
+
+/(A|B)*CD/
+ CD
+ 0: CD
+
+/(?<!bar)foo/
+ foo
+ 0: foo
+ catfood
+ 0: foo
+ arfootle
+ 0: foo
+ rfoosh
+ 0: foo
+ *** Failers
+No match
+ barfoo
+No match
+ towbarfoo
+No match
+
+/\w{3}(?<!bar)foo/
+ catfood
+ 0: catfoo
+ *** Failers
+No match
+ foo
+No match
+ barfoo
+No match
+ towbarfoo
+No match
+
+/(?<=(foo)a)bar/
+ fooabar
+ 0: bar
+ *** Failers
+No match
+ bar
+No match
+ foobbar
+No match
+
+/\Aabc\z/m
+ abc
+ 0: abc
+ *** Failers
+No match
+ abc\n
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
+No match
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+ 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+
+/(?>(\.\d\d[1-9]?))\d+/
+ 1.230003938
+ 0: .230003938
+ 1: .23000393
+ 2: .2300039
+ 3: .230003
+ 4: .23000
+ 5: .2300
+ 6: .230
+ 1.875000282
+ 0: .875000282
+ 1: .87500028
+ 2: .8750002
+ 3: .875000
+ 4: .87500
+ 5: .8750
+ *** Failers
+No match
+ 1.235
+No match
+
+/^((?>\w+)|(?>\s+))*$/
+ now is the time for all good men to come to the aid of the party
+ 0: now is the time for all good men to come to the aid of the party
+ *** Failers
+No match
+ this is not a line with only words and spaces!
+No match
+
+/(\d+)(\w)/
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: 1234
+ 3: 123
+ 4: 12
+ 12345+
+ 0: 12345
+ 1: 1234
+ 2: 123
+ 3: 12
+
+/((?>\d+))(\w)/
+ 12345a
+ 0: 12345a
+ *** Failers
+No match
+ 12345+
+No match
+
+/(?>a+)b/
+ aaab
+ 0: aaab
+
+/((?>a+)b)/
+ aaab
+ 0: aaab
+
+/(?>(a+))b/
+ aaab
+ 0: aaab
+
+/(?>b)+/
+ aaabbbccc
+ 0: bbb
+ 1: bb
+ 2: b
+
+/(?>a+|b+|c+)*c/
+ aaabbbbccccd
+ 0: aaabbbbcccc
+ 1: aaabbbbc
+
+/(a+|b+|c+)*c/
+ aaabbbbccccd
+ 0: aaabbbbcccc
+ 1: aaabbbbccc
+ 2: aaabbbbcc
+ 3: aaabbbbc
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: abc(ade)ufh()()
+ 2: abc(ade)ufh()
+ 3: abc(ade)ufh
+ 4: abc(ade)
+ 5: abc
+
+/\(((?>[^()]+)|\([^()]+\))+\)/
+ (abc)
+ 0: (abc)
+ (abc(def)xyz)
+ 0: (abc(def)xyz)
+ *** Failers
+No match
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/a(?-i)b/i
+ ab
0: ab
- *** Failers
- 0: ***
- 1: **
- 1234
+ Ab
+ 0: Ab
+ *** Failers
No match
- 12a34
+ aB
+No match
+ AB
+No match
+
+/(a (?x)b c)d e/
+ a bcd e
+ 0: a bcd e
+ *** Failers
+No match
+ a b cd e
+No match
+ abcd e
+No match
+ a bcde
+No match
+
+/(a b(?x)c d (?-x)e f)/
+ a bcde f
+ 0: a bcde f
+ *** Failers
+No match
+ abcdef
No match
-/\d+/8
- 12abcd34
- 0: 12
- 1: 1
+/(a(?i)b)c/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ abC
+No match
+ aBC
+No match
+ Abc
+No match
+ ABc
+No match
+ ABC
+No match
+ AbC
+No match
+
+/a(?i:b)c/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ ABC
+No match
+ abC
+No match
+ aBC
+No match
+
+/a(?i:b)*c/
+ aBc
+ 0: aBc
+ aBBc
+ 0: aBBc
+ *** Failers
+No match
+ aBC
+No match
+ aBBC
+No match
+
+/a(?=b(?i)c)\w\wd/
+ abcd
+ 0: abcd
+ abCd
+ 0: abCd
+ *** Failers
+No match
+ aBCd
+No match
+ abcD
+No match
+
+/(?s-i:more.*than).*million/i
+ more than million
+ 0: more than million
+ more than MILLION
+ 0: more than MILLION
+ more \n than Million
+ 0: more \x0a than Million
*** Failers
No match
+ MORE THAN MILLION
+No match
+ more \n than \n million
+No match
-/\d{2,3}/8
- 12abcd34
+/(?:(?s-i)more.*than).*million/i
+ more than million
+ 0: more than million
+ more than MILLION
+ 0: more than MILLION
+ more \n than Million
+ 0: more \x0a than Million
+ *** Failers
+No match
+ MORE THAN MILLION
+No match
+ more \n than \n million
+No match
+
+/(?>a(?i)b+)+c/
+ abc
+ 0: abc
+ aBbc
+ 0: aBbc
+ aBBc
+ 0: aBBc
+ *** Failers
+No match
+ Abc
+No match
+ abAb
+No match
+ abbC
+No match
+
+/(?=a(?i)b)\w\wc/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ Ab
+No match
+ abC
+No match
+ aBC
+No match
+
+/(?<=a(?i)b)(\w\w)c/
+ abxxc
+ 0: xxc
+ aBxxc
+ 0: xxc
+ *** Failers
+No match
+ Abxxc
+No match
+ ABxxc
+No match
+ abxxC
+No match
+
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 0: abc:
+ 12
0: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
+ *** Failers
No match
- 1.4
+ 123
+No match
+ xyz
No match
-/\d{2,3}?/8
- 12abcd34
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 0: abc:
+ 12
0: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
-No match
- 1.4
-No match
-
-/\S+/8
- 12abcd34
- 0: 12abcd34
- 1: 12abcd3
- 2: 12abcd
- 3: 12abc
- 4: 12ab
- 5: 12a
- 6: 12
- 7: 1
- *** Failers
- 0: ***
- 1: **
- 2: *
- \ \
-No match
-
-/\S{2,3}/8
- 12abcd34
- 0: 12a
- 1: 12
- 1234abcd
- 0: 123
- 1: 12
*** Failers
- 0: ***
- 1: **
- \ \
+No match
+ 123
+No match
+ xyz
+No match
+
+/(?(?<=foo)bar|cat)/
+ foobar
+ 0: bar
+ cat
+ 0: cat
+ fcat
+ 0: cat
+ focat
+ 0: cat
+ *** Failers
+No match
+ foocat
No match
-/\S{2,3}?/8
- 12abcd34
- 0: 12a
- 1: 12
- 1234abcd
- 0: 123
- 1: 12
+/(?(?<!foo)cat|bar)/
+ foobar
+ 0: bar
+ cat
+ 0: cat
+ fcat
+ 0: cat
+ focat
+ 0: cat
*** Failers
- 0: ***
- 1: **
- \ \
No match
+ foocat
+No match
+
+/(?>a*)*/
+ a
+ 0: a
+ 1:
+ aa
+ 0: aa
+ 1:
+ aaaa
+ 0: aaaa
+ 1:
+
+/(abc|)+/
+ abc
+ 0: abc
+ 1:
+ abcabc
+ 0: abcabc
+ 1: abc
+ 2:
+ abcabcabc
+ 0: abcabcabc
+ 1: abcabc
+ 2: abc
+ 3:
+ xyz
+ 0:
-/>\s+</8
- 12> <34
- 0: > <
+/([a]*)*/
+ a
+ 0: a
+ 1:
+ aaaaa
+ 0: aaaaa
+ 1: aaaa
+ 2: aaa
+ 3: aa
+ 4: a
+ 5:
+
+/([ab]*)*/
+ a
+ 0: a
+ 1:
+ b
+ 0: b
+ 1:
+ ababab
+ 0: ababab
+ 1: ababa
+ 2: abab
+ 3: aba
+ 4: ab
+ 5: a
+ 6:
+ aaaabcde
+ 0: aaaab
+ 1: aaaa
+ 2: aaa
+ 3: aa
+ 4: a
+ 5:
+ bbbb
+ 0: bbbb
+ 1: bbb
+ 2: bb
+ 3: b
+ 4:
+
+/([^a]*)*/
+ b
+ 0: b
+ 1:
+ bbbb
+ 0: bbbb
+ 1: bbb
+ 2: bb
+ 3: b
+ 4:
+ aaa
+ 0:
+
+/([^ab]*)*/
+ cccc
+ 0: cccc
+ 1: ccc
+ 2: cc
+ 3: c
+ 4:
+ abab
+ 0:
+
+/([a]*?)*/
+ a
+ 0: a
+ 1:
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ 4:
+
+/([ab]*?)*/
+ a
+ 0: a
+ 1:
+ b
+ 0: b
+ 1:
+ abab
+ 0: abab
+ 1: aba
+ 2: ab
+ 3: a
+ 4:
+ baba
+ 0: baba
+ 1: bab
+ 2: ba
+ 3: b
+ 4:
+
+/([^a]*?)*/
+ b
+ 0: b
+ 1:
+ bbbb
+ 0: bbbb
+ 1: bbb
+ 2: bb
+ 3: b
+ 4:
+ aaa
+ 0:
+
+/([^ab]*?)*/
+ c
+ 0: c
+ 1:
+ cccc
+ 0: cccc
+ 1: ccc
+ 2: cc
+ 3: c
+ 4:
+ baba
+ 0:
+
+/(?>a*)*/
+ a
+ 0: a
+ 1:
+ aaabcde
+ 0: aaa
+ 1:
+
+/((?>a*))*/
+ aaaaa
+ 0: aaaaa
+ 1:
+ aabbaa
+ 0: aa
+ 1:
+
+/((?>a*?))*/
+ aaaaa
+ 0: aaaaa
+ 1:
+ aabbaa
+ 0: aa
+ 1:
+
+/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
+ 12-sep-98
+ 0: 12-sep-98
+ 12-09-98
+ 0: 12-09-98
+ *** Failers
+No match
+ sep-12-98
+No match
+
+/(?i:saturday|sunday)/
+ saturday
+ 0: saturday
+ sunday
+ 0: sunday
+ Saturday
+ 0: Saturday
+ Sunday
+ 0: Sunday
+ SATURDAY
+ 0: SATURDAY
+ SUNDAY
+ 0: SUNDAY
+ SunDay
+ 0: SunDay
+
+/(a(?i)bc|BB)x/
+ abcx
+ 0: abcx
+ aBCx
+ 0: aBCx
+ bbx
+ 0: bbx
+ BBx
+ 0: BBx
*** Failers
No match
+ abcX
+No match
+ aBCX
+No match
+ bbX
+No match
+ BBX
+No match
-/>\s{2,3}</8
- ab> <cd
- 0: > <
- ab> <ce
- 0: > <
+/^([ab](?i)[cd]|[ef])/
+ ac
+ 0: ac
+ aC
+ 0: aC
+ bD
+ 0: bD
+ elephant
+ 0: e
+ Europe
+ 0: E
+ frog
+ 0: f
+ France
+ 0: F
*** Failers
No match
- ab> <cd
+ Africa
No match
-/>\s{2,3}?</8
- ab> <cd
- 0: > <
- ab> <ce
- 0: > <
+/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
+ ab
+ 0: ab
+ aBd
+ 0: aBd
+ xy
+ 0: xy
+ xY
+ 0: xY
+ zebra
+ 0: z
+ Zambesi
+ 0: Z
*** Failers
No match
- ab> <cd
+ aCD
+No match
+ XY
No match
-/\w+/8
- 12 34
- 0: 12
- 1: 1
+/(?<=foo\n)^bar/m
+ foo\nbar
+ 0: bar
*** Failers
- 0: Failers
- 1: Failer
- 2: Faile
- 3: Fail
- 4: Fai
- 5: Fa
- 6: F
- +++=*!
+No match
+ bar
+No match
+ baz\nbar
+No match
+
+/(?<=(?<!foo)bar)baz/
+ barbaz
+ 0: baz
+ barbarbaz
+ 0: baz
+ koobarbaz
+ 0: baz
+ *** Failers
+No match
+ baz
+No match
+ foobarbaz
+No match
+
+/The following tests are taken from the Perl 5.005 test suite; some of them/
+/are compatible with 5.004, but I'd rather not have to sort them out./
+No match
+
+/abc/
+ abc
+ 0: abc
+ xabcy
+ 0: abc
+ ababc
+ 0: abc
+ *** Failers
+No match
+ xbc
+No match
+ axc
+No match
+ abx
+No match
+
+/ab*c/
+ abc
+ 0: abc
+
+/ab*bc/
+ abc
+ 0: abc
+ abbc
+ 0: abbc
+ abbbbc
+ 0: abbbbc
+
+/.{1}/
+ abbbbc
+ 0: a
+
+/.{3,4}/
+ abbbbc
+ 0: abbb
+ 1: abb
+
+/ab{0,}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab+bc/
+ abbc
+ 0: abbc
+ *** Failers
+No match
+ abc
+No match
+ abq
+No match
+
+/ab+bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{1,}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{1,3}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{3,4}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{4,5}bc/
+ *** Failers
+No match
+ abq
+No match
+ abbbbc
+No match
+
+/ab?bc/
+ abbc
+ 0: abbc
+ abc
+ 0: abc
+
+/ab{0,1}bc/
+ abc
+ 0: abc
+
+/ab?bc/
+
+/ab?c/
+ abc
+ 0: abc
+
+/ab{0,1}c/
+ abc
+ 0: abc
+
+/^abc$/
+ abc
+ 0: abc
+ *** Failers
+No match
+ abbbbc
+No match
+ abcc
No match
-/\w{2,3}/8
- ab cd
+/^abc/
+ abcc
+ 0: abc
+
+/^abc$/
+
+/abc$/
+ aabc
+ 0: abc
+ *** Failers
+No match
+ aabc
+ 0: abc
+ aabcd
+No match
+
+/^/
+ abc
+ 0:
+
+/$/
+ abc
+ 0:
+
+/a.c/
+ abc
+ 0: abc
+ axc
+ 0: axc
+
+/a.*c/
+ axyzc
+ 0: axyzc
+
+/a[bc]d/
+ abd
+ 0: abd
+ *** Failers
+No match
+ axyzd
+No match
+ abc
+No match
+
+/a[b-d]e/
+ ace
+ 0: ace
+
+/a[b-d]/
+ aac
+ 0: ac
+
+/a[-b]/
+ a-
+ 0: a-
+
+/a[b-]/
+ a-
+ 0: a-
+
+/a]/
+ a]
+ 0: a]
+
+/a[]]b/
+ a]b
+ 0: a]b
+
+/a[^bc]d/
+ aed
+ 0: aed
+ *** Failers
+No match
+ abd
+No match
+ abd
+No match
+
+/a[^-b]c/
+ adc
+ 0: adc
+
+/a[^]b]c/
+ adc
+ 0: adc
+ *** Failers
+No match
+ a-c
+ 0: a-c
+ a]c
+No match
+
+/\ba\b/
+ a-
+ 0: a
+ -a
+ 0: a
+ -a-
+ 0: a
+
+/\by\b/
+ *** Failers
+No match
+ xy
+No match
+ yz
+No match
+ xyz
+No match
+
+/\Ba\B/
+ *** Failers
+ 0: a
+ a-
+No match
+ -a
+No match
+ -a-
+No match
+
+/\By\b/
+ xy
+ 0: y
+
+/\by\B/
+ yz
+ 0: y
+
+/\By\B/
+ xyz
+ 0: y
+
+/\w/
+ a
+ 0: a
+
+/\W/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ a
+No match
+
+/a\sb/
+ a b
+ 0: a b
+
+/a\Sb/
+ a-b
+ 0: a-b
+ *** Failers
+No match
+ a-b
+ 0: a-b
+ a b
+No match
+
+/\d/
+ 1
+ 0: 1
+
+/\D/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ 1
+No match
+
+/[\w]/
+ a
+ 0: a
+
+/[\W]/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ a
+No match
+
+/a[\s]b/
+ a b
+ 0: a b
+
+/a[\S]b/
+ a-b
+ 0: a-b
+ *** Failers
+No match
+ a-b
+ 0: a-b
+ a b
+No match
+
+/[\d]/
+ 1
+ 0: 1
+
+/[\D]/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ 1
+No match
+
+/ab|cd/
+ abc
+ 0: ab
+ abcd
0: ab
- abcd ce
+
+/()ef/
+ def
+ 0: ef
+
+/$b/
+
+/a\(b/
+ a(b
+ 0: a(b
+
+/a\(*b/
+ ab
+ 0: ab
+ a((b
+ 0: a((b
+
+/a\\b/
+ a\b
+No match
+
+/((a))/
+ abc
+ 0: a
+
+/(a)b(c)/
+ abc
0: abc
- 1: ab
+
+/a+b+c/
+ aabbabc
+ 0: abc
+
+/a{1,}b{1,}c/
+ aabbabc
+ 0: abc
+
+/a.+?c/
+ abcabc
+ 0: abcabc
+ 1: abc
+
+/(a+|b)*/
+ ab
+ 0: ab
+ 1: a
+ 2:
+
+/(a+|b){0,}/
+ ab
+ 0: ab
+ 1: a
+ 2:
+
+/(a+|b)+/
+ ab
+ 0: ab
+ 1: a
+
+/(a+|b){1,}/
+ ab
+ 0: ab
+ 1: a
+
+/(a+|b)?/
+ ab
+ 0: a
+ 1:
+
+/(a+|b){0,1}/
+ ab
+ 0: a
+ 1:
+
+/[^ab]*/
+ cde
+ 0: cde
+ 1: cd
+ 2: c
+ 3:
+
+/abc/
*** Failers
- 0: Fai
- 1: Fa
- a.b.c
No match
+ b
+No match
+
+
+/a*/
+
+
+/([abc])*d/
+ abbbcd
+ 0: abbbcd
+
+/([abc])*bcd/
+ abcd
+ 0: abcd
+
+/a|b|c|d|e/
+ e
+ 0: e
+
+/(a|b|c|d|e)f/
+ ef
+ 0: ef
-/\w{2,3}?/8
- ab cd
+/abcd*efg/
+ abcdefg
+ 0: abcdefg
+
+/ab*/
+ xabyabbbz
0: ab
- abcd ce
+ 1: a
+ xayabbbz
+ 0: a
+
+/(ab|cd)e/
+ abcde
+ 0: cde
+
+/[abhgefdc]ij/
+ hij
+ 0: hij
+
+/^(ab|cd)e/
+
+/(abc|)ef/
+ abcdef
+ 0: ef
+
+/(a|b)c*d/
+ abcd
+ 0: bcd
+
+/(ab|ab*)bc/
+ abc
+ 0: abc
+
+/a([bc]*)c*/
+ abc
0: abc
1: ab
+ 2: a
+
+/a([bc]*)(c*d)/
+ abcd
+ 0: abcd
+
+/a([bc]+)(c*d)/
+ abcd
+ 0: abcd
+
+/a([bc]*)(c+d)/
+ abcd
+ 0: abcd
+
+/a[bcd]*dcdcde/
+ adcdcde
+ 0: adcdcde
+
+/a[bcd]+dcdcde/
*** Failers
- 0: Fai
- 1: Fa
- a.b.c
+No match
+ abcde
+No match
+ adcdcde
No match
-/\W+/8
- 12====34
- 0: ====
- 1: ===
- 2: ==
- 3: =
+/(ab|a)b*c/
+ abc
+ 0: abc
+
+/((a)(b)c)(d)/
+ abcd
+ 0: abcd
+
+/[a-zA-Z_][a-zA-Z0-9_]*/
+ alpha
+ 0: alpha
+ 1: alph
+ 2: alp
+ 3: al
+ 4: a
+
+/^a(bc+|b[eh])g|.h$/
+ abh
+ 0: bh
+
+/(bc+d$|ef*g.|h?i(j|k))/
+ effgz
+ 0: effgz
+ ij
+ 0: ij
+ reffgz
+ 0: effgz
*** Failers
- 0: ***
- 1: ***
- 2: **
- 3: *
- abcd
+No match
+ effg
+No match
+ bcdd
No match
-/\W{2,3}/8
- ab====cd
- 0: ===
- 1: ==
- ab==cd
- 0: ==
+/((((((((((a))))))))))/
+ a
+ 0: a
+
+/(((((((((a)))))))))/
+ a
+ 0: a
+
+/multiple words of text/
*** Failers
- 0: ***
- 1: **
- a.b.c
No match
+ aa
+No match
+ uh-uh
+No match
+
+/multiple words/
+ multiple words, yeah
+ 0: multiple words
+
+/(.*)c(.*)/
+ abcde
+ 0: abcde
+ 1: abcd
+ 2: abc
+
+/\((.*), (.*)\)/
+ (a, b)
+ 0: (a, b)
-/\W{2,3}?/8
- ab====cd
- 0: ===
- 1: ==
- ab==cd
- 0: ==
+/[k]/
+
+/abcd/
+ abcd
+ 0: abcd
+
+/a(bc)d/
+ abcd
+ 0: abcd
+
+/a[-]?c/
+ ac
+ 0: ac
+
+/abc/i
+ ABC
+ 0: ABC
+ XABCY
+ 0: ABC
+ ABABC
+ 0: ABC
*** Failers
- 0: ***
- 1: **
- a.b.c
+No match
+ aaxabxbaxbbx
+No match
+ XBC
+No match
+ AXC
+No match
+ ABX
No match
-/[\x{100}]/8
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
+/ab*c/i
+ ABC
+ 0: ABC
+
+/ab*bc/i
+ ABC
+ 0: ABC
+ ABBC
+ 0: ABBC
+
+/ab*?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{0,}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab+?bc/i
+ ABBC
+ 0: ABBC
+
+/ab+bc/i
+ *** Failers
+No match
+ ABC
+No match
+ ABQ
No match
-/[Z\x{100}]/8
- Z\x{100}
- 0: Z
- \x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
+/ab{1,}bc/i
+
+/ab+bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{1,}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{1,3}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{3,4}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{4,5}?bc/i
+ *** Failers
+No match
+ ABQ
+No match
+ ABBBBC
No match
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- *** Failers
-No match
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- *** Failers
-No match
-
-/[z-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- Q?
- 0: Q
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
+/ab??bc/i
+ ABBC
+ 0: ABBC
+ ABC
+ 0: ABC
+
+/ab{0,1}?bc/i
+ ABC
+ 0: ABC
+
+/ab??bc/i
+
+/ab??c/i
+ ABC
+ 0: ABC
+
+/ab{0,1}?c/i
+ ABC
+ 0: ABC
+
+/^abc$/i
+ ABC
+ 0: ABC
*** Failers
No match
- X
+ ABBBBC
+No match
+ ABCC
No match
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
- abQX
- 0: X
+/^abc/i
+ ABCC
+ 0: ABC
+
+/^abc$/i
+
+/abc$/i
+ AABC
+ 0: ABC
+
+/^/i
+ ABC
+ 0:
+
+/$/i
+ ABC
+ 0:
+
+/a.c/i
+ ABC
+ 0: ABC
+ AXC
+ 0: AXC
+
+/a.*?c/i
+ AXYZC
+ 0: AXYZC
+
+/a.*c/i
*** Failers
No match
- X
+ AABC
+ 0: AABC
+ AXYZD
No match
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- 0: X
+/a[bc]d/i
+ ABD
+ 0: ABD
+
+/a[b-d]e/i
+ ACE
+ 0: ACE
*** Failers
No match
- abc\x{200}X
+ ABC
No match
- X
+ ABD
No match
-/[^\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
+/a[b-d]/i
+ AAC
+ 0: AC
+
+/a[-b]/i
+ A-
+ 0: A-
+
+/a[b-]/i
+ A-
+ 0: A-
+
+/a]/i
+ A]
+ 0: A]
+
+/a[]]b/i
+ A]B
+ 0: A]B
+
+/a[^bc]d/i
+ AED
+ 0: AED
+
+/a[^-b]c/i
+ ADC
+ 0: ADC
*** Failers
No match
- \x{100}X
+ ABD
No match
- \x{200}X
+ A-C
No match
-/[^Q\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
+/a[^]b]c/i
+ ADC
+ 0: ADC
+
+/ab|cd/i
+ ABC
+ 0: AB
+ ABCD
+ 0: AB
+
+/()ef/i
+ DEF
+ 0: EF
+
+/$b/i
*** Failers
No match
- \x{100}X
+ A]C
No match
- \x{200}X
+ B
No match
- QX
+
+/a\(b/i
+ A(B
+ 0: A(B
+
+/a\(*b/i
+ AB
+ 0: AB
+ A((B
+ 0: A((B
+
+/a\\b/i
+ A\B
No match
-/[^\x{100}-\x{200}]X/8
- AX
- 0: AX
- \x{500}X
- 0: \x{500}X
+/((a))/i
+ ABC
+ 0: A
+
+/(a)b(c)/i
+ ABC
+ 0: ABC
+
+/a+b+c/i
+ AABBABC
+ 0: ABC
+
+/a{1,}b{1,}c/i
+ AABBABC
+ 0: ABC
+
+/a.+?c/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/a.*?c/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/a.{0,5}?c/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/(a+|b)*/i
+ AB
+ 0: AB
+ 1: A
+ 2:
+
+/(a+|b){0,}/i
+ AB
+ 0: AB
+ 1: A
+ 2:
+
+/(a+|b)+/i
+ AB
+ 0: AB
+ 1: A
+
+/(a+|b){1,}/i
+ AB
+ 0: AB
+ 1: A
+
+/(a+|b)?/i
+ AB
+ 0: A
+ 1:
+
+/(a+|b){0,1}/i
+ AB
+ 0: A
+ 1:
+
+/(a+|b){0,1}?/i
+ AB
+ 0: A
+ 1:
+
+/[^ab]*/i
+ CDE
+ 0: CDE
+ 1: CD
+ 2: C
+ 3:
+
+/abc/i
+
+/a*/i
+
+
+/([abc])*d/i
+ ABBBCD
+ 0: ABBBCD
+
+/([abc])*bcd/i
+ ABCD
+ 0: ABCD
+
+/a|b|c|d|e/i
+ E
+ 0: E
+
+/(a|b|c|d|e)f/i
+ EF
+ 0: EF
+
+/abcd*efg/i
+ ABCDEFG
+ 0: ABCDEFG
+
+/ab*/i
+ XABYABBBZ
+ 0: AB
+ 1: A
+ XAYABBBZ
+ 0: A
+
+/(ab|cd)e/i
+ ABCDE
+ 0: CDE
+
+/[abhgefdc]ij/i
+ HIJ
+ 0: HIJ
+
+/^(ab|cd)e/i
+ ABCDE
+No match
+
+/(abc|)ef/i
+ ABCDEF
+ 0: EF
+
+/(a|b)c*d/i
+ ABCD
+ 0: BCD
+
+/(ab|ab*)bc/i
+ ABC
+ 0: ABC
+
+/a([bc]*)c*/i
+ ABC
+ 0: ABC
+ 1: AB
+ 2: A
+
+/a([bc]*)(c*d)/i
+ ABCD
+ 0: ABCD
+
+/a([bc]+)(c*d)/i
+ ABCD
+ 0: ABCD
+
+/a([bc]*)(c+d)/i
+ ABCD
+ 0: ABCD
+
+/a[bcd]*dcdcde/i
+ ADCDCDE
+ 0: ADCDCDE
+
+/a[bcd]+dcdcde/i
+
+/(ab|a)b*c/i
+ ABC
+ 0: ABC
+
+/((a)(b)c)(d)/i
+ ABCD
+ 0: ABCD
+
+/[a-zA-Z_][a-zA-Z0-9_]*/i
+ ALPHA
+ 0: ALPHA
+ 1: ALPH
+ 2: ALP
+ 3: AL
+ 4: A
+
+/^a(bc+|b[eh])g|.h$/i
+ ABH
+ 0: BH
+
+/(bc+d$|ef*g.|h?i(j|k))/i
+ EFFGZ
+ 0: EFFGZ
+ IJ
+ 0: IJ
+ REFFGZ
+ 0: EFFGZ
*** Failers
No match
- \x{100}X
+ ADCDCDE
No match
- \x{150}X
+ EFFG
No match
- \x{200}X
+ BCDD
No match
-/[z-\x{100}]/8i
- z
- 0: z
- Z
- 0: Z
- \x{100}
- 0: \x{100}
+/((((((((((a))))))))))/i
+ A
+ 0: A
+
+/(((((((((a)))))))))/i
+ A
+ 0: A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
+ A
+ 0: A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
+ C
+ 0: C
+
+/multiple words of text/i
*** Failers
No match
- \x{102}
+ AA
No match
- y
+ UH-UH
No match
-/[\xFF]/
- >\xff<
- 0: \xff
+/multiple words/i
+ MULTIPLE WORDS, YEAH
+ 0: MULTIPLE WORDS
-/[\xff]/8
- >\x{ff}<
- 0: \x{ff}
+/(.*)c(.*)/i
+ ABCDE
+ 0: ABCDE
+ 1: ABCD
+ 2: ABC
-/[^\xFF]/
- XYZ
- 0: X
+/\((.*), (.*)\)/i
+ (A, B)
+ 0: (A, B)
-/[^\xff]/8
- XYZ
- 0: X
- \x{123}
- 0: \x{123}
+/[k]/i
+
+/abcd/i
+ ABCD
+ 0: ABCD
+
+/a(bc)d/i
+ ABCD
+ 0: ABCD
+
+/a[-]?c/i
+ AC
+ 0: AC
+
+/a(?!b)./
+ abad
+ 0: ad
+
+/a(?=d)./
+ abad
+ 0: ad
+
+/a(?=c|d)./
+ abad
+ 0: ad
+
+/a(?:b|c|d)(.)/
+ ace
+ 0: ace
+
+/a(?:b|c|d)*(.)/
+ ace
+ 0: ace
+ 1: ac
+
+/a(?:b|c|d)+?(.)/
+ ace
+ 0: ace
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+ 2: acdbcd
+ 3: acdbc
+ 4: acdb
+ 5: acd
+
+/a(?:b|c|d)+(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+ 2: acdbcd
+ 3: acdbc
+ 4: acdb
+ 5: acd
+
+/a(?:b|c|d){2}(.)/
+ acdbcdbe
+ 0: acdb
+
+/a(?:b|c|d){4,5}(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: acdbcd
+
+/a(?:b|c|d){4,5}?(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: acdbcd
+
+/((foo)|(bar))*/
+ foobar
+ 0: foobar
+ 1: foo
+ 2:
+
+/a(?:b|c|d){6,7}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+
+/a(?:b|c|d){6,7}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+
+/a(?:b|c|d){5,6}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|c|d){5,6}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|c|d){5,7}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|c|d){5,7}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|(c|e){1,2}?|d)+?(.)/
+ ace
+ 0: ace
+
+/^(.+)?B/
+ AB
+ 0: AB
+
+/^([^a-z])|(\^)$/
+ .
+ 0: .
+
+/^[<>]&/
+ <&OUT
+ 0: <&
+
+/(?:(f)(o)(o)|(b)(a)(r))*/
+ foobar
+ 0: foobar
+ 1: foo
+ 2:
+
+/(?<=a)b/
+ ab
+ 0: b
+ *** Failers
+No match
+ cb
+No match
+ b
+No match
+
+/(?<!c)b/
+ ab
+ 0: b
+ b
+ 0: b
+ b
+ 0: b
+
+/(?:..)*a/
+ aba
+ 0: aba
+ 1: a
+
+/(?:..)*?a/
+ aba
+ 0: aba
+ 1: a
+
+/^(){3,5}/
+ abc
+ 0:
+
+/^(a+)*ax/
+ aax
+ 0: aax
+
+/^((a|b)+)*ax/
+ aax
+ 0: aax
+
+/^((a|bc)+)*ax/
+ aax
+ 0: aax
+
+/(a|x)*ab/
+ cab
+ 0: ab
+
+/(a)*ab/
+ cab
+ 0: ab
+
+/(?:(?i)a)b/
+ ab
+ 0: ab
+
+/((?i)a)b/
+ ab
+ 0: ab
+
+/(?:(?i)a)b/
+ Ab
+ 0: Ab
+
+/((?i)a)b/
+ Ab
+ 0: Ab
+
+/(?:(?i)a)b/
+ *** Failers
+No match
+ cb
+No match
+ aB
+No match
+
+/((?i)a)b/
+
+/(?i:a)b/
+ ab
+ 0: ab
+
+/((?i:a))b/
+ ab
+ 0: ab
+
+/(?i:a)b/
+ Ab
+ 0: Ab
+
+/((?i:a))b/
+ Ab
+ 0: Ab
+
+/(?i:a)b/
+ *** Failers
+No match
+ aB
+No match
+ aB
+No match
+
+/((?i:a))b/
+
+/(?:(?-i)a)b/i
+ ab
+ 0: ab
+
+/((?-i)a)b/i
+ ab
+ 0: ab
+
+/(?:(?-i)a)b/i
+ aB
+ 0: aB
+
+/((?-i)a)b/i
+ aB
+ 0: aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+No match
+ aB
+ 0: aB
+ Ab
+No match
+
+/((?-i)a)b/i
+
+/(?:(?-i)a)b/i
+ aB
+ 0: aB
+
+/((?-i)a)b/i
+ aB
+ 0: aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+No match
+ Ab
+No match
+ AB
+No match
+
+/((?-i)a)b/i
+
+/(?-i:a)b/i
+ ab
+ 0: ab
+
+/((?-i:a))b/i
+ ab
+ 0: ab
+
+/(?-i:a)b/i
+ aB
+ 0: aB
+
+/((?-i:a))b/i
+ aB
+ 0: aB
+
+/(?-i:a)b/i
+ *** Failers
+No match
+ AB
+No match
+ Ab
+No match
+
+/((?-i:a))b/i
+
+/(?-i:a)b/i
+ aB
+ 0: aB
+
+/((?-i:a))b/i
+ aB
+ 0: aB
+
+/(?-i:a)b/i
+ *** Failers
+No match
+ Ab
+No match
+ AB
+No match
+
+/((?-i:a))b/i
+
+/((?-i:a.))b/i
+ *** Failers
+No match
+ AB
+No match
+ a\nB
+No match
+
+/((?s-i:a.))b/i
+ a\nB
+ 0: a\x0aB
+
+/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
+ cabbbb
+ 0: cabbbb
+
+/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
+ caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+ 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+
+/foo\w*\d{4}baz/
+ foobar1234baz
+ 0: foobar1234baz
+
+/x(~~)*(?:(?:F)?)?/
+ x~~
+ 0: x~~
+ 1: x
+
+/^a(?#xxx){3}c/
+ aaac
+ 0: aaac
+
+/^a (?#xxx) (?#yyy) {3}c/x
+ aaac
+ 0: aaac
+
+/(?<![cd])b/
+ *** Failers
+No match
+ B\nB
+No match
+ dbcb
+No match
+
+/(?<![cd])[ab]/
+ dbaacb
+ 0: a
+
+/(?<!(c|d))b/
+
+/(?<!(c|d))[ab]/
+ dbaacb
+ 0: a
+
+/(?<!cd)[ab]/
+ cdaccb
+ 0: b
+
+/^(?:a?b?)*$/
+ *** Failers
+No match
+ dbcb
+No match
+ a--
+No match
+
+/((?s)^a(.))((?m)^b$)/
+ a\nb\nc\n
+ 0: a\x0ab
+
+/((?m)^b$)/
+ a\nb\nc\n
+ 0: b
+
+/(?m)^b/
+ a\nb\n
+ 0: b
+
+/(?m)^(b)/
+ a\nb\n
+ 0: b
+
+/((?m)^b)/
+ a\nb\n
+ 0: b
+
+/\n((?m)^b)/
+ a\nb\n
+ 0: \x0ab
+
+/((?s).)c(?!.)/
+ a\nb\nc\n
+ 0: \x0ac
+ a\nb\nc\n
+ 0: \x0ac
+
+/((?s)b.)c(?!.)/
+ a\nb\nc\n
+ 0: b\x0ac
+ a\nb\nc\n
+ 0: b\x0ac
+
+/^b/
+
+/()^b/
+ *** Failers
+No match
+ a\nb\nc\n
+No match
+ a\nb\nc\n
+No match
+
+/((?m)^b)/
+ a\nb\nc\n
+ 0: b
+
+/(?(?!a)a|b)/
+
+/(?(?!a)b|a)/
+ a
+ 0: a
+
+/(?(?=a)b|a)/
+ *** Failers
+No match
+ a
+No match
+ a
+No match
+
+/(?(?=a)a|b)/
+ a
+ 0: a
+
+/(\w+:)+/
+ one:
+ 0: one:
+
+/$(?<=^(a))/
+ a
+ 0:
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ 0: abcd
+ xy:z:::abcd
+ 0: xy:z:::abcd
+
+/^[^bcd]*(c+)/
+ aexycd
+ 0: aexyc
-/^[ac]*b/8
- xb
+/(a*)b+/
+ caab
+ 0: aab
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ 0: abcd
+ xy:z:::abcd
+ 0: xy:z:::abcd
+ *** Failers
+ 0: Failers
+ abcd:
No match
+ abcd:
+No match
+
+/^[^bcd]*(c+)/
+ aexycd
+ 0: aexyc
+
+/(>a+)ab/
+
+/(?>a+)b/
+ aaab
+ 0: aaab
-/^[ac\x{100}]*b/8
- xb
+/([[:]+)/
+ a:[b]:
+ 0: :[
+ 1: :
+
+/([[=]+)/
+ a=[b]=
+ 0: =[
+ 1: =
+
+/([[.]+)/
+ a.[b].
+ 0: .[
+ 1: .
+
+/((?>a+)b)/
+ aaab
+ 0: aaab
+
+/(?>(a+))b/
+ aaab
+ 0: aaab
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: abc(ade)ufh()()
+ 2: abc(ade)ufh()
+ 3: abc(ade)ufh
+ 4: abc(ade)
+ 5: abc
+
+/a\Z/
+ *** Failers
+No match
+ aaab
+No match
+ a\nb\n
No match
-/^[^x]*b/8i
- xb
+/b\Z/
+ a\nb\n
+ 0: b
+
+/b\z/
+
+/b\Z/
+ a\nb
+ 0: b
+
+/b\z/
+ a\nb
+ 0: b
+ *** Failers
+No match
+
+/(?>.*)(?<=(abcd|wxyz))/
+ alphabetabcd
+ 0: alphabetabcd
+ endingwxyz
+ 0: endingwxyz
+ *** Failers
+No match
+ a rather long string that doesn't end with one of them
No match
-/^[^x]*b/8
- xb
+/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
No match
-/^\d*b/8
- xb
+/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+No match
+
+/(?<=\d{3}(?!999))foo/
+ 999foo
+ 0: foo
+ 123999foo
+ 0: foo
+ *** Failers
+No match
+ 123abcfoo
+No match
+
+/(?<=(?!...999)\d{3})foo/
+ 999foo
+ 0: foo
+ 123999foo
+ 0: foo
+ *** Failers
+No match
+ 123abcfoo
+No match
+
+/(?<=\d{3}(?!999)...)foo/
+ 123abcfoo
+ 0: foo
+ 123456foo
+ 0: foo
+ *** Failers
+No match
+ 123999foo
+No match
+
+/(?<=\d{3}...)(?<!999)foo/
+ 123abcfoo
+ 0: foo
+ 123456foo
+ 0: foo
+ *** Failers
+No match
+ 123999foo
No match
-/(|a)/g8
- catac
+/((Z)+|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/(Z()|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/(Z(())|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/((?>Z)+|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/((?>)+|A)*/
+ ZABCDEFG
0:
+
+/a*/g
+ abbab
0: a
1:
0:
+ 0:
0: a
1:
0:
0:
- a\x{256}a
+
+/^[a-\d]/
+ abcde
0: a
- 1:
- 0:
+ -things
+ 0: -
+ 0digit
+ 0: 0
+ *** Failers
+No match
+ bcdef
+No match
+
+/^[\d-a]/
+ abcde
0: a
- 1:
+ -things
+ 0: -
+ 0digit
+ 0: 0
+ *** Failers
+No match
+ bcdef
+No match
+
+/[[:space:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d\x0b
+ 1: \x09\x0a\x0c\x0d
+ 2: \x09\x0a\x0c
+ 3: \x09\x0a
+ 4: \x09
+ 5:
+
+/[[:blank:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09
+ 1:
+
+/[\s]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d
+ 1: \x09\x0a\x0c
+ 2: \x09\x0a
+ 3: \x09
+ 4:
+
+/\s+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d
+ 1: \x09\x0a\x0c
+ 2: \x09\x0a
+ 3: \x09
+ 4:
+
+/a b/x
+ ab
+No match
+
+/(?!\A)x/m
+ a\nxb\n
+ 0: x
+
+/(?!^)x/m
+ a\nxb\n
+No match
+
+/abc\Qabc\Eabc/
+ abcabcabc
+ 0: abcabcabc
+
+/abc\Q(*+|\Eabc/
+ abc(*+|abc
+ 0: abc(*+|abc
+
+/ abc\Q abc\Eabc/x
+ abc abcabc
+ 0: abc abcabc
+ *** Failers
+No match
+ abcabcabc
+No match
+
+/abc#comment
+ \Q#not comment
+ literal\E/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment
+ /x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/\Qabc\$xyz\E/
+ abc\\\$xyz
+ 0: abc\$xyz
+
+/\Qabc\E\$\Qxyz\E/
+ abc\$xyz
+ 0: abc$xyz
+
+/\Gabc/
+ abc
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+
+/\Gabc./g
+ abc1abc2xyzabc3
+ 0: abc1
+ 0: abc2
+
+/abc./g
+ abc1abc2xyzabc3
+ 0: abc1
+ 0: abc2
+ 0: abc3
+
+/a(?x: b c )d/
+ XabcdY
+ 0: abcd
+ *** Failers
+No match
+ Xa b c d Y
+No match
+
+/((?x)x y z | a b c)/
+ XabcY
+ 0: abc
+ AxyzB
+ 0: xyz
+
+/(?i)AB(?-i)C/
+ XabCY
+ 0: abC
+ *** Failers
+No match
+ XabcY
+No match
+
+/((?i)AB(?-i)C|D)E/
+ abCE
+ 0: abCE
+ DE
+ 0: DE
+ *** Failers
+No match
+ abcE
+No match
+ abCe
+No match
+ dE
+No match
+ De
+No match
+
+/[z\Qa-d]\E]/
+ z
+ 0: z
+ a
+ 0: a
+ -
+ 0: -
+ d
+ 0: d
+ ]
+ 0: ]
+ *** Failers
+ 0: a
+ b
+No match
+
+/[\z\C]/
+ z
+ 0: z
+ C
+ 0: C
+
+/\M/
+ M
+ 0: M
+
+/(a+)*b/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/(?i)reg(?:ul(?:[a]|ae)r|ex)/
+ REGular
+ 0: REGular
+ regulaer
+ 0: regulaer
+ Regex
+ 0: Regex
+ regulr
+ 0: regul\xe4r
+
+/[--]+/
+
+ 0: \xc5\xe6\xe5\xe4\xe0
+
+ 0: \xc5\xe6\xe5\xe4\xff
+
+ 0: \xc5\xe6\xe5\xe4\xc0
+
+ 0: \xc5\xe6\xe5\xe4\xdf
+
+/(?<=Z)X./
+ \x84XAZXB
+ 0: XB
+
+/^(?(2)a|(1)(2))+$/
+ 123a
+Error -17 (backreference condition or recursion test not supported for DFA matching)
+
+/(?<=a|bbbb)c/
+ ac
+ 0: c
+ bbbbc
+ 0: c
+
+/abc/SS>testsavedregex
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
+No study data
+ abc
+ 0: abc
+ *** Failers
+No match
+ bca
+No match
+
+/abc/FSS>testsavedregex
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+No study data
+ abc
+ 0: abc
+ *** Failers
+No match
+ bca
+No match
+
+/(a|b)/S>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: a
+ *** Failers
+ 0: a
+ def
+No match
+
+/(a|b)/SF>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: a
+ *** Failers
+ 0: a
+ def
+No match
+
+/line\nbreak/
+ this is a line\nbreak
+ 0: line\x0abreak
+ line one\nthis is a line\nbreak in the second line
+ 0: line\x0abreak
+
+/line\nbreak/f
+ this is a line\nbreak
+ 0: line\x0abreak
+ ** Failers
+No match
+ line one\nthis is a line\nbreak in the second line
+No match
+
+/line\nbreak/mf
+ this is a line\nbreak
+ 0: line\x0abreak
+ ** Failers
+No match
+ line one\nthis is a line\nbreak in the second line
+No match
+
+/1234/
+ 123\P
+Partial match: 123
+ a4\P\R
+No match
+
+/1234/
+ 123\P
+Partial match: 123
+ 4\P\R
+ 0: 4
+
+/^/mg
+ a\nb\nc\n
+ 0:
+ 0:
0:
+ \
+ 0:
+
+/(?<=C\n)^/mg
+ A\nC\nC\n
+ 0:
+
+/(?s)A?B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/(?s)A*B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/(?m)A?B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/(?m)A*B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/Content-Type\x3A[^\r\n]{6,}/
+ Content-Type:xxxxxyyy
+ 0: Content-Type:xxxxxyyy
+ 1: Content-Type:xxxxxyy
+ 2: Content-Type:xxxxxy
+
+/Content-Type\x3A[^\r\n]{6,}z/
+ Content-Type:xxxxxyyyz
+ 0: Content-Type:xxxxxyyyz
+
+/Content-Type\x3A[^a]{6,}/
+ Content-Type:xxxyyy
+ 0: Content-Type:xxxyyy
+
+/Content-Type\x3A[^a]{6,}z/
+ Content-Type:xxxyyyz
+ 0: Content-Type:xxxyyyz
+
+/^abc/m
+ xyz\nabc
+ 0: abc
+ xyz\nabc\<lf>
+ 0: abc
+ xyz\r\nabc\<lf>
+ 0: abc
+ xyz\rabc\<cr>
+ 0: abc
+ xyz\r\nabc\<crlf>
+ 0: abc
+ ** Failers
+No match
+ xyz\nabc\<cr>
+No match
+ xyz\r\nabc\<cr>
+No match
+ xyz\nabc\<crlf>
+No match
+ xyz\rabc\<crlf>
+No match
+ xyz\rabc\<lf>
+No match
+
+/abc$/m<lf>
+ xyzabc
+ 0: abc
+ xyzabc\n
+ 0: abc
+ xyzabc\npqr
+ 0: abc
+ xyzabc\r\<cr>
+ 0: abc
+ xyzabc\rpqr\<cr>
+ 0: abc
+ xyzabc\r\n\<crlf>
+ 0: abc
+ xyzabc\r\npqr\<crlf>
+ 0: abc
+ ** Failers
+No match
+ xyzabc\r
+No match
+ xyzabc\rpqr
+No match
+ xyzabc\r\n
+No match
+ xyzabc\r\npqr
+No match
+
+/^abc/m<cr>
+ xyz\rabcdef
+ 0: abc
+ xyz\nabcdef\<lf>
+ 0: abc
+ ** Failers
+No match
+ xyz\nabcdef
+No match
+
+/^abc/m<lf>
+ xyz\nabcdef
+ 0: abc
+ xyz\rabcdef\<cr>
+ 0: abc
+ ** Failers
+No match
+ xyz\rabcdef
+No match
+
+/^abc/m<crlf>
+ xyz\r\nabcdef
+ 0: abc
+ xyz\rabcdef\<cr>
+ 0: abc
+ ** Failers
+No match
+ xyz\rabcdef
+No match
+
+/.*/<lf>
+ abc\ndef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+ abc\rdef
+ 0: abc\x0ddef
+ 1: abc\x0dde
+ 2: abc\x0dd
+ 3: abc\x0d
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ abc\r\ndef
+ 0: abc\x0d
+ 1: abc
+ 2: ab
+ 3: a
+ 4:
+ \<cr>abc\ndef
+ 0: abc\x0adef
+ 1: abc\x0ade
+ 2: abc\x0ad
+ 3: abc\x0a
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ \<cr>abc\rdef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+ \<cr>abc\r\ndef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+ \<crlf>abc\ndef
+ 0: abc\x0adef
+ 1: abc\x0ade
+ 2: abc\x0ad
+ 3: abc\x0a
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ \<crlf>abc\rdef
+ 0: abc\x0ddef
+ 1: abc\x0dde
+ 2: abc\x0dd
+ 3: abc\x0d
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ \<crlf>abc\r\ndef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
-/^\x{85}$/8i
- \x{85}
- 0: \x{85}
+/\w+(.)(.)?def/s
+ abc\ndef
+ 0: abc\x0adef
+ abc\rdef
+ 0: abc\x0ddef
+ abc\r\ndef
+ 0: abc\x0d\x0adef
+
+/^\w+=.*(\\\n.*)*/
+ abc=xyz\\\npqr
+ 0: abc=xyz\\x0apqr
+ 1: abc=xyz\\x0apq
+ 2: abc=xyz\\x0ap
+ 3: abc=xyz\\x0a
+ 4: abc=xyz\
+ 5: abc=xyz
+ 6: abc=xy
+ 7: abc=x
+ 8: abc=
+
+/^(a()*)*/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ 4:
+
+/^(?:a(?:(?:))*)*/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ 4:
+
+/^(a()+)+/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+/^(?:a(?:(?:))+)+/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
+/(a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/(?>a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/(?:a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/^a.b/<lf>
+ a\rb
+ 0: a\x0db
+ a\nb\<cr>
+ 0: a\x0ab
+ ** Failers
+No match
+ a\nb
+No match
+ a\nb\<any>
+No match
+ a\rb\<cr>
+No match
+ a\rb\<any>
+No match
+
+/^abc./mgx<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
0: abc1
0: abc2
0: abc3
@@ -1041,100 +6815,92 @@ No match
0: abc5
0: abc6
0: abc7
- 0: abc8
- 0: abc9
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+/abc.$/mgx<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
0: abc1
0: abc2
0: abc3
0: abc4
0: abc5
0: abc6
- 0: abc7
- 0: abc8
0: abc9
-/^a\Rb/8<bsr_unicode>
+/^a\Rb/<bsr_unicode>
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
a\x0bb
- 0: a\x{0b}b
+ 0: a\x0bb
a\x0cb
- 0: a\x{0c}b
- a\x{85}b
- 0: a\x{85}b
- a\x{2028}b
- 0: a\x{2028}b
- a\x{2029}b
- 0: a\x{2029}b
+ 0: a\x0cb
+ a\x85b
+ 0: a\x85b
** Failers
No match
a\n\rb
No match
-/^a\R*b/8<bsr_unicode>
+/^a\R*b/<bsr_unicode>
ab
0: ab
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0bb
+ a\x0cb
+ 0: a\x0cb
+ a\x85b
+ 0: a\x85b
a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+ 0: a\x0a\x0db
+ a\n\r\x85\x0cb
+ 0: a\x0a\x0d\x85\x0cb
-/^a\R+b/8<bsr_unicode>
+/^a\R+b/<bsr_unicode>
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0bb
+ a\x0cb
+ 0: a\x0cb
+ a\x85b
+ 0: a\x85b
a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+ 0: a\x0a\x0db
+ a\n\r\x85\x0cb
+ 0: a\x0a\x0d\x85\x0cb
** Failers
No match
ab
No match
-
-/^a\R{1,3}b/8<bsr_unicode>
+
+/^a\R{1,3}b/<bsr_unicode>
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}b
- 0: a\x{0a}\x{0d}\x{85}b
+ 0: a\x0a\x0db
+ a\n\r\x85b
+ 0: a\x0a\x0d\x85b
a\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
+ 0: a\x0d\x0a\x0d\x0ab
a\r\n\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
+ 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
a\n\r\n\rb
- 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
+ 0: a\x0a\x0d\x0a\x0db
a\n\n\r\nb
- 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
+ 0: a\x0a\x0a\x0d\x0ab
** Failers
No match
a\n\n\n\rb
@@ -1142,164 +6908,645 @@ No match
a\r
No match
-/\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
+/^a[\R]b/<bsr_unicode>
+ aRb
+ 0: aRb
+ ** Failers
+No match
+ a\nb
+No match
-/\V?\v{3,4}/8
- \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: X\x{0a}\x{0b}\x{0c}
+/.+foo/
+ afoo
+ 0: afoo
+ ** Failers
+No match
+ \r\nfoo
+No match
+ \nfoo
+No match
-/\h+\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
- 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a}
+/.+foo/<crlf>
+ afoo
+ 0: afoo
+ \nfoo
+ 0: \x0afoo
+ ** Failers
+No match
+ \r\nfoo
+No match
-/\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
- 0: X\x{0a}\x{0a}\x{0a}
+/.+foo/<any>
+ afoo
+ 0: afoo
+ ** Failers
+No match
+ \nfoo
+No match
+ \r\nfoo
+No match
+
+/.+foo/s
+ afoo
+ 0: afoo
+ \r\nfoo
+ 0: \x0d\x0afoo
+ \nfoo
+ 0: \x0afoo
+
+/^$/mg<any>
+ abc\r\rxyz
+ 0:
+ abc\n\rxyz
+ 0:
+ ** Failers
+No match
+ abc\r\nxyz
+No match
+
+/^X/m
+ XABC
+ 0: X
+ ** Failers
+No match
+ XABC\B
+No match
+
+/(?m)^$/<any>g+
+ abc\r\n\r\n
+ 0:
+ 0+ \x0d\x0a
+
+/(?m)^$|^\r\n/<any>g+
+ abc\r\n\r\n
+ 0: \x0d\x0a
+ 0+
+ 1:
+
+/(?m)$/<any>g+
+ abc\r\n\r\n
+ 0:
+ 0+ \x0d\x0a\x0d\x0a
+ 0:
+ 0+ \x0d\x0a
+ 0:
+ 0+
+
+/(?|(abc)|(xyz))/
+ >abc<
+ 0: abc
+ >xyz<
+ 0: xyz
+
+/(x)(?|(abc)|(xyz))(x)/
+ xabcx
+ 0: xabcx
+ xxyzx
+ 0: xxyzx
+
+/(x)(?|(abc)(pqr)|(xyz))(x)/
+ xabcpqrx
+ 0: xabcpqrx
+ xxyzx
+ 0: xxyzx
-/\H\h\V\v/8
+/(?|(abc)|(xyz))(?1)/
+ abcabc
+ 0: abcabc
+ xyzabc
+ 0: xyzabc
+ ** Failers
+No match
+ xyzxyz
+No match
+
+/\H\h\V\v/
X X\x0a
- 0: X X\x{0a}
+ 0: X X\x0a
X\x09X\x0b
- 0: X\x{09}X\x{0b}
+ 0: X\x09X\x0b
** Failers
No match
- \x{a0} X\x0a
+ \xa0 X\x0a
No match
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
- \x09\x20\x{a0}\x0a\x0b\x0c
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
+/\H*\h+\V?\v{3,4}/
+ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0X\x0a\x0b\x0c\x0d
+ 1: \x09 \xa0X\x0a\x0b\x0c
+ \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0\x0a\x0b\x0c\x0d
+ 1: \x09 \xa0\x0a\x0b\x0c
+ \x09\x20\xa0\x0a\x0b\x0c
+ 0: \x09 \xa0\x0a\x0b\x0c
** Failers
No match
- \x09\x20\x{a0}\x0a\x0b
+ \x09\x20\xa0\x0a\x0b
No match
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- 0: \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
- 0: X\x{180e}X\x{85}
+/\H{3,4}/
+ XY ABCDE
+ 0: ABCD
+ 1: ABC
+ XY PQR ST
+ 0: PQR
+
+/.\h{3,4}./
+ XY AB PQRS
+ 0: B P
+ 1: B
+
+/\h*X\h?\H+Y\H?Z/
+ >XNNNYZ
+ 0: XNNNYZ
+ > X NYQZ
+ 0: X NYQZ
** Failers
No match
- \x{2009} X\x0a
+ >XYZ
No match
-
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
- 1: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
- 1: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}
- \x09\x20\x{202f}\x0a\x0b\x0c
- 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
- ** Failers
+ > X NY Z
No match
- \x09\x{200a}\x{a0}\x{2028}\x0b
+
+/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
+ >XY\x0aZ\x0aA\x0bNN\x0c
+ 0: XY\x0aZ\x0aA\x0bNN\x0c
+ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+ 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+
+/.+A/<crlf>
+ \r\nA
No match
-
-/a\Rb/I8<bsr_anycrlf>
+
+/\nA/<crlf>
+ \r\nA
+ 0: \x0aA
+
+/[\r\n]A/<crlf>
+ \r\nA
+ 0: \x0aA
+
+/(\r|\n)A/<crlf>
+ \r\nA
+ 0: \x0aA
+
+/a\Rb/I<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
** Failers
No match
- a\x{85}b
+ a\x85b
No match
a\x0bb
No match
-/a\Rb/I8<bsr_unicode>
+/a\Rb/I<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
a\x0bb
- 0: a\x{0b}b
+ 0: a\x0bb
** Failers
No match
- a\x{85}b\<bsr_anycrlf>
+ a\x85b\<bsr_anycrlf>
No match
a\x0bb\<bsr_anycrlf>
No match
-/a\R?b/I8<bsr_anycrlf>
+/a\R?b/I<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
** Failers
No match
- a\x{85}b
+ a\x85b
No match
a\x0bb
No match
-/a\R?b/I8<bsr_unicode>
+/a\R?b/I<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
a\x0bb
- 0: a\x{0b}b
+ 0: a\x0bb
** Failers
No match
- a\x{85}b\<bsr_anycrlf>
+ a\x85b\<bsr_anycrlf>
No match
a\x0bb\<bsr_anycrlf>
No match
-
-/X/8f<any>
- A\x{1ec5}ABCXYZ
+
+/a\R{2,4}b/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\r\n\nb
+ 0: a\x0d\x0a\x0ab
+ a\n\r\rb
+ 0: a\x0a\x0d\x0db
+ a\r\n\r\n\r\n\r\nb
+ 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
+ ** Failers
+No match
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+
+/a\R{2,4}b/I<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\r\rb
+ 0: a\x0d\x0db
+ a\n\n\nb
+ 0: a\x0a\x0a\x0ab
+ a\r\n\n\r\rb
+ 0: a\x0d\x0a\x0a\x0d\x0db
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+ ** Failers
+No match
+ a\r\r\r\r\rb
+No match
+ a\x85\85b\<bsr_anycrlf>
+No match
+ a\x0b\0bb\<bsr_anycrlf>
+No match
+
+/a(?!)|\wbc/
+ abc
+ 0: abc
+
+/a[]b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[]+b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[]*+b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]b/<JS>
+ aXb
+ 0: aXb
+ a\nb
+ 0: a\x0ab
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]+b/<JS>
+ aXb
+ 0: aXb
+ a\nX\nXb
+ 0: a\x0aX\x0aXb
+ ** Failers
+No match
+ ab
+No match
+
+/X$/E
+ X
0: X
+ ** Failers
+No match
+ X\n
+No match
+
+/X$/
+ X
+ 0: X
+ X\n
+ 0: X
+
+/xyz/C
+ xyz
+--->xyz
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ abcxyz
+--->abcxyz
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ abcxyz\Y
+--->abcxyz
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ ** Failers
+No match
+ abc
+No match
+ abc\Y
+--->abc
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+No match
+ abcxypqr
+No match
+ abcxypqr\Y
+--->abcxypqr
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+No match
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+--->abcxyz
++15 ^ x
++15 ^ x
++15 ^ x
++15 ^ x
++16 ^^ y
++17 ^ ^ z
++18 ^ ^
+ 0: xyz
+
+/(?C)ab/
+ ab
+--->ab
+ 0 ^ a
+ 0: ab
+ \C-ab
+ 0: ab
+
+/ab/C
+ ab
+--->ab
+ +0 ^ a
+ +1 ^^ b
+ +2 ^ ^
+ 0: ab
+ \C-ab
+ 0: ab
+
+/^"((?(?=[a])[^"])|b)*"$/C
+ "ab"
+--->"ab"
+ +0 ^ ^
+ +1 ^ "
+ +2 ^^ ((?(?=[a])[^"])|b)*
++21 ^^ "
+ +3 ^^ (?(?=[a])[^"])
++18 ^^ b
+ +5 ^^ (?=[a])
+ +8 ^ [a]
++11 ^^ )
++12 ^^ [^"]
++16 ^ ^ )
++17 ^ ^ |
++21 ^ ^ "
+ +3 ^ ^ (?(?=[a])[^"])
++18 ^ ^ b
+ +5 ^ ^ (?=[a])
+ +8 ^ [a]
++19 ^ ^ )
++21 ^ ^ "
+ +3 ^ ^ (?(?=[a])[^"])
++18 ^ ^ b
+ +5 ^ ^ (?=[a])
+ +8 ^ [a]
++17 ^ ^ |
++22 ^ ^ $
++23 ^ ^
+ 0: "ab"
+ \C-"ab"
+ 0: "ab"
+
+/\d+X|9+Y/
+ ++++123999\P
+Partial match: 123999
+ ++++123999Y\P
+ 0: 999Y
+
+/Z(*F)/
+ Z\P
+No match
+ ZA\P
+No match
+
+/Z(?!)/
+ Z\P
+No match
+ ZA\P
+No match
+
+/dog(sbody)?/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/dog(sbody)??/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/dog|dogsbody/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/dogsbody|dog/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/Z(*F)Q|ZXY/
+ Z\P
+Partial match: Z
+ ZA\P
+No match
+ X\P
+No match
+
+/\bthe cat\b/
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/dog(sbody)?/
+ dogs\D\P
+ 0: dog
+ body\D\R
+ 0: body
+
+/dog(sbody)?/
+ dogs\D\P\P
+Partial match: dogs
+ body\D\R
+ 0: body
+
+/abc/
+ abc\P
+ 0: abc
+ abc\P\P
+ 0: abc
+
+/abc\K123/
+ xyzabc123pqr
+Error -16 (item unsupported for DFA matching)
+
+/(?<=abc)123/
+ xyzabc123pqr
+ 0: 123
+ xyzabc12\P
+Partial match: abc12
+ xyzabc12\P\P
+Partial match: abc12
+
+/\babc\b/
+ +++abc+++
+ 0: abc
+ +++ab\P
+Partial match: +ab
+ +++ab\P\P
+Partial match: +ab
+
+/(?=C)/g+
+ ABCDECBA
+ 0:
+ 0+ CDECBA
+ 0:
+ 0+ CBA
+
+/(abc|def|xyz)/I
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+ terhjk;abcdaadsfe
+ 0: abc
+ the quick xyz brown fox
+ 0: xyz
+ \Yterhjk;abcdaadsfe
+ 0: abc
+ \Ythe quick xyz brown fox
+ 0: xyz
+ ** Failers
+No match
+ thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+ \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+
+/(abc|def|xyz)/SI
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Subject length lower bound = 3
+Starting byte set: a d x
+ terhjk;abcdaadsfe
+ 0: abc
+ the quick xyz brown fox
+ 0: xyz
+ \Yterhjk;abcdaadsfe
+ 0: abc
+ \Ythe quick xyz brown fox
+ 0: xyz
+ ** Failers
+No match
+ thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+ \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
-/abcd*/8
+/abcd*/+
xxxxabcd\P
0: abcd
+ 0+
1: abc
xxxxabcd\P\P
Partial match: abcd
+ dddxxx\R
+ 0: ddd
+ 0+ xxx
+ 1: dd
+ 2: d
+ 3:
+ xxxxabcd\P\P
+Partial match: abcd
+ xxx\R
+ 0:
+ 0+ xxx
-/abcd*/i8
+/abcd*/i
xxxxabcd\P
0: abcd
1: abc
@@ -1311,14 +7558,14 @@ Partial match: abcd
XXXXABCD\P\P
Partial match: ABCD
-/abc\d*/8
+/abc\d*/
xxxxabc1\P
0: abc1
1: abc
xxxxabc1\P\P
Partial match: abc1
-/abc[de]*/8
+/abc[de]*/
xxxxabcde\P
0: abcde
1: abcd
@@ -1326,26 +7573,447 @@ Partial match: abc1
xxxxabcde\P\P
Partial match: abcde
-/\bthe cat\b/8
- the cat\P
- 0: the cat
- the cat\P\P
-Partial match: the cat
+/(?:(?1)|B)(A(*F)|C)/
+ ABCD
+ 0: BC
+ CCD
+ 0: CC
+ ** Failers
+No match
+ CAD
+No match
-/a+/8
- a\x{123}aa\>1
- 0: aa
- 1: a
- a\x{123}aa\>2
-Error -11
- a\x{123}aa\>3
+/^(?:(?1)|B)(A(*F)|C)/
+ CCD
+ 0: CC
+ BCD
+ 0: BC
+ ** Failers
+No match
+ ABCD
+No match
+ CAD
+No match
+ BAD
+No match
+
+/^(?!a(*SKIP)b)/
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?=a(*SKIP)b|ac)/
+ ** Failers
+No match
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?=a(*THEN)b|ac)/
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?=a(*PRUNE)b)/
+ ab
+Error -16 (item unsupported for DFA matching)
+ ** Failers
+No match
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?(?!a(*SKIP)b))/
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/(?<=abc)def/
+ abc\P\P
+Partial match: abc
+
+/abc$/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc$/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ abc\P\P
+Partial match: abc
+ abc\n\P\P
+ 0: abc
+ abc\P
+ 0: abc
+ abc\n\P
+ 0: abc
+
+/abc\z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\Z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\b/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\B/
+ abc
+No match
+ abc\P
+Partial match: abc
+ abc\P\P
+Partial match: abc
+
+/.+/
+ abc\>0
+ 0: abc
+ 1: ab
+ 2: a
+ abc\>1
+ 0: bc
+ 1: b
+ abc\>2
+ 0: c
+ abc\>3
+No match
+ abc\>4
+Error -24 (bad offset value)
+ abc\>-4
+Error -24 (bad offset value)
+
+/^(?:a)++\w/
+ aaaab
+ 0: aaaab
+ ** Failers
+No match
+ aaaa
+No match
+ bbb
+No match
+
+/^(?:aa|(?:a)++\w)/
+ aaaab
+ 0: aaaab
+ 1: aa
+ aaaa
0: aa
- 1: a
- a\x{123}aa\>4
- 0: a
- a\x{123}aa\>5
+ ** Failers
+No match
+ bbb
+No match
+
+/^(?:a)*+\w/
+ aaaab
+ 0: aaaab
+ bbb
+ 0: b
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(a)++\w/
+ aaaab
+ 0: aaaab
+ ** Failers
+No match
+ aaaa
+No match
+ bbb
+No match
+
+/^(a|)++\w/
+ aaaab
+ 0: aaaab
+ ** Failers
+No match
+ aaaa
+No match
+ bbb
+No match
+
+/(?=abc){3}abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)+abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)++abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc){0}xyz/
+ xyz
+ 0: xyz
+
+/(?=abc){1}xyz/
+ ** Failers
No match
- a\x{123}aa\>6
-Error -24
+ xyz
+No match
+
+/(?=(a))?./
+ ab
+ 0: a
+ bc
+ 0: b
+
+/(?=(a))??./
+ ab
+ 0: a
+ bc
+ 0: b
+
+/^(?=(a)){0}b(?1)/
+ backgammon
+ 0: ba
+
+/^(?=(?1))?[az]([abc])d/
+ abd
+ 0: abd
+ zcdxx
+ 0: zcd
+
+/^(?!a){0}\w+/
+ aaaaa
+ 0: aaaaa
+ 1: aaaa
+ 2: aaa
+ 3: aa
+ 4: a
+
+/(?<=(abc))?xyz/
+ abcxyz
+ 0: xyz
+ pqrxyz
+ 0: xyz
+
+/((?2))((?1))/
+ abc
+Error -26 (nested recursion at the same subject position)
+
+/(?(R)a+|(?R)b)/
+ aaaabcde
+ 0: aaaab
+
+/(?(R)a+|((?R))b)/
+ aaaabcde
+ 0: aaaab
+
+/((?(R)a+|(?1)b))/
+ aaaabcde
+ 0: aaaab
+
+/((?(R2)a+|(?1)b))/
+ aaaabcde
+Error -17 (backreference condition or recursion test not supported for DFA matching)
+
+/(?(R)a*(?1)|((?R))b)/
+ aaaabcde
+Error -26 (nested recursion at the same subject position)
+
+/(a+)/
+ \O6aaaa
+Matched, but too many subsidiary matches
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ \O8aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
+/ab\Cde/
+ abXde
+ 0: abXde
+
+/(?<=ab\Cde)X/
+ abZdeX
+ 0: X
+
+/^\R/
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/^\R{2,3}x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R{2,3}?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ x
+ 0: x
+ \rx
+ 0: \x0dx
+
+/^\R+x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\n\P
+Partial match: \x0d\x0a
+ \r\n\P\P
+Partial match: \x0d\x0a
+ \rx
+ 0: \x0dx
+
+/^a$/<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^a$/m<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/<CRLF>
+ a\r\P
+ 0: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/m<CRLF>
+ a\r\P
+ 0: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/./<CRLF>
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/.{2,3}/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d\x0d
+ 1: \x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+
+/.{2,3}?/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d\x0d
+ 1: \x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+
+/-- Test simple validity check for restarts --/
+
+/abcdef/
+ abc\R
+Error -30 (invalid data in workspace for DFA restart)
+
+/<H((?(?!<H|F>)(.)|(?R))++)*F>/
+ text <H more text <H texting more hexA0-"\xA0" hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text.
+ 0: <H more text <H texting more hexA0-"\xa0" hex above 7F-"\xbc" F> text xxxxx <H text F> text F>
+
+/^(?>.{4})abc|^\w\w.xabcd/
+ xxxxabcd
+ 0: xxxxabcd
+ 1: xxxxabc
+ xx\xa0xabcd
+ 0: xx\xa0xabcd
+ 1: xx\xa0xabc
+
+/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
+ xxxxxxxxabcd
+ 0: xxxxxxxxabcd
+ 1: xxxxxxxxabc
+ xx\xa0xxxxxabcd
+ 0: xx\xa0xxxxxabcd
+ 1: xx\xa0xxxxxabc
-/-- End of testinput8 --/
+/-- End of testinput8 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput9 b/ext/pcre/pcrelib/testdata/testoutput9
index cb70f1c25..95cd618dc 100644
--- a/ext/pcre/pcrelib/testdata/testoutput9
+++ b/ext/pcre/pcrelib/testdata/testoutput9
@@ -1,2037 +1,1371 @@
-/-- This set of tests check Unicode property support with the DFA matching
- functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest
- when running it. --/
+/-- This set of tests checks UTF-8 support with the DFA matching functionality
+ of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
+ it. --/
-/\pL\P{Nd}/8
- AB
- 0: AB
- *** Failers
- 0: Fa
- A0
+/\x{100}ab/8
+ \x{100}ab
+ 0: \x{100}ab
+
+/a\x{100}*b/8
+ ab
+ 0: ab
+ a\x{100}b
+ 0: a\x{100}b
+ a\x{100}\x{100}b
+ 0: a\x{100}\x{100}b
+
+/a\x{100}+b/8
+ a\x{100}b
+ 0: a\x{100}b
+ a\x{100}\x{100}b
+ 0: a\x{100}\x{100}b
+ *** Failers
No match
- 00
+ ab
No match
-
-/\X./8
- AB
- 0: AB
- A\x{300}BC
- 0: A\x{300}B
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}B
- *** Failers
- 0: **
- \x{300}
+
+/\bX/8
+ Xoanon
+ 0: X
+ +Xoanon
+ 0: X
+ \x{300}Xoanon
+ 0: X
+ *** Failers
No match
-
-/\X\X/8
- ABC
- 0: AB
- A\x{300}B\x{300}\x{301}C
- 0: A\x{300}B\x{300}\x{301}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}B
+ YXoanon
+No match
+
+/\BX/8
+ YXoanon
+ 0: X
*** Failers
- 0: **
- \x{300}
No match
-
-/^\pL+/8
- abcd
- 0: abcd
- 1: abc
- 2: ab
- 3: a
- a
- 0: a
- *** Failers
+ Xoanon
No match
-
-/^\PL+/8
- 1234
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- =
- 0: =
- *** Failers
- 0: ***
- 1: ***
- 2: **
- 3: *
- abcd
+ +Xoanon
+No match
+ \x{300}Xoanon
No match
-/^\X+/8
- abcdA\x{300}\x{301}\x{302}
- 0: abcdA\x{300}\x{301}\x{302}
- 1: abcd
- 2: abc
- 3: ab
- 4: a
- A\x{300}\x{301}\x{302}
- 0: A\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- 1: A\x{300}\x{301}\x{302}
- a
- 0: a
+/X\b/8
+ X+oanon
+ 0: X
+ ZX\x{300}oanon
+ 0: X
+ FAX
+ 0: X
*** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- \x{300}\x{301}\x{302}
No match
-
-/\X?abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}abc
- \x{300}abc
- 0: abc
- *** Failers
+ Xoanon
No match
-
-/^\X?abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
+
+/X\B/8
+ Xoanon
+ 0: X
*** Failers
No match
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ X+oanon
No match
- \x{300}abc
+ ZX\x{300}oanon
No match
-
-/\X*abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
- \x{300}abc
- 0: abc
- *** Failers
+ FAX
No match
+
+/[^a]/8
+ abcd
+ 0: b
+ a\x{100}
+ 0: \x{100}
-/^\X*abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
+/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
+ ab99
+ 0: ab9
+ \x{123}\x{123}45
+ 0: \x{123}\x{123}4
+ \x{400}\x{401}\x{402}6
+ 0: \x{400}\x{401}\x{402}6
*** Failers
No match
- \x{300}abc
+ d99
No match
-
-/^\pL?=./8
- A=b
- 0: A=b
- =c
- 0: =c
- *** Failers
+ \x{123}\x{122}4
No match
- 1=2
+ \x{400}\x{403}6
No match
- AAAA=b
+ \x{400}\x{401}\x{402}\x{402}6
No match
-/^\pL*=./8
- AAAA=b
- 0: AAAA=b
- =c
- 0: =c
+/a.b/8
+ acb
+ 0: acb
+ a\x7fb
+ 0: a\x{7f}b
+ a\x{100}b
+ 0: a\x{100}b
*** Failers
No match
- 1=2
+ a\nb
No match
-/^\X{2,3}X/8
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+/a(.{3})b/8
+ a\x{4000}xyb
+ 0: a\x{4000}xyb
+ a\x{4000}\x7fyb
+ 0: a\x{4000}\x{7f}yb
+ a\x{4000}\x{100}yb
+ 0: a\x{4000}\x{100}yb
*** Failers
No match
- X
+ a\x{4000}b
+No match
+ ac\ncb
+No match
+
+/a(.*?)(.)/
+ a\xc0\x88b
+ 0: a\xc0\x88b
+ 1: a\xc0\x88
+ 2: a\xc0
+
+/a(.*?)(.)/8
+ a\x{100}b
+ 0: a\x{100}b
+ 1: a\x{100}
+
+/a(.*)(.)/
+ a\xc0\x88b
+ 0: a\xc0\x88b
+ 1: a\xc0\x88
+ 2: a\xc0
+
+/a(.*)(.)/8
+ a\x{100}b
+ 0: a\x{100}b
+ 1: a\x{100}
+
+/a(.)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+
+/a(.)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+
+/a(.?)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+ 1: a\xc0
+
+/a(.?)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+ 1: a\x{240}
+
+/a(.??)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+ 1: a\xc0
+
+/a(.??)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+ 1: a\x{240}
+
+/a(.{3})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ *** Failers
No match
- A\x{300}\x{301}\x{302}X
+ a\x{1234}b
No match
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ ac\ncb
No match
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- 0: \x{0a}p\x{300}9!$ <
- ** Failers
-No match
- ap\x{300}9!\$ <
-No match
-
-/^\PC/8
- X
- 0: X
- ** Failers
- 0: *
- \x7f
+/a(.{3,})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxbcdefghijb
+ 1: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
No match
-
-/^\PL/8
- 9
- 0: 9
- ** Failers
- 0: *
- \x{c0}
+ a\x{1234}b
+No match
+
+/a(.{3,}?)b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxbcdefghijb
+ 1: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
No match
-
-/^\PM/8
- X
- 0: X
- ** Failers
- 0: *
- \x{30f}
+ a\x{1234}b
+No match
+
+/a(.{3,5})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ 0: axbxxb
+ axxxxxbcdefghijb
+ 0: axxxxxb
+ *** Failers
No match
-
-/^\PN/8
- X
- 0: X
- ** Failers
- 0: *
- \x{660}
+ a\x{1234}b
+No match
+ axxxxxxbcdefghijb
+No match
+
+/a(.{3,5}?)b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ 0: axbxxb
+ axxxxxbcdefghijb
+ 0: axxxxxb
+ *** Failers
No match
-
-/^\PP/8
- X
- 0: X
- ** Failers
+ a\x{1234}b
No match
- \x{66c}
+ axxxxxxbcdefghijb
No match
-
-/^\PS/8
- X
- 0: X
- ** Failers
- 0: *
- \x{f01}
+
+/^[a\x{c0}]/8
+ *** Failers
No match
-
-/^\PZ/8
- X
- 0: X
- ** Failers
- 0: *
- \x{1680}
+ \x{100}
No match
+
+/(?<=aXb)cd/8
+ aXbcd
+ 0: cd
+
+/(?<=a\x{100}b)cd/8
+ a\x{100}bcd
+ 0: cd
+
+/(?<=a\x{100000}b)cd/8
+ a\x{100000}bcd
+ 0: cd
-/^\p{Cc}/8
- \x{017}
- 0: \x{17}
- \x{09f}
- 0: \x{9f}
- ** Failers
-No match
- \x{0600}
-No match
-
-/^\p{Cf}/8
- \x{601}
- 0: \x{601}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cn}/8
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Co}/8
- \x{f8ff}
- 0: \x{f8ff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cs}/8
- \?\x{dfff}
- 0: \x{dfff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Ll}/8
- a
- 0: a
- ** Failers
-No match
- Z
-No match
- \x{e000}
-No match
-
-/^\p{Lm}/8
- \x{2b0}
- 0: \x{2b0}
- ** Failers
-No match
- a
-No match
-
-/^\p{Lo}/8
- \x{1bb}
- 0: \x{1bb}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lt}/8
- \x{1c5}
- 0: \x{1c5}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lu}/8
- A
- 0: A
- ** Failers
-No match
- \x{2b0}
-No match
-
-/^\p{Mc}/8
- \x{903}
- 0: \x{903}
- ** Failers
-No match
- X
-No match
- \x{300}
-No match
-
-/^\p{Me}/8
- \x{488}
- 0: \x{488}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
- \x{300}
-No match
-
-/^\p{Mn}/8
- \x{300}
- 0: \x{300}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
- 1: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}
- 2: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}
- 3: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}
- 4: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}
- 5: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}
- 6: 0123456789\x{660}\x{661}\x{662}\x{663}
- 7: 0123456789\x{660}\x{661}\x{662}
- 8: 0123456789\x{660}\x{661}
- 9: 0123456789\x{660}
-10: 0123456789
-11: 012345678
-12: 01234567
-13: 0123456
-14: 012345
-15: 01234
-16: 0123
-17: 012
-18: 01
-19: 0
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
- 1: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}
- 2: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}
- 3: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}
- 4: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}
- 5: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}
- 6: \x{6f0}\x{6f1}\x{6f2}\x{6f3}
- 7: \x{6f0}\x{6f1}\x{6f2}
- 8: \x{6f0}\x{6f1}
- 9: \x{6f0}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
- 1: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}
- 2: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}
- 3: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}
- 4: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}
- 5: \x{966}\x{967}\x{968}\x{969}\x{96a}
- 6: \x{966}\x{967}\x{968}\x{969}
- 7: \x{966}\x{967}\x{968}
- 8: \x{966}\x{967}
- 9: \x{966}
- ** Failers
-No match
- X
-No match
-
-/^\p{Nl}/8
- \x{16ee}
- 0: \x{16ee}
- ** Failers
-No match
- X
-No match
- \x{966}
-No match
-
-/^\p{No}/8
- \x{b2}
- 0: \x{b2}
- \x{b3}
- 0: \x{b3}
- ** Failers
-No match
- X
-No match
- \x{16ee}
-No match
-
-/^\p{Pc}/8
- \x5f
- 0: _
- \x{203f}
- 0: \x{203f}
- ** Failers
-No match
- X
-No match
- -
-No match
- \x{58a}
-No match
-
-/^\p{Pd}/8
- -
- 0: -
- \x{58a}
- 0: \x{58a}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pe}/8
- )
- 0: )
- ]
- 0: ]
- }
- 0: }
- \x{f3b}
- 0: \x{f3b}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
- (
-No match
- [
-No match
- {
-No match
- \x{f3c}
-No match
-
-/^\p{Pf}/8
- \x{bb}
- 0: \x{bb}
- \x{2019}
- 0: \x{2019}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pi}/8
- \x{ab}
- 0: \x{ab}
- \x{2018}
- 0: \x{2018}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Po}/8
- !
- 0: !
- \x{37e}
- 0: \x{37e}
- ** Failers
- 0: *
- X
-No match
- \x{203f}
-No match
-
-/^\p{Ps}/8
- (
- 0: (
- [
- 0: [
- {
- 0: {
- \x{f3c}
- 0: \x{f3c}
- ** Failers
-No match
- X
-No match
- )
-No match
- ]
-No match
- }
-No match
- \x{f3b}
-No match
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- 0: $\x{a2}\x{a3}\x{a4}\x{a5}
- 1: $\x{a2}\x{a3}\x{a4}
- 2: $\x{a2}\x{a3}
- 3: $\x{a2}
- 4: $
- \x{9f2}
- 0: \x{9f2}
- ** Failers
-No match
- X
-No match
- \x{2c2}
-No match
-
-/^\p{Sk}/8
- \x{2c2}
- 0: \x{2c2}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- 0: +<|~\x{ac}\x{2044}
- 1: +<|~\x{ac}
- 2: +<|~
- 3: +<|
- 4: +<
- 5: +
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{So}/8
- \x{a6}
- 0: \x{a6}
- \x{482}
- 0: \x{482}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Zl}/8
- \x{2028}
- 0: \x{2028}
- ** Failers
-No match
- X
-No match
- \x{2029}
-No match
-
-/^\p{Zp}/8
- \x{2029}
- 0: \x{2029}
- ** Failers
-No match
- X
-No match
- \x{2028}
-No match
-
-/^\p{Zs}/8
- \ \
- 0:
- \x{a0}
- 0: \x{a0}
- \x{1680}
- 0: \x{1680}
- \x{180e}
- 0: \x{180e}
- \x{2000}
- 0: \x{2000}
- \x{2001}
- 0: \x{2001}
- ** Failers
-No match
- \x{2028}
-No match
- \x{200d}
-No match
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
- 3: \x{660}\x{661}
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
- 3: \x{660}\x{661}
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{660}\x{661}
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{660}\x{661}
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- 0: ** F
- \x{660}\x{661}\x{662}ABC
-No match
-
-/\p{Lu}/8i
- A
- 0: A
- a\x{10a0}B
- 0: \x{10a0}
- ** Failers
- 0: F
- a
+/(?:\x{100}){3}b/8
+ \x{100}\x{100}\x{100}b
+ 0: \x{100}\x{100}\x{100}b
+ *** Failers
No match
- \x{1d00}
+ \x{100}\x{100}b
No match
-/\p{^Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
+/\x{ab}/8
+ \x{ab}
+ 0: \x{ab}
+ \xc2\xab
+ 0: \x{ab}
+ *** Failers
No match
-
-/\P{Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
+ \x00{ab}
No match
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 0: XYZ
- 123A5XYZPQR
- 0: XYZ
- ABA\x{660}XYZpqr
- 0: XYZ
- ** Failers
-No match
- AXYZ
-No match
- XYZ
+/(?<=(.))X/8
+ WXYZ
+ 0: X
+ \x{256}XYZ
+ 0: X
+ *** Failers
No match
-
-/(?<!\pL)XYZ/8
- 1XYZ
- 0: XYZ
- AB=XYZ..
- 0: XYZ
XYZ
- 0: XYZ
- ** Failers
-No match
- WXYZ
No match
-/[\p{Nd}]/8
- 1234
- 0: 1
+/[^a]+/8g
+ bcd
+ 0: bcd
+ 1: bc
+ 2: b
+ \x{100}aY\x{256}Z
+ 0: \x{100}
+ 0: Y\x{256}Z
+ 1: Y\x{256}
+ 2: Y
+
+/^[^a]{2}/8
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8
+ \x{100}bcAa
+ 0: \x{100}bcA
+ 1: \x{100}bc
+ 2: \x{100}b
+
+/^[^a]{2,}?/8
+ \x{100}bca
+ 0: \x{100}bc
+ 1: \x{100}b
+
+/[^a]+/8ig
+ bcd
+ 0: bcd
+ 1: bc
+ 2: b
+ \x{100}aY\x{256}Z
+ 0: \x{100}
+ 0: Y\x{256}Z
+ 1: Y\x{256}
+ 2: Y
+
+/^[^a]{2}/8i
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8i
+ \x{100}bcAa
+ 0: \x{100}bc
+ 1: \x{100}b
-/[\p{Nd}+-]+/8
- 1234
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- 12-34
- 0: 12-34
- 1: 12-3
- 2: 12-
- 3: 12
- 4: 1
- 12+\x{661}-34
- 0: 12+\x{661}-34
- 1: 12+\x{661}-3
- 2: 12+\x{661}-
- 3: 12+\x{661}
- 4: 12+
- 5: 12
- 6: 1
- ** Failers
-No match
- abcd
-No match
+/^[^a]{2,}?/8i
+ \x{100}bca
+ 0: \x{100}bc
+ 1: \x{100}b
-/[\P{Nd}]+/8
+/\x{100}{0,0}/8
abcd
+ 0:
+
+/\x{100}?/8
+ abcd
+ 0:
+ \x{100}\x{100}
+ 0: \x{100}
+ 1:
+
+/\x{100}{0,3}/8
+ \x{100}\x{100}
+ 0: \x{100}\x{100}
+ 1: \x{100}
+ 2:
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}
+ 2: \x{100}
+ 3:
+
+/\x{100}*/8
+ abce
+ 0:
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}
+ 3: \x{100}
+ 4:
+
+/\x{100}{1,1}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}
+
+/\x{100}{1,3}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}
+ 2: \x{100}
+
+/\x{100}+/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}
+ 3: \x{100}
+
+/\x{100}{3}/8
+ abcd\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}{3,5}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}\x{100}
+
+/\x{100}{3,}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}\x{100}\x{100}\x{100}
+ 3: \x{100}\x{100}\x{100}\x{100}
+ 4: \x{100}\x{100}\x{100}
+
+/(?<=a\x{100}{2}b)X/8
+ Xyyya\x{100}\x{100}bXzzz
+ 0: X
+
+/\D*/8
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but too many subsidiary matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\D*/8
+ \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+Matched, but too many subsidiary matches
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 3: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 4: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 5: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 6: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 7: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 8: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 9: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+10: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+11: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+12: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+13: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+14: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+15: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+16: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+17: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+18: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+19: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+20: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+21: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\D/8
+ 1X2
+ 0: X
+ 1\x{100}2
+ 0: \x{100}
+
+/>\S/8
+ > >X Y
+ 0: >X
+ > >\x{100} Y
+ 0: >\x{100}
+
+/\d/8
+ \x{100}3
+ 0: 3
+
+/\s/8
+ \x{100} X
+ 0:
+
+/\D+/8
+ 12abcd34
0: abcd
1: abc
2: ab
3: a
- ** Failers
- 0: ** Failers
- 1: ** Failer
- 2: ** Faile
- 3: ** Fail
- 4: ** Fai
- 5: ** Fa
- 6: ** F
- 7: **
- 8: **
- 9: *
- 1234
+ *** Failers
+ 0: *** Failers
+ 1: *** Failer
+ 2: *** Faile
+ 3: *** Fail
+ 4: *** Fai
+ 5: *** Fa
+ 6: *** F
+ 7: ***
+ 8: ***
+ 9: **
+10: *
+ 1234
No match
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
+/\D{2,3}/8
+ 12abcd34
+ 0: abc
+ 1: ab
+ 12ab34
+ 0: ab
+ *** Failers
+ 0: ***
+ 1: **
+ 1234
No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
+ 12a34
No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\pL/8
- a
- 0: a
- A
- 0: A
-/\pL/8i
- a
- 0: a
- A
- 0: A
-
-/\p{Lu}/8
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
+/\D{2,3}?/8
+ 12abcd34
+ 0: abc
+ 1: ab
+ 12ab34
+ 0: ab
+ *** Failers
+ 0: ***
+ 1: **
+ 1234
No match
-
-/\p{Lu}/8i
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
+ 12a34
No match
-/\p{Ll}/8
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
+/\d+/8
+ 12abcd34
+ 0: 12
+ 1: 1
+ *** Failers
No match
-/\p{Ll}/8i
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
+/\d{2,3}/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
+No match
+ 1.4
No match
-/^\x{c0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
+/\d{2,3}?/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
No match
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-No match
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}
- 2: \x{391}\x{3b1}\x{3b1}
- 3: \x{391}\x{3b1}
- 4: \x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- 0: \x{391}
- \x{ff3a}
- 0: \x{ff3a}
- \x{3b1}
- 0: \x{3b1}
- \x{ff5a}
- 0: \x{ff5a}
-
-/[\x{c0}\x{391}]/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/[\x{105}-\x{109}]/8i
- \x{104}
- 0: \x{104}
- \x{105}
- 0: \x{105}
- \x{109}
- 0: \x{109}
- ** Failers
+ 1.4
No match
- \x{100}
+
+/\S+/8
+ 12abcd34
+ 0: 12abcd34
+ 1: 12abcd3
+ 2: 12abcd
+ 3: 12abc
+ 4: 12ab
+ 5: 12a
+ 6: 12
+ 7: 1
+ *** Failers
+ 0: ***
+ 1: **
+ 2: *
+ \ \
+No match
+
+/\S{2,3}/8
+ 12abcd34
+ 0: 12a
+ 1: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
+ 0: ***
+ 1: **
+ \ \
+No match
+
+/\S{2,3}?/8
+ 12abcd34
+ 0: 12a
+ 1: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
+ 0: ***
+ 1: **
+ \ \
No match
- \x{10a}
+
+/>\s+</8
+ 12> <34
+ 0: > <
+ *** Failers
No match
-
-/[z-\x{100}]/8i
- Z
- 0: Z
- z
- 0: z
- \x{39c}
- 0: \x{39c}
- \x{178}
- 0: \x{178}
- |
- 0: |
- \x{80}
- 0: \x{80}
- \x{ff}
- 0: \x{ff}
- \x{100}
- 0: \x{100}
- \x{101}
- 0: \x{101}
- ** Failers
+
+/>\s{2,3}</8
+ ab> <cd
+ 0: > <
+ ab> <ce
+ 0: > <
+ *** Failers
No match
- \x{102}
+ ab> <cd
No match
- Y
+
+/>\s{2,3}?</8
+ ab> <cd
+ 0: > <
+ ab> <ce
+ 0: > <
+ *** Failers
No match
- y
+ ab> <cd
No match
-/[z-\x{100}]/8i
-
-/^\X/8
- A
- 0: A
- A\x{300}BC
- 0: A\x{300}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}
+/\w+/8
+ 12 34
+ 0: 12
+ 1: 1
*** Failers
- 0: *
- \x{300}
+ 0: Failers
+ 1: Failer
+ 2: Faile
+ 3: Fail
+ 4: Fai
+ 5: Fa
+ 6: F
+ +++=*!
+No match
+
+/\w{2,3}/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: abc
+ 1: ab
+ *** Failers
+ 0: Fai
+ 1: Fa
+ a.b.c
No match
-/^[\X]/8
- X123
- 0: X
+/\w{2,3}?/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: abc
+ 1: ab
*** Failers
+ 0: Fai
+ 1: Fa
+ a.b.c
No match
- AXYZ
-No match
-
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BC
-
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BC
-
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A\x{300}\x{301}\x{302}B
- 3: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA
- 2: A\x{300}\x{301}\x{302}BC
- 3: A\x{300}\x{301}\x{302}B
- 4: A
-
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A\x{300}\x{301}\x{302}B
- 3: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA
- 2: A\x{300}\x{301}\x{302}BC
- 3: A\x{300}\x{301}\x{302}B
- 4: A
-
-/^\X(.)/8
- *** Failers
- 0: **
- A\x{300}\x{301}\x{302}
-No match
-
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: A\x{300}\x{301}B\x{300}C
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: A\x{300}\x{301}B\x{300}C
-
-/^\pN{2,3}X/
- 12X
- 0: 12X
- 123X
- 0: 123X
+
+/\W+/8
+ 12====34
+ 0: ====
+ 1: ===
+ 2: ==
+ 3: =
*** Failers
+ 0: ***
+ 1: ***
+ 2: **
+ 3: *
+ abcd
No match
- X
-No match
- 1X
+
+/\W{2,3}/8
+ ab====cd
+ 0: ===
+ 1: ==
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ 1: **
+ a.b.c
No match
- 1234X
+
+/\W{2,3}?/8
+ ab====cd
+ 0: ===
+ 1: ==
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ 1: **
+ a.b.c
No match
-/\x{100}/i8
- \x{100}
+/[\x{100}]/8
+ \x{100}
0: \x{100}
- \x{101}
- 0: \x{101}
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- 0: \x{2e81}\x{3007}\x{2f804}
- 1: \x{2e81}\x{3007}
- 2: \x{2e81}
- ** Failers
-No match
- \x{2e7f}
+ Z\x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
No match
-/^\P{Katakana}+/8
- \x{3105}
- 0: \x{3105}
- ** Failers
- 0: ** Failers
- 1: ** Failer
- 2: ** Faile
- 3: ** Fail
- 4: ** Fai
- 5: ** Fa
- 6: ** F
- 7: **
- 8: **
- 9: *
- \x{30ff}
-No match
-
-/^[\p{Arabic}]/8
- \x{06e9}
- 0: \x{6e9}
- \x{060b}
- 0: \x{60b}
- ** Failers
-No match
- X\x{06e9}
+/[Z\x{100}]/8
+ Z\x{100}
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
No match
-/^[\P{Yi}]/8
- \x{2f800}
- 0: \x{2f800}
- ** Failers
- 0: *
- \x{a014}
-No match
- \x{a4c6}
+/[\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ *** Failers
No match
-/^\p{Any}X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
-No match
-
-/^\P{Any}X/8
- ** Failers
-No match
- AX
-No match
-
-/^\p{Any}?X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
+/[\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ *** Failers
No match
-/^\P{Any}?X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
+/[z-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ *** Failers
No match
-/^\p{Any}+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
+/[Q\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ Q?
+ 0: Q
+ *** Failers
No match
-/^\P{Any}+X/8
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
-No match
- XYZ
+/[Q\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ Q?
+ 0: Q
+ *** Failers
No match
-/^\p{Any}*X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
+/[Qz-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ Q?
+ 0: Q
+ *** Failers
No match
-/^\P{Any}*X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
+/[\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
-/^[\p{Any}]X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
-No match
-
-/^[\P{Any}]X/8
- ** Failers
-No match
- AX
-No match
-
-/^[\p{Any}]?X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
+/[\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
-/^[\P{Any}]?X/8
- XYZ
- 0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
+/[Q\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
-/^[\p{Any}]+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
+/[Q\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
-/^[\P{Any}]+X/8
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- A\x{1234}XYZ
+/(?<=[\x{100}\x{200}])X/8
+ abc\x{200}X
+ 0: X
+ abc\x{100}X
+ 0: X
+ *** Failers
No match
- XYZ
+ X
No match
-/^[\p{Any}]*X/8
- XYZ
+/(?<=[Q\x{100}\x{200}])X/8
+ abc\x{200}X
0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
-
-/^[\P{Any}]*X/8
- XYZ
+ abc\x{100}X
0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
+ abQX
+ 0: X
+ *** Failers
No match
- A\x{1234}XYZ
+ X
No match
-/^\p{Any}{3,5}?/8
- abcdefgh
- 0: abcde
- 1: abcd
- 2: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
- 1: \x{1234}\x{0a}\x{0d}\x{3456}
- 2: \x{1234}\x{0a}\x{0d}
-
-/^\p{Any}{3,5}/8
- abcdefgh
- 0: abcde
- 1: abcd
- 2: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
- 1: \x{1234}\x{0a}\x{0d}\x{3456}
- 2: \x{1234}\x{0a}\x{0d}
-
-/^\P{Any}{3,5}?/8
- ** Failers
+/(?<=[\x{100}\x{200}]{3})X/8
+ abc\x{100}\x{200}\x{100}X
+ 0: X
+ *** Failers
No match
- abcdefgh
+ abc\x{200}X
No match
- \x{1234}\n\r\x{3456}xyz
+ X
No match
-/^\p{L&}X/8
- AXY
+/[^\x{100}\x{200}]X/8
+ AX
0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
No match
- \x{2b0}XY
+ \x{100}X
No match
- !XY
+ \x{200}X
No match
-/^[\p{L&}]X/8
- AXY
+/[^Q\x{100}\x{200}]X/8
+ AX
0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
No match
- \x{1bb}XY
+ \x{100}X
No match
- \x{2b0}XY
+ \x{200}X
No match
- !XY
+ QX
No match
-/^\p{L&}+X/8
- AXY
+/[^\x{100}-\x{200}]X/8
+ AX
0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
No match
- \x{1bb}XY
+ \x{100}X
No match
- \x{2b0}XY
+ \x{150}X
No match
- !XY
+ \x{200}X
No match
-/^[\p{L&}]+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
+/[z-\x{100}]/8i
+ z
+ 0: z
+ Z
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ *** Failers
No match
- \x{2b0}XY
+ \x{102}
No match
- !XY
+ y
No match
-/^\p{L&}+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
+/[\xFF]/
+ >\xff<
+ 0: \xff
-/^[\p{L&}]+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
+/[\xff]/8
+ >\x{ff}<
+ 0: \x{ff}
-/^\P{L&}X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
+/[^\xFF]/
+ XYZ
+ 0: X
+
+/[^\xff]/8
+ XYZ
+ 0: X
+ \x{123}
+ 0: \x{123}
+
+/^[ac]*b/8
+ xb
No match
- AXY
+
+/^[ac\x{100}]*b/8
+ xb
No match
-/^[\P{L&}]X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
+/^[^x]*b/8i
+ xb
No match
- \x{1c5}XY
+
+/^[^x]*b/8
+ xb
No match
- AXY
+
+/^\d*b/8
+ xb
No match
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
- 0: \x{23a}\x{2c65}\x{130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
- 0: \x{23a}\x{2c65}
-
-/\x{c0}+\x{116}+/8i
- \x{c0}\x{e0}\x{116}\x{117}
- 0: \x{c0}\x{e0}\x{116}\x{117}
- 1: \x{c0}\x{e0}\x{116}
-
-/[\x{c0}\x{116}]+/8i
- \x{c0}\x{e0}\x{116}\x{117}
- 0: \x{c0}\x{e0}\x{116}\x{117}
- 1: \x{c0}\x{e0}\x{116}
- 2: \x{c0}\x{e0}
- 3: \x{c0}
-
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 0: abcd
- 123abc\xc4\xc5zz
- 0: abc\xc4
-
-/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
- \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
- 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
-
-/\x{a77d}\x{1d79}/8i
- \x{a77d}\x{1d79}
- 0: \x{a77d}\x{1d79}
- \x{1d79}\x{a77d}
- 0: \x{1d79}\x{a77d}
-
-/\x{a77d}\x{1d79}/8
- \x{a77d}\x{1d79}
- 0: \x{a77d}\x{1d79}
+/(|a)/g8
+ catac
+ 0:
+ 0: a
+ 1:
+ 0:
+ 0: a
+ 1:
+ 0:
+ 0:
+ a\x{256}a
+ 0: a
+ 1:
+ 0:
+ 0: a
+ 1:
+ 0:
+
+/^\x{85}$/8i
+ \x{85}
+ 0: \x{85}
+
+/^abc./mgx8<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+ 0: abc1
+ 0: abc2
+ 0: abc3
+ 0: abc4
+ 0: abc5
+ 0: abc6
+ 0: abc7
+ 0: abc8
+ 0: abc9
+
+/abc.$/mgx8<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+ 0: abc1
+ 0: abc2
+ 0: abc3
+ 0: abc4
+ 0: abc5
+ 0: abc6
+ 0: abc7
+ 0: abc8
+ 0: abc9
+
+/^a\Rb/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0cb
+ 0: a\x{0c}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x{2028}b
+ 0: a\x{2028}b
+ a\x{2029}b
+ 0: a\x{2029}b
+ ** Failers
+No match
+ a\n\rb
+No match
+
+/^a\R*b/8<bsr_unicode>
+ ab
+ 0: ab
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0c\x{2028}\x{2029}b
+ 0: a\x{0c}\x{2028}\x{2029}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}\x0cb
+ 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+
+/^a\R+b/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0c\x{2028}\x{2029}b
+ 0: a\x{0c}\x{2028}\x{2029}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}\x0cb
+ 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+ ** Failers
+No match
+ ab
+No match
+
+/^a\R{1,3}b/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}b
+ 0: a\x{0a}\x{0d}\x{85}b
+ a\r\n\r\nb
+ 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
+ a\r\n\r\n\r\nb
+ 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
+ a\n\r\n\rb
+ 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
+ a\n\n\r\nb
+ 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\n\n\n\rb
+No match
+ a\r
+No match
+
+/\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
+
+/\V?\v{3,4}/8
+ \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: X\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: X\x{0a}\x{0b}\x{0c}
+
+/\h+\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+ 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a}
+
+/\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+ 0: X\x{0a}\x{0a}\x{0a}
+
+/\H\h\V\v/8
+ X X\x0a
+ 0: X X\x{0a}
+ X\x09X\x0b
+ 0: X\x{09}X\x{0b}
+ ** Failers
+No match
+ \x{a0} X\x0a
+No match
+
+/\H*\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
+ \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
+ \x09\x20\x{a0}\x0a\x0b\x0c
+ 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
** Failers
No match
- \x{1d79}\x{a77d}
+ \x09\x20\x{a0}\x0a\x0b
No match
-
-/^\p{Xan}/8
- ABCD
- 0: A
- 1234
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
+
+/\H\h\V\v/8
+ \x{3001}\x{3000}\x{2030}\x{2028}
+ 0: \x{3001}\x{3000}\x{2030}\x{2028}
+ X\x{180e}X\x{85}
+ 0: X\x{180e}X\x{85}
** Failers
No match
- _ABC
-No match
-
-/^\p{Xan}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 1: ABCD1234\x{6ca}\x{a6c}
- 2: ABCD1234\x{6ca}
- 3: ABCD1234
- 4: ABCD123
- 5: ABCD12
- 6: ABCD1
- 7: ABCD
- 8: ABC
- 9: AB
-10: A
- ** Failers
+ \x{2009} X\x0a
No match
- _ABC
-No match
-
-/^\p{Xan}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 1: ABCD1234\x{6ca}\x{a6c}
- 2: ABCD1234\x{6ca}
- 3: ABCD1234
- 4: ABCD123
- 5: ABCD12
- 6: ABCD1
- 7: ABCD
- 8: ABC
- 9: AB
-10: A
-11:
-/^\p{Xan}{2,9}/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}
- 1: ABCD1234
- 2: ABCD123
- 3: ABCD12
- 4: ABCD1
- 5: ABCD
- 6: ABC
- 7: AB
-
-/^[\p{Xan}]/8
- ABCD1234_
- 0: A
- 1234abcd_
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- ** Failers
+/\H*\h+\V?\v{3,4}/8
+ \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
+ 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
+ 1: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}
+ \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
+ 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
+ 1: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}
+ \x09\x20\x{202f}\x0a\x0b\x0c
+ 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
+ ** Failers
No match
- _ABC
+ \x09\x{200a}\x{a0}\x{2028}\x0b
No match
-
-/^[\p{Xan}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 1: ABCD1234\x{6ca}\x{a6c}
- 2: ABCD1234\x{6ca}
- 3: ABCD1234
- 4: ABCD123
- 5: ABCD12
- 6: ABCD1
- 7: ABCD
- 8: ABC
- 9: AB
-10: A
- ** Failers
-No match
- _ABC
+
+/a\Rb/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
No match
-
-/^>\p{Xsp}/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
- ** Failers
+ a\x{85}b\<bsr_anycrlf>
No match
- \x{0b}
-No match
-
-/^>\p{Xsp}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
- 7: >
-
-/^>\p{Xsp}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
- 7: >
- 8: >
-
-/^>\p{Xsp}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
-
-/^>[\p{Xsp}]/8
- >\x{2028}\x{0b}
- 0: >\x{2028}
-
-/^>[\p{Xsp}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}
- 4: > \x{09}\x{0a}\x{0c}
- 5: > \x{09}\x{0a}
- 6: > \x{09}
- 7: >
-
-/^>\p{Xps}/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}
- >\x{a0}
- 0: >\x{a0}
- ** Failers
+ a\x0bb\<bsr_anycrlf>
No match
- \x{0b}
-No match
-
-/^>\p{Xps}+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
- 8: >
-
-/^>\p{Xps}+?/8
- >\x{1680}\x{2028}\x{0b}
- 0: >\x{1680}\x{2028}\x{0b}
- 1: >\x{1680}\x{2028}
- 2: >\x{1680}
-
-/^>\p{Xps}*/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
- 8: >
- 9: >
-
-/^>\p{Xps}{2,9}/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
-/^>\p{Xps}{2,9}?/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
-
-/^>[\p{Xps}]/8
- >\x{2028}\x{0b}
- 0: >\x{2028}
-
-/^>[\p{Xps}]+/8
- > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
- 1: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
- 2: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}
- 3: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}
- 4: > \x{09}\x{0a}\x{0c}\x{0d}
- 5: > \x{09}\x{0a}\x{0c}
- 6: > \x{09}\x{0a}
- 7: > \x{09}
- 8: >
-
-/^\p{Xwd}/8
- ABCD
- 0: A
- 1234
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- _ABC
- 0: _
- ** Failers
+/a\R?b/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
+No match
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
No match
- []
-No match
-
-/^\p{Xwd}+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 2: ABCD1234\x{6ca}\x{a6c}
- 3: ABCD1234\x{6ca}
- 4: ABCD1234
- 5: ABCD123
- 6: ABCD12
- 7: ABCD1
- 8: ABCD
- 9: ABC
-10: AB
-11: A
-
-/^\p{Xwd}*/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 2: ABCD1234\x{6ca}\x{a6c}
- 3: ABCD1234\x{6ca}
- 4: ABCD1234
- 5: ABCD123
- 6: ABCD12
- 7: ABCD1
- 8: ABCD
- 9: ABC
-10: AB
-11: A
-12:
-
-/^\p{Xwd}{2,9}/8
- A_12\x{6ca}\x{a6c}\x{10a7}
- 0: A_12\x{6ca}\x{a6c}\x{10a7}
- 1: A_12\x{6ca}\x{a6c}
- 2: A_12\x{6ca}
- 3: A_12
- 4: A_1
- 5: A_
-
-/^[\p{Xwd}]/8
- ABCD1234_
- 0: A
- 1234abcd_
- 0: 1
- \x{6ca}
- 0: \x{6ca}
- \x{a6c}
- 0: \x{a6c}
- \x{10a7}
- 0: \x{10a7}
- _ABC
- 0: _
- ** Failers
+ a\x{85}b\<bsr_anycrlf>
No match
- []
+ a\x0bb\<bsr_anycrlf>
No match
-/^[\p{Xwd}]+/8
- ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
- 1: ABCD1234\x{6ca}\x{a6c}\x{10a7}
- 2: ABCD1234\x{6ca}\x{a6c}
- 3: ABCD1234\x{6ca}
- 4: ABCD1234
- 5: ABCD123
- 6: ABCD12
- 7: ABCD1
- 8: ABCD
- 9: ABC
-10: AB
-11: A
-
-/-- Unicode properties for \b abd \B --/
-
-/\b...\B/8W
- abc_
- 0: abc
- \x{37e}abc\x{376}
- 0: abc
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- 0: \x{376}\x{371}\x{393}
- !\x{c0}++\x{c1}\x{c2}
- 0: ++\x{c1}
- !\x{c0}+++++
- 0: \x{c0}++
+/X/8f<any>
+ A\x{1ec5}ABCXYZ
+ 0: X
-/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
+/abcd*/8
+ xxxxabcd\P
+ 0: abcd
+ 1: abc
+ xxxxabcd\P\P
+Partial match: abcd
-/\b...\B/8
- abc_
- 0: abc
- ** Failers
- 0: Fai
- \x{37e}abc\x{376}
-No match
- \x{37e}\x{376}\x{371}\x{393}\x{394}
-No match
- !\x{c0}++\x{c1}\x{c2}
-No match
- !\x{c0}+++++
-No match
+/abcd*/i8
+ xxxxabcd\P
+ 0: abcd
+ 1: abc
+ xxxxabcd\P\P
+Partial match: abcd
+ XXXXABCD\P
+ 0: ABCD
+ 1: ABC
+ XXXXABCD\P\P
+Partial match: ABCD
+
+/abc\d*/8
+ xxxxabc1\P
+ 0: abc1
+ 1: abc
+ xxxxabc1\P\P
+Partial match: abc1
-/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
+/abc[de]*/8
+ xxxxabcde\P
+ 0: abcde
+ 1: abcd
+ 2: abc
+ xxxxabcde\P\P
+Partial match: abcde
+
+/\bthe cat\b/8
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/ab\Cde/8
+ abXde
+Error -16 (item unsupported for DFA matching)
+
+/(?<=ab\Cde)X/8
+Failed: \C not allowed in lookbehind assertion at offset 10
+
+/./8<CRLF>
+ \r\P
+ 0: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+
+/.{2,3}/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}\x{0d}
+ 1: \x{0d}\x{0d}
+ \r\r\r\P\P
+Partial match: \x{0d}\x{0d}\x{0d}
+
+/.{2,3}?/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}\x{0d}
+ 1: \x{0d}\x{0d}
+ \r\r\r\P\P
+Partial match: \x{0d}\x{0d}\x{0d}
+
+/[^\x{100}]/8
+ \x{100}\x{101}X
+ 0: \x{101}
-/\b...\B/W
- abc_
- 0: abc
- !\x{c0}++\x{c1}\x{c2}
- 0: ++\xc1
- !\x{c0}+++++
- 0: \xc0++
+/[^\x{100}]+/8
+ \x{100}\x{101}X
+ 0: \x{101}X
+ 1: \x{101}
/-- End of testinput9 --/
diff --git a/ext/pcre/pcrelib/ucp.h b/ext/pcre/pcrelib/ucp.h
index d68737e31..59c3bec3d 100644
--- a/ext/pcre/pcrelib/ucp.h
+++ b/ext/pcre/pcrelib/ucp.h
@@ -153,7 +153,19 @@ enum {
ucp_Old_Turkic,
ucp_Samaritan,
ucp_Tai_Tham,
- ucp_Tai_Viet
+ ucp_Tai_Viet,
+ /* New for Unicode 6.0.0: */
+ ucp_Batak,
+ ucp_Brahmi,
+ ucp_Mandaic,
+ /* New for Unicode 6.1.0: */
+ ucp_Chakma,
+ ucp_Meroitic_Cursive,
+ ucp_Meroitic_Hieroglyphs,
+ ucp_Miao,
+ ucp_Sharada,
+ ucp_Sora_Sompeng,
+ ucp_Takri
};
#endif
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index f61364cde..0c7280e3b 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -248,6 +248,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
#endif
pcre_cache_entry *pce;
pcre_cache_entry new_entry;
+ char *tmp = NULL;
/* Try to lookup the cached regex entry, and if successful, just pass
back the compiled pattern, otherwise go on and compile it. */
@@ -438,9 +439,26 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
new_entry.locale = pestrdup(locale, 1);
new_entry.tables = tables;
#endif
+
+ /*
+ * Interned strings are not duplicated when stored in HashTable,
+ * but all the interned strings created during HTTP request are removed
+ * at end of request. However PCRE_G(pcre_cache) must be consistent
+ * on the next request as well. So we disable usage of interned strings
+ * as hash keys especually for this table.
+ * See bug #63180
+ */
+ if (IS_INTERNED(regex)) {
+ regex = tmp = estrndup(regex, regex_len);
+ }
+
zend_hash_update(&PCRE_G(pcre_cache), regex, regex_len+1, (void *)&new_entry,
sizeof(pcre_cache_entry), (void**)&pce);
+ if (tmp) {
+ efree(tmp);
+ }
+
return pce;
}
/* }}} */
@@ -1027,6 +1045,10 @@ PHPAPI char *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int sub
replace_end = replace + replace_len;
}
+ if (eval) {
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The /e modifier is deprecated, use preg_replace_callback instead");
+ }
+
/* Calculate the size of the offsets array, and allocate memory for it. */
rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_CAPTURECOUNT, &num_subpats);
if (rc < 0) {
@@ -1848,7 +1870,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match, 0, 0, 2)
ZEND_ARG_INFO(0, offset)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 3)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 2)
ZEND_ARG_INFO(0, pattern)
ZEND_ARG_INFO(0, subject)
ZEND_ARG_INFO(1, subpatterns) /* array */
diff --git a/ext/pcre/tests/002.phpt b/ext/pcre/tests/002.phpt
index 00f68f365..fd245633d 100644
--- a/ext/pcre/tests/002.phpt
+++ b/ext/pcre/tests/002.phpt
@@ -34,6 +34,8 @@ string(12) "a${1b${1c${1"
Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 in %s002.php on line 11
NULL
+Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line 12
+
Parse error: %s in %s002.php(12) : regexp code on line 1
Fatal error: preg_replace(): Failed evaluating code:
diff --git a/ext/pcre/tests/004.phpt b/ext/pcre/tests/004.phpt
index b1e958662..1fae406b1 100644
--- a/ext/pcre/tests/004.phpt
+++ b/ext/pcre/tests/004.phpt
@@ -16,7 +16,7 @@ var_dump(preg_replace(array('@//.*@S', '@/\*.*\*/@SsUe'), array('', 'preg_replac
var_dump(preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S', "PHP_FUNCTION(s, preg_match)\n{\nlalala", -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE));
?>
---EXPECT--
+--EXPECTF--
int(2)
array(2) {
[0]=>
@@ -117,6 +117,8 @@ array(1) {
}
}
}
+
+Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line %d
string(9) "hello
diff --git a/ext/pcre/tests/bug34790.phpt b/ext/pcre/tests/bug34790.phpt
index c375ae5ac..c375ae5ac 100755..100644
--- a/ext/pcre/tests/bug34790.phpt
+++ b/ext/pcre/tests/bug34790.phpt
diff --git a/ext/pcre/tests/bug63055.phpt b/ext/pcre/tests/bug63055.phpt
new file mode 100644
index 000000000..16c50b54e
--- /dev/null
+++ b/ext/pcre/tests/bug63055.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #63055 (Segfault in zend_gc with SF2 testsuite)
+--FILE--
+<?php
+/* the default gc root size is 10,000 */
+for ($i=0; $i<9998; $i++) {
+ $array = array();
+ $array[0] = &$array;
+ unset($array);
+}
+
+$matches = array("foo" => "bar"); /* this bucket will trigger the segfault */
+$dummy = array("dummy"); /* used to trigger gc_collect_cycles */
+$dummy[1] = &$dummy;
+
+$matches[1] = &$matches;
+$matches[2] = $dummy;
+
+preg_match_all("/(\d)+/", "foo123456bar", $matches);
+echo "okey";
+?>
+--EXPECTF--
+okey
diff --git a/ext/pcre/tests/preg_filter.phpt b/ext/pcre/tests/preg_filter.phpt
index 6cd980257..6cd980257 100755..100644
--- a/ext/pcre/tests/preg_filter.phpt
+++ b/ext/pcre/tests/preg_filter.phpt
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index e0a1c3ce2..e0a1c3ce2 100755..100644
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index acdc0dd90..acdc0dd90 100755..100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 31932eb3c..31932eb3c 100755..100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h
index bc01da2cf..bc01da2cf 100755..100644
--- a/ext/pdo/php_pdo.h
+++ b/ext/pdo/php_pdo.h
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index b9c46bae7..b9c46bae7 100755..100644
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h
index 16a8f0efb..9a7a64e9c 100755..100644
--- a/ext/pdo/php_pdo_int.h
+++ b/ext/pdo/php_pdo_int.h
@@ -58,7 +58,7 @@ extern pdo_driver_t *pdo_find_driver(const char *name, int namelen);
extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);
#define PDO_DBH_CLEAR_ERR() do { \
- strncpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
+ strlcpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
if (dbh->query_stmt) { \
dbh->query_stmt = NULL; \
zend_objects_store_del_ref(&dbh->query_stmt_zval TSRMLS_CC); \
diff --git a/ext/pdo/tests/bug_36428.phpt b/ext/pdo/tests/bug_36428.phpt
index 703b9d4de..703b9d4de 100755..100644
--- a/ext/pdo/tests/bug_36428.phpt
+++ b/ext/pdo/tests/bug_36428.phpt
diff --git a/ext/pdo/tests/pdo.inc b/ext/pdo/tests/pdo.inc
index 8089236bb..8089236bb 100755..100644
--- a/ext/pdo/tests/pdo.inc
+++ b/ext/pdo/tests/pdo.inc
diff --git a/ext/pdo/tests/pdo_016a.phpt b/ext/pdo/tests/pdo_016a.phpt
index 72f4b4224..72f4b4224 100755..100644
--- a/ext/pdo/tests/pdo_016a.phpt
+++ b/ext/pdo/tests/pdo_016a.phpt
diff --git a/ext/pdo/tests/pdo_029.phpt b/ext/pdo/tests/pdo_029.phpt
index f3dc1f2fa..f3dc1f2fa 100755..100644
--- a/ext/pdo/tests/pdo_029.phpt
+++ b/ext/pdo/tests/pdo_029.phpt
diff --git a/ext/pdo/tests/pdo_030.phpt b/ext/pdo/tests/pdo_030.phpt
index 243e94a1e..243e94a1e 100755..100644
--- a/ext/pdo/tests/pdo_030.phpt
+++ b/ext/pdo/tests/pdo_030.phpt
diff --git a/ext/pdo/tests/pdo_031.phpt b/ext/pdo/tests/pdo_031.phpt
index 9065ce971..9065ce971 100755..100644
--- a/ext/pdo/tests/pdo_031.phpt
+++ b/ext/pdo/tests/pdo_031.phpt
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 77832f952..baf1dcc67 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -315,7 +315,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
DBSETOPT(H->link, DBTEXTSIZE, "2147483647");
/* allow double quoted indentifiers */
- DBSETOPT(H->link, DBQUOTEDIDENT, 1);
+ DBSETOPT(H->link, DBQUOTEDIDENT, NULL);
if (vars[3].optval && FAIL == dbuse(H->link, vars[3].optval)) {
goto cleanup;
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
index e39555fb9..9b0f59695 100644
--- a/ext/pdo_firebird/firebird_driver.c
+++ b/ext/pdo_firebird/firebird_driver.c
@@ -401,7 +401,7 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, long sql
long l, pindex = -1;
/* Firebird allows SQL statements up to 64k, so bail if it doesn't fit */
- if (sql_len > SHORT_MAX) {
+ if (sql_len > 65536) {
strcpy(dbh->error_code, "01004");
return 0;
}
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 5cf35b168..527cb1c3b 100755..100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -709,6 +709,20 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
efree(ssl_cipher);
}
}
+
+#if MYSQL_VERSION_ID > 50605 || defined(MYSQLI_USE_MYSQLND)
+ {
+ char *public_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY, NULL TSRMLS_CC);
+ if (public_key) {
+ if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, public_key)) {
+ pdo_mysql_error(dbh);
+ efree(public_key);
+ goto cleanup;
+ }
+ efree(public_key);
+ }
+ }
+#endif
}
#ifdef PDO_MYSQL_HAS_CHARSET
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index fc5ec5135..7bfbef015 100755..100644
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -75,13 +75,13 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
efree(S->in_length);
}
- if (S->bound_result)
+ if (S->bound_result)
{
int i;
for (i = 0; i < stmt->column_count; i++) {
pdo_free_bound_result(S->bound_result[i]);
}
-
+
efree(S->bound_result);
efree(S->out_null);
efree(S->out_length);
@@ -95,7 +95,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
if (mysql_next_result(S->H->server) != 0) {
break;
}
-
+
res = mysql_store_result(S->H->server);
if (res) {
mysql_free_result(res);
@@ -180,23 +180,23 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC)
}
if (!S->result) {
- int i;
-
- /* figure out the result set format, if any */
- S->result = mysql_stmt_result_metadata(S->stmt);
- if (S->result) {
- int calc_max_length = H->buffered && S->max_length == 1;
- S->fields = mysql_fetch_fields(S->result);
- if (S->bound_result) {
- int i;
- for (i = 0; i < stmt->column_count; i++) {
- efree(S->bound_result[i].buffer);
- }
- efree(S->bound_result);
- efree(S->out_null);
- efree(S->out_length);
+ int i;
+
+ /* figure out the result set format, if any */
+ S->result = mysql_stmt_result_metadata(S->stmt);
+ if (S->result) {
+ int calc_max_length = H->buffered && S->max_length == 1;
+ S->fields = mysql_fetch_fields(S->result);
+ if (S->bound_result) {
+ int i;
+ for (i = 0; i < stmt->column_count; i++) {
+ efree(S->bound_result[i].buffer);
+ }
+ efree(S->bound_result);
+ efree(S->out_null);
+ efree(S->out_length);
}
-
+
stmt->column_count = (int)mysql_num_fields(S->result);
S->bound_result = ecalloc(stmt->column_count, sizeof(MYSQL_BIND));
S->out_null = ecalloc(stmt->column_count, sizeof(my_bool));
@@ -262,7 +262,7 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC)
}
}
}
-
+
pdo_mysql_stmt_set_row_count(stmt TSRMLS_CC);
PDO_DBG_RETURN(1);
}
@@ -275,9 +275,9 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt TSRMLS_DC) /
pdo_mysql_stmt *S = stmt->driver_data;
pdo_mysql_db_handle *H = S->H;
int i;
-
+
PDO_DBG_ENTER("pdo_mysql_stmt_execute_prepared_mysqlnd");
-
+
if (mysql_stmt_execute(S->stmt)) {
pdo_mysql_error_stmt(stmt);
PDO_DBG_RETURN(0);
@@ -305,7 +305,7 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt TSRMLS_DC) /
}
}
}
-
+
pdo_mysql_stmt_set_row_count(stmt TSRMLS_CC);
PDO_DBG_RETURN(1);
}
@@ -322,7 +322,7 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
if (S->stmt) {
PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt));
}
-
+
/* ensure that we free any previous unfetched results */
if (S->result) {
mysql_free_result(S->result);
@@ -357,8 +357,8 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
}
if (!mysqlnd_stmt_more_results(S->stmt)) {
- /*
- MySQL gives us n + 1 result sets for
+ /*
+ MySQL gives us n + 1 result sets for
CALL proc() and n result sets returned by the proc itself.
Result set n + 1 is about the procedure call itself.
As the PDO emulation does not return it, we skip it as well
@@ -413,7 +413,19 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
}
ret = mysql_next_result(H->server);
-
+#if PDO_USE_MYSQLND
+ /* for whatever reason mysqlnd breaks with libmysql compatibility at the C level, no -1 */
+ if (PASS != ret) {
+ pdo_mysql_error_stmt(stmt);
+ PDO_DBG_RETURN(0);
+ }
+ if (mysql_more_results(H->server)) {
+ PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt TSRMLS_CC));
+ } else {
+ /* No more results */
+ PDO_DBG_RETURN(0);
+ }
+#else
if (ret > 0) {
pdo_mysql_error_stmt(stmt);
PDO_DBG_RETURN(0);
@@ -423,6 +435,7 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
} else {
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt TSRMLS_CC));
}
+#endif
}
/* }}} */
@@ -444,7 +457,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
#ifndef PDO_USE_MYSQLND
PDO_MYSQL_PARAM_BIND *b;
#endif
- pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
+ pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
PDO_DBG_ENTER("pdo_mysql_stmt_param_hook");
PDO_DBG_INF_FMT("stmt=%p", S->stmt);
@@ -484,18 +497,18 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
}
#else
b = (PDO_MYSQL_PARAM_BIND*)param->driver_data;
- *b->is_null = 0;
- if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL ||
- Z_TYPE_P(param->parameter) == IS_NULL) {
- *b->is_null = 1;
- b->buffer_type = MYSQL_TYPE_STRING;
- b->buffer = NULL;
- b->buffer_length = 0;
- *b->length = 0;
+ *b->is_null = 0;
+ if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL ||
+ Z_TYPE_P(param->parameter) == IS_NULL) {
+ *b->is_null = 1;
+ b->buffer_type = MYSQL_TYPE_STRING;
+ b->buffer = NULL;
+ b->buffer_length = 0;
+ *b->length = 0;
PDO_DBG_RETURN(1);
- }
+ }
#endif /* PDO_USE_MYSQLND */
-
+
switch (PDO_PARAM_TYPE(param->param_type)) {
case PDO_PARAM_STMT:
PDO_DBG_RETURN(0);
@@ -519,7 +532,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
default:
;
}
-
+
#if PDO_USE_MYSQLND
/* Is it really correct to check the zval's type? - But well, that's what the old code below does, too */
PDO_DBG_INF_FMT("param->parameter->type=%d", Z_TYPE_P(param->parameter));
@@ -540,9 +553,9 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
default:
PDO_DBG_RETURN(0);
}
-
+
PDO_DBG_RETURN(1);
-#else
+#else
PDO_DBG_INF_FMT("param->parameter->type=%d", Z_TYPE_P(param->parameter));
switch (Z_TYPE_P(param->parameter)) {
case IS_STRING:
@@ -597,7 +610,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
}
#else
int ret;
-
+
if (S->stmt) {
ret = mysql_stmt_fetch(S->stmt);
@@ -617,7 +630,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
PDO_DBG_RETURN(1);
}
#endif /* PDO_USE_MYSQLND */
-
+
if (!S->result) {
strcpy(stmt->error_code, "HY000");
PDO_DBG_RETURN(0);
@@ -637,7 +650,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
pdo_mysql_error_stmt(stmt);
}
PDO_DBG_RETURN(0);
- }
+ }
S->current_lengths = mysql_fetch_lengths(S->result);
PDO_DBG_RETURN(1);
@@ -661,8 +674,8 @@ static int pdo_mysql_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{
PDO_DBG_RETURN(0);
}
- /* fetch all on demand, this seems easiest
- ** if we've been here before bail out
+ /* fetch all on demand, this seems easiest
+ ** if we've been here before bail out
*/
if (cols[0].name) {
PDO_DBG_RETURN(1);
@@ -678,10 +691,10 @@ static int pdo_mysql_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{
cols[i].namelen = namelen;
cols[i].name = estrndup(S->fields[i].name, namelen);
}
-
+
cols[i].precision = S->fields[i].decimals;
cols[i].maxlen = S->fields[i].length;
-
+
#ifdef PDO_USE_MYSQLND
if (S->stmt) {
cols[i].param_type = PDO_PARAM_ZVAL;
@@ -799,7 +812,7 @@ static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_va
const MYSQL_FIELD *F;
zval *flags;
char *str;
-
+
PDO_DBG_ENTER("pdo_mysql_stmt_col_meta");
PDO_DBG_INF_FMT("stmt=%p", S->stmt);
if (!S->result) {
@@ -857,7 +870,7 @@ static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_va
break;
}
#endif
-
+
add_assoc_zval(return_value, "flags", flags);
add_assoc_string(return_value, "table", (char *) (F->table?F->table:""), 1);
PDO_DBG_RETURN(SUCCESS);
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
index ea69c3c11..b5a8058da 100755..100644
--- a/ext/pdo_mysql/pdo_mysql.c
+++ b/ext/pdo_mysql/pdo_mysql.c
@@ -118,6 +118,10 @@ static PHP_MINIT_FUNCTION(pdo_mysql)
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SSL_CA", (long)PDO_MYSQL_ATTR_SSL_CA);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SSL_CAPATH", (long)PDO_MYSQL_ATTR_SSL_CAPATH);
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SSL_CIPHER", (long)PDO_MYSQL_ATTR_SSL_CIPHER);
+#if MYSQL_VERSION_ID > 50605 || defined(MYSQLI_USE_MYSQLND)
+ REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_SERVER_PUBLIC_KEY", (long)PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY);
+#endif
+
#ifdef PDO_USE_MYSQLND
mysqlnd_reverse_api_register_api(&pdo_mysql_reverse_api TSRMLS_CC);
diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h
index 87c795625..87c795625 100755..100644
--- a/ext/pdo_mysql/php_pdo_mysql.h
+++ b/ext/pdo_mysql/php_pdo_mysql.h
diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h
index 0b6d7752d..32cf03915 100755..100644
--- a/ext/pdo_mysql/php_pdo_mysql_int.h
+++ b/ext/pdo_mysql/php_pdo_mysql_int.h
@@ -170,7 +170,10 @@ enum {
PDO_MYSQL_ATTR_SSL_CERT,
PDO_MYSQL_ATTR_SSL_CA,
PDO_MYSQL_ATTR_SSL_CAPATH,
- PDO_MYSQL_ATTR_SSL_CIPHER
+ PDO_MYSQL_ATTR_SSL_CIPHER,
+#if MYSQL_VERSION_ID > 50605 || defined(MYSQLI_USE_MYSQLND)
+ PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY
+#endif
};
#endif
diff --git a/ext/pdo_mysql/tests/bug_41997.phpt b/ext/pdo_mysql/tests/bug_41997.phpt
index ee0cfe9ac..38d55a019 100644
--- a/ext/pdo_mysql/tests/bug_41997.phpt
+++ b/ext/pdo_mysql/tests/bug_41997.phpt
@@ -2,12 +2,11 @@
PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries)
--SKIPIF--
<?php
-if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
-require dirname(__FILE__) . '/config.inc';
-require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
-PDOTest::skip();
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
-$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$db = MySQLPDOTest::factory();
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
@@ -20,9 +19,8 @@ if ($version < 50000)
?>
--FILE--
<?php
-require dirname(__FILE__) . '/config.inc';
-require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
-$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+require dirname(__FILE__) . '/mysql_pdo_test.inc';
+$db = MySQLPDOTest::factory();
$db->exec('DROP PROCEDURE IF EXISTS p');
$db->exec('CREATE PROCEDURE p() BEGIN SELECT 1 AS "one"; END');
diff --git a/ext/pdo_mysql/tests/bug_61207.phpt b/ext/pdo_mysql/tests/bug_61207.phpt
index 917b32218..411b39a70 100644
--- a/ext/pdo_mysql/tests/bug_61207.phpt
+++ b/ext/pdo_mysql/tests/bug_61207.phpt
@@ -2,27 +2,27 @@
PDO MySQL Bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work)
--SKIPIF--
<?php
-if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
-require dirname(__FILE__) . '/config.inc';
-require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
-PDOTest::skip();
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+
?>
--FILE--
<?php
-require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+$db = MySQLPDOTest::factory();
-$link = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$db->query('DROP TABLE IF EXISTS test');
+$db->query('create table `test`( `id` int )');
-$link->query('create table `bug61207`( `id` int )');
+$handle1 = $db->prepare('insert into test(id) values(1);
+ select * from test where id = ?;
+ update test set id = 2 where id = ?;');
-$handle1 = $link->prepare('insert into bug61207(id) values(1);
- select * from bug61207 where id = ?;
- update bug61207 set id = 2 where id = ?;');
-
$handle1->bindValue('1', '1');
$handle1->bindValue('2', '1');
-
-$handle1->execute();
+
+$handle1->execute();
$i = 1;
print("Handle 1:\n");
do {
@@ -31,9 +31,9 @@ do {
print("Results detected\n");
} while($handle1->nextRowset());
-$handle2 = $link->prepare('select * from bug61207 where id = ?;
- update bug61207 set id = 1 where id = ?;');
-
+$handle2 = $db->prepare('select * from test where id = ?;
+ update test set id = 1 where id = ?;');
+
$handle2->bindValue('1', '2');
$handle2->bindValue('2', '2');
@@ -47,9 +47,9 @@ do {
print("Results detected\n");
} while($handle2->nextRowset());
-$handle3 = $link->prepare('update bug61207 set id = 2 where id = ?;
- select * from bug61207 where id = ?;');
-
+$handle3 = $db->prepare('update test set id = 2 where id = ?;
+ select * from test where id = ?;');
+
$handle3->bindValue('1', '1');
$handle3->bindValue('2', '2');
@@ -63,15 +63,15 @@ do {
print("Results detected\n");
} while($handle3->nextRowset());
-$handle4 = $link->prepare('insert into bug61207(id) values(3);
- update bug61207 set id = 2 where id = ?;
- select * from bug61207 where id = ?;');
-
+$handle4 = $db->prepare('insert into test(id) values(3);
+ update test set id = 2 where id = ?;
+ select * from test where id = ?;');
+
$handle4->bindValue('1', '3');
$handle4->bindValue('2', '2');
-
+
$handle4->execute();
-
+
$i = 1;
print("Handle 4:\n");
do {
@@ -80,7 +80,12 @@ do {
print("Results detected\n");
} while($handle1->nextRowset());
-$link->query("DROP TABLE bug61207");
+$db->query("DROP TABLE test");
+?>
+--CLEAN--
+<?php
+require dirname(__FILE__) . '/mysql_pdo_test.inc';
+MySQLPDOTest::dropTestTable();
?>
--EXPECT--
Handle 1:
diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt
index 3c21d0f32..4d0868ae7 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt
@@ -23,7 +23,7 @@ $db = MySQLPDOTest::factory();
printf("[002] Wonderful, I can change the client version!\n");
$new_info = $db->getAttribute(PDO::ATTR_SERVER_INFO);
- if ($new_info !== $info)
+ if (soundex($new_info) != soundex($info))
printf("[003] Did we change it from '%s' to '%s'?\n", $info, $info);
// lets hope we always run this in the same second as we did run the server info request...
diff --git a/ext/pdo_mysql/tests/skipif.inc b/ext/pdo_mysql/tests/skipif.inc
index d48670aec..d48670aec 100755..100644
--- a/ext/pdo_mysql/tests/skipif.inc
+++ b/ext/pdo_mysql/tests/skipif.inc
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index cb920ab14..cb920ab14 100755..100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
index da3542559..da3542559 100755..100644
--- a/ext/pdo_oci/oci_statement.c
+++ b/ext/pdo_oci/oci_statement.c
diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c
index a0a05839e..a0a05839e 100755..100644
--- a/ext/pdo_oci/pdo_oci.c
+++ b/ext/pdo_oci/pdo_oci.c
diff --git a/ext/pdo_oci/php_pdo_oci.h b/ext/pdo_oci/php_pdo_oci.h
index ae96edc7c..ae96edc7c 100755..100644
--- a/ext/pdo_oci/php_pdo_oci.h
+++ b/ext/pdo_oci/php_pdo_oci.h
diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h
index 990225493..990225493 100755..100644
--- a/ext/pdo_oci/php_pdo_oci_int.h
+++ b/ext/pdo_oci/php_pdo_oci_int.h
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 84a147b80..ca2808c6f 100755..100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -114,7 +114,7 @@ void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement,
* diagnostic records (which can be generated by PRINT statements
* in the query, for instance). */
while (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) {
- char discard_state[5];
+ char discard_state[6];
char discard_buf[1024];
SQLINTEGER code;
rc = SQLGetDiagRec(htype, eh, recno++, discard_state, &code,
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index e700ef8c3..e700ef8c3 100755..100644
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c
index 72553c421..72553c421 100755..100644
--- a/ext/pdo_odbc/pdo_odbc.c
+++ b/ext/pdo_odbc/pdo_odbc.c
diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h
index e200d7ce6..e200d7ce6 100755..100644
--- a/ext/pdo_odbc/php_pdo_odbc_int.h
+++ b/ext/pdo_odbc/php_pdo_odbc_int.h
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index c35ee33c7..1dc0d58e9 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -362,8 +362,20 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
}
break;
}
+ } else {
+#endif
+ if (param->is_param) {
+ /* We need to manually convert to a pg native boolean value */
+ if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL &&
+ ((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
+ SEPARATE_ZVAL(&param->parameter);
+ param->param_type = PDO_PARAM_STR;
+ ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1);
+ }
+ }
+#if HAVE_PQPREPARE
}
-#endif
+#endif
return 1;
}
diff --git a/ext/pdo_pgsql/tests/bug62593.phpt b/ext/pdo_pgsql/tests/bug62593.phpt
new file mode 100644
index 000000000..e3ebf46ed
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug62593.phpt
@@ -0,0 +1,51 @@
+--TEST--
+PDO PgSQL Bug #62593 (Emulate prepares behave strangely with PARAM_BOOL)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
+$errors = array();
+
+$value = true;
+$query = $db->prepare('SELECT :foo IS FALSE as val_is_false');
+$query->bindValue(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($value);
+
+$query->bindValue(':foo', 0, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+
+// Verify bindParam maintains reference and only passes when execute is called
+$value = true;
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$value = false;
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($value);
+
+$expect = 'No errors found';
+
+foreach ($errors as $error)
+{
+ if (strpos('Invalid text representation', $error[2]) !== false)
+ {
+ $expect = 'Invalid boolean found';
+ }
+}
+echo $expect;
+?>
+--EXPECTF--
+bool(true)
+bool(false)
+No errors found
diff --git a/ext/pgsql/tests/22pg_fetch_object.phpt b/ext/pgsql/tests/22pg_fetch_object.phpt
index 76a3fbeed..76a3fbeed 100755..100644
--- a/ext/pgsql/tests/22pg_fetch_object.phpt
+++ b/ext/pgsql/tests/22pg_fetch_object.phpt
diff --git a/ext/pgsql/tests/80_bug24499.phpt b/ext/pgsql/tests/80_bug24499.phpt
index 32e789de8..32e789de8 100755..100644
--- a/ext/pgsql/tests/80_bug24499.phpt
+++ b/ext/pgsql/tests/80_bug24499.phpt
diff --git a/ext/pgsql/tests/80_bug27597.phpt b/ext/pgsql/tests/80_bug27597.phpt
index 7d5b5db89..7d5b5db89 100755..100644
--- a/ext/pgsql/tests/80_bug27597.phpt
+++ b/ext/pgsql/tests/80_bug27597.phpt
diff --git a/ext/pgsql/tests/80_bug32223.phpt b/ext/pgsql/tests/80_bug32223.phpt
index 573742c6e..573742c6e 100755..100644
--- a/ext/pgsql/tests/80_bug32223.phpt
+++ b/ext/pgsql/tests/80_bug32223.phpt
diff --git a/ext/pgsql/tests/80_bug32223b.phpt b/ext/pgsql/tests/80_bug32223b.phpt
index aada3f01b..aada3f01b 100755..100644
--- a/ext/pgsql/tests/80_bug32223b.phpt
+++ b/ext/pgsql/tests/80_bug32223b.phpt
diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt
index a95cea711..a95cea711 100755..100644
--- a/ext/pgsql/tests/80_bug36625.phpt
+++ b/ext/pgsql/tests/80_bug36625.phpt
diff --git a/ext/phar/phar/clicommand.inc b/ext/phar/phar/clicommand.inc
index 79bf5c885..79bf5c885 100755..100644
--- a/ext/phar/phar/clicommand.inc
+++ b/ext/phar/phar/clicommand.inc
diff --git a/ext/phar/phar/directorygraphiterator.inc b/ext/phar/phar/directorygraphiterator.inc
index 5a658ddab..5a658ddab 100755..100644
--- a/ext/phar/phar/directorygraphiterator.inc
+++ b/ext/phar/phar/directorygraphiterator.inc
diff --git a/ext/phar/phar/directorytreeiterator.inc b/ext/phar/phar/directorytreeiterator.inc
index 9ed2e1a1b..9ed2e1a1b 100755..100644
--- a/ext/phar/phar/directorytreeiterator.inc
+++ b/ext/phar/phar/directorytreeiterator.inc
diff --git a/ext/phar/phar/invertedregexiterator.inc b/ext/phar/phar/invertedregexiterator.inc
index aec87e6ab..aec87e6ab 100755..100644
--- a/ext/phar/phar/invertedregexiterator.inc
+++ b/ext/phar/phar/invertedregexiterator.inc
diff --git a/ext/phar/phar/phar.inc b/ext/phar/phar/phar.inc
index 7e7d61851..7e7d61851 100755..100644
--- a/ext/phar/phar/phar.inc
+++ b/ext/phar/phar/phar.inc
diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc
index cb343675b..cb343675b 100755..100644
--- a/ext/phar/phar/pharcommand.inc
+++ b/ext/phar/phar/pharcommand.inc
diff --git a/ext/phar/phar_path_check.c b/ext/phar/phar_path_check.c
index 7ca339d26..7a8ea6089 100644
--- a/ext/phar/phar_path_check.c
+++ b/ext/phar/phar_path_check.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Fri Feb 25 04:35:39 2011 */
+/* Generated by re2c 0.13.5 on Sun Jan 1 10:36:11 2012 */
#line 1 "ext/phar/phar_path_check.re"
/*
+----------------------------------------------------------------------+
diff --git a/ext/phar/tests/003a.phpt b/ext/phar/tests/003a.phpt
index 37e31072d..37e31072d 100755..100644
--- a/ext/phar/tests/003a.phpt
+++ b/ext/phar/tests/003a.phpt
diff --git a/ext/phar/tests/015b.phpt b/ext/phar/tests/015b.phpt
index 08ead2d9c..08ead2d9c 100755..100644
--- a/ext/phar/tests/015b.phpt
+++ b/ext/phar/tests/015b.phpt
diff --git a/ext/phar/tests/016b.phpt b/ext/phar/tests/016b.phpt
index 8fe66826d..8fe66826d 100755..100644
--- a/ext/phar/tests/016b.phpt
+++ b/ext/phar/tests/016b.phpt
diff --git a/ext/phar/tests/019b.phpt b/ext/phar/tests/019b.phpt
index 5a0ef7133..5a0ef7133 100755..100644
--- a/ext/phar/tests/019b.phpt
+++ b/ext/phar/tests/019b.phpt
diff --git a/ext/phar/tests/019c.phpt b/ext/phar/tests/019c.phpt
index 2cb508c46..2cb508c46 100755..100644
--- a/ext/phar/tests/019c.phpt
+++ b/ext/phar/tests/019c.phpt
diff --git a/ext/phar/tests/023.phpt b/ext/phar/tests/023.phpt
index 808f91dea..808f91dea 100755..100644
--- a/ext/phar/tests/023.phpt
+++ b/ext/phar/tests/023.phpt
diff --git a/ext/phar/tests/024.phpt b/ext/phar/tests/024.phpt
index ad30d2644..ad30d2644 100755..100644
--- a/ext/phar/tests/024.phpt
+++ b/ext/phar/tests/024.phpt
diff --git a/ext/phar/tests/025.phpt b/ext/phar/tests/025.phpt
index bbb5bc4e8..bbb5bc4e8 100755..100644
--- a/ext/phar/tests/025.phpt
+++ b/ext/phar/tests/025.phpt
diff --git a/ext/phar/tests/026.phpt b/ext/phar/tests/026.phpt
index 696fbcf41..696fbcf41 100755..100644
--- a/ext/phar/tests/026.phpt
+++ b/ext/phar/tests/026.phpt
diff --git a/ext/phar/tests/027.phpt b/ext/phar/tests/027.phpt
index 8736efbeb..8736efbeb 100755..100644
--- a/ext/phar/tests/027.phpt
+++ b/ext/phar/tests/027.phpt
diff --git a/ext/phar/tests/028.phpt b/ext/phar/tests/028.phpt
index 087f82277..087f82277 100755..100644
--- a/ext/phar/tests/028.phpt
+++ b/ext/phar/tests/028.phpt
diff --git a/ext/phar/tests/029.phpt b/ext/phar/tests/029.phpt
index 41fcec03e..41fcec03e 100755..100644
--- a/ext/phar/tests/029.phpt
+++ b/ext/phar/tests/029.phpt
diff --git a/ext/phar/tests/030.phpt b/ext/phar/tests/030.phpt
index e1e94dba8..e1e94dba8 100755..100644
--- a/ext/phar/tests/030.phpt
+++ b/ext/phar/tests/030.phpt
diff --git a/ext/phar/tests/031.phpt b/ext/phar/tests/031.phpt
index 4d5988621..4d5988621 100755..100644
--- a/ext/phar/tests/031.phpt
+++ b/ext/phar/tests/031.phpt
diff --git a/ext/phar/tests/032.phpt b/ext/phar/tests/032.phpt
index faf3dcbf5..faf3dcbf5 100755..100644
--- a/ext/phar/tests/032.phpt
+++ b/ext/phar/tests/032.phpt
diff --git a/ext/phar/tests/create_new_and_modify.phpt b/ext/phar/tests/create_new_and_modify.phpt
index d6c469d9c..d6c469d9c 100755..100644
--- a/ext/phar/tests/create_new_and_modify.phpt
+++ b/ext/phar/tests/create_new_and_modify.phpt
diff --git a/ext/phar/tests/create_new_phar_b.phpt b/ext/phar/tests/create_new_phar_b.phpt
index 39fc31e27..39fc31e27 100755..100644
--- a/ext/phar/tests/create_new_phar_b.phpt
+++ b/ext/phar/tests/create_new_phar_b.phpt
diff --git a/ext/phar/tests/create_new_phar_c.phpt b/ext/phar/tests/create_new_phar_c.phpt
index 6beaa2eb6..6beaa2eb6 100755..100644
--- a/ext/phar/tests/create_new_phar_c.phpt
+++ b/ext/phar/tests/create_new_phar_c.phpt
diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt
index d3fc03586..d3fc03586 100755..100644
--- a/ext/phar/tests/create_path_error.phpt
+++ b/ext/phar/tests/create_path_error.phpt
diff --git a/ext/phar/tests/delete_in_phar_b.phpt b/ext/phar/tests/delete_in_phar_b.phpt
index a6d5b3a35..a6d5b3a35 100755..100644
--- a/ext/phar/tests/delete_in_phar_b.phpt
+++ b/ext/phar/tests/delete_in_phar_b.phpt
diff --git a/ext/phar/tests/metadata_write.phpt b/ext/phar/tests/metadata_write.phpt
index 1aaa30d63..1aaa30d63 100755..100644
--- a/ext/phar/tests/metadata_write.phpt
+++ b/ext/phar/tests/metadata_write.phpt
diff --git a/ext/phar/tests/metadata_write_commit.phpt b/ext/phar/tests/metadata_write_commit.phpt
index fd2f10762..fd2f10762 100755..100644
--- a/ext/phar/tests/metadata_write_commit.phpt
+++ b/ext/phar/tests/metadata_write_commit.phpt
diff --git a/ext/phar/tests/open_for_write_existing_b.phpt b/ext/phar/tests/open_for_write_existing_b.phpt
index ef48906de..ef48906de 100755..100644
--- a/ext/phar/tests/open_for_write_existing_b.phpt
+++ b/ext/phar/tests/open_for_write_existing_b.phpt
diff --git a/ext/phar/tests/open_for_write_existing_c.phpt b/ext/phar/tests/open_for_write_existing_c.phpt
index f64d538ef..f64d538ef 100755..100644
--- a/ext/phar/tests/open_for_write_existing_c.phpt
+++ b/ext/phar/tests/open_for_write_existing_c.phpt
diff --git a/ext/phar/tests/open_for_write_newfile_b.phpt b/ext/phar/tests/open_for_write_newfile_b.phpt
index 45131c489..45131c489 100755..100644
--- a/ext/phar/tests/open_for_write_newfile_b.phpt
+++ b/ext/phar/tests/open_for_write_newfile_b.phpt
diff --git a/ext/phar/tests/open_for_write_newfile_c.phpt b/ext/phar/tests/open_for_write_newfile_c.phpt
index d79005111..d79005111 100755..100644
--- a/ext/phar/tests/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/open_for_write_newfile_c.phpt
diff --git a/ext/phar/tests/phar_begin_setstub_commit.phpt b/ext/phar/tests/phar_begin_setstub_commit.phpt
index 9d3e38323..9d3e38323 100755..100644
--- a/ext/phar/tests/phar_begin_setstub_commit.phpt
+++ b/ext/phar/tests/phar_begin_setstub_commit.phpt
diff --git a/ext/phar/tests/phar_commitwrite.phpt b/ext/phar/tests/phar_commitwrite.phpt
index 8e3668133..36d473e5c 100644
--- a/ext/phar/tests/phar_commitwrite.phpt
+++ b/ext/phar/tests/phar_commitwrite.phpt
@@ -39,4 +39,4 @@ Phar::mapPhar('brandnewphar.phar');
include 'phar://brandnewphar.phar/startup.php';
__HALT_COMPILER(); ?>
"
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_create_in_cwd.phpt b/ext/phar/tests/phar_create_in_cwd.phpt
index 1828fe745..4b0e6594f 100644
--- a/ext/phar/tests/phar_create_in_cwd.phpt
+++ b/ext/phar/tests/phar_create_in_cwd.phpt
@@ -42,4 +42,4 @@ Phar::mapPhar('brandnewphar.phar');
include 'phar://brandnewphar.phar/startup.php';
__HALT_COMPILER(); ?>
"
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_gobyebye.phpt b/ext/phar/tests/phar_gobyebye.phpt
index 93e153bdf..608e95076 100644
--- a/ext/phar/tests/phar_gobyebye.phpt
+++ b/ext/phar/tests/phar_gobyebye.phpt
@@ -44,4 +44,4 @@ bool(false)
bool(false)
Warning: opendir(foo/hi): failed to open dir: No such file or directory in phar://%sphar_gobyebye.phar.php/foo/hi on line %d
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_mount.phpt b/ext/phar/tests/phar_mount.phpt
index 73bd489a2..80f8cda38 100644
--- a/ext/phar/tests/phar_mount.phpt
+++ b/ext/phar/tests/phar_mount.phpt
@@ -60,4 +60,4 @@ Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.tar failed
Mounting of /oops to /home/oops/../../etc/passwd: within phar %sphar_mount.phar.php failed
<?php
$fname = dirname(__FILE__) . '/' . basename(
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/phar/tests/phar_offset_get_error.phpt b/ext/phar/tests/phar_offset_get_error.phpt
index dade4726d..dade4726d 100755..100644
--- a/ext/phar/tests/phar_offset_get_error.phpt
+++ b/ext/phar/tests/phar_offset_get_error.phpt
diff --git a/ext/phar/tests/phar_oo_001.phpt b/ext/phar/tests/phar_oo_001.phpt
index 7a81bbb4b..7a81bbb4b 100755..100644
--- a/ext/phar/tests/phar_oo_001.phpt
+++ b/ext/phar/tests/phar_oo_001.phpt
diff --git a/ext/phar/tests/phar_oo_002.phpt b/ext/phar/tests/phar_oo_002.phpt
index 3754151d4..3754151d4 100755..100644
--- a/ext/phar/tests/phar_oo_002.phpt
+++ b/ext/phar/tests/phar_oo_002.phpt
diff --git a/ext/phar/tests/phar_oo_003.phpt b/ext/phar/tests/phar_oo_003.phpt
index ccaf7c65f..ccaf7c65f 100755..100644
--- a/ext/phar/tests/phar_oo_003.phpt
+++ b/ext/phar/tests/phar_oo_003.phpt
diff --git a/ext/phar/tests/phar_oo_004.phpt b/ext/phar/tests/phar_oo_004.phpt
index ba6774984..ba6774984 100755..100644
--- a/ext/phar/tests/phar_oo_004.phpt
+++ b/ext/phar/tests/phar_oo_004.phpt
diff --git a/ext/phar/tests/phar_oo_005.phpt b/ext/phar/tests/phar_oo_005.phpt
index cb3f29872..cb3f29872 100755..100644
--- a/ext/phar/tests/phar_oo_005.phpt
+++ b/ext/phar/tests/phar_oo_005.phpt
diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt
index 556c98ce0..556c98ce0 100755..100644
--- a/ext/phar/tests/phar_oo_006.phpt
+++ b/ext/phar/tests/phar_oo_006.phpt
diff --git a/ext/phar/tests/phar_oo_007.phpt b/ext/phar/tests/phar_oo_007.phpt
index 788b11f1f..788b11f1f 100755..100644
--- a/ext/phar/tests/phar_oo_007.phpt
+++ b/ext/phar/tests/phar_oo_007.phpt
diff --git a/ext/phar/tests/phar_oo_008.phpt b/ext/phar/tests/phar_oo_008.phpt
index 80d1ece0c..80d1ece0c 100755..100644
--- a/ext/phar/tests/phar_oo_008.phpt
+++ b/ext/phar/tests/phar_oo_008.phpt
diff --git a/ext/phar/tests/phar_oo_009.phpt b/ext/phar/tests/phar_oo_009.phpt
index 6abd03ee3..6abd03ee3 100755..100644
--- a/ext/phar/tests/phar_oo_009.phpt
+++ b/ext/phar/tests/phar_oo_009.phpt
diff --git a/ext/phar/tests/phar_oo_010.phpt b/ext/phar/tests/phar_oo_010.phpt
index 1d3ff7324..1d3ff7324 100755..100644
--- a/ext/phar/tests/phar_oo_010.phpt
+++ b/ext/phar/tests/phar_oo_010.phpt
diff --git a/ext/phar/tests/phar_oo_011b.phpt b/ext/phar/tests/phar_oo_011b.phpt
index 36d9963a2..36d9963a2 100755..100644
--- a/ext/phar/tests/phar_oo_011b.phpt
+++ b/ext/phar/tests/phar_oo_011b.phpt
diff --git a/ext/phar/tests/phar_oo_012b.phpt b/ext/phar/tests/phar_oo_012b.phpt
index 80d8ed8dc..80d8ed8dc 100755..100644
--- a/ext/phar/tests/phar_oo_012b.phpt
+++ b/ext/phar/tests/phar_oo_012b.phpt
diff --git a/ext/phar/tests/phar_oo_compressed_001b.phpt b/ext/phar/tests/phar_oo_compressed_001b.phpt
index 6d4c73286..6d4c73286 100755..100644
--- a/ext/phar/tests/phar_oo_compressed_001b.phpt
+++ b/ext/phar/tests/phar_oo_compressed_001b.phpt
diff --git a/ext/phar/tests/phar_oo_compressed_002.phpt b/ext/phar/tests/phar_oo_compressed_002.phpt
index d4ec5cb72..d4ec5cb72 100755..100644
--- a/ext/phar/tests/phar_oo_compressed_002.phpt
+++ b/ext/phar/tests/phar_oo_compressed_002.phpt
diff --git a/ext/phar/tests/phar_oo_compressed_002b.phpt b/ext/phar/tests/phar_oo_compressed_002b.phpt
index d7213fdba..d7213fdba 100755..100644
--- a/ext/phar/tests/phar_oo_compressed_002b.phpt
+++ b/ext/phar/tests/phar_oo_compressed_002b.phpt
diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt
index bb5d63bcf..bb5d63bcf 100755..100644
--- a/ext/phar/tests/phar_stub_error.phpt
+++ b/ext/phar/tests/phar_stub_error.phpt
diff --git a/ext/phar/tests/phar_stub_write.phpt b/ext/phar/tests/phar_stub_write.phpt
index ecdb3b9b6..ecdb3b9b6 100755..100644
--- a/ext/phar/tests/phar_stub_write.phpt
+++ b/ext/phar/tests/phar_stub_write.phpt
diff --git a/ext/phar/tests/phar_stub_write_file.phpt b/ext/phar/tests/phar_stub_write_file.phpt
index e4c867681..e4c867681 100755..100644
--- a/ext/phar/tests/phar_stub_write_file.phpt
+++ b/ext/phar/tests/phar_stub_write_file.phpt
diff --git a/ext/phar/tests/refcount1_5_2.phpt b/ext/phar/tests/refcount1_5_2.phpt
index bf2c2b76b..bf2c2b76b 100755..100644
--- a/ext/phar/tests/refcount1_5_2.phpt
+++ b/ext/phar/tests/refcount1_5_2.phpt
diff --git a/ext/phar/tests/rename_dir_and_mount.phpt b/ext/phar/tests/rename_dir_and_mount.phpt
index b74f47b91..b74f47b91 100755..100644
--- a/ext/phar/tests/rename_dir_and_mount.phpt
+++ b/ext/phar/tests/rename_dir_and_mount.phpt
diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt
index fa631e618..fa631e618 100755..100644
--- a/ext/phar/tests/tar/open_for_write_existing_b.phpt
+++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt
diff --git a/ext/phar/tests/tar/open_for_write_existing_c.phpt b/ext/phar/tests/tar/open_for_write_existing_c.phpt
index aeb28b02b..aeb28b02b 100755..100644
--- a/ext/phar/tests/tar/open_for_write_existing_c.phpt
+++ b/ext/phar/tests/tar/open_for_write_existing_c.phpt
diff --git a/ext/phar/tests/tar/open_for_write_newfile_b.phpt b/ext/phar/tests/tar/open_for_write_newfile_b.phpt
index 2ea557b8a..2ea557b8a 100755..100644
--- a/ext/phar/tests/tar/open_for_write_newfile_b.phpt
+++ b/ext/phar/tests/tar/open_for_write_newfile_b.phpt
diff --git a/ext/phar/tests/tar/open_for_write_newfile_c.phpt b/ext/phar/tests/tar/open_for_write_newfile_c.phpt
index f7cbb3a9a..f7cbb3a9a 100755..100644
--- a/ext/phar/tests/tar/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/tar/open_for_write_newfile_c.phpt
diff --git a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt
index d18f32ed3..d18f32ed3 100755..100644
--- a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt
+++ b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt
diff --git a/ext/phar/tests/tar/phar_stub_error.phpt b/ext/phar/tests/tar/phar_stub_error.phpt
index 61532b9b4..61532b9b4 100755..100644
--- a/ext/phar/tests/tar/phar_stub_error.phpt
+++ b/ext/phar/tests/tar/phar_stub_error.phpt
diff --git a/ext/phar/tests/tar/refcount1_5_2.phpt b/ext/phar/tests/tar/refcount1_5_2.phpt
index 18587d91a..18587d91a 100755..100644
--- a/ext/phar/tests/tar/refcount1_5_2.phpt
+++ b/ext/phar/tests/tar/refcount1_5_2.phpt
diff --git a/ext/phar/tests/zip/open_for_write_existing_b.phpt b/ext/phar/tests/zip/open_for_write_existing_b.phpt
index b997c6829..b997c6829 100755..100644
--- a/ext/phar/tests/zip/open_for_write_existing_b.phpt
+++ b/ext/phar/tests/zip/open_for_write_existing_b.phpt
diff --git a/ext/phar/tests/zip/open_for_write_existing_c.phpt b/ext/phar/tests/zip/open_for_write_existing_c.phpt
index 313ee4ab3..313ee4ab3 100755..100644
--- a/ext/phar/tests/zip/open_for_write_existing_c.phpt
+++ b/ext/phar/tests/zip/open_for_write_existing_c.phpt
diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt
index 96fd2e426..96fd2e426 100755..100644
--- a/ext/phar/tests/zip/open_for_write_newfile_b.phpt
+++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt
diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
index ef580cb22..ef580cb22 100755..100644
--- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
diff --git a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt
index dc59f2f3a..dc59f2f3a 100755..100644
--- a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt
+++ b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt
diff --git a/ext/phar/tests/zip/phar_stub_error.phpt b/ext/phar/tests/zip/phar_stub_error.phpt
index dafb312cf..dafb312cf 100755..100644
--- a/ext/phar/tests/zip/phar_stub_error.phpt
+++ b/ext/phar/tests/zip/phar_stub_error.phpt
diff --git a/ext/phar/tests/zip/refcount1_5_2.phpt b/ext/phar/tests/zip/refcount1_5_2.phpt
index f3b2771f4..f3b2771f4 100755..100644
--- a/ext/phar/tests/zip/refcount1_5_2.phpt
+++ b/ext/phar/tests/zip/refcount1_5_2.phpt
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 5fcb2b657..f674bca4f 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -2118,8 +2118,7 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
#ifdef PHAR_HAVE_OPENSSL
BIO *in;
EVP_PKEY *key;
- EVP_MD *mdtype = (EVP_MD *) EVP_sha1();
- EVP_MD_CTX md_ctx;
+ EVP_MD_CTX *md_ctx;
in = BIO_new_mem_buf(PHAR_G(openssl_privatekey), PHAR_G(openssl_privatekey_len));
@@ -2140,15 +2139,30 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
return FAILURE;
}
+ md_ctx = EVP_MD_CTX_create();
+
siglen = EVP_PKEY_size(key);
sigbuf = emalloc(siglen + 1);
- EVP_SignInit(&md_ctx, mdtype);
+
+ if (!EVP_SignInit(md_ctx, EVP_sha1())) {
+ efree(sigbuf);
+ if (error) {
+ spprintf(error, 0, "unable to initialize openssl signature for phar \"%s\"", phar->fname);
+ }
+ return FAILURE;
+ }
while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) {
- EVP_SignUpdate(&md_ctx, buf, sig_len);
+ if (!EVP_SignUpdate(md_ctx, buf, sig_len)) {
+ efree(sigbuf);
+ if (error) {
+ spprintf(error, 0, "unable to update the openssl signature for phar \"%s\"", phar->fname);
+ }
+ return FAILURE;
+ }
}
- if (!EVP_SignFinal (&md_ctx, sigbuf,(unsigned int *)&siglen, key)) {
+ if (!EVP_SignFinal (md_ctx, sigbuf,(unsigned int *)&siglen, key)) {
efree(sigbuf);
if (error) {
spprintf(error, 0, "unable to write phar \"%s\" with requested openssl signature", phar->fname);
@@ -2157,7 +2171,7 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
}
sigbuf[siglen] = '\0';
- EVP_MD_CTX_cleanup(&md_ctx);
+ EVP_MD_CTX_destroy(md_ctx);
#else
sigbuf = NULL;
siglen = 0;
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 7c9981924..7c51cf6cc 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3086,6 +3086,14 @@ ZEND_METHOD(reflection_function, isDeprecated)
}
/* }}} */
+/* {{{ proto public bool ReflectionFunction::isGenerator()
+ Returns whether this function is a generator */
+ZEND_METHOD(reflection_function, isGenerator)
+{
+ _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_GENERATOR);
+}
+/* }}} */
+
/* {{{ proto public bool ReflectionFunction::inNamespace()
Returns whether this function is defined in namespace */
ZEND_METHOD(reflection_function, inNamespace)
@@ -4465,7 +4473,7 @@ ZEND_METHOD(reflection_class, getTraitAliases)
zend_trait_method_reference *cur_ref = ce->trait_aliases[i]->trait_method;
if (ce->trait_aliases[i]->alias) {
- method_name_len = spprintf(&method_name, 0, "%s::%s", cur_ref->class_name, cur_ref->method_name);
+ method_name_len = spprintf(&method_name, 0, "%s::%s", cur_ref->ce->name, cur_ref->method_name);
add_assoc_stringl_ex(return_value, ce->trait_aliases[i]->alias, ce->trait_aliases[i]->alias_len + 1, method_name, method_name_len, 0);
}
i++;
@@ -5696,6 +5704,7 @@ static const zend_function_entry reflection_function_abstract_functions[] = {
ZEND_ME(reflection_function, isDeprecated, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, isInternal, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, isUserDefined, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_function, isGenerator, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, getClosureThis, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, getClosureScopeClass, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, getDocComment, arginfo_reflection__void, 0)
diff --git a/ext/reflection/tests/001.phpt b/ext/reflection/tests/001.phpt
index f68afc950..f68afc950 100755..100644
--- a/ext/reflection/tests/001.phpt
+++ b/ext/reflection/tests/001.phpt
diff --git a/ext/reflection/tests/002.phpt b/ext/reflection/tests/002.phpt
index 833fed4aa..833fed4aa 100755..100644
--- a/ext/reflection/tests/002.phpt
+++ b/ext/reflection/tests/002.phpt
diff --git a/ext/reflection/tests/003.phpt b/ext/reflection/tests/003.phpt
index 80bf0a651..80bf0a651 100755..100644
--- a/ext/reflection/tests/003.phpt
+++ b/ext/reflection/tests/003.phpt
diff --git a/ext/reflection/tests/004.phpt b/ext/reflection/tests/004.phpt
index 2c81c506b..2c81c506b 100755..100644
--- a/ext/reflection/tests/004.phpt
+++ b/ext/reflection/tests/004.phpt
diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt
index f337e44ae..f337e44ae 100755..100644
--- a/ext/reflection/tests/005.phpt
+++ b/ext/reflection/tests/005.phpt
diff --git a/ext/reflection/tests/006.phpt b/ext/reflection/tests/006.phpt
index 89c438765..89c438765 100755..100644
--- a/ext/reflection/tests/006.phpt
+++ b/ext/reflection/tests/006.phpt
diff --git a/ext/reflection/tests/007.phpt b/ext/reflection/tests/007.phpt
index 004158ccf..004158ccf 100755..100644
--- a/ext/reflection/tests/007.phpt
+++ b/ext/reflection/tests/007.phpt
diff --git a/ext/reflection/tests/008.phpt b/ext/reflection/tests/008.phpt
index 2abdcdb57..2abdcdb57 100755..100644
--- a/ext/reflection/tests/008.phpt
+++ b/ext/reflection/tests/008.phpt
diff --git a/ext/reflection/tests/009.phpt b/ext/reflection/tests/009.phpt
index e96b21eba..e96b21eba 100755..100644
--- a/ext/reflection/tests/009.phpt
+++ b/ext/reflection/tests/009.phpt
diff --git a/ext/reflection/tests/010.phpt b/ext/reflection/tests/010.phpt
index 8f92feea0..8f92feea0 100755..100644
--- a/ext/reflection/tests/010.phpt
+++ b/ext/reflection/tests/010.phpt
diff --git a/ext/reflection/tests/011.phpt b/ext/reflection/tests/011.phpt
index b39be37c9..b39be37c9 100755..100644
--- a/ext/reflection/tests/011.phpt
+++ b/ext/reflection/tests/011.phpt
diff --git a/ext/reflection/tests/012.phpt b/ext/reflection/tests/012.phpt
index b8a269400..b8a269400 100755..100644
--- a/ext/reflection/tests/012.phpt
+++ b/ext/reflection/tests/012.phpt
diff --git a/ext/reflection/tests/013.phpt b/ext/reflection/tests/013.phpt
index 9ecfa8b66..9ecfa8b66 100755..100644
--- a/ext/reflection/tests/013.phpt
+++ b/ext/reflection/tests/013.phpt
diff --git a/ext/reflection/tests/014.phpt b/ext/reflection/tests/014.phpt
index 8b5955f12..8b5955f12 100755..100644
--- a/ext/reflection/tests/014.phpt
+++ b/ext/reflection/tests/014.phpt
diff --git a/ext/reflection/tests/015.phpt b/ext/reflection/tests/015.phpt
index b17236242..b17236242 100755..100644
--- a/ext/reflection/tests/015.phpt
+++ b/ext/reflection/tests/015.phpt
diff --git a/ext/reflection/tests/016.phpt b/ext/reflection/tests/016.phpt
index d28916525..d28916525 100755..100644
--- a/ext/reflection/tests/016.phpt
+++ b/ext/reflection/tests/016.phpt
diff --git a/ext/reflection/tests/017.phpt b/ext/reflection/tests/017.phpt
index d40c4d83f..d40c4d83f 100755..100644
--- a/ext/reflection/tests/017.phpt
+++ b/ext/reflection/tests/017.phpt
diff --git a/ext/reflection/tests/018.phpt b/ext/reflection/tests/018.phpt
index fbda5d62d..fbda5d62d 100755..100644
--- a/ext/reflection/tests/018.phpt
+++ b/ext/reflection/tests/018.phpt
diff --git a/ext/reflection/tests/019.phpt b/ext/reflection/tests/019.phpt
index b6ac20c6b..b6ac20c6b 100755..100644
--- a/ext/reflection/tests/019.phpt
+++ b/ext/reflection/tests/019.phpt
diff --git a/ext/reflection/tests/020.phpt b/ext/reflection/tests/020.phpt
index c5b0ae5c2..c5b0ae5c2 100755..100644
--- a/ext/reflection/tests/020.phpt
+++ b/ext/reflection/tests/020.phpt
diff --git a/ext/reflection/tests/021.phpt b/ext/reflection/tests/021.phpt
index 30dbb5afc..30dbb5afc 100755..100644
--- a/ext/reflection/tests/021.phpt
+++ b/ext/reflection/tests/021.phpt
diff --git a/ext/reflection/tests/022.phpt b/ext/reflection/tests/022.phpt
index 50dbd6ec7..50dbd6ec7 100755..100644
--- a/ext/reflection/tests/022.phpt
+++ b/ext/reflection/tests/022.phpt
diff --git a/ext/reflection/tests/023.phpt b/ext/reflection/tests/023.phpt
index ab1136595..ab1136595 100755..100644
--- a/ext/reflection/tests/023.phpt
+++ b/ext/reflection/tests/023.phpt
diff --git a/ext/reflection/tests/024.phpt b/ext/reflection/tests/024.phpt
index a1c2c81a9..a1c2c81a9 100755..100644
--- a/ext/reflection/tests/024.phpt
+++ b/ext/reflection/tests/024.phpt
diff --git a/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt b/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt
index 776bfafee..776bfafee 100755..100644
--- a/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt
+++ b/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt
diff --git a/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt b/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt
new file mode 100644
index 000000000..c4889b12b
--- /dev/null
+++ b/ext/reflection/tests/ReflectionFunction_isGenerator_basic.phpt
@@ -0,0 +1,52 @@
+--TEST--
+ReflectionFunction::isGenerator()
+--FILE--
+<?php
+
+$closure1 = function() {return "this is a closure"; };
+$closure2 = function($param) {
+ yield $param;
+};
+
+$rf1 = new ReflectionFunction($closure1);
+var_dump($rf1->isGenerator());
+
+$rf2 = new ReflectionFunction($closure2);
+var_dump($rf2->isGenerator());
+
+function func1() {
+ return 'func1';
+}
+
+function func2() {
+ yield 'func2';
+}
+
+$rf1 = new ReflectionFunction('func1');
+var_dump($rf1->isGenerator());
+
+$rf2 = new ReflectionFunction('func2');
+var_dump($rf2->isGenerator());
+
+
+class Foo {
+ public function f1() {
+ }
+
+ public function f2() {
+ yield;
+ }
+}
+
+$rc = new ReflectionClass('Foo');
+foreach($rc->getMethods() as $m) {
+ var_dump($m->isGenerator());
+}
+?>
+--EXPECTF--
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
diff --git a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
index 58c09994c..58c09994c 100755..100644
--- a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
+++ b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
diff --git a/ext/reflection/tests/bug26640.phpt b/ext/reflection/tests/bug26640.phpt
index e375fd4f8..e375fd4f8 100755..100644
--- a/ext/reflection/tests/bug26640.phpt
+++ b/ext/reflection/tests/bug26640.phpt
diff --git a/ext/reflection/tests/bug26695.phpt b/ext/reflection/tests/bug26695.phpt
index e429f766e..e429f766e 100755..100644
--- a/ext/reflection/tests/bug26695.phpt
+++ b/ext/reflection/tests/bug26695.phpt
diff --git a/ext/reflection/tests/bug29268.phpt b/ext/reflection/tests/bug29268.phpt
index d8efc0b06..d8efc0b06 100755..100644
--- a/ext/reflection/tests/bug29268.phpt
+++ b/ext/reflection/tests/bug29268.phpt
diff --git a/ext/reflection/tests/bug29523.phpt b/ext/reflection/tests/bug29523.phpt
index e74403c6a..e74403c6a 100755..100644
--- a/ext/reflection/tests/bug29523.phpt
+++ b/ext/reflection/tests/bug29523.phpt
diff --git a/ext/reflection/tests/bug29828.phpt b/ext/reflection/tests/bug29828.phpt
index 43e32d211..43e32d211 100755..100644
--- a/ext/reflection/tests/bug29828.phpt
+++ b/ext/reflection/tests/bug29828.phpt
diff --git a/ext/reflection/tests/bug30146.phpt b/ext/reflection/tests/bug30146.phpt
index 3f621414f..3f621414f 100755..100644
--- a/ext/reflection/tests/bug30146.phpt
+++ b/ext/reflection/tests/bug30146.phpt
diff --git a/ext/reflection/tests/bug30148.phpt b/ext/reflection/tests/bug30148.phpt
index aa5841ee5..aa5841ee5 100755..100644
--- a/ext/reflection/tests/bug30148.phpt
+++ b/ext/reflection/tests/bug30148.phpt
diff --git a/ext/reflection/tests/bug30209.phpt b/ext/reflection/tests/bug30209.phpt
index 2735a741e..2735a741e 100755..100644
--- a/ext/reflection/tests/bug30209.phpt
+++ b/ext/reflection/tests/bug30209.phpt
diff --git a/ext/reflection/tests/bug30856.phpt b/ext/reflection/tests/bug30856.phpt
index 39fc1104a..39fc1104a 100755..100644
--- a/ext/reflection/tests/bug30856.phpt
+++ b/ext/reflection/tests/bug30856.phpt
diff --git a/ext/reflection/tests/bug30961.phpt b/ext/reflection/tests/bug30961.phpt
index a61c992ec..a61c992ec 100755..100644
--- a/ext/reflection/tests/bug30961.phpt
+++ b/ext/reflection/tests/bug30961.phpt
diff --git a/ext/reflection/tests/bug31651.phpt b/ext/reflection/tests/bug31651.phpt
index 59f19eae5..59f19eae5 100755..100644
--- a/ext/reflection/tests/bug31651.phpt
+++ b/ext/reflection/tests/bug31651.phpt
diff --git a/ext/reflection/tests/bug32981.phpt b/ext/reflection/tests/bug32981.phpt
index 573567458..573567458 100755..100644
--- a/ext/reflection/tests/bug32981.phpt
+++ b/ext/reflection/tests/bug32981.phpt
diff --git a/ext/reflection/tests/bug33312.phpt b/ext/reflection/tests/bug33312.phpt
index ffa9180fc..ffa9180fc 100755..100644
--- a/ext/reflection/tests/bug33312.phpt
+++ b/ext/reflection/tests/bug33312.phpt
diff --git a/ext/reflection/tests/bug33389.phpt b/ext/reflection/tests/bug33389.phpt
index f1997a397..f1997a397 100755..100644
--- a/ext/reflection/tests/bug33389.phpt
+++ b/ext/reflection/tests/bug33389.phpt
diff --git a/ext/reflection/tests/bug36308.phpt b/ext/reflection/tests/bug36308.phpt
index 79aa5f8fa..79aa5f8fa 100755..100644
--- a/ext/reflection/tests/bug36308.phpt
+++ b/ext/reflection/tests/bug36308.phpt
diff --git a/ext/reflection/tests/bug37816.phpt b/ext/reflection/tests/bug37816.phpt
index 18a49046d..18a49046d 100755..100644
--- a/ext/reflection/tests/bug37816.phpt
+++ b/ext/reflection/tests/bug37816.phpt
diff --git a/ext/reflection/tests/bug38132.phpt b/ext/reflection/tests/bug38132.phpt
index 16e56411f..16e56411f 100755..100644
--- a/ext/reflection/tests/bug38132.phpt
+++ b/ext/reflection/tests/bug38132.phpt
diff --git a/ext/reflection/tests/bug38194.phpt b/ext/reflection/tests/bug38194.phpt
index d12f4e4a7..d12f4e4a7 100755..100644
--- a/ext/reflection/tests/bug38194.phpt
+++ b/ext/reflection/tests/bug38194.phpt
diff --git a/ext/reflection/tests/bug38942.phpt b/ext/reflection/tests/bug38942.phpt
index 817190c99..817190c99 100755..100644
--- a/ext/reflection/tests/bug38942.phpt
+++ b/ext/reflection/tests/bug38942.phpt
diff --git a/ext/reflection/tests/bug41061.phpt b/ext/reflection/tests/bug41061.phpt
index 771cd408d..771cd408d 100755..100644
--- a/ext/reflection/tests/bug41061.phpt
+++ b/ext/reflection/tests/bug41061.phpt
diff --git a/ext/reflection/tests/bug63399.phpt b/ext/reflection/tests/bug63399.phpt
new file mode 100644
index 000000000..393b86169
--- /dev/null
+++ b/ext/reflection/tests/bug63399.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Bug #63399 (ReflectionClass::getTraitAliases() incorrectly resolves traitnames)
+--FILE--
+<?php
+trait Trait1 {
+ public function run() {}
+ public function say() {}
+}
+
+trait Trait2 {
+ public function run() {}
+ public function say() {}
+}
+
+class MyClass
+{
+ use Trait1, Trait2 {
+ Trait1::run as execute;
+ Trait1::say insteadof Trait2;
+ Trait2::run insteadof Trait1;
+ Trait2::say as talk;
+ }
+}
+
+$ref = new ReflectionClass('MyClass');
+
+print_r($ref->getTraitAliases());
+print_r($ref->getTraits());
+
+?>
+--EXPECT--
+Array
+(
+ [execute] => Trait1::run
+ [talk] => Trait2::say
+)
+Array
+(
+ [Trait1] => ReflectionClass Object
+ (
+ [name] => Trait1
+ )
+
+ [Trait2] => ReflectionClass Object
+ (
+ [name] => Trait2
+ )
+
+)
diff --git a/ext/reflection/tests/closures_001.phpt b/ext/reflection/tests/closures_001.phpt
index 6cc7e6755..6cc7e6755 100755..100644
--- a/ext/reflection/tests/closures_001.phpt
+++ b/ext/reflection/tests/closures_001.phpt
diff --git a/ext/reflection/tests/closures_002.phpt b/ext/reflection/tests/closures_002.phpt
index e8b080f5c..e8b080f5c 100755..100644
--- a/ext/reflection/tests/closures_002.phpt
+++ b/ext/reflection/tests/closures_002.phpt
diff --git a/ext/reflection/tests/closures_003_v1.phpt b/ext/reflection/tests/closures_003_v1.phpt
index 1b8e1c4d0..1b8e1c4d0 100755..100644
--- a/ext/reflection/tests/closures_003_v1.phpt
+++ b/ext/reflection/tests/closures_003_v1.phpt
diff --git a/ext/reflection/tests/parameters_001.phpt b/ext/reflection/tests/parameters_001.phpt
index 972b97c1c..972b97c1c 100755..100644
--- a/ext/reflection/tests/parameters_001.phpt
+++ b/ext/reflection/tests/parameters_001.phpt
diff --git a/ext/reflection/tests/parameters_002.phpt b/ext/reflection/tests/parameters_002.phpt
index a86191042..a86191042 100755..100644
--- a/ext/reflection/tests/parameters_002.phpt
+++ b/ext/reflection/tests/parameters_002.phpt
diff --git a/ext/reflection/tests/property_exists.phpt b/ext/reflection/tests/property_exists.phpt
index c74b775bb..c74b775bb 100755..100644
--- a/ext/reflection/tests/property_exists.phpt
+++ b/ext/reflection/tests/property_exists.phpt
diff --git a/ext/reflection/tests/static_properties_002.phpt b/ext/reflection/tests/static_properties_002.phpt
index 218c629cd..218c629cd 100755..100644
--- a/ext/reflection/tests/static_properties_002.phpt
+++ b/ext/reflection/tests/static_properties_002.phpt
diff --git a/ext/reflection/tests/traits005.phpt b/ext/reflection/tests/traits005.phpt
index 1496a35ec..4cfa6c04f 100644
--- a/ext/reflection/tests/traits005.phpt
+++ b/ext/reflection/tests/traits005.phpt
@@ -28,14 +28,14 @@ array(0) {
class C3:
array(1) {
["a1"]=>
- string(10) "(null)::m1"
+ string(6) "T1::m1"
}
class C4:
array(2) {
["a1"]=>
- string(10) "(null)::m1"
+ string(6) "T1::m1"
["a2"]=>
- string(10) "(null)::m2"
+ string(6) "T1::m2"
}
diff --git a/ext/session/tests/save_handler_closures.inc b/ext/session/tests/save_handler_closures.inc
index 50f33c109..50f33c109 100755..100644
--- a/ext/session/tests/save_handler_closures.inc
+++ b/ext/session/tests/save_handler_closures.inc
diff --git a/ext/session/tests/session_set_save_handler_closures.phpt b/ext/session/tests/session_set_save_handler_closures.phpt
index 21b2c6873..21b2c6873 100755..100644
--- a/ext/session/tests/session_set_save_handler_closures.phpt
+++ b/ext/session/tests/session_set_save_handler_closures.phpt
diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h
index 2ff076573..2ff076573 100755..100644
--- a/ext/simplexml/php_simplexml_exports.h
+++ b/ext/simplexml/php_simplexml_exports.h
diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c
index 2e9a5b7c2..2e9a5b7c2 100755..100644
--- a/ext/simplexml/sxe.c
+++ b/ext/simplexml/sxe.c
diff --git a/ext/simplexml/sxe.h b/ext/simplexml/sxe.h
index 4c39b9aa1..4c39b9aa1 100755..100644
--- a/ext/simplexml/sxe.h
+++ b/ext/simplexml/sxe.h
diff --git a/ext/simplexml/tests/000.phpt b/ext/simplexml/tests/000.phpt
index 51dbe3b5e..51dbe3b5e 100755..100644
--- a/ext/simplexml/tests/000.phpt
+++ b/ext/simplexml/tests/000.phpt
diff --git a/ext/simplexml/tests/003.phpt b/ext/simplexml/tests/003.phpt
index 105f616d6..105f616d6 100755..100644
--- a/ext/simplexml/tests/003.phpt
+++ b/ext/simplexml/tests/003.phpt
diff --git a/ext/simplexml/tests/004.phpt b/ext/simplexml/tests/004.phpt
index 21cb5469e..21cb5469e 100755..100644
--- a/ext/simplexml/tests/004.phpt
+++ b/ext/simplexml/tests/004.phpt
diff --git a/ext/simplexml/tests/005.phpt b/ext/simplexml/tests/005.phpt
index 141106543..141106543 100755..100644
--- a/ext/simplexml/tests/005.phpt
+++ b/ext/simplexml/tests/005.phpt
diff --git a/ext/simplexml/tests/006.phpt b/ext/simplexml/tests/006.phpt
index 72ad0c808..72ad0c808 100755..100644
--- a/ext/simplexml/tests/006.phpt
+++ b/ext/simplexml/tests/006.phpt
diff --git a/ext/simplexml/tests/007.phpt b/ext/simplexml/tests/007.phpt
index 51d7a847f..51d7a847f 100755..100644
--- a/ext/simplexml/tests/007.phpt
+++ b/ext/simplexml/tests/007.phpt
diff --git a/ext/simplexml/tests/009.phpt b/ext/simplexml/tests/009.phpt
index a76f3d111..a76f3d111 100755..100644
--- a/ext/simplexml/tests/009.phpt
+++ b/ext/simplexml/tests/009.phpt
diff --git a/ext/simplexml/tests/009b.phpt b/ext/simplexml/tests/009b.phpt
index dba300c72..dba300c72 100755..100644
--- a/ext/simplexml/tests/009b.phpt
+++ b/ext/simplexml/tests/009b.phpt
diff --git a/ext/simplexml/tests/011.phpt b/ext/simplexml/tests/011.phpt
index 74ea4705c..74ea4705c 100755..100644
--- a/ext/simplexml/tests/011.phpt
+++ b/ext/simplexml/tests/011.phpt
diff --git a/ext/simplexml/tests/012.phpt b/ext/simplexml/tests/012.phpt
index 2fc9bec41..2fc9bec41 100755..100644
--- a/ext/simplexml/tests/012.phpt
+++ b/ext/simplexml/tests/012.phpt
diff --git a/ext/simplexml/tests/013.phpt b/ext/simplexml/tests/013.phpt
index 56c57dfbc..56c57dfbc 100755..100644
--- a/ext/simplexml/tests/013.phpt
+++ b/ext/simplexml/tests/013.phpt
diff --git a/ext/simplexml/tests/014a.phpt b/ext/simplexml/tests/014a.phpt
index 649828b4d..649828b4d 100755..100644
--- a/ext/simplexml/tests/014a.phpt
+++ b/ext/simplexml/tests/014a.phpt
diff --git a/ext/simplexml/tests/014b.phpt b/ext/simplexml/tests/014b.phpt
index 034396751..034396751 100755..100644
--- a/ext/simplexml/tests/014b.phpt
+++ b/ext/simplexml/tests/014b.phpt
diff --git a/ext/simplexml/tests/016a.phpt b/ext/simplexml/tests/016a.phpt
index 9797e2930..9797e2930 100755..100644
--- a/ext/simplexml/tests/016a.phpt
+++ b/ext/simplexml/tests/016a.phpt
diff --git a/ext/simplexml/tests/019.phpt b/ext/simplexml/tests/019.phpt
index aec74ba42..aec74ba42 100755..100644
--- a/ext/simplexml/tests/019.phpt
+++ b/ext/simplexml/tests/019.phpt
diff --git a/ext/simplexml/tests/020.phpt b/ext/simplexml/tests/020.phpt
index 9e91b5ac3..9e91b5ac3 100755..100644
--- a/ext/simplexml/tests/020.phpt
+++ b/ext/simplexml/tests/020.phpt
diff --git a/ext/simplexml/tests/022.phpt b/ext/simplexml/tests/022.phpt
index 2af4a1dd2..2af4a1dd2 100755..100644
--- a/ext/simplexml/tests/022.phpt
+++ b/ext/simplexml/tests/022.phpt
diff --git a/ext/simplexml/tests/023.phpt b/ext/simplexml/tests/023.phpt
index 515a1460c..515a1460c 100755..100644
--- a/ext/simplexml/tests/023.phpt
+++ b/ext/simplexml/tests/023.phpt
diff --git a/ext/simplexml/tests/024.phpt b/ext/simplexml/tests/024.phpt
index 9f31fd5e9..9f31fd5e9 100755..100644
--- a/ext/simplexml/tests/024.phpt
+++ b/ext/simplexml/tests/024.phpt
diff --git a/ext/simplexml/tests/025.phpt b/ext/simplexml/tests/025.phpt
index b9e3bbb0d..b9e3bbb0d 100755..100644
--- a/ext/simplexml/tests/025.phpt
+++ b/ext/simplexml/tests/025.phpt
diff --git a/ext/simplexml/tests/026.phpt b/ext/simplexml/tests/026.phpt
index d6de94be3..d6de94be3 100755..100644
--- a/ext/simplexml/tests/026.phpt
+++ b/ext/simplexml/tests/026.phpt
diff --git a/ext/simplexml/tests/027.phpt b/ext/simplexml/tests/027.phpt
index a531ccad4..a531ccad4 100755..100644
--- a/ext/simplexml/tests/027.phpt
+++ b/ext/simplexml/tests/027.phpt
diff --git a/ext/simplexml/tests/028.phpt b/ext/simplexml/tests/028.phpt
index 753056b9a..753056b9a 100755..100644
--- a/ext/simplexml/tests/028.phpt
+++ b/ext/simplexml/tests/028.phpt
diff --git a/ext/simplexml/tests/029.phpt b/ext/simplexml/tests/029.phpt
index 86a4f308e..86a4f308e 100755..100644
--- a/ext/simplexml/tests/029.phpt
+++ b/ext/simplexml/tests/029.phpt
diff --git a/ext/simplexml/tests/032.phpt b/ext/simplexml/tests/032.phpt
index 48bc887ec..48bc887ec 100755..100644
--- a/ext/simplexml/tests/032.phpt
+++ b/ext/simplexml/tests/032.phpt
diff --git a/ext/simplexml/tests/033.phpt b/ext/simplexml/tests/033.phpt
index ba01b2155..ba01b2155 100755..100644
--- a/ext/simplexml/tests/033.phpt
+++ b/ext/simplexml/tests/033.phpt
diff --git a/ext/simplexml/tests/034.phpt b/ext/simplexml/tests/034.phpt
index 8610f7036..8610f7036 100755..100644
--- a/ext/simplexml/tests/034.phpt
+++ b/ext/simplexml/tests/034.phpt
diff --git a/ext/simplexml/tests/bug27010.phpt b/ext/simplexml/tests/bug27010.phpt
index 364ca4675..364ca4675 100755..100644
--- a/ext/simplexml/tests/bug27010.phpt
+++ b/ext/simplexml/tests/bug27010.phpt
diff --git a/ext/simplexml/tests/bug35785.phpt b/ext/simplexml/tests/bug35785.phpt
index 0e03f07c5..0e03f07c5 100755..100644
--- a/ext/simplexml/tests/bug35785.phpt
+++ b/ext/simplexml/tests/bug35785.phpt
diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt
index c1e51040b..c1e51040b 100755..100644
--- a/ext/simplexml/tests/bug37565.phpt
+++ b/ext/simplexml/tests/bug37565.phpt
diff --git a/ext/simplexml/tests/profile12.phpt b/ext/simplexml/tests/profile12.phpt
index 51a0d3553..51a0d3553 100755..100644
--- a/ext/simplexml/tests/profile12.phpt
+++ b/ext/simplexml/tests/profile12.phpt
diff --git a/ext/simplexml/tests/profile13.phpt b/ext/simplexml/tests/profile13.phpt
index 2ae89e744..2ae89e744 100755..100644
--- a/ext/simplexml/tests/profile13.phpt
+++ b/ext/simplexml/tests/profile13.phpt
diff --git a/ext/simplexml/tests/simplexml_import_dom.phpt b/ext/simplexml/tests/simplexml_import_dom.phpt
index e108e0554..e108e0554 100755..100644
--- a/ext/simplexml/tests/simplexml_import_dom.phpt
+++ b/ext/simplexml/tests/simplexml_import_dom.phpt
diff --git a/ext/simplexml/tests/sxe_001.phpt b/ext/simplexml/tests/sxe_001.phpt
index bb93eea07..bb93eea07 100755..100644
--- a/ext/simplexml/tests/sxe_001.phpt
+++ b/ext/simplexml/tests/sxe_001.phpt
diff --git a/ext/simplexml/tests/sxe_002.phpt b/ext/simplexml/tests/sxe_002.phpt
index b937b011d..b937b011d 100755..100644
--- a/ext/simplexml/tests/sxe_002.phpt
+++ b/ext/simplexml/tests/sxe_002.phpt
diff --git a/ext/simplexml/tests/sxe_003.phpt b/ext/simplexml/tests/sxe_003.phpt
index 58c752316..58c752316 100755..100644
--- a/ext/simplexml/tests/sxe_003.phpt
+++ b/ext/simplexml/tests/sxe_003.phpt
diff --git a/ext/simplexml/tests/sxe_004.phpt b/ext/simplexml/tests/sxe_004.phpt
index 20431de8b..20431de8b 100755..100644
--- a/ext/simplexml/tests/sxe_004.phpt
+++ b/ext/simplexml/tests/sxe_004.phpt
diff --git a/ext/simplexml/tests/sxe_005.phpt b/ext/simplexml/tests/sxe_005.phpt
index 183d35116..183d35116 100755..100644
--- a/ext/simplexml/tests/sxe_005.phpt
+++ b/ext/simplexml/tests/sxe_005.phpt
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 403c62955..87c5e0733 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -80,6 +80,14 @@
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
+#if PHP_VERSION_ID < 50300
+#define Z_ADDREF_P(pz) pz->refcount++
+#define Z_ISREF_PP(oid) (PZVAL_IS_REF(*(oid)))
+#define Z_REFCOUNT_P(pz) pz->refcount
+#define Z_SET_REFCOUNT_P(pz, rc) pz->refcount = rc
+#define zend_parse_parameters_none() zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
+#endif
+
/* For net-snmp prior to 5.4 */
#ifndef HAVE_SHUTDOWN_SNMP_LOGGING
extern netsnmp_log_handler *logh_head;
@@ -489,6 +497,9 @@ static void php_snmp_object_free_storage(void *object TSRMLS_DC)
static zend_object_value php_snmp_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
+#if PHP_VERSION_ID < 50399
+ zval *tmp;
+#endif
zend_object_value retval;
php_snmp_object *intern;
@@ -497,7 +508,11 @@ static zend_object_value php_snmp_object_new(zend_class_entry *class_type TSRMLS
memset(&intern->zo, 0, sizeof(php_snmp_object));
zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
+ zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &tmp, sizeof(zval *));
+#else
object_properties_init(&intern->zo, class_type);
+#endif
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) php_snmp_object_free_storage, NULL TSRMLS_CC);
retval.handlers = (zend_object_handlers *) &php_snmp_object_handlers;
@@ -1759,7 +1774,11 @@ PHP_FUNCTION(snmp_read_mib)
char *filename;
int filename_len;
+#if PHP_VERSION_ID < 50399
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
+#else
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
+#endif
RETURN_FALSE;
}
@@ -1784,17 +1803,31 @@ PHP_METHOD(snmp, __construct)
long retries = SNMP_DEFAULT_RETRIES;
long version = SNMP_DEFAULT_VERSION;
int argc = ZEND_NUM_ARGS();
+#if PHP_VERSION_ID > 50300
zend_error_handling error_handling;
+#endif
snmp_object = (php_snmp_object *)zend_object_store_get_object(object TSRMLS_CC);
+#if PHP_VERSION_ID > 50300
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
+#else
+ php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
+#endif
if (zend_parse_parameters(argc TSRMLS_CC, "lss|ll", &version, &a1, &a1_len, &a2, &a2_len, &timeout, &retries) == FAILURE) {
+#if PHP_VERSION_ID > 50300
zend_restore_error_handling(&error_handling TSRMLS_CC);
+#else
+ php_std_error_handling();
+#endif
return;
}
+#if PHP_VERSION_ID > 50300
zend_restore_error_handling(&error_handling TSRMLS_CC);
+#else
+ php_std_error_handling();
+#endif
switch(version) {
case SNMP_VERSION_1:
@@ -1942,7 +1975,11 @@ void php_snmp_add_property(HashTable *h, const char *name, size_t name_length, p
/* {{{ php_snmp_read_property(zval *object, zval *member, int type[, const zend_literal *key])
Generic object property reader */
+#if PHP_VERSION_ID < 50399
+zval *php_snmp_read_property(zval *object, zval *member, int type TSRMLS_DC)
+#else
zval *php_snmp_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC)
+#endif
{
zval tmp_member;
zval *retval;
@@ -1972,7 +2009,11 @@ zval *php_snmp_read_property(zval *object, zval *member, int type, const zend_li
}
} else {
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
+#if PHP_VERSION_ID < 50399
+ retval = std_hnd->read_property(object, member, type TSRMLS_CC);
+#else
retval = std_hnd->read_property(object, member, type, key TSRMLS_CC);
+#endif
}
if (member == &tmp_member) {
@@ -1984,7 +2025,11 @@ zval *php_snmp_read_property(zval *object, zval *member, int type, const zend_li
/* {{{ php_snmp_write_property(zval *object, zval *member, zval *value[, const zend_literal *key])
Generic object property writer */
+#if PHP_VERSION_ID < 50399
+void php_snmp_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
+#else
void php_snmp_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC)
+#endif
{
zval tmp_member;
php_snmp_object *obj;
@@ -2011,7 +2056,11 @@ void php_snmp_write_property(zval *object, zval *member, zval *value, const zend
}
} else {
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
+#if PHP_VERSION_ID < 50399
+ std_hnd->write_property(object, member, value TSRMLS_CC);
+#else
std_hnd->write_property(object, member, value, key TSRMLS_CC);
+#endif
}
if (member == &tmp_member) {
@@ -2022,7 +2071,11 @@ void php_snmp_write_property(zval *object, zval *member, zval *value, const zend
/* {{{ php_snmp_has_property(zval *object, zval *member, int has_set_exists[, const zend_literal *key])
Generic object property checker */
+#if PHP_VERSION_ID < 50399
+static int php_snmp_has_property(zval *object, zval *member, int has_set_exists TSRMLS_DC)
+#else
static int php_snmp_has_property(zval *object, zval *member, int has_set_exists, const zend_literal *key TSRMLS_DC)
+#endif
{
php_snmp_prop_handler *hnd;
int ret = 0;
@@ -2033,7 +2086,11 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists,
ret = 1;
break;
case 0: {
+#if PHP_VERSION_ID < 50399
+ zval *value = php_snmp_read_property(object, member, BP_VAR_IS TSRMLS_CC);
+#else
zval *value = php_snmp_read_property(object, member, BP_VAR_IS, key TSRMLS_CC);
+#endif
if (value != EG(uninitialized_zval_ptr)) {
ret = Z_TYPE_P(value) != IS_NULL? 1:0;
/* refcount is 0 */
@@ -2043,7 +2100,11 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists,
break;
}
default: {
+#if PHP_VERSION_ID < 50399
+ zval *value = php_snmp_read_property(object, member, BP_VAR_IS TSRMLS_CC);
+#else
zval *value = php_snmp_read_property(object, member, BP_VAR_IS, key TSRMLS_CC);
+#endif
if (value != EG(uninitialized_zval_ptr)) {
convert_to_boolean(value);
ret = Z_BVAL_P(value)? 1:0;
@@ -2056,7 +2117,11 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists,
}
} else {
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
+#if PHP_VERSION_ID < 50399
+ ret = std_hnd->has_property(object, member, has_set_exists TSRMLS_CC);
+#else
ret = std_hnd->has_property(object, member, has_set_exists, key TSRMLS_CC);
+#endif
}
return ret;
}
@@ -2076,7 +2141,11 @@ static HashTable *php_snmp_get_properties(zval *object TSRMLS_DC)
ulong num_key;
obj = (php_snmp_object *)zend_objects_get_address(object TSRMLS_CC);
+#if PHP_VERSION_ID < 50399
+ props = obj->zo.properties;
+#else
props = zend_std_get_properties(object TSRMLS_CC);
+#endif
zend_hash_internal_pointer_reset_ex(&php_snmp_properties, &pos);
@@ -2455,20 +2524,26 @@ PHP_MINFO_FUNCTION(snmp)
/* {{{ snmp_module_deps[]
*/
+#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep snmp_module_deps[] = {
#ifdef HAVE_SPL
ZEND_MOD_REQUIRED("spl")
#endif
ZEND_MOD_END
};
+#endif
/* }}} */
/* {{{ snmp_module_entry
*/
zend_module_entry snmp_module_entry = {
+#if ZEND_MODULE_API_NO >= 20050922
STANDARD_MODULE_HEADER_EX,
NULL,
snmp_module_deps,
+#else
+ STANDARD_MODULE_HEADER,
+#endif
"snmp",
snmp_functions,
PHP_MINIT(snmp),
diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt
index 93a0e6693..93a0e6693 100755..100644
--- a/ext/soap/tests/any.phpt
+++ b/ext/soap/tests/any.phpt
diff --git a/ext/soap/tests/bugs/bug32941.phpt b/ext/soap/tests/bugs/bug32941.phpt
index d1e3fff85..d1e3fff85 100755..100644
--- a/ext/soap/tests/bugs/bug32941.phpt
+++ b/ext/soap/tests/bugs/bug32941.phpt
diff --git a/ext/soap/tests/bugs/bug34449.phpt b/ext/soap/tests/bugs/bug34449.phpt
index f5766e29b..f5766e29b 100755..100644
--- a/ext/soap/tests/bugs/bug34449.phpt
+++ b/ext/soap/tests/bugs/bug34449.phpt
diff --git a/ext/soap/tests/bugs/bug34453.phpt b/ext/soap/tests/bugs/bug34453.phpt
index 0f9543b71..0f9543b71 100755..100644
--- a/ext/soap/tests/bugs/bug34453.phpt
+++ b/ext/soap/tests/bugs/bug34453.phpt
diff --git a/ext/soap/tests/bugs/bug34643.phpt b/ext/soap/tests/bugs/bug34643.phpt
index b99565129..b99565129 100755..100644
--- a/ext/soap/tests/bugs/bug34643.phpt
+++ b/ext/soap/tests/bugs/bug34643.phpt
diff --git a/ext/soap/tests/bugs/bug34657.phpt b/ext/soap/tests/bugs/bug34657.phpt
index d974d02cc..d974d02cc 100755..100644
--- a/ext/soap/tests/bugs/bug34657.phpt
+++ b/ext/soap/tests/bugs/bug34657.phpt
diff --git a/ext/soap/tests/bugs/bug35142.phpt b/ext/soap/tests/bugs/bug35142.phpt
index 94c1aa954..94c1aa954 100755..100644
--- a/ext/soap/tests/bugs/bug35142.phpt
+++ b/ext/soap/tests/bugs/bug35142.phpt
diff --git a/ext/soap/tests/bugs/bug35273.phpt b/ext/soap/tests/bugs/bug35273.phpt
index e22ebd7dc..e22ebd7dc 100755..100644
--- a/ext/soap/tests/bugs/bug35273.phpt
+++ b/ext/soap/tests/bugs/bug35273.phpt
diff --git a/ext/soap/tests/bugs/bug36226-2.phpt b/ext/soap/tests/bugs/bug36226-2.phpt
index e14832db4..e14832db4 100755..100644
--- a/ext/soap/tests/bugs/bug36226-2.phpt
+++ b/ext/soap/tests/bugs/bug36226-2.phpt
diff --git a/ext/soap/tests/bugs/bug36226.phpt b/ext/soap/tests/bugs/bug36226.phpt
index 8c01c5b5d..8c01c5b5d 100755..100644
--- a/ext/soap/tests/bugs/bug36226.phpt
+++ b/ext/soap/tests/bugs/bug36226.phpt
diff --git a/ext/soap/tests/bugs/bug36575.phpt b/ext/soap/tests/bugs/bug36575.phpt
index 9bf541522..9bf541522 100755..100644
--- a/ext/soap/tests/bugs/bug36575.phpt
+++ b/ext/soap/tests/bugs/bug36575.phpt
diff --git a/ext/soap/tests/bugs/bug36614.phpt b/ext/soap/tests/bugs/bug36614.phpt
index ba6734812..ba6734812 100755..100644
--- a/ext/soap/tests/bugs/bug36614.phpt
+++ b/ext/soap/tests/bugs/bug36614.phpt
diff --git a/ext/soap/tests/bugs/bug36629.phpt b/ext/soap/tests/bugs/bug36629.phpt
index 2096da26a..2096da26a 100755..100644
--- a/ext/soap/tests/bugs/bug36629.phpt
+++ b/ext/soap/tests/bugs/bug36629.phpt
diff --git a/ext/soap/tests/bugs/bug36908.phpt b/ext/soap/tests/bugs/bug36908.phpt
index cd0ea8b2e..cd0ea8b2e 100755..100644
--- a/ext/soap/tests/bugs/bug36908.phpt
+++ b/ext/soap/tests/bugs/bug36908.phpt
diff --git a/ext/soap/tests/bugs/bug36999.phpt b/ext/soap/tests/bugs/bug36999.phpt
index 9fbb032d8..9fbb032d8 100755..100644
--- a/ext/soap/tests/bugs/bug36999.phpt
+++ b/ext/soap/tests/bugs/bug36999.phpt
diff --git a/ext/soap/tests/bugs/bug37013.phpt b/ext/soap/tests/bugs/bug37013.phpt
index 45f314293..45f314293 100755..100644
--- a/ext/soap/tests/bugs/bug37013.phpt
+++ b/ext/soap/tests/bugs/bug37013.phpt
diff --git a/ext/soap/tests/bugs/bug37083.phpt b/ext/soap/tests/bugs/bug37083.phpt
index d915ec044..d915ec044 100755..100644
--- a/ext/soap/tests/bugs/bug37083.phpt
+++ b/ext/soap/tests/bugs/bug37083.phpt
diff --git a/ext/soap/tests/bugs/bug37278.phpt b/ext/soap/tests/bugs/bug37278.phpt
index f3fd7c17b..f3fd7c17b 100755..100644
--- a/ext/soap/tests/bugs/bug37278.phpt
+++ b/ext/soap/tests/bugs/bug37278.phpt
diff --git a/ext/soap/tests/bugs/bug38004.phpt b/ext/soap/tests/bugs/bug38004.phpt
index fea4f0379..fea4f0379 100755..100644
--- a/ext/soap/tests/bugs/bug38004.phpt
+++ b/ext/soap/tests/bugs/bug38004.phpt
diff --git a/ext/soap/tests/bugs/bug38005.phpt b/ext/soap/tests/bugs/bug38005.phpt
index 6a4fb2580..6a4fb2580 100755..100644
--- a/ext/soap/tests/bugs/bug38005.phpt
+++ b/ext/soap/tests/bugs/bug38005.phpt
diff --git a/ext/soap/tests/bugs/bug38055.phpt b/ext/soap/tests/bugs/bug38055.phpt
index 82b6c76f7..82b6c76f7 100755..100644
--- a/ext/soap/tests/bugs/bug38055.phpt
+++ b/ext/soap/tests/bugs/bug38055.phpt
diff --git a/ext/soap/tests/bugs/bug38067.phpt b/ext/soap/tests/bugs/bug38067.phpt
index c9bf3c165..c9bf3c165 100755..100644
--- a/ext/soap/tests/bugs/bug38067.phpt
+++ b/ext/soap/tests/bugs/bug38067.phpt
diff --git a/ext/soap/tests/bugs/bug38536.phpt b/ext/soap/tests/bugs/bug38536.phpt
index feea46e97..feea46e97 100755..100644
--- a/ext/soap/tests/bugs/bug38536.phpt
+++ b/ext/soap/tests/bugs/bug38536.phpt
diff --git a/ext/soap/tests/bugs/bug39121.phpt b/ext/soap/tests/bugs/bug39121.phpt
index caa7f6cce..caa7f6cce 100755..100644
--- a/ext/soap/tests/bugs/bug39121.phpt
+++ b/ext/soap/tests/bugs/bug39121.phpt
diff --git a/ext/soap/tests/bugs/bug39815.phpt b/ext/soap/tests/bugs/bug39815.phpt
index 1adc50a2d..1adc50a2d 100755..100644
--- a/ext/soap/tests/bugs/bug39815.phpt
+++ b/ext/soap/tests/bugs/bug39815.phpt
diff --git a/ext/soap/tests/bugs/bug39832.phpt b/ext/soap/tests/bugs/bug39832.phpt
index 6abc2f0af..6abc2f0af 100755..100644
--- a/ext/soap/tests/bugs/bug39832.phpt
+++ b/ext/soap/tests/bugs/bug39832.phpt
diff --git a/ext/soap/tests/bugs/bug40609.phpt b/ext/soap/tests/bugs/bug40609.phpt
index 198afc511..198afc511 100755..100644
--- a/ext/soap/tests/bugs/bug40609.phpt
+++ b/ext/soap/tests/bugs/bug40609.phpt
diff --git a/ext/soap/tests/bugs/bug41004.phpt b/ext/soap/tests/bugs/bug41004.phpt
index 992c6b708..992c6b708 100755..100644
--- a/ext/soap/tests/bugs/bug41004.phpt
+++ b/ext/soap/tests/bugs/bug41004.phpt
diff --git a/ext/soap/tests/bugs/bug41097.phpt b/ext/soap/tests/bugs/bug41097.phpt
index a9cfd1414..a9cfd1414 100755..100644
--- a/ext/soap/tests/bugs/bug41097.phpt
+++ b/ext/soap/tests/bugs/bug41097.phpt
diff --git a/ext/soap/tests/bugs/bug41337.phpt b/ext/soap/tests/bugs/bug41337.phpt
index cd777d1de..cd777d1de 100755..100644
--- a/ext/soap/tests/bugs/bug41337.phpt
+++ b/ext/soap/tests/bugs/bug41337.phpt
diff --git a/ext/soap/tests/bugs/bug41337_2.phpt b/ext/soap/tests/bugs/bug41337_2.phpt
index d594d2515..d594d2515 100755..100644
--- a/ext/soap/tests/bugs/bug41337_2.phpt
+++ b/ext/soap/tests/bugs/bug41337_2.phpt
diff --git a/ext/soap/tests/bugs/bug41566.phpt b/ext/soap/tests/bugs/bug41566.phpt
index 03ecdde04..03ecdde04 100755..100644
--- a/ext/soap/tests/bugs/bug41566.phpt
+++ b/ext/soap/tests/bugs/bug41566.phpt
diff --git a/ext/soap/tests/bugs/bug42086.phpt b/ext/soap/tests/bugs/bug42086.phpt
index 6edc06f87..6edc06f87 100755..100644
--- a/ext/soap/tests/bugs/bug42086.phpt
+++ b/ext/soap/tests/bugs/bug42086.phpt
diff --git a/ext/soap/tests/bugs/bug42151.phpt b/ext/soap/tests/bugs/bug42151.phpt
index ee53e6d52..ee53e6d52 100755..100644
--- a/ext/soap/tests/bugs/bug42151.phpt
+++ b/ext/soap/tests/bugs/bug42151.phpt
diff --git a/ext/soap/tests/bugs/bug42183.phpt b/ext/soap/tests/bugs/bug42183.phpt
index d34311f26..d34311f26 100755..100644
--- a/ext/soap/tests/bugs/bug42183.phpt
+++ b/ext/soap/tests/bugs/bug42183.phpt
diff --git a/ext/soap/tests/bugs/bug42214.phpt b/ext/soap/tests/bugs/bug42214.phpt
index a31f16dcb..a31f16dcb 100755..100644
--- a/ext/soap/tests/bugs/bug42214.phpt
+++ b/ext/soap/tests/bugs/bug42214.phpt
diff --git a/ext/soap/tests/bugs/bug42326.phpt b/ext/soap/tests/bugs/bug42326.phpt
index 2e6c7c350..2e6c7c350 100755..100644
--- a/ext/soap/tests/bugs/bug42326.phpt
+++ b/ext/soap/tests/bugs/bug42326.phpt
diff --git a/ext/soap/tests/bugs/bug42359.phpt b/ext/soap/tests/bugs/bug42359.phpt
index 94738fff3..94738fff3 100755..100644
--- a/ext/soap/tests/bugs/bug42359.phpt
+++ b/ext/soap/tests/bugs/bug42359.phpt
diff --git a/ext/soap/tests/bugs/bug42488.phpt b/ext/soap/tests/bugs/bug42488.phpt
index 4069c9f6b..4069c9f6b 100755..100644
--- a/ext/soap/tests/bugs/bug42488.phpt
+++ b/ext/soap/tests/bugs/bug42488.phpt
diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt
index 1436f881e..1436f881e 100755..100644
--- a/ext/soap/tests/bugs/bug42692.phpt
+++ b/ext/soap/tests/bugs/bug42692.phpt
diff --git a/ext/soap/tests/bugs/bug47273.phpt b/ext/soap/tests/bugs/bug47273.phpt
index 174948f59..1cfb0f3cd 100644
--- a/ext/soap/tests/bugs/bug47273.phpt
+++ b/ext/soap/tests/bugs/bug47273.phpt
@@ -2,9 +2,6 @@
Bug #47273 (Encoding bug in SoapServer->fault)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
---INI--
-unicode.script_encoding=ISO-8859-1
-unicode.output_encoding=ISO-8859-1
--FILE--
<?php
$request1 = <<<EOF
diff --git a/ext/soap/tests/classmap003.phpt b/ext/soap/tests/classmap003.phpt
index 4d0118fef..4d0118fef 100755..100644
--- a/ext/soap/tests/classmap003.phpt
+++ b/ext/soap/tests/classmap003.phpt
diff --git a/ext/soap/tests/classmap004.phpt b/ext/soap/tests/classmap004.phpt
index e8bf58a4f..e8bf58a4f 100755..100644
--- a/ext/soap/tests/classmap004.phpt
+++ b/ext/soap/tests/classmap004.phpt
diff --git a/ext/soap/tests/schema/schema082.phpt b/ext/soap/tests/schema/schema082.phpt
index 34c4c76c2..34c4c76c2 100755..100644
--- a/ext/soap/tests/schema/schema082.phpt
+++ b/ext/soap/tests/schema/schema082.phpt
diff --git a/ext/soap/tests/schema/schema083.phpt b/ext/soap/tests/schema/schema083.phpt
index 854c4f9ff..854c4f9ff 100755..100644
--- a/ext/soap/tests/schema/schema083.phpt
+++ b/ext/soap/tests/schema/schema083.phpt
diff --git a/ext/soap/tests/schema/schema084.phpt b/ext/soap/tests/schema/schema084.phpt
index 94a9551fa..94a9551fa 100755..100644
--- a/ext/soap/tests/schema/schema084.phpt
+++ b/ext/soap/tests/schema/schema084.phpt
diff --git a/ext/soap/tests/schema/schema085.phpt b/ext/soap/tests/schema/schema085.phpt
index 9a93ac723..9a93ac723 100755..100644
--- a/ext/soap/tests/schema/schema085.phpt
+++ b/ext/soap/tests/schema/schema085.phpt
diff --git a/ext/soap/tests/server022.phpt b/ext/soap/tests/server022.phpt
index ff79a1518..ff79a1518 100755..100644
--- a/ext/soap/tests/server022.phpt
+++ b/ext/soap/tests/server022.phpt
diff --git a/ext/soap/tests/server023.phpt b/ext/soap/tests/server023.phpt
index 5614599f3..5614599f3 100755..100644
--- a/ext/soap/tests/server023.phpt
+++ b/ext/soap/tests/server023.phpt
diff --git a/ext/soap/tests/server024.phpt b/ext/soap/tests/server024.phpt
index 7db30621d..7db30621d 100755..100644
--- a/ext/soap/tests/server024.phpt
+++ b/ext/soap/tests/server024.phpt
diff --git a/ext/soap/tests/server025.phpt b/ext/soap/tests/server025.phpt
index ed56750a0..ed56750a0 100755..100644
--- a/ext/soap/tests/server025.phpt
+++ b/ext/soap/tests/server025.phpt
diff --git a/ext/soap/tests/server026.phpt b/ext/soap/tests/server026.phpt
index 720ade86c..720ade86c 100755..100644
--- a/ext/soap/tests/server026.phpt
+++ b/ext/soap/tests/server026.phpt
diff --git a/ext/soap/tests/server027.phpt b/ext/soap/tests/server027.phpt
index 9fee4a608..9fee4a608 100755..100644
--- a/ext/soap/tests/server027.phpt
+++ b/ext/soap/tests/server027.phpt
diff --git a/ext/soap/tests/server028.phpt b/ext/soap/tests/server028.phpt
index 4bea8ebd7..4bea8ebd7 100755..100644
--- a/ext/soap/tests/server028.phpt
+++ b/ext/soap/tests/server028.phpt
diff --git a/ext/soap/tests/setheaders.phpt b/ext/soap/tests/setheaders.phpt
index cb90d372d..cb90d372d 100755..100644
--- a/ext/soap/tests/setheaders.phpt
+++ b/ext/soap/tests/setheaders.phpt
diff --git a/ext/soap/tests/typemap001.phpt b/ext/soap/tests/typemap001.phpt
index b5ed31da8..b5ed31da8 100755..100644
--- a/ext/soap/tests/typemap001.phpt
+++ b/ext/soap/tests/typemap001.phpt
diff --git a/ext/soap/tests/typemap002.phpt b/ext/soap/tests/typemap002.phpt
index ceb00f1a1..ceb00f1a1 100755..100644
--- a/ext/soap/tests/typemap002.phpt
+++ b/ext/soap/tests/typemap002.phpt
diff --git a/ext/soap/tests/typemap003.phpt b/ext/soap/tests/typemap003.phpt
index 63bb76cbc..63bb76cbc 100755..100644
--- a/ext/soap/tests/typemap003.phpt
+++ b/ext/soap/tests/typemap003.phpt
diff --git a/ext/soap/tests/typemap004.phpt b/ext/soap/tests/typemap004.phpt
index 4fe15f7f9..4fe15f7f9 100755..100644
--- a/ext/soap/tests/typemap004.phpt
+++ b/ext/soap/tests/typemap004.phpt
diff --git a/ext/soap/tests/typemap005.phpt b/ext/soap/tests/typemap005.phpt
index 369d026b5..369d026b5 100755..100644
--- a/ext/soap/tests/typemap005.phpt
+++ b/ext/soap/tests/typemap005.phpt
diff --git a/ext/soap/tests/typemap006.phpt b/ext/soap/tests/typemap006.phpt
index 7ecf410ad..7ecf410ad 100755..100644
--- a/ext/soap/tests/typemap006.phpt
+++ b/ext/soap/tests/typemap006.phpt
diff --git a/ext/soap/tests/typemap007.phpt b/ext/soap/tests/typemap007.phpt
index b3451f1da..b3451f1da 100755..100644
--- a/ext/soap/tests/typemap007.phpt
+++ b/ext/soap/tests/typemap007.phpt
diff --git a/ext/soap/tests/typemap008.phpt b/ext/soap/tests/typemap008.phpt
index 192f6dc0d..192f6dc0d 100755..100644
--- a/ext/soap/tests/typemap008.phpt
+++ b/ext/soap/tests/typemap008.phpt
diff --git a/ext/soap/tests/typemap009.phpt b/ext/soap/tests/typemap009.phpt
index ec5c38da2..ec5c38da2 100755..100644
--- a/ext/soap/tests/typemap009.phpt
+++ b/ext/soap/tests/typemap009.phpt
diff --git a/ext/soap/tests/typemap010.phpt b/ext/soap/tests/typemap010.phpt
index 4eba6345c..4eba6345c 100755..100644
--- a/ext/soap/tests/typemap010.phpt
+++ b/ext/soap/tests/typemap010.phpt
diff --git a/ext/soap/tests/typemap011.phpt b/ext/soap/tests/typemap011.phpt
index 1e2addcee..1e2addcee 100755..100644
--- a/ext/soap/tests/typemap011.phpt
+++ b/ext/soap/tests/typemap011.phpt
diff --git a/ext/soap/tests/typemap012.phpt b/ext/soap/tests/typemap012.phpt
index 847957a98..847957a98 100755..100644
--- a/ext/soap/tests/typemap012.phpt
+++ b/ext/soap/tests/typemap012.phpt
diff --git a/ext/soap/tests/typemap013.phpt b/ext/soap/tests/typemap013.phpt
index d873eb4d1..d873eb4d1 100755..100644
--- a/ext/soap/tests/typemap013.phpt
+++ b/ext/soap/tests/typemap013.phpt
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 670d29f7a..e29106087 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -38,6 +38,9 @@
# define NTDDI_XP NTDDI_WINXP /* bug in SDK */
# include <IPHlpApi.h>
# undef NTDDI_XP
+# if _WIN32_WINNT >= 0x0600
+# define HAVE_IF_NAMETOINDEX 1
+# endif
#else
#include <sys/socket.h>
#include <sys/ioctl.h>
diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h
index 5619c9c7f..9470a39ca 100644
--- a/ext/sockets/multicast.h
+++ b/ext/sockets/multicast.h
@@ -18,9 +18,7 @@
/* $Id$ */
-#if defined(MCAST_JOIN_GROUP) && \
- (!defined(PHP_WIN32) || (_WIN32_WINNT >= 0x600 && SOCKETS_ENABLE_VISTA_API)) && \
- !defined(__APPLE__)
+#if defined(MCAST_JOIN_GROUP) && !defined(__APPLE__)
#define RFC3678_API 1
/* has block/unblock and source membership, in this case for both IPv4 and IPv6 */
#define HAS_MCAST_EXT 1
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 0d1714257..1eee7a620 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -57,7 +57,8 @@
# define h_errno WSAGetLastError()
# define set_errno(a) WSASetLastError(a)
# define close(a) closesocket(a)
-# if _WIN32_WINNT >= 0x0600 && SOCKETS_ENABLE_VISTA_API
+# include <IPHlpApi.h>
+# if _WIN32_WINNT >= 0x0600
# define HAVE_IF_NAMETOINDEX 1
# endif
#else
diff --git a/ext/spl/doxygen.cfg b/ext/spl/doxygen.cfg
index 4b7178723..5c7025a9a 100755
--- a/ext/spl/doxygen.cfg
+++ b/ext/spl/doxygen.cfg
@@ -111,7 +111,7 @@ HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = YES
CHM_FILE = ../spl.chm
-HHC_LOCATION = hhc.exe
+#HHC_LOCATION = hhc.exe
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
@@ -210,7 +210,7 @@ MAX_DOT_GRAPH_WIDTH = 1200
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 0
GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
+DOT_CLEANUP = NO
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
diff --git a/ext/spl/examples/autoload.inc b/ext/spl/examples/autoload.inc
index 5871e7d63..5871e7d63 100755..100644
--- a/ext/spl/examples/autoload.inc
+++ b/ext/spl/examples/autoload.inc
diff --git a/ext/spl/examples/callbackfilteriterator.inc b/ext/spl/examples/callbackfilteriterator.inc
index 51757012e..51757012e 100755..100644
--- a/ext/spl/examples/callbackfilteriterator.inc
+++ b/ext/spl/examples/callbackfilteriterator.inc
diff --git a/ext/spl/examples/dbaarray.inc b/ext/spl/examples/dbaarray.inc
index d448ad729..d448ad729 100755..100644
--- a/ext/spl/examples/dbaarray.inc
+++ b/ext/spl/examples/dbaarray.inc
diff --git a/ext/spl/examples/dbareader.inc b/ext/spl/examples/dbareader.inc
index b09791239..b09791239 100755..100644
--- a/ext/spl/examples/dbareader.inc
+++ b/ext/spl/examples/dbareader.inc
diff --git a/ext/spl/examples/directoryfilterdots.inc b/ext/spl/examples/directoryfilterdots.inc
index 37f14b710..37f14b710 100755..100644
--- a/ext/spl/examples/directoryfilterdots.inc
+++ b/ext/spl/examples/directoryfilterdots.inc
diff --git a/ext/spl/examples/directorytree.inc b/ext/spl/examples/directorytree.inc
index 7bd9c2c59..7bd9c2c59 100755..100644
--- a/ext/spl/examples/directorytree.inc
+++ b/ext/spl/examples/directorytree.inc
diff --git a/ext/spl/examples/dualiterator.inc b/ext/spl/examples/dualiterator.inc
index 4cee20343..4cee20343 100755..100644
--- a/ext/spl/examples/dualiterator.inc
+++ b/ext/spl/examples/dualiterator.inc
diff --git a/ext/spl/examples/findfile.inc b/ext/spl/examples/findfile.inc
index 02ab79243..02ab79243 100755..100644
--- a/ext/spl/examples/findfile.inc
+++ b/ext/spl/examples/findfile.inc
diff --git a/ext/spl/examples/inigroups.inc b/ext/spl/examples/inigroups.inc
index 62cfa3e02..62cfa3e02 100755..100644
--- a/ext/spl/examples/inigroups.inc
+++ b/ext/spl/examples/inigroups.inc
diff --git a/ext/spl/examples/keyfilter.inc b/ext/spl/examples/keyfilter.inc
index eaf6b7736..eaf6b7736 100755..100644
--- a/ext/spl/examples/keyfilter.inc
+++ b/ext/spl/examples/keyfilter.inc
diff --git a/ext/spl/examples/recursivecomparedualiterator.inc b/ext/spl/examples/recursivecomparedualiterator.inc
index 75265c1d5..75265c1d5 100755..100644
--- a/ext/spl/examples/recursivecomparedualiterator.inc
+++ b/ext/spl/examples/recursivecomparedualiterator.inc
diff --git a/ext/spl/examples/recursivedualiterator.inc b/ext/spl/examples/recursivedualiterator.inc
index cfa3bccbb..cfa3bccbb 100755..100644
--- a/ext/spl/examples/recursivedualiterator.inc
+++ b/ext/spl/examples/recursivedualiterator.inc
diff --git a/ext/spl/examples/regexfindfile.inc b/ext/spl/examples/regexfindfile.inc
index d5dd72253..d5dd72253 100755..100644
--- a/ext/spl/examples/regexfindfile.inc
+++ b/ext/spl/examples/regexfindfile.inc
diff --git a/ext/spl/examples/searchiterator.inc b/ext/spl/examples/searchiterator.inc
index 944a4ac5a..944a4ac5a 100755..100644
--- a/ext/spl/examples/searchiterator.inc
+++ b/ext/spl/examples/searchiterator.inc
diff --git a/ext/spl/examples/tests/dualiterator_001.phpt b/ext/spl/examples/tests/dualiterator_001.phpt
index 53c11537a..53c11537a 100755..100644
--- a/ext/spl/examples/tests/dualiterator_001.phpt
+++ b/ext/spl/examples/tests/dualiterator_001.phpt
diff --git a/ext/spl/examples/tests/examples.inc b/ext/spl/examples/tests/examples.inc
index feeba7db2..feeba7db2 100755..100644
--- a/ext/spl/examples/tests/examples.inc
+++ b/ext/spl/examples/tests/examples.inc
diff --git a/ext/spl/internal/appenditerator.inc b/ext/spl/internal/appenditerator.inc
index 28e32b15f..28e32b15f 100755..100644
--- a/ext/spl/internal/appenditerator.inc
+++ b/ext/spl/internal/appenditerator.inc
diff --git a/ext/spl/internal/cachingiterator.inc b/ext/spl/internal/cachingiterator.inc
index 33258ab95..33258ab95 100755..100644
--- a/ext/spl/internal/cachingiterator.inc
+++ b/ext/spl/internal/cachingiterator.inc
diff --git a/ext/spl/internal/emptyiterator.inc b/ext/spl/internal/emptyiterator.inc
index ac80e7958..ac80e7958 100755..100644
--- a/ext/spl/internal/emptyiterator.inc
+++ b/ext/spl/internal/emptyiterator.inc
diff --git a/ext/spl/internal/filteriterator.inc b/ext/spl/internal/filteriterator.inc
index 3330cc9e4..3330cc9e4 100755..100644
--- a/ext/spl/internal/filteriterator.inc
+++ b/ext/spl/internal/filteriterator.inc
diff --git a/ext/spl/internal/infiniteiterator.inc b/ext/spl/internal/infiniteiterator.inc
index 04d782718..04d782718 100755..100644
--- a/ext/spl/internal/infiniteiterator.inc
+++ b/ext/spl/internal/infiniteiterator.inc
diff --git a/ext/spl/internal/iteratoriterator.inc b/ext/spl/internal/iteratoriterator.inc
index 37676e053..37676e053 100755..100644
--- a/ext/spl/internal/iteratoriterator.inc
+++ b/ext/spl/internal/iteratoriterator.inc
diff --git a/ext/spl/internal/limititerator.inc b/ext/spl/internal/limititerator.inc
index c5bddead7..c5bddead7 100755..100644
--- a/ext/spl/internal/limititerator.inc
+++ b/ext/spl/internal/limititerator.inc
diff --git a/ext/spl/internal/multipleiterator.inc b/ext/spl/internal/multipleiterator.inc
index 2ed71d53a..2ed71d53a 100755..100644
--- a/ext/spl/internal/multipleiterator.inc
+++ b/ext/spl/internal/multipleiterator.inc
diff --git a/ext/spl/internal/norewinditerator.inc b/ext/spl/internal/norewinditerator.inc
index 8747a6116..8747a6116 100755..100644
--- a/ext/spl/internal/norewinditerator.inc
+++ b/ext/spl/internal/norewinditerator.inc
diff --git a/ext/spl/internal/outeriterator.inc b/ext/spl/internal/outeriterator.inc
index f26d29da5..f26d29da5 100755..100644
--- a/ext/spl/internal/outeriterator.inc
+++ b/ext/spl/internal/outeriterator.inc
diff --git a/ext/spl/internal/parentiterator.inc b/ext/spl/internal/parentiterator.inc
index cc377fcc6..cc377fcc6 100755..100644
--- a/ext/spl/internal/parentiterator.inc
+++ b/ext/spl/internal/parentiterator.inc
diff --git a/ext/spl/internal/recursivearrayiterator.inc b/ext/spl/internal/recursivearrayiterator.inc
index a9450e12a..a9450e12a 100755..100644
--- a/ext/spl/internal/recursivearrayiterator.inc
+++ b/ext/spl/internal/recursivearrayiterator.inc
diff --git a/ext/spl/internal/recursivecachingiterator.inc b/ext/spl/internal/recursivecachingiterator.inc
index 0676d435f..0676d435f 100755..100644
--- a/ext/spl/internal/recursivecachingiterator.inc
+++ b/ext/spl/internal/recursivecachingiterator.inc
diff --git a/ext/spl/internal/recursivefilteriterator.inc b/ext/spl/internal/recursivefilteriterator.inc
index b089919a3..b089919a3 100755..100644
--- a/ext/spl/internal/recursivefilteriterator.inc
+++ b/ext/spl/internal/recursivefilteriterator.inc
diff --git a/ext/spl/internal/recursiveiterator.inc b/ext/spl/internal/recursiveiterator.inc
index 1eab3d69b..1eab3d69b 100755..100644
--- a/ext/spl/internal/recursiveiterator.inc
+++ b/ext/spl/internal/recursiveiterator.inc
diff --git a/ext/spl/internal/recursiveiteratoriterator.inc b/ext/spl/internal/recursiveiteratoriterator.inc
index 35fa801e7..35fa801e7 100755..100644
--- a/ext/spl/internal/recursiveiteratoriterator.inc
+++ b/ext/spl/internal/recursiveiteratoriterator.inc
diff --git a/ext/spl/internal/recursiveregexiterator.inc b/ext/spl/internal/recursiveregexiterator.inc
index ffcff0ce4..ffcff0ce4 100755..100644
--- a/ext/spl/internal/recursiveregexiterator.inc
+++ b/ext/spl/internal/recursiveregexiterator.inc
diff --git a/ext/spl/internal/recursivetreeiterator.inc b/ext/spl/internal/recursivetreeiterator.inc
index dfcdc0599..dfcdc0599 100755..100644
--- a/ext/spl/internal/recursivetreeiterator.inc
+++ b/ext/spl/internal/recursivetreeiterator.inc
diff --git a/ext/spl/internal/regexiterator.inc b/ext/spl/internal/regexiterator.inc
index c6addb93d..c6addb93d 100755..100644
--- a/ext/spl/internal/regexiterator.inc
+++ b/ext/spl/internal/regexiterator.inc
diff --git a/ext/spl/internal/seekableiterator.inc b/ext/spl/internal/seekableiterator.inc
index b4f66bde4..b4f66bde4 100755..100644
--- a/ext/spl/internal/seekableiterator.inc
+++ b/ext/spl/internal/seekableiterator.inc
diff --git a/ext/spl/internal/splfileobject.inc b/ext/spl/internal/splfileobject.inc
index 46b941f69..46b941f69 100755..100644
--- a/ext/spl/internal/splfileobject.inc
+++ b/ext/spl/internal/splfileobject.inc
diff --git a/ext/spl/internal/splobjectstorage.inc b/ext/spl/internal/splobjectstorage.inc
index fa164066c..fa164066c 100755..100644
--- a/ext/spl/internal/splobjectstorage.inc
+++ b/ext/spl/internal/splobjectstorage.inc
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index cd0086626..cd0086626 100755..100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h
index 855a78c40..855a78c40 100755..100644
--- a/ext/spl/php_spl.h
+++ b/ext/spl/php_spl.h
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 3c6b41edb..3c6b41edb 100755..100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
diff --git a/ext/spl/spl_array.h b/ext/spl/spl_array.h
index 909f4c97d..909f4c97d 100755..100644
--- a/ext/spl/spl_array.h
+++ b/ext/spl/spl_array.h
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index b86e68659..b86e68659 100755..100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h
index 96f5dd6cb..96f5dd6cb 100755..100644
--- a/ext/spl/spl_directory.h
+++ b/ext/spl/spl_directory.h
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c
index d501f3143..d501f3143 100755..100644
--- a/ext/spl/spl_engine.c
+++ b/ext/spl/spl_engine.c
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h
index db7affef8..db7affef8 100755..100644
--- a/ext/spl/spl_engine.h
+++ b/ext/spl/spl_engine.h
diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c
index 570299a2a..570299a2a 100755..100644
--- a/ext/spl/spl_exceptions.c
+++ b/ext/spl/spl_exceptions.c
diff --git a/ext/spl/spl_exceptions.h b/ext/spl/spl_exceptions.h
index 8d3a58a30..8d3a58a30 100755..100644
--- a/ext/spl/spl_exceptions.h
+++ b/ext/spl/spl_exceptions.h
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 244bd3e0d..8bf61e868 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -583,6 +583,38 @@ SPL_METHOD(SplFixedArray, __construct)
}
/* }}} */
+/* {{{ proto void SplFixedArray::__wakeup()
+*/
+SPL_METHOD(SplFixedArray, __wakeup)
+{
+ spl_fixedarray_object *intern = (spl_fixedarray_object *) zend_object_store_get_object(getThis() TSRMLS_CC);
+ HashPosition ptr;
+ HashTable *intern_ht = zend_std_get_properties(getThis() TSRMLS_CC);
+ zval **data;
+
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
+ return;
+ }
+
+ if (!intern->array) {
+ int index = 0;
+ int size = zend_hash_num_elements(intern_ht);
+
+ intern->array = emalloc(sizeof(spl_fixedarray));
+ spl_fixedarray_init(intern->array, size TSRMLS_CC);
+
+ for (zend_hash_internal_pointer_reset_ex(intern_ht, &ptr); zend_hash_get_current_data_ex(intern_ht, (void **) &data, &ptr) == SUCCESS; zend_hash_move_forward_ex(intern_ht, &ptr)) {
+ Z_ADDREF_PP(data);
+ intern->array->elements[index++] = *data;
+ }
+
+ /* Remove the unserialised properties, since we now have the elements
+ * within the spl_fixedarray_object structure. */
+ zend_hash_clean(intern_ht);
+ }
+}
+/* }}} */
+
/* {{{ proto int SplFixedArray::count(void)
*/
SPL_METHOD(SplFixedArray, count)
@@ -1060,6 +1092,7 @@ ZEND_END_ARG_INFO()
static zend_function_entry spl_funcs_SplFixedArray[] = { /* {{{ */
SPL_ME(SplFixedArray, __construct, arginfo_splfixedarray_construct,ZEND_ACC_PUBLIC)
+ SPL_ME(SplFixedArray, __wakeup, arginfo_splfixedarray_void, ZEND_ACC_PUBLIC)
SPL_ME(SplFixedArray, count, arginfo_splfixedarray_void, ZEND_ACC_PUBLIC)
SPL_ME(SplFixedArray, toArray, arginfo_splfixedarray_void, ZEND_ACC_PUBLIC)
SPL_ME(SplFixedArray, fromArray, arginfo_fixedarray_fromArray, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index b9fd5dc8b..b9fd5dc8b 100755..100644
--- a/ext/spl/spl_functions.c
+++ b/ext/spl/spl_functions.c
diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h
index 394de6ae9..394de6ae9 100755..100644
--- a/ext/spl/spl_functions.h
+++ b/ext/spl/spl_functions.h
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 098d7dc1e..7b77cf5bb 100755..100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -230,7 +230,7 @@ next_step:
if (iterator->funcs->valid(iterator TSRMLS_CC) == FAILURE) {
break;
}
- object->iterators[object->level].state = RS_TEST;
+ object->iterators[object->level].state = RS_TEST;
/* break; */
case RS_TEST:
ce = object->iterators[object->level].ce;
diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h
index 4a2c999c3..4a2c999c3 100755..100644
--- a/ext/spl/spl_iterators.h
+++ b/ext/spl/spl_iterators.h
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 4b8be82ee..4b8be82ee 100755..100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
diff --git a/ext/spl/spl_observer.h b/ext/spl/spl_observer.h
index bfee74f30..bfee74f30 100755..100644
--- a/ext/spl/spl_observer.h
+++ b/ext/spl/spl_observer.h
diff --git a/ext/spl/tests/SplFixedArray_serialize.phpt b/ext/spl/tests/SplFixedArray_serialize.phpt
new file mode 100644
index 000000000..f99812ecc
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_serialize.phpt
@@ -0,0 +1,52 @@
+--TEST--
+SplFixedArray serialisation
+--FILE--
+<?php
+
+$array = new SplFixedArray(5);
+
+$obj = new stdClass;
+$obj->prop = 'value';
+
+$array[0] = 'foo';
+$array[2] = 42;
+$array[3] = $obj;
+$array[4] = range(1, 5);
+
+$ser = serialize($array);
+echo "$ser\n";
+$unser = unserialize($ser);
+
+printf("count: %d\n", count($unser));
+printf("getSize(): %d\n", $unser->getSize());
+
+var_dump($unser[0], $unser[1], $unser[2], $unser[3], $unser[4]);
+
+$unser[4] = 'quux';
+var_dump($unser[4]);
+
+?>
+--EXPECT--
+O:13:"SplFixedArray":5:{i:0;s:3:"foo";i:1;N;i:2;i:42;i:3;O:8:"stdClass":1:{s:4:"prop";s:5:"value";}i:4;a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}
+count: 5
+getSize(): 5
+string(3) "foo"
+NULL
+int(42)
+object(stdClass)#4 (1) {
+ ["prop"]=>
+ string(5) "value"
+}
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+}
+string(4) "quux"
diff --git a/ext/spl/tests/array_001.phpt b/ext/spl/tests/array_001.phpt
index b55fcba1f..b55fcba1f 100755..100644
--- a/ext/spl/tests/array_001.phpt
+++ b/ext/spl/tests/array_001.phpt
diff --git a/ext/spl/tests/array_002.phpt b/ext/spl/tests/array_002.phpt
index 55935882f..55935882f 100755..100644
--- a/ext/spl/tests/array_002.phpt
+++ b/ext/spl/tests/array_002.phpt
diff --git a/ext/spl/tests/array_003.phpt b/ext/spl/tests/array_003.phpt
index de4ce30f9..de4ce30f9 100755..100644
--- a/ext/spl/tests/array_003.phpt
+++ b/ext/spl/tests/array_003.phpt
diff --git a/ext/spl/tests/array_004.phpt b/ext/spl/tests/array_004.phpt
index 0b80e5c89..0b80e5c89 100755..100644
--- a/ext/spl/tests/array_004.phpt
+++ b/ext/spl/tests/array_004.phpt
diff --git a/ext/spl/tests/array_005.phpt b/ext/spl/tests/array_005.phpt
index d7ef15db1..d7ef15db1 100755..100644
--- a/ext/spl/tests/array_005.phpt
+++ b/ext/spl/tests/array_005.phpt
diff --git a/ext/spl/tests/array_006.phpt b/ext/spl/tests/array_006.phpt
index 49f2838f7..49f2838f7 100755..100644
--- a/ext/spl/tests/array_006.phpt
+++ b/ext/spl/tests/array_006.phpt
diff --git a/ext/spl/tests/array_007.phpt b/ext/spl/tests/array_007.phpt
index 7d9bf6afc..7d9bf6afc 100755..100644
--- a/ext/spl/tests/array_007.phpt
+++ b/ext/spl/tests/array_007.phpt
diff --git a/ext/spl/tests/array_008.phpt b/ext/spl/tests/array_008.phpt
index e7a618dda..e7a618dda 100755..100644
--- a/ext/spl/tests/array_008.phpt
+++ b/ext/spl/tests/array_008.phpt
diff --git a/ext/spl/tests/array_009.phpt b/ext/spl/tests/array_009.phpt
index fc0d60baa..fc0d60baa 100755..100644
--- a/ext/spl/tests/array_009.phpt
+++ b/ext/spl/tests/array_009.phpt
diff --git a/ext/spl/tests/array_009a.phpt b/ext/spl/tests/array_009a.phpt
index 396aa9b9e..396aa9b9e 100755..100644
--- a/ext/spl/tests/array_009a.phpt
+++ b/ext/spl/tests/array_009a.phpt
diff --git a/ext/spl/tests/array_010.phpt b/ext/spl/tests/array_010.phpt
index d2f3de7f6..d2f3de7f6 100755..100644
--- a/ext/spl/tests/array_010.phpt
+++ b/ext/spl/tests/array_010.phpt
diff --git a/ext/spl/tests/array_011.phpt b/ext/spl/tests/array_011.phpt
index 0c5ad55d6..0c5ad55d6 100755..100644
--- a/ext/spl/tests/array_011.phpt
+++ b/ext/spl/tests/array_011.phpt
diff --git a/ext/spl/tests/array_012.phpt b/ext/spl/tests/array_012.phpt
index 2ee9724d2..2ee9724d2 100755..100644
--- a/ext/spl/tests/array_012.phpt
+++ b/ext/spl/tests/array_012.phpt
diff --git a/ext/spl/tests/array_013.phpt b/ext/spl/tests/array_013.phpt
index 3fda53884..3fda53884 100755..100644
--- a/ext/spl/tests/array_013.phpt
+++ b/ext/spl/tests/array_013.phpt
diff --git a/ext/spl/tests/array_014.phpt b/ext/spl/tests/array_014.phpt
index 1ac9d4f95..1ac9d4f95 100755..100644
--- a/ext/spl/tests/array_014.phpt
+++ b/ext/spl/tests/array_014.phpt
diff --git a/ext/spl/tests/array_015.phpt b/ext/spl/tests/array_015.phpt
index f0bf9f408..f0bf9f408 100755..100644
--- a/ext/spl/tests/array_015.phpt
+++ b/ext/spl/tests/array_015.phpt
diff --git a/ext/spl/tests/array_016.phpt b/ext/spl/tests/array_016.phpt
index 8637c5c88..8637c5c88 100755..100644
--- a/ext/spl/tests/array_016.phpt
+++ b/ext/spl/tests/array_016.phpt
diff --git a/ext/spl/tests/array_017.phpt b/ext/spl/tests/array_017.phpt
index 8f3d34543..8f3d34543 100755..100644
--- a/ext/spl/tests/array_017.phpt
+++ b/ext/spl/tests/array_017.phpt
diff --git a/ext/spl/tests/array_018.phpt b/ext/spl/tests/array_018.phpt
index 7c68a6280..7c68a6280 100755..100644
--- a/ext/spl/tests/array_018.phpt
+++ b/ext/spl/tests/array_018.phpt
Binary files differ
diff --git a/ext/spl/tests/array_019.phpt b/ext/spl/tests/array_019.phpt
index d128f4de7..d128f4de7 100755..100644
--- a/ext/spl/tests/array_019.phpt
+++ b/ext/spl/tests/array_019.phpt
diff --git a/ext/spl/tests/array_020.phpt b/ext/spl/tests/array_020.phpt
index 4c6fe0df2..4c6fe0df2 100755..100644
--- a/ext/spl/tests/array_020.phpt
+++ b/ext/spl/tests/array_020.phpt
diff --git a/ext/spl/tests/array_021.phpt b/ext/spl/tests/array_021.phpt
index f2ae0c87e..f2ae0c87e 100755..100644
--- a/ext/spl/tests/array_021.phpt
+++ b/ext/spl/tests/array_021.phpt
diff --git a/ext/spl/tests/array_022.phpt b/ext/spl/tests/array_022.phpt
index 82da3bbfe..82da3bbfe 100755..100644
--- a/ext/spl/tests/array_022.phpt
+++ b/ext/spl/tests/array_022.phpt
diff --git a/ext/spl/tests/bug28822.phpt b/ext/spl/tests/bug28822.phpt
index 7114edac9..7114edac9 100755..100644
--- a/ext/spl/tests/bug28822.phpt
+++ b/ext/spl/tests/bug28822.phpt
diff --git a/ext/spl/tests/bug31185.phpt b/ext/spl/tests/bug31185.phpt
index aa410ebaa..aa410ebaa 100755..100644
--- a/ext/spl/tests/bug31185.phpt
+++ b/ext/spl/tests/bug31185.phpt
diff --git a/ext/spl/tests/bug31346.phpt b/ext/spl/tests/bug31346.phpt
index 9b5618ec0..9b5618ec0 100755..100644
--- a/ext/spl/tests/bug31346.phpt
+++ b/ext/spl/tests/bug31346.phpt
diff --git a/ext/spl/tests/bug31348.phpt b/ext/spl/tests/bug31348.phpt
index 047e4b223..047e4b223 100755..100644
--- a/ext/spl/tests/bug31348.phpt
+++ b/ext/spl/tests/bug31348.phpt
diff --git a/ext/spl/tests/bug31926.phpt b/ext/spl/tests/bug31926.phpt
index 2d72df421..2d72df421 100755..100644
--- a/ext/spl/tests/bug31926.phpt
+++ b/ext/spl/tests/bug31926.phpt
diff --git a/ext/spl/tests/bug32134.phpt b/ext/spl/tests/bug32134.phpt
index 5a880b321..5a880b321 100755..100644
--- a/ext/spl/tests/bug32134.phpt
+++ b/ext/spl/tests/bug32134.phpt
diff --git a/ext/spl/tests/bug32394.phpt b/ext/spl/tests/bug32394.phpt
index 8189b23f7..8189b23f7 100755..100644
--- a/ext/spl/tests/bug32394.phpt
+++ b/ext/spl/tests/bug32394.phpt
diff --git a/ext/spl/tests/bug33136.phpt b/ext/spl/tests/bug33136.phpt
index 121ff58ad..121ff58ad 100755..100644
--- a/ext/spl/tests/bug33136.phpt
+++ b/ext/spl/tests/bug33136.phpt
diff --git a/ext/spl/tests/bug36287.phpt b/ext/spl/tests/bug36287.phpt
index 0c3f287d4..0c3f287d4 100755..100644
--- a/ext/spl/tests/bug36287.phpt
+++ b/ext/spl/tests/bug36287.phpt
diff --git a/ext/spl/tests/bug36941.phpt b/ext/spl/tests/bug36941.phpt
index 528ba4a46..528ba4a46 100755..100644
--- a/ext/spl/tests/bug36941.phpt
+++ b/ext/spl/tests/bug36941.phpt
diff --git a/ext/spl/tests/bug37457.phpt b/ext/spl/tests/bug37457.phpt
index e66fa4d6e..e66fa4d6e 100755..100644
--- a/ext/spl/tests/bug37457.phpt
+++ b/ext/spl/tests/bug37457.phpt
diff --git a/ext/spl/tests/bug40442.phpt b/ext/spl/tests/bug40442.phpt
index fbeb22d2b..fbeb22d2b 100755..100644
--- a/ext/spl/tests/bug40442.phpt
+++ b/ext/spl/tests/bug40442.phpt
diff --git a/ext/spl/tests/bug40872.phpt b/ext/spl/tests/bug40872.phpt
index a48fe74fe..a48fe74fe 100755..100644
--- a/ext/spl/tests/bug40872.phpt
+++ b/ext/spl/tests/bug40872.phpt
diff --git a/ext/spl/tests/bug42654.phpt b/ext/spl/tests/bug42654.phpt
index 20aad74b7..20aad74b7 100755..100644
--- a/ext/spl/tests/bug42654.phpt
+++ b/ext/spl/tests/bug42654.phpt
diff --git a/ext/spl/tests/bug42703.phpt b/ext/spl/tests/bug42703.phpt
index 5c52763cd..5c52763cd 100755..100644
--- a/ext/spl/tests/bug42703.phpt
+++ b/ext/spl/tests/bug42703.phpt
diff --git a/ext/spl/tests/bug49972.phpt b/ext/spl/tests/bug49972.phpt
index 843c2519b..843c2519b 100755..100644
--- a/ext/spl/tests/bug49972.phpt
+++ b/ext/spl/tests/bug49972.phpt
diff --git a/ext/spl/tests/bug61697.phpt b/ext/spl/tests/bug61697.phpt
new file mode 100644
index 000000000..d95caef97
--- /dev/null
+++ b/ext/spl/tests/bug61697.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #61697 (spl_autoload_functions returns lambda functions incorrectly)
+--XFAIL--
+Bug #61697 not fixed yet
+--FILE--
+<?php
+
+function f1($class) { echo "f1: [[$class]]\n"; }
+function f2($class) { echo "f2: [[$class]]\n"; }
+
+spl_autoload_register('f1');
+spl_autoload_register('f2');
+spl_autoload_register(create_function('$class', 'echo "cf1: [[$class]]\n";'));
+spl_autoload_register(create_function('$class', 'echo "cf2: [[$class]]\n";'));
+
+foreach (spl_autoload_functions() AS $func)
+{
+ spl_autoload_unregister($func);
+}
+
+print_r(spl_autoload_functions());
+?>
+--EXPECTF--
+Array
+(
+)
diff --git a/ext/spl/tests/dit_001.phpt b/ext/spl/tests/dit_001.phpt
index a56166def..a56166def 100755..100644
--- a/ext/spl/tests/dit_001.phpt
+++ b/ext/spl/tests/dit_001.phpt
diff --git a/ext/spl/tests/dit_002.phpt b/ext/spl/tests/dit_002.phpt
index a2665421e..a2665421e 100755..100644
--- a/ext/spl/tests/dit_002.phpt
+++ b/ext/spl/tests/dit_002.phpt
diff --git a/ext/spl/tests/dit_003.phpt b/ext/spl/tests/dit_003.phpt
index 4ffc2921e..4ffc2921e 100755..100644
--- a/ext/spl/tests/dit_003.phpt
+++ b/ext/spl/tests/dit_003.phpt
diff --git a/ext/spl/tests/fileobject_001.phpt b/ext/spl/tests/fileobject_001.phpt
index 61f688d79..61f688d79 100755..100644
--- a/ext/spl/tests/fileobject_001.phpt
+++ b/ext/spl/tests/fileobject_001.phpt
diff --git a/ext/spl/tests/fileobject_002.phpt b/ext/spl/tests/fileobject_002.phpt
index 8031e98fd..8031e98fd 100755..100644
--- a/ext/spl/tests/fileobject_002.phpt
+++ b/ext/spl/tests/fileobject_002.phpt
diff --git a/ext/spl/tests/fileobject_003.phpt b/ext/spl/tests/fileobject_003.phpt
index 6cc650b7b..6cc650b7b 100755..100644
--- a/ext/spl/tests/fileobject_003.phpt
+++ b/ext/spl/tests/fileobject_003.phpt
diff --git a/ext/spl/tests/iterator_001.phpt b/ext/spl/tests/iterator_001.phpt
index 26df62e85..26df62e85 100755..100644
--- a/ext/spl/tests/iterator_001.phpt
+++ b/ext/spl/tests/iterator_001.phpt
diff --git a/ext/spl/tests/iterator_002.phpt b/ext/spl/tests/iterator_002.phpt
index 527fe6b77..527fe6b77 100755..100644
--- a/ext/spl/tests/iterator_002.phpt
+++ b/ext/spl/tests/iterator_002.phpt
diff --git a/ext/spl/tests/iterator_003.phpt b/ext/spl/tests/iterator_003.phpt
index 11d37b303..11d37b303 100755..100644
--- a/ext/spl/tests/iterator_003.phpt
+++ b/ext/spl/tests/iterator_003.phpt
diff --git a/ext/spl/tests/iterator_004.phpt b/ext/spl/tests/iterator_004.phpt
index e07cd32c3..e07cd32c3 100755..100644
--- a/ext/spl/tests/iterator_004.phpt
+++ b/ext/spl/tests/iterator_004.phpt
diff --git a/ext/spl/tests/iterator_005.phpt b/ext/spl/tests/iterator_005.phpt
index 640ca9f9c..640ca9f9c 100755..100644
--- a/ext/spl/tests/iterator_005.phpt
+++ b/ext/spl/tests/iterator_005.phpt
diff --git a/ext/spl/tests/iterator_006.phpt b/ext/spl/tests/iterator_006.phpt
index 54da89cbd..54da89cbd 100755..100644
--- a/ext/spl/tests/iterator_006.phpt
+++ b/ext/spl/tests/iterator_006.phpt
diff --git a/ext/spl/tests/iterator_007.phpt b/ext/spl/tests/iterator_007.phpt
index d26c01ef7..d26c01ef7 100755..100644
--- a/ext/spl/tests/iterator_007.phpt
+++ b/ext/spl/tests/iterator_007.phpt
diff --git a/ext/spl/tests/iterator_008.phpt b/ext/spl/tests/iterator_008.phpt
index 04f8c0034..04f8c0034 100755..100644
--- a/ext/spl/tests/iterator_008.phpt
+++ b/ext/spl/tests/iterator_008.phpt
diff --git a/ext/spl/tests/iterator_009.phpt b/ext/spl/tests/iterator_009.phpt
index 0bfe74ef7..0bfe74ef7 100755..100644
--- a/ext/spl/tests/iterator_009.phpt
+++ b/ext/spl/tests/iterator_009.phpt
diff --git a/ext/spl/tests/iterator_010.phpt b/ext/spl/tests/iterator_010.phpt
index 39d1000f6..39d1000f6 100755..100644
--- a/ext/spl/tests/iterator_010.phpt
+++ b/ext/spl/tests/iterator_010.phpt
diff --git a/ext/spl/tests/iterator_011.phpt b/ext/spl/tests/iterator_011.phpt
index fca159a20..fca159a20 100755..100644
--- a/ext/spl/tests/iterator_011.phpt
+++ b/ext/spl/tests/iterator_011.phpt
diff --git a/ext/spl/tests/iterator_012.phpt b/ext/spl/tests/iterator_012.phpt
index 81bc02f69..81bc02f69 100755..100644
--- a/ext/spl/tests/iterator_012.phpt
+++ b/ext/spl/tests/iterator_012.phpt
diff --git a/ext/spl/tests/iterator_013.phpt b/ext/spl/tests/iterator_013.phpt
index 119631c00..119631c00 100755..100644
--- a/ext/spl/tests/iterator_013.phpt
+++ b/ext/spl/tests/iterator_013.phpt
diff --git a/ext/spl/tests/iterator_014.phpt b/ext/spl/tests/iterator_014.phpt
index 119fad05f..119fad05f 100755..100644
--- a/ext/spl/tests/iterator_014.phpt
+++ b/ext/spl/tests/iterator_014.phpt
diff --git a/ext/spl/tests/iterator_015.phpt b/ext/spl/tests/iterator_015.phpt
index aa30f79e1..aa30f79e1 100755..100644
--- a/ext/spl/tests/iterator_015.phpt
+++ b/ext/spl/tests/iterator_015.phpt
diff --git a/ext/spl/tests/iterator_016.phpt b/ext/spl/tests/iterator_016.phpt
index f231c6eb3..f231c6eb3 100755..100644
--- a/ext/spl/tests/iterator_016.phpt
+++ b/ext/spl/tests/iterator_016.phpt
diff --git a/ext/spl/tests/iterator_017.phpt b/ext/spl/tests/iterator_017.phpt
index 39d1000f6..39d1000f6 100755..100644
--- a/ext/spl/tests/iterator_017.phpt
+++ b/ext/spl/tests/iterator_017.phpt
diff --git a/ext/spl/tests/iterator_018.phpt b/ext/spl/tests/iterator_018.phpt
index 9c234bb11..9c234bb11 100755..100644
--- a/ext/spl/tests/iterator_018.phpt
+++ b/ext/spl/tests/iterator_018.phpt
diff --git a/ext/spl/tests/iterator_019.phpt b/ext/spl/tests/iterator_019.phpt
index 81bc02f69..81bc02f69 100755..100644
--- a/ext/spl/tests/iterator_019.phpt
+++ b/ext/spl/tests/iterator_019.phpt
diff --git a/ext/spl/tests/iterator_020.phpt b/ext/spl/tests/iterator_020.phpt
index 119631c00..119631c00 100755..100644
--- a/ext/spl/tests/iterator_020.phpt
+++ b/ext/spl/tests/iterator_020.phpt
diff --git a/ext/spl/tests/iterator_021.phpt b/ext/spl/tests/iterator_021.phpt
index 4f2395a8e..4f2395a8e 100755..100644
--- a/ext/spl/tests/iterator_021.phpt
+++ b/ext/spl/tests/iterator_021.phpt
diff --git a/ext/spl/tests/iterator_022.phpt b/ext/spl/tests/iterator_022.phpt
index 8d055313a..8d055313a 100755..100644
--- a/ext/spl/tests/iterator_022.phpt
+++ b/ext/spl/tests/iterator_022.phpt
diff --git a/ext/spl/tests/iterator_023.phpt b/ext/spl/tests/iterator_023.phpt
index 1b6b4685e..1b6b4685e 100755..100644
--- a/ext/spl/tests/iterator_023.phpt
+++ b/ext/spl/tests/iterator_023.phpt
diff --git a/ext/spl/tests/iterator_024.phpt b/ext/spl/tests/iterator_024.phpt
index 0c7dea15b..0c7dea15b 100755..100644
--- a/ext/spl/tests/iterator_024.phpt
+++ b/ext/spl/tests/iterator_024.phpt
diff --git a/ext/spl/tests/iterator_025.phpt b/ext/spl/tests/iterator_025.phpt
index e582b1f39..e582b1f39 100755..100644
--- a/ext/spl/tests/iterator_025.phpt
+++ b/ext/spl/tests/iterator_025.phpt
diff --git a/ext/spl/tests/iterator_026.phpt b/ext/spl/tests/iterator_026.phpt
index 8eb77a7ba..8eb77a7ba 100755..100644
--- a/ext/spl/tests/iterator_026.phpt
+++ b/ext/spl/tests/iterator_026.phpt
diff --git a/ext/spl/tests/iterator_027.phpt b/ext/spl/tests/iterator_027.phpt
index fd9ba70c0..fd9ba70c0 100755..100644
--- a/ext/spl/tests/iterator_027.phpt
+++ b/ext/spl/tests/iterator_027.phpt
diff --git a/ext/spl/tests/iterator_028.phpt b/ext/spl/tests/iterator_028.phpt
index 8b53b2123..8b53b2123 100755..100644
--- a/ext/spl/tests/iterator_028.phpt
+++ b/ext/spl/tests/iterator_028.phpt
diff --git a/ext/spl/tests/iterator_029.phpt b/ext/spl/tests/iterator_029.phpt
index e5bfde021..e5bfde021 100755..100644
--- a/ext/spl/tests/iterator_029.phpt
+++ b/ext/spl/tests/iterator_029.phpt
diff --git a/ext/spl/tests/iterator_030.phpt b/ext/spl/tests/iterator_030.phpt
index 29d147f12..29d147f12 100755..100644
--- a/ext/spl/tests/iterator_030.phpt
+++ b/ext/spl/tests/iterator_030.phpt
diff --git a/ext/spl/tests/iterator_031.phpt b/ext/spl/tests/iterator_031.phpt
index 40342f4bb..40342f4bb 100755..100644
--- a/ext/spl/tests/iterator_031.phpt
+++ b/ext/spl/tests/iterator_031.phpt
diff --git a/ext/spl/tests/iterator_032.phpt b/ext/spl/tests/iterator_032.phpt
index 84eb8e61f..84eb8e61f 100755..100644
--- a/ext/spl/tests/iterator_032.phpt
+++ b/ext/spl/tests/iterator_032.phpt
diff --git a/ext/spl/tests/iterator_033.phpt b/ext/spl/tests/iterator_033.phpt
index 548759ccb..548759ccb 100755..100644
--- a/ext/spl/tests/iterator_033.phpt
+++ b/ext/spl/tests/iterator_033.phpt
diff --git a/ext/spl/tests/iterator_034.phpt b/ext/spl/tests/iterator_034.phpt
index 3329e744b..3329e744b 100755..100644
--- a/ext/spl/tests/iterator_034.phpt
+++ b/ext/spl/tests/iterator_034.phpt
diff --git a/ext/spl/tests/iterator_036.phpt b/ext/spl/tests/iterator_036.phpt
index 9a9e66b3b..9a9e66b3b 100755..100644
--- a/ext/spl/tests/iterator_036.phpt
+++ b/ext/spl/tests/iterator_036.phpt
diff --git a/ext/spl/tests/iterator_037.phpt b/ext/spl/tests/iterator_037.phpt
index 2aa61bb03..2aa61bb03 100755..100644
--- a/ext/spl/tests/iterator_037.phpt
+++ b/ext/spl/tests/iterator_037.phpt
diff --git a/ext/spl/tests/iterator_038.phpt b/ext/spl/tests/iterator_038.phpt
index 9b890e266..9b890e266 100755..100644
--- a/ext/spl/tests/iterator_038.phpt
+++ b/ext/spl/tests/iterator_038.phpt
diff --git a/ext/spl/tests/iterator_039.phpt b/ext/spl/tests/iterator_039.phpt
index 17c9bc1ca..17c9bc1ca 100755..100644
--- a/ext/spl/tests/iterator_039.phpt
+++ b/ext/spl/tests/iterator_039.phpt
diff --git a/ext/spl/tests/iterator_040.phpt b/ext/spl/tests/iterator_040.phpt
index ae00c81df..ae00c81df 100755..100644
--- a/ext/spl/tests/iterator_040.phpt
+++ b/ext/spl/tests/iterator_040.phpt
diff --git a/ext/spl/tests/iterator_041.phpt b/ext/spl/tests/iterator_041.phpt
index e00ac6bc2..e00ac6bc2 100755..100644
--- a/ext/spl/tests/iterator_041.phpt
+++ b/ext/spl/tests/iterator_041.phpt
diff --git a/ext/spl/tests/iterator_041a.phpt b/ext/spl/tests/iterator_041a.phpt
index ec999a5da..ec999a5da 100755..100644
--- a/ext/spl/tests/iterator_041a.phpt
+++ b/ext/spl/tests/iterator_041a.phpt
diff --git a/ext/spl/tests/iterator_041b.phpt b/ext/spl/tests/iterator_041b.phpt
index e7ea8b800..e7ea8b800 100755..100644
--- a/ext/spl/tests/iterator_041b.phpt
+++ b/ext/spl/tests/iterator_041b.phpt
diff --git a/ext/spl/tests/iterator_042.phpt b/ext/spl/tests/iterator_042.phpt
index 95fea2f6b..95fea2f6b 100755..100644
--- a/ext/spl/tests/iterator_042.phpt
+++ b/ext/spl/tests/iterator_042.phpt
diff --git a/ext/spl/tests/iterator_043.phpt b/ext/spl/tests/iterator_043.phpt
index 301a593ba..301a593ba 100755..100644
--- a/ext/spl/tests/iterator_043.phpt
+++ b/ext/spl/tests/iterator_043.phpt
diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt
index 1271ccaa6..1271ccaa6 100755..100644
--- a/ext/spl/tests/iterator_044.phpt
+++ b/ext/spl/tests/iterator_044.phpt
diff --git a/ext/spl/tests/iterator_045.phpt b/ext/spl/tests/iterator_045.phpt
index d76b2d93c..d76b2d93c 100755..100644
--- a/ext/spl/tests/iterator_045.phpt
+++ b/ext/spl/tests/iterator_045.phpt
diff --git a/ext/spl/tests/iterator_046.phpt b/ext/spl/tests/iterator_046.phpt
index f57415a3b..f57415a3b 100755..100644
--- a/ext/spl/tests/iterator_046.phpt
+++ b/ext/spl/tests/iterator_046.phpt
diff --git a/ext/spl/tests/iterator_047.phpt b/ext/spl/tests/iterator_047.phpt
index 548f48652..548f48652 100755..100644
--- a/ext/spl/tests/iterator_047.phpt
+++ b/ext/spl/tests/iterator_047.phpt
diff --git a/ext/spl/tests/iterator_048.phpt b/ext/spl/tests/iterator_048.phpt
index bad4e7888..bad4e7888 100755..100644
--- a/ext/spl/tests/iterator_048.phpt
+++ b/ext/spl/tests/iterator_048.phpt
diff --git a/ext/spl/tests/iterator_049.phpt b/ext/spl/tests/iterator_049.phpt
index b9ab2c30a..b9ab2c30a 100755..100644
--- a/ext/spl/tests/iterator_049.phpt
+++ b/ext/spl/tests/iterator_049.phpt
diff --git a/ext/spl/tests/iterator_049b.phpt b/ext/spl/tests/iterator_049b.phpt
index 03c7350fa..03c7350fa 100755..100644
--- a/ext/spl/tests/iterator_049b.phpt
+++ b/ext/spl/tests/iterator_049b.phpt
Binary files differ
diff --git a/ext/spl/tests/iterator_050.phpt b/ext/spl/tests/iterator_050.phpt
index fed4a3b2e..fed4a3b2e 100755..100644
--- a/ext/spl/tests/iterator_050.phpt
+++ b/ext/spl/tests/iterator_050.phpt
diff --git a/ext/spl/tests/iterator_051.phpt b/ext/spl/tests/iterator_051.phpt
index 2d198db52..2d198db52 100755..100644
--- a/ext/spl/tests/iterator_051.phpt
+++ b/ext/spl/tests/iterator_051.phpt
diff --git a/ext/spl/tests/iterator_052.phpt b/ext/spl/tests/iterator_052.phpt
index c68bd5234..c68bd5234 100755..100644
--- a/ext/spl/tests/iterator_052.phpt
+++ b/ext/spl/tests/iterator_052.phpt
diff --git a/ext/spl/tests/iterator_053.phpt b/ext/spl/tests/iterator_053.phpt
index 5d9c740c3..5d9c740c3 100755..100644
--- a/ext/spl/tests/iterator_053.phpt
+++ b/ext/spl/tests/iterator_053.phpt
diff --git a/ext/spl/tests/iterator_054.phpt b/ext/spl/tests/iterator_054.phpt
index 1f1cd580c..1f1cd580c 100755..100644
--- a/ext/spl/tests/iterator_054.phpt
+++ b/ext/spl/tests/iterator_054.phpt
diff --git a/ext/spl/tests/iterator_055.phpt b/ext/spl/tests/iterator_055.phpt
index dec68a463..dec68a463 100755..100644
--- a/ext/spl/tests/iterator_055.phpt
+++ b/ext/spl/tests/iterator_055.phpt
diff --git a/ext/spl/tests/iterator_068.phpt b/ext/spl/tests/iterator_068.phpt
index 4845708d4..4845708d4 100755..100644
--- a/ext/spl/tests/iterator_068.phpt
+++ b/ext/spl/tests/iterator_068.phpt
diff --git a/ext/spl/tests/multiple_iterator_001.phpt b/ext/spl/tests/multiple_iterator_001.phpt
index edd03f504..edd03f504 100755..100644
--- a/ext/spl/tests/multiple_iterator_001.phpt
+++ b/ext/spl/tests/multiple_iterator_001.phpt
diff --git a/ext/spl/tests/observer_001.phpt b/ext/spl/tests/observer_001.phpt
index e7d72b9e2..e7d72b9e2 100755..100644
--- a/ext/spl/tests/observer_001.phpt
+++ b/ext/spl/tests/observer_001.phpt
diff --git a/ext/spl/tests/observer_002.phpt b/ext/spl/tests/observer_002.phpt
index 5d006177f..5d006177f 100755..100644
--- a/ext/spl/tests/observer_002.phpt
+++ b/ext/spl/tests/observer_002.phpt
diff --git a/ext/spl/tests/observer_003.phpt b/ext/spl/tests/observer_003.phpt
index 5e5da22e3..5e5da22e3 100755..100644
--- a/ext/spl/tests/observer_003.phpt
+++ b/ext/spl/tests/observer_003.phpt
diff --git a/ext/spl/tests/observer_004.phpt b/ext/spl/tests/observer_004.phpt
index 0bc2512d8..0bc2512d8 100755..100644
--- a/ext/spl/tests/observer_004.phpt
+++ b/ext/spl/tests/observer_004.phpt
diff --git a/ext/spl/tests/observer_005.phpt b/ext/spl/tests/observer_005.phpt
index 883602f51..883602f51 100755..100644
--- a/ext/spl/tests/observer_005.phpt
+++ b/ext/spl/tests/observer_005.phpt
diff --git a/ext/spl/tests/observer_006.phpt b/ext/spl/tests/observer_006.phpt
index 3cd84a742..3cd84a742 100755..100644
--- a/ext/spl/tests/observer_006.phpt
+++ b/ext/spl/tests/observer_006.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_001.phpt b/ext/spl/tests/recursive_tree_iterator_001.phpt
index f70186cdd..f70186cdd 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_001.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_001.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_002.phpt b/ext/spl/tests/recursive_tree_iterator_002.phpt
index 1aae288e6..1aae288e6 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_002.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_002.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_003.phpt b/ext/spl/tests/recursive_tree_iterator_003.phpt
index 83c855394..83c855394 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_003.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_003.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_004.phpt b/ext/spl/tests/recursive_tree_iterator_004.phpt
index ad3ba6cd0..ad3ba6cd0 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_004.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_004.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_005.phpt b/ext/spl/tests/recursive_tree_iterator_005.phpt
index b14811fbe..b14811fbe 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_005.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_005.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_006.phpt b/ext/spl/tests/recursive_tree_iterator_006.phpt
index 17f51b6d0..17f51b6d0 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_006.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_006.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_007.phpt b/ext/spl/tests/recursive_tree_iterator_007.phpt
index 6a8ff8425..6a8ff8425 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_007.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_007.phpt
diff --git a/ext/spl/tests/recursive_tree_iterator_008.phpt b/ext/spl/tests/recursive_tree_iterator_008.phpt
index a0349800f..a0349800f 100755..100644
--- a/ext/spl/tests/recursive_tree_iterator_008.phpt
+++ b/ext/spl/tests/recursive_tree_iterator_008.phpt
diff --git a/ext/spl/tests/spl_001.phpt b/ext/spl/tests/spl_001.phpt
index e101272a8..e101272a8 100755..100644
--- a/ext/spl/tests/spl_001.phpt
+++ b/ext/spl/tests/spl_001.phpt
diff --git a/ext/spl/tests/spl_002.phpt b/ext/spl/tests/spl_002.phpt
index d8b71b20c..d8b71b20c 100755..100644
--- a/ext/spl/tests/spl_002.phpt
+++ b/ext/spl/tests/spl_002.phpt
diff --git a/ext/spl/tests/spl_003.phpt b/ext/spl/tests/spl_003.phpt
index e92a41ae4..e92a41ae4 100755..100644
--- a/ext/spl/tests/spl_003.phpt
+++ b/ext/spl/tests/spl_003.phpt
diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt
index 97896f815..97896f815 100755..100644
--- a/ext/spl/tests/spl_004.phpt
+++ b/ext/spl/tests/spl_004.phpt
diff --git a/ext/spl/tests/spl_005.phpt b/ext/spl/tests/spl_005.phpt
index 219c791bb..219c791bb 100755..100644
--- a/ext/spl/tests/spl_005.phpt
+++ b/ext/spl/tests/spl_005.phpt
diff --git a/ext/spl/tests/spl_006.phpt b/ext/spl/tests/spl_006.phpt
index 1f5f85fb6..1f5f85fb6 100755..100644
--- a/ext/spl/tests/spl_006.phpt
+++ b/ext/spl/tests/spl_006.phpt
diff --git a/ext/spl/tests/spl_007.phpt b/ext/spl/tests/spl_007.phpt
index 6d4059d0b..6d4059d0b 100755..100644
--- a/ext/spl/tests/spl_007.phpt
+++ b/ext/spl/tests/spl_007.phpt
diff --git a/ext/spl/tests/spl_autoload_001.phpt b/ext/spl/tests/spl_autoload_001.phpt
index ff9d1e97d..ff9d1e97d 100755..100644
--- a/ext/spl/tests/spl_autoload_001.phpt
+++ b/ext/spl/tests/spl_autoload_001.phpt
diff --git a/ext/spl/tests/spl_autoload_002.phpt b/ext/spl/tests/spl_autoload_002.phpt
index 2373d6dbb..2373d6dbb 100755..100644
--- a/ext/spl/tests/spl_autoload_002.phpt
+++ b/ext/spl/tests/spl_autoload_002.phpt
diff --git a/ext/spl/tests/spl_autoload_003.phpt b/ext/spl/tests/spl_autoload_003.phpt
index 7c0bd1a02..7c0bd1a02 100755..100644
--- a/ext/spl/tests/spl_autoload_003.phpt
+++ b/ext/spl/tests/spl_autoload_003.phpt
diff --git a/ext/spl/tests/spl_autoload_004.phpt b/ext/spl/tests/spl_autoload_004.phpt
index 1f26521b9..1f26521b9 100755..100644
--- a/ext/spl/tests/spl_autoload_004.phpt
+++ b/ext/spl/tests/spl_autoload_004.phpt
diff --git a/ext/spl/tests/spl_autoload_005.phpt b/ext/spl/tests/spl_autoload_005.phpt
index f4db521d5..f4db521d5 100755..100644
--- a/ext/spl/tests/spl_autoload_005.phpt
+++ b/ext/spl/tests/spl_autoload_005.phpt
diff --git a/ext/spl/tests/spl_autoload_006.phpt b/ext/spl/tests/spl_autoload_006.phpt
index 21a6084eb..21a6084eb 100755..100644
--- a/ext/spl/tests/spl_autoload_006.phpt
+++ b/ext/spl/tests/spl_autoload_006.phpt
diff --git a/ext/spl/tests/spl_autoload_007.phpt b/ext/spl/tests/spl_autoload_007.phpt
index 1a81f191c..1a81f191c 100755..100644
--- a/ext/spl/tests/spl_autoload_007.phpt
+++ b/ext/spl/tests/spl_autoload_007.phpt
diff --git a/ext/spl/tests/spl_autoload_008.phpt b/ext/spl/tests/spl_autoload_008.phpt
index 4b1035186..4b1035186 100755..100644
--- a/ext/spl/tests/spl_autoload_008.phpt
+++ b/ext/spl/tests/spl_autoload_008.phpt
diff --git a/ext/spl/tests/spl_autoload_009.phpt b/ext/spl/tests/spl_autoload_009.phpt
index d5e54137e..d5e54137e 100755..100644
--- a/ext/spl/tests/spl_autoload_009.phpt
+++ b/ext/spl/tests/spl_autoload_009.phpt
diff --git a/ext/spl/tests/spl_autoload_012.phpt b/ext/spl/tests/spl_autoload_012.phpt
index e07f0e4fe..e07f0e4fe 100755..100644
--- a/ext/spl/tests/spl_autoload_012.phpt
+++ b/ext/spl/tests/spl_autoload_012.phpt
diff --git a/ext/spl/tests/spl_fileinfo_getlinktarget_basic.phpt b/ext/spl/tests/spl_fileinfo_getlinktarget_basic.phpt
index cee557e33..cee557e33 100755..100644
--- a/ext/spl/tests/spl_fileinfo_getlinktarget_basic.phpt
+++ b/ext/spl/tests/spl_fileinfo_getlinktarget_basic.phpt
diff --git a/ext/spl/tests/spl_iterator_apply_error.phpt b/ext/spl/tests/spl_iterator_apply_error.phpt
index 8e7cba483..8e7cba483 100755..100644
--- a/ext/spl/tests/spl_iterator_apply_error.phpt
+++ b/ext/spl/tests/spl_iterator_apply_error.phpt
diff --git a/ext/spl/tests/spl_iterator_apply_error_001.phpt b/ext/spl/tests/spl_iterator_apply_error_001.phpt
index 54663c0da..54663c0da 100755..100644
--- a/ext/spl/tests/spl_iterator_apply_error_001.phpt
+++ b/ext/spl/tests/spl_iterator_apply_error_001.phpt
diff --git a/ext/spl/tests/spl_iterator_to_array_error.phpt b/ext/spl/tests/spl_iterator_to_array_error.phpt
index 755ef7b99..755ef7b99 100755..100644
--- a/ext/spl/tests/spl_iterator_to_array_error.phpt
+++ b/ext/spl/tests/spl_iterator_to_array_error.phpt
diff --git a/ext/spl/tests/testclass.class.inc b/ext/spl/tests/testclass.class.inc
index f5fe7411f..f5fe7411f 100755..100644
--- a/ext/spl/tests/testclass.class.inc
+++ b/ext/spl/tests/testclass.class.inc
diff --git a/ext/spl/tests/testclass.inc b/ext/spl/tests/testclass.inc
index ceb24c877..ceb24c877 100755..100644
--- a/ext/spl/tests/testclass.inc
+++ b/ext/spl/tests/testclass.inc
diff --git a/ext/spl/tests/testclass.php.inc b/ext/spl/tests/testclass.php.inc
index ceb24c877..ceb24c877 100755..100644
--- a/ext/spl/tests/testclass.php.inc
+++ b/ext/spl/tests/testclass.php.inc
diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c
index d96367e21..f3c06d49b 100644
--- a/ext/sqlite3/libsqlite/sqlite3.c
+++ b/ext/sqlite3/libsqlite/sqlite3.c
@@ -18139,7 +18139,7 @@ SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
sqlite3_int64 priorLimit;
sqlite3_int64 excess;
#ifndef SQLITE_OMIT_AUTOINIT
- sqlite3_initialize();
+ if( sqlite3_initialize() ) return 0;
#endif
sqlite3_mutex_enter(mem0.mutex);
priorLimit = mem0.alarmThreshold;
diff --git a/ext/sqlite3/php_sqlite3.h b/ext/sqlite3/php_sqlite3.h
index b079d4741..87a933538 100644
--- a/ext/sqlite3/php_sqlite3.h
+++ b/ext/sqlite3/php_sqlite3.h
@@ -21,7 +21,7 @@
#ifndef PHP_SQLITE3_H
#define PHP_SQLITE3_H
-#define PHP_SQLITE3_VERSION "0.7"
+#define PHP_SQLITE3_VERSION "0.7-dev"
extern zend_module_entry sqlite3_module_entry;
#define phpext_sqlite3_ptr &sqlite3_module_entry
diff --git a/ext/sqlite3/tests/bug53463.phpt b/ext/sqlite3/tests/bug53463.phpt
index 744a21461..dcfc13d5b 100644
--- a/ext/sqlite3/tests/bug53463.phpt
+++ b/ext/sqlite3/tests/bug53463.phpt
@@ -27,4 +27,4 @@ echo "Done\n";
--EXPECT--
string(8) "whatever"
bool(false)
-Done
+Done \ No newline at end of file
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 72f1dc3c7..d6377df84 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -128,6 +128,8 @@ typedef struct _user_tick_function_entry {
static void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry);
+static HashTable basic_submodules;
+
#undef sprintf
/* {{{ arginfo */
@@ -1548,18 +1550,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phpcredits, 0, 0, 0)
ZEND_ARG_INFO(0, flag)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_php_logo_guid, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_php_real_logo_guid, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_php_egg_logo_guid, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_zend_logo_guid, 0)
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO(arginfo_php_sapi_name, 0)
ZEND_END_ARG_INFO()
@@ -1864,6 +1854,25 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0)
ZEND_END_ARG_INFO()
/* }}} */
+/* {{{ password.c */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_password_hash, 0, 0, 2)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, algo)
+ ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_password_get_info, 0, 0, 1)
+ ZEND_ARG_INFO(0, hash)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_password_needs_rehash, 0, 0, 2)
+ ZEND_ARG_INFO(0, hash)
+ ZEND_ARG_INFO(0, algo)
+ ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_password_verify, 0, 0, 2)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, hash)
+ZEND_END_ARG_INFO()
+/* }}} */
/* {{{ proc_open.c */
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
ZEND_BEGIN_ARG_INFO_EX(arginfo_proc_terminate, 0, 0, 1)
@@ -2520,6 +2529,10 @@ ZEND_BEGIN_ARG_INFO(arginfo_strval, 0)
ZEND_ARG_INFO(0, var)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_boolval, 0)
+ ZEND_ARG_INFO(0, var)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO(arginfo_is_null, 0)
ZEND_ARG_INFO(0, var)
ZEND_END_ARG_INFO()
@@ -2717,10 +2730,6 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(phpinfo, arginfo_phpinfo)
PHP_FE(phpversion, arginfo_phpversion)
PHP_FE(phpcredits, arginfo_phpcredits)
- PHP_FE(php_logo_guid, arginfo_php_logo_guid)
- PHP_FE(php_real_logo_guid, arginfo_php_real_logo_guid)
- PHP_FE(php_egg_logo_guid, arginfo_php_egg_logo_guid)
- PHP_FE(zend_logo_guid, arginfo_zend_logo_guid)
PHP_FE(php_sapi_name, arginfo_php_sapi_name)
PHP_FE(php_uname, arginfo_php_uname)
PHP_FE(php_ini_scanned_files, arginfo_php_ini_scanned_files)
@@ -2874,6 +2883,10 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(base64_decode, arginfo_base64_decode)
PHP_FE(base64_encode, arginfo_base64_encode)
+ PHP_FE(password_hash, arginfo_password_hash)
+ PHP_FE(password_get_info, arginfo_password_get_info)
+ PHP_FE(password_needs_rehash, arginfo_password_needs_rehash)
+ PHP_FE(password_verify, arginfo_password_verify)
PHP_FE(convert_uuencode, arginfo_convert_uuencode)
PHP_FE(convert_uudecode, arginfo_convert_uudecode)
@@ -3043,6 +3056,7 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(floatval, arginfo_floatval)
PHP_FALIAS(doubleval, floatval, arginfo_floatval)
PHP_FE(strval, arginfo_strval)
+ PHP_FE(boolval, arginfo_boolval)
PHP_FE(gettype, arginfo_gettype)
PHP_FE(settype, arginfo_settype)
PHP_FE(is_null, arginfo_is_null)
@@ -3513,6 +3527,34 @@ PHPAPI double php_get_inf(void) /* {{{ */
}
/* }}} */
+#define BASIC_MINIT_SUBMODULE(module) \
+ if (PHP_MINIT(module)(INIT_FUNC_ARGS_PASSTHRU) == SUCCESS) {\
+ BASIC_ADD_SUBMODULE(module); \
+ }
+
+#define BASIC_ADD_SUBMODULE(module) \
+ zend_hash_add_empty_element(&basic_submodules, #module, strlen(#module));
+
+#define BASIC_RINIT_SUBMODULE(module) \
+ if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
+ PHP_RINIT(module)(INIT_FUNC_ARGS_PASSTHRU); \
+ }
+
+#define BASIC_MINFO_SUBMODULE(module) \
+ if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
+ PHP_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU); \
+ }
+
+#define BASIC_RSHUTDOWN_SUBMODULE(module) \
+ if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
+ PHP_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS_PASSTHRU); \
+ }
+
+#define BASIC_MSHUTDOWN_SUBMODULE(module) \
+ if (zend_hash_exists(&basic_submodules, #module, strlen(#module))) { \
+ PHP_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS_PASSTHRU); \
+ }
+
PHP_MINIT_FUNCTION(basic) /* {{{ */
{
#ifdef ZTS
@@ -3527,6 +3569,8 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
#endif
#endif
+ zend_hash_init(&basic_submodules, 0, NULL, NULL, 1);
+
BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(TSRMLS_C);
REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT);
@@ -3586,39 +3630,42 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
register_html_constants(INIT_FUNC_ARGS_PASSTHRU);
register_string_constants(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(file)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(pack)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(browscap)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(standard_filters)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(user_filters)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_ADD_SUBMODULE(dl)
+ BASIC_ADD_SUBMODULE(mail)
+ BASIC_MINIT_SUBMODULE(file)
+ BASIC_MINIT_SUBMODULE(pack)
+ BASIC_MINIT_SUBMODULE(browscap)
+ BASIC_MINIT_SUBMODULE(standard_filters)
+ BASIC_MINIT_SUBMODULE(user_filters)
+ BASIC_MINIT_SUBMODULE(password)
#if defined(HAVE_LOCALECONV) && defined(ZTS)
- PHP_MINIT(localeconv)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(localeconv)
#endif
#if defined(HAVE_NL_LANGINFO)
- PHP_MINIT(nl_langinfo)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(nl_langinfo)
#endif
#if HAVE_CRYPT
- PHP_MINIT(crypt)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(crypt)
#endif
- PHP_MINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(lcg)
- PHP_MINIT(dir)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(dir)
#ifdef HAVE_SYSLOG_H
- PHP_MINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(syslog)
#endif
- PHP_MINIT(array)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(assert)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(array)
+ BASIC_MINIT_SUBMODULE(assert)
+ BASIC_MINIT_SUBMODULE(url_scanner_ex)
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
- PHP_MINIT(proc_open)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(proc_open)
#endif
- PHP_MINIT(user_streams)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_MINIT(imagetypes)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(user_streams)
+ BASIC_MINIT_SUBMODULE(imagetypes)
php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC);
php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC);
@@ -3633,7 +3680,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
#if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
- PHP_MINIT(dns)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_MINIT_SUBMODULE(dns)
# endif
#endif
@@ -3664,19 +3711,20 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
#endif
- PHP_MSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_MSHUTDOWN(array)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_MSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_MSHUTDOWN(file)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_MSHUTDOWN(standard_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_MSHUTDOWN_SUBMODULE(browscap)
+ BASIC_MSHUTDOWN_SUBMODULE(array)
+ BASIC_MSHUTDOWN_SUBMODULE(assert)
+ BASIC_MSHUTDOWN_SUBMODULE(url_scanner_ex)
+ BASIC_MSHUTDOWN_SUBMODULE(file)
+ BASIC_MSHUTDOWN_SUBMODULE(standard_filters)
#if defined(HAVE_LOCALECONV) && defined(ZTS)
- PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_MSHUTDOWN_SUBMODULE(localeconv)
#endif
#if HAVE_CRYPT
- PHP_MSHUTDOWN(crypt)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_MSHUTDOWN_SUBMODULE(crypt)
#endif
+ zend_hash_destroy(&basic_submodules);
return SUCCESS;
}
/* }}} */
@@ -3684,6 +3732,11 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
PHP_RINIT_FUNCTION(basic) /* {{{ */
{
memset(BG(strtok_table), 0, 256);
+
+ BG(serialize_lock) = 0;
+ memset(&BG(serialize), 0, sizeof(BG(serialize)));
+ memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
+
BG(strtok_string) = NULL;
BG(strtok_zval) = NULL;
BG(strtok_last) = NULL;
@@ -3705,10 +3758,10 @@ PHP_RINIT_FUNCTION(basic) /* {{{ */
PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
#ifdef HAVE_SYSLOG_H
- PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_RINIT_SUBMODULE(syslog)
#endif
- PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU);
- PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU);
+ BASIC_RINIT_SUBMODULE(dir)
+ BASIC_RINIT_SUBMODULE(url_scanner_ex)
/* Setup default context */
FG(default_context) = NULL;
@@ -3754,14 +3807,14 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
#ifdef HAVE_SYSLOG_H
#ifdef PHP_WIN32
- PHP_RSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_RSHUTDOWN_SUBMODULE(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
#endif
#endif
- PHP_RSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_RSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_RSHUTDOWN(streams)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_RSHUTDOWN_SUBMODULE(assert)
+ BASIC_RSHUTDOWN_SUBMODULE(url_scanner_ex)
+ BASIC_RSHUTDOWN_SUBMODULE(streams)
#ifdef PHP_WIN32
- PHP_RSHUTDOWN(win32_core_globals)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_RSHUTDOWN_SUBMODULE(win32_core_globals)
#endif
if (BG(user_tick_functions)) {
@@ -3770,8 +3823,8 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
BG(user_tick_functions) = NULL;
}
- PHP_RSHUTDOWN(user_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
- PHP_RSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
+ BASIC_RSHUTDOWN_SUBMODULE(user_filters)
+ BASIC_RSHUTDOWN_SUBMODULE(browscap)
BG(page_uid) = -1;
BG(page_gid) = -1;
@@ -3782,10 +3835,10 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
PHP_MINFO_FUNCTION(basic) /* {{{ */
{
php_info_print_table_start();
- PHP_MINFO(dl)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
- PHP_MINFO(mail)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
+ BASIC_MINFO_SUBMODULE(dl)
+ BASIC_MINFO_SUBMODULE(mail)
php_info_print_table_end();
- PHP_MINFO(assert)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
+ BASIC_MINFO_SUBMODULE(assert)
}
/* }}} */
@@ -5051,12 +5104,12 @@ void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
}
/* }}} */
-/* {{{ proto void register_shutdown_function(string function_name) U
+/* {{{ proto void register_shutdown_function(callback function) U
Register a user-level function to be called on request termination */
PHP_FUNCTION(register_shutdown_function)
{
php_shutdown_function_entry shutdown_function_entry;
- char *function_name = NULL;
+ char *callback_name = NULL;
int i;
shutdown_function_entry.arg_count = ZEND_NUM_ARGS();
@@ -5073,8 +5126,8 @@ PHP_FUNCTION(register_shutdown_function)
}
/* Prevent entering of anything but valid callback (syntax check only!) */
- if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name);
+ if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &callback_name TSRMLS_CC)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", callback_name);
efree(shutdown_function_entry.arguments);
RETVAL_FALSE;
} else {
@@ -5088,8 +5141,8 @@ PHP_FUNCTION(register_shutdown_function)
}
zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
}
- if (function_name) {
- efree(function_name);
+ if (callback_name) {
+ efree(callback_name);
}
}
/* }}} */
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
index c33ae1e05..fba423b19 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -580,7 +580,7 @@ PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.
incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
- filters.c proc_open.c streamsfuncs.c http.c)
+ filters.c proc_open.c streamsfuncs.c http.c password.c)
PHP_ADD_MAKEFILE_FRAGMENT
PHP_INSTALL_HEADERS([ext/standard/])
diff --git a/ext/standard/config.w32 b/ext/standard/config.w32
index d14b859e9..5f24641b4 100644
--- a/ext/standard/config.w32
+++ b/ext/standard/config.w32
@@ -19,7 +19,7 @@ EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \
versioning.c assert.c strnatcmp.c levenshtein.c incomplete_class.c \
url_scanner_ex.c ftp_fopen_wrapper.c http_fopen_wrapper.c \
php_fopen_wrapper.c credits.c css.c var_unserializer.c ftok.c sha1.c \
- user_filters.c uuencode.c filters.c proc_open.c \
+ user_filters.c uuencode.c filters.c proc_open.c password.c \
streamsfuncs.c http.c flock_compat.c", false /* never shared */);
PHP_INSTALL_HEADERS("", "ext/standard");
if (PHP_MBREGEX != "no") {
diff --git a/ext/standard/credits_ext.h b/ext/standard/credits_ext.h
index 7bdb41e60..22ac82252 100644
--- a/ext/standard/credits_ext.h
+++ b/ext/standard/credits_ext.h
@@ -17,8 +17,8 @@ CREDIT_LINE("COM and .Net", "Wez Furlong");
CREDIT_LINE("ctype", "Hartmut Holzgraefe");
CREDIT_LINE("cURL", "Sterling Hughes");
CREDIT_LINE("Date/Time Support", "Derick Rethans");
-CREDIT_LINE("DB-LIB (MS SQL, Sybase)", "Wez Furlong, Frank M. Kromann");
CREDIT_LINE("DBA", "Sascha Schumann, Marcus Boerger");
+CREDIT_LINE("DB-LIB (MS SQL, Sybase)", "Wez Furlong, Frank M. Kromann");
CREDIT_LINE("DOM", "Christian Stocker, Rob Richards, Marcus Boerger");
CREDIT_LINE("enchant", "Pierre-Alain Joye, Ilia Alshanetsky");
CREDIT_LINE("ereg", "Rasmus Lerdorf, Jim Winstead, Jaakko Hyvätti");
@@ -41,9 +41,9 @@ CREDIT_LINE("mcrypt", "Sascha Schumann, Derick Rethans");
CREDIT_LINE("MS SQL", "Frank M. Kromann");
CREDIT_LINE("Multibyte String Functions", "Tsukada Takuya, Rui Hirokawa");
CREDIT_LINE("MySQL driver for PDO", "George Schlossnagle, Wez Furlong, Ilia Alshanetsky, Johannes Schlueter");
-CREDIT_LINE("MySQL", "Zeev Suraski, Zak Greant, Georg Richter");
CREDIT_LINE("MySQLi", "Zak Greant, Georg Richter, Andrey Hristov, Ulf Wendel");
-CREDIT_LINE("MySQLnd", "Andrey Hristov, Ulf Wendel, Georg Richter");
+CREDIT_LINE("MySQLnd", "Georg Richter, Andrey Hristov, Ulf Wendel");
+CREDIT_LINE("MySQL", "Zeev Suraski, Zak Greant, Georg Richter");
CREDIT_LINE("OCI8", "Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal, Andi Gutmans, Wez Furlong, Christopher Jones, Oracle Corporation");
CREDIT_LINE("ODBC driver for PDO", "Wez Furlong");
CREDIT_LINE("ODBC", "Stig Bakken, Andreas Karajannis, Frank M. Kromann, Daniel R. Kalowsky");
@@ -64,12 +64,12 @@ CREDIT_LINE("Reflection", "Marcus Boerger, Timm Friebe, George Schlossnagle, And
CREDIT_LINE("Sessions", "Sascha Schumann, Andrei Zmievski");
CREDIT_LINE("Shared Memory Operations", "Slava Poliakov, Ilia Alshanetsky");
CREDIT_LINE("SimpleXML", "Sterling Hughes, Marcus Boerger, Rob Richards");
-CREDIT_LINE("SNMP", "Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Lawrance, Johann Hanne, Boris Lytochkin");
+CREDIT_LINE("SNMP", "Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Lawrance, Johann Hanne");
CREDIT_LINE("SOAP", "Brad Lafountain, Shane Caraveo, Dmitry Stogov");
CREDIT_LINE("Sockets", "Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason Greene");
CREDIT_LINE("SPL", "Marcus Boerger, Etienne Kneuss");
+CREDIT_LINE("SQLite3", "Scott MacVicar, Ilia Alshanetsky");
CREDIT_LINE("SQLite 3.x driver for PDO", "Wez Furlong");
-CREDIT_LINE("SQLite3", "Scott MacVicar, Ilia Alshanetsky, Brad Dewar");
CREDIT_LINE("Sybase-CT", "Zeev Suraski, Tom May, Timm Friebe");
CREDIT_LINE("System V Message based IPC", "Wez Furlong");
CREDIT_LINE("System V Semaphores", "Tom May");
@@ -77,9 +77,9 @@ CREDIT_LINE("System V Shared Memory", "Christian Cartus");
CREDIT_LINE("tidy", "John Coggeshall, Ilia Alshanetsky");
CREDIT_LINE("tokenizer", "Andrei Zmievski, Johannes Schlueter");
CREDIT_LINE("WDDX", "Andrei Zmievski");
-CREDIT_LINE("XML", "Stig Bakken, Thies C. Arntzen, Sterling Hughes");
CREDIT_LINE("XMLReader", "Rob Richards");
CREDIT_LINE("xmlrpc", "Dan Libby");
+CREDIT_LINE("XML", "Stig Bakken, Thies C. Arntzen, Sterling Hughes");
CREDIT_LINE("XMLWriter", "Rob Richards, Pierre-Alain Joye");
CREDIT_LINE("XSL", "Christian Stocker, Rob Richards");
CREDIT_LINE("Zip", "Pierre-Alain Joye");
diff --git a/ext/standard/credits_sapi.h b/ext/standard/credits_sapi.h
index d147d8dea..9cc7e6e22 100644
--- a/ext/standard/credits_sapi.h
+++ b/ext/standard/credits_sapi.h
@@ -17,7 +17,7 @@ CREDIT_LINE("Apache 2.0 Filter", "Sascha Schumann, Aaron Bannert");
CREDIT_LINE("Apache 2.0 Handler", "Ian Holsman, Justin Erenkrantz (based on Apache 2.0 Filter code)");
CREDIT_LINE("Caudium / Roxen", "David Hedbor");
CREDIT_LINE("CGI / FastCGI", "Rasmus Lerdorf, Stig Bakken, Shane Caraveo, Dmitry Stogov");
-CREDIT_LINE("CLI", "Edin Kadribasic, Marcus Boerger, Johannes Schlueter, Moriyoshi Koizumi, Xinchen Hui");
+CREDIT_LINE("CLI", "Edin Kadribasic, Marcus Boerger, Johannes Schlueter");
CREDIT_LINE("Continuity", "Alex Leigh (based on nsapi code)");
CREDIT_LINE("Embed", "Edin Kadribasic");
CREDIT_LINE("FastCGI Process Manager", "Andrei Nigmatulin, dreamcat4, Antony Dovgal, Jerome Loyet");
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 27a8d82d0..3b443fc4d 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -145,44 +145,9 @@ static void php_to64(char *s, long v, int n) /* {{{ */
}
/* }}} */
-/* {{{ proto string crypt(string str [, string salt])
- Hash a string */
-PHP_FUNCTION(crypt)
+PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, char **result)
{
- char salt[PHP_MAX_SALT_LEN + 1];
- char *str, *salt_in = NULL;
- int str_len, salt_in_len = 0;
char *crypt_res;
- salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
-
- /* This will produce suitable results if people depend on DES-encryption
- * available (passing always 2-character salt). At least for glibc6.1 */
- memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &str, &str_len, &salt_in, &salt_in_len) == FAILURE) {
- return;
- }
-
- if (salt_in) {
- memcpy(salt, salt_in, MIN(PHP_MAX_SALT_LEN, salt_in_len));
- }
-
- /* The automatic salt generation covers standard DES, md5-crypt and Blowfish (simple) */
- if (!*salt) {
-#if PHP_MD5_CRYPT
- strncpy(salt, "$1$", PHP_MAX_SALT_LEN);
- php_to64(&salt[3], PHP_CRYPT_RAND, 4);
- php_to64(&salt[7], PHP_CRYPT_RAND, 4);
- strncpy(&salt[11], "$", PHP_MAX_SALT_LEN - 11);
-#elif PHP_STD_DES_CRYPT
- php_to64(&salt[0], PHP_CRYPT_RAND, 2);
- salt[2] = '\0';
-#endif
- salt_in_len = strlen(salt);
- } else {
- salt_in_len = MIN(PHP_MAX_SALT_LEN, salt_in_len);
- }
-
/* Windows (win32/crypt) has a stripped down version of libxcrypt and
a CryptoApi md5_crypt implementation */
#if PHP_USE_PHP_CRYPT_R
@@ -190,55 +155,44 @@ PHP_FUNCTION(crypt)
struct php_crypt_extended_data buffer;
if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') {
- char output[MD5_HASH_MAX_LEN];
+ char output[MD5_HASH_MAX_LEN], *out;
- RETURN_STRING(php_md5_crypt_r(str, salt, output), 1);
+ out = php_md5_crypt_r(password, salt, output);
+ if (out) {
+ *result = estrdup(out);
+ return SUCCESS;
+ }
+ return FAILURE;
} else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') {
- const char sha512_salt_prefix[] = "$6$";
- const char sha512_rounds_prefix[] = "rounds=";
char *output;
- int needed = (sizeof(sha512_salt_prefix) - 1
- + sizeof(sha512_rounds_prefix) + 9 + 1
- + salt_in_len + 1 + 86 + 1);
- output = emalloc(needed);
- salt[salt_in_len] = '\0';
+ output = emalloc(PHP_MAX_SALT_LEN);
- crypt_res = php_sha512_crypt_r(str, salt, output, needed);
+ crypt_res = php_sha512_crypt_r(password, salt, output, PHP_MAX_SALT_LEN);
if (!crypt_res) {
- if (salt[0]=='*' && salt[1]=='0') {
- RETVAL_STRING("*1", 1);
- } else {
- RETVAL_STRING("*0", 1);
- }
+ memset(output, 0, PHP_MAX_SALT_LEN);
+ efree(output);
+ return FAILURE;
} else {
- RETVAL_STRING(output, 1);
+ *result = estrdup(output);
+ memset(output, 0, PHP_MAX_SALT_LEN);
+ efree(output);
+ return SUCCESS;
}
-
- memset(output, 0, needed);
- efree(output);
} else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') {
- const char sha256_salt_prefix[] = "$5$";
- const char sha256_rounds_prefix[] = "rounds=";
char *output;
- int needed = (sizeof(sha256_salt_prefix) - 1
- + sizeof(sha256_rounds_prefix) + 9 + 1
- + salt_in_len + 1 + 43 + 1);
- output = emalloc(needed);
- salt[salt_in_len] = '\0';
+ output = emalloc(PHP_MAX_SALT_LEN);
- crypt_res = php_sha256_crypt_r(str, salt, output, needed);
+ crypt_res = php_sha256_crypt_r(password, salt, output, PHP_MAX_SALT_LEN);
if (!crypt_res) {
- if (salt[0]=='*' && salt[1]=='0') {
- RETVAL_STRING("*1", 1);
- } else {
- RETVAL_STRING("*0", 1);
- }
+ memset(output, 0, PHP_MAX_SALT_LEN);
+ efree(output);
+ return FAILURE;
} else {
- RETVAL_STRING(output, 1);
+ *result = estrdup(output);
+ memset(output, 0, PHP_MAX_SALT_LEN);
+ efree(output);
+ return SUCCESS;
}
-
- memset(output, 0, needed);
- efree(output);
} else if (
salt[0] == '$' &&
salt[1] == '2' &&
@@ -251,31 +205,25 @@ PHP_FUNCTION(crypt)
memset(output, 0, PHP_MAX_SALT_LEN + 1);
- crypt_res = php_crypt_blowfish_rn(str, salt, output, sizeof(output));
+ crypt_res = php_crypt_blowfish_rn(password, salt, output, sizeof(output));
if (!crypt_res) {
- if (salt[0]=='*' && salt[1]=='0') {
- RETVAL_STRING("*1", 1);
- } else {
- RETVAL_STRING("*0", 1);
- }
+ memset(output, 0, PHP_MAX_SALT_LEN + 1);
+ return FAILURE;
} else {
- RETVAL_STRING(output, 1);
+ *result = estrdup(output);
+ memset(output, 0, PHP_MAX_SALT_LEN + 1);
+ return SUCCESS;
}
-
- memset(output, 0, PHP_MAX_SALT_LEN + 1);
} else {
memset(&buffer, 0, sizeof(buffer));
_crypt_extended_init_r();
- crypt_res = _crypt_extended_r(str, salt, &buffer);
+ crypt_res = _crypt_extended_r(password, salt, &buffer);
if (!crypt_res) {
- if (salt[0]=='*' && salt[1]=='0') {
- RETURN_STRING("*1", 1);
- } else {
- RETURN_STRING("*0", 1);
- }
+ return FAILURE;
} else {
- RETURN_STRING(crypt_res, 1);
+ *result = estrdup(crypt_res);
+ return SUCCESS;
}
}
}
@@ -291,21 +239,68 @@ PHP_FUNCTION(crypt)
# else
# error Data struct used by crypt_r() is unknown. Please report.
# endif
- crypt_res = crypt_r(str, salt, &buffer);
+ crypt_res = crypt_r(password, salt, &buffer);
if (!crypt_res) {
- if (salt[0]=='*' && salt[1]=='0') {
- RETURN_STRING("*1", 1);
- } else {
- RETURN_STRING("*0", 1);
- }
+ return FAILURE;
} else {
- RETURN_STRING(crypt_res, 1);
+ *result = estrdup(crypt_res);
+ return SUCCESS;
}
}
# endif
#endif
}
/* }}} */
+
+
+/* {{{ proto string crypt(string str [, string salt])
+ Hash a string */
+PHP_FUNCTION(crypt)
+{
+ char salt[PHP_MAX_SALT_LEN + 1];
+ char *str, *salt_in = NULL, *result = NULL;
+ int str_len, salt_in_len = 0;
+ salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
+
+ /* This will produce suitable results if people depend on DES-encryption
+ * available (passing always 2-character salt). At least for glibc6.1 */
+ memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &str, &str_len, &salt_in, &salt_in_len) == FAILURE) {
+ return;
+ }
+
+ if (salt_in) {
+ memcpy(salt, salt_in, MIN(PHP_MAX_SALT_LEN, salt_in_len));
+ }
+
+ /* The automatic salt generation covers standard DES, md5-crypt and Blowfish (simple) */
+ if (!*salt) {
+#if PHP_MD5_CRYPT
+ strncpy(salt, "$1$", PHP_MAX_SALT_LEN);
+ php_to64(&salt[3], PHP_CRYPT_RAND, 4);
+ php_to64(&salt[7], PHP_CRYPT_RAND, 4);
+ strncpy(&salt[11], "$", PHP_MAX_SALT_LEN - 11);
+#elif PHP_STD_DES_CRYPT
+ php_to64(&salt[0], PHP_CRYPT_RAND, 2);
+ salt[2] = '\0';
+#endif
+ salt_in_len = strlen(salt);
+ } else {
+ salt_in_len = MIN(PHP_MAX_SALT_LEN, salt_in_len);
+ }
+ salt[salt_in_len] = '\0';
+
+ if (php_crypt(str, str_len, salt, salt_in_len, &result) == FAILURE) {
+ if (salt[0] == '*' && salt[1] == '0') {
+ RETURN_STRING("*1", 1);
+ } else {
+ RETURN_STRING("*0", 1);
+ }
+ }
+ RETURN_STRING(result, 0);
+}
+/* }}} */
#endif
/*
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index 2251ed0e0..6645ac6fc 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -97,9 +97,9 @@ PHPAPI PHP_FUNCTION(dl)
#define USING_ZTS 0
#endif
-/* {{{ php_dl
+/* {{{ php_load_extension
*/
-PHPAPI int php_load_extension(char *filename, int type, int start_now TSRMLS_DC) /* {{{ */
+PHPAPI int php_load_extension(char *filename, int type, int start_now TSRMLS_DC)
{
void *handle;
char *libpath;
diff --git a/ext/standard/file.c b/ext/standard/file.c
index cce0143ff..5dc91b44b 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -2054,11 +2054,11 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
char *tmp = bptr;
while ((*tmp != delimiter) && isspace((int)*(unsigned char *)tmp)) {
tmp++;
- }
+ }
if (*tmp == enclosure) {
bptr = tmp;
}
- }
+ }
if (first_field && bptr == line_end) {
add_next_index_null(return_value);
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 142ca9bdc..4e5f76838 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -803,7 +803,7 @@ PHP_FUNCTION(touch)
PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, int filename_len TSRMLS_DC)
{
/* always clear CurrentStatFile and CurrentLStatFile even if filename is not NULL
- * as it may contains outdated data (e.g. "nlink" for a directory when deleting a file
+ * as it may contain outdated data (e.g. "nlink" for a directory when deleting a file
* in this directory, as shown by lstat_stat_variation9.phpt) */
if (BG(CurrentStatFile)) {
efree(BG(CurrentStatFile));
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 07e152874..beb147797 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -92,14 +92,6 @@ static int php_info_printf(const char *fmt, ...) /* {{{ */
}
/* }}} */
-static void php_info_print_request_uri(TSRMLS_D) /* {{{ */
-{
- if (SG(request_info).request_uri) {
- php_info_print_html_esc(SG(request_info).request_uri, strlen(SG(request_info).request_uri));
- }
-}
-/* }}} */
-
static int php_info_print(const char *str) /* {{{ */
{
TSRMLS_FETCH();
@@ -660,7 +652,6 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
{
char **env, *tmp1, *tmp2;
char *php_uname;
- int expose_php = INI_INT("expose_php");
if (!sapi_module.phpinfo_as_text) {
php_print_info_htmlhead(TSRMLS_C);
@@ -671,7 +662,6 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
if (flag & PHP_INFO_GENERAL) {
char *zend_version = get_zend_version();
char temp_api[10];
- char *logo_guid;
php_uname = php_get_uname('a');
@@ -679,14 +669,19 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
php_info_print_box_start(1);
}
- if (expose_php && !sapi_module.phpinfo_as_text) {
- php_info_print("<a href=\"http://www.php.net/\"><img border=\"0\" src=\"");
- php_info_print_request_uri(TSRMLS_C);
- php_info_print("?=");
- logo_guid = php_logo_guid();
- php_info_print(logo_guid);
- efree(logo_guid);
- php_info_print("\" alt=\"PHP Logo\" /></a>");
+ if (!sapi_module.phpinfo_as_text) {
+ time_t the_time;
+ struct tm *ta, tmbuf;
+
+ the_time = time(NULL);
+ ta = php_localtime_r(&the_time, &tmbuf);
+
+ php_info_print("<a href=\"http://www.php.net/\"><img border=\"0\" src=\"");
+ if (ta && (ta->tm_mon==3) && (ta->tm_mday==1)) {
+ php_info_print(PHP_EGG_LOGO_DATA_URI "\" alt=\"PHP logo\" /></a>");
+ } else {
+ php_info_print(PHP_LOGO_DATA_URI "\" alt=\"PHP logo\" /></a>");
+ }
}
if (!sapi_module.phpinfo_as_text) {
@@ -787,10 +782,9 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
/* Zend Engine */
php_info_print_box_start(0);
- if (expose_php && !sapi_module.phpinfo_as_text) {
+ if (!sapi_module.phpinfo_as_text) {
php_info_print("<a href=\"http://www.zend.com/\"><img border=\"0\" src=\"");
- php_info_print_request_uri(TSRMLS_C);
- php_info_print("?="ZEND_LOGO_GUID"\" alt=\"Zend logo\" /></a>\n");
+ php_info_print(ZEND_LOGO_DATA_URI "\" alt=\"Zend logo\" /></a>\n");
}
php_info_print("This program makes use of the Zend Scripting Language Engine:");
php_info_print(!sapi_module.phpinfo_as_text?"<br />":"\n");
@@ -803,15 +797,6 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
efree(php_uname);
}
- if ((flag & PHP_INFO_CREDITS) && expose_php && !sapi_module.phpinfo_as_text) {
- php_info_print_hr();
- php_info_print("<h1><a href=\"");
- php_info_print_request_uri(TSRMLS_C);
- php_info_print("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">");
- php_info_print("PHP Credits");
- php_info_print("</a></h1>\n");
- }
-
zend_ini_sort_entries(TSRMLS_C);
if (flag & PHP_INFO_CONFIGURATION) {
@@ -893,6 +878,12 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
php_info_print_table_end();
}
+
+ if ((flag & PHP_INFO_CREDITS) && !sapi_module.phpinfo_as_text) {
+ php_info_print_hr();
+ php_print_credits(PHP_CREDITS_ALL & ~PHP_CREDITS_FULLPAGE TSRMLS_CC);
+ }
+
if (flag & PHP_INFO_LICENSE) {
if (!sapi_module.phpinfo_as_text) {
SECTION("PHP License");
@@ -926,6 +917,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
php_info_print("questions about PHP licensing, please contact license@php.net.\n");
}
}
+
if (!sapi_module.phpinfo_as_text) {
php_info_print("</div></body></html>");
}
@@ -1191,77 +1183,6 @@ PHP_FUNCTION(phpcredits)
}
/* }}} */
-/* {{{ php_logo_guid
- */
-PHPAPI char *php_logo_guid(void)
-{
- char *logo_guid;
-
- time_t the_time;
- struct tm *ta, tmbuf;
-
- the_time = time(NULL);
- ta = php_localtime_r(&the_time, &tmbuf);
-
- if (ta && (ta->tm_mon==3) && (ta->tm_mday==1)) {
- logo_guid = PHP_EGG_LOGO_GUID;
- } else {
- logo_guid = PHP_LOGO_GUID;
- }
-
- return estrdup(logo_guid);
-
-}
-/* }}} */
-
-/* {{{ proto string php_logo_guid(void)
- Return the special ID used to request the PHP logo in phpinfo screens*/
-PHP_FUNCTION(php_logo_guid)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- RETURN_STRING(php_logo_guid(), 0);
-}
-/* }}} */
-
-/* {{{ proto string php_real_logo_guid(void)
- Return the special ID used to request the PHP logo in phpinfo screens*/
-PHP_FUNCTION(php_real_logo_guid)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
-}
-/* }}} */
-
-/* {{{ proto string php_egg_logo_guid(void)
- Return the special ID used to request the PHP logo in phpinfo screens*/
-PHP_FUNCTION(php_egg_logo_guid)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- RETURN_STRINGL(PHP_EGG_LOGO_GUID, sizeof(PHP_EGG_LOGO_GUID)-1, 1);
-}
-/* }}} */
-
-/* {{{ proto string zend_logo_guid(void)
- Return the special ID used to request the Zend logo in phpinfo screens*/
-PHP_FUNCTION(zend_logo_guid)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
-}
-/* }}} */
-
/* {{{ proto string php_sapi_name(void)
Return the current SAPI module name */
PHP_FUNCTION(php_sapi_name)
diff --git a/ext/standard/info.h b/ext/standard/info.h
index fadde75eb..981859366 100644
--- a/ext/standard/info.h
+++ b/ext/standard/info.h
@@ -50,19 +50,14 @@
#endif /* HAVE_CREDITS_DEFS */
-#define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42"
-#define PHP_EGG_LOGO_GUID "PHPE9568F36-D428-11d2-A769-00AA001ACF42"
-#define ZEND_LOGO_GUID "PHPE9568F35-D428-11d2-A769-00AA001ACF42"
-#define PHP_CREDITS_GUID "PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000"
+#define PHP_LOGO_DATA_URI "data:image/gif;base64,R0lGODlheABDAOZqAH+CuDk3RyglKszN4qGky9PV57K01ENCWIOGuYKDs1JScpCSwsLE3qqs0ExLY1tcg93e7Ds4PG5xpWptnWFjjXV5sXt+teXm8JmcxoyNwbm62Wtrkk5Oa3F0qXp6o4iLvXJ0o3RzmI6QwVpbfuLj73t9raSl0G1wonJ2rJWWyLu92XR4roWIu5KVw9jZ6pKSxGRmkmtun6WozpSWxS4rL1NRaLO012xqjFxbdoqNv2ZolmhqmpyfyDEuOa6w05yczVVWeJ6hypaZxYGCr2dplz89ULy+2l5giZiZyIyOv4mKuldYfLa319XX6CIeIGxvns7Q5L/A3Hd7tHZ4p19efZmZzG5vmHN3riIeH////5COj1lWV8fGx+7u9dXU1fb2+oKAgayqq3Ryc/Hw8Z6cnePi40tISbm4uWdkZYmJtgD/AEdGX9/g7ZuczGlrnG9zp4yMuri52bi615qbzKeqz9vc65qcyWZkhGhniaeo0m5woIuLucbH4MfJ4WlsnJeYyyH5BAEAAGoALAAAAAB4AEMAAAf/gGqCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXlm0/bXOYnp+gP3l5Nj4acUwaGkwGPj4NMgRBPBhCLQtJIjkfGTkiLymgwqENGgx9TQVQUAN9fAxRUSpyrK90sbNCMy26HwgAFhYVVyglFgkZwcPrjCZxfC5sbBAQdS7JA9QysyIf/iwAEQgEQLDgN4LhpKxA8UbCCT87nkwZkoSdRTVBbAxgQ+KCRxIk8jUQskCKyZMoU6pceXJcBwkTduiAQeEIBStDRFzEFIQJFI4eL7gwQqcFy6NIk6K88iYGjCNHHoxYcsSDzp2Qfmh0AYEjBCMEWCgdSzbplRM6HiwBokDBiCkz/7AuMqGhQBMXdQoYSFK2r1+kHWAsUcCBgwM8CeQayhNlAJQCA3zk+LtyAYbLmDF8oJz0DQUFDtasUeBBsZo8Rvj0GcBkBueVH7JwmU2bS5fXSt0sWXPggIMQO91FYcCgAQLcKzFwwcK8uZnbyJN22F2kyJrSw374kGNEBQ8L0VeqINO8uZgC4ZVeeXAgQAAOcECZMMBEDgEA6VcWEFOeORkV+Sn1hgLu9XAHJnPQ4YMBMhwXoEpdmNEfFlwQ8KBSMazRQw8H7FHJDzI00EBJF6YEQBYTYpHFZiUm9UAAGwInSRsE7ONgiycpN6EZX+ColB9F0EADFZHYEQQBM4CH1P8HmTXZJItHqRDGhGJc0CSJLDHp5Jb4jYWCAzQIUMMjSGAQBJRHffBFFmy26eabWXRRQANdolQAGBOSAWebFwxg4UkL7Ckom10M0IBSQAgggAONzCAEBmIpRcByKVZqBhhcfAEgSl1sUWmKNGyhRRldkGjAlJ9OuAUYXnRxKFIjCOAEo4psI8SNSY2X6qdbeAFBlyfu+ikYY2AgxQB4CqtqGQMkNYITTuCQSAoitIBmUhDwp2yKYUBgEgZebJsiGrdd4Km45dHgRbNIrQEtdoX84ctkZX0hIbr9eQGglPjm2wCK/TZHQxl/HhWAEwIsYEg/9JIVW8DlbdHjnRAzp8X/BeFWjIUY0B3VgaxjEpICAh/UOdakO8I5xhnaTugFAZ1OyMWbY3CBRopaZIFqxHCWcca5E5aBJUsKQJsGId7gOpau/YnhLUoLNNAFeRNqwQDA/a2IEgYNfBFB1VloUTW7gBrwRbL9hWGAUjTMOsgfACCgZFnZ5rmpiVl83XQWGZfH40oQAN1czoIzd8baKn0wBs53H7UEtAqrIYIFJpNlr8wFpxS4qjpT+XRKMfd3RhY0BG3sSqGXp0XjLHUA7Q2CsJBQXw9POMa1J23eHxpZoN3cfyoFG3QZE9KQxVGpD846S0W4rUY4c5OFcn8R9MjS5f0RjrlK4BafxRmqXnAU/9blAa8UB070IEgFlDFdHhqfp1R72uQ3d7tK/Pa3Rdhjs4QB8dtTCgWgJYgVUKZu2VueSQwAvqD1rTnV04/vmAOGLBQOC4djCQOo1p/7CZCAKbgC+/yCvfJUiCXJY04EOre7+J0khVgIA+lMtxIAeG1C5CLLAJ0gCBQYsC/C6yDujkWp7PWuassLYnm8AMB0HU8/HCxPGBS4kh0KogMoGCFZdES9J6LkAwXwQun6Q4MxfOGCJ0xJ9yb0vfBxDwJinFD1KncUK6phIVpcWhSZQy4V+FEFEOjCGLQwRtENoH7M8SBK8sczsWWvC38EZBfK4EiZUXEl6FPf8zpwhb7sR/9VWghlKMVwrxSJ4QsEeKAKvWinCWKhghcUlSi1QMphia8szaPVB97Qgb5ESGNo+MICToVDF5rEXBOSYSEDdsqhSed1gkiBBN7wQ6UosV/NPJYrrbYSRGKBiRoDgzD78jgnRO55EujlWNbYLxqcYZxSQGZ/uPCqramSOW0MWATOcAFnss15gnjBCSTQSaUwUlxmIMMYBlCnGXbQn8TUH//wZQYZMoCOSSmaE45GiCGc4A1joZj+ZjlLMnBhDIVCU6BIGkpWnkQFXGDp6C4oBpaG0qQoZcAQpQMyQ6TgBCdQJ1JgyIUL0IMeBfgjAfxpEkAe9aiZA9QAnkqPQy6TOV7/MOpRk+pHAux0LAdL2CGSEIMToAAp10wkU30khQU0sTxZwChy3OUEeBkiAWUtaHLuuUK2sqQBDYxYx/JTTmkpogR5ZclB+WhMv0qBAZVsDhjQE6By0moRiDWrBKvGAMeqRHdSvCRlNHpZRpRgAjHoQB6lQNR6etYkeXPZ6aLTgQNAq7SNSABqJaDFtGJhDGv10QIWx0a5+oUIPYCWYSOhhCdMQLNS+N8Wpktd3r3WntSlLhgG+xoFyEoAMprEC0DghxjwFgAFoCo9EHddKaBXvRBwLWWIcDAnRICjlkiAG1D7htW2168nsK1yQfGCKfgBtar9r19RwAFZOaEI+AWF/xL04IYD91fBJTrBGhzcg/CygwUUPrAEzorh8BzhAIoSQA9gpxgWgGAHbnBDDKhZYsr4gQMBCJMAAsBi0wgiCSUgwg5gPAEa1zgpEyBQD4QkJrv6eBApSIAedEAEIbshqP7F8BuOgOMNLbkIeHjBkxfxAinr4Mxn3sFHSXzdHRxBAe2B0YYOcAMPjfkRL0DAFIgAgz77mQh++KhQ8zMBIjwANNVxj6JxEAI735kSIhjCnilA6UpT+gh9rnCg38BpTkvg058GKlCJcGm2iKY3B6hOEQJwABxsIDGPFkYKPlACEFgBKlB5gK53PZUlrAUIbGkLYQpjmNCcujdFUAAVbjgwBDHHWjEpUAICPOCBDWwgLb4GdrDbQmzDcIAKIxiBFaxQgmY/+9yLEEEaEHAVdLv73fCOd7wDAQA7AA=="
+#define PHP_EGG_LOGO_DATA_URI "data:image/gif;base64,R0lGODlheABDAOf/ABIZISAeIhwhLA8jRwYlVSUoLyIpNSkoKwkvbR4tRBUwVDMuNysxOx87Yg89gDo3RTI5SgBCkDg6PDY7RyBCcTxBQz9BVD9ETxxPkQ9SoktIYkROVkpNWDJSeilVhkxObEZTZQVevgBfxVZQZRxcn1BUYFNTc1FXWRZht1ZYVQBm0ghlzBhksVVafyNlqSpkn1hcZwBr2EVfhABs0lRdcF5adRJpyWBcaVlgYl5dh15efh5q0gdw3iFsxhBy2Rtxxhhx0Ttsn2BkigB45SxwtDFwq0dslGNoc1pqfRtz6GRmkypzwFZuiQl772psaWlpiiF25Ax94zB10BB+3iV44BR96yN71TJ5vit7zih73GluoDt6tk53nix66QOG+nBwl0l7r3F2cjOAzSKB9guI9SKC8HF1lW90pm93jTCC3SaE6zWC12F8knR6fHV5gzaC5SmH6ESC3y6H9kGGyiqJ8UuDzXx5oWV9v1aA0nl6qWmAnXl6tHJ8tV6AyVGGuS6K/EyHwyKO/D6J5T+K2SGQ9zqL3ziN9jaP6jmP8WaHwYGCsHqIkC6U/C2V9naFv0GS50mS2IGFuYeHnEWU4iyZ/16P2ISIr1iSz4mLiF2SxV+TvImLlmiSsnqPrIeLvzmc/kOa9Uaa74aNtHWRyXiSvk+a6YyNvIGQwo6OsImTnFib3lKd5l2d2kKi/WSd0k2h9zeo/1Gi8ZSUw5GVyn+czE2m/46bsY2ZyHugwUmr/12n8GCn6pieoGWn5Hekzpueq26n25yby1ms/ICk25ejrlGy/56iymav+V2y+2yv7Wex9KaopWG2/1e5/5Wu2H216265/HW3/qus0aavxWe+/66wvYy33YC4+Hi7+bO0uHPB/aq3wa6112vF/4e/9pfA27u31YDF/XnK/5PG77y/25TI/MDBxYbN/qvH7LfH2qPP+47V/57T/cPN2abT9c3M5Jna/77S7LrU57HV+KLg/7zd+tbb3dbb6a7l/sbh99Hi+Lrp++Pm7+Hx/P3//P///yH5BAEKAP8ALAAAAAB4AEMAAAj+AP8JHEiwoMGDCBMqXMiwocOHECNKnEixosWLFoNpDIaxo8ePwaRJ4yaNHDhw5EySFCnNmEtjt2TJMmXKk01PpmbN+sgTZEly7+7de0eUaMqj4FaKfBlzps1IkfZI3cMnzx5Fnnb23MrQGLig/PgJHTvUZEtjNZ9CXcu2bVSpfPicOaOlrpY8ikxx3fvPGLd3YQOHfUdOWkw+jkaNEjVtquPHkCNLnVtXieUcSr7k5YvRK2DB9wrLctSnUi9dxYpRo6atEy/JsGM7pqskh+0WLXLY0csZYrC/QsOGNubplrNkxWq1Wp6rObNu53y5kU2dupbaLUxob5FHVu+Fxsj+kb3HzdTUc/TonWtWrLnqXMWaiQvnC031+7LPKMn+4YOGJ4p8Z1BJRA0ljSeQ1XMOPOt00wx7xYhDjWrinDNOEFzQwgd+HEamnwkahGiCHQL+QyBR4MgSWzjw0CNOM+4xKN868FhjhB/PqIMON844c8spp6zlSSSexIXYUx06pkULGlhggQZfcObVUdK8FRs70NCzDnvNUeNgN+vQ4w4XfvSizDHIQAMNM8LooosyaWqDDTbhhOPNnc9g88www/RIHH5nMOmkBiT2FNJRxuBXjzAMTghLK/IVAyY843TgAhaHIKIpIXDQgUgjhwjySCijllLKKrqssssuqaqaTDL+e57CYQ4WPPDAB7x15BdKxlgp2zi9JBPLOetQkwsssBTTYDPwwMMOBSRYgQghdMhRxrVl0AHHG9xuO0UWghRSyCOlTCJuIZNAoq4qwMh63xkm2LrAExiFNFKV96GzyyOICPNIOfRQs9wnucCjTTf07OMOBREAQQcZZXhRxcTYUmExFVFEkUUWaXTscRqhlDuIGGJA0ssoHGqhwQILWJCrRPZKo+J9z5xpCBnUNtrKJwTjc4426bHTQQQzVHFtFU00AUUXEw8BxRBUDBHFtnAIksYUVpOLzDGpTjLIIJA40mEOD7AcJczGtORrbJ48E8orn8jhhRyv4AMPMrBQAkv+M14ijI/QRHeBLdJdMA3F0jzwAIUPb2iKCBwbTwHHI6PqEoub6c6xYcoWHHCADhEF49LM1UWyCyigEMIIIYY0EY56xeycCzO5NAP0PoDPEDG2XSR9eBeHQ8GDD3CUk4862AgD+cZZwAHHIY/EEssqkGjeIR8aeD7CQ6L/eZ8jlWg6hxVkQFxFi8bunOze4tCDzzgNOFB0E9c2UcUYSRd++BA++JCFPm5wwjLKcQjnZcEHQJjcuB6BKl2oQmwdMoHnNNAQWdyiV/iJRB2yoAY1vOEFVbBWFegBD3HkYjmtaI+X4PG++PmgfnKIobXKEDWnDWF4abgHBwzgBG/AQXL+kANCGg6RBitYAQtrgMQqVgFBDrXgAAGgoEJkcou1xeYWdZjCFKKghiqQQAr4o0N61hG7T+gtF+IQBz7wYQ0FEG0M12IEz0DBM001QlNU8EEa2nEBA7QBG5ATxLeAgMRChGINP0jkD7AghkQ08T4tCEAAapCQWZhCFgi6zyjWIAhr2MIFQ5DaD4bQBUS4Dx7NeJQZYQGdfdDjGQOIQAzo14h5yCMf+ahHPfIhj3ZsQx7QgMMg2jEBAbQBecd4xSOIuIZmkguJWFDkJWiRJA1IslAFmQVOMkmdSFxiDYfQhz/8gYQodMFpwAsFPlzZjJ0xohVoPMc+4OEKAkSACnL+IMQxsnGBC3DgnyXgwAYusIFslGMV1SjmAU6AAzfwIh3YCMUkelEKcj0CXWuI5hzmYA0ryuYBATiAdwqSlvvwQRVYyMI8xumPVKTBaEgrwzHWCI/YMeKdxdBG+9jBBQJkoAqBQAQ2NlECGJSABjCgwVEDygBzeGMTEyiAAUrQTwYUIAzeCIUtiPGNZ+jCVI9Iww/EcAlX+OIWHDoDFLdHkFkQyaORuURKB5GCaoxTD4gog7WaMAZvjJE9rUjWg9JTKQKggAyMaEQ53FDUauAyl/r4RQkY0AZ+HOECASBGNX7BWAEAYBGlYAJBcRAGTGBiG8oQK1kzwQpSbK46JpD+5MuGBFfI3AELQKBCEAxQgHbYwwWNKB+22JEeF7WHldQIEzy8kQAEZOETO5sHDU5Qgm08QxiNgEMhzFGCAlTgHiWYgATycad52KKYJ3gGCATAgA1woJ8GwEQpevCDQQACEHMwqzPuA0Up/sOttX0MH3oAhBn4wAPTOAANNpEFMuyVfuxoETy6cSxJSXgdroglHGbXCnnQwA1HSIcyJhaFQqSjuwzYBgcYcIRywCENkPhFAQBwAmJ+Nh7TIAYaeAsMIPRADHPwwxKuAAhXkOIUpJNMJAMwUvMEeCoDtsEKVjADEhQgAAIggRrIUIXCNYEM7KARPNIHC3Gs48zhkIH+YUEhDIGlgwM3cIMtjlEFKrzhEe1Y8QIka4BFxEINgngGGjy7iGp4Fhe64Fo8DAAATkyhB1iYQxBcsAQiXGELW8iENcwjmTNIkl7/ePJUPLEEKatABTsAAgUSgAE43OxavVMDO85h5mZANxfJPbM3GoCANLyiGMyAxDQ4AINNWEMYhEDEIdTxiwsU4AhouIAAqoEINWTBGRAAAAC2MWgGJEOZj7hEAgDAhTSgAAtXeIELWMBuEpCACJl2RqIiY4EoCsSkgOjBCmIQgx34GwiF4CAhhHutRqwjjetABnRhQawzZ2IAGXiFMNqjilT8MxvooAYzoMGObBxhAgywBxL++oiODmahE4xmQDuyvQFtvCIUhfCDZzlxiB8sYQ5bIAG7WeBuF5CgCGDwAy6SLJUPBGAB967OKbBggx3wIAYq4PcOfBAFOljdwVXwAjPCcY5uSCgXyulGs8rRAQLUgRlsyoU30MCBEpjjHubYBjGcQGwIpOIeMJjABp5BBzVYAQmePcI0ZkwMbQgjFpDoxKHhIIYrXKEIL3gBEdTtbgz8HNOcgIwSJCmQ18LGE3MAwgpUwIMh8LvfPqBCsgcOMTLQ6WDnmBB75lOODDsgFhpnRivmAYK2X4AGE7hA8IvqhnhUY8Vt8IYa6FAHC2h7G0gAwAbkMQ49pYMGAJAAKwT+MYgrECEIHog8vOHt7hcUYQuZf8zmA/Df6owCC1OOOg/KUIWnx2AIjYCbIT5BBkNwHRoVcg7MkFPUcA7eUHZigAy0Iwy5IA8QAGdHAGJHAAMw4AbbMA+PIAkcMAG8UA5UoAaJwGgXkA7ZJgG8cIK8AAOYlQrmMgiWFgQyAAZbQAQu4AKRB35BEARbgAvqx3n/EBeyUQdSIAKoFgM+MARkoAZPFwWH8AqtMC37Bw3noCZmdg51Uid+AHG6gAwMWAu5sA0TcAMlwA+5VA/zEA/qcAyIUArtQAzEcA/XQAVwgAsW0Ge2IAEAwADvBVAX0AbPUAhgA29GgAZ2wARgAHn+JPACYLAhlsAFXOAr6ycQZ+B5kDEKPzADoxcDw/OBZaAGqfcKyAAKzNEKwhAOycMiB5cM4QAMCuAAk6ANtOOF0PALxOYG/XAMn9B3VmcI1vYK0VAO0QAKQwAH4xAP98APSMBb9rANqbAIbpAK1gU9I+MCWyADViEVXAAGL+ABMiAKsBGJP0iJjnEKYtB0UcdvPEAFj1MGQ6AGsRAO0KANasIMyKAM2nAMUpgMu6AKl0ABCPADCrgzlNAKi1UCJbAJ/SAMhlAG+1M+VJAtjUAIVMADnggEVkAKHCAAOOANwrAL3lAOyhAKhyAujQdvLeAYkZAJWwAGRgAGcGV0SPf+D3twBrBBCz+wbzvQb5rYjocACogQCsKgDcmgDXUiDtCADLrQC7twCYDgARRAAAhgA8sBC59wU69QDzTQdsSQD7kgQkNQBWRAB1FTOFUwAxTpAzbQA53AAABADNAACj8EB8o2koUwB5dABGBwkpDhB2DABeIoFfUmRZ4wF5FhCnNgAyIweudYenCgBqUQC6FwDMpwCZcQDuIgj/QoBhjgAAiAABGAAoeAQq1ACYxACbnQD8SQCr/AD+wACnJgOF0gB0l4Q1BABTuAhFQABGswaAXwDcIACm8ABEAgOWmALqswB98nBJEBhJ32aQIxC3MhjqfwAzbgA5mYOFDzBnD+AIqxIAzQoApqgg0AGA7FgJRr0ANWIIrKwTNVeVOtcA7lwA7qUA6toFdlADwhlIRwIDw8MAO46QOq4EvtgA1PSAVU9i1TAIjdRwQyQJMdsmQjJZOE+RiJgJgr4G85eYRcBAehoAxvogtzIJnHsHU/U570CAqUMJDtGQgsGghyEAipwQgLKTiFwwP0Y3VUUAVQwG/0wz9AEAq6IAwF6gMxMAPDmQZYMDLw9gFJsgf91VZa4KCOIQYhMGX+dkOpJwiv0ITSswu9sAXKoAxrwnVT2Aq0U5Us6gVj4AV/4AVuOgayWQZKMzFQwJD2Uwaf0nemN0sMOQPVyYSgoAZRMAT+MzADWWBESep9QWACSRJbAfAy/6AIUeoYjrAEISACiTkDVAAFHVQ1QJoqqpAJXHAJpRCPxGKFDLgzaKqmY7Cmc+OirZo099llWVcGhNAIPlkFQ5CTE8MDK2ADUfAKjaAGX9mffmoDRyQGRFAEMpAkahUAbAWlkyoVpmCpU9ZviVMFzgMKoTA9quAHIAABMgAJukAnVmh4yqGqjOCmavoHbeqmMeQFhuAFSUM/clAFt5o6N6QCsUkGUGCkbNYKXMY/MxACBktfiiql+AFSInUQplAXm3MLV2ChM8BvnKpsoCA9q8AKIBB8MNAJvYCU0BAOsEg7N0WagcCmf7CmcqP+pl4AMU3AA0nQBHNDBqCAq4SgBjwKMTxgA3Bws2QQCOwIBDZgsCGAAijAAkSgBNV0TQkhqVowFXOgb5m4A3KIOofQravgCv2EBlFxCqzwJtigDfIopGj6B4HgroHACHLQpoaAPxGTOE0gm4QgiohQBToLBS/bBf0JBy5KCOzoA/SFAkeLtCwQBEmyZJSkEHlQF1LhCjeZiUaoBoggCC9WCKWgCRNgBo7BB6OwC8rAdfLoTmzrru46BmjLqknjBUkws0GLq69QbVRQNLLZBLs6BNlSBVNjBT2AtL7LAi7AtE4kSf7FuHWRB7TAdIrJb4VKdVlwCLqgCRcQGZ+rU/D+eEJoOgaBsKauCqdkUK/1ijOgkAtwmUcvVD4xW3p0ADxRAASYerRLkAEZcLgRRLwP0bhaUK02UKinJzwW8wbQK72SMQracK4Tdyw8Q7ot6qJyUK9dVgafAAqxCwdRcIQvS69OYzQ8oAJWWqg2sAQukAFXcI3VcQb1Zm8QIamKMLGYuJMTmXocmgycML2S8QxXCA0a1x7tWQvIgAyyA13r6gVlkITQlSkV/JDcGzx1+nSh5KOEdAUukAj4oQQLIEmLGxGm8AWQ0AP7u2+lJ4eI8AqSKcCScQrnYIXUIAxww6JoGwitADe31go3VZVPyK2QY2CqI1zAMwR0QH+h9IH+U1CckxBk3ghbUHQAZzMRwcAKkXuhBna1r/AmmUDDNUyy2oAMuVCVbfsHhCAHhvAHMbS2awu7W3oIUmADWYAIrdAImlwGjdAIgWAIA2d1zyNRG8uD1KEEIBUAEgCpEjEOa4CJ+5Z6VysM9QgMG/CXUvEM2kANOCwMtcAIaXtT0iw3oMyilEAwuRAKoVBEaTC+ckzNN5VPrEctcNAIo7IKyYDLsKEFJzxJHjEIUubFX6nKbaIMwEADlgAbySMMbCIM0tyiN+WibhrL7vnGsaAMkDAIsXAMwgCUzQE30izN5UMHyQYqDJQMvgAbfPABUBQALvMRqmAFhXqbH6jKDo3+DL2ABJIgGXygDasskC1qCIbwogu8ttCVQuWpDZegCvdYCkRZtlXpYMJl0VGgbJfTC8DwGKjAByrz0QuQyB6RDGlQqM2rBuf8CpezC5xwBPy8xmRwzS4a0HLzou7phWhXjy/ACspQCshAlOGgxmgaCLOJt3J4CKai1L5CK55zAPPCFX/opzPgb1RXy6WwC5oAA9z0GL0Qzg7WtgtsCGlr0+8kDJYdJx6wBazQCw7NDNpQC+tJCSwqm4aAMbU8CaowCuahBR/wAH39AKC2F5NAtBc6dVQXBYJwKq4AA5bwl6uQOgHNrnJQzaBs1gMZ0bmgDcrQAAPgAZcgppg5MIb+cFMQcy1yuAZ9cAd7oAXxsgB9PQLYxBeQUGAVW7H9EwVTcNjAUAJfYBdS6gmlgAhBG7RuSgij3bY2nc21wIC58ArQoAsNoAAYAAbQIJ7Q0B7qKt9VkAXYLRc50Nos490W8ARa8R2qQJ3XqpPEk9DJgARmYBkgXheTeAd9sAZxoAbWPDdqet9yBE8nlAv/TQEUcAWqMLbNDM2fQDl4kN3bnQMmUCtlwzIT7su9AbnzvLw+MAXKgA3JwAZu4FZ5AOJSrgQifgYk3gd4YOLc4jgRLJqX45R2yQp8MgqOsCHX4eNNAuS28gA18AVEXiLleKmJqQIGlgXlus4wQBCmoAjAUT7lII4ZVO7eczHohG4X13EZ2hEiTrLotWIBbR4gJaIQl0C4mBp/SV4KSQkMOIAQ2pQHefAFthHqop4DuIEb2nHq2tEf/REirM7oJqADAFLhkc4QlI6pdH6kupAMu+0QlhQJdmAHX/AF2JEdqJ7qqq4BH6ADuBHseCHrs/4QkEu4iJlqFrkGk8AKrrABPEETkfDmz94RgEC4IWCkVpAG4eKlmiAB377uFeEKS4ACNvADQpQG5LILwMAE7J7vAhEQADs="
+#define ZEND_LOGO_DATA_URI "data:image/gif;base64,R0lGODlhcQBIANUAAA0NDgEDBgIFCS5EXhUdJwUPGgQKER0rOgABAgkZKiZpqxhDbQ0kOwobLQkZKSNgnSBXjh1PghpGchQ2Vx1NfAoaKiJYjQoYJgsaKQECAzdQaS0/UTE1OQUPGAkaKh5ViiFclRpJdQocLSBZjh5UhhpIcw8qQxc+YwwgMwcVIQkaKQgXIwcZJTM6PwIEBRkaGjEyMv9mAP///8zMzMfHx7+/v6urq5KSknNzc1VVVTw8PDc3NyYmJgcHBwMDAwAAACwAAAAAcQBIAAAG/8CZcEgsGo/IpHJ5/DGf0KiU+Ks6p9Kr0KrFer9GbReM7IrJ6O95Zt262durUy5uD8/rtL58h7vlf3+AcHlsdoR7iU12eIhzbXVVfpOTgGOKiWNrkpKUhZ99iJijl4d5kFSdXKmdb6OvsFOXsbS1oba4ubq7vL1DNjg6ODW+xVg3OTw/AisCOMbQSsA6AD8FDAsjIwwv0d5DNcnLIhMU2uclPzbf3jwC2Ofx585MwTfssD8n8vwjKDpLcggo8OMZPkw8GPSTN6HKCxg5hhHJ8WOCv4IHFeEwsDAeiQULJjBYUQXGM4oWtTU0mDGNjR/mOi48gcJKynMrW+oBcFNmP/8SJnri/JFDJ5kaL0T4XLqwYVGjWGy8MFCCqVWGRKFKsQGgAImrYIc+1bqEq9ewaEc0vEc2CdKzacOmY9vWxjoiMAx81Sajr9+/MhaE2Iu2hAAexPraJUbGxo3HkB/f/XKjCgBhwH5kOwcYsAoU5dKSMIBYSN8cOSZvxRGjtevXOnREZDwFhogSE1AYqKIwXl8VBlKoUNHXgAEUJwhfJVGgtGkZsek+Afa6uvUY0bFUjEdhgnJtIUwwmLDAb4cU3tM2pz2jb/YnN67Lr/4eSuWYPkmEGDyiL4MODITgm1+CkdBZgSh00xkMOkiHRHzWxSahDvNJyN4SG6HV1wSfJcf/GWAMdObfCQv8IOILDUoj34QTrhgbS0zAgEJYfqGgQnp8yXACA8N9NkFfHQRX4wl+6cADDH2h6KBdz7jIYosRShjFdmD5B6CAH/JIHkgh9JUCeuXJAOBpPDTYF4MO4mDCAU5KmMMNxNDAWpSx2QdTlTJwiNxeIhbYnwzDZeMlcTLAAAOc7qVIxAsVsrjkdRNCkeFVNd5ImIgqmCDgbyoICiihZd5gQ189KDoDDTcYcN1lE+JAgxE2QCrlEzLi+V+Af+4XpnHCafpnoL8SWugNOwD5gqg4oMbDCtahkAGD9RUBIX2xjbUElUyJ6BcDJoQJ2AldfuppoCJe0IEOB5hw/wIEKFRQnQgesJrDhUTI+iJ8d2arbXGdjhDub6BxOm6nJvzVwMEMSCDBAw+AwIAHr3kgQgdl5vAqEjXYq4NqSeAgAFjd2djjyL7qJ9JwDCQXnq/+mqBpCQXsWIEHKVPwQcMgOOyAaw4k0EAKGCmhsbVKVLbCBFUtte+GC+ylH5df6cffCFIbKAMJJ5A4GARcdz2BA2CH3YAIDABA7y8aO1g0NeOEttDSgLJMowwuh9D13VwDFTbYCZjQMEBIDO3FNACY0NFvwY3M72ZoLWCACRTgLfnXYTPwAQgKmFAUDjjQ1SbHtfXWz29gggSSSHKHRcIKJkAAguR4R/C1CJFD8P+AAiykABoCQrQJoxc4FHC4uPLod+DUfxI4mF8O/AhYgXj/JdjNEUSgwAMY1ECDxjpcDEZl330IrDzapvyViCn7FUD5yXXdWcqXg3D7CdPCNqHaWNSA7YDPIw+kkH1BTo3OA6QA9UUAIvhfCoZEAgj0ZUdhA03tRvAAEvhuDzpQCj8wJTcvgamAVgqYDIQTpgIkcIQfFFOAHCgDBjTPdFvj2gPaRDQy4CBf5JMBr4bTQeINinTe+U0BCiYDBzSgL2BbAAtT4IA+xbBrIODe2cDwghltEIVb8p8PPyWwPxlAAERsgAeQ6AAlklFEDtAUFKNIp9iADlXJQs2bbuA9Jdz/ED/i69eHwgUsTvkFPVb7QQUk0BcPNLGIZWRhEsPFqzTazXUzbKOphBCrNnaujkUwS/jgFqItkqszCKDdGRFpRlJa7VuDiaQliVBJ7t0LVl0JX/K0ZYAuCuyUfrEGBUaZREUmEgL/KiJoIqBKagljCPUz5pN+N4MaxLIj4RmZNINSN/BUE2s86gsADBABEJSgbit7ZDjzFgKRgC1lEJgPdiw2g2Ta70lvOkINeACXhTzNdPgUDAX24zR+asN4MjiSAS73AX5WjZxPhMA9Q/ABdbYGVY1aJuiGsBFZxqUjhhFGDlwgP4aN4HWwC2nXLOjQiLJIInbUy0Wt4pQa2IUH/ydQwARmKr8RiDSkJW3T/TCJMXpadKX/ZEBWKEqAFgDgBjCYgAJAetO75VSZjuKpEuYpgKQBlR8lYqZdhsCBhTG1qSR96pMkREcvUNWq/CBPXOixBA5QIGdN5dpTsTPWBkk1CmftR0N+YACkhUUEgJOGD0jwVa7l7LCvy2ld33TXKeQ1HiuxQQ5eUIUVoEBdS5kAAJ7gghM84G45Y9jtSgCCCHjAA2PzwGHqOqF4KuKxagkaJTmngxcIzycU+AH+iFADFCwVtCAgTwRQEIALQEAEIlBBB15QJtbKZrdpqAEMqhrbGiIThx0pgHWJgAMJ/NawDxhADzj3DBioSwQGAIfADpyLUloIpCbbHQJPlsIAGCxhBxa4HcM6at865qCcRFlsWXORA5MwIYMyWQADBBBfIdzgBRpAwVtvpzkjhCM1lHQMZKb4DY/xozsiEMAPeNDeJNDAMT/YwAkkwICJcpgsL9mMgglyGRxMlAmiAoCN2zIFeoZ4xK6NLo+nYIMX3XjISNZKEAAAOw=="
BEGIN_EXTERN_C()
PHP_FUNCTION(phpversion);
PHP_FUNCTION(phpinfo);
PHP_FUNCTION(phpcredits);
-PHP_FUNCTION(php_logo_guid);
-PHP_FUNCTION(php_real_logo_guid);
-PHP_FUNCTION(zend_logo_guid);
-PHP_FUNCTION(php_egg_logo_guid);
PHP_FUNCTION(php_sapi_name);
PHP_FUNCTION(php_uname);
PHP_FUNCTION(php_ini_scanned_files);
@@ -83,7 +78,6 @@ PHPAPI void php_info_print_box_start(int bg);
PHPAPI void php_info_print_box_end(void);
PHPAPI void php_info_print_hr(void);
PHPAPI void php_info_print_module(zend_module_entry *module TSRMLS_DC);
-PHPAPI char *php_logo_guid(void);
PHPAPI char *php_get_uname(char mode);
void register_phpinfo_constants(INIT_FUNC_ARGS);
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 65a5c00cc..9894746f7 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -99,7 +99,7 @@ static void php_pack(zval **val, int size, int *map, char *output)
/* }}} */
/* pack() idea stolen from Perl (implemented formats behave the same as there)
- * Implemented formats are A, a, h, H, c, C, s, S, i, I, l, L, n, N, f, d, x, X, @.
+ * Implemented formats are Z, A, a, h, H, c, C, s, S, i, I, l, L, n, N, f, d, x, X, @.
*/
/* {{{ proto string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])
Takes one or more arguments and packs them into a binary string according to the format argument */
@@ -170,6 +170,7 @@ PHP_FUNCTION(pack)
/* Always uses one arg */
case 'a':
case 'A':
+ case 'Z':
case 'h':
case 'H':
if (currentarg >= num_args) {
@@ -186,6 +187,12 @@ PHP_FUNCTION(pack)
}
convert_to_string_ex(argv[currentarg]);
arg = Z_STRLEN_PP(argv[currentarg]);
+ if (code == 'Z') {
+ /* add one because Z is always NUL-terminated:
+ * pack("Z*", "aa") === "aa\0"
+ * pack("Z2", "aa") === "a\0" */
+ arg++;
+ }
}
currentarg++;
@@ -250,6 +257,7 @@ PHP_FUNCTION(pack)
case 'a':
case 'A':
+ case 'Z':
case 'c':
case 'C':
case 'x':
@@ -315,16 +323,19 @@ PHP_FUNCTION(pack)
switch ((int) code) {
case 'a':
case 'A':
- memset(&output[outputpos], (code == 'a') ? '\0' : ' ', arg);
+ case 'Z': {
+ int arg_cp = (code != 'Z') ? arg : MAX(0, arg - 1);
+ memset(&output[outputpos], (code == 'a' || code == 'Z') ? '\0' : ' ', arg);
val = argv[currentarg++];
if (Z_ISREF_PP(val)) {
SEPARATE_ZVAL(val);
}
convert_to_string_ex(val);
memcpy(&output[outputpos], Z_STRVAL_PP(val),
- (Z_STRLEN_PP(val) < arg) ? Z_STRLEN_PP(val) : arg);
+ (Z_STRLEN_PP(val) < arg_cp) ? Z_STRLEN_PP(val) : arg_cp);
outputpos += arg;
break;
+ }
case 'h':
case 'H': {
@@ -511,7 +522,7 @@ static long php_unpack(char *data, int size, int issigned, int *map)
* chars1, chars2, and ints.
* Numeric pack types will return numbers, a and A will return strings,
* f and d will return doubles.
- * Implemented formats are A, a, h, H, c, C, s, S, i, I, l, L, n, N, f, d, x, X, @.
+ * Implemented formats are Z, A, a, h, H, c, C, s, S, i, I, l, L, n, N, f, d, x, X, @.
*/
/* {{{ proto array unpack(string format, string input)
Unpack binary string into named array elements according to format argument */
@@ -586,6 +597,7 @@ PHP_FUNCTION(unpack)
case 'a':
case 'A':
+ case 'Z':
size = arg;
arg = 1;
break;
@@ -662,9 +674,23 @@ PHP_FUNCTION(unpack)
if ((inputpos + size) <= inputlen) {
switch ((int) type) {
- case 'a':
+ case 'a': {
+ /* a will not strip any trailing whitespace or null padding */
+ int len = inputlen - inputpos; /* Remaining string */
+
+ /* If size was given take minimum of len and size */
+ if ((size >= 0) && (len > size)) {
+ len = size;
+ }
+
+ size = len;
+
+ add_assoc_stringl(return_value, n, &input[inputpos], len, 1);
+ break;
+ }
case 'A': {
- char pad = (type == 'a') ? '\0' : ' ';
+ /* A will strip any trailing whitespace */
+ char padn = '\0'; char pads = ' '; char padt = '\t'; char padc = '\r'; char padl = '\n';
int len = inputlen - inputpos; /* Remaining string */
/* If size was given take minimum of len and size */
@@ -674,15 +700,46 @@ PHP_FUNCTION(unpack)
size = len;
- /* Remove padding chars from unpacked data */
+ /* Remove trailing white space and nulls chars from unpacked data */
while (--len >= 0) {
- if (input[inputpos + len] != pad)
+ if (input[inputpos + len] != padn
+ && input[inputpos + len] != pads
+ && input[inputpos + len] != padt
+ && input[inputpos + len] != padc
+ && input[inputpos + len] != padl
+ )
break;
}
add_assoc_stringl(return_value, n, &input[inputpos], len + 1, 1);
break;
}
+ /* New option added for Z to remain in-line with the Perl implementation */
+ case 'Z': {
+ /* Z will strip everything after the first null character */
+ char pad = '\0';
+ int s,
+ len = inputlen - inputpos; /* Remaining string */
+
+ /* If size was given take minimum of len and size */
+ if ((size >= 0) && (len > size)) {
+ len = size;
+ }
+
+ size = len;
+
+ /* Remove everything after the first null */
+ s = 0;
+ while (s++ <= len) {
+ if (input[inputpos + s] == pad)
+ break;
+ }
+ len = s;
+
+ add_assoc_stringl(return_value, n, &input[inputpos], len, 1);
+ break;
+ }
+
case 'h':
case 'H': {
diff --git a/ext/standard/password.c b/ext/standard/password.c
new file mode 100644
index 000000000..266ad0a42
--- /dev/null
+++ b/ext/standard/password.c
@@ -0,0 +1,460 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2012 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Anthony Ferrara <ircmaxell@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#include <stdlib.h>
+
+#include "php.h"
+#if HAVE_CRYPT
+
+#include "fcntl.h"
+#include "php_password.h"
+#include "php_rand.h"
+#include "php_crypt.h"
+#include "base64.h"
+#include "zend_interfaces.h"
+#include "info.h"
+
+#if PHP_WIN32
+#include "win32/winutil.h"
+#endif
+
+PHP_MINIT_FUNCTION(password) /* {{{ */
+{
+ REGISTER_LONG_CONSTANT("PASSWORD_DEFAULT", PHP_PASSWORD_DEFAULT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("PASSWORD_BCRYPT", PHP_PASSWORD_BCRYPT, CONST_CS | CONST_PERSISTENT);
+
+ REGISTER_LONG_CONSTANT("PASSWORD_BCRYPT_DEFAULT_COST", PHP_PASSWORD_BCRYPT_COST, CONST_CS | CONST_PERSISTENT);
+
+ return SUCCESS;
+}
+/* }}} */
+
+static char* php_password_get_algo_name(const php_password_algo algo)
+{
+ switch (algo) {
+ case PHP_PASSWORD_BCRYPT:
+ return "bcrypt";
+ case PHP_PASSWORD_UNKNOWN:
+ default:
+ return "unknown";
+ }
+}
+
+static php_password_algo php_password_determine_algo(const char *hash, const size_t len)
+{
+ if (len > 3 && hash[0] == '$' && hash[1] == '2' && hash[2] == 'y' && len == 60) {
+ return PHP_PASSWORD_BCRYPT;
+ }
+
+ return PHP_PASSWORD_UNKNOWN;
+}
+
+static zend_bool php_password_salt_is_alphabet(const char *str, const size_t len) /* {{{ */
+{
+ size_t i = 0;
+
+ for (i = 0; i < len; i++) {
+ if (!((str[i] >= 'A' && str[i] <= 'Z') || (str[i] >= 'a' && str[i] <= 'z') || (str[i] >= '0' && str[i] <= '9') || str[i] == '.' || str[i] == '/')) {
+ return 0;
+ }
+ }
+ return 1;
+}
+/* }}} */
+
+static zend_bool php_password_salt_to64(const char *str, const size_t str_len, const size_t out_len, char *ret) /* {{{ */
+{
+ size_t pos = 0;
+ size_t ret_len = 0;
+ unsigned char *buffer;
+ if ((int) str_len < 0) {
+ return FAILURE;
+ }
+ buffer = php_base64_encode((unsigned char*) str, (int) str_len, (int*) &ret_len);
+ if (ret_len < out_len) {
+ /* Too short of an encoded string generated */
+ efree(buffer);
+ return FAILURE;
+ }
+ for (pos = 0; pos < out_len; pos++) {
+ if (buffer[pos] == '+') {
+ ret[pos] = '.';
+ } else if (buffer[pos] == '=') {
+ efree(buffer);
+ return FAILURE;
+ } else {
+ ret[pos] = buffer[pos];
+ }
+ }
+ efree(buffer);
+ return SUCCESS;
+}
+/* }}} */
+
+static zend_bool php_password_make_salt(size_t length, char *ret TSRMLS_DC) /* {{{ */
+{
+ int buffer_valid = 0;
+ size_t i, raw_length;
+ char *buffer;
+ char *result;
+
+ if (length > (INT_MAX / 3)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length is too large to safely generate");
+ return FAILURE;
+ }
+
+ raw_length = length * 3 / 4 + 1;
+
+ buffer = (char *) safe_emalloc(raw_length, 1, 1);
+
+#if PHP_WIN32
+ {
+ BYTE *iv_b = (BYTE *) buffer;
+ if (php_win32_get_random_bytes(iv_b, raw_length) == SUCCESS) {
+ buffer_valid = 1;
+ }
+ }
+#else
+ {
+ int fd, n;
+ size_t read_bytes = 0;
+ fd = open("/dev/urandom", O_RDONLY);
+ if (fd >= 0) {
+ while (read_bytes < raw_length) {
+ n = read(fd, buffer + read_bytes, raw_length - read_bytes);
+ if (n < 0) {
+ break;
+ }
+ read_bytes += (size_t) n;
+ }
+ close(fd);
+ }
+ if (read_bytes >= raw_length) {
+ buffer_valid = 1;
+ }
+ }
+#endif
+ if (!buffer_valid) {
+ for (i = 0; i < raw_length; i++) {
+ buffer[i] ^= (char) (255.0 * php_rand(TSRMLS_C) / RAND_MAX);
+ }
+ }
+
+ result = safe_emalloc(length, 1, 1);
+ if (php_password_salt_to64(buffer, raw_length, length, result) == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Generated salt too short");
+ efree(buffer);
+ efree(result);
+ return FAILURE;
+ }
+ memcpy(ret, result, (int) length);
+ efree(result);
+ efree(buffer);
+ ret[length] = 0;
+ return SUCCESS;
+}
+/* }}} */
+
+PHP_FUNCTION(password_get_info)
+{
+ php_password_algo algo;
+ int hash_len;
+ char *hash, *algo_name;
+ zval *options;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hash, &hash_len) == FAILURE) {
+ return;
+ }
+
+ if (hash_len < 0 || (size_t) hash_len < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied password hash too long to safely identify");
+ RETURN_FALSE;
+ }
+
+ ALLOC_INIT_ZVAL(options);
+ array_init(options);
+
+ algo = php_password_determine_algo(hash, (size_t) hash_len);
+ algo_name = php_password_get_algo_name(algo);
+
+ switch (algo) {
+ case PHP_PASSWORD_BCRYPT:
+ {
+ long cost = PHP_PASSWORD_BCRYPT_COST;
+ sscanf(hash, "$2y$%ld$", &cost);
+ add_assoc_long(options, "cost", cost);
+ }
+ break;
+ case PHP_PASSWORD_UNKNOWN:
+ default:
+ break;
+ }
+
+ array_init(return_value);
+
+ add_assoc_long(return_value, "algo", algo);
+ add_assoc_string(return_value, "algoName", algo_name, 1);
+ add_assoc_zval(return_value, "options", options);
+}
+
+PHP_FUNCTION(password_needs_rehash)
+{
+ long new_algo = 0;
+ php_password_algo algo;
+ int hash_len;
+ char *hash;
+ HashTable *options = 0;
+ zval **option_buffer;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|H", &hash, &hash_len, &new_algo, &options) == FAILURE) {
+ return;
+ }
+
+ if (hash_len < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied password hash too long to safely identify");
+ RETURN_FALSE;
+ }
+
+ algo = php_password_determine_algo(hash, (size_t) hash_len);
+
+ if (algo != new_algo) {
+ RETURN_TRUE;
+ }
+
+ switch (algo) {
+ case PHP_PASSWORD_BCRYPT:
+ {
+ long new_cost = PHP_PASSWORD_BCRYPT_COST, cost = 0;
+
+ if (options && zend_symtable_find(options, "cost", sizeof("cost"), (void **) &option_buffer) == SUCCESS) {
+ if (Z_TYPE_PP(option_buffer) != IS_LONG) {
+ zval cast_option_buffer;
+ MAKE_COPY_ZVAL(option_buffer, &cast_option_buffer);
+ convert_to_long(&cast_option_buffer);
+ new_cost = Z_LVAL(cast_option_buffer);
+ zval_dtor(&cast_option_buffer);
+ } else {
+ new_cost = Z_LVAL_PP(option_buffer);
+ }
+ }
+
+ sscanf(hash, "$2y$%ld$", &cost);
+ if (cost != new_cost) {
+ RETURN_TRUE;
+ }
+ }
+ break;
+ case PHP_PASSWORD_UNKNOWN:
+ default:
+ break;
+ }
+ RETURN_FALSE;
+}
+
+/* {{{ proto boolean password_make_salt(string password, string hash)
+Verify a hash created using crypt() or password_hash() */
+PHP_FUNCTION(password_verify)
+{
+ int status = 0, i;
+ int password_len, hash_len;
+ char *ret, *password, *hash;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &password, &password_len, &hash, &hash_len) == FAILURE) {
+ RETURN_FALSE;
+ }
+ if (php_crypt(password, password_len, hash, hash_len, &ret) == FAILURE) {
+ RETURN_FALSE;
+ }
+
+ if (strlen(ret) != hash_len || hash_len < 13) {
+ efree(ret);
+ RETURN_FALSE;
+ }
+
+ /* We're using this method instead of == in order to provide
+ * resistence towards timing attacks. This is a constant time
+ * equality check that will always check every byte of both
+ * values. */
+ for (i = 0; i < hash_len; i++) {
+ status |= (ret[i] ^ hash[i]);
+ }
+
+ efree(ret);
+
+ RETURN_BOOL(status == 0);
+
+}
+/* }}} */
+
+/* {{{ proto string password_hash(string password, int algo, array options = array())
+Hash a password */
+PHP_FUNCTION(password_hash)
+{
+ char *hash_format, *hash, *salt, *password, *result;
+ long algo = 0;
+ int password_len = 0, hash_len;
+ size_t salt_len = 0, required_salt_len = 0, hash_format_len;
+ HashTable *options = 0;
+ zval **option_buffer;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|H", &password, &password_len, &algo, &options) == FAILURE) {
+ return;
+ }
+
+ switch (algo) {
+ case PHP_PASSWORD_BCRYPT:
+ {
+ long cost = PHP_PASSWORD_BCRYPT_COST;
+
+ if (options && zend_symtable_find(options, "cost", 5, (void **) &option_buffer) == SUCCESS) {
+ if (Z_TYPE_PP(option_buffer) != IS_LONG) {
+ zval cast_option_buffer;
+ MAKE_COPY_ZVAL(option_buffer, &cast_option_buffer);
+ convert_to_long(&cast_option_buffer);
+ cost = Z_LVAL(cast_option_buffer);
+ zval_dtor(&cast_option_buffer);
+ } else {
+ cost = Z_LVAL_PP(option_buffer);
+ }
+ }
+
+ if (cost < 4 || cost > 31) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid bcrypt cost parameter specified: %ld", cost);
+ RETURN_NULL();
+ }
+
+ required_salt_len = 22;
+ hash_format = emalloc(8);
+ sprintf(hash_format, "$2y$%02ld$", cost);
+ hash_format_len = 7;
+ }
+ break;
+ case PHP_PASSWORD_UNKNOWN:
+ default:
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown password hashing algorithm: %ld", algo);
+ RETURN_NULL();
+ }
+
+ if (options && zend_symtable_find(options, "salt", 5, (void**) &option_buffer) == SUCCESS) {
+ char *buffer;
+ int buffer_len_int = 0;
+ size_t buffer_len;
+ switch (Z_TYPE_PP(option_buffer)) {
+ case IS_STRING:
+ buffer = estrndup(Z_STRVAL_PP(option_buffer), Z_STRLEN_PP(option_buffer));
+ buffer_len_int = Z_STRLEN_PP(option_buffer);
+ break;
+ case IS_LONG:
+ case IS_DOUBLE:
+ case IS_OBJECT: {
+ zval cast_option_buffer;
+ MAKE_COPY_ZVAL(option_buffer, &cast_option_buffer);
+ convert_to_string(&cast_option_buffer);
+ if (Z_TYPE(cast_option_buffer) == IS_STRING) {
+ buffer = estrndup(Z_STRVAL(cast_option_buffer), Z_STRLEN(cast_option_buffer));
+ buffer_len_int = Z_STRLEN(cast_option_buffer);
+ zval_dtor(&cast_option_buffer);
+ break;
+ }
+ zval_dtor(&cast_option_buffer);
+ }
+ case IS_BOOL:
+ case IS_NULL:
+ case IS_RESOURCE:
+ case IS_ARRAY:
+ default:
+ efree(hash_format);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Non-string salt parameter supplied");
+ RETURN_NULL();
+ }
+ if (buffer_len_int < 0) {
+ efree(hash_format);
+ efree(buffer);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long");
+ }
+ buffer_len = (size_t) buffer_len_int;
+ if (buffer_len < required_salt_len) {
+ efree(hash_format);
+ efree(buffer);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %lu expecting %lu", (unsigned long) buffer_len, (unsigned long) required_salt_len);
+ RETURN_NULL();
+ } else if (0 == php_password_salt_is_alphabet(buffer, buffer_len)) {
+ salt = safe_emalloc(required_salt_len, 1, 1);
+ if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) == FAILURE) {
+ efree(hash_format);
+ efree(buffer);
+ efree(salt);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %lu", (unsigned long) buffer_len);
+ RETURN_NULL();
+ }
+ salt_len = required_salt_len;
+ } else {
+ salt = safe_emalloc(required_salt_len, 1, 1);
+ memcpy(salt, buffer, (int) required_salt_len);
+ salt_len = required_salt_len;
+ }
+ efree(buffer);
+ } else {
+ salt = safe_emalloc(required_salt_len, 1, 1);
+ if (php_password_make_salt(required_salt_len, salt TSRMLS_CC) == FAILURE) {
+ efree(hash_format);
+ efree(salt);
+ RETURN_FALSE;
+ }
+ salt_len = required_salt_len;
+ }
+
+ salt[salt_len] = 0;
+
+ hash = safe_emalloc(salt_len + hash_format_len, 1, 1);
+ sprintf(hash, "%s%s", hash_format, salt);
+ hash[hash_format_len + salt_len] = 0;
+
+ efree(hash_format);
+ efree(salt);
+
+ /* This cast is safe, since both values are defined here in code and cannot overflow */
+ hash_len = (int) (hash_format_len + salt_len);
+
+ if (php_crypt(password, password_len, hash, hash_len, &result) == FAILURE) {
+ efree(hash);
+ RETURN_FALSE;
+ }
+
+ efree(hash);
+
+ if (strlen(result) < 13) {
+ efree(result);
+ RETURN_FALSE;
+ }
+
+ RETURN_STRING(result, 0);
+}
+/* }}} */
+
+#endif /* HAVE_CRYPT */
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h
index 93b232896..7410a8c32 100644
--- a/ext/standard/php_crypt.h
+++ b/ext/standard/php_crypt.h
@@ -23,6 +23,7 @@
#ifndef PHP_CRYPT_H
#define PHP_CRYPT_H
+PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, char **result);
PHP_FUNCTION(crypt);
#if HAVE_CRYPT
PHP_MINIT_FUNCTION(crypt);
diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h
new file mode 100644
index 000000000..079f18770
--- /dev/null
+++ b/ext/standard/php_password.h
@@ -0,0 +1,48 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2012 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Anthony Ferrara <ircmaxell@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#ifndef PHP_PASSWORD_H
+#define PHP_PASSWORD_H
+
+PHP_FUNCTION(password_hash);
+PHP_FUNCTION(password_verify);
+PHP_FUNCTION(password_needs_rehash);
+PHP_FUNCTION(password_get_info);
+
+PHP_MINIT_FUNCTION(password);
+
+#define PHP_PASSWORD_DEFAULT PHP_PASSWORD_BCRYPT
+
+#define PHP_PASSWORD_BCRYPT_COST 10
+
+typedef enum {
+ PHP_PASSWORD_UNKNOWN,
+ PHP_PASSWORD_BCRYPT
+} php_password_algo;
+
+#endif
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h
index 483dbc33b..bccfebe54 100644
--- a/ext/standard/php_standard.h
+++ b/ext/standard/php_standard.h
@@ -58,6 +58,7 @@
#include "php_versioning.h"
#include "php_ftok.h"
#include "php_type.h"
+#include "php_password.h"
#define phpext_standard_ptr basic_functions_module_ptr
PHP_MINIT_FUNCTION(standard_filters);
diff --git a/ext/standard/php_type.h b/ext/standard/php_type.h
index 1927deded..12e916b88 100644
--- a/ext/standard/php_type.h
+++ b/ext/standard/php_type.h
@@ -24,6 +24,7 @@
PHP_FUNCTION(intval);
PHP_FUNCTION(floatval);
PHP_FUNCTION(strval);
+PHP_FUNCTION(boolval);
PHP_FUNCTION(gettype);
PHP_FUNCTION(settype);
PHP_FUNCTION(is_null);
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 9154b3296..7a4ae2e22 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -5375,7 +5375,7 @@ PHP_FUNCTION(substr_compare)
if (!cs) {
RETURN_LONG(zend_binary_strncmp(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
} else {
- RETURN_LONG(zend_binary_strncasecmp(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
+ RETURN_LONG(zend_binary_strncasecmp_l(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
}
}
/* }}} */
diff --git a/ext/standard/tests/array/array_combine.phpt b/ext/standard/tests/array/array_combine.phpt
index 34d4ff85b..34d4ff85b 100755..100644
--- a/ext/standard/tests/array/array_combine.phpt
+++ b/ext/standard/tests/array/array_combine.phpt
diff --git a/ext/standard/tests/array/array_diff_assoc.phpt b/ext/standard/tests/array/array_diff_assoc.phpt
index 29db107d6..29db107d6 100755..100644
--- a/ext/standard/tests/array/array_diff_assoc.phpt
+++ b/ext/standard/tests/array/array_diff_assoc.phpt
diff --git a/ext/standard/tests/array/array_fill_keys.phpt b/ext/standard/tests/array/array_fill_keys.phpt
index b4d51680e..b4d51680e 100755..100644
--- a/ext/standard/tests/array/array_fill_keys.phpt
+++ b/ext/standard/tests/array/array_fill_keys.phpt
diff --git a/ext/standard/tests/array/bug21918.phpt b/ext/standard/tests/array/bug21918.phpt
index 1c9d746fd..1c9d746fd 100755..100644
--- a/ext/standard/tests/array/bug21918.phpt
+++ b/ext/standard/tests/array/bug21918.phpt
diff --git a/ext/standard/tests/array/bug29253.phpt b/ext/standard/tests/array/bug29253.phpt
index 4be983922..4be983922 100755..100644
--- a/ext/standard/tests/array/bug29253.phpt
+++ b/ext/standard/tests/array/bug29253.phpt
diff --git a/ext/standard/tests/array/bug30266.phpt b/ext/standard/tests/array/bug30266.phpt
index 8f7c3d213..8f7c3d213 100755..100644
--- a/ext/standard/tests/array/bug30266.phpt
+++ b/ext/standard/tests/array/bug30266.phpt
diff --git a/ext/standard/tests/array/bug31158.phpt b/ext/standard/tests/array/bug31158.phpt
index e672a10b2..e672a10b2 100755..100644
--- a/ext/standard/tests/array/bug31158.phpt
+++ b/ext/standard/tests/array/bug31158.phpt
diff --git a/ext/standard/tests/array/bug33989.phpt b/ext/standard/tests/array/bug33989.phpt
index ccef172d6..ccef172d6 100755..100644
--- a/ext/standard/tests/array/bug33989.phpt
+++ b/ext/standard/tests/array/bug33989.phpt
diff --git a/ext/standard/tests/array/bug34227.phpt b/ext/standard/tests/array/bug34227.phpt
index 29762b723..29762b723 100755..100644
--- a/ext/standard/tests/array/bug34227.phpt
+++ b/ext/standard/tests/array/bug34227.phpt
diff --git a/ext/standard/tests/array/bug34982.phpt b/ext/standard/tests/array/bug34982.phpt
index 7499667aa..7499667aa 100755..100644
--- a/ext/standard/tests/array/bug34982.phpt
+++ b/ext/standard/tests/array/bug34982.phpt
diff --git a/ext/standard/tests/array/compact.phpt b/ext/standard/tests/array/compact.phpt
index 4b4bfbb73..02df44ebd 100644
--- a/ext/standard/tests/array/compact.phpt
+++ b/ext/standard/tests/array/compact.phpt
@@ -1,8 +1,5 @@
--TEST--
compact()
---INI--
-unicode.script_encoding=UTF-8
-unicode.output_encoding=UTF-8
--FILE--
<?php
diff --git a/ext/standard/tests/array/locale_sort.phpt b/ext/standard/tests/array/locale_sort.phpt
index 1db96042e..c2f66c01d 100644
--- a/ext/standard/tests/array/locale_sort.phpt
+++ b/ext/standard/tests/array/locale_sort.phpt
@@ -9,9 +9,6 @@ if (false == setlocale(LC_CTYPE, "fr_FR.ISO8859-1", "fr_FR")) {
die("skip setlocale() failed\n");
}
?>
---INI--
-unicode.script_encoding=ISO8859-1
-unicode.output_encoding=ISO8859-1
--FILE--
<?php
setlocale(LC_ALL, 'fr_FR.ISO8859-1', 'fr_FR');
diff --git a/ext/standard/tests/array/prev_basic.phpt b/ext/standard/tests/array/prev_basic.phpt
index 8c1450dd3..8c1450dd3 100755..100644
--- a/ext/standard/tests/array/prev_basic.phpt
+++ b/ext/standard/tests/array/prev_basic.phpt
diff --git a/ext/standard/tests/array/prev_error1.phpt b/ext/standard/tests/array/prev_error1.phpt
index bea245196..bea245196 100755..100644
--- a/ext/standard/tests/array/prev_error1.phpt
+++ b/ext/standard/tests/array/prev_error1.phpt
diff --git a/ext/standard/tests/array/prev_error2.phpt b/ext/standard/tests/array/prev_error2.phpt
index f26bdd0a4..f26bdd0a4 100755..100644
--- a/ext/standard/tests/array/prev_error2.phpt
+++ b/ext/standard/tests/array/prev_error2.phpt
diff --git a/ext/standard/tests/array/prev_error3.phpt b/ext/standard/tests/array/prev_error3.phpt
index dfac24eac..dfac24eac 100755..100644
--- a/ext/standard/tests/array/prev_error3.phpt
+++ b/ext/standard/tests/array/prev_error3.phpt
diff --git a/ext/standard/tests/array/prev_variation1.phpt b/ext/standard/tests/array/prev_variation1.phpt
index 5a6253628..5a6253628 100755..100644
--- a/ext/standard/tests/array/prev_variation1.phpt
+++ b/ext/standard/tests/array/prev_variation1.phpt
diff --git a/ext/standard/tests/array/prev_variation2.phpt b/ext/standard/tests/array/prev_variation2.phpt
index 0ce087781..0ce087781 100755..100644
--- a/ext/standard/tests/array/prev_variation2.phpt
+++ b/ext/standard/tests/array/prev_variation2.phpt
diff --git a/ext/standard/tests/array/unexpected_array_mod_bug.phpt b/ext/standard/tests/array/unexpected_array_mod_bug.phpt
index 58f224920..58f224920 100755..100644
--- a/ext/standard/tests/array/unexpected_array_mod_bug.phpt
+++ b/ext/standard/tests/array/unexpected_array_mod_bug.phpt
diff --git a/ext/standard/tests/assert/assert_closures.phpt b/ext/standard/tests/assert/assert_closures.phpt
index e01c11ace..e01c11ace 100755..100644
--- a/ext/standard/tests/assert/assert_closures.phpt
+++ b/ext/standard/tests/assert/assert_closures.phpt
diff --git a/ext/standard/tests/class_object/forward_static_call_001.phpt b/ext/standard/tests/class_object/forward_static_call_001.phpt
index 2b3a8dd05..2b3a8dd05 100755..100644
--- a/ext/standard/tests/class_object/forward_static_call_001.phpt
+++ b/ext/standard/tests/class_object/forward_static_call_001.phpt
diff --git a/ext/standard/tests/class_object/forward_static_call_002.phpt b/ext/standard/tests/class_object/forward_static_call_002.phpt
index 58c4efd0c..58c4efd0c 100755..100644
--- a/ext/standard/tests/class_object/forward_static_call_002.phpt
+++ b/ext/standard/tests/class_object/forward_static_call_002.phpt
diff --git a/ext/standard/tests/class_object/forward_static_call_003.phpt b/ext/standard/tests/class_object/forward_static_call_003.phpt
index 2ea102e5d..2ea102e5d 100755..100644
--- a/ext/standard/tests/class_object/forward_static_call_003.phpt
+++ b/ext/standard/tests/class_object/forward_static_call_003.phpt
diff --git a/ext/standard/tests/dir/dir_variation1-win32.phpt b/ext/standard/tests/dir/dir_variation1-win32.phpt
deleted file mode 100644
index 1f7f4a2cf..000000000
--- a/ext/standard/tests/dir/dir_variation1-win32.phpt
+++ /dev/null
@@ -1,170 +0,0 @@
---TEST--
-Test dir() function : usage variations - unexpected value for 'dir' argument
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/*
- * Prototype : object dir(string $directory[, resource $context])
- * Description: Directory class with properties, handle and class and methods read, rewind and close
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Passing non string values to 'directory' argument of dir() and see
- * that the function outputs proper warning messages wherever expected.
- */
-
-echo "*** Testing dir() : unexpected values for \$directory argument ***\n";
-
-// get an unset variable
-$unset_var = 10;
-unset($unset_var);
-
-class A
-{
- public $var;
- public function init() {
- $this->var = 10;
- }
-}
-
-// get a resource variable
-$fp = fopen(__FILE__, "r"); // get a file handle
-$dfp = opendir( dirname(__FILE__) ); // get a dir handle
-
-// unexpected values to be passed to $directory argument
-$unexpected_values = array (
-
- // array data
-/*1*/ array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
-/*6*/ NULL,
- null,
-
- // boolean data
-/*8*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*12*/ "",
- '',
-
- // undefined data
-/*14*/ @$undefined_var,
-
- // unset data
-/*15*/ @$unset_var,
-
- // resource variable(dir and file handle)
-/*16*/ $fp,
- $dfp,
-
- // object data
-/*18*/ new A()
-);
-
-// loop through various elements of $unexpected_values to check the behavior of dir()
-$iterator = 1;
-foreach( $unexpected_values as $unexpected_value ) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( dir($unexpected_value) );
- $iterator++;
-}
-
-fclose($fp);
-closedir($dfp);
-echo "Done";
-?>
---EXPECTF--
-*** Testing dir() : unexpected values for $directory argument ***
-
--- Iteration 1 --
-
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-
-Warning: dir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: dir(1): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-
-Warning: dir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: dir(1): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-
-Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: dir() expects parameter 1 to be string, object given in %s on line %d
-NULL
-Done \ No newline at end of file
diff --git a/ext/standard/tests/dir/dir_variation5-win32.phpt b/ext/standard/tests/dir/dir_variation5-win32.phpt
deleted file mode 100644
index e70b9d353..000000000
--- a/ext/standard/tests/dir/dir_variation5-win32.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-Test dir() function : usage variations - open a file instead of directory
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/*
- * Prototype : object dir(string $directory[, resource $context])
- * Description: Directory class with properties, handle and class and methods read, rewind and close
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Passing a file as argument to dir() function instead of a directory
- * and checking if proper warning message is generated.
- */
-
-echo "*** Testing dir() : open a file instead of a directory ***\n";
-
-// open the file instead of directory
-$d = dir(__FILE__);
-var_dump( $d );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing dir() : open a file instead of a directory ***
-
-Warning: dir(%s): The directory name is invalid. (code: %d) in %s on line %d
-
-Warning: dir(%s): failed to open dir: %s in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/dir/dir_variation6-win32.phpt b/ext/standard/tests/dir/dir_variation6-win32.phpt
deleted file mode 100644
index e0e474980..000000000
--- a/ext/standard/tests/dir/dir_variation6-win32.phpt
+++ /dev/null
@@ -1,61 +0,0 @@
---TEST--
-Test dir() function : usage variations - non-existent directory
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/*
- * Prototype : object dir(string $directory[, resource $context])
- * Description: Directory class with properties, handle and class and methods read, rewind and close
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Passing a non-existent directory as argument to dir() function
- * and checking to see if proper warning message is output.
- */
-echo "*** Testing dir() : open a non-existent directory ***\n";
-
-// create the temporary directory
-$file_path = dirname(__FILE__);
-$dir_path = $file_path."/dir_variation6";
-@mkdir($dir_path);
-
-// open existent directory
-$d = dir($dir_path);
-$d->close(); //close the dir
-
-// remove directory and try to open the same(non-existent) directory again
-rmdir($dir_path);
-clearstatcache();
-
-echo "-- opening previously removed directory --\n";
-var_dump( dir($dir_path) );
-
-// point to a non-existent directory
-$non_existent_dir = $file_path."/non_existent_dir";
-echo "-- opening non-existent directory --\n";
-$d = dir($non_existent_dir);
-var_dump( $d );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing dir() : open a non-existent directory ***
--- opening previously removed directory --
-
-Warning: dir(%s): The system cannot find the file specified. (code: %d) in %s on line %d
-
-Warning: dir(%s): failed to open dir: %s in %s on line %d
-bool(false)
--- opening non-existent directory --
-
-Warning: dir(%s): The system cannot find the file specified. (code: %d) in %s on line %d
-
-Warning: dir(%s): failed to open dir: %s in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/dir/dir_variation8-win32.phpt b/ext/standard/tests/dir/dir_variation8-win32.phpt
deleted file mode 100644
index a56c98b88..000000000
--- a/ext/standard/tests/dir/dir_variation8-win32.phpt
+++ /dev/null
@@ -1,68 +0,0 @@
---TEST--
-Test dir() function : usage variations - checking with wildcard characters
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/*
- * Prototype : object dir(string $directory[, resource $context])
- * Description: Directory class with properties, handle and class and methods read, rewind and close
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Create more than one temporary directory & subdirectory and check if dir() function can open
- * those directories when wildcard characters are used to refer to them.
- */
-
-echo "*** Testing dir() : checking with wildcard characters ***\n";
-
-// create the temporary directories
-$file_path = dirname(__FILE__);
-$dir_path = $file_path."/dir_variation81";
-$sub_dir_path = $dir_path."/sub_dir1";
-
-@mkdir($dir_path1);
-@mkdir($sub_dir_path);
-
-/* with different wildcard characters */
-
-echo "-- wildcard = '*' --\n";
-var_dump( dir($file_path."/dir_var*") );
-var_dump( dir($file_path."/*") );
-
-echo "-- wildcard = '?' --\n";
-var_dump( dir($dir_path."/sub_dir?") );
-var_dump( dir($dir_path."/sub?dir1") );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing dir() : checking with wildcard characters ***
--- wildcard = '*' --
-
-Warning: dir(%s/dir_var*,%s/dir_var*): %r(No such file or directory|The system cannot find the path specified. \(code: 3\))%r in %s on line %d
-
-Warning: dir(%s/dir_var*): failed to open dir: %s in %s on line %d
-bool(false)
-
-Warning: dir(%s/*,%s/*): %r(No such file or directory|The system cannot find the path specified. \(code: 3\))%r in %s on line %d
-
-Warning: dir(%s/*): failed to open dir: %s in %s on line %d
-bool(false)
--- wildcard = '?' --
-
-Warning: dir(%s/dir_variation81/sub_dir?,%s/dir_variation81/sub_dir?): %r(No such file or directory|The system cannot find the path specified. \(code: 3\))%r in %s on line %d
-
-Warning: dir(%s/dir_variation81/sub_dir?): failed to open dir: %s in %s on line %d
-bool(false)
-
-Warning: dir(%s/dir_variation81/sub?dir1,%s/dir_variation81/sub?dir1): %r(No such file or directory|The system cannot find the path specified. \(code: 3\))%r in %s on line %d
-
-Warning: dir(%s/dir_variation81/sub?dir1): failed to open dir: %s in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/dir/dir_variation9-win32.phpt b/ext/standard/tests/dir/dir_variation9-win32.phpt
deleted file mode 100644
index 32b0bd946..000000000
--- a/ext/standard/tests/dir/dir_variation9-win32.phpt
+++ /dev/null
@@ -1,125 +0,0 @@
---TEST--
-Test dir() function : usage variations - relative valid and invalid paths
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/*
- * Prototype : object dir(string $directory[, resource $context])
- * Description: Directory class with properties, handle and class and methods read, rewind and close
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Checking the behavior of dir() function by passing directories which
- * have valid and invalid relative path.
- */
-
-echo "*** Testing dir() : checking with valid and invalid paths ***\n";
-
-/* create the temporary directories */
-
-$file_path = dirname(__FILE__);
-
-// directory dir_variation91 with one sub-directory sub_dir11 and sub-sub-directory sub_dir111
-$dir_path1 = $file_path."/dir_variation91";
-$sub_dir11 = $dir_path1."/sub_dir11";
-$sub_dir111 = $sub_dir11."/sub_dir111";
-
-// directory dir_variation92 with one sub-directory sub_dir21
-$dir_path2 = $file_path."/dir_variation92";
-$sub_dir21 = $dir_path2."/sub_dir21";
-
-@mkdir($dir_path1);
-@mkdir($dir_path2);
-@mkdir($sub_dir11);
-@mkdir($sub_dir111);
-@mkdir($sub_dir21);
-
-// open the directory with valid paths
-echo "\n-- With valid paths --\n";
-var_dump( dir("$dir_path1/sub_dir11/sub_dir111/..") );
-var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91") );
-var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91/sub_dir11/..") );
-var_dump( dir("$dir_path1/sub_dir11/sub_dir111/../../../dir_variation92/sub_dir21/..") );
-
-// open the directory with invalid path
-echo "\n-- With invalid paths --\n";
-var_dump( dir("$dir_path1/sub_dir12/sub_dir111/..") );
-var_dump( dir("$dir_path2/sub_dir21/../dir_variation91") );
-var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91/sub_dir12/..") );
-var_dump( dir("$dir_path1/sub_dir11/sub_dir111/../../dir_variation92/sub_dir21/..") );
-
-echo "Done";
-?>
---CLEAN--
-<?php
-$file_path = dirname(__FILE__);
-
-$dir_path1 = $file_path."/dir_variation91";
-$sub_dir11 = $dir_path1."/sub_dir11";
-$sub_dir111 = $sub_dir11."/sub_dir111";
-$dir_path2 = $file_path."/dir_variation92";
-$sub_dir21 = $dir_path2."/sub_dir21";
-
-rmdir($sub_dir21);
-rmdir($sub_dir111);
-rmdir($sub_dir11);
-rmdir($dir_path1);
-rmdir($dir_path2);
-?>
---EXPECTF--
-*** Testing dir() : checking with valid and invalid paths ***
-
--- With valid paths --
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/dir_variation91/sub_dir11/sub_dir111/.."
- ["handle"]=>
- resource(%d) of type (stream)
-}
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/dir_variation92/sub_dir21/../../dir_variation91"
- ["handle"]=>
- resource(%d) of type (stream)
-}
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/dir_variation92/sub_dir21/../../dir_variation91/sub_dir11/.."
- ["handle"]=>
- resource(%d) of type (stream)
-}
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/dir_variation91/sub_dir11/sub_dir111/../../../dir_variation92/sub_dir21/.."
- ["handle"]=>
- resource(%d) of type (stream)
-}
-
--- With invalid paths --
-
-Warning: dir(%sdir_variation91/sub_dir12/sub_dir111/..,%sdir_variation91/sub_dir12/sub_dir111/..): The system cannot find the path specified. (code: 3) in %sdir_variation9-win32.php on line %d
-
-Warning: dir(%s/dir_variation91/sub_dir12/sub_dir111/..): failed to open dir: %s in %s on line %d
-bool(false)
-
-Warning: dir(%sdir_variation92/sub_dir21/../dir_variation91,%sdir_variation92/sub_dir21/../dir_variation91): The system cannot find the file specified. (code: 2) in %sdir_variation9-win32.php on line %d
-
-Warning: dir(%s/dir_variation92/sub_dir21/../dir_variation91): failed to open dir: %s in %s on line %d
-bool(false)
-
-Warning: dir(%sdir_variation92/sub_dir21/../../dir_variation91/sub_dir12/..,%sdir_variation92/sub_dir21/../../dir_variation91/sub_dir12/..): The system cannot find the file specified. (code: 2) in %sdir_variation9-win32.php on line %d
-
-Warning: dir(%s/dir_variation92/sub_dir21/../../dir_variation91/sub_dir12/..): failed to open dir: %s in %s on line %d
-bool(false)
-
-Warning: dir(%sdir_variation91/sub_dir11/sub_dir111/../../dir_variation92/sub_dir21/..,%sdir_variation91/sub_dir11/sub_dir111/../../dir_variation92/sub_dir21/..): The system cannot find the path specified. (code: 3) in %sdir_variation9-win32.php on line %d
-
-Warning: dir(%s/dir_variation91/sub_dir11/sub_dir111/../../dir_variation92/sub_dir21/..): failed to open dir: %s in %s on line %d
-bool(false)
-Done
diff --git a/ext/standard/tests/dir/opendir_error2-win32.phpt b/ext/standard/tests/dir/opendir_error2-win32.phpt
deleted file mode 100644
index c3ecd3534..000000000
--- a/ext/standard/tests/dir/opendir_error2-win32.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-Test opendir() function : error conditions - Non-existent directory
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : mixed opendir(string $path[, resource $context])
- * Description: Open a directory and return a dir_handle
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass a non-existent directory as $path argument to opendir() to test behaviour
- */
-
-echo "*** Testing opendir() : error conditions ***\n";
-
-echo "\n-- Pass a non-existent absolute path: --\n";
-$path = dirname(__FILE__) . "/idonotexist";
-var_dump(opendir($path));
-
-echo "\n-- Pass a non-existent relative path: --\n";
-chdir(dirname(__FILE__));
-var_dump(opendir('idonotexist'));
-?>
-===DONE===
---EXPECTF--
-*** Testing opendir() : error conditions ***
-
--- Pass a non-existent absolute path: --
-
-Warning: opendir(%s/idonotexist,%s/idonotexist): The system cannot find the file specified. (code: %d) in %s on line %d
-
-Warning: opendir(%s/idonotexist): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Pass a non-existent relative path: --
-
-Warning: opendir(idonotexist,idonotexist): The system cannot find the file specified. (code: %d) in %s on line %d
-
-Warning: opendir(idonotexist): failed to open dir: %s in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/opendir_variation1-win32.phpt b/ext/standard/tests/dir/opendir_variation1-win32.phpt
deleted file mode 100644
index 9a75a5b6a..000000000
--- a/ext/standard/tests/dir/opendir_variation1-win32.phpt
+++ /dev/null
@@ -1,248 +0,0 @@
---TEST--
-Test opendir() function : usage variations - different data types as $path arg
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : mixed opendir(string $path[, resource $context])
- * Description: Open a directory and return a dir_handle
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass different data types as $path argument to opendir() to test behaviour
- * Where possible, an existing directory has been entered as a string value
- */
-
-echo "*** Testing opendir() : usage variations ***\n";
-
-// create directory to be passed as string value where possible
-$path = dirname(__FILE__) . "/opendir_variation1";
-mkdir($path);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA {
-
- var $path;
- function __construct($path) {
- $this->path = $path;
- }
- public function __toString() {
- return $this->path;
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-$path
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $path argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
- array(),
-
- // string data
-/*19*/ "$path",
- 'string',
- $heredoc,
-
- // object data
-/*22*/ new classA($path),
-
- // undefined data
-/*23*/ @$undefined_var,
-
- // unset data
-/*24*/ @$unset_var,
-
- // resource variable
-/*25*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of opendir()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( $dh = opendir($input) );
- if ($dh) {
- closedir($dh);
- }
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---CLEAN--
-<?php
-$path = dirname(__FILE__) . "/opendir_variation1";
-rmdir($path);
-?>
---EXPECTF--
-*** Testing opendir() : usage variations ***
-
--- Iteration 1 --
-
-Warning: opendir(0,0): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(0): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: opendir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(1): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: opendir(12345,12345): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(12345): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: opendir(-2345,-2345): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(-2345): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: opendir(10.5,10.5): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(10.5): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: opendir(-10.5,-10.5): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(-10.5): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: opendir(123456789000,123456789000): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(123456789000): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: opendir(1.23456789E-9,1.23456789E-9): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(1.23456789E-9): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: opendir(0.5,0.5): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(0.5): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-
-Warning: opendir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(1): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-
-Warning: opendir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(1): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-
-Warning: opendir() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-resource(%d) of type (stream)
-
--- Iteration 20 --
-
-Warning: opendir(string,string): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: opendir(string): failed to open dir: %s in %s on line %d
-bool(false)
-
--- Iteration 21 --
-resource(%d) of type (stream)
-
--- Iteration 22 --
-resource(%d) of type (stream)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-bool(false)
-
--- Iteration 25 --
-
-Warning: opendir() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_error2-win32.phpt b/ext/standard/tests/dir/scandir_error2-win32.phpt
deleted file mode 100644
index 9920be747..000000000
--- a/ext/standard/tests/dir/scandir_error2-win32.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-Test scandir() function : error conditions - Non-existent directory
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
- * Description: List files & directories inside the specified path
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass a directory that does not exist to scandir() to test error messages
- */
-
-echo "*** Testing scandir() : error conditions ***\n";
-
-$directory = dirname(__FILE__) . '/idonotexist';
-
-echo "\n-- Pass scandir() an absolute path that does not exist --\n";
-var_dump(scandir($directory));
-
-echo "\n-- Pass scandir() a relative path that does not exist --\n";
-var_dump(scandir('/idonotexist'));
-?>
-===DONE===
---EXPECTF--
-*** Testing scandir() : error conditions ***
-
--- Pass scandir() an absolute path that does not exist --
-
-Warning: scandir(%s/idonotexist,%s/idonotexist): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(%s/idonotexist): failed to open dir: %s in %s on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Pass scandir() a relative path that does not exist --
-
-Warning: scandir(/idonotexist,/idonotexist): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(/idonotexist): failed to open dir: %s in %s on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation1-win32.phpt b/ext/standard/tests/dir/scandir_variation1-win32.phpt
deleted file mode 100644
index a2b5bd467..000000000
--- a/ext/standard/tests/dir/scandir_variation1-win32.phpt
+++ /dev/null
@@ -1,289 +0,0 @@
---TEST--
-Test scandir() function : usage variations - different data types as $dir arg
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
- * Description: List files & directories inside the specified path
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass different data types as $dir argument to test behaviour of scandir()
- */
-
-echo "*** Testing scandir() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $dir argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
- array(),
-
- // string data
-/*19*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*22*/ new classA(),
-
- // undefined data
-/*23*/ @$undefined_var,
-
- // unset data
-/*24*/ @$unset_var,
-
- // resource variable
-/*25*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of scandir()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( scandir($input) );
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing scandir() : usage variations ***
-
--- Iteration 1 --
-
-Warning: scandir(0,0): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(0): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: scandir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(1): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: scandir(12345,12345): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(12345): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: scandir(-2345,-2345): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(-2345): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: scandir(10.5,10.5): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(10.5): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: scandir(-10.5,-10.5): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(-10.5): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: scandir(123456789000,123456789000): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(123456789000): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: scandir(1.23456789E-9,1.23456789E-9): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(1.23456789E-9): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: scandir(0.5,0.5): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(0.5): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: scandir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(1): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: scandir(1,1): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(1): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: scandir() expects parameter 1 to be a valid path, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: scandir(string,string): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(string): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: scandir(string,string): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(string): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: scandir(hello world,hello world): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(hello world): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Warning: scandir(Class A object,Class A object): The system cannot find the file specified. (code: 2) in %s on line %d
-
-Warning: scandir(Class A object): failed to open dir: No such file or directory in %sscandir_variation1-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-
--- Iteration 25 --
-
-Warning: scandir() expects parameter 1 to be a valid path, resource given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/standard/tests/dir/scandir_variation6-win32.phpt b/ext/standard/tests/dir/scandir_variation6-win32.phpt
deleted file mode 100644
index 040dc787c..000000000
--- a/ext/standard/tests/dir/scandir_variation6-win32.phpt
+++ /dev/null
@@ -1,84 +0,0 @@
---TEST--
-Test scandir() function : usage variations - Wildcards in directory path
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
-?>
---FILE--
-<?php
-/* Prototype : array scandir(string $dir [, int $sorting_order [, resource $context]])
- * Description: List files & directories inside the specified path
- * Source code: ext/standard/dir.c
- */
-
-/*
- * Pass a directory path using wildcards as $dir argument to test how scandir() behaves
- */
-
-echo "*** Testing scandir() : usage variations ***\n";
-
-// create the temporary directories
-$file_path = dirname(__FILE__);
-$dir_path = $file_path . "/scandir_variation6";
-$sub_dir_path = $dir_path . "/sub_dir1";
-
-mkdir($dir_path);
-mkdir($sub_dir_path);
-
-// with different wildcard characters
-
-echo "\n-- Wildcard = '*' --\n";
-var_dump( scandir($file_path . "/scandir_var*") );
-var_dump( scandir($file_path . "/*") );
-
-echo "\n-- Wildcard = '?' --\n";
-var_dump( scandir($dir_path . "/sub_dir?") );
-var_dump( scandir($dir_path . "/sub?dir1") );
-
-?>
-===DONE===
---CLEAN--
-<?php
-$dir_path = dirname(__FILE__) . "/scandir_variation6";
-$sub_dir_path = $dir_path . "/sub_dir1";
-
-rmdir($sub_dir_path);
-rmdir($dir_path);
-?>
---EXPECTF--
-*** Testing scandir() : usage variations ***
-
--- Wildcard = '*' --
-
-Warning: scandir(%s/scandir_var*,%s/scandir_var*): No such file or directory in %s on line %d
-
-Warning: scandir(%s/scandir_var*): failed to open dir: No such file or directory in %sscandir_variation6-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
-Warning: scandir(%s/*,%s/*): No such file or directory in %s on line %d
-
-Warning: scandir(%s/*): failed to open dir: No such file or directory in %sscandir_variation6-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
--- Wildcard = '?' --
-
-Warning: scandir(%s/scandir_variation6/sub_dir?,%s/scandir_variation6/sub_dir?): No such file or directory in %s on line %d
-
-Warning: scandir(%s/scandir_variation6/sub_dir?): failed to open dir: No such file or directory in %sscandir_variation6-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-
-Warning: scandir(%s/scandir_variation6/sub?dir1,%s/scandir_variation6/sub?dir1): No such file or directory in %s on line %d
-
-Warning: scandir(%s/scandir_variation6/sub?dir1): failed to open dir: No such file or directory in %sscandir_variation6-win32.php on line %d
-
-Warning: scandir(): (errno %d): %s in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt
index 9538c8ede..fcd85489f 100644
--- a/ext/standard/tests/file/bug22414.phpt
+++ b/ext/standard/tests/file/bug22414.phpt
@@ -7,7 +7,7 @@ output_handler=
$php = getenv('TEST_PHP_EXECUTABLE');
$tmpfile = tempnam(__DIR__, 'phpt');
- $args = ' -n ';
+ $args = ' -n -dsafe_mode=off ';
/* Regular Data Test */
passthru($php . $args . ' -r " echo \"HELLO\"; "');
diff --git a/ext/standard/tests/file/bug39367.phpt b/ext/standard/tests/file/bug39367.phpt
index f3e79fcf5..f3e79fcf5 100755..100644
--- a/ext/standard/tests/file/bug39367.phpt
+++ b/ext/standard/tests/file/bug39367.phpt
diff --git a/ext/standard/tests/file/bug43216.phpt b/ext/standard/tests/file/bug43216.phpt
index b7e42534c..b7e42534c 100755..100644
--- a/ext/standard/tests/file/bug43216.phpt
+++ b/ext/standard/tests/file/bug43216.phpt
diff --git a/ext/standard/tests/file/bug43248.phpt b/ext/standard/tests/file/bug43248.phpt
index 109643583..109643583 100755..100644
--- a/ext/standard/tests/file/bug43248.phpt
+++ b/ext/standard/tests/file/bug43248.phpt
diff --git a/ext/standard/tests/file/fflush_basic.phpt b/ext/standard/tests/file/fflush_basic.phpt
index f375c4f07..f375c4f07 100755..100644
--- a/ext/standard/tests/file/fflush_basic.phpt
+++ b/ext/standard/tests/file/fflush_basic.phpt
diff --git a/ext/standard/tests/file/fflush_variation1.phpt b/ext/standard/tests/file/fflush_variation1.phpt
index 2ecf7ea91..2ecf7ea91 100755..100644
--- a/ext/standard/tests/file/fflush_variation1.phpt
+++ b/ext/standard/tests/file/fflush_variation1.phpt
diff --git a/ext/standard/tests/file/fflush_variation2.phpt b/ext/standard/tests/file/fflush_variation2.phpt
index 651c71643..651c71643 100755..100644
--- a/ext/standard/tests/file/fflush_variation2.phpt
+++ b/ext/standard/tests/file/fflush_variation2.phpt
diff --git a/ext/standard/tests/file/fflush_variation3.phpt b/ext/standard/tests/file/fflush_variation3.phpt
index 6dfd49bc4..6dfd49bc4 100755..100644
--- a/ext/standard/tests/file/fflush_variation3.phpt
+++ b/ext/standard/tests/file/fflush_variation3.phpt
diff --git a/ext/standard/tests/file/fflush_variation4.phpt b/ext/standard/tests/file/fflush_variation4.phpt
index f98616c3d..f98616c3d 100755..100644
--- a/ext/standard/tests/file/fflush_variation4.phpt
+++ b/ext/standard/tests/file/fflush_variation4.phpt
diff --git a/ext/standard/tests/file/fputcsv.phpt b/ext/standard/tests/file/fputcsv.phpt
index 63c41509b..63c41509b 100755..100644
--- a/ext/standard/tests/file/fputcsv.phpt
+++ b/ext/standard/tests/file/fputcsv.phpt
diff --git a/ext/standard/tests/file/glob_basic.phpt b/ext/standard/tests/file/glob_basic.phpt
index fc269c442..fc269c442 100755..100644
--- a/ext/standard/tests/file/glob_basic.phpt
+++ b/ext/standard/tests/file/glob_basic.phpt
diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt
index 00fd6ff3e..00fd6ff3e 100755..100644
--- a/ext/standard/tests/file/glob_variation.phpt
+++ b/ext/standard/tests/file/glob_variation.phpt
diff --git a/ext/standard/tests/file/include_userstream_001.phpt b/ext/standard/tests/file/include_userstream_001.phpt
index d805afd20..d805afd20 100755..100644
--- a/ext/standard/tests/file/include_userstream_001.phpt
+++ b/ext/standard/tests/file/include_userstream_001.phpt
diff --git a/ext/standard/tests/file/include_userstream_002.phpt b/ext/standard/tests/file/include_userstream_002.phpt
index 4841d39c5..4841d39c5 100755..100644
--- a/ext/standard/tests/file/include_userstream_002.phpt
+++ b/ext/standard/tests/file/include_userstream_002.phpt
diff --git a/ext/standard/tests/file/lstat_stat_variation1.phpt b/ext/standard/tests/file/lstat_stat_variation1.phpt
index 30ce9b721..30ce9b721 100755..100644
--- a/ext/standard/tests/file/lstat_stat_variation1.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation1.phpt
diff --git a/ext/standard/tests/file/lstat_stat_variation2.phpt b/ext/standard/tests/file/lstat_stat_variation2.phpt
index e7d704a20..e7d704a20 100755..100644
--- a/ext/standard/tests/file/lstat_stat_variation2.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation2.phpt
diff --git a/ext/standard/tests/file/lstat_stat_variation3.phpt b/ext/standard/tests/file/lstat_stat_variation3.phpt
index e7bae3abb..e7bae3abb 100755..100644
--- a/ext/standard/tests/file/lstat_stat_variation3.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation3.phpt
diff --git a/ext/standard/tests/file/lstat_stat_variation4.phpt b/ext/standard/tests/file/lstat_stat_variation4.phpt
index 259beca00..259beca00 100755..100644
--- a/ext/standard/tests/file/lstat_stat_variation4.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation4.phpt
diff --git a/ext/standard/tests/file/lstat_stat_variation5.phpt b/ext/standard/tests/file/lstat_stat_variation5.phpt
index d0c096ef1..d0c096ef1 100755..100644
--- a/ext/standard/tests/file/lstat_stat_variation5.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation5.phpt
diff --git a/ext/standard/tests/file/lstat_stat_variation6.phpt b/ext/standard/tests/file/lstat_stat_variation6.phpt
index 7e557d034..7e557d034 100755..100644
--- a/ext/standard/tests/file/lstat_stat_variation6.phpt
+++ b/ext/standard/tests/file/lstat_stat_variation6.phpt
diff --git a/ext/standard/tests/file/realpath_basic4.phpt b/ext/standard/tests/file/realpath_basic4.phpt
index d782b6d61..d782b6d61 100755..100644
--- a/ext/standard/tests/file/realpath_basic4.phpt
+++ b/ext/standard/tests/file/realpath_basic4.phpt
diff --git a/ext/standard/tests/file/rename_basic.phpt b/ext/standard/tests/file/rename_basic.phpt
index c589c514e..c589c514e 100755..100644
--- a/ext/standard/tests/file/rename_basic.phpt
+++ b/ext/standard/tests/file/rename_basic.phpt
diff --git a/ext/standard/tests/file/rename_error.phpt b/ext/standard/tests/file/rename_error.phpt
index fae2b4f37..fae2b4f37 100755..100644
--- a/ext/standard/tests/file/rename_error.phpt
+++ b/ext/standard/tests/file/rename_error.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_001.phpt b/ext/standard/tests/file/stream_rfc2397_001.phpt
index 040dc26f5..040dc26f5 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_001.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_001.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_002.phpt b/ext/standard/tests/file/stream_rfc2397_002.phpt
index 980863bb5..980863bb5 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_002.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_002.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_003.phpt b/ext/standard/tests/file/stream_rfc2397_003.phpt
index 7cc31fe59..7cc31fe59 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_003.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_003.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_004.phpt b/ext/standard/tests/file/stream_rfc2397_004.phpt
index 1a8da936b..1a8da936b 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_004.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_004.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_005.phpt b/ext/standard/tests/file/stream_rfc2397_005.phpt
index 8fa1c16b0..8fa1c16b0 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_005.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_005.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt
index e6694a286..e6694a286 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_006.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_006.phpt
diff --git a/ext/standard/tests/file/stream_rfc2397_007.phpt b/ext/standard/tests/file/stream_rfc2397_007.phpt
index 8a6f3155d..8a6f3155d 100755..100644
--- a/ext/standard/tests/file/stream_rfc2397_007.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_007.phpt
diff --git a/ext/standard/tests/file/umask_variation1.phpt b/ext/standard/tests/file/umask_variation1.phpt
index 29fe92e55..29fe92e55 100755..100644
--- a/ext/standard/tests/file/umask_variation1.phpt
+++ b/ext/standard/tests/file/umask_variation1.phpt
diff --git a/ext/standard/tests/file/umask_variation2.phpt b/ext/standard/tests/file/umask_variation2.phpt
index 85b1a67f5..85b1a67f5 100755..100644
--- a/ext/standard/tests/file/umask_variation2.phpt
+++ b/ext/standard/tests/file/umask_variation2.phpt
diff --git a/ext/standard/tests/general_functions/boolval.phpt b/ext/standard/tests/general_functions/boolval.phpt
new file mode 100644
index 000000000..9d0eac4eb
--- /dev/null
+++ b/ext/standard/tests/general_functions/boolval.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Testing boolval()
+--FILE--
+<?php
+ var_dump(boolval(false));
+ var_dump(boolval(NULL));
+ var_dump(boolval(""));
+ var_dump(boolval(0));
+ var_dump(boolval(array()));
+
+ var_dump(boolval(true));
+ var_dump(boolval("abc"));
+ var_dump(boolval(0.5));
+ var_dump(boolval(100));
+ var_dump(boolval(new stdClass()));
+ var_dump(boolval(STDIN));
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/standard/tests/general_functions/bug25038.phpt b/ext/standard/tests/general_functions/bug25038.phpt
index 52fe03205..52fe03205 100755..100644
--- a/ext/standard/tests/general_functions/bug25038.phpt
+++ b/ext/standard/tests/general_functions/bug25038.phpt
diff --git a/ext/standard/tests/general_functions/bug35229.phpt b/ext/standard/tests/general_functions/bug35229.phpt
index c3c273dfe..c3c273dfe 100755..100644
--- a/ext/standard/tests/general_functions/bug35229.phpt
+++ b/ext/standard/tests/general_functions/bug35229.phpt
diff --git a/ext/standard/tests/general_functions/bug36011.phpt b/ext/standard/tests/general_functions/bug36011.phpt
index 08a45014f..08a45014f 100755..100644
--- a/ext/standard/tests/general_functions/bug36011.phpt
+++ b/ext/standard/tests/general_functions/bug36011.phpt
diff --git a/ext/standard/tests/general_functions/bug40398.phpt b/ext/standard/tests/general_functions/bug40398.phpt
index 11fdde2c5..11fdde2c5 100755..100644
--- a/ext/standard/tests/general_functions/bug40398.phpt
+++ b/ext/standard/tests/general_functions/bug40398.phpt
diff --git a/ext/standard/tests/general_functions/bug44461.phpt b/ext/standard/tests/general_functions/bug44461.phpt
index 6fa73ee27..6fa73ee27 100755..100644
--- a/ext/standard/tests/general_functions/bug44461.phpt
+++ b/ext/standard/tests/general_functions/bug44461.phpt
diff --git a/ext/standard/tests/general_functions/call_user_func_return.phpt b/ext/standard/tests/general_functions/call_user_func_return.phpt
index 929fdd7e3..929fdd7e3 100755..100644
--- a/ext/standard/tests/general_functions/call_user_func_return.phpt
+++ b/ext/standard/tests/general_functions/call_user_func_return.phpt
diff --git a/ext/standard/tests/general_functions/closures_001.phpt b/ext/standard/tests/general_functions/closures_001.phpt
index b4fc898fd..b4fc898fd 100755..100644
--- a/ext/standard/tests/general_functions/closures_001.phpt
+++ b/ext/standard/tests/general_functions/closures_001.phpt
diff --git a/ext/standard/tests/general_functions/closures_002.phpt b/ext/standard/tests/general_functions/closures_002.phpt
index 6df389bbb..6df389bbb 100755..100644
--- a/ext/standard/tests/general_functions/closures_002.phpt
+++ b/ext/standard/tests/general_functions/closures_002.phpt
diff --git a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
index e242d45dc..e242d45dc 100755..100644
--- a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
+++ b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_basic.phpt b/ext/standard/tests/general_functions/getservbyname_basic.phpt
index adaa7afb4..adaa7afb4 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_basic.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_basic.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_error.phpt b/ext/standard/tests/general_functions/getservbyname_error.phpt
index eaeec6488..eaeec6488 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_error.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_error.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation1.phpt b/ext/standard/tests/general_functions/getservbyname_variation1.phpt
index 7dd01aab3..7dd01aab3 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation1.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation1.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation10.phpt b/ext/standard/tests/general_functions/getservbyname_variation10.phpt
index c7ed144f1..c7ed144f1 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation10.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation10.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation11.phpt b/ext/standard/tests/general_functions/getservbyname_variation11.phpt
index 3c410c55b..3c410c55b 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation11.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation11.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation12.phpt b/ext/standard/tests/general_functions/getservbyname_variation12.phpt
index 7e5323cca..7e5323cca 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation12.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation12.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation13.phpt b/ext/standard/tests/general_functions/getservbyname_variation13.phpt
index 8dad8cda5..8dad8cda5 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation13.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation13.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation14.phpt b/ext/standard/tests/general_functions/getservbyname_variation14.phpt
index d93b53ece..d93b53ece 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation14.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation14.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation2.phpt b/ext/standard/tests/general_functions/getservbyname_variation2.phpt
index 877c1d12a..877c1d12a 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation2.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation2.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation3.phpt b/ext/standard/tests/general_functions/getservbyname_variation3.phpt
index d34259d2a..d34259d2a 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation3.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation3.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation4.phpt b/ext/standard/tests/general_functions/getservbyname_variation4.phpt
index 6033c9436..6033c9436 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation4.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation4.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation5.phpt b/ext/standard/tests/general_functions/getservbyname_variation5.phpt
index 1d3b8f6d7..1d3b8f6d7 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation5.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation5.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation6.phpt b/ext/standard/tests/general_functions/getservbyname_variation6.phpt
index 0dfafa622..0dfafa622 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation6.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation6.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation7.phpt b/ext/standard/tests/general_functions/getservbyname_variation7.phpt
index a0e223c50..a0e223c50 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation7.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation7.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation8.phpt b/ext/standard/tests/general_functions/getservbyname_variation8.phpt
index 69d1d77b6..69d1d77b6 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation8.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation8.phpt
diff --git a/ext/standard/tests/general_functions/getservbyname_variation9.phpt b/ext/standard/tests/general_functions/getservbyname_variation9.phpt
index eef2744c2..eef2744c2 100755..100644
--- a/ext/standard/tests/general_functions/getservbyname_variation9.phpt
+++ b/ext/standard/tests/general_functions/getservbyname_variation9.phpt
diff --git a/ext/standard/tests/general_functions/ob_start_closures.phpt b/ext/standard/tests/general_functions/ob_start_closures.phpt
index ba730961b..ba730961b 100755..100644
--- a/ext/standard/tests/general_functions/ob_start_closures.phpt
+++ b/ext/standard/tests/general_functions/ob_start_closures.phpt
diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
index 192f23dce..192f23dce 100755..100644
--- a/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
+++ b/ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
diff --git a/ext/standard/tests/math/bug27646.phpt b/ext/standard/tests/math/bug27646.phpt
index 7b4a923f1..7b4a923f1 100755..100644
--- a/ext/standard/tests/math/bug27646.phpt
+++ b/ext/standard/tests/math/bug27646.phpt
diff --git a/ext/standard/tests/math/bug28228.phpt b/ext/standard/tests/math/bug28228.phpt
index 4223f4bc1..4223f4bc1 100755..100644
--- a/ext/standard/tests/math/bug28228.phpt
+++ b/ext/standard/tests/math/bug28228.phpt
diff --git a/ext/standard/tests/math/bug30069.phpt b/ext/standard/tests/math/bug30069.phpt
index 5e3246c51..5e3246c51 100755..100644
--- a/ext/standard/tests/math/bug30069.phpt
+++ b/ext/standard/tests/math/bug30069.phpt
diff --git a/ext/standard/tests/network/ip2long_variation1.phpt b/ext/standard/tests/network/ip2long_variation1.phpt
index f87282ae7..ca67aa41a 100644
--- a/ext/standard/tests/network/ip2long_variation1.phpt
+++ b/ext/standard/tests/network/ip2long_variation1.phpt
@@ -201,4 +201,4 @@ bool(false)
--resource--
Error: 2 - ip2long() expects parameter 1 to be string, resource given, %s(%d)
NULL
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/standard/tests/network/shutdown.phpt b/ext/standard/tests/network/shutdown.phpt
index f9ab66476..f9ab66476 100755..100644
--- a/ext/standard/tests/network/shutdown.phpt
+++ b/ext/standard/tests/network/shutdown.phpt
diff --git a/ext/standard/tests/password/password_bcrypt_errors.phpt b/ext/standard/tests/password/password_bcrypt_errors.phpt
new file mode 100644
index 000000000..2548c9acc
--- /dev/null
+++ b/ext/standard/tests/password/password_bcrypt_errors.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Test error operation of password_hash() with bcrypt hashing
+--FILE--
+<?php
+//-=-=-=-
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => 3)));
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => 32)));
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => "foo")));
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => "123456789012345678901")));
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => 123)));
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => "foo")));
+
+?>
+--EXPECTF--
+Warning: password_hash(): Invalid bcrypt cost parameter specified: 3 in %s on line %d
+NULL
+
+Warning: password_hash(): Invalid bcrypt cost parameter specified: 32 in %s on line %d
+NULL
+
+Warning: password_hash(): Provided salt is too short: 3 expecting 22 in %s on line %d
+NULL
+
+Warning: password_hash(): Provided salt is too short: 21 expecting 22 in %s on line %d
+NULL
+
+Warning: password_hash(): Provided salt is too short: 3 expecting 22 in %s on line %d
+NULL
+
+Warning: password_hash(): Invalid bcrypt cost parameter specified: 0 in %s on line %d
+NULL
+
+
diff --git a/ext/standard/tests/password/password_get_info.phpt b/ext/standard/tests/password/password_get_info.phpt
new file mode 100644
index 000000000..4c8dc04ff
--- /dev/null
+++ b/ext/standard/tests/password/password_get_info.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test normal operation of password_get_info()
+--FILE--
+<?php
+//-=-=-=-
+// Test Bcrypt
+var_dump(password_get_info('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y'));
+// Test Bcrypt Cost
+var_dump(password_get_info('$2y$11$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y'));
+// Test Bcrypt Invalid Length
+var_dump(password_get_info('$2y$11$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100'));
+// Test Non-Bcrypt
+var_dump(password_get_info('$1$rasmusle$rISCgZzpwk3UhDidwXvin0'));
+
+echo "OK!";
+?>
+--EXPECT--
+array(3) {
+ ["algo"]=>
+ int(1)
+ ["algoName"]=>
+ string(6) "bcrypt"
+ ["options"]=>
+ array(1) {
+ ["cost"]=>
+ int(10)
+ }
+}
+array(3) {
+ ["algo"]=>
+ int(1)
+ ["algoName"]=>
+ string(6) "bcrypt"
+ ["options"]=>
+ array(1) {
+ ["cost"]=>
+ int(11)
+ }
+}
+array(3) {
+ ["algo"]=>
+ int(0)
+ ["algoName"]=>
+ string(7) "unknown"
+ ["options"]=>
+ array(0) {
+ }
+}
+array(3) {
+ ["algo"]=>
+ int(0)
+ ["algoName"]=>
+ string(7) "unknown"
+ ["options"]=>
+ array(0) {
+ }
+}
+OK!
diff --git a/ext/standard/tests/password/password_get_info_error.phpt b/ext/standard/tests/password/password_get_info_error.phpt
new file mode 100644
index 000000000..af676744c
--- /dev/null
+++ b/ext/standard/tests/password/password_get_info_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test error operation of password_get_info()
+--FILE--
+<?php
+//-=-=-=-
+var_dump(password_get_info());
+var_dump(password_get_info(array()));
+
+echo "OK!";
+?>
+--EXPECTF--
+Warning: password_get_info() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: password_get_info() expects parameter 1 to be string, array given in %s on line %d
+NULL
+OK!
diff --git a/ext/standard/tests/password/password_hash.phpt b/ext/standard/tests/password/password_hash.phpt
new file mode 100644
index 000000000..f59d3d5e4
--- /dev/null
+++ b/ext/standard/tests/password/password_hash.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test normal operation of password_hash()
+--FILE--
+<?php
+//-=-=-=-
+
+var_dump(strlen(password_hash("foo", PASSWORD_BCRYPT)));
+
+$hash = password_hash("foo", PASSWORD_BCRYPT);
+
+var_dump($hash === crypt("foo", $hash));
+
+var_dump(password_hash("rasmuslerdorf", PASSWORD_BCRYPT, array("cost" => 7, "salt" => "usesomesillystringforsalt")));
+
+var_dump(password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0))));
+
+echo "OK!";
+?>
+--EXPECT--
+int(60)
+bool(true)
+string(60) "$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi"
+string(60) "$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y"
+OK!
+
diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt
new file mode 100644
index 000000000..952250cb3
--- /dev/null
+++ b/ext/standard/tests/password/password_hash_error.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Test error operation of password_hash()
+--FILE--
+<?php
+//-=-=-=-
+
+var_dump(password_hash());
+
+var_dump(password_hash("foo"));
+
+var_dump(password_hash("foo", array()));
+
+var_dump(password_hash("foo", 19, new StdClass));
+
+var_dump(password_hash("foo", PASSWORD_BCRYPT, "baz"));
+
+var_dump(password_hash(array(), PASSWORD_BCRYPT));
+
+var_dump(password_hash("123", PASSWORD_BCRYPT, array("salt" => array())));
+
+/* Non-string salt, checking for memory leaks */
+var_dump(password_hash('123', PASSWORD_BCRYPT, array('salt' => 1234)));
+
+?>
+--EXPECTF--
+Warning: password_hash() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: password_hash() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: password_hash() expects parameter 2 to be long, array given in %s on line %d
+NULL
+
+Warning: password_hash(): Unknown password hashing algorithm: 19 in %s on line %d
+NULL
+
+Warning: password_hash() expects parameter 3 to be array, string given in %s on line %d
+NULL
+
+Warning: password_hash() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: password_hash(): Non-string salt parameter supplied in %s on line %d
+NULL
+
+Warning: password_hash(): Provided salt is too short: 4 expecting 22 in %s on line %d
+NULL
diff --git a/ext/standard/tests/password/password_needs_rehash.phpt b/ext/standard/tests/password/password_needs_rehash.phpt
new file mode 100644
index 000000000..734729e63
--- /dev/null
+++ b/ext/standard/tests/password/password_needs_rehash.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Test normal operation of password_needs_rehash()
+--FILE--
+<?php
+//-=-=-=-
+
+// Invalid Hash, always rehash
+var_dump(password_needs_rehash('', PASSWORD_BCRYPT));
+
+// Valid, as it's an unknown algorithm
+var_dump(password_needs_rehash('', 0));
+
+// Valid with cost the same
+var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 10)));
+
+// Valid with cost the same, additional params
+var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 10, 'foo' => 3)));
+
+// Invalid, different (lower) cost
+var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 09)));
+
+// Invalid, different (higher) cost
+var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 11)));
+
+// Valid with cost the default
+$cost = str_pad(PASSWORD_BCRYPT_DEFAULT_COST, 2, '0', STR_PAD_LEFT);
+var_dump(password_needs_rehash('$2y$'.$cost.'$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT));
+
+// Should Issue Needs Rehash, Since Foo is cast to 0...
+var_dump(password_needs_rehash('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', PASSWORD_BCRYPT, array('cost' => 'foo')));
+
+
+
+echo "OK!";
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+bool(false)
+bool(true)
+OK!
diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt
new file mode 100644
index 000000000..e25ef8db3
--- /dev/null
+++ b/ext/standard/tests/password/password_needs_rehash_error.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test error operation of password_needs_rehash()
+--FILE--
+<?php
+//-=-=-=-
+var_dump(password_needs_rehash());
+
+var_dump(password_needs_rehash(''));
+
+var_dump(password_needs_rehash('', "foo"));
+
+var_dump(password_needs_rehash(array(), 1));
+
+var_dump(password_needs_rehash("", 1, "foo"));
+
+echo "OK!";
+?>
+--EXPECTF--
+Warning: password_needs_rehash() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: password_needs_rehash() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: password_needs_rehash() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: password_needs_rehash() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: password_needs_rehash() expects parameter 3 to be array, string given in %s on line %d
+NULL
+OK!
diff --git a/ext/standard/tests/password/password_verify.phpt b/ext/standard/tests/password/password_verify.phpt
new file mode 100644
index 000000000..e7ecc7edd
--- /dev/null
+++ b/ext/standard/tests/password/password_verify.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test normal operation of password_verify)
+--FILE--
+<?php
+//-=-=-=-
+
+var_dump(password_verify(123, 123));
+
+var_dump(password_verify("foo", '$2a$07$usesomesillystringforsalt$'));
+
+var_dump(password_verify('rasmusler', '$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi'));
+
+var_dump(password_verify('rasmuslerdorf', '$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi'));
+echo "OK!";
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+OK!
diff --git a/ext/standard/tests/password/password_verify_error.phpt b/ext/standard/tests/password/password_verify_error.phpt
new file mode 100644
index 000000000..3e653fa04
--- /dev/null
+++ b/ext/standard/tests/password/password_verify_error.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test error operation of password_verify()
+--FILE--
+<?php
+//-=-=-=-
+
+var_dump(password_verify());
+
+var_dump(password_verify("foo"));
+
+?>
+--EXPECTF--
+Warning: password_verify() expects exactly 2 parameters, 0 given in %s on line %d
+bool(false)
+
+Warning: password_verify() expects exactly 2 parameters, 1 given in %s on line %d
+bool(false)
+
diff --git a/ext/standard/tests/php_ini_loaded_file.phpt b/ext/standard/tests/php_ini_loaded_file.phpt
index 747e0196f..7d441582e 100644
--- a/ext/standard/tests/php_ini_loaded_file.phpt
+++ b/ext/standard/tests/php_ini_loaded_file.phpt
@@ -10,5 +10,5 @@ precision=12
<?php
var_dump(php_ini_loaded_file());
?>
---EXPECTF--
-string(%d) "%sphp.ini"
+--EXPECTREGEX--
+string\(\d+\) ".*php\.ini"|bool\(false\)
diff --git a/ext/standard/tests/php_logo_guid.phpt b/ext/standard/tests/php_logo_guid.phpt
deleted file mode 100644
index c644b2893..000000000
--- a/ext/standard/tests/php_logo_guid.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Check the output of the php_logo_guid() function
---CREDITS--
-Sebastian Schürmann
-sschuermann@chip.de
-Testfest 2009 Munich
---FILE--
-<?php
-echo php_logo_guid();
-?>
---EXPECT--
-PHPE9568F34-D428-11d2-A769-00AA001ACF42
-
diff --git a/ext/standard/tests/php_real_logo_guid.phpt b/ext/standard/tests/php_real_logo_guid.phpt
deleted file mode 100644
index a9fa7d35d..000000000
--- a/ext/standard/tests/php_real_logo_guid.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Testing the undocumented function php_real_logo_guid()
---CREDITS--
-Sebastian Schürmann
-sschuermann@chip.de
-Testfest 2009 Munich
---FILE--
-<?php
-echo php_real_logo_guid();
-?>
---EXPECT--
-PHPE9568F34-D428-11d2-A769-00AA001ACF42
diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt
index e7b23db70..e7b23db70 100755..100644
--- a/ext/standard/tests/serialize/005.phpt
+++ b/ext/standard/tests/serialize/005.phpt
diff --git a/ext/standard/tests/serialize/bug26762.phpt b/ext/standard/tests/serialize/bug26762.phpt
index 3011bb602..3011bb602 100755..100644
--- a/ext/standard/tests/serialize/bug26762.phpt
+++ b/ext/standard/tests/serialize/bug26762.phpt
diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt
index 9b40cc54b..9b40cc54b 100755..100644
--- a/ext/standard/tests/serialize/bug30234.phpt
+++ b/ext/standard/tests/serialize/bug30234.phpt
diff --git a/ext/standard/tests/serialize/bug31442.phpt b/ext/standard/tests/serialize/bug31442.phpt
index 6d451bac9..6d451bac9 100755..100644
--- a/ext/standard/tests/serialize/bug31442.phpt
+++ b/ext/standard/tests/serialize/bug31442.phpt
diff --git a/ext/standard/tests/serialize/bug37947.phpt b/ext/standard/tests/serialize/bug37947.phpt
index 07371d1a3..07371d1a3 100755..100644
--- a/ext/standard/tests/serialize/bug37947.phpt
+++ b/ext/standard/tests/serialize/bug37947.phpt
diff --git a/ext/standard/tests/serialize/bug42919.phpt b/ext/standard/tests/serialize/bug42919.phpt
index 0a3d0b2e0..0a3d0b2e0 100755..100644
--- a/ext/standard/tests/serialize/bug42919.phpt
+++ b/ext/standard/tests/serialize/bug42919.phpt
diff --git a/ext/standard/tests/serialize/unserializeS.phpt b/ext/standard/tests/serialize/unserializeS.phpt
index 897208bb5..897208bb5 100755..100644
--- a/ext/standard/tests/serialize/unserializeS.phpt
+++ b/ext/standard/tests/serialize/unserializeS.phpt
diff --git a/ext/standard/tests/streams/bug63240.phpt b/ext/standard/tests/streams/bug63240.phpt
new file mode 100644
index 000000000..7612c4374
--- /dev/null
+++ b/ext/standard/tests/streams/bug63240.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #63240: stream_get_line() return contains delimiter string
+--FILE--
+<?php
+$fd = fopen('php://temp', 'r+');
+$delimiter = 'MM';
+$str = str_repeat('.', 8191) . $delimiter . "rest";
+fwrite($fd, $str);
+rewind($fd);
+$line = stream_get_line($fd, 9000, $delimiter);
+var_dump(strlen($line));
+$line = stream_get_line($fd, 9000, $delimiter);
+var_dump($line);
+?>
+--EXPECT--
+int(8191)
+string(4) "rest"
diff --git a/ext/standard/tests/strings/bug61038.phpt b/ext/standard/tests/strings/bug61038.phpt
new file mode 100644
index 000000000..7130804fa
--- /dev/null
+++ b/ext/standard/tests/strings/bug61038.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #61038: unpack("a5", "str\0\0") does not work as expected
+--FILE--
+<?php
+var_dump(unpack("a4", "str\0\0"));
+var_dump(unpack("a5", "str\0\0"));
+var_dump(unpack("a6", "str\0\0"));
+var_dump(unpack("a*", "str\0\0"));
+?>
+--EXPECTF--
+array(1) {
+ [1]=>
+ string(4) "str%c"
+}
+array(1) {
+ [1]=>
+ string(5) "str%c%c"
+}
+
+Warning: unpack(): Type a: not enough input, need 6, have 5 in %s on line %d
+bool(false)
+array(1) {
+ [1]=>
+ string(5) "str%c%c"
+}
+
diff --git a/ext/standard/tests/strings/htmlentities-utf-2.phpt b/ext/standard/tests/strings/htmlentities-utf-2.phpt
index d515dc0ff..d515dc0ff 100755..100644
--- a/ext/standard/tests/strings/htmlentities-utf-2.phpt
+++ b/ext/standard/tests/strings/htmlentities-utf-2.phpt
diff --git a/ext/standard/tests/strings/htmlentities-utf.phpt b/ext/standard/tests/strings/htmlentities-utf.phpt
index 6a66e4df4..6a66e4df4 100755..100644
--- a/ext/standard/tests/strings/htmlentities-utf.phpt
+++ b/ext/standard/tests/strings/htmlentities-utf.phpt
diff --git a/ext/standard/tests/strings/moneyformat.phpt b/ext/standard/tests/strings/moneyformat.phpt
index db6c48c7d..db6c48c7d 100755..100644
--- a/ext/standard/tests/strings/moneyformat.phpt
+++ b/ext/standard/tests/strings/moneyformat.phpt
diff --git a/ext/standard/tests/strings/pack_A.phpt b/ext/standard/tests/strings/pack_A.phpt
new file mode 100644
index 000000000..59fc22e12
--- /dev/null
+++ b/ext/standard/tests/strings/pack_A.phpt
@@ -0,0 +1,25 @@
+--TEST--
+pack()/unpack(): "A" modifier
+--FILE--
+<?php
+var_dump(
+ pack("A5", "foo "),
+ pack("A4", "fooo"),
+ pack("A4", "foo"),
+ unpack("A*", "foo\0\rbar\0 \t\r\n"),
+ unpack("A4", "foo\0\rbar\0 \t\r\n")
+);
+?>
+--EXPECTF--
+string(5) "foo "
+string(4) "fooo"
+string(4) "foo "
+array(1) {
+ [1]=>
+ string(8) "foo%c%cbar"
+}
+array(1) {
+ [1]=>
+ string(3) "foo"
+}
+
diff --git a/ext/standard/tests/strings/pack_Z.phpt b/ext/standard/tests/strings/pack_Z.phpt
new file mode 100644
index 000000000..8a2ee6776
--- /dev/null
+++ b/ext/standard/tests/strings/pack_Z.phpt
@@ -0,0 +1,27 @@
+--TEST--
+pack()/unpack(): "Z" format
+--FILE--
+<?php
+var_dump(
+ pack("Z0", "f"),
+ pack("Z5", "foo\0"),
+ pack("Z4", "fooo"),
+ pack("Z4", "foo"),
+ pack("Z*", "foo"),
+ unpack("Z*", "foo\0\rbar\0 \t\r\n"),
+ unpack("Z9", "foo\0\rbar\0 \t\r\n")
+);
+--EXPECTF--
+string(0) ""
+string(5) "foo%c%c"
+string(4) "foo%c"
+string(4) "foo%c"
+string(4) "foo%c"
+array(1) {
+ [1]=>
+ string(3) "foo"
+}
+array(1) {
+ [1]=>
+ string(3) "foo"
+}
diff --git a/ext/standard/tests/strings/parse_str_basic3.phpt b/ext/standard/tests/strings/parse_str_basic3.phpt
index 619b1476a..84f6a53bb 100644
--- a/ext/standard/tests/strings/parse_str_basic3.phpt
+++ b/ext/standard/tests/strings/parse_str_basic3.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/printf.phpt b/ext/standard/tests/strings/printf.phpt
index d989d6a42..d989d6a42 100755..100644
--- a/ext/standard/tests/strings/printf.phpt
+++ b/ext/standard/tests/strings/printf.phpt
diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt
index d0b7aaff4..d0b7aaff4 100755..100644
--- a/ext/standard/tests/strings/printf_64bit.phpt
+++ b/ext/standard/tests/strings/printf_64bit.phpt
diff --git a/ext/standard/tests/strings/sprintf_f.phpt b/ext/standard/tests/strings/sprintf_f.phpt
index 6cba6d10b..6cba6d10b 100755..100644
--- a/ext/standard/tests/strings/sprintf_f.phpt
+++ b/ext/standard/tests/strings/sprintf_f.phpt
diff --git a/ext/standard/tests/strings/sprintf_f_2.phpt b/ext/standard/tests/strings/sprintf_f_2.phpt
index 1c7cc7f92..1c7cc7f92 100755..100644
--- a/ext/standard/tests/strings/sprintf_f_2.phpt
+++ b/ext/standard/tests/strings/sprintf_f_2.phpt
diff --git a/ext/standard/tests/strings/sprintf_f_3.phpt b/ext/standard/tests/strings/sprintf_f_3.phpt
index 0cf123998..0cf123998 100755..100644
--- a/ext/standard/tests/strings/sprintf_f_3.phpt
+++ b/ext/standard/tests/strings/sprintf_f_3.phpt
diff --git a/ext/standard/tests/strings/unpack_error.phpt b/ext/standard/tests/strings/unpack_error.phpt
index 43b2df1c0..1ef97ccba 100644
--- a/ext/standard/tests/strings/unpack_error.phpt
+++ b/ext/standard/tests/strings/unpack_error.phpt
@@ -19,7 +19,7 @@ var_dump(unpack("I", pack("I", 65534), $extra_arg));
echo "\n-- Testing unpack() function with invalid format character --\n";
$extra_arg = 10;
-var_dump(unpack("Z", pack("I", 65534)));
+var_dump(unpack("G", pack("I", 65534)));
?>
===DONE===
--EXPECTF--
@@ -37,6 +37,6 @@ NULL
-- Testing unpack() function with invalid format character --
-Warning: unpack(): Invalid format type Z in %s on line %d
+Warning: unpack(): Invalid format type G in %s on line %d
bool(false)
===DONE===
diff --git a/ext/standard/tests/time/bug38524.phpt b/ext/standard/tests/time/bug38524.phpt
index 77d0f4f23..77d0f4f23 100755..100644
--- a/ext/standard/tests/time/bug38524.phpt
+++ b/ext/standard/tests/time/bug38524.phpt
diff --git a/ext/standard/tests/time/bug60222.phpt b/ext/standard/tests/time/bug60222.phpt
index 8053a81de..8053a81de 100755..100644
--- a/ext/standard/tests/time/bug60222.phpt
+++ b/ext/standard/tests/time/bug60222.phpt
diff --git a/ext/standard/tests/zend_logo_guid.phpt b/ext/standard/tests/zend_logo_guid.phpt
deleted file mode 100644
index 44e213b25..000000000
--- a/ext/standard/tests/zend_logo_guid.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Checking the zend_logo_guid() function
---CREDITS--
-Sebastian Schürmann
-sschuermann@chip.de
-Testfest 2009 Munich
---FILE--
-<?php
-echo zend_logo_guid();
-?>
---EXPECT--
-PHPE9568F35-D428-11d2-A769-00AA001ACF42
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 543fdeac1..f53107eb7 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -176,6 +176,20 @@ PHP_FUNCTION(floatval)
}
/* }}} */
+/* {{{ proto bool boolval(mixed var)
+ Get the boolean value of a variable */
+PHP_FUNCTION(boolval)
+{
+ zval **val;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &val) == FAILURE) {
+ return;
+ }
+
+ RETURN_BOOL(zend_is_true(*val));
+}
+/* }}} */
+
/* {{{ proto string strval(mixed var)
Get the string value of a variable */
PHP_FUNCTION(strval)
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index b1dc9d751..a80ec5d7b 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon May 23 12:29:55 2011 */
+/* Generated by re2c 0.13.5 on Tue May 15 13:07:17 2012 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -62,6 +62,7 @@ static PHP_INI_MH(OnUpdateTags)
return FAILURE;
}
}
+
zend_hash_init(ctx->tags, 0, NULL, NULL, 1);
for (key = php_strtok_r(tmp, ",", &lasts);
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index 4cd6aafc3..2b09f531b 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Nov 9 19:37:48 2011 */
+/* Generated by re2c 0.13.5 on Sun Jan 1 10:36:31 2012 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
diff --git a/ext/standard/winver.h b/ext/standard/winver.h
index 7152d6081..7152d6081 100755..100644
--- a/ext/standard/winver.h
+++ b/ext/standard/winver.h
diff --git a/ext/tokenizer/tests/bug60097.phpt b/ext/tokenizer/tests/bug60097.phpt
new file mode 100644
index 000000000..2116866c9
--- /dev/null
+++ b/ext/tokenizer/tests/bug60097.phpt
@@ -0,0 +1,121 @@
+--TEST--
+Bug 60097: token_get_all fails to lex nested heredoc
+--FILE--
+<?php
+
+var_dump(token_get_all('<?php
+<<<DOC1
+{$s(<<<DOC2
+DOC2
+)}
+DOC1;
+'));
+
+?>
+--EXPECT--
+array(14) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(374)
+ [1]=>
+ string(6) "<?php
+"
+ [2]=>
+ int(1)
+ }
+ [1]=>
+ array(3) {
+ [0]=>
+ int(378)
+ [1]=>
+ string(8) "<<<DOC1
+"
+ [2]=>
+ int(2)
+ }
+ [2]=>
+ array(3) {
+ [0]=>
+ int(381)
+ [1]=>
+ string(1) "{"
+ [2]=>
+ int(3)
+ }
+ [3]=>
+ array(3) {
+ [0]=>
+ int(310)
+ [1]=>
+ string(2) "$s"
+ [2]=>
+ int(3)
+ }
+ [4]=>
+ string(1) "("
+ [5]=>
+ array(3) {
+ [0]=>
+ int(378)
+ [1]=>
+ string(8) "<<<DOC2
+"
+ [2]=>
+ int(3)
+ }
+ [6]=>
+ array(3) {
+ [0]=>
+ int(379)
+ [1]=>
+ string(4) "DOC2"
+ [2]=>
+ int(4)
+ }
+ [7]=>
+ array(3) {
+ [0]=>
+ int(377)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(4)
+ }
+ [8]=>
+ string(1) ")"
+ [9]=>
+ string(1) "}"
+ [10]=>
+ array(3) {
+ [0]=>
+ int(315)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(5)
+ }
+ [11]=>
+ array(3) {
+ [0]=>
+ int(379)
+ [1]=>
+ string(4) "DOC1"
+ [2]=>
+ int(6)
+ }
+ [12]=>
+ string(1) ";"
+ [13]=>
+ array(3) {
+ [0]=>
+ int(377)
+ [1]=>
+ string(1) "
+"
+ [2]=>
+ int(6)
+ }
+}
diff --git a/ext/tokenizer/tests/token_get_all_variation11.phpt b/ext/tokenizer/tests/token_get_all_variation11.phpt
index ecc86177a..98d89961b 100644
--- a/ext/tokenizer/tests/token_get_all_variation11.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation11.phpt
@@ -130,7 +130,7 @@ array(49) {
[6]=>
array(3) {
[0]=>
- int(283)
+ int(%d)
[1]=>
string(2) "=="
[2]=>
@@ -273,7 +273,7 @@ array(49) {
[27]=>
array(3) {
[0]=>
- int(283)
+ int(%d)
[1]=>
string(2) "=="
[2]=>
diff --git a/ext/tokenizer/tests/token_get_all_variation13.phpt b/ext/tokenizer/tests/token_get_all_variation13.phpt
index 9b2f3bc94..6f85492a9 100644
--- a/ext/tokenizer/tests/token_get_all_variation13.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation13.phpt
@@ -1005,7 +1005,7 @@ array(145) {
[122]=>
array(3) {
[0]=>
- int(288)
+ int(%d)
[1]=>
string(10) "instanceof"
[2]=>
diff --git a/ext/tokenizer/tests/token_get_all_variation17.phpt b/ext/tokenizer/tests/token_get_all_variation17.phpt
index dccc4c9c2..f71444bc1 100644
--- a/ext/tokenizer/tests/token_get_all_variation17.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation17.phpt
@@ -145,7 +145,7 @@ array(81) {
[14]=>
array(3) {
[0]=>
- int(283)
+ int(%d)
[1]=>
string(2) "=="
[2]=>
diff --git a/ext/tokenizer/tests/token_get_all_variation4.phpt b/ext/tokenizer/tests/token_get_all_variation4.phpt
index 45e6f8afb..6bc111efb 100644
--- a/ext/tokenizer/tests/token_get_all_variation4.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation4.phpt
@@ -339,7 +339,7 @@ array(89) {
[38]=>
array(3) {
[0]=>
- int(279)
+ int(%d)
[1]=>
string(2) "&&"
[2]=>
@@ -518,7 +518,7 @@ array(89) {
[60]=>
array(3) {
[0]=>
- int(278)
+ int(%d)
[1]=>
string(2) "||"
[2]=>
diff --git a/ext/tokenizer/tests/token_get_all_variation5.phpt b/ext/tokenizer/tests/token_get_all_variation5.phpt
index 0068f2866..681fb48e5 100644
--- a/ext/tokenizer/tests/token_get_all_variation5.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation5.phpt
@@ -181,7 +181,7 @@ array(94) {
[18]=>
array(3) {
[0]=>
- int(277)
+ int(%d)
[1]=>
string(2) "+="
[2]=>
@@ -238,7 +238,7 @@ array(94) {
[25]=>
array(3) {
[0]=>
- int(276)
+ int(%d)
[1]=>
string(2) "-="
[2]=>
@@ -295,7 +295,7 @@ array(94) {
[32]=>
array(3) {
[0]=>
- int(275)
+ int(%d)
[1]=>
string(2) "*="
[2]=>
@@ -352,7 +352,7 @@ array(94) {
[39]=>
array(3) {
[0]=>
- int(274)
+ int(%d)
[1]=>
string(2) "/="
[2]=>
@@ -409,7 +409,7 @@ array(94) {
[46]=>
array(3) {
[0]=>
- int(272)
+ int(%d)
[1]=>
string(2) "%="
[2]=>
@@ -466,7 +466,7 @@ array(94) {
[53]=>
array(3) {
[0]=>
- int(271)
+ int(%d)
[1]=>
string(2) "&="
[2]=>
@@ -523,7 +523,7 @@ array(94) {
[60]=>
array(3) {
[0]=>
- int(270)
+ int(%d)
[1]=>
string(2) "|="
[2]=>
@@ -580,7 +580,7 @@ array(94) {
[67]=>
array(3) {
[0]=>
- int(269)
+ int(%d)
[1]=>
string(2) "^="
[2]=>
@@ -637,7 +637,7 @@ array(94) {
[74]=>
array(3) {
[0]=>
- int(267)
+ int(%d)
[1]=>
string(3) ">>="
[2]=>
@@ -694,7 +694,7 @@ array(94) {
[81]=>
array(3) {
[0]=>
- int(268)
+ int(%d)
[1]=>
string(3) "<<="
[2]=>
@@ -751,7 +751,7 @@ array(94) {
[88]=>
array(3) {
[0]=>
- int(273)
+ int(%d)
[1]=>
string(2) ".="
[2]=>
diff --git a/ext/tokenizer/tests/token_get_all_variation6.phpt b/ext/tokenizer/tests/token_get_all_variation6.phpt
index 54936d0c8..6213dab9d 100644
--- a/ext/tokenizer/tests/token_get_all_variation6.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation6.phpt
@@ -191,7 +191,7 @@ array(50) {
[21]=>
array(3) {
[0]=>
- int(287)
+ int(%d)
[1]=>
string(2) "<<"
[2]=>
@@ -277,7 +277,7 @@ array(50) {
[32]=>
array(3) {
[0]=>
- int(286)
+ int(%d)
[1]=>
string(2) ">>"
[2]=>
diff --git a/ext/tokenizer/tests/token_get_all_variation8.phpt b/ext/tokenizer/tests/token_get_all_variation8.phpt
index 0cf1d6347..c80a5d0f0 100644
--- a/ext/tokenizer/tests/token_get_all_variation8.phpt
+++ b/ext/tokenizer/tests/token_get_all_variation8.phpt
@@ -794,7 +794,7 @@ array(108) {
[103]=>
array(3) {
[0]=>
- int(289)
+ int(%d)
[1]=>
string(7) "(unset)"
[2]=>
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index c5cbf6c7d..d22fd7124 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -138,11 +138,8 @@ static void tokenize(zval *return_value TSRMLS_DC)
token_line = ++CG(zend_lineno);
CG(increment_lineno) = 0;
}
- add_next_index_stringl(keyword, Z_STRVAL(token), Z_STRLEN(token), 1);
- efree(Z_STRVAL(token));
- } else {
- add_next_index_stringl(keyword, (char *)zendtext, zendleng, 1);
}
+ add_next_index_stringl(keyword, (char *)zendtext, zendleng, 1);
add_next_index_long(keyword, token_line);
add_next_index_zval(return_value, keyword);
} else {
diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c
index 85822f199..c1b3e5766 100644
--- a/ext/tokenizer/tokenizer_data.c
+++ b/ext/tokenizer/tokenizer_data.c
@@ -21,7 +21,7 @@
/*
DO NOT EDIT THIS FILE!
This file is generated using tokenizer_data_gen.sh
-*/
+*/
#include "php.h"
#include "zend.h"
@@ -108,8 +108,10 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("T_FUNCTION", T_FUNCTION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_CONST", T_CONST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_RETURN", T_RETURN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_YIELD", T_YIELD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_TRY", T_TRY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_CATCH", T_CATCH, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_FINALLY", T_FINALLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_THROW", T_THROW, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_USE", T_USE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_INSTEADOF", T_INSTEADOF, CONST_CS | CONST_PERSISTENT);
@@ -242,8 +244,10 @@ char *get_token_type_name(int token_type)
case T_FUNCTION: return "T_FUNCTION";
case T_CONST: return "T_CONST";
case T_RETURN: return "T_RETURN";
+ case T_YIELD: return "T_YIELD";
case T_TRY: return "T_TRY";
case T_CATCH: return "T_CATCH";
+ case T_FINALLY: return "T_FINALLY";
case T_THROW: return "T_THROW";
case T_USE: return "T_USE";
case T_INSTEADOF: return "T_INSTEADOF";
diff --git a/ext/wddx/tests/bug27287.phpt b/ext/wddx/tests/bug27287.phpt
index 72ac317aa..72ac317aa 100755..100644
--- a/ext/wddx/tests/bug27287.phpt
+++ b/ext/wddx/tests/bug27287.phpt
diff --git a/ext/wddx/tests/bug34306.phpt b/ext/wddx/tests/bug34306.phpt
index 5f1a0df72..5f1a0df72 100755..100644
--- a/ext/wddx/tests/bug34306.phpt
+++ b/ext/wddx/tests/bug34306.phpt
diff --git a/ext/wddx/tests/bug35410.phpt b/ext/wddx/tests/bug35410.phpt
index 3b4b9b62c..3b4b9b62c 100755..100644
--- a/ext/wddx/tests/bug35410.phpt
+++ b/ext/wddx/tests/bug35410.phpt
diff --git a/ext/wddx/tests/bug35410_64bit.phpt b/ext/wddx/tests/bug35410_64bit.phpt
index 15377b175..15377b175 100755..100644
--- a/ext/wddx/tests/bug35410_64bit.phpt
+++ b/ext/wddx/tests/bug35410_64bit.phpt
diff --git a/ext/wddx/tests/bug37569.phpt b/ext/wddx/tests/bug37569.phpt
index 45cd68a80..45cd68a80 100755..100644
--- a/ext/wddx/tests/bug37569.phpt
+++ b/ext/wddx/tests/bug37569.phpt
diff --git a/ext/wddx/tests/bug37587.phpt b/ext/wddx/tests/bug37587.phpt
index 7780355b8..7780355b8 100755..100644
--- a/ext/wddx/tests/bug37587.phpt
+++ b/ext/wddx/tests/bug37587.phpt
diff --git a/ext/xml/tests/bug26614_libxml.phpt b/ext/xml/tests/bug26614_libxml.phpt
index 782bdb193..782bdb193 100755..100644
--- a/ext/xml/tests/bug26614_libxml.phpt
+++ b/ext/xml/tests/bug26614_libxml.phpt
diff --git a/ext/xml/tests/bug32001b.phpt b/ext/xml/tests/bug32001b.phpt
index ddf26ce3c..ddf26ce3c 100755..100644
--- a/ext/xml/tests/bug32001b.phpt
+++ b/ext/xml/tests/bug32001b.phpt
diff --git a/ext/xml/tests/xml_closures_001.phpt b/ext/xml/tests/xml_closures_001.phpt
index 37df25419..37df25419 100755..100644
--- a/ext/xml/tests/xml_closures_001.phpt
+++ b/ext/xml/tests/xml_closures_001.phpt
diff --git a/ext/xmlreader/tests/012.phpt b/ext/xmlreader/tests/012.phpt
index e0edeef2d..e0edeef2d 100755..100644
--- a/ext/xmlreader/tests/012.phpt
+++ b/ext/xmlreader/tests/012.phpt
diff --git a/ext/xmlreader/tests/013.phpt b/ext/xmlreader/tests/013.phpt
index f9dcdeeec..f9dcdeeec 100755..100644
--- a/ext/xmlreader/tests/013.phpt
+++ b/ext/xmlreader/tests/013.phpt
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index ce63b8062..2688f4c3f 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -182,7 +182,7 @@ PHP_MINIT_FUNCTION(xsl)
REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_NETWORK", XSL_SECPREF_READ_NETWORK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_NETWORK", XSL_SECPREF_WRITE_NETWORK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XSL_SECPREF_DEFAULT", XSL_SECPREF_DEFAULT, CONST_CS | CONST_PERSISTENT);
-
+
REGISTER_LONG_CONSTANT("LIBXSLT_VERSION", LIBXSLT_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("LIBXSLT_DOTTED_VERSION", LIBXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT);
diff --git a/ext/xsl/tests/bug33853.phpt b/ext/xsl/tests/bug33853.phpt
index bcf30f65a..bcf30f65a 100755..100644
--- a/ext/xsl/tests/bug33853.phpt
+++ b/ext/xsl/tests/bug33853.phpt
diff --git a/ext/zlib/tests/001.phpt b/ext/zlib/tests/001.phpt
index 0c2ca28c7..4850a65a5 100644
--- a/ext/zlib/tests/001.phpt
+++ b/ext/zlib/tests/001.phpt
@@ -29,4 +29,4 @@ Strings are equal
100 36864
Strings are equal
5 15
-Strings are equal
+Strings are equal \ No newline at end of file
diff --git a/ext/zlib/tests/data.inc b/ext/zlib/tests/data.inc
index fb20f0bcd..441199ff0 100644
--- a/ext/zlib/tests/data.inc
+++ b/ext/zlib/tests/data.inc
@@ -85,4 +85,4 @@ That summons thee to heaven or to hell.
QUOTE;
-?>
+?> \ No newline at end of file
diff --git a/ext/zlib/tests/gzfile_basic.phpt b/ext/zlib/tests/gzfile_basic.phpt
index fd7ba1805..1fceea5b9 100644
--- a/ext/zlib/tests/gzfile_basic.phpt
+++ b/ext/zlib/tests/gzfile_basic.phpt
@@ -36,4 +36,4 @@ array(3) {
[2]=>
string(17) "for all languages"
}
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/zlib/tests/gzfile_basic2.phpt b/ext/zlib/tests/gzfile_basic2.phpt
index 9124d336b..9f31eb0f8 100644
--- a/ext/zlib/tests/gzfile_basic2.phpt
+++ b/ext/zlib/tests/gzfile_basic2.phpt
@@ -36,4 +36,4 @@ array(3) {
[2]=>
string(17) "for all languages"
}
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/generated_lists b/generated_lists
index 5ca5adb02..4d149666f 100644
--- a/generated_lists
+++ b/generated_lists
@@ -1,2 +1,2 @@
makefile_am_files = Zend/Makefile.am TSRM/Makefile.am
-config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/date/config0.m4 ext/dba/config.m4 ext/dom/config.m4 ext/enchant/config.m4 ext/ereg/config0.m4 ext/exif/config.m4 ext/fileinfo/config.m4 ext/filter/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hash/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/interbase/config.m4 ext/intl/config.m4 ext/json/config.m4 ext/ldap/config.m4 ext/libxml/config0.m4 ext/mbstring/config.m4 ext/mcrypt/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/mysqli/config.m4 ext/mysqlnd/config9.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/pcntl/config.m4 ext/pcre/config0.m4 ext/pdo/config.m4 ext/pdo_dblib/config.m4 ext/pdo_firebird/config.m4 ext/pdo_mysql/config.m4 ext/pdo_oci/config.m4 ext/pdo_odbc/config.m4 ext/pdo_pgsql/config.m4 ext/pdo_sqlite/config.m4 ext/pgsql/config.m4 ext/phar/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/readline/config.m4 ext/recode/config.m4 ext/recode/config9.m4 ext/reflection/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/simplexml/config.m4 ext/snmp/config.m4 ext/soap/config.m4 ext/sockets/config.m4 ext/spl/config.m4 ext/sqlite3/config0.m4 ext/standard/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tidy/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlreader/config.m4 ext/xmlrpc/config.m4 ext/xmlwriter/config.m4 ext/xsl/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/apache_hooks/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/continuity/config.m4 sapi/embed/config.m4 sapi/fpm/config.m4 sapi/isapi/config.m4 sapi/litespeed/config.m4 sapi/milter/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4
+config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/date/config0.m4 ext/dba/config.m4 ext/dom/config.m4 ext/enchant/config.m4 ext/ereg/config0.m4 ext/exif/config.m4 ext/fileinfo/config.m4 ext/filter/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hash/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/interbase/config.m4 ext/intl/config.m4 ext/json/config.m4 ext/ldap/config.m4 ext/libxml/config0.m4 ext/mbstring/config.m4 ext/mcrypt/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/mysqli/config.m4 ext/mysqlnd/config9.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/pcntl/config.m4 ext/pcre/config0.m4 ext/pdo/config.m4 ext/pdo_dblib/config.m4 ext/pdo_firebird/config.m4 ext/pdo_mysql/config.m4 ext/pdo_oci/config.m4 ext/pdo_odbc/config.m4 ext/pdo_pgsql/config.m4 ext/pdo_sqlite/config.m4 ext/pgsql/config.m4 ext/phar/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/readline/config.m4 ext/recode/config9.m4 ext/recode/config.m4 ext/reflection/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/simplexml/config.m4 ext/snmp/config.m4 ext/soap/config.m4 ext/sockets/config.m4 ext/spl/config.m4 ext/sqlite3/config0.m4 ext/standard/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tidy/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlreader/config.m4 ext/xmlrpc/config.m4 ext/xmlwriter/config.m4 ext/xsl/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/apache/config.m4 sapi/apache_hooks/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/continuity/config.m4 sapi/embed/config.m4 sapi/fpm/config.m4 sapi/isapi/config.m4 sapi/litespeed/config.m4 sapi/milter/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4
diff --git a/main/fopen_wrappers.h b/main/fopen_wrappers.h
index 6dcc6e1cc..1d6394cb0 100644
--- a/main/fopen_wrappers.h
+++ b/main/fopen_wrappers.h
@@ -28,7 +28,7 @@ BEGIN_EXTERN_C()
PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC);
PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC);
PHPAPI char *expand_filepath_ex(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len TSRMLS_DC);
-PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len, int realpath_mode TSRMLS_DC);
+PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len, int use_realpath TSRMLS_DC);
PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC);
PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC);
diff --git a/main/logos.h b/main/logos.h
deleted file mode 100644
index 3b65cbbcf..000000000
--- a/main/logos.h
+++ /dev/null
@@ -1,1080 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2012 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#define CONTEXT_TYPE_IMAGE_GIF "Content-Type: image/gif"
-
-static const unsigned char zend_logo[] = {
- 71, 73, 70, 56, 57, 97, 113, 0, 72, 0,
- 213, 0, 0, 13, 13, 14, 1, 3, 6, 2,
- 5, 9, 46, 68, 94, 21, 29, 39, 5, 15,
- 26, 4, 10, 17, 29, 43, 58, 0, 1, 2,
- 9, 25, 42, 38, 105, 171, 24, 67, 109, 13,
- 36, 59, 10, 27, 45, 9, 25, 41, 35, 96,
- 157, 32, 87, 142, 29, 79, 130, 26, 70, 114,
- 20, 54, 87, 29, 77, 124, 10, 26, 42, 34,
- 88, 141, 10, 24, 38, 11, 26, 41, 1, 2,
- 3, 55, 80, 105, 45, 63, 81, 49, 53, 57,
- 5, 15, 24, 9, 26, 42, 30, 85, 138, 33,
- 92, 149, 26, 73, 117, 10, 28, 45, 32, 89,
- 142, 30, 84, 134, 26, 72, 115, 15, 42, 67,
- 23, 62, 99, 12, 32, 51, 7, 21, 33, 9,
- 26, 41, 8, 23, 35, 7, 25, 37, 51, 58,
- 63, 2, 4, 5, 25, 26, 26, 49, 50, 50,
- 255, 102, 0, 255, 255, 255, 204, 204, 204, 199,
- 199, 199, 191, 191, 191, 171, 171, 171, 146, 146,
- 146, 115, 115, 115, 85, 85, 85, 60, 60, 60,
- 55, 55, 55, 38, 38, 38, 7, 7, 7, 3,
- 3, 3, 0, 0, 0, 44, 0, 0, 0, 0,
- 113, 0, 72, 0, 0, 6, 255, 192, 153, 112,
- 72, 44, 26, 143, 200, 164, 114, 121, 252, 49,
- 159, 208, 168, 148, 248, 171, 58, 167, 210, 171,
- 208, 170, 197, 122, 191, 70, 109, 23, 140, 236,
- 138, 201, 232, 239, 121, 102, 221, 186, 217, 219,
- 171, 83, 46, 110, 15, 207, 235, 180, 190, 124,
- 135, 187, 229, 127, 127, 128, 112, 121, 108, 118,
- 132, 123, 137, 77, 118, 120, 136, 115, 109, 117,
- 85, 126, 147, 147, 128, 99, 138, 137, 99, 107,
- 146, 146, 148, 133, 159, 125, 136, 152, 163, 151,
- 135, 121, 144, 84, 157, 92, 169, 157, 111, 163,
- 175, 176, 83, 151, 177, 180, 181, 161, 182, 184,
- 185, 186, 187, 188, 189, 67, 54, 56, 58, 56,
- 53, 190, 197, 88, 55, 57, 60, 63, 2, 43,
- 2, 56, 198, 208, 74, 192, 58, 0, 63, 5,
- 12, 11, 35, 35, 12, 47, 209, 222, 67, 53,
- 201, 203, 34, 19, 20, 218, 231, 37, 63, 54,
- 223, 222, 60, 2, 216, 231, 241, 231, 206, 76,
- 193, 55, 236, 176, 63, 39, 242, 252, 35, 40,
- 58, 75, 114, 8, 40, 240, 227, 25, 62, 76,
- 60, 24, 244, 147, 55, 161, 202, 11, 24, 57,
- 134, 17, 201, 241, 99, 130, 191, 130, 7, 21,
- 225, 48, 176, 48, 30, 137, 5, 11, 38, 48,
- 88, 81, 5, 198, 51, 138, 22, 181, 53, 52,
- 152, 49, 141, 141, 31, 230, 58, 46, 60, 129,
- 194, 74, 202, 115, 43, 91, 234, 1, 112, 83,
- 102, 63, 255, 18, 38, 122, 226, 252, 145, 67,
- 39, 153, 26, 47, 68, 248, 92, 186, 176, 97,
- 81, 163, 88, 108, 188, 48, 80, 130, 169, 85,
- 134, 68, 161, 74, 177, 1, 160, 0, 137, 171,
- 96, 135, 62, 213, 186, 132, 171, 215, 176, 104,
- 71, 52, 188, 71, 54, 9, 210, 179, 105, 195,
- 166, 99, 219, 214, 198, 58, 34, 48, 12, 124,
- 213, 38, 163, 175, 223, 191, 50, 22, 132, 216,
- 139, 182, 132, 0, 30, 196, 250, 218, 37, 70,
- 198, 198, 141, 199, 144, 31, 223, 253, 114, 163,
- 10, 0, 97, 192, 126, 100, 59, 7, 24, 176,
- 10, 20, 229, 210, 146, 48, 128, 88, 72, 223,
- 28, 57, 38, 111, 197, 17, 163, 181, 235, 215,
- 58, 116, 68, 100, 60, 5, 134, 136, 18, 19,
- 80, 24, 168, 162, 48, 94, 95, 21, 6, 82,
- 168, 80, 209, 215, 128, 1, 20, 39, 8, 95,
- 37, 81, 160, 180, 105, 25, 177, 233, 62, 1,
- 246, 186, 186, 245, 24, 209, 177, 84, 140, 71,
- 97, 130, 114, 109, 33, 76, 48, 152, 176, 192,
- 111, 135, 20, 222, 211, 54, 167, 61, 163, 111,
- 246, 39, 55, 174, 203, 175, 254, 30, 74, 229,
- 152, 62, 73, 132, 24, 60, 162, 47, 131, 14,
- 12, 132, 224, 155, 95, 130, 145, 208, 89, 129,
- 40, 116, 211, 25, 12, 58, 72, 135, 68, 124,
- 214, 197, 38, 161, 14, 243, 73, 200, 222, 18,
- 27, 161, 213, 215, 4, 159, 37, 199, 255, 25,
- 96, 12, 116, 230, 223, 9, 11, 252, 32, 226,
- 11, 13, 74, 35, 223, 132, 19, 174, 24, 27,
- 75, 76, 192, 128, 66, 88, 126, 161, 160, 66,
- 122, 124, 201, 112, 2, 3, 195, 125, 54, 65,
- 95, 29, 4, 87, 227, 9, 126, 233, 192, 3,
- 12, 125, 161, 232, 160, 93, 207, 184, 200, 98,
- 139, 17, 74, 24, 197, 118, 96, 249, 7, 160,
- 128, 31, 242, 72, 30, 72, 33, 244, 149, 2,
- 122, 229, 201, 0, 224, 105, 60, 52, 216, 23,
- 131, 14, 226, 96, 194, 1, 78, 74, 152, 195,
- 13, 196, 208, 192, 90, 148, 177, 217, 7, 83,
- 149, 50, 112, 136, 220, 94, 34, 22, 216, 159,
- 12, 195, 101, 227, 37, 113, 50, 192, 0, 3,
- 156, 238, 165, 72, 196, 11, 21, 178, 184, 228,
- 117, 19, 66, 145, 225, 85, 53, 222, 72, 152,
- 136, 42, 152, 32, 224, 111, 42, 8, 10, 40,
- 161, 101, 222, 96, 67, 95, 61, 40, 58, 3,
- 13, 55, 24, 112, 221, 101, 19, 226, 64, 131,
- 17, 54, 64, 42, 229, 19, 50, 226, 249, 95,
- 128, 127, 238, 23, 166, 113, 194, 105, 250, 103,
- 160, 191, 18, 90, 232, 13, 59, 0, 249, 130,
- 168, 56, 160, 198, 195, 10, 214, 161, 144, 1,
- 131, 245, 21, 1, 33, 125, 177, 141, 181, 4,
- 149, 76, 137, 232, 23, 3, 38, 132, 9, 216,
- 9, 93, 126, 234, 105, 160, 34, 94, 208, 129,
- 14, 7, 152, 112, 255, 2, 4, 40, 84, 80,
- 157, 8, 30, 176, 154, 195, 133, 68, 200, 250,
- 34, 124, 119, 102, 171, 109, 113, 157, 142, 16,
- 238, 111, 160, 113, 58, 110, 167, 38, 252, 213,
- 192, 193, 12, 72, 32, 193, 3, 15, 128, 192,
- 128, 7, 175, 121, 32, 66, 7, 101, 230, 240,
- 42, 18, 53, 216, 171, 131, 106, 73, 224, 32,
- 0, 88, 221, 217, 216, 227, 200, 190, 234, 39,
- 210, 112, 12, 36, 23, 158, 175, 254, 154, 160,
- 105, 9, 5, 236, 88, 129, 7, 41, 83, 240,
- 65, 195, 32, 56, 236, 128, 107, 14, 36, 208,
- 64, 10, 24, 41, 161, 177, 181, 74, 84, 182,
- 194, 4, 85, 45, 181, 239, 134, 11, 236, 165,
- 31, 151, 95, 233, 199, 223, 8, 82, 27, 40,
- 3, 9, 39, 144, 56, 24, 4, 92, 119, 61,
- 129, 3, 96, 135, 221, 128, 8, 12, 0, 64,
- 239, 47, 26, 59, 88, 52, 53, 227, 132, 182,
- 208, 210, 128, 178, 76, 163, 12, 46, 135, 208,
- 245, 221, 92, 3, 21, 54, 216, 9, 152, 208,
- 48, 64, 72, 12, 237, 197, 52, 0, 152, 208,
- 209, 111, 193, 141, 204, 239, 102, 104, 45, 96,
- 128, 9, 20, 224, 45, 249, 215, 97, 51, 240,
- 1, 8, 10, 152, 80, 20, 14, 56, 208, 213,
- 38, 199, 181, 245, 214, 207, 111, 96, 130, 4,
- 146, 72, 114, 135, 69, 194, 10, 38, 64, 0,
- 130, 228, 120, 71, 240, 181, 8, 145, 67, 240,
- 255, 128, 2, 44, 164, 0, 26, 2, 66, 180,
- 9, 163, 23, 56, 20, 112, 184, 184, 242, 232,
- 119, 224, 212, 127, 18, 56, 152, 95, 14, 252,
- 8, 88, 129, 120, 255, 37, 216, 205, 17, 68,
- 160, 192, 3, 24, 212, 64, 131, 198, 58, 92,
- 12, 70, 101, 223, 125, 8, 172, 60, 218, 166,
- 252, 149, 136, 41, 251, 21, 64, 249, 201, 117,
- 221, 89, 202, 151, 131, 112, 251, 9, 211, 194,
- 54, 161, 218, 88, 212, 128, 237, 128, 207, 35,
- 15, 164, 144, 125, 65, 78, 141, 206, 3, 164,
- 0, 245, 69, 0, 34, 248, 95, 10, 134, 68,
- 2, 8, 244, 101, 71, 97, 3, 77, 237, 70,
- 240, 0, 18, 248, 110, 15, 58, 80, 10, 63,
- 48, 37, 55, 47, 129, 169, 128, 86, 10, 152,
- 12, 132, 19, 166, 2, 36, 112, 132, 31, 20,
- 83, 128, 28, 40, 3, 6, 52, 207, 116, 91,
- 227, 218, 3, 218, 68, 52, 50, 224, 32, 95,
- 228, 147, 1, 175, 134, 211, 65, 226, 13, 138,
- 116, 222, 249, 77, 1, 10, 38, 3, 7, 52,
- 160, 47, 96, 91, 0, 11, 83, 224, 128, 62,
- 197, 176, 107, 32, 224, 222, 217, 192, 240, 130,
- 25, 109, 16, 133, 91, 242, 159, 15, 63, 37,
- 176, 63, 25, 64, 0, 68, 108, 128, 7, 144,
- 232, 0, 37, 146, 81, 68, 14, 208, 20, 20,
- 163, 72, 167, 216, 128, 14, 85, 201, 66, 205,
- 155, 110, 224, 61, 37, 220, 255, 16, 63, 226,
- 235, 215, 135, 194, 5, 44, 78, 249, 5, 61,
- 86, 251, 65, 5, 36, 208, 23, 15, 52, 177,
- 136, 101, 100, 97, 18, 195, 197, 171, 52, 218,
- 205, 117, 51, 108, 163, 169, 132, 16, 171, 54,
- 118, 174, 142, 69, 48, 75, 248, 224, 22, 162,
- 45, 146, 171, 51, 8, 160, 221, 25, 17, 105,
- 70, 82, 90, 237, 91, 131, 137, 164, 37, 137,
- 80, 73, 238, 221, 11, 86, 93, 9, 95, 242,
- 180, 101, 128, 46, 10, 236, 148, 126, 177, 6,
- 5, 70, 153, 68, 69, 38, 18, 2, 255, 42,
- 34, 104, 34, 160, 74, 106, 9, 99, 8, 245,
- 51, 230, 147, 126, 55, 131, 26, 196, 178, 35,
- 225, 25, 153, 52, 131, 82, 55, 240, 84, 19,
- 107, 60, 234, 11, 0, 12, 16, 1, 16, 148,
- 160, 110, 43, 123, 100, 56, 243, 22, 2, 145,
- 128, 45, 101, 16, 152, 15, 118, 44, 54, 131,
- 100, 218, 239, 73, 111, 58, 66, 13, 120, 0,
- 151, 133, 60, 205, 116, 248, 20, 12, 5, 246,
- 227, 52, 126, 106, 195, 120, 50, 56, 146, 1,
- 46, 247, 1, 126, 86, 141, 156, 79, 132, 192,
- 61, 67, 240, 1, 117, 182, 6, 85, 141, 90,
- 38, 232, 134, 176, 17, 89, 198, 165, 35, 134,
- 17, 70, 14, 92, 32, 63, 134, 141, 224, 117,
- 176, 11, 105, 215, 44, 232, 208, 136, 178, 72,
- 34, 118, 212, 203, 69, 173, 226, 148, 26, 216,
- 133, 7, 255, 39, 80, 192, 4, 102, 42, 191,
- 17, 136, 52, 164, 37, 109, 211, 253, 48, 137,
- 49, 122, 90, 116, 165, 255, 100, 64, 86, 40,
- 74, 128, 22, 0, 224, 6, 48, 152, 128, 2,
- 64, 122, 211, 187, 229, 84, 153, 142, 226, 169,
- 18, 230, 41, 128, 164, 1, 149, 31, 37, 98,
- 166, 93, 134, 192, 129, 133, 49, 181, 169, 36,
- 125, 234, 147, 36, 68, 71, 47, 80, 213, 170,
- 252, 32, 79, 92, 232, 177, 4, 14, 80, 32,
- 103, 77, 229, 218, 83, 177, 51, 214, 6, 73,
- 53, 10, 103, 237, 71, 67, 126, 96, 0, 164,
- 133, 69, 4, 128, 147, 134, 15, 72, 240, 85,
- 174, 229, 236, 176, 175, 203, 105, 93, 223, 116,
- 215, 41, 228, 53, 30, 43, 177, 65, 14, 94,
- 80, 133, 21, 160, 64, 93, 75, 153, 0, 0,
- 158, 224, 130, 19, 60, 224, 110, 57, 99, 216,
- 237, 74, 0, 130, 8, 120, 192, 3, 99, 243,
- 192, 97, 234, 58, 161, 120, 42, 226, 177, 106,
- 9, 26, 37, 57, 167, 131, 23, 8, 207, 39,
- 20, 248, 1, 254, 136, 80, 3, 20, 44, 21,
- 180, 32, 32, 79, 4, 80, 16, 128, 11, 64,
- 64, 4, 34, 80, 65, 7, 94, 80, 38, 214,
- 202, 102, 183, 105, 168, 1, 12, 170, 26, 219,
- 26, 34, 19, 135, 29, 41, 128, 117, 137, 128,
- 3, 9, 252, 214, 176, 15, 24, 64, 15, 56,
- 247, 12, 24, 168, 75, 4, 6, 0, 135, 192,
- 14, 156, 139, 82, 90, 8, 164, 38, 219, 29,
- 2, 79, 150, 194, 0, 24, 44, 97, 7, 22,
- 184, 29, 195, 58, 106, 223, 58, 230, 160, 156,
- 68, 89, 108, 89, 115, 145, 3, 147, 48, 33,
- 131, 50, 89, 0, 3, 4, 16, 95, 33, 220,
- 224, 5, 26, 64, 193, 91, 111, 167, 57, 35,
- 132, 35, 53, 148, 116, 12, 100, 166, 248, 13,
- 143, 241, 163, 59, 34, 16, 192, 15, 120, 208,
- 222, 36, 208, 192, 49, 63, 216, 192, 9, 36,
- 192, 128, 137, 114, 152, 44, 47, 217, 140, 130,
- 9, 114, 25, 28, 76, 148, 9, 162, 2, 128,
- 141, 219, 50, 5, 122, 134, 120, 196, 174, 141,
- 46, 143, 167, 96, 131, 23, 221, 120, 200, 72,
- 214, 74, 16, 0, 0, 59 };
-
-static const unsigned char php_logo[] = {
- 71, 73, 70, 56, 57, 97, 120, 0, 67, 0,
- 230, 106, 0, 127, 130, 184, 57, 55, 71, 40,
- 37, 42, 204, 205, 226, 161, 164, 203, 211, 213,
- 231, 178, 180, 212, 67, 66, 88, 131, 134, 185,
- 130, 131, 179, 82, 82, 114, 144, 146, 194, 194,
- 196, 222, 170, 172, 208, 76, 75, 99, 91, 92,
- 131, 221, 222, 236, 59, 56, 60, 110, 113, 165,
- 106, 109, 157, 97, 99, 141, 117, 121, 177, 123,
- 126, 181, 229, 230, 240, 153, 156, 198, 140, 141,
- 193, 185, 186, 217, 107, 107, 146, 78, 78, 107,
- 113, 116, 169, 122, 122, 163, 136, 139, 189, 114,
- 116, 163, 116, 115, 152, 142, 144, 193, 90, 91,
- 126, 226, 227, 239, 123, 125, 173, 164, 165, 208,
- 109, 112, 162, 114, 118, 172, 149, 150, 200, 187,
- 189, 217, 116, 120, 174, 133, 136, 187, 146, 149,
- 195, 216, 217, 234, 146, 146, 196, 100, 102, 146,
- 107, 110, 159, 165, 168, 206, 148, 150, 197, 46,
- 43, 47, 83, 81, 104, 179, 180, 215, 108, 106,
- 140, 92, 91, 118, 138, 141, 191, 102, 104, 150,
- 104, 106, 154, 156, 159, 200, 49, 46, 57, 174,
- 176, 211, 156, 156, 205, 85, 86, 120, 158, 161,
- 202, 150, 153, 197, 129, 130, 175, 103, 105, 151,
- 63, 61, 80, 188, 190, 218, 94, 96, 137, 152,
- 153, 200, 140, 142, 191, 137, 138, 186, 87, 88,
- 124, 182, 183, 215, 213, 215, 232, 34, 30, 32,
- 108, 111, 158, 206, 208, 228, 191, 192, 220, 119,
- 123, 180, 118, 120, 167, 95, 94, 125, 153, 153,
- 204, 110, 111, 152, 115, 119, 174, 34, 30, 31,
- 255, 255, 255, 144, 142, 143, 89, 86, 87, 199,
- 198, 199, 238, 238, 245, 213, 212, 213, 246, 246,
- 250, 130, 128, 129, 172, 170, 171, 116, 114, 115,
- 241, 240, 241, 158, 156, 157, 227, 226, 227, 75,
- 72, 73, 185, 184, 185, 103, 100, 101, 137, 137,
- 182, 0, 255, 0, 71, 70, 95, 223, 224, 237,
- 155, 156, 204, 105, 107, 156, 111, 115, 167, 140,
- 140, 186, 184, 185, 217, 184, 186, 215, 154, 155,
- 204, 167, 170, 207, 219, 220, 235, 154, 156, 201,
- 102, 100, 132, 104, 103, 137, 167, 168, 210, 110,
- 112, 160, 139, 139, 185, 198, 199, 224, 199, 201,
- 225, 105, 108, 156, 151, 152, 203, 33, 249, 4,
- 1, 0, 0, 106, 0, 44, 0, 0, 0, 0,
- 120, 0, 67, 0, 0, 7, 255, 128, 106, 130,
- 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
- 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
- 151, 150, 109, 63, 109, 115, 152, 158, 159, 160,
- 63, 121, 121, 54, 62, 26, 113, 76, 26, 26,
- 76, 6, 62, 62, 13, 50, 4, 65, 60, 24,
- 66, 45, 11, 73, 34, 57, 31, 25, 57, 34,
- 47, 41, 160, 194, 161, 13, 26, 12, 125, 77,
- 5, 80, 80, 3, 125, 124, 12, 81, 81, 42,
- 114, 172, 175, 116, 177, 179, 66, 51, 45, 186,
- 31, 8, 0, 22, 22, 21, 87, 40, 37, 22,
- 9, 25, 193, 195, 235, 140, 38, 113, 124, 46,
- 108, 108, 16, 16, 117, 46, 201, 3, 212, 50,
- 179, 34, 31, 254, 44, 0, 17, 8, 4, 64,
- 176, 224, 55, 130, 225, 164, 172, 64, 241, 70,
- 194, 9, 63, 59, 158, 76, 25, 146, 132, 157,
- 69, 53, 65, 108, 12, 96, 67, 226, 130, 71,
- 18, 36, 242, 53, 16, 178, 64, 138, 201, 147,
- 40, 83, 170, 92, 121, 114, 92, 7, 9, 19,
- 118, 232, 128, 65, 225, 8, 5, 43, 67, 68,
- 92, 196, 20, 132, 9, 20, 142, 30, 47, 184,
- 48, 66, 167, 5, 203, 163, 72, 147, 162, 188,
- 242, 38, 6, 140, 35, 71, 30, 140, 88, 114,
- 196, 131, 206, 157, 144, 126, 104, 116, 1, 129,
- 35, 4, 35, 4, 88, 40, 29, 75, 54, 233,
- 149, 19, 58, 30, 44, 1, 162, 64, 193, 136,
- 41, 51, 255, 176, 46, 50, 161, 161, 64, 19,
- 23, 117, 10, 24, 72, 82, 182, 175, 95, 164,
- 29, 96, 44, 81, 192, 129, 131, 3, 60, 9,
- 228, 26, 202, 19, 101, 0, 148, 2, 3, 124,
- 228, 248, 187, 114, 1, 134, 203, 152, 49, 124,
- 160, 156, 244, 13, 5, 5, 14, 214, 172, 81,
- 224, 65, 177, 154, 60, 70, 248, 244, 25, 192,
- 100, 6, 231, 149, 31, 178, 112, 153, 77, 155,
- 75, 151, 215, 74, 221, 44, 89, 115, 224, 128,
- 131, 16, 59, 221, 69, 97, 192, 160, 1, 2,
- 220, 43, 49, 112, 193, 194, 188, 185, 153, 219,
- 200, 147, 118, 216, 93, 164, 200, 154, 210, 195,
- 126, 248, 144, 99, 68, 5, 15, 11, 209, 87,
- 170, 32, 211, 188, 185, 152, 2, 225, 149, 94,
- 121, 112, 32, 64, 0, 14, 112, 64, 153, 48,
- 192, 68, 14, 1, 0, 233, 87, 22, 16, 83,
- 158, 57, 25, 21, 249, 41, 245, 134, 2, 238,
- 245, 112, 7, 38, 115, 208, 225, 131, 1, 50,
- 28, 23, 160, 74, 93, 152, 209, 31, 22, 92,
- 16, 240, 160, 82, 49, 172, 209, 67, 15, 7,
- 236, 81, 201, 15, 50, 52, 208, 64, 73, 23,
- 166, 4, 64, 22, 19, 98, 145, 197, 102, 37,
- 38, 245, 64, 0, 27, 2, 39, 73, 27, 4,
- 236, 227, 96, 139, 39, 41, 55, 161, 25, 95,
- 224, 168, 148, 31, 69, 208, 64, 3, 21, 145,
- 216, 17, 4, 1, 51, 128, 135, 212, 255, 7,
- 153, 53, 217, 36, 139, 71, 169, 16, 198, 132,
- 98, 92, 208, 36, 137, 44, 49, 233, 228, 150,
- 248, 141, 133, 130, 3, 52, 8, 80, 195, 35,
- 72, 96, 16, 4, 148, 71, 125, 240, 69, 22,
- 108, 182, 233, 230, 155, 89, 116, 81, 64, 3,
- 93, 162, 84, 0, 24, 19, 146, 1, 103, 155,
- 23, 12, 96, 225, 73, 11, 236, 41, 40, 155,
- 93, 12, 208, 128, 82, 64, 8, 32, 128, 3,
- 141, 204, 32, 4, 6, 98, 41, 69, 192, 114,
- 41, 86, 106, 6, 24, 92, 124, 1, 32, 74,
- 93, 108, 81, 105, 138, 52, 108, 161, 69, 25,
- 93, 144, 104, 192, 148, 159, 78, 184, 5, 24,
- 94, 116, 113, 40, 82, 35, 8, 224, 4, 163,
- 138, 108, 35, 196, 141, 73, 141, 151, 234, 167,
- 91, 120, 1, 65, 151, 39, 238, 250, 41, 24,
- 99, 96, 32, 197, 0, 120, 10, 171, 106, 25,
- 3, 36, 53, 130, 19, 78, 224, 144, 72, 10,
- 34, 180, 128, 102, 82, 16, 240, 167, 108, 138,
- 97, 64, 96, 18, 6, 94, 108, 155, 34, 26,
- 183, 93, 224, 169, 184, 229, 209, 224, 69, 179,
- 72, 173, 1, 45, 118, 133, 252, 225, 203, 100,
- 101, 125, 33, 33, 186, 253, 121, 1, 160, 148,
- 248, 230, 219, 0, 138, 253, 54, 71, 67, 25,
- 127, 30, 21, 128, 19, 2, 44, 96, 72, 63,
- 244, 146, 21, 91, 192, 229, 109, 209, 227, 157,
- 16, 51, 167, 197, 255, 5, 225, 86, 140, 133,
- 24, 208, 29, 213, 129, 172, 99, 18, 146, 2,
- 2, 31, 212, 57, 214, 164, 59, 194, 57, 198,
- 25, 218, 78, 232, 5, 1, 157, 78, 200, 197,
- 155, 99, 112, 129, 70, 138, 90, 100, 129, 106,
- 196, 112, 150, 113, 198, 185, 19, 150, 129, 37,
- 75, 10, 64, 155, 6, 33, 222, 224, 58, 150,
- 174, 253, 137, 225, 45, 74, 11, 52, 208, 5,
- 121, 19, 106, 193, 0, 192, 253, 173, 136, 18,
- 6, 13, 124, 17, 65, 213, 89, 104, 81, 53,
- 187, 128, 26, 240, 69, 178, 253, 133, 97, 128,
- 82, 52, 204, 58, 200, 31, 0, 32, 160, 100,
- 89, 217, 230, 185, 169, 137, 89, 124, 221, 116,
- 22, 25, 151, 199, 227, 74, 16, 0, 221, 92,
- 206, 130, 51, 119, 198, 218, 42, 125, 48, 6,
- 206, 119, 31, 181, 4, 180, 10, 171, 33, 130,
- 5, 38, 147, 101, 175, 204, 5, 167, 20, 184,
- 170, 58, 83, 249, 116, 74, 49, 247, 119, 70,
- 22, 52, 4, 109, 236, 74, 161, 151, 167, 69,
- 227, 44, 117, 0, 237, 13, 130, 176, 144, 80,
- 95, 15, 79, 56, 198, 181, 39, 109, 222, 31,
- 26, 89, 160, 221, 220, 127, 42, 5, 27, 116,
- 25, 19, 210, 144, 197, 81, 169, 15, 206, 58,
- 75, 69, 184, 173, 70, 56, 115, 147, 133, 114,
- 127, 17, 244, 200, 210, 229, 253, 17, 142, 185,
- 74, 224, 22, 159, 197, 25, 170, 94, 112, 20,
- 255, 214, 229, 1, 175, 20, 7, 78, 244, 32,
- 72, 5, 148, 49, 93, 30, 26, 159, 167, 84,
- 123, 218, 228, 55, 119, 187, 74, 252, 246, 183,
- 69, 216, 99, 179, 132, 1, 241, 219, 83, 10,
- 5, 160, 37, 136, 21, 80, 166, 110, 217, 91,
- 158, 73, 12, 0, 190, 160, 245, 173, 57, 213,
- 211, 143, 239, 152, 3, 134, 44, 20, 14, 11,
- 135, 99, 9, 3, 168, 214, 159, 251, 9, 144,
- 128, 41, 184, 2, 251, 252, 130, 189, 242, 84,
- 136, 37, 201, 99, 78, 4, 58, 183, 187, 248,
- 157, 36, 133, 88, 8, 3, 233, 76, 183, 18,
- 0, 120, 109, 66, 228, 34, 203, 0, 157, 32,
- 8, 20, 24, 176, 47, 194, 235, 32, 238, 142,
- 69, 169, 236, 245, 174, 106, 203, 11, 98, 121,
- 188, 0, 192, 116, 29, 79, 63, 28, 44, 79,
- 24, 20, 184, 146, 29, 10, 162, 3, 40, 24,
- 33, 89, 116, 68, 189, 39, 162, 228, 3, 5,
- 240, 66, 233, 250, 67, 131, 49, 124, 225, 130,
- 39, 76, 73, 247, 38, 244, 189, 240, 113, 15,
- 2, 98, 156, 80, 245, 42, 119, 20, 43, 170,
- 97, 33, 90, 92, 90, 20, 153, 67, 46, 21,
- 248, 81, 5, 16, 232, 194, 24, 180, 48, 70,
- 209, 13, 160, 126, 204, 241, 32, 74, 242, 199,
- 51, 177, 101, 175, 11, 127, 4, 100, 23, 202,
- 224, 72, 153, 81, 113, 37, 232, 83, 223, 243,
- 58, 112, 133, 190, 236, 71, 255, 85, 90, 8,
- 101, 40, 197, 112, 175, 20, 137, 225, 11, 4,
- 120, 160, 10, 189, 104, 167, 9, 98, 161, 130,
- 23, 20, 149, 40, 181, 64, 202, 97, 137, 175,
- 44, 205, 163, 213, 7, 222, 208, 129, 190, 68,
- 72, 99, 104, 248, 194, 2, 78, 133, 67, 23,
- 154, 196, 92, 19, 146, 97, 33, 3, 118, 202,
- 161, 73, 231, 117, 130, 72, 129, 4, 222, 240,
- 67, 165, 40, 177, 95, 205, 60, 150, 43, 173,
- 182, 18, 68, 98, 129, 137, 26, 3, 131, 48,
- 251, 242, 56, 39, 68, 238, 121, 18, 232, 229,
- 88, 214, 216, 47, 26, 156, 97, 156, 82, 64,
- 102, 127, 184, 240, 170, 173, 169, 146, 57, 109,
- 12, 88, 4, 206, 112, 1, 103, 178, 205, 121,
- 130, 120, 193, 9, 36, 208, 73, 165, 48, 82,
- 92, 102, 32, 195, 24, 6, 80, 167, 25, 118,
- 208, 159, 196, 212, 31, 255, 240, 101, 6, 25,
- 50, 128, 142, 73, 41, 154, 19, 142, 70, 136,
- 33, 156, 224, 13, 99, 161, 152, 254, 102, 57,
- 75, 50, 112, 97, 12, 133, 66, 83, 160, 72,
- 26, 74, 86, 158, 68, 5, 92, 96, 233, 232,
- 46, 40, 6, 150, 134, 210, 164, 40, 101, 192,
- 16, 165, 3, 50, 67, 164, 224, 4, 39, 80,
- 39, 82, 96, 200, 133, 11, 208, 131, 30, 5,
- 248, 35, 1, 252, 105, 18, 64, 30, 245, 168,
- 153, 3, 212, 0, 158, 74, 143, 67, 46, 147,
- 57, 94, 255, 48, 234, 81, 147, 234, 71, 2,
- 236, 116, 44, 7, 75, 216, 33, 146, 16, 131,
- 19, 160, 0, 41, 215, 76, 36, 83, 125, 36,
- 133, 5, 52, 177, 60, 89, 192, 40, 114, 220,
- 229, 4, 120, 25, 34, 1, 101, 45, 104, 114,
- 238, 185, 66, 182, 178, 164, 1, 13, 140, 88,
- 199, 242, 83, 78, 105, 41, 162, 4, 121, 101,
- 201, 65, 249, 104, 76, 191, 74, 129, 1, 149,
- 108, 14, 24, 208, 19, 160, 114, 210, 106, 17,
- 136, 53, 171, 4, 171, 198, 0, 199, 170, 68,
- 119, 82, 188, 36, 101, 52, 122, 89, 70, 148,
- 96, 2, 49, 232, 64, 30, 165, 64, 212, 122,
- 122, 214, 36, 121, 115, 217, 233, 162, 211, 129,
- 3, 64, 171, 180, 141, 72, 0, 106, 37, 160,
- 197, 180, 98, 97, 12, 107, 245, 209, 2, 22,
- 199, 70, 185, 250, 133, 8, 61, 128, 150, 97,
- 35, 161, 132, 39, 76, 64, 179, 82, 248, 223,
- 22, 166, 75, 93, 222, 189, 214, 158, 212, 165,
- 46, 24, 6, 251, 26, 5, 200, 74, 0, 50,
- 154, 196, 11, 64, 224, 135, 24, 240, 22, 0,
- 5, 160, 42, 61, 16, 119, 93, 41, 160, 87,
- 189, 16, 112, 45, 101, 136, 112, 48, 39, 68,
- 128, 163, 150, 72, 128, 27, 80, 251, 134, 213,
- 182, 215, 175, 39, 176, 173, 114, 65, 241, 130,
- 41, 248, 1, 181, 170, 253, 175, 95, 81, 192,
- 1, 89, 57, 161, 8, 248, 5, 133, 255, 18,
- 244, 224, 134, 3, 247, 87, 193, 37, 58, 193,
- 26, 28, 220, 131, 240, 178, 131, 5, 20, 62,
- 176, 4, 206, 138, 225, 240, 28, 225, 0, 138,
- 18, 64, 15, 96, 167, 24, 22, 128, 96, 7,
- 110, 112, 67, 12, 168, 89, 98, 202, 248, 129,
- 3, 1, 8, 147, 0, 2, 192, 98, 211, 8,
- 34, 9, 37, 32, 194, 14, 96, 60, 1, 26,
- 215, 56, 41, 19, 32, 80, 15, 132, 36, 38,
- 187, 250, 120, 16, 41, 72, 128, 30, 116, 64,
- 4, 33, 187, 33, 168, 254, 197, 240, 27, 142,
- 128, 227, 13, 45, 185, 8, 120, 120, 193, 147,
- 23, 241, 2, 41, 235, 224, 204, 103, 222, 193,
- 71, 73, 124, 221, 29, 28, 65, 1, 237, 129,
- 209, 134, 14, 112, 3, 15, 141, 249, 17, 47,
- 64, 192, 20, 136, 0, 131, 62, 251, 153, 8,
- 126, 248, 168, 80, 243, 51, 1, 34, 60, 0,
- 52, 213, 113, 143, 162, 113, 16, 2, 59, 223,
- 153, 18, 34, 24, 194, 158, 41, 64, 233, 74,
- 83, 250, 8, 125, 174, 112, 160, 223, 192, 105,
- 78, 75, 224, 211, 159, 6, 42, 80, 137, 112,
- 105, 182, 136, 166, 55, 7, 168, 78, 17, 2,
- 112, 0, 28, 108, 32, 49, 143, 22, 70, 10,
- 62, 80, 2, 16, 88, 1, 42, 80, 121, 128,
- 174, 119, 61, 149, 37, 172, 5, 8, 108, 105,
- 11, 97, 10, 99, 152, 208, 156, 186, 55, 69,
- 80, 0, 21, 110, 56, 48, 4, 49, 199, 90,
- 49, 41, 80, 2, 2, 60, 224, 129, 13, 108,
- 32, 45, 190, 6, 118, 176, 219, 66, 108, 195,
- 112, 128, 10, 35, 24, 129, 21, 172, 80, 130,
- 102, 63, 251, 220, 139, 16, 65, 26, 16, 112,
- 21, 116, 187, 251, 221, 240, 142, 119, 188, 3,
- 1, 0, 59, 0 };
-
-static const unsigned char php_egg_logo[] = {
- 71, 73, 70, 56, 57, 97, 120, 0, 67, 0,
- 231, 255, 0, 18, 25, 33, 32, 30, 34, 28,
- 33, 44, 15, 35, 71, 6, 37, 85, 37, 40,
- 47, 34, 41, 53, 41, 40, 43, 9, 47, 109,
- 30, 45, 68, 21, 48, 84, 51, 46, 55, 43,
- 49, 59, 31, 59, 98, 15, 61, 128, 58, 55,
- 69, 50, 57, 74, 0, 66, 144, 56, 58, 60,
- 54, 59, 71, 32, 66, 113, 60, 65, 67, 63,
- 65, 84, 63, 68, 79, 28, 79, 145, 15, 82,
- 162, 75, 72, 98, 68, 78, 86, 74, 77, 88,
- 50, 82, 122, 41, 85, 134, 76, 78, 108, 70,
- 83, 101, 5, 94, 190, 0, 95, 197, 86, 80,
- 101, 28, 92, 159, 80, 84, 96, 83, 83, 115,
- 81, 87, 89, 22, 97, 183, 86, 88, 85, 0,
- 102, 210, 8, 101, 204, 24, 100, 177, 85, 90,
- 127, 35, 101, 169, 42, 100, 159, 88, 92, 103,
- 0, 107, 216, 69, 95, 132, 0, 108, 210, 84,
- 93, 112, 94, 90, 117, 18, 105, 201, 96, 92,
- 105, 89, 96, 98, 94, 93, 135, 94, 94, 126,
- 30, 106, 210, 7, 112, 222, 33, 108, 198, 16,
- 114, 217, 27, 113, 198, 24, 113, 209, 59, 108,
- 159, 96, 100, 138, 0, 120, 229, 44, 112, 180,
- 49, 112, 171, 71, 108, 148, 99, 104, 115, 90,
- 106, 125, 27, 115, 232, 100, 102, 147, 42, 115,
- 192, 86, 110, 137, 9, 123, 239, 106, 108, 105,
- 105, 105, 138, 33, 118, 228, 12, 125, 227, 48,
- 117, 208, 16, 126, 222, 37, 120, 224, 20, 125,
- 235, 35, 123, 213, 50, 121, 190, 43, 123, 206,
- 40, 123, 220, 105, 110, 160, 59, 122, 182, 78,
- 119, 158, 44, 122, 233, 3, 134, 250, 112, 112,
- 151, 73, 123, 175, 113, 118, 114, 51, 128, 205,
- 34, 129, 246, 11, 136, 245, 34, 130, 240, 113,
- 117, 149, 111, 116, 166, 111, 119, 141, 48, 130,
- 221, 38, 132, 235, 53, 130, 215, 97, 124, 146,
- 116, 122, 124, 117, 121, 131, 54, 130, 229, 41,
- 135, 232, 68, 130, 223, 46, 135, 246, 65, 134,
- 202, 42, 137, 241, 75, 131, 205, 124, 121, 161,
- 101, 125, 191, 86, 128, 210, 121, 122, 169, 105,
- 128, 157, 121, 122, 180, 114, 124, 181, 94, 128,
- 201, 81, 134, 185, 46, 138, 252, 76, 135, 195,
- 34, 142, 252, 62, 137, 229, 63, 138, 217, 33,
- 144, 247, 58, 139, 223, 56, 141, 246, 54, 143,
- 234, 57, 143, 241, 102, 135, 193, 129, 130, 176,
- 122, 136, 144, 46, 148, 252, 45, 149, 246, 118,
- 133, 191, 65, 146, 231, 73, 146, 216, 129, 133,
- 185, 135, 135, 156, 69, 148, 226, 44, 153, 255,
- 94, 143, 216, 132, 136, 175, 88, 146, 207, 137,
- 139, 136, 93, 146, 197, 95, 147, 188, 137, 139,
- 150, 104, 146, 178, 122, 143, 172, 135, 139, 191,
- 57, 156, 254, 67, 154, 245, 70, 154, 239, 134,
- 141, 180, 117, 145, 201, 120, 146, 190, 79, 154,
- 233, 140, 141, 188, 129, 144, 194, 142, 142, 176,
- 137, 147, 156, 88, 155, 222, 82, 157, 230, 93,
- 157, 218, 66, 162, 253, 100, 157, 210, 77, 161,
- 247, 55, 168, 255, 81, 162, 241, 148, 148, 195,
- 145, 149, 202, 127, 156, 204, 77, 166, 255, 142,
- 155, 177, 141, 153, 200, 123, 160, 193, 73, 171,
- 255, 93, 167, 240, 96, 167, 234, 152, 158, 160,
- 101, 167, 228, 119, 164, 206, 155, 158, 171, 110,
- 167, 219, 156, 155, 203, 89, 172, 252, 128, 164,
- 219, 151, 163, 174, 81, 178, 255, 158, 162, 202,
- 102, 175, 249, 93, 178, 251, 108, 175, 237, 103,
- 177, 244, 166, 168, 165, 97, 182, 255, 87, 185,
- 255, 149, 174, 216, 125, 181, 235, 110, 185, 252,
- 117, 183, 254, 171, 172, 209, 166, 175, 197, 103,
- 190, 255, 174, 176, 189, 140, 183, 221, 128, 184,
- 248, 120, 187, 249, 179, 180, 184, 115, 193, 253,
- 170, 183, 193, 174, 181, 215, 107, 197, 255, 135,
- 191, 246, 151, 192, 219, 187, 183, 213, 128, 197,
- 253, 121, 202, 255, 147, 198, 239, 188, 191, 219,
- 148, 200, 252, 192, 193, 197, 134, 205, 254, 171,
- 199, 236, 183, 199, 218, 163, 207, 251, 142, 213,
- 255, 158, 211, 253, 195, 205, 217, 166, 211, 245,
- 205, 204, 228, 153, 218, 255, 190, 210, 236, 186,
- 212, 231, 177, 213, 248, 162, 224, 255, 188, 221,
- 250, 214, 219, 221, 214, 219, 233, 174, 229, 254,
- 198, 225, 247, 209, 226, 248, 186, 233, 251, 227,
- 230, 239, 225, 241, 252, 253, 255, 252, 255, 255,
- 255, 33, 249, 4, 1, 10, 0, 255, 0, 44,
- 0, 0, 0, 0, 120, 0, 67, 0, 0, 8,
- 254, 0, 255, 9, 28, 72, 176, 160, 193, 131,
- 8, 19, 42, 92, 200, 176, 161, 195, 135, 16,
- 35, 74, 156, 72, 177, 162, 197, 139, 22, 131,
- 105, 12, 134, 177, 163, 199, 143, 193, 164, 73,
- 227, 38, 141, 28, 56, 112, 228, 76, 146, 20,
- 41, 205, 152, 75, 99, 183, 100, 201, 50, 101,
- 202, 147, 77, 79, 166, 102, 205, 250, 200, 19,
- 100, 73, 114, 239, 238, 221, 123, 71, 148, 104,
- 202, 163, 224, 86, 138, 124, 25, 115, 166, 205,
- 72, 145, 246, 72, 221, 195, 39, 207, 30, 69,
- 158, 118, 246, 220, 202, 208, 24, 184, 160, 252,
- 248, 9, 29, 59, 212, 100, 75, 99, 53, 159,
- 66, 93, 203, 182, 109, 84, 169, 124, 248, 156,
- 57, 163, 165, 174, 150, 60, 138, 76, 113, 221,
- 251, 207, 24, 183, 119, 97, 3, 135, 125, 71,
- 78, 90, 76, 62, 142, 70, 141, 18, 53, 109,
- 170, 227, 199, 144, 35, 75, 157, 91, 87, 137,
- 229, 28, 74, 190, 228, 229, 139, 209, 43, 96,
- 193, 247, 10, 203, 114, 212, 167, 82, 47, 93,
- 197, 138, 81, 163, 166, 173, 19, 47, 201, 176,
- 99, 59, 166, 171, 36, 135, 237, 22, 45, 114,
- 216, 209, 203, 25, 98, 176, 191, 66, 195, 134,
- 54, 230, 233, 150, 179, 100, 197, 106, 181, 90,
- 158, 171, 57, 179, 110, 231, 124, 185, 145, 77,
- 157, 186, 150, 218, 45, 76, 104, 111, 145, 71,
- 86, 239, 133, 198, 200, 254, 145, 189, 199, 205,
- 212, 212, 115, 244, 232, 157, 107, 86, 172, 185,
- 234, 92, 197, 154, 137, 11, 231, 11, 77, 245,
- 251, 178, 207, 40, 201, 254, 225, 131, 134, 39,
- 138, 124, 103, 80, 73, 68, 13, 37, 141, 39,
- 144, 213, 115, 14, 60, 235, 116, 211, 12, 123,
- 197, 136, 67, 141, 106, 226, 156, 51, 78, 16,
- 92, 208, 194, 7, 126, 28, 70, 166, 159, 9,
- 26, 132, 104, 130, 29, 2, 254, 67, 32, 81,
- 224, 200, 18, 91, 56, 240, 208, 35, 78, 51,
- 238, 49, 40, 223, 58, 240, 88, 99, 132, 31,
- 207, 168, 131, 14, 55, 206, 56, 115, 203, 41,
- 167, 172, 229, 73, 36, 158, 196, 133, 216, 83,
- 29, 58, 166, 69, 11, 26, 88, 96, 129, 6,
- 95, 112, 230, 213, 81, 210, 188, 21, 27, 59,
- 208, 208, 179, 14, 123, 205, 81, 227, 96, 55,
- 235, 208, 227, 14, 23, 126, 244, 162, 204, 49,
- 200, 64, 3, 13, 51, 194, 232, 162, 139, 50,
- 105, 106, 131, 13, 54, 225, 132, 227, 205, 157,
- 207, 96, 243, 204, 48, 195, 244, 72, 28, 126,
- 103, 48, 233, 164, 6, 36, 246, 20, 210, 81,
- 198, 224, 87, 143, 48, 12, 78, 8, 75, 43,
- 242, 21, 3, 38, 60, 227, 116, 224, 2, 22,
- 135, 32, 162, 41, 33, 112, 208, 129, 72, 35,
- 135, 8, 242, 72, 40, 163, 150, 82, 202, 42,
- 186, 172, 178, 203, 46, 169, 170, 154, 76, 50,
- 254, 123, 158, 194, 97, 14, 22, 60, 240, 192,
- 7, 188, 117, 228, 23, 74, 198, 88, 41, 219,
- 56, 189, 36, 19, 203, 57, 235, 80, 147, 11,
- 44, 176, 20, 211, 96, 51, 240, 192, 195, 14,
- 5, 36, 88, 129, 8, 33, 116, 200, 81, 198,
- 181, 101, 208, 1, 199, 27, 220, 110, 59, 69,
- 22, 130, 20, 82, 200, 35, 165, 76, 34, 110,
- 33, 147, 64, 162, 174, 42, 192, 200, 122, 223,
- 25, 38, 216, 186, 192, 19, 24, 133, 52, 82,
- 149, 247, 161, 179, 203, 35, 136, 8, 243, 72,
- 57, 244, 80, 179, 220, 39, 185, 192, 163, 77,
- 55, 244, 236, 227, 14, 5, 17, 0, 65, 7,
- 25, 101, 120, 81, 197, 196, 216, 82, 97, 49,
- 21, 81, 68, 145, 69, 22, 105, 116, 236, 113,
- 26, 161, 148, 59, 136, 24, 98, 64, 210, 203,
- 40, 28, 106, 161, 193, 2, 11, 88, 144, 171,
- 68, 246, 74, 163, 226, 125, 207, 156, 105, 8,
- 25, 212, 54, 218, 202, 39, 4, 227, 115, 142,
- 54, 233, 177, 211, 65, 4, 51, 84, 113, 109,
- 21, 77, 52, 1, 69, 23, 19, 15, 1, 197,
- 16, 84, 12, 17, 197, 182, 112, 8, 146, 198,
- 20, 86, 147, 139, 204, 49, 169, 78, 50, 200,
- 32, 144, 56, 210, 97, 14, 15, 176, 28, 37,
- 204, 198, 180, 228, 107, 108, 158, 60, 19, 202,
- 43, 159, 200, 225, 133, 28, 175, 224, 3, 15,
- 50, 176, 80, 2, 75, 254, 51, 94, 34, 140,
- 143, 208, 68, 119, 129, 45, 210, 93, 48, 13,
- 197, 210, 60, 240, 0, 133, 15, 111, 104, 138,
- 8, 28, 27, 79, 1, 199, 35, 163, 234, 18,
- 139, 155, 233, 206, 177, 97, 202, 22, 28, 112,
- 128, 14, 17, 5, 227, 210, 204, 213, 69, 178,
- 11, 40, 160, 16, 194, 8, 33, 134, 52, 17,
- 142, 122, 197, 236, 156, 11, 51, 185, 52, 3,
- 244, 62, 128, 207, 16, 49, 182, 93, 36, 125,
- 120, 23, 135, 67, 193, 131, 15, 112, 148, 147,
- 143, 58, 216, 8, 3, 249, 198, 89, 192, 1,
- 199, 33, 143, 196, 18, 203, 42, 144, 104, 222,
- 33, 31, 26, 120, 62, 194, 67, 162, 255, 121,
- 159, 35, 149, 104, 58, 135, 21, 100, 64, 92,
- 69, 139, 198, 238, 156, 236, 222, 226, 208, 131,
- 207, 56, 13, 56, 80, 116, 19, 215, 54, 81,
- 197, 24, 73, 23, 126, 248, 16, 62, 248, 144,
- 133, 62, 110, 112, 194, 50, 202, 113, 8, 231,
- 101, 193, 7, 64, 152, 220, 184, 30, 129, 42,
- 93, 168, 66, 108, 29, 50, 129, 231, 52, 208,
- 16, 89, 220, 162, 87, 248, 137, 68, 29, 178,
- 160, 6, 53, 188, 225, 5, 85, 176, 86, 21,
- 232, 1, 15, 113, 228, 98, 57, 173, 104, 143,
- 151, 224, 241, 190, 248, 249, 160, 126, 114, 136,
- 161, 181, 202, 16, 53, 167, 13, 97, 120, 105,
- 184, 7, 7, 12, 224, 4, 111, 192, 65, 114,
- 254, 144, 3, 66, 26, 14, 145, 6, 43, 88,
- 1, 11, 107, 128, 196, 42, 86, 1, 65, 14,
- 181, 224, 0, 1, 160, 160, 66, 100, 114, 139,
- 181, 197, 230, 22, 117, 152, 194, 20, 162, 160,
- 134, 42, 144, 64, 10, 248, 163, 67, 122, 214,
- 17, 187, 79, 232, 45, 23, 226, 16, 7, 62,
- 240, 97, 13, 5, 16, 109, 12, 215, 98, 4,
- 207, 64, 193, 51, 77, 53, 66, 83, 84, 240,
- 65, 26, 218, 113, 1, 3, 180, 1, 27, 144,
- 19, 196, 183, 128, 128, 196, 66, 132, 98, 13,
- 63, 72, 228, 15, 176, 32, 134, 68, 52, 241,
- 62, 45, 8, 64, 0, 106, 144, 144, 89, 152,
- 66, 22, 8, 186, 207, 40, 214, 32, 8, 107,
- 216, 194, 5, 67, 144, 218, 15, 134, 208, 5,
- 68, 184, 15, 30, 205, 120, 148, 25, 97, 1,
- 157, 125, 208, 227, 25, 3, 136, 64, 12, 232,
- 215, 136, 121, 200, 35, 31, 249, 168, 71, 61,
- 242, 33, 143, 118, 108, 67, 30, 208, 128, 195,
- 32, 218, 49, 1, 1, 180, 1, 121, 199, 120,
- 197, 35, 136, 184, 134, 102, 146, 11, 137, 88,
- 80, 228, 37, 104, 145, 36, 13, 72, 178, 80,
- 5, 153, 5, 78, 50, 73, 157, 72, 92, 98,
- 13, 135, 208, 135, 63, 252, 129, 132, 40, 116,
- 193, 105, 192, 11, 5, 62, 92, 217, 140, 157,
- 49, 162, 21, 104, 60, 199, 62, 224, 225, 10,
- 2, 68, 128, 10, 114, 254, 32, 196, 49, 178,
- 113, 129, 11, 112, 224, 159, 37, 224, 192, 6,
- 46, 176, 129, 108, 148, 99, 21, 213, 40, 230,
- 1, 78, 128, 3, 55, 240, 34, 29, 216, 8,
- 197, 36, 122, 81, 10, 114, 61, 2, 93, 107,
- 136, 230, 28, 230, 96, 13, 43, 202, 230, 1,
- 1, 56, 128, 119, 10, 146, 150, 251, 240, 65,
- 21, 88, 200, 194, 60, 198, 233, 143, 84, 164,
- 193, 104, 72, 43, 195, 49, 214, 8, 143, 216,
- 49, 226, 157, 197, 208, 70, 251, 216, 193, 5,
- 2, 100, 160, 10, 129, 64, 4, 54, 54, 81,
- 2, 24, 148, 128, 6, 48, 160, 193, 81, 3,
- 202, 0, 115, 120, 99, 19, 19, 40, 128, 1,
- 74, 208, 79, 6, 20, 32, 12, 222, 8, 133,
- 45, 136, 241, 141, 103, 232, 194, 84, 143, 72,
- 195, 15, 196, 112, 9, 87, 248, 226, 22, 28,
- 58, 3, 20, 183, 71, 144, 89, 16, 201, 163,
- 145, 185, 68, 74, 7, 145, 130, 106, 140, 83,
- 15, 136, 40, 131, 181, 154, 48, 6, 111, 140,
- 145, 61, 173, 72, 214, 131, 210, 83, 41, 2,
- 160, 128, 12, 140, 104, 68, 57, 220, 80, 212,
- 106, 224, 50, 151, 250, 248, 69, 9, 24, 208,
- 6, 126, 28, 225, 2, 1, 32, 70, 53, 126,
- 193, 88, 1, 0, 96, 17, 165, 96, 2, 65,
- 113, 16, 6, 76, 96, 98, 27, 202, 16, 43,
- 89, 51, 193, 10, 82, 108, 174, 58, 38, 144,
- 254, 228, 203, 134, 4, 87, 200, 220, 1, 11,
- 64, 160, 66, 16, 12, 80, 128, 118, 216, 195,
- 5, 141, 40, 31, 182, 216, 145, 30, 23, 181,
- 135, 149, 212, 8, 19, 60, 188, 145, 0, 4,
- 100, 225, 19, 59, 155, 7, 13, 78, 80, 130,
- 109, 60, 67, 24, 141, 128, 67, 33, 204, 81,
- 130, 2, 84, 224, 30, 37, 152, 128, 4, 242,
- 113, 167, 121, 216, 162, 152, 39, 120, 6, 8,
- 4, 192, 128, 13, 112, 160, 159, 6, 192, 68,
- 41, 122, 240, 131, 65, 0, 2, 16, 115, 48,
- 171, 51, 238, 3, 69, 41, 254, 195, 173, 181,
- 125, 12, 31, 122, 0, 132, 25, 248, 192, 3,
- 211, 56, 0, 13, 54, 145, 5, 50, 236, 149,
- 126, 236, 104, 17, 60, 186, 113, 44, 73, 73,
- 120, 29, 174, 136, 37, 28, 102, 215, 10, 121,
- 208, 192, 13, 71, 72, 135, 50, 38, 22, 133,
- 66, 164, 163, 187, 12, 216, 6, 7, 24, 112,
- 132, 114, 192, 33, 13, 144, 248, 69, 1, 0,
- 112, 2, 98, 126, 54, 30, 211, 32, 6, 26,
- 120, 11, 12, 32, 244, 64, 12, 115, 240, 195,
- 18, 174, 0, 8, 87, 144, 226, 20, 164, 147,
- 76, 36, 3, 48, 82, 243, 4, 120, 42, 3,
- 182, 193, 10, 86, 48, 3, 18, 20, 32, 0,
- 2, 32, 129, 26, 200, 80, 133, 194, 53, 129,
- 12, 236, 160, 17, 60, 210, 7, 11, 113, 172,
- 227, 204, 225, 144, 129, 254, 97, 65, 33, 12,
- 129, 165, 131, 3, 55, 112, 131, 45, 142, 81,
- 5, 42, 188, 225, 17, 237, 88, 241, 2, 36,
- 107, 128, 69, 196, 66, 13, 130, 120, 6, 26,
- 60, 187, 136, 106, 120, 22, 23, 186, 224, 90,
- 60, 12, 0, 0, 78, 76, 161, 7, 88, 152,
- 67, 16, 92, 176, 4, 34, 92, 97, 11, 91,
- 200, 132, 53, 204, 35, 153, 51, 72, 146, 94,
- 255, 120, 242, 84, 60, 177, 4, 41, 171, 64,
- 5, 59, 0, 2, 5, 18, 128, 1, 56, 220,
- 236, 90, 189, 83, 3, 59, 206, 97, 230, 102,
- 64, 55, 23, 201, 61, 179, 55, 26, 128, 128,
- 52, 188, 162, 24, 204, 128, 196, 52, 56, 0,
- 131, 77, 88, 67, 24, 132, 64, 196, 33, 212,
- 241, 139, 11, 20, 224, 8, 104, 184, 128, 0,
- 170, 129, 8, 53, 100, 193, 25, 16, 0, 0,
- 0, 182, 49, 104, 6, 36, 67, 153, 143, 184,
- 68, 2, 0, 192, 133, 52, 160, 0, 11, 87,
- 120, 129, 11, 88, 192, 110, 18, 144, 128, 8,
- 153, 118, 70, 162, 34, 99, 129, 40, 10, 196,
- 164, 128, 232, 193, 10, 98, 16, 131, 29, 248,
- 27, 8, 133, 224, 32, 33, 132, 123, 173, 70,
- 172, 35, 141, 235, 64, 6, 116, 97, 65, 172,
- 51, 103, 98, 0, 25, 120, 133, 48, 218, 163,
- 138, 84, 252, 51, 27, 232, 160, 6, 51, 160,
- 193, 142, 108, 28, 97, 2, 12, 176, 7, 18,
- 254, 250, 136, 142, 14, 102, 161, 19, 140, 102,
- 64, 59, 178, 189, 1, 109, 188, 34, 20, 133,
- 240, 131, 103, 57, 113, 136, 31, 44, 97, 14,
- 91, 32, 1, 187, 89, 224, 110, 23, 144, 160,
- 8, 96, 240, 3, 46, 146, 44, 149, 15, 4,
- 96, 1, 247, 174, 206, 41, 176, 96, 131, 29,
- 240, 32, 6, 42, 224, 247, 14, 124, 16, 5,
- 58, 88, 221, 193, 85, 240, 2, 51, 194, 113,
- 142, 110, 72, 40, 23, 202, 233, 70, 179, 202,
- 209, 1, 2, 212, 129, 25, 108, 202, 133, 55,
- 208, 192, 129, 18, 152, 227, 30, 230, 216, 6,
- 49, 156, 64, 108, 8, 164, 226, 30, 48, 152,
- 192, 6, 158, 65, 7, 53, 88, 1, 9, 158,
- 61, 194, 52, 102, 76, 12, 109, 8, 35, 22,
- 144, 232, 196, 161, 225, 32, 134, 43, 92, 161,
- 8, 47, 120, 1, 17, 212, 237, 110, 12, 252,
- 28, 211, 156, 128, 140, 18, 36, 41, 144, 215,
- 194, 198, 19, 115, 0, 194, 10, 84, 192, 131,
- 33, 240, 187, 223, 62, 160, 66, 178, 7, 14,
- 49, 50, 208, 233, 96, 231, 152, 16, 123, 230,
- 83, 142, 12, 59, 32, 22, 26, 103, 70, 43,
- 230, 1, 130, 182, 95, 128, 6, 19, 184, 64,
- 240, 139, 234, 134, 120, 84, 99, 197, 109, 240,
- 134, 26, 232, 80, 7, 11, 104, 123, 27, 72,
- 0, 192, 6, 228, 49, 14, 61, 165, 131, 6,
- 0, 144, 0, 43, 4, 254, 49, 136, 43, 16,
- 33, 8, 30, 136, 60, 188, 225, 237, 238, 23,
- 20, 97, 11, 153, 127, 204, 230, 3, 240, 223,
- 234, 140, 2, 11, 83, 142, 58, 15, 202, 80,
- 133, 167, 199, 96, 8, 141, 128, 155, 33, 62,
- 65, 6, 67, 112, 29, 26, 21, 114, 14, 204,
- 144, 83, 212, 112, 14, 222, 80, 118, 98, 128,
- 12, 180, 35, 12, 185, 32, 15, 16, 0, 103,
- 71, 0, 98, 71, 0, 3, 48, 224, 6, 219,
- 48, 15, 143, 32, 9, 28, 48, 1, 188, 80,
- 14, 84, 160, 6, 137, 192, 104, 23, 144, 14,
- 217, 38, 1, 188, 112, 130, 188, 0, 3, 152,
- 149, 10, 230, 50, 8, 150, 22, 4, 50, 0,
- 6, 91, 64, 4, 46, 224, 2, 145, 7, 126,
- 65, 16, 4, 91, 128, 11, 234, 199, 121, 255,
- 16, 23, 178, 81, 7, 82, 32, 2, 168, 22,
- 3, 62, 48, 4, 100, 160, 6, 79, 23, 5,
- 135, 240, 10, 173, 48, 45, 251, 7, 13, 231,
- 160, 38, 102, 118, 14, 117, 82, 39, 126, 0,
- 113, 186, 128, 12, 12, 88, 11, 185, 176, 13,
- 19, 112, 3, 37, 192, 15, 185, 84, 15, 243,
- 16, 15, 234, 112, 12, 136, 80, 10, 237, 64,
- 12, 196, 112, 15, 215, 64, 5, 112, 128, 11,
- 22, 208, 103, 182, 32, 1, 0, 192, 0, 239,
- 5, 80, 23, 208, 6, 207, 80, 8, 96, 3,
- 111, 70, 128, 6, 118, 192, 4, 96, 0, 121,
- 254, 36, 240, 2, 96, 176, 33, 150, 192, 5,
- 92, 224, 43, 235, 39, 16, 103, 224, 121, 144,
- 49, 10, 63, 48, 3, 163, 23, 3, 195, 243,
- 129, 101, 160, 6, 169, 247, 10, 200, 0, 10,
- 204, 209, 10, 194, 16, 14, 201, 195, 34, 7,
- 151, 12, 225, 0, 12, 10, 224, 0, 147, 160,
- 13, 180, 227, 133, 208, 240, 11, 196, 230, 6,
- 253, 112, 12, 159, 208, 119, 86, 103, 8, 214,
- 246, 10, 209, 80, 14, 209, 0, 10, 67, 0,
- 7, 227, 16, 15, 247, 192, 15, 72, 192, 91,
- 246, 176, 13, 169, 176, 8, 110, 144, 10, 214,
- 5, 61, 35, 227, 2, 91, 32, 3, 86, 33,
- 21, 92, 0, 6, 47, 224, 1, 50, 32, 10,
- 176, 17, 137, 63, 72, 137, 142, 113, 10, 98,
- 208, 116, 81, 199, 111, 60, 64, 5, 143, 83,
- 6, 67, 160, 6, 177, 16, 14, 208, 160, 13,
- 106, 194, 12, 200, 160, 12, 218, 112, 12, 82,
- 152, 12, 187, 160, 10, 151, 64, 1, 8, 240,
- 3, 10, 184, 51, 148, 208, 10, 139, 85, 2,
- 37, 176, 9, 253, 32, 12, 134, 80, 6, 251,
- 83, 62, 84, 144, 45, 141, 64, 8, 84, 192,
- 3, 158, 8, 4, 86, 64, 10, 28, 32, 0,
- 56, 224, 13, 194, 176, 11, 222, 80, 14, 202,
- 16, 10, 135, 32, 46, 141, 7, 111, 45, 224,
- 24, 145, 144, 9, 91, 0, 6, 70, 0, 6,
- 112, 101, 116, 72, 247, 254, 15, 123, 112, 6,
- 176, 65, 11, 63, 176, 111, 59, 208, 111, 154,
- 216, 142, 135, 0, 10, 136, 16, 10, 194, 160,
- 13, 201, 160, 13, 117, 34, 14, 208, 128, 12,
- 186, 208, 11, 187, 112, 9, 128, 224, 1, 20,
- 64, 0, 8, 96, 3, 203, 1, 11, 159, 112,
- 83, 175, 80, 15, 52, 208, 118, 196, 144, 15,
- 185, 32, 66, 67, 80, 5, 100, 64, 7, 81,
- 83, 56, 85, 48, 3, 20, 233, 3, 54, 208,
- 3, 157, 192, 0, 0, 64, 12, 208, 0, 10,
- 63, 4, 7, 202, 54, 146, 133, 48, 7, 151,
- 64, 4, 96, 112, 146, 144, 225, 7, 96, 192,
- 5, 226, 40, 21, 245, 38, 69, 158, 48, 23,
- 145, 97, 10, 115, 96, 3, 34, 48, 122, 231,
- 88, 122, 112, 160, 6, 165, 16, 11, 161, 112,
- 12, 202, 112, 9, 151, 16, 14, 226, 32, 143,
- 244, 40, 6, 24, 224, 0, 8, 128, 0, 17,
- 128, 2, 135, 128, 66, 173, 64, 9, 140, 64,
- 9, 185, 208, 15, 196, 144, 10, 191, 192, 15,
- 236, 0, 10, 114, 96, 56, 93, 32, 7, 73,
- 120, 67, 80, 64, 5, 59, 128, 132, 84, 0,
- 4, 107, 48, 104, 5, 240, 13, 194, 0, 10,
- 111, 0, 4, 64, 32, 57, 105, 128, 46, 171,
- 48, 7, 223, 39, 4, 145, 1, 132, 157, 246,
- 105, 2, 49, 11, 115, 33, 142, 167, 240, 3,
- 54, 224, 3, 153, 152, 56, 80, 243, 6, 112,
- 254, 0, 138, 177, 32, 12, 208, 160, 10, 106,
- 130, 13, 0, 24, 14, 197, 128, 148, 107, 208,
- 3, 86, 32, 138, 202, 193, 51, 85, 121, 83,
- 173, 112, 14, 229, 192, 14, 234, 80, 14, 173,
- 160, 87, 101, 0, 60, 33, 148, 132, 112, 32,
- 60, 60, 48, 3, 184, 233, 3, 170, 224, 75,
- 237, 128, 13, 79, 72, 5, 84, 246, 45, 83,
- 0, 136, 221, 71, 4, 50, 64, 147, 29, 178,
- 100, 35, 37, 147, 132, 249, 24, 137, 128, 152,
- 43, 224, 111, 57, 121, 132, 92, 4, 7, 161,
- 160, 12, 111, 162, 11, 115, 32, 153, 199, 176,
- 117, 63, 83, 158, 244, 8, 10, 148, 48, 144,
- 237, 25, 8, 44, 26, 8, 114, 16, 8, 169,
- 193, 8, 11, 41, 56, 133, 195, 3, 244, 99,
- 117, 84, 80, 5, 80, 192, 111, 244, 195, 63,
- 64, 16, 10, 186, 32, 12, 5, 234, 3, 49,
- 48, 3, 195, 153, 6, 88, 48, 50, 240, 246,
- 1, 73, 178, 7, 253, 213, 86, 90, 224, 160,
- 142, 33, 6, 33, 48, 101, 254, 118, 67, 169,
- 39, 8, 175, 208, 132, 210, 179, 11, 189, 176,
- 5, 202, 160, 12, 107, 194, 117, 83, 216, 10,
- 180, 83, 149, 44, 234, 5, 99, 224, 5, 127,
- 224, 5, 110, 58, 6, 178, 89, 6, 74, 51,
- 49, 80, 192, 144, 246, 83, 6, 159, 210, 119,
- 166, 55, 75, 12, 57, 3, 213, 201, 132, 160,
- 160, 6, 81, 48, 4, 254, 51, 48, 3, 89,
- 96, 68, 73, 234, 125, 65, 96, 2, 73, 18,
- 91, 1, 240, 50, 255, 160, 8, 81, 234, 24,
- 142, 176, 4, 33, 32, 2, 137, 57, 3, 84,
- 0, 5, 29, 84, 53, 64, 154, 42, 170, 144,
- 9, 92, 112, 9, 165, 16, 143, 196, 98, 133,
- 12, 184, 51, 104, 170, 166, 99, 176, 166, 115,
- 227, 162, 173, 154, 52, 247, 217, 101, 89, 87,
- 6, 132, 208, 8, 62, 89, 5, 67, 144, 147,
- 19, 195, 3, 43, 96, 3, 81, 240, 10, 141,
- 160, 6, 95, 217, 159, 126, 106, 3, 71, 36,
- 6, 68, 80, 4, 50, 144, 36, 106, 21, 0,
- 108, 5, 165, 147, 42, 21, 166, 96, 169, 83,
- 214, 111, 137, 83, 5, 206, 3, 10, 161, 48,
- 61, 170, 224, 7, 32, 0, 1, 50, 0, 9,
- 186, 64, 39, 86, 104, 120, 202, 161, 170, 140,
- 224, 166, 106, 250, 7, 109, 234, 166, 49, 228,
- 5, 134, 224, 5, 73, 67, 63, 114, 80, 5,
- 183, 154, 58, 55, 164, 2, 177, 73, 6, 80,
- 96, 164, 108, 214, 10, 92, 198, 63, 51, 16,
- 2, 6, 75, 95, 138, 42, 165, 248, 1, 82,
- 34, 117, 16, 166, 80, 23, 155, 115, 11, 87,
- 96, 161, 51, 192, 111, 156, 170, 108, 160, 32,
- 61, 171, 192, 10, 32, 16, 124, 48, 208, 9,
- 189, 128, 148, 208, 16, 14, 176, 72, 59, 55,
- 69, 154, 129, 192, 166, 127, 176, 166, 114, 163,
- 254, 166, 94, 0, 49, 77, 192, 3, 73, 208,
- 4, 115, 67, 6, 160, 128, 171, 132, 160, 6,
- 60, 10, 49, 60, 96, 3, 112, 112, 179, 100,
- 16, 8, 236, 8, 4, 54, 96, 176, 33, 128,
- 2, 40, 192, 2, 68, 160, 4, 213, 116, 77,
- 9, 33, 169, 90, 48, 21, 115, 160, 111, 153,
- 184, 3, 114, 136, 58, 135, 208, 173, 171, 224,
- 10, 253, 132, 6, 81, 113, 10, 172, 240, 38,
- 216, 160, 13, 242, 40, 164, 104, 250, 7, 129,
- 224, 174, 129, 192, 8, 114, 208, 166, 134, 128,
- 63, 17, 147, 56, 77, 32, 155, 132, 32, 138,
- 136, 80, 5, 58, 11, 5, 47, 219, 5, 253,
- 9, 7, 46, 74, 8, 236, 232, 3, 244, 133,
- 2, 71, 139, 180, 44, 16, 4, 73, 178, 100,
- 148, 164, 16, 121, 80, 23, 82, 225, 10, 55,
- 153, 137, 70, 168, 6, 136, 32, 8, 47, 86,
- 8, 165, 160, 9, 19, 96, 6, 142, 193, 7,
- 163, 176, 11, 202, 192, 117, 242, 232, 78, 108,
- 235, 174, 238, 58, 6, 104, 203, 170, 73, 227,
- 5, 73, 48, 179, 65, 139, 171, 175, 80, 109,
- 84, 80, 52, 178, 217, 4, 187, 58, 4, 217,
- 82, 5, 83, 99, 5, 61, 128, 180, 190, 203,
- 2, 46, 192, 180, 78, 36, 73, 254, 197, 184,
- 117, 145, 7, 180, 192, 116, 138, 201, 111, 133,
- 74, 117, 89, 112, 8, 186, 160, 9, 23, 16,
- 25, 159, 171, 83, 240, 254, 120, 66, 104, 58,
- 6, 129, 176, 166, 174, 10, 167, 100, 80, 175,
- 245, 138, 51, 160, 144, 11, 112, 153, 71, 47,
- 84, 62, 49, 91, 122, 116, 0, 60, 81, 0,
- 4, 152, 122, 180, 75, 144, 1, 25, 112, 184,
- 17, 68, 188, 15, 209, 184, 90, 80, 173, 54,
- 80, 168, 167, 39, 60, 22, 243, 6, 208, 43,
- 189, 146, 49, 10, 218, 112, 174, 19, 119, 44,
- 60, 67, 186, 45, 234, 162, 114, 80, 175, 93,
- 86, 6, 159, 0, 10, 177, 11, 7, 81, 112,
- 132, 47, 75, 175, 78, 99, 52, 60, 160, 2,
- 86, 90, 168, 54, 176, 4, 46, 144, 1, 87,
- 112, 141, 213, 113, 6, 245, 102, 111, 16, 33,
- 169, 138, 48, 177, 152, 184, 147, 19, 153, 122,
- 28, 154, 12, 156, 48, 189, 146, 241, 12, 87,
- 8, 13, 26, 215, 30, 237, 89, 11, 200, 128,
- 12, 178, 3, 93, 235, 234, 5, 101, 144, 132,
- 208, 149, 41, 21, 252, 144, 220, 27, 60, 117,
- 250, 116, 161, 228, 163, 132, 116, 5, 46, 144,
- 8, 248, 161, 4, 11, 32, 73, 139, 27, 17,
- 166, 240, 5, 144, 208, 3, 251, 187, 111, 165,
- 39, 135, 136, 240, 10, 146, 41, 192, 146, 113,
- 10, 231, 96, 133, 212, 32, 12, 112, 195, 162,
- 104, 27, 8, 173, 0, 55, 183, 214, 10, 55,
- 85, 149, 79, 200, 173, 144, 99, 96, 170, 35,
- 92, 192, 51, 4, 116, 64, 127, 161, 244, 129,
- 254, 83, 80, 156, 147, 16, 100, 222, 8, 91,
- 80, 116, 0, 103, 51, 17, 193, 192, 10, 145,
- 123, 161, 6, 118, 181, 175, 240, 38, 153, 64,
- 195, 53, 76, 178, 218, 128, 12, 185, 80, 149,
- 109, 251, 7, 132, 32, 7, 134, 240, 7, 49,
- 180, 182, 107, 11, 187, 91, 122, 8, 82, 96,
- 3, 89, 128, 8, 173, 208, 8, 154, 92, 6,
- 141, 208, 8, 129, 96, 8, 3, 103, 117, 207,
- 35, 81, 27, 203, 131, 212, 161, 4, 32, 21,
- 0, 18, 0, 169, 18, 49, 14, 107, 128, 137,
- 251, 150, 122, 87, 43, 12, 245, 8, 12, 27,
- 240, 151, 82, 241, 12, 218, 64, 13, 56, 44,
- 12, 181, 192, 8, 105, 123, 83, 210, 44, 55,
- 160, 204, 162, 148, 64, 48, 185, 16, 10, 161,
- 80, 68, 105, 48, 190, 114, 76, 205, 55, 149,
- 79, 172, 71, 45, 112, 208, 8, 163, 178, 10,
- 201, 128, 203, 176, 161, 5, 39, 60, 73, 30,
- 49, 8, 82, 230, 197, 95, 169, 202, 109, 162,
- 12, 192, 64, 3, 150, 0, 27, 201, 35, 12,
- 108, 34, 12, 210, 220, 162, 55, 229, 162, 110,
- 26, 203, 238, 249, 198, 177, 160, 12, 144, 48,
- 8, 177, 112, 12, 194, 0, 148, 205, 1, 55,
- 210, 44, 205, 229, 67, 7, 201, 6, 42, 12,
- 148, 12, 190, 0, 27, 124, 240, 1, 80, 20,
- 0, 46, 243, 17, 170, 96, 5, 133, 122, 155,
- 31, 168, 202, 14, 141, 254, 12, 189, 128, 4,
- 146, 32, 25, 124, 160, 13, 171, 44, 144, 45,
- 106, 8, 134, 240, 162, 11, 188, 182, 208, 149,
- 66, 229, 169, 13, 151, 160, 10, 247, 88, 10,
- 68, 89, 182, 85, 233, 96, 194, 101, 209, 81,
- 160, 108, 151, 211, 11, 192, 240, 24, 168, 192,
- 7, 42, 243, 209, 11, 144, 200, 30, 145, 12,
- 105, 80, 168, 205, 171, 6, 231, 252, 10, 151,
- 179, 11, 156, 112, 4, 252, 188, 198, 100, 112,
- 205, 46, 26, 208, 114, 243, 162, 238, 233, 133,
- 104, 87, 143, 47, 192, 10, 202, 80, 10, 200,
- 64, 148, 225, 160, 198, 104, 26, 8, 179, 137,
- 183, 114, 120, 8, 166, 162, 212, 190, 66, 43,
- 158, 115, 0, 243, 194, 21, 127, 232, 167, 51,
- 224, 111, 84, 87, 203, 165, 176, 11, 154, 0,
- 3, 220, 244, 24, 189, 16, 206, 14, 214, 182,
- 11, 108, 8, 105, 107, 211, 239, 36, 12, 150,
- 29, 39, 30, 176, 5, 172, 208, 11, 14, 205,
- 12, 218, 80, 11, 235, 73, 9, 44, 42, 155,
- 134, 128, 49, 181, 60, 9, 170, 48, 10, 230,
- 161, 5, 31, 240, 0, 125, 253, 0, 160, 182,
- 23, 147, 64, 180, 23, 58, 117, 84, 23, 5,
- 130, 112, 42, 174, 0, 3, 150, 240, 151, 171,
- 144, 58, 1, 205, 174, 114, 80, 205, 160, 108,
- 214, 3, 25, 209, 185, 160, 13, 202, 208, 0,
- 3, 224, 1, 151, 32, 166, 152, 57, 48, 134,
- 254, 112, 83, 16, 115, 45, 114, 184, 6, 125,
- 112, 7, 123, 160, 5, 241, 178, 0, 125, 61,
- 2, 216, 196, 23, 144, 80, 96, 21, 91, 177,
- 253, 19, 5, 83, 112, 216, 192, 80, 2, 95,
- 96, 23, 82, 234, 9, 165, 128, 8, 65, 27,
- 180, 110, 74, 8, 163, 221, 182, 54, 157, 205,
- 181, 192, 128, 185, 240, 10, 208, 160, 11, 13,
- 160, 0, 24, 0, 6, 208, 32, 158, 208, 208,
- 30, 234, 42, 223, 85, 144, 5, 216, 45, 23,
- 57, 208, 218, 44, 227, 221, 22, 240, 4, 90,
- 241, 29, 170, 64, 157, 215, 170, 147, 196, 147,
- 208, 201, 128, 4, 102, 96, 25, 32, 94, 23,
- 147, 120, 7, 125, 176, 6, 113, 160, 6, 214,
- 60, 55, 106, 122, 223, 114, 4, 79, 39, 148,
- 11, 255, 77, 1, 20, 112, 5, 170, 48, 182,
- 205, 12, 205, 159, 64, 57, 120, 144, 221, 219,
- 157, 3, 38, 80, 43, 101, 195, 50, 19, 238,
- 203, 189, 1, 185, 243, 188, 188, 62, 48, 5,
- 202, 128, 13, 201, 192, 6, 110, 224, 86, 121,
- 0, 226, 82, 174, 4, 34, 126, 6, 36, 222,
- 7, 120, 96, 226, 220, 226, 56, 17, 44, 154,
- 151, 227, 148, 118, 201, 10, 124, 50, 10, 142,
- 176, 33, 215, 225, 227, 77, 2, 228, 182, 242,
- 0, 53, 240, 5, 68, 94, 34, 229, 120, 169,
- 137, 169, 2, 6, 150, 5, 229, 186, 206, 48,
- 64, 16, 166, 160, 8, 192, 81, 62, 229, 32,
- 142, 25, 84, 238, 222, 115, 49, 232, 132, 110,
- 23, 215, 113, 25, 218, 17, 34, 78, 178, 232,
- 181, 98, 1, 109, 30, 32, 37, 162, 16, 151,
- 64, 184, 152, 26, 127, 73, 94, 10, 73, 9,
- 12, 56, 128, 16, 218, 148, 7, 121, 240, 5,
- 182, 17, 234, 162, 158, 3, 184, 129, 27, 218,
- 113, 234, 218, 209, 31, 253, 17, 34, 172, 206,
- 232, 38, 160, 3, 0, 82, 225, 145, 206, 16,
- 148, 142, 169, 116, 126, 164, 186, 144, 12, 187,
- 237, 16, 150, 20, 9, 118, 96, 7, 95, 240,
- 5, 216, 145, 29, 168, 158, 234, 170, 174, 1,
- 31, 160, 3, 184, 17, 236, 120, 33, 235, 179,
- 254, 16, 144, 75, 184, 136, 153, 106, 22, 185,
- 6, 147, 192, 10, 174, 176, 1, 60, 65, 19,
- 145, 240, 230, 207, 222, 17, 128, 64, 184, 33,
- 96, 164, 86, 144, 6, 225, 226, 165, 154, 32,
- 1, 223, 190, 238, 21, 225, 10, 75, 128, 2,
- 54, 240, 3, 66, 148, 6, 228, 178, 11, 192,
- 192, 4, 236, 158, 239, 2, 17, 16, 0, 59};
-
diff --git a/main/main.c b/main/main.c
index 44c61c600..ccb98a647 100644
--- a/main/main.c
+++ b/main/main.c
@@ -86,7 +86,6 @@
#include "php_content_types.h"
#include "php_ticks.h"
-#include "php_logos.h"
#include "php_streams.h"
#include "php_open_temporary_file.h"
@@ -552,7 +551,7 @@ PHP_INI_BEGIN()
PHP_INI_ENTRY("mail.force_extra_parameters",NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnChangeMailForceExtra)
PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY("disable_classes", "", PHP_INI_SYSTEM, NULL)
- PHP_INI_ENTRY("max_file_uploads", "20", PHP_INI_SYSTEM|PHP_INI_PERDIR, NULL)
+ PHP_INI_ENTRY("max_file_uploads", "20", PHP_INI_SYSTEM|PHP_INI_PERDIR, NULL)
STD_PHP_INI_BOOLEAN("allow_url_fopen", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("allow_url_include", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_url_include, php_core_globals, core_globals)
@@ -2166,14 +2165,6 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
return FAILURE;
}
- /* initialize registry for images to be used in phpinfo()
- (this uses configuration parameters from php.ini)
- */
- if (php_init_info_logos() == FAILURE) {
- php_printf("PHP: Unable to initialize info phpinfo logos.\n");
- return FAILURE;
- }
-
zuv.html_errors = 1;
zuv.import_use_extension = ".php";
php_startup_auto_globals(TSRMLS_C);
@@ -2357,7 +2348,6 @@ void php_module_shutdown(TSRMLS_D)
/* Destroys filter & transport registries too */
php_shutdown_stream_wrappers(module_number TSRMLS_CC);
- php_shutdown_info_logos();
UNREGISTER_INI_ENTRIES();
/* close down the ini config */
@@ -2405,10 +2395,6 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
int retval = 0;
EG(exit_status) = 0;
- if (php_handle_special_queries(TSRMLS_C)) {
- zend_file_handle_dtor(primary_file TSRMLS_CC);
- return 0;
- }
#ifndef HAVE_BROKEN_GETCWD
# define OLD_CWD_SIZE 4096
old_cwd = do_alloca(OLD_CWD_SIZE, use_heap);
diff --git a/main/network.c b/main/network.c
index 6c7031f98..b8380b00d 100644
--- a/main/network.c
+++ b/main/network.c
@@ -25,7 +25,10 @@
#include <stddef.h>
+
+
#ifdef PHP_WIN32
+# include <Ws2tcpip.h>
# include "win32/inet.h"
# define O_RDONLY _O_RDONLY
# include "win32/param.h"
diff --git a/main/output.c b/main/output.c
index e100057ca..534e0b627 100644
--- a/main/output.c
+++ b/main/output.c
@@ -1510,7 +1510,7 @@ PHP_FUNCTION(ob_get_status)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &full_status) == FAILURE) {
return;
}
-
+
array_init(return_value);
if (!OG(active)) {
diff --git a/main/php.h b/main/php.h
index 2a93118ac..1c1ffa3a6 100644
--- a/main/php.h
+++ b/main/php.h
@@ -26,7 +26,7 @@
#include <dmalloc.h>
#endif
-#define PHP_API_VERSION 20100412
+#define PHP_API_VERSION 20121113
#define PHP_HAVE_STREAMS
#define YYDEBUG 0
@@ -60,7 +60,6 @@
# else
# define PHPAPI
# endif
-
# define THREAD_LS
# define PHP_DIR_SEPARATOR '/'
# define PHP_EOL "\n"
diff --git a/main/php_config.h.in b/main/php_config.h.in
index cd96c1418..e68ebde4e 100644
--- a/main/php_config.h.in
+++ b/main/php_config.h.in
@@ -559,9 +559,6 @@
/* Have cURL with SSL support */
#undef HAVE_CURL_SSL
-/* */
-#undef HAVE_CURL_VERSION_INFO
-
/* Define to 1 if you have the `cuserid' function. */
#undef HAVE_CUSERID
@@ -2087,7 +2084,10 @@
/* Enable compressed protocol support */
#undef MYSQLND_COMPRESSION_WANTED
-/* Enable SSL support */
+/* Enable mysqlnd code that uses OpenSSL directly */
+#undef MYSQLND_HAVE_SSL
+
+/* Enable core mysqlnd SSL code */
#undef MYSQLND_SSL_SUPPORTED
/* Whether mysqlnd is enabled */
diff --git a/main/php_logos.c b/main/php_logos.c
deleted file mode 100644
index 3689f71e9..000000000
--- a/main/php_logos.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2012 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Hartmut Holzgraefe <hholzgra@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#include "php.h"
-#include "logos.h"
-#include "php_logos.h"
-#include "ext/standard/info.h"
-#include "SAPI.h"
-
-typedef struct _php_info_logo {
- const char *mimetype;
- int mimelen;
- const unsigned char *data;
- int size;
-} php_info_logo;
-
-static HashTable phpinfo_logo_hash;
-
-PHPAPI int php_register_info_logo(char *logo_string, const char *mimetype, const unsigned char *data, int size)
-{
- php_info_logo info_logo;
-
- info_logo.mimetype = mimetype;
- info_logo.mimelen = strlen(mimetype);
- info_logo.data = data;
- info_logo.size = size;
-
- return zend_hash_add(&phpinfo_logo_hash, logo_string, strlen(logo_string), &info_logo, sizeof(php_info_logo), NULL);
-}
-
-PHPAPI int php_unregister_info_logo(char *logo_string)
-{
- return zend_hash_del(&phpinfo_logo_hash, logo_string, strlen(logo_string));
-}
-
-int php_init_info_logos(void)
-{
- if(zend_hash_init(&phpinfo_logo_hash, 0, NULL, NULL, 1)==FAILURE)
- return FAILURE;
-
- php_register_info_logo(PHP_LOGO_GUID , "image/gif", php_logo , sizeof(php_logo));
- php_register_info_logo(PHP_EGG_LOGO_GUID, "image/gif", php_egg_logo, sizeof(php_egg_logo));
- php_register_info_logo(ZEND_LOGO_GUID , "image/gif", zend_logo , sizeof(zend_logo));
-
- return SUCCESS;
-}
-
-int php_shutdown_info_logos(void)
-{
- zend_hash_destroy(&phpinfo_logo_hash);
- return SUCCESS;
-}
-
-#define CONTENT_TYPE_HEADER "Content-Type: "
-int php_info_logos(const char *logo_string TSRMLS_DC)
-{
- php_info_logo *logo_image;
- char *content_header;
- int len;
-
- if(FAILURE==zend_hash_find(&phpinfo_logo_hash, (char *) logo_string, strlen(logo_string), (void **)&logo_image))
- return 0;
-
- len = sizeof(CONTENT_TYPE_HEADER) - 1 + logo_image->mimelen;
- content_header = emalloc(len + 1);
- memcpy(content_header, CONTENT_TYPE_HEADER, sizeof(CONTENT_TYPE_HEADER) - 1);
- memcpy(content_header + sizeof(CONTENT_TYPE_HEADER) - 1 , logo_image->mimetype, logo_image->mimelen);
- content_header[len] = '\0';
- sapi_add_header(content_header, len, 0);
-
- PHPWRITE((char*)logo_image->data, logo_image->size);
- return 1;
-}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/main/php_logos.h b/main/php_logos.h
deleted file mode 100644
index b9e1144c0..000000000
--- a/main/php_logos.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2012 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-
-#ifndef _PHP_LOGOS_H
-#define _PHP_LOGOS_H
-
-BEGIN_EXTERN_C()
-PHPAPI int php_register_info_logo(char *logo_string, const char *mimetype, const unsigned char *data, int size);
-PHPAPI int php_unregister_info_logo(char *logo_string);
-END_EXTERN_C()
-
-int php_init_info_logos(void);
-int php_shutdown_info_logos(void);
-int php_info_logos(const char *logo_string TSRMLS_DC);
-
-#endif /* _PHP_LOGOS_H */
diff --git a/main/php_streams.h b/main/php_streams.h
index 82498d661..291fd0d0a 100755..100644
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -162,10 +162,6 @@ struct _php_stream_wrapper {
php_stream_wrapper_ops *wops; /* operations the wrapper can perform */
void *abstract; /* context for the wrapper */
int is_url; /* so that PG(allow_url_fopen) can be respected */
-
- /* support for wrappers to return (multiple) error messages to the stream opener */
- int err_count; /* unused */
- char **err_stack; /* unusued */
};
#define PHP_STREAM_FLAG_NO_SEEK 1
diff --git a/main/php_variables.c b/main/php_variables.c
index 427966170..9952bd80b 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -27,7 +27,6 @@
#include "php_globals.h"
#include "php_content_types.h"
#include "SAPI.h"
-#include "php_logos.h"
#include "zend_globals.h"
/* for systems that need to override reading of environment variables */
@@ -532,22 +531,6 @@ static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC)
}
/* }}} */
-/* {{{ php_handle_special_queries
- */
-PHPAPI int php_handle_special_queries(TSRMLS_D)
-{
- if (PG(expose_php) && SG(request_info).query_string && SG(request_info).query_string[0] == '=') {
- if (php_info_logos(SG(request_info).query_string + 1 TSRMLS_CC)) {
- return 1;
- } else if (!strcmp(SG(request_info).query_string + 1, PHP_CREDITS_GUID)) {
- php_print_credits(PHP_CREDITS_ALL TSRMLS_CC);
- return 1;
- }
- }
- return 0;
-}
-/* }}} */
-
/* {{{ php_register_server_variables
*/
static inline void php_register_server_variables(TSRMLS_D)
diff --git a/main/php_version.h b/main/php_version.h
index cdd377472..bc4a236dc 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -1,8 +1,8 @@
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
-#define PHP_MINOR_VERSION 4
-#define PHP_RELEASE_VERSION 8
-#define PHP_EXTRA_VERSION ""
-#define PHP_VERSION "5.4.8"
-#define PHP_VERSION_ID 50408
+#define PHP_MINOR_VERSION 5
+#define PHP_RELEASE_VERSION 0
+#define PHP_EXTRA_VERSION "alpha1"
+#define PHP_VERSION "5.5.0alpha1"
+#define PHP_VERSION_ID 50500
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 5da3a9935..3ca2c1131 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -408,7 +408,7 @@ static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header T
/* get lines of text, or CRLF_CRLF */
- while( (line = get_line(self TSRMLS_CC)) && strlen(line) > 0 )
+ while( (line = get_line(self TSRMLS_CC)) && line[0] != '\0' )
{
/* add header to table */
char *key = line;
@@ -979,7 +979,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
continue;
}
- if (strlen(filename) == 0) {
+ if (filename[0] == '\0') {
#if DEBUG_FILE_UPLOAD
sapi_module.sapi_error(E_NOTICE, "No file uploaded");
#endif
@@ -1063,12 +1063,12 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
if (!cancel_upload && !end) {
#if DEBUG_FILE_UPLOAD
- sapi_module.sapi_error(E_NOTICE, "Missing mime boundary at the end of the data for file %s", strlen(filename) > 0 ? filename : "");
+ sapi_module.sapi_error(E_NOTICE, "Missing mime boundary at the end of the data for file %s", filename[0] != '\0' ? filename : "");
#endif
cancel_upload = UPLOAD_ERROR_C;
}
#if DEBUG_FILE_UPLOAD
- if (strlen(filename) > 0 && total_bytes == 0 && !cancel_upload) {
+ if (filename[0] != '\0' && total_bytes == 0 && !cancel_upload) {
sapi_module.sapi_error(E_WARNING, "Uploaded file size 0 - file [%s=%s] not saved", param, filename);
cancel_upload = 5;
}
diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c
index 7b568501e..7b568501e 100755..100644
--- a/main/streams/glob_wrapper.c
+++ b/main/streams/glob_wrapper.c
diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h
index 5767b74d2..19acb0844 100644
--- a/main/streams/php_stream_context.h
+++ b/main/streams/php_stream_context.h
@@ -53,7 +53,6 @@ struct _php_stream_notifier {
struct _php_stream_context {
php_stream_notifier *notifier;
zval *options; /* hash keyed by wrapper family or specific wrapper */
- zval *links; /* hash keyed by hostent for connection pooling */
int rsrc_id; /* used for auto-cleanup */
};
@@ -65,13 +64,6 @@ PHPAPI int php_stream_context_get_option(php_stream_context *context,
PHPAPI int php_stream_context_set_option(php_stream_context *context,
const char *wrappername, const char *optionname, zval *optionvalue);
-PHPAPI int php_stream_context_get_link(php_stream_context *context,
- const char *hostent, php_stream **stream);
-PHPAPI int php_stream_context_set_link(php_stream_context *context,
- const char *hostent, php_stream *stream);
-PHPAPI int php_stream_context_del_link(php_stream_context *context,
- php_stream *stream);
-
PHPAPI php_stream_notifier *php_stream_notification_alloc(void);
PHPAPI void php_stream_notification_free(php_stream_notifier *notifier);
END_EXTERN_C()
diff --git a/main/streams/php_stream_glob_wrapper.h b/main/streams/php_stream_glob_wrapper.h
index c584ff8f8..c584ff8f8 100755..100644
--- a/main/streams/php_stream_glob_wrapper.h
+++ b/main/streams/php_stream_glob_wrapper.h
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 77e411377..80c22ce50 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -113,7 +113,7 @@ typedef struct {
unsigned is_pipe:1; /* don't try and seek */
unsigned cached_fstat:1; /* sb is valid */
unsigned _reserved:29;
-
+
int lock_flag; /* stores the lock state */
char *temp_file_name; /* if non-null, this is the path to a temporary file that
* is to be deleted when the stream is closed */
@@ -139,7 +139,7 @@ static int do_fstat(php_stdio_stream_data *d, int force)
if (!d->cached_fstat || force) {
int fd;
int r;
-
+
PHP_STDIOP_GET_FD(fd, d);
r = fstat(fd, &d->sb);
d->cached_fstat = r == 0;
@@ -152,7 +152,7 @@ static int do_fstat(php_stdio_stream_data *d, int force)
static php_stream *_php_stream_fopen_from_fd_int(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC)
{
php_stdio_stream_data *self;
-
+
self = pemalloc_rel_orig(sizeof(*self), persistent_id);
memset(self, 0, sizeof(*self));
self->file = NULL;
@@ -161,14 +161,14 @@ static php_stream *_php_stream_fopen_from_fd_int(int fd, const char *mode, const
self->is_process_pipe = 0;
self->temp_file_name = NULL;
self->fd = fd;
-
+
return php_stream_alloc_rel(&php_stream_stdio_ops, self, persistent_id, mode);
}
static php_stream *_php_stream_fopen_from_file_int(FILE *file, const char *mode STREAMS_DC TSRMLS_DC)
{
php_stdio_stream_data *self;
-
+
self = emalloc_rel_orig(sizeof(*self));
memset(self, 0, sizeof(*self));
self->file = file;
@@ -213,7 +213,7 @@ PHPAPI php_stream *_php_stream_fopen_tmpfile(int dummy STREAMS_DC TSRMLS_DC)
self->temp_file_name = opened_path;
self->lock_flag = LOCK_UN;
-
+
return stream;
}
close(fd);
@@ -246,7 +246,7 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const cha
}
}
#endif
-
+
if (self->is_pipe) {
stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
} else {
@@ -285,7 +285,7 @@ PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STRE
}
}
#endif
-
+
if (self->is_pipe) {
stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
} else {
@@ -354,9 +354,9 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS
so script can retry if desired */
ret = read(data->fd, buf, count);
}
-
+
stream->eof = (ret == 0 || (ret == (size_t)-1 && errno != EWOULDBLOCK && errno != EINTR && errno != EBADF));
-
+
} else {
#if HAVE_FLUSHIO
if (!data->is_pipe && data->last_op == 'w')
@@ -393,7 +393,7 @@ static int php_stdiop_close(php_stream *stream, int close_handle TSRMLS_DC)
data->file_mapping = NULL;
}
#endif
-
+
if (close_handle) {
if (data->file) {
if (data->is_process_pipe) {
@@ -463,14 +463,14 @@ static int php_stdiop_seek(php_stream *stream, off_t offset, int whence, off_t *
if (data->fd >= 0) {
off_t result;
-
+
result = lseek(data->fd, offset, whence);
if (result == (off_t)-1)
return -1;
*newoffset = result;
return 0;
-
+
} else {
ret = fseek(data->file, offset, whence);
*newoffset = ftell(data->file);
@@ -484,7 +484,7 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
php_stdio_stream_data *data = (php_stdio_stream_data*) stream->abstract;
assert(data != NULL);
-
+
/* as soon as someone touches the stdio layer, buffering may ensue,
* so we need to stop using the fd directly in that case */
@@ -502,7 +502,7 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
return FAILURE;
}
}
-
+
*(FILE**)ret = data->file;
data->fd = -1;
}
@@ -558,9 +558,9 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
int flags;
int oldval;
#endif
-
+
PHP_STDIOP_GET_FD(fd, data);
-
+
switch(option) {
case PHP_STREAM_OPTION_BLOCKING:
if (fd == -1)
@@ -572,20 +572,20 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
flags &= ~O_NONBLOCK;
else
flags |= O_NONBLOCK;
-
+
if (-1 == fcntl(fd, F_SETFL, flags))
return -1;
return oldval;
#else
return -1; /* not yet implemented */
#endif
-
+
case PHP_STREAM_OPTION_WRITE_BUFFER:
if (data->file == NULL) {
return -1;
}
-
+
if (ptrparam)
size = *(size_t *)ptrparam;
else
@@ -594,10 +594,10 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
switch(value) {
case PHP_STREAM_BUFFER_NONE:
return setvbuf(data->file, NULL, _IONBF, 0);
-
+
case PHP_STREAM_BUFFER_LINE:
return setvbuf(data->file, NULL, _IOLBF, size);
-
+
case PHP_STREAM_BUFFER_FULL:
return setvbuf(data->file, NULL, _IOFBF, size);
@@ -605,7 +605,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
return -1;
}
break;
-
+
case PHP_STREAM_OPTION_LOCKING:
if (fd == -1) {
return -1;
@@ -628,7 +628,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
{
php_stream_mmap_range *range = (php_stream_mmap_range*)ptrparam;
int prot, flags;
-
+
switch (value) {
case PHP_STREAM_MMAP_SUPPORTED:
return fd == -1 ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
@@ -793,7 +793,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
return ftruncate(fd, new_size) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR;
}
}
-
+
default:
return PHP_STREAM_OPTION_RETURN_NOTIMPL;
}
@@ -866,7 +866,7 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, char
if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) {
return NULL;
}
-
+
dir = VCWD_OPENDIR(path);
#ifdef PHP_WIN32
@@ -884,7 +884,7 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, char
if (stream == NULL)
closedir(dir);
}
-
+
return stream;
}
/* }}} */
@@ -932,7 +932,7 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, cha
return ret;
}
}
-
+
fd = open(realpath, open_flags, 0666);
if (fd != -1) {
@@ -1001,9 +1001,12 @@ static php_stream *php_plain_files_stream_opener(php_stream_wrapper *wrapper, ch
static int php_plain_files_url_stater(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC)
{
+ char *p;
- if (strncmp(url, "file://", sizeof("file://") - 1) == 0) {
- url += sizeof("file://") - 1;
+ if ((p = strstr(url, "://")) != NULL) {
+ if (p < strchr(url, '/')) {
+ url = p + 3;
+ }
}
if (php_check_open_basedir_ex(url, (flags & PHP_STREAM_URL_STAT_QUIET) ? 0 : 1 TSRMLS_CC)) {
@@ -1032,7 +1035,9 @@ static int php_plain_files_unlink(php_stream_wrapper *wrapper, char *url, int op
int ret;
if ((p = strstr(url, "://")) != NULL) {
- url = p + 3;
+ if (p < strchr(url, '/')) {
+ url = p + 3;
+ }
}
if (php_check_open_basedir(url TSRMLS_CC)) {
@@ -1074,11 +1079,15 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, char *url_from, c
#endif
if ((p = strstr(url_from, "://")) != NULL) {
- url_from = p + 3;
+ if (p < strchr(url_from, '/')) {
+ url_from = p + 3;
+ }
}
if ((p = strstr(url_to, "://")) != NULL) {
- url_to = p + 3;
+ if (p < strchr(url_to, '/')) {
+ url_to = p + 3;
+ }
}
if (php_check_open_basedir(url_from TSRMLS_CC) || php_check_open_basedir(url_to TSRMLS_CC)) {
@@ -1144,7 +1153,9 @@ static int php_plain_files_mkdir(php_stream_wrapper *wrapper, char *dir, int mod
char *p;
if ((p = strstr(dir, "://")) != NULL) {
- dir = p + 3;
+ if (p < strchr(dir, '/')) {
+ dir = p + 3;
+ }
}
if (!recursive) {
@@ -1169,7 +1180,7 @@ static int php_plain_files_mkdir(php_stream_wrapper *wrapper, char *dir, int mod
}
if (p && dir_len == 1) {
- /* buf == "DEFAULT_SLASH" */
+ /* buf == "DEFAULT_SLASH" */
}
else {
/* find a top level directory we need to create */
@@ -1273,7 +1284,9 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, char *url, int
#endif
if ((p = strstr(url, "://")) != NULL) {
- url = p + 3;
+ if (p < strchr(url, '/')) {
+ url = p + 3;
+ }
}
if (php_check_open_basedir(url TSRMLS_CC)) {
@@ -1409,7 +1422,7 @@ not_relative_path:
return php_stream_fopen_rel(filename, mode, opened_path, options);
}
-
+
#ifdef PHP_WIN32
if (IS_SLASH(filename[0])) {
size_t cwd_len;
@@ -1417,17 +1430,17 @@ not_relative_path:
cwd = virtual_getcwd_ex(&cwd_len TSRMLS_CC);
/* getcwd() will return always return [DRIVE_LETTER]:/) on windows. */
*(cwd+3) = '\0';
-
+
if (snprintf(trypath, MAXPATHLEN, "%s%s", cwd, filename) >= MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s/%s path was truncated to %d", cwd, filename, MAXPATHLEN);
}
-
+
free(cwd);
-
+
if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(trypath TSRMLS_CC)) {
return NULL;
}
-
+
return php_stream_fopen_rel(trypath, mode, opened_path, options);
}
#endif
@@ -1479,7 +1492,7 @@ not_relative_path:
if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir_ex(trypath, 0 TSRMLS_CC)) {
goto stream_skip;
}
-
+
stream = php_stream_fopen_rel(trypath, mode, opened_path, options);
if (stream) {
efree(pathbuf);
diff --git a/main/streams/streams.c b/main/streams/streams.c
index e9c2e0732..40b18e9f5 100755..100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -470,11 +470,6 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov
while (zend_list_delete(stream->rsrc_id) == SUCCESS) {}
}
- /* Remove stream from any context link list */
- if (context && context->links) {
- php_stream_context_del_link(context, stream);
- }
-
if (close_options & PHP_STREAM_FREE_CALL_DTOR) {
if (release_cast && stream->fclose_stdiocast == PHP_STREAM_FCLOSE_FOPENCOOKIE) {
/* calling fclose on an fopencookied stream will ultimately
@@ -1060,9 +1055,17 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re
if (has_delim) {
/* search for delimiter, but skip buffered_len (the number of bytes
* buffered before this loop iteration), as they have already been
- * searched for the delimiter */
+ * searched for the delimiter.
+ * The left part of the delimiter may still remain in the buffer,
+ * so subtract up to <delim_len - 1> from buffered_len, which is
+ * the ammount of data we skip on this search as an optimization
+ */
found_delim = _php_stream_search_delim(
- stream, maxlen, buffered_len, delim, delim_len TSRMLS_CC);
+ stream, maxlen,
+ buffered_len >= (delim_len - 1)
+ ? buffered_len - (delim_len - 1)
+ : 0,
+ delim, delim_len TSRMLS_CC);
if (found_delim) {
break;
}
@@ -2180,10 +2183,6 @@ PHPAPI void php_stream_context_free(php_stream_context *context)
php_stream_notification_free(context->notifier);
context->notifier = NULL;
}
- if (context->links) {
- zval_ptr_dtor(&context->links);
- context->links = NULL;
- }
efree(context);
}
@@ -2246,66 +2245,6 @@ PHPAPI int php_stream_context_set_option(php_stream_context *context,
}
return zend_hash_update(Z_ARRVAL_PP(wrapperhash), (char*)optionname, strlen(optionname)+1, (void**)&copied_val, sizeof(zval *), NULL);
}
-
-PHPAPI int php_stream_context_get_link(php_stream_context *context,
- const char *hostent, php_stream **stream)
-{
- php_stream **pstream;
-
- if (!stream || !hostent || !context || !(context->links)) {
- return FAILURE;
- }
- if (SUCCESS == zend_hash_find(Z_ARRVAL_P(context->links), (char*)hostent, strlen(hostent)+1, (void**)&pstream)) {
- *stream = *pstream;
- return SUCCESS;
- }
- return FAILURE;
-}
-
-PHPAPI int php_stream_context_set_link(php_stream_context *context,
- const char *hostent, php_stream *stream)
-{
- if (!context) {
- return FAILURE;
- }
- if (!context->links) {
- ALLOC_INIT_ZVAL(context->links);
- array_init(context->links);
- }
- if (!stream) {
- /* Delete any entry for <hostent> */
- return zend_hash_del(Z_ARRVAL_P(context->links), (char*)hostent, strlen(hostent)+1);
- }
- return zend_hash_update(Z_ARRVAL_P(context->links), (char*)hostent, strlen(hostent)+1, (void**)&stream, sizeof(php_stream *), NULL);
-}
-
-PHPAPI int php_stream_context_del_link(php_stream_context *context,
- php_stream *stream)
-{
- php_stream **pstream;
- char *hostent;
- int ret = SUCCESS;
-
- if (!context || !context->links || !stream) {
- return FAILURE;
- }
-
- for(zend_hash_internal_pointer_reset(Z_ARRVAL_P(context->links));
- SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(context->links), (void**)&pstream);
- zend_hash_move_forward(Z_ARRVAL_P(context->links))) {
- if (*pstream == stream) {
- if (SUCCESS == zend_hash_get_current_key(Z_ARRVAL_P(context->links), &hostent, NULL, 0)) {
- if (FAILURE == zend_hash_del(Z_ARRVAL_P(context->links), (char*)hostent, strlen(hostent)+1)) {
- ret = FAILURE;
- }
- } else {
- ret = FAILURE;
- }
- }
- }
-
- return ret;
-}
/* }}} */
/* {{{ php_stream_dirent_alphasort
diff --git a/makedist b/makedist
index bfc8fcc44..bce40a948 100755
--- a/makedist
+++ b/makedist
@@ -119,8 +119,14 @@ tar cf $ARCHIVE php-$VER || exit 10
bzip2 -9 $ARCHIVE || exit 11
echo ""
+$ECHO_N "makedist: making xz2zipped tar archive...$ECHO_C"
+rm -f $ARCHIVE.xz
+tar cf $ARCHIVE php-$VER || exit 10
+xz -9 $ARCHIVE || exit 12
+echo ""
+
$ECHO_N "makedist: cleaning up...$ECHO_C"
-rm -rf $DIRPATH || exit 12
+rm -rf $DIRPATH || exit 13
echo ""
exit 0
diff --git a/php.ini-development b/php.ini-development
index 4ff4192f6..a97cd0f9d 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -1727,16 +1727,16 @@ mssql.secure_connection = Off
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
; http://php.net/mbstring.internal-encoding
-;mbstring.internal_encoding = EUC-JP
+;mbstring.internal_encoding = UTF-8
; http input encoding.
; http://php.net/mbstring.http-input
-;mbstring.http_input = auto
+;mbstring.http_input = UTF-8
; http output encoding. mb_output_handler must be
; registered as output buffer to function
; http://php.net/mbstring.http-output
-;mbstring.http_output = SJIS
+;mbstring.http_output = pass
; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
@@ -1754,7 +1754,7 @@ mssql.secure_connection = Off
; substitute_character used when character cannot be converted
; one from another
; http://php.net/mbstring.substitute-character
-;mbstring.substitute_character = none;
+;mbstring.substitute_character = none
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
@@ -1768,7 +1768,7 @@ mssql.secure_connection = Off
;mbstring.func_overload = 0
; enable strict encoding detection.
-;mbstring.strict_detection = Off
+;mbstring.strict_detection = On
; This directive specifies the regex pattern of content types for which mb_output_handler()
; is activated.
diff --git a/php.ini-production b/php.ini-production
index 814455bbb..dce8fc970 100644
--- a/php.ini-production
+++ b/php.ini-production
@@ -1727,16 +1727,16 @@ mssql.secure_connection = Off
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
; http://php.net/mbstring.internal-encoding
-;mbstring.internal_encoding = EUC-JP
+;mbstring.internal_encoding = UTF-8
; http input encoding.
; http://php.net/mbstring.http-input
-;mbstring.http_input = auto
+;mbstring.http_input = UTF-8
; http output encoding. mb_output_handler must be
; registered as output buffer to function
; http://php.net/mbstring.http-output
-;mbstring.http_output = SJIS
+;mbstring.http_output = pass
; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
@@ -1754,7 +1754,7 @@ mssql.secure_connection = Off
; substitute_character used when character cannot be converted
; one from another
; http://php.net/mbstring.substitute-character
-;mbstring.substitute_character = none;
+;mbstring.substitute_character = none
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
@@ -1768,7 +1768,7 @@ mssql.secure_connection = Off
;mbstring.func_overload = 0
; enable strict encoding detection.
-;mbstring.strict_detection = Off
+;mbstring.strict_detection = On
; This directive specifies the regex pattern of content types for which mb_output_handler()
; is activated.
diff --git a/run-tests.php b/run-tests.php
index a746c3696..8527df8d4 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -311,6 +311,7 @@ VALGRIND : " . ($leak_check ? $valgrind_header : 'Not used') . "
define('PHP_QA_EMAIL', 'qa-reports@lists.php.net');
define('QA_SUBMISSION_PAGE', 'http://qa.php.net/buildtest-process.php');
define('QA_REPORTS_PAGE', 'http://qa.php.net/reports');
+define('TRAVIS_CI' , (bool) getenv('TRAVIS_PHP_VERSION'));
function save_or_mail_results()
{
@@ -318,7 +319,7 @@ function save_or_mail_results()
$PHP_FAILED_TESTS, $CUR_DIR, $php, $output_file, $compression;
/* We got failed Tests, offer the user to send an e-mail to QA team, unless NO_INTERACTION is set */
- if (!getenv('NO_INTERACTION')) {
+ if (!getenv('NO_INTERACTION') && !TRAVIS_CI) {
$fp = fopen("php://stdin", "r+");
if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED'] || $sum_results['XFAILED']) {
echo "\nYou may have found a problem in PHP.";
@@ -335,8 +336,8 @@ function save_or_mail_results()
$just_save_results = (strtolower($user_input[0]) == 's');
}
- if ($just_save_results || !getenv('NO_INTERACTION')) {
- if ($just_save_results || strlen(trim($user_input)) == 0 || strtolower($user_input[0]) == 'y') {
+ if ($just_save_results || !getenv('NO_INTERACTION') || TRAVIS_CI) {
+ if ($just_save_results || TRAVIS_CI || strlen(trim($user_input)) == 0 || strtolower($user_input[0]) == 'y') {
/*
* Collect information about the host system for our report
* Fetch phpinfo() output so that we can see the PHP enviroment
@@ -348,7 +349,9 @@ function save_or_mail_results()
}
/* Ask the user to provide an email address, so that QA team can contact the user */
- if (!strncasecmp($user_input, 'y', 1) || strlen(trim($user_input)) == 0) {
+ if (TRAVIS_CI) {
+ $user_email = 'travis at php dot net';
+ } elseif (!strncasecmp($user_input, 'y', 1) || strlen(trim($user_input)) == 0) {
echo "\nPlease enter your email address.\n(Your address will be mangled so that it will not go out on any\nmailinglist in plain text): ";
flush();
$user_email = trim(fgets($fp, 1024));
@@ -424,7 +427,7 @@ function save_or_mail_results()
$failed_tests_data .= $sep . "PHPINFO" . $sep;
$failed_tests_data .= shell_exec($php . ' -ddisplay_errors=stderr -dhtml_errors=0 -i 2> /dev/null');
- if ($just_save_results || !mail_qa_team($failed_tests_data, $compression, $status)) {
+ if ($just_save_results || !mail_qa_team($failed_tests_data, $compression, $status) && !TRAVIS_CI) {
file_put_contents($output_file, $failed_tests_data);
if (!$just_save_results) {
@@ -432,7 +435,7 @@ function save_or_mail_results()
}
echo "Please send " . $output_file . " to " . PHP_QA_EMAIL . " manually, thank you.\n";
- } else {
+ } elseif (!getenv('NO_INTERACTION') && !TRAVIS_CI) {
fwrite($fp, "\nThank you for helping to make PHP better.\n");
fclose($fp);
}
diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32
index 8d8a6c4b6..a7547514d 100644
--- a/sapi/apache2handler/config.w32
+++ b/sapi/apache2handler/config.w32
@@ -38,21 +38,21 @@ if (PHP_APACHE2_2HANDLER != "no") {
}
}
-ARG_ENABLE('apache2-3handler', 'Build Apache 2.3.x handler', 'no');
-if (PHP_APACHE2_3HANDLER != "no") {
+ARG_ENABLE('apache2-4handler', 'Build Apache 2.4.x handler', 'no');
+if (PHP_APACHE2_4HANDLER != "no") {
if (PHP_ZTS == "no") {
- WARNING("Apache 2.3 module requires an --enable-zts build of PHP on windows");
- } else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_3HANDLER", PHP_PHP_BUILD + "\\include\\apache2_3") &&
- CHECK_LIB("libhttpd.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3") &&
- CHECK_LIB("libapr-1.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3") &&
- CHECK_LIB("libaprutil-1.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3")
+ WARNING("Apache 2.4 module requires an --enable-zts build of PHP on windows");
+ } else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_4HANDLER", PHP_PHP_BUILD + "\\include\\apache2_4") &&
+ CHECK_LIB("libhttpd.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
+ CHECK_LIB("libapr-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
+ CHECK_LIB("libaprutil-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4")
) {
- SAPI('apache2_3handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
- 'php' + PHP_VERSION + 'apache2_3.dll',
+ SAPI('apache2_4handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
+ 'php' + PHP_VERSION + 'apache2_4.dll',
'/D PHP_APACHE2_EXPORTS /I win32',
'sapi\\apache2handler');
} else {
- WARNING("Could not find apache2.3 libraries/headers");
+ WARNING("Could not find apache 2.4 libraries/headers");
}
}
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 7856e0c58..ceba7174c 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -880,7 +880,6 @@ static int sapi_cgi_activate(TSRMLS_D)
} else {
doc_root = getenv("DOCUMENT_ROOT");
}
-
/* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
if (doc_root) {
doc_root_len = strlen(doc_root);
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 4d15db44a..d0d4cefb9 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -245,10 +245,10 @@ static php_cli_server_http_reponse_status_code_pair status_map[] = {
};
static php_cli_server_http_reponse_status_code_pair template_map[] = {
- { 400, "<h1 class=\"h\">%s</h1><p>Your browser sent a request that this server could not understand.</p>" },
- { 404, "<h1 class=\"h\">%s</h1><p>The requested resource %s was not found on this server.</p>" },
- { 500, "<h1 class=\"h\">%s</h1><p>The server is temporarily unavailable.</p>" },
- { 501, "<h1 class=\"h\">%s</h1><p>Request method not supported.</p>" }
+ { 400, "<h1>%s</h1><p>Your browser sent a request that this server could not understand.</p>" },
+ { 404, "<h1>%s</h1><p>The requested resource %s was not found on this server.</p>" },
+ { 500, "<h1>%s</h1><p>The server is temporarily unavailable.</p>" },
+ { 501, "<h1>%s</h1><p>Request method not supported.</p>" }
};
static php_cli_server_ext_mime_type_pair mime_type_map[] = {
@@ -279,22 +279,10 @@ ZEND_DECLARE_MODULE_GLOBALS(cli_server);
/* {{{ static char php_cli_server_css[]
* copied from ext/standard/info.c
*/
-static const char php_cli_server_css[] = "<style type=\"text/css\">\n" \
- "body {background-color: #ffffff; color: #000000;}\n" \
- "body, td, th, h1, h2 {font-family: sans-serif;}\n" \
- ".center {text-align: center;}\n" \
- ".center table { margin-left: auto; margin-right: auto; text-align: left;}\n" \
- ".center th { text-align: center !important; }\n" \
- "h1 {font-size: 150%;}\n" \
- "h2 {font-size: 125%;}\n" \
- ".p {text-align: left;}\n" \
- ".e {background-color: #ccccff; font-weight: bold; color: #000000;}\n" \
- ".h {background-color: #9999cc; font-weight: bold; color: #000000;}\n" \
- ".v {background-color: #cccccc; color: #000000;}\n" \
- ".vr {background-color: #cccccc; text-align: right; color: #000000;}\n" \
- "img {float: right; border: 0px;}\n" \
- "hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}\n" \
- "</style>\n";
+static const char php_cli_server_css[] = "<style>\n" \
+ "body { background-color: #ffffff; color: #000000; }\n" \
+ "h1 { font-family: sans-serif; font-size: 150%; background-color: #9999cc; font-weight: bold; color: #000000; margin-top: 0;}\n" \
+ "</style>\n";
/* }}} */
static void char_ptr_dtor_p(char **p) /* {{{ */
@@ -1757,7 +1745,7 @@ static int php_cli_server_send_error_page(php_cli_server *server, php_cli_server
escaped_request_uri = php_escape_html_entities_ex((unsigned char *)client->request.request_uri, client->request.request_uri_len, &escaped_request_uri_len, 0, ENT_QUOTES, NULL, 0 TSRMLS_CC);
{
- static const char prologue_template[] = "<html><head><title>%d %s</title>";
+ static const char prologue_template[] = "<!doctype html><html><head><title>%d %s</title>";
php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(strlen(prologue_template) + 3 + strlen(status_string) + 1);
if (!chunk) {
goto fail;
@@ -1949,40 +1937,38 @@ static int php_cli_server_request_shutdown(php_cli_server *server, php_cli_serve
static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server_client *client TSRMLS_DC) /* {{{ */
{
int decline = 0;
- if (!php_handle_special_queries(TSRMLS_C)) {
- zend_file_handle zfd;
- char *old_cwd;
-
- ALLOCA_FLAG(use_heap)
- old_cwd = do_alloca(MAXPATHLEN, use_heap);
- old_cwd[0] = '\0';
- php_ignore_value(VCWD_GETCWD(old_cwd, MAXPATHLEN - 1));
-
- zfd.type = ZEND_HANDLE_FILENAME;
- zfd.filename = server->router;
- zfd.handle.fp = NULL;
- zfd.free_filename = 0;
- zfd.opened_path = NULL;
-
- zend_try {
- zval *retval = NULL;
- if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, &retval, 1, &zfd)) {
- if (retval) {
- decline = Z_TYPE_P(retval) == IS_BOOL && !Z_LVAL_P(retval);
- zval_ptr_dtor(&retval);
- }
- } else {
- decline = 1;
+ zend_file_handle zfd;
+ char *old_cwd;
+
+ ALLOCA_FLAG(use_heap)
+ old_cwd = do_alloca(MAXPATHLEN, use_heap);
+ old_cwd[0] = '\0';
+ php_ignore_value(VCWD_GETCWD(old_cwd, MAXPATHLEN - 1));
+
+ zfd.type = ZEND_HANDLE_FILENAME;
+ zfd.filename = server->router;
+ zfd.handle.fp = NULL;
+ zfd.free_filename = 0;
+ zfd.opened_path = NULL;
+
+ zend_try {
+ zval *retval = NULL;
+ if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, &retval, 1, &zfd)) {
+ if (retval) {
+ decline = Z_TYPE_P(retval) == IS_BOOL && !Z_LVAL_P(retval);
+ zval_ptr_dtor(&retval);
}
- } zend_end_try();
-
- if (old_cwd[0] != '\0') {
- php_ignore_value(VCWD_CHDIR(old_cwd));
+ } else {
+ decline = 1;
}
+ } zend_end_try();
- free_alloca(old_cwd, use_heap);
+ if (old_cwd[0] != '\0') {
+ php_ignore_value(VCWD_CHDIR(old_cwd));
}
+ free_alloca(old_cwd, use_heap);
+
return decline;
}
/* }}} */
diff --git a/sapi/cli/tests/003-2.phpt b/sapi/cli/tests/003-2.phpt
index 2ed9b07db..2ed9b07db 100755..100644
--- a/sapi/cli/tests/003-2.phpt
+++ b/sapi/cli/tests/003-2.phpt
diff --git a/sapi/cli/tests/php_cli_server_011.phpt b/sapi/cli/tests/php_cli_server_011.phpt
deleted file mode 100644
index a957a8ed4..000000000
--- a/sapi/cli/tests/php_cli_server_011.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Bug #60180 ($_SERVER["PHP_SELF"] incorrect)
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-include "php_cli_server.inc";
-php_cli_server_start('sytanx error;', TRUE);
-
-list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
-$port = intval($port)?:80;
-
-$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
-if (!$fp) {
- die("connect failed");
-}
-
-$logo_id = php_logo_guid();
-
-if(fwrite($fp, <<<HEADER
-GET /?={$logo_id} HTTP/1.1
-Host: {$host}
-
-
-HEADER
-)) {
- while (!feof($fp)) {
- if (("Content-Type: image/gif") == trim(fgets($fp))) {
- echo "okey";
- break;
- }
- }
-}
-
-fclose($fp);
-
-?>
---EXPECTF--
-okey
diff --git a/sapi/cli/tests/php_cli_server_013.phpt b/sapi/cli/tests/php_cli_server_013.phpt
index 18b7375b3..570798a88 100644
--- a/sapi/cli/tests/php_cli_server_013.phpt
+++ b/sapi/cli/tests/php_cli_server_013.phpt
@@ -33,7 +33,7 @@ HEADER
}
}
-echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
+echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
fclose($fp);
@@ -55,7 +55,7 @@ HEADER
}
}
-echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
+echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
fclose($fp);
$output = '';
@@ -76,7 +76,7 @@ HEADER
}
}
-echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
+echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
fclose($fp);
?>
--EXPECTF--
@@ -87,22 +87,22 @@ Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: %d
-<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
-</head><body><h1 class="h">Not Found</h1><p>The requested resource / was not found on this server.</p></body></html>
+<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
+</head><body><h1>Not Found</h1><p>The requested resource / was not found on this server.</p></body></html>
HTTP/1.1 404 Not Found
Host: %s
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: %d
-<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
-</head><body><h1 class="h">Not Found</h1><p>The requested resource /main/style.css was not found on this server.</p></body></html>
+<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
+</head><body><h1>Not Found</h1><p>The requested resource /main/style.css was not found on this server.</p></body></html>
HTTP/1.1 404 Not Found
Host: %s
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: %d
-<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
-</head><body><h1 class="h">Not Found</h1><p>The requested resource /main/foo/bar was not found on this server.</p></body></html>
+<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
+</head><body><h1>Not Found</h1><p>The requested resource /main/foo/bar was not found on this server.</p></body></html>
diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt
index 2eca8706b..f8a990561 100644
--- a/sapi/cli/tests/php_cli_server_014.phpt
+++ b/sapi/cli/tests/php_cli_server_014.phpt
@@ -57,7 +57,7 @@ HEADER
}
}
-echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
+echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
fclose($fp);
?>
@@ -76,5 +76,5 @@ Connection: close
Content-Type: %s
Content-Length: %d
-<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
-</head><body><h1 class="h">Not Found</h1><p>The requested resource /main/no-exists.php was not found on this server.</p></body></html>
+<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
+</head><body><h1>Not Found</h1><p>The requested resource /main/no-exists.php was not found on this server.</p></body></html>
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index 6191c329b..3a2690ee2 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -587,16 +587,12 @@ if test "$PHP_FPM" != "no"; then
AC_DEFINE_UNQUOTED(PHP_FPM_USER, "$php_fpm_user", [fpm user name])
AC_DEFINE_UNQUOTED(PHP_FPM_GROUP, "$php_fpm_group", [fpm group name])
- AC_DEFINE_UNQUOTED(PHP_FPM_USER, "$php_fpm_user", [fpm user name])
- AC_DEFINE_UNQUOTED(PHP_FPM_GROUP, "$php_fpm_group", [fpm group name])
-
PHP_ADD_BUILD_DIR(sapi/fpm/fpm)
PHP_ADD_BUILD_DIR(sapi/fpm/fpm/events)
PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
SAPI_FPM_PATH=sapi/fpm/php-fpm
-
if test "$fpm_trace_type" && test -f "$abs_srcdir/sapi/fpm/fpm/fpm_trace_$fpm_trace_type.c"; then
PHP_FPM_TRACE_FILES="fpm/fpm_trace.c fpm/fpm_trace_$fpm_trace_type.c"
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index bb532d836..338b8e9d1 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -75,8 +75,7 @@ static int lsapi_mode = 1;
static char *php_self = "";
static char *script_filename = "";
static int source_highlight = 0;
-static char * argv0 = NULL;
-static int engine = 1;
+
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
@@ -91,65 +90,40 @@ zend_module_entry litespeed_module_entry;
*/
static int php_lsapi_startup(sapi_module_struct *sapi_module)
{
- if (php_module_startup(sapi_module, NULL, 0)==FAILURE) {
- return FAILURE;
- }
- argv0 = sapi_module->executable_location;
- return SUCCESS;
+ if (php_module_startup(sapi_module, NULL, 0)==FAILURE) {
+ return FAILURE;
+ }
+ return SUCCESS;
}
/* }}} */
-/* {{{ sapi_lsapi_ini_defaults */
-
-/* overwriteable ini defaults must be set in sapi_cli_ini_defaults() */
-#define INI_DEFAULT(name,value)\
- ZVAL_STRING(tmp, value, 0);\
- zend_hash_update(configuration_hash, name, sizeof(name), tmp, sizeof(zval), (void**)&entry);\
- Z_STRVAL_P(entry) = zend_strndup(Z_STRVAL_P(entry), Z_STRLEN_P(entry))
-
-static void sapi_lsapi_ini_defaults(HashTable *configuration_hash)
-{
- zval *tmp, *entry;
-
-#if PHP_MAJOR_VERSION > 4
-/*
- MAKE_STD_ZVAL(tmp);
-
- INI_DEFAULT("register_long_arrays", "0");
-
- FREE_ZVAL(tmp);
-*/
-#endif
-
-}
-/* }}} */
/* {{{ sapi_lsapi_ub_write
*/
static int sapi_lsapi_ub_write(const char *str, uint str_length TSRMLS_DC)
{
- int ret;
- int remain;
- if ( lsapi_mode ) {
- ret = LSAPI_Write( str, str_length );
- if ( ret < str_length ) {
- php_handle_aborted_connection();
- return str_length - ret;
- }
- } else {
- remain = str_length;
- while( remain > 0 ) {
- ret = write( 1, str, remain );
- if ( ret <= 0 ) {
- php_handle_aborted_connection();
- return str_length - remain;
- }
- str += ret;
- remain -= ret;
- }
- }
- return str_length;
+ int ret;
+ int remain;
+ if ( lsapi_mode ) {
+ ret = LSAPI_Write( str, str_length );
+ if ( ret < str_length ) {
+ php_handle_aborted_connection();
+ return str_length - ret;
+ }
+ } else {
+ remain = str_length;
+ while( remain > 0 ) {
+ ret = write( 1, str, remain );
+ if ( ret <= 0 ) {
+ php_handle_aborted_connection();
+ return str_length - remain;
+ }
+ str += ret;
+ remain -= ret;
+ }
+ }
+ return str_length;
}
/* }}} */
@@ -158,11 +132,11 @@ static int sapi_lsapi_ub_write(const char *str, uint str_length TSRMLS_DC)
*/
static void sapi_lsapi_flush( void * server_context )
{
- if ( lsapi_mode ) {
- if ( LSAPI_Flush() == -1) {
- php_handle_aborted_connection();
- }
- }
+ if ( lsapi_mode ) {
+ if ( LSAPI_Flush() == -1) {
+ php_handle_aborted_connection();
+ }
+ }
}
/* }}} */
@@ -171,12 +145,8 @@ static void sapi_lsapi_flush( void * server_context )
*/
static int sapi_lsapi_deactivate(TSRMLS_D)
{
- if ( SG(request_info).path_translated )
- {
- efree( SG(request_info).path_translated );
- }
-
- return SUCCESS;
+ LSAPI_Finish();
+ return SUCCESS;
}
/* }}} */
@@ -187,99 +157,46 @@ static int sapi_lsapi_deactivate(TSRMLS_D)
*/
static char *sapi_lsapi_getenv( char * name, size_t name_len TSRMLS_DC )
{
- if ( lsapi_mode ) {
- return LSAPI_GetEnv( name );
- } else {
- return getenv( name );
- }
+ if ( lsapi_mode ) {
+ return LSAPI_GetEnv( name );
+ } else {
+ return getenv( name );
+ }
}
/* }}} */
-/*
-static int add_variable( const char * pKey, int keyLen, const char * pValue, int valLen,
- void * arg )
-{
- php_register_variable_safe((char *)pKey, (char *)pValue, valLen, (zval *)arg TSRMLS_CC);
- return 1;
-}
-*/
static int add_variable( const char * pKey, int keyLen, const char * pValue, int valLen,
- void * arg )
+ void * arg )
{
- zval * gpc_element, **gpc_element_p;
- HashTable * symtable1 = Z_ARRVAL_P((zval * )arg);
- register char * pKey1 = (char *)pKey;
-
- MAKE_STD_ZVAL(gpc_element);
- Z_STRLEN_P( gpc_element ) = valLen;
- Z_STRVAL_P( gpc_element ) = estrndup(pValue, valLen);
- Z_TYPE_P( gpc_element ) = IS_STRING;
-#if PHP_MAJOR_VERSION > 4
- zend_symtable_update( symtable1, pKey1, keyLen + 1, &gpc_element, sizeof( zval *), (void **) &gpc_element_p );
-#else
- zend_hash_update( symtable1, pKey1, keyLen + 1, &gpc_element, sizeof( zval *), (void **) &gpc_element_p );
-#endif
- return 1;
+ php_register_variable_safe((char *)pKey, (char *)pValue, valLen, (zval *)arg TSRMLS_CC);
+ return 1;
}
-#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
-static int add_variable_magic_quote( const char * pKey, int keyLen, const char * pValue, int valLen,
- void * arg )
-{
- zval * gpc_element, **gpc_element_p;
- HashTable * symtable1 = Z_ARRVAL_P((zval * )arg);
- register char * pKey1 = (char *)pKey;
-
- MAKE_STD_ZVAL(gpc_element);
- Z_STRLEN_P( gpc_element ) = valLen;
- Z_STRVAL_P( gpc_element ) = php_addslashes((char *)pValue, valLen, &Z_STRLEN_P( gpc_element ), 0 );
- Z_TYPE_P( gpc_element ) = IS_STRING;
-#if PHP_MAJOR_VERSION > 4
- zend_symtable_update( symtable1, pKey1, keyLen + 1, &gpc_element, sizeof( zval *), (void **) &gpc_element_p );
-#else
- zend_hash_update( symtable1, pKey1, keyLen + 1, &gpc_element, sizeof( zval *), (void **) &gpc_element_p );
-#endif
- return 1;
-}
-
-#endif
/* {{{ sapi_lsapi_register_variables
*/
static void sapi_lsapi_register_variables(zval *track_vars_array TSRMLS_DC)
{
- char * php_self = "";
- if ( lsapi_mode ) {
- if ( (SG(request_info).request_uri ) )
- php_self = (SG(request_info).request_uri );
-#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
- if (!PG(magic_quotes_gpc)) {
-#endif
- LSAPI_ForeachHeader( add_variable, track_vars_array );
- LSAPI_ForeachEnv( add_variable, track_vars_array );
- add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
-#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
- } else {
- LSAPI_ForeachHeader( add_variable_magic_quote, track_vars_array );
- LSAPI_ForeachEnv( add_variable_magic_quote, track_vars_array );
- add_variable_magic_quote("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
- }
-#endif
- php_import_environment_variables(track_vars_array TSRMLS_CC);
- } else {
- php_import_environment_variables(track_vars_array TSRMLS_CC);
+ if ( lsapi_mode ) {
+ LSAPI_ForeachHeader( add_variable, track_vars_array );
+ LSAPI_ForeachEnv( add_variable, track_vars_array );
+ php_import_environment_variables(track_vars_array TSRMLS_CC);
- php_register_variable("PHP_SELF", php_self, track_vars_array TSRMLS_CC);
- php_register_variable("SCRIPT_NAME", php_self, track_vars_array TSRMLS_CC);
- php_register_variable("SCRIPT_FILENAME", script_filename, track_vars_array TSRMLS_CC);
- php_register_variable("PATH_TRANSLATED", script_filename, track_vars_array TSRMLS_CC);
- php_register_variable("DOCUMENT_ROOT", "", track_vars_array TSRMLS_CC);
+ php_register_variable("PHP_SELF", (SG(request_info).request_uri ? SG(request_info).request_uri:""), track_vars_array TSRMLS_CC);
+ } else {
+ php_import_environment_variables(track_vars_array TSRMLS_CC);
- }
+ php_register_variable("PHP_SELF", php_self, track_vars_array TSRMLS_CC);
+ php_register_variable("SCRIPT_NAME", php_self, track_vars_array TSRMLS_CC);
+ php_register_variable("SCRIPT_FILENAME", script_filename, track_vars_array TSRMLS_CC);
+ php_register_variable("PATH_TRANSLATED", script_filename, track_vars_array TSRMLS_CC);
+ php_register_variable("DOCUMENT_ROOT", "", track_vars_array TSRMLS_CC);
+
+ }
}
/* }}} */
@@ -288,11 +205,11 @@ static void sapi_lsapi_register_variables(zval *track_vars_array TSRMLS_DC)
*/
static int sapi_lsapi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
{
- if ( lsapi_mode ) {
- return LSAPI_ReadReqBody( buffer, count_bytes );
- } else {
- return 0;
- }
+ if ( lsapi_mode ) {
+ return LSAPI_ReadReqBody( buffer, count_bytes );
+ } else {
+ return 0;
+ }
}
/* }}} */
@@ -303,11 +220,11 @@ static int sapi_lsapi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
*/
static char *sapi_lsapi_read_cookies(TSRMLS_D)
{
- if ( lsapi_mode ) {
- return LSAPI_GetHeader( H_COOKIE );
- } else {
- return NULL;
- }
+ if ( lsapi_mode ) {
+ return LSAPI_GetHeader( H_COOKIE );
+ } else {
+ return NULL;
+ }
}
/* }}} */
@@ -316,33 +233,33 @@ static char *sapi_lsapi_read_cookies(TSRMLS_D)
*/
static int sapi_lsapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
{
- sapi_header_struct *h;
- zend_llist_position pos;
- if ( lsapi_mode ) {
- LSAPI_SetRespStatus( SG(sapi_headers).http_response_code );
-
- h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
- while (h) {
- if ( h->header_len > 0 ) {
- LSAPI_AppendRespHeader(h->header, h->header_len);
- }
- h = zend_llist_get_next_ex(&sapi_headers->headers, &pos);
- }
- if (SG(sapi_headers).send_default_content_type) {
- char *hd;
- int len;
- char headerBuf[SAPI_LSAPI_MAX_HEADER_LENGTH];
-
- hd = sapi_get_default_content_type(TSRMLS_C);
- len = snprintf( headerBuf, SAPI_LSAPI_MAX_HEADER_LENGTH - 1,
- "Content-type: %s", hd );
- efree(hd);
-
- LSAPI_AppendRespHeader( headerBuf, len );
- }
- }
- LSAPI_FinalizeRespHeaders();
- return SAPI_HEADER_SENT_SUCCESSFULLY;
+ sapi_header_struct *h;
+ zend_llist_position pos;
+ if ( lsapi_mode ) {
+ LSAPI_SetRespStatus( SG(sapi_headers).http_response_code );
+
+ h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
+ while (h) {
+ if ( h->header_len > 0 ) {
+ LSAPI_AppendRespHeader(h->header, h->header_len);
+ }
+ h = zend_llist_get_next_ex(&sapi_headers->headers, &pos);
+ }
+ if (SG(sapi_headers).send_default_content_type) {
+ char *hd;
+ int len;
+ char headerBuf[SAPI_LSAPI_MAX_HEADER_LENGTH];
+
+ hd = sapi_get_default_content_type(TSRMLS_C);
+ len = snprintf( headerBuf, SAPI_LSAPI_MAX_HEADER_LENGTH - 1,
+ "Content-type: %s", hd );
+ efree(hd);
+
+ LSAPI_AppendRespHeader( headerBuf, len );
+ }
+ }
+ LSAPI_FinalizeRespHeaders();
+ return SAPI_HEADER_SENT_SUCCESSFULLY;
}
@@ -353,8 +270,8 @@ static int sapi_lsapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
*/
static void sapi_lsapi_log_message(char *message TSRMLS_DC)
{
- int len = strlen( message );
- LSAPI_Write_Stderr( message, len);
+ int len = strlen( message );
+ LSAPI_Write_Stderr( message, len);
}
/* }}} */
@@ -363,247 +280,158 @@ static void sapi_lsapi_log_message(char *message TSRMLS_DC)
*/
static sapi_module_struct lsapi_sapi_module =
{
- "litespeed",
- "LiteSpeed V5.5",
+ "litespeed",
+ "LiteSpeed",
- php_lsapi_startup, /* startup */
- php_module_shutdown_wrapper, /* shutdown */
+ php_lsapi_startup, /* startup */
+ php_module_shutdown_wrapper, /* shutdown */
- NULL, /* activate */
- sapi_lsapi_deactivate, /* deactivate */
+ NULL, /* activate */
+ sapi_lsapi_deactivate, /* deactivate */
- sapi_lsapi_ub_write, /* unbuffered write */
- sapi_lsapi_flush, /* flush */
- NULL, /* get uid */
- sapi_lsapi_getenv, /* getenv */
+ sapi_lsapi_ub_write, /* unbuffered write */
+ sapi_lsapi_flush, /* flush */
+ NULL, /* get uid */
+ sapi_lsapi_getenv, /* getenv */
- php_error, /* error handler */
+ php_error, /* error handler */
- NULL, /* header handler */
- sapi_lsapi_send_headers, /* send headers handler */
- NULL, /* send header handler */
+ NULL, /* header handler */
+ sapi_lsapi_send_headers, /* send headers handler */
+ NULL, /* send header handler */
- sapi_lsapi_read_post, /* read POST data */
- sapi_lsapi_read_cookies, /* read Cookies */
+ sapi_lsapi_read_post, /* read POST data */
+ sapi_lsapi_read_cookies, /* read Cookies */
- sapi_lsapi_register_variables, /* register server variables */
- sapi_lsapi_log_message, /* Log message */
+ sapi_lsapi_register_variables, /* register server variables */
+ sapi_lsapi_log_message, /* Log message */
- NULL, /* php.ini path override */
- NULL, /* block interruptions */
- NULL, /* unblock interruptions */
- NULL, /* default post reader */
- NULL, /* treat data */
- NULL, /* executable location */
+ NULL, /* php.ini path override */
+ NULL, /* block interruptions */
+ NULL, /* unblock interruptions */
+ NULL, /* default post reader */
+ NULL, /* treat data */
+ NULL, /* executable location */
- 0, /* php.ini ignore */
+ 0, /* php.ini ignore */
- STANDARD_SAPI_MODULE_PROPERTIES
+ STANDARD_SAPI_MODULE_PROPERTIES
};
/* }}} */
static int init_request_info( TSRMLS_D )
{
- char * pContentType = LSAPI_GetHeader( H_CONTENT_TYPE );
- char * pAuth;
-
- SG(request_info).content_type = pContentType ? pContentType : "";
- SG(request_info).request_method = LSAPI_GetRequestMethod();
- SG(request_info).query_string = LSAPI_GetQueryString();
- SG(request_info).request_uri = LSAPI_GetScriptName();
- SG(request_info).content_length = LSAPI_GetReqBodyLen();
- SG(request_info).path_translated = estrdup( LSAPI_GetScriptFileName());
-
- /* It is not reset by zend engine, set it to 0. */
- SG(sapi_headers).http_response_code = 0;
-
- pAuth = LSAPI_GetHeader( H_AUTHORIZATION );
- php_handle_auth_data(pAuth TSRMLS_CC);
-}
-
-static char s_cur_chdir[4096] = "";
+ char * pContentType = LSAPI_GetHeader( H_CONTENT_TYPE );
+ char * pAuth;
+
+ SG(request_info).content_type = pContentType ? pContentType : "";
+ SG(request_info).request_method = LSAPI_GetRequestMethod();
+ SG(request_info).query_string = LSAPI_GetQueryString();
+ SG(request_info).request_uri = LSAPI_GetScriptName();
+ SG(request_info).content_length = LSAPI_GetReqBodyLen();
+ SG(request_info).path_translated = LSAPI_GetScriptFileName();
-static int lsapi_chdir_primary_script( zend_file_handle * file_handle )
-{
-#if PHP_MAJOR_VERSION > 4
- char * p;
- char ch;
-
- SG(options) |= SAPI_OPTION_NO_CHDIR;
- getcwd( s_cur_chdir, sizeof( s_cur_chdir ) );
-
- p = strrchr( file_handle->filename, '/' );
- if ( *p )
- {
- *p = 0;
- if ( strcmp( file_handle->filename, s_cur_chdir ) != 0 ) {
- chdir( file_handle->filename );
- }
- *p++ = '/';
- ch = *p;
- *p = 0;
- if ( !CWDG(cwd).cwd ||
- ( strcmp( file_handle->filename, CWDG(cwd).cwd ) != 0 ) ) {
- CWDG(cwd).cwd_length = p - file_handle->filename;
- CWDG(cwd).cwd = (char *) realloc(CWDG(cwd).cwd, CWDG(cwd).cwd_length+1);
- memmove( CWDG(cwd).cwd, file_handle->filename, CWDG(cwd).cwd_length+1 );
- }
- *p = ch;
- }
- /* virtual_file_ex(&CWDG(cwd), file_handle->filename, NULL, CWD_REALPATH); */
-#else
- VCWD_CHDIR_FILE( file_handle->filename );
-#endif
- return 0;
-}
-
-static int lsapi_fopen_primary_script( zend_file_handle * file_handle )
-{
- FILE * fp;
- char * p;
- fp = fopen( SG(request_info).path_translated, "rb" );
- if ( !fp )
- {
- return -1;
- }
- file_handle->type = ZEND_HANDLE_FP;
- file_handle->handle.fp = fp;
- file_handle->filename = SG(request_info).path_translated;
- file_handle->free_filename = 0;
- file_handle->opened_path = NULL;
-
- lsapi_chdir_primary_script( file_handle );
-
- return 0;
+ /* It is not reset by zend engine, set it to 0. */
+ SG(sapi_headers).http_response_code = 0;
+
+ pAuth = LSAPI_GetHeader( H_AUTHORIZATION );
+ php_handle_auth_data(pAuth TSRMLS_CC);
}
-static int lsapi_execute_script( zend_file_handle * file_handle TSRMLS_DC)
+static int lsapi_module_main(int show_source TSRMLS_DC)
{
- char *p;
- int len;
- file_handle->type = ZEND_HANDLE_FILENAME;
- file_handle->handle.fd = 0;
- file_handle->filename = SG(request_info).path_translated;
- file_handle->free_filename = 0;
- file_handle->opened_path = NULL;
-
- p = argv0;
- *p++ = ':';
- len = strlen( SG(request_info).path_translated );
- if ( len > 45 )
- len = len - 45;
- else
- len = 0;
- memccpy( p, SG(request_info).path_translated + len, 0, 46 );
-
- php_execute_script(file_handle TSRMLS_CC);
- return 0;
+ zend_file_handle file_handle = {0};
-}
+ if (php_request_startup(TSRMLS_C) == FAILURE ) {
+ return -1;
+ }
+ if (show_source) {
+ zend_syntax_highlighter_ini syntax_highlighter_ini;
+ php_get_highlight_struct(&syntax_highlighter_ini);
+ highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC);
+ } else {
+ file_handle.type = ZEND_HANDLE_FILENAME;
+ file_handle.handle.fd = 0;
+ file_handle.filename = SG(request_info).path_translated;
+ file_handle.free_filename = 0;
+ file_handle.opened_path = NULL;
-static int lsapi_module_main(int show_source TSRMLS_DC)
-{
- zend_file_handle file_handle = {0};
-
- if (php_request_startup(TSRMLS_C) == FAILURE ) {
- return -1;
- }
- if (show_source) {
- zend_syntax_highlighter_ini syntax_highlighter_ini;
-
- php_get_highlight_struct(&syntax_highlighter_ini);
- highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC);
- } else {
- lsapi_execute_script( &file_handle TSRMLS_CC);
- }
- zend_try {
- php_request_shutdown(NULL);
- *argv0 = 0;
- } zend_end_try();
- return 0;
+ php_execute_script(&file_handle TSRMLS_CC);
+ }
+ zend_try {
+ php_request_shutdown(NULL);
+ } zend_end_try();
+ return 0;
}
static int alter_ini( const char * pKey, int keyLen, const char * pValue, int valLen,
- void * arg )
+ void * arg )
{
- int type = ZEND_INI_PERDIR;
- if ( '\001' == *pKey ) {
- ++pKey;
- if ( *pKey == 4 ) {
- type = ZEND_INI_SYSTEM;
- }
- ++pKey;
- --keyLen;
- if (( keyLen == 7 )&&( strncasecmp( pKey, "engine", 6 )== 0 ))
- {
- if ( *pValue == '0' )
- engine = 0;
- }
- else
- zend_alter_ini_entry((char *)pKey, keyLen,
- (char *)pValue, valLen,
- type, PHP_INI_STAGE_ACTIVATE);
- }
- return 1;
+ int type = ZEND_INI_PERDIR;
+ if ( '\001' == *pKey ) {
+ ++pKey;
+ if ( *pKey == 4 ) {
+ type = ZEND_INI_SYSTEM;
+ }
+ ++pKey;
+ --keyLen;
+ zend_alter_ini_entry((char *)pKey, keyLen,
+ (char *)pValue, valLen,
+ type, PHP_INI_STAGE_ACTIVATE);
+ }
+ return 1;
}
static void override_ini()
{
- LSAPI_ForeachSpecialEnv( alter_ini, NULL );
+ LSAPI_ForeachSpecialEnv( alter_ini, NULL );
}
static int processReq( TSRMLS_D )
{
- int ret = 0;
- zend_first_try {
- /* avoid server_context==NULL checks */
- SG(server_context) = (void *) 1;
-
- engine = 1;
- override_ini();
-
- if ( engine ) {
- init_request_info( TSRMLS_C );
-
- if ( lsapi_module_main( source_highlight TSRMLS_CC ) == -1 ) {
- ret = -1;
- }
- } else {
- LSAPI_AppendRespHeader( "status: 403", 11 );
- LSAPI_AppendRespHeader( "content-type: text/html", 23 );
- LSAPI_Write( "Forbidden: PHP engine is disable.\n", 34 );
- }
- } zend_end_try();
- return ret;
+ int ret = 0;
+ zend_first_try {
+ /* avoid server_context==NULL checks */
+ SG(server_context) = (void *) 1;
+
+ init_request_info( TSRMLS_C );
+
+ override_ini();
+
+ if ( lsapi_module_main( source_highlight TSRMLS_CC ) == -1 ) {
+ ret = -1;
+ }
+ } zend_end_try();
+ return ret;
}
static void cli_usage( TSRMLS_D )
{
- static const char * usage =
- "Usage: php\n"
- " php -[b|c|h|i|q|s|v|?] [<file>] [args...]\n"
- " Run in LSAPI mode, only '-b', '-s' and '-c' are effective\n"
- " Run in Command Line Interpreter mode when parameters are specified\n"
- "\n"
- " -b <address:port>|<port> Bind Path for external LSAPI Server mode\n"
- " -c <path>|<file> Look for php.ini file in this directory\n"
- " -h This help\n"
- " -i PHP information\n"
- " -q Quiet-mode. Suppress HTTP Header output.\n"
- " -s Display colour syntax highlighted source.\n"
- " -v Version number\n"
- " -? This help\n"
- "\n"
- " args... Arguments passed to script.\n";
- php_output_startup();
- php_output_activate(TSRMLS_C);
- php_printf( usage );
+ static const char * usage =
+ "Usage: php\n"
+ " php -[b|c|h|i|q|s|v|?] [<file>] [args...]\n"
+ " Run in LSAPI mode, only '-b', '-s' and '-c' are effective\n"
+ " Run in Command Line Interpreter mode when parameters are specified\n"
+ "\n"
+ " -b <address:port>|<port> Bind Path for external LSAPI Server mode\n"
+ " -c <path>|<file> Look for php.ini file in this directory\n"
+ " -h This help\n"
+ " -i PHP information\n"
+ " -q Quiet-mode. Suppress HTTP Header output.\n"
+ " -s Display colour syntax highlighted source.\n"
+ " -v Version number\n"
+ " -? This help\n"
+ "\n"
+ " args... Arguments passed to script.\n";
+ php_output_startup();
+ php_output_activate(TSRMLS_C);
+ php_printf( "%s", usage );
#ifdef PHP_OUTPUT_NEWAPI
php_output_end_all(TSRMLS_C);
#else
@@ -612,250 +440,250 @@ static void cli_usage( TSRMLS_D )
}
static int parse_opt( int argc, char * argv[], int *climode,
- char **php_ini_path, char ** php_bind )
-{
- char ** p = &argv[1];
- char ** argend= &argv[argc];
- int c;
- while (( p < argend )&&(**p == '-' )) {
- c = *((*p)+1);
- ++p;
- switch( c ) {
- case 'b':
- if ( p >= argend ) {
- fprintf( stderr, "TCP or socket address must be specified following '-b' option.\n");
- return -1;
- }
- *php_bind = *p++;
- break;
-
- case 'c':
- if ( p >= argend ) {
- fprintf( stderr, "<path> or <file> must be specified following '-c' option.\n");
-
- return -1;
- }
- *php_ini_path = *p++;
- break;
- case 's':
- source_highlight = 1;
- break;
- case 'h':
- case 'i':
- case 'q':
- case 'v':
- case '?':
- default:
- *climode = 1;
- break;
- }
- }
- if ( p - argv < argc ) {
- *climode = 1;
- }
- return 0;
+ char **php_ini_path, char ** php_bind )
+{
+ char ** p = &argv[1];
+ char ** argend= &argv[argc];
+ int c;
+ while (( p < argend )&&(**p == '-' )) {
+ c = *((*p)+1);
+ ++p;
+ switch( c ) {
+ case 'b':
+ if ( p >= argend ) {
+ fprintf( stderr, "TCP or socket address must be specified following '-b' option.\n");
+ return -1;
+ }
+ *php_bind = *p++;
+ break;
+
+ case 'c':
+ if ( p >= argend ) {
+ fprintf( stderr, "<path> or <file> must be specified following '-c' option.\n");
+
+ return -1;
+ }
+ *php_ini_path = *p++;
+ break;
+ case 's':
+ source_highlight = 1;
+ break;
+ case 'h':
+ case 'i':
+ case 'q':
+ case 'v':
+ case '?':
+ default:
+ *climode = 1;
+ break;
+ }
+ }
+ if ( p - argv < argc ) {
+ *climode = 1;
+ }
+ return 0;
}
static int cli_main( int argc, char * argv[] )
{
- static const char * ini_defaults[] = {
- "report_zend_debug", "0",
- "display_errors", "1",
- "register_argc_argv", "1",
- "html_errors", "0",
- "implicit_flush", "1",
- "output_buffering", "0",
- "max_execution_time", "0",
- "max_input_time", "-1",
- NULL
- };
-
- const char ** ini;
- char ** p = &argv[1];
- char ** argend= &argv[argc];
- int ret = 0;
- int c;
- lsapi_mode = 0; /* enter CLI mode */
+ static const char * ini_defaults[] = {
+ "report_zend_debug", "0",
+ "display_errors", "1",
+ "register_argc_argv", "1",
+ "html_errors", "0",
+ "implicit_flush", "1",
+ "output_buffering", "0",
+ "max_execution_time", "0",
+ "max_input_time", "-1",
+ NULL
+ };
+
+ const char ** ini;
+ char ** p = &argv[1];
+ char ** argend= &argv[argc];
+ int ret = 0;
+ int c;
+ lsapi_mode = 0; /* enter CLI mode */
#ifdef PHP_WIN32
- _fmode = _O_BINARY; /*sets default for file streams to binary */
- setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
- setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */
- setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */
+ _fmode = _O_BINARY; /*sets default for file streams to binary */
+ setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
+ setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */
+ setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */
#endif
- zend_first_try {
- SG(server_context) = (void *) 1;
-
- zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */
- CG(in_compilation) = 0; /* not initialized but needed for several options */
- EG(uninitialized_zval_ptr) = NULL;
-
- for( ini = ini_defaults; *ini; ini+=2 ) {
- zend_alter_ini_entry( (char *)*ini, strlen( *ini )+1,
- (char *)*(ini+1), strlen( *(ini+1) ),
- PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
- }
-
- while (( p < argend )&&(**p == '-' )) {
- c = *((*p)+1);
- ++p;
- switch( c ) {
- case 'q':
- break;
- case 'i':
- if (php_request_startup(TSRMLS_C) != FAILURE) {
- php_print_info(0xFFFFFFFF TSRMLS_CC);
+ zend_first_try {
+ SG(server_context) = (void *) 1;
+
+ zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */
+ CG(in_compilation) = 0; /* not initialized but needed for several options */
+ EG(uninitialized_zval_ptr) = NULL;
+
+ for( ini = ini_defaults; *ini; ini+=2 ) {
+ zend_alter_ini_entry( (char *)*ini, strlen( *ini )+1,
+ (char *)*(ini+1), strlen( *(ini+1) ),
+ PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+ }
+
+ while (( p < argend )&&(**p == '-' )) {
+ c = *((*p)+1);
+ ++p;
+ switch( c ) {
+ case 'q':
+ break;
+ case 'i':
+ if (php_request_startup(TSRMLS_C) != FAILURE) {
+ php_print_info(0xFFFFFFFF TSRMLS_CC);
#ifdef PHP_OUTPUT_NEWAPI
php_output_end_all(TSRMLS_C);
#else
php_end_ob_buffers(1 TSRMLS_CC);
#endif
- php_request_shutdown( NULL );
- }
- ret = 1;
- break;
- case 'v':
- if (php_request_startup(TSRMLS_C) != FAILURE) {
+ php_request_shutdown( NULL );
+ }
+ ret = 1;
+ break;
+ case 'v':
+ if (php_request_startup(TSRMLS_C) != FAILURE) {
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2012 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2012 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2012 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2012 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
#ifdef PHP_OUTPUT_NEWAPI
php_output_end_all(TSRMLS_C);
#else
php_end_ob_buffers(1 TSRMLS_CC);
#endif
- php_request_shutdown( NULL );
- }
- ret = 1;
- break;
- case 'c':
- ++p;
- /* fall through */
- case 's':
- break;
-
- case 'h':
- case '?':
- default:
- cli_usage(TSRMLS_C);
- ret = 1;
- break;
-
- }
- }
- if ( !ret ) {
- if ( *p ) {
- zend_file_handle file_handle = {0};
-
- file_handle.type = ZEND_HANDLE_FP;
- file_handle.handle.fp = VCWD_FOPEN(*p, "rb");
-
- if ( file_handle.handle.fp ) {
- script_filename = *p;
- php_self = *p;
-
- SG(request_info).path_translated = estrdup(*p);
- SG(request_info).argc = argc - (p - argv);
- SG(request_info).argv = p;
-
- if (php_request_startup(TSRMLS_C) == FAILURE ) {
- fclose( file_handle.handle.fp );
- ret = 2;
- } else {
- if (source_highlight) {
- zend_syntax_highlighter_ini syntax_highlighter_ini;
-
- php_get_highlight_struct(&syntax_highlighter_ini);
- highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC);
- } else {
- file_handle.filename = *p;
- file_handle.free_filename = 0;
- file_handle.opened_path = NULL;
-
- php_execute_script(&file_handle TSRMLS_CC);
- }
-
- php_request_shutdown( NULL );
- }
- } else {
- php_printf("Could not open input file: %s.\n", *p);
- }
- } else {
- cli_usage(TSRMLS_C);
- }
- }
-
- }zend_end_try();
-
- php_module_shutdown(TSRMLS_C);
+ php_request_shutdown( NULL );
+ }
+ ret = 1;
+ break;
+ case 'c':
+ ++p;
+ /* fall through */
+ case 's':
+ break;
+
+ case 'h':
+ case '?':
+ default:
+ cli_usage(TSRMLS_C);
+ ret = 1;
+ break;
+
+ }
+ }
+ if ( !ret ) {
+ if ( *p ) {
+ zend_file_handle file_handle = {0};
+
+ file_handle.type = ZEND_HANDLE_FP;
+ file_handle.handle.fp = VCWD_FOPEN(*p, "rb");
+
+ if ( file_handle.handle.fp ) {
+ script_filename = *p;
+ php_self = *p;
+
+ SG(request_info).path_translated = *p;
+ SG(request_info).argc = argc - (p - argv);
+ SG(request_info).argv = p;
+
+ if (php_request_startup(TSRMLS_C) == FAILURE ) {
+ fclose( file_handle.handle.fp );
+ ret = 2;
+ } else {
+ if (source_highlight) {
+ zend_syntax_highlighter_ini syntax_highlighter_ini;
+
+ php_get_highlight_struct(&syntax_highlighter_ini);
+ highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC);
+ } else {
+ file_handle.filename = *p;
+ file_handle.free_filename = 0;
+ file_handle.opened_path = NULL;
+
+ php_execute_script(&file_handle TSRMLS_CC);
+ }
+
+ php_request_shutdown( NULL );
+ }
+ } else {
+ php_printf("Could not open input file: %s.\n", *p);
+ }
+ } else {
+ cli_usage(TSRMLS_C);
+ }
+ }
+
+ }zend_end_try();
+
+ php_module_shutdown(TSRMLS_C);
#ifdef ZTS
- tsrm_shutdown();
+ tsrm_shutdown();
#endif
- return ret;
+ return ret;
}
static int s_stop;
void litespeed_cleanup(int signal)
{
- s_stop = signal;
+ s_stop = signal;
}
void start_children( int children )
{
- struct sigaction act, old_term, old_quit, old_int, old_usr1;
- int running = 0;
- int status;
- pid_t pid;
-
- /* Create a process group */
- setsid();
-
- /* Set up handler to kill children upon exit */
- act.sa_flags = 0;
- act.sa_handler = litespeed_cleanup;
- if( sigaction( SIGTERM, &act, &old_term ) ||
- sigaction( SIGINT, &act, &old_int ) ||
- sigaction( SIGUSR1, &act, &old_usr1 ) ||
- sigaction( SIGQUIT, &act, &old_quit )) {
- perror( "Can't set signals" );
- exit( 1 );
- }
- s_stop = 0;
- while( 1 ) {
- while((!s_stop )&&( running < children )) {
- pid = fork();
- switch( pid ) {
- case 0: /* children process */
-
- /* don't catch our signals */
- sigaction( SIGTERM, &old_term, 0 );
- sigaction( SIGQUIT, &old_quit, 0 );
- sigaction( SIGINT, &old_int, 0 );
- sigaction( SIGUSR1, &old_usr1, 0 );
- return ;
- case -1:
- perror( "php (pre-forking)" );
- exit( 1 );
- break;
- default: /* parent process */
- running++;
- break;
- }
- }
- if ( s_stop ) {
- break;
- }
- pid = wait( &status );
- running--;
- }
- kill( -getpgrp(), SIGUSR1 );
- exit( 0 );
+ struct sigaction act, old_term, old_quit, old_int, old_usr1;
+ int running = 0;
+ int status;
+ pid_t pid;
+
+ /* Create a process group */
+ setsid();
+
+ /* Set up handler to kill children upon exit */
+ act.sa_flags = 0;
+ act.sa_handler = litespeed_cleanup;
+ if( sigaction( SIGTERM, &act, &old_term ) ||
+ sigaction( SIGINT, &act, &old_int ) ||
+ sigaction( SIGUSR1, &act, &old_usr1 ) ||
+ sigaction( SIGQUIT, &act, &old_quit )) {
+ perror( "Can't set signals" );
+ exit( 1 );
+ }
+ s_stop = 0;
+ while( 1 ) {
+ while((!s_stop )&&( running < children )) {
+ pid = fork();
+ switch( pid ) {
+ case 0: /* children process */
+
+ /* don't catch our signals */
+ sigaction( SIGTERM, &old_term, 0 );
+ sigaction( SIGQUIT, &old_quit, 0 );
+ sigaction( SIGINT, &old_int, 0 );
+ sigaction( SIGUSR1, &old_usr1, 0 );
+ return ;
+ case -1:
+ perror( "php (pre-forking)" );
+ exit( 1 );
+ break;
+ default: /* parent process */
+ running++;
+ break;
+ }
+ }
+ if ( s_stop ) {
+ break;
+ }
+ pid = wait( &status );
+ running--;
+ }
+ kill( -getpgrp(), SIGUSR1 );
+ exit( 0 );
}
@@ -863,185 +691,153 @@ void start_children( int children )
#include <fcntl.h>
int main( int argc, char * argv[] )
{
- int ret;
- int bindFd;
-
- char * php_ini_path = NULL;
- char * php_bind = NULL;
- char * p;
- int n;
- int climode = 0;
- struct timeval tv_req_begin;
- struct timeval tv_req_end;
- int slow_script_msec = 0;
- char time_buf[40];
-
+ int ret;
+ int bindFd;
+
+ char * php_ini_path = NULL;
+ char * php_bind = NULL;
+ char * p;
+ int n;
+ int climode = 0;
+
#ifdef HAVE_SIGNAL_H
#if defined(SIGPIPE) && defined(SIG_IGN)
- signal(SIGPIPE, SIG_IGN);
+ signal(SIGPIPE, SIG_IGN);
#endif
#endif
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
+ tsrm_startup(1, 1, 0, NULL);
#endif
- if (argc > 1 ) {
- if ( parse_opt( argc, argv, &climode,
- &php_ini_path, &php_bind ) == -1 ) {
- return 1;
- }
- }
- if ( climode ) {
- lsapi_sapi_module.phpinfo_as_text = 1;
- }
- argv0 = argv[0] + strlen( argv[0] );
- sapi_startup(&lsapi_sapi_module);
+ if (argc > 1 ) {
+ if ( parse_opt( argc, argv, &climode,
+ &php_ini_path, &php_bind ) == -1 ) {
+ return 1;
+ }
+ }
+ if ( climode ) {
+ lsapi_sapi_module.phpinfo_as_text = 1;
+ }
+ sapi_startup(&lsapi_sapi_module);
#ifdef ZTS
- compiler_globals = ts_resource(compiler_globals_id);
- executor_globals = ts_resource(executor_globals_id);
- core_globals = ts_resource(core_globals_id);
- sapi_globals = ts_resource(sapi_globals_id);
- tsrm_ls = ts_resource(0);
+ compiler_globals = ts_resource(compiler_globals_id);
+ executor_globals = ts_resource(executor_globals_id);
+ core_globals = ts_resource(core_globals_id);
+ sapi_globals = ts_resource(sapi_globals_id);
+ tsrm_ls = ts_resource(0);
- SG(request_info).path_translated = NULL;
+ SG(request_info).path_translated = NULL;
#endif
- lsapi_sapi_module.executable_location = argv[0];
-
- if ( php_ini_path ) {
- lsapi_sapi_module.php_ini_path_override = php_ini_path;
- }
+ lsapi_sapi_module.executable_location = argv[0];
+ if ( php_ini_path ) {
+ lsapi_sapi_module.php_ini_path_override = php_ini_path;
+ }
- lsapi_sapi_module.ini_defaults = sapi_lsapi_ini_defaults;
-
- if (php_module_startup(&lsapi_sapi_module, &litespeed_module_entry, 1) == FAILURE) {
+ if (php_module_startup(&lsapi_sapi_module, &litespeed_module_entry, 1) == FAILURE) {
#ifdef ZTS
- tsrm_shutdown();
+ tsrm_shutdown();
#endif
- return FAILURE;
- }
-
- if ( climode ) {
- return cli_main(argc, argv);
- }
-
- if ( php_bind ) {
- bindFd = LSAPI_CreateListenSock( php_bind, 10 );
- if ( bindFd == -1 ) {
- fprintf( stderr,
- "Failed to bind socket [%s]: %s\n", php_bind, strerror( errno ) );
- exit( 2 );
- }
- if ( bindFd != 0 ) {
- dup2( bindFd, 0 );
- close( bindFd );
- }
- }
-
- LSAPI_Init();
+ return FAILURE;
+ }
+
+ if ( climode ) {
+ return cli_main(argc, argv);
+ }
+
+
+ if ( php_bind ) {
+ bindFd = LSAPI_CreateListenSock( php_bind, 10 );
+ if ( bindFd == -1 ) {
+ fprintf( stderr,
+ "Failed to bind socket [%s]: %s\n", php_bind, strerror( errno ) );
+ exit( 2 );
+ }
+ if ( bindFd != 0 ) {
+ dup2( bindFd, 0 );
+ close( bindFd );
+ }
+ }
+
+ LSAPI_Init();
- LSAPI_Init_Env_Parameters( NULL );
-
- slow_script_msec = LSAPI_Get_Slow_Req_Msecs();
-
- if ( php_bind ) {
- LSAPI_No_Check_ppid();
- }
-
- while( LSAPI_Prefork_Accept_r( &g_req ) >= 0 ) {
- if ( slow_script_msec ) {
- gettimeofday( &tv_req_begin, NULL );
- }
- ret = processReq(TSRMLS_C);
- if ( slow_script_msec ) {
- gettimeofday( &tv_req_end, NULL );
- n = ((long) tv_req_end.tv_sec - tv_req_begin.tv_sec ) * 1000
- + (tv_req_end.tv_usec - tv_req_begin.tv_usec) / 1000;
- if ( n > slow_script_msec )
- {
- strftime( time_buf, 30, "%d/%b/%Y:%H:%M:%S", localtime( &tv_req_end.tv_sec ) );
- fprintf( stderr, "[%s] Slow PHP script: %d ms\n URL: %s %s\n Query String: %s\n Script: %s\n",
- time_buf, n, LSAPI_GetRequestMethod(),
- LSAPI_GetScriptName(), LSAPI_GetQueryString(),
- LSAPI_GetScriptFileName() );
-
- }
- }
- LSAPI_Finish();
- if ( ret ) {
- break;
- }
- }
- php_module_shutdown(TSRMLS_C);
+ LSAPI_Init_Env_Parameters( NULL );
+
+ if ( php_bind ) {
+ LSAPI_No_Check_ppid();
+ }
+
+ while( LSAPI_Prefork_Accept_r( &g_req ) >= 0 ) {
+ ret = processReq(TSRMLS_C);
+ LSAPI_Finish();
+ if ( ret ) {
+ break;
+ }
+ }
+ php_module_shutdown(TSRMLS_C);
#ifdef ZTS
- tsrm_shutdown();
+ tsrm_shutdown();
#endif
- return ret;
+ return ret;
}
/* LiteSpeed PHP module starts here */
-#if PHP_MAJOR_VERSION > 4
-
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO(arginfo_litespeed__void, 0)
ZEND_END_ARG_INFO()
/* }}} */
-#else
-#define arginfo_litespeed__void NULL
-#endif
-
PHP_FUNCTION(litespeed_request_headers);
PHP_FUNCTION(litespeed_response_headers);
PHP_MINFO_FUNCTION(litespeed);
zend_function_entry litespeed_functions[] = {
- PHP_FE(litespeed_request_headers, arginfo_litespeed__void)
- PHP_FE(litespeed_response_headers, arginfo_litespeed__void)
- PHP_FALIAS(getallheaders, litespeed_request_headers, arginfo_litespeed__void)
- PHP_FALIAS(apache_request_headers, litespeed_request_headers, arginfo_litespeed__void)
- PHP_FALIAS(apache_response_headers, litespeed_response_headers, arginfo_litespeed__void)
- {NULL, NULL, NULL}
+ PHP_FE(litespeed_request_headers, arginfo_litespeed__void)
+ PHP_FE(litespeed_response_headers, arginfo_litespeed__void)
+ PHP_FALIAS(getallheaders, litespeed_request_headers, arginfo_litespeed__void)
+ PHP_FALIAS(apache_request_headers, litespeed_request_headers, arginfo_litespeed__void)
+ PHP_FALIAS(apache_response_headers, litespeed_response_headers, arginfo_litespeed__void)
+ {NULL, NULL, NULL}
};
static PHP_MINIT_FUNCTION(litespeed)
{
- /* REGISTER_INI_ENTRIES(); */
- return SUCCESS;
+ /* REGISTER_INI_ENTRIES(); */
+ return SUCCESS;
}
static PHP_MSHUTDOWN_FUNCTION(litespeed)
{
- /* UNREGISTER_INI_ENTRIES(); */
- return SUCCESS;
+ /* UNREGISTER_INI_ENTRIES(); */
+ return SUCCESS;
}
zend_module_entry litespeed_module_entry = {
- STANDARD_MODULE_HEADER,
- "litespeed",
- litespeed_functions,
- PHP_MINIT(litespeed),
- PHP_MSHUTDOWN(litespeed),
- NULL,
- NULL,
- NULL,
- NO_VERSION_YET,
- STANDARD_MODULE_PROPERTIES
+ STANDARD_MODULE_HEADER,
+ "litespeed",
+ litespeed_functions,
+ PHP_MINIT(litespeed),
+ PHP_MSHUTDOWN(litespeed),
+ NULL,
+ NULL,
+ NULL,
+ NO_VERSION_YET,
+ STANDARD_MODULE_PROPERTIES
};
static int add_associate_array( const char * pKey, int keyLen, const char * pValue, int valLen,
- void * arg )
+ void * arg )
{
- add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue, 1 );
- return 1;
+ add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue, 1 );
+ return 1;
}
@@ -1049,14 +845,13 @@ static int add_associate_array( const char * pKey, int keyLen, const char * pVal
Fetch all HTTP request headers */
PHP_FUNCTION(litespeed_request_headers)
{
- /* TODO: */
- if (ZEND_NUM_ARGS() > 0) {
- WRONG_PARAM_COUNT;
- }
- array_init(return_value);
+ /* TODO: */
+ if (ZEND_NUM_ARGS() > 0) {
+ WRONG_PARAM_COUNT;
+ }
+ array_init(return_value);
- if ( lsapi_mode )
- LSAPI_ForeachOrgHeader( add_associate_array, return_value );
+ LSAPI_ForeachOrgHeader( add_associate_array, return_value );
}
/* }}} */
@@ -1067,40 +862,40 @@ PHP_FUNCTION(litespeed_request_headers)
Fetch all HTTP response headers */
PHP_FUNCTION(litespeed_response_headers)
{
- sapi_header_struct *h;
- zend_llist_position pos;
- char * p;
- int len;
- char headerBuf[SAPI_LSAPI_MAX_HEADER_LENGTH];
-
- if (ZEND_NUM_ARGS() > 0) {
- WRONG_PARAM_COUNT;
- }
-
- if (!&SG(sapi_headers).headers) {
- RETURN_FALSE;
- }
- array_init(return_value);
-
- h = zend_llist_get_first_ex(&SG(sapi_headers).headers, &pos);
- while (h) {
- if ( h->header_len > 0 ) {
- p = strchr( h->header, ':' );
- len = p - h->header;
- if (( p )&&( len > 0 )) {
- memmove( headerBuf, h->header, len );
- while( len > 0 && (isspace( headerBuf[len-1])) ) {
- --len;
- }
- headerBuf[len] = 0;
- if ( len ) {
- while( isspace(*++p));
- add_assoc_string_ex(return_value, headerBuf, len+1, p, 1 );
- }
- }
- }
- h = zend_llist_get_next_ex(&SG(sapi_headers).headers, &pos);
- }
+ sapi_header_struct *h;
+ zend_llist_position pos;
+ char * p;
+ int len;
+ char headerBuf[SAPI_LSAPI_MAX_HEADER_LENGTH];
+
+ if (ZEND_NUM_ARGS() > 0) {
+ WRONG_PARAM_COUNT;
+ }
+
+ if (!&SG(sapi_headers).headers) {
+ RETURN_FALSE;
+ }
+ array_init(return_value);
+
+ h = zend_llist_get_first_ex(&SG(sapi_headers).headers, &pos);
+ while (h) {
+ if ( h->header_len > 0 ) {
+ p = strchr( h->header, ':' );
+ len = p - h->header;
+ if (( p )&&( len > 0 )) {
+ memmove( headerBuf, h->header, len );
+ while( len > 0 && (isspace( headerBuf[len-1])) ) {
+ --len;
+ }
+ headerBuf[len] = 0;
+ if ( len ) {
+ while( isspace(*++p));
+ add_assoc_string_ex(return_value, headerBuf, len+1, p, 1 );
+ }
+ }
+ }
+ h = zend_llist_get_next_ex(&SG(sapi_headers).headers, &pos);
+ }
}
/* }}} */
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index fe89ebab2..4beea56b3 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -86,7 +86,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
static int g_inited = 0;
static int g_running = 1;
static int s_ppid;
-static int s_slow_req_msecs = 0;
LSAPI_Request g_req = { -1, -1 };
void Flush_RespBuf_r( LSAPI_Request * pReq );
@@ -508,13 +507,11 @@ static int parseRequest( LSAPI_Request * pReq, int totalLen )
return 0;
}
-static int s_accept_notify = 0;
-
static struct lsapi_packet_header ack = {'L', 'S',
LSAPI_REQ_RECEIVED, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} };
-static inline int notify_req_received( int fd )
+static inline int notify_req_received( LSAPI_Request * pReq )
{
- if ( write( fd, &ack, LSAPI_PACKET_HEADER_LEN )
+ if ( write( pReq->m_fd, &ack, LSAPI_PACKET_HEADER_LEN )
< LSAPI_PACKET_HEADER_LEN ) {
return -1;
}
@@ -570,10 +567,7 @@ static int readReq( LSAPI_Request * pReq )
pReq->m_bufProcessed = packetLen;
pReq->m_reqState = LSAPI_ST_REQ_BODY | LSAPI_ST_RESP_HEADER;
- if ( !s_accept_notify )
- return notify_req_received( pReq->m_fd );
- else
- return 0;
+ return notify_req_received( pReq );
}
@@ -683,10 +677,6 @@ int LSAPI_Accept_r( LSAPI_Request * pReq )
setsockopt(pReq->m_fd, IPPROTO_TCP, TCP_NODELAY,
(char *)&nodelay, sizeof(nodelay));
}
-
- if ( s_accept_notify )
- return notify_req_received( pReq->m_fd );
-
}
} else {
return -1;
@@ -1249,13 +1239,12 @@ int LSAPI_ForeachHeader_r( LSAPI_Request * pReq,
while( pCur < pEnd ) {
pKey = pReq->m_pHttpHeader + pCur->nameOff;
keyLen = pCur->nameLen;
- if ( keyLen > 250 ) {
- keyLen = 250;
- }
-
pKeyEnd = pKey + keyLen;
memcpy( achHeaderName, "HTTP_", 5 );
p = &achHeaderName[5];
+ if ( keyLen > 250 ) {
+ keyLen = 250;
+ }
while( pKey < pKeyEnd ) {
char ch = *pKey++;
@@ -1640,9 +1629,6 @@ static int lsapi_accept( int fdListen )
setsockopt( fd, IPPROTO_TCP, TCP_NODELAY,
(char *)&nodelay, sizeof(nodelay));
}
-
- if ( s_accept_notify )
- notify_req_received( fd );
}
return fd;
@@ -2087,15 +2073,6 @@ void LSAPI_Set_Server_Max_Idle_Secs( int serverMaxIdle )
}
}
-void LSAPI_Set_Slow_Req_Msecs( int msecs )
-{
- s_slow_req_msecs = msecs;
-}
-
-int LSAPI_Get_Slow_Req_Msecs()
-{
- return s_slow_req_msecs;
-}
void LSAPI_No_Check_ppid()
{
@@ -2149,18 +2126,6 @@ void LSAPI_Init_Env_Parameters( fn_select_t fp )
avoidFork = atoi( p );
}
- p = getenv( "LSAPI_ACCEPT_NOTIFY" );
- if ( p ) {
- s_accept_notify = atoi( p );
- }
-
- p = getenv( "LSAPI_SLOW_REQ_MSECS" );
- if ( p ) {
- n = atoi( p );
- LSAPI_Set_Slow_Req_Msecs( n );
- }
-
-
#if defined( RLIMIT_CORE )
p = getenv( "LSAPI_ALLOW_CORE_DUMP" );
if ( !p ) {
diff --git a/sapi/litespeed/lsapilib.h b/sapi/litespeed/lsapilib.h
index 701b5284c..9772ea199 100644
--- a/sapi/litespeed/lsapilib.h
+++ b/sapi/litespeed/lsapilib.h
@@ -343,11 +343,6 @@ void LSAPI_Set_Max_Process_Time( int secs );
void LSAPI_Init_Env_Parameters( fn_select_t fp );
-void LSAPI_Set_Slow_Req_Msecs( int msecs );
-
-int LSAPI_Get_Slow_Req_Msecs( );
-
-
#if defined (c_plusplus) || defined (__cplusplus)
}
#endif
diff --git a/server-tests.php b/server-tests.php
index 051a1cfa0..ca39b198b 100755
--- a/server-tests.php
+++ b/server-tests.php
@@ -138,7 +138,7 @@ function generate_diff($wanted,$output)
}
function mkpath($path,$mode = 0777) {
- $dirs = split('[\\/]',$path);
+ $dirs = preg_split('/[\\/]/',$path);
$path = $dirs[0];
for($i = 1;$i < count($dirs);$i++) {
$path .= '/'.$dirs[$i];
@@ -358,7 +358,7 @@ class HTTPRequest
return $this->outgoing_payload;
}
- function &_sendHTTP()
+ function _sendHTTP()
{
$this->_getRequest();
$host = $this->urlparts['host'];
@@ -555,7 +555,7 @@ class testHarness {
{
// get the list of installed extensions
$out = $this->runscript(PHP_EXTENSIONS_SCRIPT,true);
- $this->exts_to_test = split(":",$out);
+ $this->exts_to_test = explode(":",$out);
sort($this->exts_to_test);
$this->exts_tested = count($this->exts_to_test);
}
@@ -716,9 +716,9 @@ class testHarness {
if (@$this->conf['TEST_PATHS']) {
$this->test_dirs = array();
if ($this->iswin32) {
- $paths = split(';',$this->conf['TEST_PATHS']);
+ $paths = explode(';',$this->conf['TEST_PATHS']);
} else {
- $paths = split(':|;',$this->conf['TEST_PATHS']);
+ $paths = explode(':|;',$this->conf['TEST_PATHS']);
}
foreach($paths as $path) {
$this->test_dirs[] = realpath($path);
@@ -1152,7 +1152,7 @@ class testHarness {
while (!feof($fp)) {
$line = fgets($fp);
// Match the beginning of a section.
- if (ereg('^--([A-Z]+)--',$line,$r)) {
+ if (preg_match('/^--([A-Z]+)--/',$line,$r)) {
$section = $r[1];
$section_text[$section] = '';
continue;
@@ -1211,14 +1211,14 @@ class testHarness {
if (!$output) return NULL;
if ($this->conf['TEST_PHP_DETAILED'] > 2)
print "SKIPIF: [$output]\n";
- if (eregi("^skip", $output)){
+ if (preg_match("/^skip/i", $output)){
- $reason = (ereg("^skip[[:space:]]*(.+)\$", $output)) ? ereg_replace("^skip[[:space:]]*(.+)\$", "\\1", $output) : FALSE;
+ $reason = (preg_match("/^skip\s*(.+)\$/", $output)) ? preg_replace("/^skip\s*(.+)\$/", "\\1", $output) : FALSE;
$this->showstatus($section_text['TEST'], 'SKIPPED', $reason);
return 'SKIPPED';
}
- if (eregi("^info", $output)) {
- $reason = (ereg("^info[[:space:]]*(.+)\$", $output)) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", $output) : FALSE;
+ if (preg_match("/^info/i", $output)) {
+ $reason = (preg_match("/^info\s*(.+)\$/", $output)) ? preg_replace("/^info\s*(.+)\$/", "\\1", $output) : FALSE;
if ($reason) {
$tested .= " (info: $reason)";
}
@@ -1244,19 +1244,19 @@ class testHarness {
$tested = $section_text['TEST']." [$shortname]";
if ($this->conf['TEST_WEB']) {
- $tmp_file = ereg_replace('\.phpt$','.'.$this->conf['TEST_WEB_EXT'],$file);
+ $tmp_file = preg_replace('/\.phpt$/','.'.$this->conf['TEST_WEB_EXT'],$file);
$uri = $this->conf['TEST_BASE_SCRIPT_NAME'].str_replace($this->conf['TEST_BASE_PATH'], '', $tmp_file);
$uri = str_replace('\\', '/', $uri);
} else {
- $tmp_file = ereg_replace('\.phpt$','.php',$file);
+ $tmp_file = preg_replace('/\.phpt$/','.php',$file);
}
@unlink($tmp_file);
// unlink old test results
- @unlink(ereg_replace('\.phpt$','.diff',$file));
- @unlink(ereg_replace('\.phpt$','.log',$file));
- @unlink(ereg_replace('\.phpt$','.exp',$file));
- @unlink(ereg_replace('\.phpt$','.out',$file));
+ @unlink(preg_replace('/\.phpt$/','.diff',$file));
+ @unlink(preg_replace('/\.phpt$/','.log',$file));
+ @unlink(preg_replace('/\.phpt$/','.exp',$file));
+ @unlink(preg_replace('/\.phpt$/','.out',$file));
if (!$this->conf['TEST_WEB']) {
// Reset environment from any previous test.
@@ -1425,15 +1425,68 @@ class testHarness {
}
$wanted_re = preg_replace('/\r\n/',"\n",$wanted);
if (isset($section_text['EXPECTF'])) {
- $wanted_re = preg_quote($wanted_re, '/');
+ // do preg_quote, but miss out any %r delimited sections
+ $temp = "";
+ $r = "%r";
+ $startOffset = 0;
+ $length = strlen($wanted_re);
+ while($startOffset < $length) {
+ $start = strpos($wanted_re, $r, $startOffset);
+ if ($start !== false) {
+ // we have found a start tag
+ $end = strpos($wanted_re, $r, $start+2);
+ if ($end === false) {
+ // unbalanced tag, ignore it.
+ $end = $start = $length;
+ }
+ } else {
+ // no more %r sections
+ $start = $end = $length;
+ }
+ // quote a non re portion of the string
+ $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/');
+ // add the re unquoted.
+ if ($end > $start) {
+ $temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')';
+ }
+ $startOffset = $end + 2;
+ }
+ $wanted_re = $temp;
+
+ $wanted_re = str_replace(
+ array('%binary_string_optional%'),
+ 'string',
+ $wanted_re
+ );
+ $wanted_re = str_replace(
+ array('%unicode_string_optional%'),
+ 'string',
+ $wanted_re
+ );
+ $wanted_re = str_replace(
+ array('%unicode\|string%', '%string\|unicode%'),
+ 'string',
+ $wanted_re
+ );
+ $wanted_re = str_replace(
+ array('%u\|b%', '%b\|u%'),
+ '',
+ $wanted_re
+ );
// Stick to basics
- $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy
- $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re);
- $wanted_re = str_replace("%d", "[0-9]+", $wanted_re);
- $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re);
- $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re);
- $wanted_re = str_replace("%c", ".", $wanted_re);
+ $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re);
+ $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re);
+ $wanted_re = str_replace('%S', '[^\r\n]*', $wanted_re);
+ $wanted_re = str_replace('%a', '.+', $wanted_re);
+ $wanted_re = str_replace('%A', '.*', $wanted_re);
+ $wanted_re = str_replace('%w', '\s*', $wanted_re);
+ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re);
+ $wanted_re = str_replace('%d', '\d+', $wanted_re);
+ $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re);
+ $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', $wanted_re);
+ $wanted_re = str_replace('%c', '.', $wanted_re);
// %f allows two points "-.0.0" but that is the best *simple* expression
+
}
/* DEBUG YOUR REGEX HERE
var_dump($wanted_re);
@@ -1489,8 +1542,8 @@ class testHarness {
$this->failed_tests[] = array(
'name' => $file,
'test_name' => $tested,
- 'output' => ereg_replace('\.phpt$','.log', $file),
- 'diff' => ereg_replace('\.phpt$','.diff', $file)
+ 'output' => preg_replace('/\.phpt$/','.log', $file),
+ 'diff' => preg_replace('/\.phpt$/','.diff', $file)
);
if ($this->conf['TEST_PHP_DETAILED'])
@@ -1498,25 +1551,25 @@ class testHarness {
// write .exp
if (strpos($this->conf['TEST_PHP_LOG_FORMAT'],'E') !== FALSE) {
- $logname = ereg_replace('\.phpt$','.exp',$file);
+ $logname = preg_replace('/\.phpt$/','.exp',$file);
file_put_contents($logname,$wanted);
}
// write .out
if (strpos($this->conf['TEST_PHP_LOG_FORMAT'],'O') !== FALSE) {
- $logname = ereg_replace('\.phpt$','.out',$file);
+ $logname = preg_replace('/\.phpt$/','.out',$file);
file_put_contents($logname,$output);
}
// write .diff
if (strpos($this->conf['TEST_PHP_LOG_FORMAT'],'D') !== FALSE) {
- $logname = ereg_replace('\.phpt$','.diff',$file);
+ $logname = preg_replace('/\.phpt$/','.diff',$file);
file_put_contents($logname,generate_diff($wanted,$output));
}
// write .log
if (strpos($this->conf['TEST_PHP_LOG_FORMAT'],'L') !== FALSE) {
- $logname = ereg_replace('\.phpt$','.log',$file);
+ $logname = preg_replace('/\.phpt$/','.log',$file);
file_put_contents($logname,
"\n---- EXPECTED OUTPUT\n$wanted\n".
"---- ACTUAL OUTPUT\n$output\n".
diff --git a/tests/basic/bug29971.phpt b/tests/basic/bug29971.phpt
index d4b654bdb..d4b654bdb 100755..100644
--- a/tests/basic/bug29971.phpt
+++ b/tests/basic/bug29971.phpt
diff --git a/tests/basic/php_egg_logo_guid.phpt b/tests/basic/php_egg_logo_guid.phpt
deleted file mode 100644
index b3c5d7bdf..000000000
--- a/tests/basic/php_egg_logo_guid.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Testing php_egg_logo_guid() function
---FILE--
-<?php
-echo php_egg_logo_guid();
-?>
---EXPECT--
-PHPE9568F36-D428-11d2-A769-00AA001ACF42
-
---CREDITS--
-Jason Easter <easter@phpug-wuerzburg.de>
-PHPUG Würzburg <phpug-wuerzburg.de>
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/basic/php_logo_guid.phpt b/tests/basic/php_logo_guid.phpt
deleted file mode 100644
index b5724a96a..000000000
--- a/tests/basic/php_logo_guid.phpt
+++ /dev/null
@@ -1,10 +0,0 @@
---TEST--
-Testing php_logo_guid() function
---FILE--
-<?php
-echo php_logo_guid();
-?>
---EXPECT--
-PHPE9568F34-D428-11d2-A769-00AA001ACF42
---CREDITS--
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/basic/php_real_logo_guid.phpt b/tests/basic/php_real_logo_guid.phpt
deleted file mode 100644
index 2b9003a35..000000000
--- a/tests/basic/php_real_logo_guid.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Testing php_real_logo_guid() function
---FILE--
-<?php
-echo php_real_logo_guid();
-?>
---EXPECT--
-PHPE9568F34-D428-11d2-A769-00AA001ACF42
---CREDITS--
-Jason Easter <easter@phpug-wuerzburg.de>
-PHPUG Würzburg <phpug-wuerzburg.de>
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/basic/zend_logo_guid.phpt b/tests/basic/zend_logo_guid.phpt
deleted file mode 100644
index 23ca0165a..000000000
--- a/tests/basic/zend_logo_guid.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Testing zend_logo_guid() function
---FILE--
-<?php
-echo zend_logo_guid();
-?>
---EXPECT--
-PHPE9568F35-D428-11d2-A769-00AA001ACF42
-
---CREDITS--
-Jason Easter <easter@phpug-wuerzburg.de>
-PHPUG Würzburg <phpug-wuerzburg.de>
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/classes/__call_002.phpt b/tests/classes/__call_002.phpt
index 53a179f78..53a179f78 100755..100644
--- a/tests/classes/__call_002.phpt
+++ b/tests/classes/__call_002.phpt
diff --git a/tests/classes/__set__get_002.phpt b/tests/classes/__set__get_002.phpt
index 71111ccdf..71111ccdf 100755..100644
--- a/tests/classes/__set__get_002.phpt
+++ b/tests/classes/__set__get_002.phpt
diff --git a/tests/classes/__set__get_003.phpt b/tests/classes/__set__get_003.phpt
index 390d30336..390d30336 100755..100644
--- a/tests/classes/__set__get_003.phpt
+++ b/tests/classes/__set__get_003.phpt
diff --git a/tests/classes/__set__get_004.phpt b/tests/classes/__set__get_004.phpt
index e3061da4f..e3061da4f 100755..100644
--- a/tests/classes/__set__get_004.phpt
+++ b/tests/classes/__set__get_004.phpt
diff --git a/tests/classes/__set__get_005.phpt b/tests/classes/__set__get_005.phpt
index d8bbad3d4..d8bbad3d4 100755..100644
--- a/tests/classes/__set__get_005.phpt
+++ b/tests/classes/__set__get_005.phpt
diff --git a/tests/classes/abstract_by_interface_001.phpt b/tests/classes/abstract_by_interface_001.phpt
index 7565fdf45..7565fdf45 100755..100644
--- a/tests/classes/abstract_by_interface_001.phpt
+++ b/tests/classes/abstract_by_interface_001.phpt
diff --git a/tests/classes/abstract_by_interface_002.phpt b/tests/classes/abstract_by_interface_002.phpt
index 77c5619df..77c5619df 100755..100644
--- a/tests/classes/abstract_by_interface_002.phpt
+++ b/tests/classes/abstract_by_interface_002.phpt
diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt
index 0e1ddbe79..0e1ddbe79 100755..100644
--- a/tests/classes/abstract_user_call.phpt
+++ b/tests/classes/abstract_user_call.phpt
diff --git a/tests/classes/array_access_005.phpt b/tests/classes/array_access_005.phpt
index dcb873ff5..dcb873ff5 100755..100644
--- a/tests/classes/array_access_005.phpt
+++ b/tests/classes/array_access_005.phpt
diff --git a/tests/classes/array_access_007.phpt b/tests/classes/array_access_007.phpt
index 42187fe5d..42187fe5d 100755..100644
--- a/tests/classes/array_access_007.phpt
+++ b/tests/classes/array_access_007.phpt
diff --git a/tests/classes/array_access_008.phpt b/tests/classes/array_access_008.phpt
index 997988917..997988917 100755..100644
--- a/tests/classes/array_access_008.phpt
+++ b/tests/classes/array_access_008.phpt
diff --git a/tests/classes/array_access_009.phpt b/tests/classes/array_access_009.phpt
index 386224026..386224026 100755..100644
--- a/tests/classes/array_access_009.phpt
+++ b/tests/classes/array_access_009.phpt
diff --git a/tests/classes/array_access_010.phpt b/tests/classes/array_access_010.phpt
index ad374d278..ad374d278 100755..100644
--- a/tests/classes/array_access_010.phpt
+++ b/tests/classes/array_access_010.phpt
diff --git a/tests/classes/array_access_011.phpt b/tests/classes/array_access_011.phpt
index aa20a56d3..aa20a56d3 100755..100644
--- a/tests/classes/array_access_011.phpt
+++ b/tests/classes/array_access_011.phpt
diff --git a/tests/classes/array_access_012.phpt b/tests/classes/array_access_012.phpt
index 8f85f296e..8f85f296e 100755..100644
--- a/tests/classes/array_access_012.phpt
+++ b/tests/classes/array_access_012.phpt
diff --git a/tests/classes/array_access_013.phpt b/tests/classes/array_access_013.phpt
index 206d9d540..206d9d540 100755..100644
--- a/tests/classes/array_access_013.phpt
+++ b/tests/classes/array_access_013.phpt
diff --git a/tests/classes/autoload_001.phpt b/tests/classes/autoload_001.phpt
index 6f325f49b..6f325f49b 100755..100644
--- a/tests/classes/autoload_001.phpt
+++ b/tests/classes/autoload_001.phpt
diff --git a/tests/classes/autoload_002.phpt b/tests/classes/autoload_002.phpt
index 27dea0f9d..27dea0f9d 100755..100644
--- a/tests/classes/autoload_002.phpt
+++ b/tests/classes/autoload_002.phpt
diff --git a/tests/classes/autoload_003.phpt b/tests/classes/autoload_003.phpt
index 7bdb5da36..7bdb5da36 100755..100644
--- a/tests/classes/autoload_003.phpt
+++ b/tests/classes/autoload_003.phpt
diff --git a/tests/classes/autoload_004.phpt b/tests/classes/autoload_004.phpt
index 23aea5d08..23aea5d08 100755..100644
--- a/tests/classes/autoload_004.phpt
+++ b/tests/classes/autoload_004.phpt
diff --git a/tests/classes/autoload_005.phpt b/tests/classes/autoload_005.phpt
index 36a4e18f0..36a4e18f0 100755..100644
--- a/tests/classes/autoload_005.phpt
+++ b/tests/classes/autoload_005.phpt
diff --git a/tests/classes/autoload_006.phpt b/tests/classes/autoload_006.phpt
index 9af6fc982..9af6fc982 100755..100644
--- a/tests/classes/autoload_006.phpt
+++ b/tests/classes/autoload_006.phpt
diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt
index 880f84930..880f84930 100755..100644
--- a/tests/classes/class_abstract.phpt
+++ b/tests/classes/class_abstract.phpt
diff --git a/tests/classes/class_final.phpt b/tests/classes/class_final.phpt
index 5c73cb255..5c73cb255 100755..100644
--- a/tests/classes/class_final.phpt
+++ b/tests/classes/class_final.phpt
diff --git a/tests/classes/class_stdclass.phpt b/tests/classes/class_stdclass.phpt
index 5e3422aea..5e3422aea 100755..100644
--- a/tests/classes/class_stdclass.phpt
+++ b/tests/classes/class_stdclass.phpt
diff --git a/tests/classes/clone_001.phpt b/tests/classes/clone_001.phpt
index eb06c1f52..eb06c1f52 100755..100644
--- a/tests/classes/clone_001.phpt
+++ b/tests/classes/clone_001.phpt
diff --git a/tests/classes/clone_002.phpt b/tests/classes/clone_002.phpt
index 4430a2cab..4430a2cab 100755..100644
--- a/tests/classes/clone_002.phpt
+++ b/tests/classes/clone_002.phpt
diff --git a/tests/classes/clone_003.phpt b/tests/classes/clone_003.phpt
index 9a251c506..9a251c506 100755..100644
--- a/tests/classes/clone_003.phpt
+++ b/tests/classes/clone_003.phpt
diff --git a/tests/classes/clone_004.phpt b/tests/classes/clone_004.phpt
index 2059103bc..2059103bc 100755..100644
--- a/tests/classes/clone_004.phpt
+++ b/tests/classes/clone_004.phpt
diff --git a/tests/classes/clone_005.phpt b/tests/classes/clone_005.phpt
index bfe4d66d6..bfe4d66d6 100755..100644
--- a/tests/classes/clone_005.phpt
+++ b/tests/classes/clone_005.phpt
diff --git a/tests/classes/clone_006.phpt b/tests/classes/clone_006.phpt
index de22fec15..de22fec15 100755..100644
--- a/tests/classes/clone_006.phpt
+++ b/tests/classes/clone_006.phpt
diff --git a/tests/classes/ctor_failure.phpt b/tests/classes/ctor_failure.phpt
index b7d3b64dd..b7d3b64dd 100755..100644
--- a/tests/classes/ctor_failure.phpt
+++ b/tests/classes/ctor_failure.phpt
diff --git a/tests/classes/ctor_in_interface_01.phpt b/tests/classes/ctor_in_interface_01.phpt
index e5ad30ebc..e5ad30ebc 100755..100644
--- a/tests/classes/ctor_in_interface_01.phpt
+++ b/tests/classes/ctor_in_interface_01.phpt
diff --git a/tests/classes/ctor_in_interface_02.phpt b/tests/classes/ctor_in_interface_02.phpt
index 08e6f36e0..08e6f36e0 100755..100644
--- a/tests/classes/ctor_in_interface_02.phpt
+++ b/tests/classes/ctor_in_interface_02.phpt
diff --git a/tests/classes/ctor_in_interface_03.phpt b/tests/classes/ctor_in_interface_03.phpt
index ac7333120..ac7333120 100755..100644
--- a/tests/classes/ctor_in_interface_03.phpt
+++ b/tests/classes/ctor_in_interface_03.phpt
diff --git a/tests/classes/ctor_in_interface_04.phpt b/tests/classes/ctor_in_interface_04.phpt
index 94be655b8..94be655b8 100755..100644
--- a/tests/classes/ctor_in_interface_04.phpt
+++ b/tests/classes/ctor_in_interface_04.phpt
diff --git a/tests/classes/ctor_visibility.phpt b/tests/classes/ctor_visibility.phpt
index 8d3b1c5c5..8d3b1c5c5 100755..100644
--- a/tests/classes/ctor_visibility.phpt
+++ b/tests/classes/ctor_visibility.phpt
diff --git a/tests/classes/destructor_and_echo.phpt b/tests/classes/destructor_and_echo.phpt
index 0a253593a..0a253593a 100755..100644
--- a/tests/classes/destructor_and_echo.phpt
+++ b/tests/classes/destructor_and_echo.phpt
diff --git a/tests/classes/destructor_and_exceptions.phpt b/tests/classes/destructor_and_exceptions.phpt
index 8100c9246..8100c9246 100755..100644
--- a/tests/classes/destructor_and_exceptions.phpt
+++ b/tests/classes/destructor_and_exceptions.phpt
diff --git a/tests/classes/destructor_and_globals.phpt b/tests/classes/destructor_and_globals.phpt
index 9caf0f102..9caf0f102 100755..100644
--- a/tests/classes/destructor_and_globals.phpt
+++ b/tests/classes/destructor_and_globals.phpt
diff --git a/tests/classes/destructor_and_references.phpt b/tests/classes/destructor_and_references.phpt
index 6b9b019b6..6b9b019b6 100755..100644
--- a/tests/classes/destructor_and_references.phpt
+++ b/tests/classes/destructor_and_references.phpt
diff --git a/tests/classes/destructor_inheritance.phpt b/tests/classes/destructor_inheritance.phpt
index b9a46659b..b9a46659b 100755..100644
--- a/tests/classes/destructor_inheritance.phpt
+++ b/tests/classes/destructor_inheritance.phpt
diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt
index 7674c512f..7674c512f 100755..100644
--- a/tests/classes/destructor_visibility_001.phpt
+++ b/tests/classes/destructor_visibility_001.phpt
diff --git a/tests/classes/destructor_visibility_002.phpt b/tests/classes/destructor_visibility_002.phpt
index 2cc83334a..2cc83334a 100755..100644
--- a/tests/classes/destructor_visibility_002.phpt
+++ b/tests/classes/destructor_visibility_002.phpt
diff --git a/tests/classes/destructor_visibility_003.phpt b/tests/classes/destructor_visibility_003.phpt
index 83e3efe22..83e3efe22 100755..100644
--- a/tests/classes/destructor_visibility_003.phpt
+++ b/tests/classes/destructor_visibility_003.phpt
diff --git a/tests/classes/factory_and_singleton_001.phpt b/tests/classes/factory_and_singleton_001.phpt
index 70fa020a4..70fa020a4 100755..100644
--- a/tests/classes/factory_and_singleton_001.phpt
+++ b/tests/classes/factory_and_singleton_001.phpt
diff --git a/tests/classes/factory_and_singleton_002.phpt b/tests/classes/factory_and_singleton_002.phpt
index 3308a561a..3308a561a 100755..100644
--- a/tests/classes/factory_and_singleton_002.phpt
+++ b/tests/classes/factory_and_singleton_002.phpt
diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt
index 3d50a810a..3d50a810a 100755..100644
--- a/tests/classes/factory_and_singleton_003.phpt
+++ b/tests/classes/factory_and_singleton_003.phpt
diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt
index 14edcb1fc..14edcb1fc 100755..100644
--- a/tests/classes/factory_and_singleton_004.phpt
+++ b/tests/classes/factory_and_singleton_004.phpt
diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt
index 2cd7e5cc9..2cd7e5cc9 100755..100644
--- a/tests/classes/factory_and_singleton_005.phpt
+++ b/tests/classes/factory_and_singleton_005.phpt
diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt
index 81cf71488..81cf71488 100755..100644
--- a/tests/classes/factory_and_singleton_006.phpt
+++ b/tests/classes/factory_and_singleton_006.phpt
diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt
index 4788dbf08..4788dbf08 100755..100644
--- a/tests/classes/factory_and_singleton_007.phpt
+++ b/tests/classes/factory_and_singleton_007.phpt
diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt
index 750b9db34..750b9db34 100755..100644
--- a/tests/classes/factory_and_singleton_008.phpt
+++ b/tests/classes/factory_and_singleton_008.phpt
diff --git a/tests/classes/factory_and_singleton_009.phpt b/tests/classes/factory_and_singleton_009.phpt
index acf792c31..acf792c31 100755..100644
--- a/tests/classes/factory_and_singleton_009.phpt
+++ b/tests/classes/factory_and_singleton_009.phpt
diff --git a/tests/classes/factory_and_singleton_010.phpt b/tests/classes/factory_and_singleton_010.phpt
index 0f5fb2dc7..0f5fb2dc7 100755..100644
--- a/tests/classes/factory_and_singleton_010.phpt
+++ b/tests/classes/factory_and_singleton_010.phpt
diff --git a/tests/classes/final_ctor1.phpt b/tests/classes/final_ctor1.phpt
index ebfa08081..ebfa08081 100755..100644
--- a/tests/classes/final_ctor1.phpt
+++ b/tests/classes/final_ctor1.phpt
diff --git a/tests/classes/final_ctor2.phpt b/tests/classes/final_ctor2.phpt
index 905337b40..905337b40 100755..100644
--- a/tests/classes/final_ctor2.phpt
+++ b/tests/classes/final_ctor2.phpt
diff --git a/tests/classes/inheritance_002.phpt b/tests/classes/inheritance_002.phpt
index cca528e29..cca528e29 100755..100644
--- a/tests/classes/inheritance_002.phpt
+++ b/tests/classes/inheritance_002.phpt
diff --git a/tests/classes/inheritance_003.phpt b/tests/classes/inheritance_003.phpt
index 1f4eafa53..1f4eafa53 100755..100644
--- a/tests/classes/inheritance_003.phpt
+++ b/tests/classes/inheritance_003.phpt
diff --git a/tests/classes/inheritance_004.phpt b/tests/classes/inheritance_004.phpt
index d1f5faf5d..d1f5faf5d 100755..100644
--- a/tests/classes/inheritance_004.phpt
+++ b/tests/classes/inheritance_004.phpt
diff --git a/tests/classes/interface_and_extends.phpt b/tests/classes/interface_and_extends.phpt
index f9040ae4a..f9040ae4a 100755..100644
--- a/tests/classes/interface_and_extends.phpt
+++ b/tests/classes/interface_and_extends.phpt
diff --git a/tests/classes/interface_optional_arg.phpt b/tests/classes/interface_optional_arg.phpt
index 05f2fc41d..05f2fc41d 100755..100644
--- a/tests/classes/interface_optional_arg.phpt
+++ b/tests/classes/interface_optional_arg.phpt
diff --git a/tests/classes/interfaces_003.phpt b/tests/classes/interfaces_003.phpt
index f9ab92bb1..f9ab92bb1 100755..100644
--- a/tests/classes/interfaces_003.phpt
+++ b/tests/classes/interfaces_003.phpt
diff --git a/tests/classes/iterators_001.phpt b/tests/classes/iterators_001.phpt
index 02e361078..02e361078 100755..100644
--- a/tests/classes/iterators_001.phpt
+++ b/tests/classes/iterators_001.phpt
diff --git a/tests/classes/iterators_002.phpt b/tests/classes/iterators_002.phpt
index 4a58be032..4a58be032 100755..100644
--- a/tests/classes/iterators_002.phpt
+++ b/tests/classes/iterators_002.phpt
diff --git a/tests/classes/iterators_003.phpt b/tests/classes/iterators_003.phpt
index 42695db6b..42695db6b 100755..100644
--- a/tests/classes/iterators_003.phpt
+++ b/tests/classes/iterators_003.phpt
diff --git a/tests/classes/iterators_004.phpt b/tests/classes/iterators_004.phpt
index 3fe05276c..3fe05276c 100755..100644
--- a/tests/classes/iterators_004.phpt
+++ b/tests/classes/iterators_004.phpt
diff --git a/tests/classes/iterators_005.phpt b/tests/classes/iterators_005.phpt
index 005deb92a..005deb92a 100755..100644
--- a/tests/classes/iterators_005.phpt
+++ b/tests/classes/iterators_005.phpt
diff --git a/tests/classes/iterators_007.phpt b/tests/classes/iterators_007.phpt
index f2638b31d..f2638b31d 100755..100644
--- a/tests/classes/iterators_007.phpt
+++ b/tests/classes/iterators_007.phpt
diff --git a/tests/classes/private_members.phpt b/tests/classes/private_members.phpt
index a8ef9ab92..a8ef9ab92 100755..100644
--- a/tests/classes/private_members.phpt
+++ b/tests/classes/private_members.phpt
diff --git a/tests/classes/private_redeclare.phpt b/tests/classes/private_redeclare.phpt
index e3061f113..e3061f113 100755..100644
--- a/tests/classes/private_redeclare.phpt
+++ b/tests/classes/private_redeclare.phpt
diff --git a/tests/classes/serialize_001.phpt b/tests/classes/serialize_001.phpt
index 142fc50fc..142fc50fc 100755..100644
--- a/tests/classes/serialize_001.phpt
+++ b/tests/classes/serialize_001.phpt
diff --git a/tests/classes/static_properties_001.phpt b/tests/classes/static_properties_001.phpt
index 1c34f68fc..1c34f68fc 100755..100644
--- a/tests/classes/static_properties_001.phpt
+++ b/tests/classes/static_properties_001.phpt
diff --git a/tests/classes/static_this.phpt b/tests/classes/static_this.phpt
index 91b028719..91b028719 100755..100644
--- a/tests/classes/static_this.phpt
+++ b/tests/classes/static_this.phpt
diff --git a/tests/classes/this.phpt b/tests/classes/this.phpt
index 1d9c6236e..1d9c6236e 100755..100644
--- a/tests/classes/this.phpt
+++ b/tests/classes/this.phpt
diff --git a/tests/classes/tostring_001.phpt b/tests/classes/tostring_001.phpt
index 53144ca20..53144ca20 100755..100644
--- a/tests/classes/tostring_001.phpt
+++ b/tests/classes/tostring_001.phpt
diff --git a/tests/classes/tostring_002.phpt b/tests/classes/tostring_002.phpt
index 8a4a7af33..8a4a7af33 100755..100644
--- a/tests/classes/tostring_002.phpt
+++ b/tests/classes/tostring_002.phpt
diff --git a/tests/classes/tostring_003.phpt b/tests/classes/tostring_003.phpt
index 8815bd940..8815bd940 100755..100644
--- a/tests/classes/tostring_003.phpt
+++ b/tests/classes/tostring_003.phpt
diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt
index 7c685bfdb..7c685bfdb 100755..100644
--- a/tests/classes/type_hinting_002.phpt
+++ b/tests/classes/type_hinting_002.phpt
diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt
index a966210fb..a966210fb 100755..100644
--- a/tests/classes/type_hinting_003.phpt
+++ b/tests/classes/type_hinting_003.phpt
diff --git a/tests/classes/visibility_005.phpt b/tests/classes/visibility_005.phpt
index 859a5f7b6..859a5f7b6 100755..100644
--- a/tests/classes/visibility_005.phpt
+++ b/tests/classes/visibility_005.phpt
diff --git a/tests/lang/015.inc b/tests/lang/015.inc
index d436a7bb1..d436a7bb1 100755..100644
--- a/tests/lang/015.inc
+++ b/tests/lang/015.inc
diff --git a/tests/lang/016.inc b/tests/lang/016.inc
index b73333f7b..b73333f7b 100755..100644
--- a/tests/lang/016.inc
+++ b/tests/lang/016.inc
diff --git a/tests/lang/023-1.inc b/tests/lang/023-1.inc
index 8d52e844c..8d52e844c 100755..100644
--- a/tests/lang/023-1.inc
+++ b/tests/lang/023-1.inc
diff --git a/tests/lang/023-2.inc b/tests/lang/023-2.inc
index 6dd1e730f..6dd1e730f 100755..100644
--- a/tests/lang/023-2.inc
+++ b/tests/lang/023-2.inc
diff --git a/tests/lang/036.phpt b/tests/lang/036.phpt
index 474316e36..474316e36 100755..100644
--- a/tests/lang/036.phpt
+++ b/tests/lang/036.phpt
diff --git a/tests/lang/037.phpt b/tests/lang/037.phpt
index c2a1ee312..c2a1ee312 100755..100644
--- a/tests/lang/037.phpt
+++ b/tests/lang/037.phpt
diff --git a/tests/lang/038.phpt b/tests/lang/038.phpt
index 195050b2f..195050b2f 100755..100644
--- a/tests/lang/038.phpt
+++ b/tests/lang/038.phpt
diff --git a/tests/lang/039.phpt b/tests/lang/039.phpt
index aa4b59164..aa4b59164 100755..100644
--- a/tests/lang/039.phpt
+++ b/tests/lang/039.phpt
diff --git a/tests/lang/040.phpt b/tests/lang/040.phpt
index 6d8ece967..6d8ece967 100755..100644
--- a/tests/lang/040.phpt
+++ b/tests/lang/040.phpt
diff --git a/tests/lang/bug23524.phpt b/tests/lang/bug23524.phpt
index 512c714e2..512c714e2 100755..100644
--- a/tests/lang/bug23524.phpt
+++ b/tests/lang/bug23524.phpt
diff --git a/tests/lang/bug24403.phpt b/tests/lang/bug24403.phpt
index fe99257d3..8f4934e7b 100644
--- a/tests/lang/bug24403.phpt
+++ b/tests/lang/bug24403.phpt
@@ -17,4 +17,5 @@ class a
}
new a();
?>
---EXPECT--
+--EXPECTF--
+Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line %d
diff --git a/tests/lang/bug24499.phpt b/tests/lang/bug24499.phpt
index 6ce56dbad..6ce56dbad 100755..100644
--- a/tests/lang/bug24499.phpt
+++ b/tests/lang/bug24499.phpt
diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt
index 919b38e29..919b38e29 100755..100644
--- a/tests/lang/bug24640.phpt
+++ b/tests/lang/bug24640.phpt
diff --git a/tests/lang/bug24652.phpt b/tests/lang/bug24652.phpt
index 3bcea0e1d..3bcea0e1d 100755..100644
--- a/tests/lang/bug24652.phpt
+++ b/tests/lang/bug24652.phpt
diff --git a/tests/lang/bug24908.phpt b/tests/lang/bug24908.phpt
index 30056abf3..30056abf3 100755..100644
--- a/tests/lang/bug24908.phpt
+++ b/tests/lang/bug24908.phpt
diff --git a/tests/lang/bug25145.phpt b/tests/lang/bug25145.phpt
index 9c533871a..9c533871a 100755..100644
--- a/tests/lang/bug25145.phpt
+++ b/tests/lang/bug25145.phpt
diff --git a/tests/lang/bug25547.phpt b/tests/lang/bug25547.phpt
index b54f467ea..b54f467ea 100755..100644
--- a/tests/lang/bug25547.phpt
+++ b/tests/lang/bug25547.phpt
diff --git a/tests/lang/bug25652.phpt b/tests/lang/bug25652.phpt
index 09cfc1819..09cfc1819 100755..100644
--- a/tests/lang/bug25652.phpt
+++ b/tests/lang/bug25652.phpt
diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt
index bb030c9df..bb030c9df 100755..100644
--- a/tests/lang/bug25922.phpt
+++ b/tests/lang/bug25922.phpt
diff --git a/tests/lang/bug27439.phpt b/tests/lang/bug27439.phpt
index 4bcadb78f..4bcadb78f 100755..100644
--- a/tests/lang/bug27439.phpt
+++ b/tests/lang/bug27439.phpt
diff --git a/tests/lang/bug29566.phpt b/tests/lang/bug29566.phpt
index 16aec8fc7..16aec8fc7 100755..100644
--- a/tests/lang/bug29566.phpt
+++ b/tests/lang/bug29566.phpt
diff --git a/tests/lang/bug29893.phpt b/tests/lang/bug29893.phpt
index d320de0ee..d320de0ee 100755..100644
--- a/tests/lang/bug29893.phpt
+++ b/tests/lang/bug29893.phpt
diff --git a/tests/lang/bug29944.phpt b/tests/lang/bug29944.phpt
index 7882936f0..7882936f0 100755..100644
--- a/tests/lang/bug29944.phpt
+++ b/tests/lang/bug29944.phpt
diff --git a/tests/lang/bug35176.phpt b/tests/lang/bug35176.phpt
index 2928f7ec4..2928f7ec4 100755..100644
--- a/tests/lang/bug35176.phpt
+++ b/tests/lang/bug35176.phpt
diff --git a/tests/lang/bug35382.phpt b/tests/lang/bug35382.phpt
index 69190d4c9..69190d4c9 100755..100644
--- a/tests/lang/bug35382.phpt
+++ b/tests/lang/bug35382.phpt
diff --git a/tests/lang/bug38579.inc b/tests/lang/bug38579.inc
index 8ecc55824..8ecc55824 100755..100644
--- a/tests/lang/bug38579.inc
+++ b/tests/lang/bug38579.inc
diff --git a/tests/lang/bug38579.phpt b/tests/lang/bug38579.phpt
index 445296c22..445296c22 100755..100644
--- a/tests/lang/bug38579.phpt
+++ b/tests/lang/bug38579.phpt
diff --git a/tests/lang/bug44654.phpt b/tests/lang/bug44654.phpt
index be714e8ac..be714e8ac 100755..100644
--- a/tests/lang/bug44654.phpt
+++ b/tests/lang/bug44654.phpt
diff --git a/tests/lang/foreachLoop.007.phpt b/tests/lang/foreachLoop.007.phpt
deleted file mode 100644
index f47fdc735..000000000
--- a/tests/lang/foreachLoop.007.phpt
+++ /dev/null
@@ -1,11 +0,0 @@
---TEST--
-Foreach loop tests - error case: reference to constant array.
---FILE--
-<?php
-echo "\nReference to constant array\n";
-foreach (array(1,2) as &$v) {
- var_dump($v);
-}
-?>
---EXPECTF--
-Parse error: %s on line 3
diff --git a/tests/lang/foreachLoop.008.phpt b/tests/lang/foreachLoop.008.phpt
deleted file mode 100644
index 787f43b88..000000000
--- a/tests/lang/foreachLoop.008.phpt
+++ /dev/null
@@ -1,10 +0,0 @@
---TEST--
-Foreach loop tests - error case: reference to constant array, with key.
---FILE--
-<?php
-foreach (array(1,2) as $k=>&$v) {
- var_dump($v);
-}
-?>
---EXPECTF--
-Fatal error: Cannot create references to elements of a temporary array expression in %s on line 2
diff --git a/tests/lang/foreach_with_object_001.phpt b/tests/lang/foreach_with_object_001.phpt
index 598b844fb..598b844fb 100755..100644
--- a/tests/lang/foreach_with_object_001.phpt
+++ b/tests/lang/foreach_with_object_001.phpt
diff --git a/tests/strings/bug22592.phpt b/tests/strings/bug22592.phpt
index 3443c3285..3443c3285 100755..100644
--- a/tests/strings/bug22592.phpt
+++ b/tests/strings/bug22592.phpt
diff --git a/travis/compile.sh b/travis/compile.sh
new file mode 100755
index 000000000..b48bfe8e2
--- /dev/null
+++ b/travis/compile.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+./buildconf
+./configure --quiet \
+--with-pdo-mysql \
+--with-mysql \
+--with-mysqli \
+--with-pgsql \
+--with-pdo-pgsql \
+--with-pdo-sqlite \
+--enable-intl \
+--without-pear \
+--with-gd \
+--with-jpeg-dir=/usr \
+--with-png-dir=/usr \
+--enable-exif \
+--enable-zip \
+--with-zlib \
+--with-zlib-dir=/usr \
+--with-mcrypt=/usr \
+--enable-soap \
+--enable-xmlreader \
+--with-xsl \
+--with-curl=/usr \
+--with-tidy \
+--with-xmlrpc \
+--enable-sysvsem \
+--enable-sysvshm \
+--enable-shmop \
+--enable-pcntl \
+--with-readline \
+--enable-mbstring \
+--with-curl \
+--with-gettext \
+--enable-sockets \
+--with-bz2 \
+--enable-bcmath
+make --quiet
diff --git a/travis/ext/curl/setup.sh b/travis/ext/curl/setup.sh
new file mode 100755
index 000000000..74dad16eb
--- /dev/null
+++ b/travis/ext/curl/setup.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+export PHP_CURL_HTTP_REMOTE_SERVER="http://localhost"
+cd ./ext/curl/tests/responder
+sudo php -S localhost:80 &
+cd - \ No newline at end of file
diff --git a/travis/ext/mysql/setup.sh b/travis/ext/mysql/setup.sh
new file mode 100755
index 000000000..994fad137
--- /dev/null
+++ b/travis/ext/mysql/setup.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+mysql -u root -e "CREATE DATABASE IF NOT EXISTS test"
diff --git a/travis/ext/mysqli/setup.sh b/travis/ext/mysqli/setup.sh
new file mode 100755
index 000000000..994fad137
--- /dev/null
+++ b/travis/ext/mysqli/setup.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+mysql -u root -e "CREATE DATABASE IF NOT EXISTS test"
diff --git a/travis/ext/pdo_mysql/setup.sh b/travis/ext/pdo_mysql/setup.sh
new file mode 100755
index 000000000..994fad137
--- /dev/null
+++ b/travis/ext/pdo_mysql/setup.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+mysql -u root -e "CREATE DATABASE IF NOT EXISTS test"
diff --git a/travis/ext/pdo_pgsql/setup.sh b/travis/ext/pdo_pgsql/setup.sh
new file mode 100755
index 000000000..6f16f72cc
--- /dev/null
+++ b/travis/ext/pdo_pgsql/setup.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+export PDO_PGSQL_TEST_DSN='pgsql:host=localhost port=5432 dbname=test user=postgres password=' \ No newline at end of file
diff --git a/travis/ext/pgsql/setup.sh b/travis/ext/pgsql/setup.sh
new file mode 100755
index 000000000..32b39a404
--- /dev/null
+++ b/travis/ext/pgsql/setup.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+echo '
+<?php $conn_str .= " user=postgres"; ?>' >> "./ext/pgsql/tests/config.inc"
+psql -c 'create database test;' -U postgres \ No newline at end of file
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index 1a4b834be..3face08a8 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -181,8 +181,13 @@ if (VCVERS >= 1500 && PHP_MP != 'disable') {
}
// General link flags
-DEFINE("LDFLAGS", "/nologo /version:" +
- PHP_VERSION + "." + PHP_MINOR_VERSION + "." + PHP_RELEASE_VERSION);
+
+if (VCVERS >= 1700) {
+ DEFINE("LDFLAGS", "/nologo ");
+} else {
+ DEFINE("LDFLAGS", "/nologo /version:" +
+ PHP_VERSION + "." + PHP_MINOR_VERSION + "." + PHP_RELEASE_VERSION);
+}
// General DLL link flags
DEFINE("DLL_LDFLAGS", "/dll ");
@@ -359,7 +364,7 @@ ADD_SOURCES("Zend", "zend_language_parser.c zend_language_scanner.c \
zend_stream.c zend_iterators.c zend_interfaces.c zend_objects.c \
zend_object_handlers.c zend_objects_API.c \
zend_default_classes.c zend_execute.c zend_strtod.c zend_gc.c zend_closures.c \
- zend_float.c zend_string.c");
+ zend_float.c zend_string.c zend_generators.c");
if (VCVERS == 1200) {
AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1);
@@ -368,7 +373,7 @@ if (VCVERS == 1200) {
ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \
php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \
- php_open_temporary_file.c php_logos.c output.c internal_functions.c php_sprintf.c");
+ php_open_temporary_file.c output.c internal_functions.c php_sprintf.c");
ADD_SOURCES("win32", "inet.c fnmatch.c sockets.c");
// Newer versions have it
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index c6cf076ba..9efdfdea3 100644
--- a/win32/build/config.w32.h.in
+++ b/win32/build/config.w32.h.in
@@ -6,8 +6,8 @@
/* Define the minimum supported version */
#undef _WIN32_WINNT
#undef NTDDI_VERSION
-#define _WIN32_WINNT 0x0501
-#define NTDDI_VERSION 0x05010200
+#define _WIN32_WINNT 0x0600
+#define NTDDI_VERSION 0x06000100
/* Default PHP / PEAR directories */
#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):""
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index c0a1ce895..d9a0c1b5f 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -46,6 +46,7 @@ VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)';
+VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2012)';
var VC_VERSIONS_SHORT = new Array();
VC_VERSIONS_SHORT[1200] = 'VC6';
@@ -54,6 +55,7 @@ VC_VERSIONS_SHORT[1310] = 'VC7.1';
VC_VERSIONS_SHORT[1400] = 'VC8';
VC_VERSIONS_SHORT[1500] = 'VC9';
VC_VERSIONS_SHORT[1600] = 'VC10';
+VC_VERSIONS_SHORT[1700] = 'VC11';
if (PROGRAM_FILES == null) {
PROGRAM_FILES = "C:\\Program Files";
diff --git a/win32/globals.c b/win32/globals.c
index b92fad9f2..b92fad9f2 100755..100644
--- a/win32/globals.c
+++ b/win32/globals.c
diff --git a/win32/inet.c b/win32/inet.c
index b794bcaeb..d424c8a54 100644
--- a/win32/inet.c
+++ b/win32/inet.c
@@ -1,11 +1,12 @@
#include "config.w32.h"
-#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */
#include "php.h"
#include <winsock2.h>
#include <windows.h>
#include <Ws2tcpip.h>
#include "inet.h"
+#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */
+
PHPAPI int inet_pton(int af, const char* src, void* dst)
{
@@ -76,6 +77,8 @@ PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size)
return NULL;
}
+#endif
+
int inet_aton(const char *cp, struct in_addr *inp) {
inp->s_addr = inet_addr(cp);
@@ -85,4 +88,3 @@ int inet_aton(const char *cp, struct in_addr *inp) {
return 1;
}
-#endif
diff --git a/win32/inet.h b/win32/inet.h
index e58083828..623d114df 100644
--- a/win32/inet.h
+++ b/win32/inet.h
@@ -3,8 +3,9 @@
#endif
#include <Ws2tcpip.h>
-#if (_WIN32_WINNT < 0x0600)
+#if (_WIN32_WINNT <= 0x502)
PHPAPI int inet_pton(int af, const char* src, void* dst);
PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size);
-PHPAPI int inet_aton(const char *cp, struct in_addr *inp);
#endif
+
+PHPAPI int inet_aton(const char *cp, struct in_addr *inp);
diff --git a/win32/php5dll.dsp b/win32/php5dll.dsp
index 2216d7dfe..cc56f538a 100644
--- a/win32/php5dll.dsp
+++ b/win32/php5dll.dsp
@@ -164,10 +164,6 @@ SOURCE=..\main\php_ini.c
# End Source File
# Begin Source File
-SOURCE=..\main\php_logos.c
-# End Source File
-# Begin Source File
-
SOURCE=..\main\php_open_temporary_file.c
# End Source File
# Begin Source File
@@ -288,10 +284,6 @@ SOURCE=..\main\php_ini.h
# End Source File
# Begin Source File
-SOURCE=..\main\php_logos.h
-# End Source File
-# Begin Source File
-
SOURCE=..\main\php_open_temporary_file.h
# End Source File
# Begin Source File
diff --git a/win32/php5dllts.dsp b/win32/php5dllts.dsp
index a8e93ec5e..3755ea79f 100644
--- a/win32/php5dllts.dsp
+++ b/win32/php5dllts.dsp
@@ -201,10 +201,6 @@ SOURCE=..\main\php_ini.c
# End Source File
# Begin Source File
-SOURCE=..\main\php_logos.c
-# End Source File
-# Begin Source File
-
SOURCE=..\main\php_open_temporary_file.c
# End Source File
# Begin Source File
@@ -317,10 +313,6 @@ SOURCE=..\main\php_ini.h
# End Source File
# Begin Source File
-SOURCE=..\main\php_logos.h
-# End Source File
-# Begin Source File
-
SOURCE=..\main\php_main.h
# End Source File
# Begin Source File
diff --git a/win32/php_win32_globals.h b/win32/php_win32_globals.h
index 1fcfb6036..1fcfb6036 100755..100644
--- a/win32/php_win32_globals.h
+++ b/win32/php_win32_globals.h
diff --git a/win32/sendmail.c b/win32/sendmail.c
index c4969ad5e..4b09697e9 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -25,6 +25,7 @@
#ifndef NETWARE
#include <winsock2.h>
#include "time.h"
+# include <Ws2tcpip.h>
#else /* NETWARE */
#include <netware/sendmail_nw.h>
#endif /* NETWARE */
diff --git a/win32/syslog.reg b/win32/syslog.reg
index 4d3e27397..cb12d6e6b 100644
--- a/win32/syslog.reg
+++ b/win32/syslog.reg
@@ -2,4 +2,4 @@ REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\PHP-5.3.99-dev]
"TypesSupported"=dword:00000007
-"EventMessageFile"="g:\\test\\srcinstall6\\php5ts_debug.dll"
+"EventMessageFile"="g:\\test\\srctrunkinstall\\php5ts.dll"